Recoding Resend Password

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Recoding Resend Password

    Code:
    <?php
    
    include("config.php");
    include("core.php");
    header("Cache-Control: no-cache, must-revalidate");
    header("Pragma: no-cache");
    //header(&#39;Content-type: application/vnd.wap.xhtml+xml&#39;); 
    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=&#39;sitename&#39;"));
      $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=&#39;sitename&#39;"));
      $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=&#39;".$name."&#39;"));
    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=&#39;".$name."&#39; AND email=&#39;".$email."&#39;"));
    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=&#39;".md5($hug)."&#39; WHERE name=&#39;".$name."&#39;");     
      $kiss= mysql_fetch_array(mysql_query("SELECT name FROM ibwf_users WHERE name=&#39;".$name."&#39;"));
      $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 = &#39;Da: [email]feedback@site.net[/email]&#39; . "\r\n" .
      &#39;Reply-To: [email]feedback@site.net[/email]&#39; . "\r\n" .
      &#39;X-Mailer: PHP/&#39; . 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>
    any1 can help me to fix this in correct xhtml???pls
    if like my post click:

    http://coding-talk.com/images/totall...ost_thanks.gif

    #2
    That coding is a bad idea, like it was said in the forum, i could reset your password when ever i wanted to.. how annoying would that be?

    Comment

    Working...
    X