stellenantrag_neu/stud/antrag-mit splitt.php
2022-11-28 09:17:05 +01:00

1421 lines
65 KiB
PHP
Executable File

<?php
include("kurs/datenbankanbindung.php"); // f&uuml;gt die Datenbankanbindung ein: Sys:\php\includes\kurs\datenbankanbindung.php
require("func_check_vertiefungsbereich.php"); // Prüft, ob doppelte Vertiefungsbereiche abgegeben werden.
require("func_pflichtfelder.php"); // Prüft, ob Pflichtfelder ausgefüllt wurden
require("func_vertiefungsbereich.php"); // Prüft, ob vertiefungsbereich gewählt wurde, wenn Stellen erfasst sind.
require("func_anz_stellen.php"); // Prüft, ob mehr als 3 Stellen beantragt werden pro Vertiefungsbereich
$uid1=$_COOKIE["uid1"];
if ($uid1 == ""){ include("kurs/anmeldefehler_subdir.php"); exit;} //Wenn man nicht angemeldet ist soll man nichts ausw&auml;hlen k&ouml;nnen
$db = dbconnect();
include("kurs/sta/stan_useronline_write.php"); // F&uuml;r Statistik, wieviele User online sind
// &Uuml;Berpr&uuml;fung, ob die Anmeldefrist &uuml;berschritten ist
$heute = mktime(0, 0, 0, date("m"), date("d"), date("Y")); // heutiges Datum
$heute_format = date("Y-m-d", $heute); // ISO-8601 Format wie in der Datenbank: Formatierung f&uuml;r Vergleiche erforderlich
$res = $db->query("SELECT Jahrgang FROM stud WHERE uid='$uid1'");
$stud_jahr = $res->fetch_array();
$anm_schluss = $db->query("SELECT DATE_Format(anmeldebeginn, '%Y-%m-%d')AS beginndatum, DATE_Format(anmeldebeginn, '%d.%m.%Y um %H:%i:%s Uhr')AS beginnform, DATE_Format(anmeldeschluss, '%Y-%m-%d')AS enddatum
FROM stan_frist
WHERE jahrgang=\"$stud_jahr[Jahrgang]\"");
$row_schluss = $anm_schluss->fetch_array(); // Herausfinden des Beginn- Schlussdatums
$a = strtotime ($heute_format); //Umrechnung des Fristgrenztages in eine Zahl
$b = strtotime ($row_schluss[enddatum]); // Umrechnung des Enddatums in eine Zahl
$c = strtotime ($row_schluss[beginndatum]); // Umrechnung des Beginndatums in eine Zahl
if ($a < $c){
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>Anmeldungen noch nicht m&ouml;glich!</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\">Anmeldungen noch nicht m&ouml;glich!</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>Antr&auml;ge sind erst ab $row_schluss[beginnform] m&ouml;glich!</b>
</p>
<p align=\"center\"><a href=\"hauptframe.php\">
<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;
} // Ende &Uuml;berpr&uuml;fung der Zeit&uuml;berschreitung
if ($a >= $b){
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>Anmeldezeit vertstrichen</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\">Anmeldezeit vertstrichen</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\">Antr&auml;ge sind derzeit nicht m&ouml;glich!<br>Es sind nur noch <a href=\"antrag_aend.php\">Änderungsanträge</a> möglich
</p>
<p align=\"center\"><a href=\"hauptframe.php\">
<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;
} // Ende &Uuml;berpr&uuml;fung der Zeit&uuml;berschreitung
# Wenn Erstanträge abgesendet wurden, dürfen keine Stellen mehr vorgemerkt werden
$res2 = $db->query("SELECT distinct status
FROM stan_antrag
WHERE uid='$uid1'
LIMIT 1");
$stud_status = $res2->fetch_array();
if($stud_status[status] == '0'){
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>Anmeldungen noch nicht m&ouml;glich!</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\">Anmeldungen nicht m&ouml;glich!</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>Sie haben bereits die Erstanträge gespeichert<br>
Es sind nur noch Änderungsanträge möglich</b>
</p>
<p align=\"center\"><a href=\"hauptframe.php\">
<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 (isset($_GET['action']))
$action = $_GET['action'];
else
$action = "";
switch($action){
default:
$db = dbconnect();
$result = $db->query("SELECT nachname, vorname, jahrgang, stg FROM stud where uid=\"$uid1\"");
$row = $result->fetch_array();
$anm_schluss = $db->query("SELECT DATE_Format(anmeldeschluss, '%d.%m.%Y um %H:%i:%s Uhr') anmeldeschluss, DATE_Format(antrag_von, '%d.%m.%Y') antrag_von, DATE_Format(antrag_bis, '%d.%m.%Y') antrag_bis
FROM stan_frist
WHERE jahrgang='$row[jahrgang]'");
$row_schluss = $anm_schluss->fetch_array(); // Auslesen des Datenbankdatum, um davon ein Tag abziehen zu k&ouml;nnen
echo"
<html>
<head>
<link rel=\"stylesheet\" href=\"../styles_pc.css\" type=\"text/css\">
<script type=\"text/javascript\" src=\"livesearch/ajax.js\"></script>
<script type=\"text/javascript\" src=\"livesearch/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>
<style type=\"text/css\">
select{
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>
<script type=\"text/javascript\">
function start(){
document.getElementById('DivName3').style.display='none';
document.getElementById('DivName6').style.display='none';
document.getElementById('DivName9').style.display='none';
document.getElementById('DivName12').style.display='none';
if(document.getElementById('stellenart2').value != '1'){ splitt1('stell2', 'DivName2', '2');}
if(document.getElementById('stellenart3').value != '1'){document.getElementById('DivName3').style.display='block';splitt1('stell3', 'DivName3', '3');}
if(document.getElementById('stellenart5').value != '1'){splitt2('stell5', 'DivName5', '5');}
if(document.getElementById('stellenart6').value != '1'){document.getElementById('DivName6').style.display='block';splitt2('stell6', 'DivName6', '6');}
if(document.getElementById('stellenart8').value != '1'){splitt3('stell8', 'DivName8', '8');}
if(document.getElementById('stellenart9').value != '1'){document.getElementById('DivName9').style.display='block';splitt3('stell9', 'DivName9', '9');}
if(document.getElementById('stellenart11').value != '1'){splitt4('stell11', 'DivName11', '11');}
if(document.getElementById('stellenart12').value != '1'){document.getElementById('DivName12').style.display='block';splitt4('stell12', 'DivName12', '12');}
// beim Seitenload pro Vertiefungsbereich den zweiten Splitt-Button ausblenden
// If Abfragen dienen dazu, wenn nach dem Absenden wieder zurück geklickt wird,
// dann wird geprüft, ob in den gesplitteten Zeiträumen eine Stellenart ausgewählt wurde.
// Wenn ja, wird der sonst(beim Seitenladen) ausgeblendete splittbereich eingeblendet und der ggf. Splittbutton angezeigt.
}
</script>
</head>
<body onload=\"start();\">";
$result = $db->query ("SELECT count(*) Anz
FROM stan_antrag t1
WHERE t1.status = (
SELECT MAX(t2.status)
FROM stan_antrag t2
WHERE t1.aendid = t2.aendid
)
AND t1.uid = '$uid1'
AND t1.status = '-1'
AND (t1.zuweisung is NULL OR t1.zuweisung='Z')
");
$row3 = $result->fetch_array();
if($row3[Anz] > 0){
echo"
<!--
Übersicht Anfang
-->
<table border=\"0\" style=\"border-collapse: collapse\" width=\"100%\" cellpadding=\"0\" id=\"table1\">
<tr>
<td>
<div align=\"center\">
<table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" border=\"0\">
<tr>
<td width=\"10\" background=\"../images/box_e1a.gif\">
<img height=\"10\" src=\"../images/blank.gif\" width=\"22\"></td>
<td align=\"left\" width=\"98%\" background=\"../images/box_top1.gif\" valign=\"top\">
<img height=\"10\" src=\"../images/blank.gif\" width=\"1\"><br>
<img height=\"5\" src=\"../images/blank.gif\" width=\"1\"></font></td>
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e2a.gif\">
<img height=\"10\" 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>";
$query = "SELECT t1.saaid
, t1.dst_id
, DATE_Format(t1.beginn, '%d.%m.%Y') beginn
, DATE_Format(t1.ende, '%d.%m.%Y') ende
, DATE_FORMAT(t1.beginn, '%Y%m%d') beginnform
, t1.vert_bereich
FROM stan_antrag t1
WHERE t1.status = (
SELECT MAX(t2.status)
FROM stan_antrag t2
WHERE t1.aendid = t2.aendid
)
AND t1.uid = '$uid1'
AND t1.status = '-1'
AND (t1.zuweisung is NULL OR t1.zuweisung='Z')
ORDER BY beginnform ASC
";
$result = $db->query ($query)
or die ("Cannot execute query");
echo"<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-width:0; border-collapse: collapse\" bordercolor=\"#111111\" width=\"100%\" id=\"AutoNumber1\">
<tr>
<td style=\"border-style: none; border-width: medium\">
<b>Bezeichnung</b>
</td>
<td align=\"left\" style=\"border-style: none; border-width: medium\">
<b>Vertiefungsbereich</b>
</td>
<td align=\"left\" style=\"border-style: none; border-width: medium\">
<b>Zeitraum</b>
</td>
</tr>";
while ($row3 = $result->fetch_array()){
$result5 = $db->query("SELECT concat(bezeichnung, ' ',name) name, ort
FROM stan_dienststellen
WHERE dst_id ='$row3[dst_id]'");
$row5 = $result5->fetch_array();
$result6 = $db->query("SELECT bez, ort
FROM stan_dienststellen_tmp
WHERE dst_id ='$row3[dst_id]'");
$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>[Daten bitte nachtragen]</i>';
$ort = '';
}
$result1 = $db->query ("SELECT bezeichnung
FROM stan_vertiefungsbereich
WHERE vbid = $row3[vert_bereich]
");
$row_vert = $result1->fetch_array();
echo"
<tr>
<td style=\"border-style: none; border-width: medium\">
$bezeichnung
</td>
<td align=\"left\" style=\"border-style: none; border-width: medium\">
$row_vert[bezeichnung]
</td>
<td align=\"left\" style=\"border-style: none; border-width: medium\">
$row3[beginn] - $row3[ende]
</td>
</tr>";
}
echo"</table>
</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>
<br>
</div>
</td>
</tr>
</table>
<!--
Übersicht Ende
-->";
}
echo"
<script type=\"text/javascript\" language=\"JavaScript\">
<!--
function splitt1(a, b, c){
var e=document.getElementById(a);
if(!e)return true;
if(e.style.display==\"none\"){
e.style.display=\"block\"
document.getElementById(b).innerHTML='<table width=10% bgcolor=#6487DC><tr><td onMouseOver=\"this.style.cursor=\"hand\";\" align=center><font color=\"#FFFFFF\"><b>löschen</b></font></td></tr></table>';
if(b == 'DivName2'){
document.getElementById('DivName3').style.display='block';
}
} else {
e.style.display=\"none\"
document.getElementById(b).innerHTML='<table width=10% bgcolor=#6487DC><tr><td onMouseOver=\"this.style.cursor=\"hand\";\" align=center><font color=\"#FFFFFF\"><b>splitten</b></font></td></tr></table>';
document.getElementById('stellenart'+c).selectedIndex = 0;
document.getElementById('str'+c).value = '';
document.getElementById('bezeichnung'+c).value = '';
document.getElementById('postfach'+c).value = '';
document.getElementById('plz_postfach'+c).value = '';
document.getElementById('plz'+c).value = '';
document.getElementById('ort'+c).value = '';
document.getElementById('bundesland'+c).value = '';
document.getElementById('staat'+c).value = '';
document.getElementById('beg_tag'+c).value = '';
document.getElementById('beg_mon'+c).value = '';
document.getElementById('beg_jahr'+c).value = '';
document.getElementById('ende_tag'+c).value = '';
document.getElementById('ende_mon'+c).value = '';
document.getElementById('ende_jahr'+c).value = '';
document.getElementById('abteilung'+c).value = '';
document.getElementById('telabteilung'+c).value = '';
}
return true;
}
function splitt2(a, b, c){
var e=document.getElementById(a);
if(!e)return true;
if(e.style.display==\"none\"){
e.style.display=\"block\"
document.getElementById(b).innerHTML='<table width=10% bgcolor=#6487DC><tr><td onMouseOver=\"this.style.cursor=\"hand\";\" align=center><font color=\"#FFFFFF\"><b>löschen</b></font></td></tr></table>';
if(b == 'DivName5'){
document.getElementById('DivName6').style.display='block';
}
} else {
e.style.display=\"none\"
document.getElementById(b).innerHTML='<table width=10% bgcolor=#6487DC><tr><td onMouseOver=\"this.style.cursor=\"hand\";\" align=center><font color=\"#FFFFFF\"><b>splitten</b></font></td></tr></table>';
document.getElementById('stellenart'+c).selectedIndex = 0;
document.getElementById('str'+c).value = '';
document.getElementById('bezeichnung'+c).value = '';
document.getElementById('postfach'+c).value = '';
document.getElementById('plz_postfach'+c).value = '';
document.getElementById('plz'+c).value = '';
document.getElementById('ort'+c).value = '';
document.getElementById('bundesland'+c).value = '';
document.getElementById('staat'+c).value = '';
document.getElementById('beg_tag'+c).value = '';
document.getElementById('beg_mon'+c).value = '';
document.getElementById('beg_jahr'+c).value = '';
document.getElementById('ende_tag'+c).value = '';
document.getElementById('ende_mon'+c).value = '';
document.getElementById('ende_jahr'+c).value = '';
document.getElementById('abteilung'+c).value = '';
document.getElementById('telabteilung'+c).value = '';
}
return true;
}
function splitt3(a, b, c){
var e=document.getElementById(a);
if(!e)return true;
if(e.style.display==\"none\"){
e.style.display=\"block\"
document.getElementById(b).innerHTML='<table width=10% bgcolor=#6487DC><tr><td onMouseOver=\"this.style.cursor=\"hand\";\" align=center><font color=\"#FFFFFF\"><b>löschen</b></font></td></tr></table>';
if(b == 'DivName8'){
document.getElementById('DivName9').style.display='block';
}
} else {
e.style.display=\"none\"
document.getElementById(b).innerHTML='<table width=10% bgcolor=#6487DC><tr><td onMouseOver=\"this.style.cursor=\"hand\";\" align=center><font color=\"#FFFFFF\"><b>splitten</b></font></td></tr></table>';
document.getElementById('stellenart'+c).selectedIndex = 0;
document.getElementById('str'+c).value = '';
document.getElementById('bezeichnung'+c).value = '';
document.getElementById('postfach'+c).value = '';
document.getElementById('plz_postfach'+c).value = '';
document.getElementById('plz'+c).value = '';
document.getElementById('ort'+c).value = '';
document.getElementById('bundesland'+c).value = '';
document.getElementById('staat'+c).value = '';
document.getElementById('beg_tag'+c).value = '';
document.getElementById('beg_mon'+c).value = '';
document.getElementById('beg_jahr'+c).value = '';
document.getElementById('ende_tag'+c).value = '';
document.getElementById('ende_mon'+c).value = '';
document.getElementById('ende_jahr'+c).value = '';
document.getElementById('abteilung'+c).value = '';
document.getElementById('telabteilung'+c).value = '';
}
return true;
}
function splitt4(a, b, c){
var e=document.getElementById(a);
if(!e)return true;
if(e.style.display==\"none\"){
e.style.display=\"block\"
document.getElementById(b).innerHTML='<table width=10% bgcolor=#6487DC><tr><td onMouseOver=\"this.style.cursor=\"hand\";\" align=center><font color=\"#FFFFFF\"><b>löschen</b></font></td></tr></table>';
if(b == 'DivName11'){
document.getElementById('DivName12').style.display='block';
}
} else {
e.style.display=\"none\"
document.getElementById(b).innerHTML='<table width=10% bgcolor=#6487DC><tr><td onMouseOver=\"this.style.cursor=\"hand\";\" align=center><font color=\"#FFFFFF\"><b>splitten</b></font></td></tr></table>';
document.getElementById('stellenart'+c).selectedIndex = 0;
document.getElementById('str'+c).value = '';
document.getElementById('bezeichnung'+c).value = '';
document.getElementById('postfach'+c).value = '';
document.getElementById('plz_postfach'+c).value = '';
document.getElementById('plz'+c).value = '';
document.getElementById('ort'+c).value = '';
document.getElementById('bundesland'+c).value = '';
document.getElementById('staat'+c).value = '';
document.getElementById('beg_tag'+c).value = '';
document.getElementById('beg_mon'+c).value = '';
document.getElementById('beg_jahr'+c).value = '';
document.getElementById('ende_tag'+c).value = '';
document.getElementById('ende_mon'+c).value = '';
document.getElementById('ende_jahr'+c).value = '';
document.getElementById('abteilung'+c).value = '';
document.getElementById('telabteilung'+c).value = '';
}
return true;
}
//-->
</script>
<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[vorname] $row[nachname]</font><br>
<span class='sh'>Anträge können bis zum <font color='red'><b>$row_schluss[0]</b></font> abgegeben werden<br>
Antragszeitraum: <font color='red'><b>$row_schluss[antrag_von] - $row_schluss[antrag_bis]</b></font>
</span>
<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=persdat"; echo" method=\"POST\" name='searchform'>";
for ($i= 1;$i<= 4;$i++) // 4 Vertiefungsbereiche, daher 4 mal die Schleife
{
$j = $j+1; // läuft dann von 1 bis 12
echo"
<table width='100%' bgcolor=#6487DC>
<tr>
<td width='60%' style='border-style: none; border-width: medium' height='0'>
<font color='#FFFFFF'><b>Vertiefungsbereich $i:</b></font>
";
$db = dbconnect();
$query1 = "SELECT vbid, bezeichnung
FROM stan_vertiefungsbereich
ORDER BY bezeichnung ASC
";
$result1 = $db->query ($query1)
or die ("Cannot execute query");
echo "<select size=\"1\" name=\"vert$i\">
<option value='x'>Bitte wählen Sie ein Vertiefungsbereich&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</option>";
while ($row1 = $result1->fetch_array()){
echo "<option value='$row1[vbid]'>$row1[bezeichnung]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</option>\n";
}
echo"
</td>
</tr>
</table>
<table cellspacing='0' style='width:100%;'>
<tr>
<td width='10%' style='border-style: none; border-width: medium' height='0'>
&nbsp;
</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 size=\"5\" name=\"stellenart$j\" id='stellenart$j'>";
while ($row1 = $result1->fetch_array()){
echo "<option value='$row1[artid]'";if($row1[artid] == 1){echo "selected";} echo">$row1[bezeichnung]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</option>\n";
}
echo"
</td>
</tr>
<tr>
<td width='10%' style='border-style: none; border-width: medium' height='0'>
&nbsp;
</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='bezeichnung$j'id='bezeichnung$j' size='50'>-->
<input type=\"text\" id=\"bezeichnung$j\" name=\"bezeichnung$j\" value=\"\" onkeyup=\"ajax_showOptions(this,'getStadt',event,$j)\" size=\"50\">
<input type=\"hidden\" id=\"bezeichnung_hidden$j\" name=\"bezeichnung_ID$j\"><!-- THE ID OF the textstelle will be inserted into this hidden input -->
</td>
</tr>
<tr>
<td width='10%' style='border-style: none; border-width: medium' height='0'>
&nbsp;
</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='str$j' name='str$j' size='50'>
</td>
</tr>
<tr>
<td width='10%' style='border-style: none; border-width: medium' height='0'>
&nbsp;
</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='plz$j' id='plz$j' size='5'>&nbsp;<input type='text' name='ort$j' id='ort$j' size='40'>
</td>
</tr>
<tr>
<td width='10%' style='border-style: none; border-width: medium' height='0'>
&nbsp;
</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_postfach$j' id='plz_postfach$j' size='5'>&nbsp;<input type='text' name='postfach$j' id='postfach$j' size='40'>
</td>
</tr>
<tr>
<td width='10%' style='border-style: none; border-width: medium' height='0'>
&nbsp;
</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='bundesland$j' id='bundesland$j' size='50'>
</td>
</tr>
<tr>
<td width='10%' style='border-style: none; border-width: medium' height='0'>
&nbsp;
</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='staat$j' id='staat$j' size='50'>
</td>
</tr>
<td width='10%' style='border-style: none; border-width: medium' height='0'>
&nbsp;
</td>
<td width='30%' style='border-style: none; border-width: medium' height='0'>
<b>Zeitraum der bei dieser Praxisstelle*: </b>
</td>
<td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
<input type=\"text\" name=\"beg_tag$j\" id='beg_tag$j' size=\"1\" value='TT' onFocus=\"if(this.value=='TT'){ this.value='';}\">.<input type=\"text\" name=\"beg_mon$j\" id='beg_mon$j' value='MM' ID=\"text1\" size=\"1\" onFocus=\"if(this.value=='MM'){ this.value='';}\">.<input type=\"text\" name='beg_jahr$j' id='beg_jahr$j' ID=\"text1\" value='JJJJ' size=\"3\" onFocus=\"if(this.value=='JJJJ'){ this.value='';}\">
bis
<input type=\"text\" name=\"ende_tag$j\" id='ende_tag$j' ID=\"text\" size=\"1\" value='TT' onFocus=\"if(this.value=='TT'){ this.value='';}\">.<input type=\"text\" name=\"ende_mon$j\" id='ende_mon$j' value='MM' ID=\"text1\" size=\"1\" onFocus=\"if(this.value=='MM'){ this.value='';}\">.<input type=\"text\" name=\"ende_jahr$j\" id='ende_jahr$j' ID=\"text1\" value='JJJJ' size=\"3\" onFocus=\"if(this.value=='JJJJ'){ this.value='';}\">
</td>
</tr>
<tr>
<td width='10%' style='border-style: none; border-width: medium' height='0'>
&nbsp;
</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='abteilung$j' id='abteilung$j' size='50'>
</td>
</tr>
<tr>
<td width='10%' style='border-style: none; border-width: medium' height='0'>
&nbsp;
</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='telabteilung$j' id='telabteilung$j' size='50'>
</td>
</tr>
</table>
<br>";
$j = $j + 1;
echo"
<p align=right>
<a onclick=\"return splitt$i('stell$j', 'DivName$j', '$j')\" href=\"javascript:void(0)\"><div id='DivName$j' onMouseOver=\"this.style.cursor='hand'\"><table width=10% bgcolor=#6487DC><tr><td onMouseOver=\"this.style.cursor=\"hand\";\" align=center><font color=\"#FFFFFF\"><b>splitten</b></font></td></tr></table></div></a>
</p>
<div id=\"stell$j\" style=\"display: none;\">
<table cellspacing='0' style='width:100%;'>
<tr>
<td width='10%' style='border-style: none; border-width: medium' height='0'>
&nbsp;
</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 size=\"5\" name=\"stellenart$j\" id='stellenart$j'>";
while ($row1 = $result1->fetch_array()){
echo "<option value='$row1[artid]'";if($row1[artid] == 1){echo "selected";} echo">$row1[bezeichnung]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</option>\n";
}
echo"
</td>
</tr>
<tr>
<td width='10%' style='border-style: none; border-width: medium' height='0'>
&nbsp;
</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='bezeichnung$j'id='bezeichnung$j' size='50'>-->
<input type=\"text\" id=\"bezeichnung$j\" name=\"bezeichnung$j\" value=\"\" onkeyup=\"ajax_showOptions(this,'getStadt',event,$j)\" size=\"50\">
<input type=\"hidden\" id=\"bezeichnung_hidden$j\" name=\"bezeichnung_ID$j\"><!-- THE ID OF the textstelle will be inserted into this hidden input -->
</td>
</tr>
<tr>
<td width='10%' style='border-style: none; border-width: medium' height='0'>
&nbsp;
</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='str$j' name='str$j' size='50'>
</td>
</tr>
<tr>
<td width='10%' style='border-style: none; border-width: medium' height='0'>
&nbsp;
</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='plz$j' id='plz$j' size='5'>&nbsp;<input type='text' name='ort$j' id='ort$j' size='40'>
</td>
</tr>
<tr>
<td width='10%' style='border-style: none; border-width: medium' height='0'>
&nbsp;
</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_postfach$j' id='plz_postfach$j' size='5'>&nbsp;<input type='text' name='postfach$j' id='postfach$j' size='40'>
</td>
</tr>
<tr>
<td width='10%' style='border-style: none; border-width: medium' height='0'>
&nbsp;
</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='bundesland$j' id='bundesland$j' size='50'>
</td>
</tr>
<tr>
<td width='10%' style='border-style: none; border-width: medium' height='0'>
&nbsp;
</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='staat$j' id='staat$j' size='50'>
</td>
</tr>
<td width='10%' style='border-style: none; border-width: medium' height='0'>
&nbsp;
</td>
<td width='30%' style='border-style: none; border-width: medium' height='0'>
<b>Zeitraum der bei dieser Praxisstelle*: </b>
</td>
<td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
<input type=\"text\" name=\"beg_tag$j\" id='beg_tag$j' ID=\"text\" size=\"1\" value='TT' onFocus=\"if(this.value=='TT'){ this.value='';}\">.<input type=\"text\" name=\"beg_mon$j\" id='beg_mon$j' value='MM' ID=\"text1\" size=\"1\" onFocus=\"if(this.value=='MM'){ this.value='';}\">.<input type=\"text\" name='beg_jahr$j' id='beg_jahr$j' ID=\"text2\" value='JJJJ' size=\"3\" onFocus=\"if(this.value=='JJJJ'){ this.value='';}\">
bis
<input type=\"text\" name=\"ende_tag$j\" id='ende_tag$j' ID=\"text\" size=\"1\" value='TT' onFocus=\"if(this.value=='TT'){ this.value='';}\">.<input type=\"text\" name=\"ende_mon$j\" id='ende_mon$j' value='MM' ID=\"text1\" size=\"1\" onFocus=\"if(this.value=='MM'){ this.value='';}\">.<input type=\"text\" name=\"ende_jahr$j\" id='ende_jahr$j' ID=\"text2\" value='JJJJ' size=\"3\" onFocus=\"if(this.value=='JJJJ'){ this.value='';}\">
</td>
</tr>
<tr>
<td width='10%' style='border-style: none; border-width: medium' height='0'>
&nbsp;
</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='abteilung$j' id='abteilung$j' size='50'>
</td>
</tr>
<tr>
<td width='10%' style='border-style: none; border-width: medium' height='0'>
&nbsp;
</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='telabteilung$j' id='telabteilung$j' size='50'>
</td>
</tr>
</table>
<br>
</div>
<br><br>";
$j = $j + 1;
echo"
<p align=right>
<a onclick=\"return splitt$i('stell$j', 'DivName$j', '$j')\" href=\"javascript:void(0)\"><div id='DivName$j' onMouseOver=\"this.style.cursor='hand'\"><table width=10% bgcolor=#6487DC><tr><td onMouseOver=\"this.style.cursor=\"hand\";\" align=center><font color=\"#FFFFFF\"><b>splitten</b></font></td></tr></table></div></a>
</p>
<div id=\"stell$j\" style=\"display: none;\">
<table cellspacing='0' style='width:100%;'>
<tr>
<td width='10%' style='border-style: none; border-width: medium' height='0'>
&nbsp;
</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 size=\"5\" name=\"stellenart$j\" id='stellenart$j'>";
while ($row1 = $result1->fetch_array()){
echo "<option value='$row1[artid]'";if($row1[artid] == 1){echo "selected";} echo">$row1[bezeichnung]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</option>\n";
}
echo"
</td>
</tr>
<tr>
<td width='10%' style='border-style: none; border-width: medium' height='0'>
&nbsp;
</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='bezeichnung$j'id='bezeichnung$j' size='50'>-->
<input type=\"text\" id=\"bezeichnung$j\" name=\"bezeichnung$j\" value=\"\" onkeyup=\"ajax_showOptions(this,'getStadt',event,$j)\" size=\"50\">
<input type=\"hidden\" id=\"bezeichnung_hidden$j\" name=\"bezeichnung_ID$j\"><!-- THE ID OF the textstelle will be inserted into this hidden input -->
</td>
</tr>
<tr>
<td width='10%' style='border-style: none; border-width: medium' height='0'>
&nbsp;
</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='str$j' name='str$j' size='50'>
</td>
</tr>
<tr>
<td width='10%' style='border-style: none; border-width: medium' height='0'>
&nbsp;
</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='plz$j' id='plz$j' size='5'>&nbsp;<input type='text' name='ort$j' id='ort$j' size='40'>
</td>
</tr>
<tr>
<td width='10%' style='border-style: none; border-width: medium' height='0'>
&nbsp;
</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_postfach$j' id='plz_postfach$j' size='5'>&nbsp;<input type='text' name='postfach$j' id='postfach$j' size='40'>
</td>
</tr>
<tr>
<td width='10%' style='border-style: none; border-width: medium' height='0'>
&nbsp;
</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='bundesland$j' id='bundesland$j' size='50'>
</td>
</tr>
<tr>
<td width='10%' style='border-style: none; border-width: medium' height='0'>
&nbsp;
</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='staat$j' id='staat$j' size='50'>
</td>
</tr>
<td width='10%' style='border-style: none; border-width: medium' height='0'>
&nbsp;
</td>
<td width='30%' style='border-style: none; border-width: medium' height='0'>
<b>Zeitraum der bei dieser Praxisstelle*: </b>
</td>
<td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
<input type=\"text\" name=\"beg_tag$j\" id='beg_tag$j' ID=\"text\" size=\"1\" value='TT' onFocus=\"if(this.value=='TT'){ this.value='';}\">.<input type=\"text\" name=\"beg_mon$j\" id='beg_mon$j' value='MM' ID=\"text1\" size=\"1\" onFocus=\"if(this.value=='MM'){ this.value='';}\">.<input type=\"text\" name='beg_jahr$j' id='beg_jahr$j' ID=\"text2\" value='JJJJ' size=\"3\" onFocus=\"if(this.value=='JJJJ'){ this.value='';}\">
bis
<input type=\"text\" name=\"ende_tag$j\" id='ende_tag$j' ID=\"text\" size=\"1\" value='TT' onFocus=\"if(this.value=='TT'){ this.value='';}\">.<input type=\"text\" name=\"ende_mon$j\" id='ende_mon$j' value='MM' ID=\"text1\" size=\"1\" onFocus=\"if(this.value=='MM'){ this.value='';}\">.<input type=\"text\" name=\"ende_jahr$j\" id='ende_jahr$j' ID=\"text2\" value='JJJJ' size=\"3\" onFocus=\"if(this.value=='JJJJ'){ this.value='';}\">
</td>
</tr>
<tr>
<td width='10%' style='border-style: none; border-width: medium' height='0'>
&nbsp;
</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='abteilung$j' id='abteilung$j' size='50'>
</td>
</tr>
<tr>
<td width='10%' style='border-style: none; border-width: medium' height='0'>
&nbsp;
</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='telabteilung$j' id='telabteilung$j' size='50'>
</td>
</tr>
</table>
<br>
</div>
<br>";
}
echo"
<br>
* = Pflichtfelder<br><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'>
<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 "persdat":
### doppelte Vertiefungsbereiche prüfen ###
check_vertiefungsbereich();
### Ende doppelte Vertiefungsbereiche prüfen ###
### Prüft, ob vertiefungsbereich gewählt wurde###
vertiefungsbereich();
### Ende, ob vertiefungsbereich gewählt wurde###
### Pflichtfelder prüfen ###
pflichtfelder();
### Ende Pflichtfelder prüfen ###
### Anzahl der Anträge prüfen, ob pro Vertiefungsbereich max 3 Stellen sind ###
anz_stellen();
### Ende Anzahl prüfen ###
for ($i= 1;$i<= 12;$i++) // maximal 12 Felder können ausgefüllt werden
{
$stellenart = $_POST[stellenart.$i]; // Vom Formular gesendetes Objekt in Variable schreiben
$bezeichnung = $_POST[bezeichnung.$i];
$str = $_POST[str.$i];
$postfach = $_POST[postfach.$i];
$plz_postfach = $_POST[plz_postfach.$i];
$plz = $_POST[plz.$i];
$ort = $_POST[ort.$i];
$bundesland = $_POST[bundesland.$i];
$staat = $_POST[staat.$i];
$beginndatum = $_POST[beg_jahr.$i].'-'.$_POST[beg_mon.$i].'-'.$_POST[beg_tag.$i];
$enddatum = $_POST[ende_jahr.$i].'-'.$_POST[ende_mon.$i].'-'.$_POST[ende_tag.$i];
$abteilung = $_POST[abteilung.$i];
$telabteilung = $_POST[telabteilung.$i];
if($stellenart != '1'){
switch($i){
case 1:
$vertiefungsbereich = $_POST[vert1];
break;
case 2:
$vertiefungsbereich = $_POST[vert1];
break;
case 3:
$vertiefungsbereich = $_POST[vert1];
break;
case 4:
$vertiefungsbereich = $_POST[vert2];
break;
case 5:
$vertiefungsbereich = $_POST[vert2];
break;
case 6:
$vertiefungsbereich = $_POST[vert2];
break;
case 7:
$vertiefungsbereich = $_POST[vert3];
break;
case 8:
$vertiefungsbereich = $_POST[vert3];
break;
case 9:
$vertiefungsbereich = $_POST[vert3];
break;
case 10:
$vertiefungsbereich = $_POST[vert4];
break;
case 11:
$vertiefungsbereich = $_POST[vert4];
break;
case 12:
$vertiefungsbereich = $_POST[vert4];
break;
}
## 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')");
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 ("INSERT INTO stan_antrag (uid, vert_bereich, art, dst_id, beginn, ende, abteilung, tel_abteilung, status, zuweisung
) VALUES (
'$uid1', '$vertiefungsbereich', '$stellenart', '$dst_id', '$beginndatum', '$enddatum', '$abteilung'
, '$telabteilung','-1', Null)");
$aendid = $db->insert_id;
$sql1 = $db->query ("update stan_antrag set aendid='$aendid' where saaid = '$aendid'");
if($sql){
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>Antrag nicht gestellt</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\">Antrag gestellt</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>Der Antrag wurde erfasst!</b>
</p>
<p align=\"center\"><a href=".$_SERVER['PHP_SELF'] .">
<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>
";
}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>Antrag nicht gestellt</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\">Antrag nicht gestellt</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>Der Antrag konnte aufgrund eines Fehlers nicht erfasst werden!</b>
<br>
</p>
<p align=\"center\"><a href=".$_SERVER['PHP_SELF'] .">
<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>";
}
} // Ende Wenn Stellenantrag ausgewählt wurde
} // Ende For-Schleife
} // Ende Action
?>