📄 login.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="md5.asp"-->
<!--#include file="common.asp"-->
<%
dim SiteName
dim SiteURL
dim MasterName
dim Email
dim PageWidth
dim Unit
sql="select * from setting"
set rs=conn.execute (sql)
if not rs.eof then
SiteName=rs("SiteName")
SiteURL=rs("SiteURL")
MasterName=rs("MasterName")
Email=rs("Email")
PageWidth=rs("PageWidth")
Unit=rs("Unit")
rs.close
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%response.write SiteName&"-自助友情链接系统 - Power By TODO.NET.CN"%></title>
<LINK href="css.css" type=text/css rel=stylesheet>
</head>
<body>
<%
if request("submit")=" 确 定 " then
dim username
dim passsword
dim repasssword
username=trim(replace(request("username"),"'",""))
passsword=trim(replace(request("passsword"),"'",""))
repasssword=trim(replace(request("repasssword"),"'",""))
if username="" or passsword="" or repasssword="" then
Errmsg = Errmsg+"<li>请填写全部信息。"
Call ErrList(Errmsg)
response.end
elseif passsword <> repasssword then
Errmsg = Errmsg+"<li>密码与确认密码不符。"
Call ErrList(Errmsg)
response.end
end if
s=cint(request("s"))
if s=1 then
sql="select ID,passsword from link where username='"&username&"'"
elseif s=2 then
sql="select ID,MasterPSW from setting where MasterName='"&username&"'"
end if
rs.open sql,conn,1,3
if not rs.eof then
if rs(1)<>md5(passsword) then
Errmsg = Errmsg+"<li>用户名或密码错误。"
Call ErrList(Errmsg)
response.end
else
if s=1 then
session("L_username")=username
session("L_userid")=rs(0)
response.Redirect("useradmin.asp")
else
session("S_username")=username
session("S_userid")=rs(0)
response.Redirect("admin.asp")
end if
end if
else
Errmsg = Errmsg+"<li>用户名或密码错误。"
Call ErrList(Errmsg)
response.end
end if
end if
%>
<%
dim s
s=cint(request("s"))
if s=1 then
if session("L_username")<>"" and session("L_userid")<>"" then
response.Redirect("useradmin.asp")
response.end
end if
elseif s=2 then
if session("S_username")<>"" and session("S_userid")<>"" then
response.Redirect("admin.asp")
response.end
end if
end if
%>
<table border="0" align="center" cellpadding="0" cellspacing="0" width="<%=PageWidth&Unit%>">
<tr>
<td>
<table width="530" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#698CC3">
<form id="form1" name="form1" method="post">
<tr>
<td bgcolor="#FFFFFF"><table width="100%" height="2" border="0" cellpadding="0" cellspacing="0">
<tr>
<td></td>
</tr>
</table>
<table width="99%" height="30" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="698cc3" class="title">
<tr>
<td><%response.write " <a class=""atitle"" href="""&SiteURL&""" target=_blank>"&SiteName&"</a>-自助友情链接系统-管理入口"%></td>
<td align="right"> </td>
</tr>
</table>
<table width="100%" height="2" border="0" cellpadding="0" cellspacing="0">
<tr>
<td></td>
</tr>
</table>
<!--显示与隐藏的表格-->
<table width="99%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="d6e0ef" style="display:" id="Tab3">
<tr bgcolor="#FFFFFF">
<td height="20" colspan="2"> </td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="35%" height="20">用户名:</td>
<td><input name="username" type="text" id="username" size="50" maxlength="50"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="20">密码:</td>
<td><input name="passsword" type="password" id="passsword" size="50" maxlength="20"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="20">确认密码:</td>
<td><input name="repasssword" type="password" id="repasssword" size="50" maxlength="20">
<input name="s" type="hidden" id="s" value="<%=s%>"></td>
</tr>
<tr align="center" bgcolor="#FFFFFF">
<td height="20" colspan="2">
<input type="submit" name="Submit" value=" 确 定 " onClick="submitform(1)">
<input type="reset" name="Submit" value=" 重 设 "></td>
</tr>
</table>
<!--显示与隐藏的表格-->
<table width="100%" height="2" border="0" cellpadding="0" cellspacing="0">
<tr>
<td></td>
</tr>
</table></td>
</tr>
</form>
</table>
</td></tr></table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -