<link href="styles/general.css" rel="stylesheet" type="text/css" />
<link href="styles/main.css" rel="stylesheet" type="text/css" />
<script src="js/selectzone.js"></script>
<script src="js/utils.js"></script>
<script type="text/javascript" src="js/validator.js"></script>
<body>
<h1>
<span class="action-span"><a href="?ctl=class&act=class_list"><tpl>$class_list</tpl><!--频道列表--></a></span>
<span class="action-span1"><a href="?ctl=index&act=admin_main"><tpl>$common_admin_index</tpl><!--管理首页--></a> >> <tpl>if $class_info['class_id'] != '' </tpl><tpl>$class_edit</tpl><tpl>else</tpl><tpl>$class_add</tpl><tpl>/if</tpl><!--添加频道--></span>
<div style="clear:both"></div>
</h1>
<div class="tab-div">
    <div id="tabbar-div">
      <p>
        <span class="tab-front" id="general-tab"><tpl>$class_menu1</tpl><!--基本设置--></span><span
		 class="tab-back" id="detail-tab"><tpl>$class_menu2</tpl><!--高级设置--></span>
      </p>
    </div>

    <!-- tab body -->
    <div id="tabbody-div">
      <form action="?ctl=class&act=class_save" method="post" name="theForm" onSubmit="return validate();">
	  <input type="hidden" name="class_id" value="<tpl>$class_info['class_id']</tpl>" />
        <!-- 基本设置 -->
        <table width="90%" id="general-table" align="center">
          <tr>
            <td width="14%" class="label"><tpl>$class_name</tpl><!--频道名称-->：</td>
            <td width="86%"><input type="text" name="class_name" id="class_name" size="30" value="<tpl>$class_info['class_name']</tpl>" />
            </td>
          </tr>
          <tr>
            <td width="14%" class="label"><tpl>$class_url</tpl><!--跳转网址-->：</td>
            <td width="86%"><input type="text" name="class_url" id="class_url" size="30" value="<tpl>$class_info['class_url']</tpl>" />
            </td>
          </tr>
          <tr>
            <td class="label"><tpl>$class_top</tpl><!--上级频道-->：</td>
            <td><label>
              <tpl>$top_select</tpl>
            </label>
			</td></tr>
          <tr>
            <td class="label"><tpl>$class_type</tpl><!--频道类型-->：</td>
            <td>
			<select name="class_type_id" id="class_type_id">
			<tpl>foreach $type_select as $v</tpl>
			<option value="<tpl>$v['class_type_id']</tpl>" <tpl>if $class_info['class_type_id'] == $v['class_type_id']</tpl>selected="selected"<tpl>/if</tpl> ><tpl>$v['class_type_name']</tpl></option>
			<tpl>/foreach</tpl>
			</select>
			</td>
          </tr>
          <tr>
            <td class="label"><tpl>$class_sort</tpl><!--频道排序-->：</td>
            <td><label>
              <input name="class_sort" id="class_sort" type="text" size="5" value="<tpl>if $class_info['class_sort']!=''</tpl><tpl>$class_info['class_sort']</tpl><tpl>else</tpl>0<tpl>/if</tpl>">
            </label></td>
          </tr>
          <tr>
            <td class="label"><tpl>$class_top_menu</tpl><!--头部导航显示-->：</td>
            <td><tpl>$top_radio</tpl>
            </td>
          </tr>
		  <tpl>if $class_info['class_top_id'] == 0</tpl>
          <tr>
            <td class="label"><tpl>$class_index</tpl><!--首页显示-->：</td>
            <td><tpl>$index_radio</tpl>
            </td>
          </tr>
		  <tpl>/if</tpl>
          <tr>
            <td class="label"><tpl>$class_keywords</tpl><!--频道关键字-->：</td>
            <td><label>
              <textarea name="class_keywords" cols="50" rows="3"><tpl>$class_info['class_keywords']</tpl></textarea>
            </label></td>
          </tr>
          <tr>
            <td class="label"><tpl>$class_description</tpl><!--频道描述-->：</td>
            <td><label>
              <textarea name="class_description" cols="50" rows="4"><tpl>$class_info['class_description']</tpl></textarea>
            </label></td>
          </tr>
          <tr>
            <td class="label"><tpl>$class_state</tpl><!--频道状态-->：</td>
            <td><tpl>$state_radio</tpl>
            </td>
          </tr>
          <tr>
            <td class="label"><tpl>$class_edit_name</tpl><!--修改范围-->：</td>
            <td><input type="checkbox" name="modify_type" value="1" /><tpl>$class_edit_sun</tpl><!--同时修改下级频道类型-->
            </td>
          </tr> 
        </table>

        <!-- 高级设置 -->
        <table width="90%" id="detail-table" style="display:none">
          <tr>
            <td>&nbsp;</td>
          </tr>
        </table>

        <div class="button-div">
          <input type="submit" value="<tpl>$class_submit</tpl>" class="button" />
          <input type="reset" value="<tpl>$class_reset</tpl>" class="button" />
        </div>
        </form>
    </div>
</div>
<div id="footer">
<tpl>$common_copyright</tpl>
</div>
<script language="JavaScript">
<!--
  /**
   * 检查表单输入的内容
   */
  function validate()
  {
    var validator = new Validator('theForm');
    validator.required('class_name','<tpl>$class_add_name_error</tpl>');
    return validator.passed();
  }
//-->
</script>
<script src="js/tab.js"></script>
</body>
