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

📄 inc_customer_action.asp

📁 学习管理 校友录有关的系统 本人学习的结果 与大家共享
💻 ASP
📖 第 1 页 / 共 2 页
字号:
		ParseAction = False		'== 不存在该权限
		Exit Function
	Else
		strTmp = Replace(strTmp,"|||","")
		strTmp = Replace(strTmp,strNowAction,"")
		arrTmp = Split(strTmp,"|")
		strActionName = arrTmp(1)
		strActionFile = arrTmp(2)
		intActionType = arrTmp(3)
	End If

	ParseAction = True
End Function


'===================================================================
'= Function    : ParseActionNoAuth
'= Time        : Created At 2006-5-4
'= Input       : None
'= Description : 解析非权限校验权限字符串
'===================================================================
Function ParseActionNoAuth(strNowAction,ByRef strActionName,ByRef intActionType,ByRef strActionFile)
	Dim objReg,Matches,strTmp,arrTmp,Item
	Dim strActionStr	'== 目前的权限校验字符串

	strActionStr = GBL_strUserActionNoAuth & "|||"

	Set objReg = new RegExp			' 建立正则表达式
	objReg.IgnoreCase = true		' 忽略大小写
	objReg.Global	= false			' 设置全局可用

	objReg.Pattern = "\|\|\|" & strNowAction & "(.|\n)*?\|\|\|"
	Set Matches = objReg.Execute(strActionStr)
	strTmp = ""
	For Each Item in Matches
		strTmp = strTmp & Item.Value
	Next
	
	Set objReg = Nothing
	Set Matches = Nothing
	Set Item = Nothing

	If Trim(strTmp) = "" Then
		ParseActionNoAuth = False		'== 不存在该权限
		Exit Function
	Else
		strTmp = Replace(strTmp,"|||","")
		strTmp = Replace(strTmp,strNowAction,"")
		arrTmp = Split(strTmp,"|")
		strActionName = arrTmp(1)
		strActionFile = arrTmp(2)
		intActionType = arrTmp(3)
	End If

	ParseActionNoAuth = True
End Function

'=====================================================================
'= Function     : GetNowOnline()
'= Time		    : Created At 2006-5-3
'= Input        : None
'= Description  : 统计用户在线情况
'=====================================================================
Function GetNowOnline()

	Exit Function 

	Dim clsTable
	Dim intOnline			'== now online all
	Dim intOnlineUser		'== now online user
	Dim intOnlineGuest		'== now online guest
	Dim strGetIp,intSessionId

	If GBL_intHomeViewCount = 1 And CONST_PAGE_FILE <> "/index1.asp" Then
		GetNowOnline = True
		Exit Function
	End If

	GBL_objPubDB.Clear()
	GBL_objPubDB.TableName = "CLASS_ONLINE"
	GBL_objPubDB.SQLType = "DELETE"
	If CONST_DB_TYPE = 1 Or CONST_DB_TYPE = 2 Then
		GBL_objPubDB.Where = "ONLINE_ACTIVE_TIME<'" & Cstr(DateAdd("n",-20,Now())) & "' "
	Else
		GBL_objPubDB.Where = "ONLINE_ACTIVE_TIME<#" & Cstr(DateAdd("n",-20,Now())) & "# "
	End If
	If Not GBL_objPubDB.SQLExecute() Then
		GetNowOnline = False
		Exit Function
	End If

	GBL_objPubDB.Clear()
	GBL_objPubDB.TableName = "CLASS_ONLINE"
	GBL_objPubDB.SQLType = "SELECT"
	GBL_objPubDB.Where = "ONLINE_SESSION_ID=" & Session.SessionId
	GBL_objPubDB.AddField "*",""
	If Not GBL_objPubDB.SQLRSExecute() Then
		GetNowOnline = False
		Exit Function
	End If

	If GBL_objPubDB.intRSNum = 0 Then

		GBL_objPubDB.Clear()
		GBL_objPubDB.TableName = "CLASS_ONLINE"
		GBL_objPubDB.SQLType = "INSERT"
		GBL_objPubDB.AddField "ONLINE_USER","guest"
		GBL_objPubDB.AddField "ONLINE_LOGIN_TIME",Now()
		GBL_objPubDB.AddField "ONLINE_USER_AUTHEN",3
		GBL_objPubDB.AddField "ONLINE_SESSION_ID",Session.SessionId
		GBL_objPubDB.AddField "ONLINE_ACTIVE_TIME",Now()
		If Not GBL_objPubDB.SQLExecute() Then
			GetNowOnline = False
			Exit Function
		End If

	Else

		intSessionId = GBL_objPubDB.objPubRS("ONLINE_SESSION_ID")
		GBL_objPubDB.Clear()
		GBL_objPubDB.TableName = "CLASS_ONLINE"
		GBL_objPubDB.SQLType = "UPDATE"
		GBL_objPubDB.Where = "ONLINE_SESSION_ID=" & intSessionId
		If Session(GBL_strCookieURL & "SEN_strUserRealName") = "" Or IsNull(Session(GBL_strCookieURL & "SEN_strUserRealName")) Then
			GBL_objPubDB.AddField "ONLINE_USER","guest"
			GBL_objPubDB.AddField "ONLINE_USER_AUTHEN",3
		Else
			GBL_objPubDB.AddField "ONLINE_USER",Session(GBL_strCookieURL & "SEN_strUserRealName")
			GBL_objPubDB.AddField "ONLINE_USER_AUTHEN",0
			GBL_objPubDB.AddField "ONLINE_USER_ID",GBL_intUserId
		End If
		GBL_objPubDB.AddField "ONLINE_ACTIVE_TIME",Now()
		If Not GBL_objPubDB.SQLExecute() Then
			GetNowOnline = False
			Exit Function
		End If

	End If

	GetNowOnline = True
