Kompetenz/index_alt.php
2023-02-23 10:52:06 +01:00

411 lines
20 KiB
PHP
Executable File

<?php
$helpmail = "rieth&#64;fh-ludwigsburg.de"; // $#64; --> @; Kontaktmailadresse bei Problemen
$ansprechpart = "Herrn Rieth"; // Ansprechpartner bei Probleme
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>Login Soziale Kompetenzsystem</title>
</head>
<body onload=\"if(document.login)document.login.uid.focus();return false;\">
<table border=\"0\" style=\"border-collapse: collapse\" width=\"100%\" cellpadding=\"0\" height=\"100%\" id=\"table1\">
<tr>
<td height=\"30\">&nbsp;</td>
</tr>
<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\">
<img src=\"images/i_login.gif\"></td>
<td width=\"95%\" background=\"images/box_top.gif\">
<img height=\"10\" src=\"images/blank.gif\" width=\"1\"><br>
<font class=\"hd\">
Login Soziale Kompetenzsystem</font><br>
<span class=\"sh\">
Im System k&ouml;nnen Sie Ihr Soziale Kompetenz w&auml;hlen</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><b>Folgende Loginkriterien sind zu beachten:</b> </p>
<ul>
<li>Der Benutzername entspricht dem Loginnamen in der FH</li>
<li>Das Passwort entspricht dem, des Kursbelegungssystems</li>
<li>Der Benutzername darf <b>keine</b> Zus&auml;tze enthalten (.stud04 usw.)</li>
<li>Das Passwort entspricht - bis zum &Auml;ndern - dem Benutzernamen<br></li>
</ul>
<p></p>
<p></p>
<p></p>
<p></p>
<form action="; echo $_SERVER['PHP_SELF'] . "?action=anmeld"; echo" method=\"POST\" name=\"login\">
<input type=\"hidden\" name=\"tparam\" value=\"945180225\">
<table cellspacing=\"1\" cellpadding=\"1\" width=\"100%\" border=\"0\">
<tr>
<td class=\"formdesc\">
Benutzername
</td>
<td>
<input type=\"text\" name=\"uid\" value size=\"20\" maxlength=\"60\" tabindex=\"1\" onchange=\"document.login.pwd.focus()\"></td>
</tr>
<tr>
<td class=\"formdesc\">
Passwort
</td>
<td>
<input type=\"password\" name=\"pwd\" size=\"20\" tabindex=\"2\"></td>
</tr>
<tr class=\"login\">
<td align=\"right\" colspan=\"2\">
<input title=\"Login\" type=\"image\" src=\"images/b_login.gif\" border=\"0\"></td>
</tr>
</table>
</form>
<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>
<p><br>
&nbsp;</p>
</div>
</td>
</tr>
<tr>
<td height=\"30\">
<div align=\"center\">
<table cellspacing=\"0\" cellpadding=\"0\" width=\"550\" border=\"0\" id=\"table2\">
<tr>
<td width=\"10\" background=\"images/box_e1a.gif\">&nbsp;</td>
<td align=\"left\" width=\"98%\" background=\"images/box_top1.gif\" valign=\"top\">&nbsp;</td>
<td align=\"right\" width=\"1%\" background=\"images/box_e2a.gif\">&nbsp;</td>
</tr>
<tr>
<td width=\"1%\" background=\"images/box_l.gif\">
<img height=\"1\" src=\"images/blank.gif\" width=\"22\"></td>
<td>
<div align=\"center\">
<table id=\"table3\" style=\"BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-COLLAPSE: collapse; BORDER-RIGHT-WIDTH: 0px\" bordercolor=\"#111111\" cellpadding=\"0\" width=\"100%\" border=\"0\">
<tr>
<td class=\"footer\" style=\"border:medium none; \" width=\"50%\">
<p align=\"right\" style=\"margin-right: 10px\">
<b>Programmierung:</b></p>
</td>
<td class=\"footer\" style=\"border:medium none; \" width=\"53%\">
<p style=\"margin-left: 10px\">
Alexander Schwarz</p>
</td>
</tr>
<tr>
<td class=\"footer\" style=\"border:medium none; \" width=\"50%\">
<p align=\"right\" style=\"margin-right: 10px\">
<b>Datenmodell und Design:</b></p>
</td>
<td class=\"footer\" style=\"border:medium none; \" width=\"53%\">
<p style=\"margin-left: 10px\">
<span style=\"font-size: 8pt\">Alexander Schwarz,
Prof. Peter Schilling</span></p>
</td>
</tr>
<tr>
<td class=\"footer\" style=\"border:medium none; \" width=\"50%\">
<p align=\"right\" style=\"margin-right: 10px\">
<b>Technisches Konzept:</b></p>
</td>
<td class=\"footer\" style=\"border:medium none; \">
<p style=\"margin-left: 10px\">
Prof. Peter Schilling</p>
</td>
</tr>
</tr>
<tr>
<td class=\"footer\" style=\"border:medium none; \" width=\"50%\">
<p align=\"right\" style=\"margin-right: 10px\">
<b>Organisatorisches Konzept:</b></p>
</td>
<td class=\"footer\" style=\"border:medium none; \">
<p style=\"margin-left: 10px\">
Prof. Wolfgang Rieth
</p>
</td>
</tr>
<tr>
<td class=\"footer\" style=\"border:medium none; \" width=\"50%\">
<p align=\"right\" style=\"margin-right: 10px\">
<b>Version 1 - 2004</b></p>
</td>
<td class=\"footer\" style=\"border:medium none; \" width=\"53%\">&nbsp;</td>
</tr>
</table>
</div>
</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\">&nbsp;</td>
<td 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\">&nbsp;</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</body>
</html>";
break;
case "anmeld":
include("kurs/datenbankanbindung.php"); // f&uuml;gt die Datenbankanbindung ein: Sys:\php\includes\kurs\datenbankanbindung.php
$db = dbconnect();
$result = $db->query("SELECT uid, Pwd FROM stud where uid=\"". $_POST['uid']."\" and durchgefallen!=\"Y\"");
$row = $result->fetch_array();
// Abfrage, was tun wenn Felder leer sind bzw. Passwort falsch ist
if ($_POST['uid'] == "" or $_POST['pwd'] == "")
{
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>Login Soziale Kompetenzsystem</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\">
<img src=\"images/i_login.gif\"></td>
<td width=\"95%\" background=\"images/box_top.gif\">
<img height=\"10\" src=\"images/blank.gif\" width=\"1\"><br>
<span class=\"sh\">Fehlerhafte Eingabe </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>Es m&uuml;ssen alle Felder ausgef&uuml;llt werden</b>
</p>
<p align=\"center\"><a href=\"index.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;
}
if ($_POST['uid'] != $row[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>Login Soziale Kompetenzsystem</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\">
<img src=\"images/i_login.gif\"></td>
<td width=\"95%\" background=\"images/box_top.gif\">
<img height=\"10\" src=\"images/blank.gif\" width=\"1\"><br>
<span class=\"sh\">Falscher Benutzername</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>Der Anmeldenamen ist im System nicht vorhanden!<br>
Wenden Sie sich bitte an
<a href=\"mailto:$helpmail?subject=Keine Anmeldekennung\">$ansprechpart</a></b></p>
<p align=\"center\"><a href=\"index.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;
}
if ($_POST['pwd'] != $row[Pwd]){
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>Login Soziale Kompetenzsystem</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\">
<img src=\"images/i_login.gif\"></td>
<td width=\"95%\" background=\"images/box_top.gif\">
<img height=\"10\" src=\"images/blank.gif\" width=\"1\"><br>
<span class=\"sh\">Falsches Passwort</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>Das eingegebene Passwort ist falsch!<br>
Bei weiteren Problemen wenden Sie sich bitte<br>
an <a href=\"mailto:$helpmail?subject=Keine Anmeldekennung\">$ansprechpart</a></b></p>
<p align=\"center\"><a href=\"index.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;
}
setcookie("uid1","");
setcookie("uid1","$row[uid]");
echo "
<meta http-equiv=\"refresh\" content=\"0; URL=index_frame.htm\">
";
} // Ende IF von Action Abfrage
?>