<?php include("aespa/datenbankanbindung.php"); // fügt die Datenbankanbindung ein: Sys:\php\includes\kurs\datenbankanbindung.php #require("check_zweig.php"); // Prüft, ob Innenverwaltung angemeldet ist: setzt datenbankanbindung.php voraus dbconnect(); $ansp = mysql_query("SELECT wert1, wert2 FROM kurs.parameter WHERE pid='1'"); $uhd = mysql_fetch_array($ansp); $ansprechpart = "$uhd[wert1]"; // Ansprechpartner bei Probleme $helpmail = "$uhd[wert2]"; // Kontaktmailadresse bei Problemen if (isset($_GET['action'])) $action = $_GET['action']; else $action = ""; switch($action){ default: echo" <html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-1252\"> <link rel=\"stylesheet\" href=\"styles_pc.css\" type=\"text/css\"> <title>Login Aespa</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> <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 AESPA</font><br> <span class=\"sh\"> Im System können Sie den Fragebogen zum Auslandspraktium ausfüllen</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 Logindaten entsprechen denen des Anmeldesystems der FH-Ludwigsburg</li> <li>Der Benutzername darf <b>keine</b> Zusätze enthalten (.stud05 usw.)</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> </div> </td> </tr> </table> </body> </html>"; break; case "anmeld": $uid = strtolower($_POST[uid]); $pwd = $_POST[pwd]; dbconnect(); $result = mysql_query("SELECT LOWER(uid) uid, Pwd FROM kurs.stud where uid=\"$uid\""); $row = mysql_fetch_array($result); // Abfrage, was tun wenn Felder leer sind bzw. Passwort falsch ist if ($uid == "" or $_POST['pwd'] == "") { echo " <html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-1252\"> <link rel=\"stylesheet\" href=\"styles_pc.css\" type=\"text/css\"> <title>Login Stellenantragssystem</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üssen alle Felder ausgefü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 ($uid != $row[uid]) { echo" <html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-1252\"> <link rel=\"stylesheet\" href=\"styles_pc.css\" type=\"text/css\"> <title>Login Stellenantragssystem</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; } $passwd = md5($_POST['pwd']); if ($passwd != $row[Pwd]){ // Cokkie hier, falls PW generiert werden soll setcookie("uid1",""); setcookie("uid1","$row[uid]"); echo " <html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-1252\"> <link rel=\"stylesheet\" href=\"styles_pc.css\" type=\"text/css\"> <title>Login Stellenantragssystem</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!</b><br><br> Sie können sich ein neues Passwort an Ihre<br>FH-Mailadresse schicken lassen: <a href="; echo $_SERVER['PHP_SELF'] . "?action=pass_gen>Neues Passwort</a> <br> <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=hauptframe.htm\"> "; break; case "pass_gen": $uid1=$_COOKIE["uid1"]; $pool = "qwertzupasdfghkyxcvbnm"; $pool .= "23456789"; $pool .= "WERTZUPLKJHGFDSAYXCVBNM"; srand ((double)microtime()*1000000); for($index = 0; $index < 7; $index++) { $pass_word .= substr($pool,(rand()%(strlen ($pool))), 1); } $new_pw_md5=md5($pass_word); $sql = mysql_query ("UPDATE stud SET pwd='$new_pw_md5' WHERE uid='$uid1'"); // Nachricht über Passwortrücksetzung: Hinzugefügt 19.09.2006 $result2 = mysql_query("SELECT uid, vorname, nachname, mail FROM kurs.stud where uid='$uid1'"); $row2 = mysql_fetch_array($result2); $empfaenger = "$row2[mail]"; $betreff = "Kurssystem: Passwort zurückgesetzt"; $text = " <html> <head> <title>Passwort zurückgesetzt</title> </head> <body> <font face='Arial' size='2'> Guten Tag $row2[vorname] $row2[nachname]!<br><br> Sie haben Ihr Passwort im Kurssystem zurückgesetzt!<br> Nachfolgend finden Sie Ihre neuen Zugangsdaten: <br> <br> <table> <tr> <td valign='top'> <font face='Arial' size='2'> Benutzerkennung: </font> </td> <td valign='top'> <font face='Arial' size='2'> <b>$row2[uid]</b> </font> </td> </tr> <tr> <td valign='top'> <font face='Arial' size='2'> Passwort: </font> </td> <td valign='top'> <font face='Arial' size='2'> <b>$pass_word</b> </font> </td> </tr> </table> <br> Bitte beachten Sie, dass zwischen Groß- und<br> Kleinschreibung unterschieden wird. <p> Ändern Sie bitte zu Ihrer eigenen Sicherheit das<br> Passwort nach dem ersten Login. <p> Link zum Anmeldesystem: <a href=\"http://www.fh-ludwigsburg.de/kurs\">Kurssystem</a> <p> Diese Mail wurde automatisch generiert!<br> Antworten Sie daher nicht auf diese Mail<br> <br> Vielen Dank </body> </html>"; $headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; $return = @mail($empfaenger, $betreff, $text, $headers); // ENDE Nachricht über Passwortrücksetzung if($return){ echo " <html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-1252\"> <link rel=\"stylesheet\" href=\"styles_pc.css\" type=\"text/css\"> <title>Login Stellenantragssystem</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\">Bestätigung</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>Mailversand!</b><br><br> Ihr neues Passwort wurde an $row2[mail] geschickt. <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; }else{ echo " <html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-1252\"> <link rel=\"stylesheet\" href=\"styles_pc.css\" type=\"text/css\"> <title>Login Stellenantragssystem</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\">Versandfehler</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>Versandfehler!</b><br><br> Das Passwort konnte nicht verschickt werden! <br> <br> Bitte wenden Sie sich an <a href=\"mailto:$helpmail?subject=Keine Anmeldekennung\">$ansprechpart</a></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; } } // Ende IF von Action Abfrage ?>