diff --git a/application/admin/controllers/DataController.php b/application/admin/controllers/DataController.php index b4b61914..f1cba491 100755 --- a/application/admin/controllers/DataController.php +++ b/application/admin/controllers/DataController.php @@ -35,7 +35,7 @@ class Admin_DataController extends Zend_Controller_Action //$uuid=$this->_request->getParam('uuid'); if ($source=="geonetwork" && empty($uuid) ) { //从geonetwork向WESTDC同步 - $sql="select uuid,data from geonetworkmetadata where schemaid='iso19115'"; + $sql="select uuid,data,source from geonetworkmetadata where schemaid='iso19115'"; $rs=$this->db->fetchAll($sql); foreach($rs as $gmd) { $this->import($gmd->data); @@ -45,12 +45,12 @@ class Admin_DataController extends Zend_Controller_Action } elseif ($source=="watergn" && empty($uuid) ) { //首先删除所有的黑河试验数据 //$sql="delete from metadata where source='e3ad32dc-f573-11e0-aa7b-b768cfd88d80'"; - $sql="delete from metadata where uuid in (select uuid from heihegn)"; + $sql="delete from metadata where uuid in (select uuid from watergn)"; $this->db->query($sql); $sql="delete from responsible where id not in (select distinct(resid) from role)"; $this->db->query($sql); //同步黑河遥感实验的元数据 - $sql="select uuid,data,source from heihegn where schemaid='iso19115'"; + $sql="select uuid,data,source from watergn where schemaid='iso19115'"; $rs=$this->db->fetchAll($sql); foreach($rs as $gmd) { $this->import($gmd->data); @@ -74,9 +74,10 @@ class Admin_DataController extends Zend_Controller_Action $this->view->msg='成功同步WESTDC元数据到GEONETWORK!'; } elseif (!empty($uuid) && isset($_POST['submit'])) { //同步单条元数据 - $sql=$this->db->quoteInto("select data from geonetworkmetadata where uuid=?",$uuid); + $sql=$this->db->quoteInto("select data,source from geonetworkmetadata where uuid=?",$uuid); if ($rs=$this->db->fetchRow($sql)) { $this->import($rs->data); + $this->db->exec($this->db->quoteInto("update metadata set source=? where uuid='$uuid'",$rs->source)); $this->view->msg='成功同步元数据:'.$uuid; } else $this->view->msg='不存在此元数据:'.$uuid; } elseif (!empty($uuid) && isset($_POST['gnsubmit'])) { @@ -93,17 +94,18 @@ class Admin_DataController extends Zend_Controller_Action } else $this->view->msg='不存在此元数据:'.$uuid; } elseif (!empty($uuid) && isset($_POST['watersubmit'])) { //同步单条元数据 - $sql=$this->db->quoteInto("select data,source from heihegn where uuid=?",$uuid); + $sql=$this->db->quoteInto("select data,source from watergn where uuid=?",$uuid); if ($rs=$this->db->fetchRow($sql)) { - $this->import($rs->data); + $this->import($rs->data); $this->db->query("update metadata set source=? where uuid=?",array($rs->source,$uuid)); $this->view->msg='成功同步元数据:'.$uuid; } else $this->view->msg='不存在此元数据:'.$uuid; } elseif (!empty($uuid)) { //同步单条元数据 - $sql=$this->db->quoteInto("select data from geonetworkmetadata where uuid=?",$uuid); + $sql=$this->db->quoteInto("select data,source from geonetworkmetadata where uuid=?",$uuid); if ($rs=$this->db->fetchRow($sql)) { $this->import($rs->data); + $this->db->query("update metadata set source=? where uuid=?",array($rs->source,$uuid)); $this->view->msg='成功同步元数据:'.$uuid; } else $this->view->msg='不存在此元数据:'.$uuid; } elseif ($list=='water') { @@ -113,6 +115,16 @@ class Admin_DataController extends Zend_Controller_Action $sql="delete from metadata where uuid not in (select uuid from geonetworkmetadata where schemaid='iso19115')"; $this->db->query($sql); $this->view->msg='已删除WESTDC中多出的元数据!'; + } elseif ($delete=='geonetwork') { + //dblink view中删除多条有问题,暂时用单条删除替代 + //$sql="delete from geonetworkmetadata where uuid not in (select uuid from metadata)"; + $sql="select uuid from geonetworkmetadata where uuid not in (select uuid from metadata)"; + $rows=$this->db->fetchAll($sql); + foreach($rows as $row) + { + $this->db->exec($this->db->quoteInto("delete from geonetworkmetadata where uuid=?",$row->uuid)); + } + $this->view->msg='已删除GEONETWORK中多出的元数据!'; } elseif ($delete=='water') { $sql="delete from metadata where uuid not in (select uuid from watergn where schemaid='iso19115') and uuid not in (select uuid from geonetworkmetadata where schemaid='iso19115')"; $this->db->query($sql); @@ -783,23 +795,280 @@ class Admin_DataController extends Zend_Controller_Action function sourceAction() { - - $add=(int)$this->_getParam('add'); - $edit=(int)$this->_getParam('edit'); - $delete=(int)$this->_getParam('delete'); - $search=$this->_getParam('search'); - $keyword=$this->_getParam('keyword'); + $do = $this->_request->getParam('do'); + $uuid = $this->_request->getParam('uuid'); + $id = $this->_request->getParam('id'); + $q = $this->_request->getParam('q'); + $search = $this->_request->getParam('search'); - if ($add) { + if ($do == 'add') { + + $redirect = "/admin/data/source/"; if(!empty($_POST['submit'])) { + try{ + $title = $this->_request->getParam('title'); + $uuid = $this->_request->getParam('uuid'); + $code = $this->_request->getParam('code'); + $description = $this->_request->getParam('description'); + $has_pages = $this->_request->getParam('has_pages'); + $has_agreement = $this->_request->getParam('has_agreement'); + $data = array( + 'title' => $title, + 'uuid' => $uuid, + 'code' => $code, + 'description' => $description, + 'has_pages' => $has_pages, + 'has_agreement' => $has_agreement + ); + + if($this->db->insert('source',$data)) + { + $this->messenger->addMessage('添加来源信息成功'); + $this->_redirect($redirect); + } + }catch(Exception $e){ + $this->messenger->addMessage('添加来源信息失败:'.$e->getMessage()); + $this->_redirect('/admin/data/source/do/add'); + } + } $this->_helper->viewRenderer('sourceadd'); }// 添加项目来源 + else if($do == 'edit' && !empty($id)) + { + + if(!empty($_POST['submit'])) + { + try{ + $title = $this->_request->getParam('title'); + $uuid = $this->_request->getParam('uuid'); + $code = $this->_request->getParam('code'); + $description = $this->_request->getParam('description'); + $has_pages = $this->_request->getParam('has_pages'); + $has_agreement = $this->_request->getParam('has_agreement'); + + $sql = "update source set title='$title',uuid='$uuid',code='$code',description='$description',has_pages='$has_pages',has_agreement='$has_agreement' where id='$id'"; + + if($this->db->exec($sql)) + { + $this->messenger->addMessage('修改来源信息成功'); + $this->_redirect("/admin/data/source/do/edit/id/$id"); + } + }catch(Exception $e){ + $this->messenger->addMessage('修改来源信息失败:'.$e->getMessage()); + $this->_redirect("/admin/data/source/do/edit/id/$id"); + } + + } + + $sql = "select * from source where id='$id'"; + $rs = $this->db->query($sql); + $row = $rs->fetch(); + + $this->view->info = $row; + + $this->_helper->viewRenderer('sourceadd'); + + }// 编辑单条信息 + + else if($do == 'datasource' && !empty($uuid)) + { + $redirect = "/admin/data/source/do/datasource/uuid/$uuid"; + + $this->view->uuid = $uuid; + $sql = "select md.title,ds.id,ds.sourceid,s.title as stitle,s.code from metadata md + left join datasource ds on ds.uuid=md.uuid + left join source s on s.id=ds.sourceid + where md.uuid='$uuid'"; + $rs = $this->db->query($sql); + $row = $rs->fetch(); + + $this->view->info = $row; + + if(!empty($_POST['submit'])) + { + $sourceid = $this->_request->getParam('sourceid'); + if(empty($sourceid)) + { + $this->messenger->addMessage('请选择项目来源'); + $this->_redirect($redirect); + } + + $sql=""; + if(empty($row['id'])) + { + $sql = "insert into datasource (uuid,sourceid) values ('$uuid','$sourceid')"; + }else + { + $sql = "update datasource set uuid='$uuid',sourceid='$sourceid' where id='{$row['id']}'"; + } + try{ + if($this->db->exec($sql)) + { + $this->messenger->addMessage('修改项目来源成功'); + $this->_redirect($redirect); + } + else + { + $this->messenger->addMessage('修改项目来源失败'); + $this->_redirect($redirect); + } + }catch (Exception $e){ + $this->messenger->addMessage('修改项目来源失败:'.$e->getMessage()); + $this->_redirect($redirect); + } + + } + + + + $wheresql = array(); + + if(!empty($q) && !empty($search)) + { + $this->view->q = $q; + $wheresql[] = " title like '%$q%' "; + } + + if(count($wheresql>0))$wheresql = join(' and ',$wheresql); + else $wheresql=''; + + if($wheresql!='') + { + $wheresql = 'where '.$wheresql; + } + + $sql = "select * from source $wheresql order by id desc"; + $rs = $this->db->query($sql); + $rows = $rs->fetchAll(); + + $paginator = Zend_Paginator::factory($rows); + $paginator->setCurrentPageNumber($this->_getParam('page')); + $paginator->setItemCountPerPage(30); + $paginator->setView($this->view); + Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml'); + $this->view->paginator=$paginator; + + $this->_helper->viewRenderer('sourceselect'); + }// 为元数据选择项目来源 + + else if($do == 'del' && !empty($id)) + { + $redirect = "/admin/data/source/"; + $sql = "delete from source where id='$id'"; + try{ + if($this->db->exec($sql)) + { + $this->messenger->addMessage('删除成功'); + $this->_redirect($redirect); + }else{ + $this->messenger->addMessage('删除失败,可能该数据已不存在'); + $this->_redirect($redirect); + } + }catch (Exception $e){ + $this->messenger->addMessage('删除失败:'.$e->getMessage()); + $this->_redirect($redirect); + } + }// 删除项目来源 + + else if($do == 'fetch' && !empty($id)) + { + + $wheresql = array(); + + $wheresql[] = " ds.sourceid='$id' "; + + if(!empty($q) && !empty($search)) + { + $this->view->q = $q; + $wheresql[] = " title like '%$q%' "; + } + + if(count($wheresql>0))$wheresql = join(' and ',$wheresql); + else $wheresql=''; + + if($wheresql!='') + { + $wheresql = 'where '.$wheresql; + } + + $sql = "select md.title,md.uuid,ds.id,ds.sourceid,s.title as stitle,s.code from metadata md + left join datasource ds on ds.uuid=md.uuid + left join source s on s.id=ds.sourceid + $wheresql + order by id desc"; + $rs = $this->db->query($sql); + $rows = $rs->fetchAll(); + + $paginator = Zend_Paginator::factory($rows); + $paginator->setCurrentPageNumber($this->_getParam('page')); + $paginator->setItemCountPerPage(30); + $paginator->setView($this->view); + Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml'); + $this->view->paginator=$paginator; + + $this->_helper->viewRenderer('sourcefetchone'); + + }//查看某项目来源中的所有元数据 + + else if($do == 'delsource' && !empty($id)) + { + $redirect = "/admin/data/source/do/datasource/uuid/$uuid"; + + $sql = "delete from datasource where id='$id'"; + + try{ + if($this->db->exec($sql)) + { + $this->messenger->addMessage('删除成功'); + $this->_redirect($redirect); + }else{ + $this->messenger->addMessage('删除失败,可能该数据已不存在'); + $this->_redirect($redirect); + } + }catch (Exception $e){ + $this->messenger->addMessage('删除失败:'.$e->getMessage()); + $this->_redirect($redirect); + } + + + }// 清除元数据来源记录 + + else + { + $wheresql = array(); + + if(!empty($q) && !empty($search)) + { + $this->view->q = $q; + $wheresql[] = " title like '%$q%' "; + } + + if(count($wheresql>0))$wheresql = join(' and ',$wheresql); + else $wheresql=''; + + if($wheresql!='') + { + $wheresql = 'where '.$wheresql; + } + + $sql = "select * from source $wheresql order by id desc"; + $rs = $this->db->query($sql); + $rows = $rs->fetchAll(); + + $paginator = Zend_Paginator::factory($rows); + $paginator->setCurrentPageNumber($this->_getParam('page')); + $paginator->setItemCountPerPage(30); + $paginator->setView($this->view); + Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml'); + $this->view->paginator=$paginator; + }// 项目来源管理 + }//function sourceAction diff --git a/application/admin/controllers/DownController.php b/application/admin/controllers/DownController.php index 7a90588a..f6bcb70d 100644 --- a/application/admin/controllers/DownController.php +++ b/application/admin/controllers/DownController.php @@ -45,12 +45,11 @@ class Admin_DownController extends Zend_Controller_Action $row=$this->db->fetchRow($sql,array($start)); //发送用户邮件进行信息提示和说明 $mail = new WestdcMailer($this->view->config->smtp); - $body=file_get_contents($this->view->config->offline->email->start_template); - $body=str_replace("[username]",$row['username'],$body); - $body=str_replace("[datalist]",str_replace(";","\n",$row['datalist']),$body); - $mail->setBodyText($body); + $datalist=str_replace(";","\n",$row['datalist']); + $mailtp=new EmailText($this->db,'offline-start',array('user'=>$row['username'],'datalist'=>$datalist)); + $mail->setBodyText($mailtp->getBody()); + $mail->setSubject($mailtp->getSubject()); $mail->addTo($row['email']); - $mail->setSubject('西部数据中心已收到您的纸质离线申请'); $mail->setFrom($this->view->config->service->email,'西部数据中心服务组'); $mail->send(); @@ -270,7 +269,7 @@ class Admin_DownController extends Zend_Controller_Action $sql="select * from offlineapp where ts_approved is not null and pdflink is not null order by ts_created desc"; $rows=$this->db->fetchAll($sql); foreach($rows as $row){ - $content.='"'.$row['username'].'","'.$row['unit'].'","'.$row['phone'].'","'.$row['address'].'","'.$row['postcoe'].'","'.str_replace("\"","'",$row['project']).'","'.str_replace("\"","'",$row['datalist']).'","'.$row['email'].'",'.$row['ts_approved']."\n"; + $content.='"'.$row['username'].'","'.$row['unit'].'","'.$row['phone'].'","'.$row['address'].'","'.$row['postcoe'].'","'.str_replace("\"","'",$row['project']).'","'.str_replace("\"","'",$row['datalist']).'","'.$row['email'].'",'.$row['ts_created']."\n"; } $this->getResponse()->setHeader('Content-Type', 'application/octet-stream') ->setHeader('Content-Disposition','attachment; filename="offlineapp.csv"') diff --git a/application/admin/controllers/ReviewController.php b/application/admin/controllers/ReviewController.php index d4433950..bda898e1 100644 --- a/application/admin/controllers/ReviewController.php +++ b/application/admin/controllers/ReviewController.php @@ -678,6 +678,51 @@ class Admin_ReviewController extends Zend_Controller_Action }//已结束评审 + function deleteAction(){ + + $id=$this->_request->getParam('id'); + try{ + $auth = Zend_Auth::getInstance(); + if($auth->hasIdentity()) + { + $user = $auth->getIdentity(); + $userid = $user->id; + + $sql = "select id from mdstatus where userid='$userid' and id='$id'"; + $rs = $this->db->query($sql); + $row = $rs->fetch(); + + if(!empty($row['id'])) + { + $sql = "delete from mdstatus where id='$id'"; + if($this->db->exec($sql)) + { + $this->messenger->addMessage('删除成功'); + $this->_redirect("/admin/review/myreview"); + }else{ + $this->messenger->addMessage('删除失败'); + $this->_redirect("/admin/review/myreview"); + } + + }else{ + + $this->messenger->addMessage('您没有权限操作其他管理员管理的元数据评审'); + $this->_redirect("/admin/review/myreview"); + + } + + }else + { + $this->messenger->addMessage('权限读取失败'); + $this->_redirect("/admin/review/myreview"); + } + }catch(Exception $e){ + $this->messenger->addMessage('删除失败:'.$e->getMessage()); + $this->_redirect("/admin/review/myreview"); + } + + } + function expertsAction() { diff --git a/application/admin/controllers/StatController.php b/application/admin/controllers/StatController.php index 3b3744b3..3d303143 100644 --- a/application/admin/controllers/StatController.php +++ b/application/admin/controllers/StatController.php @@ -119,11 +119,11 @@ class Admin_StatController extends Zend_Controller_Action function waterAction() { - $sql="select count(k.keyword) as num,k.keyword from dataorder d join metadata m on d.uuid=m.uuid - left join keyword k on m.id=k.id - where (d.status=5 or d.status=-1) and m.source!='' - and (k.keyword='航空遥感' or k.keyword='卫星遥感' or k.keyword='气象水文' or k.keyword='上游寒区水文试验区' or k.keyword='森林水文试验区' or k.keyword='中游干旱区水文试验区') - group by k.keyword order by num desc"; + $sql="select count(k.keyword) as num,d.status,k.keyword from dataorder d left join metadata m on d.uuid=m.uuid + left join keyword k on m.id=k.id + where (d.status=5 or d.status=-1) and m.source='0595169a-279e-4b95-819f-129d0ba4280d' + and (k.keyword='航空遥感' or k.keyword='卫星遥感' or k.keyword='气象水文' or k.keyword='上游寒区水文试验区' or k.keyword='森林水文试验区' or k.keyword='中游干旱区水文试验区') + group by k.keyword,d.status order by k.keyword desc,d.status desc"; $re =$this->db->query($sql); $type =$re->fetchAll();//按分类 @@ -141,13 +141,13 @@ class Admin_StatController extends Zend_Controller_Action $this->view->month = $month; - $sql = "select count(extract(month from o.ts_created)) as c,extract(month from o.ts_created) as m,extract(year from o.ts_created) as y - from - (select distinct(o.id),o.ts_created - from offlineapp o left join dataorder d on d.offlineappid=o.id left join metadata m on m.uuid=d.uuid - where m.source='0595169a-279e-4b95-819f-129d0ba4280d' and (d.status=3 or d.status=5 or d.status=-1) - ) as o - group by extract(month from o.ts_created),extract(year from o.ts_created) + $sql = "select + extract(year from o.ts_created) as y,extract(month from o.ts_created) as m, + count(extract(month from o.ts_created)) as c + from + (select distinct(o.id),o.ts_created + from offlineapp o where o.datalist like '%黑河综合遥感联合试验%') as o + group by extract(month from o.ts_created),extract(year from o.ts_created) order by extract(year from o.ts_created),extract(month from o.ts_created)"; $re=$this->db->query($sql); diff --git a/application/admin/views/scripts/data/md.phtml b/application/admin/views/scripts/data/md.phtml index 5e64f5cd..739e2321 100644 --- a/application/admin/views/scripts/data/md.phtml +++ b/application/admin/views/scripts/data/md.phtml @@ -44,10 +44,11 @@ ,查看:次。 操作: 编辑 删除 - 同步 附件管理 - - 放入元数据评审 - + 同步 附件管理 + + 放入元数据评审 + + 编辑数据来源
  • 数据贡献者:
  • diff --git a/application/admin/views/scripts/data/source.phtml b/application/admin/views/scripts/data/source.phtml new file mode 100644 index 00000000..94f411f1 --- /dev/null +++ b/application/admin/views/scripts/data/source.phtml @@ -0,0 +1,67 @@ +headTitle($this->config->title->site); + $this->headTitle('后台管理'); + $this->headTitle()->setSeparator(' - '); + $this->headLink()->appendStylesheet('/css/admin.css'); + $this->headScript()->appendFile('/js/jquery-1.6.4.min.js'); + $this->breadcrumb('首页'); + $this->breadcrumb('后台首页'); + $this->breadcrumb('数据管理'); + $this->breadcrumb('项目来源管理'); + $this->breadcrumb()->setSeparator(' > '); +?> +
    +partial('data/left.phtml'); ?> +
    +
    +msg or $this->messages) :?> +
    +msg) : ?> +

    msg; ?>

    +messages): foreach($this->messages as $msg): ?> +

    + +
    + + +
    + 项目来源管理 + 添加项目来源 +
    + + + + + + + + + + + + paginator)): ?> + + paginator as $item): ?> + + + + + + + + +
    标题Code字符操作
    + 查看编辑| + 查看元数据| + 删除 +
    + +
    + \ No newline at end of file diff --git a/application/admin/views/scripts/data/sourceadd.phtml b/application/admin/views/scripts/data/sourceadd.phtml new file mode 100644 index 00000000..49bac0b1 --- /dev/null +++ b/application/admin/views/scripts/data/sourceadd.phtml @@ -0,0 +1,64 @@ +headTitle($this->config->title->site); + $this->headTitle('后台管理'); + $this->headTitle()->setSeparator(' - '); + $this->headLink()->appendStylesheet('/css/admin.css'); + $this->headScript()->appendFile('/js/jquery-1.6.4.min.js'); + $this->breadcrumb('首页'); + $this->breadcrumb('后台首页'); + $this->breadcrumb('数据管理'); + $this->breadcrumb('项目来源管理'); + $this->breadcrumb()->setSeparator(' > '); +?> +
    +partial('data/left.phtml'); ?> +
    +
    + +msg or $this->messages) :?> +
    +msg) : ?> +

    msg; ?>

    +messages): foreach($this->messages as $msg): ?> +

    + +
    + + +
    + 项目来源管理 + 添加项目来源 +
    +
    +

    +
    + +

    +

    +
    + +

    +

    +
    + +

    +

    +
    + +

    +

    +
    + info['has_pages']) echo 'checked="checked"';?> />True info['has_pages']) echo 'checked="checked"';?> />False +

    +

    +
    + info['has_agreement']) echo 'checked="checked"';?> />True info['has_agreement']) echo 'checked="checked"';?> />False +

    +

    + + + + +

    +
    +
    \ No newline at end of file diff --git a/application/admin/views/scripts/data/sourcefetchone.phtml b/application/admin/views/scripts/data/sourcefetchone.phtml new file mode 100644 index 00000000..a8c98981 --- /dev/null +++ b/application/admin/views/scripts/data/sourcefetchone.phtml @@ -0,0 +1,64 @@ +headTitle($this->config->title->site); + $this->headTitle('后台管理'); + $this->headTitle()->setSeparator(' - '); + $this->headLink()->appendStylesheet('/css/admin.css'); + $this->headScript()->appendFile('/js/jquery-1.6.4.min.js'); + $this->breadcrumb('首页'); + $this->breadcrumb('后台首页'); + $this->breadcrumb('数据管理'); + $this->breadcrumb('项目来源管理'); + $this->breadcrumb()->setSeparator(' > '); +?> +
    +partial('data/left.phtml'); ?> +
    +
    +msg or $this->messages) :?> +
    +msg) : ?> +

    msg; ?>

    +messages): foreach($this->messages as $msg): ?> +

    + +
    + + +
    + 项目来源管理 + 添加项目来源 +
    + + + + + + + + + + + paginator)): ?> + + paginator as $item): ?> + + + + + + + +
    标题操作
    + 编辑数据来源
    + 清除数据来源 +
    + +
    + \ No newline at end of file diff --git a/application/admin/views/scripts/data/sourceselect.phtml b/application/admin/views/scripts/data/sourceselect.phtml new file mode 100644 index 00000000..eab90f68 --- /dev/null +++ b/application/admin/views/scripts/data/sourceselect.phtml @@ -0,0 +1,91 @@ +headTitle($this->config->title->site); + $this->headTitle('后台管理'); + $this->headTitle()->setSeparator(' - '); + $this->headLink()->appendStylesheet('/css/admin.css'); + $this->headScript()->appendFile('/js/jquery-1.6.4.min.js'); + $this->breadcrumb('首页'); + $this->breadcrumb('后台首页'); + $this->breadcrumb('数据管理'); + $this->breadcrumb('项目来源管理'); + $this->breadcrumb()->setSeparator(' > '); +?> +
    +partial('data/left.phtml'); ?> +
    +
    + +msg or $this->messages) :?> +
    +msg) : ?> +

    msg; ?>

    +messages): foreach($this->messages as $msg): ?> +

    + +
    + + +为元数据《info['title'];?>》选择项目来源 + + + + +
    + + + + + + + + + + paginator)): ?> + + paginator as $item): ?> + + + + + + + + + +
    选择标题Code字符操作
    info['sourceid']) echo 'checked="checked"'; ?> />查看编辑
    + + + +info['id'])) + { + echo "此元数据已经选择了项目来源:".$this->info['stitle']."[".$this->info['code']."],操作将更改此元数据现有的项目来源
    "; + } +?> + +
    +info['id'])) + { + ?> +
    + + + + +
    +
    + + + +
    + \ No newline at end of file diff --git a/application/admin/views/scripts/data/sync.phtml b/application/admin/views/scripts/data/sync.phtml index aac98b46..dd3d5833 100644 --- a/application/admin/views/scripts/data/sync.phtml +++ b/application/admin/views/scripts/data/sync.phtml @@ -29,6 +29,7 @@

    开始同步:从WESTDC同步到GEONETWORK

    列出WESTDC中多出的WATER元数据

    删除WESTDC中多出的元数据

    +

    删除GEONETWORK中多出的元数据

    删除WESTDC中多出的WATER元数据

    同步GEONETWORK中的缩略图

    同步WATER中的缩略图

    diff --git a/application/admin/views/scripts/header.phtml b/application/admin/views/scripts/header.phtml index 34f3eda0..61b57a4e 100755 --- a/application/admin/views/scripts/header.phtml +++ b/application/admin/views/scripts/header.phtml @@ -1,8 +1,10 @@ - -
    -
    空间范围
    -
    - -paginator)): ?> -paginator as $item): - $i++; - if (mb_strlen($item['description'])>700) - { - $item['description'] = mb_substr($item['description'],0,400,'UTF-8').'...'; - } - if($i%2==0) $style="style='background:#fafafa;'"; - else $style=""; - echo '
    -
    -

    '.$this->escape($item['title']).' -

    -

    '.$item['description'].'

    -
    '; -endforeach; -?> +metadata)) : ?> +
    +

    当前浏览:codename; ?>

    +page->getNavigation(); ?> +
    +metadata as $md) : ?> +
    +
    +

    escape($md['title']);?> + +

    + 400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']);?> +
    + +page->getNavigation(); ?> +
    - -paginator; ?> - -
    \ No newline at end of file diff --git a/application/default/views/scripts/data/delete.phtml b/application/default/views/scripts/data/delete.phtml deleted file mode 100755 index 324ed331..00000000 --- a/application/default/views/scripts/data/delete.phtml +++ /dev/null @@ -1,15 +0,0 @@ -md) :?> -

    Are you sure that you want to delete this metadata: -

    escape($this->md->title); ?>

    - escape($this->md->description); ?> -

    - -
    - - - -
    - - -

    Cannot find the metadata.

    - diff --git a/application/default/views/scripts/data/download.phtml b/application/default/views/scripts/data/download.phtml index d392a707..9cc18f21 100644 --- a/application/default/views/scripts/data/download.phtml +++ b/application/default/views/scripts/data/download.phtml @@ -11,7 +11,7 @@ ?>

    md['title']; ?>(md['filesize']; ?>MB)

    -
    +
    FTP下载地址
      diff --git a/application/default/views/scripts/data/map.phtml b/application/default/views/scripts/data/map.phtml index 3eaadef7..aac5e400 100755 --- a/application/default/views/scripts/data/map.phtml +++ b/application/default/views/scripts/data/map.phtml @@ -11,8 +11,8 @@ $this->breadcrumb()->setSeparator(' > '); $this->headScript()->appendFile('/js/OpenLayers.js'); $this->headLink()->appendStylesheet('/js/theme/default/style.css'); + $this->headScript()->appendFile('http://maps.google.cn/maps?file=api&v=2&key='.$this->config->google->maps->api); ?> -
      partial('data/tools.phtml'); ?>
      @@ -56,7 +56,7 @@ popup = new OpenLayers.Popup.FramedCloud("chicken", feature.geometry.getBounds().getCenterLonLat(), null, - "
      "+ feature.attributes['title'] +" |
      ", + "
      "+ feature.attributes['title'] +" |
      ", null, false, onPopupClose); feature.popup = popup; map.addPopup(popup); diff --git a/application/default/views/scripts/data/offlinelist.phtml b/application/default/views/scripts/data/offlinelist.phtml index aeb2dafe..e6ec305a 100755 --- a/application/default/views/scripts/data/offlinelist.phtml +++ b/application/default/views/scripts/data/offlinelist.phtml @@ -14,11 +14,12 @@ $this->breadcrumb()->setSeparator(' > '); partial('data/tools.phtml'); ?>
    page->getNavigation(); ?> -metadata as $md) : ?>
    +metadata as $md) : ?>
    escape($md['title']);?> - + +

    diff --git a/application/default/views/scripts/data/onlinelist.phtml b/application/default/views/scripts/data/onlinelist.phtml index 129305fc..f798990b 100755 --- a/application/default/views/scripts/data/onlinelist.phtml +++ b/application/default/views/scripts/data/onlinelist.phtml @@ -14,11 +14,12 @@ $this->breadcrumb()->setSeparator(' > '); partial('data/tools.phtml'); ?>
    page->getNavigation(); ?> -metadata as $md) : ?>
    +metadata as $md) : ?>
    escape($md['title']);?> - + +

    diff --git a/application/default/views/scripts/data/pagination_ajax.phtml b/application/default/views/scripts/data/pagination_ajax.phtml new file mode 100644 index 00000000..7798ce21 --- /dev/null +++ b/application/default/views/scripts/data/pagination_ajax.phtml @@ -0,0 +1,26 @@ +pageCount): ?> +
    + +previous)): ?> + < Previous + + < Previous + + + +pagesInRange as $page): ?> + current): ?> + + + + + + + +next)): ?> + Next > + + Next > + +
    + \ No newline at end of file diff --git a/application/default/views/scripts/data/search.phtml b/application/default/views/scripts/data/search.phtml index ca1e9266..280e8779 100755 --- a/application/default/views/scripts/data/search.phtml +++ b/application/default/views/scripts/data/search.phtml @@ -12,15 +12,15 @@ $this->breadcrumb('快速搜索'); $this->breadcrumb()->setSeparator(' > '); ?>
    -partial('data/tools.phtml'); ?> +partial('data/tools.phtml',array('key'=>$this->key)); ?>
    -form; ?> + metadata)) : ?> page->getNavigation(); foreach($this->metadata as $md) : ?>
    -
    +

    escape($md['title']);?>

    400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']);?> diff --git a/application/default/views/scripts/data/series.phtml b/application/default/views/scripts/data/series.phtml index 8a91f765..15406fa5 100755 --- a/application/default/views/scripts/data/series.phtml +++ b/application/default/views/scripts/data/series.phtml @@ -34,12 +34,11 @@ $this->breadcrumb()->setSeparator(' > '); metadata)) : ?>

    当前浏览数据集序列:codename; ?>

    -showtools) echo $this->form; ?> page->getNavigation(); ?> -metadata as $md) : ?>
    +metadata as $md) : ?>
    -
    +

    escape($md['title']);?>

    400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']);?> diff --git a/application/default/views/scripts/data/tag.phtml b/application/default/views/scripts/data/tag.phtml index 8e9fb477..dfd42c86 100755 --- a/application/default/views/scripts/data/tag.phtml +++ b/application/default/views/scripts/data/tag.phtml @@ -17,16 +17,17 @@ $this->breadcrumb()->setSeparator(' > ');

    当前浏览:codename; ?>

    page->getNavigation(); ?> -metadata as $md) : ?>
    -
    +metadata as $md) : ?>
    +

    escape($md['title']);?>

    400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']);?>
    +page->getNavigation(); ?>
    diff --git a/application/default/views/scripts/data/thumb.phtml b/application/default/views/scripts/data/thumb.phtml deleted file mode 100755 index bd126a1f..00000000 --- a/application/default/views/scripts/data/thumb.phtml +++ /dev/null @@ -1,7 +0,0 @@ -thumb->data)) { - } else { - header("Content-Type:image/jpeg"); - print base64_decode($this->thumb->data); - } -?> \ No newline at end of file diff --git a/application/default/views/scripts/data/timemap.phtml b/application/default/views/scripts/data/timemap.phtml index a7000e2e..c55291a7 100644 --- a/application/default/views/scripts/data/timemap.phtml +++ b/application/default/views/scripts/data/timemap.phtml @@ -8,7 +8,7 @@ $this->breadcrumb('首页'); $this->breadcrumb(''.$this->config->title->data.''); $this->breadcrumb('时空导航'); $this->breadcrumb()->setSeparator(' > '); -$this->headScript()->appendFile('http://maps.google.com/maps?file=api&v=2&key=ABQIAAAACD-MqkkoOm60o_dvwdcKVhRBSKpgcP88GYi6r2Of16IkMX_4YhSBQsywCi4J2_fh4nBuWmK7gyRjLg'); +$this->headScript()->appendFile('http://maps.google.cn/maps?file=api&v=2&key='.$this->config->google->maps->api); $this->headScript()->appendFile('/js/timeline_var.js'); $this->headScript()->appendFile('/js/timeline_js/timeline-api.js'); $this->headScript()->appendFile('/js/timemap/timemap.js'); @@ -59,7 +59,7 @@ window.onload=function() { "title" : "", "options" : { // set the full HTML for the info window - "infoHtml": ">
    />" + "infoHtml": ">
    />" } }, diff --git a/application/default/views/scripts/data/tmp.js b/application/default/views/scripts/data/tmp.js deleted file mode 100755 index 6509e348..00000000 --- a/application/default/views/scripts/data/tmp.js +++ /dev/null @@ -1,44 +0,0 @@ - - - diff --git a/application/default/views/scripts/data/tools.phtml b/application/default/views/scripts/data/tools.phtml index fb7dd85d..31c56fe4 100755 --- a/application/default/views/scripts/data/tools.phtml +++ b/application/default/views/scripts/data/tools.phtml @@ -1,11 +1,28 @@ \ 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 60d99f58..731cebfc 100755 --- a/application/default/views/scripts/data/view.phtml +++ b/application/default/views/scripts/data/view.phtml @@ -8,10 +8,11 @@ $this->breadcrumb(''.$this->config->title->data.''); $this->breadcrumb('Details'); $this->breadcrumb()->setSeparator(' > '); - $this->headScript()->appendFile('http://maps.google.com/maps?file=api&v=2&key='.$this->config->google->maps->api); + $this->headScript()->appendFile('http://maps.google.cn/maps?file=api&v=2&key='.$this->config->google->maps->api); $this->headScript()->appendFile('/js/prototype.js'); $this->headScript()->appendFile('/js/OpenLayers.js'); - $this->headScript()->appendFile('/js/window.js'); + $this->headScript()->appendFile('/js/window.js'); + $this->headScript()->appendFile('/js/pubfunc.js'); $this->headLink()->appendStylesheet('/js/theme/default/style.css'); ?> metadata;if ($md):?> @@ -22,7 +23,7 @@ if ($md->title_en) echo '
    '.$this->escape($md->title_en);?>
    @@ -30,15 +31,15 @@ if ($md->title_en) echo '
    '.$this->escape($md->title_en);?> $kt=''; $i=0; foreach($this->keys as $cg) : - if ($kt==$cg['keytype']) : + if ($kt==$cg->keytype) : $i+=1; else : if (!empty($kt)) echo '
    '; - $kt=$cg['keytype']; + $kt=$cg->keytype; $i=0; endif; - if ($i==0) echo '
    '; series): ?> @@ -94,10 +95,13 @@ else
  • Distributed method: datatype) print "Offline"; else print "Online";?> Files list
  • -datatype) : ?> +status>0 and $md->status<5) : ?> + +datatype) : ?> +
    @@ -113,24 +117,24 @@ $party_zh=array('resourceProvider'=>'Resource Provider','custodian'=>'Custodian' $r=''; $i=0; foreach($this->authors as $k=>$author) : -if ($author['role']!=$r) +if ($author->role!=$r) { - $r=$author['role']; + $r=$author->role; $i=0; if ($k>0) echo ''; - echo '
  • '.$party_zh[$author['role']].': '; + echo '
  • '.$party_zh[$author->role].':'; } if ($i>0) echo ', '; $i+=1; - if (!empty($author['email']) && $r!='principalInvestigator') - echo ''; - echo ''; - if (!empty($author['individual'])) - echo $author['individual']; + if (!empty($author->email) && $r!='principalInvestigator') + echo ''; + echo ''; + if (!empty($author->individual)) + echo $author->individual; else - echo $author['organisation']; + echo $author->organisation; echo ''; - if (!empty($author['email'])) echo ''; + if (!empty($author->email)) echo ''; if ($k+1==count($this->authors)) echo '
  • '; endforeach; ?> @@ -143,7 +147,7 @@ endforeach;
    -
    +

    ',$md->description);?> @@ -161,10 +165,10 @@ endforeach;

    References

      ref as $ref) : - if (empty($ref['link'])) - echo '
    1. '.$ref['reference'].'
    2. '; + if (empty($ref->link)) + echo '
    3. '.$ref->reference.'
    4. '; else - echo '
    5. '.$ref['reference'].' 下载
    6. '; + echo '
    7. '.$ref->reference.' 下载
    8. '; endforeach; ?>
    @@ -173,7 +177,7 @@ endforeach; uselimits) : foreach($this->uselimits as $uselimit) : -echo '

    '.str_replace(array("\r\n", "\n", "\r"),'

    ',$this->escape($uselimit['uselimit'])).'

    '; +echo '

    '.str_replace(array("\r\n", "\n", "\r"),'

    ',$this->escape($uselimit->uselimit)).'

    '; endforeach; ?> @@ -189,14 +193,14 @@ endforeach; resources) : ?>

    Online resources

    @@ -209,7 +213,7 @@ endforeach;

    Related data

    @@ -219,14 +223,14 @@ endforeach;

    Related literature

      literature as $r) : -$u=parse_url($r['url']); +$u=parse_url($r->url); if ($u['host']=='hdl.handle.net') $url=$this->config->seekspace->handleurl.$u['path']; else - $url=$r['url']; + $url=$r->url; echo '
    • '; if ($url) echo ''; -echo $r['title']; +echo $r->title; if ($url) echo ''; echo '
    • '; ?> @@ -239,17 +243,22 @@ echo '';

      Related documents


    +status>0 and $md->status<5) : ?> +

    此数据还在评审过程中,我们真切地邀请您参加此数据的评审,以便我们能尽快发布此数据!

    +

    Comments

    +
    评论加载中
    commentForm; ?> +
    @@ -265,7 +274,7 @@ echo '';
    -
    +

    ',$md->description);?> @@ -173,10 +176,10 @@ endforeach;

    建议参考文献

      ref as $ref) : - if (empty($ref['link'])) - echo '
    1. '.$ref['reference'].'
    2. '; + if (empty($ref->link)) + echo '
    3. '.$ref->reference.'
    4. '; else - echo '
    5. '.$ref['reference'].' 下载
    6. '; + echo '
    7. '.$ref->reference.' 下载
    8. '; endforeach; ?>
    @@ -185,7 +188,7 @@ endforeach; uselimits) : foreach($this->uselimits as $uselimit) : -echo '

    '.str_replace(array("\r\n", "\n", "\r"),'

    ',$this->escape($uselimit['uselimit'])).'

    '; +echo '

    '.str_replace(array("\r\n", "\n", "\r"),'

    ',$this->escape($uselimit->uselimit)).'

    '; endforeach; ?> @@ -201,14 +204,14 @@ endforeach; resources) : ?>

    其他在线资源

    @@ -217,6 +220,9 @@ endforeach;

    +status>0 and $md->status<5) : ?> +

    此数据还在评审过程中,我们真切地邀请您参加此数据的评审,以便我们能尽快发布此数据!

    +

    数据评论

    @@ -245,6 +251,7 @@ function reportError(request) }); commentForm; ?> +