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

📄 adminok.asp

📁 网上有名留言板20120版,非常不错~
💻 ASP
字号:
<%
 function checkuser(chk_string)
   chk_string=replace(chk_string,"' or ''='","***")
   checkuser=chk_string
 end function
sub adminok()
if request("user1")="" then
error_html="<li>您得填写您的帐号哦!</li>"
end if

if request("password")="" then
error_html=error_html&"<li>您的密码还没有填写哦!</li>"
end if


if error_html<>"" then
error_html=error_html&"<p align=center>[<a href=javascript:history.go(-1);>这里返回</a>]</p>"
error_html="<table width=100% height=151 border=1 cellspacing=0 cellpadding=3 bordercolorlight=#333333 bordercolordark=#FFFFFF>        <tr>           <td width='100%' height='6' class=link > "&error_html&"</td></tr></table>"
table(error_html)
else
set rs_user=server.createobject("adodb.recordset")
sql_user="select user from user where user='"&checkuser(request("user1"))&"' and password='"&checkuser(request("password"))&"'"
'response.write sql_user
rs_user.open sql_user,conn,3,2
if rs_user.recordcount=0 then
if checkuser(request("password"))=password and checkuser(request("user1"))=admin then

session("user")=request("user1")
addok_html="<table width=100% height=151 border=1 cellspacing=0 cellpadding=3 bordercolorlight=#333333 bordercolordark=#FFFFFF>        <tr>           <td width='100%' height='6' class=link  align=center>  登陆成功!<br>现在您可进入您的留言板管理模式.<p><br>  [<a href=?user="&request("user1")&">进入管理模式</a>] </td></tr></table>"
table(addok_html)
        Response.Cookies("Uming")("user") = request("user1")
  		Response.Cookies("Uming").Expires = dateadd("d","365",date())
		Response.Cookies("Uming").path=cookiepath
else
error_html=error_html&"<li>您输入的帐号和密码不正确!</li>"
error_html=error_html&"<p align=center>[<a href=javascript:history.go(-1);>返回重试</a>]</p>"
error_html="<table width=100% height=151 border=1 cellspacing=0 cellpadding=3 bordercolorlight=#333333 bordercolordark=#FFFFFF>        <tr>           <td width='100%' height='6' class=link > "&error_html&"</td></tr></table>"
table(error_html)
end if
else
        session("user")=request("user1")
        Response.Cookies("Uming")("user") = request("user1")
  		Response.Cookies("Uming").Expires = dateadd("d","365",date())
		Response.Cookies("Uming").path=cookiepath
addok_html="<table width=100% height=151 border=1 cellspacing=0 cellpadding=3 bordercolorlight=#333333 bordercolordark=#FFFFFF>        <tr>           <td width='100%' height='6' class=link  align=center>  登陆成功!<br>现在您可进入您的留言板管理模式.<p><br>  [<a href=?user="&request("user1")&">进入管理模式</a>] </td></tr></table>"
table(addok_html)
end if
end if
%>
<%end sub%>

⌨️ 快捷键说明

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