<!--#include file="../../fy.Function.asp"-->

 <%
 Dim islist,isliststr,tablestr,topnum,i
 Dim topnumstr,classid,classidstr,Filedstr,Filedstrarr,Filedstrs
 islist=fycms.s("islist")
 tablestr=fycms.s("table")
 topnum=ChkNumeric(fycms.s("topnum"))
 classid=fycms.s("classid")
 Filedstr=fycms.s("Fileds")

 Filedstrarr=Split(Filedstr,",")
 For i=0 To ubound(Filedstrarr)

	Filedstrs=Filedstrs&"{"&Trim(Filedstrarr(i))&"}"

 Next 
Filedstrs=LCase(Filedstrs)
Select Case islist
	Case "1"
		isliststr="fycms"
	Case "2"
		isliststr="fypage"
	Case "3"
		isliststr="fyfor:label1"
	Case Else 
		isliststr="fycms"
 End Select 
  If tablestr<>"" Then tablestr=" table="""&tablestr&"""  "

   If  topnum>0 Then topnumstr=" top="""&topnum&""" "
   If  Len(classid)<>0 Then
	 	If ChkNumeric(classid) > 0  Then 
			 classidstr=" and classid="&ChkNumeric(classid)&" "
	    Else 
			 classidstr=" and classid in("&classid&") "
	    End If 

   End If 
 'echo request.form
  
 echo " {"&isliststr&" "&tablestr&" "&topnumstr&" where=""默认条件  "&classidstr&"  "" }<br />"
 echo "	   &lt;li&gt;"&Filedstrs
 If getmode(tablestr) Then 
	echo "&lt;a href=&quot;[link]&quot;&gt;{title len=&quot;30&quot;}&lt;/a&gt; "
 End If 
 
 echo " &lt;/li&gt;  <br />"
 echo "{/"&isliststr&"} <br />"
 If islist="2" Then 
	echo "<br> <br>&lt;!-- 分页标记 --&gt;"
 	echo "{pagelist}<br> "
	echo "[index] &lt;!-- 首页 --&gt;<br> "
	echo "[pre] &lt;!-- 上一页 --&gt;<br> "
	echo "[page]&lt;a [thispage]  href=&quot;[link]&quot;&gt;[pagename]&lt;/a&gt;[/page]<br> "
	echo "&lt;a href=&quot;[nextpage]&quot;&gt;[next]&lt;/a&gt;<br> "
	echo "&lt;a href=&quot;[endlink]&quot;&gt;[end]&lt;/a&gt;<br> "
	echo "&lt;span&gt;[selectpage]&lt;/span&gt;<br> "
	echo "&lt;span&gt; [record]    [listsize]&lt;/span&gt;<br> "
	echo "{/pagelist} "	 
  End If 



 	Function getmode(mtab)
			Dim rs
			getmode=false
		  Set Rs =fycms.ACTEXE("SELECT ModeID, ModeName,ModeTable, ModeStatus, IFmake,ModeNote  FROM Mode_fy  where ModeTable='"&fycms.s("table")&"' order by ModeID asc")
 		 If Not  Rs.EOF  Then 	getmode=True
		 
	End Function 


%> 
