396 lines
19 KiB
PHP
Executable File
396 lines
19 KiB
PHP
Executable File
<?php
|
|
$jahrgang=$_COOKIE["jahrgang"];
|
|
$doz_uid1=$_COOKIE["doz_uid1"];
|
|
|
|
if ($jahrgang == ""){ require("jahrgang_doz.php"); exit;} //Wenn man nicht angemeldet ist soll man nichts auswählen können
|
|
if ($doz_uid1 == ""){ include("kurs/anmeldefehler_subdir.php"); exit;} //Wenn man nicht angemeldet ist soll man nichts auswählen können
|
|
|
|
include("kurs/datenbankanbindung.php"); // fügt die Datenbankanbindung ein: Sys:\php\includes\kurs\datenbankanbindung.php
|
|
$db = dbconnect();
|
|
|
|
|
|
if (isset($_GET['action']))
|
|
$action = $_GET['action'];
|
|
else
|
|
$action = "";
|
|
|
|
switch($action){
|
|
default:
|
|
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>Themenübersicht</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 align=\"left\" width=\"1%\" width=\"10\" background=\"../images/box_e1.gif\">
|
|
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
|
<td align=\"left\" width=\"98%\" background=\"../images/box_top.gif\" valign=\"top\" colspan=\"2\">
|
|
<img height=\"10\" src=\"../images/blank.gif\" width=\"1\"><br>
|
|
<font class=\"hd\">Themenübersicht</font>
|
|
<img height=\"5\" src=\"../images/blank.gif\" width=\"1\"></td>
|
|
<td 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\">
|
|
|
|
<form method=POST action=$_SERVER[PHP_SELF]?action=ausgabe name=PSN_bearb>
|
|
<table border=\"0\" cellpadding=\"4\" cellspacing=\"0\" style=\"border-collapse: collapse\" bordercolor=\"#E7E8ED\" width=\"100%\">
|
|
<tr>
|
|
<td width=\"8%\" rowspan=\"2\" 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\"><b>Nr.</b></p>
|
|
</td>
|
|
<td width=\"56%\" rowspan=\"2\" 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>
|
|
<p>Bezeichnung</p>
|
|
</b></td>
|
|
<td width=\"12%\" style=\"border-top-color: #111111; border-top-width: 1; border-bottom-style: none; border-bottom-width: medium; border-right-style:none; border-right-width:medium\">
|
|
<b>
|
|
<p align=\"center\">Teilnehmer</p>
|
|
</b></td>
|
|
<td width=\"12%\" align=\"center\" rowspan=\"2\" 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>
|
|
<p align=\"center\">Anzahl<br>Themen</p>
|
|
</b></td>
|
|
<td width=\"12%\" align=\"center\" rowspan=\"2\" 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>Auswahl</b></td>
|
|
</tr>
|
|
<tr>
|
|
<td width=\"24%\" 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\"><b>Ist / Max </b></p>
|
|
</td>
|
|
</tr>";
|
|
|
|
$db = dbconnect();
|
|
|
|
$sel_doznr = $db->query("SELECT doz_nr FROM doz where doz_uid=\"$doz_uid1\"");
|
|
$doz_nr = $sel_doznr->fetch_array();
|
|
$sel_id = "SELECT id FROM skik_doz where doz_nr=\"$doz_nr[0]\""; // ID herausfinden übr doz_nr
|
|
$id = $db->query($sel_id)
|
|
or die ("Cannot execute ID");
|
|
while ($row_id = $id->fetch_array()){ //Schleife1 diverse IDs durchlaufen
|
|
$query = "SELECT id, FPRNr, Bezeichnung, Zweig, TN_max FROM skik_kurs where Jahr=\"$jahrgang\" and id=\"$row_id[id]\" order by FPRNr asc"; //ID kann doppelt belegt sein
|
|
$result = $db->query($query)
|
|
or die ("Cannot execute query");
|
|
while ($row = $result->fetch_array()){ // Schleife2 Bezeichnung usw. anhand der gelscheiften ID ausgeben, ohne Durchfaller
|
|
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() ) {
|
|
$result_ist=$row1[0];
|
|
} else $result_ist=0;
|
|
} else $result_ist=0;
|
|
|
|
if ( $res=$db->query("SELECT count(skik_ergebnis.uid) from skik_ergebnis left join stud using (uid) where skik_ergebnis.id=$row[id] and stud.durchgefallen =\"N\"") ){
|
|
if ( $row1=$res->fetch_array() ) {
|
|
$anz_themen=$row1[0];
|
|
} else $anz_themen=0;
|
|
} else $anz_themen=0;
|
|
echo "
|
|
<td width=\"8%\" 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=\"56%\" 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>$row[Bezeichnung]<span class=\"bemerkung\"><br>
|
|
$row[bemerkung]</span></p>
|
|
</td>
|
|
<td width=\"12%\" 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\">$result_ist /
|
|
$row[TN_max]</p>
|
|
</td>
|
|
<td width=\"12%\" 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\">$anz_themen</p>
|
|
</td>
|
|
<td width=\"12%\" 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\">
|
|
<p>";
|
|
$split = str_split($row[Zweig]);
|
|
$vt1 = $split[0]; // I
|
|
$vt2 = $split[1]; // R
|
|
$vt3 = $split[2]; // F
|
|
$vt4 = $split[3]; // S
|
|
|
|
$db = dbconnect();
|
|
$dat_vt1 = $db->query("SELECT skik_einsicht, DATE_Format(skik_einsicht, '%d.%m.%Y') skik_einsicht_form FROM skik_ende WHERE stg='$vt1' AND jahrgang='$jahrgang'");
|
|
$row_dat1 = $dat_vt1->fetch_array();
|
|
|
|
$dat_vt2 = $db->query("SELECT skik_einsicht, DATE_Format(skik_einsicht, '%d.%m.%Y') skik_einsicht_form FROM skik_ende WHERE stg='$vt2' AND jahrgang='$jahrgang'");
|
|
$row_dat2 = $dat_vt2->fetch_array();
|
|
|
|
$dat_vt3 = $db->query("SELECT skik_einsicht, DATE_Format(skik_einsicht, '%d.%m.%Y') skik_einsicht_form FROM skik_ende WHERE stg='$vt3' AND jahrgang='$jahrgang'");
|
|
$row_dat3 = $dat_vt3->fetch_array();
|
|
|
|
$dat_vt4 = $db->query("SELECT skik_einsicht, DATE_Format(skik_einsicht, '%d.%m.%Y') skik_einsicht_form FROM skik_ende WHERE stg='$vt4' AND jahrgang='$jahrgang'");
|
|
$row_dat4 = $dat_vt4->fetch_array();
|
|
|
|
$d1 = strtotime ($row_dat1[skik_einsicht]);
|
|
$d2 = strtotime ($row_dat2[skik_einsicht]);
|
|
$d3 = strtotime ($row_dat3[skik_einsicht]);
|
|
$d4 = strtotime ($row_dat4[skik_einsicht]);
|
|
|
|
|
|
if($d2!=''){
|
|
if($d1 < $d2){
|
|
$dat1 = $d1;
|
|
}else{
|
|
$dat1 = $d2;
|
|
}
|
|
}else{
|
|
$dat1 = $d1; // dann gibts nur ein Bereich
|
|
}
|
|
|
|
|
|
if($d3!=''){
|
|
if($dat1 < d3){
|
|
$dat1 = $dat1;
|
|
}else{
|
|
$dat1 = $d3;
|
|
}
|
|
}
|
|
|
|
if($d4!=''){
|
|
if($dat1 < d4){
|
|
$dat1 = $dat1;
|
|
}else{
|
|
$dat1 = $d4;
|
|
}
|
|
}
|
|
|
|
$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
|
|
|
|
$a = strtotime ($heute_format); //Umrechnung des Fristgrenztages in eine Zahl
|
|
|
|
if($a>=$dat1){
|
|
echo"<input type=\"radio\" value=\"$row[id]\" name=\"ausw_ausg\" size=\"20\">";
|
|
}else{
|
|
echo ">".date("d.m.Y", $dat1);
|
|
}
|
|
echo"
|
|
</td>
|
|
</tr>";
|
|
}
|
|
}
|
|
echo "
|
|
</table>
|
|
<br>
|
|
<input type=\"submit\" value=\"Abschicken\" name=\"B1\" size=\"20\"></p>
|
|
</form>
|
|
</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>";
|
|
|
|
break;
|
|
case "ausgabe":
|
|
$ProsID = $_POST[ausw_ausg];
|
|
|
|
$db = dbconnect();
|
|
$sel_fach = $db->query("SELECT FPRNr, bezeichnung FROM skik_kurs WHERE id='$ProsID'");
|
|
$fach = $sel_fach->fetch_array();
|
|
|
|
echo "
|
|
<html>
|
|
|
|
<head>
|
|
<meta http-equiv=Content-Type content=\"text/html; charset=windows-1252\">
|
|
<!--<meta name=Generator content=\"Microsoft Word 10 (filtered)\">-->
|
|
<title>Themenübersicht Sprachkurse / Interkulturelle Kompetenzen</title>
|
|
|
|
<style>
|
|
<!--
|
|
/* Font Definitions */
|
|
@font-face
|
|
{font-family:Shannon-Book;}
|
|
/* Style Definitions */
|
|
p.MsoNormal, li.MsoNormal, div.MsoNormal
|
|
{margin:0cm;
|
|
margin-bottom:.0001pt;
|
|
font-size:12.0pt;
|
|
font-family:Shannon-Book;}
|
|
h1
|
|
{margin:0cm;
|
|
margin-bottom:.0001pt;
|
|
page-break-after:avoid;
|
|
font-size:13.0pt;
|
|
font-family:\"Times New Roman\";
|
|
font-style:italic;}
|
|
h2
|
|
{margin:0cm;
|
|
margin-bottom:.0001pt;
|
|
text-align:center;
|
|
page-break-after:avoid;
|
|
font-size:11.0pt;
|
|
font-family:\"Times New Roman\";
|
|
font-style:italic;}
|
|
h3
|
|
{margin:0cm;
|
|
margin-bottom:.0001pt;
|
|
text-align:center;
|
|
page-break-after:avoid;
|
|
font-size:11.0pt;
|
|
font-family:\"Times New Roman\";
|
|
font-weight:normal;
|
|
font-style:italic;}
|
|
p.MsoBodyText, li.MsoBodyText, div.MsoBodyText
|
|
{margin:0cm;
|
|
margin-bottom:.0001pt;
|
|
font-size:16.0pt;
|
|
font-family:\"Times New Roman\";
|
|
font-weight:bold;}
|
|
@page Section1
|
|
{size:842.0pt 21.0cm;
|
|
margin:36.85pt 42.55pt 1.0cm 42.55pt;}
|
|
div.Section1
|
|
{page:Section1;}
|
|
/* List Definitions */
|
|
ol
|
|
{margin-bottom:0cm;}
|
|
ul
|
|
{margin-bottom:0cm;}
|
|
-->
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body lang=DE>
|
|
|
|
<div class=Section1>";
|
|
$now_date = date('d.m.Y');
|
|
echo"
|
|
|
|
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0
|
|
style='border-collapse:collapse;mso-padding-alt:0cm 0cm 0cm 0cm'>
|
|
<tr style='mso-yfti-irow:0;mso-yfti-lastrow:yes'>
|
|
<td width=801 valign=top style='width:600.75pt;padding:0cm 5.4pt 0cm 5.4pt'>
|
|
<p class=MsoBodyText>Übersicht der Vertiefungsbereichthemen im Studienjahr 20$jahrgang</p>
|
|
</td>
|
|
<td width=217 valign=top style='width:163.05pt;padding:0cm 5.4pt 0cm 5.4pt'>
|
|
<p class=MsoBodyText align=right style='text-align:right'><span
|
|
style='font-size:12.0pt;font-weight:normal'>Stand: <u>$now_date</u></span></p>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<h1><span style='font-style:normal'> </span></h1>
|
|
|
|
<p class=MsoNormal> </p>
|
|
|
|
<h1>Vertiefungsbereich Nr. <u>$fach[FPRNr]</u> Thema: <u>„$fach[bezeichnung]“</u></h1>
|
|
|
|
<p class=MsoNormal><span style='font-size:13.0pt;font-family:\"Times New Roman\"'> </span></p>
|
|
|
|
<table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0
|
|
style='border-collapse:collapse;border:none'>
|
|
<tr>
|
|
<td width=187 valign=top style='width:140.1pt;border:solid windowtext 1.0pt;
|
|
padding:0cm 5.4pt 0cm 5.4pt'>
|
|
<p class=MsoNormal align=center style='text-align:center'><b><i><span
|
|
style='font-size:11.0pt;font-family:\"Times New Roman\"'>Name, Vorname</span></i></b></p>
|
|
</td>
|
|
<td width=85 valign=top style='width:63.75pt;border:solid windowtext 1.0pt;
|
|
border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
|
|
<p class=MsoNormal align=center style='text-align:center'><b><i><span
|
|
style='font-size:11.0pt;font-family:\"Times New Roman\"'>Stud. gang</span></i></b></p>
|
|
</td>
|
|
<td width=38 valign=top style='width:1.0cm;border:solid windowtext 1.0pt;
|
|
border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
|
|
<p class=MsoNormal align=center style='text-align:center'><b><i><span
|
|
style='font-size:11.0pt;font-family:\"Times New Roman\"'>AG</span></i></b></p>
|
|
</td>
|
|
<td width=582 valign=top style='width:362.75pt;border:solid windowtext 1.0pt;
|
|
border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
|
|
<p class=MsoNormal align=center style='text-align:center'><b><i><span
|
|
style='font-size:11.0pt;font-family:\"Times New Roman\"'>Vertiefungsbereichthema</span></i></b></p>
|
|
</td>
|
|
<td width=128 valign=top style='width:162.0pt;border:solid windowtext 1.0pt;
|
|
border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
|
|
<p class=MsoNormal align=center style='text-align:center'><b><i><span
|
|
style='font-size:11.0pt;font-family:\"Times New Roman\"'>Korrketor</span></i></b></p>
|
|
</td>
|
|
</tr>";
|
|
$db = dbconnect();
|
|
$query = "SELECT vorname, nachname, stg, ag, jahrgang, thema, Korrektor
|
|
FROM skik_ergebnis,stud
|
|
WHERE skik_ergebnis.uid = stud.uid
|
|
AND skik_ergebnis.id = $ProsID
|
|
ORDER BY stud.uid";
|
|
$result = $db->query($query)
|
|
or die ("Cannot execute query");
|
|
while ($row = $result->fetch_array()){
|
|
|
|
echo "
|
|
<tr>
|
|
<td width=187 style='width:140.1pt;border:solid windowtext 1.0pt;border-top:
|
|
none;padding:0cm 5.4pt 0cm 5.4pt'>
|
|
<p class=MsoNormal><span style='font-size:11.0pt;font-family:\"Times New Roman\"'>$row[nachname],
|
|
$row[vorname]</span></p>
|
|
</td>
|
|
<td width=85 style='width:63.75pt;border-top:none;border-left:none;
|
|
border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
|
|
padding:0cm 5.4pt 0cm 5.4pt'>
|
|
<p class=MsoNormal align=center style='text-align:center'><span
|
|
style='font-size:11.0pt;font-family:\"Times New Roman\"'>$row[stg]</span></p>
|
|
</td>
|
|
<td width=38 style='width:1.0cm;border-top:none;border-left:none;border-bottom:
|
|
solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 5.4pt 0cm 5.4pt'>
|
|
<p class=MsoNormal align=center style='text-align:center'><span
|
|
style='font-size:11.0pt;font-family:\"Times New Roman\"'>$row[ag]/$row[jahrgang]</span></p>
|
|
</td>
|
|
<td width=582 style='width:12.0cm;border-top:none;border-left:none;
|
|
border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
|
|
padding:0cm 5.4pt 0cm 5.4pt'>
|
|
<p class=MsoNormal><span style='font-size:11.0pt;font-family:\"Times New Roman\"'>$row[thema]</span></p>
|
|
</td>
|
|
<td width=128 style='width:95.75pt;border-top:none;border-left:none;
|
|
border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
|
|
padding:0cm 5.4pt 0cm 5.4pt'>
|
|
<p class=MsoNormal><span style='font-size:11.0pt;font-family:\"Times New Roman\"'>$row[Korrektor]</span></p>
|
|
</td>
|
|
</tr>";
|
|
}
|
|
echo"
|
|
</table>
|
|
|
|
<p class=MsoNormal><span style='font-size:13.0pt;font-family:\"Times New Roman\"'> </span></p>
|
|
|
|
<p class=MsoNormal><b><i><span style='font-size:13.0pt;font-family:\"Times New Roman\"'>Unterschrift
|
|
Leiter: __________________</span></i></b></p>
|
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
";
|
|
}
|
|
?>
|