From bee9d5063fcc3e55c3428ebcdec08a4bb0cd4ba9 Mon Sep 17 00:00:00 2001 From: Li Jianxuan Date: Wed, 6 Jun 2012 09:45:19 +0000 Subject: [PATCH] =?UTF-8?q?=E5=90=8E=E5=8F=B0=E4=BF=AE=E6=94=B9=E4=BA=86?= =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E5=9C=A8=E7=BA=BF=E7=94=B3=E8=AF=B7=E6=97=B6?= =?UTF-8?q?=E7=9A=84=E6=9F=A5=E7=9C=8B=E9=A1=B9=E7=9B=AE=EF=BC=8C=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E4=BA=86=E6=8C=89=E5=85=83=E6=95=B0=E6=8D=AEuuid?= =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E8=AF=84=E8=AE=BA=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/DataController.php | 29 +++++++ .../admin/controllers/DownController.php | 2 +- .../admin/views/scripts/data/comment.phtml | 83 +++++++++--------- .../admin/views/scripts/down/onlineshow.phtml | 84 ++++++++++--------- 4 files changed, 116 insertions(+), 82 deletions(-) diff --git a/application/admin/controllers/DataController.php b/application/admin/controllers/DataController.php index 3066b758..88264dae 100755 --- a/application/admin/controllers/DataController.php +++ b/application/admin/controllers/DataController.php @@ -458,6 +458,8 @@ class Admin_DataController extends Zend_Controller_Action function commentAction() { $delete=(int)$this->_getParam('delete'); + $uuid = $this->_getParam('uuid'); + if ($delete) { $sql="delete from comments where id=?"; @@ -469,6 +471,33 @@ class Admin_DataController extends Zend_Controller_Action } $this->_redirect("/admin/data/comment"); } + + if($uuid) + { + $sql = "SELECT c.*,md.title,md.uuid FROM comments c + LEFT JOIN metadata md ON md.uuid=c.uuid + WHERE c.uuid=?"; + $sth = $this->db->prepare($sql); + $sth->execute(array($uuid)); + $rows = $sth->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.phtml'); + $this->view->paginator=$paginator; + + $sql = "SELECT title FROM metadata WHERE uuid=?"; + $sth = $this->db->prepare($sql); + $sth->execute(array($uuid)); + $row = $sth->fetch(); + + $this->view->title = $row['title']; + + return true; + } + $select=$this->db->select(); $select->from('comments') ->joinLeft('metadata','metadata.uuid=comments.uuid','title') diff --git a/application/admin/controllers/DownController.php b/application/admin/controllers/DownController.php index 56c24386..bdbc6d6f 100644 --- a/application/admin/controllers/DownController.php +++ b/application/admin/controllers/DownController.php @@ -680,7 +680,7 @@ class Admin_DownController extends Zend_Controller_Action if(empty($show) && empty($delete)) { $select=$this->db->select(); - $select->from('onlineapp as o',array('id','userid','unit','username','ts_created','project')) + $select->from('onlineapp as o',array('id','userid','unit','username','ts_created','project','project_id','project_type','project_title')) ->join('metadata as m', 'o.uuid = m.uuid', array('title','uuid')) ->where('o.id in (select distinct(onlineappid) from dataorder)') ->order('o.id desc'); diff --git a/application/admin/views/scripts/data/comment.phtml b/application/admin/views/scripts/data/comment.phtml index 6a53c9a2..933700a3 100644 --- a/application/admin/views/scripts/data/comment.phtml +++ b/application/admin/views/scripts/data/comment.phtml @@ -1,41 +1,44 @@ -headTitle($this->config->title->site); - $this->headTitle('后台管理'); - $this->headTitle()->setSeparator(' - '); - $this->headLink()->appendStylesheet('/css/admin.css'); - $this->breadcrumb('首页'); - $this->breadcrumb('后台首页'); - $this->breadcrumb('数据管理'); - $this->breadcrumb('数据反馈管理'); - $this->breadcrumb()->setSeparator(' > '); -?> -
-partial('data/left.phtml'); ?> -
-
-msg or $this->messages) :?> -
-msg) : ?> -

msg; ?>

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

- -
- -paginator; ?> -paginator)): ?> -
-paginator as $item): ?> -
    -
  • 用户名:'.$item['author'].'':print $item['author']; ?>, -EMAIL: -[类型:,创建时间: - 。操作: 删除
  • -
  • 元数据:
  • -
  • -
  • IP:,AGENT:
  • -
- -
- +headTitle($this->config->title->site); + $this->headTitle('后台管理'); + $this->headTitle()->setSeparator(' - '); + $this->headLink()->appendStylesheet('/css/admin.css'); + $this->breadcrumb('首页'); + $this->breadcrumb('后台首页'); + $this->breadcrumb('数据管理'); + $this->breadcrumb('数据反馈管理'); + $this->breadcrumb()->setSeparator(' > '); +?> +
+partial('data/left.phtml'); ?> +
+
+title)) { + echo "元数据《".$this->title."》的所有评论"; +}?> +msg or $this->messages) :?> +
+msg) : ?> +

msg; ?>

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

+ +
+ +paginator; ?> +paginator)): ?> +
+paginator as $item): ?> +
    +
  • 用户名:'.$item['author'].'':print $item['author']; ?>, +EMAIL: +[类型:,创建时间: + 。操作: 删除
  • +
  • 元数据:
  • +
  • +
  • IP:,AGENT:
  • +
+ +
+
\ No newline at end of file diff --git a/application/admin/views/scripts/down/onlineshow.phtml b/application/admin/views/scripts/down/onlineshow.phtml index 0483ecfa..ac6ba991 100755 --- a/application/admin/views/scripts/down/onlineshow.phtml +++ b/application/admin/views/scripts/down/onlineshow.phtml @@ -1,42 +1,44 @@ -headTitle($this->config->title->site); - $this->headTitle('后台管理'); - $this->headTitle()->setSeparator(' - '); - $this->headLink()->appendStylesheet('/css/admin.css'); - $this->breadcrumb('首页'); - $this->breadcrumb('后台管理首页'); - $this->breadcrumb('申请管理'); - $this->breadcrumb('详细信息'); - $this->breadcrumb()->setSeparator(' > '); - $this->headScript()->appendFile('/js/prototype.js'); -?> -
-partial('down/left.phtml'); ?> -
- -msg or $this->messages) :?> -
-msg) : ?> -

msg; ?>

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

- -
- - - -
- - - - - - - - - - - - -
用户infos['uname'];?> 用户下载记录
姓名infos['username'];?>
单位infos['unit'];?>
电话infos['phone'];?>
地址infos['address'];?>
邮编infos['postcode'];?>
电话infos['phone'];?>
Emailinfos['email'];?>
用途
时间infos['ts_created']));?>
数据infos['title'];?>数据下载记录
+headTitle($this->config->title->site); + $this->headTitle('后台管理'); + $this->headTitle()->setSeparator(' - '); + $this->headLink()->appendStylesheet('/css/admin.css'); + $this->breadcrumb('首页'); + $this->breadcrumb('后台管理首页'); + $this->breadcrumb('申请管理'); + $this->breadcrumb('详细信息'); + $this->breadcrumb()->setSeparator(' > '); + $this->headScript()->appendFile('/js/prototype.js'); +?> +
+partial('down/left.phtml'); ?> +
+ +msg or $this->messages) :?> +
+msg) : ?> +

msg; ?>

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

+ +
+ +
+ + + + + + + + + + + + + + + + +
用户infos['uname'];?> 用户下载记录
姓名infos['username'];?>
数据infos['title'];?>数据下载记录
单位infos['unit'];?>
电话infos['phone'];?>
地址infos['address'];?>
邮编infos['postcode'];?>
电话infos['phone'];?>
Emailinfos['email'];?>
用途
项目编号infos['project_id'];?>
项目标题infos['project_title'];?>
项目类型infos['project_type'];?>
项目信息infos['project'];?>
时间infos['ts_created']));?>
\ No newline at end of file