westdc php version 1.0

This commit is contained in:
wlx 2009-03-06 03:20:46 +00:00
commit f3b6fc5849
491 changed files with 34141 additions and 0 deletions

View File

@ -0,0 +1,558 @@
<?php
class Admin_DataController extends Zend_Controller_Action
{
function preDispatch()
{
$this->db=Zend_Registry::get('db');
$this->view->config = Zend_Registry::get('config');
$this->messenger=$this->_helper->getHelper('FlashMessenger');
$this->view->messages = $this->messenger->getMessages();
}
function postDispatch()
{
}
function indexAction()
{
//其他连接
}
//提供和GEONETWORK中的元数据的同步功能
//提供双向同步功能但只处理ISO 19115格式的元数据
function syncAction()
{
$sql="select * from (select count(*) as westdccount from metadata) as t1,(select count(uuid) as gncount from geonetworkmetadata where schemaid='iso19115') as t2";
$this->db->setFetchMode(Zend_Db::FETCH_OBJ);
$this->view->mdcount=$this->db->fetchRow($sql);
$source=$this->_request->getParam('source');
$delete=$this->_request->getParam('delete');
$thumb=$this->_request->getParam('thumb');
$uuid=$this->_request->getParam('uuid');
if ($this->_request->isPost()) $uuid=$this->_request->getPost('uuid');
//$uuid=$this->_request->getParam('uuid');
if ($source=="geonetwork" && empty($uuid) ) {
//从geonetwork向WESTDC同步
$sql="select uuid,data from geonetworkmetadata where schemaid='iso19115'";
$rs=$this->db->fetchAll($sql);
foreach($rs as $gmd) {
$this->import($gmd->data);
}
$this->view->msg='成功同步元数据!';
} elseif (!empty($uuid)) {
//同步单条元数据
$sql=$this->db->quoteInto("select data from geonetworkmetadata where uuid=?",$uuid);
if ($rs=$this->db->fetchRow($sql)) {
$this->import($rs->data);
$this->view->msg='成功同步元数据:'.$uuid;
} else $this->view->msg='不存在此元数据:'.$uuid;
} elseif ($delete=='westdc') {
$sql="delete from metadata where uuid not in (select uuid from geonetworkmetadata where schemaid='iso19115')";
$this->db->query($sql);
$this->view->msg='已删除WESTDC中多出的元数据';
} elseif ($thumb=='geonetwork') {
$sql="select g.id as gid,m.uuid,t.* from thumbnail t left join metadata m on t.id=m.id left join geonetworkmetadata g on m.uuid=g.uuid where t.filetype is not null and t.filename is not null";
$rows=$this->db->fetchAll($sql);
foreach($rows as $row) {
$data=file_get_contents($this->view->config->geonetwork->url.'srv/cn/resources.get?access=public&id='.$row->gid.'&fname='.urlencode($row->filename));
$sql="update thumbnail set data=? where id=?";
$this->db->query($sql,array(base64_encode($data),$row->id));
}
$this->view->msg='已成功同步缩略图!';
}
}
//离线数据申请管理
function offlineappAction()
{
$view=(int)$this->_getParam('view');
$start=(int)$this->_getParam('start');
$finish=(int)$this->_getParam('finish');
$cancel=(int)$this->_getParam('cancel');
if ($view) {
//查看此次申请的具体内容,包括指向的地址
} elseif ($start) {
$sql="update dataorder d set d.status=4 where d.status=3 and d.userid=?";
$this->db->query($sql,array($start));
//提示信息
$this->messenger->addMessage('提示信息:该离线数据已经开始处理,请在处理完成后点击“完成”。');
$this->_redirect('/admin/data/offline');
} elseif ($finish) {
$sql="begin;update dataorder d set d.status=5,d.ts_approved=now() where d.status=4 and d.userid=?;";
$sql.="update offlineapp set ts_approved=now() where userid=? and ts_approved is null;commit;";
try {
$this->db->query($sql,array($finish,$finish));
$this->messenger->addMessage('提示信息:该离线数据已经开始处理,请在处理完成后点击“完成”。');
} catch (Exception $e) {
//提示信息
$this->messenger->addMessage($e->getMessage());
$this->messenger->addMessage('提示信息:该数据有可能还没有开始处理,请先开始。');
}
$this->_redirect('/admin/data/offline');
} elseif ($cancel) {
//取消=删除?
//需谨慎操作
$sql="begin;update dataorder d set d.status=-1 where (d.status=3 or d.status=4) and d.userid=?;";
$sql.="delete from offlineapp where id=?;commit;";
//todo: 此处有问题,暂时跳过
}
$select=$this->db->select();
$select->from('offlineapp')->where('ts_approved is null')->where('pdflink is not null')->order('id desc');
$paginator = Zend_Paginator::factory($select);
$paginator->setCurrentPageNumber($this->_getParam('page'));
$paginator->setItemCountPerPage($this->view->config->page->max);
$paginator->setView($this->view);
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml');
$this->view->paginator=$paginator;
}
//离线数据服务记录
function offlineAction()
{
$select=$this->db->select();
$select->from('offlineapp')->where('ts_approved is not null')->where('pdflink is not null')->order('id desc');
$paginator = Zend_Paginator::factory($select);
$paginator->setCurrentPageNumber($this->_getParam('page'));
$paginator->setItemCountPerPage($this->view->config->page->max);
$paginator->setView($this->view);
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml');
$this->view->paginator=$paginator;
}
function datasetcdAction()
{
$add=(int)$this->_getParam('add');
$edit=(int)$this->_getParam('edit');
$delete=(int)$this->_getParam('delete');
if ($add) {
$form=new DatasetcdForm();
$form->img->setRequired(true);
$form->document->setRequired(true);
if ($this->_request->isPost()) {
$formdata=$this->_request->getPost();
if ($form->isValid($formdata)) {
$uploadedData = $form->getValues();
$img = '/'.$form->img->getFileName();
$document='/'.$form->document->getFileName();
$sql="insert into datasetcd (title,size,url,img,document,descript) values(?,?,?,?,?,?)";
$this->db->query($sql,array($formdata['title'],$formdata['size'],$formdata['url'],$img,$document,$formdata['descript']));
$this->messenger->addMessage('提示信息:您已经成功添加该特色数据集。');
$this->_redirect('/admin/data/datasetcd');
} else {
$form->populate($formdata);
}
}
$this->view->form=$form;
$this->_helper->viewRenderer('datasetcdadd');
} elseif ($edit){
$form=new DatasetcdForm();
if ($this->_request->isPost()) {
$formdata=$this->_request->getPost();
if ($form->isValid($formdata)) {
$uploadedData = $form->getValues();
$img = '/'.$form->img->getFileName();
$document='/'.$form->document->getFileName();
$sql="update datasetcd set title=?,size=?,url=?,";
if ($form->img->isUploaded()) $sql.="img=?,";
if ($form->document->isUploaded()) $sql.="document=?,";
$sql.="descript=? where id=?";
$param=array($formdata['title'],$formdata['size'],$formdata['url']);
if ($form->img->isUploaded()) $param[]=$img;
if ($form->document->isUploaded()) $param[]=$document;
$param[]=$formdata['descript'];
$param[]=$edit;
$this->db->query($sql,$param);
$this->messenger->addMessage('提示信息:您已经编辑添加该特色数据集。');
$this->_redirect('/admin/data/datasetcd');
} else {
$form->populate($formdata);
}
} else {
$sql="select * from datasetcd where id=?";
$formdata=$this->db->fetchRow($sql,array($edit));
$form->populate($formdata);
}
$this->view->form=$form;
$this->_helper->viewRenderer('datasetcdadd');
} elseif ($delete) {
$sql="delete from datasetcd where id=?";
try {
$this->db->query($sql,array($delete));
$this->messenger->addMessage('提示信息:您已经成功删除该特色数据集。');
} catch (Exception $e) {
$this->messenger->addMessage($e->getMessage());
}
$this->_redirect("/admin/data/datasetcd");
}
$select=$this->db->select();
$select->from('datasetcd')->order('id desc');
$paginator = Zend_Paginator::factory($select);
$paginator->setCurrentPageNumber($this->_getParam('page'));
$paginator->setItemCountPerPage($this->view->config->page->max);
$paginator->setView($this->view);
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml');
$this->view->paginator=$paginator;
}
function mdAction()
{
$delete=(int)$this->_getParam('delete');
if ($delete)
{
$sql="delete from metadata where id=?";
try {
$this->db->query($sql,array($delete));
$this->messenger->addMessage('提示信息:您已经成功删除该数据。');
} catch (Exception $e) {
$this->messenger->addMessage($e->getMessage());
}
$this->_redirect("/admin/data/md");
}
$select=$this->db->select();
$select->from('metadata')
->joinLeft('mdstat','metadata.uuid=mdstat.uuid','viewed')
->joinLeft('geonetworkmetadata','geonetworkmetadata.uuid=metadata.uuid','id as gid')
->order('metadata.id desc');
$paginator = Zend_Paginator::factory($select);
$paginator->setCurrentPageNumber($this->_getParam('page'));
$paginator->setItemCountPerPage($this->view->config->page->max);
$paginator->setView($this->view);
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml');
$this->view->paginator=$paginator;
}
function commentAction()
{
$delete=(int)$this->_getParam('delete');
if ($delete)
{
$sql="delete from comments where id=?";
try {
$this->db->query($sql,array($delete));
$this->messenger->addMessage('提示信息:您已经成功删除该评论。');
} catch (Exception $e) {
$this->messenger->addMessage($e->getMessage());
}
$this->_redirect("/admin/data/comment");
}
$select=$this->db->select();
$select->from('comments')
->joinLeft('metadata','metadata.uuid=comments.uuid','title')
->order('comments.uuid desc')
->order('comments.id desc');
$paginator = Zend_Paginator::factory($select);
$paginator->setCurrentPageNumber($this->_getParam('page'));
$paginator->setItemCountPerPage($this->view->config->page->max);
$paginator->setView($this->view);
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml');
$this->view->paginator=$paginator;
}
function newsletterAction()
{
$form=new Zend_Form();
$form->setName('newsletter');
$form->setAttrib('enctype', 'multipart/form-data');
$nlf=new Zend_Form_Element_File('nlf');
$nlf->setLabel('数据通讯')
->setRequired(true)
->setDestination($this->view->config->paths->newsletter)
->addValidator('Count', false, 1) // ensure only 1 file
->addValidator('Size', false, 2048000) // limit to 2M
->addValidator('Extension', false, 'pdf'); // only JPEG, PNG, and GIFs
$submit = new Zend_Form_Element_Submit('submit');
$form->addElements(array($nlf,$submit));
if ($this->_request->isPost()) {
$formdata=$this->_request->getPost();
if ($form->isValid($formdata)) {
$uploadedData = $form->getValues();
//自动生成JPG文件
$pdf = $form->nlf->getFileName();
$img = new Imagick($pdf.'[0]');
$img->thumbnailImage(200, 0);
$img->writeImage($this->view->config->paths->newsletter.basename($pdf,'.pdf').'.jpg');
$this->messenger->addMessage('提示信息:您已经成功添加该数据通讯。');
$this->_redirect('/admin/data/newsletter');
}
}
$l=new mydir($this->view->config->paths->newsletter,"newsletter_*.pdf");
$this->view->newsletters=$l->toArray();
$this->view->addHelperPath('helper','Zend_View_Helper_');
rsort($this->view->newsletters);
$this->view->form=$form;
}
function featureAction()
{
$add=(int)$this->_getParam('add');
$edit=(int)$this->_getParam('edit');
$delete=(int)$this->_getParam('delete');
if ($add) {
$form=new DatafeatureForm();
if ($this->_request->isPost()) {
$formdata=$this->_request->getPost();
if ($form->isValid($formdata)) {
$uploadedData = $form->getValues();
if (!$form->imgurl) {
$imgurl = '/'.$form->img->getFileName();
} else
$imgurl=$form->imgurl;
$sql="insert into datafeature (title,detailurl,imgurl,description) values(?,?,?,?)";
$this->db->query($sql,array($formdata['title'],$formdata['detailurl'],$imgurl,$formdata['description']));
$this->messenger->addMessage('提示信息:您已经成功添加该特色推荐。');
$this->_redirect('/admin/data/feature');
} else {
$form->populate($formdata);
}
}
$this->view->form=$form;
$this->_helper->viewRenderer('featureadd');
} elseif ($edit){
$form=new DatafeatureForm();
if ($this->_request->isPost()) {
$formdata=$this->_request->getPost();
if ($form->isValid($formdata)) {
$uploadedData = $form->getValues();
if (!$form->imgurl) {
$imgurl = '/'.$form->img->getFileName();
} else
$imgurl=$form->imgurl;
$sql="update datasetcd set title=?,detailurl=?,imgurl=?,descrition=? where id=?";
$param=array($formdata['title'],$formdata['detailurl'],$formdata['imgurl'],$formdata['descript'],$edit);
$this->db->query($sql,$param);
$this->messenger->addMessage('提示信息:您已经编辑该特色推荐。');
$this->_redirect('/admin/data/feature');
} else {
$form->populate($formdata);
}
} else {
$sql="select * from datafeature where id=?";
$formdata=$this->db->fetchRow($sql,array($edit));
$form->populate($formdata);
}
$this->view->form=$form;
$this->_helper->viewRenderer('featureadd');
} elseif ($delete) {
$sql="delete from datafeature where id=?";
try {
$this->db->query($sql,array($delete));
$this->messenger->addMessage('提示信息:您已经成功删除该特色推荐。');
} catch (Exception $e) {
$this->messenger->addMessage($e->getMessage());
}
$this->_redirect("/admin/data/feature");
}
$select=$this->db->select();
$select->from('datafeature')->order('id desc');
$paginator = Zend_Paginator::factory($select);
$paginator->setCurrentPageNumber($this->_getParam('page'));
$paginator->setItemCountPerPage($this->view->config->page->max);
$paginator->setView($this->view);
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml');
$this->view->paginator=$paginator;
}
/*
* 删除元数据,删除前有确认
*/
function deleteAction()
{
if ($this->_request->isPost()) {
$id = (int)$this->_request->getPost('id');
$del = $this->_request->getPost('del');
if ($del == 'Yes' && $id > 0) {
$md = new MetadataTable();
$where = 'id = ' . $id;
$md->delete($where);
}
$this->_redirect('/data');
} else {
$id = (int)$this->_request->getParam('id');
if ($id > 0) {
$mdt = new MetadataTable();
$this->view->md = $mdt->fetchRow('id='.$id);
}
}
}
/*
* 导入本地元数据
*/
function importAction()
{
$md=new MetadataTable();
$thumb=new ThumbnailTable();
$xmlt=new XmlTable();
$cgt=new CategoryTable();
$cgct=new CategoryCodeTable();
$keyt=new KeywordTable();
$dst=new DatasetSeriesTable();
$seriestable=new SeriesTable();
if ($this->_request->isPost()) {
foreach ($_FILES["xmlfile"]["error"] as $key => $error) {
if ($error == UPLOAD_ERR_OK) {
$tmp_name = $_FILES["xmlfile"]["tmp_name"][$key];
$name = $_FILES["xmlfile"]["name"][$key];
$fp = fopen($tmp_name, "rb");
$xml=fread($fp, filesize($tmp_name));
fclose($fp);
$this->import($xml);
//采用UUID为文件名
//move_uploaded_file($tmp_name, "../data/import/$name");
}//end if
}//foreach
$this->_redirect('/metadata');
} else {
//do nothing now.
}
}
/*
* 批量处理元数据(元数据保存在服务器的一个目录上)
*/
function batchimportAction()
{
if ($this->_request->isPost()) {
$dir = $this->_request->getPost('directory');
$subdir = $this->_request->getPost('subdir');
$l=new mydir($dir,"*.xml");
$xmlfiles=$l->toArray();
foreach($xmlfiles as $xmlfile)
{
$fp=fopen($dir.'/'.$xmlfile,'rb');
$xml=fread($fp,filesize($dir.'/'.$xmlfile));
fclose($fp);
$this->import($xml);
}
$this->_redirect('/data');
}
}
/*
* 保存XML数据到数据库
*/
private function import($xml)
{
$iso=new ISO19115();
$iso->loadXML($xml);
$md=new MetadataTable();
$thumb=new ThumbnailTable();
$xmlt=new XmlTable();
$cgt=new CategoryTable();
$cgct=new CategoryCodeTable();
$keyt=new KeywordTable();
$dst=new DatasetSeriesTable();
$seriestable=new SeriesTable();
$db=$seriestable->getAdapter();
//save metadata
//先删除已有元数据,然后再插入新数据
$sql="delete from metadata where uuid=?";
$this->db->query($sql,array($iso->uuid));
$row=$md->createRow();
$trow=$thumb->createRow();
$row->uuid=$iso->uuid;
$row->title=$iso->resTitle;
$row->description=$iso->idAbs;
$row->citation=$iso->citation;
$row->fileformat=$iso->fileformat;
$row->projection=$iso->projection;
$row->author=$iso->author;
$row->datatype=$iso->datatype;
$row->filesize=$iso->filesize;
$row->ts_created=$iso->mdDateSt;
$row->timebegin=$iso->timebegin;
$row->timeend=$iso->timeend;
$row->west=$iso->geoBox['w'];
$row->south=$iso->geoBox['s'];
$row->north=$iso->geoBox['n'];
$row->east=$iso->geoBox['e'];
//生成空白统计数据
$sql=$db->quoteInto("select * from mdstat where uuid=?",$iso->uuid);
if (!$db->fetchRow($sql))
{
$sql="insert into mdstat (uuid) values(?)";
$db->query($sql,array($iso->uuid));
}
try {
$id=$row->save();
//处理在线资源
if ($iso->onlineresource) foreach($iso->onlineresource as $resource)
{
$sql="insert into onlineresource (uuid,linkage,protocol,name,description) values(?,?,?,?,?)";
$db->query($sql,array($iso->uuid,$resource['linkage'],$resource['protocol'],$resource['name'],$resource['description']));
}
//处理缩略图
if (!empty($iso->thumbnail)) {
$trow->id=$id;
$trow->data=$iso->thumbnail;
$trow->filetype='jpg';
$trow->save();
} elseif ($iso->graph) {
$trow->id=$id;
//$trow->data=$iso->graph['data'];
$trow->filetype=$iso->graph['filetype'];
$trow->filedesc=$iso->graph['filedesc'];
$trow->filename=$iso->graph['filename'];
$trow->save();
}
//todo:处理关键词
//1:N relation
foreach($iso->keyword as $keytype=>$keys)
{
foreach($keys as $key)
{
$row=$keyt->createRow();
$row->id=$id;
//统一转换为大写
$row->keyword=strtoupper($key);
$row->keytype=$keytype;
$row->save();
}
}
//todo:处理数据集序列
//M:N relation
if ($iso->datasetSeries) foreach($iso->datasetSeries as $ds)
{
$where=$db->quoteInto('name = ?',$ds['seriesName']);
$trow=$seriestable->fetchRow($where);
if ($trow)
$sid=$trow->id;
else {
$trow=$seriestable->createRow();
$trow->name=$ds['seriesName'];
$sid=$trow->save();
}
$row=$dst->createRow();
$row->id=$id;
$row->sid=$sid;
$row->save();
}
//处理XML入库
$row=$xmlt->createRow();
$row->id=$id;
$row->data=$xml;
$row->save();
//处理数据分类
foreach($iso->tpCat as $cat){
if (is_numeric($cat)) {
$row=$cgt->createRow();
$row->id=$id;
$row->code=(int)$cat;
$row->save();
} else {
//是字符串geonetwork会采用这种模式
//从categorycode表中查找其对应的code
$where=$db->quoteInto('name= ?',trim($cat));
$trow=$cgct->fetchRow($where);
if ($trow) {
$row=$cgt->createRow();
$row->id=$id;
$row->code=$trow->code;
$row->save();
}
//$db=$cgt->getAdapter();
//$sql="insert into category (id,code) values($id,(select code from categorycode where name='$cat'))";
//$db->query($sql);
}
}
$iso->save("../data/import/$iso->uuid.xml");
} catch (Exception $e) {
//数据重复插入,此处忽略所有错误
}
}
}

View File

@ -0,0 +1,21 @@
<?php
class Admin_IndexController extends Zend_Controller_Action
{
function indexAction()
{
$this->view->title = "元数据";
//echo "元数据显示";
}
function preDispatch()
{
$this->view->config = Zend_Registry::get('config');
$this->db=Zend_Registry::get('db');
}
function importAction()
{
}
}

View File

@ -0,0 +1,10 @@
<?php
class Zend_View_Helper_BaseUrl
{
function baseUrl()
{
$fc = Zend_Controller_Front::getInstance();
return $fc->getBaseUrl();
}
}

View File

@ -0,0 +1,29 @@
<?php
class Zend_View_Helper_breadcrumb extends Zend_View_Helper_Placeholder_Container_Standalone
{
public function breadcrumb ($title = null, $setType = Zend_View_Helper_Placeholder_Container_Abstract::APPEND)
{
if ($title) {
if ($setType == Zend_View_Helper_Placeholder_Container_Abstract::SET) {
$this->set($title);
} elseif ($setType == Zend_View_Helper_Placeholder_Container_Abstract::PREPEND) {
$this->prepend($title);
} else {
$this->append($title);
}
}
return $this;
}
public function toString ($indent = null)
{
$indent = (null !== $indent) ? $this->_getWhitespace($indent) : $this->getIndent();
$items = array();
foreach ($this as $item) {
$items[] = $item;
}
$separator = $this->_escape($this->getSeparator());
if (empty($separator)) $separator='->';
return $indent . implode($separator, $items);
}
}

View File

@ -0,0 +1,21 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin">后台首页</a>');
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
$this->breadcrumb('导入服务器上元数据目录</a>');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="leftPanel">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div id="rightPanel">
<form method="POST">
<p>服务器上元数据所在目录含所有子目录的xml文件: <input type="text" name="directory"></p>
<input type="submit" value="导入元数据" />
</form>
</div>

View File

