?? inc_customer_action.asp
字號:
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.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 + -