first commit
This commit is contained in:
190
admin/liste.php
Executable file
190
admin/liste.php
Executable file
@ -0,0 +1,190 @@
|
||||
<?php
|
||||
$user_admin=$_COOKIE["user_admin"];
|
||||
$jahrgang=$_COOKIE["jahrgang"];
|
||||
|
||||
if ($jahrgang == ""){ require("jahrgang.php"); exit;} //Wenn man kein Jahrgang ausgewählt hat wird die Jahrgangsauswahlseite geladen
|
||||
include("kurs/datenbankanbindung.php"); // fügt die Datenbankanbindung ein: Sys:\php\includes\kurs\datenbankanbindung.php
|
||||
|
||||
// Rechteüberprü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 fach_admin_rechte, fach_admin_rechte_zuord , fach_admin where fach_admin_rechte.fach_admin_rolle = fach_admin_rechte_zuord.fach_admin_rolle AND fach_admin_rechte_zuord.faid = fach_admin.faid AND fach_admin.user = '$user_admin' AND fach_admin_rechte_zuord.fach_admin_rolle = 'a_liste'");
|
||||
$row = $result->fetch_array();
|
||||
if ($row[0] != 1){ include("kurs/rechte.php"); exit;}
|
||||
// Rechteüberprüfung ende
|
||||
|
||||
|
||||
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>Übersicht über die Fachprojekte des Studienjahrgangs $stud_jahr[Jahrgang]</title>
|
||||
</head>
|
||||
<body>
|
||||
<table border=\"0\" style=\"border-collapse: collapse\" width=\"100%\" cellpadding=\"0\" height=\"100%\">
|
||||
<tr>
|
||||
<td>
|
||||
<div align=\"center\">
|
||||
<table cellspacing=\"0\" cellpadding=\"0\" width=\"614\" 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\">Übersicht über die Fachprojekte des Studienjahrgangs $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=\"2\" cellspacing=\"0\" style=\"border-collapse: collapse\" bordercolor=\"#E7E8ED\" width=\"100%\">
|
||||
<tr>
|
||||
<td width=\"384\" 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\">
|
||||
<b><font size=\"2\">Name, Vorname</font></b>
|
||||
</td>
|
||||
<td width=\"75\" align=\"center\" 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\">
|
||||
<b><font size=\"2\">AG</font></b></td>
|
||||
<td width=\"76\" align=\"center\" 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\">
|
||||
<b><font size=\"2\">Zweig</font></b></td>
|
||||
<td width=\"76\" align=\"center\" 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\">
|
||||
<b><font size=\"2\">FPRNr</font></b></td>
|
||||
</tr>";
|
||||
|
||||
|
||||
$db = dbconnect();
|
||||
$query = "SELECT stud.nachname, stud.vorname, stud.ag, stud.jahrgang, stud.stg, fachprojekt.FPRNr FROM stud, fachprojekt, fach_wunsch WHERE stud.uid = fach_wunsch.uid AND fach_wunsch.id = fachprojekt.id AND fach_wunsch.prioritaet = \"0\" and fachprojekt.jahr=\"$jahrgang\" and stud.durchgefallen != 'Y' ORDER BY stud.nachname";
|
||||
$result = $db->query($query)
|
||||
or die ("Cannot execute query");
|
||||
while ($row = $result->fetch_array()){
|
||||
|
||||
echo "
|
||||
<tr>
|
||||
<td width=\"384\" 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\">
|
||||
<font size=\"2\">$row[nachname], $row[vorname]</font>
|
||||
</td>
|
||||
<td width=\"75\" align=\"center\" 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\">
|
||||
<font size=\"2\">$row[ag]/$row[jahrgang]</font></td>
|
||||
<td width=\"76\" align=\"center\" 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\">
|
||||
<font size=\"2\">$row[stg]</font></td>
|
||||
<td width=\"76\" align=\"center\" 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\">
|
||||
<font size=\"2\">$row[FPRNr]</font></td>
|
||||
</tr>";
|
||||
}
|
||||
|
||||
if ( $res1=$db->query("select count(stg) from stud left join fach_wunsch using (uid) where (stud.stg='I' OR stud.stg='V' OR stud.stg='W') and stud.uid=fach_wunsch.uid and fach_wunsch.prioritaet=0 and stud.jahrgang=$jahrgang and stud.durchgefallen!='Y'") ){
|
||||
if ( $row1=$res1->fetch_array() ) {
|
||||
$result1=$row1[0];
|
||||
} else $result1=0;
|
||||
} else $result1=0;
|
||||
|
||||
|
||||
if ( $res3=$db->query("select count(stg) from stud left join fach_wunsch using (uid) where stud.stg=\"F\" and stud.uid=fach_wunsch.uid and fach_wunsch.prioritaet=0 and stud.jahrgang=$jahrgang and stud.durchgefallen!='Y'") ){
|
||||
if ( $row3=$res3->fetch_array() ) {
|
||||
$result3=$row3[0];
|
||||
} else $result3=0;
|
||||
} else $result3=0;
|
||||
|
||||
if ( $res4=$db->query("select count(stg) from stud left join fach_wunsch using (uid) where stud.stg=\"R\" and stud.uid=fach_wunsch.uid and fach_wunsch.prioritaet=0 and stud.jahrgang=$jahrgang and stud.durchgefallen!='Y'") ){
|
||||
if ( $row4=$res4->fetch_array() ) {
|
||||
$result4=$row4[0];
|
||||
} else $result4=0;
|
||||
} else $result4=0;
|
||||
|
||||
if ( $res5=$db->query("select count(stg) from stud left join fach_wunsch using (uid) where stud.stg=\"S\" and stud.uid=fach_wunsch.uid and fach_wunsch.prioritaet=0 and stud.jahrgang=$jahrgang and stud.durchgefallen!='Y'") ){
|
||||
if ( $row5=$res5->fetch_array() ) {
|
||||
$result5=$row5[0];
|
||||
} else $result5=0;
|
||||
} else $result5=0;
|
||||
|
||||
|
||||
|
||||
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>
|
||||
<br>
|
||||
<table cellspacing=\"0\" cellpadding=\"0\" width=\"614\" 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\">Summen der Studienzweige</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=\"2\" cellspacing=\"0\" style=\"border-collapse: collapse\" bordercolor=\"#E7E8ED\" width=\"100%\">
|
||||
<tr>
|
||||
<td width=\"382\" 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\">
|
||||
<font size=\"2\">Innenverwaltung</font>
|
||||
</td>
|
||||
<td width=\"115\" align=\"center\" 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\">
|
||||
<font size=\"2\">$result1</font>
|
||||
</td>
|
||||
<td width=\"115\" align=\"center\" 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\">
|
||||
<font size=\"2\"></font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"382\" 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\">
|
||||
<font size=\"2\">Finanzverwaltung</font>
|
||||
</td>
|
||||
<td width=\"115\" align=\"center\" 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\">
|
||||
<font size=\"2\">$result3</font>
|
||||
</td>
|
||||
<td width=\"115\" align=\"center\" 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\">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"382\" 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\">
|
||||
<font size=\"2\">Rentenversicherung</font>
|
||||
</td>
|
||||
<td width=\"115\" align=\"center\" 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\">
|
||||
<font size=\"2\">$result4</font>
|
||||
</td>
|
||||
<td width=\"115\" align=\"center\" 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\">
|
||||
|
||||
</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>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>";
|
||||
?>
|
Reference in New Issue
Block a user