@ -0,0 +1,41 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin">后台首页</a>');
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
$this->breadcrumb('数据反馈管理</a>');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="leftPanel">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div id="rightPanel">
<?php if ($this->msg or $this->messages) :?>
<div id="message">
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
<p><?php echo $msg; ?></p>
<?php endforeach;endif; ?>
</div>
<?php endif; ?>
<?= $this->paginator; ?>
<?php if (count($this->paginator)): ?>
<div id="comments">
<?php foreach ($this->paginator as $item): ?>
<ul>
<li>用户名:<?php ($item['url'])?print '<a href="'.$item['url'].'">'.$item['author'].'</a>':print $item['author']; ?>
EMAIL<?= $item['email']; ?>
[类型:<?= $item['type']; ?>,创建时间:<?= date('Y-m-d',strtotime($item['ts_created'])); ?>
。操作: <a href="/admin/data/comment/delete/<?= $item['id']; ?>">删除</a></li>
<li>元数据:<a href="/data/<?= $item['uuid']; ?>"><?= $item['title']; ?></a></li>
<li><?= $item['content']; ?></li>
<li>IP:<?= $item['ip']; ?>AGENT:<?= $item['agent']; ?></li>
</ul>
<?php endforeach; ?>
</div>
<?php endif; ?>
</div>

View File

@ -0,0 +1,41 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin">后台首页</a>');
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
$this->breadcrumb('特色数据集管理</a>');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="leftPanel">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div id="rightPanel">
<?php if ($this->msg or $this->messages) :?>
<div id="message">
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
<p><?php echo $msg; ?></p>
<?php endforeach;endif; ?>
</div>
<?php endif; ?>
<?= $this->paginator; ?><a href="/admin/data/datasetcd/add/1">添加新的特色数据集</a>
<?php if (count($this->paginator)): ?>
<div id="datasetcd">
<?php foreach ($this->paginator as $item): ?>
<ul><li><?= $item['title']; ?>[大小:<?= $item['size']; ?>M下载<?= $item['downloaded']; ?>次,创建时间:<?= date('Y-m-d',strtotime($item['ts_created'])); ?></li>
<li>下载地址:<?= $item['url']; ?>(<a href="<?= $item['document']; ?>">数据文档</a>)</li>
<li>操作:
<a href="/admin/data/datasetcd/edit/<?= $item['id']; ?>">编辑</a>
<a href="/admin/data/datasetcd/delete/<?= $item['id']; ?>">删除</a>
</li>
<img src="<?= $item['img']; ?>" />
<li><?= $item['descript']; ?></li>
</ul>
<?php endforeach; ?>
</div>
<?php endif; ?>
</div>

View File

@ -0,0 +1,27 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin">后台首页</a>');
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
$this->breadcrumb('特色数据集管理</a>');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="leftPanel">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div id="rightPanel">
<?php if ($this->msg or $this->messages) :?>
<div id="message">
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
<p><?php echo $msg; ?></p>
<?php endforeach;endif; ?>
</div>
<?php endif; ?>
<a href="/admin/data/datasetcd/add/1">添加新的特色数据集</a>
<?= $this->form; ?>
</div>

View File

@ -0,0 +1,42 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin">后台首页</a>');
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
$this->breadcrumb('特色推荐管理</a>');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="leftPanel">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div id="rightPanel">
<?php if ($this->msg or $this->messages) :?>
<div id="message">
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
<p><?php echo $msg; ?></p>
<?php endforeach;endif; ?>
</div>
<?php endif; ?>
<?= $this->paginator; ?><a href="/admin/data/feature/add/1">添加新的特色数据集</a>
<?php if (count($this->paginator)): ?>
<div id="feature">
<?php foreach ($this->paginator as $item): ?>
<ul>
<img src="<?= $item['imgurl']; ?>" />
<li><?= $item['title']; ?>[创建时间:<?= date('Y-m-d',strtotime($item['ts_created'])); ?></li>
<li>详细地址:<?= $item['detailurl']; ?></li>
<li>操作:
<a href="/admin/data/feature/edit/<?= $item['id']; ?>">编辑</a>
<a href="/admin/data/feature/delete/<?= $item['id']; ?>">删除</a>
</li>
<li><?= $item['description']; ?></li>
</ul>
<?php endforeach; ?>
</div>
<?php endif; ?>
</div>

View File

@ -0,0 +1,27 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin">后台首页</a>');
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
$this->breadcrumb('特色推荐管理</a>');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="leftPanel">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div id="rightPanel">
<?php if ($this->msg or $this->messages) :?>
<div id="message">
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
<p><?php echo $msg; ?></p>
<?php endforeach;endif; ?>
</div>
<?php endif; ?>
<a href="/admin/data/feature/add/1">添加新的特色推荐</a>
<?= $this->form; ?>
</div>

View File

@ -0,0 +1,27 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin">后台首页</a>');
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
$this->breadcrumb('上传元数据</a>');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="leftPanel">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div id="rightPanel">
<form enctype="multipart/form-data" method="POST">
<!-- MAX_FILE_SIZE must precede the file input field -->
<input type="hidden" name="MAX_FILE_SIZE" value="3000000" />
<!-- Name of input element determines name in $_FILES array -->
上传元数据文件: <br />
<input name="xmlfile[]" type="file" /><br />
<input name="xmlfile[]" type="file" /><br />
<input name="xmlfile[]" type="file" /><br />
<input type="submit" value="导入" />
</form>
</div>

View File

@ -0,0 +1,18 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin">后台首页</a>');
$this->breadcrumb('数据管理');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="divContent">
<div id="leftPanel">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div id="rightPanel">
</div>
</div>

View File

@ -0,0 +1,13 @@
<ul>
<li><a href="/admin/data/md">元数据管理</a></li>
<li><a href="/admin/data/comment">数据反馈管理</a></li>
<li><a href="/admin/data/import">上传元数据文件</a></li>
<li><a href="/admin/data/batchimport">导入服务器元数据目录</a></li>
<li><a href="/admin/data/sync">同步GeoNetwork元数据</a></li>
<li>下载全部元数据XML文件</li>
<li><a href="/admin/data/datasetcd">特色数据集管理</a></li>
<li><a href="/admin/data/newsletter">数据中心通讯管理</a></li>
<li><a href="/admin/data/offlineapp">离线数据申请管理</a></li>
<li><a href="/admin/data/offline">离线数据服务记录</a></li>
<li><a href="/admin/data/feature">特色推荐</a></li>
</ul>

View File

@ -0,0 +1,41 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin">后台首页</a>');
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
$this->breadcrumb('元数据管理</a>');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="leftPanel">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div id="rightPanel">
<?php if ($this->msg or $this->messages) :?>
<div id="message">
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
<p><?php echo $msg; ?></p>
<?php endforeach;endif; ?>
</div>
<?php endif; ?>
<?= $this->paginator; ?>
<?php if (count($this->paginator)): ?>
<div id="metadata">
<?php foreach ($this->paginator as $item): ?>
<ul><li><a href="/data/<?= $item['uuid']; ?>"><?= $item['title']; ?></a>
[大小:<?= $item['filesize']; ?>M创建时间<?= date('Y-m-d',strtotime($item['ts_created'])); ?>
,查看:<?= $item['viewed']; ?>次。 操作:
<a href="<?= $this->config->geonetwork->url; ?>srv/cn/metadata.edit?id=<?= $item['gid']; ?>" target="_blank">编辑</a>
<a href="/admin/data/md/delete/<?= $item['id']; ?>">删除</a>
<a href="/admin/data/sync/uuid/<?= $item['uuid']; ?>">同步</a> </li>
<li>数据贡献者:<?= $item['author']; ?></li>
<li><?= $item['description']; ?></li>
</ul>
<?php endforeach; ?>
</div>
<?php endif; ?>
</div>

View File

@ -0,0 +1,40 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin">后台首页</a>');
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
$this->breadcrumb('数据通讯管理</a>');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="leftPanel">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div id="rightPanel">
<?php if ($this->msg or $this->messages) :?>
<div id="message">
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
<p><?php echo $msg; ?></p>
<?php endforeach;endif; ?>
</div>
<?php endif; ?>
数据通讯上传格式要求PDF文件名称为newsletter_N.pdf格式其中N为数字代表第几期。
<?= $this->form; ?>
<?php
foreach ($this->newsletters as $nl){
$name=basename($nl,'.pdf');
list(,$num)=explode("_",$name);
?>
<div class="newsletter">
<a href="/images/newsletter/<?php echo $nl; ?>" target="_blank">
<img src="/images/newsletter/<?php echo $name; ?>.jpg" /></a><br />
<a href="/images/newsletter/<?php echo $nl; ?>" target="_blank"><?php echo $num;?>期数据通讯</a>
</div>
<?php } ?>
</div>

View File

@ -0,0 +1,53 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin">后台首页</a>');
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
$this->breadcrumb('离线数据申请管理</a>');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="leftPanel">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div id="rightPanel">
<?= $this->paginator; ?>
<?php if ($this->msg or $this->messages) :?>
<div id="message">
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
<p><?php echo $msg; ?></p>
<?php endforeach;endif; ?>
</div>
<?php endif; ?>
<?php if (count($this->paginator)): ?>
<table class="offline" cellspacing=0>
<thead><tr>
<th id="name">姓名</th>
<th id="unit">单位</th>
<th id="addr">地址</th>
<th id="postcode">邮编</th>
<th id="project">用途</th>
<th id="datalist">数据清单</th>
<th id="ts">申请时间</th>
<th id="name">操作</th>
</tr></thead>
<tbody>
<?php foreach ($this->paginator as $item): ?>
<tr><td class="name"><?= $item['username']; ?></td>
<td class="unit"><?= $item['unit']; ?></td>
<td class="addr"><?= $item['address']; ?></td>
<td class="postcode"><?= $item['postcode']; ?></td>
<td class="project"><?= $item['project']; ?></td>
<td><?= $item['datalist']; ?></td>
<td class="ts"><?= date('Y-m-d',strtotime($item['ts_created'])); ?></td>
<td class="action">
<a href="/admin/data/offline/view/<?= $item['userid']; ?>">查看</a></td>
</tr>
<?php endforeach; ?>
</tbody></table>
<?php endif; ?>
</div>

View File

@ -0,0 +1,56 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin">后台首页</a>');
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
$this->breadcrumb('离线数据申请管理</a>');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="leftPanel">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div id="rightPanel">
<?= $this->paginator; ?>
<?php if ($this->msg or $this->messages) :?>
<div id="message">
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
<p><?php echo $msg; ?></p>
<?php endforeach;endif; ?>
</div>
<?php endif; ?>
<?php if (count($this->paginator)): ?>
<table class="offline" cellspacing=0>
<thead><tr>
<th id="name">姓名</th>
<th id="unit">单位</th>
<th id="addr">地址</th>
<th id="postcode">邮编</th>
<th id="project">用途</th>
<th id="datalist">数据清单</th>
<th id="ts">申请时间</th>
<th id="name">操作</th>
</tr></thead>
<tbody>
<?php foreach ($this->paginator as $item): ?>
<tr><td class="name"><?= $item['username']; ?></td>
<td class="unit"><?= $item['unit']; ?></td>
<td class="addr"><?= $item['address']; ?></td>
<td class="postcode"><?= $item['postcode']; ?></td>
<td class="project"><?= $item['project']; ?></td>
<td><?= $item['datalist']; ?></td>
<td class="ts"><?= date('Y-m-d',strtotime($item['ts_created'])); ?></td>
<td class="action">
<a href="/admin/data/offline/start/<?= $item['userid']; ?>">开始</a>
<a href="/admin/data/offline/finish/<?= $item['userid']; ?>">完成</a>
<a href="/admin/data/offline/finish/<?= $item['userid']; ?>">取消</a>
<a href="/admin/data/offline/view/<?= $item['userid']; ?>">查看</a></td>
</tr>
<?php endforeach; ?>
</tbody></table>
<?php endif; ?>
</div>

View File

@ -0,0 +1,34 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin">后台首页</a>');
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
$this->breadcrumb('同步GEONETWORK元数据</a>');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="leftPanel">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div id="rightPanel">
<?php if ($this->msg or $this->messages) :?>
<div id="message">
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
<p><?php echo $msg; ?></p>
<?php endforeach;endif; ?>
</div>
<?php endif; ?>
<p>WESTDC有元数据<?php echo $this->mdcount->westdccount; ?>GEONETWORK有元数据<?php echo $this->mdcount->gncount; ?>条。</p>
<p><a href="/admin/data/sync/source/geonetwork">开始同步从GEONETWORK同步到WESTDC若有冲突以GEONETWORK为准</a> </p>
<p><a href="/admin/data/sync/delete/westdc">删除WESTDC中多出的元数据</a></p>
<p><a href="/admin/data/sync/thumb/geonetwork">同步GEONETWORK中的缩略图</a></p>
<form method="POST">
<p>指定元数据UUID: <input type="text" name="uuid"></p>
<input type="submit" value="同步此元数据" />
</form>
</div>

View File

@ -0,0 +1,4 @@
<div id="divFooter">
<span>版权所有©2006-2008中国西部环境与生态科学数据中心</span> | <a href="/about/contact" >联系我们</a> | <a href="/about/terms">使用条款和免责申明</a>
| <a href="http://www.miibeian.gov.cn" target="_blank">陇ICP备05000491号</a>
</div>

View File

@ -0,0 +1,24 @@
<div id="divLogo">
<a href="/"><img src="/images/westdc-banner.jpg" alt="Westdc Logo" /></a>
</div>
<div id="divNavi">
<ul>
<!-- CSS Tabs -->
<li><a href="/"><span>网站首页</span></a></li>
<li><a href="/admin"><span>后台首页</span></a></li>
<li><a href="/admin/data"><span>数据管理</span></a></li>
<li><a href="/admin/account"><span>用户管理</span></a></li>
<li><a href="/admin/stat"><span>统计数据</span></a></li>
</ul>
<div id="userNavi">
<?php
$auth = Zend_Auth::getInstance();
if($auth->hasIdentity())
{
$user = $auth->getIdentity();
echo '<a href="/account/edit">'.$user->username.'</a> <a href="/account/logout">注销</a>';
}
?>
</div>
</div>

View File

@ -0,0 +1,22 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('首页');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/admin.css');
$auth = Zend_Auth::getInstance();
?>
<div id="divContent">
<div id="leftPanel">
元数据处理工具:
<p><a href="<?php echo $this->url(array('controller'=>'metadata','action'=>'add'));?>">create new metadata</a></p>
<p><a href="<?php echo $this->url(array('controller'=>'metadata','action'=>'import'));?>">import local metadata file</a></p>
</div>
<div id="rightPanel">
</div>
</div>

View File

@ -0,0 +1,26 @@
<?php if ($this->pageCount): ?>
<div class="paginationControl">
<!-- Previous page link -->
<?php if (isset($this->previous)): ?>
<a href="<?= $this->url(array('page' => $this->previous)); ?>">&lt; Previous</a> |
<?php else: ?>
<span class="disabled">&lt; Previous</span> |
<?php endif; ?>
<!-- Numbered page links -->
<?php foreach ($this->pagesInRange as $page): ?>
<?php if ($page != $this->current): ?>
<a href="<?= $this->url(array('page' => $page)); ?>"><?= $page; ?></a> |
<?php else: ?>
<?= $page; ?> |
<?php endif; ?>
<?php endforeach; ?>
<!-- Next page link -->
<?php if (isset($this->next)): ?>
<a href="<?= $this->url(array('page' => $this->next)); ?>">Next &gt;</a>
<?php else: ?>
<span class="disabled">Next &gt;</span>
<?php endif; ?>
</div>
<?php endif; ?>

137
application/config.ini Executable file
View File

@ -0,0 +1,137 @@
[general]
db.adapter = PDO_PGSQL
db.params.host = localhost
db.params.username = gis
db.params.password = gispassword
db.params.dbname = metadata
geonetwork.url=http://test.westgis.ac.cn:8080/geonetwork/
geonetwork.adapter = PDO_PGSQL
geonetwork.params.host = localhost
geonetwork.params.username = gis
geonetwork.params.password = gispassword
geonetwork.params.dbname = geonetwork
seekspace.url=http://seekspace.resip.ac.cn/
seekspace.handleurl=http://seekspace.resip.ac.cn/handle
paths.base = /var/www/test.westgis.ac.cn
paths.data = /var/www/test.westgis.ac.cn/data
paths.templates = /var/www/test.westgis.ac.cn/templates
paths.newsletter=images/newsletter/
logging.file = /var/www/test.westgis.ac.cn/data/logs/debug.log
page.limit=10
import.dir=../data/import
title.site=西部数据中心
title.data=数据产品与服务
title.knowledge=知识积累平台
title.netkites=移动文献查询服务
supportemail=westdc@lzb.ac.cn
reportemail=westdc-report-subscribe@lists.westgis.ac.cn
smtp.username=westdc@westgis.ac.cn
smtp.password=westdcrobot
smtp.host=210.77.68.240
smtp.ssl=TLS
smtp.auth=login
ftp.user=westdc
ftp.password=westdc
download.max=5 //最多同时申请下载个数
page.max=10 //每页显示条目数
offline.template=../data/offline.pdf
offline.font=../data/simhei.ttf
offline.savepath=../data/offlineapp
service.email=westdc@lzb.ac.cn
offline.email.template=../data/offline-email.txt
register.email.template=../data/register-email.txt
westdc.xsl=../data/ISO19115.xsl
routes.tag.route = "data/tag/:key"
routes.tag.defaults.controller = "data"
routes.tag.defaults.action = "tag"
routes.netkites1.type = "Zend_Controller_Router_Route_Static"
routes.netkites1.route = "knowledge/netkites"
routes.netkites1.defaults.controller = netkites
routes.netkites1.defaults.action = index
routes.netkites.route = "knowledge/netkites/:action/*"
routes.netkites.defaults.controller = netkites
routes.dataid.route = "data/:id"
routes.dataid.defaults.controller = "data"
routes.dataid.defaults.action = "view"
routes.dataid.reqs.id = "\d+"
routes.dataxmluuid.route = "data/xml/:uuid"
routes.dataxmluuid.defaults.controller = "data"
routes.dataxmluuid.defaults.action = "xml"
routes.dataxmluuid.reqs.uuid = "[[:xdigit:]]{8}(-[[:xdigit:]]{4}){3}-[[:xdigit:]]{12}"
routes.datauuid.route = "data/:uuid"
routes.datauuid.defaults.controller = "data"
routes.datauuid.defaults.action = "view"
routes.datauuid.reqs.uuid = "[[:xdigit:]]{8}(-[[:xdigit:]]{4}){3}-[[:xdigit:]]{12}"
routes.datacat.route = "data/category/:code"
routes.datacat.defaults.controller = "data"
routes.datacat.defaults.action = "category"
routes.datacat.reqs.code = "\d+"
routes.dataseries.route = "data/series/:id"
routes.dataseries.defaults.controller = "data"
routes.dataseries.defaults.action = "series"
routes.dataseries.reqs.code = "\d+"
routes.admin.type = "Zend_Controller_Router_Route_Static"
routes.admin.route = admin
routes.admin.defaults.module = admin
routes.admin.defaults.controller = data
routes.admin.defaults.action = index
routes.adminofflineapp.route = admin/data/offlineapp/:page
routes.adminofflineapp.defaults.module = admin
routes.adminofflineapp.defaults.controller = data
routes.adminofflineapp.defaults.action = offlineapp
routes.adminofflineapp.defaults.page = 1
routes.adminofflineapp.reqs.page = \d+
routes.admindatasetcd.route = admin/data/datasetcd/:page
routes.admindatasetcd.defaults.module = admin
routes.admindatasetcd.defaults.controller = data
routes.admindatasetcd.defaults.action = datasetcd
routes.admindatasetcd.defaults.page = 1
routes.admindatasetcd.reqs.page = \d+
routes.adminmd.route = admin/data/md/:page
routes.adminmd.defaults.module = admin
routes.adminmd.defaults.controller = data
routes.adminmd.defaults.action = md
routes.adminmd.defaults.page = 1
routes.adminmd.reqs.page = \d+
routes.admincomment.route = admin/data/comment/:page
routes.admincomment.defaults.module = admin
routes.admincomment.defaults.controller = data
routes.admincomment.defaults.action = comment
routes.admincomment.defaults.page = 1
routes.admincomment.reqs.page = \d+
routes.adminoffline.route = admin/data/offline/:page
routes.adminoffline.defaults.module = admin
routes.adminoffline.defaults.controller = data
routes.adminoffline.defaults.action = offline
routes.adminoffline.defaults.page = 1
routes.adminoffline.reqs.page = \d+
routes.news.type = "Zend_Controller_Router_Route_Static"
routes.news.route = "news"
routes.news.defaults.controller = "news"
routes.news.defaults.action = "list"
routes.archive.type = "Zend_Controller_Router_Route_Regex"
routes.archive.route = "archive/(\d+)"
routes.archive.defaults.controller = "archive"
routes.archive.defaults.action = "show"
routes.archive.map.1 = "year"

View File

@ -0,0 +1,49 @@
<?php
class AboutController extends Zend_Controller_Action
{
function indexAction()
{
}
function preDispatch()
{
$this->view->config = Zend_Registry::get('config');
$this->messenger=$this->_helper->getHelper('FlashMessenger');
$this->view->messages = $this->messenger->getMessages();
}
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()
{
}
}

View File

@ -0,0 +1,206 @@
<?php
class AccountController extends Zend_Controller_Action
{
function indexAction()
{
$this->_redirect('/');
}
function init()
{
$this->messenger=$this->_helper->getHelper('FlashMessenger');
}
function postDispatch()
{
$this->view->config = Zend_Registry::get('config');
$this->view->messages = $this->messenger->getMessages();
}
function preDispatch()
{
$this->_request->setParam('return', $this->_request->getServer('REQUEST_URI'));
}
function registerAction()
{
$form = new RegisterForm();
$this->view->form = $form;
if ($this->_request->isPost()) {
$formData = $this->_request->getPost();
if ($form->isValid($formData)) {
$ut = new UsersTable();
$u = $ut->createRow();
$u->username = $form->getValue('username');
$u->password = $form->getValue('password');
$u->email=$form->getValue('email');
if ($form->getValue('realname')) $u->realname=$form->getValue('realname');
if ($form->getValue('phone')) $u->phone=$form->getValue('phone');
if ($form->getValue('address')) $u->address=$form->getValue('address');
if ($form->getValue('unit')) $u->unit=$form->getValue('unit');
if ($form->getValue('project')) $u->project=$form->getValue('project');
if ($u->save()) {
//发送欢迎邮件
$mail = new Zend_Mail('utf-8');
$body=file_get_contents($this->view->config->register->email->template);
$body=str_replace("[username]",$formData['username'],$body);
$mail->setBodyText($body);
$mail->setFrom('westdc@westgis.ac.cn');
$mail->addTo($formData['email']);
//中文标题有乱码在1.5版本中尚未解决
//ref: http://framework.zend.com/issues/browse/ZF-2532
$mail->setSubject('欢迎使用中国西部环境与生态数据中心');
$tr=new Zend_Mail_Transport_Smtp($this->view->config->smtp->host,
array('ssl' => $this->view->config->smtp->ssl,
'auth'=>$this->view->config->smtp->auth,
'username'=>$this->view->config->smtp->username,
'password'=>$this->view->config->smtp->password));
$mail->send($tr);
//自动登录系统
$this->login($formData['username'],$formData['password']);
$this->_redirect('/');
}
} else {
$form->populate($formData);
}
}
}
function editAction()
{
$form=new UsereditForm();
$this->view->form=$form;
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
if ($this->_request->isPost()) {
$formData = $this->_request->getPost();
if ($form->isValid($formData)) {
//save user info
$ut=new UsersTable();
$row=$ut->fetchRow('id='.$formData['id']);
if (md5($formData['oldpassword'])==$row->password && $formData['password']) {
//修改密码
$row->password=md5($formData['password']);
}
if ($formData['email']) $row->email=$formData['email'];
if ($formData['phone']) $row->phone=$formData['phone'];
if ($formData['realname']) $row->realname=$formData['realname'];
if ($formData['unit']) $row->unit=$formData['unit'];
if ($formData['address']) $row->address=$formData['address'];
if ($formData['project']) $row->project=$formData['project'];
$row->save();
//todo:更新session信息
}
} else {
/*$formData['id']=$user->id;
$formData['email']=$user->email;
$formData['phone']=$user->phone;
$formData['realname']=$user->realname;
$formData['unit']=$user->unit;
$formData['address']=$user->address;
$formData['project']=$user->project;*/
$ut=new UsersTable();
$row=$ut->fetchRow('id='.$user->id);
$formData['email']=$row->email;
$formData['phone']=$row->phone;
$formData['realname']=$row->realname;
$formData['unit']=$row->unit;
$formData['address']=$row->address;
$formData['project']=$row->project;
$formData['id']=$row->id;
$form->populate($formData);
}
}
function loginAction()
{
$form = new LoginForm();
$success=false;
$message='';
$this->view->form = $form;
$auth = Zend_Auth::getInstance();
if ($auth->hasIdentity()) $this->_redirect('/account');
if ($this->_request->isPost()) {
$formData = $this->_request->getPost();
if ($form->isValid($formData)) {
if (!$this->login($formData['username'],$formData['password']))
{
$this->messenger->addMessage('登录失败,请检查您的用户名和密码。');
} else $success=true;
}
if(!$success) {
$flashMessenger = $this->_helper->getHelper('FlashMessenger');
$flashMessenger->setNamespace('actionErrors');
$flashMessenger->addMessage($message);
$this->_redirect('/account/login');
} else $this->_redirect($this->_request->getParam('return'));
} else {
//$formData['redirect'] = $redirect;
//$form->populate($formData);
}
}
function logoutAction()
{
$auth = Zend_Auth::getInstance();
$auth->clearIdentity();
$this->_redirect('/');
}
private function default_login($u,$p)
{
$auth = Zend_Auth::getInstance();
$db=Zend_Registry::get('db');
$authAdapter = new Zend_Auth_Adapter_DbTable($db);
$authAdapter->setTableName('users')
->setIdentityColumn('username')
->setCredentialColumn('password');
$authAdapter->setIdentity($u)->setCredential(md5($p));
if ($this->_request->getParam('remember')) {
$authNamespace = new Zend_Session_Namespace('westdc');
$authNamespace->setExpirationSeconds(2592000);
}
$result = $auth->authenticate($authAdapter);
if ($result->isValid()) {
// success: store database row to auth's storage
$data = $authAdapter->getResultRowObject(null,'password');
$auth->getStorage()->write($data);
$db->query("update users set ts_last_login=now() where username=?",array($u));
return true;
}
return false;
}
private function aspnet_login($p,$salt,$password)
{
$p1=implode("\x00",str_split($p))."\x00";
$ball=base64_decode($salt).$p1;
return trim($password)==base64_encode(sha1($ball,true));
}
// 首先判断是否存在salt
// 若有salt则按照aspnet membership加密算法进行判断
function login($u,$p)
{
$ut= new UsersTable();
$db=$ut->getAdapter();
$sql="select password,salt from users where username=?";
$uq=$db->query($sql,array($u));
if ($urow=$uq->fetchObject())
{
if (empty($urow->salt))
return $this->default_login($u,$p);
else {
//进行判断并进行转换到默认
if ($this->aspnet_login($p,$urow->salt,$urow->password))
{
$sql="update users set password=md5(?),salt='' where username=?";
$db->query($sql,array($p,$u));
return $this->default_login($u,$p);
} else
return false;
}
} else {
//没有对应的用户,登录失败
return false;
}
}
}

View File

@ -0,0 +1,13 @@
<?php
class CommunityController extends Zend_Controller_Action
{
function indexAction()
{
//$this->_redirect('/metadata');
}
function preDispatch()
{
$this->view->config = Zend_Registry::get('config');
}
}

View File

@ -0,0 +1,896 @@
<?php
class DataController extends Zend_Controller_Action
{
function __call($id, $arguments)
{
Zend_Debug::dump($arguments,'argu');
Zend_Debug::dump($id,'id');
$this->_helper->viewRenderer->setNoRender();
$this->_helper->layout->disableLayout();
}
function preDispatch()
{
$this->db=Zend_Registry::get('db');
$this->view->config = Zend_Registry::get('config');
$this->messenger=$this->_helper->getHelper('FlashMessenger');
$this->view->messages = $this->messenger->getMessages();
}
function indexAction()
{
$md = new MetadataTable();
$db=$md->getAdapter();
//序列
$state=$db->query('select s.id,name,count(*) from series s,dataseries d where d.sid=s.id group by s.id,s.name');
$this->view->serie=$state->fetchAll();
//分类
$state=$db->query('select c.code,name,name_zh,count(*) from category c,categorycode cc where c.code=cc.code group by c.code,cc.name,cc.name_zh');
$this->view->category=$state->fetchAll();
//关键词
$state=$db->query('select keyword,count(*),keytype from keyword group by keyword,keytype order by keytype,count desc');
$this->view->keywords=$state->fetchAll();
//最新10个入库数据
$state=$db->query('select id,uuid,title from metadata order by id desc limit 10');
$this->view->metadata = $state->fetchAll();
//特色数据
//服务
$l=new mydir($this->view->config->paths->newsletter,"newsletter_*.pdf");
$this->view->newsletter=$l->getLast();
$name=basename($this->view->newsletter,'.pdf');
list(,$this->view->newsletterno)=explode("_",$name);
$this->view->addHelperPath('helper','Zend_View_Helper_');
$form=new MaillistForm();
$form->submit->setLabel('输入邮件地址,订阅数据通讯列表');
$this->view->form=$form;
if ($this->_request->isPost()) {
//发送邮件
$formData=$this->_request->getPost();
if ($form->isValid($formData)) {
$mail=new WestdcMailer($this->view->config->smtp);
$mail->setFrom($formData['email']);
$mail->setBodyText(".");
$mail->setSubject('subscribe');
$mail->addTo($this->view->config->reportemail);
$mail->send();
$this->messenger->addMessage('订阅成功,请检查您的邮件!');
$this->_redirect('/data/');
}
} else {
$auth = Zend_Auth::getInstance();
if ($auth->hasIdentity()) {
$user=$auth->getIdentity();
$formData['email']=$user->email;
$form->populate($formData);
}
}
$searchform=new SearchForm();
$this->view->searchform=$searchform;
//其他连接
}
function onlinelistAction()
{
$this->view->addHelperPath('helper','Zend_View_Helper_');
$searchform=new SearchForm();
$this->view->searchform=$searchform;
$searchform->submit->setLabel('快速搜索');
}
function offlinelistAction()
{
$this->view->addHelperPath('helper','Zend_View_Helper_');
$searchform=new SearchForm();
$this->view->searchform=$searchform;
$searchform->submit->setLabel('快速搜索');
}
//展示最近20条离线神情记录情况
function offlineappAction()
{
$sql="select * from offlineapp order by id desc limit 20";
$this->view->rows=$this->db->fetchAll($sql);
}
function requestAction()
{
}
function submitAction()
{
}
function serviceAction()
{
}
function newsletterAction()
{
$l=new mydir($this->view->config->paths->newsletter,"newsletter_*.pdf");
$this->view->newsletters=$l->toArray();
$this->view->addHelperPath('helper','Zend_View_Helper_');
rsort($this->view->newsletters);
$form=new MaillistForm();
$this->view->form=$form;
$form->submit->setLabel('输入邮件地址,订阅数据通讯列表');
if ($this->_request->isPost()) {
//发送邮件
$formData=$this->_request->getPost();
if ($form->isValid($formData)) {
//$mail=new Zend_Mail('utf-8');
$mail=new WestdcMailer($this->view->config->smtp);
$mail->setFrom($formData['email']);
$mail->setBodyText(".");
$mail->setSubject('subscribe');
$mail->addTo($this->view->config->reportemail);
/*
$tr=new Zend_Mail_Transport_Smtp($this->view->config->smtp->host,
array('ssl' => $this->view->config->smtp->ssl,
'auth'=>$this->view->config->smtp->auth,
'username'=>$this->view->config->smtp->username,
'password'=>$this->view->config->smtp->password));
$mail->send($tr);
*/
$mail->send();
$this->messenger->addMessage('订阅成功,请检查您的邮件!');
$this->_redirect('/data/newsletter');
}
} else {
$auth = Zend_Auth::getInstance();
if ($auth->hasIdentity()) {
$user=$auth->getIdentity();
$formData['email']=$user->email;
$form->populate($formData);
}
}
}
function featureAction()
{
$sql="select * from datafeature order by id desc";
$this->view->feature=$this->db->fetchAll($sql);
}
function datasetcdAction()
{
$cd=new DatasetcdTable();
$this->view->rows=$cd->fetchAll();
}
/*
* 数据浏览
*/
function browseAction()
{
$md=new MetadataTable();
$db=$md->getAdapter();
$page=(int)$this->_request->getParam('page');
if (empty($page)) $page=1;
$limit=10;
$offset=$limit*($page-1);
$state=$db->query('select count(*) from metadata');
$row=$state->fetchAll();
$sum=$row[0]['count'];
$select=$db->select();
$select->from('metadata','*')->order('id desc')->limitPage($page,$limit);
$this->view->metadata = $db->fetchAll($select);
$this->view->page=new Pagination($sum,$page,$limit);
}
function tagAction()
{
$id = (int)$this->_request->getParam('id');
$key = $this->_request->getParam('key');
$md=new KeywordTable();
$db=$md->getAdapter();
$state=$db->query('select keyword,count(*),keytype from keyword group by keyword,keytype order by keytype,count desc');
$this->view->keywords=$state->fetchAll();
if ($id>0 or !empty($key)) {
if (empty($key)) {
$where=$db->quoteInto('id = ?',$id);
$row=$md->fetchRow($where);
$key=$row->name;
}
$this->view->codename=$key;
$sql=$db->quoteInto('select m.* from metadata m,keyword k where m.id=k.id and k.keyword=?',$key);
$state=$db->query($sql);
$this->view->metadata=$state->fetchAll();
}
}
/*
* 数据集序列浏览
*/
function seriesAction()
{
$id = (int)$this->_request->getParam('id');
$md=new SeriesTable();
$db=$md->getAdapter();
$state=$db->query('select s.id,name,count(*) from series s,dataseries d where d.sid=s.id group by s.id,s.name');
$this->view->serie=$state->fetchAll();
if ($id>0) {
$where=$db->quoteInto('id = ?',$id);
$row=$md->fetchRow($where);
$this->view->codename=$row->name;
$sql='select m.* from metadata m,dataseries d where m.id=d.id and d.sid=?';
$state=$db->query($sql,array($id));
$this->view->metadata = $state->fetchAll();
} else {
//提供全部数据集序列列表
}
}
/*
* 分类浏览模式
*/
function categoryAction()
{
$code = (int)$this->_request->getParam('code');
$md=new CategoryCodeTable();
$db=$md->getAdapter();
$state=$db->query('select c.code,name,name_zh,count(*) from category c,categorycode cc where c.code=cc.code group by c.code,cc.name,cc.name_zh');
$this->view->category=$state->fetchAll();
if ($code>0 && $code<20) {
$where=$db->quoteInto('code = ?',$code);
$row=$md->fetchRow($where);
$this->view->codename=(empty($row->name_zh)?$row->name:$row->name_zh);
$sql='select m.* from metadata m,category c where m.id=c.id and c.code=?';
$state=$db->query($sql,array($code));
$this->view->metadata = $state->fetchAll();
} else {
//提供全部分类列表
}
}
/*
* 时间浏览方式
* todo:实现xml的缓存
*/
function timelineAction()
{
$dateformat="D M j Y G:i:s O";
$md = new MetadataTable();
$db=$md->getAdapter();
$state=$db->query('select id,uuid,title,description,timebegin,timeend from metadata where timebegin is not null');
$rows=$state->fetchAll();
$timexml='<data>';
foreach($rows as $row) {
$timexml.='<event start="'.date($dateformat,strtotime($row['timebegin'])).'" ';
if ($row['timeend']!='') $timexml.=' end="'.date($dateformat,strtotime($row['timeend'])).'" ';
$timexml.= ' title="'.$row['title'].'" image="/images/westdc_40w.gif" link="/data/'.$row['uuid'].'">'.$row['description'].'</event>';
}
$timexml.='</data>';
$fp=fopen('time.xml','w');
fwrite($fp,$timexml);
fclose($fp);
//$this->_helper->layout->disableLayout();
}
/*
* todo:空间浏览
*/
function mapAction()
{
//use json & openlayers?
$id=(int)$this->_request->getParam('id');
if ($id>0) $this->view->params="/id/$id";
}
/*
* 产生geojson数据
*/
function jsonAction()
{
$md=new MetadataTable();
$db=$md->getAdapter();
$id = (int)$this->_request->getParam('id');
$where='';
if (!empty($id)) { $where=' where id='.$id; }
$sql='select id,west,south,north,east,title from metadata'.$where;
$state=$db->query($sql);
$rows=$state->fetchAll();
$geomd=new GeoMetaData();
foreach($rows as $row){
if ($id)
$box=new GeoBox($row['west'],$row['south'],$row['east'],$row['north']);
else
$box=new GeoBoxLine($row['west'],$row['south'],$row['east'],$row['north']);
$feature=new Geofeature();
$feature->id=$row['id'];
$feature->addProperties('title',$row['title']);
$feature->geometry=$box;
$geomd->addFeature($feature);
}
$this->_helper->json($geomd);
}
/*
* 返回XML源文件
*/
function xmlAction()
{
$id=(int)$this->_request->getParam('id');
$xml=new XmlTable();
$db=$xml->getAdapter();
$where=$db->quoteInto('id=?',$id);
$order='id desc';
$row=$xml->fetchRow($where,$order);
$this->_helper->layout->disableLayout();
$this->_helper->viewRenderer->setNoRender();
$this->getResponse()->setHeader('Content-Type', 'text/xml')
->setBody($row->data);
}
function detailAction()
{
$id=(int)$this->_request->getParam('id');
$xml=new XmlTable();
$db=$xml->getAdapter();
$where=$db->quoteInto('id=?',$id);
$order='id desc';
$row=$xml->fetchRow($where,$order);
// Load the XML source
$xml = new DOMDocument;
$xml->loadXML($row->data);
$xsl = new DOMDocument;
$xsl->load($this->view->config->westdc->xsl);
// Configure the transformer
$proc = new XSLTProcessor;
$proc->importStyleSheet($xsl); // attach the xsl rules
$this->view->xml=$proc->transformToXML($xml);
//$this->_helper->layout->disableLayout();
//$this->_helper->viewRenderer->setNoRender();
//$this->getResponse()->setHeader('Content-Type', 'text/html')
// ->setBody($proc->transformToXML($xml));
}
function feedAction()
{
$feedArray = array(
'title' => '中国西部环境与生态科学数据中心',
'link' => 'http://'.$_SERVER['SERVER_NAME'].'/data/feed',
'description' => '共享西部计划产生的数据',
'language' => 'zh-CN',
'charset' => 'utf-8',
'published' => time(),
//'generator' => 'Zend Framework Zend_Feed',
'entries' => array()
);
$sql="select * from metadata order by ts_created desc";
$rs=$this->db->fetchAll($sql);
$feedArray['published']=strtotime($rs[0]['ts_created']);
foreach($rs as $r)
{
$feedArray['entries'][] = array(
'title' => $r['title'],
'link' => 'http://'.$_SERVER['SERVER_NAME'].'/data/' . $r['uuid'],
'guid' => 'http://'.$_SERVER['SERVER_NAME'].'/data/' . $r['uuid'],
//'content'=>$r['description'],
'description' => $r['description'],
'lastUpdate' => strtotime($r['ts_created'])
);
}
$feed = Zend_Feed::importArray($feedArray,'rss');
$this->_helper->layout->disableLayout();
$this->_helper->viewRenderer->setNoRender();
$feed->send();
}
/*
* todo: search
*/
function searchAction()
{
$this->view->addHelperPath('helper','Zend_View_Helper_');
$form=new SearchForm();
$this->view->form=$form;
$form->submit->setLabel('快速搜索');
if ($this->_request->isPost()) {
$formData=$this->_request->getPost();
include_once("bcspamblock.php");
if (bcspamblock_verify() && $form->isValid($formData)) {
$page=@(int)$formData['page'];
if (empty($page)) $page=1;
$limit=10;
$offset=$limit*($page-1);
$key=$formData['q'];
if (!empty($key)) {
$md=new MetadataTable();
$db=$md->getAdapter();
$sql=$db->quoteInto('select count(*) from metadata where title ilike ? or description ilike ?','%'.$key.'%','%'.$key.'%');
$state=$db->query($sql);
$row=$state->fetchAll();
$sum=$row[0]['count'];
$select=$db->select();
$select->from('metadata','*')->where('title ilike ? or description ilike ?','%'.$key.'%','%'.$key.'%')->order('id desc')->limit($limit,$offset);
$this->view->metadata = $db->fetchAll($select);
$this->view->page=new Pagination($sum,$page);
$this->view->key=$key;
}
}
} else {
}
}
/*
* todo: 高级搜索
*/
function advancesearchAction()
{
$md=new MetadataTable();
$db=$md->getAdapter();
$page=(int)$this->_request->getParam('page');
if (empty($page)) $page=1;
$limit=10;
$offset=$limit*($page-1);
$key=$this->_request->getParam('key');
$searchtype=$this->_request->getParam('type');
if (!empty($key)) {
$sql=$db->quoteInto('select count(*) from metadata where title ilike ? or description ilike ?','%'.$key.'%','%'.$key.'%');
$state=$db->query($sql);
$row=$state->fetchAll();
$sum=$row[0]['count'];
$select=$db->select();
$select->from('metadata','*')->where('title ilike ? or description ilike ?','%'.$key.'%','%'.$key.'%')->order('id desc')->limit($limit,$offset);
$this->view->metadata = $db->fetchAll($select);
$this->view->page=new Pagination($sum,$page);
$this->view->key=$key;
}
}
/*
* 根据id或uuid来查看元数据
* id为一组数字uuid为唯一标识符
*/
function viewAction()
{
$md=new MetadataTable();
$db=$md->getAdapter();
$id = (int)$this->_request->getParam('id');
if (empty($id)) {
$uuid = $this->_request->getParam('uuid');
if (empty($uuid)) $this->_redirect('/data');
$where=$db->quoteInto('uuid = ?',$uuid);
$row=$md->fetchRow($where);
} else {
$where=$db->quoteInto('id = ?',$id);
$row=$md->fetchRow($where);
}
if (!$row) $this->_redirect('/data');
$id=$row->id;
$uuid=$row->uuid;
$this->view->metadata=$row;
if (is_numeric($row->projection))
{
$sql="select proj4text from spatial_ref_sys where auth_srid=?";
$rs=$db->fetchRow($sql,array((int)$row->projection));
if ($rs) $this->view->projection=$rs['proj4text'];
}
$where=$db->quoteInto('id= ?',$id);
$order='keytype';
$keyt=new KeywordTable();
$this->view->keys=$keyt->fetchAll($where,$order);
$sql='select c.code,cc.name,cc.name_zh from category c,categorycode cc where c.code=cc.code and c.id= ?';
$state=$db->query($sql,array($id));
$this->view->category=$state->fetchAll();
$sql='select s.name from dataseries d, series s where d.sid=s.id and d.id= ?';
$state=$db->query($sql,array($id));
$this->view->series=$state->fetchAll();
$sql=$db->quoteInto("select count(*) as count from dataorder where uuid=?",$uuid);
$row=$db->fetchRow($sql);
$this->view->downloaded=$row['count'];
//update the viewed times
$sql="update mdstat set viewed=viewed+1 where uuid=?";
$db->query($sql,array($uuid));
$sql=$db->quoteInto("select viewed from mdstat where uuid=?",$uuid);
$row=$db->fetchRow($sql);
$this->view->viewed=$row['viewed'];
//相关元数据,根据同名关键词实现
//$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";
$this->view->related=$this->db->fetchAll($sql,array($id,$id));
//相关文献
$sql="select * from knl_article where ";
foreach($this->view->keys as $k)
{
if ($k->keytype=='theme')
{
$sql.=" title like '%".$k->keyword."%' or ";
}
}
$sql.=" 1<>1 limit 10";
$this->view->literature=$this->db->fetchAll($sql);
//数据评论
$sql="select * from comments where uuid=? order by id desc";
$this->view->comments=$this->db->fetchAll($sql,array($uuid));
$user=Zend_Auth::getInstance()->getIdentity();
$commentForm=new CommentForm();
$formdata['uuid']=$uuid;
$formdata['id']=0;//用户ID默认为0即未登录用户
if ($user) {
$formdata['id']=$user->id;
$formdata['author']=$user->username;
$formdata['email']=$user->email;
//$formdata['website']=$user->website;
}
$this->view->addHelperPath('helper','Zend_View_Helper_');
if ($this->_request->isPost()) {
include_once("bcspamblock.php");
$formdata=$this->_request->getPost();
if (bcspamblock_verify() && $commentForm->isValid($formdata)) {
$sql="insert into comments (userid,uuid,author,email,url,ip,content,agent,type) values(?,?,?,?,?,?,?,?,?)";
$agent=$this->_request->getHeader('User-Agent');
$ip=$this->_request->getServer('REMOTE_ADDR');
$type='comment';
$stripper = new Zend_Filter_StripTags('strong');//剔除特殊字符HTML
$content=$stripper->filter($formdata['content']);
$author=$stripper->filter($formdata['author']);
$this->db->query($sql,array($formdata['id'],$formdata['uuid'],$author,$formdata['email'],$formdata['url'],$ip,$content,$agent,$type));
$formdata['content']='';
}
}
$commentForm->populate($formdata);
$this->view->commentForm=$commentForm;
//metadata,keyword,series,category,
}
/*
* 数据评论根据UUID读取
*/
function commentAction()
{
$this->_helper->layout->disableLayout();
$this->_helper->viewRenderer->setNoRender();
$uuid=$this->_request->getParam('uuid');
if (empty($uuid)) die();
$sql="select * from comments where uuid=? order by id desc";
$comments=$this->db->fetchAll($sql,array($uuid));
if ($comments)
{
foreach($comments as $c)
{
//$author=$this->view->escape($c['author']);
$author=$c['author'];
$author=($c['userid'])?"<strong>".$author."</strong>":$author;
$author=($c['url'])?'<a href="'.$c['url'].'">'.$author.'</a>':$author;
print "<div class='comment-content'><span>".$author." 发表于".date('Y-m-d H:i:s',strtotime($c['ts_created']))."</span><p>".($c['content'])."</p></div>";
}
}//else echo "<li>No comments.</li>";
}
/*
* 数据下载根据UUID进行判断
*/
function downloadAction()
{
$uuid=$this->_request->getParam('uuid');
if (empty($uuid)) $this->_redirect('/data');
$userid=Zend_Auth::getInstance()->getIdentity()->id;
$this->view->username='westdc'.Zend_Auth::getInstance()->getIdentity()->username;
$sql=$this->db->quoteInto("select o.* from onlineresource o left join metadata m on o.uuid=m.uuid where m.datatype=0 and m.uuid=?",$uuid);
$rows=$this->db->fetchAll($sql);
$updateftp=$updateftp1=false;
$sql=$this->db->quoteInto("select * from metadata where uuid=?",$uuid);
$this->view->md=$this->db->fetchRow($sql);
$bigfile=($this->view->md['filesize']>5);
$this->view->userpass=md5('westdc'.rand(1000,9999));
$this->view->ftptime=date('Y-m-d H:i:s', strtotime('+1 week'));
foreach ($rows as $row) {
$url=$row['linkage'];
$p=parse_url($url);
if ($p['scheme']=='ftp')
//if ($row['protocol']=="WWW:DOWNLOAD-1.0-ftp--download")
{
//判断FTP URL是否附带了用户名和密码
if ($p['host']=='ftp.westgis.ac.cn')
$url='ftp://'.$this->view->config->ftp->user.':'.$this->view->config->ftp->password.'@ftp.westgis.ac.cn'.$p['path'];
if (!$bigfile &&is_file($url) && file_exists($url))
{
$this->_helper->layout->disableLayout();
$this->_helper->viewRenderer->setNoRender();
$this->getResponse()->setHeader('Content-Type', 'application/octet-stream')
->setHeader('Content-Disposition','attachment; filename="'.basename($url).'"')
->setHeader('Content-Length', filesize($url))
->setHeader('Content-Type','application/force-download')
->setHeader('Content-Type','application/download')
->setHeader('Content-Description','File Transfer')
->setHeader('Content-Transfer-Encoding','binary')
->setHeader('Expires',0)
->setHeader('Cache-Control','must-revalidate, post-check=0, pre-check=0')
->setHeader('Pragma','public')
->setBody(file_get_contents($url));
} else {
//是一个FTP返回用户名称和密码说明
if (!$updateftp && $p['host']=='ftp.westgis.ac.cn')
{
//添加FTP帐号信息以及时间控制信息只更新一次
$updateftp=true;
$g6=new G6ftp();
$g6->db=$this->db;
//不进行判断,每个元数据中的下载地址都对应一个虚拟路径
//if (is_file($url)) $path=dirname($p['path']); else $path[]=$p['path'];
$path[]=$p['path'];
$uu=(object)array("id"=>$userid,
"username"=>$this->view->username,
"password"=>$this->view->userpass,
"path"=>$path,
"maxdata"=>$this->view->config->download->max,
"time"=>$this->view->ftptime);
if ($g6->createuser($uu)) {
$this->view->userpass=$g6->pwd;
$this->view->ftptime=$g6->time;
} else {
$this->messenger->addMessage('错误:您正在进行下载的在线数据数已经超过系统允许的最大值,请在下面点击“完成”或“取消”对应的在线数据下载!');
$this->_redirect('/data/order');
}
} elseif (!$updateftp1 && $p['host']=='ftp1.westgis.ac.cn')
{
//添加FTP1帐号信息以及时间控制信息只更新一次
$updateftp1=true;
}
if ($p['host']=='ftp.westgis.ac.cn')
{
//更新URL
$ftpurls[]='ftp://'.$this->view->username.'@ftp.westgis.ac.cn'.$p['path'];
} elseif ($p['host']=='ftp1.westgis.ac.cn')
$ftpurls[]='ftp://ftp1.westgis.ac.cn'.$p['path'];
else
$ftpurls[]=$url;
}
} else {
//若不清楚协议,只是列出来?
$links[]=$row;
}
}
//设置输出
//if ($updateftp || $updateftp1) $this->view->userpass=$password;
@$this->view->ftpurls=$ftpurls;
@$this->view->links=$links;
//更新下载记录
//todo: 尝试添加一个RULE若有对应数据存在则不插入 userid,uuid,status=0,ts_approved:null)
$sql="select * from dataorder where userid=? and uuid=? and status=0 and (ts_approved is null)";
$u=$this->db->fetchRow($sql,array($userid,$uuid));
if (empty($u)) {
$sql="insert into dataorder (userid,uuid,ts_created) values(?,?,now())";
$this->db->query($sql,array($userid,$uuid));
}
}
/*
* 离线申请(可以包括在线数据),在无数据参数时,则显示已有列表
*/
function orderAction()
{
$uuid=$this->_request->getParam('uuid');
$del = $this->_request->getParam('del');
$apply = $this->_request->getParam('apply');
$finish = $this->_request->getParam('finish');
$cancel = $this->_request->getParam('cancel');
$pdf = $this->_request->getParam('pdf');
//if (empty($uuid)) $this->_redirect('/data');
$userid=Zend_Auth::getInstance()->getIdentity()->id;
if ($uuid)
{
//处理数据入库
//离线申请的数据不应该重复因此需要在数据库限制还是在WEB端限制
//在数据库中控制只保证uuid,userid,status唯一就可以?
//存在历史遗留问题,原来的数据并不能保证唯一
//status: 1 开始进入离线申请申请程序中
// 2 填写并提交离线申请表
// 3 邮寄离线申请表
// 4 收到离线申请表
// 5 处理离线申请表
// 10:离线申请完成?
// -1: 取消了在线下载进程
//首先判断离线申请的数据数量是否超过系统限制
$sql="select count(*) as datacount from dataorder where (ts_approved is null) and userid=? and status>0 and status<6";
$r=$this->db->fetchRow($sql,array($userid));
if ($r['datacount']<$this->view->config->download->max) {
$sql="insert into dataorder (uuid,ts_created,userid,status) values(?,now(),?,?)";
$this->db->query($sql,array($uuid,$userid,1));
//成功信息提示
$sql=$this->db->quoteInto("select title,uuid from metadata where uuid=?",$uuid);
$this->view->md=$this->db->fetchRow($sql);
} else {
$this->view->msg="错误:您正在进行的离线申请的数据数已经超过系统允许的最大值,请在完成本次离线申请后再进行操作!";
}
} elseif ($del) {
//删除数据申请
$sql=$this->db->quoteInto("delete from dataorder where id=?",$del);
$this->db->query($sql);
$this->_redirect('/data/order');
} elseif ($apply) {
if ($apply=='all') {
$sql=$this->db->quoteInto("update dataorder set status=2 where status=1 and userid=?",$userid);
$this->db->query($sql);
} else {
$sql="update dataorder set status=2 where status=1 and userid=? and id=?";
$this->db->query($sql,array($userid,(int)$apply));
}
} elseif ($finish) {
if ($finish=='all') {
$sql=$this->db->quoteInto("update dataorder set ts_approved=now() where status=0 and userid=?",$userid);
$this->db->query($sql);
$sql="update ftpuser set datacount=0 where userid=?";
$this->db->query($sql,array($userid));
} else {
$sql="update dataorder set ts_approved=now() where status=0 and userid=? and id=?";
$this->db->query($sql,array($userid,(int)$finish));
$sql="update ftpuser set datacount=datacount-1 where userid=?";
$this->db->query($sql,array($userid));
}
} elseif ($cancel) {
if ($cancel=='all') {
$sql=$this->db->quoteInto("update dataorder set ts_approved=now(),status=-1 where status=0 and userid=?",$userid);
$this->db->query($sql);
$sql="update ftpuser set datacount=0 where userid=?";
$this->db->query($sql,array($userid));
} else {
$sql="update dataorder set ts_approved=now(),status=-1 where status=0 and userid=? and id=?";
$this->db->query($sql,array($userid,(int)$cancel));
$sql="update ftpuser set datacount=datacount-1 where userid=?";
$this->db->query($sql,array($userid));
}
} elseif ($pdf) {
//生成PDF离线申请文件
//用户信息可以从SESSION中读取离线申请信息
//$sql="select * from users where id=?";
$sql="select m.title||'('||m.filesize::text||'MB)' as title from dataorder d left join metadata m on d.uuid=m.uuid where d.status=2 and d.userid=? order by d.ts_created desc";
$rows=$this->db->fetchAll($sql,array($userid));
if ($rows) {
$this->view->data2=$rows;
$this->view->form=new OfflinePdfForm();
$this->_helper->viewRenderer('pdf');
if ($this->_request->isPost()) {
$formData = $this->_request->getPost();
$datalist='';
foreach($rows as $i=>$row) $datalist.=($i+1).". ".$row['title'].";";
$formData['datalist']=$datalist;
if ($this->view->form->isValid($formData)) {
if (@$formData['save']) {
//保存
//根据pdflink字段以判断是否已经提交
//在数据库中创建rules在更新offlineapp表时同时更新users表中对应的信息
$sql="select id from offlineapp where userid=? and (pdflink is null or pdflink='') and (ts_approved is null)";
$row=$this->db->fetchRow($sql,array($userid));
if ($row) {
$sql="update offlineapp set username=?,email=?,phone=?,address=?,postcode=?,project=?,unit=?,datalist=?,ts_created=now() where id=?";
$this->db->query($sql,array($formData['realname'],$formData['email'],$formData['phone'],$formData['address'],$formData['postcode'],$formData['project'],$formData['unit'],$datalist,$row['id']));
} else {
$sql="insert into offlineapp (userid,username,email,phone,address,postcode,project,unit,datalist) values(?,?,?,?,?,?,?)";
$this->db->query($sql,array($userid,$formData['realname'],$formData['email'],$formData['phone'],$formData['address'],$formData['postcode'],$formData['project'],$formData['unit'],$datalist));
}
//生成PDF
$pdf = new ApplicantPDF();
$pdf->template=$this->view->config->offline->template;
$pdf->data = $formData;
$pdf->drawWestdc();
$this->_helper->layout->disableLayout();
$this->_helper->viewRenderer->setNoRender();
header("Content-Disposition: inline; filename=result.pdf");
header("Content-Type:application/pdf");
//header("Content-Length: " . strlen($pdfstring));
echo $pdf->Output('数据申请.pdf','S');
exit;
} elseif ($formData['submit']) {
//提交
//生成PDF
$pdf = new ApplicantPDF();
$pdf->template=$this->view->config->offline->template;
$pdf->data = $formData;
$pdf->drawWestdc();
$fn=$formData['realname'].date('YmdHis').".pdf";
$pdf->Output($this->view->config->offline->savepath."/".$fn, 'F');
//保存到数据库
$sql="select id from offlineapp where userid=? and pdflink is null and (ts_approved is null)";
$row=$this->db->fetchRow($sql,array($userid));
if ($row) {
$sql="update offlineapp set username=?,email=?,phone=?,address=?,postcode=?,project=?,unit=?,datalist=?,ts_created=now(),pdflink=? where id=?";
$this->db->query($sql,array($formData['realname'],$formData['email'],$formData['phone'],$formData['address'],$formData['postcode'],$formData['project'],$formData['unit'],$datalist,$fn,$row['id']));
} else {
$sql="insert into offlineapp (userid,username,email,phone,address,postcode,project,unit,datalist,pdflink) values(?,?,?,?,?,?,?,?)";
$this->db->query($sql,array($userid,$formData['realname'],$formData['email'],$formData['phone'],$formData['address'],$formData['postcode'],$formData['project'],$formData['unit'],$datalist,$fn));
}
$sql="update dataorder set status=3 where status=2 and userid=?";
$this->db->query($sql,array($userid));
//发送用户邮件进行信息提示和说明
//$mail = new Zend_Mail('utf-8');
$mail = new WestdcMailer($this->view->config->smtp);
$body=file_get_contents($this->view->config->offline->email->template);
$body=str_replace("[username]",$formData['realname'],$body);
$body=str_replace("[datalist]",str_replace(";","\n",$datalist),$body);
$mail->setBodyText($body);
$mail->addTo($formData['email']);
$mail->setSubject('您在西部数据中心进行的离线申请');
$mail->addHeader('Reply-To', $this->view->config->service->email);
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
$attach=$mail->createAttachment($pdf->Output('applicant','S'));
$attach->filename='数据申请-'.$formData['realname'].'.pdf';
/*$tr=new Zend_Mail_Transport_Smtp($this->view->config->smtp->host,
array('ssl' => $this->view->config->smtp->ssl,
'auth'=>$this->view->config->smtp->auth,
'username'=>$this->view->config->smtp->username,
'password'=>$this->view->config->smtp->password));
$mail->send($tr);*/
$mail->send();
//跳转到/data/order并提示帮助信息告知用户已经发送EMAIL
$this->messenger->addMessage('提示信息:您的离线申请已经提交,系统已经发送一封邮件给您,请打印出申请表并签字后邮寄给西部数据中心服务组,具体信息请参考邮件说明。');
$this->_redirect('/data/order');
}
}
} else {
$sql="select u.*,o.postcode from users u left join offlineapp o on u.id=o.userid where u.id=?";
$row=$this->db->fetchRow($sql,array($userid));
/*$row=$ut->fetchRow('id='.$userid);
$formData['email']=$row->email;
$formData['phone']=$row->phone;
$formData['realname']=$row->realname;
$formData['unit']=$row->unit;
$formData['address']=$row->address;
$formData['purpose']=$row->project;
$formData['id']=$row->id;*/
$this->view->form->populate($row);
}
} else
$this->view->msg="错误:您还没有提交任何离线申请的数据,或您的数据申请已经正式提交(等待处理过程中)!";
}
//显示已经申请的数据,包括已经提交的申请和未提交的申请,还有已经处理完成的申请,正在进行的在线数据下载
$sql="select d.*,m.title,m.datatype from dataorder d left join metadata m on d.uuid=m.uuid where (d.status>0 or (d.status=0 and (d.ts_approved is null))) and d.userid=? order by d.status,d.ts_created desc";
$rows=$this->db->fetchAll($sql,array($userid));
foreach($rows as $row) {
switch ($row['status']){
case 0:
$dataorder0[]=$row;
break;
case 1:
$dataorder1[]=$row;
break;
case 2:
case 3:
case 4:
case 5:
$dataorder2[]=$row;
break;
default:
$dataorder3[]=$row;
break;
}
}
@$this->view->dataorder0=$dataorder0;
@$this->view->dataorder1=$dataorder1;
@$this->view->dataorder2=$dataorder2;
@$this->view->dataorder3=$dataorder3;
}
/*
* 查看数据缩略图
*/
function thumbAction()
{
$id = (int)$this->_request->getParam('id');
if ($id>0) {
$md=new ThumbnailTable();
$thumb=$md->fetchRow('id='.$id);
$this->_helper->layout->disableLayout();
$this->_helper->viewRenderer->setNoRender();
if (empty($thumb->data)) {
header("Content-Type:image/png");
header("Content-Length: " . filesize("images/nothumb.png"));
$file=fopen("images/nothumb.png",'r');
fpassthru($file);
exit;
} else {
header("Content-Type:image/".$thumb->filetype);
print base64_decode($thumb->data);
}
}
}
public function pingbackAction()
{
$this->_helper->ViewRenderer->setNoRender();
$this->_helper->layout->disableLayout();
$server = new Zend_XmlRpc_Server();
$server->setClass('PingbackRpc', 'pingback');
echo $server->handle();
}
public function pingtestAction()
{
$this->_helper->ViewRenderer->setNoRender();
$this->_helper->layout->disableLayout();
$client = new Zend_XmlRpc_Client('http://test.westgis.ac.cn/data/pingback');
$arg1 = 'http://wlx.westgis.ac.cn/567/';
$arg2 = 'http://test.westgis.ac.cn/data/487591d0-d437-4114-b810-cbef7c4ee4b2';
//$result = $client->call('pingback.ping', array($arg1, $arg2));
$test = $client->getProxy('pingback');
$test->ping($arg1,$arg2);
//var_dump($result);
}
}

View File

@ -0,0 +1,9 @@
<?php
class ErrorController extends Zend_Controller_Action
{
public function errorAction()
{
}
}

View File

@ -0,0 +1,53 @@
<?php
class IndexController extends Zend_Controller_Action
{
function indexAction()
{
//数据通讯
$l=new mydir($this->view->config->paths->newsletter,"newsletter_*.pdf");
$this->view->newsletter=$l->getLast();
$name=basename($this->view->newsletter,'.pdf');
list(,$this->view->newsletterno)=explode("_",$name);
//统计数据
$sql='select (select count(*) from users) as usernum,(select count(*) from metadata) as metanum,(select count(*) from offlineapp) as offlinenum';
$row=$this->db->fetchRow($sql);
$this->view->usernum=$row['usernum'];
$this->view->metanum=$row['metanum'];
$this->view->offlinenum=$row['offlinenum'];
/*$sql='select count(*) from metadata';
$row=$this->db->fetchRow($sql);
$this->view->metanum=$row['count'];*/
$sql="select sum(filesize) as sum,datatype from metadata group by datatype";
$rows=$this->db->fetchAll($sql);
foreach($rows as $row)
{
if ($row['datatype'])
$this->view->offlinesize=$row['sum'];
else
$this->view->onlinesize=$row['sum'];
}
//特色推荐
$sql="select * from datafeature order by id desc";
$this->view->feature=$this->db->fetchRow($sql);
//特色数据集
$sql="select * from datasetcd order by id desc";
$this->view->datasetcd=$this->db->fetchRow($sql);
//下载最多数据(top 5)
$sql="select uuid,title,id from metadata where id in (select m.id from metadata m left join dataorder d on m.uuid=d.uuid group by m.id order by count(d.uuid) desc limit 5)";
$this->db->setFetchMode(Zend_Db::FETCH_OBJ);
$this->view->mdtop=$this->db->fetchAll($sql);
//搜索
$this->view->addHelperPath('helper','Zend_View_Helper_');
$searchform=new SearchForm();
//$searchform->removeElement('submit');
$this->view->searchform=$searchform;
}
function preDispatch()
{
$this->view->config = Zend_Registry::get('config');
$this->db=Zend_Registry::get('db');
}
}

View File

@ -0,0 +1,17 @@
<?php
class KnowledgeController extends Zend_Controller_Action
{
function indexAction()
{
//$this->_redirect('/metadata');
$sql="select * from knl_article order by item_id desc limit 10";
$this->view->articles=$this->db->fetchAll($sql);
}
function preDispatch()
{
$this->db=Zend_Registry::get('db');
$this->view->config = Zend_Registry::get('config');
$this->messenger=$this->_helper->getHelper('FlashMessenger');
$this->view->messages = $this->messenger->getMessages();
}
}

View File

@ -0,0 +1,597 @@
<?php
class MetadataController extends Zend_Controller_Action
{
function __call($id, $arguments)
{
Zend_Debug::dump($arguments,'argu');
Zend_Debug::dump($id,'id');
$this->_helper->viewRenderer->setNoRender();
$this->_helper->layout->disableLayout();
}
function postDispatch()
{
$this->view->config = Zend_Registry::get('config');
}
function indexAction()
{
$md = new MetadataTable();
$db=$md->getAdapter();
//序列
$state=$db->query('select s.id,name,count(*) from series s,dataseries d where d.sid=s.id group by s.id,s.name');
$this->view->serie=$state->fetchAll();
//分类
$state=$db->query('select c.code,name,name_zh,count(*) from category c,categorycode cc where c.code=cc.code group by c.code,cc.name,cc.name_zh');
$this->view->category=$state->fetchAll();
//关键词
$state=$db->query('select keyword,count(*),keytype from keyword group by keyword,keytype order by keytype,count desc');
$this->view->keywords=$state->fetchAll();
//最新10个入库数据
$state=$db->query('select id,title from metadata order by id desc limit 10');
$this->view->metadata = $state->fetchAll();
//特色数据
//其他连接
}
/*
* 数据浏览
*/
function browseAction()
{
$md=new MetadataTable();
$db=$md->getAdapter();
$page=(int)$this->_request->getParam('page');
if (empty($page)) $page=1;
$limit=10;
$offset=$limit*($page-1);
$state=$db->query('select count(*) from metadata');
$row=$state->fetchAll();
$sum=$row[0]['count'];
$select=$db->select();
$select->from('metadata','*')->order('id desc')->limitPage($page,$limit);
$this->view->metadata = $db->fetchAll($select);
$this->view->page=new Pagination($sum,$page,$limit);
}
function tagAction()
{
$id = (int)$this->_request->getParam('id');
$key = $this->_request->getParam('key');
$md=new KeywordTable();
$db=$md->getAdapter();
$state=$db->query('select keyword,count(*),keytype from keyword group by keyword,keytype order by keytype,count desc');
$this->view->keywords=$state->fetchAll();
if ($id>0 or !empty($key)) {
if (empty($key)) {
$where=$db->quoteInto('id = ?',$id);
$row=$md->fetchRow($where);
$key=$row->name;
}
$this->view->codename=$key;
$sql=$db->quoteInto('select m.* from metadata m,keyword k where m.id=k.id and k.keyword=?',$key);
$state=$db->query($sql);
$this->view->metadata=$state->fetchAll();
}
}
/*
* 数据集序列浏览
*/
function seriesAction()
{
$id = (int)$this->_request->getParam('id');
$md=new SeriesTable();
$db=$md->getAdapter();
$state=$db->query('select s.id,name,count(*) from series s,dataseries d where d.sid=s.id group by s.id,s.name');
$this->view->serie=$state->fetchAll();
if ($id>0) {
$where=$db->quoteInto('id = ?',$id);
$row=$md->fetchRow($where);
$this->view->codename=$row->name;
$sql='select m.* from metadata m,dataseries d where m.id=d.id and d.sid=?';
$state=$db->query($sql,array($id));
$this->view->metadata = $state->fetchAll();
} else {
//提供全部数据集序列列表
}
}
/*
* 分类浏览模式
*/
function categoryAction()
{
$code = (int)$this->_request->getParam('code');
$md=new CategoryCodeTable();
$db=$md->getAdapter();
$state=$db->query('select c.code,name,name_zh,count(*) from category c,categorycode cc where c.code=cc.code group by c.code,cc.name,cc.name_zh');
$this->view->category=$state->fetchAll();
if ($code>0 && $code<20) {
$where=$db->quoteInto('code = ?',$code);
$row=$md->fetchRow($where);
$this->view->codename=(empty($row->name_zh)?$row->name:$row->name_zh);
$sql='select m.* from metadata m,category c where m.id=c.id and c.code=?';
$state=$db->query($sql,array($code));
$this->view->metadata = $state->fetchAll();
} else {
//提供全部分类列表
}
}
/*
* 时间浏览方式
* todo:实现xml的缓存
*/
function timelineAction()
{
$dateformat="D M j Y G:i:s O";
$md = new MetadataTable();
$db=$md->getAdapter();
$state=$db->query('select id,title,description,timebegin,timeend from metadata where timebegin is not null');
$rows=$state->fetchAll();
$timexml='<data>';
foreach($rows as $row) {
$timexml.='<event start="'.date($dateformat,strtotime($row['timebegin'])).'" ';
if ($row['timeend']!='') $timexml.=' end="'.date($dateformat,strtotime($row['timeend'])).'" ';
$timexml.= ' title="'.$row['title'].'" image="/images/westdc_40w.gif" link="/metadata/view/id/'.$row['id'].'">'.$row['description'].'</event>';
}
$timexml.='</data>';
$fp=fopen('time.xml','w');
fwrite($fp,$timexml);
fclose($fp);
$this->_helper->layout->disableLayout();
}
/*
* todo:空间浏览
*/
function mapAction()
{
//use json & openlayers?
$id=(int)$this->_request->getParam('id');
if ($id>0) $this->view->params="/id/$id";
}
/*
* 产生geojson数据
*/
function jsonAction()
{
$md=new MetadataTable();
$db=$md->getAdapter();
$id = (int)$this->_request->getParam('id');
$where='';
if (!empty($id)) { $where=' where id='.$id; }
$sql='select id,west,south,north,east,title from metadata'.$where;
$state=$db->query($sql);
$rows=$state->fetchAll();
$geomd=new GeoMetaData();
foreach($rows as $row){
if ($id)
$box=new GeoBox($row['west'],$row['south'],$row['east'],$row['north']);
else
$box=new GeoBoxLine($row['west'],$row['south'],$row['east'],$row['north']);
$feature=new Geofeature();
$feature->id=$row['id'];
$feature->addProperties('title',$row['title']);
$feature->geometry=$box;
$geomd->addFeature($feature);
}
$this->_helper->json($geomd);
}
/*
* 返回XML源文件
*/
function xmlAction()
{
$id=(int)$this->_request->getParam('id');
$xml=new XmlTable();
$db=$xml->getAdapter();
$where=$db->quoteInto('id=?',$id);
$order='id desc';
$row=$xml->fetchRow($where,$order);
$this->_helper->layout->disableLayout();
$this->_helper->viewRenderer->setNoRender();
$this->getResponse()->setHeader('Content-Type', 'text/xml')
->setBody($row->data);
}
function detailAction()
{
$id=(int)$this->_request->getParam('id');
$xml=new XmlTable();
$db=$xml->getAdapter();
$where=$db->quoteInto('id=?',$id);
$order='id desc';
$row=$xml->fetchRow($where,$order);
$this->_helper->layout->disableLayout();
$this->_helper->viewRenderer->setNoRender();
//Zend_Debug::dump($row->data,'xml');
$this->getResponse()->setHeader('Content-Type', 'text/xml')
->setBody($row->data);
}
/*
* todo: search
*/
function searchAction()
{
$md=new MetadataTable();
$db=$md->getAdapter();
$page=(int)$this->_request->getParam('page');
if (empty($page)) $page=1;
$limit=10;
$offset=$limit*($page-1);
$key=$this->_request->getParam('key');
$searchtype=$this->_request->getParam('type');
if (!empty($key)) {
$sql=$db->quoteInto('select count(*) from metadata where title ilike ? or description ilike ?','%'.$key.'%','%'.$key.'%');
$state=$db->query($sql);
$row=$state->fetchAll();
$sum=$row[0]['count'];
$select=$db->select();
$select->from('metadata','*')->where('title ilike ? or description ilike ?','%'.$key.'%','%'.$key.'%')->order('id desc')->limit($limit,$offset);
$this->view->metadata = $db->fetchAll($select);
$this->view->page=new Pagination($sum,$page);
$this->view->key=$key;
} else if (!empty($searchtype)) {
//form
//实现高级搜索的viewRender?
}
}
/*
* todo: 高级搜索
*/
function advancesearchAction()
{
$md=new MetadataTable();
$db=$md->getAdapter();
$page=(int)$this->_request->getParam('page');
if (empty($page)) $page=1;
$limit=10;
$offset=$limit*($page-1);
$key=$this->_request->getParam('key');
$searchtype=$this->_request->getParam('type');
if (!empty($key)) {
$sql=$db->quoteInto('select count(*) from metadata where title ilike ? or description ilike ?','%'.$key.'%','%'.$key.'%');
$state=$db->query($sql);
$row=$state->fetchAll();
$sum=$row[0]['count'];
$select=$db->select();
$select->from('metadata','*')->where('title ilike ? or description ilike ?','%'.$key.'%','%'.$key.'%')->order('id desc')->limit($limit,$offset);
$this->view->metadata = $db->fetchAll($select);
$this->view->page=new Pagination($sum,$page);
$this->view->key=$key;
}
}
/*
* 根据id或uuid来查看元数据
*/
function viewAction()
{
$md=new MetadataTable();
$db=$md->getAdapter();
$id = (int)$this->_request->getParam('id');
if (empty($id)) {
$uuid = (int)$this->_request->getParam('uuid');
if (empty($uuid)) $this->_redirect('/metadata');
$where=$db->quoteInto('uuid = ?',$uuid);
$row=$md->fetchRow($where);
} else {
$where=$db->quoteInto('id = ?',$id);
$row=$md->fetchRow($where);
}
if (!$row) $this->_redirect('/metadata');
$id=$row->id;
$this->view->metadata=$row;
$where=$db->quoteInto('id= ?',$id);
$order='keytype';
$keyt=new KeywordTable();
$this->view->keys=$keyt->fetchAll($where,$order);
$sql='select c.code,cc.name,cc.name_zh from category c,categorycode cc where c.code=cc.code and c.id= ?';
$state=$db->query($sql,array($id));
$this->view->category=$state->fetchAll();
$sql='select s.name from dataseries d, series s where d.sid=s.id and d.id= ?';
$state=$db->query($sql,array($id));
$this->view->series=$state->fetchAll();
//metadata,keyword,series,category,
}
/*
* 删除元数据,删除前有确认
*/
function deleteAction()
{
if ($this->_request->isPost()) {
$id = (int)$this->_request->getPost('id');
$del = $this->_request->getPost('del');
if ($del == 'Yes' && $id > 0) {
$md = new MetadataTable();
$where = 'id = ' . $id;
$md->delete($where);
}
$this->_redirect('/metadata');
} else {
$id = (int)$this->_request->getParam('id');
if ($id > 0) {
$mdt = new MetadataTable();
$this->view->md = $mdt->fetchRow('id='.$id);
}
}
}
/*
* 查看数据缩略图
*/
function thumbAction()
{
$id = (int)$this->_request->getParam('id');
if ($id>0) {
$md=new ThumbnailTable();
$this->view->thumb=$md->fetchRow('id='.$id);
$this->_helper->layout->disableLayout();
}
}
/*
* 导入本地元数据
*/
function importAction()
{
$md=new MetadataTable();
$thumb=new ThumbnailTable();
$xmlt=new XmlTable();
$cgt=new CategoryTable();
$cgct=new CategoryCodeTable();
$keyt=new KeywordTable();
$dst=new DatasetSeriesTable();
$seriestable=new SeriesTable();
if ($this->_request->isPost()) {
foreach ($_FILES["xmlfile"]["error"] as $key => $error) {
if ($error == UPLOAD_ERR_OK) {
$tmp_name = $_FILES["xmlfile"]["tmp_name"][$key];
$name = $_FILES["xmlfile"]["name"][$key];
$fp = fopen($tmp_name, "rb");
$xml=fread($fp, filesize($tmp_name));
fclose($fp);
$this->import($xml);
/*
$iso=new ISO19115();
$iso->load($tmp_name);
$row=$md->createRow();
$trow=$thumb->createRow();
$row->uuid=$iso->uuid;
$row->title=$iso->resTitle;
$row->description=$iso->idAbs;
$row->timebegin=$iso->timebegin;
$row->timeend=$iso->timeend;
$row->west=$iso->geoBox['w'];
$row->south=$iso->geoBox['s'];
$row->north=$iso->geoBox['n'];
$row->east=$iso->geoBox['e'];
try {
$id=$row->save();
//处理缩略图
if (!empty($iso->thumbnail)) {
$trow->id=$id;
$trow->data=$iso->thumbnail;
$trow->save();
}
//todo:处理关键词
//1:N relation
foreach($iso->keyword as $keytype=>$keys)
{
foreach($keys as $key)
{
$row=$keyt->createRow();
$row->id=$id;
$row->keyword=$key;
$row->keytype=$keytype;
$row->save();
}
}
//todo:处理数据集序列
//M:N relation
$db=$seriestable->getAdapter();
foreach($iso->datasetSeries as $ds)
{
$where=$db->quoteInto('name = ?',$ds['seriesName']);
$trow=$seriestable->fetchRow($where);
if ($trow)
$sid=$trow->id;
else {
$trow=$seriestable->createRow();
$trow->name=$ds['seriesName'];
$sid=$trow->save();
}
$row=$dst->createRow();
$row->id=$id;
$row->sid=$sid;
$row->save();
}
//处理XML入库
$row=$xmlt->createRow();
$row->id=$id;
$row->data=$xml;
$row->save();
//处理数据分类
foreach($iso->tpCat as $cat){
if (is_numeric($cat)) {
$row=$cgt->createRow();
$row->id=$id;
$row->code=(int)$cat;
$row->save();
} else {
//是字符串geonetwork会采用这种模式
//从categorycode表中查找其对应的code
$where=$db->quoteInto('name= ?',trim($cat));
$trow=$cgct->fetchRow($where);
if ($trow) {
$row=$cgt->createRow();
$row->id=$id;
$row->code=$trow->code;
$row->save();
}
//$db=$cgt->getAdapter();
//$sql="insert into category (id,code) values($id,(select code from categorycode where name='$cat'))";
//$db->query($sql);
}
}
} catch (Exception $e) {
//数据重复插入,此处忽略所有错误
}
$fp=fopen('../data/import/$iso->uuid','w');
fwrite($fp,$iso->saveXML());
fclose($fp);
*/
//采用UUID为文件名
//move_uploaded_file($tmp_name, "../data/import/$name");
}//end if
}//foreach
$this->_redirect('/metadata');
} else {
//do nothing now.
}
}
/*
* 批量处理元数据(元数据保存在服务器的一个目录上)
*/
function batchimportAction()
{
if ($this->_request->isPost()) {
$dir = $this->_request->getPost('directory');
$subdir = $this->_request->getPost('subdir');
$xmlfiles=$this->ls($dir,"*.xml");
foreach($xmlfiles as $xmlfile)
{
$fp=fopen($dir.'/'.$xmlfile,'rb');
$xml=fread($fp,filesize($dir.'/'.$xmlfile));
fclose($fp);
$this->import($xml);
}
$this->_redirect('/metadata');
}
}
/*
* 保存XML数据到数据库
*/
private function import($xml)
{
$iso=new ISO19115();
$iso->loadXML($xml);
$md=new MetadataTable();
$thumb=new ThumbnailTable();
$xmlt=new XmlTable();
$cgt=new CategoryTable();
$cgct=new CategoryCodeTable();
$keyt=new KeywordTable();
$dst=new DatasetSeriesTable();
$seriestable=new SeriesTable();
//save metadata
$row=$md->createRow();
$trow=$thumb->createRow();
$row->uuid=$iso->uuid;
$row->title=$iso->resTitle;
$row->description=$iso->idAbs;
$row->timebegin=$iso->timebegin;
$row->timeend=$iso->timeend;
$row->west=$iso->geoBox['w'];
$row->south=$iso->geoBox['s'];
$row->north=$iso->geoBox['n'];
$row->east=$iso->geoBox['e'];
try {
$id=$row->save();
//处理缩略图
if (!empty($iso->thumbnail)) {
$trow->id=$id;
$trow->data=$iso->thumbnail;
$trow->save();
}
//todo:处理关键词
//1:N relation
foreach($iso->keyword as $keytype=>$keys)
{
foreach($keys as $key)
{
$row=$keyt->createRow();
$row->id=$id;
//统一转换为大写
$row->keyword=strtoupper($key);
$row->keytype=$keytype;
$row->save();
}
}
//todo:处理数据集序列
//M:N relation
$db=$seriestable->getAdapter();
foreach($iso->datasetSeries as $ds)
{
$where=$db->quoteInto('name = ?',$ds['seriesName']);
$trow=$seriestable->fetchRow($where);
if ($trow)
$sid=$trow->id;
else {
$trow=$seriestable->createRow();
$trow->name=$ds['seriesName'];
$sid=$trow->save();
}
$row=$dst->createRow();
$row->id=$id;
$row->sid=$sid;
$row->save();
}
//处理XML入库
$row=$xmlt->createRow();
$row->id=$id;
$row->data=$xml;
$row->save();
//处理数据分类
foreach($iso->tpCat as $cat){
if (is_numeric($cat)) {
$row=$cgt->createRow();
$row->id=$id;
$row->code=(int)$cat;
$row->save();
} else {
//是字符串geonetwork会采用这种模式
//从categorycode表中查找其对应的code
$where=$db->quoteInto('name= ?',trim($cat));
$trow=$cgct->fetchRow($where);
if ($trow) {
$row=$cgt->createRow();
$row->id=$id;
$row->code=$trow->code;
$row->save();
}
//$db=$cgt->getAdapter();
//$sql="insert into category (id,code) values($id,(select code from categorycode where name='$cat'))";
//$db->query($sql);
}
}
$fp=fopen("../data/import/$iso->uuid",'w');
fwrite($fp,$iso->saveXML());
fclose($fp);
} catch (Exception $e) {
//数据重复插入,此处忽略所有错误
}
}
/*
* ls(dir,pattern) return file list in "dir" folder matching "pattern"
* ls("path","module.php?") search into "path" folder for module.php3, module.php4, ...
* ls("images/","*.jpg") search into "images" folder for JPG images */
function ls($__dir="./",$__pattern="*.*")
{
settype($__dir,"string");
settype($__pattern,"string");
$__ls=array();
$__regexp=preg_quote($__pattern,"/");
$__regexp=preg_replace("/[\\x5C][\x2A]/",".*",$__regexp);
$__regexp=preg_replace("/[\\x5C][\x3F]/",".", $__regexp);
if(is_dir($__dir))
if(($__dir_h=@opendir($__dir))!==FALSE)
{
while(($__file=readdir($__dir_h))!==FALSE)
if(preg_match("/^".$__regexp."$/",$__file))
array_push($__ls,$__file);
closedir($__dir_h);
sort($__ls,SORT_STRING);
}
return $__ls;
}
}

View File

@ -0,0 +1,27 @@
<?php
class NetkitesController extends Zend_Controller_Action
{
function indexAction()
{
}
function postDispatch()
{
$this->view->config = Zend_Registry::get('config');
}
function faqAction()
{
}
function useAction()
{
}
function resourceAction()
{
}
function applyAction()
{
}
function driverAction()
{
}
}

View File

@ -0,0 +1,10 @@
<?php
class Zend_View_Helper_BaseUrl
{
function baseUrl()
{
$fc = Zend_Controller_Front::getInstance();
return $fc->getBaseUrl();
}
}

View File

@ -0,0 +1,29 @@
<?php
class Zend_View_Helper_breadcrumb extends Zend_View_Helper_Placeholder_Container_Standalone
{
public function breadcrumb ($title = null, $setType = Zend_View_Helper_Placeholder_Container_Abstract::APPEND)
{
if ($title) {
if ($setType == Zend_View_Helper_Placeholder_Container_Abstract::SET) {
$this->set($title);
} elseif ($setType == Zend_View_Helper_Placeholder_Container_Abstract::PREPEND) {
$this->prepend($title);
} else {
$this->append($title);
}
}
return $this;
}
public function toString ($indent = null)
{
$indent = (null !== $indent) ? $this->_getWhitespace($indent) : $this->getIndent();
$items = array();
foreach ($this as $item) {
$items[] = $item;
}
$separator = $this->_escape($this->getSeparator());
if (empty($separator)) $separator='->';
return $indent . implode($separator, $items);
}
}

View File

@ -0,0 +1,24 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('项目背景');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/terms.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/about">关于本站</a>');
$this->breadcrumb('项目背景');
$this->breadcrumb()->setSeparator(' > ');
?>
<div class="LeftMargin">
<p>“西部计划”实施三年来,已经逐步形成了围绕西部环境和生态领域重大科学问题开展交叉协同研究的平台,充分体现出重大研究计划这一新的科研组织形式的优势。当前,对“西部计划”研究成果进行综合集成的条件已经成熟并提上了日程,而公共性的研究平台和数据平台无疑是集成所必不可少的重要支撑体系,必须加强研究资料和数据等资源共享,因此,建立“中国西部环境与生态科学数据中心”意义重大。</p>
<p><strong>西部数据中心致力于构建西部环境和生态重大领域的数据共享平台,为环境和生态科学领域重大研究计划提供数据积累,并促进项目间的合作与交叉。</strong></p>
<p>西部数据中心网站提供了4个平台如图1分别为</p>
<div><img src="/images/components.gif" alt="西部数据中心系统组成"/><br />
<p>1<b>数据共享平台</b>。其功能为:数据发布共享、数据生产、数据汇交、数据浏览和查询、数据获取,以及简单的数据分析;</p>
<p>2<b>合作和交流平台</b>。其功能为:论坛、邮件列表、网络会议;</p>
<p>3<b>知识积累平台</b>。其功能为:电子图书馆、成果文档;</p>
<p>4<b>数据科学平台</b>。其功能为:模型数据集、同化数据集、数据工具等。</p>
<p>西部数据中心所包含的数据所采用的标准和规范有:元数据标准;质量控制标准;数据处理标准流程;共享规范;数据写作规范;安全规范。</p>
<p>西部数据中心大部分数据对所有网友开放,但部分数据由于数据保密制度的限制,需要资格审查和离线申请。但我们保证,在不违背数据保密政策和数据所有者的特殊要求前提下,我们尽可能多的在线发布数据,并力图简化下载流程。 </p>
<p>西部数据中心与<a href="http://www.llas.ac.cn" target="_blank" >中科院资环信息中心</a>合作,建立了<a href="/knowledge/netkites/">移动文献服务(网筝)</a>由于资源的限制网筝原则上对西部计划项目的64个单位开放有限度的开放给西部计划项目外人员在申请之前请先确认您的申请资格然后认真阅读并填写使用协议。</p>
<p>&nbsp;</p>
</div>

View File

@ -0,0 +1,39 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('联系我们');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/contact.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/about">关于本站</a>');
$this->breadcrumb('联系我们');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="contactUs"> 联系我们</div>
<div id="offline">
<p class="title">离线方式</p>
<p>
中国西部环境与生态科学数据中心<br />
兰州市东岗西路320号<br />
730000<br />
E-mail: westdc@lzb.ac.cn<br />
电话: +86-931-4967287 Ms. 李红星<br />
<br />
项目负责人:丁永建(dyj@lzb.ac.cn)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;李新(lixin@lzb.ac.cn)<br />
数据服务负责人:王建(wjian@lzb.ac.cn)<br />
技术组长:南卓铜(nztong@lzb.ac.cn)</p>
</div>
<div id="online">
<p class="title">在线联系</p>
<p class="note">请填写以下表单系统会自动发送到westdc邮箱里</p>
<?php echo $this->form; ?>
<?php if (!empty($this->messages)) : ?>
<div id="message">
<?php
foreach ($this->messages as $info)echo $info;
?>
</div>
<?php endif; ?>
</div>

View File

@ -0,0 +1,29 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('关于本站');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/about.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/about">关于本站</a>');
$this->breadcrumb()->setSeparator(' > ');
?>
<div class="LeftMargin">
<div class="logo">
<img src="/images/westdc_logo_white.gif" /><br />
<a href="/images/westdc_logo_white.gif">下载LOGO</a></div>
<div class="preface">
中国西部环境与生态科学数据中心(“西部数据中心”)受<a href="http://www.nsfc.gov.cn" target="_blank">中国自然科学基金委</a>资助以中国西部环境与生态科学研究计划“西部计划”重点项目的形式立项编号90502010旨在收集和整理“西部计划”各项目执行期间产出数据集为中国西部环境与生态科学研究乃至更广泛意义上的地表表层科学研究服务。</div>
<h2>
<a href="/about/background">项目背景</a></h2>
<p>
介绍“西部数据中心”项目立项的一些背景,可以理解西部数据中心要做些什么内容,以及采用什么样的实现手段。</p>
<h2>
项目参与单位</h2>
<p>
“西部数据中心”以<a href="http://www.casnw.net" target="_blank">中国科学院寒区旱区环境与工程研究所</a>为承担单位,由<a
href="http://www.westgis.ac.cn" target="_blank">遥感与地理信息科学研究室</a>组织实施。参与单位包括<a href="http://www.igsnrr.ac.cn"
target="_blank">中国科学院地理科学与资源研究所</a>。其中“知识积累平台”依托<a href="http://www.llas.ac.cn" target="_blank">中国科学院资源环境科学信息中心</a>实现项目中的文献收集和管理。</p>
<h2>
<a href="/about/contact">联系我们</a></h2>
进入<a href="https://svn.westgis.ac.cn/projects/westdc/">TRAC系统</a>(开发平台,需授权用户才能进入)
</div>

View File

@ -0,0 +1,66 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('使用条款和免责申明');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/terms.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/about">关于本站</a>');
$this->breadcrumb('使用条款和免责申明');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="print"><a href="javascript:window.print();">打印本页</a></div>&nbsp;
<div class="LeftMargin">
<p>
中国国家自然科学基金委以下简称“基金委”“中国西部环境与生态科学数据中心”以下简称“西部数据中心”采用“完全与开放”Full & Open的数据共享政策即所有的科学家或研究项目都有权无差别地获得数据中心的数据以及包括数据处理过程等的技术文档以不高于复制和邮寄成本或免费的形式向基金委“中国西部环境与生态科学研究计划”以下简称“西部计划”内项目和人员以及对中国西部环境生态科学研究感兴趣的研究团队或个人提供数据。
</p>
<h2>
使用条款</h2>
<p>
本着尊重知识产权和维护网络安全的原则,我们向数据用户提出以下使用条款:</p>
<p>
第一条 “西部数据中心”网站上的一切数据和资料版权归数据和资料原生产单位所有。</p>
<p>
第二条 为保障数据开发者的著作权,用户在使用全部或部分 “西部数据中心”所提供的数据的基础上产出的研究成果中(包括公开发表的论文、论著、数据产品和未公开发表的研究报告、数据产品、系统开发等),须在相关成果的显著位置上明确注明数据来源。除对数据来源署名有特殊要求以外,用户须依据以下规范注明数据来源:</p>
<blockquote>
<strong>中文成果</strong>“数据来源于国家自然科学基金委员“中国西部环境与生态科学数据中心”http://westdc.westgis.ac.cn</blockquote>
<blockquote>
<strong>英文成果</strong>“This data set is provided by Environmental & Ecological Science Data Center
for West China, National Natural Science Foundation of China”http://westdc.westgis.ac.cn</blockquote>
<p>
第三条 数据仅供用户用于科研目的,不得用于商业目的。不得将数据转让给第三方,由此引起的一切后果由数据用户承担。</p>
<p>
第四条 从数据中心获取的数据如属数据保密范围,用户须与“西部数据中心”签署保密协议,并有义务遵守国家相关法律法规,如出现问题,责任由用户完全承担。</p>
<p>
第五条 用户在申请数据时,应填写真实资料,如用户资料发生变更,应及时更改相关资料。若您提供的资料不齐全或不正确,“西部数据中心”有权拒绝提供服务。
</p>
<p>
第六条 “西部数据中心”用户须遵守中华人民共和国计算机安全、互联网通讯的有关法律法规,用户不得利用西部数据中心网站传输、出版、上载、登载或流通任何非法、有害、恐吓、骚扰、侵权、毁谤、淫秽、中伤、违反他人隐私或宣传权、违反他人知识产权、或者任何其他具攻击性或令人不悦的资料;用户不得以任何方式篡改任何材料或数据,也不得以任何方式干扰本站的运行;用户也不得利用网站收集本站用户的资料。
</p>
<p>
第七条 移动IP文献查询服务客户端网筝持有者应严格遵守<a runat="server" href="/netkites/nk-contract.v1.2.pdf" target="_blank" id="a1">网筝NK-800使用协议</a>
</p>
<p>
第八条 “西部数据中心” 提供的网络版期刊全文链接的使用范围仅限于浏览和用于个人学习、研究目的的少量下载与暂时保存。下载(包括印出)的任何材料都含有版权提示信息,为防止该文的全部或部分被用于其它目的,这样的提示信息不得被删改。删改版权提示信息的用户将根据著作权法承担版权侵权责任。
</p>
<p>
第九条 尊重并维护原作者和出版者的知识产权, 并要求获取并使用这些资源的用户认真遵守中国版权法的有关规定未经版权所有者或者“西部数据中心”许可严禁任何个人或单位批量下载文献包括文档或将它们用于任何商业或其他营利性用途严禁任何个人或单位私设代理进行非法使用。上述情况一经发现“西部数据中心”将有权停止违规IP的使用必要时将通报给有关部门做出处理。
</p>
<h2>
免责申明</h2>
<p>
第一条 “西部数据中心”对于服务变更,中断而发生的问题不负任何责任。</p>
<p>
第二条 当政府机关依照法定程序要求数据中心披露个人资料时,本中心将根据执法单位之要求或为公共安全之目的提供个人资料。在此情况下之任何披露,本中心均得免责。
</p>
<p>
第三条 “西部数据中心”可能包含第三方网站链接,但对任何链接网站之内容概不承担责任。西部数据中心仅为便利而提供这些链接,并不保证其任何链接网站之公司或内容的准确性;如若您对第三方网站感兴趣,请阅读第三方网站的使用条款或类似申明。
</p>
<p>
第四条 “西部数据中心”严格筛选系统中提供服务的文献种类和和各种数据资料,但只根据用户的要求提供所需文献和数据资料,不对文献和数据资料的具体内容负责。“西部数据中心”对因使用(或不能使用)本中心资料而导致之任何直接、间接、特殊、偶然或结果性损失概不承担责任。
</p>
<p>
第五条 在使用数据过程中产出的问题或存在疑问,鼓励用户直接与数据生产者进行交流。
</p>
<p>
第六条 “西部数据中心”鼓励用户对本中心的数据进行验证,以完善您的科学研究。</p>
</div>

View File

@ -0,0 +1,13 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('修改用户信息');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/register.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/account/edit">修改用户信息</a>');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="info">
<?php echo $this->form;?></div>

View File

@ -0,0 +1,23 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('用户登录');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/register.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/account/login">用户登录</a>');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="info">
<img src="/images/Login_title.gif" alt="西部数据中心用户登录" />
<?php echo $this->form;?>
</div>
<div id="tool">
<a href="/account/fetchpwd">忘记密码?</a><a href="/account/register">注册新用户</a>
</div>
<?php if (!empty($this->messages)) : ?>
<div id="message">
<?php
foreach ($this->messages as $info)echo $info;
?>
</div>
<?php endif; ?>

View File

@ -0,0 +1,18 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('用户注册');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/register.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/account/register">用户注册</a>');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="info">
<img src="/images/pass_login1.gif" />&nbsp;确认服务条款&nbsp;&nbsp;
<img src="/images/pass_pic_arrowhead_2.gif" />&nbsp;&nbsp;
<img src="/images/pass_login2.gif" />&nbsp;填写基本信息&nbsp;&nbsp;
<img src="/images/pass_pic_arrowhead_2.gif" />&nbsp;&nbsp;
<img src="/images/pass_login3.gif" />&nbsp;注册完成
<?php echo $this->form;?></div>

View File

@ -0,0 +1,46 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('合作与交流');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/community.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('合作与交流');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="leftPanel">
<div id="forumintro">
<h2 class="title">论坛</h2>
<p>论坛是Internet是最知名的服务之一它开辟了一块“公共”空间供所有用户读取和讨论其中信息提供一些多人实时交谈、公布最新消息。您可根据自己的需要选择不同的版面参与讨论发表意见征询建议结识朋友。 </p>
<p>论坛开通了匿名讨论的功能,同时欢迎您<a href="http://forum.westgis.ac.cn/ucp.php?mode=login">注册</a>成为我们的论坛用户。</p>
</div>
<div id="mlintro"><h2 class="title">邮件列表</h2>
<p>邮件列表广泛用于各种群体间的信息交流和信息发布具有传播范围广的特点还具有使用简单方便的特点只要能够使用Email就可以使用邮件列表。</p>
<p>还不清楚如何使用邮件对参与的邮件列表进行各种讨论?请参阅论坛中对此的讨论:<a href="http://forum.westgis.ac.cn/viewforum.php?f=30">邮件列表使用方法</a></p>
<p>注意,邮件列表发送的邮件,有可能被您的邮箱当成垃圾邮件隔离,所以请设置您的反垃圾邮箱配置,并检查您的垃圾箱。</p>
<p>邮件列表的订阅都是需要用户进行确认的,因此您需要检查您的邮件,并根据邮件列表发送过来的邮件里面的说明进行确认。</p>
</div>
</div>
<div id="rightPanel">
<div id="forumcontent">
<img src="/images/forum.png" />
<h3><a href="http://forum.westgis.ac.cn/viewforum.php?f=27">数据应用与探讨</a></h3>
<script src="http://forum.westgis.ac.cn/latestpost2.php?f=17&l=3&s=50" type="text/javascript"></script>
<h3><a href="http://forum.westgis.ac.cn/viewforum.php?f=30">数据服务</a></h3>
<script src="http://forum.westgis.ac.cn/latestpost2.php?f=30&l=3&s=30" type="text/javascript"></script>
</div>
<div id="mlcontent">
<img src="images/maillist.png" />
<h3>WEB地址<a href="http://lists.westgis.ac.cn/mailman/listinfo/western-datacenter">西部计划项目邮件列表</a></h3>
邮件订阅方式western-datacenter@lists.westgis.ac.cn
<h3>WEB地址<a href="http://lists.westgis.ac.cn/mailman/listinfo/westdc-users">西部数据中心用户讨论邮件列表</a></h3>
<p>邮件订阅方式westdc-user@lists.westgis.ac.cn</p>
<h3>WEB地址<a href="http://lists.westgis.ac.cn/mailman/listinfo/westdc-report">西部数据中心数据通讯邮件列表</a></h3>
<p>邮件订阅方式westdc-report@lists.westgis.ac.cn</p>
<p>注意:此邮件列表是单向的,仅用于发布数据简报。</p>
</div>
</div>

View File

@ -0,0 +1,26 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle('全部浏览');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/metadata.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/data">'.$this->config->title->data.'</a>');
$this->breadcrumb('下载');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id='tools'>
<?= $this->partial('data/tools.phtml'); ?>
</div>
<?php echo $this->page->getNavigation(); ?>
<?php foreach($this->metadata as $md) : ?>
<hr />
<div class="mditem">
<div class="thumb"><img src="/data/thumb/id/<?php echo $md['id'];?>" /></div>
<h2><a href="/data/<?php echo $md['uuid'];?>"><?php echo $this->escape($md['title']);?></a>
<a href="/data/xml/id/<?php echo $md['id'];?>"><img src="/images/xml.gif" /></a>
<a href="/data/map/id/<?php echo $md['id']; ?>"><img src="/images/map.gif" /></a>
</h2>
<div class="summary"><?php echo str_replace(array("\r\n", "\n", "\r"),'<br />',mb_strlen($md['description'])>400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']));?></div>
</div>
<?php endforeach; ?>

View File

@ -0,0 +1,39 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle('分类浏览');
if (!empty($this->codename)) $this->headTitle($this->codename);
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/metadata.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/data">'.$this->config->title->data.'</a>');
$this->breadcrumb('<a href="/data/category">分类浏览</a>');
if (!empty($this->codename)) $this->breadcrumb($this->codename);
$this->breadcrumb()->setSeparator(' > ');
?>
<div id='tools'>
<?= $this->partial('data/tools.phtml'); ?>
</div>
<div id='leftnav'>
<fieldset><legend>数据集类别</legend>
<ul>
<?php foreach($this->category as $cg) : ?>
<li><a href='/data/category/code/<?php echo $cg['code']; ?>'><?php (empty($cg['name_zh']))?print($cg['name']):print($cg['name_zh']); ?></a><span class="note">(<?php echo $cg['count']; ?>)</span></li>
<?php endforeach; ?>
</ul></fieldset>
</div>
<div id='metacontent'>
<?php if (!empty($this->metadata)) : ?>
<h1>当前浏览分类:<?php echo $this->codename; ?></h1>
<?php foreach($this->metadata as $md) : ?>
<hr />
<div class="mditem">
<div class="thumb"><img src="/data/thumb/id/<?php echo $md['id'];?>" /></div>
<h2><a href="/data/view/id/<?php echo $md['id']; ?>"><?php echo $this->escape($md['title']);?></a>
</h2>
<span><?php echo mb_strlen($md['description'])>400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']);?></span>
</div>
<?php endforeach;
endif; ?>
</div>

View File

@ -0,0 +1,30 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle('特色数据集');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/datasetcd.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/data">'.$this->config->title->data.'</a>');
$this->breadcrumb('特色数据集');
$this->breadcrumb()->setSeparator(' > ');
$auth = Zend_Auth::getInstance();
?>
<?php
foreach ($this->rows as $row) {
?>
<div class="itemCd">
<div class="image"><img src="<?php echo $row->img; ?>" /></div>
<div class="title"><?php echo $row->title;?></div>
<div class="filesize">(<?php echo $row->size;?>MB)</div>
<div class="descript"><span class="intro">简介:</span><?php echo $row->descript; ?></div>
<div class="link">
<?php if ($auth->hasIdentity()) : ?>
<a href="<?php echo $row->url;?>">下载ISO文件</a>
<?php else: ?>
<a href="/account/login">请先登录后再下载ISO文件</a>
<?php endif; ?>
&nbsp;|&nbsp;<a href="<?php echo $row->document;?>">详细数据文档</a></div>
</div>
<?php } ?>

View File

@ -0,0 +1,15 @@
<?php if ($this->md) :?>
<p>Are you sure that you want to delete this metadata:
<h2><?php echo $this->escape($this->md->title); ?></h2>
<?php echo $this->escape($this->md->description); ?>
</p>
<form action="<?php echo $this->url(array('action'=>'delete')); ?>" method="post">
<div>
<input type="hidden" name="id" value="<?php echo $this->md->id; ?>" />
<input type="submit" name="del" value="Yes" />
<input type="submit" name="del" value="No" />
</div>
</form>
<?php else: ?>
<p>Cannot find the metadata.</p>
<?php endif;?>

View File

@ -0,0 +1,14 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle('浏览详细元数据');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/metadata.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/data">'.$this->config->title->data.'</a>');
$this->breadcrumb('浏览详细元数据');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="detailxml">
<?php echo $this->xml; ?>
</div>

View File

@ -0,0 +1,43 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle('下载');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/download.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/data">'.$this->config->title->data.'</a>');
$this->breadcrumb('下载');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="download">
<h1><?php echo $this->md['title']; ?>(<?php echo $this->md['filesize']; ?>MB)</h1>
<div id="thumb"><img src="/data/thumb/id/<?php echo $this->md['id'];?>" /></div>
<div id="ftpurl">
<fieldset><legend>FTP下载地址</legend>
<ul>
<?php foreach($this->ftpurls as $ftp) : ?>
<li><a href="<?php echo $ftp; ?>"><?php echo $ftp; ?></a></li>
<?php endforeach; ?>
</ul>
</fieldset>
</div>
<div id="ftpinfo">
<fieldset><legend>FTP使用说明</legend>
帐号信息如下:<ul><li>FTP的用户名<?php echo $this->username; ?></li>
<li>FTP的密码<?php echo $this->userpass; ?></li>
<li>密码有效期限:<?php echo $this->ftptime; ?></li>
</ul>
FTP是一种常用的文件传输协议您可以使用您自己喜欢的FTP客户端来进行数据下载也可以使用开源的FILEZILLA软件来进行数据下载。
</fieldset>
</div>
<div id="link">
<?php if ($this->links) : ?>
<fieldset><legend>其他在线资源</legend>
<ul><?php foreach($this->links as $link) : ?>
<li><a href="<?php echo $link['linkage']; ?>"><?php echo empty($link['name'])?$link['linkage']:$link['name']; ?></a></li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
</fieldset>
</div>
</div>

View File

@ -0,0 +1,20 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle('特色推荐');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/feature.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/data">'.$this->config->title->data.'</a>');
$this->breadcrumb('特色推荐');
$this->breadcrumb()->setSeparator(' > ');
$auth = Zend_Auth::getInstance();
?>
<?php foreach ($this->feature as $f) { ?>
<div class="item">
<img src="<?= $f['imgurl']; ?>" alt="<?= $f['imgtext']; ?>"/>
<h2><?= $f['title'];?></h2>
<div class="description"><?= $f['description']; ?></div>
<div class="more"><a href="<?= $f['detailurl'];?>">详细</a></div>
</div>
<?php } ?>

View File

@ -0,0 +1,133 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/metadata.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb($this->config->title->data);
$this->breadcrumb()->setSeparator(' > ');
?>
<div id='leftContainer'>
<div id="links">
<div class="title"><img src="/images/dbs.png" align="absmiddle" />&nbsp;&nbsp;</div>
<h3>
<?php echo $this->searchform; ?>
<a href="/data/advancesearch">高级搜索</a></h3>
<h3> 分类浏览</h3>
<div id='category'>
<fieldset><legend><a href="/data/category">数据集类别</a></legend>
<ul>
<?php foreach($this->category as $cg) : ?>
<li><a href='/data/category/<?php echo $cg['code']; ?>'><?php (empty($cg['name_zh']))?print($cg['name']):print($cg['name_zh']); ?></a><span class="note">(<?php echo $cg['count']; ?>)</span></li>
<?php endforeach; ?>
</ul></fieldset>
</div>
<?php if ($this->serie) : ?>
<div id='series'>
<fieldset><legend><a href="/data/series">数据集序列</a></legend>
<ul>
<?php foreach($this->serie as $cg) : ?>
<li><a href='/data/series/<?php echo $cg['id']; ?>'><?php echo $cg['name']; ?></a><span class="note">(<?php echo $cg['count']; ?>)</span></li>
<?php endforeach; ?>
</ul></fieldset>
</div>
<?php endif; ?>
<div id='keyword'>
<?php
$keytypezh=array('place'=>'地点关键词','theme'=>'主题关键词','discipline'=>'学科关键词','stratum'=>'地层关键词','temporal'=>'时间关键词');
$type='';
foreach($this->keywords as $cg) :
if ($type!=$cg['keytype']) :
if ($type!='') : ?>
</ul></fieldset>
<?php endif;
$type=$cg['keytype'];
?>
<fieldset><legend><a href="/data/tag/"><?php echo $keytypezh[$type]; ?></a></legend>
<ul>
<li><a href='/data/tag/<?php echo $cg['keyword']; ?>'><?php echo $cg['keyword']; ?></a><span class="note">(<?php echo $cg['count']; ?>)</span></li>
<?php else : ?>
<li><a href='/data/tag/<?php echo $cg['keyword']; ?>'><?php echo $cg['keyword']; ?></a><span class="note">(<?php echo $cg['count']; ?>)</span></li>
<?php endif; ?>
<?php endforeach; ?>
</ul>
</fieldset>
</div>
<ul><li><a href="/data/timeline">时间轴浏览</a></li>
<li><a href="/data/map">空间浏览</a></li>
<li><a href="/data/browse">数据列表浏览</a></li>
<li><a href="/data/onlinelist">在线数据清单</a></li>
<li><a href="/data/offlinelist">离线数据清单</a></li>
</ul>
<h3><a href="/data/datasetcd">特色数据集光盘</a></h3>
<h3>数据申请与提交</h3>
<ul><li><a href="/data/submit">如何向西部数据中心提交数据</li></a><li><a href="/data/request">如何申请数据</li></a></ul>
</div>
<div id='toolbox'>
</div>
</div>
<div id='latest'>
<div class="title">数据最新更新<a href="/data/feed" target="_blank"><img src="images/rss2.gif"></a></div>
<div class="mditem">
<ul>
<?php foreach($this->metadata as $md) : ?>
<li> <img src="/images/westdc_20w.gif" /> <a href="/data/<?php echo $md['uuid'];?>"><?php echo $this->escape($md['title']);?></a> </li>
<?php endforeach; ?>
<li class="more"><a href="/data/browse">更多</a></li>
</ul>
</div>
</div>
<div id="services">
<div class="title"><img src="/images/Project24x24_24-bit.png" align="absmiddle" />&nbsp;数据服务</div>
<div class="items">
<div class="item">
<h3> <a href="/data/newsletter">数据中心通讯</a></h3>
<p class="description">
数据中心不定期发布数据通讯,通告中心动态、最新数据和数据工具</p>
<ul>
<li>-&nbsp;&nbsp;&nbsp;<a href='/images/newsletter/<?php echo $this->newsletter; ?>' target="_blank"><?php echo $this->newsletterno; ?>期数据通讯</a>(pdf格式)</li>
<li>
<?php
echo $this->form;
if (!empty($this->messages)) : ?>
<span id="message">
<?php
foreach ($this->messages as $info)echo $info;
?>
</span>
<?php endif; ?>
</li>
</ul>
</div>
<div class="item">
<h3><a href="DataServices/UserService.aspx">用户服务</a></h3>
<p class="description">
了解"西部数据中心"数据服务内容、方式及政策</p>
<ul>
<li>-&nbsp;&nbsp;&nbsp;<a href="/data/offlineapp">离线数据服务记录最近20个</a></li>
</ul>
</div>
<div class="item">
<h3><a href="/knowledge">文献服务</a></h3>
<p class="description">
数据中心依托中科院资环信息中心提供西部环境与生态文献和文档服务</p>
<ul><li>-&nbsp;&nbsp;&nbsp;<a href="/knowledge/netkites">移动文献查询服务</a></li></ul>
</div>
<div class="item">
<h3><a href="/data/ogcwxs">在线地图服务</a></h3>
<p class="description">提供OGC WMS、WFS等在线地图服务</p>
</div>
<div class="item">
<h3><a href="/about/contact">联系我们</a></h3>
</div>
</div>&nbsp;
</div>

View File

@ -0,0 +1,61 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle("空间浏览");
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/metadata.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/data">'.$this->config->title->data.'</a>');
$this->breadcrumb('<a href="/data/tag">空间浏览</a>');
if (!empty($this->codename)) $this->breadcrumb($this->codename);
$this->breadcrumb()->setSeparator(' > ');
$this->headScript()->appendFile('/js/OpenLayers.js');
$this->headLink()->appendStylesheet('/js/theme/default/style.css');
?>
<script src='http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAACD-MqkkoOm60o_dvwdcKVhThiRESR0xRCe9JKd36EL3glTk0OxTsRzifkUWmTTrYWaE7dY1lYUlGxA'></script>
<div id='tools'>
<?= $this->partial('data/tools.phtml'); ?>
</div>
<div id='leftnav'>
</div>
<div id='map' style="clear:left;height:400px;border:1px;"></div>
<script type="text/javascript">
var map;
map = new OpenLayers.Map('map');
map.addControl(new OpenLayers.Control.LayerSwitcher());
var gphy = new OpenLayers.Layer.Google(
"Google Physical",
{type: G_PHYSICAL_MAP}
);
var gmap = new OpenLayers.Layer.Google(
"Google Streets" // the default
);
var ghyb = new OpenLayers.Layer.Google(
"Google Hybrid",
{type: G_HYBRID_MAP}
);
var gsat = new OpenLayers.Layer.Google(
"Google Satellite",
{type: G_SATELLITE_MAP}
);
var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'} );
map.addLayers([ol_wms,gphy, gmap, ghyb, gsat]);
map.setCenter(new OpenLayers.LonLat(102, 36), 4);
var ajax=new OpenLayers.Ajax.Request('/data/json<?php echo $this->params; ?>',{method:'get',onSuccess:featureresult});
function featureresult(response){
var feature1= eval('(' + response.responseText + ')');
//alert(feature1.type);
var geojson_format = new OpenLayers.Format.GeoJSON();
var vector_layer = new OpenLayers.Layer.Vector('metadata');
map.addLayer(vector_layer);
vector_layer.addFeatures(geojson_format.read(feature1));
var sf = new OpenLayers.Control.SelectFeature(vector_layer);
map.addControl(sf);
sf.activate();
}
</script>

View File

@ -0,0 +1,43 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle('数据通讯');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/newsletter.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/data">'.$this->config->title->data.'</a>');
$this->breadcrumb('数据通讯');
$this->breadcrumb()->setSeparator(' > ');
?>
<?php
foreach ($this->newsletters as $nl){
$name=basename($nl,'.pdf');
list(,$num)=explode("_",$name);
?>
<div class="newsletter">
<a href="/images/newsletter/<?php echo $nl; ?>" target="_blank">
<img src="/images/newsletter/<?php echo $name; ?>.jpg" style="margin-bottom: 10px; margin-right: 10px;" border="0" /></a><br />
<a href="/images/newsletter/<?php echo $nl; ?>" target="_blank"><?php echo $num;?>期数据通讯</a>
</div>
<?php
}
?>
<p style="clear:left;font-size: 110%;">
西部数据中心不定期发布数据通讯,通告中心动态、最新数据、数据工具,以及重要研究进展。</p>
<p>
在下面文本框里输入您的Email地址可以订阅数据中心通讯。当通讯发布时将在第一时间发送到您订阅的Email邮箱里。</p>
<div class="note">
注意,邮件列表发送的邮件,有可能被您的邮箱当成垃圾邮件隔离,所以请设置您的反垃圾邮箱配置。</div>
<?php echo $this->form; ?>
<?php if (!empty($this->messages)) : ?>
<div id="message">
<?php
foreach ($this->messages as $info)echo $info;
?>
</div>
<?php endif; ?>
<div class="note"> 备注:您也可以直接给<a href="mailto:westdc-report-subscribe@lists.westgis.ac.cn">数据通讯</a>发送一封标题为subscribe的邮件进行订阅。
</div>
<br /><br />&nbsp;
</div>

View File

@ -0,0 +1,30 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle('最近20条离线数据申请');
$this->headTitle($this->codename);
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/offlineapp.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/data">'.$this->config->title->data.'</a>');
$this->breadcrumb('最近20条离线数据申请');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="offlinelist">
<table>
<thead><tr>
<td class="name">姓名</td>
<td class="unit">单位</td>
<td class="date">申请日期</td>
<td class="datalist">申请数据</td>
</tr></thead>
<?php foreach($this->rows as $r) : ?>
<tr>
<td class="name"><?= $r['username']; ?></td>
<td class="unit"><?= $r['unit']; ?></td>
<td class="date"><?= date('Y-m-d',strtotime($r['ts_approved'])); ?></td>
<td class="datalist"><?= $r['datalist']; ?></td>
</tr>
<?php endforeach; ?>
</table>
</div>

View File

@ -0,0 +1,35 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle('离线数据清单');
$this->headTitle($this->codename);
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/list.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/data">'.$this->config->title->data.'</a>');
$this->breadcrumb('离线数据清单');
$this->breadcrumb()->setSeparator(' > ');
?>
<fieldset><legend>离线数据</legend><ol>
<li>中国1km土地利用/覆盖数据集:是数据中心冉有华在几种全球和中国土地利用/覆盖数据集基础上整理而成包括GLC2000项目根据Spot4遥感数据生产的数据集、IGBP根据 AVHRR遥感数据生产的数据集、利用MIDIS遥感数据国根据IGBP分类生产的数据集、马里兰大学根据AVHRR生产的数据集和冉有华在上述4种数据的基础上制备的1km数据集</li>
<li>中国1100万土壤数据 由中科院南京土壤所完成,该数据仅向基金委西部项目提供共享服务,其他用户请到南京土壤所或中科院资源环境数据中心申请该数据。</li>
<li>中国1100万湿地数据 由中科院长春地理所完成,该数据仅向基金委西部项目提供共享服务,其他用户请到长春地理所或中科院资源环境数据中心申请该数据。</li>
<li>中国1100万湖泊数据 由中科院南京湖泊所完成,该数据仅向基金委西部项目提供共享服务,其他用户请到南京湖泊所、中科院资源环境数据中心、地球系统科学数据共享网申请该数据。</li>
<li>中国2000年人口、GDP数据Grid_1km 由中科院地理所完成,仅向基金委西部项目提供共享服务,其他用户请到中科院资源环境数据中心申请该数据。</li>
<li>中国110万土地利用数据 由中科院地理所完成包括1986、1995和2000年三个时期的数据中国西部省份的土地利用数据可在本中心申请其它省份的数据请到中科院资源环境数据中心申请。</li>
<li>1100万中国植被数据集 是数据中心根据2001年出版的《1100万中国植被图集》数字化而来该数据只向基金委西部计划项目提供共享服务。</li>
<li>中国西部110万地貌数据集</li>
<li>黑河基础地理数据(部分离线)</li>
</li></ol></fieldset>
<fieldset><legend>备注</legend>
<ol><li>国家基础地理数据受国家测绘法保护,西部数据中心不具有分发该数据的权利,用户如需要这方面的数据请到相关单位申请该数据,如<a href="http://nsfc.nsdi.gov.cn">国家基础地理信息中心网站</a>下载。
</li>
<li>有问题可以到<a href="http://forum.westgis.ac.cn/viewtopic.php?f=30&t=5025">论坛此处</a>跟帖反馈,也欢迎您发表其他问题。</li>
<li>您可以根据关键词搜索具体的数据:<?php echo $this->searchform; ?>
<a href="/data/advancesearch">高级搜索</a></li>
</ol>
</fieldset>

View File

@ -0,0 +1,134 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle('在线数据清单');
$this->headTitle($this->codename);
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/list.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/data">'.$this->config->title->data.'</a>');
$this->breadcrumb('在线数据清单');
$this->breadcrumb()->setSeparator(' > ');
?>
<fieldset><legend>基础地理数据</legend><ol>
<li>中国1km分辨率DEM</li>
<li>SRTM数据中国子区数据</li>
<li>GTOPO30 1km DEM</li>
</ol></fieldset>
<fieldset><legend>遥感数据及其产品</legend>
<ol><li>中国西部Landsat 遥感数据</li>
<li>中国西部ASTER数据集</li>
<li>中国西部中巴卫星影像数据集</li>
<li>被动微波SMMR亮度温度数据中国子区数据集</li>
<li>被动微波SSM/I亮度温度数据中国子区数据集</li>
<li>被动微波AMSR-E亮度温度数据集</li>
<li>Spot Vegetation数据</li>
<li>AVHRR数据产品</li>
<li>Spot Vegetation数据产品</li></ol>
</fieldset>
<fieldset><legend>专题数据</legend>
<ol><li>中国长时间序列雪深数据集</li>
<li>MODIS雪盖数据集</li>
<li>中国长时间序列地表冻融数据集</li>
<li>中国110万冰川编目数据集</li>
<li>中国周边地区冰川编目数据集</li>
<li>中国典型冰川地形数据集</li>
<li>中国多年冻土分布数据集</li>
<li>中国周边地区多年冻土类型数据集</li>
<li>中国110万沙漠沙地数据集</li>
<li>中国1200万沙漠分布数据集</li>
<li>中国1400万沙漠分布数据集</li>
<li>典型地区沙漠及沙漠化发展程度数据集,是数据中心王建华高工采用数字化方法,对我国出版的沙漠专题图进行了整理,目前已经整理的数据包括:
<ol>
<li>1:15奈曼旗沙漠化类型及土地区划图1982年</li>
<li>1:30万奈曼旗、库偏旗、科左后旗沙漠化类型图1983年</li>
<li>1:5万科尔沁草原大青沟地区沙漠化发展程度图(1958年)</li>
<li>1:5万科尔沁草原大青沟地区沙漠化发展程度图(1975年)</li>
<li>1:5万科尔沁草原大青沟地区沙漠化发展程度图(1981年)</li>
<li>1:10万大沁他拉沙漠化图(1958年)</li>
<li>1:10万大沁他拉沙漠化图(1981年)</li>
<li>1:10万盐池县沙漠化土地利用现状图上、下两幅1990年</li>
<li>1:50万土地利用现状图敦煌幅1992年</li>
<li>1:50万土地利用现状图张掖幅1992年</li>
<li>1:50万土地利用现状图银川幅1992年</li>
<li>1:50万土地利用现状图天水幅1992年</li>
<li>1:150塔克拉玛干风沙地貌图1978年</li>
<li>1:50万巴丹吉林风沙地貌图1991年</li></ol></li>
<li>GAME-TIBET观测数据 中日联合开展的观测项目对亚洲和太平洋地区1998年5月1日至10月31日的海面压强陆面压强水平风速垂直风速陆面气温、近地面比湿等要素进行了每6小时的观测。
</li></ol></fieldset>    
<fieldset><legend>流域数据</legend>
<ol><li>黑河基础地理数据(部分在线)</li>
<li>专题数据
<ol>
<li>110万黑河流域土地利用图1995、1996、2000年三期</li>
<li>150万黑河流域土地资源图</li>
<li>150万黑河流域土地退化图</li>
<li>150万黑河流域土地类型图</li>
<li>1100万黑河流域水文地质图</li>
<li>1100万黑河流域地质图</li>
<li>150万黑河流域地下水深埋图</li>
<li>1300万黑河流域地下水径流模数图</li>
<li>1200万黑河流域地下水储量模数图</li>
<li>150万黑河流域承压水顶板埋藏深度图</li>
<li>1100万黑河流域草场图</li>
<li>1100万黑河流域植被图</li>
<li>110万黑河流域土壤图</li>
<li>125万黑河流域土壤图</li>
<li>110万黑河流域水资源开发利用分区图</li></ol></li>
<li>遥感数据
<ol><li>ASTER遥感影像200景</li>
<li>AVHRR数据产品投影经纬度</li>
<li>2002年10天合成8km分辨率的NDVI数据</li>
<li>1981-2003年GIMMS数据</li>
<li>80年代、90年代和2000年三个时期的MSS/TM/ETM+图像投影UTM</li>
<li>QuickBird 影像数据</li>
<li>1998-2006年SPOT_NPP数据</li></ol></li>
<li>观测数据
<ol><li>Heife数据库
<ol>
<li>1971-2004年6小时气象数据蒸发、降水、湿度、气压、温度、风速</li>
<li>1971-2004年逐日气象数据蒸发、降水、湿度、气压、温度、风速</li>
<li>1958-2003年逐月气象数据降水、湿度、气压、温度、风速</li>
<li>2004-2006年大野口气象观测数据常规观测、塔上辐射数据、渦度相关数据</li></ol></li>
<li>长时间序列地下水观测数据(逐日,逐月,五天一次)</li>
<li>水文数据共29个站
<ol>
<li>19902004年降水量数据观测站点20个</li>
<li>19782003年径流数据观测站点29个观测要素包括逐日降水、逐日水位、逐日含沙量、逐日蒸发量、逐日平均悬移质输沙率</li>
<li>19782003年洪水过程数据观测站点18个观测要素为水位、流量</li></ol></li>
<li>酒泉地区灌区分布图</li>
<li>嘉峪关市综合水文资料(综合水文地质图、地下水水位埋深及等水位线图、现状水平年各类用水情况地区分布图、 地表水、地下水水资源开发利用程度分区图、水资源综合利用程度分区图)</li>
<li>110万黑河流域气象站点分布图</li>
<li>110万黑河流域水文站点位置图</li>
<li>110万黑河流域地下水观测点分布图</li></ol></li>
<li>野外试验数据:
<ol>
<li>山丹和额济纳旗地面温度、Albedo和叶面积指数调查数据2002.7-8</li>
<li>山丹地区生物量、植物光谱、叶面积指数调查数据2003.8</li>
<li>黑河中上游排露沟流域12000比例尺的DEM数据2004.7-8</li>
<li>大野口和大坪顶地区的Quickbird数据2004.7-8</li>
<li>临泽、大野口和大坪顶测量植物光谱、叶面指数、生物量和土壤剖面数据2004.7-8</li></ol>
</li></ol>
</fieldset>
<fieldset><legend>备注</legend>
<ol><li>国家基础地理数据受国家测绘法保护,西部数据中心不具有分发该数据的权利,用户如需要这方面的数据请到相关单位申请该数据,如<a href="http://nsfc.nsdi.gov.cn">国家基础地理信息中心网站</a>下载。
</li>
<li>有问题可以到<a href="http://forum.westgis.ac.cn/viewtopic.php?f=30&t=5025">论坛此处</a>跟帖反馈,也欢迎您发表其他问题。</li>
<li>您可以根据关键词搜索具体的数据:<?php echo $this->searchform; ?>
<a href="/data/advancesearch">高级搜索</a></li>
</ol>
</fieldset>

View File

@ -0,0 +1,83 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle('离线申请');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/order.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/data">'.$this->config->title->data.'</a>');
$this->breadcrumb('离线申请');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="message">
<?php if ($this->md) : ?>
<p>您已经成功把<a href="/data/<?php echo $this->md['uuid']; ?>"><?php echo $this->md['title']; ?></a>放入数据申请程序中!</p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
<p><?php echo $msg; ?></p>
<?php endforeach;endif; ?>
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p>
<?php endif; ?>
</div>
<?php if ($this->dataorder0) : ?>
<div id="dataorder0">
<h1>正在下载中的在线数据(<a href="/data/order/finish/all">完成所有</a> <a href="/data/order/cancel/all">取消所有</a></h1>
<ul class="title"><li class="time">开始时间</li>
<li class="name">数据名称</li>
<li class="action">操作</li>
</ul>
<?php foreach($this->dataorder0 as $order) : ?>
<ul><li class="time"><?php echo date('Y-m-d H:i:s',strtotime($order['ts_created'])); ?></li>
<li class="name"><a href="/data/<?php echo $order['uuid']; ?>"><?php echo $order['title']; ?></a></li>
<li class="action"><a href="/data/order/finish/<?php echo $order['id']; ?>">完成</a>
<a href="/data/order/cancel/<?php echo $order['id']; ?>">取消下载</a></li>
</ul>
<?php endforeach; ?>
</div>
<?php endif; ?>
<?php if ($this->dataorder1) : ?>
<div id="dataorder1">
<h1>准备提交的离线申请(<a href="/data/order/apply/all">提交所有离线申请</a> <a href="">下载所有在线数据</a></h1>
<ul class="title"><li class="time">申请时间</li>
<li class="datatype">数据类型</li>
<li class="name">数据名称</li>
<li class="action">操作</li>
</ul>
<?php foreach($this->dataorder1 as $order) : ?>
<ul><li class="time"><?php echo date('Y-m-d H:i:s',strtotime($order['ts_created'])); ?></li>
<li class="datatype"><?php print $order['datatype']?'离线数据':'在线数据'; ?></li>
<li class="name"><a href="/data/<?php echo $order['uuid']; ?>"><?php echo $order['title']; ?></a></li>
<li class="action"><a href="/data/order/del/<?php echo $order['id']; ?>">删除</a>
<a href="/data/order/apply/<?php echo $order['id']; ?>">离线申请</a></li>
</ul>
<?php endforeach; ?>
</div>
<?php endif; ?>
<?php if ($this->dataorder2) : ?>
<div id="dataorder2">
<h1>已提交的离线申请(<a href="/data/order/pdf/1">生成PDF离线数据申请表</a> </h1>
<ul class="title"><li class="time">申请时间</li>
<li class="name">数据名称</li>
<li class="status">申请状态</li></ul>
<?php foreach($this->dataorder2 as $order) : ?>
<ul><li class="time"><?php echo date('Y-m-d H:i:s',strtotime($order['ts_created'])); ?></li>
<li class="name"><a href="/data/<?php echo $order['uuid']; ?>"><?php echo $order['title']; ?></a>
</li>
<li class="status">
<?php switch($order['status']) {
case 2:
echo "请生成PDF申请表";
break;
case 3:
echo "请邮寄PDF申请表并等待";
break;
default:
break;
}
?>
</li>
</ul>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -0,0 +1,35 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle('离线申请');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/order.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/data">'.$this->config->title->data.'</a>');
$this->breadcrumb('<a href="/data/order">离线申请</a>');
$this->breadcrumb('生成离线申请表');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="message">
<?php if ($this->messages): foreach($this->messages as $msg): ?>
<p><?php echo $msg; ?></p>
<?php endforeach;endif; ?>
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p>
<?php endif; ?>
</div>
<div id="data2">
<p> 为促进中国西部资源与生态环境科学研究,更好的为西部大开发服务,充分利用数据中心多年来的数据积累及国家自然科学基金委员会“中国西部环境与生态科学研究计划”、数字流域等的数据产出,
根据我国科学数据共享和基金项目数据管理的有关规定, 中科院寒区旱区环境与工程研究所(简称甲方)同意接收__________以下简称乙方的数据申请,并签订数据使用协议:
</p>
<h1>数据清单</h1>
<ul>
<?php foreach ($this->data2 as $i=>$md) : ?>
<li><?php echo ($i+1).". ".$md['title']; ?></li>
<?php endforeach; ?>
</ul>
</div>
<div id="user">
<h1>用户信息(请务必输入真实信息以便邮寄!)</h1>
<?php echo $this->form;?>
</div>

View File

@ -0,0 +1,71 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle('如何申请数据');
$this->headTitle()->setSeparator(' - ');
//$this->headLink()->appendStylesheet('/css/terms.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb("<a href='/data'>".$this->config->title->data."</a>");
$this->breadcrumb('<a href="/data/request">如何申请数据</a>');
$this->breadcrumb()->setSeparator(' > ');
?>
<div class="LeftMargin">
<h1>如何申请数据?</h1>
<p>“西部数据中心”数据申请支持两种方式:在线方式和离线方式。</p>
<br />
<h2>在线方式: </h2>
<p>
在线数据获取请访问“西部数据中心”共享门户网站(<a href="Http://westdc.westgis.ac.cn">Http://westdc.westgis.ac.cn</a>)免费注册后登陆按类别浏览元数据或者根据关键词进行元数据搜索。如果元数据支持在线下载在详细元数据里可以找到一个或多个下载链接点击链接按提示进行HTTP或FTP下载。使用客户端下载时建议不超过5线程。<br />
</p>
<h2>离线方式:</h2>
<h3>方式1推荐)</h3>
<p>1、找到需要的数据<br />
2、点击离线申请<br />
3、重复步骤1、2选择所需的数据最多可以同时申请5个数据。<br />
4、进入"数据篮",提交离线申请。<br />
5、根据系统反馈的邮件进行进一步的操作打印申请表邮寄给西部数据中心。<br />
6、等待西部数据中心答复</p>
<h3>方式2</h3>
<p>
受国家数据政策限制或数据提供者的要求,一些数据提供在线下载。“西部数据中心”有专人负责数据服务,会在尽短时间内回复离线数据请求。“西部数据中心”按照“完全与开放”数据共享原则,以不高于复印、邮寄或材料费提供数据。用户在收到数据后,请按通知返回上述费用。<br />
<br />
1、登陆西部数据中心站点<a href="Http://westdc.westgis.ac.cn/">Http://westdc.westgis.ac.cn/</a>
<br />
2、下载离线申请表<a href="/images/application.pdf" target="_blank">PDF格式</a><a href="/images/data_request_form.doc">Ms Word格式</a>
<br />
3、填写该申请表
<br />
4、将填写完毕的申请表电邮到 westdc@lzb.ac.cn<br />
5、打印两份该申请表自己保留一份给西部数据中心邮寄一份<br />
地址甘肃兰州东岗西路320号&nbsp;中国科学院寒区旱区环境与工程研究所&nbsp;遥感与地理信息研究室<br />
收件:“西部数据中心”服务组 (收)<br />
邮编: 730000<br />
电话: 09314967287 (李红星)<br />
<br />
6、请等待。
</p>
<div align="center">
<img src="/images/DataRequest.jpg" alt="数据申请流程" width="562" height="410" border="0"
usemap="#Map" hidefocus="true" />
<map name="Map" id="Map">
<area shape="poly" coords="203,50,257,51,257,101,258,121,295,125,297,139,161,141,164,125,198,120"
href="http://westdc.westgis.ac.cn" />
<area shape="poly" coords="192,231,236,232,235,286,253,288,251,304,233,307,233,318,193,317,191,304,177,304,179,288,195,285"
href="Documents/application.pdf" />
<area shape="poly" coords="25,237,75,235,72,294,96,297,99,315,86,318,88,331,10,332,11,318,0,317,0,296,26,294"
href="mailto:westdc@lzb.ac.cn" />
</map>
</div>
<div>
<h2>
联系我们:</h2>
<p>
任何意见和建议请联系我们,<a href="mailto:westdc@lzb.ac.cn">westdc@lzb.ac.cn</a><br />
或者<a href="/about/contact">在线提交</a><br />
</p>
</div>
</div>

View File

@ -0,0 +1,29 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle('快速搜索');
if (!empty($this->codename)) $this->headTitle($this->codename);
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/metadata.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/data">'.$this->config->title->data.'</a>');
$this->breadcrumb('快速搜索');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id='tools'>
<?= $this->partial('data/tools.phtml'); ?>
</div>
<?php echo $this->form; ?>
<a href="/data/advancesearch">高级搜索</a>
<?php if (!empty($this->metadata)) : ?>
<?php echo $this->page->getNavigation();
foreach($this->metadata as $md) : ?>
<hr />
<div class="mditem">
<div class="thumb"><img src="/data/thumb/id/<?php echo $md['id'];?>" /></div>
<h2><a href="/data/<?php echo $md['uuid'];?>"><?php echo $this->escape($md['title']);?></a>
</h2>
<span><?php echo mb_strlen($md['description'])>400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']);?></span>
</div>
<?php endforeach; endif?>

View File

@ -0,0 +1,37 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle('数据集序列');
$this->headTitle($this->codename);
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/metadata.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/data">'.$this->config->title->data.'</a>');
$this->breadcrumb('<a href="/data/series">数据集浏览</a>');
if (!empty($this->codename)) $this->breadcrumb($this->codename);
$this->breadcrumb()->setSeparator(' > ');
?>
<div id='tools'>
<?= $this->partial('data/tools.phtml'); ?>
</div>
<div id='leftnav'>
<fieldset><legend>数据集序列</legend>
<ul>
<?php foreach($this->serie as $cg) : ?>
<li><a href='/data/series/id/<?php echo $cg['id']; ?>'><?php echo $cg['name']; ?></a>(<?php echo $cg['count']; ?>)</li>
<?php endforeach; ?>
</ul></fieldset></div>
<div id='metacontent'>
<?php if (!empty($this->metadata)) : ?>
<h1>当前浏览数据集序列:<?php echo $this->codename; ?></h1>
<?php foreach($this->metadata as $md) : ?>
<hr />
<div class="mditem">
<div class="thumb"><img src="/data/thumb/id/<?php echo $md['id'];?>" /></div>
<h2><a href="/data/view/id/<?php echo $md['id']; ?>"><?php echo $this->escape($md['title']);?></a>
<a href="/data/delete/id/<?php echo $md['id'];?>"><img src="/images/del.gif"></a>
</h2>
<span><?php echo mb_strlen($md['description'])>400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']);?></span>
</div>
<?php endforeach; endif; ?>
</div>

View File

@ -0,0 +1,31 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle('用户服务');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/service.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb("<a href='/data'>".$this->config->title->data."</a>");
$this->breadcrumb('用户服务');
$this->breadcrumb()->setSeparator(' > ');
?>
<div class="service"><h3>离线数据服务</h3>
主要包括网络传输和免费光盘邮寄。网络传输以电子邮件和ftp传输为主要形式ftp提供72小时存储服务过期数据自动删除。在数据量过大或不具备网络传输条件的情况下则提供免费数据光盘邮寄服务。在国家数据共享政策允许范围内用户按照离线数据申请程序签署《中国西部环境与生态科学数据中心数据共享协议》之后即可获得离线数据服务。将有专职人员负责受理用户的数据申请包括准备数据、建立ftp下载链接及后续的服务工作等。但由于基础地理数据、DEM数据、等高线数据、野外实际观测数据包括气象观测站、水文数据和某些项目提供的野外观测数据这四类数据属于国家部分保密数据和部分项目提供时要求签字的数据故包含有上述四类数据的申请协议申请者需请导师或项目负责人签字后再邮寄打印协议到西部数据中心。对于国家数据共享政策允许范围外的数据包括密级较高的数据和没有得到数据生产单位授权的数据数据中心则无法提供。用户在使用数据过程中须严格遵守<a href="/about/terms">在线使用条款和免责声明</a>
<p>自数据服务工作实施以来得到了广大用户的热情垂询和使用。截止2007年9月已向80余家科研单位的科研人员提供离线数据服务达200多人次离线申请数据量现已超过1Tb。网站在线下载数据量达20 GB。查看<a href="/data/offlineapp">离线数据服务纪录</a></p>
</div>
<div class="service"><h3>数据共享上门服务</h3>
主要针对西部计划项目进行上门服务,一方面提供数据中心已有共享数据,一方面了解数据需求以及各项目组对数据中心数据服务的意见、建议和要求等,广泛交流总结经验,不断完善数据共享体制。今后,数据共享上门服务将有计划的持续进行。
<p>截至2006年10月数据服务小组共走访了14个城市39家单位58个西部计划项目为西部计划项目免费提供了目前西部数据中心所拥有的共享数据并广泛征集各项目组对西部数据中心数据服务的意见、建议和要求等为提高数据服务工作质量奠定了良好的基础。</p>
</div>
<div class="service"><h3>在线数据服务</h3>
目前,数据中心门户网站提供了丰富的数据信息,而且大部分数据可以登录后在线下载。数据服务小组有专人负责维护网络链接的有效性和在线反馈意见的处理,保证数据在线下载顺利畅通,同时,不断完善、补充元数据,最大程度提高数据的利用率。今后,随着网站以及数据共享政策和体制的健全,数据服务将进一步在线化。
</div>
<div class="service"><h3>完善和收集共享数据</h3>
主要是完善现已提交共享的数据,查找数据中可能存在的错误,整理部分共享数据的文档,收集网络上尤其是国外网站上发布的相关的共享影像和气象水文数据。
如果您想提交您的数据,请查看<a href="/data/submit">如何提交您的数据</a>
</div>
<div class="service"><h3>数据中心间的协调与共享</h3>
通过WEBSERVICES、RSS、GEOJSON等多种形式在多个数据中心之间提供基于数据服务的共享。
</div>

View File

@ -0,0 +1,33 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle('如何提交数据');
$this->headTitle()->setSeparator(' - ');
//$this->headLink()->appendStylesheet('/css/terms.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb("<a href='/data'>".$this->config->title->data."</a>");
$this->breadcrumb('<a href="/data/submit">如何提交数据</a>');
$this->breadcrumb()->setSeparator(' > ');
?>
<h2>准备数据</h2>
在提交数据之前,您需要首先整理数据,制作相应的数据文档。西部数据中心对数据格式没有要求,但如果是自定义的数据格式,请务必要在数据文档中说明各字段含义及数据使用方式。在撰写数据文档说明中请明确阐述数据背景、生产过程、质量控制、内容、引用等信息,详细请参考我们附件的样例文档。数据汇总后我们会加以整理,并在提交的数据文档基础上进行必要的整理和扩充。
<h2>提交数据</h2>
提交数据有多种方式,若您有任何不清楚,<a href="../ContactUs.aspx">请务必联系我们</a>
<h3>FTP传输方式</h3>
这是我们推荐给您的首选方式优点是支持大文件传输速度快。您可以使用FTP客户端工具上传数据到我们的文件服务器。
FTP地址 ftp://ftp.westgis.ac.cn 用户名upload 密码upload (注:此链接只用于数据上传,无法进行下载、删除等操作)
请在上传结束后,发送一封电子邮件给<a href="mailto:westdc@lzb.ac.cn">西部数据中心</a>,以便我们尽快地发布您的数据。
<h3>电子邮件传输方式</h3>
若您的数据量小于5Mb不大也可以采用电子邮件方式发送给我们。我们的邮件地址是<a href="mailto:westdc@lzb.ac.cn">westdc@lzb.ac.cn</a>
<h3>传统邮寄方式</h3>
您也可以通过传统的邮递方式发送给我们,我们的联系地址是:
地址甘肃兰州东岗西路320号&nbsp;中国科学院寒区旱区环境与工程研究所&nbsp;遥感与地理信息研究室<br />
收件:“西部数据中心”服务组 (收)<br />
邮编: 730000<br />
电话: 09314967287 (李红星)<br />
<h3>发布数据</h3>
我们在接收到您的数据后,将尽快根据您的数据文档制作元数据,发布到西部数据中心网站上。而在发布之前,我们将把其发送给您检查错误。
请您在提交数据的同时确定项目数据的共享程度,包括共享开始时间、共享人员范围和共享方式(在线下载或离线申请两种,在线下载只需要用户在西部数据中心网站注册登陆即可,离线申请需要用户签署数据共享协议),如果没有专门指定,我们将按照数据中心数据共享有关规范进行共享。

View File

@ -0,0 +1,50 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
if (!empty($this->codename)) $this->headTitle($this->codename);
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/metadata.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/data">'.$this->config->title->data.'</a>');
$this->breadcrumb('<a href="/data/tag">关键词浏览</a>');
if (!empty($this->codename)) $this->breadcrumb($this->codename);
$this->breadcrumb()->setSeparator(' > ');
?>
<div id='tools'>
<?= $this->partial('data/tools.phtml'); ?>
</div>
<div id='leftnav'>
<?php
$keytypezh=array('place'=>'地点关键词','theme'=>'主题关键词','discipline'=>'学科关键词','stratum'=>'地层关键词','temporal'=>'时间关键词');
$type='';
foreach($this->keywords as $cg) :
if ($type!=$cg['keytype']) :
if ($type!='') : ?>
</ul></fieldset>
<?php endif;
$type=$cg['keytype'];
?>
<fieldset><legend><?php echo $keytypezh[$type]; ?></legend>
<ul>
<li><a href='/data/tag/<?php echo $cg['keyword']; ?>'><?php echo $cg['keyword']; ?></a><span class="note">(<?php echo $cg['count']; ?>)</span></li>
<?php else : ?>
<li><a href='/data/tag/<?php echo $cg['keyword']; ?>'><?php echo $cg['keyword']; ?></a><span class="note">(<?php echo $cg['count']; ?>)</span></li>
<?php endif; ?>
<?php endforeach; ?>
</ul>
</fieldset></div>
<div id='metacontent'>
<?php if (!empty($this->metadata)) : ?>
<h1>当前浏览:<?php echo $this->codename; ?></h1>
<?php foreach($this->metadata as $md) : ?>
<hr />
<div class="thumb"><img src="/data/thumb/id/<?php echo $md['id'];?>" /></div>
<div class="mditem">
<h2><a href="/data/<?php echo $md['uuid']; ?>"><?php echo $this->escape($md['title']);?></a>
</h2>
<span><?php echo mb_strlen($md['description'])>400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']);?></span>
</div>
<?php endforeach;
endif; ?>
</div>

View File

@ -0,0 +1,7 @@
<?php
if (empty($this->thumb->data)) {
} else {
header("Content-Type:image/jpeg");
print base64_decode($this->thumb->data);
}
?>

View File

@ -0,0 +1,64 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle('时间轴导航');
if (!empty($this->codename)) $this->headTitle($this->codename);
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/metadata.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/data">'.$this->config->title->data.'</a>');
$this->breadcrumb('<a href="/data/timeline">时间轴导航</a>');
$this->breadcrumb()->setSeparator(' > ');
$this->headScript()->appendFile('http://simile.mit.edu/timeline/api/timeline-api.js');
$this->headScript()->captureStart();
?>
var tl;
var date = "Nov 22 2007 13:00:00";
var theme = Timeline.ClassicTheme.create();
theme.event.label.width = 250; // px
theme.event.bubble.width = 250;
theme.event.bubble.height = 200;
window.onload=function() {
var eventSource = new Timeline.DefaultEventSource();
var bandInfos = [
Timeline.createBandInfo({
width: "70%",
intervalUnit: Timeline.DateTime.MONTH,
eventSource: eventSource,
date: date,
intervalPixels: 100,
theme: theme
}),
Timeline.createBandInfo({
width: "30%",
intervalUnit: Timeline.DateTime.YEAR,
eventSource: eventSource,
date: date,
showEventText: false,
intervalPixels: 200,
theme:theme
})
];
bandInfos[1].syncWith = 0;
bandInfos[1].highlight = true;
tl = Timeline.create(document.getElementById("tl"), bandInfos);
tl.loadXML("/time.xml", function(xml, url) {
eventSource.loadXML(xml, url);
});
}
var resizeTimerID = null;
window.onresize=function() {
if (resizeTimerID == null) {
resizeTimerID = window.setTimeout(function() {
resizeTimerID = null;
tl.layout();
}, 500);
}
}
<?php $this->headScript()->captureEnd() ?>
<div id='tools'><?= $this->partial('data/tools.phtml'); ?></div>
<div id="tl" class="timeline-default" style="clear:left;height: 400px;"> </div>

View File

@ -0,0 +1,44 @@
<script src='http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAACD-MqkkoOm60o_dvwdcKVhThiRESR0xRCe9JKd36EL3glTk0OxTsRzifkUWmTTrYWaE7dY1lYUlGxA'></script>
<script type="text/javascript">
var map;
map = new OpenLayers.Map('map');
map.addControl(new OpenLayers.Control.LayerSwitcher());
var gphy = new OpenLayers.Layer.Google(
"Google Physical",
{type: G_PHYSICAL_MAP}
);
var gmap = new OpenLayers.Layer.Google(
"Google Streets" // the default
);
var ghyb = new OpenLayers.Layer.Google(
"Google Hybrid",
{type: G_HYBRID_MAP}
);
var gsat = new OpenLayers.Layer.Google(
"Google Satellite",
{type: G_SATELLITE_MAP}
);
var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'} );
map.addLayers([ol_wms,gphy, gmap, ghyb, gsat]);
map.setCenter(new OpenLayers.LonLat(102, 36), 4);
var ajax=new OpenLayers.Ajax.Request('/metadata/json/id/<?php echo $md->id; ?>',{method:'get',onSuccess:featureresult});
function featureresult(response){
var feature1= eval('(' + response.responseText + ')');
//alert(feature1.type);
var geojson_format = new OpenLayers.Format.GeoJSON();
var vector_layer = new OpenLayers.Layer.Vector('metadata');
map.addLayer(vector_layer);
vector_layer.addFeatures(geojson_format.read(feature1));
//map.zoomToExtent(vector_layer.getExtent());
var sf = new OpenLayers.Control.SelectFeature(vector_layer);
map.addControl(sf);
sf.activate();
}
</script>

View File

@ -0,0 +1,9 @@
<ul>
<li><a href="/data/tag">数据集关键词浏览</a></li>
<li><a href="/data/series">数据集序列浏览</a></li>
<li><a href="/data/category">数据集分类浏览</a></li>
<li><a href="/data/timeline">时间轴浏览</a></li>
<li><a href="/data/map">空间浏览</a></li>
<li><a href="/data/browse">浏览所有元数据</a></li>
<li><a href="/data/search">搜索元数据</a></li>
</ul>

View File

@ -0,0 +1,245 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle('数据查看');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/mdview.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/data">'.$this->config->title->data.'</a>');
$this->breadcrumb('查看元数据');
$this->breadcrumb()->setSeparator(' > ');
$this->headScript()->appendFile('/js/prototype.js');
$this->headScript()->appendFile('/js/OpenLayers.js');
$this->headLink()->appendStylesheet('/js/theme/default/style.css');
?>
<?php $md=$this->metadata;if ($md):?>
<h1><?php echo $this->escape($md->title);?></h1>
<div id="ImageViewer"><img src="/data/thumb/id/<?php echo $md->id;?>" /> </div>
<div id="authors">
<h2>联系人</h2>
<ul>
<li>数据贡献者:<strong><?php echo $md->author; ?></li></strong>
<li>元数据撰写者:吴立宗</li>
<li>数据分发者:<a href="/about/contact">李红星</a></li></ul><h2>其他信息</h2><ul>
<li>元数据更新时间:<?php print date('Y-m-d',strtotime($md->ts_created)); ?></li>
<li><a href="/data/detail/id/<?php echo $md->id;?>">详细元数据</a></li>
<li><a href="/data/xml/id/<?php echo $md->id;?>"><img src="/images/xml.gif" alt="查看XML源文件"></a></li>
</ul>
</div>
<div id="ItemSummary">
<div id="category">
<ul><?php foreach($this->category as $cat): ?>
<li><a href="/data/category/code/<?php echo $cat['code'];?>"><?php echo $this->escape($cat['name_zh']);?></a></li>
<?php endforeach; ?>
</ul>
</div>
<div id="keyword">
<ul><?php foreach($this->keys as $cg) : ?>
<li><a href='/data/tag/key/<?php echo $cg->keyword; ?>'><?php echo $cg->keyword; ?></a></li>
<?php endforeach; ?>
</ul>
</div>
<?php if ($this->series): ?>
<div id="series">
<ul><?php foreach($this->series as $serie): ?>
<li><a href="/data/series/id/<?php echo $serie['id']; ?>"> <?php echo $this->escape($serie['name']);?></a></li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>
<ul id=OtherInfo>
<li id="filesize"><span>数据大小:</span><?php echo $md->filesize; ?>MB</li>
<li id="fileformat">数据格式:<?php echo $md->fileformat; ?></li>
<?php if ($this->downloaded>9) :?>
<li id="downtimes">下载:<?php echo $this->downloaded; ?></li>
<?php endif; ?>
<li id="viewtimes">浏览量:<?php echo $this->viewed; ?></li>
<li id="projection" title="<?= $this->projection; ?>">数据投影:<?php if (is_numeric($md->projection)) echo 'EPSG_CODE_'; echo $md->projection; ?></li>
<?php if (!empty($md->timebegin)) : ?>
<li id="datatimes">数据时间范围:<?php echo date('Y-m-d',strtotime($md->timebegin));if (!empty($md->timeend)) echo " 至 ".date('Y-m-d',strtotime($md->timeend)); ?></li>
<?php endif; ?>
<li id="datatype">数据类型:<?php if ($md->datatype) print "离线(可免费申请)"; else print "在线(可直接下载)";?></li>
</ul>
<div id="linkurl">
<?php if (!$md->datatype) : ?>
<a href="/data/download/uuid/<?php echo $md->uuid; ?>"><img src="/images/download.png" title="直接下载" /></a>
<?php endif; ?>
<a href="/data/order/uuid/<?php echo $md->uuid; ?>"><img src="/images/order.png" title="免费!离线申请此数据(在线数据和离线数据都可申请)"/></a>
</div>
</div>
<script type="text/javascript">
(function(a, b) {
var ah=document.getElementById(a).offsetHeight, bh=document.getElementById(b).offsetHeight;
if (ah > bh) document.getElementById(b).style.height = ah + 'px';
})('ItemSummary', 'ImageViewer');
</script>
<div style="clear:both;border-top:0px solid transparent !important;"></div>
<hr />
<div id='map'></div>
<div id="abstract">
<p>
<?php echo str_replace(array("\r\n", "\n", "\r"),'</p><p>',$this->escape($md->description));?>
</p>
</div>
<?php if ($this->related) : ?>
<hr />
<div id="related">
<h2>相关数据</h2>
<ul>
<?php foreach ($this->related as $r) : ?>
<li><a href="/data/<?= $r['uuid']; ?>"><?= $r['title']; ?></a></li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>
<?php if ($this->literature) : ?>
<div id="literature">
<h2>相关文献</h2>
<ul>
<?php foreach ($this->literature as $r) :
$u=parse_url($r['url']);
if ($u['host']=='hdl.handle.net')
$url=$this->config->seekspace->handleurl.$u['path'];
else
$url=$r['url'];
?>
<li><a href="<?= $url; ?>" target="_blank"><?= $r['title']; ?></a></li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>
<?php if ($this->documents) : ?>
<div id="documents">
<h2>相关文档</h2>
<ul>
<?php foreach ($this->documents as $r) : ?>
<li><a href="/data/<?= $r['uuid']; ?>"><?= $r['title']; ?></a></li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>
<hr />
<div id="cite">
<h2>数据使用声明</h2>
<p>为尊重知识产权、保障数据作者的权益、扩展数据中心的服务、评估数据的应用潜力,请数据使用者在使用数据所产生的研究成果中(包括公开发表的论文、论著、数据产品和未公开发表的研究报告、数据产品等成果),明确注明数据来源和数据作者。对于转载(二次或多次发布)的数据,作者还须注明原始数据来源。</p>
<p>中文发表的成果参考以下规范注明: 数据来源于国家自然科学基金委员会"中国西部环境与生态科学数据中心"(http://westdc.westgis.ac.cn)</p>
<p>英文发表的成果依据以下规范注明: The data set is provided by Environmental and Ecological Science Data Center for West China,National Natural Science Foundation of China (http://westdc.westgis.ac.cn)</p>
</p>
<?php if ($md->citation) : ?>
<h2>本数据引用方式</h2>
<p><?php echo $this->escape($md->citation);?></p>
<?php endif; ?>
</div>
<hr />
<div id="comment">
<h2>数据评论</h2>
<div id="allcomments">
</div>
<script type="text/javascript">
function loading()
{
$('loading').style.display = 'block';
}
function done()
{
$('loading').style.display = 'none';
}
function reportError(request)
{
alert('Sorry. There was an error.');
}
var request_pars = ''; //请求参数
var myAjax = new Ajax.Updater('allcomments', '/data/comment/uuid/<?= $md->uuid; ?>',{
method : 'get', // http 请求方法,get or post
parameters : request_pars, // 请求参数
onFailure : reportError, // 失败的时候调用 reportError 函数处理
onLoading : loading, // 加载时
onComplete : done // 读取完毕
});
</script>
<?php echo $this->commentForm; ?>
</div>
<!--westdc.westgis.ac.cn
<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAACD-MqkkoOm60o_dvwdcKVhRBSKpgcP88GYi6r2Of16IkMX_4YhSBQsywCi4J2_fh4nBuWmK7gyRjLg"></script>
-->
<!--test.westgis.ac.cn-->
<script src='http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAACD-MqkkoOm60o_dvwdcKVhThiRESR0xRCe9JKd36EL3glTk0OxTsRzifkUWmTTrYWaE7dY1lYUlGxA'></script>
<script type="text/javascript">
var map = new GMap2(document.getElementById("map"));
var plotbounds=new GLatLngBounds(new GLatLng(<?= $md->south; ?>,<?= $md->west; ?>),new GLatLng(<?= $md->north; ?>,<?= $md->east; ?>));
var zoomlevel=map.getBoundsZoomLevel(plotbounds);
zoomlevel--;
if (zoomlevel>16) zoomlevel=16;
map.setCenter(new GLatLng(<?= ($md->south+$md->north)/2; ?>,<?= ($md->east+$md->west)/2; ?>), zoomlevel);
map.addControl(new GLargeMapControl());
map.addControl(new GMapTypeControl());
map.setMapType(G_HYBRID_MAP);
var polygon=new GPolygon([
new GLatLng(<?= $md->north; ?>,<?= $md->west; ?>),
new GLatLng(<?= $md->north; ?>,<?= $md->east; ?>),
new GLatLng(<?= $md->south; ?>,<?= $md->east; ?>),
new GLatLng(<?= $md->south; ?>,<?= $md->west; ?>),
new GLatLng(<?= $md->north; ?>,<?= $md->west; ?>)
],"#f33f00",5,1,"#ff0000",0.2);
map.addOverlay(polygon);
</script>
<!--
<script type="text/javascript">
var map;
map = new OpenLayers.Map('map');
map.addControl(new OpenLayers.Control.LayerSwitcher());
var gphy = new OpenLayers.Layer.Google(
"Google Physical",
{type: G_PHYSICAL_MAP}
);
var gmap = new OpenLayers.Layer.Google(
"Google Streets" // the default
);
var ghyb = new OpenLayers.Layer.Google(
"Google Hybrid",
{type: G_HYBRID_MAP}
);
var gsat = new OpenLayers.Layer.Google(
"Google Satellite",
{type: G_SATELLITE_MAP}
);
var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'} );
map.addLayers([ol_wms,gphy, gmap, ghyb, gsat]);
//map.zoomToExtent(extent);
//map.setCenter(new OpenLayers.LonLat(102, 36), 4);
var ajax=new OpenLayers.Ajax.Request('/metadata/json/id/<?php echo $md->id; ?>',{method:'get',onSuccess:featureresult});
function featureresult(response){
var feature1= eval('(' + response.responseText + ')');
//alert(feature1.type);
var geojson_format = new OpenLayers.Format.GeoJSON();
var vector_layer = new OpenLayers.Layer.Vector('metadata');
map.addLayer(vector_layer);
vector_layer.addFeatures(geojson_format.read(feature1));
map.zoomToExtent(vector_layer.getExtent());
var sf = new OpenLayers.Control.SelectFeature(vector_layer);
map.addControl(sf);
sf.activate();
}
</script>
-->
<?php else: ?>
<p>Cannot find the metadata.</p>
<p>没有找到对应的元数据。</p>
<?php endif;?>

View File

@ -0,0 +1,3 @@
<?= $this->headTitle('Error') ?>
<h1>An error occurred</h1>
<p>An error occurred; please try again later.</p>

View File

@ -0,0 +1,10 @@
<div id="divFooter">
<span>版权所有©2006-2008中国西部环境与生态科学数据中心</span> | <a href="/about/contact" >联系我们</a> | <a href="/about/terms">使用条款和免责申明</a>
| <a href="http://www.miibeian.gov.cn" target="_blank">陇ICP备05000491号</a>
</div>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-302912-6";
urchinTracker();
</script>

View File

@ -0,0 +1,30 @@
<div id="divLogo">
<a href="/"><img src="/images/westdc-banner.jpg" alt="Westdc Logo" /></a>
</div>
<div id="divNavi">
<ul>
<!-- CSS Tabs -->
<li><a href="/"><span>首页</span></a></li>
<!-- <li><a href="/news"><span>新闻动态</span></a></li> -->
<li><a href="/data"><span>数据产品与服务</span></a></li>
<li><a href="/knowledge"><span>知识积累平台</span></a></li>
<!-- <li><a href="/tools"><span>数据工具</span></a></li> -->
<li><a href="/community"><span>合作与交流</span></a></li>
<li><a href="/about"><span>关于本站</span></a></li>
</ul>
<div id="userNavi">
<?php
$auth = Zend_Auth::getInstance();
if($auth->hasIdentity())
{
$user = $auth->getIdentity();
echo '<a href="/account/edit">'.$user->username.'</a> ';
if ($user->usertype=="administrator") echo '<a href="/admin">后台管理</a> ';
echo '<a href="/data/order">数据篮</a> <a href="/account/logout">注销</a>';
} else {
echo '<a href="/account/login">登录</a> <a href="/account/register">注册</a>';
}
?>
</div>
</div>

View File

@ -0,0 +1,100 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('首页');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/index.css');
$auth = Zend_Auth::getInstance();
?>
<div id="leftPanel">
<div class="title">下载热门数据</div>
<ul>
<?php foreach($this->mdtop as $i=>$md) : ?>
<li> <img src="/images/no<?php echo $i+1; ?>.gif" align="absmiddle" style="border-width:0px;" />&nbsp;
<a class="item" href="/data/<?php echo $md->uuid; ?>"><?php echo $md->title; ?></a>
</li>
<?php endforeach; ?>
</ul>
<div class="title">快速链接</div>
<ul>
<li class="item"><span class="symbol">&nbsp;</span><span><a href="/data/request">如何申请数据</a></span></li>
<li class="item"><span class="symbol">&nbsp;</span><span class="special"><a href="/data/onlinelist">在线数据清单</a></span></li>
<li class="item"><span class="symbol">&nbsp;</span><span class="special"><a href="/data/offlinelist">离线数据清单</a></span></li>
<li class="item"><span class="symbol">&nbsp;</span><span><a href="/data/submit">如何向数据中心提交数据</a></span></li>
<li class="item"><span class="symbol">&nbsp;</span><span><a href="/netkites/apply">申请移动IP文献查询服务</a></span></li>
</ul>
<div class="title">友情链接</div>
<ul>
<li class="item"><span class="symbol">&nbsp;</span><span><a href="http://heihe.westgis.ac.cn">数字黑河</a></span></li>
<li class="item"><span class="symbol">&nbsp;</span><span><a href="http://web.nuist.edu.cn/DQKX/nadsc/">南京大气资料服务中心</a></span></li>
<li class="item"><span class="symbol">&nbsp;</span><span><a href="http://www.sciencedata.cn">科学数据共享工程</a></span></li>
</ul>
<div class="title">&nbsp;</div>
<p class="subtitle">统计数据显示,目前本站:</p>
<ul>
<li class="item"><span class="symbol">&nbsp;</span>元数据 <strong>
<span><?php echo $this->metanum; ?></span></strong></li>
<li class="item"><span class="symbol">&nbsp;</span>在线数据 <strong><?php echo number_format($this->onlinesize/1000,2,'.',''); ?> GB</strong></li>
<li class="item"><span class="symbol">&nbsp;</span>总数据 <strong><?php echo number_format(($this->onlinesize+$this->offlinesize)/1000,2,'.',''); ?> GB</strong></li>
<li class="item"><span class="symbol">&nbsp;</span>总注册用户&nbsp;<strong><span><?php echo $this->usernum; ?></span> </strong>&nbsp;</li>
</ul>
</div>
<div id="rightPanel">
<div id="feature">
<div class="alpha-shadow">
<div><img src="/images/dataset.gif" alt="特色数据集光盘" style="border-width:1px;border-style:solid;" /></div>
</div>
<div class="title"><?= $this->feature['title']; ?></div>
<div class="description"><?= $this->feature['description']; ?>
<p><a href="<?= $this->feature['detailurl']; ?>">详细</a></p>
</div>
<div ><span id="links"> </span>
<span class="more"> <a href="/data/feature" >以往推荐</a></span>
</div>
</div>
<div id="itemCd">
<div class="alpha-shadow" id="image"><img src="<?= $this->datasetcd['img']; ?>" /></div>
<div id="title"><?= $this->datasetcd['title']; ?></div>
<div id="descript"><span id="intro">简介:</span><?= $this->datasetcd['descript']; ?></div>
<div id="link">
<?php if ($auth->hasIdentity()) : ?>
<a href="<?= $this->datasetcd['url'];?>">下载ISO文件</a>
<?php else: ?>
<a href="/account/login">请先登录后再下载ISO文件</a>
<?php endif; ?>
&nbsp;|&nbsp;<a href='<?= $this->datasetcd['document']; ?>' >此数据集的数据文档</a>&nbsp;|&nbsp;<a href="/data/datasetcd">更多特色数据集&gt;&gt;</a>
</div>
</div>
<div id="dataLink">
<?= $this->searchform; ?>
<a href="/data/advancesearch">高级搜索</a>
<a href="/data/datasetcd">特色数据集光盘</a>
</div>
<div id="contPane_services">
<div class="title"><span>数据服务</span></div>
<div class="contPane_services_container">
<div class="contPane_services_Item">
<a href="/data/newsletter">数据通讯</a>&nbsp;
<span>不定期发布数据通讯,通告中心动态、最新数据和工具</span><br />
-<span><a href='/images/newsletter/<?php echo $this->newsletter; ?>' target="_blank"><?php echo $this->newsletterno; ?>期数据通讯</a>
(pdf)</a> </span><br />
</div>
<div class="contPane_services_Item">
<a href="/data/service">用户服务</a><br />
-<span><a href="/data/offlineapp">最近20条离线数据服务记录</a></span><span style="font-weight:bold;color:Gray;">(<?= $this->offlinenum; ?>)</span>
</div>
<div class="contPane_services_Item">
<a href="/knowledge">文献服务</a>&nbsp;
<span>数据中心依托中科院资环信息中心提供西部环境与生态文献和文档服务</span><br />
-<span><a href="/knowledge/netkites">移动文献查询服务...</a></span>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,135 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->knowledge);
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/knowledge.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb($this->config->title->knowledge);
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="divContent">
<div id="leftPanel">
<div id="ssnavpanel">
<div class="title">导航</div>
<div class="ssnav">
<ul>
<li>
<a href="http://seekspace.resip.ac.cn/handle/2239/1">中国西部环境和生态科学研究计划 </a>
</li>
<li>
<a href="http://seekspace.resip.ac.cn/handle/2239/2">环境与生态科学期刊资源 </a>
</li>
<li>
<a href="http://seekspace.resip.ac.cn/handle/2239/12">环境与生态科学信息网关 </a>
</li>
<li>
<a href="http://seekspace.resip.ac.cn/handle/2239/13">环境与生态科学开放知识资源 </a>
</li>
<li>
<a href="http://seekspace.resip.ac.cn/handle/2239/2460">西部环境与生态科学文献库 </a>
</li>
<li>
<a href="http://seekspace.resip.ac.cn/handle/2239/23662">黑河流域研究 </a>
</li>
</ul>
</div>
</div>
<script type="text/javascript">
function dosubmit1()
{
location.href="http://seekspace.resip.ac.cn/simple-search?query="+document.getElementById("tquery").value;
}
</script>
<div class="title">搜索</div>
<div id="articlesearch">
<fieldset class="searchfildset"><legend>文章搜索</legend> <input name="query" id="tquery" type="text" value="" size="14" maxlength="100"/>
<input name="submit" type="button" id="Submit2" class="inputSubmit" value="Go" onclick="dosubmit1()" /> </fieldset>
</div>
<div id="ssshortcut">
<div class="title">快速入口</div>
<div class="ssnav">
<ul>
<li>
<a href="http://seekspace.resip.ac.cn/community-list">Communities & Collections </a>
</li>
<li>
<a href="http://seekspace.resip.ac.cn/browse-title">Browse by Titles</a>
</li>
<li>
<a href="http://seekspace.resip.ac.cn/browse-author">Browse by Authors</a>
</li>
<li>
<a href="http://seekspace.resip.ac.cn/browse-date">Browse by By Date</a>
</li>
</ul>
</div>
<div class="title">移动文献查询服务</div>
<div class="description">
<p>
&nbsp;&nbsp;移动文献查询服务采用先进的移动IP技术实现在外地接入代理服务器从而不受IP地址的限制阅读和查询文献。</p>
<p>
“西部数据中心”与<a href="http://www.llas.ac.cn/" target="_blank">中国科学院资源环境信息中心</a>签订协议购进一批NK—800型便携式移动文献查询客户端(即网筝),作为数据中心“知识积累平台”功能的一部分,免费提供给基金委“西部计划”项目成员使用。使用该网筝,用户可以无障碍地访问<a
href="http://www.llas.ac.cn" target="_blank">资环中心</a>订阅的丰富的国内外文献资源了。</p>
<p>
<a href="/knowledge/netkites/">&gt;&gt;详细内容</a></p>
</div>
</div>
</div>
<div id="rightPanel">
<div id="ssinfo">
<div id="ssimg"><a href="http://seekspace.resip.ac.cn" target="_blank"> <img alt="中国(西部)环境与生态科学知识积累平台" src="/images/ssimg.jpg" /></a></div>
<div id="sstext">
<div class="title">知识积累平台简介</div>
<p>中国西部环境与生态科学知识积累平台Sharing Environment and Ecology Knowledge Space以下简称SEEKSpace旨在发展和形成一个支持环境与生态科学领域开放学术信息的自助存档、交流和发现的领域知识平台。首先实现对国家自然科学基金委组织实施的“中国西部环境与生态科学研究计划”历年来所支持的研究项目和课题所产生的有重要科研和学术价值的知识产出进行统一组织和管理建立长期保存与开放持续利用的机制促进知识产出的共享利用扩大其影响和应用效益。其次支持对国内外环境与生态科学领域的各种有价值的开放性学术资源的集成利用特别是对有重要学术影响的研究性数字知识库主要是机构知识库也包括一些学科知识库和个人知识库所涉及的环境与生态科学领域的学术信息进行搜索、发现、聚集和再组织。</p>
<div id="ssmore"><a href="http://seekspace.resip.ac.cn" target="_blank">浏览详细</a> </div>
</div>
</div>
<div id="feature">
<div class="title">最近更新</div>
<div class="lastnews">
<ul>
<?php foreach($this->articles as $a) :
$u=parse_url($a['url']);
if ($u['host']=='hdl.handle.net')
$url=$this->config->seekspace->handleurl.$u['path'];
else
$url=$a['url'];
?>
<li>[<?= date('Y-m-d',strtotime($a['ts_created'])); ?>]<a class="itemTitle" href="<?= $url; ?>" target="_blank"><span><?= $a['title']; ?></span></a>
</li>
<?php endforeach; ?>
</ul>
</div>
</div>
<div id="knowledge">
<div class="title">西数百科</div>
<div class="lastq">
<div class="banner">
<div id="sectionq"><img src="/images/q.gif" alt=""/><span id="q">虚心请教</span></div>
<div id="sectiona"><img src="/images/a.gif" alt="" /><span id="a">与人分享</span></div>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,18 @@
<?php
$this->headTitle('元数据');
$this->headTitle('上传元数据');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/metadata.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/metadata">数据产品与服务</a>');
$this->breadcrumb('<a href="/metadata/batchimport">批量上传元数据</a>');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id='tools'>
<?= $this->partial('metadata/tools.phtml'); ?>
</div>
<div class="form">
<form method="POST">
<p>元数据所在目录含所有子目录的xml文件: <input type="text" name="directory"></p>
<input type="submit" value="导入元数据" />
</form></div>

View File

@ -0,0 +1,29 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->metadata);
$this->headTitle('全部浏览');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/metadata.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/metadata">数据产品与服务</a>');
$this->breadcrumb('<a href="/metadata/browse">全部浏览</a>');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id='tools'>
<?= $this->partial('metadata/tools.phtml'); ?>
</div>
<?php echo $this->page->getNavigation(); ?>
<?php foreach($this->metadata as $md) : ?>
<hr />
<div class="mditem">
<div class="thumb"><img src="/metadata/thumb/id/<?php echo $md['id'];?>" /></div>
<h2><a href="/metadata/view/id/<?php echo $md['id'];?>"><?php echo $this->escape($md['title']);?></a>
<a href="/metadata/delete/id/<?php echo $md['id'];?>"><img src="/images/del.gif" /></a>
<a href="/metadata/xml/id/<?php echo $md['id'];?>"><img src="/images/xml.gif" /></a>
<a href="/metadata/convert/format/iso19139/id/<?php echo $md['id'];?>"><img src="/images/iso19139.gif" /></a>
<a href="/metadata/convert/format/fgdc/id/<?php echo $md['id'];?>"><img src="/images/fgdc.gif" /></a>
<a href="/metadata/map/id/<?php echo $md['id']; ?>"><img src="/images/map.gif" /></a>
</h2>
<div class="summary"><?php echo str_replace(array("\r\n", "\n", "\r"),'<br />',mb_strlen($md['description'])>400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']));?></div>
</div>
<?php endforeach; ?>

View File

@ -0,0 +1,40 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->metadata);
$this->headTitle('分类浏览');
if (!empty($this->codename)) $this->headTitle($this->codename);
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/metadata.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/metadata">数据产品与服务</a>');
$this->breadcrumb('<a href="/metadata/category">分类浏览</a>');
if (!empty($this->codename)) $this->breadcrumb($this->codename);
$this->breadcrumb()->setSeparator(' > ');
?>
<div id='tools'>
<?= $this->partial('metadata/tools.phtml'); ?>
</div>
<div id='leftnav'>
<fieldset><legend>数据集类别</legend>
<ul>
<?php foreach($this->category as $cg) : ?>
<li><a href='/metadata/category/code/<?php echo $cg['code']; ?>'><?php (empty($cg['name_zh']))?print($cg['name']):print($cg['name_zh']); ?></a>(<?php echo $cg['count']; ?>)</li>
<?php endforeach; ?>
</ul></fieldset>
</div>
<div id='metacontent'>
<?php if (!empty($this->metadata)) : ?>
<h1>当前浏览分类:<?php echo $this->codename; ?></h1>
<?php foreach($this->metadata as $md) : ?>
<hr />
<div class="mditem">
<div class="thumb"><img src="/metadata/thumb/id/<?php echo $md['id'];?>" /></div>
<h2><a href="/metadata/view/id/<?php echo $md['id']; ?>"><?php echo $this->escape($md['title']);?></a>
<a href="/metadata/delete/id/<?php echo $md['id'];?>"><img src="/images/del.gif"></a>
</h2>
<span><?php echo mb_strlen($md['description'])>400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']);?></span>
</div>
<?php endforeach;
endif; ?>
</div>

View File

@ -0,0 +1,15 @@
<?php if ($this->md) :?>
<p>Are you sure that you want to delete this metadata:
<h2><?php echo $this->escape($this->md->title); ?></h2>
<?php echo $this->escape($this->md->description); ?>
</p>
<form action="<?php echo $this->url(array('action'=>'delete')); ?>" method="post">
<div>
<input type="hidden" name="id" value="<?php echo $this->md->id; ?>" />
<input type="submit" name="del" value="Yes" />
<input type="submit" name="del" value="No" />
</div>
</form>
<?php else: ?>
<p>Cannot find the metadata.</p>
<?php endif;?>

View File

@ -0,0 +1,24 @@
<?php
$this->headTitle('元数据');
$this->headTitle('上传元数据');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/metadata.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/metadata">数据产品与服务</a>');
$this->breadcrumb('<a href="/metadata/import">上传元数据</a>');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id='tools'>
<?= $this->partial('metadata/tools.phtml'); ?>
</div>
<div class="form">
<form enctype="multipart/form-data" method="POST">
<!-- MAX_FILE_SIZE must precede the file input field -->
<input type="hidden" name="MAX_FILE_SIZE" value="3000000" />
<!-- Name of input element determines name in $_FILES array -->
上传元数据文件: <br />
<input name="xmlfile[]" type="file" /><br />
<input name="xmlfile[]" type="file" /><br />
<input name="xmlfile[]" type="file" /><br />
<input type="submit" value="导入" />
</form></div>

View File

@ -0,0 +1,66 @@
<?php
$config = Zend_Registry::get('config');
$this->headTitle($config->title->site);
$this->headTitle($config->title->metadata);
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/metadata.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/metadata">数据产品与服务</a>');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id='tools'>
<?= $this->partial('metadata/tools.phtml'); ?>
</div>
<div id='leftContainer'>
<div id='category'>
<fieldset><legend>数据集类别</legend>
<ul>
<?php foreach($this->category as $cg) : ?>
<li><a href='/metadata/category/code/<?php echo $cg['code']; ?>'><?php (empty($cg['name_zh']))?print($cg['name']):print($cg['name_zh']); ?></a>(<?php echo $cg['count']; ?>)</li>
<?php endforeach; ?>
</ul></fieldset>
</div>
<div id='series'>
<fieldset><legend>数据集序列</legend>
<ul>
<?php foreach($this->serie as $cg) : ?>
<li><a href='/metadata/series/id/<?php echo $cg['id']; ?>'><?php echo $cg['name']; ?></a>(<?php echo $cg['count']; ?>)</li>
<?php endforeach; ?>
</ul></fieldset>
</div>
<div id='keyword'>
<?php
$keytypezh=array('place'=>'地点关键词','theme'=>'主题关键词','discipline'=>'学科关键词','stratum'=>'地层关键词','temporal'=>'时间关键词');
$type='';
foreach($this->keywords as $cg) :
if ($type!=$cg['keytype']) :
if ($type!='') : ?>
</ul></fieldset>
<?php endif;
$type=$cg['keytype'];
?>
<fieldset><legend><?php echo $keytypezh[$type]; ?></legend>
<ul>
<li><a href='/metadata/tag/key/<?php echo $cg['keyword']; ?>'><?php echo $cg['keyword']; ?></a>(<?php echo $cg['count']; ?>)</li>
<?php else : ?>
<li><a href='/metadata/tag/key/<?php echo $cg['keyword']; ?>'><?php echo $cg['keyword']; ?></a>(<?php echo $cg['count']; ?>)</li>
<?php endif; ?>
<?php endforeach; ?>
</ul>
</fieldset>
</div>
</div>
<div id='toolbox'>
</div>
<div id='latest'>
<div class="title">数据最新更新<a href="/metadata/rss" target="_blank"><img src="images/rss2.gif"></a></div>
<ul>
<?php foreach($this->metadata as $md) : ?>
<div class="mditem">
<li> <img src="/images/westdc_20w.gif" /> <a href="<?php echo $this->url(array('controller'=>'metadata',
'action'=>'view', 'id'=>$md['id']));?>"><?php echo $this->escape($md['title']);?></a> </li>
</div>
<?php endforeach; ?></ul>
</div>

View File

@ -0,0 +1,62 @@
<?php
//$config = Zend_Registry::get('config');
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->metadata);
$this->headTitle("空间浏览");
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/metadata.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/metadata">数据产品与服务</a>');
$this->breadcrumb('<a href="/metadata/tag">空间浏览</a>');
if (!empty($this->codename)) $this->breadcrumb($this->codename);
$this->breadcrumb()->setSeparator(' > ');
$this->headScript()->appendFile('/js/OpenLayers.js');
$this->headLink()->appendStylesheet('/js/theme/default/style.css');
?>
<script src='http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAACD-MqkkoOm60o_dvwdcKVhThiRESR0xRCe9JKd36EL3glTk0OxTsRzifkUWmTTrYWaE7dY1lYUlGxA'></script>
<div id='tools'>
<?= $this->partial('metadata/tools.phtml'); ?>
</div>
<div id='leftnav'>
</div>
<div id='map' style="clear:left;height:400px;border:1px;"></div>
<script type="text/javascript">
var map;
map = new OpenLayers.Map('map');
map.addControl(new OpenLayers.Control.LayerSwitcher());
var gphy = new OpenLayers.Layer.Google(
"Google Physical",
{type: G_PHYSICAL_MAP}
);
var gmap = new OpenLayers.Layer.Google(
"Google Streets" // the default
);
var ghyb = new OpenLayers.Layer.Google(
"Google Hybrid",
{type: G_HYBRID_MAP}
);
var gsat = new OpenLayers.Layer.Google(
"Google Satellite",
{type: G_SATELLITE_MAP}
);
var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'} );
map.addLayers([ol_wms,gphy, gmap, ghyb, gsat]);
map.setCenter(new OpenLayers.LonLat(102, 36), 4);
var ajax=new OpenLayers.Ajax.Request('/metadata/json<?php echo $this->params; ?>',{method:'get',onSuccess:featureresult});
function featureresult(response){
var feature1= eval('(' + response.responseText + ')');
//alert(feature1.type);
var geojson_format = new OpenLayers.Format.GeoJSON();
var vector_layer = new OpenLayers.Layer.Vector('metadata');
map.addLayer(vector_layer);
vector_layer.addFeatures(geojson_format.read(feature1));
var sf = new OpenLayers.Control.SelectFeature(vector_layer);
map.addControl(sf);
sf.activate();
}
</script>

View File

@ -0,0 +1,48 @@
<?php
$this->headTitle('元数据');
$this->headTitle('搜索');
if (!empty($this->codename)) $this->headTitle($this->codename);
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/metadata.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/metadata">数据产品与服务</a>');
$this->breadcrumb('<a href="/metadata/search">搜索</a>');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id='tools'>
<?= $this->partial('metadata/tools.phtml'); ?>
</div>
<script type="text/javascript">
function showadvance(){
var ad=document.getElementById('advance');
if ("block"==ad.style.display) {
ad.style.display='none';
} else {
ad.style.display='block';
}
}
</script>
<div class="form">
<form><input type="text" name="key" value="<?php echo $this->key; ?>">
<input type="submit" value="搜索" />
<input type="button" value="高级搜索" onClick="showadvance();"/>
<div id="advance" style="display:none;">
<input type="text" name="keyword">
</div>
</form>
</div>
<?php if (!empty($this->metadata)) : ?>
<?php echo $this->page->getNavigation();
foreach($this->metadata as $md) : ?>
<hr />
<div class="mditem">
<img src="/metadata/thumb/id/<?php echo $md['id'];?>" />
<h2><?php echo $this->escape($md['title']);?> <a href="<?php echo $this->url(array('controller'=>'metadata',
'action'=>'view', 'id'=>$md['id']));?>">View</a>
<a href="<?php echo $this->url(array('controller'=>'metadata',
'action'=>'delete', 'id'=>$md['id']));?>">Delete</a>
</h2>
<span><?php echo mb_strlen($md['description'])>400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']);?></span>
</div>
<?php endforeach; endif?>

View File

@ -0,0 +1,36 @@
<?php
$this->headTitle('元数据');
$this->headTitle('数据集序列');
$this->headTitle($this->codename);
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/metadata.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/metadata">数据产品与服务</a>');
$this->breadcrumb('<a href="/metadata/series">数据集浏览</a>');
if (!empty($this->codename)) $this->breadcrumb($this->codename);
$this->breadcrumb()->setSeparator(' > ');
?>
<div id='tools'>
<?= $this->partial('metadata/tools.phtml'); ?>
</div>
<div id='leftnav'>
<fieldset><legend>数据集序列</legend>
<ul>
<?php foreach($this->serie as $cg) : ?>
<li><a href='/metadata/series/id/<?php echo $cg['id']; ?>'><?php echo $cg['name']; ?></a>(<?php echo $cg['count']; ?>)</li>
<?php endforeach; ?>
</ul></fieldset></div>
<div id='metacontent'>
<?php if (!empty($this->metadata)) : ?>
<h1>当前浏览数据集序列:<?php echo $this->codename; ?></h1>
<?php foreach($this->metadata as $md) : ?>
<hr />
<div class="mditem">
<div class="thumb"><img src="/metadata/thumb/id/<?php echo $md['id'];?>" /></div>
<h2><a href="/metadata/view/id/<?php echo $md['id']; ?>"><?php echo $this->escape($md['title']);?></a>
<a href="/metadata/delete/id/<?php echo $md['id'];?>"><img src="/images/del.gif"></a>
</h2>
<span><?php echo mb_strlen($md['description'])>400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']);?></span>
</div>
<?php endforeach; endif; ?>
</div>

View File

@ -0,0 +1,51 @@
<?php
$config = Zend_Registry::get('config');
$this->headTitle($config->title->site);
$this->headTitle($config->title->metadata);
if (!empty($this->codename)) $this->headTitle($this->codename);
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/metadata.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/metadata">数据产品与服务</a>');
$this->breadcrumb('<a href="/metadata/tag">关键词浏览</a>');
if (!empty($this->codename)) $this->breadcrumb($this->codename);
$this->breadcrumb()->setSeparator(' > ');
?>
<div id='tools'>
<?= $this->partial('metadata/tools.phtml'); ?>
</div>
<div id='leftnav'>
<?php
$keytypezh=array('place'=>'地点关键词','theme'=>'主题关键词','discipline'=>'学科关键词','stratum'=>'地层关键词','temporal'=>'时间关键词');
$type='';
foreach($this->keywords as $cg) :
if ($type!=$cg['keytype']) :
if ($type!='') : ?>
</ul></fieldset>
<?php endif;
$type=$cg['keytype'];
?>
<fieldset><legend><?php echo $keytypezh[$type]; ?></legend>
<ul>
<li><a href='/metadata/tag/key/<?php echo $cg['keyword']; ?>'><?php echo $cg['keyword']; ?></a>(<?php echo $cg['count']; ?>)</li>
<?php else : ?>
<li><a href='/metadata/tag/key/<?php echo $cg['keyword']; ?>'><?php echo $cg['keyword']; ?></a>(<?php echo $cg['count']; ?>)</li>
<?php endif; ?>
<?php endforeach; ?>
</ul>
</fieldset></div>
<div id='metacontent'>
<?php if (!empty($this->metadata)) : ?>
<h1>当前浏览:<?php echo $this->codename; ?></h1>
<?php foreach($this->metadata as $md) : ?>
<hr />
<div class="mditem">
<div class="thumb"><img src="/metadata/thumb/id/<?php echo $md['id'];?>" /></div>
<h2><a href="/metadata/view/id/<?php echo $md['id']; ?>"><?php echo $this->escape($md['title']);?></a>
<a href="/metadata/delete/id/<?php echo $md['id']; ?>"><img src="/images/del.gif" alt="delete"></a>
</h2>
<span><?php echo mb_strlen($md['description'])>400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']);?></span>
</div>
<?php endforeach;
endif; ?>
</div>

View File

@ -0,0 +1,4 @@
<?php
header("Content-Type:image/jpeg");
print base64_decode($this->thumb->data);
?>

View File

@ -0,0 +1,87 @@
<?php
$config = Zend_Registry::get('config');
$this->headTitle($config->title->site);
$this->headTitle($config->title->metadata);
$this->headTitle('时间轴导航');
if (!empty($this->codename)) $this->headTitle($this->codename);
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/metadata.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/metadata">数据产品与服务</a>');
$this->breadcrumb('<a href="/metadata/timeline">时间轴导航</a>');
$this->breadcrumb()->setSeparator(' > ');
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="http://westdc.westgis.ac.cn/css/default.css" media="screen" rel="stylesheet" type="text/css">
<?php
echo $this->headTitle();
echo $this->headLink();
?>
<script src="http://simile.mit.edu/timeline/api/timeline-api.js" type="text/javascript"></script>
<script>
var tl;
var date = "Nov 22 2007 13:00:00";
var theme = Timeline.ClassicTheme.create();
theme.event.label.width = 250; // px
theme.event.bubble.width = 250;
theme.event.bubble.height = 200;
function onLoad() {
var eventSource = new Timeline.DefaultEventSource();
var bandInfos = [
Timeline.createBandInfo({
width: "70%",
intervalUnit: Timeline.DateTime.MONTH,
eventSource: eventSource,
date: date,
intervalPixels: 100,
theme: theme
}),
Timeline.createBandInfo({
width: "30%",
intervalUnit: Timeline.DateTime.YEAR,
eventSource: eventSource,
date: date,
showEventText: false,
intervalPixels: 200,
theme:theme
})
];
bandInfos[1].syncWith = 0;
bandInfos[1].highlight = true;
tl = Timeline.create(document.getElementById("tl"), bandInfos);
tl.loadXML("/time.xml", function(xml, url) {
eventSource.loadXML(xml, url);
});
}
var resizeTimerID = null;
function onResize() {
if (resizeTimerID == null) {
resizeTimerID = window.setTimeout(function() {
resizeTimerID = null;
tl.layout();
}, 500);
}
}
</script>
</head>
<body onload="onLoad();" onresize="onResize();">
<?= $this->partial('header.phtml'); ?>
<div class="clearLine"/> </div>
<div id="divBreadCrumb"><?= $this->breadcrumb() ?> </div>
<div id='tools'><?= $this->partial('metadata/tools.phtml'); ?></div>
<div id="divContent"> </div>
<div id="tl" class="timeline-default" style="clear:left;height: 400px;"> </div>
<div class="clearLine"/> </div>
<?= $this->partial('footer.phtml'); ?>
</body>
</html>

View File

@ -0,0 +1,10 @@
<ul><li><a href="/metadata/import">元数据上传</a></li>
<li><a href="/metadata/batchimport">元数据批量导入</a></li>
<li><a href="/metadata/tag">数据集关键词浏览</a></li>
<li><a href="/metadata/series">数据集序列浏览</a></li>
<li><a href="/metadata/category">数据集分类浏览</a></li>
<li><a href="/metadata/timeline">时间轴浏览</a></li>
<li><a href="/metadata/map">空间浏览</a></li>
<li><a href="/metadata/browse">浏览所有元数据</a></li>
<li><a href="/metadata/search">搜索元数据</a></li>
</ul>

View File

@ -0,0 +1,134 @@
<?php
$config = Zend_Registry::get('config');
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->metadata);
$this->headTitle('数据查看');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/metadata.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/metadata">数据产品与服务</a>');
$this->breadcrumb('查看元数据');
$this->breadcrumb()->setSeparator(' > ');
$this->headScript()->appendFile('/js/prototype.js');
$this->headScript()->appendFile('/js/OpenLayers.js');
$this->headLink()->appendStylesheet('/js/theme/default/style.css');
?>
<div id='tools'>
<?= $this->partial('metadata/tools.phtml'); ?>
</div>
<script src='http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAACD-MqkkoOm60o_dvwdcKVhThiRESR0xRCe9JKd36EL3glTk0OxTsRzifkUWmTTrYWaE7dY1lYUlGxA'></script>
<?php $md=$this->metadata;
if ($md):?>
<hr />
<div class="mditem">
<div class="thumb"><img src="/metadata/thumb/id/<?php echo $md->id;?>" /></div>
<div class="title"><?php echo $this->escape($md->title);?>
<a href="/metadata/delete/id/<?php echo $md->id;?>"><img src="/images/del.gif"></a>
<a href="/metadata/xml/id/<?php echo $md->id;?>"><img src="/images/xml.gif" alt="查看XML源文件"></a>
<a href="/metadata/convert/id/<?php echo $md->id;?>/format/fgdc"><img src="/images/fgdc.gif"></a>
<a href="/metadata/convert/id/<?php echo $md->id;?>/format/iso19139"><img src="/images/iso19139.gif"></a>
</div>
<div class="summary"><?php echo str_replace(array("\r\n", "\n", "\r"),'<br />',$this->escape($md->description));?></div>
<div id="leftnav">
<fieldset><legend>关键词</legend><ul>
<?php
foreach($this->keys as $cg) :
?>
<li><a href='/metadata/tag/key/<?php echo $cg->keyword; ?>'><?php echo $cg->keyword; ?></a></li>
<?php endforeach; ?>
</ul></fieldset>
<fieldset><legend>数据类别</legend><ul>
<?php foreach($this->category as $cat): ?>
<li><a href="/metadata/category/code/<?php echo $cat['code'];?>"><?php echo $this->escape($cat['name_zh']);?></a></li>
<?php endforeach; ?>
</ul></fieldset></div>
<?php if ($this->series): ?>
<fieldset><legend>数据集序列</legend><ul>
<?php foreach($this->series as $serie): ?>
<li><a href="/metadata/series/id/<?php echo $serie['id']; ?>"> <?php echo $this->escape($serie['name']);?></a></li>
<?php endforeach; ?>
</ul></fieldset>
<?php endif; ?>
</div>
<div id='map' style="clear:left;height:400px;width:500px;border:1px;"></div>
<script type="text/javascript">
var map;
map = new OpenLayers.Map('map');
map.addControl(new OpenLayers.Control.LayerSwitcher());
var gphy = new OpenLayers.Layer.Google(
"Google Physical",
{type: G_PHYSICAL_MAP}
);
var gmap = new OpenLayers.Layer.Google(
"Google Streets" // the default
);
var ghyb = new OpenLayers.Layer.Google(
"Google Hybrid",
{type: G_HYBRID_MAP}
);
var gsat = new OpenLayers.Layer.Google(
"Google Satellite",
{type: G_SATELLITE_MAP}
);
var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'} );
map.addLayers([ol_wms,gphy, gmap, ghyb, gsat]);
map.setCenter(new OpenLayers.LonLat(102, 36), 4);
var ajax=new OpenLayers.Ajax.Request('/metadata/json/id/<?php echo $md->id; ?>',{method:'get',onSuccess:featureresult});
function featureresult(response){
var feature1= eval('(' + response.responseText + ')');
//alert(feature1.type);
var geojson_format = new OpenLayers.Format.GeoJSON();
var vector_layer = new OpenLayers.Layer.Vector('metadata');
map.addLayer(vector_layer);
vector_layer.addFeatures(geojson_format.read(feature1));
//map.zoomToExtent(vector_layer.getExtent());
var sf = new OpenLayers.Control.SelectFeature(vector_layer);
map.addControl(sf);
sf.activate();
}
</script>
<script type="text/javascript">
function viewdetail(){
if (document.getElementById("detailbutton").value=="+显示详细元数据") {
document.getElementById("detailbutton").value="-关闭详细元数据显示";
document.getElementById("viewdetail").style.display="block";
var ajax=new Ajax.Request('/metadata/detail/id/<?php echo $md->id;?>',
{
method: 'get',
onSuccess: function (req) {
//alert(req.responseText);
var parent = $('viewdetail');
//clearNode(parent);
// create new element
var div = document.createElement('div');
//div.className = 'metadata_current';
//div.style.display = 'none';
//div.style.width = '100%';
parent.appendChild(div);
div.innerHTML = req.responseText;
}
});
} else {
document.getElementById("detailbutton").value="+显示详细元数据";
document.getElementById("viewdetail").style.display="none";
var parent=$('viewdetail');
clearNode(parent);
}
}
</script>
<form>
<input name="detailbutton" id="detailbutton" value="+显示详细元数据" type="button" onclick="viewdetail();"/></form>
<div id="viewdetail"></div>
<div id="comment"></div>
<?php else: ?>
<p>Cannot find the metadata.</p>
<?php endif;?>

