Asp后台密码查看或修改?
<!--#includefile="../inc/dbconn.asp"--><!--#includefile="../inc/func.asp"--><%Respons...
<!--#include file="../inc/dbconn.asp" -->
<!--#include file="../inc/func.asp" -->
<%Response.Buffer = True
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = "no-cache"
Response.AddHeader "Pragma", "No-Cache"%>
<%
if request.form("operation")="login" then
dim sn
sn=request.form("sn")
if lcase(sn)<>lcase(session("psn")) then
call showerr("系统提示:请输入正确的验证码!")
end if
dim admin
admin=request.form("admin")
admin=replace(admin,"'","")
dim pwd
pwd=request.form("pwd")
pwd=replace(pwd,"'","")
dim rs
set rs=conn.execute("select * from admin where admin='"&admin&"' and pwd='"&pwd&"'")
if rs.eof then
call showerr("输入的帐号或密码不正确,请正确填写!")
end if
session("key")="freesky_zhangdan"
session("manage")=admin
session("qx")=rs("qx")
'response.write rs("qx")
'response.end
call showmsg("用户登录成功!","main.asp")
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>图文印象网站管理中心</title>
<link href="images/style.css" rel="stylesheet" type="text/css">
</head>
<body BACKGROUND="Images/bg.gif">
<table width="100%" height="466" border="0" align="center" cellpadding="0" cellspacing="0">
<tr> <td><table width="524" height="276" border="0" align="center" cellpadding="0" cellspacing="0" background="images/admin_login.gif">
<tr> <td width="524" height="276"><form name="form1" method="post" action="index.asp">
<table width="91%" height="121" border="0" cellpadding="0" cellspacing="0"> <tr>
<td width="44%"> </td><td width="18%"> </td><td width="38%"> </td></tr> <tr> <td height="25"> </td><td height="25"><div align="center">用户名:</div></td><td height="25">
<input name="admin" type="text" class="ipt1" id="admin">
</td></tr>
<tr> <td height="25"> </td><td height="25"><div align="center">密 码:</div></td><td height="25">
<input name="pwd" type="password" class="ipt1" id="pwd">
</td></tr>
<tr>
<td height="25"> </td>
<td height="25"><div align="center">验证码:</div></td>
<td height="25"><input name="sn" type="text" class="ipt1" id="sn" size="10">
<img src="code.asp"></td>
</tr>
<tr> <td> </td><td colspan="2"><div align="center"> <input name="Submit" type="submit" class="ipt2" value="提交">
<input name="Submit2" type="reset" class="ipt2" value="重置"> <input name="operation" type="hidden" id="operation" value="login">
</div></td></tr> </table>
</form></td></tr> </table></td></tr> </table>
</body>
</html>
<%
call COCLS
%> 展开
<!--#include file="../inc/func.asp" -->
<%Response.Buffer = True
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = "no-cache"
Response.AddHeader "Pragma", "No-Cache"%>
<%
if request.form("operation")="login" then
dim sn
sn=request.form("sn")
if lcase(sn)<>lcase(session("psn")) then
call showerr("系统提示:请输入正确的验证码!")
end if
dim admin
admin=request.form("admin")
admin=replace(admin,"'","")
dim pwd
pwd=request.form("pwd")
pwd=replace(pwd,"'","")
dim rs
set rs=conn.execute("select * from admin where admin='"&admin&"' and pwd='"&pwd&"'")
if rs.eof then
call showerr("输入的帐号或密码不正确,请正确填写!")
end if
session("key")="freesky_zhangdan"
session("manage")=admin
session("qx")=rs("qx")
'response.write rs("qx")
'response.end
call showmsg("用户登录成功!","main.asp")
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>图文印象网站管理中心</title>
<link href="images/style.css" rel="stylesheet" type="text/css">
</head>
<body BACKGROUND="Images/bg.gif">
<table width="100%" height="466" border="0" align="center" cellpadding="0" cellspacing="0">
<tr> <td><table width="524" height="276" border="0" align="center" cellpadding="0" cellspacing="0" background="images/admin_login.gif">
<tr> <td width="524" height="276"><form name="form1" method="post" action="index.asp">
<table width="91%" height="121" border="0" cellpadding="0" cellspacing="0"> <tr>
<td width="44%"> </td><td width="18%"> </td><td width="38%"> </td></tr> <tr> <td height="25"> </td><td height="25"><div align="center">用户名:</div></td><td height="25">
<input name="admin" type="text" class="ipt1" id="admin">
</td></tr>
<tr> <td height="25"> </td><td height="25"><div align="center">密 码:</div></td><td height="25">
<input name="pwd" type="password" class="ipt1" id="pwd">
</td></tr>
<tr>
<td height="25"> </td>
<td height="25"><div align="center">验证码:</div></td>
<td height="25"><input name="sn" type="text" class="ipt1" id="sn" size="10">
<img src="code.asp"></td>
</tr>
<tr> <td> </td><td colspan="2"><div align="center"> <input name="Submit" type="submit" class="ipt2" value="提交">
<input name="Submit2" type="reset" class="ipt2" value="重置"> <input name="operation" type="hidden" id="operation" value="login">
</div></td></tr> </table>
</form></td></tr> </table></td></tr> </table>
</body>
</html>
<%
call COCLS
%> 展开
6个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询