<!--#include file="../inc/config.asp"-->
<!--#include file="../inc/conn.asp"-->
<!-- #include file="inc/Session.asp" -->
<!-- #include file="inc/checkrole.asp" -->
<%
'''''''''''''''''''''''''''''''''''''''''''''''
call checkPrevilege(Session("Name"),"p05")
'''''''''''''''''''''''''''''''''''''''''''''''
'获得大类
dim first,classid
classid=0
dim i
set rs=server.CreateObject("adodb.recordset")
sql="select id,title from catalogs where parentid="&classid&" order by id asc"
rs.open sql,conn,3,1
if not rs.eof then
	first=rs.GetRows()
	if(ubound(first,2)<0) then
	response.Write("暂时没有分类")
	end if
else
	response.Write("暂时没有分类,请先添加分类!")
	response.End()
end if
rs.close
set rs=nothing

Function getcatalogs(parentid,str)
	Dim Sql,rstemp,TemptempStr,tempStr	
	tempStr=str&"&nbsp;"
	sql="select id,title from catalogs where parentid="&parentid
	Set rstemp = Conn.Execute(Sql)
	do while Not rstemp.Eof
		getcatalogs = getcatalogs &"<option value="&rstemp(0)&">│"&tempStr&"└"&rstemp(1)&"</option>"&Chr(10)
		getcatalogs = getcatalogs & getcatalogs(rstemp(0),tempStr)
		rstemp.MoveNext
	loop
	rstemp.close
	Set rstemp = Nothing
End Function
Function getcatalogoption()
	dim ret
	ret=""
	for i=0 to ubound(first,2)
		ret=ret&"<option value="&first(0,i)&">├"&first(1,i)&"</option>"&Chr(10)
    	ret=ret&getcatalogs(first(0,i),"")
	next
	getcatalogoption=ret
end Function
%>
<html>
<head>
<title>查看建议</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-color: #FFFFFF;
	text-align:center;
}
form{margin:0;}
fieldset{padding:10px; margin:1px;}
-->
</style>
<link href="../admin/cs.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {
	color: #FFFFFF;
	font-weight: bold;
}
-->
</style>
</head>
<script language="JavaScript" src="../JS/PublicJS.js"></script>
<body>
<table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><iframe src="right_top.htm" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" height="30" width="100%"></iframe></td>
  </tr>
</table>
<table width="100%"  border="0" align="center" cellpadding="0" cellspacing="1" style="border:1px solid #000000; ">
  <tr bgcolor="#FF9900">
    <td width="100%" height="22"><div align="center" class="style1">◆ 发布新闻页面 ◆</div></td>
  </tr>
  <tr bgcolor="#FF9900">
    <td height="22" bgcolor="#FFFFFF"><table width="90%"  border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td>
		<!--按ID发布-->
	  <fieldset>
	  <legend>按ID生成</legend>
      <form action="reset.asp?actype=byid&start=1" method="post" name="ClassForm">
        <p>从
          <input name="startId" type="text" id="startId" style="width:14%" value="1" size="10">
                 
         到
           <input name="endId" type="text" id="endId" style="width:14%" value="10" size="10">
        </p>
        <p align="center">
        <input type="submit" name="Submit4" value="点击发布==========>" style="background-color:#003366; color:#FFFFFF; border:1px solid #000000;">    
        </p>
      </form>
	  </fieldset>
	  <!--按日期生成-->
	  <fieldset>
	  <legend>按日期生成</legend>
      <form action="reset.asp?actype=byDate&start=1" method="post" name="DateForm">
         <p>从
		     <input name="FromDate" type="text" id="FromDate" readonly style="width:20%" value="<%=Date()%>">
             <input name="sdaf" type="button" id="sdaf" onClick="OpenWindowAndSetValue('Inc/SelectDate.asp',280,120,window,document.DateForm.FromDate);document.DateForm.FromDate.focus();" value="选择日期">
          到
          <input name="EndDate" type="text" id="EndDate" readonly style="width:20%" value="<%=Date()%>">
          <input name="sdaf2" type="button" id="sdaf2" onClick="OpenWindowAndSetValue('Inc/SelectDate.asp',280,120,window,document.DateForm.EndDate);document.DateForm.EndDate.focus();" value="选择日期">
         </p>
         <p align="center"><input type="submit" name="Submit" value="点击发布==========>" style="background-color:#003366; color:#FFFFFF; border:1px solid #000000;"></p>
      </form>
	  </fieldset>
	  <fieldset>
	  <legend>生成最新</legend>
      <form action="reset.asp?actype=byTopN&start=1" method="post" name="NewForm">
        <p>前<input name="topN" type="text" id="topN" style="width:20%" value="10">
          条新闻</p>
        <p align="center">
		<input type="submit" name="Submit2" value="点击发布==========>" style="background-color:#003366; color:#FFFFFF; border:1px solid #000000;">    
        </p>
      </form>
	  </fieldset>
	  <fieldset>
	  <legend>生成所有信息</legend>
      <form action="reset.asp?actype=byAll&start=1" method="post" name="AllForm">
        <p>生成所有信息</p>
        <p align="center">
          <input type="submit" name="Submit3" value="点击发布==========>" style="background-color:#003366; color:#FFFFFF; border:1px solid #000000;">
		</p>
      </form>
	  </fieldset>
	  <fieldset>
	  <legend>按栏目生成</legend>
      <form action="reset.asp?actype=byCatalog&start=1" method="post" name="ClassForm">
        <p>选择栏目
        <select name="catalogId" id="catalogId" style="width:20%">
         <%
	catalogcache=application(CachePrefix&"_catalogoption_0")
	if(catalogcache="" or isempty(catalogcache) or len(catalogcache)<1) then
  		application.Lock()
		application(CachePrefix&"_catalogoption_0")=getcatalogoption()
		application.UnLock()
		response.Write(application(CachePrefix&"_catalogoption_0"))
	else
		response.Write(catalogcache)
	end if
	%>
         </select>         
         前<input name="topN" type="text" id="topN" style="width:14%" value="10">条新闻
		</p>
        <p align="center">
        <input type="submit" name="Submit4" value="点击发布==========>" style="background-color:#003366; color:#FFFFFF; border:1px solid #000000;">    
        </p>
      </form>
	  </fieldset>
	  
	  </td>
      </tr>
    </table>	  
	  </td>
	 </tr>
   </td>
  </tr>  
</table>
</body>
</html>
<%
call connclose()
%>
