<!--#include file="../inchuayuwebrlzywzhyweb/CONN.ASP"-->
<!--#include file="../inchuayuwebrlzywzhyweb/cls_huayuweb()^191563631.asp"-->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<script language="javascript" src="../js/input.js" type="text/javascript"></script>
<%oa.chkadmin()%>
<%
  dim action,title,classid,classname,class_Row,class_sfdh,class_show,class_pic,class_link,width,height,class_cell,class_title,class_time,class_intro
  dim dhrootid,dhclassid
  dhrootid=oa.sqlrequest("dhrootid")
  if dhrootid="" or not isnumeric(dhrootid)  then oa.msgshow("非法操作！")
  dhclassid=oa.sqlrequest("dhclassid")
  if dhclassid="" or not isnumeric(dhclassid)  then oa.msgshow("非法操作！")
  set rs=oa.execute("select classname,class_show,class_sfcp from classlist where classid="&dhclassid)
  classrow=rs(1)
  title=rs(0)
  sfcp=rs(2)
  rs.close
  
  
  action="add"
  title=title&" 栏目添加"
if oa.act="mod" then 
   action="mod"
   title=title&" 栏目修改"
   classid=oa.sqlrequest("classid")
   if classid="" or not isnumeric(classid)  then oa.msgshow("非法操作！")
   set rs=oa.execute("select classid,classname,class_row,class_sfdh,class_show,width,height,class_cell,class_link,class_pic,class_title,class_time,class_intro, ctitle,ckeywords,ccontent,class_sfcp,zdylj from classlist where classid="&classid)
   if rs.eof then response.Redirect("admin_class_mx_manage.asp?dhrootid="&dhrootid)
   classid=rs(0)
   classname=rs(1)
   class_Row=rs(2)
   class_sfdh=rs(3)
   class_show=rs(4)
   width=rs(5)
   height=rs(6)
   class_cell=rs(7)
   class_link=rs(8)
   class_pic=rs(9)
   class_title=rs(10)
   class_time=rs(11)
   class_intro=rs(12)
     ctitle=rs(13)
  ckeywords=rs(14)
  ccontent=rs(15)
   zdylink=rs(17)
   rs.close

end if


%>
<link href="../inchuayuwebrlzywzhyweb/style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.STYLE4 {color: #FF0000}
-->
</style>
<table width="98%" height="21" border="0" align="center" cellpadding="0" cellspacing="0" background="../img/line.gif">
  <tr>
    <td height="35" align="center" bgcolor="#6298E1" style="color:white"><div align="left"><strong>&nbsp;<img src="../img/Explain.gif" width="18" height="18" align="absmiddle" />&nbsp;<%=title%></strong></div></td>
  </tr>
</table>
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#6298E1">
  <form action="admin_class_sub.asp" method="post" name="form1" id="form1" onSubmit="return check()">
  
    <tr bgcolor="#FFFFFF">
      <td width="229" align="left" bgcolor="#FFFFFF"><U>所属频道：</U></td>
      <td width="360"><select name="parentid" id="parentid">
	                <% oa.Class_Option dhclassID,dhrootid %>
        
		
      </select></td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td align="left" bgcolor="#FFFFFF"><U>频道名称：</U> </td>
      <td><input name="ClassName" type="text" class="wenbenkuang" size="20" value="<%=classname%>" />
        &nbsp;<span  style="display:none"></span>&nbsp;
        <input name="action" type="hidden" id="action" value="<%=action%>" />
        <input name="classid" type="hidden" id="classid" value="<%=classid%>" /></td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td align="left" bgcolor="#FFFFFF"><U>展示方式：</U><br />
        前台页面点击该频道的展示方式 </td>
      <td><select name="class_show" id="class_show" onchange="dis(document.form1.class_show.value)">
          <option value="">--选择--</option>
		  
			  <%if classrow="广告形式" then%>
		    <option value="广告形式" <% if class_show="广告形式" then response.write "selected"%>>广告形式</option>
			<%else%>
          <option value="文章形式" <% if class_show="文章形式" then response.write "selected"%>>文章形式</option>
          <option value="列表形式" <% if class_show="列表形式" then response.write "selected"%>>列表形式</option>
          <option value="图片形式" <% if class_show="图片形式" then response.write "selected"%>>图片形式</option>
          <option value="图文列表" <% if class_show="图文列表" then response.write "selected"%>>图文列表</option>
		  <%end if%>
      </select></td>
    </tr><tr bgcolor="#FFFFFF" style="display:none">
      <td align="left" bgcolor="#FFFFFF"><U>是否作为导航：</U><br />
      该频道在前台页面是否作为导航</td>
      <td bgcolor="#FFFFFF">
        是
        <input type="radio" name="class_sfdh" value="是" <% if class_sfdh="是" then response.write "checked='checked'"%> />
否
<input name="class_sfdh" type="radio" value="否" <% if class_sfdh="否" or class_sfdh="" then response.write "checked='checked'"%> />      </td>
    </tr>
    <tr bgcolor="#FFFFFF" >
      <td align="left" bgcolor="#FFFFFF"><U>每行显视条数：</U><br />
        设置每行信息显视数</td>
      <td><input name="class_cell" type="text" class="wenbenkuang" id="class_cell" value="<%if isnull(class_cell) or class_cell="" then
response.write 0
else
response.write class_cell
end if%>" size="6" /></td>
    </tr>
    <tr bgcolor="#FFFFFF"  id="wtime" <% if class_show<>"列表形式" then response.Write("style='display:none'")%>>
      <td align="left" bgcolor="#FFFFFF"><U>显视时间：</U><br />
        设置每行是否显视时间</td>
      <td><select name="class_time" id="class_time">
          <option value="0" <% if class_time=0 then response.Write("selected='selected'")%>>是</option>
          <option value="1" <% if class_time=1 then response.Write("selected='selected'")%>>否</option>
        </select>      </td>
    </tr>
    <tr bgcolor="#FFFFFF"  id="whid" <% if class_show<>"图片形式" and class_show<>"图文列表" then response.Write("style='display:none'")%>>
      <td align="left" bgcolor="#FFFFFF"><U>图片设置：</U><br />
        设置图片的宽和高,及每行显视数</td>
      <td>宽：
        <input name="width" type="text" class="wenbenkuang" value="<%if isnull(width) or width="" then
response.write 130
else
response.write width
end if%>" size="5" />
        高：
        <input name="height" type="text" class="wenbenkuang" value="<%if isnull(height) or height="" then
response.write 130
else
response.write height
end if%>" size="5" />
        显视标题：
        <select name="class_title" id="class_title">
          <option value="0" <% if class_title=0 then response.Write("selected='selected'")%>>是</option>
          <option value="1" <% if class_title=1 then response.Write("selected='selected'")%>>否</option>
        </select></td>
    </tr>
      
    <tr bgcolor="#FFFFFF">
      <td align="left" bgcolor="#FFFFFF"><U>频道每页显视行数：</U><br />
        该频道在前台页面第页展示多少条记录 </td>
      <td><input name="class_row" type="text" class="wenbenkuang" id="class_row" value="<%if class_row="" then
response.write 20
else
response.write class_row
end if%>" size="4" /></td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td align="left" bgcolor="#FFFFFF"><U>频道展示图片：</U><br />
        该频道在前台页独立的展示图片</td>
      <td><input name="class_pic" type="text" class="wenbenkuang"  id="class_pic" size="20" value="<%=class_pic%>" />
          <input type="button" name="Submit11" value="上传" onclick="if (form1.class_pic.value!=''){alert('请删除文件后再进行上传')}else{window.open('../inchuayuwebrlzywzhyweb/upfile.asp?formname=form1&amp;editname=class_pic&amp;uppath=upfile/','','status=no,scrollbars=no,top=20,left=110,width=300,height=130')}" />
          <input type="button" name="Submit113" value="删除" onclick="if (form1.class_pic.value==''){alert('文件不存在！请不要非法操作')}else{window.open('../inchuayuwebrlzywzhyweb/upload.asp?formname=form1&amp;editname=class_pic&amp;action=del&amp;filepath='+form1.class_pic.value,'','status=no,scrollbars=no,top=20,left=110,width=300,height=50')}" />
          <input type="button" name="Submit112" value="浏览" onclick="window.open('<%=webdir%>'+form1.class_pic.value)" /></td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td align="left" bgcolor="#FFFFFF"><U>频道的外部连接：</U><br />
        点击频道后的连接地址</td>
      <td><input name="class_link" type="text" class="wenbenkuang" id="class_link" value="<%=class_link%>" size="40" /></td>
    </tr><tr bgcolor="#FFFFFF">
      <td align="left" bgcolor="#FFFFFF"><U>频道的外部连接(手机)：</U><br />
      点击频道后的连接地址</td>
      <td bgcolor="#FFFFFF">        <input name="zdylink" type="text" class="wenbenkuang" id="zdylink" value="<%=zdylink%>" size="40" />      </td>
    </tr><tr bgcolor="#FFFFFF">
      <td align="left" bgcolor="#FFFFFF"><u>设置页面标题</u></td>
      <td bgcolor="#FFFFFF">        <input name="ctitle" type="text" class="wenbenkuang" id="ctitle" value="<%=ctitle%>" size="60" />      </td>
    </tr><tr bgcolor="#FFFFFF">
      <td align="left" bgcolor="#FFFFFF"><u>设置页面关键字</u></td>
      <td bgcolor="#FFFFFF">        <input name="ckeywords" type="text" class="wenbenkuang" id="ckeywords" value="<%=ckeywords%>" size="60" />      </td>
    </tr><tr bgcolor="#FFFFFF">
      <td align="left" bgcolor="#FFFFFF"><u>设置页面描述</u></td>
      <td bgcolor="#FFFFFF"><textarea name="ccontent" cols="45" rows="4" class="wenbenkuang" id="ccontent"><%=ccontent%></textarea></td>
    </tr>
	 <tr bgcolor="#FFFFFF">
      <td align="left" bgcolor="#FFFFFF"><U>频道介绍：</U><br /></td>
      <td><textarea name="class_intro" cols="60" rows="4" class="wenbenkuang" id="class_intro"><%=class_intro%></textarea></td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td colspan="2" align="center" bgcolor="#FFFFFF">
	  <% if oa.act="mod" then%>
	  <input name="Add" type="submit" value="修 改 "  />
	  <%else%>
	  <input name="Add" type="submit" value="添 加 "  />
	  <%end if%></td>
    </tr>
  </form>
</table>





 <br>
 
 <table width="98%" height="35" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#6298E1">
   <tr>
     <td align="center" style="color:white"><div align="left"><strong>&nbsp;<img src="../img/Explain.gif" width="18" height="18" align="absmiddle" />&nbsp;栏目管理</strong></div></td>
   </tr>
</table><table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#6298E1">
  <tr>
    <td width="28" height="22" align="center" bgcolor="#FFFFFF"><strong>ID</strong></td>
    <td width="140" align="center" bgcolor="#FFFFFF"><strong>栏目名称</strong></td>
    <td width="226" align="center" bgcolor="#FFFFFF"><strong>操作</strong></td>
    <td width="42" align="center" bgcolor="#FFFFFF"><strong>上升</strong></td>
    <td width="39" align="center" bgcolor="#FFFFFF"><strong>下降</strong></td>
    <td width="61" align="center" bgcolor="#FFFFFF"><strong>第行记录</strong></td>
    <td width="55" align="center" bgcolor="#FFFFFF"><strong>展示方式</strong></td>
    <td width="38" align="center" bgcolor="#FFFFFF"><strong>记录</strong></td>
    <td width="60" align="center" bgcolor="#FFFFFF"><strong>频道图片</strong></td>
    <td width="60" align="center" bgcolor="#FFFFFF"><strong>频道类别</strong></td>
  </tr>
  <% 
  dim arrShowLine(10),i
for i=0 to ubound(arrShowLine)
	arrShowLine(i)=False
next

dim idepth
set rs=oa.execute("select classid,classname,class_cell,class_show,class_sfdh,class_Row,class_link,class_pic,child,rootid,depth,nextid from classlist where ParentID="&request("dhclassid")&" and Depth=1 order by rootid,orderid")
do while not rs.eof 
%>
  <tr bgcolor="#FFFFFF"> 
    <td height="22" style="padding-left:5px"><%=rs(0)%></td>
    <td align="left" style="padding-left:5px" >
      <span style="font-weight: bold">
      <%if rs("child")=0 then%>
      <img src="../img/tree_folder3.gif" />
      <%else%>
      <img src="../img/tree_folder4.gif" />
      <%end if%>
      <%=rs(1)%><%  if rs("Child")>0 then 
	  	response.write "（" & rs("Child") & "）" 
	  end if%></span></td>
    <td align="center" ><a href="admin_class_mx_manage.asp?action=mod&dhrootid=<%=dhrootid%>&dhclassid=<%=dhclassid%>&ClassID=<%=rs(0)%>" class="a2">修改设置</a>| <a href="admin_class_sub.asp?ClassID=<%=rs(0)%>&amp;action=del" class="a2" onclick="<%if rs(8)>0 then%>return ConfirmDel1();<%else%>return ConfirmDel2();<%end if%>">删除</a></td>
    <td align="center" ><a href="admin_class_sub.asp?action=up&amp;ClassID=<%=rs(0)%>" class="a2">↑</a></td>
    <td align="center" ><a href="admin_class_sub.asp?action=down&amp;ClassID=<%=rs(0)%>" class="a2">↓</a></td>
    <td align="center" ><%=rs(2)%></td>
    <td align="center" ><%=rs(3)%></td>
    <td align="center" ><%=rs(5)%>条</td>
    <td align="center" ><%if rs(7)<>"" then
	response.write "<a href='"&webdir&rs(7)&"' target='_blank' class='a2'>浏览</a>"
	else
	response.write "无"
	end if%></td>
    <td align="center" ><%if rs(6)<>"" then
	response.write "<a href='"&rs(6)&"' target='_blank' class='a2'>外部连接</a>"
	else
	response.write "内部连接"
	end if%></td>
  </tr> <%if rs("child")>0 then%><%set rc=server.CreateObject("adodb.recordset")
  rc.open"select classid,classname,class_cell,class_show,class_sfdh,class_Row,class_link,class_pic,child,rootid,depth,nextid from classlist where ParentID="&rs(0)&" and Depth=2 order by rootid,orderid",conn,1,1
  if not rc.eof then
  do while not rc.eof%><tr bgcolor="#FFFFFF"> 
    <td height="22" style="padding-left:5px"><%=rc(0)%></td>
    <td align="left" style="padding-left:5px" >
      <span style="font-weight: bold">
    <%if rc("NextID")>0 then 
					response.write "<img src='../img/tree_line1.gif' width='17' height='16' valign='abvmiddle'>" 
				else 
					response.write "<img src='../img/tree_line2.gif' width='17' height='16' valign='abvmiddle'>" 
				end if %>
      <%=rc(1)%></span></td>
    <td align="center" ><a href="admin_class_mx_manage.asp?action=mod&dhrootid=<%=dhrootid%>&dhclassid=<%=dhclassid%>&ClassID=<%=rc(0)%>" class="a2">修改设置</a>| <a href="admin_class_sub.asp?ClassID=<%=rc(0)%>&amp;action=del" class="a2" onclick="<%if rc(8)>0 then%>return ConfirmDel1();<%else%>return ConfirmDel2();<%end if%>">删除</a></td>
    <td align="center" ><a href="admin_class_sub.asp?action=up&amp;ClassID=<%=rc(0)%>" class="a2">↑</a></td>
    <td align="center" ><a href="admin_class_sub.asp?action=down&amp;ClassID=<%=rc(0)%>" class="a2">↓</a></td>
    <td align="center" ><%=rc(2)%></td>
    <td align="center" ><%=rc(3)%></td>
    <td align="center" ><%=rs(5)%>条</td>
    <td align="center" ><%if rc(7)<>"" then
	response.write "<a href='"&webdir&rc(7)&"' target='_blank' class='a2'>浏览</a>"
	else
	response.write "无"
	end if%></td>
    <td align="center" ><%if rc(6)<>"" then
	response.write "<a href='"&rc(6)&"' target='_blank' class='a2'>外部连接</a>"
	else
	response.write "内部连接"
	end if%></td>
  </tr><%if rc("child")>0 then%><%set rc1=server.CreateObject("adodb.recordset")
  rc1.open"select classid,classname,class_cell,class_show,class_sfdh,class_Row,class_link,class_pic,child,rootid,depth,nextid from classlist where ParentID="&rc(0)&" and Depth=2 order by rootid,orderid",conn,1,1
  if not rc1.eof then
  do while not rc1.eof%><tr bgcolor="#FFFFFF"> 
    <td height="22" style="padding-left:5px"><%=rc1(0)%></td>
    <td align="left" style="padding-left:5px" >
      <span style="font-weight: bold">
    <%if rc1("NextID")>0 then 
					response.write "<img src='../img/tree_line1.gif' width='17' height='16' valign='abvmiddle'>" 
				else 
					response.write "<img src='../img/tree_line2.gif' width='17' height='16' valign='abvmiddle'>" 
				end if %>
      <%=rc1(1)%></span></td>
    <td align="center" ><a href="admin_class_mx_manage.asp?action=mod&dhrootid=<%=dhrootid%>&dhclassid=<%=dhclassid%>&ClassID=<%=rc(0)%>" class="a2">修改设置</a>| <a href="admin_class_sub.asp?ClassID=<%=rc1(0)%>&amp;action=del" class="a2" onclick="<%if rc1(8)>0 then%>return ConfirmDel1();<%else%>return ConfirmDel2();<%end if%>">删除</a></td>
    <td align="center" ><a href="admin_class_sub.asp?action=up&amp;ClassID=<%=rc1(0)%>" class="a2">↑</a></td>
    <td align="center" ><a href="admin_class_sub.asp?action=down&amp;ClassID=<%=rc1(0)%>" class="a2">↓</a></td>
    <td align="center" ><%=rc1(2)%></td>
    <td align="center" ><%=rc1(3)%></td>
    <td align="center" ><%=rs(5)%>条</td>
    <td align="center" ><%if rc1(7)<>"" then
	response.write "<a href='"&webdir&rc1(7)&"' target='_blank' class='a2'>浏览</a>"
	else
	response.write "无"
	end if%></td>
    <td align="center" ><%if rc1(6)<>"" then
	response.write "<a href='"&rc1(6)&"' target='_blank' class='a2'>外部连接</a>"
	else
	response.write "内部连接"
	end if%></td>
  </tr> <%rc1.movenext
  loop
  end if
  end if%>
  <%rc.movenext
  loop
  end if
  end if%>
  <% 
	rs.movenext 
