diff --git a/application/admin/controllers/DataController.php b/application/admin/controllers/DataController.php index 88264dae..031df715 100755 --- a/application/admin/controllers/DataController.php +++ b/application/admin/controllers/DataController.php @@ -2181,14 +2181,24 @@ class Admin_DataController extends Zend_Controller_Action /* - authorAction() 数据作者 - */ + * authorAction() 数据作者 + * + * param string $ac //动作 + =add 添加 + =edit 编辑 + =update 更新 + =del 删除 + =list 列出所有数据作者 + + * param string $uuid //UUID + * + * return view|application-json + */ public function authorAction(){ $ac = $this->_getParam('ac'); $uuid = $this->_getParam('uuid'); - if(empty($ac) && empty($uuid)) { @@ -2393,6 +2403,49 @@ class Admin_DataController extends Zend_Controller_Action }//认证作者 + else if($ac =="list") + { + $this->_helper->viewRenderer('author-list'); + + $sql = "SELECT u.id,u.realname,u.email,count(a.id) as d FROM mdauthor a + LEFT JOIN users u ON a.userid=u.id + WHERE a.status>0 + GROUP BY u.id,u.realname,u.email + ORDER BY u.id DESC"; + + $sth = $this->db->prepare($sql); + $sth->execute(); + $rows = $sth->fetchAll(); + + $paginator = Zend_Paginator::factory($rows); + $paginator->setCurrentPageNumber($this->_getParam('page')); + $paginator->setItemCountPerPage(15); + $paginator->setView($this->view); + Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml'); + $this->view->paginator=$paginator; + } + + else if($ac == "userdatas") + { + $this->_helper->layout->disableLayout(); + $this->_helper->viewRenderer->setNoRender(); + + $id = $this->_getParam('id'); + + $sql = "SELECT md.title,md.uuid FROM mdauthor a + LEFT JOIN metadata md ON a.uuid=md.uuid + WHERE a.userid=? AND a.status>0 + ORDER BY a.ts_created"; + $sth = $this->db->prepare($sql); + $sth->execute(array($id)); + $rows = $sth->fetchAll(); + + $data = array("datas"=>$rows); + $this->jsonexit($data); + return true; + + } + }//authorAction() 数据作者管理 diff --git a/application/admin/views/scripts/data/author-list.phtml b/application/admin/views/scripts/data/author-list.phtml new file mode 100644 index 00000000..b1761e3a --- /dev/null +++ b/application/admin/views/scripts/data/author-list.phtml @@ -0,0 +1,95 @@ +headTitle($this->config->title->site); +$this->headTitle($this->config->title->author); +$this->headTitle()->setSeparator(' - '); +$this->headScript()->appendFile('/js/jquery-1.7.min.js'); +$this->headLink()->appendStylesheet('/css/admin.css'); +$this->headScript()->appendFile('/js/jquery.colorbox-min.js'); +$this->headLink()->appendStylesheet('/css/author.css'); +$this->headLink()->appendStylesheet('/css/colorbox.css'); +$this->breadcrumb('首页'); +$this->breadcrumb('数据管理'); +$this->breadcrumb('数据作者管理'); +$this->breadcrumb()->setSeparator(' > '); +?> + +
请输入元数据标题关键字进行搜索
+ ++ + 数据个数 : | 查看数据 | Email: = $item['email'];?> + +
+