178 lines
4.9 KiB
Plaintext
Executable File
178 lines
4.9 KiB
Plaintext
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();
|
||
if(!isset($_GET['stud'])){
|
||
$query = "SELECT stud.nachname, stud.vorname, stud.Jahrgang, pros_proseminar.Bezeichnung,pros_proseminar.FPRNr, pros_proseminar.ansprechpart ,pros_ergebnis.Thema, pros_ergebnis.Note
|
||
FROM stud, pros_ergebnis, pros_proseminar
|
||
WHERE pros_ergebnis.uid=stud.uid
|
||
AND pros_ergebnis.id=pros_proseminar.id
|
||
AND stud.Jahrgang=\"$jahrgang\"
|
||
AND stud.durchgefallen != 'Y'
|
||
AND pros_ergebnis.id = $ck_ProsID";
|
||
|
||
}else{
|
||
$uid = $_GET['stud'];
|
||
$query = "SELECT stud.nachname, stud.vorname, stud.Jahrgang, pros_proseminar.Bezeichnung,pros_proseminar.FPRNr, pros_proseminar.ansprechpart ,pros_ergebnis.Thema, pros_ergebnis.Note
|
||
FROM stud, pros_ergebnis, pros_proseminar
|
||
WHERE pros_ergebnis.uid=stud.uid
|
||
AND pros_ergebnis.id=pros_proseminar.id
|
||
AND stud.uid=\"$uid\"
|
||
AND stud.durchgefallen != 'Y'"
|
||
;
|
||
}
|
||
$result = $db->query($query)
|
||
or die ("Cannot execute query");
|
||
|
||
require('../../prints3/as_utf_class.php');
|
||
require_once("../../prints3/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', 22);
|
||
$pdf->SetY(76);
|
||
#$pdf->SetTextColor(255,0,255);
|
||
$pdf->Cell(0, 0, 'Proseminarbescheinigung', 0, 0, 'C');
|
||
|
||
$pdf->SetFont('ARIAL', 'B', 14);
|
||
|
||
$pdf->SetY(97);
|
||
$pdf->Cell(0, 0, $row[vorname] . ' ' . $row[nachname], 0, 0, 'C');
|
||
|
||
$pdf->SetFont('ARIAL', '', 12);
|
||
|
||
$pdf->SetY(109);
|
||
$pdf->SetX(10);
|
||
$pdf->Cell(0, 0, 'hat im Studienjahr 20' . $Jahr . '/20' . $Jahr2 . ' im Proseminar:', 0, 0, 'C');
|
||
|
||
$pos = $pdf->GetY()+9;
|
||
|
||
$pdf->SetY($pos);
|
||
$pdf->SetX(51);
|
||
$pdf->SetFont('ARIAL', 'B', 12);
|
||
|
||
$bezeichnung = str_replace("–", "-", $row['Bezeichnung']);
|
||
$pdf->MultiCell(110, 6, $bezeichnung, 0, 'C');
|
||
|
||
|
||
$pos = $pdf->GetY()+8;
|
||
$pdf->SetY($pos);
|
||
$pdf->SetFont('ARIAL', '', 12);
|
||
$pdf->Cell(0, 0, 'unter der Leitung von:', 0, 0, 'C');
|
||
|
||
$pos = $pdf->GetY()+6;
|
||
$pdf->SetY($pos);
|
||
$pdf->SetX(10);
|
||
$pdf->Cell(0, 0, $row[ansprechpart], 0, 0, 'C');
|
||
|
||
$pos = $pdf->GetY()+12;
|
||
|
||
$pdf->SetY($pos);
|
||
$pdf->SetX(10);
|
||
$pdf->SetFont('ARIAL', '', 12);
|
||
$pdf->Cell(0, 0, 'zum Thema.', 0, 0, 'C');
|
||
|
||
$pos = $pdf->GetY()+12;
|
||
|
||
$pdf->SetY($pos);
|
||
$pdf->SetX(25);
|
||
$pdf->SetFont('ARIAL', 'B', 12);
|
||
|
||
$thema = str_replace("–", "-", $row['Thema']);
|
||
$pdf->MultiCell(160, 6, $thema, 0, 'C');
|
||
|
||
$pos = $pdf->GetY()+12;
|
||
|
||
$pdf->SetY($pos);
|
||
$pdf->SetX(10);
|
||
$pdf->SetFont('ARIAL', '', 12);
|
||
$pdf->Cell(0, 0, 'eine Hausarbeit gefertigt und einen mündlichen Vortrag gehalten.', 0, 0, 'C');
|
||
|
||
$pos = $pdf->GetY()+3;
|
||
|
||
|
||
/*
|
||
$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()+32;
|
||
$pdf->SetFont('ARIAL', '', 12);
|
||
$pdf->SetY($pos);
|
||
$pdf->SetX(19);
|
||
$pdf->Cell(0, 0, 'Ludwigsburg, ' . date("d.m.Y", time()), 0, 0, 'L');
|
||
|
||
|
||
//$pdf->Image('fusszeile.jpg', 20, 267, 5.1, 12.7);
|
||
|
||
$PDF_Name = "Proseminar_" . $row[FPRNr] . '_' . $row[Jahrgang] . ".pdf";
|
||
|
||
}
|
||
|
||
$pdf->SetTitle('Fachprojektscheine');
|
||
$pdf->SetAuthor('FH-Ludwigsburg');
|
||
// $pdf->SetCreator('SetCreator');
|
||
// $pdf->SetSubject('SetSubject');
|
||
$pdf->Output($PDF_Name, "D");
|
||
|
||
?>
|