为元数据评审后台添加了php风格文档,修改上传文件路径的获取方式
This commit is contained in:
parent
1e7e4c20e0
commit
9cd5570743
|
@ -8,10 +8,16 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
$this->messenger=$this->_helper->getHelper('FlashMessenger');
|
||||
$this->view->messages = $this->messenger->getMessages();
|
||||
}
|
||||
|
||||
function postDispatch()
|
||||
{
|
||||
//$this->view->messages = $this->messenger->getMessages();
|
||||
}
|
||||
|
||||
/*
|
||||
* indexAction() 元数据评审管理首页
|
||||
*
|
||||
*/
|
||||
function indexAction()
|
||||
{
|
||||
$sql = "select m.id,md.title,u.username,u.realname,m.status from mdstatus m
|
||||
|
@ -49,6 +55,15 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
|
||||
}//indexAction
|
||||
|
||||
|
||||
/*
|
||||
* rewritestatus() 将评审状态转化为文字说明
|
||||
*
|
||||
* @param $status int
|
||||
*
|
||||
* return string
|
||||
*/
|
||||
|
||||
function rewritestatus($status){
|
||||
if($status==-1)
|
||||
{return "取消评审";}
|
||||
|
@ -68,12 +83,13 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
{return "";}
|
||||
}
|
||||
|
||||
/**
|
||||
*changestatus
|
||||
/*
|
||||
* changestatus() 更改mdstatus中的status字段
|
||||
*
|
||||
* @param int $id //要更改状态的mdstatus记录的ID
|
||||
* @param int $status //状态
|
||||
*
|
||||
* return bool
|
||||
*/
|
||||
function changestatus($id,$status){
|
||||
$stvalues = array(
|
||||
|
@ -110,6 +126,17 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
}
|
||||
}//changestatus 更改状态
|
||||
|
||||
|
||||
/*
|
||||
* acceptAction()待审元数据
|
||||
*
|
||||
* @param string $search //搜索
|
||||
* @param string $cancel //取消
|
||||
* @param string $keyword //搜索关键词
|
||||
* @param string $page //列表分页
|
||||
*
|
||||
* return view
|
||||
*/
|
||||
function acceptAction()
|
||||
{
|
||||
$search = $this->_request->getParam('search');
|
||||
|
@ -170,6 +197,17 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
|
||||
}//acceptAction
|
||||
|
||||
|
||||
/*
|
||||
* inreviewAction() 在审元数据查看
|
||||
*
|
||||
* @param int $show //查看详细
|
||||
* @param int $search //搜索
|
||||
* @param string keyword //关键字
|
||||
*
|
||||
*
|
||||
* return view
|
||||
*/
|
||||
function inreviewAction(){
|
||||
|
||||
$show = $this->_request->getParam('show');
|
||||
|
@ -257,7 +295,23 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
|
||||
}//在审元数据
|
||||
|
||||
function inviteAction(){//邀请
|
||||
|
||||
/*
|
||||
* inviteAction() 专家
|
||||
*
|
||||
* @param int id //评审ID
|
||||
* @param int $user //用户
|
||||
* @param int search //搜索
|
||||
* @param int keyword //关键词
|
||||
* @param $submit //提交判断
|
||||
* @param array $exps //专家ID
|
||||
*
|
||||
* return view
|
||||
*
|
||||
* 管理员可以邀请专家评审属于自己管理的元数据,在列表中包含表单,表单中提交专家ID(这与用户表中的ID对应)
|
||||
* 邀请邮件由邮件模板实现,需要数据库中存在 invite-expert-review 模板
|
||||
*/
|
||||
function inviteAction(){
|
||||
|
||||
$id = $this->_request->getParam('id');
|
||||
$user = $this->_request->getParam('user');
|
||||
|
@ -406,6 +460,17 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
|
||||
}//邀请专家
|
||||
|
||||
|
||||
/*
|
||||
* changeadminAction() 更改管理员
|
||||
*
|
||||
* @param int id //评审ID
|
||||
* @param int uid //管理员ID
|
||||
*
|
||||
* return view
|
||||
*
|
||||
* 每一条评审的元数据都有对应的管理员,通过changeadminAction()更改管理员
|
||||
*/
|
||||
function changeadminAction(){
|
||||
|
||||
$id = $this->_request->getParam('id');
|
||||
|
@ -443,6 +508,13 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
}//改变管理员
|
||||
|
||||
|
||||
/*
|
||||
* addonAction() 将元数据加入评审
|
||||
*
|
||||
* @param $uuid //元数据UUID
|
||||
*
|
||||
* return view
|
||||
*/
|
||||
function addonAction(){
|
||||
|
||||
$uuid=$this->_request->getParam('uuid');
|
||||
|
@ -480,6 +552,17 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
|
||||
}//将数据放入评审
|
||||
|
||||
|
||||
/*
|
||||
* myreviewAction() 我负责的元数据
|
||||
*
|
||||
* @param $search //搜索
|
||||
* @param string $keyword //关键词
|
||||
*
|
||||
* return view
|
||||
*
|
||||
* 相比在审元数据列表,我负责的元数据列表的管理功能更多,而且独有
|
||||
*/
|
||||
function myreviewAction(){
|
||||
|
||||
$auth = Zend_Auth::getInstance();
|
||||
|
@ -515,6 +598,16 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
$this->view->paginator=$paginator;
|
||||
}//我管理的元数据
|
||||
|
||||
|
||||
/*
|
||||
* checkmailAction()
|
||||
*
|
||||
* @param int id
|
||||
*
|
||||
* return view
|
||||
*
|
||||
* 选择需要发送邮件的邮箱,需要视图中配合提交表单实现
|
||||
*/
|
||||
function checkmailAction(){
|
||||
|
||||
$id = $this->view->id = $this->_request->getParam('id');
|
||||
|
@ -532,6 +625,17 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
$this->view->paginator = $rows;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* postAction() 元数据评审通过
|
||||
*
|
||||
* @param int id //评审ID
|
||||
* @param string emails //要通知的邮件地址
|
||||
*
|
||||
* return view
|
||||
*
|
||||
* 要通知的邮箱地址通过邮件地址列表选择,即checkmailAction()中列出的可选择的邮箱地址
|
||||
*/
|
||||
function postAction(){
|
||||
|
||||
$id = $this->_request->getParam('id');
|
||||
|
@ -583,6 +687,15 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
|
||||
}//发布元数据
|
||||
|
||||
/*
|
||||
* rollbackAction() 重新评审
|
||||
*
|
||||
* @param int id
|
||||
*
|
||||
* return view
|
||||
*
|
||||
* 对需要重新评审的元数据进行回滚,即状态为3
|
||||
*/
|
||||
function rollbackAction(){
|
||||
|
||||
$id=$this->_request->getParam('id');
|
||||
|
@ -599,6 +712,17 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
|
||||
}//重新评审
|
||||
|
||||
|
||||
/*
|
||||
* draftAction() 投稿元数据
|
||||
*
|
||||
* @param search //搜索
|
||||
* @param string keyword //关键词
|
||||
* @param array update //进入评审的id ,数组形式
|
||||
*
|
||||
* retrun view
|
||||
*
|
||||
*/
|
||||
function draftAction(){
|
||||
|
||||
$search=$this->_request->getParam('search');
|
||||
|
@ -647,6 +771,19 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
|
||||
}// draftAction 投稿元数据
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* canceledAction() 取消元数据评审
|
||||
*
|
||||
* @param search //搜索
|
||||
* @param string keyword //关键词
|
||||
* @param array update //进入评审的id ,数组形式
|
||||
*
|
||||
* return view
|
||||
*
|
||||
* 这里的取消不等于删除,评审记录不能随意删除
|
||||
*/
|
||||
function canceledAction(){
|
||||
|
||||
$search=$this->_request->getParam('search');
|
||||
|
@ -695,6 +832,17 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
|
||||
}//被取消评审的元数据
|
||||
|
||||
|
||||
/*
|
||||
* reviewedAction() 已结束评审的元数据列表
|
||||
*
|
||||
* @param search //搜索
|
||||
* @param string keyword //关键词
|
||||
*
|
||||
* return view
|
||||
*
|
||||
*
|
||||
*/
|
||||
function reviewedAction(){
|
||||
|
||||
$search=$this->_request->getParam('search');
|
||||
|
@ -724,6 +872,16 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
|
||||
}//已结束评审
|
||||
|
||||
|
||||
/*
|
||||
* deleteAction() 删除元数据评审记录
|
||||
*
|
||||
* @param $id //评审记录的ID
|
||||
*
|
||||
* return view
|
||||
*
|
||||
* 删除功能需要权限判断,没个管理员只能删除自己管理的评审元数据
|
||||
*/
|
||||
function deleteAction(){
|
||||
|
||||
$id=$this->_request->getParam('id');
|
||||
|
@ -769,6 +927,19 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* expertsAction() 评审专家管理
|
||||
*
|
||||
* @param $search //搜索
|
||||
* @param string $keyword //关键词
|
||||
* @param string $submit //添加新专家时的提交动作
|
||||
* @param int $edit //编辑管理员
|
||||
* @param int $del //删除
|
||||
*
|
||||
*
|
||||
* return view
|
||||
*/
|
||||
function expertsAction()
|
||||
{
|
||||
|
||||
|
@ -938,6 +1109,25 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
|
||||
}//expertsAction 专家库
|
||||
|
||||
|
||||
/*
|
||||
* commentsAction() 评审意见
|
||||
*
|
||||
* @param string $ac //动作: view 查看(详细单条)
|
||||
* list 评审意见列表
|
||||
* listbyuser 按用户查看评审意见列表
|
||||
* del 删除评审意见
|
||||
* rollback 重置为草稿状态
|
||||
* @param $uuid //评审元数据uuid
|
||||
* @param $id //评审id
|
||||
* @param $q //搜索关键词
|
||||
* @param $search //搜索
|
||||
*
|
||||
* return view
|
||||
*
|
||||
* 默认视图是评审意见列表视图
|
||||
*
|
||||
*/
|
||||
function commentsAction(){
|
||||
|
||||
$ac = $this->_request->getParam('ac');
|
||||
|
@ -1138,7 +1328,7 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
if(!empty($row['filename']))
|
||||
{
|
||||
//需要删除文件,通过Zend_Registry::get('upload')获得上传文件的根目录
|
||||
$basepath = Zend_Registry::get('upload');
|
||||
$basepath = $this->view->config->upload;
|
||||
$filepath = $basepath.$row['filename'];
|
||||
|
||||
if(unlink($filepath))
|
||||
|
|
Loading…
Reference in New Issue