如何判断oblog4.X中用户是否登陆,以及获取登陆后的信息。
发布网友
发布时间:2024-07-22 08:56
我来回答
共2个回答
热心网友
时间:2024-08-11 17:26
与登陆有关的代码
不知道怎么用
class_sys.asp关于判断登陆的代码,但是不知道怎么应用到自己的程序中去。
Public Function CheckUserLogined()
On Error Resume Next
Dim Logined, rsLogin, sqlLogin, sSql, user_info ,tLogined ,i
Logined = True
l_uName = filt_badstr(DecodeCookie(request.Cookies(cookies_name)("username")))
l_uPass = filt_badstr(DecodeCookie(request.Cookies(cookies_name)("password")))
If l_uName = "" Then
Logined = False
End If
If l_uPass = "" Then
Logined = False
End If
sSql = "userid,user_level,user_showlogword_num,user_upfiles_max,user_upfiles_size,user_dir,isubbedit,user_domain,"
sSql = sSql &"user_domainroot,lockuser,user_folder,adddate,user_info,user_Icon1,user_Icon2,user_group,lastcomment,"
sSql = sSql &"lastmessage,scores,Nickname,comment_count,message_count,newbie,lastlogintime,log_count,user_siterefu_num" & str_domain
If Logined = True Then
If Session ("CheckUserLogined") = "" Then
'除了str_domain,0-25列
sqlLogin = "select " & sSql & " from oblog_user where lockuser=0 and Username='" & l_uName & "' and Password='" & l_uPass & "' And isdel=0 "
Set rsLogin = Execute(sqlLogin)
If rsLogin.EOF Then
CheckUserLogined = False
Exit Function
Else
If rsLogin(9) = 1 Then
Set rsLogin = Nothing
adderrstr ("当前用户已被系统锁定,无法进行操作,请联系管理员!")
showerr
End If
For i = 0 To 25
tLogined = tLogined & "$$$" & rsLogin(i)
Next
tLogined = Replace (tLogined,"$$$","",1,1,0)
' tLogined = Right (tLogined,Len(tLogined)-3)
If str_domain <> "" Then tLogined = tLogined & "$$$" &rsLogin("custom_domain")
Session ("CheckUserLogined") = tLogined
End If
End If
tLogined = Session ("CheckUserLogined")
tLogined = Split (tLogined,"$$$")
' Response.Write tLogined(18)
' Response.Write tLogined(19)
' Response.Write tLogined(20)
' Response.Write UBound(tLogined)
If UBound(tLogined) > 26 Or UBound(tLogined) = -1 Then
Session ("CheckUserLogined") = ""
Response.Redirect (blogurl & "login.asp")
Exit Function
End if
l_uId = Int(tLogined(0))
l_ulevel = Int(tLogined(1))
l_uShowlogWord = Int(tLogined(2))
l_uDir = tLogined(5)
l_isUbb = Int(tLogined(6))
l_uDomain = tLogined(7) & "." & tLogined(8)
l_uFolder = tLogined(10)
l_uGroupId=Int(tLogined(15))
l_uUpUsed=Int(tLogined(4))
l_uLastComment=tLogined(16)
l_uLastMessage=tLogined(17)
l_uScores=Int(tLogined(18))
l_uNickname=tLogined(19)
l_uCommentCount=Int(tLogined(20))
l_uMessageCount=Int(tLogined(21))
If l_uNickname="" Then l_uNickname=l_uName
If InStr(tLogined(11), "$") Then
user_info = Split(tLogined(11), "$")
l_uFrame = user_info(1)
Else
l_uFrame = 1
End If
If true_domain = 1 Then
'判断用户绑定的顶级域名
l_ucustomdomain = tLogined(26)
If l_ucustomdomain <> "" Then
l_uDomain = l_ucustomdomain
End If
End If
l_uNewBie=Int(tLogined(22))
l_uIco=ProIco(tLogined(13), 1)
l_uLastLogin=tLogined(23)
l_ulogcount=Int(tLogined(24))
l_uvisitcount=Int(tLogined(25))
l_uAddtime=tLogined(11)
If IsNumeric(l_uGroupId) Then
'获得组信息
GetGroupInfo
'判断
Set rsLogin=Execute("Select top 1 groupid,g_points,g_autoupdate From oblog_groups Where g_level>" & l_Group(2,0) & " Order By g_level")
If Not rsLogin.Eof Then
If rsLogin("g_autoupdate")=1 Then
'判断是否需要升级
If l_uScores>=Int(rsLogin(1)) Then
Execute ("update oblog_groups set g_members=g_members-1 WHERE groupid = " &l_uGroupId)
Execute ("Update oblog_user Set user_group=" & rsLogin(0) & " Where userid=" & l_uid)
Execute ("update oblog_groups set g_members=g_members+1 WHERE groupid = " &rsLogin(0))
Call GetGroupInfo
'用户升级后需重新载入Session
Session ("CheckUserLogined") = ""
End If
End If
End If
End If
Set rsLogin = Nothing
End If
If Err Then
Err.Clear
Session ("CheckUserLogined") = ""
Logined = False
Response.Redirect (blogurl & "login.asp")
End if
CheckUserLogined = Logined
End Function
热心网友
时间:2024-08-11 17:24
用户登录应该是用的cookie吧 我对oblog系统不熟悉 或者有可能用session来存储
你把用户博客的主页代码贴上来
如何判断oblog4.X中用户是否登陆,以及获取登陆后的信息。
Public Function CheckUserLogined()On Error Resume Next Dim Logined, rsLogin, sqlLogin, sSql, user_info ,tLogined ,i Logined = True l_uName = filt_badstr(DecodeCookie(request.Cookies(cookies_name)("username")))l_uPass = filt_badstr(DecodeCookie(request.Cookies(cookies_name)...
还在找api提取?
作为上海圣钧信息科技有限公司的工作人员,我非常理解您对于快速、高效地提取API的需求。随着数字化趋势的不断发展,API已经成为企业之间、应用程序之间的桥梁,为数据的交换和整合提供了便利。如果您正在寻找API提取服务,我们推荐使用官方的API平台或者专业的API接口管理工具。这些平台通常提供完善的文档和开发者指南,可以帮助您快速上手并高效地使用API。同时,这些平台还具备安全性和稳定性,确保您的数据安全可靠。当然,如果您需要更具体的指导或帮助,欢迎随时联系我们的技术支持团队。我们会为您提供专业的咨询和技术支持,帮助您顺利完成…SmartProxy企业级海外住宅IP代理服务商,覆盖全球200+国家和地区,高匿稳定,动态住宅代理/静态住宅代理/账密提取,100%原生住宅IP,城市级定位,支持HTTP/HTTPS/SOCKS5协议,不限带宽,纯净高匿,网络集成更快捷,注册即送流量!Smartproxy代理...
如何开通校信通中的家校互动?
1、先给网上输入校信通三个字,确认一下,打开校信通网页。2、首先注册一下,填写下个人的信息,孩子的学校,家长联系方式,成为校信通一员。3、注册后,输入账号,密码,点击登录。4、作为老师,登录后,点击网页上那一栏里的家校互动,然后点击班级管理。5、通过添加家长的个人信息来通知家长,当家长收...