<?php $user_admin=$_COOKIE["user_admin"]; $jahrgang=$_COOKIE["jahrgang"]; $hs=$_COOKIE["ck_hs"]; #if ($jahrgang == ""){ require("jahrgang.php"); exit;} //Wenn man kein Jahrgang ausgewählt hat wird die Jahrgangsauswahlseite geladen include("kurs/datenbankanbindung.php"); // fügt die Datenbankanbindung ein: Sys:\php\includes\kurs\datenbankanbindung.php // Rechteüberprüfung $db = dbconnect(); if ($user_admin == ""){ require("index.php"); exit;} //Wenn man nicht angemeldet ist, darf man nicht auf die Seite $result = $db->query("SELECT 1 FROM stan_admin_rechte, stan_admin_rechte_zuord , stan_admin where stan_admin_rechte.stan_admin_rolle = stan_admin_rechte_zuord.stan_admin_rolle AND stan_admin_rechte_zuord.said = stan_admin.said AND stan_admin.user = '$user_admin' AND stan_admin_rechte_zuord.stan_admin_rolle = 'a_dstedit'"); $row = $result->fetch_array(); if ($row[0] != 1){ include("kurs/rechte.php"); exit;} // Rechteüberprüfung ende // Rechteüberprüfung ende 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_dst.js\"></script> <style type=\"text/css\"> /* 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\">Dienststelle wählen</font><br> <font class=\"sh\">Übersicht über die Studenten, bei denen Zuweisungsschreiben gedruckt wurden</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=ubersicht1"; 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\"> Bezeichnung: <p></p> </td> <td width=\"50%\" height=\"17\"> <p align=\"left\"> <input type=\"text\" id=\"dst1\" name=\"dst1\" value=\"\" onkeyup=\"ajax_showOptions(this,'getWord',event)\" size=\"50\"> <input type=\"hidden\" id=\"dst1_hidden\" name=\"dst1_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\"> Dienststelle auswählen </td> <td width=\"50%\" align=\"left\" height=\"17\"> "; $db = dbconnect(); $query = "SELECT dst_id, name, bezeichnung FROM stan_dienststellen ORDER BY name"; $result = $db->query ($query) or die ("Cannot execute query"); echo "<select size=\"5\" name=\"dst\">"; while ($row = $result->fetch_array()){ echo "<option value=\"".$row['dst_id']."\">$row[name] ($row[bezeichnung])"; 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 "ubersicht1": if($_POST[dst1]!=''){ $dst1 = $_POST[dst1]; $pos1 = strpos ($dst1, '(')+1; $pos2 = strpos ($dst1, ')')-$pos1; $str = substr($dst1, $pos1,$pos2); $dst_id=trim($str); if($_POST[dst1] == ''){ 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[dst] != ''){ // Wenn Stud über dropdown gewählt wurde $dst_id = $_POST['dst']; } setcookie("ck_dstid",""); setcookie("ck_dstid",$dst_id); $result = $db->query("SELECT bezeichnung, name, str, plz, postfach, plz_postfach, ort, bundesland, staat, internet, mail FROM stan_dienststellen WHERE dst_id = $dst_id "); $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\"> <title>Administratorrechte</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=\"80%\" 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\">Dienststelle bearbeiten</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=bearb1"; echo" method=\"POST\" name=\"beleg1\"> <table border=\"0\" cellpadding=\"4\" cellspacing=\"0\" style=\"border-collapse: collapse; border-width: 0\" bordercolor=\"#111111\" width=\"100%\" id=\"AutoNumber1\" height=\"115\"> <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 Dienststelle*:</b> </td> <td width='60%' style='border-style: none; border-width: medium' height='0'> <input type='text' id='art' name='art' value='$row[bezeichnung]' 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>Bezeichnung der Dienststelle*:</b> </td> <td width='60%' style='border-style: none; border-width: medium' height='0'> <input type='text' id='name' name='name' value='$row[name]' 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>Straße und Hausnummer der Dienststelle*:</b> </td> <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'> <input type='text' id='str' name='str' $row[str]' value='$row[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='plz' id='plz' value='$row[plz]' size='5'> <input type='text' name='ort' value='$row[ort]' id='ort' 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_postfach' id='plz_postfach' value='$row[plz_postfach]' size='5'> <input type='text' name='postfach' value='$row[postfach]' id='postfach' 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='bundesland' id='bundesland' value='$row[bundesland]' 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='staat' value='$row[staat]' id='staat' 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>Mailadresse der Dienststelle*:</b> </td> <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'> <input type='text' name='maildst' value='$row[mail]' id='maildst' 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'> * = Pflichtfelder </td> <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'> </td> </tr> </table> <p align='center'> <input type=\"submit\" value=\"Speichern\" name=\"B1\" size=\"20\"> </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>"; break; case "bearb1": #echo "<pre>"; #foreach ($_POST as $key => $value) { # echo $key . " = " . $value . "<br>"; #echo "</pre>"; $art = trim($_POST['art']); $name = trim($_POST['name']); $str = trim($_POST['str']); $plz = trim($_POST['plz']); $ort = trim($_POST['ort']); $plz_postfach = trim($_POST['plz_postfach']); $postfach = trim($_POST['postfach']); $bundesland = trim($_POST['bundesland']); $staat = trim($_POST['staat']); $maildst = trim($_POST['maildst']); $dst_id = $_COOKIE["ck_dstid"]; if($art == '' or $name == '' or $str == '' or $plz == '' or $ort == '' or $plz_postfach == '' or $postfach == '' or $bundesland == '' or $staat == '' or $maildst == ''){ 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>Pflichtfelder ausfüllen</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; } $sql1 = $db->query ("update stan_dienststellen set bezeichnung='$art' ,name = '$name' ,bez = '$art $name' ,str = '$str' ,plz = '$plz' ,ort = '$ort' ,plz_postfach = '$plz_postfach' ,postfach = '$postfach' ,bundesland = '$bundesland' ,staat = '$staat' ,mail = '$maildst' where dst_id = '$dst_id'"); echo " <html> <head> <meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\"> <meta http-equiv=\"refresh\" content=\"2; URL=".$_SERVER['PHP_SELF'] ."\"> <link rel=\"stylesheet\" href=\"../styles_pc.css\" type=\"text/css\"> <title>Fertig</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\">Dienststelle bearbeitet</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>Die Dienststelle wurde bearbeitet!</p></b> </p> </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 Action script ?>