登陆页面,自己看的!

来源:互联网 发布:华新村知行大厦 编辑:程序博客网 时间:2024/05/23 19:18

<!--#include file="conn.asp"-->
<!--#include file="inc/md5.asp"-->
<%
if Request.ServerVariables("request_method") = "POST" then
password=Trim(Request.form("password"))
username=Trim(Request.form("username"))
Set rs = Server.CreateObject("ADODB.Recordset")
sql="Select * From [User] where username='"&Username&"'"
rs.open sql,conn,1,1
if rs.eof then
error1="你所输的用户不存在!"
response.redirect "login.asp?error1="&error1&""
else
if not rs("uservalidate") then
error1="你的帐户还没有激活!"
response.redirect "login.asp?error1="&error1&""
else
if md5(password)<>rs(2) then
error1="你所输的密码错误!"
response.redirect "login.asp?error1="&error1&""
end if
Session("username")=rs("username")
Session("login")=true
response.redirect "main.asp"
set rs=nothing
rs.close
end if
end if
end if
%>
<html>
<head>
<title>南京农业大学电子公文系统-登陆</title>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache, must-revalidate">
<link rel="stylesheet" href="inc/style.css" type="text/css">
</head>
<body bgcolor="menu" text="#000000" leftmargin="1" topmargin="1" scroll="no" style="border:0px;">
<table width="100%" border="0" cellspacing="0" cellpadding="0" HEIGHT="100%" ALIGN="CENTER">
 <tr bgcolor="#FFFFFF">
 <td HEIGHT="34" rowspan="2">
 <img src="images/logo.gif" width="44" height="43" hspace="2" vspace="2"></td>
 <td HEIGHT="17" align="right" valign="bottom">
 <span id="verinfo" disabled>版本信息:<%=ver%></span>&nbsp;&nbsp;</td>
 </tr>
 <tr bgcolor="#FFFFFF">
 <td HEIGHT="17" align="right" valign="bottom">
  &nbsp;欢迎使用南京农业大学电子公文系统&nbsp;
 </td>
 </tr>
 <tr bgcolor="#666666">
 <td HEIGHT="1" colspan="2"></td>
 </tr>
 <tr bgcolor="#FFFFFF">
 <td HEIGHT="1" colspan="2"></td>
 </tr>
 <form name="form1" method="post" action="login.asp">
 <tr>
 <td colspan="2" align="center"> <table width="100%" border="0" cellpadding="2" cellspacing="0">
 
  <tr>
 <td height="22" ALIGN="center"><font color="#FF0000">
 <% =request("error1")%>
 </font> </td>
 </tr>
 <tr>
 <td height="22" ALIGN="center"><font color="#666666">帐号:</font>
 <input name="username" type="text" class="input" style="width:120px;height:22" maxlength="50"></td>
 </tr>
 <tr>
 <td height="22" align="center"><font color="#666666">密码:</font>
 <input name="password" type="password" class="input" style="width:120px;height:22" maxlength="50"></td>
 </tr>
 <tr>
 <td height="22" align="center"><br> <font color="#0000FF">建议使用IE浏览器,分辨率1024*768,否则部分功能不能正常使用</font></td>
 </tr>
 </table></td>
 </tr>
 <tr align="right">
 <td colspan="2" valign="bottom">
 <a href="http://www.njau.edu.cn" target="_blank"><font color="#666666">http://www.njau.edu.cn</font></a>&nbsp;&nbsp;
 </td>
 </tr>
 <tr bgcolor="#666666">
 <td height="1" colspan="2" align="center"></td>
 </tr>
 <tr bgcolor="#FFFFFF">
 <td height="1" colspan="2" align="center"></td>
 </tr>
 <tr align="center">
 <td colspan="2"><table width="75%" border="0">
 <tr>
   <td align="right" valign="top"><a href="userreg.asp" target="_self">新用户注册</a></td>
 <td height="28" align="right" valign="top">
 <input name="S1" type="submit" value=" 登 录 ">
 <input name="S2" type="reset" value=" 取 消 "></td>
 </tr>
 </table></td>
 </tr>
 </form>
</table>
</body>
</html>

原创粉丝点击