621 lines
37 KiB
PHP
Executable File
621 lines
37 KiB
PHP
Executable File
<?php
|
|
$user_admin=$_COOKIE["user_admin"];
|
|
$jahrgang=$_COOKIE["jahrgang"];
|
|
|
|
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_bereich'");
|
|
$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>Bereiche erfassen</title>
|
|
<style type='text/css'>
|
|
select{
|
|
width:323px;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body onload=\"if(document.anmschluss)document.anmschluss.so1.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=\"60%\" 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>
|
|
<form action="; echo $_SERVER['PHP_SELF'] . "?action=ubernahme"; echo" method=\"POST\" name=\"ubernahme\">
|
|
<font class=\"hd\">Bereiche <input type=\"submit\" value=\"Übernahme Vorjahr\" name=\"B1\" size=\"20\"></form></font><br>
|
|
</form>
|
|
<font class=\"sh\">eintragen / löschen</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>
|
|
<table border=\"0\" style=\"border-collapse: collapse\" width=\"100%\" id=\"table2\" name=\"anmschluss\">
|
|
<tr>
|
|
<td><br>
|
|
<table align=\"center\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" border=\"0\">
|
|
<tr>
|
|
<td width=\"1%\" background=\"../images/box_e1a.gif\"> </td>
|
|
<td align=\"left\" width=\"98%\" background=\"../images/box_top1.gif\" valign=\"top\">
|
|
<p align=\"center\"> </p>
|
|
</td>
|
|
<td align=\"right\" width=\"1%\" background=\"../images/box_e2a.gif\"> </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=eintragen"; echo" method=\"POST\" name=\"anmschluss\">
|
|
<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse; border-left-width:0; border-right-width:0; border-bottom-width:0\" bordercolor=\"#111111\" width=\"100%\">
|
|
<tr>
|
|
<td width=\"30%\">
|
|
<p style=\"margin:10 4; \">
|
|
</td>
|
|
<td width=\"61%\" align=\"left\" >
|
|
<p style=\"margin:10 4; \">
|
|
<b>Bezeichnung</b>
|
|
</p>
|
|
</td>
|
|
<td width=\"3%\" align=\"center\" >
|
|
<p style=\"margin:10 4; \">
|
|
<b>V</b>
|
|
</p>
|
|
</td>
|
|
<td width=\"3%\" align=\"center\" >
|
|
<p style=\"margin:10 4; \">
|
|
<b>W</b>
|
|
</p>
|
|
</td>
|
|
<td width=\"3%\" align=\"center\" >
|
|
<p style=\"margin:10 4; \">
|
|
<b>Alle</b>
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width=\"30%\">
|
|
<p style=\"margin:10 4; \">Bereich 1:
|
|
</td>
|
|
<td width=\"61%\" align=\"left\" >
|
|
<p style=\"margin:10 4; \">
|
|
<input type=\"text\" name=\"ber1\" size=\"50\">
|
|
</p>
|
|
</td>
|
|
<td width=\"3%\" align=\"center\" >
|
|
<p style=\"margin:10 4; \">
|
|
<input type=\"radio\" name=\"bereich1\" value=\"V\">
|
|
</p>
|
|
</td>
|
|
<td width=\"3%\" align=\"center\" >
|
|
<p style=\"margin:10 4; \">
|
|
<input type=\"radio\" name=\"bereich1\" value=\"W\">
|
|
</p>
|
|
</td>
|
|
<td width=\"3%\" align=\"center\" >
|
|
<p style=\"margin:10 4; \">
|
|
<input type=\"radio\" name=\"bereich1\" value=\"A\">
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width=\"30%\">
|
|
<p style=\"margin:10 4; \">Bereich 2:
|
|
</td>
|
|
<td width=\"61%\" align=\"left\" >
|
|
<p style=\"margin:10 4; \">
|
|
<input type=\"text\" name=\"ber2\" size=\"50\">
|
|
</p>
|
|
</td>
|
|
<td width=\"3%\" align=\"center\" >
|
|
<p style=\"margin:10 4; \">
|
|
<input type=\"radio\" name=\"bereich2\" value=\"V\">
|
|
</p>
|
|
</td>
|
|
<td width=\"3%\" align=\"center\" >
|
|
<p style=\"margin:10 4; \">
|
|
<input type=\"radio\" name=\"bereich2\" value=\"W\">
|
|
</p>
|
|
</td>
|
|
<td width=\"3%\" align=\"center\" >
|
|
<p style=\"margin:10 4; \">
|
|
<input type=\"radio\" name=\"bereich2\" value=\"A\">
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width=\"30%\">
|
|
<p style=\"margin:10 4; \">Bereich 3:
|
|
</td>
|
|
<td width=\"61%\" align=\"left\" >
|
|
<p style=\"margin:10 4; \">
|
|
<input type=\"text\" name=\"ber3\" size=\"50\">
|
|
</p>
|
|
</td>
|
|
<td width=\"3%\" align=\"center\" >
|
|
<p style=\"margin:10 4; \">
|
|
<input type=\"radio\" name=\"bereich3\" value=\"V\">
|
|
</p>
|
|
</td>
|
|
<td width=\"3%\" align=\"center\" >
|
|
<p style=\"margin:10 4; \">
|
|
<input type=\"radio\" name=\"bereich3\" value=\"W\">
|
|
</p>
|
|
</td>
|
|
<td width=\"3%\" align=\"center\" >
|
|
<p style=\"margin:10 4; \">
|
|
<input type=\"radio\" name=\"bereich3\" value=\"A\">
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width=\"30%\">
|
|
<p style=\"margin:10 4; \">Bereich 4:
|
|
</td>
|
|
<td width=\"61%\" align=\"left\" >
|
|
<p style=\"margin:10 4; \">
|
|
<input type=\"text\" name=\"ber4\" size=\"50\">
|
|
</p>
|
|
</td>
|
|
<td width=\"3%\" align=\"center\" >
|
|
<p style=\"margin:10 4; \">
|
|
<input type=\"radio\" name=\"bereich4\" value=\"V\">
|
|
</p>
|
|
</td>
|
|
<td width=\"3%\" align=\"center\" >
|
|
<p style=\"margin:10 4; \">
|
|
<input type=\"radio\" name=\"bereich4\" value=\"W\">
|
|
</p>
|
|
</td>
|
|
<td width=\"3%\" align=\"center\" >
|
|
<p style=\"margin:10 4; \">
|
|
<input type=\"radio\" name=\"bereich4\" value=\"A\">
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width=\"30%\">
|
|
<p style=\"margin:10 4; \">Bereich 5:
|
|
</td>
|
|
<td width=\"61%\" align=\"left\" >
|
|
<p style=\"margin:10 4; \">
|
|
<input type=\"text\" name=\"ber5\" size=\"50\">
|
|
</p>
|
|
</td>
|
|
<td width=\"3%\" align=\"center\" >
|
|
<p style=\"margin:10 4; \">
|
|
<input type=\"radio\" name=\"bereich5\" value=\"V\">
|
|
</p>
|
|
</td>
|
|
<td width=\"3%\" align=\"center\" >
|
|
<p style=\"margin:10 4; \">
|
|
<input type=\"radio\" name=\"bereich5\" value=\"W\">
|
|
</p>
|
|
</td>
|
|
<td width=\"3%\" align=\"center\" >
|
|
<p style=\"margin:10 4; \">
|
|
<input type=\"radio\" name=\"bereich5\" value=\"A\">
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width=\"30%\">
|
|
<p style=\"margin:10 4; \">Bereich 6:
|
|
</td>
|
|
<td width=\"61%\" align=\"left\" >
|
|
<p style=\"margin:10 4; \">
|
|
<input type=\"text\" name=\"ber6\" size=\"50\">
|
|
</p>
|
|
</td>
|
|
<td width=\"3%\" align=\"center\" >
|
|
<p style=\"margin:10 4; \">
|
|
<input type=\"radio\" name=\"bereich6\" value=\"V\">
|
|
</p>
|
|
</td>
|
|
<td width=\"3%\" align=\"center\" >
|
|
<p style=\"margin:10 4; \">
|
|
<input type=\"radio\" name=\"bereich6\" value=\"W\">
|
|
</p>
|
|
</td>
|
|
<td width=\"3%\" align=\"center\" >
|
|
<p style=\"margin:10 4; \">
|
|
<input type=\"radio\" name=\"bereich6\" value=\"A\">
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width=\"30%\">
|
|
<p style=\"margin:10 4; \">Bereich 7:
|
|
</td>
|
|
<td width=\"61%\" align=\"left\" >
|
|
<p style=\"margin:10 4; \">
|
|
<input type=\"text\" name=\"ber7\" size=\"50\">
|
|
</p>
|
|
</td>
|
|
<td width=\"3%\" align=\"center\" >
|
|
<p style=\"margin:10 4; \">
|
|
<input type=\"radio\" name=\"bereich7\" value=\"V\">
|
|
</p>
|
|
</td>
|
|
<td width=\"3%\" align=\"center\" >
|
|
<p style=\"margin:10 4; \">
|
|
<input type=\"radio\" name=\"bereich7\" value=\"W\">
|
|
</p>
|
|
</td>
|
|
<td width=\"3%\" align=\"center\" >
|
|
<p style=\"margin:10 4; \">
|
|
<input type=\"radio\" name=\"bereich7\" value=\"A\">
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width=\"30%\">
|
|
<p style=\"margin:10 4; \">Bereich 8:
|
|
</td>
|
|
<td width=\"61%\" align=\"left\" >
|
|
<p style=\"margin:10 4; \">
|
|
<input type=\"text\" name=\"ber8\" size=\"50\">
|
|
</p>
|
|
</td>
|
|
<td width=\"3%\" align=\"center\" >
|
|
<p style=\"margin:10 4; \">
|
|
<input type=\"radio\" name=\"bereich8\" value=\"V\">
|
|
</p>
|
|
</td>
|
|
<td width=\"3%\" align=\"center\" >
|
|
<p style=\"margin:10 4; \">
|
|
<input type=\"radio\" name=\"bereich8\" value=\"W\">
|
|
</p>
|
|
</td>
|
|
<td width=\"3%\" align=\"center\" >
|
|
<p style=\"margin:10 4; \">
|
|
<input type=\"radio\" name=\"bereich8\" value=\"A\">
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width=\"30%\">
|
|
<p style=\"margin:10 4; \">Bereich 9:
|
|
</td>
|
|
<td width=\"61%\" align=\"left\" >
|
|
<p style=\"margin:10 4; \">
|
|
<input type=\"text\" name=\"ber9\" size=\"50\">
|
|
</p>
|
|
</td>
|
|
<td width=\"3%\" align=\"center\" >
|
|
<p style=\"margin:10 4; \">
|
|
<input type=\"radio\" name=\"bereich9\" value=\"V\">
|
|
</p>
|
|
</td>
|
|
<td width=\"3%\" align=\"center\" >
|
|
<p style=\"margin:10 4; \">
|
|
<input type=\"radio\" name=\"bereich9\" value=\"W\">
|
|
</p>
|
|
</td>
|
|
<td width=\"3%\" align=\"center\" >
|
|
<p style=\"margin:10 4; \">
|
|
<input type=\"radio\" name=\"bereich9\" value=\"A\">
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width=\"30%\">
|
|
<p style=\"margin:10 4; \">Bereich 10:
|
|
</td>
|
|
<td width=\"61%\" align=\"left\" >
|
|
<p style=\"margin:10 4; \">
|
|
<input type=\"text\" name=\"ber10\" size=\"50\">
|
|
</p>
|
|
</td>
|
|
<td width=\"3%\" align=\"center\" >
|
|
<p style=\"margin:10 4; \">
|
|
<input type=\"radio\" name=\"bereich10\" value=\"V\">
|
|
</p>
|
|
</td>
|
|
<td width=\"3%\" align=\"center\" >
|
|
<p style=\"margin:10 4; \">
|
|
<input type=\"radio\" name=\"bereich10\" value=\"W\">
|
|
</p>
|
|
</td>
|
|
<td width=\"3%\" align=\"center\" >
|
|
<p style=\"margin:10 4; \">
|
|
<input type=\"radio\" name=\"bereich10\" value=\"A\">
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<input type=\"submit\" value=\"Eintragen\" name=\"B1\" size=\"20\"></form>
|
|
</td>
|
|
</tr>
|
|
</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\"> </td>
|
|
<td 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\"> </td>
|
|
</tr>
|
|
</table>
|
|
<p>
|
|
<table align=\"center\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" border=\"0\">
|
|
<tr>
|
|
<td width=\"1%\" background=\"../images/box_e1a.gif\"> </td>
|
|
<td align=\"left\" width=\"98%\" background=\"../images/box_top1.gif\" valign=\"top\">
|
|
<p align=\"center\"> </p>
|
|
</td>
|
|
<td align=\"right\" width=\"1%\" background=\"../images/box_e2a.gif\"> </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=del"; echo" method=\"POST\" name=\"anmschluss\">
|
|
<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse; border-left-width:0; border-right-width:0; border-bottom-width:0\" bordercolor=\"#111111\" width=\"100%\">
|
|
<tr>
|
|
<td align='center'>
|
|
<br>";
|
|
$db = dbconnect();
|
|
$query = "SELECT sbid, CONCAT( kennung, ' ', bezeichnung ) bezeichnung
|
|
FROM stan_stellenbereiche
|
|
WHERE jahrgang='$jahrgang'
|
|
ORDER BY CONCAT( kennung, ' ', bezeichnung )
|
|
|
|
";
|
|
$result = $db->query ($query)
|
|
or die ("Cannot execute query");
|
|
echo "<p align=\"center\"><select size=\"5\" name=\"ber_delete\">";
|
|
while ($row = $result->fetch_array()){
|
|
$ort_row = "$row[testdatum]|$row[testzeit]|$row[raum]";
|
|
echo "<option value='$row[sbid]'>$row[bezeichnung]</option>\n";
|
|
}
|
|
echo "</select>
|
|
<br>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<input type=\"submit\" value=\"Löschen\" name=\"B1\" size=\"20\"></form>
|
|
</td>
|
|
</tr>
|
|
</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\"> </td>
|
|
<td 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\"> </td>
|
|
</tr>
|
|
</table>
|
|
<br>
|
|
</td>
|
|
</tr>
|
|
</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>
|
|
</p>
|
|
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
</body>
|
|
|
|
</html>";
|
|
|
|
break;
|
|
case "eintragen":
|
|
|
|
|
|
$db = dbconnect();
|
|
|
|
if ($_POST[ber1] != '' AND $_POST[bereich1] != ''){$sql = $db->query("INSERT INTO stan_stellenbereiche (jahrgang, bezeichnung, kennung) VALUES ('$jahrgang', '$_POST[ber1]', '$_POST[bereich1]')");}
|
|
if ($_POST[ber2] != '' AND $_POST[bereich2] != ''){$sql = $db->query("INSERT INTO stan_stellenbereiche (jahrgang, bezeichnung, kennung) VALUES ('$jahrgang', '$_POST[ber2]', '$_POST[bereich2]')");}
|
|
if ($_POST[ber3] != '' AND $_POST[bereich3] != ''){$sql = $db->query("INSERT INTO stan_stellenbereiche (jahrgang, bezeichnung, kennung) VALUES ('$jahrgang', '$_POST[ber3]', '$_POST[bereich3]')");}
|
|
if ($_POST[ber4] != '' AND $_POST[bereich4] != ''){$sql = $db->query("INSERT INTO stan_stellenbereiche (jahrgang, bezeichnung, kennung) VALUES ('$jahrgang', '$_POST[ber4]', '$_POST[bereich4]')");}
|
|
if ($_POST[ber5] != '' AND $_POST[bereich5] != ''){$sql = $db->query("INSERT INTO stan_stellenbereiche (jahrgang, bezeichnung, kennung) VALUES ('$jahrgang', '$_POST[ber5]', '$_POST[bereich5]')");}
|
|
if ($_POST[ber6] != '' AND $_POST[bereich6] != ''){$sql = $db->query("INSERT INTO stan_stellenbereiche (jahrgang, bezeichnung, kennung) VALUES ('$jahrgang', '$_POST[ber6]', '$_POST[bereich6]')");}
|
|
if ($_POST[ber7] != '' AND $_POST[bereich7] != ''){$sql = $db->query("INSERT INTO stan_stellenbereiche (jahrgang, bezeichnung, kennung) VALUES ('$jahrgang', '$_POST[ber7]', '$_POST[bereich7]')");}
|
|
if ($_POST[ber8] != '' AND $_POST[bereich8] != ''){$sql = $db->query("INSERT INTO stan_stellenbereiche (jahrgang, bezeichnung, kennung) VALUES ('$jahrgang', '$_POST[ber8]', '$_POST[bereich8]')");}
|
|
if ($_POST[ber9] != '' AND $_POST[bereich9] != ''){$sql = $db->query("INSERT INTO stan_stellenbereiche (jahrgang, bezeichnung, kennung) VALUES ('$jahrgang', '$_POST[ber9]', '$_POST[bereich9]')");}
|
|
if ($_POST[ber10] != '' AND $_POST[bereich10] != ''){$sql = $db->query("INSERT INTO stan_stellenbereiche (jahrgang, bezeichnung, kennung) VALUES ('$jahrgang', '$_POST[ber10]', '$_POST[bereich10]')");}
|
|
|
|
$sql = $db->query("DELETE FROM stan_stellenbereiche WHERE bezeichnung = ''");
|
|
|
|
echo "
|
|
<meta http-equiv=\"refresh\" content=\"1; URL=bereiche.php\">
|
|
|
|
<html>
|
|
<head>
|
|
<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">
|
|
<link rel=\"stylesheet\" href=\"../styles_pc.css\" type=\"text/css\">
|
|
<title>Datumsänderung</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\">Datumsänderung</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>Sachbereiche erfasst!</b>
|
|
</p>
|
|
</p>
|
|
</td>
|
|
<td width=\"1%\" background=\"../images/box_r.gif\">
|
|
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
|
</tr>
|
|
<tr>
|
|
<td nowrap=\"nowrap\" align=\"left\" width=\"1%\" background=\"../images/box_e3.gif\">
|
|
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"></td>
|
|
<td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_bottom.gif\" colspan=\"2\">
|
|
<img height=\"16\" src=\"../images/blank.gif\" width=\"8\"></td>
|
|
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e4.gif\">
|
|
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"> </td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</body>
|
|
</html>";
|
|
|
|
break;
|
|
case "del":
|
|
|
|
|
|
|
|
$db = dbconnect();
|
|
|
|
$sql = $db->query("DELETE FROM stan_stellenbereiche WHERE sbid = '$_POST[ber_delete]'");
|
|
|
|
echo "
|
|
<meta http-equiv=\"refresh\" content=\"1; URL=bereiche.php\">
|
|
|
|
<html>
|
|
<head>
|
|
<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">
|
|
<link rel=\"stylesheet\" href=\"../styles_pc.css\" type=\"text/css\">
|
|
<title>Datumsänderung</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\">Datumsänderung</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>Sachbereiche gelöscht!</b>
|
|
</p>
|
|
</p>
|
|
</td>
|
|
<td width=\"1%\" background=\"../images/box_r.gif\">
|
|
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
|
</tr>
|
|
<tr>
|
|
<td nowrap=\"nowrap\" align=\"left\" width=\"1%\" background=\"../images/box_e3.gif\">
|
|
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"></td>
|
|
<td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_bottom.gif\" colspan=\"2\">
|
|
<img height=\"16\" src=\"../images/blank.gif\" width=\"8\"></td>
|
|
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e4.gif\">
|
|
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"> </td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</body>
|
|
</html>";
|
|
|
|
break;
|
|
case "ubernahme":
|
|
|
|
$jahr_neu = $jahrgang-1;
|
|
|
|
if($jahr_neu < 10){ // ggf. 0 anfügen, damit es DB konform wird
|
|
$vorjahr = "0".$jahr_neu;
|
|
}else{
|
|
$vorjahr = $jahr_neu;
|
|
}
|
|
|
|
$db = dbconnect();
|
|
|
|
$query = "SELECT bezeichnung, kennung
|
|
FROM stan_stellenbereiche
|
|
WHERE jahrgang = '$vorjahr'
|
|
AND
|
|
(bezeichnung not in (SELECT bezeichnung FROM stan_stellenbereiche WHERE jahrgang = '$jahrgang')
|
|
OR
|
|
kennung not in (SELECT kennung FROM stan_stellenbereiche WHERE jahrgang = '$jahrgang')
|
|
)
|
|
";
|
|
$result = $db->query ($query)
|
|
or die ("Cannot execute query");
|
|
|
|
while ($row = $result->fetch_array()){
|
|
$sql = $db->query("INSERT INTO stan_stellenbereiche (jahrgang, bezeichnung, kennung) VALUES ('$jahrgang', '$row[bezeichnung]', '$row[kennung]')");
|
|
}
|
|
|
|
echo"<meta http-equiv=\"refresh\" content=\"0; URL=".$_SERVER['PHP_SELF'] ."?action=default\">";
|
|
|
|
} // Ende Action
|
|
?>
|