PDA

View Full Version : [MU] xin code tìm mật khẩu cấp 1 without Phone



The Gamer
22-12-12, 01:50 PM
mình cần code tìm mật khẩu cấp 1 cho nbb

theo kiểu đổi mật khẩu với hòm thư - câu hỏi bí mật

mình ko sài host nên ko thể sài kiểu kiểu send mail được

apple
22-12-12, 02:13 PM
code đơn giản cho bạn

template/receive_pass1.tpl

code


<!-- Title -->
<table style="width: 100%;" cellpadding="2">
<tbody>
<tr>
<td style="text-align: right; height: 25px;">

<table style="margin-top: 7px;" border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td colspan="3" style="text-align: left;"><p class="title_page">Lấy mật khẩu Web cấp 1</p></td>
</tr>
<tr>
<td width="3"><img src="img/box01_left.gif" border="0" hspace="0" align="absmiddle"></td>
<td background="img/box01_middle.gif">&nbsp;</td>
<td width="3"><img src="img/box01_right.gif" border="0" hspace="0" align="absmiddle"></td>
</tr>
<tr>
<td colspan="3">&nbsp;</td>
</tr>
</tbody>
</table> </td>
</tr>
</tbody>
</table>
<!-- End Title -->
<!-- End Title -->
<!-- Content -->
<div class="pad10">
<form id="receive_pass1" name="receive_pass1" method="post" action="index.php?mod=receive_pass1">
<table width="100%" border="0" cellpadding="3" cellspacing="1">
<tr>
<td align="right" width="40%">Tài khoản</td>
<td><input type="text" name="acc" id="acc" size="14" maxlength="10"></td>
</tr>
<tr>
<td align="right" width="250px">Mật khẩu Web mới</td>
<td><input type="password" name="pass1new" id="pass1new" size="14" maxlength="10" onfocus="focus_chuso(this.value,'msg_'+this.name);" onkeyup="check_chuso_4_20(this.value,'msg_'+this.name)"> <label id="msg_pass1new" class="msg"></label></td>
</tr>
<tr>
<td align="right">Xác minh Mật khẩu Web mới</td>
<td><input type="password" name="pass1new_verify" id="pass1new_verify" size="14" maxlength="10" onfocus="focus_chuso(this.value,'msg_'+this.name);" onblur="onblur_check_repass(this.form.pass1new.value,this. value,'msg_'+this.name)"> <label id="msg_pass1new_verify" class="msg"></label></td>
</tr>
<tr>
<td align="center" colspan="2"><b>Thông tin kiểm tra</b></td>
</tr>
<tr>
<td class="width_25" align="right">Mật khẩu Web cấp 2 <font color="red">*</font></td>
<td class="width_45"><span class="sp_input">
<input class="txt_160" name="pass2" type="password" id="pass2" size="14" maxlength="10" onfocus="focus_chuso(this.value,'msg_'+this.name);" onkeyup="check_chuso_4_20(this.value,'msg_'+this.name)"> <label id="msg_pass2" class="msg"></label>
</span></td>
</tr>
<tr>
<td class="width_25" align="right">Câu hỏi bí mật <font color="red">*</font></td>
<td >
<select name="quest">
<option value="0">- Chọn câu hỏi bí mật -</option>
<option value="1" <?php if ($_POST['quest']=='1') { ?> selected="selected" <?php } ?> >Tên con vật yêu thích?</option>
<option value="2" <?php if ($_POST['quest']=='2') { ?> selected="selected" <?php } ?> >Trường cấp 1 của bạn tên gì?</option>
<option value="3" <?php if ($_POST['quest']=='3') { ?> selected="selected" <?php } ?> >Người bạn yêu quý nhất?</option>
<option value="4" <?php if ($_POST['quest']=='4') { ?> selected="selected" <?php } ?> >Trò chơi bạn thích nhất?</option>
<option value="5" <?php if ($_POST['quest']=='5') { ?> selected="selected" <?php } ?> >Nơi để lại kỉ niệm khó quên nhất?</option>
</select>
<label id="msg_quest" class="msg"></label>
</td>
</tr>
<tr>
<td class="width_25" align="right">Trả lời bí mật <font color="red">*</font></td>
<td class="width_45"><span class="sp_input">
<input class="txt_160" name="ans" type="text" id="ans" size="17" maxlength="10" value="<?php echo $_POST['ans']; ?>" onfocus="focus_chuso(this.value,'msg_'+this.name);" onkeyup="check_chuso_4_10(this.value,'msg_'+this.name)"> <label id="msg_ans" class="msg"></label>
</span></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input type="submit" name="Submit" value="Đổi mật khẩu Web" onclick="return btn_check_receivepass1();"/></td>
</tr>
</table>
<input type="hidden" name="action" value="receivepass1" />
</form>
<div class="clear">
</div>
</div>
<!-- End Content -->

module/receive_pass1.php

code

<?php
/*********************/
/* */
/* Version : 5.1.0 */
/* Author : RM */
/* Comment : 071223 */
/* */
/*********************/

if ( !defined( "NetNWEB" ) )
{
exit( "Ban khong co quyen truy cap he thong" );
}
if ( isset( $_POST['action'] ) )
{
$action = $_POST['action'];
if ( $action == "receivepass1" )
{
$acc = $_POST['acc'];
$leng_acc = strlen( $acc );
$pass1new = $_POST['pass1new'];
$pass1new_verify = $_POST['pass1new_verify'];
$pass2 = $_POST['pass2'];
$email = $_POST['email'];
$quest = $_POST['quest'];
$ans = $_POST['ans'];
$leng_pass1new = strlen( $pass1new );
if ( $sendsv === FALSE )
{
$notice = "Tốc độ xử lý của bạn quá nhanh, vui lòng chờ vài giây rồi tiếp tục thực hiện.";
}
else if ( empty( $acc ) )
{
$notice = "Chưa nhập Tài khoản cần lấy Mật khẩu Web cấp 1";
}
else if ( eregi( "[^a-zA-Z0-9_\$]", $acc ) )
{
$notice = "<font size='4' color='red'>Dữ liệu lỗi - Tài khoản chỉ được sử dụng kí tự a-z, A-Z, số (1-9) và dấu _.</font>";
}
else if ( $leng_acc < 4 || 10 < $leng_acc )
{
$notice = "<font size='4' color='red'>Tài khoản phải từ 4-10 kí tự.</font>";
}
else if ( empty( $pass1new ) )
{
$notice = "Chưa nhập Mật khẩu Web mới";
}
else if ( empty( $pass1new_verify ) )
{
$notice = "Chưa xác minh Mật khẩu Web mới";
}
else if ( eregi( "[^a-zA-Z0-9_\$]", $pass1new ) )
{
$notice = "<font size='4' color='red'>Dữ liệu lỗi - Mật khẩu Webmới chỉ được sử dụng kí tự a-z, A-Z, số (1-9) và dấu _.</font>";
}
else if ( eregi( "[^a-zA-Z0-9_\$]", $pass1new_verify ) )
{
$notice = "<font size='4' color='red'>Dữ liệu lỗi - Xác minh Mật khẩu Web chỉ được sử dụng kí tự a-z, A-Z, số (1-9) và dấu _.</font>";
}
else if ( $pass1new != $pass1new_verify )
{
$notice = "<font size='4' color='red'>Dữ liệu lỗi - Mật khẩu Web mới và Xác minh mật khẩu Web mới không trùng khớp.</font>";
}
else if ( $leng_pass1new < 6 )
{
$notice = "<font size='4' color='red'>Dữ liệu lỗi - Mật khẩu Web mới phải có ít nhất 6 kí tự.</font>";
}
else if ( eregi( "[^a-zA-Z0-9_\$]", $pass2 ) )
{
$notice = "<font color='red'>Dữ liệu lỗi - Mật khẩu Web cấp 2 chỉ được sử dụng kí tự a-z, A-Z, số (1-9) và dấu _.</font><br>";
}
else if ( eregi( "[^1-9\$]", $quest ) )
{
$notice = "<font color='red'>Dữ liệu lỗi - Chưa chọn câu hỏi bí mật.</font>";
}
else if ( eregi( "[^a-zA-Z0-9_\$]", $ans ) )
{
$notice = "<font color='red'>Dữ liệu lỗi - Câu trả lời bí mật chỉ được sử dụng kí tự a-z, A-Z, số (1-9) và dấu _.</font><br>";
}
else
{
$getcontent_url = $server_url."/do_receive_pass1.php";
$getcontent_data = array(
"login" => $acc,
"pass1new" => $pass1new,
"pass2" => $pass2,
"quest" => $quest,
"ans" => $ans,
"passtransfer" => $passtransfer
);
$reponse = _getcontent( $getcontent_url, $getcontent_data, $getcontent_method, $getcontent_curl );
if ( empty( $reponse ) )
{
$notice = "<font size='3' color='red'>Server bảo trì.</font>";
}
else if ( $reponse == "login_other" )
{
$notice = "<font size='3' color='red'>Tài khoản đã được đăng nhập trên trình duyệt khác hoặc máy tính khác.</font>";
session_destroy( );
}
else
{
$info = explode( "<nbb>", $reponse );
if ( $info[1] == "OK" )
{
$notice = "<font color='black'>Vui lòng dùng SĐT của tài khoản nhắn tin với cú pháp bên dưới để hoàn tất</font><br>\r\n\t\t\t\t\t\t<font color='red'><b>SMS&nbsp;&nbsp;&nbsp;NET&nbsp;&nbsp;&nbsp;".$cuphap."&nbsp;&nbsp;&nbsp;{$info['2']}</b></font>&nbsp;&nbsp;&nbsp;gửi&nbsp;&nbsp;&nbsp;<font color='blue'><b>8117</b></font> <font color='gray'><i>(Phí nhắn tin : 1.000 VNĐ)</i></font><br>\r\n\t\t\t\t\t\t<font color='black'>Thời gian chờ tin nhắn chứng thực : 60 phút (sau 60 phút, yêu cầu sẽ bị hủy bỏ)</font>";
}
else
{
$notice = $reponse;
}
}
}
}
}

