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

📄 login.asp

📁 asp做的论坛
💻 ASP
字号:
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/md5_net.asp"-->
<%
If Request("Submit")<>"" Then

Dim rs,sql,uid,pwd,expTime,date_last
uid=Trim(Request.Form("username"))
uid=replace(uid,"'","")
pwd_net=replace(trim(Request("password")),"'","")
pwd_net=MD5_NET(MD5_NET(pwd_net))

set rs=server.createobject("adodb.recordset")
sql="select * from admin where user='"&uid&"'"
rs.open sql,conn,1,3
If not rs.Eof Then
	If rs("password")=pwd_net Then
		Session("adminchk")="True"
		Session("user")=uid
		Response.Redirect ("index.asp")
	else 	response.write "<SCRIPT language=JavaScript>alert('用户名和密码错误,请勿非法登陆!');"
	response.write "this.location.href='vbscript:history.back()';</SCRIPT>"
	response.end
        
        End If 
else 	response.write "<SCRIPT language=JavaScript>alert('用户名和密码错误,请勿非法登陆!');"
	response.write "this.location.href='vbscript:history.back()';</SCRIPT>"
	response.end
End If

End If
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>管理员登陆</title>
<link href="css/style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body,td,th {
	font-size: 12px;
}
.style1 {
	font-size: 24px;
	font-weight: bold;
	color: #003333;
}
body {
	background-image: url(images/bg_001.gif);
}

input
{
background-color: #ffffff; 
border-bottom: #666666 1px solid;
border-left: #666666 1px solid;
border-right: #666666 1px solid;
border-top: #666666 1px solid;
color: #666666;
height: 18px;
border-color: #666666 #666666 #666666 #666666; font-size: 9pt
}
-->
</style></head>
<body>
<p align="center" class="style1">管理员登陆</p>
<table width="260" height="120" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
  <tr>
    <td><form  method="post" action="login.asp">
  &nbsp;&nbsp;
  管理员名称:
        <input type="text" name="username" size="15" />
        <br />
&nbsp;&nbsp;&nbsp;管理员密码:
<input type="password" name="password" size="16" />
    <br />
    <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input name="Submit" type="submit"  value="登陆" />
    <input type="reset" name="Submit2" value="重置" />
    </form></td>
  </tr>
</table>
<br />
</body> 
</html>

⌨️ 快捷键说明

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