skik/stud/ubersicht.php
2023-02-27 10:20:09 +01:00

143 lines
7.7 KiB
PHP
Executable File

<?php
include("kurs/datenbankanbindung.php"); // f&uuml;gt die Datenbankanbindung ein: Sys:\php\includes\kurs\datenbankanbindung.php
$db = dbconnect();
if ($_COOKIE["uid1"] == ""){ include("kurs/anmeldefehler_subdir.php"); exit;} //Wenn man nicht angemeldet ist soll man nichts ausw&auml;hlen k&ouml;nnen
$uid1=$_COOKIE["uid1"];
if ($uid1 == ""){ include("kurs/anmeldefehler_subdir.php"); exit;} //Wenn man nicht angemeldet ist soll man nichts ausw&auml;hlen k&ouml;nnen
/*
&Uuml;bersicht1 Studenten: Alle Sprachkurse / Interkulturelle Kompetenzen werden mit Dozenten entsprechend ihres Studienzweiges angezeigt
*/
$db = dbconnect();
include("kurs/skik/skik_useronline_write.php"); // F&uuml;r Statistik, wieviele User online sind
$res = $db->query("SELECT Jahrgang, stg FROM stud where uid=\"$uid1\"");
$stud_jahr = $res->fetch_array();
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>&Uuml;bersicht &uuml;ber die Sprachkurse / Interkulturelle Kompetenzen des Studienjahrgangs $stud_jahr[Jahrgang]</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=\"100%\" 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\">&Uuml;bersicht &uuml;ber die Sprachkurse / Interkulturelle Kompetenzen des Studienjahrgangs $stud_jahr[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\" cellpadding=\"4\" cellspacing=\"0\" style=\"border-collapse: collapse\" bordercolor=\"#E7E8ED\" width=\"100%\" id=\"AutoNumber1\">
<tr>
<td width=\"5%\">
<p align=\"center\"><b>Nr.</b></p>
</td>
<td width=\"49%\">
<b>Bezeichnung</b>
</td>
<td width=\"26%\">
<b>Leiter / Leiterin</b>
</td>
</td>
<td width=\"10%\">
<p align=\"center\"><b>Anmeldungen</b>
</td>
<td width=\"10%\">
<p align=\"center\"><b>Kurzbeschreibung</b>
</td>
</tr>";
$db = dbconnect();
$query = "SELECT id, FPRNr, Bezeichnung, TN_max, bemerkung
FROM skik_kurs
WHERE Jahr='$stud_jahr[Jahrgang]'
AND Zweig LIKE '%$stud_jahr[stg]%'
ORDER BY FPRNr asc";
$result = $db->query($query)
or die ("Cannot execute query");
while ($row = $result->fetch_array()){
if ( $res=$db->query("SELECT COUNT( * )
FROM skik_wunsch, stud
WHERE id =$row[id]
AND Prioritaet = '0'
AND skik_wunsch.uid = stud.uid
AND stud.durchgefallen !='Y'") ){
if ( $row1=$res->fetch_array() ) {
$result1=$row1[0];
} else $result1=0;
} else $result1=0;
echo "
<tr>
<td width=\"5%\" style=\"border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1px\">
<p align=\"center\">
$row[FPRNr]</p>
</td>
<td width=\"49%\" style=\"border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1px\">
$row[Bezeichnung]<br>
<span class=\"bemerkung\">$row[bemerkung]</span>
</td>
<td valign=\"middle\" width=\"26%\" style=\"border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1px\">";
$query2 = "SELECT doz_titel, doz_name FROM doz LEFT JOIN skik_doz USING ( doz_nr ) WHERE skik_doz.id = $row[id] AND skik_doz.doz_nr = doz.doz_nr";
$result2 = $db->query($query2)
or die ("Cannot execute query2");
while ($row2 = $result2->fetch_array()){
echo "$row2[doz_titel] $row2[doz_name]<br>";
}
echo"
</td>
<td width=\"10%\" style=\"border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1px\">
<p align=\"center\">$result1
</td>
<td width=\"10%\" style=\"border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1px\">
<p align=\"center\" style=\"margin-top: 4; margin-bottom: 4\">
<a href='detailansicht.php?id=$row[id]' target='blank'><img src='../images/i.jpg' border='0'></a>
</td>
</tr>";
}
echo "
</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>
</div>
</td>
</tr>
</table>
</body>
</html>";
?>