$page_template = "templates/receive_pass1.tpl";
?>


server/do_receive_pass1.php

code

<?php
/*********************/
/* */
/* Version : 5.1.0 */
/* Author : RM */
/* Comment : 071223 */
/* */
/*********************/

include_once( "security.php" );
include_once( "config.php" );
$acc = $_POST['login'];
$pass1new = $_POST['pass1new'];
$pass2 = $_POST['pass2'];
$quest = $_POST['quest'];
$ans = $_POST['ans'];
$passtransfer = $_POST['passtransfer'];
if ( $passtransfer == $transfercode )
{
$get_info_query = "SELECT mail_addr,fpas_ques,fpas_answ FROM MEMB_INFO WHERE memb___id='".$acc."'";
$get_info_result = $db->Execute( $get_info_query );
$get_info = $get_info_result->fetchrow( );
if ( $quest != $get_info[1] )
{
echo "Câu hỏi bí mật kiểm tra không đúng";
exit( );
}
if ( $ans != $get_info[2] )
{
echo "Câu trả lời bí mật kiểm tra không đúng";
exit( );
}
$sql_pw_check = $db->Execute( "SELECT * FROM MEMB_INFO WHERE pass2='".$pass2."' and memb___id='{$acc}'" );
$pw_check = $sql_pw_check->numrows( );
if ( $pw_check <= 0 )
{
echo "Mật khẩu cấp 2 không đúng.";
exit( );
}
$pass1new_md5 = md5( $pass1new );
$update_pass1_query = "UPDATE MEMB_INFO SET memb__pwd2='".$pass1new."', memb__pwdmd5='{$pass1new_md5}' WHERE memb___id='{$acc}'";
$update_pass1_result = $db->Execute( $update_pass1_query );
echo "Đổi Mật khẩu Cấp 1 của tài khoản <b>{$acc}</b> thành : <b>";
echo $pass1new;
echo "</b> thành công.";
}
?>

The Gamer
22-12-12, 03:16 PM
khi làm theo bác thì lỗi :__________

em sai v5. 7.8


Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\taikhoan.mu-xxx.com\modules\receive_pass1.php:1) in C:\xampp\taikhoan.mu-xxx.com\includes\function.php on line 287



Object not found!

The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.

If you think this is a server error, please contact the webmaster.
Error 404
mu-xxxxx
12/22/12 15:15:28
Apache/2.2

The Gamer
22-12-12, 08:35 PM
khi làm theo bác thì lỗi :__________

em sai v5. 7.8

up phát các pro ơi_______________

The Gamer
22-12-12, 10:27 PM
ai fix giúp em với_____________

apple
23-12-12, 09:17 AM
includes\function.php on line 287


cậu vào file này dùng note++ post cái dòng 287 coi nào

The Gamer
23-12-12, 10:13 AM
includes\function.php on line 287


cậu vào file này dùng note++ post cái dòng 287 coi nào


dòng đó đây bác


setcookie("nweb_loaddata", time(), time()+24*60*60);