<!--#include file="../fy.Function.asp"-->
<!--#include file="fy.F.asp"-->
<!doctype html>
<html>
<head>
<meta charset="gb2312">
<title>fycms_生成管理</title>
<link rel="stylesheet" type="text/css" href="../css/base.css">
<link rel="stylesheet" type="text/css" href="../css/content.css">
<script type='text/javascript' src='../../fy_inc/js/time/WdatePicker.js'></script>
</head>
<body>



<%
Dim ModeID
ModeID =ChkNumeric(request.QueryString("ModeID"))
IF ModeID = 0 Then ModeID = 1
 	ConnectionDatabase
	function Classmake
		 Dim FolderRS
		 Set FolderRS = Conn.Execute("Select * from Class_fy where rootid=0 and  actlink <>2  Order by Orderid desc,ID desc")
		 IF FolderRS.Bof And FolderRS.Eof Then
		 echo("<br><li>还没有添加任何栏目!")
		 End IF
		 do while Not FolderRS.Eof
			Classmake=Classmake&"<option value="""&FolderRS("ClassID")&""" CID="&FolderRS("ClassID")&">"& FolderRS("ClassName") & "</option>"
			 Classmake=Classmake&(GetChildClassList(FolderRS("ClassID"),""))
		  FolderRS.MoveNext
		  loop
	 end function
 Function GetChildClassList(ClassID,Str)
	       Dim Sql,RsTempObj,TempImageStr,ImageStr,CheckStr
	        TempImageStr = "&nbsp;└"
	        Sql = "Select * from Class_fy where rootid=" & ClassID & " and  actlink <>2 "
	        ImageStr = Str & "&nbsp;└"
	        Set RsTempObj = Conn.Execute(Sql)
	            do while Not RsTempObj.Eof
					   GetChildClassList = GetChildClassList  & "<option value="""&RsTempObj("ClassID")&""" CID="&RsTempObj("ClassID")&">"& ImageStr & TempImageStr &" "& RsTempObj("ClassName")& "</option>"
					  GetChildClassList = GetChildClassList & GetChildClassList(RsTempObj("ClassID"),ImageStr)
		         RsTempObj.MoveNext
	           loop
	       Set RsTempObj = Nothing
 End Function %>
 <div class="content">
  	<div class="breadnav">当前位置：<a href="#">后台首页</a> >> 生成操作</div>
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" >
  


 <tr>
      <form action="fy.C.asp?RefreshFlag=New&ModeID=<%=ModeID%>" method="post">	
	  <td width="223" align="right" >选择模型：</td>
      <td colspan="2" class="tl">
	 <select name='ModeID' style='width:110px' onChange="location=this.value;">
  <%=AF.ACT_URL_Mode(ModeID,"&ClassID="&request("ClassID"))%>
  </select> 生成文章必须选择对应的模型
   </td>  </tr>
	<tr>
      <form action="fy.C.asp?RefreshFlag=New&ModeID=<%=ModeID%>" method="post">	
	  <td width="223" align="right" >发布最新上传的：</td>
      <td colspan="2"  class="tl">
	  <input id="TotalNum"  value="10" type="text"  class="Ainput"   name="TotalNum" />
篇文章
  <input class="btn btn_primary" id="Submit2" type="submit" value=" 发 布 &gt;&gt;" border="0" name="Submit2" />
   </td></form> </tr>
 
	 <tr>
    <form action="fy.C.asp?RefreshFlag=InfoID&ModeID=<%=ModeID%>" method="post"> 
	<td width="223" height="27" align="right" >按文章ID发布：</td>
      <td colspan="2"  class="tl">        
	从<input name="StartID" type="text"  class="Ainput"  id="StartID" value="1" />到
<input name="EndID" type="text" id="EndID"  class="Ainput"  value="100" />
<input class="btn btn_primary" id="SubmitID"  type="submit" value=" 发 布 &gt;&gt;" border="0" name="SubmitID" /></td>
   </form></tr>

    <tr>
      <form name="dates" action="fy.C.asp?RefreshFlag=Date&ModeID=<%=ModeID%>" method="post">
	  <td width="223" height="27" align="right" >按日期发布</td>
      <td colspan="2"  class="tl">	  
	  <input name="StartDate" type="text"   class="Ainput" id="StartDate"  value="<%=Date-1%>" size=25 maxlength="20" onClick="WdatePicker();" > 
 到 
	 			<input name="EndDate" type="text"  class="Ainput"  id="EndDate"  value="<%=Date%>" size=25 maxlength="20" onClick="WdatePicker();" >
	   的文章
	   <input class="btn btn_primary" id="SubmitID2" type="submit" value=" 发 布 &gt;&gt;" border="0" name="SubmitID2" />
	  </td></form>
    </tr>
    <tr>
      <form name="ClassFolder" action="fy.C.asp?RefreshFlag=Folder&ModeID=<%=ModeID%>" method="post">
	  <td width="223" align="right" >按文章栏目发布</td>
    
	  <td width="370"  class="tl">
	   
	  <select name="CID" size="10" multiple="multiple" id="CID" style="width:360px">
 <% 
 
 		 Dim FolderRS
		 Set FolderRS = Conn.Execute("Select * from Class_fy where ModeID="&ModeID&" and  actlink <>2  Order by Orderid desc,ID desc")
		 IF FolderRS.Bof And FolderRS.Eof Then
		 echo("<br><li>还没有添加任何栏目!")
		 End IF
		 do while Not FolderRS.Eof
			 echo "<option value="""&FolderRS("ClassID")&""" CID="&FolderRS("ClassID")&">"& FolderRS("ClassName") & "</option>"
 		  FolderRS.MoveNext
		  loop
  
 		%>
	</select>
	 
   	  </td>
      <td width="500" class="tl">
	 <input type="radio" checked="checked" id="ismakes1" name="ismake" value="1" /><label for="ismakes1">仅发布未生成过Html的文章</label>
	 <br>
	 <input type="radio"  name="ismake" id="ismakes2" value="0" /><label for="ismakes2">发布所有页面</label>
	 <br>
      		<input type=button onclick=ClassFolders() class="btn "  name=SubmitBtn value=" 发布选中栏目的文章  " />

		<font color="#FF0000"> 　 <br>
　提示：<br>
　按住"CTRL"或"Shift"键可以进行多选</font></td>
    </form>
    </tr>
    <tr>
    <form name="all" action="fy.C.asp?RefreshFlag=All&ModeID=<%=ModeID%>" method="post">
	<td width="223" align="right" >&nbsp;</td>
      <td colspan="2"  class="tl">	  
	 <input type="radio" id="ismake1" name="ismake" value="1" />
	 <label for="ismake1">仅发布未生成过Html的文章</label> 
	 <input type="radio" checked="checked"   name="ismake" id="ismake2" value="0" />
	 <label for="ismake2">发布所有页面</label>
	  <input class="btn btn_primary" type="submit" value="发布所有页面 &gt;&gt;" border="0" name="SubmitAll" />
	 </td></form> 
    </tr>
  </table>

    <table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table">
      <tr>
        <td width="223" align="right" >发布全部栏目</td>
      <form name="ClsFolder" action="fy.L.asp?RefreshFlag=Folder" method="post">  <td width="370"  class="tl">
	   <select name="CID" size="10" multiple="multiple" id="CID" style="width:360px">
 <% 	 echo Classmake
	%>
	</select></td>
        <td width="500" class="tl">

<input type=button onclick=ClassCheck() class="btn btn_primary"  name=SubmitBtns value=" 发布选中栏目  " />
<br>
          <font color="#FF0000"> 　 <br>
　提示：<br>
　按住"CTRL"或"Shift"键可以进行多选</font></td></form>
      </tr>
      <tr>
        <td width="223" align="right" >发布全部栏目</td>
        <td  class="tl">
		  <form id="form3" name="form3" method="post" action="fy.L.asp?RefreshFlag=All">
<input id="Submit2222"  class='btn btn_primary'  type="submit" value=" 发布全部栏目 &gt;&gt;" border="0" name="Submit2222" />
</form></td>
        <td >&nbsp;</td>
      </tr> 
    </table>
</div>

<script language="JavaScript" type="text/javascript">
function OpenWindowAndSetValue(Url,Width,Height,WindowObj,SetObj)
{
	var ReturnStr=showModalDialog(Url,WindowObj,'dialogWidth:'+Width+'pt;dialogHeight:'+Height+'pt;status:yes;help:no;scroll:yes;');
	if (ReturnStr!='') SetObj.value=ReturnStr;
	return ReturnStr;
}	
		function ClassFolders()
		{ 
		var form=document.ClassFolder;
		if (form.CID.value=='')
			 {
			  alert('请选择您要发布的(栏目)频道');
			  form.CID.focus(); 
			  return false
			  }
			form.SubmitBtn.value="正在提交数据,请稍等...";
			form.SubmitBtn.disabled=true;
			form.submit();
		}
		
		function ClassCheck()
		{ 
		if (document.ClsFolder.CID.value=='')
			 {
			  alert('请选择您要发布的(栏目)频道');
			  document.ClsFolder.CID.focus(); 
			  return false
			  }
			document.ClsFolder.SubmitBtns.value="正在提交数据,请稍等...";
			document.ClsFolder.SubmitBtns.disabled=true;
			document.ClsFolder.submit();
		}</script>

</body>
</html>
