145 lines
4.2 KiB
PHP
Executable File
145 lines
4.2 KiB
PHP
Executable File
<?php
|
|
|
|
$ck_ProsID=$_COOKIE["ck_ProsID"];
|
|
|
|
$user_admin=$_COOKIE["user_admin"];
|
|
|
|
$jahrgang=$_COOKIE["jahrgang"];
|
|
|
|
|
|
|
|
include("kurs/datenbankanbindung.php"); // fügt die Datenbankanbindung ein: Sys:\php\includes\kurs\datenbankanbindung.php
|
|
|
|
|
|
|
|
$db = dbconnect();
|
|
|
|
$query = "SELECT stud.nachname, stud.vorname, stud.Jahrgang, fachprojekt.Bezeichnung,fachprojekt.FPRNr, fachprojekt.ansprechpart ,fach_ergebnis.Thema, fach_ergebnis.Note
|
|
|
|
FROM stud, fach_ergebnis, fachprojekt
|
|
|
|
WHERE fach_ergebnis.uid=stud.uid
|
|
|
|
AND fach_ergebnis.id=fachprojekt.id
|
|
|
|
AND stud.Jahrgang=\"$jahrgang\"
|
|
|
|
AND stud.durchgefallen != 'Y'
|
|
|
|
AND fach_ergebnis.id = $ck_ProsID"
|
|
|
|
;
|
|
|
|
|
|
|
|
$result = $db->query($query)
|
|
|
|
or die ("Cannot execute query");
|
|
|
|
|
|
|
|
define('FPDF_FONTPATH','font/');
|
|
|
|
require('prints/as_utf_class.php');
|
|
|
|
require_once("prints/table_def.inc");
|
|
|
|
|
|
|
|
$pdf= new utfFPDF();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$pagecount = $pdf->setSourceFile("blanko_ludwigsburg.pdf");
|
|
|
|
#$pagecount = $pdf->setSourceFile("anschreiben/aenderung_praxisstelle.pdf");
|
|
|
|
|
|
|
|
$tplidx = $pdf->ImportPage(1);
|
|
|
|
|
|
|
|
while ($row = $result->fetch_array()){
|
|
|
|
// Definitionen
|
|
|
|
$Jahr = $row[Jahrgang];
|
|
|
|
|
|
|
|
$Jahr2 = $row[Jahrgang] + 1; //wandelt '04' in '5' umd
|
|
|
|
|
|
|
|
if ($Jahr2 < 10){
|
|
|
|
$Jahr2='0'.$Jahr2; // wenn Jahr2 unter 10 ist eine Prefix 0 anfügen, damit es zb. 20'05' gibt
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if($row[Note] >= "1,0" AND $row[Note] <="1,5"){$ergebnis="sehr gut";}
|
|
|
|
if($row[Note] >= "1,6" AND $row[Note] <="2,5"){$ergebnis="gut";}
|
|
|
|
if($row[Note] >= "2,6" AND $row[Note] <="3,5"){$ergebnis="befriedigend";}
|
|
|
|
if($row[Note] >= "3,6" AND $row[Note] <="4,0"){$ergebnis="ausreichend";}
|
|
|
|
if($row[Note] >= "4,1" AND $row[Note] <="5,0"){$ergebnis="nicht ausreichend";}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#$Punkt = "Note";
|
|
|
|
|
|
|
|
// Definitionen Ende
|
|
|
|
$pdf->AddPage();
|
|
|
|
$pdf->useTemplate($tplidx,0,0,0);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$pdf->SetFont('ARIAL', 'B', 24);
|
|
|
|
$pdf->SetY(84);
|
|
|
|
#$pdf->SetTextColor(255,0,255);
|
|
|
|
$pdf->Cell(0, 0, 'Fachprojektbescheinigung', 0, 0, 'C');
|
|
|
|
|
|
|
|
$pdf->SetFont('ARIAL', 'B', 16);
|
|
|
|
|
|
|
|
$pdf->SetY(107);
|
|
|
|
$pdf->Cell(0, 0, $row[vorname] . ' ' . $row[nachname], 0, 0, 'C');
|
|
|
|
|
|
|
|
$pdf->SetFont('ARIAL', '', 12);
|
|
|
|
|
|
|
|
$pdf->SetY(120);
|
|
|
|
$pdf->SetX(24);
|
|
|
|
$pdf->Cell(0, 0, 'hat im Studienjahr 20' . $Jahr . '/20' . $Jahr2 . ' im Fachprojekt:', 0, 0, 'L');
|
|
|
|
|
|
|
|
$pos = $pdf->GetY()+10;
|
|
|
|
|
|
|
|
$pdf->SetY($pos);
|
|
|
|
$pdf->SetX(24);
|
|
|
|
$pdf->SetFont('ARIAL', 'B', 16);
|
|
|
|
$pdf->MultiCell(160, 6, '"'.$row[Bezeichnung].'"', 0, 'C');
|
|
|
|
|
|
|
|
$pos = $pdf->GetY()+18;
|
|
|
|
|
|
|
|
$pdf->SetY($pos);
|
|
|
|
$pdf->SetX(24);
|
|
|
|
$pdf->SetFont('ARIAL', '', 12);
|
|
|
|
$pdf->Cell(0, 0, 'folgende Fachprojektarbeit / folgendes Referat gefertigt:', 0, 0, 'L');
|
|
|
|
|
|
|
|
$pos = $pdf->GetY()+8;
|
|
|
|
|
|
|
|
$pdf->SetY($pos);
|
|
|
|
$pdf->SetX(24);
|
|
|
|
$pdf->SetFont('ARIAL', 'B', 16);
|
|
|
|
$pdf->MultiCell(160, 6, '"'.$row[Thema].'"', 0, 'C');
|
|
|
|
/*
|
|
|
|
$pos = $pdf->GetY()+11;
|
|
|
|
|
|
|
|
$pdf->SetY($pos);
|
|
|
|
$pdf->SetX(24);
|
|
|
|
$pdf->SetFont('ARIAL', '', 12);
|
|
|
|
$pdf->Cell(0, 0, 'Die Leistung wurde bewertet mit:', 0, 0, 'L');
|
|
|
|
|
|
|
|
$pos = $pdf->GetY()+8;
|
|
|
|
|
|
|
|
$pdf->SetFont('ARIAL', 'B', 12);
|
|
|
|
$pdf->SetY($pos);
|
|
|
|
$pdf->Cell(0, 0, $ergebnis, 0, 0, 'C');
|
|
|
|
$pos = $pdf->GetY()+8;
|
|
|
|
$pdf->SetFont('ARIAL', '', 12);
|
|
|
|
$pdf->SetY($pos);
|
|
|
|
|
|
|
|
IF ($row[Note] == 'NULL') {
|
|
|
|
$Note = "--";
|
|
|
|
} ELSE {
|
|
|
|
$Note = $row[Note];
|
|
|
|
}
|
|
|
|
|
|
|
|
$pdf->Cell(0, 0, '(' . $Note . ')', 0, 0, 'C');
|
|
|
|
*/
|
|
|
|
$pos = $pdf->GetY()+9;
|
|
|
|
$pdf->SetFont('ARIAL', '', 12);
|
|
|
|
$pdf->SetY($pos);
|
|
|
|
$pdf->SetX(24);
|
|
|
|
$pdf->Cell(0, 0, 'Ludwigsburg, den ' . date("d.m.Y", time()), 0, 0, 'L');
|
|
|
|
$pos = $pdf->GetY()+22;
|
|
|
|
$pdf->SetY($pos);
|
|
|
|
$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");
|
|
|
|
|
|
|
|
?>
|