⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 admin_login.asp

📁 在线考试系统
💻 ASP
字号:

<%@ Language=VBScript %>
<% option explicit

if	request.form("logout")="Logout" then
	session.Abandon 
	'response.write session("AdminID") & "=="

end if

dim AdminID , AdminPass, message

message="请输入用户名和密码.."
AdminID =session("AdminID")
AdminPass =session("AdminPass")

'if  AdminID="" or AdminPass ="" then 
	''''''''''''''''''''''''''''''''''''''''''''''''''''''
'else
if Request.Form ("submit")="登录" then

	AdminID =Request.Form("AdminID")
	AdminPass =Request.Form("AdminPass")

	dim myconn
	set myconn=Server.CreateObject("ADODB.Connection")
	
	myconn.ConnectionString="Provider=SQLOLEDB.1;Persist Security Info=False;data source=(local);User ID=sa;Initial Catalog=exam"
	myconn.Open
	
	dim myrs
	set myrs = server.createobject("ADODB.recordset")
	myrs.open "select * from AdminLogin where AdminID ='" & AdminID & "' and Password ='"& AdminPass &"'" ,myconn,3
	'3=adOpenStatic,then only myrs.recordcount will work  
	''''''''''''''''''''''''''''''''''''''''''''''''''	
	
	if myrs.EOF then
	message="用户名密码错误,请重新登录"
	else
	Session.Contents ("AdminID")= AdminID
	Response.Redirect("control_panel.asp")
	end if 

end if
%>
<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>Administrator Login: <%= AdminID%></title>
</head>

<body>

<table width="80%" style="BORDER-COLLAPSE: collapse" bordercolor="#111111" cellpadding="0" cellspacing="0">
<tr><td style="WIDTH: 500px" width=500 bgColor=gold>
	<p align="right"><span lang="zh-cn">管理员登录</span></td>     
</tr>
</table>
<div align="left">
&nbsp;&nbsp;<table border="1" cellpadding="4" cellspacing="0" style="BORDER-COLLAPSE: collapse" bordercolor="#111111" bgcolor="#FAFAD2" width="80%">
    <tr>
      <td width="50%">&nbsp;<STRONG><FONT 
      color=red><%=message%></FONT></STRONG></td>
      <td width="50%">
      <form method="post" name="form_login" action="admin_login.asp">
        <p> </p>
        <p><span lang="zh-cn"><b>管理员帐号:</b></span><input name="adminid" size="20" ></p>
        <p><span lang="zh-cn"><b>管理员密码:</b></span><input type="password" name="adminpass" size="20" ></p>
        <p><input type="submit" value="登录" name="submit"><input type="reset" value="清空 " name="B2"></p>
      </form>
      <p> </p></td>
    </tr>
  </table>
</div>
<table width="80%" style="BORDER-COLLAPSE: collapse" bordercolor="#111111" cellpadding="0" cellspacing="0">
<tr><td style="WIDTH: 500px" width=500 bgColor=gold><P align=right>
<strong style="font-weight: 400"><span lang="zh-cn"><font size="4">
<a href="../index.html">在线考试系统</a></font></span></strong></P></td>     
</tr>
</table>

</body>

</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -