westdc-zf1/application/admin/views/scripts/user/list.phtml

76 lines
3.3 KiB
PHTML
Executable File

<?php
$this->headTitle($this->config->title->site);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin/">后台首页</a>');
$this->breadcrumb('<a href="/admin/user">用户管理</a>');
$this->breadcrumb()->setSeparator(' > ');
?>
<div class="row-fluid">
<div class="span3">
<?= $this->partial('user/left.phtml'); ?>
</div>
<div class="span9">
<h3>用户列表</h3>
<hr />
<?php if ($this->msg or $this->messages) :?>
<div class="alert alert-success">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<?php if ($this->msg) : ?>
<?php echo $this->msg; ?>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
<?php echo $msg; ?>
<?php endforeach;endif; ?>
</div>
<?php endif; ?>
<div class="search form-inline">
<form action="/admin/user/search/" method="get">
<input type="hidden" name="search" value='1' />
<label>姓名</label><input type="text" name="realname" value="<?php echo $this->realname; ?>" />
<label>单位</label><input type="text" name="unit" value="<?php echo $this->unit; ?>" />
<label>项目</label><input type="text" name="project" value="<?php echo $this->project; ?>" />
<button type="submit" value="搜索" class="btn btn-success">搜索</button>
</form>
</div><!-- search DIV -->
<hr />
<table class="table table-hover">
<thead>
<tr>
<td width='150'>用户名</td>
<td width='250'>电子邮箱</td>
<td width='100'>用户组</td>
<td width='200'>单位</td>
<td width='100'>真实姓名</td>
<td width='150'>操作</td>
</tr>
</thead><!-- table's head -->
<?php if (count($this->paginator)): ?>
<?php $autoindex=0;?>
<?php foreach ($this->paginator as $item): ?>
<?php $autoindex++;?>
<tr class="<?php if($autoindex%2 == 0) echo 'even'; else echo 'odd'; ?>">
<td><?= $item['username']?></td>
<td><?= $item['email']; ?></td>
<td><?= $item['usertype']; ?></td>
<td><?= $item['unit']; ?></td>
<td><?= $item['realname']; ?></td>
<td>
<a href='/admin/user/delete/id/<?= $item['id'];?>/uname/<?= $item['username'];?>' onclick="return confirm('确定将此记录删除?')">删除</a>
<a href='/admin/user/show/id/<?= $item['id'];?>'>查看详细</a>
<a href='/admin/user/fetchpwd/email/<?= $item['email'];?>/id/<?= $item['id'];?>' onclick="return confirm('是否确定为他重置密码?')">重置密码</a>
<a href='/admin/user/up/id/<?= $item['id'];?>' onclick="return confirm('确定将该用户提升为评审专家?')">提升为评审专家</a>
<a href="/admin/user/userauth/uid/<?= $item['id'];?>">编辑权限</a>
</td>
</tr>
<?php endforeach; ?>
<?php endif; ?>
</table>
<div class="pagenavi"><?= $this->paginator; ?></div>
</div><!-- span9 -->
</div>