first commit
This commit is contained in:
226
kompetenz/endgueltig.php
Executable file
226
kompetenz/endgueltig.php
Executable file
@ -0,0 +1,226 @@
|
||||
<?php
|
||||
if ($_COOKIE["uid1"] == ""){ include("kurs/anmeldefehler_subdir.php"); exit;} //Wenn man nicht angemeldet ist soll man nichts auswählen können
|
||||
$uid1=$_COOKIE["uid1"];
|
||||
include("kurs/datenbankanbindung.php"); // fügt die Datenbankanbindung ein: Sys:\php\includes\kurs\datenbankanbindung.php
|
||||
$db = dbconnect();
|
||||
include("kurs/sozkom/sozkom_useronline_write.php"); // Für Statistik, wieviele User online sind
|
||||
|
||||
// ÜBerprüfung, ob die Anmeldefrist überschritten ist
|
||||
$heute = mktime(0, 0, 0, date("m"), date("d"), date("Y")); // heutiges Datum
|
||||
$heute_format = date("Y-m-d", $heute); // ISO-8601 Format wie in der Datenbank: Formatierung für Vergleiche erforderlich
|
||||
|
||||
$res = $db->query("SELECT Jahrgang, stg FROM stud where uid=\"$uid1\"");
|
||||
$stud_jahr = $res->fetch_array();
|
||||
|
||||
$anm_schluss = $db->query("SELECT DATE_Format(kompetenzen_einsicht, '%Y-%m-%d')AS datum, DATE_Format(kompetenzen_einsicht, '%d.%m.%Y')AS einsicht1 FROM sozkom_ende where jahrgang='$stud_jahr[Jahrgang]' AND stg='$stud_jahr[stg]'");
|
||||
$row_schluss = $anm_schluss->fetch_array(); // Herausfinden des Beginndatums des vom Studenten gewählten Kurses
|
||||
|
||||
$a = strtotime ($heute_format); //Umrechnung des Fristgrenztages in eine Zahl
|
||||
$b = strtotime ($row_schluss[datum]); // Umrechnung des Beginndatums in eine Zahl
|
||||
|
||||
if ($a < $b){
|
||||
echo "
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">
|
||||
<link rel=\"stylesheet\" href=\"../styles_pc.css\" type=\"text/css\">
|
||||
<title>Zugang gesperrt</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\">Zugang gesperrt</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 Einsicht in die endgültige Soziale Kompetenz ist nicht vor<br>$row_schluss[einsicht1]<br>möglich!</b>
|
||||
</p>
|
||||
<p align=\"center\"><a href=\"../hauptframe.php\">
|
||||
<img border=\"0\" src=\"../images/zurueck.gif\" width=\"77\" height=\"22\"></a><br>
|
||||
</p>
|
||||
<p></p>
|
||||
<p></p>
|
||||
<p></p>
|
||||
<p></p>
|
||||
<p><br>
|
||||
</p>
|
||||
</td>
|
||||
<td width=\"1%\" background=\"../images/box_r.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"1%\" background=\"../images/box_e3.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_bottom.gif\" colspan=\"2\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"8\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e4.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>";
|
||||
exit;
|
||||
} // Ende Überprüfung der Zeitüberschreitung
|
||||
|
||||
|
||||
|
||||
// Herausfinden, ob überhaupt ein Soziale Kompetenz abgegeben wurde
|
||||
$psn_abg = $db->query("SELECT uid FROM sozkom_wunsch WHERE uid=\"$uid1\"");
|
||||
$abgegeben = $psn_abg->fetch_array();
|
||||
|
||||
if ($abgegeben[uid] == ""){
|
||||
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>Zugang gesperrt</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\">Zugang gesperrt</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 zuerst eine Soziale Kompetenz belegen!</b>
|
||||
</p>
|
||||
<p align=\"center\"><a href=\"../hauptframe.php\">
|
||||
<img border=\"0\" src=\"../images/zurueck.gif\" width=\"77\" height=\"22\"></a><br>
|
||||
</p>
|
||||
<p></p>
|
||||
<p></p>
|
||||
<p></p>
|
||||
<p></p>
|
||||
<p><br>
|
||||
</p>
|
||||
</td>
|
||||
<td width=\"1%\" background=\"../images/box_r.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"1%\" background=\"../images/box_e3.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_bottom.gif\" colspan=\"2\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"8\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e4.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>";
|
||||
exit;
|
||||
}
|
||||
|
||||
$sql = $db->query("SELECT id from sozkom_wunsch where uid=\"$uid1\" and Prioritaet=\"0\"");
|
||||
$row = $sql->fetch_array(); // Herausfinden des Beginndatums des vom Studenten gewählten Kurses
|
||||
|
||||
$sql1 = $db->query("SELECT FPRNr, Bezeichnung from sozkom_kompetenz where id=\"$row[id]\"");
|
||||
$row1 = $sql1->fetch_array(); // Herausfinden des Beginndatums des vom Studenten gewä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\">
|
||||
<title>Endgültiges Soziale Kompetenz</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>
|
||||
<font class=\"hd\">Endgültige Soziale Kompetenz</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>
|
||||
<table width=\"80%\" align=\"center\">
|
||||
<tr>
|
||||
<td width=\"35%\"><b>Nr.:</b></td>
|
||||
<td align=\"left\">$row1[FPRNr]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"35%\" valign=\"top\"><b>Bezeichnung:</b></td>
|
||||
<td align=\"left\">$row1[Bezeichnung]</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p align=\"center\"><a href=\"../hauptframe.php\">
|
||||
<img border=\"0\" src=\"../images/zurueck.gif\" width=\"77\" height=\"22\"></a><br>
|
||||
<p></p>
|
||||
<p></p>
|
||||
<p></p>
|
||||
<p><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>";
|
||||
|
||||
|
||||
?>
|
Reference in New Issue
Block a user