<?php /* Smarty version 2.6.19, created on 2014-03-07 05:11:00
         compiled from apply_list.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('function', 'db_fetchpage', 'apply_list.tpl', 22, false),array('function', 'db_fetchpagecount', 'apply_list.tpl', 42, false),array('function', 'paginator', 'apply_list.tpl', 43, false),array('modifier', 'date_format', 'apply_list.tpl', 35, 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>
<p class="fontBold">收录申请 </p>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
  <tr>
    <td class="borderBottom bgFleet">网站</td>
    <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>
    <td class="borderBottom bgFleet" align="center">操作</td>
  </tr>
  <?php echo smarty_function_db_fetchpage(array('table' => 'applies','items' => "*",'orderby' => 'f_id DESC','page' => ($this->_tpl_vars['page']),'pagesize' => '20','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 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 $this->_tpl_vars['arr'][$this->_sections['loop']['index']]['f_name']; ?>
&nbsp;</td>
    <td <?php echo $this->_tpl_vars['rowClass']; ?>
><?php echo $this->_tpl_vars['arr'][$this->_sections['loop']['index']]['f_url']; ?>
&nbsp;</td>
    <td <?php echo $this->_tpl_vars['rowClass']; ?>
 align="center"><?php echo $this->_tpl_vars['arr'][$this->_sections['loop']['index']]['f_category']; ?>
&nbsp;</td>
    <td <?php echo $this->_tpl_vars['rowClass']; ?>
 align="center"><?php echo $this->_tpl_vars['arr'][$this->_sections['loop']['index']]['f_ips']; ?>
&nbsp;</td>
    <td <?php echo $this->_tpl_vars['rowClass']; ?>
 align="center"><?php if ($this->_tpl_vars['arr'][$this->_sections['loop']['index']]['f_linked']): ?>√<?php else: ?>&nbsp;<?php endif; ?></td>
    <td width="120" <?php echo $this->_tpl_vars['rowClass']; ?>
 align="center"><?php echo ((is_array($_tmp=$this->_tpl_vars['arr'][$this->_sections['loop']['index']]['f_addTime'])) ? $this->_run_mod_handler('date_format', true, $_tmp, "%Y-%m-%d %H:%M:%S") : smarty_modifier_date_format($_tmp, "%Y-%m-%d %H:%M:%S")); ?>
</td>
    <td width="40" <?php echo $this->_tpl_vars['rowClass']; ?>
 align="center"><a href="<?php echo $this->_tpl_vars['arr'][$this->_sections['loop']['index']]['f_url']; ?>
" target="_blank">访问</a></td>
    <td width="120" <?php echo $this->_tpl_vars['rowClass']; ?>
 align="center"><a href="apply_detail.php?aId=<?php echo $this->_tpl_vars['arr'][$this->_sections['loop']['index']]['f_id']; ?>
&amp;back=<?php echo $this->_tpl_vars['backUrl']; ?>
">详情</a> | <a href="site_add.php?aId=<?php echo $this->_tpl_vars['arr'][$this->_sections['loop']['index']]['f_id']; ?>
&amp;back=<?php echo $this->_tpl_vars['backUrl']; ?>
">收录</a> | <a href="apply_delete.php?aId=<?php echo $this->_tpl_vars['arr'][$this->_sections['loop']['index']]['f_id']; ?>
&amp;back=<?php echo $this->_tpl_vars['backUrl']; ?>
" onClick="return confirm('确实要删除这个申请吗？')">删除</a></td>
  </tr>
  <?php endfor; endif; ?>
</table>
<br>
<?php echo smarty_function_db_fetchpagecount(array('table' => 'applies','condition' => "",'pagesize' => '20','varname' => 'pageCount'), $this);?>

<?php echo smarty_function_paginator(array('page' => ($this->_tpl_vars['page']),'pagecount' => ($this->_tpl_vars['pageCount']),'url' => "?p=PAGENUMBER"), $this);?>

</body>
</html>