merge heihedata branch r5010 - r5037 into metadata-en-2.0
This commit is contained in:
parent
cf27b73034
commit
b4c32e7a16
|
@ -1615,12 +1615,15 @@ class Admin_DataController extends Zend_Controller_Action
|
|||
|
||||
$redirect = "/admin/data/source/";
|
||||
|
||||
if(!empty($_POST['submit']))
|
||||
if(!empty($_POST['submit']) and $_POST['submit']==1)
|
||||
{
|
||||
try{
|
||||
$title = $this->_request->getParam('title');
|
||||
$uuid = $this->_request->getParam('uuid');
|
||||
$code = $this->_request->getParam('code');
|
||||
$admin_status = $this->_request->getparam('admin_status');
|
||||
$admin_email = '{'.implode(",",$this->_request->getparam('admin_email')).'}';
|
||||
$exclude_data = '{'.implode(",",$this->_request->getparam('exclude_data')).'}';
|
||||
$description = $this->_request->getParam('description');
|
||||
$has_pages = $this->_request->getParam('has_pages');
|
||||
$has_agreement = $this->_request->getParam('has_agreement');
|
||||
|
@ -1629,11 +1632,15 @@ class Admin_DataController extends Zend_Controller_Action
|
|||
'title' => $title,
|
||||
'uuid' => $uuid,
|
||||
'code' => $code,
|
||||
'admin_status' => $admin_status,
|
||||
'admin_email' => $admin_email,
|
||||
'exclude_data' => $exclude_data,
|
||||
'description' => $description,
|
||||
'has_pages' => $has_pages,
|
||||
'has_agreement' => $has_agreement
|
||||
);
|
||||
|
||||
# print_r($data);
|
||||
# exit();
|
||||
if($this->db->insert('source',$data))
|
||||
{
|
||||
$this->messenger->addMessage('添加来源信息成功');
|
||||
|
@ -1652,19 +1659,36 @@ class Admin_DataController extends Zend_Controller_Action
|
|||
else if($do == 'edit' && !empty($id))
|
||||
{
|
||||
|
||||
if(!empty($_POST['submit']))
|
||||
if(!empty($_POST['submit']) and $_POST['submit']==1)
|
||||
{
|
||||
try{
|
||||
$title = $this->_request->getParam('title');
|
||||
$uuid = $this->_request->getParam('uuid');
|
||||
$code = $this->_request->getParam('code');
|
||||
$admin_status = $this->_request->getparam('admin_status');
|
||||
$admin_email = '{'.implode(",",$this->_request->getparam('admin_email')).'}';
|
||||
$exclude_data = '{'.implode(",",$this->_request->getparam('exclude_data')).'}';
|
||||
$description = $this->_request->getParam('description');
|
||||
$has_pages = $this->_request->getParam('has_pages');
|
||||
$has_agreement = $this->_request->getParam('has_agreement');
|
||||
|
||||
$sql = "update source set title='$title',uuid='$uuid',code='$code',description='$description',has_pages='$has_pages',has_agreement='$has_agreement' where id='$id'";
|
||||
$data = array(
|
||||
'title' => $title,
|
||||
'uuid' => $uuid,
|
||||
'code' => $code,
|
||||
'admin_status' => $admin_status,
|
||||
'admin_email' => $admin_email,
|
||||
'exclude_data' => $exclude_data,
|
||||
'description' => $description,
|
||||
'has_pages' => $has_pages,
|
||||
'has_agreement' => $has_agreement
|
||||
);
|
||||
|
||||
$sql = "update source set title='$title',uuid='$uuid',code='$code',admin_status='$admin_status',admin_email='$admin_email',exclude_data='$exclude_data',description='$description',has_pages='$has_pages',has_agreement='$has_agreement' where id='$id'";
|
||||
# print_r($sql);
|
||||
# exit();
|
||||
if($this->db->exec($sql))
|
||||
|
||||
{
|
||||
$this->messenger->addMessage('修改来源信息成功');
|
||||
$this->_redirect("/admin/data/source/do/edit/id/$id");
|
||||
|
@ -2262,7 +2286,6 @@ class Admin_DataController extends Zend_Controller_Action
|
|||
|
||||
$files=new Files();
|
||||
$msg = $files -> upload($_FILES['Filedata'],empty($uuid)?'file/':'md/',true);
|
||||
|
||||
if(empty($msg['error']))
|
||||
{
|
||||
$msg['error']="";
|
||||
|
@ -2271,9 +2294,9 @@ class Admin_DataController extends Zend_Controller_Action
|
|||
$filedesc = $this->_request->getParam('filedesc');
|
||||
$filetype = 'md';
|
||||
$realname = $msg['realname'];
|
||||
$language = $this->_getParam('language');
|
||||
|
||||
|
||||
$sql = "insert into attachments (filename,filetype,filedesc,userid,filesize,realname) values ('$filename','$filetype','$filedesc','$userid','$filesize','$realname') RETURNING id";
|
||||
$sql = "insert into attachments (filename,filetype,filedesc,userid,filesize,realname,language) values ('$filename','$filetype','$filedesc','$userid','$filesize','$realname','$language') RETURNING id";
|
||||
$sth = $this->db->prepare($sql);
|
||||
$sth->execute();
|
||||
$att = $sth->fetch(PDO::FETCH_ASSOC);
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<a class="btn btn-primary btn-sm" href="attachments/search/my">查看我的附件</a>
|
||||
</div>
|
||||
<div class="input-group form-group" id="datalist">
|
||||
<form action="" method="get" class="search_form">
|
||||
<form action="" method="get" class="search_form input-group">
|
||||
<input class="form-control" type="text" name="keyword" value="<?php echo $this->keyword; ?>" placeholder="搜索关键字" />
|
||||
<input type="hidden" name="search" value='1' />
|
||||
<span class="input-group-btn"><button class="btn btn-default" type="submit" class="searchbtn" >搜索</button></span>
|
||||
|
|
|
@ -19,32 +19,53 @@
|
|||
<a class="btn btn-primary btn-sm" href="/data/<?php echo $this->uuid; ?>">查看元数据</a>
|
||||
<a class="btn btn-primary btn-sm" href="/admin/data/attachments/">返回附件管理</a>
|
||||
</div>
|
||||
<form action="#" method="POST" enctype='multipart/form-data'>
|
||||
<form action="#" method="POST" enctype='multipart/form-data' class="form-horizontal">
|
||||
<input type="hidden" name="add" value="1" />
|
||||
<input type="hidden" name="submit" value="1" />
|
||||
<p>
|
||||
注:可选择多个文件<br />
|
||||
<div id="datalist">
|
||||
<div class="form-group">
|
||||
<label for="doi" class="col-md-2 col-sm-2 control-label">请先选择附件语言:</label>
|
||||
<div class="col-md-2 col-sm-2">
|
||||
<select name="language" id="language" class="form-control">
|
||||
<option value="zh">zh</option>
|
||||
<option value="en">en</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="doi" class="col-md-2 col-sm-2 control-label">可选择多个文件:</label>
|
||||
<div class="col-md-6 col-sm-63">
|
||||
<input id="file_upload" name="Filedata" type="file" />
|
||||
</p>
|
||||
<div id="datalist"></div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style type="text/css">.uploadify{margin:0;} #file_upload-queue a:focus {outline:none;-moz-outline:none;}</style>
|
||||
<script>
|
||||
var _this = {
|
||||
SessionID: '<?php echo session_id(); ?>'
|
||||
};
|
||||
var uploader;
|
||||
var param;
|
||||
var param = {};
|
||||
param = {
|
||||
"PHPSESSID": _this.SessionID,
|
||||
"multi": 'yes'
|
||||
};
|
||||
|
||||
$("#language").click(function(){
|
||||
param.language = $("#language").val();
|
||||
});
|
||||
|
||||
$(function () {
|
||||
$('#file_upload').uploadify({
|
||||
'swf': '/js/lib/uploadify/uploadify.swf',
|
||||
'uploader': '/admin/data/upload/<?php if(!empty($this->uuid)) echo "uuid/".$this->uuid; ?>',
|
||||
'width': 155,
|
||||
'buttonText': '浏览',
|
||||
'debug': false,
|
||||
'preventCaching':false,
|
||||
'multi': true,
|
||||
'auto': true,
|
||||
'fileTypeExts': '*',
|
||||
|
@ -53,6 +74,7 @@
|
|||
},
|
||||
'onUploadStart': function (file) {
|
||||
$('#file_upload').uploadify('settings', 'formData', param);
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -63,11 +85,13 @@
|
|||
alert(_data.error);
|
||||
} else {
|
||||
$('#datalist').append(upload.makeFileHtml(_data));
|
||||
// console.log($("#language").val());
|
||||
//console.log(_data);
|
||||
}
|
||||
},
|
||||
makeFileHtml: function (data) {
|
||||
return '<div class="alert alert-success">'
|
||||
+ '<button type="button" class="close" data-dismiss="alert" onclick="upload.deleteFile(' + data.id + ')"><i class="icon-trash icon-white"></i></button>'
|
||||
+ '<button type="button" class="close" data-dismiss="alert" onclick="upload.deleteFile('+ data.id +')"><i class="glyphicon glyphicon-trash"></i></button>'
|
||||
+ '<a href="/service/attach/id/' + data.id + '">' + data.realname + '</a>'
|
||||
+ '<input type="hidden" name="attid" value="' + data.id + '"></input>'
|
||||
+ '</div>';
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<a class="btn btn-primary btn-sm" href="/admin/data/author/ac/datas">所有数据</a>
|
||||
</div>
|
||||
<div class="input-group form-group">
|
||||
<form id="datasearch" class="search_form" action="/admin/data/author/ac/datas">
|
||||
<form id="datasearch" class="search_form input-group" action="/admin/data/author/ac/datas">
|
||||
<input type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" class="form-control" placeholder="搜索关键字" />
|
||||
<span class="input-group-btn"><button type="submit" class="btn btn-default" id="search_btn">搜索</button></span>
|
||||
</form>
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<a class="btn btn-primary" href="/admin/data/author/ac/datas">所有数据</a>
|
||||
</div>
|
||||
<div class="input-group form-group">
|
||||
<form id="datasearch" class="search_form" action="/admin/data/author/ac/list">
|
||||
<form id="datasearch" class="search_form input-group" action="/admin/data/author/ac/list">
|
||||
<input type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" class="form-control" placeholder="搜索关键字" />
|
||||
<span class="input-group-btn"><button type="submit" class="btn btn-default" id="search_btn">搜索</button></span>
|
||||
</form>
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<a class="btn btn-primary btn-sm" href="/admin/data/author/ac/datas">所有数据</a>
|
||||
</div>
|
||||
<div class="input-group form-group">
|
||||
<form id="datasearch" class="search_form" action="/admin/data/author">
|
||||
<form id="datasearch" class="search_form input-group" action="/admin/data/author">
|
||||
<input type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" class="form-control" placeholder="搜索关键字" />
|
||||
<span class="input-group-btn"><button type="submit" class="btn btn-default" id="search_btn">搜索</button></span>
|
||||
</form>
|
||||
|
|
|
@ -80,16 +80,28 @@ $this->theme->AppendPlus($this,'colorbox');
|
|||
<input type="text" id="publisher_en" name="publisher_en" value="<?= isset($this->data['publisher_en']) ? $this->data['publisher_en']:"" ?>" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<?php if(empty($this->data['info']) || !is_array($this->data['info'])) {?>
|
||||
<div class="form-control infocontrol" id="info1">
|
||||
<label class="control-label" for="">数据作者信息</label>
|
||||
<div class="controls">
|
||||
<input type="text" name="info[1][author]" value="" placeholder="作者" />
|
||||
<input type="text" name="info[1][organization]" value="" placeholder="单位" />
|
||||
<input type="text" name="info[1][order]" value="" placeholder="排序" />
|
||||
<input type="text" name="info[1][author_en]" value="" placeholder="作者英文" />
|
||||
<input type="text" name="info[1][organization_en]" value="" placeholder="单位英文" />
|
||||
|
||||
<?php if(empty($this->data['info']) || !is_array($this->data['info'])) {?>
|
||||
<div class="form-group infocontrol" id="info1">
|
||||
<label class="col-md-2 col-sm-2 control-label" for="title_en">info</label>
|
||||
<div class="col-md-10 col-sm-10">
|
||||
<div class="controls row">
|
||||
<div class="col-md-2 col-sm-4">
|
||||
<input type="text" name="info[1][author]" value="" placeholder="作者" class="form-control"/>
|
||||
</div>
|
||||
<div class="col-md-2 col-sm-3">
|
||||
<input type="text" name="info[1][author_en]" value="" placeholder="作者英文" class="form-control"/>
|
||||
</div>
|
||||
<div class="col-md-1 col-sm-2">
|
||||
<input type="text" name="info[1][order]" value="" placeholder="排序" class="form-control"/>
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-7">
|
||||
<input type="text" name="info[1][organization]" value="" placeholder="单位" class="form-control"/>
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-6">
|
||||
<input type="text" name="info[1][organization_en]" value="" placeholder="单位英文" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php }else{ ?>
|
||||
|
@ -103,11 +115,12 @@ $this->theme->AppendPlus($this,'colorbox');
|
|||
<div class="col-sm-10">
|
||||
<div class="row">
|
||||
<div class="col-md-2 col-sm-4"><input class="form-control" type="text" name="info[<?= $k ?>][author]" value="<?= $v['author'] ?>" placeholder="作者" /></div>
|
||||
<div class="col-md-2 col-sm-4"><input class="form-control" type="text" name="info[<?= $k ?>][organization]" value="<?= $v['organization'] ?>" placeholder="作者英文" /></div>
|
||||
<div class="col-md-1 col-sm-2"><input class="form-control" type="text" name="info[<?= $k ?>][order]" value="<?= $v['order'] ?>" placeholder="排序" /></div>
|
||||
<div class="col-md-3 col-sm-6">
|
||||
<input class="form-control" type="text" name="info[<?= $k ?>][author_en]" value="<?= $v['author_en'] ?>" placeholder="单位" />
|
||||
|
||||
<div class="col-md-2 col-sm-3">
|
||||
<input class="form-control" type="text" name="info[<?= $k ?>][author_en]" value="<?= $v['author_en'] ?>" placeholder="作者英文" />
|
||||
</div>
|
||||
<div class="col-md-1 col-sm-2"><input class="form-control" type="text" name="info[<?= $k ?>][order]" value="<?= $v['order'] ?>" placeholder="排序" /></div>
|
||||
<div class="col-md-3 col-sm-7"><input class="form-control" type="text" name="info[<?= $k ?>][organization]" value="<?= $v['organization'] ?>" placeholder="单位" /></div>
|
||||
<div class="col-md-3 col-sm-6">
|
||||
<input class="form-control" type="text" name="info[<?= $k ?>][organization_en]" value="<?= $v['organization_en'] ?>" placeholder="单位英文" />
|
||||
</div>
|
||||
|
@ -151,9 +164,9 @@ function addinput(){
|
|||
html = '<div class="form-group infocontrol"><label class="col-md-2 col-sm-2 control-label">info</label>'
|
||||
+'<div class="col-sm-10"><div class="controls row">'
|
||||
+'<div class="col-md-2 col-sm-4"><input class="form-control" type="text" name="info[' + index + '][author]" placeholder="作者" /></div>'
|
||||
+'<div class="col-md-2 col-sm-4"><input class="form-control" type="text" name="info[' + index + '][author_en]" placeholder="作者英文" /></div>'
|
||||
+'<div class="col-md-2 col-sm-3"><input class="form-control" type="text" name="info[' + index + '][author_en]" placeholder="作者英文" /></div>'
|
||||
+'<div class="col-md-1 col-sm-2"><input class="form-control" type="text" name="info[' + index + '][order]" placeholder="排序" /></div>'
|
||||
+'<div class="col-md-3 col-sm-6"><input class="form-control" type="text" name="info[' + index + '][organization]" placeholder="单位" /></div>'
|
||||
+'<div class="col-md-3 col-sm-7"><input class="form-control" type="text" name="info[' + index + '][organization]" placeholder="单位" /></div>'
|
||||
+'<div class="col-md-3 col-sm-6"><input class="form-control" type="text" name="info[' + index + '][organization_en]" placeholder="单位英文" /></div>'
|
||||
+'<div class="col-md-1"><label class="control-label"><a href="javascript:void(0);" onclick="RmInput(this)"> -删除</a></label></div>'
|
||||
+'</div></div></div>';
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
</ul>
|
||||
</div>
|
||||
<div class="input-group form-group">
|
||||
<form id="datasearch" class="search_form" action="">
|
||||
<form id="datasearch" class="search_form input-group" action="">
|
||||
<input type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" class="form-control" placeholder="搜索关键字" />
|
||||
<span class="input-group-btn"><button class="btn btn-default" type="submit" id="search_btn">搜索</button></span>
|
||||
</form>
|
||||
|
|
|
@ -22,7 +22,7 @@ table thead tr th {background:#EBF2F6;}
|
|||
</div>
|
||||
|
||||
<div class="input-group form-group">
|
||||
<form id="datasearch" class="search_form" action="">
|
||||
<form id="datasearch" class="search_form input-group" action="">
|
||||
<input class="form-control" type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" />
|
||||
<span class="input-group-btn"><button type="submit" class="btn btn-default" id="search_btn">搜索</button></span>
|
||||
</form>
|
||||
|
|
|
@ -24,8 +24,8 @@ table thead tr th {background:#EBF2F6;}
|
|||
</div>
|
||||
<div>
|
||||
<div class="input-group form-group">
|
||||
<form id="datasearch" class="search_form" action="">
|
||||
<input class="form-control" type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" />
|
||||
<form id="datasearch" class="search_form input-group" action="">
|
||||
<input class="form-control" type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" placeholder="搜索关键字" />
|
||||
<input type="hidden" name="order" value="<?php if(!empty($this->search_order)) echo $this->search_order; ?>" />
|
||||
<input type="hidden" name="sort" value="<?php if(!empty($this->search_sort)) echo $this->search_sort; ?>" />
|
||||
<span class="input-group-btn"><button type="submit" class="btn btn-default" id="search_btn">搜索</button></span>
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
<!-- <div class="right_title">元数据管理</div> -->
|
||||
|
||||
<div class="input-group form-group">
|
||||
<form action="" method="get" class="search_form">
|
||||
<form action="" method="get" class="search_form input-group">
|
||||
<input class="form-control" type="text" name="keyword" value="<?php echo $this->keyword; ?>" placeholder="搜索关键字" />
|
||||
<input type="hidden" name="search" value="1"/>
|
||||
<span class="input-group-btn"><button class="btn btn-default" value="搜索">搜索</button></span>
|
||||
|
@ -43,8 +43,7 @@
|
|||
<?php foreach ($this->paginator as $item): ?>
|
||||
<li class="well well-sm">
|
||||
<h4><a href="/data/<?= $item['uuid']; ?>" class="title"><?= $item['title']; ?></a></h4>
|
||||
<p>大小:<?= $item['filesize']; ?>M,创建时间:<?= date('Y-m-d',strtotime($item['ts_created'])); ?>,查看:<?= $item['viewed']; ?>次。</p>
|
||||
<p>
|
||||
<p>大小:<?= $item['filesize']; ?>M,创建时间:<?= date('Y-m-d',strtotime($item['ts_created'])); ?>,查看:<?= $item['viewed']; ?>次。</p> <p>
|
||||
操作:
|
||||
<?php if ($item['gid']>0) : ?>
|
||||
<a class="label label-primary" href="/service/geonetwork?url=metadata.edit?id=<?= $item['gid']; ?>" target="_blank">编辑</a>
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
</div>
|
||||
<div id="datalist" class="input-group form-group">
|
||||
<h2>根据已有数据创建元数据</h2>
|
||||
<form id="datasearch" class="search_form" action="/admin/data/newdata/ac/add-by-data">
|
||||
<input class="form-control" type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" />
|
||||
<form id="datasearch" class="search_form input-group" action="/admin/data/newdata/ac/add-by-data">
|
||||
<input class="form-control" type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" placeholder="搜索关键字"/>
|
||||
<span class="input-group-btn"><button type="submit" class="btn btn-default" id="search_btn">搜索</button></span>
|
||||
</form>
|
||||
<?php
|
||||
|
|
|
@ -29,8 +29,8 @@ $this->breadcrumb()->setSeparator(' > ');
|
|||
</div>
|
||||
<div id="datalist" class="input-group form-group">
|
||||
<h2>根据预制元数据模板创建数据</h2>
|
||||
<form id="datasearch" class="search_form" action="/admin/data/newdata/ac/add-by-template">
|
||||
<input class="form-control" type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" />
|
||||
<form id="datasearch" class="search_form input-group" action="/admin/data/newdata/ac/add-by-template">
|
||||
<input class="form-control" type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" placeholder="搜索关键字"/>
|
||||
<span class="input-group-btn"><button type="submit" class="btn btn-default" id="search_btn">搜索</button></span>
|
||||
</form>
|
||||
<?php
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<div class="col-md-10 col-sm-12">
|
||||
<?php if(!empty($this->searchLink)){ ?>
|
||||
<div class="input-group form-group">
|
||||
<form id="datasearch" class="search_form" action="<?= $this->searchLink ?>">
|
||||
<form id="datasearch" class="search_form input-group" action="<?= $this->searchLink ?>">
|
||||
<input class="form-control" type="text" id="keyword" name="q" value="<?= $this->searchKeyword; ?>" placeholder="搜索关键字" />
|
||||
<span class="input-group-btn"><button type="submit" class="btn btn-default" id="search_btn">搜索</button></span>
|
||||
</form>
|
||||
|
|
|
@ -23,8 +23,8 @@ table thead tr th {background:#EBF2F6;}
|
|||
<div>
|
||||
<p></p>
|
||||
<div class="input-group form-group">
|
||||
<form id="datasearch" class="search_form" action="">
|
||||
<input class="form-control" type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" />
|
||||
<form id="datasearch" class="search_form input-group" action="">
|
||||
<input class="form-control" type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" placeholder="搜索关键字" />
|
||||
<span class="input-group-btn"><button type="submit" class="btn btn-default" id="search_btn">搜索</button></span>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
<?= $this->partial('data/ref-nav.phtml',array('ac'=>$this->ac,'uuid'=>$this->uuid)); ?>
|
||||
</div>
|
||||
<div class="input-group form-group">
|
||||
<form id="datasearch" class="search_form" action="">
|
||||
<input type="text" class="form-control" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" />
|
||||
<form id="datasearch" class="search_form input-group" action="">
|
||||
<input type="text" class="form-control" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" placeholder="搜索关键字" />
|
||||
<input type="hidden" name="order" value="<?php if(!empty($this->search_order)) echo $this->search_order; ?>" />
|
||||
<input type="hidden" name="sort" value="<?php if(!empty($this->search_sort)) echo $this->search_sort; ?>" />
|
||||
<span class="input-group-btn"><button type="submit" class="btn btn-default" id="search_btn">搜索</button></span>
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
<a class="btn btn-primary btn-sm" href="/admin/data/source/do/sync">同步项目来源(以此处为准)</a>
|
||||
</div>
|
||||
<div class="input-group form-group">
|
||||
<form action="" method="get" class="search_form">
|
||||
<form action="" method="get" class="search_form input-group">
|
||||
<input type="text" class="q form-control" name="q" value="<?php echo $this->q; ?>" placeholder="搜索关键字" class="form-control" />
|
||||
<input type="hidden" name="search" value='1' />
|
||||
<input type="hidden" name="id" value='<?php echo $this->id;?>' />
|
||||
|
@ -42,16 +42,22 @@
|
|||
<thead>
|
||||
<tr>
|
||||
<td width='40%'>标题</td>
|
||||
<td width='30%'>Code字符</td>
|
||||
<td width='15%'>Code字符</td>
|
||||
<td width='15%'>项目管理机构</td>
|
||||
<td width='30%'>操作</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php if (count($this->paginator)): ?>
|
||||
<tbody id="list">
|
||||
<?php foreach ($this->paginator as $item): ?>
|
||||
|
||||
<?php
|
||||
$admin_status=array(0=>"暂无管理机构",1=>"由专家委员会进行管理",2=>"委托数据中心进行管理");
|
||||
?>
|
||||
<tr>
|
||||
<td><a href="/admin/data/source/do/fetch/id/<?php echo $item['id']?>"><?php echo $item['title']; ?></a></td>
|
||||
<td><span><?php echo $item['code'];?></span></td>
|
||||
<td><span><?php echo $admin_status[$item['admin_status']];?></span></td>
|
||||
<td>
|
||||
<a href="/admin/data/source/do/edit/id/<?php echo $item['id']?>">查看编辑</a>|
|
||||
<a href="/admin/data/source/do/fetch/id/<?php echo $item['id']?>">查看元数据</a>|
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
$this->breadcrumb('项目来源管理');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
|
||||
<div class="row">
|
||||
<div class="hidden-sm hidden-xs col-md-2">
|
||||
<?= $this->partial('data/left.phtml'); ?>
|
||||
|
@ -37,21 +38,86 @@
|
|||
<input class="form-control" type="text" name="title" value="<?php echo $this->info['title'];?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 col-sm-2 control-label">uuid:</label>
|
||||
<div class="col-md-4 col-sm-4">
|
||||
<input class="form-control" type="text" name="uuid" value="<?php echo $this->info['uuid'];?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 col-sm-2 control-label">Code:</label>
|
||||
<div class="col-md-4 col-sm-4">
|
||||
<input class="form-control" type="text" name="code" value="<?php echo $this->info['code'];?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 col-sm-2 control-label">项目管理机构</label>
|
||||
<div class="col-md-2 col-sm-2">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="admin_status" value="0" <?php if(empty($this->info['admin_status']) | $this->info['admin_status'] =='0') echo 'checked="checked"';?> />
|
||||
暂无管理机构 </label>
|
||||
</div>
|
||||
<div class="col-md-2 col-sm-2">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="admin_status" value="1" <?php if($this->info['admin_status']=='1') echo 'checked="checked"';?> />
|
||||
由专家委员会管理 </label>
|
||||
</div>
|
||||
<div class="col-md-2 col-sm-2">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="admin_status" value="2" <?php if($this->info['admin_status']=='2') echo 'checked="checked"';?> />
|
||||
委托数据中心管理 </label>
|
||||
</div>
|
||||
</div>
|
||||
<?php if(!empty($this->info['admin_email'])) {
|
||||
# 去除数组数据中的{}
|
||||
$emailarry = explode(',',substr($this->info['admin_email'],1,-1));
|
||||
$uuidarry = explode(',',substr($this->info['exclude_data'],1,-1));
|
||||
|
||||
?>
|
||||
<div id="emails">
|
||||
<?php foreach($emailarry as $email):?>
|
||||
<div class="form-group subemail">
|
||||
<label class="col-md-2 col-sm-2 control-label">管理邮箱</label>
|
||||
<div class="col-md-4 col-sm-4">
|
||||
<input class="form-control" type="text" name="admin_email[]" value="<?php echo $email;?>" />
|
||||
</div>
|
||||
<div class="col-md-1 col-sm-1"><a href="javascript:void(0);" onclick="addemail()" class="glyphicon glyphicon-plus "></a> <a href="javascript:void(0);" onclick="rminput(this)" class="glyphicon glyphicon-minus "></a></div>
|
||||
</div>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
|
||||
<div id="plusuuid">
|
||||
<?php foreach($uuidarry as $uuid):?>
|
||||
<div class="form-group subuuid">
|
||||
<label class="col-md-2 col-sm-2 control-label">不管理数据UUID:</label>
|
||||
<div class="col-md-4 col-sm-4">
|
||||
<input class="form-control" type="text" name="exclude_data[]" value="<?php echo $uuid;?>" />
|
||||
</div>
|
||||
<div class="col-md-1 col-sm-1"><a href="javascript:void(0);" onclick="adduuid()" class="glyphicon glyphicon-plus "></a> <a href="javascript:void(0);" onclick="rminput(this)" class="glyphicon glyphicon-minus "></a></div>
|
||||
</div>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
<?php }else{ ?>
|
||||
<div id="emails">
|
||||
<div class="form-group subemail">
|
||||
<label class="col-md-2 col-sm-2 control-label">管理邮箱</label>
|
||||
<div class="col-md-4 col-sm-4">
|
||||
<input class="form-control" type="text" name="admin_email[]" />
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 col-sm-1"><a href="javascript:void(0);" onclick="addemail()" class="glyphicon glyphicon-plus "></a> <a href="javascript:void(0);" onclick="rminput(this)" class="glyphicon glyphicon-minus "></a></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="plusuuid">
|
||||
<div class="form-group subuuid">
|
||||
<label class="col-md-2 col-sm-2 control-label">不管理数据UUID:</label>
|
||||
<div class="col-md-4 col-sm-4">
|
||||
<input class="form-control" type="text" name="exclude_data[]" />
|
||||
</div>
|
||||
<div class="col-md-1 col-sm-1"><a href="javascript:void(0);" onclick="adduuid()" class="glyphicon glyphicon-plus "></a> <a href="javascript:void(0);" onclick="rminput(this)" class="glyphicon glyphicon-minus "></a></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php }?>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 col-sm-2 control-label">描述</label>
|
||||
<div class="col-md-4 col-sm-4">
|
||||
|
@ -60,35 +126,32 @@
|
|||
</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 col-sm-2 control-label">has_pages</label>
|
||||
<div class="col-md-2 col-sm-2">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="has_pages" value="true" <?php if($this->info['has_pages']) echo 'checked="checked"';?> />True
|
||||
</label>
|
||||
<input type="radio" name="has_pages" value="true" <?php if($this->info['has_pages']) echo 'checked="checked"';?> />
|
||||
True </label>
|
||||
</div>
|
||||
<div class="col-md-2 col-sm-2">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="has_pages" value="false" <?php if(!$this->info['has_pages']) echo 'checked="checked"';?> />False
|
||||
</label>
|
||||
<input type="radio" name="has_pages" value="false" <?php if(!$this->info['has_pages']) echo 'checked="checked"';?> />
|
||||
False </label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 col-sm-2 control-label">has_agreement</label>
|
||||
<div class="col-md-2 col-sm-2">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="has_agreement" value="true" <?php if($this->info['has_agreement']) echo 'checked="checked"';?> />True
|
||||
</label>
|
||||
<input type="radio" name="has_agreement" value="true" <?php if($this->info['has_agreement']) echo 'checked="checked"';?> />
|
||||
True </label>
|
||||
</div>
|
||||
<div class="col-md-2 col-sm-2">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="has_agreement" value="false" <?php if(!$this->info['has_agreement']) echo 'checked="checked"';?> />False
|
||||
</label>
|
||||
<input type="radio" name="has_agreement" value="false" <?php if(!$this->info['has_agreement']) echo 'checked="checked"';?> />
|
||||
False </label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-6 col-sm-6">
|
||||
<input type="hidden" name="id" value="<?php echo $this->info['id'];?>" />
|
||||
|
@ -100,3 +163,31 @@
|
|||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function addemail(){
|
||||
$("#emails").append('<div class="form-group subemail">'
|
||||
+'<label class="col-md-2 col-sm-2 control-label">管理邮箱</label>'
|
||||
+'<div class="col-md-4 col-sm-4">'
|
||||
+'<input class="form-control" type="text" name="admin_email[]" value="" />'
|
||||
+'</div>'
|
||||
+'<div class="col-md-1 col-sm-1"><a href="javascript:void(0);" onclick="addemail()" class="glyphicon glyphicon-plus "></a> <a href="javascript:void(0);" onclick="rminput(this)" class="glyphicon glyphicon-minus "></a></div>'
|
||||
+'</div>');
|
||||
}
|
||||
|
||||
function adduuid(){
|
||||
$("#plusuuid").append('<div class="form-group subuuid">'
|
||||
+'<label class="col-md-2 col-sm-2 control-label">不管理数据UUID:</label>'
|
||||
+'<div class="col-md-4 col-sm-4">'
|
||||
+'<input class="form-control" type="text" name="exclude_data[]" value="" />'
|
||||
+'</div>'
|
||||
+'<div class="col-md-1 col-sm-1"><a href="javascript:void(0);" onclick="adduuid()" class="glyphicon glyphicon-plus "></a> <a href="javascript:void(0);" onclick="rminput(this)" class="glyphicon glyphicon-minus "></a></div>'
|
||||
+'</div>');
|
||||
}
|
||||
|
||||
function rminput(e){
|
||||
$e = $(e);
|
||||
$e.parent().parent().remove();
|
||||
};
|
||||
|
||||
</script>
|
|
@ -31,7 +31,7 @@
|
|||
<div class="search">
|
||||
<form action="" method="get">
|
||||
<input type="hidden" name="search" value='1' />
|
||||
<input type="hidden" name="id" value='<?php echo $this->id;?>' />
|
||||
<input type="hidden" name="id" value='<?php echo $this->id;?>' placeholder="搜索关键字"/>
|
||||
<label>搜索关键字</label><input type="text" class="q" name="q" value="<?php echo $this->q; ?>" />
|
||||
<input type="submit" class="btn" value="搜索" />
|
||||
</form>
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
<?php endif; ?>
|
||||
<p>为元数据《<?php echo $this->info['title'];?>》选择项目来源</p>
|
||||
<div class="input-group">
|
||||
<form method="get" action="">
|
||||
<form method="get" action="" class="input-group">
|
||||
<input type="text" value="" placeholder="搜索关键字" name="q" class="form-control q">
|
||||
<span class="input-group-btn"><input type="submit" value="搜索" class="btn btn-default"></span>
|
||||
</form>
|
||||
|
|
|
@ -20,11 +20,11 @@
|
|||
<div class="col-md-10 col-sm-12">
|
||||
<div class="form-group">
|
||||
<a class="btn btn-primary btn-sm" href="/admin/data/version">所有版本概况</a>
|
||||
<a class="btn btn-primary btn-sm"><a href="/admin/data/version/ac/bydata">逐数据浏览</a>
|
||||
<a class="btn btn-primary btn-sm" href="/admin/data/version/ac/bydata">逐数据浏览</a>
|
||||
</div>
|
||||
<div class="input-group form-group">
|
||||
<form id="datasearch" class="search_form" action="/admin/data/version/ac/bydata">
|
||||
<input class="form-control" type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" />
|
||||
<form id="datasearch" class="search_form input-group" action="/admin/data/version/ac/bydata">
|
||||
<input class="form-control" type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" placeholder="搜索关键字" />
|
||||
<span class="input-group-btn"><button type="submit" class="btn btn-default" id="search_btn">搜索</button></span>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
<h4 class="right_title"><?php if(!empty($this->title)) echo $this->title;?>共 <?php echo $this->count;?> 数据下载记录</h4>
|
||||
<hr />
|
||||
<div class="input-group form-group">
|
||||
<form action="/admin/down/data/" method="get">
|
||||
<form action="/admin/down/data/" method="get" class="input-group">
|
||||
<input type="text" name="keyword" value="<?php echo $this->keyword; ?>" class="form-control" placeholder="搜索关键字"/>
|
||||
<input type="hidden" name="search" value='1' />
|
||||
<span class="input-group-btn"><input type="submit" class="btn btn-default" value="搜索" /></span>
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
<a href="/admin/down/offline/monthreport/1" class="btn btn-primary btn-sm">下载上月服务记录(科技部上报)</a>
|
||||
</div>
|
||||
<div class="input-group form-group">
|
||||
<form id="datasearch" class="search_form" action="">
|
||||
<form id="datasearch" class="search_form input-group" action="">
|
||||
<input type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" class="form-control" placeholder="搜索关键字" />
|
||||
<input type="hidden" name="order" value="<?php if(!empty($this->search_order)) echo $this->search_order; ?>" />
|
||||
<input type="hidden" name="sort" value="<?php if(!empty($this->search_sort)) echo $this->search_sort; ?>" />
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
</div>
|
||||
<?php endif; ?>
|
||||
<!-- <h4>离线数据申请管理</h4> -->
|
||||
<div class="input-group form-group">
|
||||
<div class="form-group">
|
||||
<a href="/admin/down/offlineapp/reset/-1" onclick="return confirm('是否重置该申请?')" class="btn btn-danger">重置1年前的所有未收到申请表的记录</a>
|
||||
<a href="/admin/down/offlineapp/status/4" class="btn btn-info">已收到的申请</a>
|
||||
<a href="/admin/down/offlineapp/status/-1" class="btn btn-warning">已拒绝的申请</a>
|
||||
|
@ -35,7 +35,7 @@
|
|||
</div>
|
||||
|
||||
<div class="input-group form-group">
|
||||
<form id="datasearch" class="search_form" action="">
|
||||
<form id="datasearch" class="search_form input-group" action="">
|
||||
<input type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" class="form-control" placeholder="搜索关键字"/>
|
||||
<input type="hidden" name="order" value="<?php if(!empty($this->search_order)) echo $this->search_order; ?>" />
|
||||
<input type="hidden" name="sort" value="<?php if(!empty($this->search_sort)) echo $this->search_sort; ?>" />
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<div class="col-md-10 col-sm-12">
|
||||
<h4 class="right_title"><?php if(!empty($this->title)) echo $this->title;?>共有 <?php echo $this->count;?> 条在线下载记录</h4><hr />
|
||||
<div class="input-group form-group">
|
||||
<form action="/admin/down/search/" method="get" class="search_form">
|
||||
<form action="/admin/down/search/" method="get" class="search_form input-group">
|
||||
<input type="text" name="keyword" value="<?php echo $this->keyword; ?>" class="form-control" placeholder="搜索关键字" />
|
||||
<input type="hidden" name="search" value='1' />
|
||||
<span class="input-group-btn"><input class="btn btn-default" type="submit" class="searchbtn" value="搜索" /></span>
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
<h4 class="right_title"><?php if(!empty($this->title)) echo $this->title;?>共 <?php echo $this->count;?> 数据下载记录</h4>
|
||||
<hr />
|
||||
<div class="input-group form-group">
|
||||
<form action="/admin/down/user/" method="get">
|
||||
<form action="/admin/down/user/" method="get" class="input-group">
|
||||
<input type="text" name="keyword" value="<?php echo $this->keyword; ?>" class="form-control" placeholder="搜索关键字" />
|
||||
<input type="hidden" name="search" value='1' />
|
||||
<span class="input-group-btn"><input type="submit" class="btn btn-default" value="搜索" /></span>
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
<div id="col-md-10 col-sm-12">
|
||||
<?php if(!empty($this->searchLink)){ ?>
|
||||
<div class="input-group form-group">
|
||||
<form id="datasearch" class="search_form" action="<?= $this->searchLink ?>">
|
||||
<input class="form-control" type="text" id="keyword" name="q" value="<?= $this->searchKeyword; ?>" />
|
||||
<form id="datasearch" class="search_form input-group" action="<?= $this->searchLink ?>">
|
||||
<input class="form-control" type="text" id="keyword" name="q" value="<?= $this->searchKeyword; ?>" placeholder="搜索关键字" />
|
||||
<span class="input-group-btn"><button type="submit" class="btn btn-default" id="search_btn">搜索</button></span>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="input-group form-group">
|
||||
<form action="" method="get" class="search_form">
|
||||
<form action="" method="get" class="search_form input-group" class="input-group">
|
||||
<input type="text" name="keyword" class="q form-control" value="<?php echo $this->keyword; ?>" placeholder="搜索关键字" />
|
||||
<input type="hidden" name="search" value='1' />
|
||||
<span class="input-group-btn"><button type="submit" class="btn btn-default">搜索</button></span>
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="input-group form-group">
|
||||
<form action="" method="get">
|
||||
<form action="" method="get" class="input-group">
|
||||
<input type="text" class="q form-control" name="keyword" value="<?php echo $this->keyword; ?>" placeholder="搜索关键字" />
|
||||
<input type="hidden" name="search" value='1' />
|
||||
<input type="hidden" name="id" value='<?php echo $this->id;?>' />
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
</ul>
|
||||
</div>
|
||||
<div class="input-group form-group">
|
||||
<form action="" method="get">
|
||||
<form action="" method="get" class="input-group">
|
||||
<input type="text" class="q form-control" name="q" value="<?php echo $this->q; ?>" placeholder="搜索关键字" />
|
||||
<input type="hidden" name="search" value='1' />
|
||||
<input type="hidden" name="id" value='<?php echo $this->id;?>' />
|
||||
|
|
|
@ -31,8 +31,8 @@
|
|||
</ul>
|
||||
</div>
|
||||
<div class="input-group form-group">
|
||||
<form action="" method="get" class="search_form">
|
||||
<input type="text" name="q" value="<?php echo $this->q; ?>" class="form-control"/>
|
||||
<form action="" method="get" class="search_form input-group">
|
||||
<input type="text" name="q" value="<?php echo $this->q; ?>" class="form-control" placeholder="搜索关键字"/>
|
||||
<input type="hidden" name="search" value='1'/>
|
||||
<input type="hidden" name="id" value='<?php echo $this->id;?>' />
|
||||
<span class="input-group-btn"><button type="submit" class="btn btn-default">搜索</button></span>
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
</ul>
|
||||
</div>
|
||||
<div class="input-group form-group">
|
||||
<form action="" method="get">
|
||||
<form action="" method="get" class="input-group">
|
||||
<input type="text" class="q form-control" name="q" value="<?php echo $this->q; ?>" placeholder="搜索关键字" />
|
||||
<input type="hidden" name="search" value='1' />
|
||||
<input type="hidden" name="id" value='<?php echo $this->id;?>' />
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="input-group form-group">
|
||||
<form action="" method="get" class="search_form">
|
||||
<form action="" method="get" class="search_form input-group">
|
||||
<input type="text" name="keyword" class="q form-control" value="<?php echo $this->keyword; ?>" placeholder="搜索关键字" />
|
||||
<input type="hidden" name="search" value='1' />
|
||||
<input type="hidden" name="id" value='<?php echo $this->id;?>' />
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="input-group form-group">
|
||||
<form action="" method="get" class="search_form">
|
||||
<form action="" method="get" class="search_form input-group">
|
||||
<input type="text" name="keyword" class="q form-control" value="<?php echo $this->keyword; ?>" placeholder="搜索关键字" />
|
||||
<input type="hidden" name="search" value='1' />
|
||||
<span class="input-group-btn"><button type="submit" class="btn btn-default">搜索</button></span>
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
</ul>
|
||||
</div>
|
||||
<div class="input-group form-group">
|
||||
<form action="" method="get">
|
||||
<form action="" method="get" class="input-group">
|
||||
<input type="text" name="keyword" class="q form-control" value="<?php echo $this->keyword; ?>" placeholder="搜索关键字" />
|
||||
<input type="hidden" name="search" value='1' class="form-control" />
|
||||
<span class="input-group-btn"><button class="btn btn-default" type="submit" id="search_btn">搜索</button></span>
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="input-group form-group">
|
||||
<form action="" method="get" class="search_form">
|
||||
<input type="text" name="keyword" class="q form-control" value="<?php echo $this->keyword; ?>" />
|
||||
<form action="" method="get" class="search_form input-group">
|
||||
<input type="text" name="keyword" class="q form-control" value="<?php echo $this->keyword; ?>" placeholder="搜索关键字"/>
|
||||
<input type="hidden" name="search" value='1' />
|
||||
<span class="input-group-btn"><button type="submit" class="btn btn-default">搜索</button></span>
|
||||
</form>
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="input-group form-group">
|
||||
<form action="" method="get" class="search_form">
|
||||
<input type="text" name="keyword" class="q form-control" value="<?php echo $this->keyword; ?>" />
|
||||
<form action="" method="get" class="search_form input-group">
|
||||
<input type="text" name="keyword" class="q form-control" value="<?php echo $this->keyword; ?>" placeholder="搜索关键字"/>
|
||||
<input type="hidden" name="search" value='1' />
|
||||
<span class="input-group-btn"><button type="submit" class="btn btn-default">搜索</button></span>
|
||||
</form>
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="input-group form-group">
|
||||
<form method="get" id="search">
|
||||
<form method="get" id="search" class="input-group">
|
||||
<input type="text" class="q form-control" name="keyword" value="<?php echo $this->keyword; ?>" tabindex="1" placeholder="搜索关键字" />
|
||||
<input type="hidden" name="search" value='1' />
|
||||
<input type="hidden" name="code" id="code" value="<?php echo $this->code; ?>" />
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="input-group form-group">
|
||||
<form action="" method="get">
|
||||
<form action="" method="get" class="input-group">
|
||||
<input type="text" name="keyword" class="q form-control" value="<?php echo $this->keyword; ?>" placeholder="搜索关键字" />
|
||||
<input type="hidden" name="search" value='1' />
|
||||
<input type="hidden" name="id" value='<?php echo $this->id;?>' />
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<a class="btn btn-primary" href="/admin/sys/message/">查看新消息</a>
|
||||
</div>
|
||||
<div class="input-group form-group">
|
||||
<form action="" class="search_form" id="datasearch" method="get">
|
||||
<form action="" class="search_form input-group" id="datasearch" method="get">
|
||||
<input type="text" placeholder="搜索关键字" class="form-control" value="<?php echo $this->q; ?>" name="q" id="keyword">
|
||||
<input type="hidden" name="search" value='1' />
|
||||
<input type="hidden" name="id" value='<?php echo $this->id;?>' />
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
</ul>
|
||||
</div>
|
||||
<div class="input-group form-group">
|
||||
<form action="" class="search_form" method="get" >
|
||||
<form action="" class="search_form input-group" method="get" >
|
||||
<input type="text" name="keyword" value="<?php echo $this->keyword; ?>" placeholder="搜索关键字" class="q form-control" />
|
||||
<input type="hidden" name="search" value='1' />
|
||||
<span class="input-group-btn"><button id="search_btn" class="btn btn-default" type="submit">搜索</button></span>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
use Mail\Mail;
|
||||
use Open\Client;
|
||||
use Open\OAuth2;
|
||||
use Users\Account;
|
||||
use Users\Member;
|
||||
use Helpers\Captcha;
|
||||
|
@ -300,6 +301,15 @@ class AccountController extends Zend_Controller_Action
|
|||
$this->view->href = $tohref;
|
||||
}
|
||||
|
||||
$oauth2 = new OAuth2();
|
||||
if($oauth2->loginTest())
|
||||
{
|
||||
$client = new Client();
|
||||
$url = $client->makeRequestCodeUrl("escience");
|
||||
|
||||
view::Post($this,"为您转入科技网登录入口",$url);
|
||||
}
|
||||
|
||||
$captcha = new Captcha();
|
||||
|
||||
$submit = $this->_getParam("submit");
|
||||
|
|
|
@ -398,10 +398,11 @@ class AuthorController extends Zend_Controller_Action
|
|||
//列表
|
||||
if(empty($ac) || $ac=='list' || $ac=='search'){
|
||||
|
||||
$sql = "SELECT a.*,m.title,m.description,g.id as gid,mds.status as mdstatus FROM en.normalmetadata m
|
||||
$sql = "SELECT a.*,m.title,m.description,g.id as gid,mds.status as mdstatus,gcn.id as genid FROM en.normalmetadata m
|
||||
LEFT JOIN mdauthor a ON m.uuid=a.uuid
|
||||
LEFT JOIN en.geonetworkmetadata g on m.uuid=g.uuid
|
||||
LEFT JOIN en.mdstatus mds ON m.uuid=mds.uuid
|
||||
LEFT JOIN geonetworkmetadata gcn on m.uuid=gcn.uuid
|
||||
WHERE a.userid=? AND a.status>=0 ";
|
||||
if ($ac=='search')
|
||||
{
|
||||
|
@ -4221,5 +4222,40 @@ class AuthorController extends Zend_Controller_Action
|
|||
return $text;
|
||||
}
|
||||
}
|
||||
|
||||
//导出元数据到英文版本
|
||||
public function gnenexportAction()
|
||||
{
|
||||
$uuid = $this->_getParam('uuid');
|
||||
$auth = Zend_Auth::getInstance();
|
||||
if($auth->hasIdentity())
|
||||
{
|
||||
$user = $auth->getIdentity();
|
||||
$u_id = $user->id;
|
||||
if (!empty($uuid) && !view::isUuid($uuid)) die();
|
||||
$sql="select * from mdauthor where uuid=? and userid=? and status in (0,1)";
|
||||
$sth = $this->db->prepare($sql);
|
||||
$sth->execute(array($uuid,$u_id));
|
||||
$row = $sth->fetch();
|
||||
if (empty($row)) die();
|
||||
$sql="select id,data,owner,source from geonetworkmetadata where uuid='$uuid'";
|
||||
$rs=$this->db->fetchRow($sql);
|
||||
$sql="insert into en.geonetworkmetadata (uuid,source,owner,data) values('".$uuid."','".$rs['source']."',".$rs['owner'].",".$this->db->quote($rs['data']).")";
|
||||
$this->db->exec($sql);
|
||||
$sql="select id from en.geonetworkmetadata where uuid='$uuid'";
|
||||
$rs1=$this->db->fetchRow($sql);
|
||||
$shell="#!/bin/bash\n";
|
||||
$shell.='cp -r /var/www/westdc.westgis.ac.cn/geonetwork/data/';
|
||||
$shell.=sprintf('%05d',floor(($rs['id']+0.1)/100)*100).'-'.sprintf('%05d',ceil(($rs['id']+0.1)/100)*100-1)."/".$rs['id'];
|
||||
$shell.=' /var/www/card.westgis.ac.cn/geonetwork/data/'.sprintf('%05d',floor(($rs1['id']+0.1)/100)*100).'-'.sprintf('%05d',ceil(($rs1['id']+0.1)/100)*100-1)."/".$rs1['id'];
|
||||
$shell.="\nchown -R tomcat7:www-data /var/www/card.westgis.ac.cn/geonetwork/data/".sprintf('%05d',floor(($rs1['id']+0.1)/100)*100).'-'.sprintf('%05d',ceil(($rs1['id']+0.1)/100)*100-1)."/".$rs1['id'];
|
||||
$shell.="\n";
|
||||
$filename='/var/www/westdc.westgis.ac.cn/tools/sync-gn-thumbnail.sh';
|
||||
file_put_contents($filename, $shell);
|
||||
$this->_helper->layout->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender();
|
||||
echo '<h1>成功导入英文版!</h1>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -35,5 +35,15 @@ piwikTracker.enableLinkTracking();
|
|||
} catch( err ) {}
|
||||
</script><noscript><p><img src="http://piwik.westgis.ac.cn/piwik.php?idsite=5" style="border:0" alt="" /></p></noscript>
|
||||
<!-- End Piwik Tracking Code -->
|
||||
<script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', 'UA-302912-6', 'auto');
|
||||
ga('send', 'pageview');
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -40,4 +40,14 @@
|
|||
} catch( err ) {}
|
||||
</script><noscript><p><img src="http://piwik.westgis.ac.cn/piwik.php?idsite=5" style="border:0" alt="" /></p></noscript>
|
||||
<script>setPage();</script>
|
||||
<script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', 'UA-302912-6', 'auto');
|
||||
ga('send', 'pageview');
|
||||
|
||||
</script>
|
||||
</html>
|
|
@ -37,5 +37,15 @@
|
|||
</script>
|
||||
<noscript><p><img src="http://piwik.westgis.ac.cn/piwik.php?idsite=5" style="border:0" alt="" /></p></noscript>
|
||||
<!-- End Piwik Tracking Code -->
|
||||
<script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', 'UA-302912-6', 'auto');
|
||||
ga('send', 'pageview');
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -44,4 +44,13 @@
|
|||
</script>
|
||||
<!-- End Piwik Code -->
|
||||
<script>setPage();</script>
|
||||
<script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', 'UA-302912-6', 'auto');
|
||||
ga('send', 'pageview');
|
||||
</script>
|
||||
</html>
|
|
@ -24,7 +24,7 @@ class Dataorder
|
|||
if ($statu==4)
|
||||
$wheresql[] = " (o.ts_approved is null and o.pdflink is not null and d.status=4) ";
|
||||
elseif ($statu==-1)
|
||||
$wheresql[] = " (o.pdflink is not null and d.status=-1)";
|
||||
$wheresql[] = " (o.pdflink is not null and o.status=-1)";
|
||||
elseif ($statu == 3)
|
||||
$wheresql[] = " (o.applicationform is not null and d.status=3 ) ";
|
||||
elseif ($statu == 5)
|
||||
|
|
|
@ -448,7 +448,7 @@ class ISO19115
|
|||
{
|
||||
$this->author[$cnt+$m]['individual']=$author->getElementsByTagName('rpIndName')->item(0)->nodeValue;
|
||||
$this->author[$cnt+$m]['organisation']=$author->getElementsByTagName('rpOrgName')->item(0)->nodeValue;
|
||||
$this->author[$cnt+$m]['position']=$author->getElementsByTagName('rpPosName')->item(0)->nodeValue;
|
||||
@$this->author[$cnt+$m]['position']=$author->getElementsByTagName('rpPosName')->item(0)->nodeValue;
|
||||
$this->author[$cnt+$m]['delivery']=$author->getElementsByTagName('delPoint')->item(0)->nodeValue;
|
||||
$this->author[$cnt+$m]['phone']=$author->getElementsByTagName('voiceNum')->item(0)->nodeValue;
|
||||
$this->author[$cnt+$m]['email']=$author->getElementsByTagName('eMailAdd')->item(0)->nodeValue;
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
<?php
|
||||
namespace Open;
|
||||
|
||||
use Open\Client;
|
||||
use Helpers\Curl;
|
||||
use Helpers\Table;
|
||||
|
||||
class OAuth2 extends \Zend_Controller_Plugin_Abstract
|
||||
{
|
||||
public $db;
|
||||
|
@ -23,9 +27,28 @@ class OAuth2 extends \Zend_Controller_Plugin_Abstract
|
|||
|
||||
}
|
||||
|
||||
//用户使用谷歌账号登陆
|
||||
public function googleClient()
|
||||
//登录测试
|
||||
public function loginTest()
|
||||
{
|
||||
try {
|
||||
$client = new Client();
|
||||
$url = $client->makeRequestCodeUrl("escience");
|
||||
|
||||
$curl = new Curl();
|
||||
$curl->port = 443;
|
||||
$curl->initOptions(array('verifyssl' => false));
|
||||
$data = $curl->request($url, array(), "POST");
|
||||
|
||||
$cache_data = $data;
|
||||
|
||||
if (isset($data['headers']['http_code']) && $data['headers']['http_code'] == 302) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}catch (\Exception $e)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -106,7 +106,7 @@ class Source
|
|||
//中国科技网通行证
|
||||
$this->target->escience = array(
|
||||
'name' => '中国科技网通行证',
|
||||
'code' => 'http://passport.escience.cn/oauth2/authorize',
|
||||
'code' => 'https://passport.escience.cn/oauth2/authorize',
|
||||
'token' => 'https://passport.escience.cn/oauth2/token',
|
||||
'code_response' => 'code',
|
||||
'grant_type' => 'authorization_code',
|
||||
|
|
Loading…
Reference in New Issue