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

📄 admin_article.asp

📁 1] 校友多种方式注册认证[直接注册,答问注册,认证注册] 2] 校友论坛 小巧而实用的论坛,支持UBB标签,快速回复,帖子搜索,灵活的将帖子置顶,设置精华 3] 校友相册 相片上传[方便上传
💻 ASP
📖 第 1 页 / 共 3 页
字号:
	Dim clsTbClass
	Dim strTmp,strType

	i = 0
	Set clsTable = New classTable
	'== Set table prameters
	clsTable.Border = "0"
	clsTable.CellPadding = "3"
	clsTable.CellSpacing = "1"
	clsTable.Width = "95%"
	clsTable.ClassType = GBL_cssListTable
	clsTable.Align = "center"
	clsTable.MakeTable()

	clsTable.AddTitleTr strTbClass
	clsTable.AddTitleTd "类 型","CSS_TD_CENTER2","13%"

	clsTable.AddTitleTd "主  题","CSS_TD_CENTER2","40%"
	clsTable.AddTitleTd "浏览","CSS_TD_CENTER2","8%"
	clsTable.AddTitleTd "排序号","CSS_TD_CENTER2","8%"

	clsTable.AddTitleTd "加入","CSS_TD_CENTER2",""
	If GBL_strUserAccount = "admin" Then
		clsTable.AddTitleTd "操 作","CSS_TD_CENTER2",""
	End If

	Do While Not objRSCont.Eof

		If (i Mod 2) = 0 Then 
			strTbClass = "CSS_TD_CENTER1"
		Else
			strTbClass = "CSS_TD_CENTER2"
		End If

		clsTable.AddTr strTbClass
		clsTable.AddTd objRSCont("ARTICLE_SORT_NAME"),""

		strHtmlCode = MakeLink("admin/admin_article.asp?action=ShowArticle&ListId="&objRSCont("LIST_ID"),objRSCont("LIST_TITLE"),"阅读该文章")
		clsTable.AddTd " " & strHtmlCode,"CSS_TD_LEFT3"
		clsTable.AddTd objRSCont("LIST_HITS"),""
		clsTable.AddTd objRSCont("LIST_ORDER"),""

		clsTable.AddTd TimeFormat(objRSCont("LIST_ADD_TIME"),"YYMMDD"),""

		If GBL_strUserAuthen = 1 Then
			strHtmlCode = MakeLinkClew("admin/admin_article.asp?action=DelList&ListId=" & objRSCont("LIST_ID"),"[删除]","删除该文章"," onclick=""return confirm('您确认删除该文章?');""")
			strHtmlCode = strHtmlCode & " " & MakeLink("admin/admin_article.asp?action=FormAddList&ListId=" & objRSCont("LIST_ID") & "&pstActFlag=LIST_EDIT","[编辑]","编辑该文章")
			clsTable.AddTd strHtmlCode,""
		End If

		i = i + 1
		If i >= intMaxPerPage Then Exit Do
			objRSCont.MoveNext
	Loop

	clsTable.AddInfoTr "CSS_TD_TITLE1","TOP"
	clsTable.AddInfoTd "文 章 列 表",GBL_cssListTitleTd

	clsTable.OutPutTable()
	clsTable.Clear()
	Set clsTable = Nothing

End Sub 
'============== End of Sub ShowContent() ===========================
'====================================================================
'= Sub         : ShowArticle()
'= Time        : Created At May,17,2003
'= Input       : 

'= Called by   : 
'= Calls       : None
'= Table       : Query CLASS_LIST
'= Description : Show per page's list
'===================================================================
Sub ShowArticle()

	Dim GetRSId,strAddInfo,intErrId

	GetRSId = Trim(Request.QueryString("ListId"))
	strAddInfo = "该文章"
	intErrId = DataCheck("DT_ID",GetRSId,strAddInfo,"ES_ERR")
	Call ResultExecute(intErrId,strAddInfo,"ES_ERR")

	clsPubDB.Clear()
	clsPubDB.TableName = "CLASS_LIST"
	clsPubDB.SQLType = "SELECT"
	clsPubDB.AddField "*",""
	clsPubDB.Where = "LIST_ID=" & GetRSId
	clsPubDB.SQLRSExecute()
	Call ResultExecute(clsPubDB.intErrNum,"show article","ES_ERR")
	If Not ResultExecute(clsPubDB.intRSNum,"该文章","ES_DB_NO") Then

		Set clsTable = New classTable
		'== Set table prameters
		clsTable.Border = "0"
		clsTable.CellPadding = "3"
		clsTable.CellSpacing = "1"
		clsTable.Width = "95%"
		clsTable.ClassType = GBL_cssListTable
		clsTable.Align = "center"
		clsTable.MakeTable()

		clsTable.AddTitleTr ""
		clsTable.AddTitleTd clsPubDB.objPubRS("LIST_TITLE"),GBL_cssListTitleTd,"100%"

		clsTable.AddTr ""
		clsTable.AddTd ubbcode(clsPubDB.objPubRS("LIST_CONTENT")),"CSS_TD_LEFT2"

		If GBL_strUserAuthen = 1 Then
			strHtmlCode = MakeLinkClew("admin/admin_article.asp?action=DelList&ListId=" & clsPubDB.objPubRS("LIST_ID"),"[删除]","删除该文章"," onclick=""return confirm('您确认删除该文章?');""")
			strHtmlCode = strHtmlCode & " " & MakeLink("admin/admin_article.asp?action=FormAddList&ListId=" & clsPubDB.objPubRS("LIST_ID") & "&pstActFlag=LIST_EDIT","[编辑]","编辑该文章")
		End If

		clsTable.AddTr ""
		clsTable.AddTd strHtmlCode & " 加入时间:" & clsPubDB.objPubRS("LIST_ADD_TIME") & "  浏览:" & clsPubDB.objPubRS("LIST_HITS") & "次","CSS_TD_RIGHT2"

		If clsPubDB.objPubRS("LIST_TYPE") = 7 Then
			clsTable.AddTr ""
			strHtmlCode = MakeLink("list/index.asp?action=SoftDown&ListId=" & clsPubDB.objPubRS("LIST_ID") & "&pstDownUrl=" & clsPubDB.objPubRS("LIST_ADD1"),"目前共下载" & clsPubDB.objPubRS("LIST_ADD4") & "次(点击下载该软件)","点击下载该软件")
			clsTable.AddTd strHtmlCode,"CSS_TD_RIGHT2"
		End If


		clsTable.OutPutTable()
		clsTable.Clear()
		Set clsTable = Nothing

	End If

End Sub
'===================================================================
'= Sub         : ShowList()
'= Time		   : Created At June,8,2003
'= Input       : None

'= Called By   : ShowFuncSwitch()
'= Calls	   : ShowPage(),ShowContent(),
'= Table       : Query CLASS_LIST
'= Description : 
'===================================================================
Sub ShowList()

	Dim strFileName						'== The file post
	Dim strHtmlCode
	Dim intCurPage,intTotalPut
	Dim intMaxPerPage					'== per page board
	Dim i,strAddType,intErrId

	strArticleSortSlt = ArticleSortSlt()

	strAddType = Trim(Request.QueryString("pstAddType"))

	strFileName = "admin_article.asp?action=ShowList&pstAddType=" & strAddType

	'== Get page code
	intMaxPerPage = 15
	If Not IsEmpty(Request("intPageNow")) Then
		intCurPage = Cint(Request("intPageNow"))
	Else
		intCurPage = 1
	End If

	clsPubDB.Clear()
	If strAddType <> "" Then
		strWhere = " AND LIST_TYPE=" & strAddType
	Else
		strWhere = ""
	End If
	clsPubDB.AllSQL = "SELECT L.LIST_ID,L.LIST_TITLE,L.LIST_HITS,L.LIST_ORDER,L.LIST_ADD_TIME,S.ARTICLE_SORT_NAME FROM CLASS_LIST L,CLASS_ARTICLE_SORT S WHERE  S.ARTICLE_SORT_ID=L.LIST_TYPE " & strWhere & " ORDER BY LIST_STATUS DESC,LIST_TYPE DESC,LIST_ORDER DESC,LIST_ID DESC"
	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

		Response.Write "&nbsp;&nbsp;" & strArticleSortSlt

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

	End If

End Sub
'=============== End of Sub ShowList() =============================
'===================================================================
'= Sub         : FormAddArticleSort()
'= Time		   : Created At Apr,11,2004
'= Input       : None

'= Called by   : 
'= Calls       : 
'= Description : Add article sort
'===================================================================
Sub FormAddArticleSort()

	Dim clsForm			'== Class of form
	Dim clsTable		'== Class of table
	Dim strHtmlCode

	Set clsForm = New classForm
	clsForm.Action = "./admin_article.asp?action=FormSaveAddArticleSort"

	clsForm.Id = "frmAddArticleSort"
	clsForm.Name = "frmAddArticleSort"
	clsForm.OnSubmit = "return CheckFormAddArticleSort()"
	clsForm.ColumnScale = "30%"
	clsForm.MakeForm()
	clsForm.MakeTable "0","3","1","center","90%",GBL_cssFormTable

	clsForm.AddTr GBL_cssFormTitleTd
	clsForm.AddTitle "增加新的文章类型",""

	clsForm.AddTr GBL_cssFormTr
	clsForm.AddTd "*类型名",GBL_cssFormTdOne,GBL_cssFormTdTwo
	clsForm.AddText "iptSortName","20","30"

	clsForm.AddTr GBL_cssFormTr
	clsForm.AddTd "*类型描述",GBL_cssFormTdOne,GBL_cssFormTdTwo
	clsForm.AddText "iptSortDesc","100","30"

	clsForm.AddTr GBL_cssFormSubTr
	clsForm.AddSubTd GBL_cssFormSubTd
	clsForm.AddSub "subAddArticleSort","提 交","submit"
	clsForm.AddSub "rstAddArticleSort","重 写","reset"

	clsForm.OutPutForm()
	Set clsForm = Nothing

End Sub
'============== End of Function FormAddArticleSort() ===============
'===================================================================
'= Sub         : FormMdyArticleSort()
'= Time		   : Created At Apr,11,2004
'= Input       : None

'= Called by   : 
'= Calls       : 
'= Description : mdy article sort
'===================================================================
Sub FormMdyArticleSort()

	Dim clsForm			'== Class of form
	Dim clsTable		'== Class of table
	Dim strHtmlCode
	Dim GetRSId

	GetRSId = Trim(Request.QueryString("ArticleSortId"))
	If Not IsNumeric(GetRSId) Then
		Call ResultExecute(E_USER_PUB,"要修改的文章类型ID参数错误","ES_ERR")
		Exit Sub
	End If

	'== get info
	clsPubDB.Clear()
	clsPubDB.AllSQL = "SELECT * FROM CLASS_ARTICLE_SORT WHERE ARTICLE_SORT_ID=" & GetRSId
	clsPubDB.SQLRSExecute()
	Call ResultExecute(clsPubDB.intErrNum,"mdy article sort ","ES_ERR")


	Set clsForm = New classForm
	clsForm.Action = "./admin_article.asp?action=FormSaveMdyArticleSort&ArticleSortId=" & GetRSId

	clsForm.Id = "frmAddArticleSort"
	clsForm.Name = "frmAddArticleSort"
	clsForm.OnSubmit = "return CheckFormAddArticleSort()"
	clsForm.ColumnScale = "30%"
	clsForm.MakeForm()
	clsForm.MakeTable "0","3","1","center","90%",GBL_cssFormTable

	clsForm.AddTr GBL_cssFormTitleTd
	clsForm.AddTitle "修改文章类型",""

	clsForm.AddTr GBL_cssFormTr
	clsForm.AddTd "*类型名",GBL_cssFormTdOne,GBL_cssFormTdTwo
	clsForm.AddText "iptSortName","20","30"
	clsForm.AddValue clsPubDB.objPubRS("ARTICLE_SORT_NAME")

	clsForm.AddTr GBL_cssFormTr
	clsForm.AddTd "*类型描述",GBL_cssFormTdOne,GBL_cssFormTdTwo
	clsForm.AddText "iptSortDesc","100","30"
	clsForm.AddValue clsPubDB.objPubRS("ARTICLE_SORT_DESC")

	clsForm.AddTr GBL_cssFormTr
	clsForm.AddTd "*排序号",GBL_cssFormTdOne,GBL_cssFormTdTwo
	clsForm.AddText "iptSortOrder","4","30"
	clsForm.AddValue clsPubDB.objPubRS("ARTICLE_SORT_ORDER")

	clsForm.AddTr GBL_cssFormSubTr
	clsForm.AddSubTd GBL_cssFormSubTd
	clsForm.AddSub "subAddArticleSort","提 交","submit"
	clsForm.AddSub "rstAddArticleSort","重 写","reset"

	clsForm.OutPutForm()

⌨️ 快捷键说明

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