From f1be21583453ca3bcc39387bba29e7c281ff7490 Mon Sep 17 00:00:00 2001 From: wlx Date: Tue, 4 Nov 2014 02:32:01 +0000 Subject: [PATCH] merge heihedata branch r5009 - r5033 into trunk --- .../admin/controllers/DataController.php | 37 ++- .../views/scripts/data/attachments.phtml | 2 +- .../views/scripts/data/attachmentsadd.phtml | 40 ++- .../views/scripts/data/author-datas.phtml | 2 +- .../views/scripts/data/author-list.phtml | 2 +- .../admin/views/scripts/data/author.phtml | 2 +- .../admin/views/scripts/data/doi-add.phtml | 43 ++- .../admin/views/scripts/data/doi.phtml | 2 +- .../views/scripts/data/fund-data-list.phtml | 2 +- .../admin/views/scripts/data/fund.phtml | 4 +- application/admin/views/scripts/data/md.phtml | 7 +- .../scripts/data/newdata-add-bydata.phtml | 4 +- .../views/scripts/data/newdata-add.phtml | 4 +- .../admin/views/scripts/data/project.phtml | 2 +- .../admin/views/scripts/data/ref-files.phtml | 4 +- .../admin/views/scripts/data/ref.phtml | 4 +- .../admin/views/scripts/data/source.phtml | 10 +- .../admin/views/scripts/data/sourceadd.phtml | 263 ++++++++++++------ .../views/scripts/data/sourcefetchone.phtml | 2 +- .../views/scripts/data/sourceselect.phtml | 2 +- .../views/scripts/data/version-bydata.phtml | 6 +- .../admin/views/scripts/down/data.phtml | 2 +- .../admin/views/scripts/down/offline.phtml | 2 +- .../admin/views/scripts/down/offlineapp.phtml | 4 +- .../admin/views/scripts/down/online.phtml | 2 +- .../admin/views/scripts/down/user.phtml | 2 +- .../admin/views/scripts/heihe/project.phtml | 4 +- .../admin/views/scripts/review/accept.phtml | 2 +- .../admin/views/scripts/review/canceled.phtml | 2 +- .../admin/views/scripts/review/comments.phtml | 2 +- .../views/scripts/review/commentslist.phtml | 4 +- .../scripts/review/commentslistbyuser.phtml | 2 +- .../admin/views/scripts/review/draft.phtml | 2 +- .../admin/views/scripts/review/editor.phtml | 2 +- .../admin/views/scripts/review/experts.phtml | 2 +- .../admin/views/scripts/review/inreview.phtml | 4 +- .../admin/views/scripts/review/invite.phtml | 4 +- .../admin/views/scripts/review/myreview.phtml | 2 +- .../admin/views/scripts/review/reviewed.phtml | 2 +- .../admin/views/scripts/sys/message.phtml | 2 +- .../admin/views/scripts/sys/regions.phtml | 2 +- .../default/controllers/AccountController.php | 12 +- .../default/controllers/AuthorController.php | 40 ++- .../default/views/scripts/author/accept.phtml | 5 +- .../default/views/scripts/footer.phtml | 8 +- .../default/views/scripts/hiwater/view.phtml | 3 - application/layouts/glacier.phtml | 10 + application/layouts/heihe.phtml | 10 + application/layouts/hiwater.phtml | 10 + application/layouts/layout.phtml | 9 + application/models/Dataorder.php | 2 +- application/models/ISO19115.php | 2 +- application/module/Open/OAuth2.php | 35 ++- application/module/Open/Source.php | 2 +- 54 files changed, 450 insertions(+), 192 deletions(-) diff --git a/application/admin/controllers/DataController.php b/application/admin/controllers/DataController.php index 492bad81..ffea291e 100755 --- a/application/admin/controllers/DataController.php +++ b/application/admin/controllers/DataController.php @@ -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); diff --git a/application/admin/views/scripts/data/attachments.phtml b/application/admin/views/scripts/data/attachments.phtml index 8f1de758..dd7eab55 100644 --- a/application/admin/views/scripts/data/attachments.phtml +++ b/application/admin/views/scripts/data/attachments.phtml @@ -32,7 +32,7 @@ 查看我的附件
-
+ diff --git a/application/admin/views/scripts/data/attachmentsadd.phtml b/application/admin/views/scripts/data/attachmentsadd.phtml index bc744788..0c5bb8b2 100644 --- a/application/admin/views/scripts/data/attachmentsadd.phtml +++ b/application/admin/views/scripts/data/attachmentsadd.phtml @@ -19,32 +19,53 @@ 查看元数据 返回附件管理
- + -

- 注:可选择多个文件
-

+
+ +
+
- -

+
+
+ +
+ +
+
+
+ + \ No newline at end of file diff --git a/application/admin/views/scripts/data/sourcefetchone.phtml b/application/admin/views/scripts/data/sourcefetchone.phtml index 06e3b65c..75e5febe 100644 --- a/application/admin/views/scripts/data/sourcefetchone.phtml +++ b/application/admin/views/scripts/data/sourcefetchone.phtml @@ -31,7 +31,7 @@