View File

@ -0,0 +1,53 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->knowledge);
$this->headTitle($this->config->title->netkites);
$this->headTitle("申请");
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/netkites.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/knowledge">'.$this->config->title->knowledge.'</a>');
$this->breadcrumb('<a href="/knowledge/netkites">'.$this->config->title->netkites.'</a>');
$this->breadcrumb("申请");
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="divContent">
<div id="netkitesContainer">
<div class="title" style="padding-left:0px;">
如何获取移动文献查询服务?</div>
<div class="smallLinks">
<ul>
<li><a href="#s1">step.1. 检查您的申请资格</a> </li>
<li><a href="#s2">step 2. 认真阅读并填写使用协议</a></li>
<li><a href="#s3">step 3. 邮寄协议</a></li>
</ul>
</div>
<div class="content">
<p class="stepsTitle" id="s1">
Step 1. 检查您的申请资格</p>
<p>
由于资源有限,目前移动文献查询服务仅对基金委“西部环境和生态科学”计划(以下简称“西部计划”)内的项目开放。请确认您承担过或正在参与“西部计划” 项目,申请本移动文献服务(网筝)是为该项目服务,并已经征得该项目负责人的同意。</p>
<p class="stepsTitle" id="s2">
Step 2. 认真阅读并填写使用协议</p>
<p>
请认真阅读“西部数据中心”网筝使用协议。确认您仔细阅读过并同意协议上全部条款,本人签字,以及所在的“西部计划”项目的负责人签字后,盖所在单位公章,一式四份,邮寄其中两份到“西部数据中心”项目组。余下一份由项目负责人备案,一份由用户本人留存。</p>
<p>
下载<a href="/images/nk-contract.v1.2.pdf" target="_blank">使用协议</a>PDF版, 66KBPDF文件格式可由免费的<a
href="http://www.adobe.com/products/acrobat/readermain.html" target="_blank">Acrobat
Reader</a>阅读和打印</p>
<p class="stepsTitle" id="s3">
Step 3. 邮寄协议</p>
<p>
邮寄协议到如下地址</p>
<address>
基金委“中国西部环境与生态科学数据中心”项目数据服务组<br />
兰州东岗西路320号730000中科院寒区旱区环境与工程研究所</br> Tel: 0931-4967287</address>
</div>
</div>
</div>

View File

@ -0,0 +1,42 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->knowledge);
$this->headTitle($this->config->title->netkites);
$this->headTitle("安装程序");
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/netkites.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/knowledge">'.$this->config->title->knowledge.'</a>');
$this->breadcrumb('<a href="/knowledge/netkites">'.$this->config->title->netkites.'</a>');
$this->breadcrumb("安装程序");
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="divContent">
<div id="netkitesContainer">
<div style="float: right;">
<img src="/images/down.jpg" alt="下载"/></div>
<h1>
网筝NK—800最新安装程序</h1>
<p>
(size: 1.55M)</p>
<h2>
使用说明:</h2>
<p>
1. 如果本机器上已经安装有旧的驱动,请先卸载之。</p>
<p>
“开始”菜单 > 所有程序 > 捷通网筝NK—800 > 卸载网筝NK—800请一定要重启机器后再继续以下步骤。</p>
<p>
2. 下载<a href="/images/nk800-setup-20060927.rar">安装包</a>,使用<a href="http://www.winrar.com.cn/" target="_blank">WinRar</a> 解压缩到一临时目录如c:\nk-800。打开该临时目录找到Setup.exe双击。</p>
<p>
3. 安装程序将启动,按照屏幕提示,点击 “下一步(N)” ,直到完成安装。重启机器。</p>
<p>
4. 参照<a href="/knowledge/netkites/use" >使用说明</a>以了解如何使用移动文献查询服务。<a href="/knowledge/netkites/faq">FAQ页面</a>给出一些常见问题的解决方案。</p>
<p>&nbsp;</p>
</div>
</div>