End Function

'===================================================================
'= Function    : ViewCount 
'= Time		   : Created At 2006-5-3
'= Input       : strPageName : the count page name 
'= Description : 统计每页访问情况
'===================================================================
Function ViewCount()

	Dim strUserIp
	Dim intMonth,intDay,intTotal
	Dim intLastMonth,intLastDay

	'== 是否只能首页统计访问量
	If  GBL_intHomeViewCount = 0 AND CONST_PAGE_FILE <> "/index1.asp" Then
		ViewCount = True
		Exit Function
	End If

	GBL_objPubDB.Clear()
	GBL_objPubDB.TableName = "CLASS_COUNT"
	GBL_objPubDB.SQLType = "SELECT"
	GBL_objPubDB.Where = "COUNT_PAGE_NAME='" & CONST_PAGE_FILE & "' AND COUNT_POST_NAME='" & CONST_ACTION_FUNC & "'"
	GBL_objPubDB.AddField "COUNT_ID",""
	If Not GBL_objPubDB.SQLRSExecute() Then
		ViewCount = False
		Exit Function
	End If
	If GBL_objPubDB.intRSNum <> 1 Then

		'== delete all record
		GBL_objPubDB.Clear()
		GBL_objPubDB.TableName = "CLASS_COUNT"
		GBL_objPubDB.SQLType = "DELETE"
		GBL_objPubDB.Where = "COUNT_PAGE_NAME='" & CONST_PAGE_FILE & "' AND COUNT_POST_NAME='" & CONST_ACTION_FUNC & "'"
		If Not GBL_objPubDB.SQLExecute() Then
			ViewCount = False
			Exit Function
		End If

		'== insert a new formatted record
		GBL_objPubDB.Clear()
		GBL_objPubDB.TableName = "CLASS_COUNT"
		GBL_objPubDB.SQLType = "INSERT"
		GBL_objPubDB.AddField "COUNT_PAGE_NAME",CONST_PAGE_FILE
		GBL_objPubDB.AddField "COUNT_POST_NAME",CONST_ACTION_FUNC
		If Not GBL_objPubDB.SQLExecute() Then
			ViewCount = False
			Exit Function
		End If
	End If

	GBL_objPubDB.Clear()
	GBL_objPubDB.TableName = "CLASS_COUNT"
	GBL_objPubDB.SQLType = "SELECT"
	GBL_objPubDB.AddField "*",""
	GBL_objPubDB.Where = "COUNT_PAGE_NAME='" & CONST_PAGE_FILE & "' AND COUNT_POST_NAME='" & CONST_ACTION_FUNC & "'"
	If Not GBL_objPubDB.SQLRSExecute() Then
		ViewCount = False
		Exit Function
	End If
	
	If GBL_objPubDB.intRSNum > 0 Then
		intLastMonth = GBL_objPubDB.objPubRS("COUNT_LAST_MONTH")
		intLastDay = GBL_objPubDB.objPubRS("COUNT_LAST_DAY")
		intMonth = GBL_objPubDB.objPubRS("COUNT_MONTH")
		intDay = GBL_objPubDB.objPubRS("COUNT_DAY")
		intTotal = GBL_objPubDB.objPubRS("COUNT_TOTAL_VIEW")
		
		'== set show value of view count and begin time
		GBL_intHomeCount = intTotal
		GBL_intHomeLastViewCount = intLastDay
		GBL_intHomeTodayViewCount = intDay
		GBL_strHomeViewBegin = GBL_objPubDB.objPubRS("COUNT_ADD_TIME")

		If Cstr(Month(GBL_objPubDB.objPubRS("COUNT_LAST_TIME"))) <> Cstr(Month(Date())) Then
			intLastMonth = GBL_objPubDB.objPubRS("COUNT_MONTH")
			intMonth = 1
		Else
			If Cstr(Day(GBL_objPubDB.objPubRS("COUNT_LAST_TIME"))) <> Cstr(Day(Date())) Then
				intLastDay = GBL_objPubDB.objPubRS("COUNT_DAY")
				intDay = 1
			End If
		End If

		GBL_objPubDB.Clear()
		GBL_objPubDB.TableName = "CLASS_COUNT"
		GBL_objPubDB.SQLType = "UPDATE"
		GBL_objPubDB.Where = "COUNT_PAGE_NAME='" & CONST_PAGE_FILE & "' AND COUNT_POST_NAME='" & CONST_ACTION_FUNC & "'"
		GBL_objPubDB.AddField "COUNT_TOTAL_VIEW",intTotal + 1
		GBL_objPubDB.AddField "COUNT_DAY",intDay + 1
		GBL_objPubDB.AddField "COUNT_MONTH",intMonth + 1
		GBL_objPubDB.AddField "COUNT_LAST_TIME",Now()
		GBL_objPubDB.AddField "COUNT_LAST_MONTH",intLastMonth
		GBL_objPubDB.AddField "COUNT_LAST_DAY",intLastDay
		If Not GBL_objPubDB.SQLExecute() Then
			ViewCount = False
			Exit Function
		End If
	End If
		
	ViewCount = True
End Function

%>

⌨️ 快捷键说明

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