945 lines
43 KiB
PHP
Executable File
945 lines
43 KiB
PHP
Executable File
<?php
|
|
$user_admin=$_COOKIE["user_admin"];
|
|
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 spt_admin_rechte, spt_admin_rechte_zuord , spt_admin where spt_admin_rechte.spt_admin_rolle = spt_admin_rechte_zuord.spt_admin_rolle AND spt_admin_rechte_zuord.faid = spt_admin.faid AND spt_admin.user = '$user_admin' AND spt_admin_rechte_zuord.spt_admin_rolle = 'a_neubel'");
|
|
$row = $result->fetch_array();
|
|
if ($row[0] != 1){ include("kurs/rechte.php"); exit;}
|
|
// 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>>Student neu belegen</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>
|
|
<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=\"98%\" background=\"../images/box_top.gif\" valign=\"top\">
|
|
<img height=\"10\" src=\"../images/blank.gif\" width=\"1\"><br>
|
|
<font class=\"hd\">Student neu belegen</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=beleg1"; echo" method=\"POST\" name=\"beleg\">
|
|
<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%\">
|
|
</td>
|
|
<td width=\"25%\"> </td>
|
|
<td width=\"25%\">
|
|
<p>
|
|
</td>
|
|
<td width=\"25%\">
|
|
<p>
|
|
</td>
|
|
</tr>
|
|
<td width=\"25%\">
|
|
Bitte Matrikelnr. eingeben
|
|
<p>
|
|
</td>
|
|
<td width=\"50%\"colspan=\"2\">
|
|
<input type=\"text\" id=\"stud\" name=\"stud\" value=\"\" onkeyup=\"ajax_showOptions(this,'getWord',event)\" size=\"40\">
|
|
<input type=\"hidden\" id=\"stud_hidden\" name=\"stud_ID\"><!-- THE ID OF the textstelle will be inserted into this hidden input -->
|
|
</td>
|
|
<td width=\"25%\">
|
|
<p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width=\"25%\">
|
|
<p>
|
|
</td>
|
|
<td width=\"50%\"colspan=\"2\"> </td>
|
|
<td width=\"25%\">
|
|
<p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width=\"25%\">
|
|
<p>
|
|
</td>
|
|
<td width=\"50%\"colspan=\"2\"> </td>
|
|
<td width=\"25%\">
|
|
<p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width=\"25%\">
|
|
<p>
|
|
</td>
|
|
<td width=\"50%\" colspan=\"2\">
|
|
<p align=\"center\">
|
|
";
|
|
$db = dbconnect();
|
|
$query = "SELECT uid, nachname, vorname, durchgefallen from stud order by nachname";
|
|
$result = $db->query ($query)
|
|
or die ("Cannot execute query");
|
|
echo "<select size=\"5\" name=\"studbe\">";
|
|
while ($row = $result->fetch_array()){
|
|
echo "
|
|
<option value=\"".$row[0]."\">
|
|
".$row['nachname'].", "
|
|
.$row['vorname']."";
|
|
IF ($row[durchgefallen] == "Y")
|
|
echo " *";
|
|
|
|
echo "
|
|
</option>\n";
|
|
}
|
|
echo "</select>
|
|
</td>
|
|
<td width=\"25%\">
|
|
<p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width=\"25%\">
|
|
<p>
|
|
</td>
|
|
<td width=\"50%\" colspan=\"2\" align=\"center\">
|
|
</td>
|
|
<td width=\"25%\">
|
|
<p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width=\"25%\">
|
|
</td>
|
|
<td width=\"50%\" colspan=\"2\" align=\"center\">
|
|
<input type=\"submit\" value=\"Assistent starten\" name=\"B1\"></td>
|
|
<td width=\"25%\">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width=\"25%\">
|
|
</td>
|
|
<td width=\"50%\" colspan=\"2\" align=\"center\">
|
|
</td>
|
|
<td width=\"25%\">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width=\"25%\">
|
|
</td>
|
|
<td width=\"50%\" colspan=\"2\" align=\"center\">
|
|
* = ausgeschieden
|
|
</td>
|
|
<td width=\"25%\">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width=\"100%\" colspan=\"4\" align=\"center\">
|
|
<br>
|
|
Ist ein Student nicht im System vorhanden kann er über das Modul <br><a href=registrierung.php>Student anlegen</a><br>erfasst werden!
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width=\"25%\">
|
|
</td>
|
|
<td width=\"50%\" colspan=\"2\" align=\"center\"> </td>
|
|
<td width=\"25%\">
|
|
</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\">
|
|
<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 "beleg1":
|
|
|
|
|
|
|
|
|
|
if($_POST[stud]!=''){
|
|
$stud = $_POST[stud];
|
|
$pos1 = strpos ($stud, '(')+1;
|
|
$pos2 = strpos ($stud, ')')-$pos1;
|
|
|
|
|
|
$str = substr($stud, $pos1,$pos2);
|
|
|
|
$str = explode(",",$str);
|
|
|
|
$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[studbe] != ''){ // Wenn Stud über dropdown gewählt wurde
|
|
$db = dbconnect();
|
|
$result = $db->query("SELECT uid, stg, vorname, nachname
|
|
FROM stud
|
|
WHERE uid ='$_POST[studbe]'");
|
|
$row_uid = $result->fetch_array();
|
|
$uid1=$row_uid['uid'];
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setcookie("ck_studbe","");
|
|
setcookie("ck_studbe","$uid1");
|
|
|
|
$db = dbconnect();
|
|
$bearb_stud = $db->query ("SELECT uid, nachname, vorname, mtknr, stg, poplz, poOrt, poStrasse, AG, Jahrgang, Pwd, Mail, durchgefallen
|
|
FROM stud
|
|
WHERE uid='$uid1'");
|
|
$stud = $bearb_stud->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>>Student bearbeiten</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=\"98%\" background=\"../images/box_top.gif\" valign=\"top\">
|
|
<img height=\"10\" src=\"../images/blank.gif\" width=\"1\"><br>
|
|
<font class=\"hd\">Student neu belegen</font><br>
|
|
<font class=\"sh\">Passen sie die aktiven Felder ggf. an</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=beleg2"; echo" method=\"POST\" name=\"beleg\">
|
|
<table border=\"0\" cellpadding=\"4\" cellspacing=\"0\" style=\"border-collapse: collapse; border-width: 0\" bordercolor=\"#111111\" width=\"100%\" id=\"AutoNumber1\" height=\"246\">
|
|
<tr>
|
|
<td width=\"40%\">
|
|
<b>Vorname:</b>
|
|
</td>
|
|
<td width=\"60%\">
|
|
<input type=\"text\" name=\"vorname\" value=\"$stud[vorname]\"size=\"40\" disabled>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width=\"40%\">
|
|
<b>Nachname:</b>
|
|
</td>
|
|
<td width=\"60%\">
|
|
<input type=\"text\" name=\"nachname\" value=\"$stud[nachname]\" size=\"40\" disabled>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width=\"40%\">
|
|
<b>Straße:</b>
|
|
</td>
|
|
<td width=\"60%\">
|
|
<input type=\"text\" name=\"strasse\" value=\"$stud[poStrasse]\" size=\"40\" disabled>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width=\"40%\">
|
|
<b>PLZ:</b>
|
|
</td>
|
|
<td width=\"60%\">
|
|
<input type=\"text\" name=\"plz\" value=\"$stud[poplz]\" size=\"5\" disabled>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width=\"40%\">
|
|
<b>Ort:</b>
|
|
</td>
|
|
<td width=\"60%\">
|
|
<input type=\"text\" name=\"ort\" value=\"$stud[poOrt]\" size=\"40\" disabled>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width=\"40%\" valign=\"top\">
|
|
<b>Studienzweig*:</b><br>
|
|
</td>
|
|
<td width=\"60%\" align=\"left\">
|
|
<select size=\"5\" name=\"zweig\">
|
|
<option value=\"F\""; if ($stud[stg] == 'F'){echo " selected";} echo ">Finanzverwaltung </option>
|
|
<option value=\"R\""; if ($stud[stg] == 'R'){echo " selected";} echo ">Rentenversicherung </option>
|
|
<option value=\"I\""; if ($stud[stg] == 'I'){echo " selected";} echo ">Innenverwaltung </option>
|
|
<option value=\"S\""; if ($stud[stg] == 'S'){echo " selected";} echo ">Steuerverwaltung </option>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<tr>
|
|
<td width=\"40%\">
|
|
<b>AG neu:</b>
|
|
</td>
|
|
<td width=\"60%\">
|
|
<input type=\"text\" name=\"ag\" value=\"$stud[AG]\" size=\"1\"> /
|
|
<input type=\"text\" name=\"jahr\" value=\"$stud[Jahrgang]\" size=\"2\">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width=\"40%\">
|
|
<b>Matrikelnr.:</b>
|
|
</td>
|
|
<td width=\"60%\">
|
|
<input type=\"text\" name=\"mtknr\" value=\"$stud[mtknr]\" size=\"6\" disabled>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width=\"40%\">
|
|
<b>Benutzerkennung:</b>
|
|
</td>
|
|
<td width=\"60%\">
|
|
<input type=\"text\" name=\"ort\" value=\"$stud[uid]\" size=\"40\" disabled>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<b>E-Mail Adresse:</b>
|
|
</td>
|
|
<td>
|
|
<input type=\"text\" name=\"mail\" value=\"$stud[Mail]\"size=\"40\">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<b>Ausgeschieden:</b>
|
|
</td>
|
|
<td>
|
|
<input type=\"text\" name=\"ort\" value=\"N\" size=\"1\" disabled> wird automatisch auf Nein gesetzt
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<br>
|
|
<br>
|
|
<input type=\"submit\" value=\"Weiter\" name=\"B1\">
|
|
</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 "beleg2":
|
|
|
|
if ($_POST[zweig] == "" or $_POST[ag] == "" or $_POST[jahr] == "" or $_POST[mail] == "" ){
|
|
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>Eingabefehler</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\">Eingabefehler</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>Es müssen mindestens die Pflichtfelder ausgefüllt werden!</b>
|
|
|
|
<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><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>";
|
|
exit;
|
|
} // Ende If
|
|
|
|
|
|
if ($_POST['zweig']== 'F'){ $stgtext ='Finanzverwaltung';}
|
|
if ($_POST['zweig']== 'R'){ $stgtext ='Rentenversicherung';}
|
|
if ($_POST['zweig']== 'I'){ $stgtext ='Innenverwaltung';}
|
|
if ($_POST['zweig']== 'S'){ $stgtext ='Steuerverwaltung';}
|
|
|
|
|
|
$db = dbconnect();
|
|
|
|
|
|
$uid = $_COOKIE["ck_studbe"]; //Cookie in Variable schreiben
|
|
$jahr_neu = $_POST[jahr];
|
|
$stg = $_POST[zweig];
|
|
|
|
$sql = $db->query ("UPDATE stud SET
|
|
stg='$stg'
|
|
, stgtext='$stgtext'
|
|
, AG=\"". $_POST['ag']."\"
|
|
, Jahrgang='$jahr_neu'
|
|
, Mail=\"". $_POST['mail']."\"
|
|
, durchgefallen='N'
|
|
WHERE uid=\"$uid\"");
|
|
|
|
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>Aktualisierung fehlgeschlagen</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\">Aktualisierung fehlgeschlagen</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 Änderungen konnten nicht gespeichert werden!</b>
|
|
|
|
<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><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>";
|
|
exit;
|
|
}
|
|
|
|
########################### AUSWAHL DER PASSENDEN WPF DES NEUEN JAHRGANGS ###########################
|
|
|
|
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>Auswahl des neuen Schwerpunktthemen</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=\"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\">Auswahl des neuen Vertiefungsbereichs für den Jahrgang $jahr_neu</font><br>
|
|
<span class=\"sh\"><font color='red'>Sie müssen genau 2 Themen auswählen</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=beleg3"; echo" method=\"POST\" name=\"auswahl\">
|
|
<table border=\"0\" cellpadding=\"4\" cellspacing=\"0\" style=\"border-collapse: collapse\" bordercolor=\"#E7E8ED\" width=\"100%\" id=\"AutoNumber1\">
|
|
<tr>
|
|
<td width=\"5%\">
|
|
<p align=\"center\"><b>
|
|
Nr.</b></p>
|
|
</td>
|
|
<td width=\"75%\">
|
|
<p style=\"margin-left: 6; margin-top:4; margin-bottom:4\"><b>Bezeichnung</b></p>
|
|
</td>
|
|
<td width=\"10%\" align=\"center\" height=\"18\">
|
|
<b>Teilnahme<br>Ist / Max</b></p>
|
|
</td>
|
|
<td width=\"10%\" align=\"center\" height=\"18\">
|
|
<b>Auwahl</b></p>";
|
|
$db = dbconnect();
|
|
$query = "SELECT id, FPRNr, Bezeichnung, bemerkung, TN_max
|
|
FROM spt_kurs
|
|
WHERE Jahr='$jahr_neu'
|
|
AND Zweig LIKE '%$stg%'
|
|
ORDER BY FPRNr ASC";
|
|
$result = $db->query($query)
|
|
or die ("Cannot execute query1");
|
|
while ($row = $result->fetch_array()){
|
|
|
|
echo "
|
|
</tr>
|
|
<tr>
|
|
<td width=\"5%\" valign=\"middle\" align=\"center\" 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\">
|
|
$row[FPRNr]
|
|
</td>
|
|
<td width=\"75%\" 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\">
|
|
$row[Bezeichnung]<br><span class=\"bemerkung\">$row[bemerkung]</span>
|
|
</td>
|
|
<td align='center' 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\">";
|
|
if ( $res=$db->query("SELECT count(spt_wunsch.uid)
|
|
from spt_wunsch left join stud using (uid)
|
|
where spt_wunsch.id=$row[id]
|
|
and stud.durchgefallen !=\"Y\"
|
|
order by spt_wunsch.uid") ){
|
|
if ( $row1=$res->fetch_array() ) {
|
|
$result1=$row1[0];
|
|
} else $result1=0;
|
|
} else $result1=0;
|
|
|
|
echo "
|
|
$result1 / $row[TN_max]
|
|
</td>
|
|
<td width=\"10%\" align=\"center\" 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\">
|
|
<input type=\"checkbox\" value=\"$row[id]\" name=\"spt_auswahl[]\"";
|
|
$db = dbconnect();
|
|
$result2 = $db->query("SELECT uid, id FROM spt_wunsch where id=\"$row[id]\" and uid=\"$uid\"");
|
|
$row2 = $result2->fetch_array();
|
|
if ($row2['id'] == $row['id']) echo " checked"; echo ">
|
|
</td>
|
|
</tr>"; }
|
|
echo "
|
|
</table>
|
|
<br>
|
|
<br>
|
|
<input type=\"submit\" value=\"Weiter\">
|
|
</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 "beleg3":
|
|
|
|
|
|
$uid1 = $_COOKIE["ck_studbe"];
|
|
$spt_auswahl = $_POST['spt_auswahl'];
|
|
$anz = count($spt_auswahl);
|
|
|
|
if($anz != 2){
|
|
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>Doppelbelegung</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\">Falsche Anzahl</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 müssen exakt 2 Themen wählen!</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;
|
|
}
|
|
|
|
$sql = $db->query("delete from spt_wunsch where uid = '$uid1'");
|
|
for ($i=0;$i<sizeof($spt_auswahl);$i++) {
|
|
|
|
$sql = $db->query("INSERT INTO spt_wunsch ( `uid` , `id` ) VALUES ('$uid1', '$spt_auswahl[$i]')");
|
|
if(!$sql){
|
|
$err = "1";
|
|
}
|
|
|
|
}
|
|
|
|
if($err == "1"){
|
|
$msg = "Ihre Daten konnten nicht vollständig gespeichert werden<br>Bitte prüfen Sie, ob Ihre Auswahl angekreuzt ist";
|
|
}else{
|
|
|
|
$msg="<table border=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse; border-width: 0\" bordercolor=\"#111111\" width=\"100%\" id=\"AutoNumber1\"><p><br>";
|
|
$query = "SELECT FPRNr, Bezeichnung
|
|
FROM spt_kurs a, spt_wunsch b
|
|
WHERE a.id=b.id
|
|
and b.uid='$uid1'
|
|
ORDER BY FPRNr ASC";
|
|
|
|
$result = $db->query($query)
|
|
or die ("Cannot execute query1");
|
|
while ($row = $result->fetch_array()){
|
|
$msg.="
|
|
<tr>
|
|
<td width=\"15%\" align='center'>
|
|
<b>$row[FPRNr]</b>
|
|
</td>
|
|
<td width=\"15%\">
|
|
</td>
|
|
<td width=\"70%\">
|
|
<b>$row[Bezeichnung]</b>
|
|
</td>
|
|
</tr>
|
|
";
|
|
}
|
|
$msg.="</table>";
|
|
}
|
|
|
|
$result = $db->query("SELECT vorname, nachname 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\">
|
|
<title>Auswahl des neuen Vertiefungsbereichs</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=\"40%\" 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\">Auswahl des neuen Wahlpflichtfaches</font><br>
|
|
<font class=\"sh\">für $row[vorname] $row[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>
|
|
$msg
|
|
<br>
|
|
<br>
|
|
<p align=\"center\"><a href=\"hauptframe_jahr.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\">
|
|
<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
|
|
?>
|