📄 admin_sz.asp
字号:
<%if session("checked")<>"yes" then
response.Redirect "../login.asp"
else
%>
<!--#include file="dataconn2.asp"-->
<%
set rs=server.createobject("adodb.recordset")
sql="select * from web_admin where id = '1'"
rs.open sql,conn,1,3
%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<base target="_self">
<style type="text/css">
<!--
body,td,th {font-family: 宋体, Arial;
font-size: 12px;}
body {margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;}
a {font-size: 12px;}
a:link {text-decoration: none;}
a:visited {text-decoration: none;}
a:hover {text-decoration: none;}
a:active {text-decoration: none;}
-->
</style>
<SCRIPT language="JavaScript">
function checkinput(theform)
{
if(theform.admin.value=='')
{alert("用户名不能为空")
theform.admin.focus()
return false;}
if(theform.pw.value=='')
{alert("密码不能为空")
theform.pw.focus()
return false;}
if(theform.pwagain.value=='')
{alert("密码必须经过输入验证")
theform.pwagain.focus()
return false;}
if(!check(theform.pw.value,theform.pwagain.value))
{alert("您两次输入的密码不一样");
theform.pw.focus()
return false;}
}
function check(a,b)
{
{ if(a!==b)
return false;}
return true;
}
</SCRIPT>
</head>
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0">
<form method="post" name="form" action="?str=abc" onSubmit="return checkinput(this)">
<table width="40%" height="180" align="center">
<tr bgcolor="#9900FF">
<td height="30" colspan="2" style="font-family: 宋体, Arial; font-size: 12px" align="center">
<b><font color="#FFFFFF">更改用户名、密码</font></b>
</td>
</tr>
<tr>
<td height="30" align="center" style="font-family: 宋体, Arial; font-size: 12px">
用户名</td>
<td height="30" style="font-family: 宋体, Arial; font-size: 12px">
<input type="text" name="admin" size="20" style=" border:1px solid #FFFFFF;background-color:#E6E6E6" value="<%=rs("web_admin_name")%>"></td>
</tr>
<tr>
<td height="30" align="center" style="font-family: 宋体, Arial; font-size: 12px">密 码</td>
<td height="30" style="font-family: 宋体, Arial; font-size: 12px">
<input type="password" name="pw" size="20"style=" border:1px solid #FFFFFF;background-color:#E6E6E6; width:150; height:20"></td>
</tr>
<tr>
<td height="30" align="center" style="font-family: 宋体, Arial; font-size: 12px">确认密码</td>
<td height="30" style="font-family: 宋体, Arial; font-size: 12px">
<input type="password" name="pwagain" size="20"style=" border:1px solid #FFFFFF;background-color:#E6E6E6; width:150; height:20"></td>
</tr>
<tr>
<td colspan="2" align="center" height="40" valign="bottom">
<input type="submit" value="保存" name="B1" style="border: 1px solid #C0C0C0; background-color: #E6E6E6 ;width:60;height:16">
<input type="reset" value="重写" name="B2" style="border: 1px solid #C0C0C0; background-color: #E6E6E6 ;width:60;height:16"><p align="center">
</td>
</tr>
</table>
</form>
<%
if Request.QueryString("str")<>"" then
rs("web_admin_name")=request.form("admin")
rs("web_admin_ps")=request.form("pw")
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
response.write("<h2 align=center>更改成功</h2>")
end if
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -