<!--#include file="../fy.Function.asp"-->
<!--#include file="../../fy_inc/cls_pageview.asp"-->
<!--#include file="../include/fy.F.asp"-->
<!doctype html>
<html>
<head>
<meta charset="gb2312">
<title>文章管理</title>
<link rel="stylesheet" type="text/css" href="../css/base.css">
<link rel="stylesheet" type="text/css" href="../css/content.css">
</head>
<body>
<%	Dim ShowErr,ModeID,ModeName,Item,pages,urlact,ClassID,Action,ID,Page,url
	Dim LmID,gltj,title
	 
	 ModeID = ChkNumeric(Request("ModeID"))
	 if ModeID=0 or ModeID="" Then ModeID=1
	 ModeName= fycms.ACT_C(ModeID,1) 
	 ClassID=ChkNumeric(Request("ClassID"))
	 LmID=ClassID
	 
 	 Page=ChkNumeric(Request("page"))
	 If Page = 0 Then Page = 1
	 ID = Request("ID")
	 title=request("title")
	 Action=Request("Action")

  	 urlact = "Action="&Action&"&title="&title&"&ClassID="&ClassID&"&ModeID="&ModeID&"&page="&Page
  	 url = "&ClassID="&LMID&"&ModeID="&ModeID&"&page="&Page

	
'========================管理操作=======================================	
If request("A") <> "" Then
	dim cs
	cs=request("cs")
			If ChkNumeric(ID)>0  Then
			If Not fycms.fycms_QXYZ(ModeID,"3",ACT_CL(ID)) Then   Call fycms.Alert("对不起，你没有该栏目下的相应操作权限","")
			Else
				If ClassID<>"" Then
				If Not fycms.fycms_QXYZ(ModeID,"3",ClassID) Then   Call fycms.Alert("对不起，你没有该栏目下的相应操作权限","")
				End If
			End If
			select case request("A")
				case "top"	'置顶
					Conn.execute("Update "&fycms.ACT_C(ModeID,2)&" set Istop="&cs&" where ID ="&ID&"")
				case "tt"	'头条、推荐
					fycms.ActExe("Update "&fycms.ACT_C(ModeID,2)&" set ATT="&cs&" where ID ="&ID&"")
				case "hd"	'幻灯
					Conn.execute("Update "&fycms.ACT_C(ModeID,2)&" set Slide="&cs&" where ID ="&ID&"")
				case "pl"	'评论
					Conn.execute("Update "&fycms.ACT_C(ModeID,2)&" set rev="&cs&" where ID ="&ID&"")
				case "sh"	'审核
					Conn.execute("Update "&fycms.ACT_C(ModeID,2)&" set isAccept="&cs&" where ID ="&ID&"")
				case "del"	'删除、清空、批量删除
					Call del(cs)
				case "isAccept"	'批量审核
					Call isAccept()
				case "NoAccept"	'批量取消审核
					Call NoAccept()
				case "tg"	'批量退稿
					Call tg()
				case "px"	'批量退稿
					Call px()
 			end select
			set conn=Nothing
			response.Redirect("?"&urlact)
			die ""
			
End If




'=======================================================================

	Sub px()
			Dim i,OrderID
 			ID = Split(fycms.s("AFID"),","):OrderID = Split(fycms.s("OrderID"),",")
			 For I = LBound(ID) To UBound(ID)
 					Conn.execute("Update "&fycms.ACT_C(ModeID,2)&"  set OrderID="&ChkNumeric(OrderID(I))&" where    ID = "&ChkNumeric(ID(I))&"")
			Next 
			set conn=Nothing
  		response.Redirect("?"&urlact)
	End sub



	sub del(cs)
 		Dim Rsd,Rsp
		IF ID = "" Then
 			Call fycms.ActErr("请先选定文章！","fy_Mode/fy.Manage.asp?"& pages,"1")
			response.End
		End IF
		IF  fycms.ACT_C(ModeID,7) = 0 Then '回收站删除
			ID = Split(ID,",")
			 For I = LBound(ID) To UBound(ID)
				If  fycms.fycms_QXYZ(ModeID,"4",ACT_CL(ID(i))) Then 
					Conn.execute("Update "&fycms.ACT_C(ModeID,2)&" set delif=1 where ID = "&ID(I)&"")
				End If 	
			Next 
			set conn=Nothing
			Call fycms.ActErr("文章已经移动到回收站,必要时您可以从回收站中恢复","fy_Mode/fy.Manage.asp?"& urlact,"")
		Else'彻底删除
			ID = Split(ID,",")
			 For I = LBound(ID) To UBound(ID)
				set Rsd=fycms.ActExe("Select * from "&fycms.ACT_C(ModeID,2)&"  Where ID=" & ID(I) & "")
				If rsd.eof And rsd.bof Then
					Call fycms.ActErr("参数错误","","1")
 				Else
					If  fycms.fycms_QXYZ(ModeID,"4",Rsd("classid")) Then  
						Set Rsp = server.CreateObject("adodb.recordset")'删除图片
						Rsp.open "Select * from Upload_fy Where aid=" & ID(I) & " and modeid="&ModeID&"", conn, 1, 3
						If Not  rsp.eof  Then
							Do While Not rsp.eof
							Call fycms.DeleteFile(Rsp("UpfileDir"))
							Conn.execute("Delete from Upload_fy  Where id= "&Rsp("id"))
							rsp.movenext
							loop
						End If 
						Dim Tmps,TmpUs 
						If Right(fycms.ACT_C(ModeID,10),1)<>"/" Then 
								Call fycms.DeleteFile(fycms.ActSys&fycms.ACT_C(ModeID,6)&Rsd("FileName")&fycms.ACT_C(ModeID,11))
						Else
						Call fycms.DeleteFile(fycms.ActSys&fycms.ACT_C(ModeID,6)&Rsd("FileName")&"/Index"&fycms.ACT_C(ModeID,11))
						End If 
						classid=Rsd("classid")
						Conn.execute("Delete from "&fycms.ACT_C(ModeID,2)&"  Where ID=" & ID(I) & "")
			
						Dim artcount
						artcount=fycms.actexe("select count(id) from  "&fycms.ACT_C(ModeID,2)&" where delif=0 and  isAccept=0 and classid="&classid)(0)
						fycms.actexe("Update class_fy set artcount="&artcount&" where classid="&classid)

						artcount=fycms.actexe("select count(id) from  "&fycms.ACT_C(ModeID,2)&" where delif=0 and  isAccept=0 ")(0)
						fycms.actexe("Update mode_fy set artcount="&artcount&" where modeid="&modeid)



						Conn.execute("Delete from Comment_fy  Where ID=" & ID(I) & " and ModeID="&ModeID&"")
						Conn.execute("Delete from Digg_fy  Where NewsID=" & ID(I) & " and ModeID="&ModeID&"")
					End If 
				End If 
		 	 Next
				Set  conn=nothing	
		End If
		Call fycms.ActErr("文章已经彻底删除！","fy_Mode/fy.Manage.asp?"& urlact,"")
  	End sub
%>

