⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 answer-password.php

📁 邮箱加即时聊天
💻 PHP
字号:
<? ob_start();?><head><br><br><br>
	

<title>短信息接收系统安全中心</title>
</head>
<body background="danse3.jpg">
	<iframe src="title1.php" width=100% height=14% scrolling=no noresize frameborder=0 style="position:absolute;top:0;"></iframe>
	<div style="position:absolute;background-image:url('title1.jpg');width:100%;height:70;top:0;left:0"></div>
	<div style="position:absolute;top:90px;left:92%"><font size=2><a href="index.html">首页</a>|帮助</font></div>	
  <br><br>			
  <center>
	<table width=750 cellpadding=0 cellspacing=0 frame=box border=10 bordercolor=lightblue>
	<tr><td width=1></td>
	<td width=8></td>
	<td width=732 align=center>

	<!--提示信息 begin-->
	<table width="100%" border=0 cellpadding=0 cellspacing=2>
	<tr><td height=1 colspan=3></td></tr>
	<tr><td colspan="3" height=10 ></td></tr>
	<tr><td width=120 align=right></td>
	<td width="18"><img src="data03.gif" width="13" height="13"></td>
	<td width="604" class=lr><strong>回答正确,请填写新的密码:<strong></td></tr>

	<tr height=10><td><td colspan="2"></td></tr>
	</table>
	<!--提示信息 end-->

		<table width="100%" border=0 cellspacing=0 cellpadding=0 height=10>
	<tr><td></td></tr>
	</table>


	<table width="100%" border=0 cellspacing=0 cellpadding=0 height=10>
	<tr><td></td></tr>
	</table>

	<!--内容 begin-->
	<table width=540 border=0 cellpadding=0 cellspacing=1 bgcolor=#999999>
	<tr><td bgcolor=#F7F7F7>
	<form name="Submit" method="post" action=answer-password.php>
	<br>
	
	<table width="100%" border="0" cellpadding="0" cellspacing="0">
		<tr><td align=right ><font color=red>*</font>请输入新密码:</td>
		<td align=left width="310"><input type="password" name="newpassword" size="22" maxlength=16><div id=loginname style="DISPLAY:none"></div></td></tr>
	</table><br>
	
	<table width="100%" border="0" cellpadding="0" cellspacing="0">
		<tr><td align=right ><font color=red>*</font>请确认新密码:</td>
		<td align=left width="310"><input type="password" name="cnewpassword" size="22" maxlength=16><div id=loginname style="DISPLAY:none"></div></td></tr>
	</table><br>

	<table width="100%" border="0" cellpadding="0" cellspacing="0">
		<tr><td></td><td></td></tr>
		<tr><td width="100%" colspan=2 align=center>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type=submit name=submit value="提交修改"></td></tr>
	</table><br><br>
	</td>
	</tr>
	</table>
	</form>
	<!--内容 end-->
	<div id =end style="layer-background-color:red"><center>
	<font size=2>
	<hr width=750>
	<a href="about.html">制作小组</a> - <a href="help.html">帮助</a> - <a href="contactus.html">联系方法</a> - 
	<a href="http://corp.163.com/gb/job/job.html">招聘信息</a> - <a href="report.html">报告错误</a> - 
	<a href="http://gb.corp.163.com/gb/legal.html">相关法律</a><br/>

	短消息接收系统第二制作小组 &copy;2008-2009
	</font></center>
    </div> 
</center>
</body>


<?
	include "Sysconf.php";
	$username=$_COOKIE["username"];
	$newpassword=$_POST["newpassword"];
	$cnewpassword=$_POST["cnewpassword"];
	$submit=$_POST["submit"];
			if($_POST["submit"]=="提交修改"){	
		
   		if($newpassword==""){
			echo "<script>alert('请输入新密码!')</script>";
			echo "<script>history.back()</script>";
		}elseif($newpassword==""||strlen($newpassword)<6){
			echo "<script>alert('新密码的长度小于6位!')</script>";
			echo "<script>history.back()</script>";
		}elseif($newpassword != $cnewpassword){
			echo "<script>alert('确认密码与原密码不同,请重新输入!')</script>";
			echo "<script>history.back()</script>";
		}else{
			$sql="select * from user_base_information where user_name = '$username';";
			$result=mysql_query($sql);
			
			if(mysql_num_rows($result)){
				$sql="update user_base_information set password='$newpassword' where user_name = '$username';";
				$result=mysql_query($sql) or die("数据库查询失败");
				if($result==true){
					echo "<script>alert('密码更改成功!请牢记你的新密码...')</script>";
					header("refresh:0 url='index.html'");
				}
			}else{
				echo "<script>alert('密码修改失败')</script>";
				echo "<script>window.location.href='answer-password.php'</script>";
			}
			
		}		
		
    }
?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -