query("SELECT wert1 name, wert2 mail FROM parameter WHERE pid='6'");
$row_ansp = $res_ansp->fetch_array();
$res_kontakt = $db->query("SELECT wert1 tel, wert2 fax FROM parameter WHERE pid='5'");
$row_kontakt = $res_kontakt->fetch_array();
$heute_format = date("d.m.Y", mktime(0, 0, 0, date("m"), date("d"), date("Y"))); // ISO-8601 Format wie in der Datenbank: Formatierung für Vergleiche erforderlich
$pdf->Image('anschreiben/logo.jpg', 116, 10,64); #https://www.fpdf.de/funktionsreferenz/?funktion=Image
$pdf->SetFont('Arial', 'B', 10);
$pdf->SetY(56);
#$pdf->SetTextColor(255,0,0);
$pdf->SetX(117.9);
$pdf->MultiCell(47, 3, "Zulassung", 0, 'L');
$pdf->SetFont('Arial', '', 8);
$pos=$pdf->GetY()+3.7;
$pdf->SetY($pos);
$pdf->SetX(117.9);
$pdf->MultiCell(47, 3, "Ludwigsburg,", 0, 'L');
$pdf->SetFont('Arial', '', 8);
$pdf->SetY($pos);
$pdf->SetX(143.1);
$pdf->MultiCell(47, 3, "$heute_format", 0, 'R');
$pos=$pdf->GetY()+0.3;
$pdf->SetFont('Arial', '', 8);
$pdf->SetY($pos);
$pdf->SetX(117.9);
$pdf->MultiCell(47, 3, "Bearbeiterin", 0, 'L');
$pdf->SetFont('Arial', '', 8);
$pdf->SetY($pos);
$pdf->SetX(143.1);
$pdf->MultiCell(47, 3, "$row_ansp[name]", 0, 'R');
$pos=$pdf->GetY()+0.3;
$pdf->SetFont('Arial', '', 8);
$pdf->SetY($pos);
$pdf->SetX(117.9);
$pdf->MultiCell(47, 3, "Telefon", 0, 'L');
$pdf->SetFont('Arial', '', 8);
$pdf->SetY($pos);
$pdf->SetX(143.1);
$pdf->MultiCell(47, 3, "$row_kontakt[tel]", 0, 'R');
$pos=$pdf->GetY()+0.3;
$pdf->SetFont('Arial', '', 8);
$pdf->SetY($pos);
$pdf->SetX(117.9);
$pdf->MultiCell(47, 3, "Fax", 0, 'L');
$pdf->SetFont('Arial', '', 8);
$pdf->SetY($pos);
$pdf->SetX(143.1);
$pdf->MultiCell(47, 3, "$row_kontakt[fax]", 0, 'R');
$pos=$pdf->GetY()+0.3;
$pdf->SetFont('Arial', '', 8);
$pdf->SetY($pos);
$pdf->SetX(117.9);
$pdf->MultiCell(47, 3, "e-mail", 0, 'L');
$pdf->SetFont('Arial', '', 8);
$pdf->SetY($pos);
$pdf->SetX(143.1);
$pdf->MultiCell(47, 3, "$row_ansp[mail]", 0, 'R');
$pdf->SetFont('Arial', '', 8);
$pdf->SetY(45);
$pdf->SetX(23);
$pdf->MultiCell(80, 3, "HS Ludwigsburg ".uchr(149)." Postfach 0489 ".uchr(149)." 71604 Ludwigsburg", 0, 'L');
########Kontaktdaten HS Ende #####################
######## Betreff #################################
$pdf->SetFont('Arial', 'B', 12);
$pdf->SetY(96.2);
$pdf->SetX(23);
$pdf->MultiCell(150, 3, "Ausbildung im gehobenen Verwaltungsdienst;", 0, 'L');
$pos=$pdf->GetY()+1.8;
$pdf->SetFont('Arial', 'B', 12);
$pdf->SetY($pos);
$pdf->SetX(23);
$pdf->MultiCell(150, 3, "Zuweisung zu den Ausbildungsstellen in der praktischen Ausbildung", 0, 'L');
######## Betreff Ende ############################
$pos=$pdf->GetY()+7.0;
$pdf->SetFont('Arial', 'BU', 12);
$pdf->SetY($pos);
$pdf->SetX(23);
$pdf->MultiCell(150, 3, "Anlagen", 0, 'L');
$pos=$pdf->GetY()+1.8;
$pdf->SetFont('Arial', '', 12);
$pdf->SetY($pos);
$pdf->SetX(23);
$pdf->MultiCell(150, 3, "Urlaubskarte", 0, 'L');
$pos=$pdf->GetY()+1.8;
$pdf->SetFont('Arial', '', 12);
$pdf->SetY($pos);
$pdf->SetX(23);
$pdf->MultiCell(150, 3, "Weitere Bestimmungen zum Zuweisungsbescheid", 0, 'L');
#################################################################################
$pos=$pdf->GetY()+6.6;
$pdf->SetFont('Arial', '', 12);
$pdf->SetY($pos);
$pdf->SetX(23);
$pdf->MultiCell(150, 3, "Sehr geehrte(r) ANREDE NAME ,", 0, 'L');
$pos=$pdf->GetY()+6.0;
$pdf->SetFont('Arial', '', 12);
$pdf->SetY($pos);
$pdf->SetX(23);
$pdf->MultiCell(168, 4.8, "wir weisen Sie gem. § 23 (3) Ausbildungs- und Prüfungsordnung für den gehobenen Verwaltungsdienst (APrOVw gD, GBl. vom 26.09.2007,S.400) für die praktische Ausbildung im Vorbereitungsdienst folgenden Stellen zu:", 0, 'J');
$columns = 5; //five columns
$pdf->SetStyle("p", "times", "", 12, "130, 0, 30");
$pdf->SetStyle("pb", "times", "B", 11, "130, 0, 30");
$pdf->SetStyle("t1", "arial", "", 11, "254, 252, 222");
$pdf->SetStyle("t1", "arial", "", 11, "0, 151, 200");
$pdf->SetStyle("t2", "arial", "", 11, "0, 151, 200");
$pdf->SetStyle("t3", "times", "B", 14, "203, 0, 48");
$pdf->SetStyle("t4", "arial", "BI", 11, "0, 151, 200");
$pdf->SetStyle("hh", "times", "B", 11, "255, 189, 12");
$pdf->SetStyle("font", "helvetica", "", 10, "0, 0, 255");
$pdf->SetStyle("style", "helvetica", "BI", 10, "0, 0, 220");
$pdf->SetStyle("size", "times", "BI", 13, "0, 0, 120");
$pdf->SetStyle("color", "times", "BI", 13, "0, 255, 255");
$ttxt[1] = "
TexTest Longer Text
Test Longer Text - $j"; $data[4]['TEXT'] = "Test text2 - $j"; $data[0]['T_SIZE'] = $fsize; $data[1]['T_SIZE'] = 13 - $fsize; $data[3]['T_SIZE'] = 14 - $fsize; $data[0]['T_COLOR'] = array($rr, 0, 0); $data[0]['BG_COLOR'] = array($rr, $rr, $rr); $data[3]['T_COLOR'] = array($rr, 240, 240); $data[3]['BG_COLOR'] = array($rr, 100, 135); $fsize++; if ($fsize > 11) $fsize = 5; if ($j>3 && $j<13){ $data[0]['TEXT'] = "Colspan Example$j"; $data[0]['COLSPAN'] = $colspan; $data[0]['BG_COLOR'] = array($rr, 0, 0); $data[0]['T_COLOR'] = array(255, 255, $rr); $colspan++; if ($colspan>5) $colspan = 1; } if ($j>15 && $j<25){ $data[2]['TEXT'] = "Colspan Example$j"; $data[2]['COLSPAN'] = $colspan; $data[2]['BG_COLOR'] = array($rr, 0, 0); $data[2]['T_COLOR'] = array(255, 255, $rr); $colspan++; if ($colspan>3) $colspan = 1; } if ($j>1){ $data[2]['BG_COLOR'] = array(255-$rr, $rr, $rr); $data[2]['T_COLOR'] = array(255, 255, $rr); } if ($j==0){ $data[0]['TEXT'] = "Top Right AlignAlign Top
Right Right Align "; $data[0]['T_ALIGN'] = "R"; $data[0]['V_ALIGN'] = "T"; $data[1]['TEXT'] = "Middle Center Align Bold Italic"; $data[1]['T_ALIGN'] = "C"; $data[1]['T_TYPE'] = "BI"; $data[1]['V_ALIGN'] = "M"; $data[2]['TEXT'] = "\n\n\n\n\nBottom Left Align"; $data[2]['T_ALIGN'] = "L"; $data[2]['V_ALIGN'] = "B"; $data[3]['TEXT'] = "Middle Justified Align Longer text"; $data[3]['T_ALIGN'] = "J"; $data[3]['V_ALIGN'] = "M"; $data[4]['TEXT'] = "TOP RIGHT Align"; $data[4]['T_ALIGN'] = "R"; $data[4]['V_ALIGN'] = "T"; } if ($j>0 and $j<4){ $data[0]['TEXT'] = ""; $data[1]['TEXT'] = ""; $data[2]['TEXT'] = ""; $data[3]['TEXT'] = ""; $data[4]['TEXT'] = ""; $data[$j-1]['TEXT'] = $ttxt[$j]; $data[$j-1]['COLSPAN'] = 4; $data[$j-1]['T_ALIGN'] = "J"; $data[$j-1]['LN_SIZE'] = 5; } if ($j== 17) { $data[1]['TEXT'] = "