I got a ptc script from my friend and i have installed on a free hosting.
problem is password reset not working. it’s show that password reset email send.
but i don’t get any email. what can i do please help me. my website: www.viewbangla.in
help me please. i need help so much.
reset.php code:
<!doctype html public “-//W3C//DTD HTML 4.01 Transitional//EN”>
Viewbangla register - Part Time Online Job & Earn Money From Home <?php if(!defined('GEN2_PROCESS')) { exit(); } $ref_title = "Reset Your Password";$tok_id = sha1(md5(session_id()));
if($loggedin)
{
$error = “You are already logged in.”;
$show_login=0;
} elseif($_GET[‘k’] and $_GET and $_SESSION[‘rp_key’] and $_GET[‘k’] == $_SESSION[‘rp_key’])
{
$gen_pw = microtime().md5(time());
$new_password = sha1($gen_pw);
mysql_query(“UPDATE users SET password=’$new_password’ WHERE username=’{$_SESSION[‘rp_user’]}’ LIMIT 1;”);
$epconts .= "Hello User,
We’ve successfully changed your password for {$set[‘site_name’]}.
You’re new password for {$set[‘site_name’]} is “$gen_pw” (without the quotes).
Thanks,
{$set[‘site_name’]}";
mail($_SESSION[‘rp_email’], “New Password - “.$set[‘site_name’], $epconts, “From: admin@”.$_SERVER[‘HTTP_HOST’].”/nX-Mailer: GeN2”);
$_SESSION[‘rp_key’] = false;
$_SESSION[‘rp_user’] = false;
$_SESSION[‘rp_email’] = false;
$contents .= “
Check Your Inbox… Again.
We’ve now sent your new password to your inbox so you can immediately log-in.
”;
} elseif($_POST)
{
$username = $do->filter($_POST[‘login_username’]);
$email = $do->filter($_POST[‘login_email’]);
if(!$username)
{
$error=(!$error) ? “You forgot to fill in the username field.” : $error;
$show_login=1;
}
if(!$email)
{
$error=(!$error) ? “You forgot to fill in the e-mail field.” : $error;
$show_login=1;
}
$u_ex = mysql_query(“SELECT COUNT(*) AS cnt FROM users WHERE username=’{$username}’ AND email=’{$email}’ LIMIT 1;”);
$u_ex = mysql_fetch_array($u_ex);
$u_ex = $u_ex[‘cnt’];
if(!$u_ex)
{
$error=(!$error) ? “We couldn’t find an account with those details.” : $error;
$show_login=1;
}
if(!$error)
{
$my_rp_key = md5(time());
$_SESSION[‘rp_key’] = $my_rp_key;
$_SESSION[‘rp_email’] = $email;
$_SESSION[‘rp_user’] = $username;
$emconts = "Hello User,
You recently requested for your password to be changed on {$set[‘site_name’]}. If you authorised this request, please click below and we will re-send your new generated password so you can login into your account.
Copy and paste the link below to have your password sent to you.
“.($do->get_loc()).”/reset.php?k={$my_rp_key}
After you have visited the link below we’ll send your new password to you’re inbox and then you should be able to log in.
Thanks,
{$set[‘site_name’]}";
mail($email,“Password Reset - “.$set[‘site_name’], $emconts, “From: admin@”.$_SERVER[‘HTTP_HOST’].”/nX-Mailer: GeN2”);
$contents = "
Check Your Inbox
Please check you're inbox for a e-mail containing a URL. Please visit that URL which will then send your new generated password to your inbox because you have authorised the request. You will not be authorised to enter any information during the process.
We sent the e-mail to $email. Thanks!
";$show_login=0;
}
} else {
$show_login=1;
}
if($error)
{
$contents .= “
}
if($show_login)
{
$contents .= <<<EOF
Reset Your Password
Username
E-Mail Address
Back to Login
EOF; } ?>