init
This commit is contained in:
commit
72a26edcff
22092 changed files with 2101903 additions and 0 deletions
89
scripts/touren.php
Normal file
89
scripts/touren.php
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
<?php
|
||||
if(isset($_GET['a']))
|
||||
$action=$_GET['a'];
|
||||
|
||||
else
|
||||
$action='list';
|
||||
switch($action):
|
||||
|
||||
case 'show';
|
||||
if(isset($_GET['mid']) && $_GET['mid'] != '') {
|
||||
$tourenliste = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$_GET['mid']."'");
|
||||
if($tourenliste['num_rows'] == 1) {
|
||||
/*
|
||||
if(isset($_POST['savetour'])) {
|
||||
$GLOBALS['mysql']->insert("UPDATE tourengeplant2 SET Tour='".$_POST['Tour'][$_POST['savetour']]."' WHERE id='".$_POST['savetour']."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE tourengeplant2 SET Auflage='".$_POST['Auflage'][$_POST['savetour']]."' WHERE id='".$_POST['savetour']."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE tourengeplant2 SET Pakete='".$_POST['Pakete'][$_POST['savetour']]."' WHERE id='".$_POST['savetour']."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE tourengeplant2 SET Ladung='".$_POST['Ladung'][$_POST['savetour']]."' WHERE id='".$_POST['savetour']."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE tourengeplant2 SET Paket='".$_POST['Paket'][$_POST['savetour']]."' WHERE id='".$_POST['savetour']."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE tourengeplant2 SET Stellzeit='".$_POST['Stellzeit'][$_POST['savetour']]."' WHERE id='".$_POST['savetour']."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE tourengeplant2 SET StartRampe='".$_POST['StartRampe'][$_POST['savetour']]."' WHERE id='".$_POST['savetour']."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE tourengeplant2 SET EndeRampe='".$_POST['EndeRampe'][$_POST['savetour']]."' WHERE id='".$_POST['savetour']."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE tourengeplant2 SET Fahrer='".$_POST['Fahrer'][$_POST['savetour']]."' WHERE id='".$_POST['savetour']."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE tourengeplant2 SET Fahrzeug='".$_POST['Fahrzeug'][$_POST['savetour']]."' WHERE id='".$_POST['savetour']."'");
|
||||
$success[]='Tour wurde geändert.'; $template->assign('success', $success);
|
||||
|
||||
}
|
||||
$tourenlisterow = $GLOBALS['mysql']->query("SELECT * FROM touren");
|
||||
while($tourenlisteinfo = $tourenlisterow->fetch_assoc()){
|
||||
$option1.='<option value="'.$tourenlisteinfo['tour'].'" >'.$tourenlisteinfo['tour'].'</option>';
|
||||
|
||||
}
|
||||
$template->assign('option1', $option1);
|
||||
*/
|
||||
$key=0;
|
||||
$touren = $GLOBALS['mysql']->query("SELECT * FROM ".$tourenliste['tour']." WHERE erl='0' LIMIT 250");
|
||||
while($row = $touren->fetch_assoc()){
|
||||
$touren2[$key]['jahr']=$row['jahr'];
|
||||
$touren2[$key]['monat']=$row['monat'];
|
||||
$touren2[$key]['tag']=$row['tag'];
|
||||
$row_fahrer = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['fahrer']."'");
|
||||
$touren2[$key]['fahrer']=$row_fahrer['name'];
|
||||
$touren2[$key]['fahrer_id']=$row_fahrer['id'];
|
||||
$row_fahrer_array = $GLOBALS['mysql']->query_array("SELECT * FROM mitarbeiter");
|
||||
$touren2[$key]['fahrer_array']=$row_fahrer_array;
|
||||
$touren2[$key]['zeit']=$row['zeit'];
|
||||
$touren2[$key]['gewicht1']=$row['gewicht1'];
|
||||
$touren2[$key]['gewicht2']=$row['gewicht2'];
|
||||
$touren2[$key]['gewicht3']=$row['gewicht3'];
|
||||
$touren2[$key]['gewicht4']=$row['gewicht4'];
|
||||
$touren2[$key]['gewicht5']=$row['gewicht5'];
|
||||
$touren2[$key]['gesammtgewicht']=$row['gewicht1']+$row['gewicht2']+$row['gewicht3']+$row['gewicht4']+$row['gewicht5'];
|
||||
$touren2[$key]['auto']=$row['auto'];
|
||||
$touren2[$key]['infotext']=$row['infotext'];
|
||||
$touren2[$key]['afirma']=$row['afirma'];
|
||||
$touren2[$key]['erl']=$row['erl'];
|
||||
$key++;
|
||||
|
||||
}
|
||||
|
||||
// Vorabanzeige resultat
|
||||
// echo "<pre>";
|
||||
// print_r($touren2);
|
||||
// echo "</pre>";
|
||||
|
||||
$template->assign('touren2', $touren2);
|
||||
$template->assign('content', 'tpl/touren_show.tpl');
|
||||
} else {
|
||||
$error[]='Tour existiert nicht!'; $template->assign('error', $error);
|
||||
$template->assign('content', 'tpl/leer.tpl');
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
$warning[]='Es wurde keine Tour ausgewählt!'; $template->assign('warning', $warning);
|
||||
$template->assign('content', 'tpl/leer.tpl');
|
||||
}
|
||||
break;
|
||||
|
||||
case 'list';
|
||||
default:
|
||||
|
||||
if(isset($_POST['tour'])) { $GLOBALS['mysql']->insert("INSERT INTO touren (tour,infotitel) VALUES('".$_POST['tour']."','".$_POST['infotitel']."')"); }
|
||||
if(isset($_POST['delete'])) { $GLOBALS['mysql']->query("DELETE FROM touren WHERE id='".$_POST['delete']."'"); }
|
||||
$tourenliste = $GLOBALS['mysql']->query_array("SELECT * FROM touren");
|
||||
$template->assign('tourenliste', $tourenliste);
|
||||
$template->assign('content', 'tpl/touren_list.tpl');
|
||||
endswitch;
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue