📄 login.asp
字号:
<!--#include file="conn.asp" -->
<%
on error resume next
dim login
login=Request.Item ("login")
if login="" then
call list()
else
call echo()
end if
%>
<%
function list()
%><html>
<head>
<title>平行VOD视频点播系统管理员登陆</title>
<link rel=stylesheet href="css\netoa.css">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="500" border="0" align="center">
<tr>
<td>
<div align="center"><b><font color="#CC0033">人员登陆</font></b></div>
</td>
</tr>
</table>
<%
if err_msg<>"" then
%><table width="298" border="0" align="center">
<tr>
<td>登陆失败原因:<br>
<%=err_msg%>
</td>
</tr>
</table>
<%
end if
call form()
%>
</body>
</html>
<%
end function
%>
<%
function form()
%>
<form name="form1" method="post" action="login.asp">
<table width="187" border="0" align="center">
<tr>
<td width="68">用户名:</td>
<td width="109">
<input type="text" name="yname" size="15">
</td>
</tr>
<tr>
<td width="68">密 码 :</td>
<td width="109">
<input type="password" name="ypass" size="15">
<input type="hidden" name="login" size="15" value="ture">
</td>
</tr>
</table>
<table width="191" border="0" align="center">
<tr>
<td width="101">
<div align="center">
<input type="submit" name="Submit" value="提交">
</div>
</td>
<td width="80">
<input type="reset" name="Submit2" value="重置">
</td>
</tr>
</table>
</form>
<%
end function
%>
<%
function echo()
dim yname,ypass
yname=Request.Item ("yname")
ypass=Request.Item ("ypass")
err_msg=""
if yname="" then
err_msg=err_msg & "<li>用户名不能为空</li>"
end if
if ypass="" then
err_msg=err_msg &"<li>密码不能为空</li>"
end if
sql = "select * from admin where adminname ='"&yname&"' and adminpass ='"&ypass&"';"
Set rs= Server.CreateObject("ADODB.Recordset")
'Response.Write sql
'response.end
rs.open sql,conn,1,1
if rs.eof then
err_msg=err_msg & "<li>错误:用户("&yname&")密码错误!</li>"
if err_msg<>"" then
%>
<html>
<head>
<title>人员登陆</title>
<link rel=stylesheet href="css\netoa.css">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="500" border="0" align="center">
<tr>
<td>
<div align="center"><b><font color="#CC0033">人员登陆</font></b></div>
</td>
</tr>
</table>
<table width="298" border="0" align="center">
<tr>
<td>登陆失败原因:<br>
<%=err_msg%>
</td>
</tr>
</table>
<%
end if
call form()
%>
</body></html>
<%
else
session("lehu")=True
session("sbren")=rs("adminname")
response.Redirect "main.asp"
end if
rs.close
end function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -