个人网站与动网整合非官方方法(3)
发布时间:2009-07-05 18:42:00
六、后记
本次测试的论坛版本为Version 7.1.0 Sp1,未对其他版本做进行测试,大家有时间都可测下,望告知结果。凌晨五点了,睡觉先...
2008-06-09说明:
上边修改方法只对Dvbbs8.0(含8.0)以下版本有效,而对Dvbbs8.1(含8.1)以上版本,CheckUserLogin.asp需稍做修改:
程序代码
<%
Set Dvbbs = New Cls_Forum
%>
<!--#Include File="bbs/inc/Dv_ClsMain.asp"-->
<%
Function CheckUserLogin()
Dim UserSession
Const MsxmlVersion=".3.0"
Set UserSession=Server.CreateObject("msxml2.FreeThreadedDOMDocument"& MsxmlVersion)
If UserSession.loadxml(Session(Dvbbs.CacheName & "UserID")&"") Then
If UserSession.documentElement.selectSingleNode("userinfo/@userid").text<>"0" Then
'在论坛登录成功
CheckUserLogin = True
'下边是用户一些信息的获取方法,可自行将其保存于Cookies或Session中便于使用:
'用户ID : UserSession.documentElement.selectSingleNode("userinfo/@userid").text
'用户名 : UserSession.documentElement.selectSingleNode("userinfo/@username").text
'生日 : UserSession.documentElement.selectSingleNode("userinfo/@userbirthday").text
'电子邮箱 : UserSession.documentElement.selectSingleNode("userinfo/@useremail").text
'性别 : UserSession.documentElement.selectSingleNode("userinfo/@usersex").text '0为女,1为男
'注册时间 : UserSession.documentElement.selectSingleNode("userinfo/@joindate").text
'最后登录 : UserSession.documentElement.selectSingleNode("userinfo/@lastlogin").text
'登录次数 : UserSession.documentElement.selectSingleNode("userinfo/@userlogins").text
'金钱 : UserSession.documentElement.selectSingleNode("userinfo/@userwealth").text
'积分 : UserSession.documentElement.selectSingleNode("userinfo/@userep").text
'魅力 : UserSession.documentElement.selectSingleNode("userinfo/@usercp").text
'最后登录IP : UserSession.documentElement.selectSingleNode("userinfo/@userlastip").text
'浏览器类型 : UserSession.documentElement.selectSingleNode("agent/@browser").text
'浏览器版本 : UserSession.documentElement.selectSingleNode("agent/@version").text
'操作系统 : UserSession.documentElement.selectSingleNode("agent/@platform").text
'来访IP : UserSession.documentElement.selectSingleNode("agent/@ip").text
'举例应用:
Response.Cookies("username") = UserSession.documentElement.selectSingleNode("userinfo/@username").text
Response.Cookies("joindate") = UserSession.documentElement.selectSingleNode("userinfo/@joindate").text
If UserSession.documentElement.selectSingleNode("userinfo/@usersex").text="0" Then
Response.Cookies("sex") = "靓妹"
Else
Response.Cookies("sex") = "酷哥"
End if
Response.Cookies("lastlogin") = UserSession.documentElement.selectSingleNode("userinfo/@lastlogin").text
Response.Cookies("userlogins") = UserSession.documentElement.selectSingleNode("userinfo/@userlogins").text
Response.Cookies("browser") = UserSession.documentElement.selectSingleNode("agent/@browser").text
Response.Cookies("version") = UserSession.documentElement.selectSingleNode("agent/@version").text
Response.Cookies("platform") = UserSession.documentElement.selectSingleNode("agent/@platform").text
Else
'访问过论坛尚未登录,为来宾状态
CheckUserLogin = False
End if
Else
'未访问过论坛
CheckUserLogin = False
End if
Set UserSession = nothing
Set Dvbbs = nothing
End Function
%>


猜你喜欢
- 今天在测试php程序的时候,出现了一个错误提示:Cannot use a scalar value as an array,这个错误提示前几
- iconv函数库能够完成各种字符集间的转换,是php编程中不可缺少的基础函数库。 1、下载libiconv函数库http://ftp.gnu
- 在python中我们可以使用openCV给图片添加水印,这里注意openCV无法添加汉字水印,添加汉字水印上可使用PIL库给图片添加水印一:
- 先上代码,主要语句为np.where(b[c]==1),详细解释如下:import numpy as np b = np.array([[-
- 不知不觉大半年没更新了...前面小二介绍过使用Typora+MinIO+Java代码打造舒适写作环境,然后有很多大佬啊,说用Java来实现简
- php服务端与客户端交互、提供开放api时,通常需要对敏感的部分api数据传输进行数据加密,这时候rsa非对称加密就能派上用处了,下面通过一
- MyISAM 是MySQL中默认的存储引擎,一般来说不是有太多人关心这个东西。决定使用什么样的存储引擎是一个很tricky的事情,但是还是值
- 前言分析任何规模的数据的重要性怎么强调都不为过。 我们日常生活的几乎每个部分都是数据驱动的,作为开发人员,在构建任何合理大小的应用程序时,首
- 卡口转换率将数据导入hive,通过SparkSql编写sql,实现不同业务的数据计算实现,主要讲述车辆卡口转换率,卡口转化率:主要计算不同卡
- 本文实例讲述了Python定时任务sched模块用法。分享给大家供大家参考,具体如下:通过sched模块可以实现通过自定义时间,自定义函数,
- Asyncio 任务可以通过调用它们的 cancel() 方法来取消。我们可以通过将任务包装在对 asyncio.shield() 的调用中
- 可能不少学习javascript在使用call,apply,callee时会感到困惑,以下希望对于你有所帮助:1、它是函数的方法或属性;2、
- windows系统下安装Pyinstallercmd下输入指令pip install PyInstallerPyinstaller的使用进入
- 一 distinct含义:distinct用来查询不重复记录的条数,即distinct来返回不重复字段的条数(count(distinct
- 1,flask中内置的过滤器模板中常用方法:{#过滤器调用方式{{变量|过滤器名称}} #} <!-- safe过滤器,可
- 大家知道,我们经常在linux或者windows需要用到mysql数据库,但是我们经常会犯一种特别低级的小错误,小编也时常会犯的错误,突然就
- 前言: 有时候,一个数据库有多个帐号,包括数据库管理员,开发人员,运维支撑人员等,可能有很多帐号都有比较大的权限,例如DDL操作权限(创建,
- 注意:列转行的方法可能是我独创的了,呵呵,因为在网上找不到哦,全部是我自己写的,用到了系统的SysColumns(一)行转列的方法先说说行转
- 各大著名厂家、公司的banner广告设计欣赏,尺寸468x60,gif格式!有acer,阿尔卡特,AMD,中国电信,爱立信,Greatwal
- Javascript 正常取来源网页的URL只要用: document.referrer就可以了!但,如果来源页是Jav