?? admin_article.asp
字號:
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 " " & 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 + -