Code:
<?php include("config.php"); include("core.php"); header("Cache-Control: no-cache, must-revalidate"); header("Pragma: no-cache"); //header('Content-type: application/vnd.wap.xhtml+xml'); echo "<?xml version=\"1.0\"?>"; echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\" \"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">"; ?> <html xmlns="http://www.w3.org/1999/xhtml"> <?php connectdb(); $action = $_GET["action"]; $bcon = connectdb(); if (!$bcon) { echo "<head>"; echo "<title>Error!!!</title>"; echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/white_medium.css\">"; echo "</head>"; echo "<body>"; echo "<p align=\"center\">"; echo "<img src=\"../images/notok.gif\" alt=\"!\"/> "; echo "[b]*MoDe3* InFo:[/b] "; echo "Si e verificato un errore interno...si prega di riprovare"; echo "</p>"; echo "</body>"; echo "</html>"; exit(); } if($action=="main") { $sitename = mysql_fetch_array(mysql_query("SELECT value FROM ibwf_settings WHERE name='sitename'")); $sitename = $sitename[0]; echo "<head>"; echo "<title>*site*</title>"; echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/white_medium.css\">"; echo "</head>"; echo "<body>"; echo "<p align=\"center\">"; echo "<img src=\"http//hiwap3.net/c/images/logo.gif\" alt=\"*\"/> "; echo "Tuo Nickname: <input name=\"name\" format=\"*x\" maxlength=\"30\"/> "; echo "Tua email: <input name=\"email\" maxlength=\"60\"/> "; echo "[size="1"]<anchor>Reset Password<go href=\"pass.php?action=pass\" method=\"post\">"; echo "<postfield name=\"name\" value=\"$(name)\"/>"; echo "<postfield name=\"email\" value=\"$(email)\"/>"; echo "</go></anchor>[/size]"; echo "</p>"; echo "</card>"; } else if($action=="pass") { $name = $_POST["name"]; $email = $_POST["email"]; $sitename = mysql_fetch_array(mysql_query("SELECT value FROM ibwf_settings WHERE name='sitename'")); $sitename = $sitename[0]; echo "<head>"; echo "<title>Error</title>"; echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/white_medium.css\">"; echo "</head>"; echo "<body>"; echo "<p align=\"center\">"; $uinfo = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE name='".$name."'")); if($uinfo[0]==0) { echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Utente non corrispondente o inesistente "; echo "<a href=\"pass.php?action=main\">indietro</a> "; } else { $uinfo = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE name='".$name."' AND email='".$email."'")); if($uinfo[0]==0) { echo "<img src=\"../images/notok.gif\" alt=\"X\"/>La mail specificata non e la stessa associata al nickname da lei inserito "; echo "<a href=\"pass.php?action=main\">indietro</a> "; } else { $hug = time(); mysql_query("UPDATE ibwf_users SET pass='".md5($hug)."' WHERE name='".$name."'"); $kiss= mysql_fetch_array(mysql_query("SELECT name FROM ibwf_users WHERE name='".$name."'")); $msg = "\n Nickname: ".$kiss[0]." \n Nuova Password: ".$hug." \n\n ".$sitename." La community italiana ti informa che la tua password e stata resettata e le riportiamo i dati per effettuare il login adesso. \n\n Grazie\n".$sitename.""; $subj = "Dettagli Reset Password della community ".$sitename.""; $headers = 'Da: [email]feedback@site.net[/email]' . "\r\n" . 'Reply-To: [email]feedback@site.net[/email]' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail($email, $subj, $msg, $headers); echo "<img src=\"../images/ok.gif\" alt=\"+\"/>La password e stata ora resettata, hai ricevuto una email a $email contenente i nuovi dati per accedere. "; } } echo "<a href=\"index.php\"><img src=\"../images/home.gif\" alt=\"*\"/>"; echo "Home</a>"; echo "</p>"; echo "</body>"; } ?> </html>
Comment