📄 default.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="Inc/Dataconn.asp" -->
<!--#include file="Inc/md5.asp" -->
<!--#include file="Inc/Funcs.asp" -->
<% '注销
if request.QueryString("Action")="CancelLogin" then
session("User")=""
end if
'登录
If Request.Form("action")="UserLogin" Then
Dim UserName,UserPass,SQLStr
UserName=Request.Form("UserName")
If UserName="" Then
Call eMessage("用户名不能为空!")
End If
UserPass=Request.Form("Userpass")
If UserPass="" Then
Call eMessage("密码不能为空!")
End If
rS.Open "Select * from Admin where UserName='"&md5(UserName)&"'",conn,1,1
If rS.eof and rS.bof then
Call eMessage("该用户不存在!")
End if
If Md5(UserPass)<>rS("UserPass") then
Call eMessage("密码错误!")
end if
'登录正确后设置会话变量(session)
session("User")="Admin"
session("UserName")=UserName
Response.Redirect("Index.asp")
End If
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title></title>
<link href="Inc/css.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
body {
background-image: url();
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
-->
</style></head>
<body>
<table width="100%" height="600" border="0" bgcolor="#6B97DE">
<tr>
<td background="Images/lbg.jpg"><table width="220" height="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#666666">
<form name="form1" method="post" action="Default.asp">
<tr>
<td height="25" align="center" background="Images/tbtitle1.jpg" class="mnu"><strong>用户登录</strong></td>
</tr>
<tr>
<td height="20" bgcolor="#FFFFFF" class="mnu"> 用户名:
<input name="UserName" type="text" class="InputStyle" id="UserName" /> </td>
</tr>
<tr>
<td height="20" bgcolor="#FFFFFF" class="mnu"> 密 码:
<input name="UserPass" type="password" class="InputStyle" id="UserPass" /></td>
</tr>
<tr>
<td height="25" align="center" valign="middle" bgcolor="#FFFFFF" class="mnu"><input name="action" type="hidden" id="action" value="UserLogin" />
<input name="Submit" type="submit" value="登录" />
<input name="Submit2" type="reset" value="重置" />
<a href="Index.asp" target="_self">游客登录</a></td>
</tr>
</form>
</table></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -