<!--#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,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="&classid&" order by sortid 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_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(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 name="imglist" type="checkbox" id="imglist" value="1" onClick="chanSele(this,'imglistconfig')">
      生成图文列表格式
  	  (默认生成文字列表样式，选中后将会生成图片列表样式)
  		<div id="imglistconfig" align="left" style="display:none; ">
  			<hr align="left" width="50%" size="1" noshade>
  			<span class="style2">请配置一下生成图片列表的以下参数</span>：<br>
  			每页显示行数：
    		<input name="rowsNum" type="text" id="rowsNum" value="4">
    		<br>每页显示列数：
    		<input name="colsNum" type="text" id="colsNum" value="3">	
    		<br>图片容器宽度：
    		<input name="containW" type="text" id="containW" value="150">
    		<br>图片容器高度：
    		<input name="containH" type="text" id="containH" value="150">
			<p>
			注：因为图片是放在容器中的，所以请确保您的图片的宽度和高度在容器的范围之内。
			</p>
		</div><br>
		<input name="imglist" type="checkbox" id="imglist" value="2" onClick="chanSele(this,'imglistconfig2')">
      生成多列文本列表格式  	  
  		<div id="imglistconfig2" align="left" style="display:none; ">
  			<hr align="left" width="50%" size="1" noshade>
  			<span class="style2">请配置一下生成多列文本列表的以下参数</span>：<br>  			
    		每页显示列数：
    		<input name="multcols_num" type="text" id="multcols_num" value="2">	    		
			</p>
		</div>
  </div>
 </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>
<script language="javascript">
function chanSele(checkedobj,divobj){
	var checkboxes=document.form1.imglist;
	for (var i=0;i<checkboxes.length;i++) {
		if(checkboxes[i].value!=checkedobj.value){
			checkboxes[i].checked =false;
		}
	}
	//checkedobj.checked=!checkedobj.checked;
	if(document.getElementById(divobj).style.display=="none"){
		document.getElementById(divobj).style.display="";
	}
	else{
		document.getElementById(divobj).style.display="none";
	}
}

</script>
<br>
<table width="100%"  border="0" cellpadding="0" cellspacing="1" bgcolor="#003366">
  <tr>
    <td height="22" bgcolor="#FF9900"><div align="center"><span class="style1">发布全部栏目页面</span></div></td>
  </tr>
  <tr>
    <td height="50" bgcolor="#FFFFFF"><div align="center">
      <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></td>
  </tr>
</table>
</BODY>
</HTML>
<%
call connclose()
%>