<%	sub isAccept()'批量审核通过
		Dim AcceptID,Rss
		If ID<>"" Then 
			AcceptID = ID
		Else 
			AcceptID =Request.Form("ID")
		End If
		'Dim AcceptID,Rss:AcceptID =Request.Form("ID")
		IF AcceptID = "" Then
			Call fycms.ActErr("请先选定文章！","1")
			response.End
		End IF		
			 AcceptID = Split(AcceptID,",")
			 For I = LBound(AcceptID) To UBound(AcceptID)
				 If  fycms.fycms_QXYZ(ModeID,"3",ACT_CL(AcceptID(i))) Then '只通过该栏目下的文章.无权限的将忽略
					 Set Rss= fycms.ACTEXE("Select userid,Title From "&fycms.ACT_C(ModeID,2)&" Where  ID=" & CLng(AcceptID(i)))
					' Call fycms.isAcceptOK(Rss(1),Rss(2),ModeID)
				 	 Conn.execute("Update "&fycms.ACT_C(ModeID,2)&" set isAccept=0 where ID = "&CLng(AcceptID(i))&"")
				 End If 
			 Next
		set conn=nothing
		'urlact = "Action=ListisAccept&ClassID="&ClassID&"&Page="&Page&"&ModeID="&ModeID
		response.Redirect("?"&urlact)
	End sub

	sub NoAccept()'批量取消审核
		Dim NoAcceptID
		If ID<>"" Then 
			NoAcceptID = ID
		Else 
			NoAcceptID =Request.Form("ID")
		End If
 		'Dim NoAcceptID:NoAcceptID =Request.Form("ID")
		IF NoAcceptID = "" Then
 			Call fycms.ActErr("请先选定文章！","fy_Mode/fy.Manage.asp?"& urlact,"1")
			.End
		End IF		
		 NoAcceptID = Split(NoAcceptID,",")
		 For I = LBound(NoAcceptID) To UBound(NoAcceptID)
			If  fycms.fycms_QXYZ(ModeID,"3",ACT_CL(NoAcceptID(i))) Then '只通过该栏目下的文章.无权限的将忽略
				Conn.execute("Update "&fycms.ACT_C(ModeID,2)&" set isAccept=2 where ID = "&NoAcceptID(i)&"")
 			End If 
		 Next
 		set conn=nothing
		response.Redirect("?"&urlact)
	End sub

	sub tg()'批量退稿
		Dim TG_ID:TG_ID =Request.Form("ID")
		IF TG_ID = "" Then
			Call fycms.ActErr("请先选定文章！","1","")
			.End
		End IF		
		 TG_ID = Split(TG_ID,",")
		 For I = LBound(TG_ID) To UBound(TG_ID)
			If  fycms.fycms_QXYZ(ModeID,"3",ACT_CL(TG_ID(i))) Then '只通过该栏目下的文章.无权限的将忽略
				Conn.execute("Update "&fycms.ACT_C(ModeID,2)&" set isAccept=3 where ID = "&TG_ID(i)&"")
			End If 
		 Next
		set conn=nothing
		response.Redirect("?"&urlact)
	End sub






	Function  ACT_CL(ID)
		ACT_CL=fycms.ACTEXE("Select ClassID From "&fycms.ACT_C(ModeID,2)&" Where ID=" & ID)(0)
	End Function  



 
	 %>
<div class="content"> 
	<div class="breadnav"><%= ModeName %>系统管理 &gt;&gt; <%= ModeName %>管理</strong>
  选择模型:<select name='ModeID' style='width:110px' onChange="location=this.value;">
  <%=AF.ACT_URL_Mode(ModeID,"&ClassID="&request("ClassID"))%>
  </select></div>
    <div class="opers">
  
<%= ModeName %>选项：<a href="fy.Add.asp?Action=add&ModeID=<%=ModeID%>&ClassID=<%=request("ClassID")%>"  class="btn"><font color=red>添加信息</font></a>
<a href="?ModeID=<%=ModeID%>"  class="btn">所有文章</a> 
<a href="?ModeID=<%=ModeID%>&Action=ListisAccept&ClassID=<%=ClassID%>" class="btn <%If Action="ListisAccept" Then echo " btn_primary" %>">已审</a>
<a href="?ModeID=<%=ModeID%>&Action=ListNoAccept&ClassID=<%=ClassID%>"  class="btn  <%If Action="ListNoAccept" Then echo " btn_primary" %>">未审</a>
<a href="?ModeID=<%=ModeID%>&Action=Listcg&ClassID=<%=ClassID%>" class="btn <%If Action="Listcg" Then echo " btn_primary" %>">草稿</a>
<a href="?ModeID=<%=ModeID%>&Action=Listtg&ClassID=<%=ClassID%>" class="btn <%If Action="Listtg" Then echo " btn_primary" %>">退稿</a>
<a href="?ModeID=<%=ModeID%>&Action=Lististop&ClassID=<%=ClassID%>" class="btn <%If Action="Lististop" Then echo " btn_primary" %>">置顶<%= ModeName %></a>
<a href="?ModeID=<%=ModeID%>&Action=Listpic&ClassID=<%=ClassID%>" class="btn <%If Action="Listpic" Then echo " btn_primary" %>">图片<%= ModeName %></a>
<a href="?ModeID=<%=ModeID%>&Action=Slide&ClassID=<%=ClassID%>" class="btn <%If Action="Slide" Then echo " btn_primary" %>">幻灯</a>
    </div>

    <div class="opers">
  
<form name='form3' Action='?Action=t&ClassID=<%=Request.QueryString("ClassID")%>' method='post'>
		  <input type="hidden" id="ModeID" name="ModeID" value="<%=ModeID%>">
		  <input type="hidden" id="ClassID" name="ClassID" value="<%=Request.QueryString("ClassID")%>">

       请选择栏目： 
          
<select name="ClassID" size="1" onChange="javascript:window.location=this.options[this.selectedIndex].value;">
<option value='?ModeID=<%=ModeID%>' >全部</option>
      <% 	 echo Classmake(ModeID)
		%>
    </select>        
        <td width='70'>
          关键字：         
           
          	<input type='text' name='title' value='' class="Ainput" style='width:150'>  </td>
          
            <input  name="Submit"  type="submit" class="btn btn_btn" value="  搜索  ">
		  
        
        </form>


    </div>





    <table width="100%" border="0" cellspacing="0" cellpadding="0">
   <form name="Article" method="post" Action="?ModeID=<%= ModeID %>">
 <thead>
      <tr>
      <th>ID</th><th>选中</th><th>排序</th><th>文章标题</th><th> 	栏目</th><th>录入者</th><th>点击数</th><th>审核</th><th>生成</th><th>管理操作</th>
	  </tr>
    </thead>

	<%

	Dim strLocalUrl
	strLocalUrl = request.ServerVariables("SCRIPT_NAME")
	Dim intPageNow
	intPageNow = request("page")
	Dim intPageSize, strPageInfo
	intPageSize = 20
	Dim arrinfo, i
	Dim sql, sqlCount,Sqls
	 pages = "Action="&Request("Action")&"&title="& request("title")&"&ClassID="&ClassID&"&UserID="& request("UserID")&"&ModeID="&ModeID&"&page"
	'If  ClassID<>"" Then ClassID=" classid='"&Request.QueryString("ClassID")&"' and  "
	If  LmID<>"0" Then gltj=" classid="&LmID&" and  "
	
	Select Case Request.QueryString("Action")
 		Case "ListisAccept"
			Sqls = "  where "&gltj&"  isAccept=0 and delif=0 "
		Case "ListNoAccept"
			Sqls = "  where "&gltj&"  isAccept=2 and delif=0 "
		Case "Listcg"
			Sqls = "  where "&gltj&"  isAccept=1 and delif=0 "
		Case "Listtg"
			Sqls = "  where "&gltj&"  isAccept=3 and delif=0 "
		Case "Lististop"
			Sqls = "  where "&gltj&"  istop=1 and delif=0 "
		Case "Listpic"
			Sqls = "  where "&gltj&"   picurl<>'' and delif=0 "
		Case "Slide"
			Sqls = "  where "&gltj&"  Slide=1 and delif=0 "
		Case "sh"
			Sqls = "  where "&gltj&"  isAccept>0 and delif=0 "
		Case "MyArticle"
			Sqls="  where "&gltj&"  ArticleInput='"&RSQL(Request.Cookies(fycmsN)("AdminName"))&"' and delif=0 "
		Case "UserID"
			Sqls="  where "&gltj&"  ArticleInput='"&RSQL(request("UserID"))&"' and delif=0 "
		Case "t"
			If ClassID="0" Then 
				Sqls = " where title Like '%" & RSQL(request("title")) & "%' "
			Else 
				Sqls = " where classid="&LmID&" and title Like '%" & request("title") & "%' "
			End If 
		Case Else
			Sqls = " where delif=0 and  isAccept=0 "
			pages = "ModeID="&ModeID&"&page"
	End Select


 

		sql = "SELECT [ID], [Title], [ArticleInput], [Hits], [isAccept], [IStop],  [ClassID], [FileName],[ACTLINK],[Ismake],[InfoPurview],[ReadPoint],[picurl],[Slide],[ATT],[rev],[UserID],[OrderID]" & _
		" FROM ["&fycms.ACT_C(ModeID,2)&"]" &Sqls& _
		"   ORDER BY [IsTop] DESC,[OrderID] desc,[ID] DESC "
     	sqlCount = "SELECT Count([ID])" & _
			" FROM ["&fycms.ACT_C(ModeID,2)&"]"&Sqls
		Dim clsRecordInfo
		Set clsRecordInfo = New Cls_PageView
			clsRecordInfo.intRecordCount = 2816
			clsRecordInfo.strSqlCount = sqlCount
			clsRecordInfo.strSql = sql
			clsRecordInfo.intPageSize = intPageSize
			clsRecordInfo.intPageNow = intPageNow
			clsRecordInfo.strPageUrl = strLocalUrl
			clsRecordInfo.strPageVar = pages
		clsRecordInfo.objConn = Conn		
		arrinfo = clsRecordInfo.arrinfo
		strPageInfo = clsRecordInfo.strPageInfo
		Set clsRecordInfo = nothing

	 
		Dim bgColor
		If IsArray(arrinfo) Then
			For i = 0 to UBound(arrinfo, 2)
			Dim Rs ,ClassName,ClasseName
			  Set Rs = server.CreateObject("adodb.recordset")
					Rs.Open "select ClassName,ClasseName from Class_fy where ClassID="& arrinfo(6,i) &"",Conn,1,1
					if  Not Rs.bof then
							ClassName =Rs("ClassName")
							ClasseName =Rs("ClasseName")
					Else
							ClassName ="<font color=red>程序出现错误</font>"
							ClasseName ="<font color=red>意外错误</font>"
					End if 
	%>
      <tr>
      <td><%= arrinfo(0,i) %></td>
	  <td>
	  <input type="checkbox" name="ID" value="<%= arrinfo(0,i) %>">	  </td>
      <td>
	  <input name="OrderID" type="text" class="tinput" id="OrderID" value="<%= arrinfo(17,i) %>" size="4" maxlength="50">
	  <input name="AFID" type="hidden" id="AFID" value="<%= arrinfo(0,i) %>">
	  </td>
      <td ><a target="_blank" href="<%
	  ID = arrinfo(0,i)
	  
	  If arrinfo(8,i) = 1 Then
		echo arrinfo(7,i)
		Else
	 echo  fycms.actsys&fycms.act_c(ModeID,5)&"?id=" &arrinfo(0,i) 
	  End if%>"><%= arrinfo(1,i) %></a>&nbsp;<%
	  If arrinfo(12,i)<>"" Then 
			echo "<font color=red title=""图片文章""  style=""cursor:default"">图</font>"
	  End If 
	  If arrinfo(13,i)=1 Then 
			echo "&nbsp;<font color=green title=""幻灯片文章""  style=""cursor:default"">幻</font>"
	  End If 

	  If arrinfo(8,i)=1 Then 
			echo "&nbsp;<font color=green title=""转向链接""  style=""cursor:default"">转</font>"
	  End If 

	  %></td>
      
	  <td align="center">
	 <a href="?Action=t&ModeID=<%=ModeID%>&ClassID=<%= arrinfo(6,i) %>"><%= classname %></a>	  </td>
    
	  <td align="center">
	  <a href="?Action=UserID&ModeID=<%=ModeID%>&UserID=<%= arrinfo(2,i) %>"><%= arrinfo(2,i) %></a></a></td>
  
      <td><%= arrinfo(3,i) %></td>
	 
  
	 
      <td><% '0已审  1草稿  2待审 3退稿
	  
	   Select Case(arrinfo(4,i))
	  			Case 0
					echo "<a title='取消审核' href='?A=sh&cs=2&ID="&ID&url&"'>已审</a>"	
				Case 1
					echo "<a title='置为待审' href='?A=sh&cs=2&ID="&ID&url&"'><font color=red>草稿</font></a>"
				Case 2
					echo "<a title='置为已审' href='?A=sh&cs=0&ID="&ID&url&"'><font color=red>待审</font></a>"	
				Case 3
					echo "<a title='置为待审' href='?A=sh&cs=2&ID="&ID&url&"'><font color=red>退稿</font></a>"
		 End Select	
	   %></td>
	   
      <td>
	<%IF arrinfo(9,i) = 1 Then 
	  echo "<font color=red><b>√</b></font>"
	  Else
	  echo "<font color=red><b>×</b></font>"
	  End If %>
	  </td>
      <td  colspan="2">
<%if request.QueryString("Action") ="ListNoAccept" then %>
		  <a href="fy.Add.asp?Action=edit&fycms=sh&ID=<%= arrinfo(0,i) %><%=url%>">审核</a>
 <%if  fycms.ACT_C(ModeID,7)="1" then  %>
      <a href="?A=del&ID=<%= arrinfo(0,i) %><%=url%>" onClick="return confirm('确认删除此文章吗?此操作不可恢复')">删除</a>
      <%Else  %>
      <a href="?A=del&ID=<%= arrinfo(0,i) %><%=url%>" onClick="return confirm('确认删除此文章吗?删除后您可以从回收站还原!')">删除</a>
      <%end if%>			  <a href="?A=sh&cs=3&ID=<%= arrinfo(0,i) %><%=url%>">退稿</a> 
	    <%Else  %>
	  <a href="fy.Add.asp?Action=edit&ID=<%= arrinfo(0,i) %>&ModeID=<%=ModeID%>">修改</a>
	  <a href="allpic.asp?Action=list&aid=<%= arrinfo(0,i) %>&ModeID=<%=ModeID%>">多图管理</a>
	  <a href="fy.diy.listm.asp?A=L&aid=<%= arrinfo(0,i) %>&ModeID=<%=ModeID%>">单字段</a>
   <%if  fycms.ACT_C(ModeID,7)="1" then  %>
      <a href="?A=del&ID=<%= arrinfo(0,i) %><%=url%>" onClick="return confirm('确认删除此文章吗?此操作不可恢复')">删除</a>
      <%Else  %>
      <a href="?A=del&ID=<%= arrinfo(0,i) %><%=url%>" onClick="return confirm('确认删除此文章吗?删除后您可以从回收站还原!')">删除</a>
      <%end if%>	  
	  
	  
 	<% if arrinfo(5,i) = 1 Then %>
	  <b>
	  <a title="取消置顶" href="?A=top&cs=0&ID=<%= arrinfo(0,i) %><%=url%>">
		<font color="#008000">顶</font></a></b>
   <% ELse
   	%><a title="置顶" href="?A=top&cs=1&ID=<%= arrinfo(0,i) %><%=url%>">顶</a> 
