登录后,进入网站的“数据作者”→“数据认证”页面,在搜索框内输入您的数据的关键字,然后点击搜索,带列表加载后,点击数据介绍下方的“申请成为此数据的作者”即可进入申请步骤。该功能需要登录后使用(点击这里可以进入数据认证)
+diff --git a/application/default/controllers/AuthorController.php b/application/default/controllers/AuthorController.php index 9929c8e4..a9a63fa2 100644 --- a/application/default/controllers/AuthorController.php +++ b/application/default/controllers/AuthorController.php @@ -822,6 +822,98 @@ body=> }// ac = apply 申请处理 }//applyAction() 申请成为元数据作者 + + + + /* + * authoredAction() 数据反馈 + * + * param string $uuid 元数据UUID + * param int $page 页数 + * + */ + function authoredAction() + { + $ac = $this->_request->getParam('ac'); + + $auth = Zend_Auth::getInstance(); + if($auth->hasIdentity()) + { + $user = $auth->getIdentity(); + $u_id = $user->id; + $u_email = $user->email; + } + + if(empty($ac)|| $ac=='list') + { + $sql = "SELECT md.title,md.uuid,count(c.id) as c FROM comments c + LEFT JOIN metadata md ON md.uuid=c.uuid + LEFT JOIN mdauthor a ON md.uuid=a.uuid + WHERE md.title IS NOT NULL AND a.userid=? + GROUP BY md.title,md.uuid + "; + $sth = $this->db->prepare($sql); + $sth->execute(array($u_id)); + $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; + + } + + if($ac=="view") + { + + $uuid = $this->_request->getParam('uuid'); + if(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)) + { + $sql = "SELECT c.author,c.email,c.url,c.ts_created,c.content FROM comments c + LEFT JOIN mdauthor a ON a.uuid=c.uuid + WHERE c.uuid=? AND a.userid=? + ORDER BY ts_created DESC"; + + $sth = $this->db->prepare($sql); + $sth->execute(array($uuid,$u_id)); + $rows = $sth->fetchAll(); + + $paginator = Zend_Paginator::factory($rows); + $paginator->setCurrentPageNumber($this->_getParam('page')); + $paginator->setItemCountPerPage(10); + $paginator->setView($this->view); + Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml'); + $this->view->paginator=$paginator; + } + + $this->_helper->viewRenderer('authored-list'); + } + + if($ac == "listall") + { + $sql = "SELECT md.title,c.author,c.email,c.url,c.ts_created,c.content FROM comments c + LEFT JOIN mdauthor a ON a.uuid=c.uuid + LEFT JOIN metadata md ON md.uuid=c.uuid + WHERE a.userid=? + ORDER BY ts_created DESC"; + + $sth = $this->db->prepare($sql); + $sth->execute(array($u_id)); + $rows = $sth->fetchAll(); + + $paginator = Zend_Paginator::factory($rows); + $paginator->setCurrentPageNumber($this->_getParam('page')); + $paginator->setItemCountPerPage(10); + $paginator->setView($this->view); + Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml'); + $this->view->paginator=$paginator; + + $this->_helper->viewRenderer('authored-listall'); + } + }// authoredAction() 数据反馈 } diff --git a/application/default/views/scripts/author/authored-list.phtml b/application/default/views/scripts/author/authored-list.phtml new file mode 100644 index 00000000..6adf12a5 --- /dev/null +++ b/application/default/views/scripts/author/authored-list.phtml @@ -0,0 +1,48 @@ +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/author.css'); +$this->breadcrumb('首页'); +$this->breadcrumb('数据作者'); +$this->breadcrumb('数据反馈管理'); +$this->breadcrumb()->setSeparator(' > '); +?> + +
+ + + +评论者: () 评论时间:
++
反馈数: 查看详细
+您在数据中心发布了一条数据,若需对数据进行修改,则需要进行数据认证。
+登录后,进入网站的“数据作者”→“数据认证”页面,在搜索框内输入您的数据的关键字,然后点击搜索,带列表加载后,点击数据介绍下方的“申请成为此数据的作者”即可进入申请步骤。该功能需要登录后使用(点击这里可以进入数据认证)
+