setSourceFile("zustimmung.pdf"); $tplidx = $pdf->ImportPage(1); dbconnect(); $res = mysql_query("SELECT mtknr, nachname, vorname, postrasse, poplz, poort FROM stud WHERE uid='$uid1'"); $row = mysql_fetch_array($res); $query = "SELECT bezeichnung, bereich, str, plz, ort, sachbereich , ansprechpartner, DATE_FORMAT(beginn, '%d.%m.%Y') beginn , DATE_FORMAT(beginn, '%Y%m%d') beginnform, DATE_FORMAT(ende, '%d.%m.%Y') ende FROM sta_antrag t1 WHERE t1.status = ( SELECT MAX(t2.status) FROM sta_antrag t2 WHERE t1.aendid = t2.aendid ) AND t1.uid = '$uid1' AND (t1.zuweisung is NULL OR t1.zuweisung='Z') ORDER BY beginnform"; $result = mysql_query ($query) or die ("Cannot execute query"); while ($row1 = mysql_fetch_array($result)){ $res2 = mysql_query("SELECT bezeichnung FROM sta_stellenbereiche WHERE sbid='$row1[sachbereich]'"); $row2 = mysql_fetch_array($res2); $pdf->addPage(); $pdf->useTemplate($tplidx,0,0,0); $pdf->SetFont('Arial', '', 11); $pdf->SetY(60); $pdf->SetX(24); $pdf->Cell(0, 3, "$row[vorname] $row[nachname]", 0, 0, 'L'); $pdf->SetFont('Arial', '', 11); $pdf->SetY(65); $pdf->SetX(24); $pdf->Cell(0, 3, "$row[postrasse]", 0, 0, 'L'); $pdf->SetFont('Arial', 'B', 11); $pdf->SetY(74); $pdf->SetX(24); $pdf->Cell(0, 3, "$row[poplz] $row[poort]", 0, 0, 'L'); $pdf->SetY(135); $pdf->SetX(24); $pdf->SetFont('Arial', '', 11); $pdf->MultiCell(160, 4,"$row1[bezeichnung]", 0, 'L'); $pdf->SetY(140); $pdf->SetX(24); $pdf->SetFont('Arial', '', 11); $pdf->MultiCell(160, 4,"$row1[str]", 0, 'L'); $pdf->SetY(145); $pdf->SetX(24); $pdf->SetFont('Arial', '', 11); $pdf->MultiCell(160, 4,"$row1[plz] $row1[ort]", 0, 'L'); $pdf->SetY(157); $pdf->SetX(24); $pdf->SetFont('Arial', '', 11); $pdf->MultiCell(160, 4,"$row1[ansprechpartner]", 0, 'L'); $pdf->SetY(170); $pdf->SetX(24); $pdf->SetFont('Arial', '', 11); $pdf->MultiCell(160, 4,"$row1[bereich]", 0, 'L'); $pdf->SetY(184); $pdf->SetX(24); $pdf->SetFont('Arial', '', 11); $pdf->MultiCell(160, 4,"$row1[beginn] bis $row1[ende]", 0, 'L'); $pdf->SetY(197); $pdf->SetX(24); $pdf->SetFont('Arial', '', 11); $pdf->MultiCell(160, 4,"$row2[bezeichnung]", 0, 'L'); $pdf->SetY(215); $pdf->SetX(24); $pdf->SetFont('Arial', '', 11); $pdf->MultiCell(160, 5,"Wir stimmen der Zuweisung von $row[vorname] $row[nachname] im Rahmen der praktischen Ausbildung im gehobenen nichttechnischen Verwaltungsdienst gem. § 17 Abs. 1 AprOVw gD zu:", 0, 'L'); /* $pdf->SetY(220); $pdf->SetX(24); $pdf->SetFont('Arial', '', 11); $pdf->MultiCell(160, 3,"im gehobenen nichttechnischen Verwaltungsdienst gem.", 0, 'L'); $pdf->SetY(225); $pdf->SetX(24); $pdf->SetFont('Arial', '', 11); $pdf->MultiCell(160, 3,"§ 17 Abs. 1 AprOVw gD zu:", 0, 'L'); */ } $pdf->Output("newpdf.pdf","i"); $pdf->closeParsers(); ?>