📄 adminreg.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/config.asp"-->
<%
if NOT isempty(request("adminsubmit")) then
dim adminname,password
session("adminname")=replace(trim(request("count")),"'","")
session("password")=replace(trim(request("psw")),"'","")
set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from [admin] where name='"&session("adminname")&"' and psw='"&session("password")&"' " ,conn,1,3
if not(rs.bof and rs.eof) then
if session("password")=rs("psw") then
'rs.Update
'rs.Close
'set rs=nothing
response.redirect "puton.asp"
else
call MsgBox("对不起,您的用户名或密码有误!","Back","None")
end if
else
call MsgBox("对不起,您的用户名或密码有误!","Back","None")
end if
end if
%>
<html>
<head>
<style type="text/css">
<!--
body {
font-size:10pt;
}
td {font-size:9pt}
table{font-size:9pt}
.style5 {
color: #FF9966;
font-weight: bold;
}
-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<body>
<!--#include file="head.asp"-->
<table width="990" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="358" height="49"> </td>
<td width="301"> </td>
<td width="331"> </td>
</tr>
<tr>
<td height="187"> </td>
<td valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="330" height="187">
<form name="admin" method="post" action="" id="admin">
<table>
<!--DWLayoutTable-->
<tr>
<td width="34"></td>
<Td width="204" valign="bottom"><span class="style5"><font size="+2">管理员登录</font></span></Td>
<td width="20"></td>
</tr>
<tr>
<td height="17" colspan="2" valign="top"><hr></td>
<td> </td>
</tr>
<tr>
<td>帐号:</td>
<td><input type="text" name="count" id="count"></td>
<td></td>
</tr>
<tr><td height="8"></td>
<td> </td>
<td></td>
</tr>
<Tr>
<Td>密码:</Td>
<td><input name="psw" id="psw" type="password"></td>
<td></td>
</Tr>
<tr><td height="8"></td>
<td> </td>
<td> </td>
<tr>
<Td></Td>
<td><input type="submit" name="adminsubmit" id="adminsubmit" onClick="return checkpro()" value="提交"> <input type="reset" value="重写"></td>
<td> </td>
</tr>
</table>
</form>
</td>
</tr>
</table></td>
<td> </td>
</tr>
<tr>
<td height="85"> </td>
<td> </td>
<td> </td>
</tr>
</table>
<!--#include file="foot.htm"-->
<script language="JavaScript">
<!--
function checkpro()
{
if(checkspace(document.admin.count.value)) {
document.admin.count.focus();
alert("请输入管理员帐号!");
return false;
}
if(checkspace(document.admin.psw.value)) {
document.admin.psw.focus();
alert("请输入管理员密码!");
return false;
}
return true;
}
function checkspace(checkstr) {
var str = '';
for(i = 0; i < checkstr.length; i++) {
str = str + ' ';
}
return (str == checkstr);
}
function regInput(obj, reg, inputStr)
{
var docSel = document.selection.createRange()
if (docSel.parentElement().tagName != "INPUT") return false
oSel = docSel.duplicate()
oSel.text = ""
var srcRange = obj.createTextRange()
oSel.setEndPoint("StartToStart", srcRange)
var str = oSel.text + inputStr + srcRange.text.substr(oSel.text.length)
return reg.test(str)
}
//-->
</script>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -