64 lines
2.4 KiB
PHP
64 lines
2.4 KiB
PHP
<?php
|
|
$_SESSION['m1']=2; $_SESSION['m2']=0;
|
|
|
|
error_reporting(E_ALL); ini_set('display_errors', 1);
|
|
|
|
$tagname = array("Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag");
|
|
|
|
|
|
$linkt= date("d"); // Teil1
|
|
$linkm= date("m"); // Teil2
|
|
$linky= date("Y"); // Teil3
|
|
$linkyk=date("Y")-2000; // Teil3
|
|
// echo "<pre>"; print_r($_POST); echo "</pre>";
|
|
|
|
|
|
if(isset($_POST['date'])) {
|
|
$teile = explode(".",$_POST['date']);
|
|
$linkt= $teile[0];
|
|
$linkm= $teile[1];
|
|
$linky= $teile[2];
|
|
$linkyk=$teile[2]-2000;
|
|
}
|
|
$vdatum = $linkt.".".$linkm.".".$linky;
|
|
//echo $vdatum;
|
|
//----------------------------- Mitarbeiterarray
|
|
$row_fahrer_array = $GLOBALS['mysql']->query("SELECT * FROM mitarbeiter WHERE rs>0 AND aktiv>0 ORDER BY name");
|
|
$faz_t = $GLOBALS['mysql']->query("SELECT * FROM touren WHERE typ=15 AND aktiv>0 ORDER BY id"); $key=0;
|
|
while($row = $faz_t->fetch_assoc()) {
|
|
if($key==0) {
|
|
$GLOBALS['mysql']->insert("UPDATE var_temp SET wert='".$row['id']."' WHERE id=2");
|
|
}
|
|
$faz_tour[$key]['id']=$row['id'];
|
|
$faz_tour[$key]['tour']=$row['id'];
|
|
$key++;
|
|
}
|
|
/*
|
|
//----------------------------- Sasolisten
|
|
$iftest02 = $GLOBALS['mysql']->query_single("SELECT * FROM tourenplan WHERE tag='".$linkt."' AND monat='".$linkm."' AND jahr='".$linkyk."' and tour=802");
|
|
if($iftest02['num_rows']!=0) { $template->assign('st2',1); }
|
|
$iftest03 = $GLOBALS['mysql']->query_single("SELECT * FROM tourenplan WHERE tag='".$linkt."' AND monat='".$linkm."' AND jahr='".$linkyk."' and tour=803");
|
|
if($iftest03['num_rows']!=0) { $template->assign('st3',1); }
|
|
$iftest35 = $GLOBALS['mysql']->query_single("SELECT * FROM tourenplan WHERE tag='".$linkt."' AND monat='".$linkm."' AND jahr='".$linkyk."' and tour=835");
|
|
if($iftest35['num_rows']!=0) { $template->assign('st35',1); }
|
|
$iftest40 = $GLOBALS['mysql']->query_single("SELECT * FROM tourenplan WHERE tag='".$linkt."' AND monat='".$linkm."' AND jahr='".$linkyk."' and tour=840");
|
|
if($iftest40['num_rows']!=0) { $template->assign('st40',1); }
|
|
//-----------------------------
|
|
*/
|
|
|
|
|
|
|
|
$kw = (int)date('W');
|
|
$wahl_kw=date("W",mktime(0,0,0,$linkm,$linkt,$linky));
|
|
$template->assign('wahl_kw',$wahl_kw);
|
|
$template->assign('kw',$kw);
|
|
$template->assign('row_fahrer_array',$row_fahrer_array);
|
|
$template->assign('faz_tour',$faz_tour);
|
|
//$template->assign('link',$link);
|
|
$template->assign('linkt',$linkt);
|
|
$template->assign('linkm',$linkm);
|
|
$template->assign('linky',$linky);
|
|
$template->assign('vdatum',$vdatum);
|
|
$template->assign('content', 'tpl/listen.tpl');
|
|
?>
|
|
|