From 7cd845fb8347850dee15957ab277baf15369864e Mon Sep 17 00:00:00 2001 From: Li Jianxuan Date: Wed, 12 Oct 2011 09:50:04 +0000 Subject: [PATCH] =?UTF-8?q?Ticket=20#200=20=E5=A2=9E=E5=8A=A0=E4=BA=86?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AF=84=E5=AE=A1=E7=AE=A1=E7=90=86=E5=91=98?= =?UTF-8?q?=E7=9A=84=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/controllers/ReviewController.php | 53 +++++++++++++++++ .../admin/views/scripts/review/accept.phtml | 3 +- .../admin/views/scripts/review/canceled.phtml | 6 +- .../views/scripts/review/changeadmin.phtml | 58 +++++++++++++++++++ .../admin/views/scripts/review/draft.phtml | 10 ++-- .../admin/views/scripts/review/inreview.phtml | 3 +- 6 files changed, 125 insertions(+), 8 deletions(-) create mode 100644 application/admin/views/scripts/review/changeadmin.phtml diff --git a/application/admin/controllers/ReviewController.php b/application/admin/controllers/ReviewController.php index d271e73a..549b2958 100644 --- a/application/admin/controllers/ReviewController.php +++ b/application/admin/controllers/ReviewController.php @@ -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(){ diff --git a/application/admin/views/scripts/review/accept.phtml b/application/admin/views/scripts/review/accept.phtml index a8c7398a..5661b1b3 100644 --- a/application/admin/views/scripts/review/accept.phtml +++ b/application/admin/views/scripts/review/accept.phtml @@ -41,7 +41,7 @@ 元数据标题 负责编辑 时间 - 操作 + 操作 paginator)): ?> @@ -54,6 +54,7 @@ ' onclick="return confirm('是否确定取消评审')">取消评审 '>邀请专家 + 更改管理员 diff --git a/application/admin/views/scripts/review/canceled.phtml b/application/admin/views/scripts/review/canceled.phtml index ecbc95c2..86aa7bc5 100644 --- a/application/admin/views/scripts/review/canceled.phtml +++ b/application/admin/views/scripts/review/canceled.phtml @@ -39,7 +39,7 @@ 选择 标题 - 操作 + 操作 paginator)): ?> @@ -48,7 +48,9 @@ > - 重置 + 重置 + 更改管理员 + diff --git a/application/admin/views/scripts/review/changeadmin.phtml b/application/admin/views/scripts/review/changeadmin.phtml new file mode 100644 index 00000000..255cc90b --- /dev/null +++ b/application/admin/views/scripts/review/changeadmin.phtml @@ -0,0 +1,58 @@ +headTitle($this->config->title->site); + $this->headTitle('后台管理'); + $this->headTitle()->setSeparator(' - '); + $this->headLink()->appendStylesheet('/css/admin.css'); + $this->breadcrumb('首页'); + $this->breadcrumb('后台首页'); + $this->breadcrumb('元数据评审'); + $this->breadcrumb()->setSeparator(' > '); +?> +
+
+partial('review/left.phtml'); ?> +
+ +msg or $this->messages) :?> +
+msg) : ?> +

msg; ?>

+messages): foreach($this->messages as $msg): ?> +

+ +
+ + +
+ + + + + + + + + + + + paginator)): ?> + + paginator as $item): ?> + + > + + + + + + + + + + +
用户ID用户名姓名单位联系电话电子邮箱操作
设置为此评审的管理员
+
+ paginator; ?>
+ +
+
\ No newline at end of file diff --git a/application/admin/views/scripts/review/draft.phtml b/application/admin/views/scripts/review/draft.phtml index c7a01a7d..9931523f 100644 --- a/application/admin/views/scripts/review/draft.phtml +++ b/application/admin/views/scripts/review/draft.phtml @@ -38,9 +38,9 @@ - + - + paginator)): ?> @@ -48,9 +48,11 @@ > - + - + diff --git a/application/admin/views/scripts/review/inreview.phtml b/application/admin/views/scripts/review/inreview.phtml index c715a1be..9a2a1206 100644 --- a/application/admin/views/scripts/review/inreview.phtml +++ b/application/admin/views/scripts/review/inreview.phtml @@ -38,7 +38,7 @@ - + paginator)): ?> @@ -49,6 +49,7 @@
选择标题标题 时间操作操作
接收接收 + 更改管理员 +
标题 状态操作操作
查看详细 邀请专家 + 更改管理员