| [ PHPXref.com ] | [ Generated: Sun Jul 20 20:01:31 2008 ] | [ PHPWind 4.3.2 ] |
| [ Index ] [ Variables ] [ Functions ] [ Classes ] [ Constants ] [ Statistics ] | ||
[Summary view] [Print] [Text view]
1 <?php 2 require_once ('global.php'); 3 require_once (R_P.'require/header.php'); 4 !$action && $action='sendpwd'; 5 if ($action == 'sendpwd'){ 6 list(,,,,$othergd)=explode("\t",$db_gdcheck); 7 if (!$_POST['step']){ 8 require_once(PrintEot('sendpwd'));footer(); 9 } elseif ($_POST['step'] == 2){ 10 $othergd && GdConfirm($gdcode); 11 $userarray = $db->get_one("SELECT password,email,regdate FROM pw_members WHERE username='$pwuser'"); 12 if ($userarray['email'] != $email){ 13 Showmsg('email_error',1); 14 } 15 if ($userarray){ 16 if ($timestamp - GetCookie('lastwrite') <= 60){ 17 $gp_postpertime = 60; 18 Showmsg('sendpwd_limit',1); 19 } 20 Cookie('lastwrite',$timestamp); 21 $send_email = $userarray['email']; 22 $submit = $userarray['regdate']; 23 $submit .= md5(substr($userarray['password'],10)); 24 $pwuser = rawurlencode($pwuser); 25 require_once (R_P.'require/sendemail.php'); 26 if (sendemail($send_email,'email_sendpwd_subject','email_sendpwd_content','email_additional')){ 27 Showmsg('mail_success',1); 28 } else { 29 Showmsg('mail_failed',1); 30 } 31 } else { 32 $errorname = $pwuser; 33 Showmsg('user_not_exists',1); 34 } 35 } 36 } elseif ($action == 'getback'){ 37 if ($pwuser == $manager){ 38 Showmsg('undefined_action',1); 39 } 40 $detail = $db->get_one("SELECT password,regdate FROM pw_members WHERE username='$pwuser'"); 41 if ($detail){ 42 $is_right = $detail['regdate']; 43 $is_right .= md5(substr($detail['password'],10)); 44 if ($submit == $is_right){ 45 if (!$jop){ 46 require_once PrintEot('getpwd');footer(); 47 } elseif ($jop == 2){ 48 if ($new_pwd!=$pwdreapt){ 49 Showmsg('password_confirm',1); 50 } else { 51 $new_pwd = stripslashes($new_pwd); 52 $new_pwd = str_replace("\t","",$new_pwd); 53 $new_pwd = str_replace("\r","",$new_pwd); 54 $new_pwd = str_replace("\n","",$new_pwd); 55 $new_pwd = md5($new_pwd); 56 $db->update("UPDATE pw_members SET password='$new_pwd' WHERE username='$pwuser'"); 57 Showmsg('password_change_success',1); 58 } 59 } 60 } else { 61 Showmsg('password_confirm_fail',1); 62 } 63 } else { 64 $errorname = $pwuser; 65 Showmsg('user_not_exists',1); 66 } 67 } 68 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| [ Powered by PHPXref - Served by Debian GNU/Linux ] |