<?php /* Smarty version 2.6.19, created on 2014-03-07 03:36:08
         compiled from user_list.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('function', 'db_fetchpage', 'user_list.tpl', 22, false),array('function', 'db_fetchpagecount', 'user_list.tpl', 42, false),array('function', 'paginator', 'user_list.tpl', 43, false),array('modifier', 'date_format', 'user_list.tpl', 32, 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" align="center">编号</td>
    <td class="borderBottom bgFleet" align="center">用户名</td>
    <td class="borderBottom bgFleet" align="center">注册时间</td>
    <td class="borderBottom bgFleet" align="center">注册IP</td>
    <td class="borderBottom bgFleet" align="center">最后登录时间</td>
    <td class="borderBottom bgFleet" align="center">最后登录IP</td>
    <td class="borderBottom bgFleet" align="center">登录次数</td>
    <td class="borderBottom bgFleet" align="center">操作</td>
  </tr>
  <?php echo smarty_function_db_fetchpage(array('table' => 'users','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']; ?>
 align="center"><?php echo $this->_tpl_vars['arr'][$this->_sections['loop']['index']]['f_id']; ?>
&nbsp;</td>
    <td <?php echo $this->_tpl_vars['rowClass']; ?>
 align="center"><a href="user_site_list.php?cId=<?php echo $this->_tpl_vars['arr'][$this->_sections['loop']['index']]['f_id']; ?>
"><?php echo $this->_tpl_vars['arr'][$this->_sections['loop']['index']]['f_userName']; ?>
</a>&nbsp;</td>
    <td <?php echo $this->_tpl_vars['rowClass']; ?>
 align="center"><?php echo ((is_array($_tmp=$this->_tpl_vars['arr'][$this->_sections['loop']['index']]['f_regTime']+28800)) ? $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')); ?>
&nbsp;</td>
    <td <?php echo $this->_tpl_vars['rowClass']; ?>
 align="center"><?php echo $this->_tpl_vars['arr'][$this->_sections['loop']['index']]['f_regIp']; ?>
&nbsp;</td>
    <td <?php echo $this->_tpl_vars['rowClass']; ?>
 align="center"><?php echo ((is_array($_tmp=$this->_tpl_vars['arr'][$this->_sections['loop']['index']]['f_lastTime']+28800)) ? $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 <?php echo $this->_tpl_vars['rowClass']; ?>
 align="center"><?php echo $this->_tpl_vars['arr'][$this->_sections['loop']['index']]['f_lastIp']; ?>
&nbsp;</td>
    <td <?php echo $this->_tpl_vars['rowClass']; ?>
 align="center"><?php echo $this->_tpl_vars['arr'][$this->_sections['loop']['index']]['f_loginTimes']; ?>
&nbsp;</td>
    <td <?php echo $this->_tpl_vars['rowClass']; ?>
 align="center"><a href="user_delete.php?id=<?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' => 'users','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>