<%
Function GetListForno(ModeID,ArticleSort,ATT,ClassID,SubClass,ListNumber,TitleLen,skwebIF,Before,Content,PicA,PicNum,PicContentNum,PictitleNum,ForClassContent,DateForm,ContentLen,noforcont,cont2) 				
If InStr(noforcont, "#Classfor") > 0  Then
 noforcont= Replace(noforcont,"#Classfor",GetListFor(ModeID,ArticleSort,ATT,ClassID,SubClass,ListNumber,TitleLen,skwebIF,Before,Content,PicA,PicNum,PicContentNum,PictitleNum,ForClassContent,DateForm,ContentLen))
End If
If InStr(noforcont, "#Classtow") > 0  Then
 noforcont= Replace(noforcont,"#Classtow",GetListFor(ModeID,ArticleSort,ATT,ClassID,SubClass,ListNumber,TitleLen,skwebIF,cont2,Content,PicA,PicNum,PicContentNum,PictitleNum,ForClassContent,DateForm,ContentLen))
End If
 GetListForno = GetListForno&noforcont			
End Function

Function GetListFor(ModeID,ArticleSort,ATT,ClassID,SubClass,ListNumber,TitleLen,skwebIF,Before,Content,PicA,PicNum,PicContentNum,PictitleNum,ForClassContent,DateForm,ContentLen)

			If  Application(SkcmsCookies & "SK_Data_classification")  =  "noCURRENT" Then GetListFor=SKCONN14:Exit Function 
				 Dim  SqlStr,RS,skwebSQL,n,k,Sqlstrs,Pmode,PicContent,ForClassContents
				 Dim  Parameter,MoreLinkStr,skweb_IF,skweboa_ATT,RSs,skweb_SQL,skweb
 				  If ModeID<>"0" Then Pmode=" And ModeID="&ModeID&" "
					If  ClassID ="0" Then '查询所有
						SqlStr = "Select ClassID,ModeID,ParentID,urlname From Class_skweb Where  ParentID='0' and skweblink=1 "&Pmode&"   Order by Orderid asc,ID asc "
					ElseIf ClassID ="1" Then 
						SqlStr = "Select ClassID,ModeID,ParentID,urlname From Class_skweb Where  ParentID='" & Application(SkcmsCookies & "classid") & "'   "&Pmode&"   Order by Orderid asc,ID asc"
					Else
						If InStr(ClassID, ",") > 0 Then
							SqlStr = "Select ClassID,ModeID,ParentID,urlname From Class_skweb Where   ClassID IN (" & ClassID & ")   "&Pmode&"   Order by Orderid asc,ID asc"
						Else
							SqlStr = "Select ClassID,ModeID,ParentID,urlname From Class_skweb Where  ClassID = '" & ClassID & "'    "&Pmode&"   Order by Orderid asc,ID asc"
						End If 
					End If  		
				 Set RS=skweboa.SK_axe(SqlStr)
 				 Dim TempStrs,outerfors
 				 If RS.EOF Then	 GetListFor="":RS.Close:Set RS=Nothing:Exit Function
				 skwebSQL=RS.GetRows(-1):Set RS = Nothing
				 Dim skwebNum:skwebNum=Ubound(skwebSQL,2)
					Dim I,jj:N=0:jj=1
 						N=0
 						 For K=0 To skwebNum
							 outerfors=Before
 							 If InStr(ClassID, ",") > 0 Then
								 Parameter="ClassID In (" & skweboa.SK_CID_temp(skwebSQL(0,N)) & ") And "
							 Else
								If CBool(SubClass)=True Then 
								 Parameter="ClassID In (" & skweboa.SK_CID_temp(skwebSQL(0,N)) & ") And"
								Else 
								 Parameter="ClassID='" & Replace(skwebSQL(0,N),"'","") & "' And"
								End If 
							 End If 
 							 If skwebIF<>"" Then skweb_IF = "  "&skwebIF
							 If ATT="0" Then  skweboa_ATT="" Else skweboa_ATT = " And ATT="&ATT
 							 If Ucase(Left(Trim(ArticleSort),2))<>"ID" Then  ArticleSort=ArticleSort & ",ID Desc"
 							 Sqlstrs="Select TOP " & ListNumber & " ID,ClassID,Title,UpdateTime,skwebLink,FileName,skadminuserpurview,skReadthecontent,PicUrl,Intro,Content,SK_copysource,SK_The_author,KeyWords,ATT,IStop,Hits,UMID  "&skweboa.SK_Custom_folder(skwebSQL(1,N))&" From "&skweboa.SK_Mroot(skwebSQL(1,N),2)&"  Where " & Parameter & " isAccept=0 AND delif=0  and  DateDiff(""d"",UpdateTime," & NowString & ")>=0   " & skweboa_ATT &skweb_IF& "   ORDER BY IsTop Desc," & ArticleSort
							 Set RSs=skweboa.SK_axe(SqlStrs)
  							 TempStrs=skweb_P_Code(Sqlstrs,ContentLen,TitleLen,Content,skwebSQL(1,N),DateForm)
		 	     		 	    	    
 			If PicA=1 Then 
								 Dim PicSQL,rsss,Pic_SQL,pi 
								 
								 PicSQL="Select TOP " & PicNum & " ID,ClassID,Title,UpdateTime,skwebLink,FileName,skadminuserpurview,skReadthecontent,PicUrl,Intro,Content,SK_copysource,SK_The_author,KeyWords,ATT,IStop,Hits,UMID "&picgg&"  From "&skweboa.SK_Mroot(skwebSQL(1,N),2)&"  Where " & Parameter & " isAccept=0 and picurl<>''  and  DateDiff(""d"",UpdateTime," & NowString & ")>=0    AND delif=0 " & skweboa_ATT &skweb_IF& " ORDER BY IsTop Desc," & ArticleSort
								 Set RSss=skweboa.SK_axe(PicSQL)
 								 PicContent=""
								 If Not RSss.eof Then 
									 Pic_SQL=RSss.GetRows(-1):Set RSss = Nothing
									 For pi=0 To Ubound(Pic_SQL,2)
 									  ForClassContents=ForClassContent
 
									   ForClassContents = Replace(ForClassContents, "#Link", skweboa.SK_pageaddress(skwebSQL(1,N),Pic_SQL(1,pi),Pic_SQL(0,pi),Pic_SQL(4,pi),Pic_SQL(5,pi),Pic_SQL(6,pi),Pic_SQL(7,pi)))
									   ForClassContents = Replace(ForClassContents, "#PicUrl", Pic_SQL(8,pi))
									   ForClassContents = Replace(ForClassContents, "#Title", skweboa.GetStrValue(Pic_SQL(2,pi),PictitleNum)) 
								       ForClassContents = Replace(ForClassContents, "#AutoID",pi+1)				   
									   
				If Trim(Pic_SQL(9,pi)) <> "" Then 
					   ForClassContents = Replace(ForClassContents, "#Intro", skweboa.GetStrValue(skweboa.CloseHtml(Pic_SQL(9,pi)),PicContentNum))
				Else
	ForClassContents = Replace(ForClassContents, "#Intro", skweboa.ReplaceTrim(skweboa.GetStrValue(Replace(Replace(Replace(skweboa.CloseHtml(Pic_SQL(10,pi)), vbCrLf, ""), "[NextPage]", ""), "&nbsp;", ""),PicContentNum)))
				End If 
									   PicContent=PicContent&ForClassContents
									 Next 
 										ForClassContents=""
 									 Else 
										PicContent=""
										ForClassContents=""
								  End If 
				End If 
		 
							 							 
 							If InStr(outerfors, "#ClassName") > 0  Then
								 outerfors= Replace(outerfors,"#ClassName",skweboa.skCMSlist(skwebSQL(0,N),2))
							End if
							
							If InStr(outerfors, "#Classtitle") > 0  Then
								 outerfors= Replace(outerfors,"#Classtitle",skweboa.skCMSlist(skwebSQL(0,N),25))
							End if
								
										If InStr(outerfors, "#ClassID") > 0  Then
								 outerfors= Replace(outerfors,"#ClassID",skwebSQL(0,N))
							End if	
							
 							If InStr(outerfors, "#ClassLink") > 0  Then
								 outerfors= Replace(outerfors,"#ClassLink",skweboa.SK_MYListname(skwebSQL(0,N)))
							End If
							
						    If InStr(outerfors, "#Classinfo") > 0  Then
								 outerfors= Replace(outerfors,"#Classinfo",skweboa.skCMSlist(skwebSQL(0,N),9))
							End if
							
						    If InStr(outerfors, "#ClassAD") > 0  Then
								 outerfors= Replace(outerfors,"#ClassAD",skweboa.skCMSlist(skwebSQL(0,N),18))
							End if
							
						   If InStr(outerfors, "#Classimg") > 0  Then
								 outerfors= Replace(outerfors,"#Classimg",""&skweboa.skCMSlist(skwebSQL(0,N),24)&"")
							End if
							
	  						If InStr(outerfors, "#Classico") > 0  Then
						   outerfors = Replace(outerfors, "#Classico",skweboa.skCMSlist(skwebSQL(0,N),28))
						   End if	
					 
							
 						If InStr(outerfors, "#ModID") > 0  Then
 							If  N Mod 2 =0 Then ModID=0 Else ModID=1
						    outerfors = Replace(outerfors, "#ModID",ModID)
						End If
						
 		
		 					 If InStr(outerfors, "#Classcount") > 0  Then
								 outerfors= Replace(outerfors,"#Classcount",skweboa.SK_LISTStatistical_model_data(skwebSQL(0,N)))
							End If	
			
			 
			
			
						    outerfors= Replace(outerfors,"#outerfor",TempStrs)
						    outerfors= Replace(outerfors,"#subpic",PicContent)
							outerfors = Replace(outerfors, "#AutoID",Jj)
 
							GetListFor =GetListFor&vbCrLf&Replace(outerfors,"#outerfor",TempStrs)
	 
							N=N+1:jj=jj+1
						 Next 
  		End Function
%>