loop

%>
</table>
  <script language="JavaScript">
<!--
function dis(vid)
{
  
   if (vid=="图片形式")
   {
   eval("whid.style.display=\"\";");
   
   eval("wtime.style.display=\"none\";"); 
   form1.class_cell.value=4; 
    form1.class_row.value=20; 
   }
   else if(vid=="列表形式")
   {
   eval("whid.style.display=\"none\";");
   eval("wtime.style.display=\"\";");
   form1.class_cell.value=1; 
	 
   }
      else if(vid=="图文列表")
   {
   eval("whid.style.display=\"none\";");
   eval("wtime.style.display=\"\";");
    form1.class_cell.value=1; 
    form1.class_row.value=10;
	 
   }
   else
   {
    eval("whid.style.display=\"none\";");
   eval("wtime.style.display=\"none\";");
   form1.class_cell.value=0; 
   }
}
function check() {
if (document.form1.ClassName.value=="") {
window.alert ("请您输入频道名称 ！");
document.form1.ClassName.focus()
return false
}
if (document.form1.class_show.value=="") {
window.alert ("展示形式不能为空 ！");
document.form1.class_show.focus()
return false
}
if (document.form1.class_row.value=="") {
window.alert ("导航排序不能为空 ！");
document.form1.class_row.focus()
return false
}
 if (isUnsignedInteger(document.form1.class_row.value)==false)
 {
  alert("导航排序必须为数字！");
  document.form1.class_row.select()
  return false
}
return true
}
//-->
</SCRIPT>

  <script language="JavaScript" type="text/JavaScript">
function ConfirmDel1()
{
   alert("此频道下还有子频道，必须先删除下属子频道后才能删除此频道！");
   return false;
}

function ConfirmDel2()
{
   if(confirm("删除频道将同时删除此频道中的所有信息，并且不能恢复！确定要删除此频道吗？"))
     return true;
   else
     return false;
	 
}
function Confirmclear()
{
   if(confirm("此操作将清空该频道下所有信息，并且不能恢复！确定要清空吗？"))
     return true;
   else
     return false;
	 
}
</script>

