📄 login.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="conn.asp" -->
<!--#include file="md5.asp" -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>后台管理</title>
<style type="text/css">
<!--
.style2 {color: #FF6633}
input {
font-family: Arial, Helvetica, sans-serif;
font-size: 13px;
font-style: normal;
line-height: normal;
color: #006600;
border: #000000 1px solid;
}
-->
</style></head>
<script laguage="javascript">
<!--
function form1_onsubmit()
{
if (document.form1.username.value=="")
{
alert("用户名不能为空!")
document.form1.username.focus()
return false
}
else if(document.form1.password.value=="")
{
alert("密码不能为空!")
document.form1.password.focus()
return false
}
}
-->
</script>
<body>
<center>
<%if request.Form("sub")="sub" then
username=trim(request.form("username"))
username=replace(username,"'","")
password=trim(request.form("password"))
password=replace(password,"'","")
password=md5(password)
if username="" or password="" then
response.Redirect("login.asp")
else
set rs=server.CreateObject("adodb.recordset")
sql="select * from y_admin where y_username='"&username&"'and y_password='"&password&"'"
rs.open sql,conn,1,1
if not rs.eof then
session("yd631")="yd631"
response.Redirect("list.asp")
else
response.Redirect("login.asp")
end if
end if
response.End()
end if
%>
<p> </p>
<p> </p>
<table width="700" height="360" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="left" valign="top"><table width="700" height="160" border="0" cellpadding="0" cellspacing="1" bgcolor="#333333">
<tr>
<td height="165" align="center" bgcolor="#FFFFFF"><form name="form1" method="post" action="login.asp" onsubmit="return form1_onsubmit()">
<table width="328" height="129" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="113" height="47" align="right"><span class="style2">用户名:</span></td>
<td width="215"><input name="username" type="text" id="username" size="15">
<br></td>
</tr>
<tr>
<td height="41" align="right"><span class="style2">密 码:</span></td>
<td><input name="password" type="password" id="password" size="15">
<br></td>
</tr>
<tr align="center">
<td colspan="2"><br>
<input type="submit" name="Submit" value="提交">
<input type="reset" name="Submit2" value="重置">
<input type="hidden" name="sub" value="sub">
</td>
</tr>
</table>
</form></td>
</tr>
</table>
</td>
</tr>
</table>
</center>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -