query($query) or die ("Cannot execute query"); define('FPDF_FONTPATH','font/'); require('as_utf_class.php'); $pdf=new utfFPDF(); while ($row = $result->fetch_array()){ // Definitionen $Jahr = $row[Jahrgang]; $Jahr2 = $row[Jahrgang] + 1; //wandelt '04' in '5' umd if ($Jahr < 10){ $Jahr2='0'.$Jahr2; // wenn Jahr2 unter 10 ist eine Prefix 0 anfügen, damit es zb. 20'05' gibt } switch($row[Note]) { case 'NULL': $ergebnis = "--"; break; case 0: $ergebnis = "ungenügend"; break; case 1: case 2: case 3: $ergebnis = "mangelhaft"; break; case 4: case 5: case 6: $ergebnis = "ausreichend"; break; case 7: case 8: case 9: $ergebnis = "befriedigend"; break; case 10: case 11: case 12: $ergebnis = "gut"; break; case 13: case 14: case 15: $ergebnis = "sehr gut"; break; } if ($row[Note] == 1) { $Punkt = "Punkt"; } ELSE { $Punkt = "Punkte"; } // Definitionen Ende $pdf->AddPage(); $pdf->Image('fachprojektschein.jpg', 1,1,208,295); $pdf->SetLineWidth(0.3); // Linie oben rechts $pdf->Line(140, 10.5, 191, 10.5); $pdf->SetFont('Arial', 'B', 10); $pdf->SetY(15); $pdf->SetX(139); $pdf->Cell(0, 3, 'Fachhochschule Ludwigsburg', 0, 0, 'L'); $pdf->Line(140, 21.5, 191, 21.5); $pdf->SetY(26); $pdf->SetX(139); $pdf->Cell(0, 3, 'Hochschule für öffentliche', 0, 0, 'L'); $pdf->SetY(30); $pdf->SetX(139); $pdf->Cell(0, 3, 'Verwaltung und Finanzen', 0, 0, 'L'); $pdf->Line(140, 37, 191, 37); // Rahmen erstellen // $pdf->SetY(60); // $pdf->SetX(20); // $pdf->Cell(170,202,'',1,0,'L'); // $pdf->Image('rechteck.jpg', 20, 60, 170.773, 202.353); $pdf->SetFont('TIMES', 'B', 26); $pdf->SetY(81); $pdf->Cell(0, 0, 'PROSEMINARSCHEIN', 0, 0, 'C'); $pdf->SetFont('TIMES', 'B', 16); $pdf->SetY(105); $pdf->Cell(0, 0, $row[vorname] . ' ' . $row[nachname], 0, 0, 'C'); $pdf->SetFont('TIMES', '', 12); $pdf->SetY(125); $pdf->SetX(26); $pdf->Cell(0, 0, 'hat im Studienjahr 20' . $Jahr . '/20' . $Jahr2 . ' im Fachprojekt:', 0, 0, 'L'); $pdf->SetY(138); $pdf->SetX(26); $pdf->SetFont('TIMES', 'B', 16); $pdf->MultiCell(160, 6, '"'.$row[Bezeichnung].'"', 0, 'C'); $pdf->SetY(163); $pdf->SetX(26); $pdf->SetFont('TIMES', '', 12); $pdf->Cell(0, 0, 'folgende Seminararbeit gefertigt:', 0, 0, 'L'); $pdf->SetY(171); $pdf->SetX(26); $pdf->SetFont('TIMES', 'B', 16); $pdf->MultiCell(160, 6, '"'.$row[Thema].'"', 0, 'C'); $pdf->SetY(194); $pdf->SetX(26); $pdf->SetFont('TIMES', '', 12); $pdf->Cell(0, 0, 'Die Leistung im Fachprojekt wurde bewertet mit', 0, 0, 'L'); $pdf->SetFont('TIMES', 'B', 12); $pdf->SetY(208); $pdf->Cell(0, 0, $ergebnis, 0, 0, 'C'); $pdf->SetFont('TIMES', '', 12); $pdf->SetY(214); IF ($row[Note] == 'NULL') { $Note = "--"; } ELSE { $Note = $row[Note]; } $pdf->Cell(0, 0, '(' . $Note . ' ' . $Punkt . ')', 0, 0, 'C'); $pdf->SetY(234); $pdf->SetX(26); $pdf->Cell(0, 0, 'Ludwigsburg, den ' . date("d.m.Y", time()), 0, 0, 'L'); $pdf->SetY(254); $pdf->SetX(38); $pdf->Cell(0, 0, $row[ansprechpart], 0, 0, 'L'); //$pdf->Image('fusszeile.jpg', 20, 267, 5.1, 12.7); $PDF_Name = "Fachprojekt_" . $row[FPRNr] . '_' . $row[Jahrgang] . ".pdf"; } $pdf->SetTitle('Fachprojektscheine'); $pdf->SetAuthor('FH-Ludwigsburg'); // $pdf->SetCreator('SetCreator'); // $pdf->SetSubject('SetSubject'); $pdf->Output($PDF_Name, "D"); ?>