<%
	 end if%> 
		 
		 <% if arrinfo(14,i) = 1 Then %>
	  <b>
	  <a title="取消头条" href="?A=tt&cs=0&ID=<%= arrinfo(0,i) %><%=url%>">
		<font color="#FF0000">头</font></a></b>
   <% ELse
   	%><a title="头条" href="?A=tt&cs=1&ID=<%= arrinfo(0,i) %><%=url%>">头</a> 
	<%
	 end if%>
	
	 <% if arrinfo(12,i)<>"" Then %>
		 <% if arrinfo(13,i) = 1 Then %>
		<a title="取消幻灯" href="?A=hd&cs=0&ID=<%= arrinfo(0,i) %><%=url%>"><b>
			<font color="#0066FF">幻</font></b></a>
	   <% ELse%>
		<a title="幻灯" href="?A=hd&cs=1&ID=<%= arrinfo(0,i) %><%=url%>">幻</a> 
		<%end if%>
	
	<%Else %>

	<font  disabled="disabled">幻 </font>
	<%end if%>
	 
	 <% if arrinfo(15,i) = 1 Then %>
	  <b>
	  <a title="关闭评论" href="?A=pl&cs=0&ID=<%= arrinfo(0,i) %><%=url%>">
		<font color="#FF00FF">评</font></a></b>
   <% ELse
   	%><a title="允许评论" href="?A=pl&cs=1&ID=<%= arrinfo(0,i) %><%=url%>">评</a> 
<%
	 end if%>
		 
		 
		 <%End If  %>
 	  </td>
      </tr>	<% 
	Next
	End If
	%>


    <tr>
      <td height="30" colspan="11" class="tl">
		<label for="chkAll"><input name="ChkAll" type="checkbox" id="ChkAll" onClick="CheckAll(this.form)" value="checkbox">选中本页显示的所有文章</label>
        <select name="A">
			<option value="0">请选择操作选项</option>
			<option value="del">批量删除</option>
  			<option value="isAccept">批量审核</option>
			<option value="NoAccept">取消审核</option>
 		</select>
		<input class="btn btn_btn" type="submit" name="submit_button1" value="执行操作" onClick="return confirm('您确定执行该操作吗?');">
 		<input class="btn btn_btn" type="button" name="submit_button3" value="批量排序" onClick="px()">
		<input class="btn btn_btn" type="button" name="submit_button3" value="批量设置" onClick="yd()">
        <input class="btn btn_btn" type="button" name="submit_button3" value="生成HTML" onClick="make()">
		排序数字越大越排前面
 	  <%if request.QueryString("Action") ="sh" then %>
	  <input type="button" class="btn btn_primary" name="tg" value=" 退稿 " onClick="tgpost()">
