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

84 lines
No EOL
2.5 KiB
PHP

<?php
require('lib/fpdf.php');
error_reporting(E_ALL);
error_reporting(E_ALL ^ E_NOTICE);
// Melde alle PHP Fehler
error_reporting(1);
$temp = strtotime("next Sunday");
$stag=(int)date('d', $temp);
$smonat=(int)date('m', $temp);
$sjahr=(int)date('y', $temp);
$sasodatum=$stag.".".$smonat.".".$sjahr;
// echo $sasodatum;
// echo $_GET['id'];
if(isset($_GET['id'])) {
$saso_tour = $GLOBALS['mysql']->query_single("SELECT * FROM tourenplan WHERE tour='".$_GET['id']."' and tag='".$stag."' and monat='".$smonat."' and jahr='".$sjahr."'");
if($abfrage_tour['num_rows'] != 0) {
// $saso_tour = $GLOBALS['mysql']->query_single("SELECT * FROM tourenplan WHERE tour='".$_GET['id']."'");
$mengeabl=$saso_tour['num_rows'];
$lname=$saso_tour['tour']; echo $lname;
echo "<pre>"; print_r($saso_tour); echo "</pre>";
//----------------------------
class PDF extends FPDF {
function Footer() {
$this->SetY(-15);
$this->SetFont('Helvetica','I',8);
$this->Cell(190,5,'Zustellservice Heinicke GmbH - Handelsplatz 4 - 04319 Leipzig *** ZSH - interne Liste - Nach Gebrauch vernichten *** F. T.2014','1','0','C','0');
}
}
$pdf = new PDF('P','mm','A4');
$pdf->AddPage();
// blau (0,160,230)
// Orange (240,150, 0)
// grau (200,200,200)
$key=0; $abl=0;
// $rs_tour = $GLOBALS['mysql']->query_single("SELECT * FROM zsh_touren WHERE id='".$_POST['ansicht']."'");
// $lnummer=$rs_tour['nummer'];
// $lname=$rs_tour['tour'];
$pdf->SetFont('Helvetica','B',14);
// $pdf->SetTextColor(0,160,230);
$pdf->SetFillColor(200,200,200);
$pdf->Cell(60,6,($lname),'0','0','C','1');
$pdf->Cell(50,6,' ','0','0','C','0'); $pdf->SetFont('Helvetica','',10);
$pdf->Cell(30,6,'Listennr.: '.($smonat),'0','0','C','1');
$pdf->Cell(8,6,' ','0','0','C','0');
$pdf->Cell(40,6,'Ausgabe: '.($sasodatum),'0','1','R','1');
$pdf->Cell(24,2,' ','0','1','L','0');
// $slist = $GLOBALS['mysql']->query_array("SELECT * FROM zsh_touren WHERE typ=8");
$temp = strtotime("next Sunday");
$tag=date('d', $temp); $monat=date('m', $temp); $jahr=date('Y', $temp);
$sasodatum=$tag.".".$monat.".".$jahr;
// $sasonorm=$GLOBALS['mysql']->query_single("SELECT * FROM zsh_tourenliste WHERE tid=802 ORDER BY id DESC LIMIT 0,1 ");
$saso_norm=$sasonorm['norm'];
$template->assign('sasodatum', $sasodatum);
$template->assign('saso_tour2', $saso_tour2);
$template->assign('saso_norm', $saso_norm);
$template->assign('slist', $slist);
$template->assign('content', 'tpl/zsh_p_saso.tpl');
}
?>