merge r2054-2058.
This commit is contained in:
parent
7fa224418e
commit
81c8e569e2
|
@ -178,7 +178,7 @@ class AccountController extends Zend_Controller_Action
|
||||||
$sql="select usertype from users where username='$u'";
|
$sql="select usertype from users where username='$u'";
|
||||||
$rs=$db->query($sql);
|
$rs=$db->query($sql);
|
||||||
$row=$rs->fetch();
|
$row=$rs->fetch();
|
||||||
if($row['usertype']!='administrator')
|
//if($row['usertype']!='administrator')
|
||||||
{
|
{
|
||||||
require_once 'member.php';
|
require_once 'member.php';
|
||||||
$mb = new member();
|
$mb = new member();
|
||||||
|
|
|
@ -12,8 +12,8 @@ class ServiceController extends Zend_Controller_Action
|
||||||
{
|
{
|
||||||
$this->db=Zend_Registry::get('db');
|
$this->db=Zend_Registry::get('db');
|
||||||
$this->config = Zend_Registry::get('config');
|
$this->config = Zend_Registry::get('config');
|
||||||
$this->messenger=$this->_helper->getHelper('FlashMessenger');
|
//$this->messenger=$this->_helper->getHelper('FlashMessenger');
|
||||||
$this->view->messages = $this->messenger->getMessages();
|
//$this->view->messages = $this->messenger->getMessages();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1212,6 +1212,41 @@ class ServiceController extends Zend_Controller_Action
|
||||||
echo '</ul>';
|
echo '</ul>';
|
||||||
echo $pagnation;
|
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='<html>
|
||||||
|
<script type="text/javascript" src="/js/jquery-1.7.min.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var b = null;
|
||||||
|
$(document).ready(function() {
|
||||||
|
$.get(
|
||||||
|
"'.$login.'",
|
||||||
|
{},
|
||||||
|
function(data){
|
||||||
|
var url = "'.$url.'";
|
||||||
|
$(location).attr("href",url);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<body></body>
|
||||||
|
</html>';
|
||||||
|
$this->getResponse()->setHeader('Content-Type', 'text/html')
|
||||||
|
->setBody($body);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
输出验证码
|
输出验证码
|
||||||
|
|
Loading…
Reference in New Issue