View File

@ -0,0 +1,55 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->knowledge);
$this->headTitle($this->config->title->netkites);
$this->headTitle("FAQ列表");
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/netkites.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/knowledge">'.$this->config->title->knowledge.'</a>');
$this->breadcrumb('<a href="/knowledge/netkites">'.$this->config->title->netkites.'</a>');
$this->breadcrumb("FAQ列表");
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="divContent">
<div id="netkitesContainer">
<div class="title" style="padding-left:0px;">
网筝使用FAQFrequently Asked Questions列表</div>
<div class="smallLinks">
<ol>
<li><a href="#s1">我安装光盘上的驱动程序后,系统变的不稳定?</a> </li>
<li><a href="#s2">我用ADSL上网如果使用网筝则无法联网。</a></li>
<li><a href="#s3">我在校园网里通过学校代理出去,无法使用移动文献查询服务?</a></li>
</ol>
</div>
<div class="content">
<p class="stepsTitle" id="s1">
1. 我安装光盘上的驱动程序后,系统变的不稳定?</p>
<p>
网筝NK—800光盘随带的安装程序在Windows XP sp2环境下运行有些问题请从本站<a href="driver">下载最新驱动程序</a><strong>注意如果已经安装旧程序,请先卸载,重启后再安装新程序!</strong></p>
<p class="stepsTitle" id="s2">
2. 我用ADSL上网如果使用网筝则无法联网</p>
<p>
这是已知问题之一,在未来版本的安装程序里将解决此问题。目前请使用如下介绍的解决方案。</p>
<ol>
<li>打开“控制面板”上的“网络连接”在“LAN或高速Internet”里的“本地链接”上点击右键在弹出菜单里选取“属性”这时你将看到“本地连接 属性”对话框。</li>
<li>选择对话框里的“Internet 协议(TCP/IP)”点击“属性”按钮将看到“Internet 协议(TCP/IP) 属性”对话框。</li>
<li>选取“使用下面的IP地址”在其下的“IP地址”、“子网掩码”和“默认网关”里随便填比如分别填写“192.168.0.10”、 “255.255.255.0”和“192.168.0.1”。使用ADSL上网并不使用本地链接填写的IP但网筝程序在启动时会首先扫描本地链接的固定IP如果发现没有配置将返回失败。</li>
<li>选取“使用下面的DNS服务器地址”随便填写比如 210.77.69.1</li>
<li>确定以接受刚才的配置,注意在“本地链接 属性”对话框也应当是确定。</li>
<li>重新开始正常的网筝链接过程。</li></ol>
<p class="stepsTitle" id="s3">
3. 我在校园网里通过学校代理出去,无法使用移动文献查询服务?</p>
<p>
首先请确认在使用网筝时是否有“成功连接”的对话框出现如果没有请跟数据中心服务小组联系。如果能够出现“成功链接”的对话框但无法访问文献资源这可能是你学校的DNS有问题请打开你的“Internet 协议(TCP/IP)属性”对话框如FAQ 2所描述在DNS里增加“210.77.69.1”和“210.77.68.240”。确定后再试网筝是否已经可用。如果仍然不能解决,请联系数据中心服务小组。</p>
</div>
</div>
</div>

