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

📄 ks_refreshfunctioncls.asp

📁 SK信息采集2.0功能介绍: 1.可针对任何静态网页,动态网页进行采集。包括htm,html,shtml,ASP,ASPX,JSP,PHP等。 2.增加自定文件采集.用户可采集网页中的所有文件.
💻 ASP
📖 第 1 页 / 共 5 页
字号:
						IF row=RowNumber then
							  IF cc<=5  And PreArticleShowComment = 1 And PreArticleComment = 1 Then
							   GetCommonNotRuleArticleList=GetCommonNotRuleArticleList & "<a href=""" & KSCMS.GetDomain & "Common/Comment.asp?ChannelID=1&Classid=" & PreArticleClassID & "&InfoID=" & PreArticleInfoID & """ target=""_blank"">" & KSCMS.GotTopic("评论",cc) & "</a></td></tr>"
							  Else
							   GetCommonNotRuleArticleList=GetCommonNotRuleArticleList & "<a" & LinkStr &">"& KSCMS.GotTopic(Title,cc)&"</a></td></tr>"
							  End IF
							 If SplitPic <> "" Then
					          GetCommonNotRuleArticleList = GetCommonNotRuleArticleList & (GetSplitPic(SplitPic, 1) & vbCrLf)
					         End If
							 PreArticleComment=ArticleRS("Comment"):PreArticleShowComment=ArticleRS("ShowComment"):PreArticleClassID=CurrTid:PreArticleInfoID=ArticleRS("NewsID")
							 ArticleRS.movenext
					   Else
					        IF cc<=5  And PreArticleShowComment = 1 And PreArticleComment = 1 Then
							 GetCommonNotRuleArticleList=GetCommonNotRuleArticleList & "<a href=""" & KSCMS.GetDomain & "Common/Comment.asp?ChannelID=1&Classid=" & PreArticleClassID & "&InfoID=" & PreArticleInfoID & """ target=""_blank"">" & KSCMS.GotTopic("评论",cc) &"</a></td></tr>"
							else
							GetCommonNotRuleArticleList=GetCommonNotRuleArticleList & "<a" & LinkStr &">"& KSCMS.GotTopic(Title,cc)&"</a></td></tr>" & vbcrlf
							end if
							If SplitPic <> "" Then
					          GetCommonNotRuleArticleList = GetCommonNotRuleArticleList & (GetSplitPic(SplitPic, 1) & vbCrLf)
					         End If
							  PreArticleComment=ArticleRS("Comment"):PreArticleShowComment=ArticleRS("ShowComment"):PreArticleClassID=CurrTid:PreArticleInfoID=ArticleRS("NewsID")
							ArticleRS.movenext 
						 If Not ArticleRS.EOF Then GetCommonNotRuleArticleList=GetCommonNotRuleArticleList & "<td>" & NaviStr
					   End If
					Else
					   GetCommonNotRuleArticleList=GetCommonNotRuleArticleList & "<a" & LinkStr &">"& Title&"</a>&nbsp;"
					   ii=ii + 1
					    PreArticleComment=ArticleRS("Comment"):PreArticleShowComment=ArticleRS("ShowComment"):PreArticleClassID=CurrTid:PreArticleInfoID=ArticleRS("NewsID")
					   ArticleRS.movenext
					End IF
					if row>=RowNumber then exit do
				loop
				 ArticleRS.close:Set ArticleRS=nothing
				 GetCommonNotRuleArticleList = GetCommonNotRuleArticleList & MoreLinkStr
				 GetCommonNotRuleArticleList = GetCommonNotRuleArticleList & ("</table>" & vbCrLf)
			 
			 Else
			   GetCommonNotRuleArticleList = "":ArticleRS.Close:Set ArticleRS = Nothing
			 End If
			 
		End Function
		
		'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
		'函数名:GetCommonSlideArticle
		'作 用: 通用滚动文章函数
		'参 数: ArtilceSql 待查询的SQL语句,OpenTypStr链接打开类型,等
		'++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
		Function GetCommonMarqueeArticle(ArticleSql, MarqueeWidth, MarqueeHeight, MarqueeSpeed, MarqueeDirection, OpenTypeStr, TitleLen, MarqueeStyle, DateRule, MarqueeBgcolor, TitleCss, DateCss)
				 
				Call KSCMS.DelApplication    '刷新前,移除缓存Application
			   
				Dim ArticleRS
Set ArticleRS=Server.CreateObject("ADODB.RECORDSET")
				ArticleRS.Open ArticleSql, Conn, 1, 1
			   If Not ArticleRS.EOF Then
				  Dim TempTitle, CurrTid, TitleStr,TitleCssStr, DateCssStr
				   TitleCssStr = GetCss(TitleCss): DateCssStr = GetCss(DateCss)
				   If MarqueeStyle = 1 Then             '纵向间隔滚动
					GetCommonMarqueeArticle = " <div id=""Rolls1""><table cellspacing=""0"" cellpadding=""0"" width=""" & MarqueeWidth & """ border=""0"">"
					Do While Not ArticleRS.EOF
					   CurrTid = ArticleRS("Tid")						
					   TitleStr = ArticleRS("Title")
					   TempTitle = GetArticleTitle(TitleStr, TitleLen, False, ArticleRS("TitleType"), ArticleRS("TitleFontColor"), ArticleRS("TitleFontType"))
					   TempTitle = "<tr><td height=""20"">&#8226;&nbsp;<a" & TitleCssStr & " href=""" & (KSCMS.GetInfoUrl(1,ArticleRS)) & """" & OpenTypeStr & " title=""" & TitleStr & """>" & TempTitle & "</a>"
					   
					   If CStr(DateRule) <> "0" And CStr("DateRule") <> "" Then
						 GetCommonMarqueeArticle = GetCommonMarqueeArticle & (TempTitle & "&nbsp;&nbsp;<span" & DateCssStr & ">" & DateFormat(ArticleRS("AddDate"), DateRule) & "</span></td></tr>" & vbCrLf)
					   Else
						 GetCommonMarqueeArticle = GetCommonMarqueeArticle & (TempTitle & "</td></tr>" & vbCrLf)
					   End If
					   ArticleRS.MoveNext
					Loop
					GetCommonMarqueeArticle = GetCommonMarqueeArticle & "</table></div><div id=""Rolls2"" style=""z-index: 1; visibility: hidden; position: absolute""></div>" & vbCrLf
					
					GetCommonMarqueeArticle = GetCommonMarqueeArticle & "<script>" & vbCrLf
					GetCommonMarqueeArticle = GetCommonMarqueeArticle & "marqueesHeight=" & MarqueeHeight & ";"
					GetCommonMarqueeArticle = GetCommonMarqueeArticle & "scrillHeight=" & MarqueeHeight & ";"
					GetCommonMarqueeArticle = GetCommonMarqueeArticle & "scrillspeed=" & MarqueeSpeed & ";"
					GetCommonMarqueeArticle = GetCommonMarqueeArticle & "stoptimes=50;"
					GetCommonMarqueeArticle = GetCommonMarqueeArticle & "stopscroll=false;"
					GetCommonMarqueeArticle = GetCommonMarqueeArticle & "Rolls1.scrollTop=0;"
					GetCommonMarqueeArticle = GetCommonMarqueeArticle & "with (Rolls1)" & vbCrLf
					GetCommonMarqueeArticle = GetCommonMarqueeArticle & "{"
					GetCommonMarqueeArticle = GetCommonMarqueeArticle & "style.width=0;"
					GetCommonMarqueeArticle = GetCommonMarqueeArticle & "style.height=marqueesHeight;"
					GetCommonMarqueeArticle = GetCommonMarqueeArticle & "style.overflowX=""visible"";"
					GetCommonMarqueeArticle = GetCommonMarqueeArticle & "style.overflowY=""hidden"";"
					GetCommonMarqueeArticle = GetCommonMarqueeArticle & "noWrap=true;"
					GetCommonMarqueeArticle = GetCommonMarqueeArticle & "onmouseover=new Function(""stopscroll=true"");" & vbCrLf
					GetCommonMarqueeArticle = GetCommonMarqueeArticle & "onmouseout=new Function(""stopscroll=false"");" & vbCrLf
					GetCommonMarqueeArticle = GetCommonMarqueeArticle & "}" & vbCrLf
					GetCommonMarqueeArticle = GetCommonMarqueeArticle & "preTop=0;" & vbCrLf
					GetCommonMarqueeArticle = GetCommonMarqueeArticle & "currentTop=0;" & vbCrLf
					GetCommonMarqueeArticle = GetCommonMarqueeArticle & "stoptime=0;" & vbCrLf
					GetCommonMarqueeArticle = GetCommonMarqueeArticle & "function initRollsstext()" & vbCrLf
					GetCommonMarqueeArticle = GetCommonMarqueeArticle & "{  Rolls2.innerHTML="""";"
					GetCommonMarqueeArticle = GetCommonMarqueeArticle & "Rolls2.innerHTML+=Rolls1.innerHTML;"
					GetCommonMarqueeArticle = GetCommonMarqueeArticle & "Rolls1.innerHTML=Rolls2.innerHTML+Rolls2.innerHTML;"
					GetCommonMarqueeArticle = GetCommonMarqueeArticle & "setInterval(""scrollUp()"",scrillspeed);"
					GetCommonMarqueeArticle = GetCommonMarqueeArticle & "}" & vbCrLf
					GetCommonMarqueeArticle = GetCommonMarqueeArticle & "function scrollUp()" & vbCrLf
					GetCommonMarqueeArticle = GetCommonMarqueeArticle & "{"
					GetCommonMarqueeArticle = GetCommonMarqueeArticle & "if(stopscroll==true) return;" & vbCrLf
					GetCommonMarqueeArticle = GetCommonMarqueeArticle & "currentTop+=1;"
					GetCommonMarqueeArticle = GetCommonMarqueeArticle & "if(currentTop==scrillHeight)"
					GetCommonMarqueeArticle = GetCommonMarqueeArticle & "{ stoptime+=1;"
					GetCommonMarqueeArticle = GetCommonMarqueeArticle & "currentTop-=1;"
					GetCommonMarqueeArticle = GetCommonMarqueeArticle & "if(stoptime==stoptimes)"
					GetCommonMarqueeArticle = GetCommonMarqueeArticle & "{"
					GetCommonMarqueeArticle = GetCommonMarqueeArticle & "currentTop=0; stoptime=0; }"
					GetCommonMarqueeArticle = GetCommonMarqueeArticle & "}" & vbCrLf
					GetCommonMarqueeArticle = GetCommonMarqueeArticle & "else  {"
					GetCommonMarqueeArticle = GetCommonMarqueeArticle & "preTop=Rolls1.scrollTop;" & vbCrLf
					GetCommonMarqueeArticle = GetCommonMarqueeArticle & "Rolls1.scrollTop+=1;"
					GetCommonMarqueeArticle = GetCommonMarqueeArticle & "if(preTop==Rolls1.scrollTop)" & vbCrLf
					GetCommonMarqueeArticle = GetCommonMarqueeArticle & "{ Rolls1.scrollTop=Rolls2.offsetHeight-marqueesHeight;" & vbCrLf
					GetCommonMarqueeArticle = GetCommonMarqueeArticle & "Rolls1.scrollTop+=1; }" & vbCrLf
					GetCommonMarqueeArticle = GetCommonMarqueeArticle & "}"
					GetCommonMarqueeArticle = GetCommonMarqueeArticle & "}" & vbCrLf
					GetCommonMarqueeArticle = GetCommonMarqueeArticle & "setInterval("""",1000);" & vbCrLf
					GetCommonMarqueeArticle = GetCommonMarqueeArticle & "initRollsstext();" & vbCrLf
					GetCommonMarqueeArticle = GetCommonMarqueeArticle & "</script>"
					
				   Else                                 '默认方式
					 Do While Not ArticleRS.EOF
					  CurrTid = ArticleRS("Tid")
					   TitleStr = ArticleRS("Title")
					   TempTitle = GetArticleTitle(TitleStr, TitleLen, False, ArticleRS("TitleType"), ArticleRS("TitleFontColor"), ArticleRS("TitleFontType"))
					   TempTitle = "<a" & TitleCssStr & " href=""" & (KSCMS.GetInfoUrl(1,ArticleRS)) & """" & OpenTypeStr & " title=""" & TitleStr & """>" & TempTitle & "</a>"
		
					   If CStr(DateRule) <> "0" And CStr("DateRule") <> "" Then
						 GetCommonMarqueeArticle = GetCommonMarqueeArticle & (TempTitle & "&nbsp;&nbsp;<span" & DateCssStr & ">" & DateFormat(ArticleRS("AddDate"), DateRule) & "</span>")
					   Else
						 GetCommonMarqueeArticle = GetCommonMarqueeArticle & TempTitle
					   End If
					   GetCommonMarqueeArticle = GetCommonMarqueeArticle & "&nbsp;&nbsp;&nbsp;&nbsp;"
					   ArticleRS.MoveNext
					 Loop
		
					  If MarqueeBgcolor <> "" Then
						 GetCommonMarqueeArticle = "<Marquee scrollamount=""" & MarqueeSpeed & """ direction=""" & MarqueeDirection & """ width=""" & MarqueeWidth & """ Height=""" & MarqueeHeight & """ bgcolor=""" & MarqueeBgcolor & """ onmouseover=""this.stop();"" onmouseout=""this.start();"">" & GetCommonMarqueeArticle & "</Marquee>"
					  Else
						 GetCommonMarqueeArticle = "<Marquee scrollamount=""" & MarqueeSpeed & """ direction=""" & MarqueeDirection & """ width=""" & MarqueeWidth & """ Height=""" & MarqueeHeight & """ onmouseover=""this.stop();"" onmouseout=""this.start();"">" & GetCommonMarqueeArticle & "</Marquee>"
					  End If
			   End If
				  ArticleRS.Close:Set ArticleRS = Nothing
			Else
			   GetCommonMarqueeArticle = "":ArticleRS.Close:Set ArticleRS = Nothing
			End If
		
		End Function
		'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
		'函数名:GetCommonSlideArticle
		'作 用: 通用幻灯片文章函数
		'参 数: ArtilceSql 待查询的SQL语句,OpenTypStr链接打开类型,等
		'++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
		Function GetCommonSlideArticle(ArticleSql, PicWidth, PicHeight, OpenTypeStr, ShowTitle, ShowPicFlag, TitleLen, TitleCss, ChangeTime,SlideType)
			 Call KSCMS.DelApplication   '刷新前,移除缓存Application
			 Dim PicUrl, Domain, TempTitle,CurrTid, TitleCssStr
			 Domain = KSCMS.GetConfig("WebUrl"):TitleCssStr = GetCss(TitleCss)
			 Dim ArticleRS:Set ArticleRS=Server.CreateObject("ADODB.RECORDSET")
			 ArticleRS.Open ArticleSql, Conn, 1, 1
			 IF Cint(SlideType)=2 Then   'Flash幻灯片
			     If Not ArticleRS.Eof Then
					 Dim ImgArrStr,LinkArrStr,TextArrStr
					 Dim N:N=0
				     Do While Not ArticleRS.Eof
					 	PicUrl = Trim(ArticleRS("PicUrl"))
						 If UCase(Left(PicUrl, 4)) <> "HTTP" Then PicUrl = Domain & PicUrl						
						  CurrTid = ArticleRS("Tid")
					      TempTitle = ArticleRS("Title")
						 
                          if N=0 Then
						    ImgArrStr=PicUrl
						    LinkArrStr=KSCMS.GetInfoUrl(1,ArticleRS)
						    TextArrStr=TempTitle
					      Else
						   ImgArrStr=ImgArrStr & "@@@" & PicUrl
						   LinkArrStr=LinkArrStr & "@@@" & KSCMS.GetInfoUrl(1,ArticleRS)
						   TextArrStr=TextArrStr & "@@@" & TempTitle
						  End if
						  N=N+1
						  ArticleRS.MoveNext
					 Loop
					 GetCommonSlideArticle=GetCommonFlashSlide(PicWidth,PicHeight,TitleLen,ImgArrStr,LinkArrStr,TextArrStr)
				 else
				   GetCommonSlideArticle = "":ArticleRS.Close:Set ArticleRS = Nothing:Exit Function
				 End if
			 Else
				 If Not ArticleRS.EOF Then
				   GetCommonSlideArticle = "<Script Language=""JavaScript"">" & vbCrLf
				   GetCommonSlideArticle = GetCommonSlideArticle & ("<!--" & vbCrLf)
				   GetCommonSlideArticle = GetCommonSlideArticle & ("function SlidePic(ID) {this.ID=ID; this.Width=0;this.Height=0; this.TimeOut=5000; this.Effect=23; this.TitleLen=0; this.PicNum=-1; this.Img=null; this.Url=null; this.Title=null; this.AllPic=new Array(); this.Add=AddSlidePic; this.Show=ShowSlidePic; this.LoopShow=LoopShowSlidePic;}" & vbCrLf)
				   GetCommonSlideArticle = GetCommonSlideArticle & ("function NewSlide() {this.ImgUrl=""""; this.LinkUrl=""""; this.Title="""";}" & vbCrLf)
				   GetCommonSlideArticle = GetCommonSlideArticle & ("function AddSlidePic(SP) {this.AllPic[this.AllPic.length] = SP;}" & vbCrLf)
				   GetCommonSlideArticle = GetCommonSlideArticle & ("function ShowSlidePic() {" & vbCrLf)
				   GetCommonSlideArticle = GetCommonSlideArticle & ("if(this.AllPic[0] == null) return false;" & vbCrLf)
				   GetCommonSlideArticle = GetCommonSlideArticle & ("document.write('<div align=""center""><a id=""Url' + this.ID + '"" href=""""" & OpenTypeStr & "><img id=""Img' + this.ID + '"" style=""width:' + this.Width + '; height:' + this.Height + '; filter: revealTrans(duration=2,transition=23);"" src=""javascript:null"" border=""0""></a>');" & vbCrLf)
				   GetCommonSlideArticle = GetCommonSlideArticle & ("if(this.TitleLen != 0) document.write(""<br><Div id='Title"" + this.ID + ""'></Div></div>"");" & vbCrLf)
				   GetCommonSlideArticle = GetCommonSlideArticle & ("this.Img = document.getElementById(""Img"" + this.ID);" & vbCrLf)
				   GetCommonSlideArticle = GetCommonSlideArticle & ("this.Url = document.getElementById(""Url"" + this.ID);" & vbCrLf)
				   GetCommonSlideArticle = GetCommonSlideArticle & ("this.Title = document.getElementById(""Title"" + this.ID);" & vbCrLf)
				   GetCommonSlideArticle = GetCommonSlideArticle & ("this.LoopShow();" & vbCrLf)

⌨️ 快捷键说明

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