413 lines
12 KiB
PHP
Executable File
413 lines
12 KiB
PHP
Executable File
<?php
|
|
$uid1="$row_cur_uid2[UID]";
|
|
$user_admin=$_COOKIE["user_admin"];
|
|
########Kontaktdaten HS #####################
|
|
$db = dbconnect();
|
|
$res_ansp = $db->query("SELECT wert1 name, wert2 mail FROM parameter WHERE pid='6'");
|
|
$row_ansp = $res_ansp->fetch_array();
|
|
|
|
$res_kontakt = $db->query("SELECT wert1 tel, wert2 fax FROM parameter WHERE pid='5'");
|
|
$row_kontakt = $res_kontakt->fetch_array();
|
|
if(isset($uid)){
|
|
$uid1=$uid;
|
|
}
|
|
$res_stud = $db->query("SELECT nachname, vorname, geschlecht, postrasse, poplz, poort, ag, jahrgang FROM stud WHERE uid='$uid1'");
|
|
$row_stud = $res_stud->fetch_array();
|
|
if($row_stud['geschlecht'] == 'M'){
|
|
$anredeform = "geehrter";
|
|
$anrede = "Herr";
|
|
$anwart_geschlecht = "des Anwärters";
|
|
}else{
|
|
$anredeform = "geehrte";
|
|
$anrede = "Frau";
|
|
$anwart_geschlecht = "der Anwärterin";
|
|
}
|
|
|
|
if(!isset($hist)){
|
|
$heute_format = date("d.m.Y", mktime(0, 0, 0, date("m"), date("d"), date("Y"))); // ISO-8601 Format wie in der Datenbank: Formatierung für Vergleiche erforderlich
|
|
}else{
|
|
$res_dat = $db->query("SELECT min(date_format(datum, '%d.%m.%Y')) datum FROM stan_printqueue_hist WHERE zuweisung='SOZ' AND admin='$user_admin'");
|
|
$row_dat = $res_dat->fetch_array();
|
|
|
|
$heute_format = $row_dat[datum];
|
|
}
|
|
|
|
$pdf->Image('anschreiben_kehl/logo.png', 116, 10,64); #https://www.fpdf.de/funktionsreferenz/?funktion=Image
|
|
|
|
|
|
$pdf->SetFont('Times', '', 12);
|
|
$pdf->SetY(59.5);
|
|
$pdf->SetX(21);
|
|
$pdf->Cell(0, 3, "$row_stud[vorname] $row_stud[nachname]", 0, 0, 'L');
|
|
|
|
$pos = $pdf->GetY()+4;
|
|
|
|
$pdf->SetFont('Times', '', 12);
|
|
$pdf->SetY($pos);
|
|
$pdf->SetX(21);
|
|
$pdf->Cell(0, 3, "$row_stud[ag] / $row_stud[jahrgang]", 0, 0, 'L');
|
|
|
|
$pos = $pdf->GetY()+4;
|
|
|
|
$pdf->SetFont('Times', '', 12);
|
|
$pdf->SetY($pos);
|
|
$pdf->SetX(21);
|
|
$pdf->Cell(0, 3, "$row_stud[postrasse]", 0, 0, 'L');
|
|
|
|
$pos = $pdf->GetY()+4;
|
|
$pdf->SetFont('Times', 'B', 12);
|
|
$pdf->SetY($pos);
|
|
$pdf->SetX(21);
|
|
$pdf->Cell(0, 3, "$row_stud[poplz] $row_stud[poort]", 0, 0, 'L');
|
|
|
|
|
|
|
|
|
|
$pdf->SetFont('Times', '', 9);
|
|
$pdf->SetY(57.2);
|
|
$pdf->SetX(125.9);
|
|
$pdf->MultiCell(47, 3, "Bearbeiter:", 0, 'L');
|
|
|
|
$pdf->SetFont('Times', '', 9);
|
|
$pdf->SetY(57.2);
|
|
$pdf->SetX(150.7);
|
|
$pdf->MultiCell(47, 3, "Herr Johannes Fien", 0, 'L');
|
|
|
|
|
|
$pos=$pdf->GetY()+4.5;
|
|
|
|
$pdf->SetFont('Times', '', 9);
|
|
$pdf->SetY($pos);
|
|
$pdf->SetX(125.9);
|
|
$pdf->MultiCell(47, 3, "(07851)894-", 0, 'L');
|
|
|
|
$pdf->SetFont('Times', '', 9);
|
|
$pdf->SetY($pos);
|
|
$pdf->SetX(150.7);
|
|
$pdf->MultiCell(47, 3, "117", 0, 'L');
|
|
|
|
|
|
$pos=$pdf->GetY()+4.5;
|
|
|
|
$pdf->SetFont('Times', '', 9);
|
|
$pdf->SetY($pos);
|
|
$pdf->SetX(125.9);
|
|
$pdf->MultiCell(47, 3, "E-Mail:", 0, 'L');
|
|
|
|
$pdf->SetFont('Times', '', 9);
|
|
$pdf->SetY($pos);
|
|
$pdf->SetX(150.7);
|
|
$pdf->MultiCell(47, 3, "fien@hs-kehl.de", 0, 'L');
|
|
|
|
|
|
$pos=$pdf->GetY()+4.1;
|
|
|
|
$pdf->SetFont('Times', '', 9);
|
|
$pdf->SetY($pos);
|
|
$pdf->SetX(125.9);
|
|
$pdf->MultiCell(47, 3, "Ihr Zeichen:", 0, 'L');
|
|
|
|
$pdf->SetFont('Times', '', 9);
|
|
$pdf->SetY($pos);
|
|
$pdf->SetX(150.7);
|
|
$pdf->MultiCell(47, 3, "", 0, 'L');
|
|
|
|
|
|
$pos=$pdf->GetY()+0.6;
|
|
|
|
$pdf->SetFont('Times', '', 9);
|
|
$pdf->SetY($pos);
|
|
$pdf->SetX(125.9);
|
|
$pdf->MultiCell(47, 3, "Unser Zeichen:", 0, 'L');
|
|
|
|
$pdf->SetFont('Times', '', 9);
|
|
$pdf->SetY($pos);
|
|
$pdf->SetX(150.7);
|
|
$pdf->MultiCell(47, 3, "", 0, 'L');
|
|
|
|
|
|
$pos=$pdf->GetY()+4.1;
|
|
|
|
$pdf->SetFont('Times', '', 9);
|
|
$pdf->SetY($pos);
|
|
$pdf->SetX(125.9);
|
|
$pdf->MultiCell(47, 3, "Datum:", 0, 'L');
|
|
|
|
$pdf->SetFont('Times', '', 9);
|
|
$pdf->SetY($pos);
|
|
$pdf->SetX(150.7);
|
|
$pdf->MultiCell(47, 3, "$heute_format", 0, 'L');
|
|
|
|
|
|
$pdf->SetFont('Times', '', 9);
|
|
$pdf->SetY(44.4);
|
|
$pdf->SetX(22.3);
|
|
$pdf->MultiCell(80, 3, "Hochschule Kehl - Kinzigallee 1 - 77694 Kehl", 0, 'L');
|
|
|
|
########Kontaktdaten HS Ende #####################
|
|
|
|
######## Betreff #################################
|
|
|
|
$pdf->SetFont('Times', 'B', 12);
|
|
$pdf->SetY(96.2);
|
|
$pdf->SetX(21);
|
|
$pdf->MultiCell(142, 3, "Zuweisung zu den praxisbegleitenden Arbeitsgemeinschaften", 0, 'L');
|
|
|
|
|
|
|
|
######## Betreff Ende ############################
|
|
|
|
|
|
$pos=$pdf->GetY()+6.6;
|
|
|
|
$pdf->SetFont('Times', '', 12);
|
|
$pdf->SetY($pos);
|
|
$pdf->SetX(21);
|
|
$pdf->MultiCell(142, 3, "Sehr $anredeform $anrede $row_cur_uid2[vorname] $row_cur_uid2[nachname],", 0, 'L');
|
|
|
|
|
|
$pos=$pdf->GetY()+6.0;
|
|
|
|
$pdf->SetFont('Times', '', 12);
|
|
$pdf->SetY($pos);
|
|
$pdf->SetX(21);
|
|
$pdf->MultiCell(172, 4.8, "wir weisen Sie den praxisbegleitenden Arbeitsgemeinschaften an folgenden Standorten zu:", 0, 'J');
|
|
|
|
|
|
|
|
|
|
|
|
#$jahrgang="$jahrgang"; // wird von pdf_gen.php geliefert
|
|
#$datid = '1';
|
|
|
|
|
|
$db = dbconnect();
|
|
|
|
|
|
$columns = 3; //five columns
|
|
|
|
|
|
$pos=$pdf->GetY()+5.0;
|
|
|
|
|
|
$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'] = 29.4;
|
|
$header_type[0]['T_ALIGN'] = "L"; //C=CENTER, L=LEFT, R=RIGHT, J=JUSTIFY
|
|
$header_type[0]['V_ALIGN'] = "M"; //T=TOP, M=MIDDLE, B=BOTTOM
|
|
$header_type[0]['TEXT'] = "Beginn";
|
|
|
|
$header_type[1]['WIDTH'] = 65;
|
|
$header_type[1]['T_ALIGN'] = "L"; //C=CENTER, L=LEFT, R=RIGHT, J=JUSTIFY
|
|
$header_type[1]['V_ALIGN'] = "M"; //T=TOP, M=MIDDLE, B=BOTTOM
|
|
$header_type[1]['TEXT'] = "Vertiefungsbereich";
|
|
|
|
$header_type[2]['WIDTH'] = 73.9;
|
|
$header_type[2]['T_ALIGN'] = "L"; //C=CENTER, L=LEFT, R=RIGHT, J=JUSTIFY
|
|
$header_type[2]['V_ALIGN'] = "M"; //T=TOP, M=MIDDLE, B=BOTTOM
|
|
$header_type[2]['TEXT'] = "AG-Standort";
|
|
|
|
# $header_type[4]['WIDTH'] = 25.7;
|
|
# $header_type[4]['T_ALIGN'] = "C"; //C=CENTER, L=LEFT, R=RIGHT, J=JUSTIFY
|
|
# $header_type[4]['V_ALIGN'] = "M"; //T=TOP, M=MIDDLE, B=BOTTOM
|
|
# $header_type[4]['TEXT'] = "AG-Standort";
|
|
|
|
#$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();
|
|
|
|
if(!isset($hist)){
|
|
$query = "SELECT bezeichnung vertiefungsbereich, standort, abdatum, block, pendler, wagsid, uid
|
|
FROM stan_zuw_so_neu
|
|
WHERE uid='$uid1'
|
|
ORDER BY block ASC";
|
|
}else{
|
|
|
|
$query = "SELECT bezeichnung vertiefungsbereich, standort, abdatum, a.block, pendler, b.wagsid, a.uid
|
|
FROM stan_printqueue_hist a, stan_ag_standort_wunsch b, stan_ag_standort c, stan_standort d, stan_vertiefungsbereich e
|
|
WHERE a.uid =b.uid
|
|
AND a.block=b.block
|
|
AND b.prio=0
|
|
AND b.wagsid=c.agsid
|
|
AND c.sid = d.sid
|
|
AND c.vbid = e.vbid
|
|
AND a.admin = '$user_admin'
|
|
ORDER BY a.block ASC";
|
|
|
|
}
|
|
|
|
|
|
$result = $db->query ($query)
|
|
or die ("Cannot execute query1");
|
|
|
|
# Datum außerhalb der Schleife, damit überall das gleiche DAtum vorliegt. Für den update unten
|
|
$datum = date("Y-m-d H:i:s",time());
|
|
|
|
while ($row = $result->fetch_array())
|
|
{
|
|
|
|
## Eintrag für die Printqueue
|
|
|
|
if(!isset($hist)){
|
|
#$dok_output aus zuweisung_mail.php
|
|
$sql_queue = $db->query("INSERT INTO stan_printqueue_antrag (uid, block, zuweisung, datum, klartext, wagsid, admin, hs_admin, druckstatus, dokument, sort_order)
|
|
VALUES ('$uid1', '$row[block]', 'SOZ', '$datum', 'Standortzuweisung', '$row[wagsid]', '$user_admin', '$hs', 'N', '$dok_output', '1')");
|
|
$qid_prnt .= $db->insert_id.",";
|
|
}
|
|
|
|
|
|
$data = 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);
|
|
*/
|
|
|
|
$data[0]['TEXT'] = "$row[abdatum]";
|
|
$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
|
|
|
|
$data[1]['TEXT'] = "$row[vertiefungsbereich]";
|
|
$data[1]['T_ALIGN'] = "L";
|
|
$data[1]['V_ALIGN'] = "M";
|
|
|
|
$data[2]['TEXT'] = "$row[standort] (Block $row[block]) ab $row[abdatum] ($row[pendler])";
|
|
$data[2]['T_ALIGN'] = "L";
|
|
$data[2]['V_ALIGN'] = "M";
|
|
|
|
# $data[4]['TEXT'] = "$row[standort]";
|
|
# $data[4]['T_ALIGN'] = "L";
|
|
# $data[4]['V_ALIGN'] = "M";
|
|
|
|
$pdf->Draw_Data($data,NULL,5); // -->letzter Parameter Höhe der Datenspalte. Neu prgrammiert in prints/class.fpdf_table.php am 15.04.2009
|
|
}
|
|
|
|
$pdf->Draw_Table_Border();
|
|
|
|
## Für eine spätere history die gedruckten Saaids sammeln für das Dokument
|
|
if(!isset($hist)){
|
|
|
|
$res_dat = $db->query("UPDATE stan_printqueue_antrag
|
|
SET printed_obj='$qid_prnt'
|
|
WHERE zuweisung='SOZ'
|
|
AND uid ='$uid1'
|
|
AND datum = '$datum'");
|
|
$qid_prnt = '';
|
|
}
|
|
|
|
$pos=$pdf->GetY()+5.0;
|
|
|
|
$pdf->SetFont('Times', 'B', 12);
|
|
$pdf->SetY($pos);
|
|
$pdf->SetX(21);
|
|
#$pdf->SetTextColor(255,0,255);
|
|
$pdf->MultiCell(172, 4.8, "Die Teilnahme an den in diesem Zeitraum angebotenen Terminen ist verpflichtend.\nEs können weder Erholungsurlaub noch sonstige Freistellungen gewährt werden.", 0, 'J');
|
|
|
|
$pos=$pdf->GetY()+4.0;
|
|
|
|
$pdf->SetFont('Times', '', 12);
|
|
$pdf->SetY($pos);
|
|
$pdf->SetX(21);
|
|
$pdf->MultiCell(172, 4.8, "Eine Übersicht Ihrer Termine und aktuelle Informationen, wie z.B. Raum- oder Terminänderungen, können Sie über das Praxisstellensystem (Schritt 3 / AG-Übersicht) einsehen. Wir empfehlen Ihnen deshalb dringend, diese Daten regelmäßig vor einem anstehenden AG-Termin zu überprüfen. Es müssen zwingend der Vertiefungsbereich der Praxisstelle und der Vertiefungsbereich der für diesen Zeitraum besuchten AG übereinstimmen (bitte beachten!)", 0, 'J');
|
|
|
|
|
|
$pos=$pdf->GetY()+4.0;
|
|
|
|
$pdf->SetFont('Times', '', 12);
|
|
$pdf->SetY($pos);
|
|
$pdf->SetX(21);
|
|
$pdf->MultiCell(172, 4.8, "Im Krankheitsfall entschuldigen Sie sich sowohl bei Ihrer Praxisstelle, als auch bei der AG-Leitung. Ein ärztliches Attest ist während der AG-Woche ab dem 1. Krankheitstag erforderlich. Das Attest ist der AG-Leitung zu übersenden.", 0, 'J');
|
|
|
|
|
|
$pos=$pdf->GetY()+4.0;
|
|
|
|
$pdf->SetFont('Times', '', 12);
|
|
$pdf->SetY($pos);
|
|
$pdf->SetX(21);
|
|
$pdf->MultiCell(172, 4.8, "Weiterhin empfehlen wir Ihnen eine Weiterleitungsfunktion Ihres Hochschul-Emailaccounts einzurichten, da wichtige Informationen der AG-Leitung und evtl. der Hochschule dorthin versandt werden. Bitte halten Sie auch immer Ihr Postfach frei, da dort nur eine begrenzte Kapazität zur Verfügung steht.", 0, 'J');
|
|
|
|
$pos=$pdf->GetY()+4.0;
|
|
|
|
$pdf->SetFont('Times', '', 12);
|
|
$pdf->SetY($pos);
|
|
$pdf->SetX(21);
|
|
$pdf->MultiCell(172, 4.8, "Für die Reisekosten gelten die mit Schreiben vom 10.04.2018 bekannt gemachten Regelungen.", 0, 'J');
|
|
|
|
|
|
$pos=$pdf->GetY()+4.0;
|
|
|
|
$pdf->SetFont('Times', '', 12);
|
|
$pdf->SetY($pos);
|
|
$pdf->SetX(21);
|
|
$pdf->MultiCell(172, 4.8, "Mit freundlichen Grüßen", 0, 'J');
|
|
|
|
|
|
$pos=$pdf->GetY()+5.8;
|
|
$pdf->SetFont('Times', '', 12);
|
|
$pdf->SetY($pos);
|
|
$pdf->SetX(21);
|
|
$pdf->MultiCell(172, 4.8, "gez.\nJohannes Fien", 0, 'J');
|
|
|
|
|
|
/*
|
|
$pdf->SetFont('Times', '', 12);
|
|
$pdf->SetY($pos);
|
|
$pdf->SetX(21);
|
|
$pdf->MultiCell(172, 4.8, "Johannes Fien", 0, 'J');
|
|
*/
|
|
|
|
|
|
#require("urlaubskarte.php");
|
|
/*
|
|
$pagecount = $pdf->setSourceFile("anschreiben/anlage_zuweisung.pdf");
|
|
$tplidx1 = $pdf->ImportPage(1);
|
|
$pdf->addPage();
|
|
$pdf->useTemplate($tplidx1,0,0,0);
|
|
$tplidx1 = $pdf->ImportPage(2);
|
|
$pdf->addPage();
|
|
$pdf->useTemplate($tplidx1,0,0,0);
|
|
$tplidx1 = $pdf->ImportPage(3);
|
|
$pdf->addPage();
|
|
$pdf->useTemplate($tplidx1,0,0,0);
|
|
*/
|
|
?>
|