View File

@ -0,0 +1,32 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->knowledge);
$this->headTitle($this->config->title->netkites);
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/netkites.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/knowledge">'.$this->config->title->knowledge.'</a>');
$this->breadcrumb($this->config->title->netkites);
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="netkitesContainer">
<div class="title">
什么是移动文献查询服务?</div>
<div class="description">
<p>
&nbsp;&nbsp;移动文献查询服务采用先进的移动IP技术实现在外地接入代理服务器从而不受IP地址的限制阅读和查询文献。</p>
<p>
“西部数据中心”与<a href="http://www.llas.ac.cn/" target="_blank">中国科学院资源环境信息中心</a>签订协议购进一批NK—800型便携式移动文献查询客户端(即网筝),作为数据中心“知识积累平台”功能的一部分,免费提供给基金委“西部计划”项目成员使用。使用该网筝,用户可以无障碍地访问<a
href="http://www.llas.ac.cn" target="_blank">资环中心</a>订阅的丰富的国内外文献资源了。</p>
</div>
<div class="links">
<ul>
<li><a href="/knowledge/netkites/apply">申请客户端</a> </li>
<li><a href="/knowledge/netkites/driver">网筝安装程序</a></li>
<li><a href="/knowledge/netkites/resource">可访问资源列表</a></li>
<li><a href="/knowledge/netkites/use">使用说明</a></li>
<li><a href="/knowledge/netkites/faq">FAQ列表</a></li></ul>
</div>
</div>