<%end if %>
	   	  </td>
    </tr>

 
	</form>

    </table>
    <div class="pagelist">
    	<%= strPageInfo%>
   </div>
</div>


<script type="text/javascript">
<!--

function GetCheckfolderItem()
{
	var allSel='';
	if(document.Article.ID.value) return document.Article.ID.value;
	for(i=0;i<document.Article.ID.length;i++)
	{
		if(document.Article.ID[i].checked)
		{
			if(allSel=='')
			allSel=document.Article.ID[i].value;
			else
			allSel=allSel+","+document.Article.ID[i].value;
		}
	}
	return allSel;
}


	function yd()
{
 	var ID = GetCheckfolderItem();
	if(ID=='') {
		alert("至少要选择一篇文章");
		return false;
	}
		location = "fy.SetArticle.asp?A=Del&ModeID=<%=Modeid%>&ID="+ID+"";
}

 function px()
{
	var form=document.Article;
	form.action="?A=px&ModeID=<%=Modeid%>&page=<%=request("page")%>";
    form.submit();
}

function CheckAll(form)
		  {  
		 for (var i=0;i<form.elements.length;i++)  
			{  
			   var e = Article.elements[i];  
			   if (e.name != 'ChkAll'&&e.type=="checkbox")  
			   e.checked = Article.ChkAll.checked;  
		   }  
	  }

function make()
{
 	var ID = GetCheckfolderItem();
	if(ID=='') {
		alert("至少要选择一篇文章");
		return false;
	}
		location = "../include/fy.C.asp?RefreshFlag=Make&ModeID=<%=Modeid%>&ID="+ID+"";
}

function tgpost()
{
 	var ID = GetCheckfolderItem();
	if(ID=='') {
		alert("至少要选择一篇文章");
		return false;
	}
		location = "?A=tg&ID="+ID+"";
}

//-->
</script>
 <%	Function  Classmake(ModeID)
		 Dim FolderRS,selected
		 Set FolderRS = fycms.actexe("Select * from Class_fy where rootid=0 and ACTLINK=1 Order by Orderid desc,ID desc")
		 IF FolderRS.Eof Then
		 Classmake=("<option value='?ModeID="&ModeID&"'>还没有添加任何栏目</option>")
		 Else 
		 do while Not FolderRS.Eof
			If Request("ClassID")=FolderRS("ClassID") Then selected=" selected=""selected""" Else selected=""
			 Classmake=Classmake&"<option value='?Action="&Action&"&ModeID="&FolderRS("ModeID")&"&ClassID="&FolderRS("ClassID")&"' "&selected&">"& FolderRS("ClassName") & "</option>"& vbCrLf
			 Classmake=Classmake&(GetChildClassList(FolderRS("ClassID"),""))
			 FolderRS.MoveNext
		 Loop
		 End IF

	 End  Function 
	 Function GetChildClassList(ClassID,Str)
	       Dim Sql,RsTempObj,TempImageStr,ImageStr,CheckStr,selected
	        TempImageStr = "&nbsp;└"
	        Sql = "Select * from Class_fy where rootid=" & ClassID & "  and ACTLINK=1"
	        ImageStr = Str & "&nbsp;└"
	        Set RsTempObj = Conn.Execute(Sql)
	            do while Not RsTempObj.Eof
					If Request("ClassID")=RsTempObj("ClassID") Then selected=" selected=""selected""" Else selected=""
					   GetChildClassList = GetChildClassList  & "<option value='?Action="&Action&"&ModeID="&RsTempObj("ModeID")&"&ClassID="&RsTempObj("ClassID")&"' "&selected&">"& ImageStr & TempImageStr &" "& RsTempObj("ClassName")& "</option>"& vbCrLf
					   GetChildClassList = GetChildClassList & GetChildClassList(RsTempObj("ClassID"),ImageStr)
					   RsTempObj.MoveNext
	           loop
	       Set RsTempObj = Nothing
	 End Function 
%>
</body>
</html>
