<!--#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"),"p19")
'''''''''''''''''''''''''''''''''''''''''''''''
'获得大类
dim first,classid,currentid,seleStr,sendSql
if(request.QueryString("classid")<>"") then
	classid=Cint(request.QueryString("classid"))
else
	classid=0
end if
if(request.QueryString("currentid")<>"") then
	currentid=Cint(request.QueryString("currentid"))
else
	currentid=0
end if

dim i
set rs=server.CreateObject("adodb.recordset")
sendSql="select id,title from catalogs where parentid="&PlugIn_DownloadId&" order by id asc"
rs.open sendSql,conn,3,1
if not rs.eof and not rs.bof then
	first=rs.GetRows()
	rs.close
	set rs=nothing
else
	response.Write("暂时没有分类")
	rs.close
	set rs=nothing
	call connclose()
	response.End()
end if


Function getcatalogs(parentid,str)
	Dim Sql,rstemp,TemptempStr,tempStr	
	tempStr=str&"&nbsp;"
	sql="select * from catalogs where parentid="&parentid
	Set rstemp = Conn.Execute(Sql)
	do while Not rstemp.Eof and rstemp.bof
		getcatalogs = getcatalogs &"<option value="&rstemp("id")&">│"&tempStr&"└"&rstemp("title")&"</option>"&Chr(10)
		getcatalogs = getcatalogs & getcatalogs(rstemp("id"),tempStr)
		rstemp.MoveNext
	loop
	rstemp.close
	Set rstemp = Nothing
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="send_soft_ok.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">发布软件栏目页面</div></TD>
  </TR>
<TR bgcolor="#F5F5F5">
  <TD width="29%" height="50"><div align="right">第一步 选择要发布的软件栏目：</div></TD>
  <TD width="71%"><select name="classid" >  
  <%
 	for i=0 to ubound(first,2)
		if(first(0,i)=currentid) then
			seleStr=" selected"
		else
			seleStr=""
		end if
		response.Write("<option value="""&first(0,i)&""""&seleStr&">├"&first(0,i)&first(1,i)&"</option>"&Chr(10))	
    	'response.Write(getcatalogs(first(0,i),""))		
	next	
%>
        
    </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>
</BODY>
</HTML>
<%
call connclose()
%>