📄 core
字号:
Select Case atoi(strType)
Case 1
strSort = "SEQID DESC"
strWhere = strWhere & " AND HOT=1"
Case 2
strSort = "SEQID DESC"
strWhere = strWhere & " AND COMMEND=1"
Case 3
strSort = "HIT DESC"
Case Else
strSort = "SEQID DESC"
End Select
strSQL = MyKernel.DB.GetLimitSQL(intCount, "SEQID,STAPLEID,STAPLETITLE,TITLE,MATTER,HIT,MARK,INTIME", T_CONTENT, strWhere, "", strSort)
Set xmlDoc = MyKernel.DB.SQLToXML(strSQL, "contents", "content")
ExportContentx1 = xmlDoc.documentElement.hasChildNodes
If Not ExportContentx1 Then
Set xmlDoc = Nothing
Exit Function
End If
If strAttach = "1" Then
Set xmlDoc2 = GetMatterDoc(xmlDoc.documentElement)
Else
Set xmlDoc2 = Nothing
End If
i = 0
k = 0
Set xmlNode = xmlDoc.documentElement.childNodes.nextNode()
Do While Not xmlNode Is Nothing
strTitle = XMLAttr(xmlNode, "title")
If intBytes > 0 And LenC(strTitle) > intBytes Then
strTitle = MidC(strTitle, 1, intBytes)
End If
If strSuffix <> "" Then
strTitle = strTitle & GetContentSuffix(XMLAttr(xmlNode, "hit"), XMLAttr(xmlNode, "intime"), strSuffix)
End If
If strAttach = "1" And Not xmlDoc2 Is Nothing Then
If atol(XMLAttr(xmlNode, "matter")) > 0 And (intAttachCount = 0 Or (intAttachCount > 0 And intAttachCount <> k)) And xmlDoc2.documentElement.hasChildNodes Then
Set xmlNode2 = XMLQuery(xmlDoc2, "matters/matter[@mark=" & XMLAttr(xmlNode, "matter") & "]")
If Not xmlNode2 Is Nothing Then
strFrontImage = GetMatterFront(xmlNode2)
If strFrontImage <> "" Then
MyXML.Println MyXML.CreateImg(strFrontImage, "加载中……", -1, -1)
k = k + 1
End If
End If
End If
End If
strURL = "$(Prefix)content.asp?StapleId=$(StapleId)&PageNo=1&CateId=$(CateId)&ContentId=$(ContentId)&Intime=$(Intime)"
intMISC = 0
If MyKernel.Modlist(moMISC) = 1 Then
If IsMISCHome(XMLAttr(xmlNode, "stapleid"), arr) Then
intMISC = 1
strURL = Replace(strURL, "$(Prefix)", arr(3))
ElseIf IsMISCChild(XMLAttr(xmlNode, "mark"), arr) Then
intMISC = 2
strURL = Replace(strURL, "$(Prefix)", arr(3))
Else
strURL = Replace(strURL, "$(Prefix)", "")
End If
Else
strURL = Replace(strURL, "$(Prefix)", "")
End If
strURL = Replace(strURL, "$(StapleId)", XMLAttr(xmlNode, "stapleid"))
strURL = Replace(strURL, "$(CateId)", XMLAttr(xmlNode, "cate"))
strURL = Replace(strURL, "$(ContentId)", XMLAttr(xmlNode, "seqid"))
strURL = Replace(strURL, "$(Intime)", XMLAttr(xmlNode, "intime"))
strImage = ""
Select Case atoi(strPrefixType)
Case 1
strTitle = (i + 1) & "." & strTitle
Case 2
strTitle = strPrefix & strTitle
Case 3
strImage = "images/front" & strPrefix & ".gif"
Case 4
strTitle = "[" & XMLAttr(xmlNode, "stapletitle") & "]" & strTitle
Case 5
MyXML.Printf "["
If MyKernel.Modlist(moMISC) = 1 And intMISC > 0 Then
If intMISC = 1 Then
MyXML.Printf MyXML.CreateA(arr(3) & "index.asp", XMLAttr(xmlNode, "stapletitle"), "", "")
Else
MyXML.Printf MyXML.CreateA(arr(3) & "staple.asp?StapleId=" & XMLAttr(xmlNode, "stapleid"), XMLAttr(xmlNode, "stapletitle"), "", "")
End If
Else
MyXML.Printf MyXML.CreateA(GetStapleURL(XMLAttr(xmlNode, "stapleid"), 1), XMLAttr(xmlNode, "stapletitle"), "", "")
End If
MyXML.Printf "]"
Case Else
End Select
MyXML.Printf MyXML.CreateA(strURL, strTitle, strImage, "")
Set xmlNode = xmlNode.nextSibling
i = i + 1
If Not xmlNode Is Nothing And i < intCount Then
MyXML.Println ""
End If
Loop
Set xmlDoc2 = Nothing
Set xmlDoc = Nothing
End Function
Public Function ExportStapleLogoOrTitle(ByVal strStyle, ByVal strColor)
ExportStapleLogoOrTitle = False
If Not CheckStaple() Then Exit Function
If Staple("Logo") <> "" Then
MyXML.Printf MyXML.CreateImg("images/logo" & Staple("SeqId") & "." & Staple("Logo"), "加载中……", -1, -1)
Else
ExportStyle strStyle, strColor, Staple("Title"), False
End If
ExportStapleLogoOrTitle = True
End Function
Public Function ExportStapleLogo()
ExportStapleLogo = False
If Not CheckStaple() Then Exit Function
If Staple("Logo") <> "" Then
MyXML.Printf MyXML.CreateImg("images/logo" & Staple("SeqId") & "." & Staple("Logo"), "加载中……", -1, -1)
ExportStapleLogo = True
End If
End Function
Public Function ExportStapleTitle(ByVal strStyle, ByVal strColor)
ExportStapleTitle = False
If Not CheckStaple() Then Exit Function
ExportStyle strStyle, strColor, Staple("Title"), False
ExportStapleTitle = True
End Function
Public Function ExportStapleContent(ByVal strStyle, ByVal strColor)
ExportStapleContent = False
If Not CheckStaple() Then Exit Function
ExportStyle strStyle, strColor, Staple("Content"), False
ExportStapleContent = True
End Function
Public Function ExportStaples(ByVal strSpace)
ExportStaples = False
If Not CheckStaple() Then Exit Function
ExportStaples = ExportStaplesX(Staple, strSpace, "", "0", True)
End Function
Public Function ExportStaples1(ByVal strId, ByVal strSpace, ByVal strSuffix, ByVal strTotal)
Dim lngID
lngID = atol(strId)
ExportStaples1 = False
If lngID < 1 Then
If CheckStaple() Then
ExportStaples1 = ExportStaplesX(Staple, strSpace, strSuffix, strTotal, True)
End If
Else
Dim objStaple
Set objStaple = MyKernel.Command(T_STAPLE)
ExportStaples1 = objStaple.Execute("*", "HIDDEN=0 AND CATEGORY=" & wmStapleNormal & " AND SEQID=" & strId)
If ExportStaples1 Then
ExportStaples1 = ExportStaplesX(objStaple, strSpace, strSuffix, strTotal, False)
End If
Set objStaple = Nothing
End If
End Function
Public Function ExportContents _
( _
ByVal strPrefixType, _
ByVal strPrefix, _
ByVal strSuffix, _
ByVal strAttach, _
ByVal strSpace, _
ByVal strBytes _
)
ExportContents = ExportContents1(strPrefixType, strPrefix, strSuffix, strAttach, "0", strSpace, strBytes)
End Function
Public Function ExportContents1 _
( _
ByVal strPrefixType, _
ByVal strPrefix, _
ByVal strSuffix, _
ByVal strAttach, _
ByVal strAttachCount, _
ByVal strSpace, _
ByVal strBytes _
)
ExportContents1 = False
If Not CheckStaple() Then Exit Function
Dim objPage
Dim i, k
Dim intBytes
Dim intAttachCount
Dim xmlNode, xmlDoc2, xmlNode2, strFrontImage
intBytes = atoi(strBytes)
If intBytes < 0 Then intBytes = 0
intAttachCount = atoi(strAttachCount)
Set objPage = vbsre.mocom.WAPmo.Page.newInstance()
objPage.ID = PageNo
objPage.Size = IIf(Staple("ContentPage") < 1, 20, Staple("ContentPage"))
If Staple("ContentSort") = 2 And WM_DataType = adSqlServer Then
objPage.DataType = adAccess
Else
objPage.DataType = WM_DataType
End If
objPage.Column = "SEQID,STAPLEID,STAPLETITLE,TITLE,MATTER,HIT,MARK,INTIME"
objPage.Table = T_CONTENT
objPage.Where = "STAPLEID=" & Mapping("SeqId") & " AND HIDDEN=0 AND EXAMINE=1"
objPage.Count = GetPageCount(objPage)
objPage.Index = "SEQID"
Select Case Staple("ContentSort")
Case 1
objPage.Sort = "SeqId DESC"
objPage.SortType = 1
Case 2
objPage.Sort = "Hit DESC"
objPage.SortType = 1
Case Else
objPage.Sort = "SeqId ASC"
objPage.SortType = 0
End Select
objPage.Build "contents", "content"
ExportContents1 = objPage.Rows.hasChildNodes
If ExportContents1 Then
PageNo = objPage.ID
Dim objContent
Dim objMatter
Dim strURL
Dim strTitle
Dim strImage
Dim arr(7)
Dim blnMISC
If strAttach = "1" Then
Set xmlDoc2 = GetMatterDoc(objPage.Rows)
Else
Set xmlDoc2 = Nothing
End If
Set xmlNode = objPage.Rows.childNodes.nextNode()
i = 0
k = 0
If MyKernel.Modlist(moMISC) = 1 Then
blnMISC = CBool(Staple("IsMISC") = 1)
If blnMISC = False Then
blnMISC = IsMISCChild(Staple("Mark"), arr)
Else
arr(0) = Staple("SeqId")
arr(1) = Staple("Title")
arr(2) = Staple("Mark")
arr(3) = Staple("MISC_Visit")
arr(4) = Staple("MISC_Fee")
arr(5) = Staple("MISC_Type")
arr(6) = Staple("MISC_Code")
arr(7) = Staple("MISC_Confirm")
End If
Else
blnMISC = False
End If
Do While Not xmlNode Is Nothing
strTitle = XMLAttr(xmlNode, "title")
If intBytes > 0 And LenC(strTitle) > intBytes Then
strTitle = MidC(strTitle, 1, intBytes) & "..."
End If
If strSuffix <> "" Then
strTitle = strTitle & GetContentSuffix(XMLAttr(xmlNode, "hit"), XMLAttr(xmlNode, "intime"), strSuffix)
End If
If strAttach = "1" And Not xmlDoc2 Is Nothing Then
If atol(XMLAttr(xmlNode, "matter")) > 0 And (intAttachCount = 0 Or (intAttachCount > 0 And intAttachCount <> k)) And xmlDoc2.documentElement.hasChildNodes Then
Set xmlNode2 = XMLQuery(xmlDoc2, "matters/matter[@mark=" & XMLAttr(xmlNode, "matter") & "]")
If Not xmlNode2 Is Nothing Then
strFrontImage = GetMatterFront(xmlNode2)
If strFrontImage <> "" Then
MyXML.Println MyXML.CreateImg(strFrontImage, "加载中……", -1, -1)
k = k + 1
End If
End If
End If
End If
strURL = "$(Prefix)content.asp?StapleId=$(StapleId)&PageNo=$(PageNo)&CateId=$(CateId)&ContentId=$(ContentId)&Intime=$(Intime)"
If MyKernel.Modlist(moMISC) = 1 And blnMISC Then
strURL = Replace(strURL, "$(Prefix)", arr(3))
Else
strURL = Replace(strURL, "$(Prefix)", "")
End If
strURL = Replace(strURL, "$(StapleId)", Mapping("SeqId"))
strURL = Replace(strURL, "$(PageNo)", objPage.ID)
strURL = Replace(strURL, "$(CateId)", XMLAttr(xmlNode, "cate"))
strURL = Replace(strURL, "$(ContentId)", XMLAttr(xmlNode, "seqid"))
strURL = Replace(strURL, "$(Intime)", XMLAttr(xmlNode, "intime"))
strImage = ""
Select Case atoi(strPrefixType)
Case 1
strTitle = ((objPage.ID - 1) * objPage.Size + i + 1) & "." & strTitle
Case 2
strTitle = strPrefix & strTitle
Case 3
strImage = "images/front" & strPrefix & ".gif"
Case Else
End Select
MyXML.Println MyXML.CreateA(strURL, strTitle, strImage, "")
Set xmlNode = xmlNode.nextSibling
i = i + 1
Loop
Set xmlDoc2 = Nothing
strURL = "$(Prefix)staple.asp?StapleId=$(StapleId)&PageNo=$(PageNo)"
If MyKernel.Modlist(moMISC) = 1 And blnMISC Then
strURL = Replace(strURL, "$(Prefix)", arr(3))
Else
strURL = Replace(strURL, "$(Prefix)", "")
End If
strURL = Replace(strURL, "$(StapleId)", Staple("SeqId"))
If objPage.ID < objPage.Total Then
MyXML.Printf MyXML.CreateA(Replace(strURL, "$(PageNo)", objPage.ID + 1), "下一页", "", "")
MyXML.Printf "|"
MyXML.Println MyXML.CreateA(Replace(strURL, "$(PageNo)", objPage.Total), "最末页", "", "")
End If
If objPage.ID > 1 Then
MyXML.Printf MyXML.CreateA(Replace(strURL, "$(PageNo)", objPage.ID - 1), "上一页", "", "")
MyXML.Printf "|"
MyXML.Println MyXML.CreateA(Replace(strURL, "$(PageNo)", 1), "第一页", "", "")
End If
If objPage.Total > 2 Then
If MyKernel.Modlist(moMISC) = 1 And blnMISC Then
If Staple("IsMISC") = 1 Then
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -