add inviteok action in review controller
This commit is contained in:
parent
75e47abb23
commit
34f836b551
|
@ -761,5 +761,49 @@ class ReviewController extends Zend_Controller_Action
|
|||
|
||||
}// denyinviteAction() 专家拒绝邀请
|
||||
|
||||
//parameters are same as denyinviteAction
|
||||
function inviteokAction()
|
||||
{
|
||||
|
||||
$id = $this->_request->getParam('id');
|
||||
$uuid = $this->_request->getParam('uuid');
|
||||
|
||||
if(empty($id) || empty($uuid) || !is_numeric($id) ||!preg_match("/^[0-9A-Za-z]{8}-[0-9A-Za-z]{4}-[0-9A-Za-z]{4}-[0-9A-Za-z]{4}-[0-9A-Za-z]{12}$/",$uuid))
|
||||
{
|
||||
$this->view->message = "参数错误";
|
||||
}else{
|
||||
|
||||
$auth = Zend_Auth::getInstance();
|
||||
if($auth->hasIdentity())
|
||||
{
|
||||
$user = $auth->getIdentity();
|
||||
$userid = $user->id;
|
||||
|
||||
if($id==$userid)
|
||||
{
|
||||
try{
|
||||
$sql = "update mdexpertreview set status=1 where id='$id' and uuid='$uuid'";
|
||||
if($this->db->exec($sql))
|
||||
$this->view->message = "感谢您同意对该数据的评审邀请,如遇到任何问题,请联系数据中心服务人员。";
|
||||
else
|
||||
$this->view->message = "您无权限进行此操作";
|
||||
}catch(Exception $e){
|
||||
$this->view->message = $e->getMessage();
|
||||
}
|
||||
|
||||
}//end if
|
||||
else
|
||||
{
|
||||
$this->view->message = "您无权使用此通知";
|
||||
}//非本人操作,或尝试删除他人信息
|
||||
|
||||
}//end if
|
||||
else
|
||||
{
|
||||
$this->view->message = '请登录后再执行此操作,请<a href="/account/login/?href=/review/inviteok/id/'.$id.'/uuid/'.$uuid.'">点击此处登录</a>';
|
||||
}//未登录
|
||||
}
|
||||
|
||||
}// denyinviteAction() 专家拒绝邀请
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
$config = Zend_Registry::get('config');
|
||||
$this->headTitle($config->title->site);
|
||||
$this->headTitle($config->title->review);
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/mdreview.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('元数据评审');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<div>
|
||||
<?php echo $this->message;?>
|
||||
</div>
|
Loading…
Reference in New Issue