<!--
<?php
print<<<EOT
-->
<form action="$admin_path&action=addsort" method="POST">
<div class="MainCont">
	<div class="head"><div class="tag">分类名称</div></div>
	<table width='100%' cellspacing='0' cellpadding='0' class="FormTable">
      <tr> 
        <td class="tdL">分类名称</td>
        <td> 
          <input type=text name="name" size=50>
        </td>
      </tr>
      <tr style="display:none;"> 
        <td class="tdL">所属分类</td>
        <td>{$sort_fup}(不选择将成为一级分类)</td>
      </tr>
      <tr style="display:none;"> 
        <td class="tdL">性质<span help=1>终结栏目下面不能创建分类但能创建试卷,而大分类下面不能创建试卷但可以创建分类.</span></td>
        <td> 
          <input type="radio" name="type" value="1">
          大分类 
          <input type="radio" name="type" value="0" checked>
          终结栏目</td>
      </tr>
      <tr> 
        <td class="tdL">&nbsp;</td>
        <td> 
          <input type=submit value="创 建" name="submit">
        </td>
      </tr>
    </table>
</div>
</form>
<form name="formlist" method="post" action="$admin_path&action=editlist">
<div class="MainCont">
	<div class="head"><div class="tag">编辑分类</div></div> 
    <ul class="NoteList">
      <li>注意:<font color="#FF0000">分类排序的规则是,数值大的排在前面,只能是同一级的进行排序</font></li>
    </ul> 
    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="ListTable">
      <tr> 
        <th width="7%">FID</th>
        <th width="52%">分类名称</th>
        <th width="7%">排序</th>
        <th width="7%">修改</th>
        <th width="9%">留言管理</th>
        <th width="9%">浏览</th>
        <th width="9%">删除</th>
      </tr>
<!--
EOT;
foreach($sortdb AS $key=>$rs){
$color=$rs[type]?'#FF0000':'';
print <<<EOT
-->
      <tr> 
        <td class="B red">$rs[fid]</td>
        <td class="txL">$rs[icon]【<font color="$color">{$rs[name]}</font>】</td>
        <td><input type='text' name='order[{$rs[fid]}]' value='$rs[list]' size='5'></td>
        <td><a href='$admin_path&job=editsort&fid=$rs[fid]'><img alt='点击修改' src='../member/images/button_edit.png'/></a></td>
        <td>
<!--
EOT;
if(!$rs[type]){
print <<<EOT
-->
        <a href='$admin_path&file=content&job=list&fid=$rs[fid]'><img alt='管理' src='../member/images/art_icon.gif' border=0></a>
<!--
EOT;
}print <<<EOT
-->&nbsp;
        </td>
        <td><a href='../$dirname/?fid=$rs[fid]' target="_blank"><img alt='浏览' src='../member/images/icon_view.gif'/></a></td>
        <td><a href="$admin_path&action=delete&fid=$rs[fid]" onclick="return confirm('你确实要删除吗?不可恢复');"><img alt='点击删除' src='../member/images/del_icon2.gif'/></a></td>
      </tr>
<!--
EOT;
}print <<<EOT
-->
	</table>
    <div class="ListBut">
      <input type="button" name="Submit2" value="修改栏目排序" onclick="postlist('list')">
    </div>
</div>
</form>
<SCRIPT LANGUAGE="JavaScript">
<!--
function postlist(t){
	if(t=='list'){
		document.formlist.action="$admin_path&action=editlist";
	}else{
		document.formlist.action="$admin_path&job=batch_edit";
	}
	document.formlist.submit();
}
function CheckAll(va){
	form=document.formlist
	for (var i=0;i<form.elements.length;i++){
		var e = form.elements[i];
		if(va=='all'){
			e.checked = true;
		}else{
			e.checked == true ? e.checked = false : e.checked = true;
		}
	}
}
//-->
</SCRIPT>
<!--
EOT;
?>
-->
