461 lines
13 KiB
PHP
Executable File
461 lines
13 KiB
PHP
Executable File
<?php
|
|
include("kurs/datenbankanbindung.php"); // fügt die Datenbankanbindung ein: Sys:\php\includes\kurs\datenbankanbindung.php
|
|
$uid1=$_COOKIE["uid1"];
|
|
|
|
#require_once("class.fpdf_table.php");
|
|
|
|
require_once('as_utf_class.php');
|
|
require_once("table_def.inc");
|
|
$pdf=new utfFPDF();
|
|
|
|
|
|
$pdf->SetAutoPageBreak(true, 20);
|
|
$pdf->SetTopMargin(20);
|
|
|
|
$pdf->AddPage();
|
|
|
|
$db = dbconnect();
|
|
|
|
$res_hs = $db->query("SELECT mtknr, nachname, vorname, postrasse, poort, poplz, hs FROM stud WHERE uid='$uid1'");
|
|
$row_hs = $res_hs->fetch_array();
|
|
|
|
|
|
#$pagecount = $pdf->setSourceFile("praxisstellen.pdf");
|
|
#$pdf->addPage();
|
|
#$pdf->useTemplate($tplidx,0,0,0);
|
|
$pdf->SetFont('Arial', '', 11);
|
|
$pdf->SetY(26);
|
|
$pdf->SetX(24);
|
|
$pdf->Cell(0, 3, "Matrikelnr.: $row_hs[mtknr]" , 0, 0, 'L');
|
|
|
|
|
|
$pdf->SetFont('Arial', '', 7);
|
|
$pdf->SetY(52);
|
|
$pdf->SetX(24);
|
|
$pdf->Cell(0, 3, "$row_hs[vorname] $row_hs[nachname] - $row_hs[postrasse] - $row_hs[poplz] $row_hs[poort]", 0, 0, 'L');
|
|
|
|
|
|
$pdf->SetLineWidth(0.2);
|
|
|
|
// Linie zeichnen
|
|
$pdf->Line(23, 55, 100, 55);
|
|
|
|
|
|
## Falzmarken
|
|
$pdf->SetLineWidth(0.2);
|
|
|
|
$pdf->Line(5.3, 105, 9, 105);
|
|
$pdf->Line(5.3, 148.5, 11.5, 148.5);
|
|
$pdf->Line(5.3, 211, 9, 211);
|
|
##
|
|
|
|
|
|
$pdf->SetFont('Arial', '', 11);
|
|
$pdf->SetY(61.3);
|
|
$pdf->SetX(24);
|
|
if($row_hs['hs'] == 'K' or $row_hs['hs'] == 'k'){
|
|
$pdf->MultiCell(0, 4.5, "Hochschule Kehl\nServicezentrum Studium & Lehre\nKinzigallee 1\n77694 Kehl", 0, 'L');
|
|
}else{
|
|
$pdf->MultiCell(0, 4.5, "Hochschule Ludwigsburg\nZulassungsamt\nReuteallee 36\n71634 Ludwigsburg", 0, 'L');
|
|
}
|
|
|
|
|
|
|
|
|
|
$pdf->SetFont('Arial', 'B', 12);
|
|
$pdf->SetY(97);
|
|
$pdf->SetX(24);
|
|
$pdf->MultiCell(0, 4.5, "Praktische Ausbildung im Vorbereitungsdienst", 0, 'L');
|
|
|
|
|
|
$pdf->SetFont('Arial', 'B', 12);
|
|
$pdf->SetY(107);
|
|
$pdf->SetX(24);
|
|
$pdf->MultiCell(0, 4.5, "Antrag auf Zuweisung zu den Ausbildungsstellen", 0, 'L');
|
|
|
|
|
|
$columns = 4; //five columns
|
|
|
|
#$pdf->SetX(30);
|
|
$pdf->SetY(120);
|
|
//we initialize the table class
|
|
$pdf->Table_Init($columns, true, true);
|
|
|
|
$table_subtype = $table_default_table_type;
|
|
$pdf->Set_Table_Type($table_subtype);
|
|
|
|
//TABLE HEADER SETTINGS
|
|
$header_subtype = $table_default_header_type;
|
|
|
|
|
|
for($i=0; $i<$columns; $i++) $header_type[$i] = $table_default_header_type;
|
|
|
|
$header_type[0]['WIDTH'] = 6;
|
|
$header_type[1]['WIDTH'] = 50;
|
|
$header_type[2]['WIDTH'] = 74;
|
|
$header_type[3]['WIDTH'] = 35;
|
|
|
|
$header_type[0]['TEXT'] = "";
|
|
$header_type[1]['TEXT'] = "Ausbildungsstelle Anschrift";
|
|
$header_type[2]['TEXT'] = "Vertiefungsbereich";
|
|
$header_type[3]['TEXT'] = "Zeitraum";
|
|
|
|
|
|
#$header_type[1]['COLSPAN'] = "2";
|
|
|
|
//set the header type
|
|
$pdf->Set_Header_Type($header_type);
|
|
|
|
$pdf->Draw_Header();
|
|
|
|
//TABLE DATA SETTINGS
|
|
$data_subtype = $table_default_data_type;
|
|
|
|
$data_type = Array();//reset the array
|
|
for ($i=0; $i<$columns; $i++) $data_type[$i] = $data_subtype;
|
|
|
|
$pdf->Set_Data_Type($data_type);
|
|
|
|
$fsize = 10;
|
|
$colspan = 1;
|
|
$rr = 255;
|
|
|
|
$db = dbconnect();
|
|
$query = "SELECT t1.dst_id
|
|
, t1.vert_bereich
|
|
, DATE_FORMAT(t1.beginn, '%d.%m.%Y') beginn
|
|
, DATE_FORMAT(t1.beginn, '%Y%m%d') beginnform
|
|
, DATE_FORMAT(t1.ende, '%d.%m.%Y') ende
|
|
, t1.saaid saaid
|
|
, t1.aendid
|
|
, t1.status
|
|
, t1.umzugsverg
|
|
FROM stan_antrag t1
|
|
WHERE t1.status = (
|
|
SELECT MAX(t2.status)
|
|
FROM stan_antrag t2
|
|
WHERE t1.aendid = t2.aendid
|
|
AND t2.status != '2'
|
|
AND t2.status != '-1'
|
|
)
|
|
AND t1.uid = '$uid1'
|
|
AND (t1.zuweisung is NULL OR t1.zuweisung='Z')
|
|
ORDER BY beginnform";
|
|
|
|
|
|
$result = $db->query ($query)
|
|
or die ("Cannot execute query1");
|
|
|
|
|
|
$hinweis_umzug=0;
|
|
while ($row = $result->fetch_array())
|
|
{
|
|
$data = Array();
|
|
|
|
$res2 = $db->query("SELECT bezeichnung FROM stan_vertiefungsbereich WHERE vbid='$row[vert_bereich]'");
|
|
$row2 = $res2->fetch_array();
|
|
|
|
$res4 = $db->query("SELECT bez, ort, str, plz FROM stan_dienststellen WHERE dst_id='$row[dst_id]'");
|
|
$row4 = $res4->fetch_array();
|
|
if($row4['bez'] != ''){
|
|
if($row['umzugsverg'] == 'J'){
|
|
$dst_bez = "$row4[bez] ".trim($row4['name'])."*";
|
|
$hinweis_umzug=1;
|
|
}else{
|
|
$dst_bez = $row4['bez']." ".$row4['name'];
|
|
}
|
|
$ort = $row4['ort'];
|
|
$str = $row4['str'];
|
|
$plz = $row4['plz'];
|
|
}
|
|
if($row4['bez'] == ''){
|
|
$res5 = $db->query("SELECT bez, ort, str, plz FROM stan_dienststellen_tmp WHERE dst_id='$row[dst_id]'");
|
|
$row5 = $res5->fetch_array();
|
|
if($row['umzugsverg'] == 'J'){
|
|
$dst_bez = "$row5[bez] $row5[name]*";
|
|
$hinweis_umzug=1;
|
|
}else{
|
|
$dst_bez = $row5['bez']." ".$row5['name'];
|
|
}
|
|
$ort = $row5['ort'];
|
|
$str = $row5['str'];
|
|
$plz = $row5['plz'];
|
|
}
|
|
if($row4['bez'] == '' AND $row5['bez'] == ''){
|
|
$dst_bez = '<i>Zeitraum vorgemerkt</i>';
|
|
$ort = '';
|
|
$str = '';
|
|
$plz = '';
|
|
}
|
|
|
|
$j = $j+1;
|
|
|
|
|
|
|
|
/* Schriftgröße
|
|
$data[0]['T_SIZE'] = $fsize;
|
|
$data[1]['T_SIZE'] = $fsize+3;
|
|
$data[3]['T_SIZE'] = $fsize+4;
|
|
*/
|
|
/* Schriftfarbe und Zellenhintergrund
|
|
$data[0]['T_COLOR'] = array(0,0,0); //Schriftfarbe
|
|
$data[0]['BG_COLOR'] = array($rr,$rr,$rr);
|
|
$data[3]['T_COLOR'] = array($rr,240,240);
|
|
$data[3]['BG_COLOR'] = array($rr,100,135);
|
|
*/
|
|
$data[0]['TEXT'] = $j;
|
|
$data[0]['T_ALIGN'] = "C"; //C=CENTER, L=LEFT, R=RIGHT, J=JUSTIFY
|
|
$data[0]['V_ALIGN'] = "M"; //T=TOP, M=MIDDLE, B=BOTTOM
|
|
#$data[0]['T_TYPE'] = "BI"; // B=BOLD, I=ITALIC
|
|
if($dst_bez != ''){
|
|
$dst_bez = "$dst_bez\n";
|
|
}
|
|
if($str != ''){
|
|
$str = "$str\n";
|
|
}
|
|
$data[1]['TEXT'] = "$dst_bez$str$plz $ort";
|
|
$data[1]['T_ALIGN'] = "L";
|
|
$data[1]['V_ALIGN'] = "M";
|
|
|
|
$data[2]['TEXT'] = trim($row2['bezeichnung']);
|
|
$data[2]['T_ALIGN'] = "L";
|
|
$data[2]['V_ALIGN'] = "M";
|
|
|
|
$data[3]['TEXT'] = "$row[beginn] - $row[ende]";
|
|
$data[3]['T_ALIGN'] = "C";
|
|
$data[3]['V_ALIGN'] = "M";
|
|
|
|
|
|
$pdf->Draw_Data($data);
|
|
}
|
|
|
|
$pdf->Draw_Table_Border();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$columns = 3; //five columns
|
|
|
|
|
|
$pos=$pdf->GetY()+10;
|
|
$pdf->SetY($pos);
|
|
//we initialize the table class
|
|
$pdf->Table_Init($columns, true, true);
|
|
|
|
$table_subtype = $table_default_table_type;
|
|
$pdf->Set_Table_Type($table_subtype);
|
|
|
|
//TABLE HEADER SETTINGS
|
|
$header_subtype = $table_default_header_type;
|
|
|
|
|
|
for($i=0; $i<$columns; $i++) $header_type[$i] = $table_default_header_type;
|
|
|
|
|
|
$header_type[0]['WIDTH'] = 36;
|
|
$header_type[1]['WIDTH'] = 64;
|
|
$header_type[2]['WIDTH'] = 65;
|
|
|
|
$header_type[0]['TEXT'] = "Vertiefungsbereich";
|
|
$header_type[1]['TEXT'] = "Priorität 1";
|
|
$header_type[2]['TEXT'] = "Priorität 2";
|
|
|
|
#$header_type[1]['COLSPAN'] = "2";
|
|
|
|
//set the header type
|
|
$pdf->Set_Header_Type($header_type);
|
|
|
|
$pdf->Draw_Header();
|
|
|
|
//TABLE DATA SETTINGS
|
|
$data_subtype = $table_default_data_type;
|
|
|
|
$data_type = Array();//reset the array
|
|
for ($i=0; $i<$columns; $i++) $data_type[$i] = $data_subtype;
|
|
|
|
$pdf->Set_Data_Type($data_type);
|
|
|
|
$fsize = 10;
|
|
$colspan = 1;
|
|
$rr = 255;
|
|
|
|
$db = dbconnect();
|
|
$query = "SELECT distinct t1.vert_bereich
|
|
FROM stan_antrag t1
|
|
WHERE t1.status = (
|
|
SELECT MAX(t2.status)
|
|
FROM stan_antrag t2
|
|
WHERE t1.aendid = t2.aendid
|
|
AND t2.status != '2'
|
|
AND t2.status != '-1'
|
|
)
|
|
AND t1.uid = '$uid1'
|
|
AND (t1.zuweisung is NULL OR t1.zuweisung='Z')";
|
|
#echo $query;
|
|
#exit;
|
|
$result = $db->query ($query)
|
|
or die ("Cannot execute query1a");
|
|
|
|
|
|
|
|
while ($row = $result->fetch_array())
|
|
{
|
|
$data = Array();
|
|
|
|
|
|
$res2 = $db->query("SELECT bezeichnung FROM stan_vertiefungsbereich WHERE vbid='$row[vert_bereich]'");
|
|
$row2 = $res2->fetch_array();
|
|
|
|
$res_prio1 = $db->query("SELECT standort, abdatum, b.block, pendler
|
|
FROM stan_ag_standort a, stan_ag_standort_wunsch b, stan_standort c
|
|
WHERE a.agsid = b.wagsid
|
|
AND c.sid = a.sid
|
|
AND b.uid = '$uid1'
|
|
AND a.vbid='$row[vert_bereich]'
|
|
AND b.prio='1'");
|
|
$row_prio1 = $res_prio1->fetch_array();
|
|
|
|
|
|
|
|
|
|
$res_prio2 = $db->query("SELECT standort, abdatum, b.block, pendler
|
|
FROM stan_ag_standort a, stan_ag_standort_wunsch b, stan_standort c
|
|
WHERE a.agsid = b.wagsid
|
|
AND c.sid = a.sid
|
|
AND b.uid = '$uid1'
|
|
AND a.vbid='$row[vert_bereich]'
|
|
AND b.prio='2'");
|
|
$row_prio2 = $res_prio2->fetch_array();
|
|
|
|
|
|
/* Schriftgröße
|
|
$data[0]['T_SIZE'] = $fsize;
|
|
$data[1]['T_SIZE'] = $fsize+3;
|
|
$data[3]['T_SIZE'] = $fsize+4;
|
|
*/
|
|
/* Schriftfarbe und Zellenhintergrund
|
|
$data[0]['T_COLOR'] = array(0,0,0); //Schriftfarbe
|
|
$data[0]['BG_COLOR'] = array($rr,$rr,$rr);
|
|
$data[3]['T_COLOR'] = array($rr,240,240);
|
|
$data[3]['BG_COLOR'] = array($rr,100,135);
|
|
*/
|
|
if($row_prio1['block'] != ''){
|
|
|
|
$data[0]['TEXT'] = "$row2[bezeichnung]";
|
|
$data[0]['T_ALIGN'] = "L"; //C=CENTER, L=LEFT, R=RIGHT, J=JUSTIFY
|
|
$data[0]['V_ALIGN'] = "M"; //T=TOP, M=MIDDLE, B=BOTTOM
|
|
#$data[0]['T_TYPE'] = "BI"; // B=BOLD, I=ITALIC
|
|
if($dst_bez != ''){
|
|
$dst_bez = "$dst_bez\n";
|
|
}
|
|
if($str != ''){
|
|
$str = "$str\n";
|
|
}
|
|
$data[1]['TEXT'] = "$row_prio1[standort] (Block $row_prio1[block]) ab $row_prio1[abdatum] ($row_prio1[pendler])";
|
|
$data[1]['T_ALIGN'] = "L";
|
|
$data[1]['V_ALIGN'] = "M";
|
|
|
|
$data[2]['TEXT'] = "$row_prio2[standort] (Block $row_prio2[block]) ab $row_prio2[abdatum] ($row_prio2[pendler])";
|
|
$data[2]['T_ALIGN'] = "L";
|
|
$data[2]['V_ALIGN'] = "M";
|
|
|
|
|
|
$pdf->Draw_Data($data);
|
|
}
|
|
}
|
|
|
|
$pdf->Draw_Table_Border();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if($hinweis_umzug == 1){
|
|
$pos=$pdf->GetY();
|
|
|
|
$pdf->SetFont('Arial', '', 12);
|
|
$pdf->SetY($pos);
|
|
$pdf->SetX(24);
|
|
$pdf->MultiCell(190, 5, "* Für diesen Praxisabschnitt wird eine Umzugsvergütung gewährt.", 0, 'J');
|
|
}
|
|
|
|
|
|
|
|
$pos=$pdf->GetY()+10;
|
|
$pdf->SetFont('Arial', 'B', 12);
|
|
$pdf->SetY($pos);
|
|
$pdf->SetX(24);
|
|
$pdf->MultiCell(190, 5, "Persönliche Erklärung", 0, 'L');
|
|
|
|
$pos=$pdf->GetY();
|
|
$pdf->SetFont('Arial', 'B', 12);
|
|
$pdf->SetY($pos);
|
|
$pdf->SetX(24);
|
|
$pdf->MultiCell(7, 5, "1.", 0, 'L');
|
|
|
|
$pdf->SetFont('Arial', 'B', 12);
|
|
$pdf->SetY($pos);
|
|
$pdf->SetX(31);
|
|
if($row_hs['hs'] == 'K' or $row_hs['hs'] == 'k'){
|
|
$pdf->MultiCell(160, 5, "Die Hinweise der Hochschule Kehl zur praktischen Ausbildung gem. § 22 AprOVw gD (Praxisjahr) habe ich zur Kenntnis genommen.", 0, 'L');
|
|
}else{
|
|
$pdf->MultiCell(160, 5, "Die Hinweise der Hochschule Ludwigsburg zur praktischen Ausbildung gem. § 23 AprOVw gD (Praxisjahr) habe ich zur Kenntnis genommen.", 0, 'L');
|
|
}
|
|
|
|
/*
|
|
$pos=$pdf->GetY();
|
|
|
|
$pdf->SetFont('Arial', 'B', 12);
|
|
$pdf->SetY($pos);
|
|
$pdf->SetX(24);
|
|
$pdf->MultiCell(7, 5, "2.", 0, 'L');
|
|
|
|
$pdf->SetFont('Arial', 'B', 12);
|
|
$pdf->SetY($pos);
|
|
$pdf->SetX(31);
|
|
$pdf->MultiCell(160, 5, "Für die Zeit einer Zuweisung außerhalb Baden-Württembergs verzichte ich auf die Erstattung etwaiger Reisekosten sowie auf die Vergütung von Umzugskosten und Trennungsgeld.", 0, 'L');
|
|
*/
|
|
$pos=$pdf->GetY();
|
|
|
|
$pdf->SetFont('Arial', 'B', 12);
|
|
$pdf->SetY($pos);
|
|
$pdf->SetX(24);
|
|
$pdf->MultiCell(7, 5, "2.", 0, 'L');
|
|
|
|
$pdf->SetFont('Arial', 'B', 12);
|
|
$pdf->SetY($pos);
|
|
$pdf->SetX(31);
|
|
$pdf->MultiCell(160, 5, "Das Einverständnis aller o.a. Ausbildungsstellen liegt mir vor.", 0, 'L');
|
|
|
|
|
|
$pos=$pdf->GetY()+25;
|
|
$pdf->SetLineWidth(0.3);
|
|
|
|
// Linie zeichnen
|
|
$pdf->Line(24, $pos, 190, $pos);
|
|
|
|
$pos=$pos+2;
|
|
|
|
$pdf->SetFont('Arial', '', 12);
|
|
$pdf->SetY($pos);
|
|
$pdf->SetX(24);
|
|
$pdf->MultiCell(0, 5, "Datum, Unterschrift", 0, 'L');
|
|
|
|
$pdf->Output();
|
|
|
|
?>
|
|
|