📄 users.asp
字号:
<!--#include file="../common/conn.asp"-->
<%
if request("hidd")<>"" then
sql="update userAdmin set username='"&request("username")&"',password='"&request("password")&"' where id="&request("hidd")
conn.execute(sql)
end if
sql="select * from userAdmin where hits=0"
rs.open sql,conn,3,2
PageSize = 30
If Not IsNumeric(Request("page")) Or IsEmpty(Request("page")) Or Request("page") <=0 Then
Page=1
Else
Page=Int(Abs(Request("page")))
End if
if not rs.eof then
rs.PageSize = PageSize
MaxPages = rs.PageCount
rs.absolutepage = Page
total = rs.RecordCount
end if
%>
<html>
<head>
<title>管理网站用户</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<META NAME="Description" CONTENT="">
<link rel="stylesheet" href="../../hs.css" type="text/css">
<link rel="stylesheet" href="../.css" type="text/css">
<link rel="stylesheet" href="../images/font.css" type="text/css">
<link href="../cbebcss.css" rel="stylesheet" type="text/css">
<link href=".css" rel="stylesheet" type="text/css">
<script language="JavaScript">
function check(theform)
{
if (theform.password.value!=theform.pwd.value)
{
alert("密码输入不一致!")
theform.pwd.value=""
theform.password.value=""
theform.password.focus();
return false;
}
}
</script>
</head>
<body bgcolor="#FED17E" text="#666666" background="../images/bgpic.gif">
<br>
<table width="90%" border="0" cellspacing="2" cellpadding="0" align="center">
<tr>
<td bgcolor="" class="unnamed1">
<table width="90%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="bottom">
<div align="center">
<p align="left" class="unnamed1">管理网站用户</p>
</div>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td bgcolor="" class="unnamed1">
<table width="100%" border="0" cellspacing="1" cellpadding="0" align="center" bgcolor="">
<tr bgcolor="#E7E7E7">
<td width="9%" height="20" class="unnamed1"> <div align="center"><font color="#666666">编号</font></div></td>
<td width="39%" height="20" align="center" class="unnamed1"><font color="#666666">登录名</font></td>
<td width="27%" height="20" align="center" class="unnamed1">添加时间</td>
<td width="25%" height="20" class="unnamed1"> <div align="center"><font color="#666666">管理</font></div></td>
</tr>
<%
while not rs.eof
%>
<tr bgcolor="">
<td width="9%" height="20" align="center" class="unnamed1"> <%=rs("id")%> </td>
<td width="39%" height="20" align="center" class="unnamed1"> <%=rs("username")%> </td>
<td width="27%" align="center" class="unnamed1"><%=rs("puttime")%></td>
<td height="20" align="center" class="unnamed1"><a href="users.asp?action=modify&userId=<%=rs("id")%>">修改</a>/<a href="del.asp?newsid=<%=rs("id")%>&page=<%=page%>&key=<%=key%>" onClick="var a=confirm('确实要删除吗?');if(a==0) return(false);">删除</a></td>
</tr>
<%
rs.movenext
wend
%>
<tr bgcolor="">
<td height="20" colspan="6" class="unnamed1"> <%
if TotalPage>1 then
response.write " "&page&"/"&TotalPage
if page<=TotalPage then
last=page-1
xnext=page+1
if page>1 and page<TotalPage then
response.write " <a href=users.asp?page=1&key="&key&">首页</a> <a href=users.asp?page="&last&"&key="&key&">上页</a> <a href=users.asp?page="&xnext&"&key="&key&">下页</a> <a href=users.asp?page="&TotalPage&"&key="&key&">末页</a>"
else
if page=1 then response.write " <a href=users.asp?page="&xnext&"&key="&key&">下页</a> <a href=users.asp?page="&TotalPage&"&key="&key&">末页</a>"
if page=TotalPage then response.write" <a href=users.asp?page=1&key="&key&">首页</a> <a href=users.asp?page="&last&"&key="&key&">上页</a>"
end if
end if
end if
%> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td bgcolor="">
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<form name="form1" method="post" action="">
<tr bgcolor="#E7E7E7">
<td width="20%" bordercolor="#FFFFFF" class="unnamed1">
<div align="center"></div>
</td>
<td class="unnamed1"> </td>
</tr>
</form>
</table>
</td>
</tr>
</table>
<%if request("action")="modify" and request("userId")<>"" then
set rs1=server.CreateObject("ADODB.recordset")
sql="select*from useradmin where id="&request("userId")
rs1.open sql,conn,3,2
%>
<table width="82%" border="0" cellspacing="2" cellpadding="5" align="center">
<form name="form1" method="post" action="users.asp" onSubmit="return check(this);">
<tr bgcolor="">
<td align="right" width="20%" height="29" class="unnamed1">登 录 名: </td>
<td width="73%" height="29" class="unnamed1">
<input name="username" type="text" class="button" value="<%=rs1("username")%>" size="30">
<input name="hidd" type="hidden" id="hidd" value="<%=rs1("id")%>">
</td>
</tr>
<tr bgcolor="">
<td width="20%" height="6" align="right" class="unnamed1">密 码: </td>
<td width="73%" height="6" class="unnamed1"> <input name="password" type="password" class="button" value="<%=rs1("password")%>" size="30">
</td>
</tr>
<tr bgcolor="">
<td width="20%" height="6" align="right" class="unnamed1">确认密码:</td>
<td height="6" class="unnamed1"><input name="pwd" type="password" class="button" id="pwd" value="<%=rs1("password")%>"></td>
</tr>
<tr bgcolor="">
<td align="right" width="20%" class="unnamed1"> </td>
<td width="73%" class="unnamed1"> <br>
<input type="submit" name="Submit3" value="修改" class="button">
</td>
</tr>
</form>
</table>
<%end if%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -