setSourceFile("blanko_ludwigsburg.pdf"); $tplidx = $pdf->ImportPage(1); $result = $db->query("SELECT mid, uid, date_format(datum, '%d.%m%.%Y') datum FROM spt_mail WHERE unique_id='$id'"); $row1 = $result->fetch_array(); $result2 = $db->query("SELECT vorname, nachname, jahrgang FROM stud WHERE uid='$row1[uid]'"); $row2 = $result2->fetch_array(); $Jahr = '20'.$row2['jahrgang']; $query = "SELECT bezeichnung FROM spt_wunsch a, spt_kurs b WHERE a.id=b.id AND a.uid='$row1[uid]'"; $result = $db->query($query) or die ("Cannot execute query"); while ($row = $result->fetch_array()){ $bezeichnung[] = $row['bezeichnung']; } // Definitionen // Definitionen Ende $pdf->AddPage(); $pdf->useTemplate($tplidx,0,0,0); $pdf->SetFont('ARIAL', 'B', 20); $pdf->SetY(83); #$pdf->SetTextColor(255,0,255); $pdf->Cell(0, 0, 'Bescheinigung Schwerpunktthema', 0, 0, 'C'); $pdf->SetFont('ARIAL', 'B', 16); $pdf->SetY(105); $pdf->Cell(0, 0, $row2['vorname'] . ' ' . $row2['nachname'], 0, 0, 'C'); $pdf->SetFont('ARIAL', '', 12); $pdf->SetY(125); $pdf->SetX(24); $pdf->Cell(0, 0, "hat im Studienjahr ". $Jahr . " im Modul 23 die Schwerpunktthemen", 0, 0, 'L'); $pdf->SetFont('ARIAL', 'B', 12); $pdf->SetY(135); $pdf->Cell(0, 0, $bezeichnung[0], 0, 0, 'C'); $pdf->SetFont('ARIAL', '', 12); $pos = $pdf->GetY()+9; $pdf->SetY($pos); $pdf->Cell(0, 0, "und", 0, 0, 'C'); $pdf->SetFont('ARIAL', 'B', 12); $pos = $pdf->GetY()+9; $pdf->SetY($pos); $pdf->Cell(0, 0, $bezeichnung[1], 0, 0, 'C'); $pdf->SetFont('ARIAL', '', 12); $pos = $pdf->GetY()+11; $pdf->SetY($pos); $pdf->SetX(24); $pdf->Cell(0, 0, "mit einem Workload von insgesamt 90 Stunden (drei Leistungspunkten) belegt.", 0, 0, 'L'); $pdf->SetFont('ARIAL', '', 12); $pos = $pdf->GetY()+29; $pdf->SetY($pos); $pdf->SetX(24); $pdf->Cell(0, 0, "Ludwigsburg, den ". $row1['datum'], 0, 0, 'L'); $pdf->SetFont('ARIAL', '', 12); $pos = $pdf->GetY()+25; $pdf->SetY($pos); $pdf->SetX(24); $pdf->Cell(0, 0, "Gez. Studiendekan Prof. Faiß", 0, 0, 'L'); $PDF_Name = "Schwerpunktthema_$row2[vorname]_$row2[nachname].pdf"; if($down == 0){ $datum = date("Y-m-d H:i:s", time()); $db->query("UPDATE spt_mail SET stud_runtergeladen='$datum' WHERE mid='$row1[mid]'"); } $pdf->SetAuthor('HS-Ludwigsburg'); $pdf->Output($PDF_Name, "D"); ?>