273 lines
12 KiB
PHP
Executable File
273 lines
12 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/spt/spt_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 ag, Jahrgang, stg FROM stud where uid=\"$uid1\"");
|
|
$stud_jahr = $res->fetch_array();
|
|
|
|
# Änderungen für März Jahrgänge
|
|
if($stud_jahr['ag'] >= 30){
|
|
$semester=30;
|
|
}else{
|
|
$semester=90;
|
|
}
|
|
|
|
$anm_schluss = $db->query("SELECT DATE_Format(spt_einsicht, '%Y-%m-%d')AS datum, DATE_Format(spt_einsicht, '%d.%m.%Y')AS einsicht1
|
|
FROM spt_ende
|
|
WHERE jahrgang='$stud_jahr[Jahrgang]'
|
|
AND stg='$stud_jahr[stg]'
|
|
AND semester='$semester'
|
|
");
|
|
$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 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 Vertiefungsbereich abgegeben wurde
|
|
$psn_abg = $db->query("SELECT uid FROM spt_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 Schwerpunktthemen 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;
|
|
}
|
|
|
|
|
|
$sql1 = $db->query("SELECT FPRNr, Bezeichnung from spt_kurs 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 Ergebnis</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 ihrer Themen</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\">";
|
|
|
|
$query = "SELECT a.id, b.bezeichnung
|
|
FROM spt_wunsch a, spt_kurs b
|
|
WHERE a.id=b.id
|
|
AND uid='$uid1'
|
|
AND semester='$semester'";
|
|
|
|
|
|
|
|
$result = $db->query ($query)
|
|
or die ("Cannot execute query");
|
|
|
|
while ($row = $result->fetch_array()){
|
|
echo "<tr><td width='70%' valign=\"top\"><br><b>$row[bezeichnung]:</b></td><td width='30%' align=\"left\"></td></tr>";
|
|
|
|
$query2 = "SELECT vorname, nachname, ag, jahrgang
|
|
from stud, spt_wunsch
|
|
where stud.uid=spt_wunsch.uid
|
|
AND id='$row[id]'
|
|
ORDER BY nachname";
|
|
$result2 = $db->query($query2)
|
|
or die ("Cannot execute query2");
|
|
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>";
|
|
|
|
|
|
?>
|