<?php /* Smarty version 2.6.19, created on 2014-03-07 10:22:21
         compiled from category_list.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('function', 'db_fetchrows', 'category_list.tpl', 19, false),array('function', 'db_fetchrow', 'category_list.tpl', 40, false),array('modifier', 'indent', 'category_list.tpl', 28, 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>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
  <tr>
    <td class="borderBottom bgFleet">分类</td>
    <td class="borderBottom bgFleet" align="center">分类编号</td>
    <td class="borderBottom bgFleet" align="center">自动列出</td>
    <td class="borderBottom bgFleet" align="center">管理</td>
    <td class="borderBottom bgFleet" align="center">访问</td>
    <td class="borderBottom bgFleet" align="center">操作</td>
  </tr>
  <?php echo smarty_function_db_fetchrows(array('table' => 'categories','items' => "*",'condition' => "f_parentId='".($this->_tpl_vars['parentId'])."'",'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); ?>
  <?php if ($this->_sections['loop']['index']%2): ?>
  <?php $this->assign('rowClass', " class='bgFleet'"); ?>
  <?php else: ?>
  <?php $this->assign('rowClass', ""); ?>
  <?php endif; ?>
  <tr>
    <td <?php echo $this->_tpl_vars['rowClass']; ?>
><?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'], "│")); ?>
├ <span class="fontBold"><?php echo $this->_tpl_vars['arr'][$this->_sections['loop']['index']]['f_name']; ?>
</span></td>
    <td <?php echo $this->_tpl_vars['rowClass']; ?>
 align="center"><?php echo $this->_tpl_vars['arr'][$this->_sections['loop']['index']]['f_id']; ?>
</td>
    <td <?php echo $this->_tpl_vars['rowClass']; ?>
 align="center"><?php if ($this->_tpl_vars['arr'][$this->_sections['loop']['index']]['f_autoList'] == 1): ?>√<?php else: ?>-<?php endif; ?></td>
    <td <?php echo $this->_tpl_vars['rowClass']; ?>
 align="center"><?php if ($this->_tpl_vars['arr'][$this->_sections['loop']['index']]['f_haveChild'] == 1): ?><a href="category_list.php?pId=<?php echo $this->_tpl_vars['arr'][$this->_sections['loop']['index']]['f_id']; ?>
">进入下级</a> | <?php endif; ?> <?php if ($this->_tpl_vars['arr'][$this->_sections['loop']['index']]['f_parentId'] != 0): ?><a href="site_list.php?cId=<?php echo $this->_tpl_vars['arr'][$this->_sections['loop']['index']]['f_id']; ?>
">网址管理</a><?php endif; ?></td>
    <td <?php echo $this->_tpl_vars['rowClass']; ?>
 align="center"><a href="../<?php echo $this->_tpl_vars['categoryDir']; ?>
/<?php if ($this->_tpl_vars['arr'][$this->_sections['loop']['index']]['f_englishName']): ?><?php echo $this->_tpl_vars['arr'][$this->_sections['loop']['index']]['f_englishName']; ?>
<?php else: ?><?php echo $this->_tpl_vars['arr'][$this->_sections['loop']['index']]['f_id']; ?>
<?php endif; ?>.html" target="_blank">访问前台</a></td>
    <td <?php echo $this->_tpl_vars['rowClass']; ?>
 align="center"><a href="makehtml.php?a=category&cId=<?php echo $this->_tpl_vars['arr'][$this->_sections['loop']['index']]['f_id']; ?>
&back=<?php echo $this->_tpl_vars['backUrl']; ?>
" onClick="return confirm('确实要生成本分类的HTML吗？')">生成HTML</a> | <a href="category_modify.php?cId=<?php echo $this->_tpl_vars['arr'][$this->_sections['loop']['index']]['f_id']; ?>
&back=<?php echo $this->_tpl_vars['backUrl']; ?>
">修改</a> | <a href="category_delete.php?cId=<?php echo $this->_tpl_vars['arr'][$this->_sections['loop']['index']]['f_id']; ?>
&back=<?php echo $this->_tpl_vars['backUrl']; ?>
" onClick="return confirm('删除这个分类后，该分类下的网址都将被删除。\n\n确实要删除这个分类吗？')">删除</a></td>
  </tr>
  <?php endfor; endif; ?>
  </table>
  <p>
  >> <a href="category_add.php?pId=<?php echo $this->_tpl_vars['parentId']; ?>
&back=<?php echo $this->_tpl_vars['backUrl']; ?>
">在本分类下添加分类</a><br>
  <?php if ($this->_tpl_vars['parentId'] != 0): ?>
  <?php echo smarty_function_db_fetchrow(array('table' => 'categories','items' => '*','condition' => "f_id='".($this->_tpl_vars['parentId'])."'",'varname' => 'categoryInfo'), $this);?>

  >> <a href="category_list.php?pId=<?php echo $this->_tpl_vars['categoryInfo']['f_parentId']; ?>
">返回上级</a>
  <?php endif; ?>
</body>
</html>