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

📄 classarticle.asp

📁 依蓝旅游网站管理系统Elan2008.SP2
💻 ASP
📖 第 1 页 / 共 5 页
字号:
		 rsField.Close()
		 Set rsField = Nothing
		 Set FieldCmd = Nothing
	  End If
	  
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$ArticleID}", ArticleID)
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$Title}", Title)	  
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$Author}", Author)
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$Copyfrom}", Copyfrom)
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$UpdateTime}", FormatDateTime(UpdateTime, 2))
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$Inputer}", Inputer)
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$Editor}", Editor)
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$Hits}", Hits)
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$KeywordList}", EL_Common.KeywordList(Keywords, EL_Channel.ChannelDir))
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$Editor}", Editor)
	  
	  
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$Content}", EL_Common.ReplaceKeyLink(Content, ReplaceKeyType))	 
	  
	  rsArticle.Close()
	  Set rsArticle = Nothing
	  Set ArticleCmd = Nothing
	  	  
	  Response.Write HTML		 
   End Sub
   
   Public Sub ShowCommend()
      Dim StrCommend
	  ClassID = 0
	  StrCommend = EL_Common.Lang("BaseConfig.Commend", "推荐{$ItemName}")
	  StrCommend = EL_Common.RegExpStaticLabel(StrCommend, "{$ItemName}", EL_Channel.ItemName)
      HTML = EL_Common.Template(ChannelID, 4, 0)
	  HTML = EL_Common.ReplaceCommonLabels(HTML)	
	  
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$PageTitle}", EL_Common.Join2String(EL_Common.Join2String(StrCommend, EL_Channel.ChannelName, EL_Common.TitleDivide), SiteTitle, EL_Common.TitleDivide))
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$DefaultSkin}", EL_Common.Skin(ChannelID, 0, 0))
	  
	  EL_Common.ShowPath = EL_Common.ShowPath & EL_Common.Lang("BaseConfig.Path", "&nbsp;&gt;&gt;&nbsp;") &"<a href='"& InstallDir & EL_Channel.ChannelDir &"/'>"& EL_Channel.ChannelName &"</a>"& EL_Common.Lang("BaseConfig.Path", "&nbsp;&gt;&gt;&nbsp;") & StrCommend
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$ShowPath}", EL_Common.ShowPath)
	  
	  HTML = ChannelCommonLabels(HTML)
	  
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$ShowCommendList}", ArticleList(ChannelID, 0, 20, 80, True, 2, True, 4, 0, 1, 2, 5, True, True, "", "", ""))
	  
	  HTML = Label_GetArticleList(HTML)
	  HTML = Label_GetArticlePhoto(HTML)	  
	  
	  Response.Write HTML
   End Sub
   
   Private Function Label_CorrelationArticle(ByVal HTML, ByVal InfoID)
      Dim Match, Matches, ReturnString, Parameters, Temp
	  CommonRegExp.Pattern = "<!--\{\$CorrelationArticle\(([ 0-9]+),([ 0-9]+),([ 0-9]+),([ 0-9]+),([ 0-9]+),([ 0-9]+),([ 0-9]+),[ ]*(True|False)[ ]*,[ \w\""]*,[ \w\""]*,[ \w\""]*\)\}-->"        
      Set Matches = CommonRegExp.Execute(HTML)
	  ReturnString = HTML
	  For Each Match in Matches
		 Parameters = EL_Common.GetLabelParameters(Match.Value, "CorrelationArticle")
		 Temp = CorrelationArticle(Parameters(0), Parameters(1), Parameters(2), Parameters(3), Parameters(4), Parameters(5), Parameters(6), Parameters(7), Parameters(8), Parameters(9), Parameters(10), InfoID)
		 ReturnString = Replace(ReturnString, Match.Value, Temp)
      Next
	  
	  CommonRegExp.Pattern = "\{\$CorrelationArticle\(([ 0-9]+),([ 0-9]+),([ 0-9]+),([ 0-9]+),([ 0-9]+),([ 0-9]+),([ 0-9]+),[ ]*(True|False)[ ]*,[ \w\""]*,[ \w\""]*,[ \w\""]*\)\}"
	  Set Matches = CommonRegExp.Execute(ReturnString)
	  For Each Match in Matches
		 Parameters = EL_Common.GetLabelParameters(Match.Value, "CorrelationArticle")
		 Temp = CorrelationArticle(Parameters(0), Parameters(1), Parameters(2), Parameters(3), Parameters(4), Parameters(5), Parameters(6), Parameters(7), Parameters(8), Parameters(9), Parameters(10), InfoID)
		 ReturnString = Replace(ReturnString, Match.Value, Temp)
      Next
	  Set Matches = Nothing
	  
	  Label_CorrelationArticle = ReturnString
   End Function
   
   Private Function CorrelationArticle(ByVal Num, ByVal TitleLen, ByVal OrderType, ByVal OpenType, ByVal ColNum, ByVal ListType, ByVal ShowIcon, ByVal ShowHint, ByVal ClassA, ByVal Class1, ByVal Class2, ByVal InfoID)
      Dim ArticleCmd, rsArticle, RowCount, i
	  Dim StrCorrelation, ReturnString
	  Dim Order, Group
	  	  
	  Num = EL_Common.ELClng(Num)
	  TitleLen = EL_Common.ELClng(TitleLen)  	  
	  OrderType = EL_Common.ELClng(OrderType)	  
	  OpenType = EL_Common.ELClng(OpenType)
	  ColNum = EL_Common.ELClng(ColNum)
	  ListType = EL_Common.ELClng(ListType)
	  ShowIcon = EL_Common.ELClng(ShowIcon)
	  ShowHint = Eval(ShowHint)	  
	  ClassA = Replace(ClassA, """", "")
	  Class1 = Replace(Class1, """", "")
	  Class2 = Replace(Class2, """", "")
	  
	  If OpenType > 1 Then OpenType = 1	
	  If ColNum < 1 Then ColNum = 1  
	  
	  Order = "OnTop DESC"	   
	  Group = "ArticleID,Title,Author,UpdateTime,OnTop"
	  Select Case OrderType
	    Case 1: Order = Order &",ArticleID ASC"
		Case 2: Order = Order &",ArticleID DESC"
		Case 3: Order = Order &",UpdateTime ASC"
		Case 4: Order = Order &",UpdateTime DESC"
		Case 5: Order = Order &",Hits ASC" : Group = Group &",Hits"
		Case 6: Order = Order &",Hits DESC" : Group = Group &",Hits"
		Case Else:  Order = Order &",ArticleID DESC"
	  End Select
	  
	  Call EL_Common.InitCommand(ArticleCmd, "EL_SP_CorrelationInfo")
	  With ArticleCmd
	     .Parameters.Append .CreateParameter("RETURN", 2, 4)
		 .Parameters.Append .CreateParameter("@InfoID", 3, 1, 4, InfoID)
		 .Parameters.Append .CreateParameter("@ChannelID", 3, 1, 4, ChannelID)
		 .Parameters.Append .CreateParameter("@Table", 200, 1, 100, "EL_Article")
		 .Parameters.Append .CreateParameter("@PK", 200, 1, 100, "ArticleID")
		 .Parameters.Append .CreateParameter("@KeyField", 200, 1, 100, "Keywords")
		 .Parameters.Append .CreateParameter("@Fields", 200, 1, 500, "ArticleID,Title,Author,UpdateTime")
		 .Parameters.Append .CreateParameter("@Order", 200, 1, 100, Order)
		 .Parameters.Append .CreateParameter("@Fliter", 200, 1, 500, "Deleted="& EL_False &" And Passed="& EL_True)
		 .Parameters.Append .CreateParameter("@Group", 200, 1, 200, Group)
		 .Parameters.Append .CreateParameter("@Num", 3, 1, 4, Num)
		 Set rsArticle = .Execute()
	  End With
	  rsArticle.Close()
	  RowCount = ArticleCmd(0)	  
	  StrCorrelation = EL_Common.RegExpStaticLabel(EL_Common.Lang("BaseConfig.Correlation", "没有相关{$ItemName}"), "{$ItemName}", EL_Channel.ItemName)
	  If RowCount = 0 Then
	     ReturnString = StrCorrelation
	  Else
		 Dim Title_Name, Title_Author, Title_UpdateTime
		 If ShowHint = True Then
			Title_Name = EL_Common.RegExpStaticLabel(EL_Common.Lang("Article.Name", "{$ItemName}标题"), "{$ItemName}", EL_Channel.ItemName)
			Title_Author = EL_Common.Lang("Article.Author", "作&nbsp;&nbsp;&nbsp;&nbsp;者")
			Title_UpdateTime = EL_Common.Lang("Article.UpdateTime", "更新日期")
		 End If
		 rsArticle.Open()
		 Select Case ListType
			Case 2:    ReturnString = "<div class='list'>"
			Case 3:    ReturnString = "<ul class='list'>"
			Case 4:    ReturnString = "<ol class='list'>"
			Case Else: ReturnString = "<table width='100%' border='0' cellspacing='0' cellpadding='0' class='list'><tr>"
		 End Select			
		 If ClassA = "" Then ClassA = "lista"
		 If Class1 = "" Then Class1 = "list1"
		 If Class2 = "" Then Class2 = "list2"
		 Dim ArrClass(2)
		 ArrClass(1) = Class1
		 ArrClass(2) = Class2
		 For i = 1 To RowCount
		       Select Case ListType
			      Case 2:    ReturnString = ReturnString &"<div class='"& ArrClass(2-((i+2) Mod 2))&"'>"
				  Case 3, 4: ReturnString = ReturnString &"<li class='"& ArrClass(2-((i+2) Mod 2))&"'>"
				  Case Else: ReturnString = ReturnString &"<td width='"& 100/ColNum &"%' class='"& ArrClass(2-((i+2) Mod 2))&"'>"
			   End Select	
			   ReturnString = ReturnString &"<span class='listn'>"
			   If ShowIcon > 0 Then ReturnString = ReturnString &"<img border='0' src='"& InstallDir & EL_Channel.ChannelDir &"/Images/icon"& ShowIcon &".gif' />&nbsp;"
			   ReturnString = ReturnString &"<a href='"& InstallDir & EL_Channel.ChannelDir &"/ShowArticle.asp?ArticleID="& rsArticle("ArticleID") &"' class='"& ClassA &"' "
			   If ShowHint = True Then ReturnString = ReturnString &"title='"& Title_Name &":"& EL_Common.HTMLEncode(rsArticle("Title")) & VBCRLF & Title_Author &":"& rsArticle("Author") & VBCRLF & Title_UpdateTime &":"& rsArticle("UpdateTime") &"' "
			   ReturnString = ReturnString & EL_Common.ArrOpenType(OpenType) &">"& EL_Common.HTMLEncode(EL_Common.GetTopic(rsArticle("Title"), TitleLen)) &"</a>"		   
			   ReturnString = ReturnString &"</span>"
			   Select Case ListType
			      Case 2:     ReturnString = ReturnString &"</div>"
				  Case 3, 4:  ReturnString = ReturnString &"</li>"
				  Case Else:  ReturnString = ReturnString &"</td>"				      
			   End Select			   
			   
			   If (i Mod ColNum) = 0 And i<RowCount Then
			      Select Case ListType
			         Case 2, 3, 4:  
				     Case Else:  ReturnString = ReturnString &"</tr><tr>"		      
			      End Select
			   End If
			If i<RowCount Then rsArticle.MoveNext
		 Next	
		 rsArticle.Close()	 
		 Select Case ListType
			Case 2:    ReturnString = ReturnString &"</div>"
			Case 3:    ReturnString = ReturnString &"</ul>"
			Case 4:    ReturnString = ReturnString &"</ol>"
			Case Else: ReturnString = ReturnString &"</tr></table>"
		 End Select
	  End If	  
	  Set rsArticle = Nothing  
	  Set ArticleCmd = Nothing
	  CorrelationArticle = ReturnString	  
   End Function
   
   Private Function GetChildClass()
      Dim ChildCmd, rsChild, RowCount, i, ReturnString, ClassIcon
	  ClassIcon = EL_Common.Lang("BaseConfig.ClassIncludeIcon", " ·")
	  Call EL_Common.InitCommand(ChildCmd, "EL_SP_ClassList")
	  With ChildCmd
	     .Parameters.Append .CreateParameter("RETURN", 2, 4)
		 .Parameters.Append .CreateParameter("@ParentID", 3, 1, 4, ClassID)
		 .Parameters.Append .CreateParameter("@ChannelID", 3, 1, 4, ChannelID)
		 Set rsChild = .Execute()
	  End With
	  rsChild.Close()
	  RowCount = ChildCmd(0)
	  rsChild.Open()
	  ReturnString = ""
	  For i = 1 To RowCount
	     ReturnString = ReturnString & ClassIcon &"<a href='"& InstallDir & EL_Channel.ChannelDir &"/ShowClass.asp?ClassID="& rsChild(0) &"'>"& rsChild(1) &"</a><br>"
		 If i<RowCount Then rsChild.MoveNext
	  Next
	  rsChild.Close()
	  Set rsChild = Nothing
	  Set ChildCmd = Nothing
	  GetChildClass = ReturnString
   End Function
   
   Private Function Label_CurrentClass(ByVal HTML, ByVal ClassName, ByVal ItemCount)
      Dim Match, Matches, ReturnString, Temp
	  Dim TempString, MatchString
	  Dim ArrClassCmd, rsArrClass, SQLCondition, RowCount, i
	  
	  CommonRegExp.Pattern = "\[CurrentClass\][\w\W]*\[\/CurrentClass\]"        
      Set Matches = CommonRegExp.Execute(HTML)
	  ReturnString = HTML
	  EL_Flag = False
	  For Each Match in Matches	
	     If ItemCount > 0 Then
		    Temp = Match.Value
		    Temp = EL_Common.ReplaceText(Temp, "\[CurrentClass\]", "")
		    Temp = EL_Common.ReplaceText(Temp, "\[\/CurrentClass\]", "") 			
			Temp = EL_Common.ReplaceText(Temp, "Current_ClassID", ClassID)
		    Temp = EL_Common.RegExpStaticLabel(Temp, "{$Current_ClassName}", ClassName)
		    Temp = EL_Common.RegExpStaticLabel(Temp, "{$Current_ClassURL}", InstallDir & EL_Channel.ChannelDir &"/ShowClass.asp?ShowType=1&ClassID="& ClassID)
			ShowClassType = 1
		    Temp = Label_GetArticleList(Temp)
		    Temp = Label_GetArticlePhoto(Temp)
			ShowClassType = 0
		 Else
		    Temp = ""
		 End If
		 ReturnString = Replace(ReturnString, Match.Value, Temp)
      Next	  
	  
	  Set Matches = Nothing
	  EL_Flag = True
	  Label_CurrentClass = ReturnString
   End Function
   
   Private Function Label_ArrClassList(ByVal HTML)
      Dim Match, Matches, ReturnString, Cols, Temp
	  Dim TempString, MatchString
	  Dim ArrClassCmd, rsArrClass, SQLCondition, RowCount, i
	  
	  CommonRegExp.Pattern = "\[arrClassList\(([ 0-9]+)\)\][\w\W]*\[\/arrClassList\]"        
      Set Matches = CommonRegExp.Execute(HTML)
	  ReturnString = HTML
	  EL_Flag = False
	  For Each Match in Matches	

⌨️ 快捷键说明

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