请各位帮忙看看这个ASP文件怎么改;最好是管理员,这个源码是管理员发的!
<!--#include file=\"Set.asp\"--><!--#include file=\"Inc/Count.asp\"-->
<!--#include file=\"admin/Md5.asp\"-->
<!--#include file=\"admin/funtion.asp\" -->
<%
Dim lc
Set lc=new main
Dim Action,SecurityKey2
Action=Trim(Request(\"Action\"))
If Action=\"\" then Action=\"Login\"
dim UserName,Password,CookieDate
UserName= Trim(Cl.CheckStr(Request(\"UserName\")))
Password= Trim(Cl.CheckStr(Request(\"Password\")))
CookieDate= Cl.ChkClng(Request(\"CookieDate\"))
SecurityKey2 = Trim(Request(\"Key\"))
Select Case Action
Case \"Login\"
If SecurityKey2=MD5(SecurityKey & username,32) then
call User_Login()
Else
Response.Write \"老大,不要黑我的程序\"
End If
Case \"Logout\"
call user_logout()
Case else
Response.Redirect citypath & \"index.asp\"
End Select
Sub User_Login()
Dim TruePassWord,sValidDays,sUserInfo,comeurl
Dim RsLogin,RsGroup,sAddPoint,i,MsgInfo,sMewMsgN
TruePassWord = Cl.Createpass(16)
ComeUrl = Trim(Request(\"ComeUrl\"))
if ComeUrl=\"\" then
ComeUrl=Trim(Request.ServerVariables(\"HTTP_REFERER\"))
if ComeUrl=\"\" then ComeUrl=\"free/index.asp\"
end if
ComeUrl=LCase(ComeUrl)
if instr(ComeUrl,\"reg\")>0 or instr(ComeUrl,\"User_\")>0 then ComeUrl=\"Index.asp\"
if instr(ComeUrl,\"login\")>0 or instr(ComeUrl,\"reg\")>0 or instr(ComeUrl,\"User_\")>0 then ComeUrl=\"Index.asp\"
\'If Cl.Web_Setting(39)=\"Yes\" Then
\'if Not Cl.CodeIsTrue(Request(\"CodeStr\"),\"GetCode\") then Call Cl.OutMsg(\"验证码校验失败。\",\"Login.Asp?ComeUrl=\" & ComeUrl)
\'end if
\'if UserName=\"\" or Password=\"\" then
\'Call Cl.OutMsg(\"用户名或密码或验证码不能为空!\",\"Login.Asp?ComeUrl=\" & ComeUrl)
\'end if
SQL=\"Select \" & Db.UserID & \",\" & Db.UserName & \",\" & Db.UserPassWord & \",\"&Db.UserReName&\",\" & Db.UserEmail & \",\" & Db.User** & \",\" & Db.Use**ce & \",\" & Db.Use**ceWidth & \",\" & Db.Use**ceHeight & \",\" & Db.UserIM & \",\" & Db.UserJoinDate & \",\" & Db.UserLastLogin & \",\" & Db.UserLogins & \",\" & Db.UserQuestion & \",\" & Db.UserAnswer & \",\" & Db.UserLastIP & \",\" & Db.UserDataNum & \",\" & Db.UserLevel & \",\" & Db.UserPoint & \",\" & Db.UserMoney & \",\" & Db.ChargeType & \",\" & Db.BeginDate & \",\" & Db.ValidNum & \",\" & Db.UserTPassWord & \",\" & Db.WaitReceive & \",\" & Db.Received & \",\" & Db.UserMsg & \" From \" & Db.UserTable & \" where \" & Db.UserLock & \"=0 and \" & Db.UserName & \"=\'\" & UserName & \"\'\"
Set RsLogin=Cl.Execute_U(SQL)
if RsLogin.bof and RsLogin.eof then
lc.returnmsg\"<p>主站登录失败,您可能还没有激活主站帐号!</p>\",\"div\",\"login_msg\",\"\"
RsLogin.close : set RsLogin=Nothing
Response.Cookies(\"cl_actived\")=\"False\"
Response.End
Exit Sub
End if
\'if Password<>RsLogin(2) then
\'RsLogin.close : set RsLogin=Nothing
\'Call Cl.OutMsg(\"用户名或密码错误!!!\",\"Login.Asp?ComeUrl=\" & ComeUrl)
\'End if
if RsLogin(17)=6 or RsLogin(17)=7 then
RsLogin.close : set RsLogin=Nothing
Response.Cookies(\"cl_actived\")=\"False\"
lc.returnmsg\"<p>你激活了主站的账号,但还没有通过管理员验证,暂时不能使用主站模块的功能。</p>\",\"div\",\"login_msg\",\"\"
Response.End
Exit Sub
End if
Set RsGroup=Cl.Execute(\"Select GroupName,GroupImg,LoginPoint,Purview,Purview_Other,arrClassView,arrClassInput,arrClassCheck,arrClassMaster From UserGroup Where ID=\"&RsLogin(17)&\"\")
if RsGroup.Bof and RsGroup.Eof then
lc.returnmsg\"<p>对不起,数据库中找不到您的用户组,请联系管理员解决。你的用户组ID为\"&RsLogin(17)&\"</p>\",\"div\",\"login_msg\",\"\"
\'ErrMsg=\"对不起,数据库中找不到您的用户组,请联系管理员解决。你的用户组ID为(\"&RsLogin(17)&\")!\"
RsLogin.close : Set RsLogin=Nothing
RsGroup.Close : Set RsGroup = Nothing
Response.End
Exit Sub
End if
sMewMsgN = Cl.newincept(UserName)
If sMewMsgN>0 Then
MsgInfo =sMewMsgN & \"||\" & Cl.inceptid(1,UserName) & \"||\" & Cl.inceptid(2,UserName)
Else
MsgInfo = \"0||0||null\"
End If
Cl.Execute_U(\"Update \" & Db.UserTable & \" Set \" & Db.UserMsg & \"=\'\"&Cl.CheckStr(MsgInfo)&\"\' Where \" & Db.UserID & \"=\"&Clng(RsLogin(0))&\"\")
if DateDiff(\"D\",RsLogin(11),Now)>0 then
\'添加积分
Cl.Execute_U(\"Update \" & Db.UserTable & \" Set \" & Db.UserLastIP & \"=\'\" & Cl.UserTrueIP & \"\',\" & Db.UserLastLogin & \"=\'\" & Now & \"\',\" & Db.UserLogins & \"=\" & Db.UserLogins & \"+1,\" & Db.UserPoint & \"=\" & Db.UserPoint & \"+\"&RsGroup(2)&\",\"&Db.UserTPassWord&\"=\'\"&TruePassWord&\"\' Where \"&Db.UserID&\"=\" & RsLogin(0) & \"\")
else
Cl.Execute_U(\"Update \" & Db.UserTable & \" Set \" & Db.UserLastIP & \"=\'\" & Cl.UserTrueIP & \"\',\" & Db.UserLastLogin & \"=\'\" & Now & \"\',\" & Db.UserLogins & \"=\" & Db.UserLogins & \"+1,\"&Db.UserTPassWord&\"=\'\"&TruePassWord&\"\' Where \"&Db.UserID&\"=\" & RsLogin(0) & \"\")
end if
if Cl.UserID=0 then
Set Count = New Cls_Count
Count.DelOnline 0, Cl.UserID, Session(Cl.CacheName & \"UserID\")(0)
Set Count = Nothing
end if
\'Response.Cookies(Cl.Web_Cookies).path = InstallDir
Response.Cookies(Cl.Web_Cookies)(\"UserID\")= RsLogin(0)
Response.Cookies(Cl.Web_Cookies)(\"UserName\") = UserName
Response.Cookies(Cl.Web_Cookies)(\"Password\") = PassWord
Response.Cookies(Cl.Web_Cookies)(\"TruePassWord\")= TruePassWord
Response.Cookies(Cl.Web_Cookies)(\"UserLevel\") = RsLogin(17)
Response.Cookies(\"cl_actived\")=\"True\"
Select Case CookieDate
Case 1 : Response.Cookies(Cl.Web_Cookies).Expires=Date+1
Case 2 : Response.Cookies(Cl.Web_Cookies).Expires=Date+31
Case 3 : Response.Cookies(Cl.Web_Cookies).Expires=Date+365
End Select
sValidDays=RsLogin(22)-DateDiff(\"D\",RsLogin(21),now())
if sValidDays<0 then sValidDays=0
sUserInfo = \"ClCMS@@@\"& Now & \"@@@\" & Now & \"@@@\" & Cl.ScriptName
For i=0 to 26
sUserInfo = sUserInfo & \"@@@\" & RsLogin(i)
Next
For i=0 to 8
sUserInfo = sUserInfo & \"@@@\" & RsGroup(i)
Next
sUserInfo = sUserInfo & \"@@@\" & sValidDays & \"@@@ClCMS\"
Cl.User_Info=Split(sUserInfo,\"@@@\")
Session(Cl.CacheName & \"UserID\") = Cl.User_Info
RsLogin.Close : Set RsLogin = Nothing
RsGroup.Close : Set RsGroup = Nothing
lc.returnmsg\"<p>主站登陆成功....</p>\",\"div\",\"login_msg\",\"\"
set lc=nothing
End Sub
Sub User_logout()
if Cl.UserID>0 then
Set Count = New Cls_Count
Count.DelOnline 1, Cl.UserID, 0
Set Count = Nothing
end if
Cl.EmptyCookies
Response.Cookies(\"cl_actived\") = \"\"
End sub
%> 帮你 顶上啊哈哈 你自己看下自己的问题,你发段代码而已,要改成什么,都没有个要求,汗一个 都没有个要求,汗一个 不知所云!~ 摸索着修改吧,你都不知道要改什么,朝那个方向修改,估计管理员也一头雾水 路过,了解一下。路过,了解一下。 路过,了解一下。
页:
[1]