237 lines
11 KiB
PHP
Executable File
237 lines
11 KiB
PHP
Executable File
<?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 das 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 ein Soziale Kompetenz abgeben!</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
|
|
|
|
|
|
$query2 = "SELECT vorname, nachname, ag, jahrgang from stud, sozkom_wunsch where stud.uid=sozkom_wunsch.uid AND id='$row[id]' and Prioritaet='0' ORDER BY nachname";
|
|
$result2 = $db->query($query2)
|
|
or die ("Cannot execute query2");
|
|
|
|
|
|
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=\"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=\"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\">Teilnehmer im 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=\"100%\" align=\"center\">
|
|
<tr>
|
|
<td align=\"left\" width='70%'><b>Name</b></td>
|
|
<td align=\"left\" width='30%'><b>AG</b></td>
|
|
</tr>";
|
|
|
|
while ($row2 = $result2->fetch_array()){
|
|
echo"
|
|
<tr>
|
|
<td width='70%' valign=\"top\">$row2[vorname] $row2[nachname]</td>
|
|
<td width='30%' align=\"left\">$row2[ag]/$row2[jahrgang]</td>
|
|
</tr>";
|
|
}
|
|
echo"
|
|
</table>
|
|
|
|
<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>";
|
|
|
|
|
|
?>
|