修改用户管理相关内容

This commit is contained in:
Li Jianxuan 2014-06-05 09:49:04 +00:00
parent 798bf669da
commit 4833a99d8a
2 changed files with 48 additions and 42 deletions

View File

@ -2,46 +2,47 @@
$this->headTitle($this->config->title->site); $this->headTitle($this->config->title->site);
$this->headTitle('后台管理'); $this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - '); $this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->breadcrumb('<a href="/">首页</a>'); $this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin/">后台首页</a>'); $this->breadcrumb('<a href="/admin/">后台首页</a>');
$this->breadcrumb('<a href="/admin/user">用户管理</a>'); $this->breadcrumb('<a href="/admin/user">用户管理</a>');
$this->breadcrumb()->setSeparator(' > '); $this->breadcrumb()->setSeparator(' > ');
?> ?>
<div id="leftPanel"> <div class="row-fluid">
<?= $this->partial('user/left.phtml'); ?> <div class="span3">
</div> <?= $this->partial('user/left.phtml'); ?>
</div>
<div id="rightPanel"> <div class="span9">
<div class="title">管理员列表</div> <div class="title">管理员列表</div>
<div class=""><a href="/admin/user/adminlist/ac/sync">同步管理员到geonetwork</a></div> <div class=""><a href="/admin/user/adminlist/ac/sync">同步管理员到geonetwork</a></div>
<table> <table class="table">
<thead> <thead>
<tr> <tr>
<td width='150'>用户名</td> <td width='150'>用户名</td>
<td width='250'>电子邮箱</td> <td width='250'>电子邮箱</td>
<td width='100'>用户类型</td> <td width='100'>用户类型</td>
<td width='150'>真实姓名</td> <td width='150'>真实姓名</td>
<td width='150'>电话</td> <td width='150'>电话</td>
<td width='150'>操作</td> <td width='150'>操作</td>
</tr> </tr>
</thead> </thead>
<?php if (count($this->paginator)): ?> <?php if (count($this->paginator)): ?>
<?php $autoindex=0;?> <?php $autoindex=0;?>
<?php foreach ($this->paginator as $item): ?> <?php foreach ($this->paginator as $item): ?>
<?php $autoindex++;?> <?php $autoindex++;?>
<tr class="<?php if($autoindex%2 == 0) echo 'even'; else echo 'odd'; ?>"> <tr class="<?php if($autoindex%2 == 0) echo 'even'; else echo 'odd'; ?>">
<td><?= $item['username']?></td> <td><?= $item['username']?></td>
<td><?= $item['email']; ?></td> <td><?= $item['email']; ?></td>
<td><?= $item['usertype']; ?></td> <td><?= $item['usertype']; ?></td>
<td><?= $item['realname']; ?></td> <td><?= $item['realname']; ?></td>
<td><?= $item['phone']; ?></td> <td><?= $item['phone']; ?></td>
<td> <td>
<a href='/admin/user/show/id/<?= $item['id'];?>'>查看详细</a> <a href='/admin/user/show/id/<?= $item['id'];?>'>查看详细</a>
</td> </td>
</tr> </tr>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?> <?php endif; ?>
</table> </table>
<div class="pagenavi"><?= $this->paginator; ?></div> <div class="pagenavi"><?= $this->paginator; ?></div>
</div>
</div> </div>

View File

@ -44,11 +44,11 @@ class Users extends \Zend_Controller_Plugin_Abstract
$this->usertype = array( $this->usertype = array(
'普通会员' => 'member', '普通会员' => 'member',
'系统管理员' => 'administrator', '系统管理员' => 'administrator',
'青海省气象科学研究所' => '', '青海省气象科学研究所' => 'meteorologic',
'青海省环境监测中心站' => '', '青海省环境监测中心站' => 'environment',
'青海省水土保持局' => '', '青海省水土保持局' => 'watersoil',
'青海省林业调查规划院' => '', '青海省林业调查规划院' => 'forestry',
'青海省水文水资源局' => '' '青海省水文水资源局' => 'hydrology'
); );
} }
@ -59,7 +59,7 @@ class Users extends \Zend_Controller_Plugin_Abstract
return $this->usertype; return $this->usertype;
} }
//通过ID获取User信息 //通过ID获取User信息
public function getUser($id) public function getUser($id)
{ {
$sql="select * from users where id=?"; $sql="select * from users where id=?";
@ -69,6 +69,11 @@ class Users extends \Zend_Controller_Plugin_Abstract
return $rows; return $rows;
} }
public function getUserInfo($id)
{
return $this->getUser($id);
}
//通过email地址返回用户信息是否存在 //通过email地址返回用户信息是否存在
public function userExists($email = NULL) public function userExists($email = NULL)
{ {