<!--#include file="../inc/config.asp"-->
<!--#include file="../inc/conn.asp"-->
<!-- #include file="inc/Session.asp" -->
<!-- #include file="inc/checkrole.asp" -->
<HTML>
<HEAD>
<TITLE>添加新闻</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<style>
body,td,input,textarea {font-size:9pt}
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.style1 {
	color: #FFFFFF;
	font-weight: bold;
	font-size: 12pt;
}
.style2 {color: #FF0000}
</style>

</HEAD>
<BODY>
<%
'''''''''''''''''''''''''''''''''''''''''''''''
call checkPrevilege(Session("Name"),"p05")
'''''''''''''''''''''''''''''''''''''''''''''''
'获得大类
dim first,classid
classid=Cint(request("classid"))
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()
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
%>
<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>

<FORM method="POST" name="form1" action="to_rss.asp" style="margin:0 0 0 0; ">
  <TABLE width="100%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#666666">
<TR bgcolor="#FF9900">
  <TD height="22" colspan="2"><div align="center" class="style1">发布新闻RSS聚合</div></TD>
  </TR>
<TR bgcolor="#F5F5F5">
  <TD width="29%" height="50"><div align="right">第一步 选择要发布的栏目：</div></TD>
  <TD width="71%"><select name="classid" >  
   <%
	catalogcache=application(CachePrefix&"_catalogoption_"&classid)
	if(catalogcache="" or isempty(catalogcache) or len(catalogcache)<1) then
  		application.Lock()
		application(CachePrefix&"_catalogoption_"&classid)=getcatalogoption()
		application.UnLock()
		response.Write(application(CachePrefix&"_catalogoption_"&classid))
	else
		response.Write(catalogcache)
	end if
	%>
    </select>    </TD>
</TR>
<TR bgcolor="#F5F5F5">
	<TD height="50" align=right>第二步 点击发布按钮：	  </TD>
    <TD align=right><div align="left">
        <input type=submit name=b1 value="发  布">
    </div></TD>
</TR>
</TABLE>
</FORM><br>
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#808080">
  <tr>
    <td height="22" bgcolor="#FF9900"><div align="center" class="style1">发布所有栏目</div></td>
  </tr>
  <tr>
    <td height="50" bgcolor="#FFFFFF"><form name="form2" method="post" action="send_rss_all.asp">
      <div align="center">
        设置间隔时间：
        <input name="delays" type="text" id="delays" value="1" size="10" maxlength="10">
        秒
        &nbsp;
        <input type="submit" onClick="location.href='send_all.asp'" name="Submit" value="点 击 开 始 -->" style="font-size:12px; background-color:#006699; border:1px solid #999999; color:#FFFFFF; ">
      </div>
        </form>
    </td>
  </tr>
</table>
</BODY>
</HTML>
<%
call connclose()
%>