<?php /* Smarty version 2.6.19, created on 2014-03-07 10:26:04
         compiled from category_add.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('function', 'db_fetchrows', 'category_add.tpl', 23, false),array('modifier', 'indent', 'category_add.tpl', 26, false),)), $this); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>管理中心</title>
<script type="text/javascript" src="../common/common.js"></script>
<link href="common/main.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="formAdd" name="formAdd" method="get" action="" onSubmit="return notEmpty(name, '请输入分类名称。')&&notEmpty(parentId, '请选择所属分类。')">
<table border="0" cellspacing="0" cellpadding="2">
  <tr>
    <td>分类名称：</td>
    <td>
      <input type="text" name="name" id="name" />
      <span class="fontRed">*</span>    </td>
    </tr>
  <tr>
    <td>上级分类：</td>
    <td>
    <select id="parentId" name="parentId">
    <option value="0">├无 (添加为顶级分类)</option>
  <?php echo smarty_function_db_fetchrows(array('table' => 'categories','items' => "*",'condition' => "",'orderby' => 'f_sort','varname' => 'arr'), $this);?>

  <?php unset($this->_sections['loop']);
$this->_sections['loop']['name'] = 'loop';
$this->_sections['loop']['loop'] = is_array($_loop=$this->_tpl_vars['arr']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['loop']['show'] = true;
$this->_sections['loop']['max'] = $this->_sections['loop']['loop'];
$this->_sections['loop']['step'] = 1;
$this->_sections['loop']['start'] = $this->_sections['loop']['step'] > 0 ? 0 : $this->_sections['loop']['loop']-1;
if ($this->_sections['loop']['show']) {
    $this->_sections['loop']['total'] = $this->_sections['loop']['loop'];
    if ($this->_sections['loop']['total'] == 0)
        $this->_sections['loop']['show'] = false;
} else
    $this->_sections['loop']['total'] = 0;
if ($this->_sections['loop']['show']):

            for ($this->_sections['loop']['index'] = $this->_sections['loop']['start'], $this->_sections['loop']['iteration'] = 1;
                 $this->_sections['loop']['iteration'] <= $this->_sections['loop']['total'];
                 $this->_sections['loop']['index'] += $this->_sections['loop']['step'], $this->_sections['loop']['iteration']++):
$this->_sections['loop']['rownum'] = $this->_sections['loop']['iteration'];
$this->_sections['loop']['index_prev'] = $this->_sections['loop']['index'] - $this->_sections['loop']['step'];
$this->_sections['loop']['index_next'] = $this->_sections['loop']['index'] + $this->_sections['loop']['step'];
$this->_sections['loop']['first']      = ($this->_sections['loop']['iteration'] == 1);
$this->_sections['loop']['last']       = ($this->_sections['loop']['iteration'] == $this->_sections['loop']['total']);
?>
  <?php $this->assign('indent', $this->_tpl_vars['arr'][$this->_sections['loop']['index']]['f_indent']-1); ?>
    <option value="<?php echo $this->_tpl_vars['arr'][$this->_sections['loop']['index']]['f_id']; ?>
" <?php if ($this->_tpl_vars['arr'][$this->_sections['loop']['index']]['f_id'] == $this->_tpl_vars['parentId']): ?>selected<?php endif; ?>><?php echo ((is_array($_tmp=$this->_tpl_vars['str'])) ? $this->_run_mod_handler('indent', true, $_tmp, $this->_tpl_vars['indent'], "│") : smarty_modifier_indent($_tmp, $this->_tpl_vars['indent'], "│")); ?>
├<?php echo $this->_tpl_vars['arr'][$this->_sections['loop']['index']]['f_name']; ?>
 (<?php echo $this->_tpl_vars['arr'][$this->_sections['loop']['index']]['f_id']; ?>
)</option>
  <?php endfor; endif; ?>
    </select> <span class="fontRed">*</span>
    </td>
  </tr>
  <tr>
    <td>英文名：</td>
    <td>
      <input name="englishName" type="text" id="englishName" maxlength="255" value="" />
     (输入本分类的英文或拼音名称，生成本分类HTML文件时将使用此英文名作为文件名。如果不填，则生成数字文件名)</td>
  </tr>
  <tr>
    <td>显示顺序：</td>
    <td>
      <input name="order" type="text" id="order" size="10" maxlength="5" value="1000" />
     (越小越靠前)</td>
  </tr>
  <tr>
    <td>自动显示：</td>
    <td>
      <input name="autoList" type="radio" id="autoList"  value="1" checked/>显示
      <input name="autoList" type="radio" id="autoList"  value="0" />隐藏 （是否自动显示在前台分类列表中）
      </td>
  </tr>
  <tr>
    <td>Keywords：</td>
    <td>
      <input name="keywords" type="text" id="keywords" size="50" maxlength="255" value="" />
     (将出现在网页META的keywords里)</td>
  </tr>
  <tr>
    <td>Description：</td>
    <td>
      <input name="description" type="text" id="description" size="50" maxlength="255" value="" />
     (将出现在网页META的description里)</td>
  </tr>
  <tr>
    <td>链接网址：</td>
    <td>
      <input name="url" type="text" id="url" size="50" maxlength="255" value="" />
     (一般不需填写此项。如果想点击该分类后链接到其它特定网址，则请填写)</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    </tr>
  <tr>
    <td>&nbsp;</td>
    <td>
      <input type="hidden" name="pId" value="<?php echo $this->_tpl_vars['parentId']; ?>
"/>
      <input type="hidden" name="addUrl" value="<?php echo $this->_tpl_vars['addUrl']; ?>
"/>
      <input type="hidden" name="back" value="<?php echo $this->_tpl_vars['backUrl']; ?>
"/>
      <input type="submit" name="btnSubmit" id="btnSubmit" value=" 提交 " />
      <input type="reset" name="btnReset" id="btnReset" value=" 重置 " />
    </td>
  </tr>
</table>
</form>
</body>
</html>