<?php
$user_admin=$_COOKIE["user_admin"];
$jahrgang=$_COOKIE["jahrgang"];

if ($jahrgang == ""){ require("jahrgang.php"); exit;} //Wenn man kein Jahrgang ausgew&auml;hlt hat wird die Jahrgangsauswahlseite geladen
include("kurs/datenbankanbindung.php");     // f&uuml;gt die Datenbankanbindung ein: Sys:\php\includes\kurs\datenbankanbindung.php

// Rechte&uuml;berpr&uuml;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_anmschl'");
$row = $result->fetch_array();
if ($row[0] != 1){ include("kurs/rechte.php"); exit;}
// Rechte&uuml;berpr&uuml;fung ende


if (isset($_GET['action']))
   $action = $_GET['action'];
else
   $action = "";

switch($action){
default:


$db = dbconnect();

$frist_beg = $db->query("SELECT DATE_Format(anmeldebeginn, '%d') tag_anmbeg,
                                 DATE_Format(anmeldebeginn, '%m') mon_anmbeg,
                                 DATE_Format(anmeldebeginn, '%Y') jahr_anmbeg,
                                 DATE_Format(anmeldebeginn, '%H') std_anmbeg,
                                 DATE_Format(anmeldebeginn, '%i') min_anmbeg,
                                 DATE_Format(anmeldebeginn, '%s') sek_anmbeg,
                                 DATE_Format(anmeldeschluss, '%d') tag_ende,
                                 DATE_Format(anmeldeschluss, '%m') mon_ende,
                                 DATE_Format(anmeldeschluss, '%Y') jahr_ende,
                                 DATE_Format(anmeldeschluss, '%H') std_ende,
                                 DATE_Format(anmeldeschluss, '%i') min_ende,
                                 DATE_Format(anmeldeschluss, '%s') sek_ende,
                                 DATE_Format(antrag_von, '%d') antrag_von_tag,
                                 DATE_Format(antrag_von, '%m') antrag_von_mon,
                                 DATE_Format(antrag_von, '%Y') antrag_von_jahr,
                                 DATE_Format(antrag_bis, '%d') antrag_bis_tag,
                                 DATE_Format(antrag_bis, '%m') antrag_bis_mon,
                                 DATE_Format(antrag_bis, '%Y') antrag_bis_jahr,
                                 DATE_Format(einsicht_ag_ubersicht, '%d') einsicht_von_tag,
                                 DATE_Format(einsicht_ag_ubersicht, '%m') einsicht_von_mon,
                                 DATE_Format(einsicht_ag_ubersicht, '%Y') einsicht_von_jahr,
                                 DATE_Format(einsicht_ag_ubersicht, '%H') einsicht_std,
                                 DATE_Format(einsicht_ag_ubersicht, '%i') einsicht_min,
                                 DATE_Format(einsicht_ag_ubersicht, '%s') einsicht_sek,
                                 DATE_Format(wahl_standort, '%d') wahl_stadort_tag,
                                 DATE_Format(wahl_standort, '%m') wahl_stadort_mon,
                                 DATE_Format(wahl_standort, '%Y') wahl_stadort_jahr,
                                 DATE_Format(wahl_standort, '%H') wahl_stadort_std,
                                 DATE_Format(wahl_standort, '%i') wahl_stadort_min,
                                 DATE_Format(wahl_standort, '%s') wahl_stadort_sek
                            FROM stan_frist WHERE jahrgang=$jahrgang");
$anmelde = $frist_beg->fetch_array(); // Herausfinden des Beginndatums des vom Studenten gew&auml;hlten Kurses



echo"

<html>

<head>
<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">
<link rel=\"stylesheet\" href=\"../styles_pc.css\" type=\"text/css\">
<titleFristen bearbeiten</title>
</head>

<body onload=\"if(document.anmschluss)document.anmschluss.beg_tag.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=\"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\">Fristen bearbeiten</font><br>
                    <font class=\"sh\">Jahrgang: $jahrgang</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\">&nbsp;</td>
                                    <td align=\"left\" width=\"98%\" background=\"../images/box_top1.gif\" valign=\"top\">
                                    <p align=\"center\">&nbsp;</p>
                                    </td>
                                    <td align=\"right\" width=\"1%\" background=\"../images/box_e2a.gif\">&nbsp;</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=schluss"; 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=\"40%\">
                                            <p style=\"margin:10 4; \">Anmeldebeginn:
                                            </td>
                                            <td width=\"60%\" align=\"left\" >
                                            <p style=\"margin:10 4; \">
                                              <input type=\"text\" name=\"beg_tag\" size=\"1\" value=\"$anmelde[tag_anmbeg]\">.<input type=\"text\" name=\"beg_mon\" size=\"1\" value=\"$anmelde[mon_anmbeg]\">.<input type=\"text\" name=\"beg_jahr\" size=\"3\" value=\"$anmelde[jahr_anmbeg]\"> um <input type=\"text\" name=\"beg_std\" size=\"1\" value=\"$anmelde[std_anmbeg]\">:<input type=\"text\" name=\"beg_min\" size=\"1\" value=\"$anmelde[min_anmbeg]\">:<input type=\"text\" name=\"beg_sek\" size=\"1\" value=\"$anmelde[sek_anmbeg]\"> Uhr
                                            </p>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td width=\"40%\" >
                                            <p style=\"margin:10 4; \">Anmeldeschluss:
                                            </td>
                                            <td width=\"60%\" align=\"left\">
                                            <p style=\"margin:10 4; \">
                                              <input type=\"text\" name=\"end_tag\" size=\"1\" value=\"$anmelde[tag_ende]\">.<input type=\"text\" name=\"end_mon\" size=\"1\" value=\"$anmelde[mon_ende]\">.<input type=\"text\" name=\"end_jahr\" size=\"3\"  value=\"$anmelde[jahr_ende]\"> um <input type=\"text\" name=\"end_std\" size=\"1\" value=\"$anmelde[std_ende]\">:<input type=\"text\" name=\"end_min\" size=\"1\" value=\"$anmelde[min_ende]\">:<input type=\"text\" name=\"end_sek\" size=\"1\" value=\"$anmelde[sek_ende]\"> Uhr
                                            </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\">&nbsp;</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\">&nbsp;</td>
                                </tr>
                            </table>
                            <br>
                            <table align=\"center\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" border=\"0\">
                                <tr>
                                    <td width=\"1%\" background=\"../images/box_e1a.gif\">&nbsp;</td>
                                    <td align=\"left\" width=\"98%\" background=\"../images/box_top1.gif\" valign=\"top\">
                                    <p align=\"center\">&nbsp;</p>
                                    </td>
                                    <td align=\"right\" width=\"1%\" background=\"../images/box_e2a.gif\">&nbsp;</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\" 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=\"40%\">
                                            <p style=\"margin:10 4; \">Antragszeitraum:<font size='1'><br>Bsp: 01.09.2007 bis 31.08.2008</font>
                                            </td>
                                            <td width=\"60%\" align=\"left\" >
                                            <p style=\"margin:10 4; \">
                                              <input type=\"text\" name=\"beg_tag_erf\" size=\"1\" value=\"$anmelde[antrag_von_tag]\">.<input type=\"text\" name=\"beg_mon_erf\" size=\"1\" value=\"$anmelde[antrag_von_mon]\">.<input type=\"text\" name=\"beg_jahr_erf\" size=\"3\" value=\"$anmelde[antrag_von_jahr]\"> bis
                                              <input type=\"text\" name=\"end_tag_erf\" size=\"1\" value=\"$anmelde[antrag_bis_tag]\">.<input type=\"text\" name=\"end_mon_erf\" size=\"1\" value=\"$anmelde[antrag_bis_mon]\">.<input type=\"text\" name=\"end_jahr_erf\" size=\"3\" value=\"$anmelde[antrag_bis_jahr]\">
                                            </p>
                                            </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\">&nbsp;</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\">&nbsp;</td>
                                </tr>
                            </table>
                            <br>
                            <table align=\"center\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" border=\"0\">
                                <tr>
                                    <td width=\"1%\" background=\"../images/box_e1a.gif\">&nbsp;</td>
                                    <td align=\"left\" width=\"98%\" background=\"../images/box_top1.gif\" valign=\"top\">
                                    <p align=\"center\">&nbsp;</p>
                                    </td>
                                    <td align=\"right\" width=\"1%\" background=\"../images/box_e2a.gif\">&nbsp;</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\" 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=\"40%\">
                                            <p style=\"margin:10 4; \">Wahltermin der Standorte:
                                            </td>
                                            <td width=\"60%\" align=\"left\" >
                                            <p style=\"margin:10 4; \">
                                              <input type=\"text\" name=\"wahl_stadort_tag\" size=\"1\" value=\"$anmelde[wahl_stadort_tag]\">.<input type=\"text\" name=\"wahl_stadort_mon\" size=\"1\" value=\"$anmelde[wahl_stadort_mon]\">.<input type=\"text\" name=\"wahl_stadort_jahr\" size=\"3\" value=\"$anmelde[wahl_stadort_jahr]\">  um <input type=\"text\" name=\"wahl_stadort_std\" size=\"1\" value=\"$anmelde[wahl_stadort_std]\">:<input type=\"text\" name=\"wahl_stadort_min\" size=\"1\" value=\"$anmelde[wahl_stadort_min]\">:<input type=\"text\" name=\"wahl_stadort_sek\" size=\"1\" value=\"$anmelde[wahl_stadort_sek]\"> Uhr
                                            </p>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td width=\"40%\">
                                            <p style=\"margin:10 4; \">Einsicht Standortsübersicht:
                                            </td>
                                            <td width=\"60%\" align=\"left\" >
                                            <p style=\"margin:10 4; \">
                                              <input type=\"text\" name=\"einsicht_tag\" size=\"1\" value=\"$anmelde[einsicht_von_tag]\">.<input type=\"text\" name=\"einsicht_mon\" size=\"1\" value=\"$anmelde[einsicht_von_mon]\">.<input type=\"text\" name=\"einsicht_jahr\" size=\"3\" value=\"$anmelde[einsicht_von_jahr]\">  um <input type=\"text\" name=\"einsicht_std\" size=\"1\" value=\"$anmelde[einsicht_std]\">:<input type=\"text\" name=\"einsicht_min\" size=\"1\" value=\"$anmelde[einsicht_min]\">:<input type=\"text\" name=\"einsicht_sek\" size=\"1\" value=\"$anmelde[einsicht_sek]\"> Uhr
                                            </p>
                                            </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\">&nbsp;</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\">&nbsp;</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>
               <input type=\"submit\" value=\"Abschicken\" name=\"B1\" size=\"20\"></form>
        </div>
        </td>
    </tr>
</table>

</body>

</html>";

break;
case "schluss":


if (checkdate($_POST['beg_mon'], $_POST['beg_tag'], $_POST['beg_jahr']) == 0) { // checkdate liefert 0 & 1 zur&uuml;ck: 0 wenn Datum falsch, 1 wenn Datum richtig
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\">Falsches Datum</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 Datumseingabe beim Anmeldebeginn ist falsch!</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;
} // Ende Datums&uuml;berpr&uuml;fung

if (checkdate($_POST['end_mon'], $_POST['end_tag'], $_POST['end_jahr']) == 0) { // checkdate liefert 0 & 1 zur&uuml;ck: 0 wenn Datum falsch, 1 wenn Datum richtig
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\">Falsches Datum</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 Datumseingabe beim Anmeldeschluss ist falsch!</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;
} // Ende Datums&uuml;berpr&uuml;fung




if ($_POST['beg_std'] < 0 or $_POST['beg_std'] > 23
    or $_POST['beg_min'] < 0 or $_POST['beg_min'] > 59
    or $_POST['beg_sek'] < 0 or $_POST['beg_sek'] > 59)
{
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\">Falsche Zeit</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 Beginnzeit ist falsch!</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['end_std'] < 0 or $_POST['end_std'] > 23
    or $_POST['end_min'] < 0 or $_POST['end_min'] > 59
    or $_POST['end_sek'] < 0 or $_POST['end_sek'] > 59)
{
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\">Falsche Zeit</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 Endzeit ist falsch!</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 (checkdate($_POST['beg_mon_erf'], $_POST['beg_tag_erf'], $_POST['beg_jahr_erf']) == 0) { // checkdate liefert 0 & 1 zur&uuml;ck: 0 wenn Datum falsch, 1 wenn Datum richtig
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\">Falsches Datum</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 Datumseingabe beim Antragszeitraum \"von\" ist falsch!</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;
} // Ende Datums&uuml;berpr&uuml;fung



if (checkdate($_POST['end_mon_erf'], $_POST['end_tag_erf'], $_POST['end_jahr_erf']) == 0) { // checkdate liefert 0 & 1 zur&uuml;ck: 0 wenn Datum falsch, 1 wenn Datum richtig
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\">Falsches Datum</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 Datumseingabe beim Antragszeitraum \"bis\" ist falsch!</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;
} // Ende Datums&uuml;berpr&uuml;fung





if (checkdate($_POST['einsicht_mon'], $_POST['einsicht_tag'], $_POST['einsicht_jahr']) == 0) { // checkdate liefert 0 & 1 zur&uuml;ck: 0 wenn Datum falsch, 1 wenn Datum richtig
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\">Falsches Datum</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 Datumseingabe bei 'Einsicht Standortübersicht' ist falsch!</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;
} // Ende Datums&uuml;berpr&uuml;fung



if ($_POST['einsicht_std'] < 0 or $_POST['einsicht_std'] > 23
    or $_POST['einsicht_min'] < 0 or $_POST['einsicht_min'] > 59
    or $_POST['einsicht_sek'] < 0 or $_POST['einsicht_sek'] > 59)
{
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\">Falsche Zeit</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 Uhrzeit bei 'Einsicht Standortübersicht' ist falsch!</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 (checkdate($_POST['wahl_stadort_mon'], $_POST['wahl_stadort_tag'], $_POST['wahl_stadort_jahr']) == 0) { // checkdate liefert 0 & 1 zur&uuml;ck: 0 wenn Datum falsch, 1 wenn Datum richtig
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\">Falsches Datum</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 Datumseingabe bei 'Wahltermin der Standorte' ist falsch!</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;
} // Ende Datums&uuml;berpr&uuml;fung




if ($_POST['wahl_stadort_std'] < 0 or $_POST['wahl_stadort_std'] > 23
    or $_POST['wahl_stadort_min'] < 0 or $_POST['wahl_stadort_min'] > 59
    or $_POST['wahl_stadort_sek'] < 0 or $_POST['wahl_stadort_sek'] > 59)
{
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\">Falsche Zeit</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 Uhrzeit bei 'Wahltermin der Standorte' ist falsch!</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;
}

$VerID = $_COOKIE["ck_stan_id"];
$beg_dat = "$_POST[beg_jahr]-$_POST[beg_mon]-$_POST[beg_tag] $_POST[beg_std]:$_POST[beg_min]:$_POST[beg_sek]";
$end_dat = "$_POST[end_jahr]-$_POST[end_mon]-$_POST[end_tag] $_POST[end_std]:$_POST[end_min]:$_POST[end_sek]";
$erf_beg = " $_POST[beg_jahr_erf]-$_POST[beg_mon_erf]-$_POST[beg_tag_erf]";
$erf_end = " $_POST[end_jahr_erf]-$_POST[end_mon_erf]-$_POST[end_tag_erf]";
$einsicht_dat = "$_POST[einsicht_jahr]-$_POST[einsicht_mon]-$_POST[einsicht_tag] $_POST[einsicht_std]:$_POST[einsicht_min]:$_POST[einsicht_sek]";
$wahl_standort_dat = "$_POST[wahl_stadort_jahr]-$_POST[wahl_stadort_mon]-$_POST[wahl_stadort_tag] $_POST[wahl_stadort_std]:$_POST[wahl_stadort_min]:$_POST[wahl_stadort_sek]";
$db = dbconnect();

$sql = $db->query ("DELETE FROM stan_frist WHERE jahrgang='$jahrgang'");
$sql = $db->query("INSERT INTO stan_frist (jahrgang, anmeldebeginn, anmeldeschluss, antrag_von, antrag_bis, einsicht_ag_ubersicht, wahl_standort) VALUES ('$jahrgang', '$beg_dat', '$end_dat', '$erf_beg', '$erf_end', '$einsicht_dat', '$wahl_standort_dat')");

echo "
<meta http-equiv=\"refresh\" content=\"1; URL=anmschluss.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&auml;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&auml;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>Das Datum wurde aktualisiert!</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>";

} // Ende Action
?>
