<!--#include file="../ACT.Function.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>ACTCMS_生成管理</title>
<link href="../Images/css1/css.css" rel="stylesheet" type="text/css">
<script type='text/javascript' src='../../ACT_INC/WebTime/WdatePicker.js'></script>
</head>


<body topmargin="0" leftmargin="0">
<%
Dim ModeID
ModeID =ACTCMS.ChkNumeric(request.QueryString("ModeID"))
IF ModeID = 0 Then ModeID = 1
	If Not ACTCMS.ACTCMS_QXYZ(ModeID,"","") Then   Call Actcms.Alert("对不起，你没有"&ACTCMS.ACT_C(ModeID,1)&"系统的操作权限！","")
	ConnectionDatabase
	function Classmake
		 Dim FolderRS
		 Set FolderRS = Conn.Execute("Select * from Class_act where ParentID='0' And ModeID="&ModeID&"  Order by Orderid desc,ID desc")
		 IF FolderRS.Bof And FolderRS.Eof Then
		 Response.Write("<br><li>还没有添加任何栏目!")
		 End IF
		 do while Not FolderRS.Eof
			Classmake=Classmake&"<option value=""'"&FolderRS("ClassID")&"'"" ClassID="&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_act where ParentID='" & ClassID & "'"
	        ImageStr = Str & "&nbsp;└"
	        Set RsTempObj = Conn.Execute(Sql)
	            do while Not RsTempObj.Eof
					   GetChildClassList = GetChildClassList  & "<option value=""'"&RsTempObj("ClassID")&"'"" ClassID="&RsTempObj("ClassID")&">"& ImageStr & TempImageStr &" "& RsTempObj("ClassName")& "</option>"
					  GetChildClassList = GetChildClassList & GetChildClassList(RsTempObj("ClassID"),ImageStr)
		         RsTempObj.MoveNext
	           loop
	       Set RsTempObj = Nothing
 End Function %>
  <table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table">
    <tr>
      <td colspan="3" class="bg_tr">您现在的位置：文章中心 &gt;&gt; 发布文章内容页操作	  </td>
    </tr>
    <tr>
      <td colspan="3" align="right" >&nbsp;</td>
    </tr>
 
	<tr>
      <form action="ACT.C.asp?RefreshFlag=New&ModeID=<%=ModeID%>" method="post">	
	  <td width="160" align="right" >发布最新上传的：</td>
      <td colspan="2" >
	  <input id="TotalNum"  value="10"  name="TotalNum" />
篇文章
  <input class="ACT_BTN" id="Submit2" type="submit" value=" 发 布 &gt;&gt;" border="0" name="Submit2" />
   </td></form> </tr>


    <tr>
      <td width="160" align="right" >生成模型首页：</td>
     <form action="ACT.MakeMode.asp?ModeID=<%=ModeID%>" method="post"> 
	 <td colspan="2" >	  
  <input class="ACT_BTN" id="Submit2" type="submit" value=" 点击生成模型首页 &gt;&gt;" border="0" name="Submit2" />
  </td> </form> </tr>




    <tr>
    <form action="ACT.C.asp?RefreshFlag=InfoID&ModeID=<%=ModeID%>" method="post"> 
	<td height="27" align="right" >按文章ID发布：</td>
      <td colspan="2" >        
	从<input name="StartID" type="text" id="StartID" value="1" />到
<input name="EndID" type="text" id="EndID" value="100" />
<input class="ACT_BTN" id="SubmitID" type="submit" value=" 发 布 &gt;&gt;" border="0" name="SubmitID" /></td>
   </form></tr>

    <tr>
      <form name="dates" action="ACT.C.asp?RefreshFlag=Date&ModeID=<%=ModeID%>" method="post">
	  <td height="27" align="right" >按日期发布</td>
      <td colspan="2" >	  
	  <input name="StartDate" type="text" id="StartDate"  value="<%=Date-1%>" size=25 maxlength="20" onfocus="WdatePicker()" > 
 到 
	 			<input name="EndDate" type="text" id="EndDate"  value="<%=Date%>" size=25 maxlength="20" onfocus="WdatePicker()" >
	   的文章
	   <input class="ACT_BTN" id="SubmitID2" type="submit" value=" 发 布 &gt;&gt;" border="0" name="SubmitID2" />
	  </td></form>
    </tr>
    <tr>
      <form name="ClassFolder" action="ACT.C.asp?RefreshFlag=Folder&ModeID=<%=ModeID%>" method="post">
	  <td align="right" >按文章栏目发布</td>
    
	  <td width="474" >
	   
	  <select name="ClassID" size="10" multiple="multiple" id="ClassID" style="width:360">
 <% 	 Response.Write Classmake
		%>
	</select>
	 
   	  </td>
      <td width="307" >
	 <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="ACT_btn"  name=SubmitBtn value=" 发布选中栏目的文章  " />

		<font color="#FF0000"> 　 <br>
　提示：<br>
　按住"CTRL"或"Shift"键可以进行多选</font></td>
    </form>
    </tr>
    <tr>
    <form name="all" action="ACT.C.asp?RefreshFlag=All&ModeID=<%=ModeID%>" method="post">
	<td width="160" align="right" >&nbsp;</td>
      <td colspan="2" >	  
	 <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="ACT_BTN" 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="157" align="right" >发布全部栏目</td>
      <form name="ClsFolder" action="ACT.L.asp?RefreshFlag=Folder&ModeID=<%=ModeID%>" method="post">  <td width="474" >
	   <select name="ClassID" size="10" multiple="multiple" id="ClassID" style="width:360">
 <% 	 Response.Write Classmake
	%>
	</select></td>
        <td width="310" >

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


<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.ClassID.value=='')
			 {
			  alert('请选择您要发布的(栏目)频道');
			  form.ClassID.focus(); 
			  return false
			  }
			form.SubmitBtn.value="正在提交数据,请稍等...";
			form.SubmitBtn.disabled=true;
			form.submit();
		}
		
		function ClassCheck()
		{ 
		if (document.ClsFolder.ClassID.value=='')
			 {
			  alert('请选择您要发布的(栏目)频道');
			  document.ClsFolder.ClassID.focus(); 
			  return false
			  }
			document.ClsFolder.SubmitBtns.value="正在提交数据,请稍等...";
			document.ClsFolder.SubmitBtns.disabled=true;
			document.ClsFolder.submit();
		}</script>

</body>
</html>
