|
<!--#include file="E_Conn.asp"-->
<!--#include file="Inc/MD5.asp"-->
<!--#Include File="Inc/Cookies.asp"-->
<!--#include file="Inc/Function.asp"-->
<%
UserName = replace( trim(GetVariable("M_Name")),"'","" )
UserPwd=replace(trim(GetVariable("M_PassWord")),"'","")
sql="SELECT * FROM Web_Admin WHERE (admin_UserName='"&UserName&"' and admin_UserPwd='"&UserPwd&"')"
rs=Conn.execute(sql)
AdminName=rs("admin_UserName")
response.write adminname
if AdminName<>"" then
session("admin_Limit")=rs("admin_Limit")
Conn.execute("UPDATE Web_Admin SET admin_loginnum = admin_loginnum + 1 WHERE (admin_UserName='"&UserName&"' and admin_UserPwd='"&UserPwd&"')")
Conn.execute("UPDATE Web_Admin SET admin_loginip = '"&Request.ServerVariables("REMOTE_HOST")&"' WHERE (admin_UserName='"&UserName&"' and admin_UserPwd='"&UserPwd&"')")
end if
Session.Timeout =180
IF AdminName<>"" then
Session("admin_UserName")=UserName
Session("admin_UserPwd")=UserPwd
response.write "<meta http-equiv=refresh content=0;URL=M_Index.asp>"
else
'Session.Abandon
response.Write "<script language='javascript'>alert('站务管理员帐号或密码错误,请重新登录!');history.go(-1);</script>"
response.end
end if
%>
这个程序是别人写的,下面这一句我没看懂是什么意思,做什么用的,
session("admin_Limit")=rs("admin_Limit")
而且在另外一页,有这么一句
if Instr(admin_Limit, 1) >0 then
.
.
就显示后面的页面,否则就不显示.
望高手给指点指点,急啊................ |
|