"; */ session_start(); include_once 'classes/TestProjektSmarty.class.php'; $smarty = new Smarty(); require_once("config.inc.php"); $template = "standard"; $templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html"; require_once "language/german.inc.php"; if (isset($_GET['action'])) { $action = $_GET['action']; } else { $action = ''; } if ($action == '') { } if ($action == 'anmeld') { #$db = dbconnect(); $result = $db->query("SELECT vaid, user, passwort FROM prog_admin WHERE inaktiv != 'J' AND UPPER(user)=UPPER('$_POST[user]')"); $row = $result->fetch_array(); // Leere Textfelder if (empty($_POST['user']) or empty($_POST['passwort'])) { $smarty->assign('index_noinput', '1'); } // Benutzer nicht im System elseif (strtoupper($_POST['user']) != strtoupper($row['user'])) { $smarty->assign('index_nouser', '1'); } // Passwort falsch elseif (md5($_POST['passwort']) != $row['passwort']) { //verschl�sseltes Passwort �berpr�fen # Cookies werden bereits gesetzt, falls sich jemand ein passwort zusenden l�sst. setcookie("user_admin", ""); setcookie("user_admin", $row['user']); setcookie("user_userid", ""); setcookie("user_userid", $row['vaid']); $smarty->assign('index_passwrong', '1'); // Passwortwechsel notwendig } else { #$db = dbconnect(); $datum = date("Y-m-d H:i:s"); $ip = getenv("REMOTE_ADDR"); $agent = getenv("HTTP_USER_AGENT"); $user_admin = $row['user']; # $url = "https://anonymouse.org/cgi-bin/anon-www_de.cgi/https://www.whois-api.com/?$ip"; # $xml = @simplexml_load_file($url); # $isp = $xml->isp; # $host = gethostbyaddr($ip); # $organisation = $xml->organization; # $url=file_get_contents("https://anonymouse.org/cgi-bin/anon-www_de.cgi/https://whatismyipaddress.com/ip/$ip"); # preg_match_all('/
Benutzerkennung: | $row2[user] |
Passwort: | $pass_word |
Diese Mail wurde automatisch generiert!
Antworten Sie daher nicht auf diese Mail
Vielen Dank
";
$headers = "MIME-Version: 1.0\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\n";
$headers .= "From: Prognosetool <$row2[mail]>\n";
$return = @mail($empfaenger, $betreff, $text, $headers);
if ($return) {
$smarty->assign('index_mailpass', '1');
$mailadresse = $row2['mail'];
$smarty->assign('index_mailadr', "$mailadresse");
} else {
$smarty->assign('index_nomailpass', "1");
}
}
$smarty->assign('action', "$action");
$smarty->display("$template/$templatename");
?>