93 lines
2.8 KiB
PHP
93 lines
2.8 KiB
PHP
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
|
<meta charset="UTF-8">
|
|
<?php
|
|
// echo'<pre>'; print_r($ljahr); echo'</pre>';
|
|
$_SESSION['m1']=2; $_SESSION['m2']=1;
|
|
error_reporting(E_ALL); ini_set('display_errors', 1);
|
|
|
|
$anzeige=0; if(isset($_GET['id'])) { $anzeige=$_GET['id']; }
|
|
$jahr = (int)date('Y');
|
|
//-----------------------------
|
|
//----------------------------------------------------------------------------------------------------------------
|
|
$linkt= date("d"); // Teil1
|
|
$linkm= date("m"); // Teil2
|
|
$linky= date("Y"); // Teil3
|
|
$linkyk=date("Y")-2000; // Teil3
|
|
$kw = (int)date('W');
|
|
// 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;
|
|
$kw=date("W",mktime(0,0,0,$linkm,$linkt,$linky));
|
|
}
|
|
$vdatum = $linkt.".".$linkm.".".$linky;
|
|
//echo $vdatum;";
|
|
$isodate = sprintf("%02d", $kw);
|
|
$temp = strtotime("{$linky}-W{$isodate}-7");
|
|
$stag=(int)date('d', $temp);
|
|
$smonat=(int)date('m', $temp);
|
|
$sjahr=(int)date('y', $temp);
|
|
$sasodatum=$stag.".".$smonat.".".$sjahr;
|
|
$vdatum = $linkt.".".$linkm.".".$linky;
|
|
//----------------------------------------------------------------------------------------------------------------
|
|
if(isset($_GET['id'])) {
|
|
$tdata= $GLOBALS['mysql']->query_array("SELECT * FROM tourenplan WHERE tour='".$_GET['id']."' AND tag='".$stag."' AND monat='".$smonat."' AND jahr='".$sjahr."' ORDER by id");
|
|
$template->assign('tdata',$tdata); $anzeige==1;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$template->assign('anzeige',$anzeige);
|
|
$template->assign('wahl_kw',$wahl_kw);
|
|
$template->assign('kw',$kw);
|
|
$template->assign('linkt',$linkt);
|
|
$template->assign('linkm',$linkm);
|
|
$template->assign('linky',$linky);
|
|
$template->assign('vdatum',$vdatum);
|
|
//----------------------------------------------------------------------------------------------------
|
|
//----------------------------------------------------------------------------------------------------
|
|
|
|
if($anzeige>0) { $fahrzeug = $GLOBALS['mysql']->query_single("SELECT * FROM fahrzeuge WHERE id='".$anzeige."'"); $template->assign('fahrzeug', $fahrzeug); }
|
|
$madata1 = $GLOBALS['mysql']->query_array("SELECT * FROM fahrzeuge WHERE typ=1 AND aktiv=1 ORDER by kz");
|
|
$madata2 = $GLOBALS['mysql']->query_array("SELECT * FROM fahrzeuge WHERE typ=2 AND aktiv=1 ORDER by kz");
|
|
|
|
|
|
$tlistdata8 = $GLOBALS['mysql']->query_array("SELECT * FROM touren WHERE typ=8 AND tliste=1 ORDER by id"); $template->assign('tlistdata8',$tlistdata8);
|
|
$tlistdata11= $GLOBALS['mysql']->query_array("SELECT * FROM touren WHERE typ=11 AND tliste=1 ORDER by id"); $template->assign('tlistdata11',$tlistdata11);
|
|
|
|
|
|
$template->assign('content', 'tpl/list_tour.tpl');
|
|
|
|
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|