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

📄 admin_access.asp

📁 1] 校友多种方式注册认证[直接注册,答问注册,认证注册] 2] 校友论坛 小巧而实用的论坛,支持UBB标签,快速回复,帖子搜索,灵活的将帖子置顶,设置精华 3] 校友相册 相片上传[方便上传
💻 ASP
📖 第 1 页 / 共 2 页
字号:
	clsPubDB.AddField "ACCESS_ACTION_TYPE",intAction
	clsPubDB.AddField "ACCESS_TYPE",intType
	clsPubDB.AddField "ACCESS_CONTENT",strContent
	clsPubDB.AddField "ACCESS_DESC",strDesc
	clsPubDB.SQLRSExecute()
	Call ResultExecute(clsPubDB.intErrNum,"add access","ES_ERR")

	Set clsPubDB = Nothing

	Response.Redirect "admin_access.asp?action=ShowAccessAdmin"

End Sub
'=============== End of Sub FormSaveAccessAdmin() ===================
'===================================================================
'= Sub         : MdySaveAccessAdmin()
'= Time		   : Created At Jun,27,2004
'= Input       : None

'= Called by   : 
'= Calls       : 
'= Description : access ip
'===================================================================
Sub MdySaveAccessAdmin()

	Dim intAction,intType,strContent,strDesc

	GetRSId = Trim(Request.QueryString("AccessId"))
	If Not IsNumeric(GetRSId) Then
		Call ResultExecute(E_USER_PUB,"access id错误","ES_ERR")
	End If

	intAction = Trim(Request.Form("selActionType"))
	strAddInfo = "类型"
	intErrId = DataCheck("DT_ENUM",intAction,strAddInfo,"0,1")
	Call ResultExecute(intErrId,strAddInfo,"ES_ERR")

	strContent = Trim(Request.Form("iptContent"))
	strAddInfo = "IP/用户对象"
	intErrId = DataCheck("DT_FIX_LENGTH",strContent,strAddInfo,"1|DTC_LESS_MORE_LEN|50|")
	Call ResultExecute(intErrId,strAddInfo,"ES_ERR")

	intType = Trim(Request.Form("selType"))
	strAddInfo = "Access类型"
	intErrId = DataCheck("DT_ENUM",intType,strAddInfo,"0,1")
	Call ResultExecute(intErrId,strAddInfo,"ES_ERR")

	strDesc = Trim(Request.Form("iptDesc"))
	strAddInfo = "备注"
	intErrId = DataCheck("DT_FIX_LENGTH",strDesc,strAddInfo,"0|DTC_LESS_MORE_LEN|50|")
	Call ResultExecute(intErrId,strAddInfo,"ES_ERR")

	clsPubDB.Clear()
	clsPubDB.TableName = "CLASS_ACCESS"
	clsPubDB.SQLType = "UPDATE"
	clsPubDB.AddField "ACCESS_ACTION_TYPE",intAction
	clsPubDB.AddField "ACCESS_TYPE",intType
	clsPubDB.AddField "ACCESS_CONTENT",strContent
	clsPubDB.AddField "ACCESS_DESC",strDesc
	clsPubDB.Where = "ACCESS_ID=" & GetRSId
	clsPubDB.SQLRSExecute()
	Call ResultExecute(clsPubDB.intErrNum,"add access","ES_ERR")

	Set clsPubDB = Nothing

	Response.Redirect "admin_access.asp?action=ShowAccessAdmin"

End Sub
'=============== End of Sub MdySaveAccessAdmin() ===================
'===================================================================
'= Sub		    : ShowContentAccessAdmin(objRSCont,intMaxPerPage,intPageNow)  
'= Time		    : Created At Jun,27,2004
'= Input        : objRSCont		 : db record 
'=				  intMaxPerPage  : max show number in a page
'=				  intPageNow	 : now page 
'= Output       : None
'= Called by    : 
'= Calls        : None
'= Table        : _ACCESS
'= Description  : Show access list by page
'===================================================================
Sub ShowContentAccessAdmin(objRSCont,intMaxPerPage,intPageNow)

	Dim i
	Dim clsTable			'== the object of table
	Dim strTdClass			'== td's css
	Dim strHtmlCode
	Dim intActiveType
	Dim intUpTopStatus
	Dim strTopBoardClew
	
	Set clsTable = New classTable

	'== Set table prameters
	clsTable.Border = "0"
	clsTable.CellPadding = "2"
	clsTable.CellSpacing = "1"
	clsTable.Width = "96%"
	clsTable.ClassType = GBL_cssListTable
	clsTable.Align = "center"

	clsTable.PostFile = "admin_access.asp?action=ShowAcessAdmin&pstAddType="
	clsTable.MakeTable()

	i = 0
	'== Set table header
	clsTable.AddTitleTr GBL_cssListTitleTr
	clsTable.AddTitleTd "ID",GBL_cssListTitleTd,"5%"
	clsTable.AddTitleTd "用户类型",GBL_cssListTitleTd,"16%"
	clsTable.AddTitleTd "Acess类型",GBL_cssListTitleTd,"16%"
	clsTable.AddTitleTd "IP/用户对象",GBL_cssListTitleTd,"31%"
	clsTable.AddTitleTd "备注",GBL_cssListTitleTd,"15%"
	clsTable.AddTitleTd "操作",GBL_cssListTitleTd,"*"

	Do While Not objRSCont.Eof

		i = i + 1
			
		'== Get type
		intActiveType = objRSCont("ACCESS_ACTION_TYPE")
		Select Case intActiveType
			Case	1 :
					strActiveType = "IP段(精确)"
			Case	2 :
					strActiveType = "IP段(D)"
			Case	0 :
					strActiveType = "用户"
		End Select

		intType = objRSCont("ACCESS_TYPE")
		Select Case intType
			Case	1 :
					strType = "禁止登陆"
			Case	0 :
					strType = "禁止发言"
		End Select

		If (i Mod 2) = 0 Then 
			strTdClass = GBL_cssListTd1
		Else
			strTdClass = GBL_cssListTd2
		End If	
		
		clsTable.AddTr GBL_cssListTr1
		clsTable.AddTd objRSCont("ACCESS_ID"),strTdClass
		clsTable.AddTd strActiveType,strTdClass
		clsTable.AddTd strType,strTdClass
		clsTable.AddTd objRSCont("ACCESS_CONTENT"),strTdClass
		clsTable.AddTd objRSCont("ACCESS_DESC"),strTdClass
		clsTable.AddTd "<a href=""admin_access.asp?action=DelAccessAdmin&AccessId=" & objRSCont("ACCESS_ID") & """ onclick=""return confirm('确认删除?');"">[删除]</a><a href=""admin_access.asp?action=MdyAccessAdmin&AccessId=" & objRSCont("ACCESS_ID") & """>[修改]</a>",strTdClass
		
		If i >= intMaxPerPage Then Exit Do
			objRSCont.MoveNext
		
	Loop

	Response.Write "<br>"
	clsTable.OutPutTable()
	Response.Write "<br>"
	Set clsTable = Nothing
	
End Sub
'============== End of ShowContentAccessAdmin() =====================
'===================================================================
'= Sub	       : ShowAcessAdmin()
'= Time		   : Created At Jun,27,2004
'= Input       : None

'= Called by   :
'= Calls       :
'= Table	   : Qurey _ACCESS
'= Description : 
'===================================================================
Sub ShowAccessAdmin()

	Dim strFileName 
	Dim intMaxPerPage
	Dim strHtmlCode
	Dim intCurPage,intTotalPut
	Dim i
	Dim intClass

	intMaxPerPage = GBL_intMaxPerAdmin
	If Not IsEmpty(Request("intPageNow")) Then
		intCurPage = Cint(Request("intPageNow"))
	Else
		intCurPage = 1
	End If
	
	clsPubDB.Clear()
	clsPubDB.TableName = "CLASS_ACCESS"
	clsPubDB.SQLType = "SELECT"
	clsPubDB.Order = "ACCESS_ID DESC"
	clsPubDB.AddField "*",""

	'== check the class user come from
	strQuery = Trim(Request("pstAddType"))
	If strQuery <> "" Then
		clsPubDB.Order = strQuery & " DESC"
		strFileName = "admin_board.asp?action=ShowAcessAdmin&pstAddType=" & strQuery
	Else
		strFileName = "admin_board.asp?action=ShowAcessAdmin"
	End If
	
	'== Get data
	clsPubDB.SQLRSExecute()
	Call ResultExecute(clsPubDB.intErrNum,"","ES_ERR")
	If Not ResultExecute(clsPubDB.intRSNum,"访问列表","ES_DB_NO") Then

		intTotalPut =  clsPubDB.intRSNum
		If intCurPage < 1 then
			  intCurPage = 1
		End If

		If (intCurPage - 1) * intMaxPerPage > intTotalPut Then
			If (intTotalPut Mod intMaxPerPage) = 0 Then
				intCurPage = intTotalPut \ intMaxPerPage
			Else
				intCurPage = intTotalPut \ intMaxPerPage + 1
			End If
		End if

		If intCurPage = 1 Then
			Call ShowContentAccessAdmin(clsPubDB.objPubRS,intMaxPerPage,intCurPage)
			Call ShowPage(intTotalPut,intMaxPerPage,intCurPage,strFileName)
		Else
			If (intCurPage - 1) * intMaxPerPage < intTotalPut Then
				clsPubDB.objPubRS.Move  (intCurPage - 1) * intMaxPerPage
				Dim BookMark
				BookMark = clsPubDB.objPubRS.BookMark
				Call ShowContentAccessAdmin(clsPubDB.objPubRS,intMaxPerPage,intCurPage)
				Call ShowPage(intTotalPut,intMaxPerPage,intCurPage,strFileName)
			Else
				intCurPage = 1
				Call ShowContentAccessAdmin(clsPubDB.objPubRS,intMaxPerPage,intCurPage)
				Call ShowPage(intTotalPut,intMaxPerPage,intCurPage,strFileName)
			End If

		End If

	End If

End Sub
'=============== End of Sub ShowAcessAdmin() =======================
'=============== FUNCTION BODY END =================================
%>

⌨️ 快捷键说明

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