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 @@ -