修改后台评审的模板和一些细节
This commit is contained in:
parent
326572d7c2
commit
01cb81cd1b
|
@ -141,6 +141,8 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
$update = $this->_request->getParam('update');
|
||||
$invite = $this->_request->getParam('invite');
|
||||
|
||||
include_once("helper/view.php");
|
||||
|
||||
if($cancel>0)
|
||||
{
|
||||
if($this->changestatus($cancel,-1))
|
||||
|
@ -153,16 +155,17 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
$sth->execute(array($cancel));
|
||||
$data = $sth->fetch();
|
||||
$search->del($data['uuid'],'uuid');
|
||||
$this->messenger->addMessage('操作成功:已取消该数据的评审');
|
||||
$this->_redirect("/admin/review/accept");
|
||||
view::Post($this,array("content"=>'操作成功:已取消该数据的评审','url'=>'/admin/review/accept'));
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
$this->messenger->addMessage('操作失败');
|
||||
$this->_redirect("/admin/review/accept");
|
||||
view::Post($this,array("content"=>'操作失败','url'=>'/admin/review/accept'));
|
||||
return true;
|
||||
}
|
||||
}//取消元数据评审
|
||||
if($search)
|
||||
{
|
||||
|
||||
$keyword = $this->_request->getParam('keyword');
|
||||
if(!empty($keyword))
|
||||
{
|
||||
|
@ -335,6 +338,8 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
|
||||
$this->view->id = $id;
|
||||
|
||||
include_once("helper/view.php");
|
||||
|
||||
if(!empty($submit))
|
||||
{
|
||||
if(is_array($exps))
|
||||
|
@ -357,7 +362,8 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
$rows = $rs->fetch();
|
||||
if($rows['id']!='')
|
||||
{
|
||||
$this->messenger->addMessage('已经邀请过专家:'.$rows['realname']);
|
||||
view::Post($this,array("content"=>'已经邀请过专家:'.$rows['realname'],'url'=>-1));
|
||||
return true;
|
||||
}//已经有评审记录
|
||||
else
|
||||
{
|
||||
|
@ -388,14 +394,17 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
$mail->createAttachment($filecontent,'application/octet-stream',Zend_Mime::DISPOSITION_ATTACHMENT, Zend_Mime::ENCODING_BASE64, $md['title'].'.pdf');
|
||||
if($mail->send())
|
||||
{
|
||||
$this->messenger->addMessage('成功邀请专家:'.$expinfo['realname']);
|
||||
view::Post($this,array("content"=>'成功邀请专家:'.$expinfo['realname'],'url'=>-1));
|
||||
return true;
|
||||
}else
|
||||
{
|
||||
$this->messenger->addMessage('邀请专家'.$expinfo['realname'].'的邮件发送失败,请尝试手动发送邀请邮件');
|
||||
view::Post($this,array("content"=>'邀请专家'.$expinfo['realname'].'的邮件发送失败,请尝试手动发送邀请邮件','url'=>-1));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}catch(Exception $e){
|
||||
$this->messenger->addMessage('邀请失败:'.$e->getMessage());
|
||||
view::Post($this,array("content"=>'邀请失败:'.$e->getMessage(),'url'=>-1));
|
||||
return true;
|
||||
}
|
||||
}//不存在原来的记录
|
||||
}//循环结束
|
||||
|
@ -403,8 +412,8 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
}
|
||||
else
|
||||
{
|
||||
$this->messenger->addMessage('请选择要邀请的专家');
|
||||
$this->_redirect("/admin/review/invite/?id=$id");
|
||||
view::Post($this,array("content"=>'请选择要邀请的专家','url'=>"/admin/review/invite/?id=$id"));
|
||||
return true;
|
||||
}
|
||||
} elseif ($user>0) {
|
||||
$uuid=$this->_request->getParam('uuid');
|
||||
|
@ -425,12 +434,12 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
$mail->createAttachment($filecontent,'application/octet-stream',Zend_Mime::DISPOSITION_ATTACHMENT, Zend_Mime::ENCODING_BASE64, $row['title'].'.pdf');
|
||||
if($mail->send())
|
||||
{
|
||||
$this->messenger->addMessage('成功再次邀请专家:'.$row['realname']);
|
||||
$this->_redirect("/admin/review/inreview/show/$id");
|
||||
view::Post($this,array("content"=>'成功再次邀请专家:'.$row['realname'],'url'=>"/admin/review/inreview/show/$id"));
|
||||
return true;
|
||||
}else
|
||||
{
|
||||
$this->messenger->addMessage('邀请专家'.$row['realname'].'的邮件发送失败,请尝试手动发送邀请邮件');
|
||||
$this->_redirect("/admin/review/inreview/show/$id");
|
||||
view::Post($this,array("content"=>'邀请专家'.$row['realname'].'的邮件发送失败,请尝试手动发送邀请邮件','url'=>"/admin/review/inreview/show/$id"));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
$searchjoin = "";
|
||||
|
@ -493,12 +502,12 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
$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");
|
||||
include_once('helper/view.php');
|
||||
view::Post($this,array("content"=>'修改成功','url'=>-1));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$sql = "select u.* from users u
|
||||
where usertype='administrator'";
|
||||
$re = $this->db->query($sql);
|
||||
|
@ -530,27 +539,29 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
$re = $this->db->query($sql);
|
||||
$row = $re->fetch();
|
||||
|
||||
include_once('helper/view.php');
|
||||
|
||||
if(empty($row['id']))
|
||||
{
|
||||
$sql = "insert into mdstatus (uuid,userid,status) values ('$uuid','$userid','0')";
|
||||
try{
|
||||
if($this->db->exec($sql)>0)
|
||||
{
|
||||
$this->messenger->addMessage('操作成功!该数据已放入评审');
|
||||
$this->_redirect("/admin/review/draft");
|
||||
view::Post($this,array("content"=>'操作成功!该数据已放入评审','url'=>'/admin/review/draft'));
|
||||
return true;
|
||||
}
|
||||
}catch( Exception $e){
|
||||
$this->messenger->addMessage('操作失败:'.$e->getMessage());
|
||||
$this->_redirect("/admin/review/draft");
|
||||
view::Post($this,array("content"=>'操作失败:'.$e->getMessage(),'url'=>'/admin/review/draft'));
|
||||
return true;
|
||||
}
|
||||
} else if ($row['status']==5){
|
||||
$sql="update mdstatus set status=1,ts_accepted=now() where status=5 and id=".$row['id'];
|
||||
$this->db->query($sql);
|
||||
$this->messenger->addMessage('操作成功!该数据已重新放入评审');
|
||||
$this->_redirect("/admin/review/accept");
|
||||
view::Post($this,array("content"=>'操作成功!该数据已重新放入评审','url'=>'/admin/review/accept'));
|
||||
return true;
|
||||
} else {
|
||||
$this->messenger->addMessage('该数据已放入评审');
|
||||
$this->_redirect("/admin/data/md");
|
||||
view::Post($this,array("content"=>'该数据已放入评审','url'=>'/admin/data/md'));
|
||||
return true;
|
||||
}
|
||||
|
||||
}//将数据放入评审
|
||||
|
@ -585,10 +596,10 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
$this->view->keyword = $keyword;
|
||||
}
|
||||
|
||||
$sql = "select m.id,md.uuid,md.title,u.username,u.realname,m.status from mdstatus m
|
||||
$sql = "select m.id,md.uuid,md.title,u.username,u.realname,m.status,md.id as mdid from mdstatus m
|
||||
right join metadata md on md.uuid=m.uuid
|
||||
left join users u on u.id=m.userid
|
||||
where m.status in (0,1,2,3,4) and u.id='$userid' $searchjoin order by m.status desc,m.ts_accepted desc";
|
||||
where m.status in (0,1,2,3,4) and u.id='$userid' $searchjoin order by m.status desc,m.ts_accepted desc";
|
||||
|
||||
$re = $this->db->query($sql);
|
||||
$rows = $re->fetchAll();
|
||||
|
@ -644,6 +655,7 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
$id = $this->_request->getParam('id');
|
||||
$emails = $this->_request->getParam('emails');
|
||||
|
||||
include_once('helper/view.php');
|
||||
$auth = Zend_Auth::getInstance();
|
||||
if($auth->hasIdentity())
|
||||
{
|
||||
|
@ -659,7 +671,6 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
|
||||
if($this->changestatus($id,5))
|
||||
{
|
||||
$this->messenger->addMessage('操作成功:该元数据成功发布');
|
||||
//发布正式版本
|
||||
$sql = "UPDATE mdversion SET changelog=?,userid=? WHERE id in (select id from mdversion where uuid in (select uuid from mdstatus where id=?) order by ts_created desc limit 1)";
|
||||
$this->db->query($sql,array('发布第一个正式版本 version 1.0',$userid,$id));
|
||||
|
@ -677,26 +688,25 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
$mail->addTo($emails);
|
||||
$mail->setSubject($mailtp->getSubject());
|
||||
$mail->send();
|
||||
$this->_redirect("/admin/review/myreview");
|
||||
|
||||
view::Post($this,array("content"=>'操作成功:该元数据成功发布','url'=>"/admin/review/myreview"));
|
||||
return true;
|
||||
}else{
|
||||
$this->messenger->addMessage('操作失败');
|
||||
$this->_redirect("/admin/review/myreview");
|
||||
view::Post($this,array("content"=>'操作失败','url'=>"/admin/review/myreview"));
|
||||
return true;
|
||||
}
|
||||
|
||||
}else{
|
||||
|
||||
$this->messenger->addMessage('您没有权限操作其他管理员管理的元数据评审');
|
||||
$this->_redirect("/admin/review/myreview");
|
||||
|
||||
view::Post($this,array("content"=>'您没有权限操作其他管理员管理的元数据评审','url'=>"/admin/review/myreview"));
|
||||
return true;
|
||||
}
|
||||
|
||||
}else
|
||||
{
|
||||
$this->messenger->addMessage('权限读取失败');
|
||||
$this->_redirect("/admin/review/myreview");
|
||||
view::Post($this,array("content"=>'权限读取失败','url'=>"/admin/review/myreview"));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}//发布元数据
|
||||
|
||||
/*
|
||||
|
@ -709,19 +719,17 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
* 对需要重新评审的元数据进行回滚,即状态为3
|
||||
*/
|
||||
function rollbackAction(){
|
||||
|
||||
$id=$this->_request->getParam('id');
|
||||
|
||||
include_once("helper/view.php");
|
||||
if($this->changestatus($id,3))
|
||||
{
|
||||
$this->messenger->addMessage('操作成功!');
|
||||
$this->_redirect("/admin/review/reviewed");
|
||||
view::Post($this,array("content"=>'操作成功!','url'=>"/admin/review/reviewed"));
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
$this->messenger->addMessage('操作失败'.$id);
|
||||
$this->_redirect("/admin/review/reviewed");
|
||||
view::Post($this,array("content"=>'操作失败'.$id,'url'=>"/admin/review/reviewed"));
|
||||
return true;
|
||||
}
|
||||
|
||||
}//重新评审
|
||||
|
||||
|
||||
|
@ -741,6 +749,8 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
$keyword = $this->_request->getParam('keyword');
|
||||
$update = $this->_request->getParam('update');
|
||||
|
||||
include_once("helper/view.php");
|
||||
|
||||
if($update>0 || is_array($update))
|
||||
{
|
||||
$ids = '';
|
||||
|
@ -791,12 +801,12 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
$mail->send();
|
||||
}
|
||||
}
|
||||
$this->messenger->addMessage('操作成功!');
|
||||
$this->_redirect("/admin/review/draft");
|
||||
view::Post($this,array("content"=>'操作成功!'.$id,'url'=>"/admin/review/draft"));
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
$this->messenger->addMessage('操作失败');
|
||||
$this->_redirect("/admin/review/accept");
|
||||
view::Post($this,array("content"=>'操作失败'.$id,'url'=>"/admin/review/accept"));
|
||||
return true;
|
||||
}
|
||||
|
||||
}//开始评审
|
||||
|
@ -843,7 +853,7 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
$search=$this->_request->getParam('search');
|
||||
$keyword = $this->_request->getParam('keyword');
|
||||
$update = $this->_request->getParam('update');
|
||||
|
||||
include_once('helper/view.php');
|
||||
if($update>0 || is_array($update))
|
||||
{
|
||||
$ids = '';
|
||||
|
@ -852,12 +862,12 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
|
||||
if($this->changestatus($ids,0))
|
||||
{
|
||||
$this->messenger->addMessage('操作成功!');
|
||||
$this->_redirect("/admin/review/canceled");
|
||||
view::Post($this,array("content"=>'操作成功!','url'=>"/admin/review/canceled"));
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
$this->messenger->addMessage('操作失败'.$ids);
|
||||
$this->_redirect("/admin/review/canceled");
|
||||
view::Post($this,array("content"=>'操作失败'.$ids,'url'=>"/admin/review/canceled"));
|
||||
return true;
|
||||
}
|
||||
|
||||
}//取消评审
|
||||
|
@ -939,6 +949,7 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
function deleteAction(){
|
||||
|
||||
$id=$this->_request->getParam('id');
|
||||
include_once("helper/view.php");
|
||||
try{
|
||||
$auth = Zend_Auth::getInstance();
|
||||
if($auth->hasIdentity())
|
||||
|
@ -955,30 +966,26 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
$sql = "delete from mdstatus where id='$id'";
|
||||
if($this->db->exec($sql))
|
||||
{
|
||||
$this->messenger->addMessage('删除成功');
|
||||
$this->_redirect("/admin/review/myreview");
|
||||
view::Post($this,array("content"=>'删除成功','url'=>"/admin/review/myreview"));
|
||||
return true;
|
||||
}else{
|
||||
$this->messenger->addMessage('删除失败');
|
||||
$this->_redirect("/admin/review/myreview");
|
||||
view::Post($this,array("content"=>'删除失败','url'=>"/admin/review/myreview"));
|
||||
return true;
|
||||
}
|
||||
|
||||
}else{
|
||||
|
||||
$this->messenger->addMessage('您没有权限操作其他管理员管理的元数据评审');
|
||||
$this->_redirect("/admin/review/myreview");
|
||||
|
||||
view::Post($this,array("content"=>'您没有权限操作其他管理员管理的元数据评审','url'=>"/admin/review/myreview"));
|
||||
return true;
|
||||
}
|
||||
|
||||
}else
|
||||
{
|
||||
$this->messenger->addMessage('权限读取失败');
|
||||
$this->_redirect("/admin/review/myreview");
|
||||
view::Post($this,array("content"=>'权限读取失败','url'=>"/admin/review/myreview"));
|
||||
return true;
|
||||
}
|
||||
}catch(Exception $e){
|
||||
$this->messenger->addMessage('删除失败:'.$e->getMessage());
|
||||
$this->_redirect("/admin/review/myreview");
|
||||
view::Post($this,array("content"=>'删除失败:'.$e->getMessage(),'url'=>"/admin/review/myreview"));
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -1004,6 +1011,8 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
$del = $this->_request->getParam('del');
|
||||
$add = $this->_request->getParam('add');
|
||||
|
||||
include_once("helper/view.php");
|
||||
|
||||
if($add)
|
||||
{
|
||||
if(!empty($submit))
|
||||
|
@ -1043,9 +1052,8 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
|
||||
if(!empty($test['id']))
|
||||
{
|
||||
$this->messenger->addMessage('用户名或邮箱重复');
|
||||
$this->_redirect("/admin/review/experts");
|
||||
|
||||
view::Post($this,array("content"=>'用户名或邮箱重复','url'=>"/admin/review/experts"));
|
||||
return true;
|
||||
}
|
||||
|
||||
else
|
||||
|
@ -1079,8 +1087,8 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
$sql="insert into mdexperts (id,speciality) values ('{$row['id']}','$speciality')";
|
||||
if($this->db->exec($sql)>0)
|
||||
{
|
||||
$this->messenger->addMessage('成功添加评审专家');
|
||||
$this->_redirect("/admin/review/experts");
|
||||
view::Post($this,array("content"=>'成功添加评审专家','url'=>"/admin/review/experts"));
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1098,8 +1106,8 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
$sql="delete from mdexperts where id='$del'";
|
||||
if($this->db->exec($sql)>0)
|
||||
{
|
||||
$this->messenger->addMessage('删除成功!');
|
||||
$this->_redirect('/admin/review/experts');
|
||||
view::Post($this,array("content"=>'删除成功!','url'=>'/admin/review/experts'));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1111,8 +1119,8 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
$sql = "update mdexperts set speciality='$speciality',ts_modified='".date("Y-m-d H:i:s",time())."' where id='$edit'";
|
||||
if($this->db->exec($sql)>0)
|
||||
{
|
||||
$this->messenger->addMessage('编辑成功!');
|
||||
$this->_redirect('/admin/review/experts');
|
||||
view::Post($this,array("content"=>'编辑成功!','url'=>'/admin/review/experts'));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -1189,15 +1197,15 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
$id = $this->_request->getParam('id');
|
||||
$q = $this->_request->getParam('q');
|
||||
$search = $this->_request->getParam('search');
|
||||
|
||||
include_once('helper/view.php');
|
||||
if($ac=='view' && !empty($id))
|
||||
{
|
||||
$redirect = "/admin/review/comments/ac/view/id/$id";
|
||||
|
||||
if(!is_numeric($id))
|
||||
{
|
||||
$this->messenger->addMessage('参数不正确,请按正确的步骤进行访问');
|
||||
$this->_redirect($redirect);
|
||||
view::Post($this,array("content"=>'参数不正确,请按正确的步骤进行访问','url'=>$redirect));
|
||||
return true;
|
||||
}
|
||||
|
||||
$sql = "select r.*,md.title,u.realname,u.id as uid from mdreview r
|
||||
|
@ -1212,8 +1220,8 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
|
||||
if(empty($row['id']))
|
||||
{
|
||||
$this->messenger->addMessage('该评审不存在或者已删除');
|
||||
$this->_redirect($redirect);
|
||||
view::Post($this,array("content"=>'该评审不存在或者已删除','url'=>$redirect));
|
||||
return true;
|
||||
}
|
||||
|
||||
$sql = "select att.realname,att.id from attachments att
|
||||
|
@ -1270,8 +1278,8 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
{
|
||||
if (preg_match("/[<|>|#|$|%|^|*|(|)|{|}|'|\"|;|:]/i",$q) || !is_numeric($search))
|
||||
{
|
||||
$this->messenger->addMessage('您的输入的搜索条件包含非法请求,请不要输入特殊符号');
|
||||
$this->_redirect($redirect);
|
||||
view::Post($this,array("content"=>'您的输入的搜索条件包含非法请求,请不要输入特殊符号','url'=>$redirect));
|
||||
return true;
|
||||
}
|
||||
$this->view->q = $q;
|
||||
$wheresql[] = " (md.title like '%$q%' or u.realname like '%$q%') ";
|
||||
|
@ -1321,8 +1329,8 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
{
|
||||
if (preg_match("/[<|>|#|$|%|^|*|(|)|{|}|'|\"|;|:]/i",$q) || !is_numeric($search))
|
||||
{
|
||||
$this->messenger->addMessage('您的输入的搜索条件包含非法请求,请不要输入特殊符号');
|
||||
$this->_redirect($redirect);
|
||||
view::Post($this,array("content"=>'您的输入的搜索条件包含非法请求,请不要输入特殊符号','url'=>$redirect));
|
||||
return true;
|
||||
}
|
||||
$this->view->q = $q;
|
||||
$wheresql[] = " u.realname like '%$q%' ";
|
||||
|
@ -1366,8 +1374,8 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
|
||||
if(!is_numeric($id))
|
||||
{
|
||||
$this->messenger->addMessage('参数不正确,请按正确的步骤进行访问');
|
||||
$this->_redirect($redirect);
|
||||
view::Post($this,array("content"=>'参数不正确,请按正确的步骤进行访问','url'=>$redirect));
|
||||
return true;
|
||||
}
|
||||
|
||||
$sql = "select r.id,att.filename,ratt.attachid as attid from mdreview r
|
||||
|
@ -1390,8 +1398,8 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
$sql = "delete from mdreview where id='$id'";
|
||||
if($this->db->exec($sql)>0)
|
||||
{
|
||||
$this->messenger->addMessage('评审意见删除成功!');
|
||||
$this->_redirect($redirect);
|
||||
view::Post($this,array("content"=>'评审意见删除成功!','url'=>$redirect));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -1399,16 +1407,16 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
$sql = "delete from mdreview where id='$id'";
|
||||
if($this->db->exec($sql)>0)
|
||||
{
|
||||
$this->messenger->addMessage('评审意见删除成功!但附件删除失败,请手动删除文件:'.$row['filename']);
|
||||
$this->_redirect($redirect);
|
||||
view::Post($this,array("content"=>'评审意见删除成功!但附件删除失败,请手动删除文件:'.$row['filename'],'url'=>$redirect));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
$sql = "delete from mdreview where id='$id'";
|
||||
if($this->db->exec($sql)>0)
|
||||
{
|
||||
$this->messenger->addMessage('评审意见删除成功!');
|
||||
$this->_redirect($redirect);
|
||||
view::Post($this,array("content"=>'评审意见删除成功!','url'=>$redirect));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}//删除评审意见 同时删除附件
|
||||
|
@ -1424,16 +1432,16 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
|
||||
if($this->db->exec($sql))
|
||||
{
|
||||
$this->messenger->addMessage('更改成功');
|
||||
$this->_redirect($redirect);
|
||||
view::Post($this,array("content"=>'更改成功','url'=>$redirect));
|
||||
return true;
|
||||
}else{
|
||||
$this->messenger->addMessage('更新失败');
|
||||
$this->_redirect($redirect);
|
||||
view::Post($this,array("content"=>'更改失败','url'=>$redirect));
|
||||
return true;
|
||||
}
|
||||
|
||||
}catch(Exception $e){
|
||||
$this->messenger->addMessage('更新失败:'.$e->getMessage());
|
||||
$this->_redirect($redirect);
|
||||
view::Post($this,array("content"=>'更新失败:'.$e->getMessage(),'url'=>$redirect));
|
||||
return true;
|
||||
}
|
||||
|
||||
}//为用户重置为草稿状态
|
||||
|
@ -1451,8 +1459,8 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
{
|
||||
if (preg_match("/[<|>|#|$|%|^|*|(|)|{|}|'|\"|;|:]/i",$q) || !is_numeric($search))
|
||||
{
|
||||
$this->messenger->addMessage('您的输入的搜索条件包含非法请求,请不要输入特殊符号');
|
||||
$this->_redirect($redirect);
|
||||
view::Post($this,array("content"=>'您的输入的搜索条件包含非法请求,请不要输入特殊符号','url'=>$redirect));
|
||||
return true;
|
||||
}//非法请求过滤
|
||||
$this->view->q = $q;
|
||||
$wheresql[] = " md.title like '%$q%' ";
|
||||
|
|
|
@ -2,13 +2,15 @@
|
|||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->headScript()->appendFile('/js/jquery-1.6.4.min.js');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||
$this->breadcrumb('元数据评审');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<style>
|
||||
table thead tr th {background:#EBF2F6;color:#444;}
|
||||
.high{background:#444;color:#FFF;}
|
||||
</style>
|
||||
<div class="row-fluid">
|
||||
<div class="span3">
|
||||
<?= $this->partial('review/left.phtml'); ?>
|
||||
|
@ -24,20 +26,19 @@
|
|||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="search">
|
||||
<form action="" method="get">
|
||||
<form action="" method="get" class="search input-append">
|
||||
<input type="hidden" name="search" value='1' />
|
||||
<label>搜索关键字</label><input type="text" name="keyword" class="q" value="<?php echo $this->keyword; ?>" />
|
||||
<input type="submit" class="btn" value="搜索" />
|
||||
<input type="text" name="keyword" class="q" value="<?php echo $this->keyword; ?>" />
|
||||
<button type="submit" class="btn">搜索</button>
|
||||
</form>
|
||||
</div><!-- search DIV -->
|
||||
|
||||
<table class="stylized"><thead>
|
||||
|
||||
<table class="table table-bordered table-hover"><thead>
|
||||
<tr>
|
||||
<td width='600'>元数据标题</td>
|
||||
<td width='120'>负责编辑</td>
|
||||
<td width='120'>时间</td>
|
||||
<td width='180'>操作</td>
|
||||
<th width='600'>元数据标题</th>
|
||||
<th width='120'>负责编辑</th>
|
||||
<th width='120'>时间</th>
|
||||
<th width='180'>操作</th>
|
||||
</tr></thead>
|
||||
<?php if (count($this->paginator)): ?>
|
||||
<tbody id="list">
|
||||
|
@ -59,4 +60,3 @@
|
|||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
</div><!-- span9 -->
|
||||
</div>
|
||||
<script>$("#list tr").mouseover(function(){$(this).addClass("high")}).mouseout(function(){$(this).removeClass("high")})</script>
|
|
@ -2,58 +2,59 @@
|
|||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->headScript()->appendFile('/js/jquery-1.6.4.min.js');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||
$this->breadcrumb('元数据评审');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<div id="leftPanel">
|
||||
<?= $this->partial('review/left.phtml'); ?>
|
||||
<style>
|
||||
table thead tr th {background:#EBF2F6;color:#444;}
|
||||
.high{background:#444;color:#FFF;}
|
||||
</style>
|
||||
<div class="row-fluid">
|
||||
<div class="span3">
|
||||
<?= $this->partial('review/left.phtml'); ?>
|
||||
</div>
|
||||
<div class="span9">
|
||||
<?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; ?>
|
||||
<form action="" method="get" class="search input-append">
|
||||
<input type="hidden" name="search" value='1' />
|
||||
<input type="hidden" name="id" value='<?php echo $this->id;?>' />
|
||||
<input type="text" name="keyword" class="q" value="<?php echo $this->keyword; ?>" />
|
||||
<button type="submit" class="btn">搜索</button>
|
||||
</form>
|
||||
<form action="" method="post">
|
||||
<table class="table table-bordered table-hover"><thead>
|
||||
<tr>
|
||||
<th width='40'>选择</th>
|
||||
<th width='600'>标题</th>
|
||||
<th width='120'>时间</th>
|
||||
<th width="180">操作</th>
|
||||
</tr></thead>
|
||||
<?php if (count($this->paginator)): ?>
|
||||
<tbody id="list">
|
||||
<?php foreach ($this->paginator as $item): ?>
|
||||
<tr>
|
||||
<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>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
<input type="submit" class="btn btn-primary" value="接收已选择的元数据" />
|
||||
</form>
|
||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="rightPanel">
|
||||
<?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 class="search">
|
||||
<form action="" method="get">
|
||||
<input type="hidden" name="search" value='1' />
|
||||
<input type="hidden" name="id" value='<?php echo $this->id;?>' />
|
||||
<label>搜索关键字</label><input type="text" name="keyword" class="q" value="<?php echo $this->keyword; ?>" />
|
||||
<input type="submit" class="btn" value="搜索" />
|
||||
</form>
|
||||
</div><!-- search DIV -->
|
||||
<form action="" method="post">
|
||||
<table class="stylized"><thead>
|
||||
<tr>
|
||||
<td width='40'>选择</td>
|
||||
<td width='600'>标题</td>
|
||||
<td width='120'>时间</td>
|
||||
<td width="180">操作</td>
|
||||
</tr></thead>
|
||||
<?php if (count($this->paginator)): ?>
|
||||
<tbody id="list">
|
||||
<?php foreach ($this->paginator as $item): ?>
|
||||
<tr>
|
||||
<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>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
<input type="submit" value="接收已选择的元数据" />
|
||||
</form>
|
||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
</div>
|
||||
<script>$("#list tr").mouseover(function(){$(this).addClass("high")}).mouseout(function(){$(this).removeClass("high")})</script>
|
|
@ -43,7 +43,7 @@ table thead tr th {background:#EBF2F6;color:#444;}
|
|||
<tbody id="list">
|
||||
<?php foreach ($this->paginator as $item): ?>
|
||||
<tr>
|
||||
<td><?= $item['title']?></td>
|
||||
<td><?= $item['title']?> [<a href="/service/geonetwork?url=metadata.edit?id=<?= $item['mdid'] ?>" target="_blank">编辑</a>]</td>
|
||||
<td><?php
|
||||
if($item['status'] == 0) echo "初始";
|
||||
if($item['status'] == -1) echo "取消审核";
|
||||
|
|
|
@ -51,40 +51,6 @@
|
|||
</div>
|
||||
</form>
|
||||
<script>
|
||||
function send(){
|
||||
var dom = "#submit";
|
||||
var html = $(dom).html();
|
||||
$.ajax({
|
||||
'type':"POST",
|
||||
'url':'/admin/review/reply/',
|
||||
'data':'uuid=<?= $this->uuid?>&send=1',
|
||||
'success':function(data){
|
||||
if (typeof(data)=='object')
|
||||
{
|
||||
if(typeof(data.error)!='undefined')
|
||||
{Alert(data.error);return false;}
|
||||
if(typeof(data.msg)!='undefined')
|
||||
{Alert(data.msg);}
|
||||
if(typeof(data.invited)!='undefined')
|
||||
{$('#expert_name_'+id).val('');$('#expert_email_'+id).val('');}
|
||||
}
|
||||
else{
|
||||
Alert('出现错误,请稍后再试');
|
||||
}
|
||||
},
|
||||
'timeout': 30000,
|
||||
'error': function(){
|
||||
Alert('处理中出现错误,请刷新页面后重试');
|
||||
},
|
||||
'beforeSend':function(){
|
||||
$(dom).html('<img src="/images/ajax-load-small.gif" />处理中...');
|
||||
$(dom).attr("disabled","disabled")
|
||||
},
|
||||
'complete':function(){
|
||||
$(dom).html(html);$(dom).removeAttr("disabled");dom = null;
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue