From cdfdac313edeaa1411d01c2e07b7834fabf376db Mon Sep 17 00:00:00 2001 From: Li Jianxuan Date: Fri, 29 Mar 2013 07:29:44 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=85=B3=E4=BA=8E=E6=9C=AC?= =?UTF-8?q?=E7=AB=99=EF=BC=8C=E9=BB=91=E6=B2=B3=E4=B8=93=E9=A2=98=E3=80=81?= =?UTF-8?q?water=E4=B8=93=E9=A2=98=E6=95=B0=E6=8D=AE=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E6=94=B9=E6=95=B0=E6=8D=AE=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E7=9A=84=E6=8E=A8=E8=8D=90=E5=88=97=E8=A1=A8=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=EF=BC=8C=E7=9B=B8=E5=85=B3=E6=90=9C=E7=B4=A2=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=EF=BC=8C=E7=9B=B8=E5=85=B3=E6=96=87=E7=8C=AE=E7=AD=89=E4=B8=AD?= =?UTF-8?q?=E7=9A=84=E5=88=86=E9=A1=B5=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../default/controllers/AboutController.php | 189 +++-- .../default/controllers/HeiheController.php | 1 - .../default/controllers/ServiceController.php | 23 +- .../views/scripts/about/background.phtml | 38 +- .../default/views/scripts/about/contact.phtml | 84 +- .../views/scripts/about/copyright.phtml | 38 +- .../default/views/scripts/about/honor.phtml | 38 +- .../default/views/scripts/about/index.phtml | 70 +- .../default/views/scripts/about/legal.phtml | 38 +- .../default/views/scripts/about/link.phtml | 38 +- .../default/views/scripts/about/navi.phtml | 26 +- .../default/views/scripts/about/patent.phtml | 82 +- .../views/scripts/about/publication.phtml | 80 +- .../default/views/scripts/about/report.phtml | 82 +- .../views/scripts/about/sponsors.phtml | 38 +- .../views/scripts/about/supportus.phtml | 38 +- .../scripts/data/pagination_literature.phtml | 24 +- .../scripts/data/pagination_related.phtml | 24 +- .../default/views/scripts/data/view.phtml | 4 +- .../default/views/scripts/heihe/navi.phtml | 49 +- .../default/views/scripts/heihe/view.phtml | 710 +++++++++------- .../default/views/scripts/water/view.phtml | 803 ++++++++++-------- htdocs/css/about.css | 135 +-- 23 files changed, 1443 insertions(+), 1209 deletions(-) diff --git a/application/default/controllers/AboutController.php b/application/default/controllers/AboutController.php index bb110065..27f44c3a 100755 --- a/application/default/controllers/AboutController.php +++ b/application/default/controllers/AboutController.php @@ -1,104 +1,105 @@ -view->config = Zend_Registry::get('config'); - $this->messenger=$this->_helper->getHelper('FlashMessenger'); - $this->view->messages = $this->messenger->getMessages(); - $this->db=Zend_Registry::get('db'); - } - function contactAction() - { - $form=new ContactForm(); - $this->view->form=$form; - $this->view->addHelperPath('helper','Zend_View_Helper_'); - if ($this->_request->isPost()) { - //发送邮件 - $formData=$this->_request->getPost(); - include_once("bcspamblock.php"); - if (bcspamblock_verify() && $form->isValid($formData)) { - $mail=new Zend_Mail('utf-8'); - $mail->setFrom($formData['email'],$formData['username']); - $mail->setBodyText($formData['body']); - $mail->setSubject($formData['subject']); - $mail->addTo($this->view->config->supportemail); - $mail->send(); - $this->messenger->addMessage('发送成功!'); - $this->_redirect('/about/contact'); - } - } else { - $auth = Zend_Auth::getInstance(); - if ($auth->hasIdentity()) { - $user=$auth->getIdentity(); - $formData['username']=($user->realname)?$user->realname:$user->username; - $formData['email']=$user->email; - $form->populate($formData); - } - } - } - function termsAction() - { - } - function backgroundAction() - { - $archives=new Archive($this->db); - $this->view->item=$archives->getOneArchive('发展历史','about'); - } - function legalAction() - { - $archives=new Archive($this->db); - $this->view->item=$archives->getOneArchive('隐私政策','about'); - } - function supportusAction() - { - $archives=new Archive($this->db); - $this->view->item=$archives->getOneArchive('支持我们','about'); - } - function copyrightAction() - { - $archives=new Archive($this->db); - $this->view->item=$archives->getOneArchive('数据与版权','about'); - } - function linkAction() - { - $archives=new Archive($this->db); - $this->view->item=$archives->getOneArchive('友情链接','about'); - } - function honorAction() - { - $archives=new Archive($this->db); - $this->view->item=$archives->getOneArchive('服务成效','about'); - } - function sponsorsAction() - { - $archives=new Archive($this->db); - $this->view->item=$archives->getOneArchive('支持项目','about'); - } - function publicationAction() - { - $ac = $this->_request->getParam("ac"); - $siteid="e31f5ea7-a4af-4ae3-9ac1-1a84132c4338";//site uuid from geonetowrk - if(empty($ac)) - { - $sql="select * from mdref mr left join reference r on mr.refid=r.id where mr.uuid=? order by r.id desc"; +view->config = Zend_Registry::get('config'); + $this->messenger=$this->_helper->getHelper('FlashMessenger'); + $this->view->messages = $this->messenger->getMessages(); + $this->db=Zend_Registry::get('db'); + $this->view->pageID = "about-".$this->_request->getActionName(); + } + function contactAction() + { + $form=new ContactForm(); + $this->view->form=$form; + $this->view->addHelperPath('helper','Zend_View_Helper_'); + if ($this->_request->isPost()) { + //发送邮件 + $formData=$this->_request->getPost(); + include_once("bcspamblock.php"); + if (bcspamblock_verify() && $form->isValid($formData)) { + $mail=new Zend_Mail('utf-8'); + $mail->setFrom($formData['email'],$formData['username']); + $mail->setBodyText($formData['body']); + $mail->setSubject($formData['subject']); + $mail->addTo($this->view->config->supportemail); + $mail->send(); + $this->messenger->addMessage('发送成功!'); + $this->_redirect('/about/contact'); + } + } else { + $auth = Zend_Auth::getInstance(); + if ($auth->hasIdentity()) { + $user=$auth->getIdentity(); + $formData['username']=($user->realname)?$user->realname:$user->username; + $formData['email']=$user->email; + $form->populate($formData); + } + } + } + function termsAction() + { + } + function backgroundAction() + { + $archives=new Archive($this->db); + $this->view->item=$archives->getOneArchive('发展历史','about'); + } + function legalAction() + { + $archives=new Archive($this->db); + $this->view->item=$archives->getOneArchive('隐私政策','about'); + } + function supportusAction() + { + $archives=new Archive($this->db); + $this->view->item=$archives->getOneArchive('支持我们','about'); + } + function copyrightAction() + { + $archives=new Archive($this->db); + $this->view->item=$archives->getOneArchive('数据与版权','about'); + } + function linkAction() + { + $archives=new Archive($this->db); + $this->view->item=$archives->getOneArchive('友情链接','about'); + } + function honorAction() + { + $archives=new Archive($this->db); + $this->view->item=$archives->getOneArchive('服务成效','about'); + } + function sponsorsAction() + { + $archives=new Archive($this->db); + $this->view->item=$archives->getOneArchive('支持项目','about'); + } + function publicationAction() + { + $ac = $this->_request->getParam("ac"); + $siteid="e31f5ea7-a4af-4ae3-9ac1-1a84132c4338";//site uuid from geonetowrk + if(empty($ac)) + { + $sql="select * from mdref mr left join reference r on mr.refid=r.id where mr.uuid=? order by r.id desc"; $sth = $this->db->prepare($sql); $sth->execute(array($siteid)); $rows = $sth->fetchAll(); - } elseif ($ac=='patent' || $ac=='report') { - $archives=new Archive($this->db); - $rows=$archives->getArchive($ac); - $this->_helper->viewRenderer($ac); + } 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; - } + $this->view->paginator=$paginator; + } } \ No newline at end of file diff --git a/application/default/controllers/HeiheController.php b/application/default/controllers/HeiheController.php index 5fa35b1c..6f194712 100644 --- a/application/default/controllers/HeiheController.php +++ b/application/default/controllers/HeiheController.php @@ -6,7 +6,6 @@ class HeiheController extends DataController function preDispatch() { parent::preDispatch(); - $this->_helper->layout->setLayout('heihe'); $this->debug = 1; } diff --git a/application/default/controllers/ServiceController.php b/application/default/controllers/ServiceController.php index 65599fce..9b9f5f13 100644 --- a/application/default/controllers/ServiceController.php +++ b/application/default/controllers/ServiceController.php @@ -117,8 +117,8 @@ class ServiceController extends Zend_Controller_Action $search=new SimpleSearch($key); $where=$search->sql_expr(array("title","description")); $sql.= " and ".$where; - $sql.= " order by title"; - $rows=$this->db->fetchAll($sql,array($e,$w,$n,$s)); + $sql.= " order by title"; + $rows=$this->db->fetchAll($sql,array($e,$w,$n,$s)); } else { $sql.= " order by title limit 10"; $rows=$this->db->fetchAll($sql,array($e,$w,$n,$s)); @@ -1065,11 +1065,11 @@ class ServiceController extends Zend_Controller_Action { if($page > 0) { - $pre = '
'; + $pre = '
  • Prev
  • '; } if($num > $pageSize*($page+1)) { - $next = "
    "; + $next = '
  • Next
  • '; } } $sql .=" limit $pageSize offset ".$page*$pageSize; @@ -1082,14 +1082,23 @@ class ServiceController extends Zend_Controller_Action $rows = $re->fetchAll(); if(count($rows>0)) { - echo $pre; - echo ' + + + \ No newline at end of file diff --git a/application/default/views/scripts/data/pagination_related.phtml b/application/default/views/scripts/data/pagination_related.phtml index c54191d3..98695681 100644 --- a/application/default/views/scripts/data/pagination_related.phtml +++ b/application/default/views/scripts/data/pagination_related.phtml @@ -1,26 +1,28 @@ pageCount): ?> -
    + - \ No newline at end of file + +
    + + \ No newline at end of file diff --git a/application/default/views/scripts/data/view.phtml b/application/default/views/scripts/data/view.phtml index 5fd35389..3483d3bb 100755 --- a/application/default/views/scripts/data/view.phtml +++ b/application/default/views/scripts/data/view.phtml @@ -126,13 +126,13 @@ if ($md->title_en) echo '
    '.$this->escape($md->title_en);?>
    -
    diff --git a/application/default/views/scripts/heihe/navi.phtml b/application/default/views/scripts/heihe/navi.phtml index cd727cda..bab02efd 100644 --- a/application/default/views/scripts/heihe/navi.phtml +++ b/application/default/views/scripts/heihe/navi.phtml @@ -1,27 +1,28 @@ -