View File

@ -0,0 +1,26 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->knowledge);
$this->headTitle($this->config->title->netkites);
$this->headTitle("可访问资源");
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/netkites.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/knowledge">'.$this->config->title->knowledge.'</a>');
$this->breadcrumb('<a href="/knowledge/netkites">'.$this->config->title->netkites.'</a>');
$this->breadcrumb("可访问资源");
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="divContent">
<div id="netkitesContainer">
<div class="title">
网筝NK800可访问文献资源</div>
<p>
网筝相当于一个移动代理,通过网筝您可以访问众多的文献资源。最新的文献资源列表可从中科院资环信息中心的<a href="http://www.llas.ac.cn/Resource.aspx"
target="_blank">资源列表</a>中得到。</p>
</div>
</div>

View File

@ -0,0 +1,97 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->knowledge);
$this->headTitle($this->config->title->netkites);
$this->headTitle("使用说明");
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/netkites.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/knowledge">'.$this->config->title->knowledge.'</a>');
$this->breadcrumb('<a href="/knowledge/netkites">'.$this->config->title->netkites.'</a>');
$this->breadcrumb("使用说明");
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="divContent">
<div id="netkitesContainer">
<h1>
一、安装</h1>
<h2>
1.1 系统配置</h2>
<p>
运行网筝NK-800客户端驱动程序所需系统最低配置如下</p>
<blockquote>
处理器PII 266MHz
<br />
内 存64M
<br />
网 卡10/100M
<br />
操作系统Microsoft Windows2000+SP4/XP+SP2/2003
</blockquote>
<h2>
1.2 安装步骤</h2>
<p class="important">
重要在安装驱动程序前请关闭杀毒程序。杀毒程序可能造成驱动程序安装不正确从而导致NK800程序无法正常工作。</p>
<p class="important">
请在插入网筝设备之前,先安装驱动程序。</p>
<p>
1) 插入NK800客户端光盘到用户的光驱。</p>
<p>
2) 在资源管理器打开光盘所在的盘符双击Setup.exe点击下一步。</p>
<p>
<img src="/images/image007.jpg" alt="欢迎使用" />&nbsp;</p>
<p>
3) 选择程序的安装位置,点击下一步,程序开始将需要的文件复制到用户的计算机。</p>
<p>
4) 在提示Microsoft数字签名信息时请点击“是(<span style="text-decoration: underline">Y</span>)”。</p>
<p>
<img src="/images/image013.jpg" alt="数字签名" />&nbsp;</p>
<p>
5) 当驱动程序安装完成时,请点击“完成”按钮。选择“是,立即重新启动计算机”,并点击“确定”按钮。</p>
<p>
<img src="/images/image017.jpg" alt="重启计算机" />&nbsp;</p>
<p>
6) 重新启动计算机之后必须保证电脑完全启动之后再运行网筝NK-800客户端驱动程序。</p>
<h1>
二、使用</h1>
<p>
1) 将网筝插入用户计算机的USB端口。点击NK800应用程序的图标。</p>
<p>
2) 系统提示“是否使用网筝硬件密码保护功能”点击是将启动密码保护功能其他人不知道密码的将无法使用该网筝设备。如果密码保护设置为“是”每次启动NK800将提示输入密码。点击“否”将略过密码配置。</p>
<p>
3) 网筝程序将试图连接服务器,并进行适当的参数设置、验证身份等工作。</p>
<p>
4) 连接成功后,将显示:</p>
<p>
<img src="/images/image029.jpg" alt="连接成功" />&nbsp;</p>
<p>
5) 连接成功后,程序界面会自动最小化到任务栏右下角的托盘内(或者点击<img src="/images/image031.jpg" style="vertical-align: middle"
alt="最小化图标" />使程序最小化)。</p>
<p class="important">
友情提示:如果提示网筝设备已经连接成功,表明在网络方面没有配置问题,如果网筝无法正常运行,可从其它方面入手分析原因。</p>
<h1>
三、卸载</h1>
<p>
1) 如果需要卸载网筝NK-800客户端驱动程序请用鼠标指向“开始”菜单选择“程序”、“捷通网筝NK-800”点击“卸载网筝NK-800”。如下图所示系统提示“将从计算机中删除网筝NK-800客户端程序是否继续”点击“是”按钮。</p>
<p>
<img src="/images/image045.jpg" alt="删除" />&nbsp;</p>
<p>
2) 卸载成功,点击“确定”按钮卸载完成。</p>
<p class="important">
网筝NK-800客户端驱动程序卸载完成后请重新启动计算机以确保系统配置信息的恢复。否则再次安装网筝NK-800客户端驱动程序时系统可能无法正常完成安装过程。</p>
<p>
&nbsp;</p>
</div>
</div>

View File

@ -0,0 +1,25 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<link rel="stylesheet" type="text/css" media="screen"
href="/css/default.css" />
<script src='/js/navi.js'></script>
<link rel="alternate" type="application/rss+xml" title="WestDC RSS Feed" href="/data/feed" />
<link rel="pingback" href="http://test.westgis.ac.cn/data/pingback" />
<?= $this->headTitle() ?>
<?= $this->headScript() ?>
<?= $this->headLink() ?>
<?= $this->headStyle() ?>
</head>
<body>
<?= $this->render('header.phtml') ?>
<div class="clearLine"/> </div>
<div id="divBreadCrumb"><?= $this->breadcrumb() ?> </div>
<div id="divContent"><?= $this->layout()->content ?></div>
<div class="clearLine"/> </div>
<?= $this->render('footer.phtml') ?>
<script type="text/javascript">setPage();</script>
</body>
</html>

View File

@ -0,0 +1,45 @@
<?php
//生成西部数据中心离线申请表
require_once('fpdf/chinese-unicode.php');
require_once('fpdi/fpdi.php');
class ApplicantPDF extends FPDI
{
public $template;//模板文件的路径
public $data;//包含具体的数据,数组
public $fontsize=10;
function drawWestdc()
{
$pagecount = $this->setSourceFile($this->template);
$tplidx = $this->importPage(1, '/MediaBox');
$this->addPage();
$this->useTemplate($tplidx);
$this->AddUniGBhwFont('ugb','AdobeSongStd-Light-Acro');
$this->SetFont('ugb','',$this->fontsize);
$this->setXY(45,65);
$this->Write($this->fontsize,$this->data['realname']);
$this->SetXY(34,80);
$this->MultiCell (0, 4, str_replace(";","\n",$this->data['datalist']));
$this->setXY(34,121);
$this->Write($this->fontsize,trim($this->data['project']));
$this->setXY(34,245);
$this->Write($this->fontsize,$this->data['realname']);
$this->setXY(34,252);
$this->Write($this->fontsize,$this->data['unit']);
$this->setXY(100,252);
$this->Write($this->fontsize,$this->data['address']);
$this->setXY(164,252);
$this->Write($this->fontsize,$this->data['postcode']);
$this->setXY(34,259);
$this->Write($this->fontsize,$this->data['email']);
$this->setXY(100,259);
$this->Write($this->fontsize,$this->data['phone']);
$t=getdate();
$this->setXY(163,259);
$this->Write($this->fontsize,$t['year']);
$this->setXY(176,259);
$this->Write($this->fontsize,$t['mon']);
$this->setXY(185,259);
$this->Write($this->fontsize,$t['mday']);
}
}
?>

View File

@ -0,0 +1,8 @@
<?php
/**
* category code abstract class
*/
class CategoryCodeTable extends Zend_Db_Table
{
protected $_name = 'categorycode';
}

View File

@ -0,0 +1,8 @@
<?php
/**
* category abstract class
*/
class CategoryTable extends Zend_Db_Table
{
protected $_name = 'category';
}

View File

@ -0,0 +1,60 @@
<?php
class CommentForm extends Zend_Form
{
public function __construct($options = null)
{
parent::__construct($options);
$this->setName('comment');
$author = new Zend_Form_Element_Text('author');
$author->setLabel('姓名')->setRequired(true)
->addFilter('StripTags') ->addFilter('StringTrim')
->addValidator('StringLength',false,array(3,50));
$email = new Zend_Form_Element_Text('email');
$email->setRequired(true)->setLabel('Email')
->addFilter('StringTrim')
->addValidator('NotEmpty')->addValidator('EmailAddress');
$url = new Zend_Form_Element_Text('url');
$url->addFilter('StringTrim')->setLabel('Website');
$content = new Zend_Form_Element_Textarea('content');
$content->addFilter('StringTrim')->setAttrib('cols',50)->setAttrib('rows',4)->addValidator('NotEmpty');
$spam=new element_bcSpamBlock('spam');
$spam->addPrefixPath('Validator','validator/','validate')
->addValidator('SpamBlock');
$id = new Zend_Form_Element_Hidden('id');
$uuid = new Zend_Form_Element_Hidden('uuid');
$redirect=new Zend_Form_Element_Hidden('redirect');
$submit = new Zend_Form_Element_Submit('submit');
$submit->setLabel('评论');
$submit->setAttrib('id', 'commentbutton');
$this->addElements(array($author,$email, $url, $spam, $content, $submit,$id, $uuid));
$this->clearDecorators();
$this->addDecorator('FormElements')
->addDecorator('HtmlTag', array('tag' => '<ul>','class'=>'commentform'))
->addDecorator('Form');
$this->setElementDecorators(array(
array('ViewHelper'),
array('Errors'),
array('Description'),
array('Label', array('separator'=>' ')),
array('HtmlTag', array('tag' => 'li', 'class'=>'element-group')),
));
// buttons do not need labels
$submit->setDecorators(array(
array('ViewHelper'),
array('Description'),
array('HtmlTag', array('tag' => 'li', 'class'=>'submit-group')),
));
}
}

View File

@ -0,0 +1,41 @@
<?php
class ContactForm extends Zend_Form
{
public function __construct($options = null)
{
parent::__construct($options);
$this->setName('Contact');
$username = new Zend_Form_Element_Text('username');
$username->setLabel('用户名')->setRequired(true)
->addFilter('StripTags') ->addFilter('StringTrim')
->addValidator('StringLength',false,array(3,50));
$email=new Zend_Form_Element_Text('email');
$email->setLabel('E-Mail')
->setRequired(true)
->addFilter('StringTrim')
->addValidator('NotEmpty')
->addValidator('EmailAddress');
$subject=new Zend_Form_Element_Text('subject');
$subject->setLabel('主题')->setRequired(true);
$body=new Zend_Form_Element_Textarea('body');
$body->setLabel('内容')->setRequired(true)->setAttrib('rows',4);
$id = new Zend_Form_Element_Hidden('id');
$submit = new Zend_Form_Element_Submit('submit');
$submit->setAttrib('id', 'submitbutton')->setLabel('发送');
$spam=new element_bcSpamBlock('spam');
$spam->addPrefixPath('Validator','validator/','validate')
->addValidator('SpamBlock');
$this->addElements(array($id, $spam,$username,$email,$subject,$body,$submit));
}
}

View File

@ -0,0 +1,73 @@
<?php
class CustomControllerAclManager extends Zend_Controller_Plugin_Abstract
{
// default user role if not logged or (or invalid role found)
private $_defaultRole = 'guest';
// the action to dispatch if a user doesn't have sufficient privileges
private $_authController = array('module'=>'','controller' => 'account',
'action' => 'login');
public function __construct(Zend_Auth $auth)
{
$this->auth = $auth;
$this->acl = new Zend_Acl();
// add the different user roles
$this->acl->addRole(new Zend_Acl_Role($this->_defaultRole));
$this->acl->addRole(new Zend_Acl_Role('member'));
$this->acl->addRole(new Zend_Acl_Role('administrator'), 'member');
// add the resources we want to have control over
$this->acl->add(new Zend_Acl_Resource('account'));
$this->acl->add(new Zend_Acl_Resource('data'));
$this->acl->add(new Zend_Acl_Resource('admin'));
// allow access to everything for all users by default
// except for the account management and administration areas
$this->acl->allow();
$this->acl->deny(null, 'account');
$this->acl->deny(null, 'admin');
// add an exception so guests can log in or register
// in order to gain privilege
$this->acl->allow('guest', 'account', array('login',
'fetchpassword',
'register',
'registercomplete'));
$this->acl->deny('guest','data',array('download','order'));
// allow members access to the account management area
$this->acl->allow('member', 'account');
// allows administrators access to the admin area
$this->acl->allow('administrator', 'admin');
}
/**
* preDispatch
*
* Before an action is dispatched, check if the current user
* has sufficient privileges. If not, dispatch the default
* action instead
*
* @param Zend_Controller_Request_Abstract $request
*/
public function preDispatch(Zend_Controller_Request_Abstract $request)
{
// check if a user is logged in and has a valid role,
// otherwise, assign them the default role (guest)
if ($this->auth->hasIdentity())
$role = $this->auth->getIdentity()->usertype;
else
$role = $this->_defaultRole;
if (!$this->acl->hasRole($role))
$role = $this->_defaultRole;
// the ACL resource is the requested controller name
$resource = $request->controller;
if ($request->module<>"default") $resource=$request->module;
// the ACL privilege is the requested action name
$privilege = $request->action;
// if we haven't explicitly added the resource, check
// the default global permissions
if (!$this->acl->has($resource))
$resource = null;
// access denied - reroute the request to the default action handler
if (!$this->acl->isAllowed($role, $resource, $privilege)) {
$request->setModuleName($this->_authController['module']);
$request->setControllerName($this->_authController['controller']);
$request->setActionName($this->_authController['action']);
}
}
}

Some files were not shown because too many files have changed in this diff Show More