jb-data.de/scripts/_aenderday.php
2025-08-11 22:23:30 +02:00

62 lines
No EOL
2.1 KiB
PHP

<?
$kw_aktuell = (int)date('W');
$key=0;
$touren = $GLOBALS['mysql']->query_array("SELECT * FROM tourenliste WHERE typ='1' AND kw='".$kw_aktuell."'");
echo "$row->url <br>";
while($row = $touren->fetch_assoc()){
$touren2[$key]['id']=$row['id'];
/*
$touren2[$key]['jahr']=$row['jahr'];
$touren2[$key]['monat']=$row['monat'];
$touren2[$key]['tag']=$row['tag'];
*/
$wochentag=date('l',mktime(0,0,0,$row['monat'],$row['tag'],$row['jahr']));
$touren2[$key]['wt']=$wochentag=$GLOBALS['core']->translateDate($wochentag);
$touren2[$key]['kw']=date('W', mktime(0,0,0,$row['monat'],$row['tag'],$row['jahr']));
$touren2[$key]['tag']=date('d.m.Y', mktime(0,0,0,$row['monat'],$row['tag'],$row['jahr']));
$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'];
*/
$row_auto = $GLOBALS['mysql']->query_single("SELECT * FROM fahrzeuge WHERE id='".$row['auto']."'");
$touren2[$key]['kennz']=$row_auto['kz'];
$touren2[$key]['auto_id']=$row['auto'];
$row_auto_array = $GLOBALS['mysql']->query_array("SELECT * FROM fahrzeuge");
$touren2[$key]['auto_array']=$row_auto_array;
// $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/aender1.tpl');
?>