📄 getpass.php3
字号:
<?
/*大家好,我是豆腐
提供原码是我的一贯原则,但是希望大家能够尊重豆腐的工作
希望大家在使用的过程中随时和我联系 roboo@21cn.com
您可以随意修改代码,但是请保留我的注释(如果不保留,我也没办法)
如果您觉得这个程序对您有或多或少的帮助,豆腐希望能够得到您的鼓励
您的鼓励和支持,是我们工作的最大动力
. =======
/ \| O O |
\ / \v_'/
# _| |_
(#) ( )
#\//|* *|\\
#\/( * )/ //豆腐制作,都是精品
# =====
# (\ /)
# || ||
.#---'| |----.
#----' -----'
//哲人说:用我的心换你的心,我们便拥有两颗心
*/
?>
<?
include("conn.php3");
include("db.php3");
$conn=openconn();
?>
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="class.css">
<title>获得密码</title>
</HEAD>
<BODY>
<? //if(($userid=="") and ($cmdDo==""))
include("getpass.inc");
if($getpasstype=="mail"){
if($userid!=""){
$SQL="select * from " . $DataBaseOwerName . ".class_classuser where userid='" . $userid . "'";
$stmt=ociparse($conn,$SQL);
ociexecute($stmt);
ocifetch($stmt);
if(ociresult($stmt,"USERID")!=$userid){
echo "对不起,编号不存在";
exit;
}
echo "靳,以下是Mail函数,具体使用时去掉注释即可!";
//$mailto=ociresult($stmt,"USEREMAIL");
//$mailfrom="";//改写成任意的Email地址
//$msg="您在通讯录的登录名称:" . $userid . ",密码:" . ociresult($stmt,"PASS");
//$subject="密码";
//mail($mailto,$subject,$msg,$mailfrom);
}
?>
<form action=<? echo $PHP_SELF ?> method="post">
请在下面的输入框中输入您的用户名称,然后确认,系统会自动将您的密码发送到您登记的EMail 信箱中:<br>
<input type=text name="userid" class=editface>
<input type=submit name="cmdDo" value="确认" class=buttonface>
</Form>
</BODY>
</html>
<?
exit;
}
?>
<?
//问问题
if($step==1){
?>
<form action=<? echo $PHP_SELF ?>?step=2 method="post">
请在下面的输入框中输入您的用户代码:<br>
<input type=text name=userid class=editface size=6><br>
<input type=submit value="确定" name="cmdDo" class=buttonface>
</form>
<?
}
if($step==2){
$SQL="select * from " . $DataBaseOwerName . ".class_classuser where userid='" . $userid . "'";
$stmt1=openSql($conn,$SQL);
$stmt=fecthrow($stmt1);
if(getcolumn($stmt,"USERID")!=$userid){
echo "对不起,编号不存在";
exit;
}
?>
<form action=<? echo $PHP_SELF ?>?step=3 method="post">
请在下面的输入框中输入您在的用户名称:<br>
<input type=text name=txtName class=editface><br>
请在下面的输入框中输入您的Email地址:<br>
<input type=text name=txtMail class=editface><br>
请在下面的输入框中输入您的生日:<br>
<input type=text name=txtYear class=editface size=4>年<input type=text name=txtMonth size=2 class=editface>月<input size=2 type=text name=txtDay class=editface>日<br>
<input type=hidden value="<? echo $userid; ?>" name="userid" class=editface>
<input type=submit value="确定" name="cmdDo" class=buttonface>
</form>
<?
}
if($step==3){
$SQL="select * from " . $DataBaseOwerName . ".class_classuser where userid='" . $userid . "'";
$stmt1=openSql($conn,$SQL);
$stmt=fecthrow($stmt1);
$strErr="";
if(getcolumn($stmt,"USERNAME")!=$txtName){
$strErr="对不起,您填写的用户名称和您的实际名称不一致!";
}
if(getcolumn($stmt,"USEREMAIL")!=$txtMail){
$strErr="对不起,您填写的EMail地址和您的实际EMail地址不一致!";
}
$strBirth=$txtYear . "-" . $txtMonth . "-". $txtDay;
if(getcolumn($stmt,"BIRTH")!=$strBirth){
$strErr="对不起,您填写的生日和您的实际生日不一致!";
}
if($strErr!=""){
echo $strErr;
exit;
}
//完全正确,提示问题
echo "<p>这是您的登记用户时的密码忘记提示问题</p>";
echo getcolumn($stmt,"QUESTION") . "<br>";
?>
<form action=<? echo $PHP_SELF ?>?step=4 method="post">
<input type=text name=txtAnswer class=editface><br>
<input type=hidden value="<? echo $userid; ?>" name="userid">
<input type=submit value="确定" name="cmdDo" class=buttonface>
</form>
<?
}
if($step==4){
$SQL="select * from " . $DataBaseOwerName . ".Class_classuser where userid='" . $userid . "'";
$stmt1=openSql($conn,$SQL);
$stmt=fecthRow($stmt1);
if(getcolumn($stmt,"ANSWER")!=$txtAnswer){
//答案不正确
echo "对不起,您的答案不正确";
exit;
}
echo "祝贺您,您的密码是<font color=red>" . getcolumn($stmt,"PASS") . "</font>,从<a href='login.htm'>这里</a>登录同学录";
}
?>
</BODY>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -