diff --git a/application/default/controllers/ServiceController.php b/application/default/controllers/ServiceController.php index 5767bdf6..8a1cd480 100644 --- a/application/default/controllers/ServiceController.php +++ b/application/default/controllers/ServiceController.php @@ -1211,5 +1211,40 @@ class ServiceController extends Zend_Controller_Action } echo ''; echo $pagnation; - }//文档页面相关数据 + }//文档页面相关数据 + function geonetwork() + { + $this->_helper->viewRenderer->setNoRender(); + $this->_helper->layout->disableLayout(); + $auth = Zend_Auth::getInstance(); + if (!$auth->hasIdentity()) + exit(); + $user = $auth->getIdentity(); + //need to get pwd from database + $sql='select username,md5(password) as pwd from users where id='.$user->id; + $row=$this->db->fetchRow($sql); + $login=$this->config->geonetwork->url.'/srv/en/xml.user.login?username='.$row->username.'&password='.$row->pwd; + $url = $this->_request->getParam('url'); + if empty($url) + $url='/geonetwork/srv/cn/'; + $body=' + + + + '; + $this->getResponse()->setHeader('Content-Type', 'text/html') + ->setBody($body); + } } \ No newline at end of file