Ticket #200 增加了修改评审管理员的功能
This commit is contained in:
parent
95fadd8c90
commit
7cd845fb83
|
@ -298,7 +298,24 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
$update = "update mdstatus set status=2 where uuid='$uuid'";
|
||||
$this->db->exec($update);
|
||||
}
|
||||
/*
|
||||
$mailbody=new emailtext();
|
||||
$mailbody->db = $this->db;//为邮件模板类传入PDO对象
|
||||
$mailbody->tmpid = $id;//传入模板的ID
|
||||
|
||||
//设置要替换的变量
|
||||
$mailbody->data = array(
|
||||
'user' => $this->_request->getParam('user')
|
||||
);
|
||||
//输出邮件正文
|
||||
$body=$mailbody->loadtmp();
|
||||
if($body){
|
||||
$body;
|
||||
}else{
|
||||
$this->messenger->addMessage('模板加载出错');
|
||||
$this->_redirect('');
|
||||
}
|
||||
*/
|
||||
$subject = "西部数据中心";
|
||||
$email = "la5c@qq.com";
|
||||
|
||||
|
@ -362,6 +379,42 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
|
||||
}//邀请专家
|
||||
|
||||
function changeadminAction(){
|
||||
|
||||
$id = $this->_request->getParam('id');
|
||||
$uid = $this->_request->getParam('uid');
|
||||
if(empty($id))
|
||||
{
|
||||
$this->_redirect("/admin/review");
|
||||
}
|
||||
|
||||
$this->view->id = $id;
|
||||
|
||||
if(!empty($uid))
|
||||
{
|
||||
$sql = "update mdstatus set userid='$uid' where id='$id'";
|
||||
if($this->db->exec($sql)>0)
|
||||
{
|
||||
$this->messenger->addMessage('更改管理员成功');
|
||||
$this->_redirect("/admin/review/changeadmin/?id=$id");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$sql = "select u.* from users u
|
||||
where usertype='administrator'";
|
||||
$re = $this->db->query($sql);
|
||||
$rows = $re->fetchAll();
|
||||
|
||||
$paginator = Zend_Paginator::factory($rows);
|
||||
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
||||
$paginator->setItemCountPerPage($this->view->config->page->max);
|
||||
$paginator->setView($this->view);
|
||||
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
|
||||
$this->view->paginator=$paginator;
|
||||
|
||||
}//改变管理员
|
||||
|
||||
|
||||
function addonAction(){
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
<td width='600'>元数据标题</td>
|
||||
<td width='120'>负责编辑</td>
|
||||
<td width='120'>时间</td>
|
||||
<td width='120'>操作</td>
|
||||
<td width='180'>操作</td>
|
||||
</tr>
|
||||
<?php if (count($this->paginator)): ?>
|
||||
<?php $autoindex=0;?>
|
||||
|
@ -54,6 +54,7 @@
|
|||
<td>
|
||||
<a href='/admin/review/accept/cancel/<?php echo $item['id'];?>' onclick="return confirm('是否确定取消评审')">取消评审</a>
|
||||
<a href='/admin/review/invite/?id=<?php echo $item['id'];?>'>邀请专家</a>
|
||||
<a href="/admin/review/changeadmin/?id=<?php echo $item['id'];?>">更改管理员</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
<tr style="color:#FFF;background:#0a3e68;line-height:30px;">
|
||||
<td width='40'>选择</td>
|
||||
<td width='600'>标题</td>
|
||||
<td width="150">操作</td>
|
||||
<td width="180">操作</td>
|
||||
</tr>
|
||||
<?php if (count($this->paginator)): ?>
|
||||
<?php $autoindex=0;?>
|
||||
|
@ -48,7 +48,9 @@
|
|||
<tr <?php if($autoindex%2 == 0) echo 'bgcolor="#CCCCCC"'; else echo 'bgcolor="#FFFFFF"'; ?>>
|
||||
<td><input type="checkbox" name="update[]" value="<?php echo $item['id']; ?>"/></td>
|
||||
<td><a href="/data/<?php echo $item['uuid'];?>"><?php echo $item['title']; ?></a></td>
|
||||
<td><a href="/admin/review/canceled/update/<?php echo $item['id']; ?>">重置</a></td>
|
||||
<td><a href="/admin/review/canceled/update/<?php echo $item['id']; ?>">重置</a>
|
||||
<a href="/admin/review/changeadmin/?id=<?php echo $item['id'];?>">更改管理员</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
|
|
|
@ -0,0 +1,58 @@
|
|||
<?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('元数据评审');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<div id="divContent">
|
||||
<div id="leftPanel">
|
||||
<?= $this->partial('review/left.phtml'); ?>
|
||||
</div>
|
||||
|
||||
<?php if ($this->msg or $this->messages) :?>
|
||||
<div id="message">
|
||||
<?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; ?>
|
||||
|
||||
<div id="rightPanel">
|
||||
|
||||
<table>
|
||||
<tr style="color:#FFF;background:#0a3e68;line-height:30px;text-align:center;">
|
||||
<td width='80'>用户ID</td>
|
||||
<td width='100'>用户名</td>
|
||||
<td width='100'>姓名</td>
|
||||
<td width="250">单位</td>
|
||||
<td width="100">联系电话</td>
|
||||
<td width="100">电子邮箱</td>
|
||||
<td width="100">操作</td>
|
||||
</tr>
|
||||
<?php if (count($this->paginator)): ?>
|
||||
<?php $autoindex=0;?>
|
||||
<?php foreach ($this->paginator as $item): ?>
|
||||
<?php $autoindex++;?>
|
||||
<tr <?php if($autoindex%2 == 0) echo 'bgcolor="#CCCCCC"'; else echo 'bgcolor="#FFFFFF"'; ?>>
|
||||
<td><?php echo $item['id']; ?></td>
|
||||
<td><?php echo $item['username']; ?></td>
|
||||
<td><?php echo $item['realname']; ?></td>
|
||||
<td><?php echo $item['unit']; ?></td>
|
||||
<td><?php echo $item['phone']; ?></td>
|
||||
<td><?php echo $item['email']; ?></td>
|
||||
<td><a href="/admin/review/changeadmin/?id=<?php echo $this->id;?>&uid=<?php echo $item['id'];?>">设置为此评审的管理员</a></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
<div style="width:50%;text-align:left;">
|
||||
<?= $this->paginator; ?></div>
|
||||
|
||||
</div>
|
||||
</div>
|
|
@ -40,7 +40,7 @@
|
|||
<td width='40'>选择</td>
|
||||
<td width='600'>标题</td>
|
||||
<td width='120'>时间</td>
|
||||
<td width="150">操作</td>
|
||||
<td width="180">操作</td>
|
||||
</tr>
|
||||
<?php if (count($this->paginator)): ?>
|
||||
<?php $autoindex=0;?>
|
||||
|
@ -50,7 +50,9 @@
|
|||
<td><input type="checkbox" name="update[]" value="<?php echo $item['id']; ?>"/></td>
|
||||
<td><a href="/data/<?php echo $item['uuid'];?>"><?php echo $item['title']; ?></a></td>
|
||||
<td><?php echo date("Y-m-d H:i",strtotime($item['ts_created']));?></td>
|
||||
<td><a href="/admin/review/draft/update/<?php echo $item['id']; ?>">接收</a></td>
|
||||
<td><a href="/admin/review/draft/update/<?php echo $item['id']; ?>">接收</a>
|
||||
<a href="/admin/review/changeadmin/?id=<?php echo $item['id'];?>">更改管理员</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
<tr style="color:#FFF;background:#0a3e68;line-height:30px;">
|
||||
<td width='600'>标题</td>
|
||||
<td width='100'>状态</td>
|
||||
<td width="150">操作</td>
|
||||
<td width="180">操作</td>
|
||||
</tr>
|
||||
<?php if (count($this->paginator)): ?>
|
||||
<?php $autoindex=0;?>
|
||||
|
@ -49,6 +49,7 @@
|
|||
<td><?php echo $item['status']; ?></td>
|
||||
<td><a href="/admin/review/inreview/show/<?php echo $item['id']; ?>">查看详细</a>
|
||||
<a href="/admin/review/invite/?id=<?php echo $item['id'];?>">邀请专家</a>
|
||||
<a href="/admin/review/changeadmin/?id=<?php echo $item['id'];?>">更改管理员</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
|
|
Loading…
Reference in New Issue