- 博客(0)
- 资源 (2)
- 收藏
- 关注
投票用户登录
<!--#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" bgcolor=#FF99FF>管理登录
</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=" 登 录 ">
<input type="reset" name="reset" value="重 填"></td>
</td>
</tr>
</table>
</form>
</body>
</html>
2013-02-19
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人