84 lines
3.6 KiB
PHTML
Executable File
84 lines
3.6 KiB
PHTML
Executable File
<?php
|
|
$this->headTitle($this->config->title->site);
|
|
$this->headTitle('后台管理');
|
|
$this->headTitle()->setSeparator(' - ');
|
|
$this->headLink()->appendStylesheet('/css/admin.css');
|
|
$this->breadcrumb('<a href="/">首页</a>');
|
|
$this->breadcrumb('<a href="/admin/">后台首页</a>');
|
|
$this->breadcrumb('<a href="/admin/user">用户管理</a>');
|
|
$this->breadcrumb()->setSeparator(' > ');
|
|
?>
|
|
<div class="row">
|
|
<div class="hidden-sm hidden-xs col-md-2">
|
|
<?= $this->partial('user/left.phtml'); ?>
|
|
</div>
|
|
<div class="col-md-10 col-sm-12">
|
|
<?php if ($this->msg or $this->messages) :?>
|
|
<div id="message" class="alert alert-info">
|
|
<?php if ($this->msg) : ?>
|
|
<p><?php echo $this->msg; ?></p>
|
|
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
|
<p><?php echo $msg; ?></p>
|
|
<?php endforeach;endif; ?>
|
|
</div>
|
|
<?php endif; ?>
|
|
<h4>用户列表</h4>
|
|
<hr />
|
|
<div class="form-group form-inline">
|
|
<form action="/admin/user/search/" method="get">
|
|
<div class="form-group">
|
|
<input type="text" name="realname" value="<?php echo $this->realname; ?>" class="form-control" placeholder="姓名"/>
|
|
</div>
|
|
<div class="form-group">
|
|
<input type="text" name="unit" value="<?php echo $this->unit; ?>" class="form-control" placeholder="单位" />
|
|
</div>
|
|
<div class="form-group">
|
|
<input type="text" name="project" value="<?php echo $this->project; ?>" class="form-control" placeholder="项目"/>
|
|
</div>
|
|
<div class="form-group">
|
|
<input type="hidden" name="search" value='1' class="form-control" />
|
|
<button class="btn btn-default" type="submit">搜索</button>
|
|
</div>
|
|
</form>
|
|
</div><!-- search DIV -->
|
|
<table class="stylized table table-bordered table-striped 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="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>
|
|
<td><?= $item['username']?></td>
|
|
<td><?= $item['email']; ?></td>
|
|
<td><?= $item['usertype']; ?></td>
|
|
<td><?= $item['unit']; ?></td>
|
|
<td><?= $item['realname']; ?></td>
|
|
<td><?= $item['status'] == 1 ? "启用":"禁用"; ?></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>
|
|
<?php if($item['status'] == -1) :?>
|
|
<a href="/admin/user/unban/uid/<?= $item['id'] ?>">启用</a>
|
|
<?php elseif($item['status'] == 1): ?>
|
|
<a href="/admin/user/ban/uid/<?= $item['id'] ?>">禁用</a>
|
|
<?php endif;?>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
<?php endif; ?>
|
|
</table>
|
|
<div class="pagenavi"><?= $this->paginator; ?></div>
|
|
</div>
|
|
</div>
|