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

📄 sysadm_login.asp

📁 功能非常完整的校友录
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="const.asp" -->
<!--#include file="char.asp"-->
<!--#include file="checkuser.asp"-->
<%
	if request("action")="chklogin" then
		call chklogin()
	elseif request("action")="logout" then
		call logout()
	else
		call main()
	end if

	sub chklogin()
	username=trim(replace(request("adminname"),"'",""))
	password=trim(replace(request("adminpwd"),"'",""))
	if username="" or password="" then
		Errmsg=Errmsg+"<br>"+"<li>请输入您的用户名或密码。"
	call disperrs(errormsg)
		exit sub
	end if
	set rs=conn.execute("select userid,userpwd,isadmin from [student] where userid='"&username&"' and userpwd='"&password&"' and isadmin=3")
	if rs.eof and rs.bof then
		set rs=nothing
		Errmsg=Errmsg+"<br>"+"<li>您输入的用户名和密码不正确或者您不是系统管理员。<br><li>请<a href=admin_login.asp>重新登录</a>。"
	call disperrs(errormsg)
			exit sub
	end if
		session("adminlogin")="OK"
		session.timeout=45
		set rs=nothing
		response.redirect "sysadm_main.asp"
	end sub

sub logout()
session("adminlogin")=""
response.redirect "index.asp"
end sub

	sub main()
%>
<title><%=SchoolmateName%>--管理页面</title>
<link rel="stylesheet" type="text/css" href="txl.css">

<body alink=#333333 vlink=#333333 link=#333333 topmargin=0 bgcolor=<%=bodycolor%>>

<BR><BR>
<form action="sysadm_login.asp?action=chklogin" method="post"> 
<table cellpadding=0 cellspacing=0 border=0 width=<%=tablewidth%> bgcolor=<%=tablebordercolor%> align=center>
    <tr>    
        <td>
        <table cellpadding=6 cellspacing=1 border=0 width=100%>

    <tr>
    <td bgcolor=<%=Tabletitlecolor%> valign=middle colspan=2 align=center>
    <font color="<%=TablefontColor%>"><b>系统管理员登陆</b></font></td></tr>
    <tr bgcolor=<%=Tablebodycolor2%>>
    <td valign=middle align=center><font color="<%=TableContentColor%>">管理员帐号</font></td>
    <td valign=middle>&nbsp;&nbsp;<INPUT name=adminname type=text></td></tr>
    <tr bgcolor=<%=Tablebodycolor2%>>
    <td valign=middle  align=center><font color="<%=TableContentColor%>">管理员密码</font></td>
    <td valign=middle>&nbsp;&nbsp;<INPUT name=adminpwd type=password></td></tr>
    <tr>
    <td bgcolor=<%=Tabletitlecolor%> valign=middle colspan=2 align=center><input type=submit name="submit" value="登 陆"></td></tr></table></td></tr></table>
</form>
<%end sub
sub disperrs(errormsg)
%>
<html><head>
<meta NAME=GENERATOR Content="Microsoft FrontPage 4.0" CHARSET=GB2312>
<title><%=SchoolmateName%>——错误提示</title>
<link rel=stylesheet type=text/css href=txl.css>
</head>
<body alink=#333333 vlink=#333333 link=#333333 topmargin=0>


<br><br>
    <table cellpadding=0 cellspacing=0 border=0 width=90% bgcolor=<%=TableborderColor%> align=center>
        <tr>
            <td>
                <table cellpadding=5 cellspacing=1 border=0 width=100%>
    <tr align="center"> 
      <td width="100%" bgcolor=<%=TabletitleColor%>><font color="<%=TableFontColor%>"><b>同学录错误信息</b></font></td>
    </tr>
    <tr> 
      <td width="100%" bgcolor=<%=TablebodyColor2%>><font color="<%=TableContentColor%>"><br><b>产生错误的可能原因:</b><br><br>
<li>您是否仔细阅读了<a href=help.asp><font color="<%=TableContentColor%>">帮助文件</font></a>
<%=errormsg%><br><br></font>
      </td>
    </tr>
    <tr align="center"> 
      <td width="100%" bgcolor=<%=TabletitleColor%>>
<a href="javascript:history.go(-1)"><font color="<%=TableFontColor%>"> << 返回上一页</font></a>
      </td>
    </tr>  
    </table>   </td></tr></table>
<%
end sub

%>
<!--#include file="footer.asp"-->

⌨️ 快捷键说明

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