diff --git a/application/default/controllers/AboutController.php b/application/default/controllers/AboutController.php index e7e5efa7..ae92127e 100755 --- a/application/default/controllers/AboutController.php +++ b/application/default/controllers/AboutController.php @@ -75,15 +75,16 @@ class AboutController extends Zend_Controller_Action $sth = $this->db->prepare($sql); $sth->execute(array($siteid)); $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; - } - - + } elseif ($ac=='patent' || $ac=='report') { + $archives=new Archive($this->db); + $rows=$archives->getArchive($ac); + $this->_helper->viewRenderer($ac); + } + $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; } } \ No newline at end of file diff --git a/application/default/views/scripts/about/patent.phtml b/application/default/views/scripts/about/patent.phtml new file mode 100644 index 00000000..01d8e9df --- /dev/null +++ b/application/default/views/scripts/about/patent.phtml @@ -0,0 +1,41 @@ +headTitle($this->config->title->site); +$this->headTitle('成果发表'); +$this->headTitle()->setSeparator(' - '); +$this->headLink()->appendStylesheet('/css/about.css'); +$this->breadcrumb('首页'); +$this->breadcrumb('关于本站'); +$this->breadcrumb('成果发表'); +$this->breadcrumb('专利与著作权'); +$this->breadcrumb()->setSeparator(' > '); +?> + +
+

成果发表

+
+ +
+
+ paginator)): ?> + + + +
+
\ No newline at end of file diff --git a/application/default/views/scripts/about/report.phtml b/application/default/views/scripts/about/report.phtml new file mode 100644 index 00000000..432e947e --- /dev/null +++ b/application/default/views/scripts/about/report.phtml @@ -0,0 +1,41 @@ +headTitle($this->config->title->site); +$this->headTitle('成果发表'); +$this->headTitle()->setSeparator(' - '); +$this->headLink()->appendStylesheet('/css/about.css'); +$this->breadcrumb('首页'); +$this->breadcrumb('关于本站'); +$this->breadcrumb('成果发表'); +$this->breadcrumb('文档报告'); +$this->breadcrumb()->setSeparator(' > '); +?> + +
+

成果发表

+
+ +
+
+ paginator)): ?> + + + +
+
\ No newline at end of file diff --git a/application/models/Archive.php b/application/models/Archive.php index fb16094a..bcd732df 100644 --- a/application/models/Archive.php +++ b/application/models/Archive.php @@ -219,6 +219,13 @@ class Archive $sql = "DELETE FROM ".$this->tbl_tag." WHERE id=$aid"; @$this->db->exec($sql); return true; - }//DeleteTags - + }//DeleteTags + + function getArchive($code='') + { + $sql="select * from ".$this->tbl_archives; + if (!empty($code)) $sql.=" where code='".$code."'"; + $rs=$this->db->query($sql); + $rows=$rs->fetchAll(); + } }