parent
c7a2c9a9f7
commit
d3e7af02b1
|
@ -730,6 +730,24 @@ class Admin_DataController extends Zend_Controller_Action
|
|||
}
|
||||
}
|
||||
}
|
||||
//处理数据限制信息
|
||||
foreach($iso->limits as $uselimit)
|
||||
{
|
||||
$sql="select id from uselimit where uselimit=?";
|
||||
$row=$this->db->fetchRow($sql,array($uselimit));
|
||||
if (!$row)
|
||||
{
|
||||
$sql="insert into uselimit (uselimit) values (?)";
|
||||
$this->db->query($sql,array($uselimit));
|
||||
}
|
||||
$sql="select id from uselimit where uselimit=?";
|
||||
$row=$this->db->fetchRow($sql,array($uselimit));
|
||||
if ($row)
|
||||
{
|
||||
$sql="insert into mdlimit (uuid,lid) values(?,?)";
|
||||
$this->db->query($sql,array($iso->uuid,$row->id));
|
||||
}
|
||||
}
|
||||
$iso->save("../data/import/$iso->uuid.xml");
|
||||
} catch (Exception $e) {
|
||||
//数据重复插入,此处忽略所有错误
|
||||
|
|
|
@ -209,7 +209,7 @@ class DataController extends Zend_Controller_Action
|
|||
if (empty($page)) $page=1;
|
||||
$limit=10;
|
||||
$offset=$limit*($page-1);
|
||||
$state=$db->query('select keyword,count(*),keytype from keyword group by keyword,keytype order by keytype,count desc,keyword');
|
||||
$state=$db->query('select keyword,count(*),keytype from keyword group by keyword,keytype order by keytype,keyword,count desc');
|
||||
$this->view->keywords=$state->fetchAll();
|
||||
if ($id>0 or !empty($key)) {
|
||||
if (empty($key)) {
|
||||
|
@ -550,6 +550,9 @@ class DataController extends Zend_Controller_Action
|
|||
//相关用户
|
||||
$sql="select p.individual,p.organisation,r.role from role r left join responsible p on r.resid=p.id where r.uuid=? order by r.role,r.id";
|
||||
$this->view->authors=$db->fetchAll($sql,array($uuid));
|
||||
//数据限制信息
|
||||
$sql="select u.* from uselimit u left join mdlimit m on u.id=m.lid where m.uuid=?";
|
||||
$this->view->uselimits=$db->fetchAll($sql,array($uuid));
|
||||
//相关元数据,根据同名关键词实现
|
||||
//$sql="select distinct(md.uuid),md.title from keyword kw left join metadata md on kw.id=md.id where kw.keyword in (select k.keyword from keyword k left join metadata m on k.id=m.id where m.id=? and k.keytype='theme') and kw.id<>? limit 10";
|
||||
$sql="select distinct(md.uuid),md.title from keyword kw left join metadata md on kw.id=md.id where kw.keyword in (select k.keyword from keyword k left join metadata m on k.id=m.id where m.id=?) and kw.id<>? limit 10";
|
||||
|
|
|
@ -181,6 +181,12 @@ class ISO19115
|
|||
@$this->fileformat=$this->dom->getElementsByTagName('formatName')->item(0)->nodeValue;
|
||||
//投影类型,可以多个,但只选一个
|
||||
@$this->projection=$this->dom->getElementsByTagName('identCode')->item(0)->nodeValue;
|
||||
//数据限制信息
|
||||
$limits=$this->dom->getElementsByTagName('useLimit');
|
||||
foreach($limits as $limit)
|
||||
{
|
||||
$this->limits[]=$limit->nodeValue;
|
||||
}
|
||||
//数据作者
|
||||
$authors=$this->dom->getElementsByTagName('citRespParty');
|
||||
foreach($authors as $k=>$author)
|
||||
|
|
Loading…
Reference in New Issue