2555 lines
118 KiB
PHP
Executable File
2555 lines
118 KiB
PHP
Executable File
<?php
|
|
$user_admin=$_COOKIE["user_admin"];
|
|
$jahrgang=$_COOKIE["jahrgang"];
|
|
$hs=$_COOKIE["ck_hs"];
|
|
include_once("kurs/datenbankanbindung.php"); // fügt die Datenbankanbindung ein: Sys:\php\includes\kurs\datenbankanbindung.php
|
|
require_once("FCKeditor/fckeditor.php") ;
|
|
require_once("../stud/func_get_block.php"); // Prüft in welchem Block die aktuelle Stelle sitzt
|
|
require_once("func_get_vert_block.php"); // Gibt vertiefungsbereich zurück, zu dem gewünschten Block
|
|
require_once("func_printqueue_antrag.php"); // Druckqueue bei der Zuweisung
|
|
|
|
|
|
|
|
|
|
$db = dbconnect();
|
|
|
|
if (isset($_GET['action']))
|
|
$action = $_GET['action'];
|
|
else
|
|
$action = "";
|
|
|
|
switch($action){
|
|
default:
|
|
|
|
echo "
|
|
<html>
|
|
<head>
|
|
<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">
|
|
<link rel=\"stylesheet\" href=\"../styles_pc.css\" type=\"text/css\">
|
|
<title>Einzelübersicht</title>
|
|
<script type=\"text/javascript\" src=\"livesearch/ajax.js\"></script>
|
|
<script type=\"text/javascript\" src=\"livesearch/ajax-dynamic-list.js\"></script>
|
|
<style type=\"text/css\">
|
|
select{
|
|
width:250px;
|
|
}
|
|
|
|
|
|
|
|
/* Big box with list of options */
|
|
#ajax_listOfOptions{
|
|
position:absolute; /* Never change this one */
|
|
width:320px; /* Width of box */
|
|
height:200px; /* Height of box */
|
|
overflow:auto; /* Scrolling features */
|
|
border:1px solid #6487DC; /* Dark blue border */
|
|
background-color:#FFF; /* White background color */
|
|
text-align:left;
|
|
font-family : verdana, arial;
|
|
z-index:10000;
|
|
}
|
|
#ajax_listOfOptions div{ /* General rule for both .optionDiv and .optionDivSelected */
|
|
margin:1px;
|
|
padding:1px;
|
|
cursor:pointer;
|
|
font-size:0.9em;
|
|
}
|
|
#ajax_listOfOptions .optionDiv{ /* Div for each item in list */
|
|
|
|
}
|
|
#ajax_listOfOptions .optionDivSelected{ /* Selected item in the list */
|
|
background-color:#D6DFF7;
|
|
color:#002276;
|
|
font-family : verdana, arial;
|
|
font-weight : bold;
|
|
}
|
|
#ajax_listOfOptions_iframe{
|
|
background-color:#F00;
|
|
position:absolute;
|
|
z-index:500;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body onload=\"if(document.einzel)document.einzel.stud.focus();return false;\">
|
|
<table border=\"0\" style=\"border-collapse: collapse\" width=\"100%\" cellpadding=\"0\" height=\"100%\" id=\"table1\">
|
|
<tr>
|
|
<td>
|
|
<div align=\"center\">
|
|
<table cellspacing=\"0\" cellpadding=\"0\" width=\"550\" border=\"0\">
|
|
<tr>
|
|
<td width=\"10\" background=\"../images/box_e1.gif\">
|
|
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
|
<td nowrap=\"nowrap\" align=\"left\" width=\"3%\" background=\"../images/box_top.gif\" valign=\"top\"></td>
|
|
<td width=\"95%\" background=\"../images/box_top.gif\">
|
|
<img height=\"10\" src=\"../images/blank.gif\" width=\"1\"><br>
|
|
<font class=\"hd\">Übersicht</font><br>
|
|
<font class=\"sh\">Übersicht über die eingegangen Stellenanträge</font><br>
|
|
<img height=\"5\" src=\"../images/blank.gif\" width=\"1\"></td>
|
|
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e2.gif\">
|
|
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
|
</tr>
|
|
<tr>
|
|
<td width=\"1%\" background=\"../images/box_l.gif\">
|
|
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
|
<td colspan=\"2\"><br>
|
|
<form action="; echo $_SERVER['PHP_SELF'] . "?action=ubersicht"; echo" method=\"POST\" name=\"einzel\">
|
|
<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse; border-width: 0\" bordercolor=\"#111111\" width=\"100%\" id=\"AutoNumber1\" height=\"115\">
|
|
<tr>
|
|
<td width=\"25%\" height=\"17\">
|
|
</td>
|
|
<td width=\"25%\" height=\"17\"> </td>
|
|
<td width=\"25%\" height=\"17\">
|
|
<p> </p>
|
|
</td>
|
|
<td width=\"25%\" height=\"17\">
|
|
<p></p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width=\"50%\" height=\"17\">
|
|
<p></p>
|
|
</td>
|
|
<td width=\"50%\" height=\"17\"> </td>
|
|
</tr>
|
|
<tr>
|
|
<td width=\"50%\" height=\"17\">
|
|
Bitte Matrikelnr. eingeben:
|
|
<p></p>
|
|
</td>
|
|
<td width=\"50%\" height=\"17\">
|
|
<p align=\"left\">
|
|
<input type=\"text\" id=\"stud\" name=\"stud\" value=\"\" onkeyup=\"ajax_showOptions(this,'getWord',event)\" size=\"50\">
|
|
<input type=\"hidden\" id=\"stud_hidden\" name=\"stud_ID\"><!-- THE ID OF the textstelle will be inserted into this hidden input -->
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width=\"50%\" height=\"17\">
|
|
|
|
<p></p>
|
|
</td>
|
|
<td width=\"50%\" height=\"17\">
|
|
<p align=\"center\">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width=\"50%\" height=\"17\">
|
|
|
|
</td>
|
|
<td width=\"50%\" align=\"left\" height=\"17\">
|
|
oder
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width=\"50%\" height=\"17\">
|
|
|
|
<p></p>
|
|
</td>
|
|
<td width=\"50%\" height=\"17\">
|
|
<p align=\"center\">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width=\"50%\" height=\"17\">
|
|
Benutzer auswählen
|
|
</td>
|
|
<td width=\"50%\" align=\"left\" height=\"17\">
|
|
";
|
|
|
|
|
|
$db = dbconnect();
|
|
$query = "SELECT distinct a.uid, mtknr, vorname, nachname, durchgefallen
|
|
FROM stud a, stan_antrag b
|
|
WHERE a.uid = b.uid
|
|
AND jahrgang='$jahrgang'
|
|
AND stg = 'I'
|
|
AND hs = '$hs'
|
|
AND (b.status='0' or b.status='1')
|
|
AND (b.zuweisung='' or b.zuweisung IS NULL)
|
|
ORDER BY nachname";
|
|
$result = $db->query ($query)
|
|
or die ("Cannot execute query");
|
|
echo "<select size=\"5\" name=\"user2\">";
|
|
while ($row = $result->fetch_array()){
|
|
echo "<option value=\"".$row[uid]."\">$row[nachname], $row[vorname]";
|
|
if ($row[durchgefallen] == "Y"){
|
|
echo " *";
|
|
}
|
|
echo "
|
|
</option>\n";
|
|
}
|
|
echo "</select>";
|
|
|
|
echo "
|
|
<br>
|
|
* = inaktiver Bewerber
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width=\"50%\" height=\"17\">
|
|
|
|
</td>
|
|
<td width=\"50%\" align=\"left\" height=\"17\">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width=\"100%\" \" colspan='2' align=\"center\">
|
|
<input type=\"submit\" value=\"Abschicken\" name=\"B1\"></td>
|
|
</tr>
|
|
<tr>
|
|
<td width=\"50%\" height=\"18\">
|
|
</td>
|
|
<td width=\"50%\">
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
<tr>
|
|
<td width=\"50%\">
|
|
</td>
|
|
<td width=\"50%\" align=\"center\">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width=\"50%\">
|
|
</td>
|
|
<td width=\"50%\" align=\"center\">
|
|
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
</td>
|
|
<td width=\"1%\" background=\"../images/box_r.gif\">
|
|
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
|
</tr>
|
|
<tr>
|
|
<td nowrap=\"nowrap\" align=\"left\" width=\"1%\" background=\"../images/box_e3.gif\">
|
|
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"></td>
|
|
<td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_bottom.gif\" colspan=\"2\">
|
|
<img height=\"16\" src=\"../images/blank.gif\" width=\"8\"></td>
|
|
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e4.gif\">
|
|
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"> </td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</body>
|
|
</html>";
|
|
break;
|
|
case "ubersicht":
|
|
|
|
if($_POST[stud]!=''){
|
|
$stud = $_POST[stud];
|
|
$pos1 = strpos ($stud, '(')+1;
|
|
$pos2 = strpos ($stud, ')')-$pos1;
|
|
|
|
|
|
$str = substr($stud, $pos1,$pos2);
|
|
|
|
$str = explode(",",$str);
|
|
|
|
$mtknr=trim($str[0]);
|
|
$uid1=trim($str[1]);
|
|
|
|
|
|
|
|
if($_POST[stud] == ''){
|
|
echo "
|
|
<html>
|
|
<head>
|
|
<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">
|
|
<link rel=\"stylesheet\" href=\"../styles_pc.css\" type=\"text/css\">
|
|
<title>Falsches Datum</title>
|
|
</head>
|
|
<body>
|
|
<table border=\"0\" style=\"border-collapse: collapse\" width=\"100%\" cellpadding=\"0\" height=\"100%\" id=\"table1\">
|
|
<tr>
|
|
<td>
|
|
<div align=\"center\">
|
|
<table cellspacing=\"0\" cellpadding=\"0\" width=\"550\" border=\"0\">
|
|
<tr>
|
|
<td width=\"10\" background=\"../images/box_e1.gif\">
|
|
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
|
<td nowrap=\"nowrap\" align=\"left\" width=\"3%\" background=\"../images/box_top.gif\" valign=\"top\"></td>
|
|
<td width=\"95%\" background=\"../images/box_top.gif\">
|
|
<img height=\"10\" src=\"../images/blank.gif\" width=\"1\"><br>
|
|
<span class=\"sh\">Pflichtfelder ausfüllen</span><br>
|
|
<img height=\"5\" src=\"../images/blank.gif\" width=\"1\"></td>
|
|
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e2.gif\">
|
|
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
|
</tr>
|
|
<tr>
|
|
<td width=\"1%\" background=\"../images/box_l.gif\">
|
|
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
|
<td colspan=\"2\"><br>
|
|
<p align=\"center\"><b>Bitte füllen Sie alle Pflichtfelder aus!</p></b>
|
|
</p>
|
|
<p align=\"center\"><a href=\"javascript:history.back()\">
|
|
<img border=\"0\" src=\"../images/zurueck.gif\" width=\"77\" height=\"22\"></a><br>
|
|
</p>
|
|
<p></p>
|
|
<p></p>
|
|
<p></p>
|
|
<p></p>
|
|
<p><br>
|
|
</p>
|
|
</td>
|
|
<td width=\"1%\" background=\"../images/box_r.gif\">
|
|
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
|
</tr>
|
|
<tr>
|
|
<td nowrap=\"nowrap\" align=\"left\" width=\"1%\" background=\"../images/box_e3.gif\">
|
|
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"></td>
|
|
<td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_bottom.gif\" colspan=\"2\">
|
|
<img height=\"16\" src=\"../images/blank.gif\" width=\"8\"></td>
|
|
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e4.gif\">
|
|
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"> </td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</body>
|
|
</html>";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
if($_POST[user2] != ''){ // Wenn Stud über dropdown gewählt wurde
|
|
$db = dbconnect();
|
|
$result = $db->query("SELECT uid, stg, vorname, nachname
|
|
FROM stud
|
|
WHERE uid ='$_POST[user2]'");
|
|
$row_uid = $result->fetch_array();
|
|
$mtknr=$row_uid[mtknr];
|
|
$uid1=$row_uid[uid];
|
|
}
|
|
|
|
if(isset($_GET["uid"])){
|
|
$uid1=$_GET["uid"];
|
|
|
|
$db = dbconnect();
|
|
$result = $db->query("SELECT uid, stg, vorname, nachname
|
|
FROM stud
|
|
WHERE uid ='$_POST[user2]'");
|
|
$row_uid = $result->fetch_array();
|
|
$mtknr=$row_uid[mtknr];
|
|
}
|
|
|
|
setcookie("ck_uid1","");
|
|
setcookie("ck_uid1",$uid1);
|
|
|
|
setcookie("ck_mtknr","");
|
|
setcookie("ck_mtknr",$mtknr);
|
|
|
|
#if(isset($_GET[mtknr])){ // Bei Quereinsteiger (offene Erstanträge, offene Änderungsanträge)
|
|
# $user = $_GET[mtknr];
|
|
#}
|
|
|
|
$result = $db->query("SELECT uid, stg, vorname, nachname
|
|
FROM stud
|
|
WHERE uid='$uid1'");
|
|
$row_uid = $result->fetch_array();
|
|
$uid1 = $row_uid[uid];
|
|
$stg = $row_uid[stg];
|
|
|
|
|
|
$result = $db->query("SELECT nachname, vorname, postrasse, poplz, poort, stgtext, AG, Jahrgang, mail, mail2, mtknr, stg FROM stud where uid=\"$uid1\"");
|
|
$row = $result->fetch_array();
|
|
echo "
|
|
<html>
|
|
<head>
|
|
<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">
|
|
<link rel=\"stylesheet\" href=\"../styles_pc.css\" type=\"text/css\">
|
|
<script type=\"text/javascript\" src=\"./overlib/overlibmws.js\"><!-- overLIB (c) Erik Bosrup --></script>
|
|
<script type=\"text/javascript\">
|
|
<!--
|
|
OLregisterPlugins('crossframe','iframe','hide','shadow');
|
|
overlib=parent.overlib;
|
|
nd=parent.nd;
|
|
if (typeof window.createPopup!='undefined') {
|
|
var oPopup = window.createPopup();
|
|
var oPopupBody = oPopup.document.body;
|
|
oPopupBody.style.backgroundColor = \"#ccccff\";
|
|
oPopupBody.style.border = \"solid blue 1px\";
|
|
}
|
|
|
|
// -->
|
|
</script>
|
|
<style type=\"text/css\">
|
|
.text_overlib {font-family:Verdana,Arial,sans-serif; font-size:10px;}
|
|
.r{text-decoration: none;font-weight: bold; color: black;}
|
|
.text_overlib {font-family:Verdana,Arial,sans-serif; font-size:10px;}
|
|
</style>
|
|
|
|
|
|
<title>Anträge von $row[vorname] $row[nachname]</title>
|
|
<script language='JavaScript'>
|
|
|
|
function oeffne()
|
|
{
|
|
fenstename = window.open('daten_pruefen_admin.php?uid=$uid1','popup','width=1000,height=770');
|
|
popup.focus();
|
|
}
|
|
|
|
function oeffneaend(a)
|
|
{
|
|
aend = window.open('datenvergleich.php?saaid1='+a,'popup','width=1024,height=400');
|
|
popup.focus();
|
|
}
|
|
|
|
function oeffneerst(a)
|
|
{
|
|
aend = window.open('datenvergleich_erst.php?saaid1='+a,'popup','width=512,height=370');
|
|
popup.focus();
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
</head>
|
|
<body>
|
|
<div id=\"overDiv\" style=\"position: absolute; visibility: hidden; z-index: 1000; left: 10px; top: 0px; background-image: none;\"></div>
|
|
<p>
|
|
<table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" border=\"0\">
|
|
<tr>
|
|
<td width=\"10\" background=\"../images/box_e1.gif\">
|
|
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
|
<td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_top.gif\" valign=\"top\">
|
|
<img height=\"10\" src=\"../images/blank.gif\" width=\"1\"><br>
|
|
<font class=\"hd\">Anträge von $row[vorname] $row[nachname]</font><br>
|
|
<img height=\"5\" src=\"../images/blank.gif\" width=\"1\"></td>
|
|
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e2.gif\">
|
|
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td width=\"1%\" background=\"../images/box_l.gif\">
|
|
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
|
<td>
|
|
<br>
|
|
<p align=center><a href='#' onclick='oeffne()'><img src=\"../images/daten_pruefen_admin.gif\" border='0'></a></p>
|
|
<br>
|
|
<br>
|
|
|
|
<form action="; echo $_SERVER['PHP_SELF'] . "?action=auswert"; echo" method=\"POST\" name=\"auswert\">
|
|
<table border=\"0\" cellpadding=\"4\" cellspacing=\"0\" style=\"border-collapse: collapse\" bordercolor=\"#E7E8ED\" width=\"100%\" id=\"AutoNumber1\">
|
|
<tr>
|
|
<td width=\"40%\" align='left'>
|
|
<b>Ort</b>
|
|
</td>
|
|
<td width=\"10%\" align='left'>
|
|
<b>Status Standort</b>
|
|
</td>
|
|
<td width=\"15%\" align='left'>
|
|
<b>Zeitraum</b>
|
|
</td>
|
|
<td width=\"25%\">
|
|
<p align='left'><b>Zuweisung</b>
|
|
</td>
|
|
<td width=\"10%\">
|
|
<p align='left'><b>Info</b></p>
|
|
</td>
|
|
</tr>
|
|
";
|
|
|
|
############### Daten aufbereiten
|
|
|
|
$result3 = $db->query("SELECT DATE_FORMAT(antrag_von, '%d.%m.%Y') antrag_von, DATE_FORMAT(antrag_bis, '%d.%m.%Y') antrag_bis
|
|
FROM stan_frist
|
|
WHERE jahrgang ='$jahrgang'");
|
|
$row3 = $result3->fetch_array();
|
|
|
|
$result_tmp1 = $db->query("DELETE FROM stan_tmp_check_data WHERE uid='$uid1'");
|
|
|
|
|
|
$result_tmp1 = $db->query("INSERT INTO stan_tmp_check_data
|
|
SELECT t1.saaid
|
|
, t1.vert_bereich
|
|
, t1.uid
|
|
, t1.beginn
|
|
, t1.ende
|
|
, t1.dst_id
|
|
FROM stan_antrag t1
|
|
WHERE t1.status = (
|
|
SELECT MAX(t2.status)
|
|
FROM stan_antrag t2
|
|
WHERE t1.aendid = t2.aendid
|
|
AND t2.status !='2' #hinzugefügt am 10.06.2009, weil Status 2 angezeigt wurde
|
|
)
|
|
AND t1.uid = '$uid1'
|
|
AND (t1.zuweisung is NULL OR t1.zuweisung='Z')
|
|
");
|
|
|
|
|
|
#$result = $db->query("SELECT max(saaid) max_id FROM stan_tmp_check_data WHERE uid='$uid1'");
|
|
#$row4 = $result->fetch_array();
|
|
#$saaid_neu = $row4[max_id] + 1; // Damit alle Einträge eine ID haben
|
|
#$result_tmp1 = $db->query("INSERT INTO stan_tmp_check_data SELECT $saaid_neu, NULL, '$uid1', DATE_SUB(antrag_von, INTERVAL 1 DAY), DATE_SUB(antrag_von, INTERVAL 1 DAY), 'Antragszeitraum Beginn' FROM stan_frist WHERE jahrgang ='$row[Jahrgang]'");
|
|
|
|
#$result = $db->query("SELECT max(saaid) max_id FROM stan_tmp_check_data WHERE uid='$uid1'");
|
|
#$row4 = $result->fetch_array();
|
|
#$saaid_neu = $row4[max_id] + 1; // Damit alle Einträge eine ID haben
|
|
#$result_tmp1 = $db->query("INSERT INTO stan_tmp_check_data SELECT $saaid_neu, NULL, '$uid1', antrag_bis, antrag_bis, 'Antragszeitraum Ende' FROM stan_frist WHERE jahrgang ='$row[Jahrgang]'");
|
|
|
|
$query = "SELECT ma.uid, DATE_FORMAT(beginn, '%d.%m.%Y') beginn, DATE_FORMAT(ende, '%d.%m.%Y') ende, bezeichnung, COALESCE( luecke, 'OK' ) AS Luecke, ma.saaid
|
|
FROM stan_tmp_check_data ma
|
|
LEFT JOIN ( SELECT saaid, 'Lücke folgt' AS luecke
|
|
FROM stan_tmp_check_data a
|
|
WHERE a.ende != (SELECT MAX( ende ) FROM stan_tmp_check_data x WHERE x.uid = a.uid)
|
|
AND NOT EXISTS ( SELECT saaid FROM stan_tmp_check_data b
|
|
WHERE a.uid = b.uid
|
|
AND b.beginn = DATE_ADD( a.ende, INTERVAL 1 DAY )
|
|
)
|
|
OR ( a.beginn IN (select beginn FROM stan_tmp_check_data d WHERE d.saaid != a.saaid)
|
|
AND a.ende IN (select ende FROM stan_tmp_check_data e WHERE e.saaid != a.saaid AND e.uid = '$uid1')
|
|
)
|
|
) L
|
|
ON L.saaid = ma.saaid
|
|
WHERE ma.uid = '$uid1'
|
|
ORDER BY ma.uid, ma.beginn";
|
|
|
|
$result = $db->query($query)
|
|
or die ("Cannot execute query1");
|
|
|
|
while ($row2 = $result->fetch_array()){
|
|
|
|
$result5 = $db->query("SELECT concat(bezeichnung, ' ',name) name, ort
|
|
FROM stan_dienststellen
|
|
WHERE dst_id ='$row2[bezeichnung]'");
|
|
$row5 = $result5->fetch_array();
|
|
|
|
$result6 = $db->query("SELECT bez, ort
|
|
FROM stan_dienststellen_tmp
|
|
WHERE dst_id ='$row2[bezeichnung]'");
|
|
$row6 = $result6->fetch_array();
|
|
|
|
if($row5[name] != '' and $row6[bez] == ''){
|
|
$bezeichnung = $row5[name];
|
|
$ort = $row5[ort];
|
|
}
|
|
|
|
|
|
if($row5[name] == '' and $row6[bez] != ''){
|
|
$bezeichnung = $row6[bez];
|
|
$ort = $row6[ort];
|
|
}
|
|
|
|
if($row5[name] == '' and $row6[bez] == ''){
|
|
$bezeichnung = '<i>Zeitraum vorgemerkt</i>';
|
|
$ort = '';
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$result3art = $db->query("SELECT bezeichnung
|
|
FROM stan_antrag a, stan_stellenart b
|
|
WHERE a.art= b.artid
|
|
AND saaid='$row2[saaid]'");
|
|
$row3art = $result3art->fetch_array();
|
|
|
|
|
|
|
|
|
|
echo"
|
|
<tr>
|
|
<td align='left' width=\"40%\" style=\"border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1px\">";
|
|
$titel = "Nicht zugewiesen";
|
|
$text = "$row3art[bezeichnung]";
|
|
|
|
if($ort!=''){
|
|
$bez_neu= "$bezeichnung in $ort";
|
|
}else{
|
|
$bez_neu= "$bezeichnung";
|
|
}
|
|
$bez_dst="<a href='".$_SERVER['PHP_SELF'] ."?action=bearb&saaid=$row2[saaid]' onmouseover=\"return overlib('$text',ABOVE, TEXTFONTCLASS,'text_overlib', WIDTH, 350, CAPTION, '$titel',CAPTIONSIZE, '10px');\" onmouseout=\"nd();\">$bez_neu</a>";
|
|
|
|
echo"
|
|
$bez_dst
|
|
</td>
|
|
<td align='left' width=\"10%\" style=\"border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1px\">";
|
|
|
|
$block = get_block($row2[saaid], $jahrgang);
|
|
|
|
$result_zuw0 = $db->query("SELECT 1,wagsid
|
|
FROM stan_ag_standort_wunsch
|
|
WHERE block ='$block'
|
|
AND uid= '$row2[uid]'
|
|
AND prio='0'");
|
|
$row_zuw0 = $result_zuw0->fetch_array();
|
|
|
|
$result_zuw1 = $db->query("SELECT 1,wagsid
|
|
FROM stan_ag_standort_wunsch
|
|
WHERE block ='$block'
|
|
AND uid= '$row2[uid]'
|
|
AND prio='1'");
|
|
|
|
$row_zuw1 = $result_zuw1->fetch_array();
|
|
|
|
$result_zuw2 = $db->query("SELECT 1,wagsid
|
|
FROM stan_ag_standort_wunsch
|
|
WHERE block ='$block'
|
|
AND uid= '$row2[uid]'
|
|
AND prio='2'");
|
|
$row_zuw2 = $result_zuw2->fetch_array();
|
|
|
|
|
|
|
|
if($row_zuw0[0] == '' AND $row_zuw1[0] == ''){
|
|
$status='Nicht erfasst durch Student';
|
|
# $zuw_sperre='X';
|
|
# $zuw_alle_sperre='X';
|
|
}
|
|
|
|
if($row_zuw0[0] == '' AND $row_zuw1[0] == '1'){
|
|
|
|
|
|
$result_standort1 = $db->query("SELECT standort, block, abdatum, pendler
|
|
FROM stan_ag_standort a, stan_standort b
|
|
WHERE a.sid=b.sid
|
|
AND a.agsid ='$row_zuw1[wagsid]'");
|
|
|
|
$row_s1 = $result_standort1->fetch_array();
|
|
|
|
|
|
$result_standort2 = $db->query("SELECT standort, block, abdatum, pendler
|
|
FROM stan_ag_standort a, stan_standort b
|
|
WHERE a.sid=b.sid
|
|
AND a.agsid ='$row_zuw2[wagsid]'");
|
|
$row_s2 = $result_standort2->fetch_array();
|
|
|
|
if($row_zuw1[wagsid] == '8888'){
|
|
$standort1="Stelle außerhalb BWs";
|
|
}else{
|
|
$standort1="$row_s1[standort] (Block $row_s1[block]) ab $row_s1[abdatum] ($row_s1[pendler])";
|
|
}
|
|
|
|
if($row_zuw2[wagsid] == '9999'){
|
|
$standort2="Stelle außerhalb BWs";
|
|
}else{
|
|
$standort2="$row_s2[standort] (Block $row_s2[block]) ab $row_s2[abdatum] ($row_s2[pendler])";
|
|
}
|
|
|
|
$titel = "Nicht zugewiesen";
|
|
$text = "Priorität 1: $standort1<br>Priorität 2: $standort2";
|
|
|
|
$status="<a href=\"sozuweisung.php?action=bearbeiten&agsid=$row_zuw1[wagsid]\" onmouseover=\"return overlib('$text',ABOVE, TEXTFONTCLASS,'text_overlib', WIDTH, 350, CAPTION, '$titel',CAPTIONSIZE, '10px');\" onmouseout=\"nd();\">$titel</a>";
|
|
|
|
#Wenn Student nicht dem Standort zugewiesen ist, dann darf man nicht zuweisen
|
|
# Entfällt für Jahrgang 2008, da in den Zuweisungsschreiben der AG-Standort nicht mitausgegeben wird
|
|
# $zuw_sperre='X';
|
|
# $zuw_alle_sperre='X';
|
|
}
|
|
|
|
if($row_zuw0[0] == '1' AND $row_zuw1[0] == '1'){
|
|
|
|
$result_standort0 = $db->query("SELECT standort
|
|
FROM stan_ag_standort a, stan_standort b
|
|
WHERE a.sid=b.sid
|
|
AND a.agsid ='$row_zuw0[wagsid]'");
|
|
$row_s0 = $result_standort0->fetch_array();
|
|
|
|
$standort0=$row_s0[standort];
|
|
$titel = "zugewiesen";
|
|
$text = "Zuweisung: $standort0";
|
|
|
|
$status="<a href=\"#\" onmouseover=\"return overlib('$text',ABOVE, TEXTFONTCLASS,'text_overlib', WIDTH, 350, CAPTION, '$titel',CAPTIONSIZE, '10px');\" onmouseout=\"nd();\">$titel</a>";
|
|
}
|
|
|
|
echo"
|
|
$status
|
|
</td>
|
|
<td align='left' width=\"15%\" style=\"border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1px\">
|
|
$row2[beginn] - $row2[ende]
|
|
</td>
|
|
<td align='left' valign=\"middle\" width=\"25%\" style=\"border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1px\">
|
|
<p align=\"left\">
|
|
";
|
|
|
|
$result1 = $db->query("SELECT zuweisung
|
|
FROM stan_antrag
|
|
WHERE saaid ='$row2[saaid]'");
|
|
$zuw_vorh = $result1->fetch_array(); // Prüfen ob schon zugewiesen
|
|
|
|
|
|
if ($zuw_vorh[zuweisung] == 'Z'){
|
|
|
|
$result1 = $db->query("SELECT 1
|
|
FROM stan_antrag
|
|
WHERE saaid ='$row2[saaid]'
|
|
AND status='1'");
|
|
$aend_vorh = $result1->fetch_array(); // Prüfen ob schon Änderungsanträge vorhanden
|
|
if($aend_vorh[0] == '1'){
|
|
# Wenn Änderungsantrag vorhanden, dann prüfen, ob die Stelle noch dem Vertiefungsbereich entspricht, wo der AG-Standort gewählt wurde
|
|
# Vorgehensweise:
|
|
# 1) Welche Stelle wurde in Prio0 bzw 1 in diesem Block gewählt(Immer Prio0 wenn nicht gesetzt, dann Prio1)
|
|
# 2) Welchen VT-Bereich hat die Stelle in Prio0 bzw 1
|
|
# 3) In welchem VT-Bereich ist die aktuelle Stelle
|
|
# 4) Sind die VT-Bereich unterschiedlich?
|
|
# Wenn ja, dann Warntext mit Hinweis, wo die Stelle gerade zugewiesen ist
|
|
# Wenn nicht unterschiedlich, dann Button anzeigen.
|
|
|
|
#1
|
|
$block_cur= get_block($row2[saaid], $jahrgang);
|
|
$result1 = $db->query("SELECT prio0, prio1
|
|
FROM stan_ag_wunsch_vw
|
|
WHERE uid= '$row2[uid]'
|
|
AND block='$block_cur'");
|
|
$row_standort = $result1->fetch_array();
|
|
|
|
if($row_standort[prio0] == NULL OR $row_standort[prio0] == ''){
|
|
$stelle_ag_standort = $row_standort[prio1];
|
|
}else{
|
|
$stelle_ag_standort = $row_standort[prio0];
|
|
}
|
|
|
|
#2
|
|
$result3 = $db->query("SELECT a.vbid, standort, block, abdatum, pendler, bezeichnung
|
|
FROM stan_ag_standort a, stan_standort b, stan_vertiefungsbereich c
|
|
WHERE a.sid = b.sid
|
|
AND a.vbid=c.vbid
|
|
AND a.agsid='$stelle_ag_standort'");
|
|
$row3 = $result3->fetch_array();
|
|
|
|
#3
|
|
$result4 = $db->query("SELECT vert_bereich, bezeichnung
|
|
FROM stan_antrag a, stan_vertiefungsbereich b
|
|
WHERE a.vert_bereich = b.vbid
|
|
AND a.saaid='$row2[saaid]'");
|
|
|
|
$row4 = $result4->fetch_array();
|
|
|
|
if($row4[vert_bereich] != $row3[vbid] AND $stelle_ag_standort != '' AND $stelle_ag_standort != '8888' AND $stelle_ag_standort != '9999'){
|
|
# Vertiefungsbereich wurde geändert
|
|
#$zuw_alle_sperre ='X';
|
|
|
|
$text= "Der Student hat seinen AG-Standort noch im alten Vertiefungsbereich!<br>Bitte weisen Sie den AG-Standort neu zu.<br><br>Vertiefungsbereich alt: $row3[bezeichnung]<br>Vertiefungsbereich neu: $row4[bezeichnung]<br><br>Aktueller Standort: $row3[standort] (Block $row3[block]) ab $row3[abdatum] ($row3[pendler])";
|
|
$titel = "Hinweis";
|
|
echo "<a href=\"sozuweisung.php\" onmouseover=\"return overlib('$text',ABOVE, TEXTFONTCLASS,'text_overlib', WIDTH, 500, CAPTION, '$titel',CAPTIONSIZE, '10px');\" onmouseout=\"nd();\">$titel</a>";
|
|
echo " <br><br>";
|
|
echo"<img title = \"Stelle zuwgewiesen\"border=\"0\" src=\"../images/zugewiesen.gif\">";
|
|
}else{
|
|
# Vertiefungsbereich wurde nicht geändert
|
|
echo"<img title = \"Stelle zuwgewiesen\"border=\"0\" src=\"../images/zugewiesen.gif\">";
|
|
}
|
|
}else{
|
|
echo"<img title = \"Stelle zuwgewiesen\"border=\"0\" src=\"../images/zugewiesen.gif\">";
|
|
}
|
|
|
|
}else{
|
|
if($zuw_sperre !='X'){; // Wennn der Standort nicht zugewiesen dann ausblenden
|
|
|
|
|
|
$result1 = $db->query("SELECT 1
|
|
FROM stan_antrag
|
|
WHERE saaid ='$row2[saaid]'
|
|
AND status='1'");
|
|
$aend_vorh = $result1->fetch_array(); // Prüfen ob schon Änderungsanträge vorhanden
|
|
if($aend_vorh[0] == '1'){
|
|
# Wenn Änderungsantrag vorhanden, dann prüfen, ob die Stelle noch dem Vertiefungsbereich entspricht, wo der AG-Standort gewählt wurde
|
|
# Vorgehensweise:
|
|
# 1) Welche Stelle wurde in Prio0 bzw 1 in diesem Block gewählt(Immer Prio0 wenn nicht gesetzt, dann Prio1)
|
|
# 2) Welchen VT-Bereich hat die Stelle in Prio0 bzw 1
|
|
# 3) In welchem VT-Bereich ist die aktuelle Stelle
|
|
# 4) Sind die VT-Bereich unterschiedlich?
|
|
# Wenn ja, dann Warntext mit Hinweis, wo die Stelle gerade zugewiesen ist
|
|
# Wenn nicht unterschiedlich, dann Button anzeigen.
|
|
|
|
#1
|
|
$block_cur= get_block($row2[saaid], $jahrgang);
|
|
$result1 = $db->query("SELECT prio0, prio1
|
|
FROM stan_ag_wunsch_vw
|
|
WHERE uid= '$row2[uid]'
|
|
AND block='$block_cur'");
|
|
$row_standort = $result1->fetch_array();
|
|
|
|
if($row_standort[prio0] == NULL OR $row_standort[prio0] == ''){
|
|
$stelle_ag_standort = $row_standort[prio1];
|
|
}else{
|
|
$stelle_ag_standort = $row_standort[prio0];
|
|
}
|
|
|
|
#2
|
|
$result3 = $db->query("SELECT a.vbid, standort, block, abdatum, pendler, bezeichnung
|
|
FROM stan_ag_standort a, stan_standort b, stan_vertiefungsbereich c
|
|
WHERE a.sid = b.sid
|
|
AND a.vbid=c.vbid
|
|
AND a.agsid='$stelle_ag_standort'");
|
|
$row3 = $result3->fetch_array();
|
|
|
|
#3
|
|
$result4 = $db->query("SELECT vert_bereich, bezeichnung
|
|
FROM stan_antrag a, stan_vertiefungsbereich b
|
|
WHERE a.vert_bereich = b.vbid
|
|
AND a.saaid='$row2[saaid]'");
|
|
|
|
$row4 = $result4->fetch_array();
|
|
|
|
if($row4[vert_bereich] != $row3[vbid] AND $stelle_ag_standort != '' AND $stelle_ag_standort != '8888' AND $stelle_ag_standort != '9999'){
|
|
# Vertiefungsbereich wurde geändert
|
|
#$zuw_alle_sperre ='X';
|
|
|
|
$text= "Der Student hat seinen AG-Standort noch im alten Vertiefungsbereich!<br>Bitte weisen Sie den AG-Standort neu zu.<br><br>Vertiefungsbereich alt: $row3[bezeichnung]<br>Vertiefungsbereich neu: $row4[bezeichnung]<br><br>Aktueller Standort: $row3[standort] (Block $row3[block]) ab $row3[abdatum] ($row3[pendler])";
|
|
$titel = "Hinweis | $row4[vert_bereich] != $row3[vbid]";
|
|
echo "<a href=\"sozuweisung.php\" onmouseover=\"return overlib('$text',ABOVE, TEXTFONTCLASS,'text_overlib', WIDTH, 500, CAPTION, '$titel',CAPTIONSIZE, '10px');\" onmouseout=\"nd();\">$titel</a>";
|
|
echo " <br><br>";
|
|
echo "<a href=".$_SERVER['PHP_SELF'] ."?action=einzelzuw&saaid=$row2[saaid]><img title = \"Stelle zuweisen\"border=\"0\" src=\"../images/zuweisen.gif\"></a>";
|
|
|
|
|
|
}else{
|
|
# Vertiefungsbereich wurde nicht geändert
|
|
echo "<a href=".$_SERVER['PHP_SELF'] ."?action=einzelzuw&saaid=$row2[saaid]><img title = \"Stelle zuweisen\"border=\"0\" src=\"../images/zuweisen.gif\"></a>";
|
|
}
|
|
|
|
|
|
}else{
|
|
# Kein Änderungsantrag
|
|
echo "<a href=".$_SERVER['PHP_SELF'] ."?action=einzelzuw&saaid=$row2[saaid]><img title = \"Stelle zuweisen\"border=\"0\" src=\"../images/zuweisen.gif\"></a>";
|
|
}
|
|
|
|
|
|
}else{
|
|
echo "<img title = \"Stelle zuweisen\"border=\"0\" src=\"../images/zuweisen_grey.gif\">";
|
|
}
|
|
}
|
|
|
|
|
|
echo"
|
|
</td>
|
|
<td width=\"10%\" style=\"border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1px\">
|
|
";
|
|
|
|
$result1 = $db->query("SELECT 1
|
|
FROM stan_antrag
|
|
WHERE saaid ='$row2[saaid]'
|
|
AND status='1'");
|
|
$aend_vorh = $result1->fetch_array(); // Prüfen ob schon Änderungsanträge vorhanden
|
|
if($aend_vorh[0] == '1'){
|
|
echo "<p align=left><a href='#' onclick='oeffneaend($row2[saaid])'><img src=\"../images/i.jpg\" border='0'>ÄA</a></p>";
|
|
}else{
|
|
echo "<p align=left><a href='#' onclick='oeffneerst($row2[saaid])'><img src=\"../images/i.jpg\" border='0'></a></p>";
|
|
}
|
|
echo"
|
|
|
|
</td>
|
|
</tr>
|
|
";
|
|
|
|
$result_zuw = $db->query("SELECT zuweisung
|
|
FROM stan_antrag
|
|
WHERE saaid ='$row2[saaid]'");
|
|
$row_zuw = $result_zuw->fetch_array(); // Prüfen ob schon Änderungsanträge vorhanden
|
|
|
|
## Wenn mindest eine Stelle nicht bereits zugewiesen, dann muss der "Alle zuweisen" button aktiv sein
|
|
if($row_zuw[zuweisung] != 'Z'){
|
|
$alle_zuw_aktiv = '1';
|
|
}
|
|
|
|
|
|
# Buttonstatus vor der Schleife zurücksetzen
|
|
$zuw_sperre ='';
|
|
|
|
|
|
} // Ende While
|
|
|
|
|
|
echo "
|
|
</table>
|
|
<br>
|
|
<br>
|
|
";
|
|
$res_ausn= $db->query("SELECT 1
|
|
FROM stan_ausnahme
|
|
WHERE uid ='$uid1'");
|
|
$row_ausn = $res_ausn->fetch_array(); // Prüfen ob schon Änderungsanträge vorhanden
|
|
if($row_ausn[0] == '1'){
|
|
echo "<p align='center'><font color='red'><b>Student hat eine Ausnahmeregelung!</b></font></p>";
|
|
}
|
|
echo"
|
|
<hr style='color:blue;'>
|
|
Optionen:
|
|
<p align='center'>
|
|
<br>
|
|
<a href=".$_SERVER['PHP_SELF'] ."?action=mail><img title = \"Mail an Student\"border=\"0\" src=\"../images/mail.png\"></a>
|
|
";
|
|
|
|
if($alle_zuw_aktiv == '1'){
|
|
|
|
if($zuw_alle_sperre !='X'){ //Wenn ein Standort nicht zugewiesen, dann button ausblenden
|
|
echo"<a href=".$_SERVER['PHP_SELF'] ."?action=allezuw><img title = \"Alle zuweisen\"border=\"0\" src=\"../images/alle_zuweisen.gif\"></a>";
|
|
}else{
|
|
echo"<img title = \"Alle zuweisen\"border=\"0\" src=\"../images/alle_zuweisen_grey.gif\">";
|
|
}
|
|
}else{
|
|
echo"<img title = \"Alle zuweisen\"border=\"0\" src=\"../images/alle_zuweisen_grey.gif\">";
|
|
}
|
|
|
|
echo"
|
|
</p>
|
|
|
|
</td>
|
|
<td width=\"1%\" background=\"../images/box_r.gif\">
|
|
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
|
</tr>
|
|
<tr>
|
|
<td nowrap=\"nowrap\" align=\"left\" width=\"1%\" background=\"../images/box_e3.gif\">
|
|
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"></td>
|
|
<td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_bottom.gif\">
|
|
<img height=\"16\" src=\"../images/blank.gif\" width=\"8\"></td>
|
|
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e4.gif\">
|
|
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"> </td>
|
|
</tr>
|
|
</table>
|
|
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
";
|
|
|
|
$result_tmp1 = $db->query("DELETE FROM stan_tmp_check_data WHERE uid='$uid1'");
|
|
|
|
break;
|
|
case "einzelzuw":
|
|
|
|
|
|
|
|
|
|
/*
|
|
Möglichkeiten, die beim bearbeiten vorkommen können
|
|
|
|
1) Erstantrag soll zugewiesen werden:
|
|
Datenbankfelder: status=0 zuweisung 'is null', saaid=aendid
|
|
wenn ja, dann status=0,zuweisung='Z'
|
|
--> Schreiben an Student, Schreiben an Dienststelle Erstantrag
|
|
|
|
2) Änderungsantrag soll zugewiesen werden, Erstantrag wurde aber noch nicht zugewiesen:
|
|
Datenbankfelder: status=1 zuweisung 'is null'
|
|
prüfen ob ein anderer Antrag mit derselben Änderungsid vorhanden ist bei der die saaid = aendid (= Erstantrag) ist UND status=0+zuweisung 'is null'.
|
|
wenn ja, dann status änderungsantrag='1', zuweisung='Z'
|
|
, status nicht zugewiesener Erstantrag='0', zuweisung='E' (Erledigt)
|
|
--> Schreiben an Student, Schreiben an Diensstelle vom Änderungsantrag
|
|
|
|
3) Änderungsantrag soll zugewiesen werden, zugewiesener Erstantrag vorhanden:
|
|
Datenbankfelder: status=1, zuweisung 'is null'
|
|
prüfen, ob ein anderer Antrag mit derselben Änderungsid vorhanden ist bei der die saaid = aendid (Erstantrag) UND status=0+zuweisung='Z'
|
|
wenn ja, dann status änderungsantrag='1', zuweisung='Z'
|
|
, status zugewiesener Erstantrag='0', zuweisung='E' (Erledigt, für Zukunft nicht mehr relevant)
|
|
--> Schreiben an Student, Schreiben an Dienststelle Änderungsantrag, Schreiben an Dienststelle Erstantrag
|
|
|
|
4) Änderungsantrag soll zugewiesen werden, bereits zugewiesener Änderungsantrag ist vorhanden
|
|
Datenbankfelder: status=1, zuweisung 'is null'
|
|
prüfen, ob ein anderer Antrag mit derselben Änderungsid vorhanden ist mit status='1'+zuweisung='AE'
|
|
wenn ja, dann status änderungsantrag='1', zuweisung='Z'
|
|
, status zugewiesener ÄA='1', zuweisung='E' (Erledigt, für Zukunft nicht mehr relevant)
|
|
--> Schreiben an Student, Schreiben an Dienststelle Änderungsantrag, Schreiben an Dienststelle bisheriger Änderungsantrag
|
|
|
|
5) Neuer Datensatz (auf unbelegter Position) im Änderungsantrag
|
|
Datenbankfelder: status=1, zuweisung 'is null', saaid=aendid
|
|
status änderungsantrag='1', zuweisung='Z'
|
|
--> Schreiben an Student, Schreiben an Dienststelle Änderung(erst)santrag
|
|
|
|
|
|
|
|
Folgende Möglichkeiten können nicht auftreten:
|
|
zwei erstanträge auf derselben position. Beim abschicken der Vormerkung löscht der Student automatisch den bereits vorhanden nicht zugewiesenen Erstantrag
|
|
zwei Änderungsanträge auf derselben position, die nicht zugewiesen sind. Der Student löscht einen Änderungsantrag, wenn er einen neuen auf der Position stellt, den der Administrator nicht "angefasst" hat.
|
|
|
|
Bemerkungen:
|
|
Wird ein Änderungsantrag gestellt und ein zugewiesener Änderungsantrag ist vorhanden, bekommt der bisherige Änderungsantrag die Zuweisung='AE'.
|
|
Dies wird autoamtisch durch das Abschicken des Änderungsantrags vom Student gemacht.
|
|
*/
|
|
|
|
$saaid=$_GET["saaid"];
|
|
$uid1 =$_COOKIE["ck_uid1"];
|
|
|
|
|
|
$resultakt = $db->query("SELECT saaid, aendid, status, zuweisung, uid, dst_id
|
|
FROM stan_antrag
|
|
WHERE saaid ='$saaid'
|
|
");
|
|
$row_akt = $resultakt->fetch_array(); // Prüfen ob schon Änderungsanträge vorhanden
|
|
|
|
|
|
|
|
$res_alt = $db->query("SELECT saaid, aendid, status, zuweisung, dst_id
|
|
FROM stan_antrag
|
|
WHERE saaid<'$saaid'
|
|
AND aendid='$row_akt[aendid]'
|
|
ORDER BY saaid DESC
|
|
LIMIT 1");
|
|
$row_alt = $res_alt->fetch_array();
|
|
|
|
$zuweis_dat = $datum=date("Y-m-d H:i:s");
|
|
|
|
|
|
if($row_akt[zuweisung] != 'Z'){
|
|
|
|
$db = dbconnect();
|
|
# Step 1
|
|
# Neuer Erstantrag zuweisen
|
|
|
|
|
|
if($row_akt[status] == '0' AND $row_akt[zuweisung] == NULL AND $row_akt[saaid] == $row_akt[aendid]){
|
|
echo "1<br>";
|
|
$db->query("UPDATE stan_antrag
|
|
SET zuweisung='Z'
|
|
, zuweis_dat='$zuweis_dat'
|
|
WHERE saaid='$row_akt[saaid]'");
|
|
# --> Schreiben an Student, Schreiben an Dienststelle Erstantrag
|
|
printqueue_antrag($row_akt[saaid], 'EZS', 'Erstantrag zugewiesen an Student', $user_admin, $hs, 1);
|
|
printqueue_antrag($row_akt[saaid], 'EZP', 'Erstantrag zugewiesen an Praxisstelle', $user_admin, $hs, 2);
|
|
}
|
|
# Step 1 Ende
|
|
|
|
|
|
# Step 2
|
|
# Änderungsantrag zuweisen mit nicht zugewisenem Erstantrag
|
|
if($row_akt[status] == '1' AND $row_akt[zuweisung] == NULL AND $row_akt[aendid] == $row_alt[aendid] AND $row_alt[saaid]== $row_alt[aendid] AND $row_alt[status] =='0' AND $row_alt[zuweisung] == NULL){
|
|
echo "2<br>";
|
|
# Änderungsantrag zuweisen
|
|
$db->query("UPDATE stan_antrag
|
|
SET zuweisung='Z'
|
|
, zuweis_dat='$zuweis_dat'
|
|
WHERE saaid='$row_akt[saaid]'");
|
|
|
|
# Nicht zugewiesener Erstantrag auf Erledigt setzen
|
|
$db->query("UPDATE stan_antrag
|
|
SET zuweisung='E'
|
|
, zuweis_dat='$zuweis_dat'
|
|
WHERE saaid='$row_alt[saaid]'");
|
|
# --> Schreiben an Student, Schreiben an Dienststelle Änderungsantrag
|
|
printqueue_antrag($row_akt[saaid], 'EZS', 'Änderungsantrag zugewiesen an Student ohne zugewiesenem Erstantrag', $user_admin, $hs, 1);
|
|
printqueue_antrag($row_akt[saaid], 'EZP', 'Änderungsantrag zugewiesen an Praxisstelle ohne zugewiesenem Erstantrag', $user_admin, $hs, 2);
|
|
|
|
|
|
}
|
|
# Step 2 Ende
|
|
|
|
# Step 3
|
|
# Änderungsantrag mit zugewiesenem Erstantrag
|
|
if($row_akt[status] == '1' AND $row_akt[zuweisung] == NULL AND $row_akt[aendid] == $row_alt[aendid] AND $row_alt[saaid]== $row_alt[aendid] AND $row_alt[status] =='0' AND $row_alt[zuweisung] == 'Z'){
|
|
echo "3<br>";
|
|
# Änderungsantrag zuweisen
|
|
$db->query("UPDATE stan_antrag
|
|
SET zuweisung='Z'
|
|
, zuweis_dat='$zuweis_dat'
|
|
WHERE saaid='$row_akt[saaid]'");
|
|
|
|
# Nicht zugewiesener Erstantrag auf Erledigt setzen
|
|
$db->query("UPDATE stan_antrag
|
|
SET zuweisung='EZ'
|
|
WHERE saaid='$row_alt[saaid]'");
|
|
# --> Schreiben an Student, Schreiben an Dienststelle Änderungsantrag, Schreiben an Dienststelle Erstantrag
|
|
|
|
printqueue_antrag($row_akt[saaid], 'AES', 'Änderungsschreiben an Student mit zugewiesenem Erstantrag', $user_admin, $hs, 1);
|
|
printqueue_antrag($row_akt[saaid], 'AEP', 'Änderungsschreiben an Praxisstelle mit zugewiesenem Erstantrag', $user_admin, $hs, 2);
|
|
if($row_akt[dst_id] != $row_alt[dst_id]){ //wenn sich Dienststelle ändert, dann zusätzlich eine Neuzuweisung
|
|
printqueue_antrag($row_akt[saaid], 'EZP', 'Erstantrag an Praxisstelle nach Änderungsantrag', $user_admin, $hs, 3);
|
|
}
|
|
$saaid_cur = $row_akt[saaid];
|
|
}
|
|
# Step 3 Ende
|
|
|
|
# Step 4
|
|
# Änderunstantrag mit zugewisenem Änderungsantrag
|
|
|
|
if($row_akt[status] == '1' AND $row_akt[zuweisung] == NULL AND $row_akt[aendid] == $row_alt[aendid] AND $row_alt[status] =='1' AND $row_alt[zuweisung] == 'AE'){
|
|
echo "4<br>";
|
|
# Änderungsantrag zuweisen
|
|
$db->query("UPDATE stan_antrag
|
|
SET zuweisung='Z'
|
|
, zuweis_dat='$zuweis_dat'
|
|
WHERE saaid='$row_akt[saaid]'");
|
|
|
|
# Nicht zugewiesener Erstantrag auf Erledigt setzen
|
|
|
|
$db->query("UPDATE stan_antrag
|
|
SET zuweisung='EZ'
|
|
WHERE saaid='$row_alt[saaid]'");
|
|
# --> Schreiben an Student, Schreiben an Dienststelle aktueller Änderungsantrag, Schreiben an Dienststelle bisheriger Änderungsantrag
|
|
printqueue_antrag($row_akt[saaid], 'AES', 'Änderungsschreiben an Student mit zugewiesenem Änderungsantrag', $user_admin, $hs, 1);
|
|
printqueue_antrag($row_akt[saaid], 'AEP', 'Änderungsschreiben an Praxisstelle mit zugewiesenem Änderungsantrag', $user_admin, $hs, 2);
|
|
if($row_akt[dst_id] != $row_alt[dst_id]){ //wenn sich Dienststelle ändert, dann zusätzlich eine Neuzuweisung
|
|
printqueue_antrag($row_akt[saaid], 'EZP', 'Erstantrag an Praxisstelle nach zugewiesenem Änderungsantrag', $user_admin, $hs, 3);
|
|
}
|
|
|
|
$saaid_cur = $row_akt[saaid];
|
|
}
|
|
# Step 4 Ende
|
|
|
|
# Step 5
|
|
# Neuer Änderunstantrag auf neuer Position
|
|
if($row_akt[status] == '1' AND $row_akt[zuweisung] == NULL AND $row_akt[saaid] == $row_akt[aendid]){
|
|
echo "5<br>";
|
|
$db->query("UPDATE stan_antrag
|
|
SET zuweisung='Z'
|
|
, zuweis_dat='$zuweis_dat'
|
|
WHERE saaid='$row_akt[saaid]'");
|
|
## Delete wird nur bei alle zuweisen funktionieren. dann wird versehentlich eine Erstzuweisung zuviel ausgedruckt.
|
|
## An die ursprüngliche Stelle geht dann eine Zuweisung und eine Änderung, obwohl sie nur eine Änderung bekommen dürfte
|
|
## Zur Lösung bei step 3und4 eine if abfrage der bei ÄÄ auf neuer pos fall das ezp weglässt.
|
|
/*
|
|
Testsatz: Bei alle zuweisen ists korrekt, weil da die var $saaid_cur gesesetzt wird in der Schleife
|
|
INSERT INTO `stan_antrag` (`saaid`, `uid`, `pos`, `vert_bereich`, `art`, `dst_id`, `beginn`, `ende`, `abteilung`, `tel_abteilung`, `aendid`, `aend_dat`, `status`, `zuweisung`, `zuweis_dat`, `bearbeitung`) VALUES
|
|
(1, 'schwaral', '1', 5, 2, 116076, '2009-07-15', '2009-11-30', 'test2', '', 1, '2009-04-22 11:16:19', '0', 'Z', '0000-00-00 00:00:00', 'N'),
|
|
(2, 'schwaral', '4', 3, 4, 116, '2009-12-01', '2010-01-31', '', '', 2, '2009-04-22 11:16:19', '0', 'Z', '0000-00-00 00:00:00', 'N'),
|
|
(3, 'schwaral', '7', 2, 4, 119, '2010-02-01', '2010-05-31', '', '', 3, '2009-04-22 11:16:19', '0', 'Z', '0000-00-00 00:00:00', 'N'),
|
|
(4, 'schwaral', '10', 4, 2, 116019, '2010-06-01', '2010-09-14', '', '', 4, '2009-04-22 11:16:19', '0', 'Z', '0000-00-00 00:00:00', 'N'),
|
|
(35, 'schwaral', '1', 5, 2, 116076, '2009-07-15', '2009-09-30', 'test2', '', 1, '2009-05-06 15:05:59', '1', NULL, '0000-00-00 00:00:00', 'N'),
|
|
(36, 'schwaral', '2', 5, 2, 116050, '2009-10-01', '2009-11-30', '', '', 36, '2009-05-06 15:05:59', '1', NULL, '0000-00-00 00:00:00', 'N');
|
|
|
|
*/
|
|
$db->query("DELETE FROM stan_printqueue_antrag
|
|
WHERE saaid = '$saaid_cur'
|
|
AND zuweisung in ('EZP')");
|
|
# --> Schreiben an Student, Schreiben an Dienststelle Änderungsantrag
|
|
printqueue_antrag($row_akt[saaid], 'AES', 'Änderungsschreiben an Student: Neuer Datensatz auf Position vorhanden', $user_admin, $hs, 1);
|
|
printqueue_antrag($row_akt[saaid], 'EZP', 'Zuweisungsschreben an Praxisstelle: Neuer Datensatz', $user_admin, $hs, 4);
|
|
|
|
|
|
}
|
|
# Step 5 Ende
|
|
} // Ende IF: Wenn Aktuelle Stelle bereits zugewiesen ist. if($row_akt[zuweisung] != 'Z'){
|
|
|
|
|
|
echo "
|
|
<html>
|
|
<head>
|
|
<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">
|
|
<link rel=\"stylesheet\" href=\"../styles_pc.css\" type=\"text/css\">
|
|
<title>Falsches Datum</title>
|
|
</head>
|
|
<body>
|
|
<table border=\"0\" style=\"border-collapse: collapse\" width=\"100%\" cellpadding=\"0\" height=\"100%\" id=\"table1\">
|
|
<tr>
|
|
<td>
|
|
<div align=\"center\">
|
|
<table cellspacing=\"0\" cellpadding=\"0\" width=\"550\" border=\"0\">
|
|
<tr>
|
|
<td width=\"10\" background=\"../images/box_e1.gif\">
|
|
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
|
<td nowrap=\"nowrap\" align=\"left\" width=\"3%\" background=\"../images/box_top.gif\" valign=\"top\"></td>
|
|
<td width=\"95%\" background=\"../images/box_top.gif\">
|
|
<img height=\"10\" src=\"../images/blank.gif\" width=\"1\"><br>
|
|
<span class=\"sh\">Druck der Anschreiben</span><br>
|
|
<img height=\"5\" src=\"../images/blank.gif\" width=\"1\"></td>
|
|
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e2.gif\">
|
|
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
|
</tr>
|
|
<tr>
|
|
<td width=\"1%\" background=\"../images/box_l.gif\">
|
|
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
|
<td colspan=\"2\"><br>
|
|
<p align=\"center\">Bitte weisen Sie dem Student zuerst alle Anträge zu bevor Sie den Druck starten, damit auf der Zuweisung des Studenten alle Anträge aufgelistet werden<br><br></p>";
|
|
$queryb = $db->query ("SELECT count(a.saaid) Anz
|
|
FROM stan_printqueue_antrag a, stan_antrag b, stud c
|
|
WHERE a.saaid=b.saaid
|
|
AND b.uid=c.uid
|
|
AND b.uid='$row_akt[uid]'
|
|
AND druckstatus ='N'");
|
|
$row_cur_uid_anz = $queryb->fetch_array();
|
|
if($row_cur_uid_anz[Anz] > 0){
|
|
$queryc = $db->query ("SELECT hs
|
|
FROM stud
|
|
WHERE uid='$row_akt[uid]'");
|
|
$row_cur_hs = $queryc->fetch_array();
|
|
|
|
if($row_cur_hs[hs] == 'K' or $row_cur_hs[hs] == 'k'){
|
|
echo "Dokument: <a href='pdf_gen_kehl.php?uid=$row_akt[uid]' target='_blank'>drucken</a><br><br>";
|
|
}else{
|
|
echo "Dokument: <a href='pdf_gen.php?uid=$row_akt[uid]' target='_blank'>drucken</a><br><br>";
|
|
}
|
|
}else{
|
|
echo "Dokument: Alle Dokumente bereits gedruckt<br><br>";
|
|
}
|
|
|
|
echo"
|
|
<a href='bearbeiten.php?action=ubersicht&uid=$row_akt[uid]'>Zurück zum Student</a><br><br>
|
|
<a href='bearbeiten.php'>Zurück zur Studentzuweisung</a><br>
|
|
|
|
|
|
</p>
|
|
<p></p>
|
|
<p></p>
|
|
<p></p>
|
|
<p></p>
|
|
<p><br>
|
|
</p>
|
|
</td>
|
|
<td width=\"1%\" background=\"../images/box_r.gif\">
|
|
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
|
</tr>
|
|
<tr>
|
|
<td nowrap=\"nowrap\" align=\"left\" width=\"1%\" background=\"../images/box_e3.gif\">
|
|
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"></td>
|
|
<td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_bottom.gif\" colspan=\"2\">
|
|
<img height=\"16\" src=\"../images/blank.gif\" width=\"8\"></td>
|
|
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e4.gif\">
|
|
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"> </td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</body>
|
|
</html>";
|
|
|
|
break;
|
|
case "allezuw":
|
|
|
|
$uid1 =$_COOKIE["ck_uid1"];
|
|
|
|
## Gleicher Vorgang wie oben, erst mal alle aktuellen Datensätze selektieren, wie in der Übersicht
|
|
## In der While Schleife dann die Statements von der Einzelzuweisung
|
|
$result3 = $db->query("SELECT DATE_FORMAT(antrag_von, '%d.%m.%Y') antrag_von, DATE_FORMAT(antrag_bis, '%d.%m.%Y') antrag_bis
|
|
FROM stan_frist
|
|
WHERE jahrgang ='$jahrgang'");
|
|
$row3 = $result3->fetch_array();
|
|
|
|
$result_tmp1 = $db->query("DELETE FROM stan_tmp_check_data WHERE uid='$uid1'");
|
|
|
|
|
|
$result_tmp1 = $db->query("INSERT INTO stan_tmp_check_data
|
|
SELECT t1.saaid
|
|
, t1.vert_bereich
|
|
, t1.uid
|
|
, t1.beginn
|
|
, t1.ende
|
|
, t1.dst_id
|
|
FROM stan_antrag t1
|
|
WHERE t1.status = (
|
|
SELECT MAX(t2.status)
|
|
FROM stan_antrag t2
|
|
WHERE t1.aendid = t2.aendid
|
|
AND t2.status !='2' #hinzugefügt am 10.06.2009, weil Status 2 angezeigt wurde
|
|
)
|
|
AND t1.uid = '$uid1'
|
|
AND (t1.zuweisung is NULL OR t1.zuweisung='Z')
|
|
");
|
|
|
|
|
|
#$result = $db->query("SELECT max(saaid) max_id FROM stan_tmp_check_data WHERE uid='$uid1'");
|
|
#$row4 = $result->fetch_array();
|
|
#$saaid_neu = $row4[max_id] + 1; // Damit alle Einträge eine ID haben
|
|
#$result_tmp1 = $db->query("INSERT INTO stan_tmp_check_data SELECT $saaid_neu, NULL, '$uid1', DATE_SUB(antrag_von, INTERVAL 1 DAY), DATE_SUB(antrag_von, INTERVAL 1 DAY), 'Antragszeitraum Beginn' FROM stan_frist WHERE jahrgang ='$row[Jahrgang]'");
|
|
|
|
#$result = $db->query("SELECT max(saaid) max_id FROM stan_tmp_check_data WHERE uid='$uid1'");
|
|
#$row4 = $result->fetch_array();
|
|
#$saaid_neu = $row4[max_id] + 1; // Damit alle Einträge eine ID haben
|
|
#$result_tmp1 = $db->query("INSERT INTO stan_tmp_check_data SELECT $saaid_neu, NULL, '$uid1', antrag_bis, antrag_bis, 'Antragszeitraum Ende' FROM stan_frist WHERE jahrgang ='$row[Jahrgang]'");
|
|
|
|
$query = "SELECT ma.uid, DATE_FORMAT(beginn, '%d.%m.%Y') beginn, DATE_FORMAT(ende, '%d.%m.%Y') ende, bezeichnung, COALESCE( luecke, 'OK' ) AS Luecke, ma.saaid
|
|
FROM stan_tmp_check_data ma
|
|
LEFT JOIN ( SELECT saaid, 'Lücke folgt' AS luecke
|
|
FROM stan_tmp_check_data a
|
|
WHERE a.ende != (SELECT MAX( ende ) FROM stan_tmp_check_data x WHERE x.uid = a.uid)
|
|
AND NOT EXISTS ( SELECT saaid FROM stan_tmp_check_data b
|
|
WHERE a.uid = b.uid
|
|
AND b.beginn = DATE_ADD( a.ende, INTERVAL 1 DAY )
|
|
)
|
|
OR ( a.beginn IN (select beginn FROM stan_tmp_check_data d WHERE d.saaid != a.saaid)
|
|
AND a.ende IN (select ende FROM stan_tmp_check_data e WHERE e.saaid != a.saaid AND e.uid = '$uid1')
|
|
)
|
|
) L
|
|
ON L.saaid = ma.saaid
|
|
WHERE ma.uid = '$uid1'
|
|
ORDER BY ma.uid, ma.beginn";
|
|
|
|
$result = $db->query($query)
|
|
or die ("Cannot execute query1");
|
|
|
|
while ($row2 = $result->fetch_array()){
|
|
|
|
|
|
|
|
/*
|
|
Möglichkeiten, die beim bearbeiten vorkommen können
|
|
|
|
1) Erstantrag soll zugewiesen werden:
|
|
Datenbankfelder: status=0 zuweisung 'is null', saaid=aendid
|
|
wenn ja, dann status=0,zuweisung='Z'
|
|
--> Schreiben an Student, Schreiben an Dienststelle Erstantrag
|
|
|
|
2) Änderungsantrag soll zugewiesen werden, Erstantrag wurde aber noch nicht zugewiesen:
|
|
Datenbankfelder: status=1 zuweisung 'is null'
|
|
prüfen ob ein anderer Antrag mit derselben Änderungsid vorhanden ist bei der die saaid = aendid (= Erstantrag) ist UND status=0+zuweisung 'is null'.
|
|
wenn ja, dann status änderungsantrag='1', zuweisung='Z'
|
|
, status nicht zugewiesener Erstantrag='0', zuweisung='E' (Erledigt)
|
|
--> Schreiben an Student, Schreiben an Diensstelle vom Änderungsantrag
|
|
|
|
3) Änderungsantrag soll zugewiesen werden, zugewiesener Erstantrag vorhanden:
|
|
Datenbankfelder: status=1, zuweisung 'is null'
|
|
prüfen, ob ein anderer Antrag mit derselben Änderungsid vorhanden ist bei der die saaid = aendid (Erstantrag) UND status=0+zuweisung='Z'
|
|
wenn ja, dann status änderungsantrag='1', zuweisung='Z'
|
|
, status zugewiesener Erstantrag='0', zuweisung='E' (Erledigt, für Zukunft nicht mehr relevant)
|
|
--> Schreiben an Student, Schreiben an Dienststelle Änderungsantrag, Schreiben an Dienststelle Erstantrag
|
|
|
|
4) Änderungsantrag soll zugewiesen werden, bereits zugewiesener Änderungsantrag ist vorhanden
|
|
Datenbankfelder: status=1, zuweisung 'is null'
|
|
prüfen, ob ein anderer Antrag mit derselben Änderungsid vorhanden ist mit status='1'+zuweisung='AE'
|
|
wenn ja, dann status änderungsantrag='1', zuweisung='Z'
|
|
, status zugewiesener ÄA='1', zuweisung='E' (Erledigt, für Zukunft nicht mehr relevant)
|
|
--> Schreiben an Student, Schreiben an Dienststelle Änderungsantrag, Schreiben an Dienststelle bisheriger Änderungsantrag
|
|
|
|
5) Neuer Datensatz (auf unbelegter Position) im Änderungsantrag
|
|
Datenbankfelder: status=1, zuweisung 'is null', saaid=aendid
|
|
status änderungsantrag='1', zuweisung='Z'
|
|
--> Schreiben an Student, Schreiben an Dienststelle Änderung(erst)santrag
|
|
|
|
|
|
|
|
Folgende Möglichkeiten können nicht auftreten:
|
|
zwei erstanträge auf derselben position. Beim abschicken der Vormerkung löscht der Student automatisch den bereits vorhanden nicht zugewiesenen Erstantrag
|
|
zwei Änderungsanträge auf derselben position, die nicht zugewiesen sind. Der Student löscht einen Änderungsantrag, wenn er einen neuen auf der Position stellt, den der Administrator nicht "angefasst" hat.
|
|
|
|
Bemerkungen:
|
|
Wird ein Änderungsantrag gestellt und ein zugewiesener Änderungsantrag ist vorhanden, bekommt der bisherige Änderungsantrag die Zuweisung='AE'.
|
|
Dies wird autoamtisch durch das Abschicken des Änderungsantrags vom Student gemacht.
|
|
*/
|
|
|
|
$saaid=$row2[saaid];
|
|
|
|
|
|
$resultakt = $db->query("SELECT saaid, aendid, status, zuweisung, uid, dst_id
|
|
FROM stan_antrag
|
|
WHERE saaid ='$saaid'
|
|
");
|
|
$row_akt = $resultakt->fetch_array(); // Prüfen ob schon Änderungsanträge vorhanden
|
|
|
|
|
|
|
|
$res_alt = $db->query("SELECT saaid, aendid, status, zuweisung, dst_id
|
|
FROM stan_antrag
|
|
WHERE saaid<'$saaid'
|
|
AND aendid='$row_akt[aendid]'
|
|
ORDER BY saaid DESC
|
|
LIMIT 1");
|
|
$row_alt = $res_alt->fetch_array();
|
|
|
|
$zuweis_dat = $datum=date("Y-m-d H:i:s");
|
|
|
|
|
|
if($row_akt[zuweisung] != 'Z'){
|
|
|
|
$db = dbconnect();
|
|
# Step 1
|
|
# Neuer Erstantrag zuweisen
|
|
|
|
if($row_akt[status] == '0' AND $row_akt[zuweisung] == NULL AND $row_akt[saaid] == $row_akt[aendid]){
|
|
$db->query("UPDATE stan_antrag
|
|
SET zuweisung='Z'
|
|
, zuweis_dat='$zuweis_dat'
|
|
WHERE saaid='$row_akt[saaid]'");
|
|
# --> Schreiben an Student, Schreiben an Dienststelle Erstantrag
|
|
printqueue_antrag($row_akt[saaid], 'EZS', 'Erstantrag zugewiesen an Student', $user_admin, $hs, 1);
|
|
printqueue_antrag($row_akt[saaid], 'EZP', 'Erstantrag zugewiesen an Praxisstelle', $user_admin, $hs, 2);
|
|
}
|
|
# Step 1 Ende
|
|
|
|
|
|
# Step 2
|
|
# Änderungsantrag zuweisen mit nicht zugewisenem Erstantrag
|
|
if($row_akt[status] == '1' AND $row_akt[zuweisung] == NULL AND $row_akt[aendid] == $row_alt[aendid] AND $row_alt[saaid]== $row_alt[aendid] AND $row_alt[status] =='0' AND $row_alt[zuweisung] == NULL){
|
|
|
|
# Änderungsantrag zuweisen
|
|
$db->query("UPDATE stan_antrag
|
|
SET zuweisung='Z'
|
|
, zuweis_dat='$zuweis_dat'
|
|
WHERE saaid='$row_akt[saaid]'");
|
|
|
|
# Nicht zugewiesener Erstantrag auf Erledigt setzen
|
|
$db->query("UPDATE stan_antrag
|
|
SET zuweisung='E'
|
|
, zuweis_dat='$zuweis_dat'
|
|
WHERE saaid='$row_alt[saaid]'");
|
|
# --> Schreiben an Student, Schreiben an Dienststelle Änderungsantrag
|
|
printqueue_antrag($row_akt[saaid], 'EZS', 'Änderungsantrag zugewiesen an Student ohne zugewiesenem Erstantrag', $user_admin, $hs, 1);
|
|
printqueue_antrag($row_akt[saaid], 'EZP', 'Änderungsantrag zugewiesen an Praxisstelle ohne zugewiesenem Erstantrag', $user_admin, $hs, 2);
|
|
|
|
|
|
}
|
|
# Step 2 Ende
|
|
|
|
# Step 3
|
|
# Änderungsantrag mit zugewiesenem Erstantrag
|
|
if($row_akt[status] == '1' AND $row_akt[zuweisung] == NULL AND $row_akt[aendid] == $row_alt[aendid] AND $row_alt[saaid]== $row_alt[aendid] AND $row_alt[status] =='0' AND $row_alt[zuweisung] == 'Z'){
|
|
|
|
# Änderungsantrag zuweisen
|
|
$db->query("UPDATE stan_antrag
|
|
SET zuweisung='Z'
|
|
, zuweis_dat='$zuweis_dat'
|
|
WHERE saaid='$row_akt[saaid]'");
|
|
|
|
# Nicht zugewiesener Erstantrag auf Erledigt setzen
|
|
$db->query("UPDATE stan_antrag
|
|
SET zuweisung='EZ'
|
|
WHERE saaid='$row_alt[saaid]'");
|
|
# --> Schreiben an Student, Schreiben an Dienststelle Änderungsantrag, Schreiben an Dienststelle Erstantrag
|
|
|
|
printqueue_antrag($row_akt[saaid], 'AES', 'Änderungsschreiben an Student mit zugewiesenem Erstantrag', $user_admin, $hs, 1);
|
|
printqueue_antrag($row_akt[saaid], 'AEP', 'Änderungsschreiben an Praxisstelle mit zugewiesenem Erstantrag', $user_admin, $hs, 2);
|
|
if($row_akt[dst_id] != $row_alt[dst_id]){ //wenn sich Dienststelle ändert, dann zusätzlich eine Neuzuweisung
|
|
printqueue_antrag($row_akt[saaid], 'EZP', 'Erstantrag an Praxisstelle nach Änderungsantrag', $user_admin, $hs, 3);
|
|
}
|
|
$saaid_cur = $row_akt[saaid];
|
|
}
|
|
# Step 3 Ende
|
|
|
|
# Step 4
|
|
# Änderunstantrag mit zugewisenem Änderungsantrag
|
|
if($row_akt[status] == '1' AND $row_akt[zuweisung] == NULL AND $row_akt[aendid] == $row_alt[aendid] AND $row_alt[status] =='1' AND $row_alt[zuweisung] == 'AE'){
|
|
|
|
# Änderungsantrag zuweisen
|
|
$db->query("UPDATE stan_antrag
|
|
SET zuweisung='Z'
|
|
, zuweis_dat='$zuweis_dat'
|
|
WHERE saaid='$row_akt[saaid]'");
|
|
|
|
# Nicht zugewiesener Erstantrag auf Erledigt setzen
|
|
|
|
$db->query("UPDATE stan_antrag
|
|
SET zuweisung='EZ'
|
|
WHERE saaid='$row_alt[saaid]'");
|
|
# --> Schreiben an Student, Schreiben an Dienststelle aktueller Änderungsantrag, Schreiben an Dienststelle bisheriger Änderungsantrag
|
|
printqueue_antrag($row_akt[saaid], 'AES', 'Änderungsschreiben an Student mit zugewiesenem Änderungsantrag', $user_admin, $hs, 1);
|
|
printqueue_antrag($row_akt[saaid], 'AEP', 'Änderungsschreiben an Praxisstelle mit zugewiesenem Änderungsantrag', $user_admin, $hs, 2);
|
|
if($row_akt[dst_id] != $row_alt[dst_id]){ //wenn sich Dienststelle ändert, dann zusätzlich eine Neuzuweisung
|
|
printqueue_antrag($row_akt[saaid], 'EZP', 'Erstantrag an Praxisstelle nach zugewiesenem Änderungsantrag', $user_admin, $hs, 3);
|
|
}
|
|
|
|
$saaid_cur = $row_akt[saaid];
|
|
}
|
|
# Step 4 Ende
|
|
|
|
# Step 5
|
|
# Neuer Änderunstantrag auf neuer Position
|
|
if($row_akt[status] == '1' AND $row_akt[zuweisung] == NULL AND $row_akt[saaid] == $row_akt[aendid]){
|
|
|
|
$db->query("UPDATE stan_antrag
|
|
SET zuweisung='Z'
|
|
, zuweis_dat='$zuweis_dat'
|
|
WHERE saaid='$row_akt[saaid]'");
|
|
$db->query("DELETE FROM stan_printqueue_antrag
|
|
WHERE saaid = '$saaid_cur'
|
|
AND zuweisung in ('EZP')");
|
|
# --> Schreiben an Student, Schreiben an Dienststelle Änderungsantrag
|
|
printqueue_antrag($row_akt[saaid], 'AES', 'Änderungsschreiben an Student: Neuer Datensatz auf Position vorhanden', $user_admin, $hs, 1);
|
|
printqueue_antrag($row_akt[saaid], 'EZP', 'Zuweisungsschreben an Praxisstelle: Neuer Datensatz', $user_admin,$hs, 4);
|
|
|
|
|
|
}
|
|
# Step 5 Ende
|
|
} // Ende IF: Wenn Aktuelle Stelle bereits zugewiesen ist. if($row_akt[zuweisung] != 'Z'){
|
|
|
|
|
|
|
|
|
|
} //Ende While Schleife für "alle zuweisen"
|
|
|
|
|
|
|
|
echo "
|
|
<html>
|
|
<head>
|
|
<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">
|
|
<link rel=\"stylesheet\" href=\"../styles_pc.css\" type=\"text/css\">
|
|
<title>Falsches Datum</title>
|
|
</head>
|
|
<body>
|
|
<table border=\"0\" style=\"border-collapse: collapse\" width=\"100%\" cellpadding=\"0\" height=\"100%\" id=\"table1\">
|
|
<tr>
|
|
<td>
|
|
<div align=\"center\">
|
|
<table cellspacing=\"0\" cellpadding=\"0\" width=\"550\" border=\"0\">
|
|
<tr>
|
|
<td width=\"10\" background=\"../images/box_e1.gif\">
|
|
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
|
<td nowrap=\"nowrap\" align=\"left\" width=\"3%\" background=\"../images/box_top.gif\" valign=\"top\"></td>
|
|
<td width=\"95%\" background=\"../images/box_top.gif\">
|
|
<img height=\"10\" src=\"../images/blank.gif\" width=\"1\"><br>
|
|
<span class=\"sh\">Druck der Anschreiben</span><br>
|
|
<img height=\"5\" src=\"../images/blank.gif\" width=\"1\"></td>
|
|
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e2.gif\">
|
|
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
|
</tr>
|
|
<tr>
|
|
<td width=\"1%\" background=\"../images/box_l.gif\">
|
|
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
|
<td colspan=\"2\"><br>
|
|
<p align=\"center\">Bitte weisen Sie dem Student zuerst alle Anträge zu bevor Sie den Druck starten, damit auf der Zuweisung des Studenten alle Anträge aufgelistet werden<br><br></p>";
|
|
$queryb = $db->query ("SELECT count(a.saaid) Anz
|
|
FROM stan_printqueue_antrag a, stan_antrag b, stud c
|
|
WHERE a.saaid=b.saaid
|
|
AND b.uid=c.uid
|
|
AND b.uid='$row_akt[uid]'
|
|
AND druckstatus ='N'");
|
|
$row_cur_uid_anz = $queryb->fetch_array();
|
|
if($row_cur_uid_anz[Anz] > 0){
|
|
$queryc = $db->query ("SELECT hs
|
|
FROM stud
|
|
WHERE uid='$row_akt[uid]'");
|
|
$row_cur_hs = $queryc->fetch_array();
|
|
|
|
if($row_cur_hs[hs] == 'K' or $row_cur_hs[hs] == 'k'){
|
|
echo "Dokument: <a href='pdf_gen_kehl.php?uid=$row_akt[uid]' target='_blank'>drucken</a><br><br>";
|
|
}else{
|
|
echo "Dokument: <a href='pdf_gen.php?uid=$row_akt[uid]' target='_blank'>drucken</a><br><br>";
|
|
}
|
|
}else{
|
|
echo "Dokument: Alle Dokumente bereits gedruckt<br><br>";
|
|
}
|
|
|
|
echo"
|
|
<a href='bearbeiten.php?action=ubersicht&uid=$row_akt[uid]'>Zurück zum Student</a><br><br>
|
|
<a href='bearbeiten.php'>Zurück zur Studentzuweisung</a><br>
|
|
|
|
|
|
</p>
|
|
<p></p>
|
|
<p></p>
|
|
<p></p>
|
|
<p></p>
|
|
<p><br>
|
|
</p>
|
|
</td>
|
|
<td width=\"1%\" background=\"../images/box_r.gif\">
|
|
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
|
</tr>
|
|
<tr>
|
|
<td nowrap=\"nowrap\" align=\"left\" width=\"1%\" background=\"../images/box_e3.gif\">
|
|
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"></td>
|
|
<td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_bottom.gif\" colspan=\"2\">
|
|
<img height=\"16\" src=\"../images/blank.gif\" width=\"8\"></td>
|
|
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e4.gif\">
|
|
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"> </td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</body>
|
|
</html>";
|
|
|
|
|
|
|
|
|
|
$result_tmp1 = $db->query("DELETE FROM stan_tmp_check_data WHERE uid='$uid1'");
|
|
|
|
|
|
|
|
|
|
break;
|
|
case "mail":
|
|
$db = dbconnect();
|
|
$uid1= $_COOKIE["ck_uid1"];
|
|
|
|
$result2 = $db->query("SELECT vorname, nachname, ag, jahrgang, mail, mail2, hs
|
|
FROM stud
|
|
WHERE uid = '$uid1'
|
|
");
|
|
$row2 = $result2->fetch_array();
|
|
|
|
|
|
if($hs =='K' or $hs =='k'){ //Empfängeradresse selektieren. Je nach Hochshule verschieden
|
|
$result3 = $db->query("SELECT wert2 FROM parameter WHERE pid=7");
|
|
$row3 = $result3->fetch_array();
|
|
$hochschule = 'Kehl';
|
|
}else{
|
|
$result3 = $db->query("SELECT wert2 FROM parameter WHERE pid=4");
|
|
$row3 = $result3->fetch_array();
|
|
$hochschule = 'Ludwigsburg';
|
|
}
|
|
|
|
$result4 = $db->query("SELECT vorname, nachname FROM stan_admin WHERE user='$user_admin'");
|
|
$row4 = $result4->fetch_array();
|
|
|
|
echo "
|
|
<html>
|
|
<head>
|
|
<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">
|
|
<link rel=\"stylesheet\" href=\"../styles_pc.css\" type=\"text/css\">
|
|
<title>Mail an Stellenantrag</title>
|
|
</head>
|
|
<body onload=\"if(document.Mail)document.Mail.betreff.focus();return false;\">
|
|
<table border=\"0\" style=\"border-collapse: collapse\" width=\"100%\" cellpadding=\"0\" height=\"100%\" id=\"table1\">
|
|
<tr>
|
|
<td>
|
|
<div align=\"center\">
|
|
<table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" border=\"0\">
|
|
<tr>
|
|
<td align=\"left\" width=\"1%\" width=\"10\" background=\"../images/box_e1.gif\">
|
|
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
|
<td align=\"left\" width=\"98%\" background=\"../images/box_top.gif\" valign=\"top\" colspan=\"2\">
|
|
<img height=\"10\" src=\"../images/blank.gif\" width=\"1\"><br>
|
|
<font class=\"hd\">Mail an $row2[vorname] $row2[nachname] ($row2[ag]/$row2[jahrgang])</font><br>
|
|
<font class=\"sh\">Angemeldete Hochschule: $hochschule</font><br>
|
|
<img height=\"5\" src=\"../images/blank.gif\" width=\"1\"></td>
|
|
<td align=\"right\" width=\"1%\" background=\"../images/box_e2.gif\">
|
|
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
|
</tr>
|
|
<tr>
|
|
<td width=\"1%\" background=\"../images/box_l.gif\">
|
|
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
|
<td colspan=\"2\">
|
|
<form method=POST action=$_SERVER[PHP_SELF]?action=ausgabe2 name=Mail>
|
|
<table width=\"100%\" border=\"0\">
|
|
<tr>
|
|
<td width=\"30%\" valign=\"top\"><b>Absender:</b></td>
|
|
<td width=\"70%\" valign=\"top\"><input name=\"sender\" type=\"text\" value='$row4[vorname] $row4[nachname]' id=\"sender\" size=\"66\"></td>
|
|
</tr>
|
|
<tr>
|
|
<td width=\"30%\" valign=\"top\"><b>Mail-Adresse Absender:</b></td>
|
|
<td width=\"70%\" valign=\"top\"><input name=\"sendermail\" value='$row3[wert2]'type=\"text\" id=\"sendermail\" size=\"66\"></td>
|
|
</tr>
|
|
<tr>
|
|
<td width=\"30%\" valign=\"top\"> </td>
|
|
<td width=\"70%\" valign=\"top\"> </td>
|
|
</tr>
|
|
<tr>
|
|
<td width=\"30%\" valign=\"top\"><b>Mail-Adresse Empfänger:</b></td>
|
|
<td width=\"70%\" valign=\"top\">$row2[vorname] $row2[nachname]";
|
|
|
|
$empfaenger .= "$row[mail],";
|
|
if($row[mail2] != ''){
|
|
$empfaenger .= "$row[mail2],";
|
|
}
|
|
|
|
$empfaenger=substr($empfaenger, 0, -1); // Letztes Zeichen (das Komma) entfernen
|
|
|
|
|
|
echo"
|
|
<input type=\"hidden\" name=\"empfaenger\" id=\"empfaenger\" size=\"66\" value='$empfaenger'>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width=\"30%\" valign=\"top\"> </td>
|
|
<td width=\"70%\" valign=\"top\"> </td>
|
|
</tr>
|
|
<tr>
|
|
<td width=\"30%\" valign=\"top\"><b>Betreff:</b></td>
|
|
<td width=\"70%\" valign=\"top\"><input name=\"betreff\" type=\"text\" id=\"betreff\" size=\"66\"></td>
|
|
</tr>
|
|
<tr>
|
|
<td width=\"30%\" valign=\"top\"><b>Nachricht:</b></td>
|
|
<td width=\"70%\" valign=\"top\">";
|
|
$oFCKeditor = new FCKeditor('inhalt') ;
|
|
$oFCKeditor->BasePath = './FCKeditor/';
|
|
#$oFCKeditor->Value = 'Default text in editor';
|
|
$oFCKeditor->ToolbarSet = 'Basic';
|
|
$oFCKeditor->Width = '100%' ;
|
|
$oFCKeditor->Height = '200' ;
|
|
$oFCKeditor->Create() ;
|
|
echo"
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width=\"30%\" valign=\"top\"> </td>
|
|
<td width=\"70%\" valign=\"top\"><input type=checkbox NAME=\"kopie\">Kopie der Mail erhalten</td>
|
|
</tr>
|
|
</table>
|
|
<br>
|
|
<input type=\"submit\" value=\"Abschicken\" name=\"B1\" size=\"20\">
|
|
</form>
|
|
</td>
|
|
<td width=\"1%\" background=\"../images/box_r.gif\">
|
|
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
|
</tr>
|
|
<tr>
|
|
<td nowrap=\"nowrap\" align=\"left\" width=\"1%\" background=\"../images/box_e3.gif\">
|
|
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"></td>
|
|
<td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_bottom.gif\" colspan=\"2\">
|
|
<img height=\"16\" src=\"../images/blank.gif\" width=\"8\"></td>
|
|
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e4.gif\">
|
|
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"> </td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</body>
|
|
</html>";
|
|
|
|
break;
|
|
case "ausgabe2":
|
|
$mtknr=$_COOKIE["ck_mtknr1"];
|
|
|
|
$empfaenger = $_POST['empfaenger'];
|
|
$betreff = $_POST['betreff'];
|
|
$text = stripslashes( $_POST['inhalt'] );
|
|
$sender = $_POST['sender'];
|
|
$sendermail = $_POST['sendermail'];
|
|
$kopie = $_POST['kopie'];
|
|
// echo"$empfaenger<p>$betreff<p>$text<p>$sender<p>$sendermail";
|
|
// Emailversand:
|
|
if ($kopie)
|
|
{
|
|
$empfaenger .= ", $sendermail";
|
|
}
|
|
|
|
|
|
if($empfaenger == '' OR $betreff == '' OR $text == '' OR $sender == '' OR $sendermail == ''){
|
|
echo"
|
|
<html>
|
|
<head>
|
|
<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">
|
|
<link rel=\"stylesheet\" href=\"../styles_pc.css\" type=\"text/css\">
|
|
<title>Mailversand</title>
|
|
</head>
|
|
<body>
|
|
<table border=\"0\" style=\"border-collapse: collapse\" width=\"100%\" cellpadding=\"0\" height=\"100%\" id=\"table1\">
|
|
<tr>
|
|
<td>
|
|
<div align=\"center\">
|
|
<table cellspacing=\"0\" cellpadding=\"0\" width=\"550\" border=\"0\">
|
|
<tr>
|
|
<td width=\"10\" background=\"../images/box_e1.gif\">
|
|
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
|
<td nowrap=\"nowrap\" align=\"left\" width=\"3%\" background=\"../images/box_top.gif\" valign=\"top\"></td>
|
|
<td width=\"95%\" background=\"../images/box_top.gif\">
|
|
<img height=\"10\" src=\"../images/blank.gif\" width=\"1\"><br>
|
|
<font class=\"hd\">Pflichtfelder ausfüllen</font><br>
|
|
<img height=\"5\" src=\"../images/blank.gif\" width=\"1\"></td>
|
|
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e2.gif\">
|
|
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
|
</tr>
|
|
<tr>
|
|
<td width=\"1%\" background=\"../images/box_l.gif\">
|
|
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
|
<td colspan=\"2\"><br><p align=\"center\"><b>Bitte füllen Sie alle Felder aus!</b>
|
|
<p></p>
|
|
<p></p>
|
|
<p align=\"center\"><a href=\"javascript:history.back()\">
|
|
<img border=\"0\" src=\"../images/zurueck.gif\" width=\"77\" height=\"22\"></a><br>
|
|
</td>
|
|
<td width=\"1%\" background=\"../images/box_r.gif\">
|
|
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
|
</tr>
|
|
<tr>
|
|
<td nowrap=\"nowrap\" align=\"left\" width=\"1%\" background=\"../images/box_e3.gif\">
|
|
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"></td>
|
|
<td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_bottom.gif\" colspan=\"2\">
|
|
<img height=\"16\" src=\"../images/blank.gif\" width=\"8\"></td>
|
|
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e4.gif\">
|
|
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"> </td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</body>
|
|
</html>";
|
|
|
|
}
|
|
|
|
|
|
## Mailversand:
|
|
$headers = "From: $sender <$sendermail>\r\n";
|
|
$headers .= "MIME-Version: 1.0\r\n";
|
|
$headers .= "Content-type: text/html; charset=utf-8\r\n";
|
|
$return = @mail($empfaenger, $betreff, $text, $headers);
|
|
|
|
// Bestätigungsseite
|
|
|
|
if ($return)
|
|
{
|
|
echo"
|
|
<html>
|
|
<head>
|
|
<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">
|
|
<link rel=\"stylesheet\" href=\"../styles_pc.css\" type=\"text/css\">
|
|
<title>Mailversand</title>
|
|
</head>
|
|
<body>
|
|
<table border=\"0\" style=\"border-collapse: collapse\" width=\"100%\" cellpadding=\"0\" height=\"100%\" id=\"table1\">
|
|
<tr>
|
|
<td>
|
|
<div align=\"center\">
|
|
<table cellspacing=\"0\" cellpadding=\"0\" width=\"550\" border=\"0\">
|
|
<tr>
|
|
<td width=\"10\" background=\"../images/box_e1.gif\">
|
|
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
|
<td nowrap=\"nowrap\" align=\"left\" width=\"3%\" background=\"../images/box_top.gif\" valign=\"top\"></td>
|
|
<td width=\"95%\" background=\"../images/box_top.gif\">
|
|
<img height=\"10\" src=\"../images/blank.gif\" width=\"1\"><br>
|
|
<font class=\"hd\">Mailversand erfolgreich</font><br>
|
|
<img height=\"5\" src=\"../images/blank.gif\" width=\"1\"></td>
|
|
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e2.gif\">
|
|
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
|
</tr>
|
|
<tr>
|
|
<td width=\"1%\" background=\"../images/box_l.gif\">
|
|
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
|
<td colspan=\"2\"><br><p align=\"center\"><b>Die E-Mail wurde verschickt!</b>
|
|
<p></p>
|
|
<p></p>
|
|
<p align=\"center\"><a href=\"fehlende_ant.php\">
|
|
<img border=\"0\" src=\"../images/zurueck.gif\" width=\"77\" height=\"22\"></a><br>
|
|
</td>
|
|
<td width=\"1%\" background=\"../images/box_r.gif\">
|
|
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
|
</tr>
|
|
<tr>
|
|
<td nowrap=\"nowrap\" align=\"left\" width=\"1%\" background=\"../images/box_e3.gif\">
|
|
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"></td>
|
|
<td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_bottom.gif\" colspan=\"2\">
|
|
<img height=\"16\" src=\"../images/blank.gif\" width=\"8\"></td>
|
|
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e4.gif\">
|
|
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"> </td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</body>
|
|
</html>";
|
|
} else {
|
|
echo"
|
|
<html>
|
|
<head>
|
|
<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">
|
|
<link rel=\"stylesheet\" href=\"../styles_pc.css\" type=\"text/css\">
|
|
<title>Mailversand</title>
|
|
</head>
|
|
<body>
|
|
<table border=\"0\" style=\"border-collapse: collapse\" width=\"100%\" cellpadding=\"0\" height=\"100%\" id=\"table1\">
|
|
<tr>
|
|
<td>
|
|
<div align=\"center\">
|
|
<table cellspacing=\"0\" cellpadding=\"0\" width=\"550\" border=\"0\">
|
|
<tr>
|
|
<td width=\"10\" background=\"../images/box_e1.gif\">
|
|
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
|
<td nowrap=\"nowrap\" align=\"left\" width=\"3%\" background=\"../images/box_top.gif\" valign=\"top\"></td>
|
|
<td width=\"95%\" background=\"../images/box_top.gif\">
|
|
<img height=\"10\" src=\"../images/blank.gif\" width=\"1\"><br>
|
|
<font class=\"hd\">Mailversand fehlgeschlagen</font><br>
|
|
<img height=\"5\" src=\"../images/blank.gif\" width=\"1\"></td>
|
|
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e2.gif\">
|
|
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
|
</tr>
|
|
<tr>
|
|
<td width=\"1%\" background=\"../images/box_l.gif\">
|
|
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
|
<td colspan=\"2\"><br><p align=\"center\">Die E-Mail wurde <b>nicht</b> verschickt!<br>
|
|
Eine oder mehrere Mailadressen innerhalb des Empfängerkreises sind ungültig!<br>
|
|
<br>
|
|
<p></p>
|
|
<p></p>
|
|
<p align=\"center\"><a href=\"javascript:history.back()\">
|
|
<img border=\"0\" src=\"../images/zurueck.gif\" width=\"77\" height=\"22\"></a><br>
|
|
</td>
|
|
<td width=\"1%\" background=\"../images/box_r.gif\">
|
|
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
|
</tr>
|
|
<tr>
|
|
<td nowrap=\"nowrap\" align=\"left\" width=\"1%\" background=\"../images/box_e3.gif\">
|
|
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"></td>
|
|
<td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_bottom.gif\" colspan=\"2\">
|
|
<img height=\"16\" src=\"../images/blank.gif\" width=\"8\"></td>
|
|
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e4.gif\">
|
|
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"> </td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</body>
|
|
</html>";
|
|
} //End if
|
|
|
|
break;
|
|
case "bearb":
|
|
|
|
$saaid=$_GET["saaid"];
|
|
setcookie("ck_saaid","");
|
|
setcookie("ck_saaid",$saaid);
|
|
|
|
|
|
$db = dbconnect();
|
|
$result = $db->query("SELECT nachname, vorname, jahrgang, stg, a.uid, pos, vert_bereich
|
|
FROM stud a, stan_antrag b
|
|
WHERE a.uid=b.uid
|
|
AND b.saaid='$saaid'");
|
|
|
|
$row_stud = $result->fetch_array();
|
|
|
|
function get_data($pos, $uid1){
|
|
|
|
$result_data = $db->query("SELECT 1
|
|
FROM stan_ausnahme WHERE uid=\"$uid1\"");
|
|
$rowdata = $result_data->fetch_array();
|
|
|
|
|
|
|
|
$result_data1 = $db->query("SELECT t1.vert_bereich
|
|
, t1.art
|
|
, t1.dst_id
|
|
, DATE_Format(t1.beginn, '%d')AS beg_tag
|
|
, DATE_Format(t1.beginn, '%m')AS beg_mon
|
|
, DATE_Format(t1.beginn, '%Y')AS beg_jahr
|
|
, DATE_Format(t1.ende, '%d')AS end_tag
|
|
, DATE_Format(t1.ende, '%m')AS end_mon
|
|
, DATE_Format(t1.ende, '%Y')AS end_jahr
|
|
, t1.abteilung
|
|
, t1.tel_abteilung
|
|
FROM stan_antrag t1
|
|
WHERE t1.status = (
|
|
SELECT MAX(t2.status)
|
|
FROM stan_antrag t2
|
|
WHERE t1.aendid = t2.aendid
|
|
AND t2.status !='2' #hinzugefügt am 10.06.2009, weil Status 2 angezeigt wurde
|
|
)
|
|
AND t1.uid = '$uid1'
|
|
AND t1.pos='$pos'
|
|
AND (t1.zuweisung is NULL or t1.zuweisung='' or t1.zuweisung='Z')
|
|
");
|
|
$rowdata1 = $result_data1->fetch_array();
|
|
|
|
$result_data2 = $db->query("SELECT distinct 1 FROM stan_dienststellen WHERE dst_id= '$rowdata1[dst_id]'");
|
|
$rowdata2 = $result_data2->fetch_array();
|
|
|
|
if($rowdata2[0] == '1'){
|
|
$result_data3 = $db->query("SELECT bez
|
|
, str
|
|
, plz
|
|
, postfach
|
|
, plz_postfach
|
|
, ort
|
|
, bundesland
|
|
, staat
|
|
FROM stan_dienststellen
|
|
WHERE dst_id='$rowdata1[dst_id]'");
|
|
$rowdata3 = $result_data3->fetch_array();
|
|
|
|
}else{
|
|
|
|
$result_data3 = $db->query("SELECT bez
|
|
, str
|
|
, plz
|
|
, postfach
|
|
, plz_postfach
|
|
, ort
|
|
, bundesland
|
|
, staat
|
|
FROM stan_dienststellen_tmp
|
|
WHERE dst_id='$rowdata1[dst_id]'");
|
|
$rowdata3 = $result_data3->fetch_array();
|
|
}
|
|
|
|
$stellenart = $rowdata1[art];
|
|
$abteilung = $rowdata1[abteilung];
|
|
$tel_abteilung = $rowdata1[tel_abteilung];
|
|
$bezeichnung = $rowdata3[bez];
|
|
$str = $rowdata3[str];
|
|
$plz = $rowdata3[plz];
|
|
$postfach = $rowdata3[postfach];
|
|
$plz_postfach = $rowdata3[plz_postfach];
|
|
$ort = $rowdata3[ort];
|
|
$bundesland = $rowdata3[bundesland];
|
|
$staat = $rowdata3[staat];
|
|
|
|
$result_data4 = $db->query("SELECT distinct saaid, vert_bereich FROM stan_antrag WHERE pos IN ('1', '2', '3') AND uid ='$uid1' ORDER BY saaid DESC LIMIT 1");
|
|
$rowdata4 = $result_data4->fetch_array();
|
|
|
|
$vert1=$rowdata4[vert_bereich];
|
|
|
|
$result_data4 = $db->query("SELECT distinct saaid, vert_bereich FROM stan_antrag WHERE pos IN ('4', '5', '6') AND uid ='$uid1' ORDER BY saaid DESC LIMIT 1");
|
|
$rowdata4 = $result_data4->fetch_array();
|
|
|
|
$vert2=$rowdata4[vert_bereich];
|
|
|
|
$result_data4 = $db->query("SELECT distinct saaid, vert_bereich FROM stan_antrag WHERE pos IN ('7', '8', '9') AND uid ='$uid1' ORDER BY saaid DESC LIMIT 1");
|
|
$rowdata4 = $result_data4->fetch_array();
|
|
|
|
$vert3=$rowdata4[vert_bereich];
|
|
|
|
$result_data4 = $db->query("SELECT distinct saaid, vert_bereich FROM stan_antrag WHERE pos IN ('10', '11', '12') AND uid ='$uid1' ORDER BY saaid DESC LIMIT 1");
|
|
$rowdata4 = $result_data4->fetch_array();
|
|
|
|
$vert4=$rowdata4[vert_bereich];
|
|
|
|
$beg_tag = $rowdata1[beg_tag];
|
|
$beg_mon = $rowdata1[beg_mon];
|
|
$beg_jahr = $rowdata1[beg_jahr];
|
|
$end_tag = $rowdata1[end_tag];
|
|
$end_mon = $rowdata1[end_mon];
|
|
$end_jahr = $rowdata1[end_jahr];
|
|
|
|
return array( $stellenart
|
|
, $abteilung
|
|
, $tel_abteilung
|
|
, $bezeichnung
|
|
, $str
|
|
, $plz
|
|
, $postfach
|
|
, $plz_postfach
|
|
, $ort,$bundesland
|
|
, $staat
|
|
, $vert1
|
|
, $vert2
|
|
, $vert3
|
|
, $vert4
|
|
, $beg_tag
|
|
, $beg_mon
|
|
, $beg_jahr
|
|
, $end_tag
|
|
, $end_mon
|
|
, $end_jahr
|
|
);
|
|
} // End Function
|
|
|
|
|
|
|
|
|
|
|
|
echo"
|
|
<html>
|
|
<head>
|
|
|
|
<link rel=\"stylesheet\" href=\"../styles_pc.css\" type=\"text/css\">
|
|
<script type=\"text/javascript\" src=\"livesearch2/ajax.js\"></script>
|
|
<script type=\"text/javascript\" src=\"livesearch2/ajax-dynamic-list.js\">
|
|
/************************************************************************************************************
|
|
(C) www.dhtmlgoodies.com, April 2006
|
|
|
|
This is a script from www.dhtmlgoodies.com. You will find this and a lot of other scripts at our website.
|
|
|
|
Terms of use:
|
|
You are free to use this script as long as the copyright message is kept intact. However, you may not
|
|
redistribute, sell or repost it without our permission.
|
|
|
|
Thank you!
|
|
|
|
www.dhtmlgoodies.com
|
|
Alf Magne Kalleland
|
|
|
|
************************************************************************************************************/
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<!-- Kalender Beginn // -->
|
|
<link rel='stylesheet' href='dynCalendar.css' type='text/css' media='screen'>
|
|
<script src='browserSniffer.js' type='text/javascript' language='javascript'></script>
|
|
<script src='dynCalendar.js' type='text/javascript' language='javascript'></script>
|
|
<script type='text/javascript'>
|
|
<!--
|
|
// Calendar callback. When a date is clicked on the calendar
|
|
// this function is called so you can do as you want with it
|
|
function calendarCallback(date, month, year, pos)
|
|
{
|
|
if(date<10){date='0'+date;}
|
|
if(month<10){month='0'+month;}
|
|
date_tag = date;
|
|
date_mon = month;
|
|
date_jahr = year;
|
|
document.getElementById('beg_tag'+pos).value = date_tag;
|
|
document.getElementById('beg_mon'+pos).value = date_mon;
|
|
document.getElementById('beg_jahr'+pos).value = date_jahr;
|
|
}
|
|
|
|
function calendarCallback_end(date, month, year, pos)
|
|
{
|
|
if(date<10){date='0'+date;}
|
|
if(month<10){month='0'+month;}
|
|
date_tag = date;
|
|
date_mon = month;
|
|
date_jahr = year;
|
|
document.getElementById('ende_tag'+pos).value = date_tag;
|
|
document.getElementById('ende_mon'+pos).value = date_mon;
|
|
document.getElementById('ende_jahr'+pos).value = date_jahr;
|
|
}
|
|
// -->
|
|
</script>
|
|
<!-- Kalender Ende // -->
|
|
|
|
|
|
<script type=\"text/javascript\" src=\"./overlib/overlibmws.js\"><!-- overLIB (c) Erik Bosrup --></script>
|
|
<script type=\"text/javascript\">
|
|
<!--
|
|
OLregisterPlugins('crossframe','iframe','hide','shadow');
|
|
overlib=parent.overlib;
|
|
nd=parent.nd;
|
|
if (typeof window.createPopup!='undefined') {
|
|
var oPopup = window.createPopup();
|
|
var oPopupBody = oPopup.document.body;
|
|
oPopupBody.style.backgroundColor = \"#ccccff\";
|
|
oPopupBody.style.border = \"solid blue 1px\";
|
|
}
|
|
|
|
// -->
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style type=\"text/css\">
|
|
.text_overlib {font-family:Verdana,Arial,sans-serif; font-size:10px;}
|
|
.r{text-decoration: none;font-weight: bold; color: black;}
|
|
.text_overlib {font-family:Verdana,Arial,sans-serif; font-size:10px;}
|
|
.select_form{
|
|
width:325px;
|
|
}
|
|
|
|
|
|
/* Big box with list of options */
|
|
#ajax_listOfOptions{
|
|
position:absolute; /* Never change this one */
|
|
width:324px; /* Width of box */
|
|
height:200px; /* Height of box */
|
|
overflow:auto; /* Scrolling features */
|
|
border:1px solid #6487DC; /* Dark blue border */
|
|
background-color:#FFF; /* White background color */
|
|
text-align:left;
|
|
font-family : verdana, arial;
|
|
z-index:10000;
|
|
}
|
|
#ajax_listOfOptions div{ /* General rule for both .optionDiv and .optionDivSelected */
|
|
margin:1px;
|
|
padding:1px;
|
|
cursor:pointer;
|
|
font-size:0.9em;
|
|
}
|
|
#ajax_listOfOptions .optionDiv{ /* Div for each item in list */
|
|
|
|
}
|
|
#ajax_listOfOptions .optionDivSelected{ /* Selected item in the list */
|
|
background-color:#D6DFF7;
|
|
color:#002276;
|
|
font-family : verdana, arial;
|
|
font-weight : bold;
|
|
}
|
|
#ajax_listOfOptions_iframe{
|
|
background-color:#F00;
|
|
position:absolute;
|
|
z-index:500;
|
|
}
|
|
|
|
form{
|
|
display:inline;
|
|
}
|
|
|
|
</style>
|
|
|
|
|
|
</head>
|
|
<body>
|
|
<div id=\"overDiv\" style=\"position: absolute; visibility: hidden; z-index: 1000; left: 10px; top: 0px; background-image: none;\"></div>
|
|
|
|
<table cellspacing='0' cellpadding='0' width='100%' border='0'>
|
|
<tr>
|
|
|
|
<td width=\"10\" background=\"../images/box_e1.gif\">
|
|
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
|
<td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_top.gif\" valign=\"top\">
|
|
<img height=\"10\" src=\"../images/blank.gif\" width=\"1\"><br>
|
|
<font class=\"hd\">Stellenantrag für $row_stud[vorname] $row_stud[nachname]</font><br>
|
|
<img height=\"5\" src=\"../images/blank.gif\" width=\"1\"></font></td>
|
|
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e2.gif\">
|
|
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
|
</tr>
|
|
<tr>
|
|
<td width='1%' background='../images/box_l.gif'>
|
|
<img height='1' src='../images/blank.gif' width='22'>
|
|
</td>
|
|
<td>
|
|
<form action="; echo $_SERVER['PHP_SELF'] . "?action=bearb2"; echo" method=\"POST\" name='searchform'>";
|
|
|
|
//Daten an entsprechender Position auslesen über Funktion
|
|
$data = get_data($row_stud[pos], $row_stud[uid]);
|
|
$art = $data[0];
|
|
$abteilung = $data[1];
|
|
$tel_abteilung = $data[2];
|
|
$bezeichnung = $data[3];
|
|
$str = $data[4];
|
|
$plz = $data[5];
|
|
$postfach = $data[6];
|
|
$plz_postfach = $data[7];
|
|
$ort = $data[8];
|
|
$bundesland = $data[9];
|
|
$staat = $data[10];
|
|
$vert1 = $data[11];
|
|
$vert2 = $data[12];
|
|
$vert3 = $data[13];
|
|
$vert4 = $data[14];
|
|
$beg_tag = $data[15];
|
|
$beg_mon = $data[16];
|
|
$beg_jahr = $data[17];
|
|
$end_tag = $data[18];
|
|
$end_mon = $data[19];
|
|
$end_jahr = $data[20];
|
|
|
|
switch($row_stud[pos]){
|
|
case 1:
|
|
$vert = $vert1;
|
|
break;
|
|
case 2:
|
|
$vert = $vert1;
|
|
break;
|
|
case 3:
|
|
$vert = $vert1;
|
|
break;
|
|
case 4:
|
|
$vert = $vert2;
|
|
break;
|
|
case 5:
|
|
$vert = $vert2;
|
|
break;
|
|
case 6:
|
|
$vert = $vert2;
|
|
break;
|
|
case 7:
|
|
$vert = $vert3;
|
|
break;
|
|
case 8:
|
|
$vert = $vert3;
|
|
break;
|
|
case 9:
|
|
$vert = $vert3;
|
|
break;
|
|
case 10:
|
|
$vert = $vert4;
|
|
break;
|
|
case 11:
|
|
$vert = $vert4;
|
|
break;
|
|
case 12:
|
|
$vert = $vert4;
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
echo"
|
|
|
|
<br>
|
|
<table cellspacing='0' width='100%' bgcolor=#6487DC>
|
|
<tr >
|
|
<td colspan='2' width='40%' style='border-style: none; border-width: medium' height='0'>
|
|
<font color='#FFFFFF'><b>Vertiefungsbereich 1:</b></font>
|
|
</td>
|
|
|
|
<td width='60%' style='border-style: none; border-width: medium' height='100'>
|
|
";
|
|
$db = dbconnect();
|
|
|
|
|
|
$query1 = "SELECT vbid, bezeichnung
|
|
FROM stan_vertiefungsbereich
|
|
ORDER BY bezeichnung ASC
|
|
";
|
|
|
|
$result1 = $db->query ($query1)
|
|
or die ("Cannot execute query");
|
|
echo "<select class='select_form' size=\"1\" name=\"vert\">
|
|
|
|
|
|
<option value='x' selected>Bitte wählen Sie einen Vertiefungsbereich </option>";
|
|
while ($row1 = $result1->fetch_array()){
|
|
|
|
echo "<option value='$row1[vbid]'";if($row1[vbid] == $vert){echo " selected ";} echo">$row1[bezeichnung] </option>\n";
|
|
}
|
|
echo"</select>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<br>
|
|
<table cellspacing='0' style='width:100%;'>
|
|
<tr>
|
|
<td width='10%' style='border-style: none; border-width: medium' height='0'>
|
|
|
|
</td>
|
|
<td width='30%' style='border-style: none; border-width: medium' height='0'>
|
|
<b>Art der Praxisstelle*</b>
|
|
</td>
|
|
<td width='60%' style='border-style: none; border-width: medium' height='0'>";
|
|
$db = dbconnect();
|
|
|
|
|
|
|
|
|
|
$query1 = "SELECT artid, bezeichnung
|
|
FROM stan_stellenart
|
|
ORDER BY artid ASC
|
|
";
|
|
|
|
$result1 = $db->query ($query1)
|
|
or die ("Cannot execute query");
|
|
echo "<select class='select_form' size=\"5\" name=\"stellenart1\" id='stellenart1'>";
|
|
while ($row1 = $result1->fetch_array()){
|
|
echo "<option value='$row1[artid]'";if($row1[artid] == 1){echo "selected";}elseif($row1[artid] == $art){echo " selected ";} echo">$row1[bezeichnung] </option>\n";
|
|
}
|
|
|
|
echo"</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width='10%' style='border-style: none; border-width: medium' height='0'>
|
|
|
|
</td>
|
|
<td width='30%' style='border-style: none; border-width: medium' height='0'>
|
|
<b>Bezeichnung der Praxisstelle*:</b>
|
|
</td>
|
|
<td width='60%' style='border-style: none; border-width: medium' height='0'>
|
|
|
|
<!--<input type='text' name='bezeichnung1'id='bezeichnung1' size='50'>-->
|
|
<input type=\"text\" id=\"bezeichnung1\" name=\"bezeichnung1\" value=\"$bezeichnung\" onkeyup=\"ajax_showOptions(this,'getStadt',event,'1')\" size=\"50\">
|
|
<input type=\"hidden\" id=\"bezeichnung_hidden1\" name=\"bezeichnung_ID1\"><!-- THE ID OF the textstelle will be inserted into this hidden input -->";
|
|
$titel = "Suchfunktion";
|
|
$text = "Für Behörden ist eine Suchfunktion über PLZ und Ort hinterlegt. Wenn die gewünschte Praxisstelle nicht vorhanden ist, bitte manuell eintragen - z.B. Daimler AG.";
|
|
echo"<a href=\"javascript:void(0);\" onmouseover=\"return overlib('$text',ABOVE, TEXTFONTCLASS,'text_overlib', WIDTH, 350, CAPTION, '$titel',CAPTIONSIZE, '10px');\" onmouseout=\"nd();\"><img border=\"0\" src=\"../images/i.jpg\"></a>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width='10%' style='border-style: none; border-width: medium' height='0'>
|
|
|
|
</td>
|
|
<td width='30%' style='border-style: none; border-width: medium' height='0'>
|
|
<b>Straße und Hausnummer der Praxisstelle*:</b>
|
|
</td>
|
|
<td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
|
|
<input type='text' id='str1' name='str1' value='$str' size='50'>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width='10%' style='border-style: none; border-width: medium' height='0'>
|
|
|
|
</td>
|
|
<td width='30%' style='border-style: none; border-width: medium' height='0'>
|
|
<b>PLZ Ort*:</b>
|
|
</td>
|
|
<td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
|
|
<input type='text' name='plz1' id='plz1' value='$plz' size='5'> <input type='text' name='ort1' value='$ort' id='ort1' size='40'>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width='10%' style='border-style: none; border-width: medium' height='0'>
|
|
|
|
</td>
|
|
<td width='30%' style='border-style: none; border-width: medium' height='0'>
|
|
<b>PLZ Postfach:</b>
|
|
</td>
|
|
<td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
|
|
<input type='text' name='plz_postfach1' value='$plz_postfach' id='plz_postfach1' size='5'> <input type='text' name='postfach1' value='$postfach' id='postfach1' size='40'>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width='10%' style='border-style: none; border-width: medium' height='0'>
|
|
|
|
</td>
|
|
<td width='30%' style='border-style: none; border-width: medium' height='0'>
|
|
<b>Bundesland*:</b>
|
|
</td>
|
|
<td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
|
|
<input type='text' name='bundesland1' value='$bundesland' id='bundesland1' size='50'>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width='10%' style='border-style: none; border-width: medium' height='0'>
|
|
|
|
</td>
|
|
<td width='30%' style='border-style: none; border-width: medium' height='0'>
|
|
<b>Staat*:</b>
|
|
</td>
|
|
<td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
|
|
<input type='text' name='staat1' value='$staat' id='staat1' size='50'>
|
|
</td>
|
|
</tr>
|
|
<td width='10%' style='border-style: none; border-width: medium' height='0'>
|
|
|
|
</td>
|
|
<td width='30%' style='border-style: none; border-width: medium' height='0'>
|
|
<b>Zeitraum bei dieser Praxisstelle*: </b>
|
|
</td>
|
|
<td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
|
|
<input type='text' name='beg_tag1' id='beg_tag1' value='$beg_tag' size=1>.<input type='text' name='beg_mon1' id='beg_mon1'value='$beg_mon' size=1>.<input type='text' name='beg_jahr1' id='beg_jahr1' value='$beg_jahr' size=3>
|
|
|
|
<script language='JavaScript' type='text/javascript'>
|
|
<!--
|
|
beg_cal1 = new dynCalendar('beg_cal1', 'calendarCallback', 'images/', '', '1');
|
|
//-->
|
|
</script> bis
|
|
<input type='text' name='ende_tag1' id='ende_tag1' value='$end_tag' size=1>.<input type='text' name='ende_mon1' id='ende_mon1'value='$end_mon' size=1>.<input type='text' name='ende_jahr1' id='ende_jahr1' value='$end_jahr' size=3>
|
|
|
|
<script language='JavaScript' type='text/javascript'>
|
|
<!--
|
|
end_cal1 = new dynCalendar('end_cal1', 'calendarCallback_end', 'images/', '', '1');
|
|
//-->
|
|
</script>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width='10%' style='border-style: none; border-width: medium' height='0'>
|
|
|
|
</td>
|
|
<td width='30%' style='border-style: none; border-width: medium' height='0'>
|
|
<b>Abteilung:</b>
|
|
</td>
|
|
<td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
|
|
<input type='text' name='abteilung1' value='$abteilung' id='abteilung1' size='50'>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width='10%' style='border-style: none; border-width: medium' height='0'>
|
|
|
|
</td>
|
|
<td width='30%' style='border-style: none; border-width: medium' height='0'>
|
|
<b>Tel. der Abteilung:</b>
|
|
</td>
|
|
<td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
|
|
<input type='text' name='telabteilung1' value='$tel_abteilung' id='telabteilung1' size='50'>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<br>
|
|
|
|
|
|
|
|
<hr>
|
|
<br>
|
|
* = Pflichtfelder<br><br>
|
|
<p align='center'>
|
|
|
|
<input name='Abschicken' src='../images/speichern.gif' style='border:0;' type='image'> <a href=".$_SERVER['PHP_SELF'] ."?action=ubersicht&uid=$row_stud[uid]><img border=\"0\" src=\"../images/abbrechen.gif\"></a>
|
|
</p>
|
|
</form>
|
|
</td>
|
|
<td width='1%' background='../images/box_r.gif'>
|
|
<img height='1' src='../images/blank.gif' width='22'></td>
|
|
</tr>
|
|
<tr>
|
|
<td nowrap='nowrap' align='left' width='1%' background='../images/box_e3.gif'>
|
|
<img height='16' src='../images/blank.gif' width='22'></td>
|
|
<td nowrap='nowrap' align='left' width='98%' background='../images/box_bottom.gif'>
|
|
<img height='16' src='../images/blank.gif' width='8'></td>
|
|
<td nowrap='nowrap' align='right' width='1%' background='../images/box_e4.gif'>
|
|
<img height='16' src='../images/blank.gif' width='22'> </td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</body>
|
|
</html>";
|
|
break;
|
|
case "bearb2":
|
|
$saaid=$_COOKIE["ck_saaid"];
|
|
$vertiefungsbereich = $_POST[vert];
|
|
$stellenart = $_POST[stellenart1];
|
|
$bezeichnung = $_POST[bezeichnung1];
|
|
$str = $_POST[str1];
|
|
$postfach = $_POST[postfach1];
|
|
$plz_postfach = $_POST[plz_postfach1];
|
|
$plz = $_POST[plz1];
|
|
$ort = $_POST[ort1];
|
|
$bundesland = $_POST[bundesland1];
|
|
$staat = $_POST[staat1];
|
|
$beginndatum = $_POST[beg_jahr1].'-'.$_POST[beg_mon1].'-'.$_POST[beg_tag1];
|
|
$enddatum = $_POST[ende_jahr1].'-'.$_POST[ende_mon1].'-'.$_POST[ende_tag1];
|
|
$abteilung = $_POST[abteilung1];
|
|
$telabteilung = $_POST[telabteilung1];
|
|
|
|
|
|
## Dienstellen prüfen, ob es eine eigeneist, oder ob sie aus der Datenbank übernommen wurde.
|
|
$res = $db->query("SELECT dst_id FROM stan_dienststellen WHERE bez='$bezeichnung' AND str='$str' AND plz='$plz' AND ort='$ort' AND postfach='$postfach' AND plz_postfach='$plz_postfach'");
|
|
$row_key = $res->fetch_array();
|
|
|
|
|
|
## Entweder es gibt zur DSTS einen Schlüssel, oder es wird einer angelegt und DS in tmp Tabelle gespeichert, bis Admin sie umträgt
|
|
if($row_key[dst_id] == ''){
|
|
|
|
$res2 = $db->query("SELECT dst_id FROM stan_dienststellen_tmp WHERE bez='$bezeichnung' AND str='$str' AND plz='$plz' AND ort='$ort' AND postfach='$postfach' AND plz_postfach='$plz_postfach'");
|
|
$row_key2 = $res2->fetch_array();
|
|
|
|
if($row_key2[dst_id] == ''){
|
|
## Herausfinden, welches die max Dienststellen ID ist. Simulation einer Sequence
|
|
$res1 = $db->query("SELECT max(dst_id)+1 next FROM stan_dienststellen");
|
|
$row_next1 = $res1->fetch_array();
|
|
|
|
$res2 = $db->query("SELECT max(dst_id)+1 next FROM stan_dienststellen_tmp");
|
|
$row_next2 = $res2->fetch_array();
|
|
|
|
if($row_next1[next] >= $row_next2[next]){
|
|
$dst_id = $row_next1[next];
|
|
}else{
|
|
$dst_id = $row_next2[next];
|
|
}
|
|
|
|
$db = dbconnect();
|
|
$res_stellanrt = $db->query("SELECT Merkmal
|
|
FROM stan_stellenart
|
|
WHERE artid='$stellenart'
|
|
");
|
|
$row_art = $res_stellanrt->fetch_array();
|
|
|
|
if($row_art[Merkmal] == 'A' AND $bezeichnung == ''){ //wenn Textfelder bei Auslandspraktikum leer gelassen werden, dann wird 0 als dst_id eingetragen. Dies geht nur mit bei Ausland (StellenartID=6)
|
|
$dst_id = 0;
|
|
}
|
|
|
|
|
|
$sql = $db->query ("INSERT INTO stan_dienststellen_tmp (dst_id, bez, str, plz_postfach, postfach, plz, ort, bundesland, staat)
|
|
VALUES ($dst_id, '$bezeichnung', '$str', '$plz_postfach', '$postfach', '$plz', '$ort', '$bundesland', '$staat')");
|
|
|
|
## geht nicht, das Feld schon AS in der DB heißt. Jetzt wird halt eine neue Zeile in tmp Tabelle mit keinem Eintrag angelegt.
|
|
if($row_art[Merkmal] == 'A' AND $bezeichnung == ''){ //Wenn Auslandspraktikum leer gelassen wird, soll nicht ein leerer Ort in die tmp Tabelle eingetragen werden.
|
|
$result_tmp1 = $db->query("DELETE FROM stan_dienststellen_tmp WHERE dst_id='$dst_id'");
|
|
}
|
|
}else{
|
|
$dst_id = $row_key2[dst_id]; // wenn adresse in tmp Tabelle vorhanden ist.
|
|
}
|
|
}else{
|
|
$dst_id = $row_key[dst_id]; // wenn adresse in dst Tabelle vorhanden ist.
|
|
}
|
|
|
|
$sql = $db->query ("UPDATE stan_antrag
|
|
SET vert_bereich = '$vertiefungsbereich'
|
|
, art = '$stellenart'
|
|
, dst_id = '$dst_id'
|
|
, beginn = '$beginndatum'
|
|
, ende = '$enddatum'
|
|
, abteilung = '$abteilung'
|
|
, tel_abteilung = '$telabteilung'
|
|
WHERE saaid='$saaid'");
|
|
|
|
$db = dbconnect();
|
|
$result = $db->query("SELECT uid
|
|
FROM stan_antrag
|
|
WHERE saaid='$saaid'");
|
|
|
|
$row_stud = $result->fetch_array();
|
|
|
|
|
|
echo "<meta http-equiv=\"refresh\" content=\"0; URL=".$_SERVER['PHP_SELF'] ."?action=ubersicht&uid=$row_stud[uid]\">";
|
|
|
|
} // Ende Action script
|
|
?>
|