📄 newpass.asp
字号:
<%if Session.Contents("thegbmaster")="enshi" then%>
<%
set conn=server.createobject("adodb.connection")
DBPath = Server.MapPath("hljcar.com.mdb")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath
Set rs = Server.CreateObject("ADODB.Recordset")
sql = "SELECT * FROM admin"
rs.open sql, conn, 1,3
%>
<%
dim name, pass
name=Request("name")
pass=Request("pass")
%>
<%
if name<>"" and pass<>"" Then
rs.MoveFirst
rs("name")=name
rs("pass")=pass
rs.Update
response.write "数据成功更新"
Else
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="css.css">
<title>修改密码</title>
<script language="JavaScript">
<!--
function checkdata() {
if( form.name.value =="") {
alert("\请输入用户名")
return false;
}
if( form.pass.value =="") {
alert("\请输入密码")
return false;
}
return true;
}
function isNumberString (InString,RefString)
{
if(InString.length==0) return (false);
for (Count=0; Count < InString.length; Count++) {
TempChar= InString.substring (Count, Count+1);
if (RefString.indexOf (TempChar, 0)==-1)
return (false);
}
return (true);
}
// -->
</script>
</head>
<body leftmargin="0" Topmargin="0" marginwidth="0" marginheight="0" background="images/greystrip.gIf">
<table width="100%" border="0" cellspacing="0" cellpadding="0" vspace="0" hspace="0" bordercolordark="#FFFFFF" bordercolorlight="#316395" height="35">
<tr>
<td height="35">
<div align="center"><a href="http://hljcar.com" target="_blank">龙江汽车网
www.hljcar.com</a></div></td>
</tr>
</table>
<form method="POST" action="newpass.asp" name=form onSubmit="return checkdata()">
<table border="1" cellspacing="0" cellpadding="0" width="581" align="center" height="10" bordercolor="#7C96B8" bordercolordark="#FFFFFF">
<TR>
<td colspan="1" height="20" width="577" bgcolor="#7C96B8">
<div align="center"><font color="#FFFFFF">修改密码</font> </div></td>
</TR>
<tr>
<td>用户名:
<input type="text" name="name" size="16">
密码:
<input type="text" name="pass" size="16"> <input type="submit" value="提交" name="B1">
<input type="reset" value="重写" name="B2"> </td>
</tr>
</table>
</form>
</body>
</html>
<%end if%>
<%
Else
response.redirect "login.asp"
end if%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -