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

📄 login.asp

📁 ASP系统使用说明及程序
💻 ASP
字号:
<!--#include file="cls_DB.asp"-->
<%
if session("admin") ="open" then Response.Redirect "admin.asp"
dim username	
dim password	
username = trim(Request.Form("username"))
password = trim(Request.Form("password"))
OpenDB()
sql="select * from login where password='"&password&"' and"&_
" username='"&username&"'"
set rst=server.CreateObject("Adodb.recordset")
rst.open sql,conn,1,1
if not(rst.bof and rst.eof) then
if password=rst("password") then
	response.cookies("users")("username")=username
	response.cookies("users")("userpass")=password
	Session("admin")="open"
	Response.Redirect "admin.asp"
end if
end if
rst.close
set rst=nothing
closeDB 		
 %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>投票首页</title>
</head>

<body>
<br><br><br>
<form method="post" action="login.asp">
<table cellSpacing=1 cellPadding=5 width="30%" border=0 
 align="center" bgcolor="#CCCCCC">
<tr bgcolor="#F0F0F0" align="center"> 
<td colspan="2">管理登录
</td>
</tr>
<tr bgcolor="#FFFFFF"> 
<td width="50%" align="right">用户名:
</td>
<td width="50%"> 
<input name="username" type="text" size="12" maxlength="20">
</td>
</tr>
<tr bgcolor="#FFFFFF"> 
<td width="50%" align="right">密 码:
</td>
<td width="50%"> 
<input name="password" type="password" size="12" maxlength="20">
</td>
</tr>
<tr align="center" bgcolor="#FFFFFF"> 
<td colspan="2"> 
<input type="submit" name="Submit" value=" 登录 ">            
</td>
</tr>
</table>
</form>
</body>
</html>

⌨️ 快捷键说明

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