From 4e9a496f636f546a45bbb02f46ae858334ce962f Mon Sep 17 00:00:00 2001 From: wlx Date: Mon, 28 Oct 2013 14:54:21 +0000 Subject: [PATCH] merge from heihedata branch to r4013. --- .../admin/controllers/DataController.php | 327 +- .../admin/controllers/DownController.php | 273 +- .../admin/controllers/ReviewController.php | 33 +- .../views/scripts/data/attachmentsadd.phtml | 134 +- .../admin/views/scripts/data/doi.phtml | 6 +- .../admin/views/scripts/data/left.phtml | 43 +- .../admin/views/scripts/data/ref-add.phtml | 198 + .../admin/views/scripts/data/ref-files.phtml | 105 + .../views/scripts/data/ref-mdref-form.phtml | 48 + .../views/scripts/data/ref-metadatas.phtml | 69 + .../views/scripts/data/ref-multiupload.phtml | 120 + .../admin/views/scripts/data/ref-nav.phtml | 10 + .../admin/views/scripts/data/ref-ris.phtml | 67 + .../views/scripts/data/ref-singleris.phtml | 63 + .../admin/views/scripts/data/ref.phtml | 102 + .../admin/views/scripts/data/reference.phtml | 2 +- .../admin/views/scripts/down/left.phtml | 17 +- .../admin/views/scripts/down/offlineapp.phtml | 76 +- .../scripts/down/offlineapps-navpills.phtml | 15 + .../scripts/down/offlineapps-nopdf.phtml | 73 + .../scripts/down/offlineapps-notpassed.phtml | 73 + .../down/offlineapps-notreceived.phtml | 74 + .../scripts/down/offlineapps-toauthor.phtml | 42 + .../down/offlineapps-uploaderform.phtml | 19 + .../views/scripts/down/offlineapps-view.phtml | 63 + .../views/scripts/down/offlineapps.phtml | 50 + .../admin/views/scripts/post-message.phtml | 4 +- .../admin/views/scripts/review/accept.phtml | 4 +- .../admin/views/scripts/review/editor.phtml | 60 + .../admin/views/scripts/review/left.phtml | 1 + .../admin/views/scripts/review/myreview.phtml | 93 +- application/config.ini | 2 + .../default/controllers/AccountController.php | 15 +- .../default/controllers/AuthorController.php | 95 +- .../default/controllers/DataController.php | 4374 +++++++++-------- .../default/controllers/HeiheController.php | 30 + .../default/controllers/HiwaterController.php | 131 +- .../default/controllers/IndexController.php | 4 +- .../controllers/KnowledgeController.php | 126 +- .../default/controllers/ReviewController.php | 75 +- .../default/controllers/ServiceController.php | 143 +- .../default/views/scripts/author/accept.phtml | 154 +- .../scripts/author/literature-viewdata.phtml | 2 +- .../data/offlineapp-uploaderform.phtml | 18 + .../scripts/data/onlineapp-download.phtml | 6 + .../views/scripts/data/order-wsn.phtml | 33 + .../default/views/scripts/data/order.phtml | 178 +- .../default/views/scripts/data/pdf.phtml | 105 +- .../default/views/scripts/data/view.phtml | 9 +- .../views/scripts/heihe/offlinelist.phtml | 34 + .../views/scripts/heihe/onlinelist.phtml | 34 + .../default/views/scripts/heihe/view.phtml | 35 +- .../default/views/scripts/hiwater/navi.phtml | 105 +- .../default/views/scripts/hiwater/view.phtml | 128 +- .../views/scripts/knowledge/paper.phtml | 106 + .../scripts/review/inreview-require.phtml | 53 + .../scripts/review/inreview-reviewed.phtml | 55 + .../default/views/scripts/review/navi.phtml | 16 +- .../default/views/scripts/water/view.phtml | 68 +- application/models/ApplicantPDF.php | 289 +- application/models/Dataorder.php | 8 +- application/models/RegisterForm.php | 2 +- application/models/Theme.php | 20 +- application/models/data/Author.php | 35 +- application/models/data/DataService.php | 118 + application/models/data/Doi.php | 21 +- application/models/data/Favorite.php | 94 + application/models/data/Review.php | 168 +- application/models/files.php | 3 +- application/models/helper/Curl.php | 144 + application/models/helper/dbh.php | 4 + application/models/helper/email.php | 164 + application/models/helper/view.php | 24 +- application/module/Files/Event/FileEvent.php | 13 + application/module/Files/Files.php | 394 ++ .../module/Files/Listener/FileListener.php | 28 + .../module/Files/Operation/FileOperate.php | 126 + application/module/Files/Output.php | 207 + application/module/Files/Thumbnail.php | 176 + application/module/Helpers/Curl.php | 145 + application/module/Helpers/Table.php | 23 + application/module/Helpers/View.php | 175 + application/module/Helpers/dbh.php | 178 + application/module/Mail/Event/MailEvent.php | 10 + .../module/Mail/Listener/MailListener.php | 26 + application/module/Mail/Mail.php | 162 + .../module/Mail/Operation/MailOperate.php | 44 + application/module/Open/App.php | 45 + application/module/Open/Open.php | 66 + application/module/Open/server.php | 50 + .../module/Order/Manager/Offlineapp.php | 160 + application/module/Order/Order.php | 472 ++ .../module/Order/listener/ManagerEvents.php | 10 + .../module/Order/listener/ManagerListener.php | 40 + .../module/Order/listener/OrderEvents.php | 14 + .../module/Order/listener/OrderListener.php | 53 + .../module/Order/listener/PdfEvents.php | 12 + .../module/Order/listener/PdfFormEvents.php | 9 + .../module/Order/mount/ManagerOperate.php | 92 + .../module/Order/mount/OrderOperate.php | 143 + application/module/Order/mount/PdfForm.php | 125 + application/module/Order/mount/PdfOperate.php | 178 + .../module/Reference/Event/ReferenceEvent.php | 15 + .../module/Reference/Event/RisEvent.php | 9 + .../Reference/Handler/ReferenceHandler.php | 138 + .../module/Reference/Handler/RisHandler.php | 85 + .../Reference/Listener/ReferenceListener.php | 31 + .../module/Reference/Listener/RisListener.php | 27 + application/module/Reference/Reference.php | 520 ++ application/module/Reference/Ris.php | 331 ++ data/heihe.pdf | Bin 0 -> 114973 bytes data/offline.pdf | Bin 117345 -> 110953 bytes data/security.pdf | Bin 82848 -> 83193 bytes htdocs/index.php | 4 +- htdocs/js/lib/custom/models/admin-data-ref.js | 66 + .../custom/models/admin-down-offlineapps.js | 37 + .../js/lib/custom/models/author-literature.js | 40 +- htdocs/js/lib/custom/models/dataservice.js | 231 + .../lib/custom/models/offlineapp-uploader.js | 38 + htdocs/js/lib/custom/models/sfadmin.js | 50 + .../datepicker/images/animated-overlay.gif | Bin 0 -> 1738 bytes .../ui-bg_diagonals-thick_18_b81900_40x40.png | Bin 0 -> 418 bytes .../ui-bg_diagonals-thick_20_666666_40x40.png | Bin 0 -> 312 bytes .../images/ui-bg_flat_10_000000_40x100.png | Bin 0 -> 205 bytes .../images/ui-bg_glass_100_f6f6f6_1x400.png | Bin 0 -> 262 bytes .../images/ui-bg_glass_100_fdf5ce_1x400.png | Bin 0 -> 348 bytes .../images/ui-bg_glass_65_ffffff_1x400.png | Bin 0 -> 207 bytes .../ui-bg_gloss-wave_35_f6a828_500x100.png | Bin 0 -> 5815 bytes .../ui-bg_highlight-soft_100_eeeeee_1x100.png | Bin 0 -> 278 bytes .../ui-bg_highlight-soft_75_ffe45c_1x100.png | Bin 0 -> 328 bytes .../images/ui-icons_222222_256x240.png | Bin 0 -> 6922 bytes .../images/ui-icons_228ef1_256x240.png | Bin 0 -> 4549 bytes .../images/ui-icons_ef8c08_256x240.png | Bin 0 -> 4549 bytes .../images/ui-icons_ffd27a_256x240.png | Bin 0 -> 4549 bytes .../images/ui-icons_ffffff_256x240.png | Bin 0 -> 6299 bytes .../jquery-ui-1.10.3.custom.min.css | 5 + .../datepicker/jquery-ui-1.10.3.custom.min.js | 7 + htdocs/js/lib/uploadify/jquery.uploadify.js | 986 ++++ .../js/lib/uploadify/jquery.uploadify.min.js | 16 + htdocs/js/lib/uploadify/uploadify-cancel.png | Bin 0 -> 2960 bytes htdocs/js/lib/uploadify/uploadify.css | 92 + htdocs/js/lib/uploadify/uploadify.swf | Bin 0 -> 12767 bytes htdocs/js/metadata-view.js | 41 +- include/LibRIS/ParseException.php | 3 + include/LibRIS/RISReader.php | 192 + include/LibRIS/RISTags.php | 168 + include/LibRIS/RISWriter.php | 66 + tools/ftp-umount.php | 37 + tools/proftp.php | 19 +- tools/proftp_upload.php | 1 + tools/wsndata.php | 176 + 151 files changed, 13204 insertions(+), 2895 deletions(-) create mode 100644 application/admin/views/scripts/data/ref-add.phtml create mode 100644 application/admin/views/scripts/data/ref-files.phtml create mode 100644 application/admin/views/scripts/data/ref-mdref-form.phtml create mode 100644 application/admin/views/scripts/data/ref-metadatas.phtml create mode 100644 application/admin/views/scripts/data/ref-multiupload.phtml create mode 100644 application/admin/views/scripts/data/ref-nav.phtml create mode 100644 application/admin/views/scripts/data/ref-ris.phtml create mode 100644 application/admin/views/scripts/data/ref-singleris.phtml create mode 100644 application/admin/views/scripts/data/ref.phtml create mode 100644 application/admin/views/scripts/down/offlineapps-navpills.phtml create mode 100644 application/admin/views/scripts/down/offlineapps-nopdf.phtml create mode 100644 application/admin/views/scripts/down/offlineapps-notpassed.phtml create mode 100644 application/admin/views/scripts/down/offlineapps-notreceived.phtml create mode 100644 application/admin/views/scripts/down/offlineapps-toauthor.phtml create mode 100644 application/admin/views/scripts/down/offlineapps-uploaderform.phtml create mode 100644 application/admin/views/scripts/down/offlineapps-view.phtml create mode 100644 application/admin/views/scripts/down/offlineapps.phtml create mode 100644 application/admin/views/scripts/review/editor.phtml create mode 100644 application/default/views/scripts/data/offlineapp-uploaderform.phtml create mode 100644 application/default/views/scripts/data/order-wsn.phtml create mode 100755 application/default/views/scripts/heihe/offlinelist.phtml create mode 100755 application/default/views/scripts/heihe/onlinelist.phtml create mode 100644 application/default/views/scripts/knowledge/paper.phtml create mode 100644 application/default/views/scripts/review/inreview-require.phtml create mode 100644 application/default/views/scripts/review/inreview-reviewed.phtml create mode 100644 application/models/data/DataService.php create mode 100644 application/models/data/Favorite.php create mode 100644 application/models/helper/Curl.php create mode 100644 application/models/helper/email.php create mode 100644 application/module/Files/Event/FileEvent.php create mode 100644 application/module/Files/Files.php create mode 100644 application/module/Files/Listener/FileListener.php create mode 100644 application/module/Files/Operation/FileOperate.php create mode 100644 application/module/Files/Output.php create mode 100644 application/module/Files/Thumbnail.php create mode 100644 application/module/Helpers/Curl.php create mode 100644 application/module/Helpers/Table.php create mode 100644 application/module/Helpers/View.php create mode 100644 application/module/Helpers/dbh.php create mode 100644 application/module/Mail/Event/MailEvent.php create mode 100644 application/module/Mail/Listener/MailListener.php create mode 100644 application/module/Mail/Mail.php create mode 100644 application/module/Mail/Operation/MailOperate.php create mode 100644 application/module/Open/App.php create mode 100644 application/module/Open/Open.php create mode 100644 application/module/Open/server.php create mode 100644 application/module/Order/Manager/Offlineapp.php create mode 100644 application/module/Order/Order.php create mode 100644 application/module/Order/listener/ManagerEvents.php create mode 100644 application/module/Order/listener/ManagerListener.php create mode 100644 application/module/Order/listener/OrderEvents.php create mode 100644 application/module/Order/listener/OrderListener.php create mode 100644 application/module/Order/listener/PdfEvents.php create mode 100644 application/module/Order/listener/PdfFormEvents.php create mode 100644 application/module/Order/mount/ManagerOperate.php create mode 100644 application/module/Order/mount/OrderOperate.php create mode 100644 application/module/Order/mount/PdfForm.php create mode 100644 application/module/Order/mount/PdfOperate.php create mode 100644 application/module/Reference/Event/ReferenceEvent.php create mode 100644 application/module/Reference/Event/RisEvent.php create mode 100644 application/module/Reference/Handler/ReferenceHandler.php create mode 100644 application/module/Reference/Handler/RisHandler.php create mode 100644 application/module/Reference/Listener/ReferenceListener.php create mode 100644 application/module/Reference/Listener/RisListener.php create mode 100644 application/module/Reference/Reference.php create mode 100644 application/module/Reference/Ris.php create mode 100644 data/heihe.pdf create mode 100644 htdocs/js/lib/custom/models/admin-data-ref.js create mode 100644 htdocs/js/lib/custom/models/admin-down-offlineapps.js create mode 100644 htdocs/js/lib/custom/models/dataservice.js create mode 100644 htdocs/js/lib/custom/models/offlineapp-uploader.js create mode 100644 htdocs/js/lib/custom/models/sfadmin.js create mode 100644 htdocs/js/lib/datepicker/images/animated-overlay.gif create mode 100644 htdocs/js/lib/datepicker/images/ui-bg_diagonals-thick_18_b81900_40x40.png create mode 100644 htdocs/js/lib/datepicker/images/ui-bg_diagonals-thick_20_666666_40x40.png create mode 100644 htdocs/js/lib/datepicker/images/ui-bg_flat_10_000000_40x100.png create mode 100644 htdocs/js/lib/datepicker/images/ui-bg_glass_100_f6f6f6_1x400.png create mode 100644 htdocs/js/lib/datepicker/images/ui-bg_glass_100_fdf5ce_1x400.png create mode 100644 htdocs/js/lib/datepicker/images/ui-bg_glass_65_ffffff_1x400.png create mode 100644 htdocs/js/lib/datepicker/images/ui-bg_gloss-wave_35_f6a828_500x100.png create mode 100644 htdocs/js/lib/datepicker/images/ui-bg_highlight-soft_100_eeeeee_1x100.png create mode 100644 htdocs/js/lib/datepicker/images/ui-bg_highlight-soft_75_ffe45c_1x100.png create mode 100644 htdocs/js/lib/datepicker/images/ui-icons_222222_256x240.png create mode 100644 htdocs/js/lib/datepicker/images/ui-icons_228ef1_256x240.png create mode 100644 htdocs/js/lib/datepicker/images/ui-icons_ef8c08_256x240.png create mode 100644 htdocs/js/lib/datepicker/images/ui-icons_ffd27a_256x240.png create mode 100644 htdocs/js/lib/datepicker/images/ui-icons_ffffff_256x240.png create mode 100644 htdocs/js/lib/datepicker/jquery-ui-1.10.3.custom.min.css create mode 100644 htdocs/js/lib/datepicker/jquery-ui-1.10.3.custom.min.js create mode 100644 htdocs/js/lib/uploadify/jquery.uploadify.js create mode 100644 htdocs/js/lib/uploadify/jquery.uploadify.min.js create mode 100644 htdocs/js/lib/uploadify/uploadify-cancel.png create mode 100644 htdocs/js/lib/uploadify/uploadify.css create mode 100644 htdocs/js/lib/uploadify/uploadify.swf create mode 100755 include/LibRIS/ParseException.php create mode 100755 include/LibRIS/RISReader.php create mode 100755 include/LibRIS/RISTags.php create mode 100755 include/LibRIS/RISWriter.php create mode 100644 tools/ftp-umount.php create mode 100644 tools/wsndata.php diff --git a/application/admin/controllers/DataController.php b/application/admin/controllers/DataController.php index 9d2655a3..ed9cf60e 100755 --- a/application/admin/controllers/DataController.php +++ b/application/admin/controllers/DataController.php @@ -1,4 +1,10 @@ _getParam('add'); $edit=(int)$this->_getParam('edit'); - $delete=(int)$this->_getParam('delete'); + $delete=(int)$this->_getParam('delete'); set_time_limit(0); if ($add) { $form=new DatasetcdForm(); @@ -1098,13 +1104,13 @@ class Admin_DataController extends Zend_Controller_Action } //搜索 else{ - $select=$this->db->select(); - $select->from('mdref',array('id as mdid','refid','place')) - ->join('metadata','metadata.uuid=mdref.uuid') - ->join('reference','reference.id=mdref.refid') - ->order('metadata.ts_created desc') - ->order('mdref.place'); - $paginator = Zend_Paginator::factory($select); + $sql="select m.title as mdtitle,m.uuid,mr.id as mdid,mr.refid,mr.place,r.reference + from mdref mr right join metadata m on mr.uuid=m.uuid + left join reference r on mr.refid=r.id + order by m.ts_created desc,mr.place"; + $re=$this->db->query($sql); + $row=$re->fetchAll(); + $paginator = Zend_Paginator::factory($row); $paginator->setCurrentPageNumber($this->_getParam('page')); $paginator->setItemCountPerPage(30); $paginator->setView($this->view); @@ -1113,6 +1119,269 @@ class Admin_DataController extends Zend_Controller_Action }//列表 } + + //文献管理 + public function refAction() + { + $this->view->ac = $ac = $this->_getParam('ac'); + $submit = $this->_getParam('submit'); + $keyword = $this->view->q = trim($this->_getParam('q')); + $order = $this->view->search_order = trim($this->_getParam('order')); + $sort = $this->view->search_sort = trim($this->_getParam('sort')); + + $reference = new Reference(); + + if(!empty($keyword)) + { + $reference->keyword = $keyword; + } + + if(!empty($order)) + { + $reference->order = $order; + } + + if(!empty($sort)) + { + $reference->sort = $sort; + } + + //文献首页 + if(empty($ac)) + { + $this->view->referenceType = $reference->referenceType(); + view::addPaginator($reference->fetchReferences(),$this,12); + return true; + } + else if ($ac == "water") + { + $this->view->referenceType = $reference->referenceType(); + view::addPaginator($reference->fetchThemeReferences('water'),$this,10); + return true; + } + else if ($ac == "westdc") + { + $this->view->referenceType = $reference->referenceType(); + view::addPaginator($reference->fetchWestdcReferences(),$this,10); + return true; + } + else if ($ac == "todo") + { + $this->view->referenceType = $reference->referenceType(); + view::addPaginator($reference->fetchTodoReferences(),$this,10); + return true; + } + + //添加 + if($ac == "add") + { + $this->_helper->viewRenderer('ref-add'); + $id = $this->_getParam('id'); + $attid = $this->_getParam('attid'); + + if(!empty($submit)) + { + $this->view->data = $reference->getReferenceParam(); + $attid = $this->view->data['attid']; + + if(empty($id) || !is_numeric($id)) + { + $status = $reference->reference(); + }else{ + $status = $reference->reference($id); + } + + if($status !== true) + { + $this->view->error = view::Error($status); + }else{ + if(!empty($id)) + { + $msg = "文献修改成功!"; + view::Post($this,$msg,-2); + return true; + }else{ + $msg = "文献添加成功!"; + view::Post($this,$msg,"/admin/data/ref/ac/add"); + return true; + } + } + }else{ + $this->view->data = array(); + if(!empty($id) && is_numeric($id)) + { + $this->view->data = $reference->getOneReferenceData($id); + } + } + + if(!empty($attid)) + { + $files = new Files(); + $attfile = $files->getOne($attid); + $this->view->data['attid'] = $attid; + $this->view->data['file'] = $attfile; + } + + return true; + } + + //上传pdf + if($ac == "pdfupload") + { + $this->_helper->layout->disableLayout(); + $this->_helper->viewRenderer->setNoRender(); + $autoread = false; + if($this->_getParam('multi')) + { + $autoread = true; + } + $statu = $reference->uploadReferencePdf($_FILES['Filedata'],$autoread); + $this->jsonexit($statu); + return true; + } + + //删除已上传的文件 + if($ac == "delete") + { + $this->_helper->layout->disableLayout(); + $this->_helper->viewRenderer->setNoRender(); + $statu = $reference->deleteReferenceAttchment($this->_getParam('attid')); + $this->jsonexit($statu); + return true; + } + + //批量上传 + if($ac == "multiupload") + { + $this->_helper->viewRenderer('ref-multiupload'); + return true; + } + + //文件管理 + if($ac == "files") + { + $this->_helper->viewRenderer('ref-files'); + view::addPaginator($reference->getReferenceFiles(),$this,10); + return true; + } + + //删除文献 + if($ac == "deleteref") + { + $refid = $this->_getParam('id'); + if($reference->deleteReference($refid)) + { + view::Post($this,"删除成功!",-1); + }else{ + view::Post($this,"删除失败!",-1); + } + return true; + } + + //相关数据 + if($ac == "data") + { + $refid = $this->view->refid = $this->_getParam('id'); + if(view::isXmlHttpRequest($this)){ + $this->jsonexit($reference->getDataByReference($refid)); + return true; + }else{ + $this->_helper->viewRenderer('ref-metadatas'); + $this->view->referenceType = $reference->referenceType(); + view::addPaginator($reference->getDataByReference($refid),$this,10); + return true; + } + } + + //添加数据文献 + if($ac == "mdref" && view::isXmlHttpRequest($this)) + { + $mdrefid = $this->_getParam('id'); + $status = $reference->makeMdref($mdrefid); + if($status !== true) + { + $this->jsonexit(array('error'=>$status)); + }else{ + $this->jsonexit(array('success' => 1)); + } + return true; + } + + //移除数据文献 + if($ac == "delmdref") + { + $mdrefid = $this->_getParam('id'); + $status = $reference->delMdref($mdrefid); + if($status === true) + { + view::Post($this,"移除成功",-1); + }else{ + view::Post($this,$status,-1); + } + return true; + } + + //ris + if($ac == "ris") + { + $this->_helper->viewRenderer('ref-ris'); + $submit = $this->_getParam('submit'); + + if(!empty($submit)) + { + $ris = new \Reference\Ris(); + $this->view->data = $ris->loadout(); + try{ + $ris->pushToDataTable($this->view->data); + }catch(Exception $e) + { + view::Dump($e->getMessage(),false); + } + } + } + + //ris更新单篇 + if($ac == "singleris") + { + $this->_helper->viewRenderer('ref-singleris'); + $id = (int)$this->_getParam('id'); + $this->view->ristext = $this->_getParam('ristext'); + + if($id < 1) + { + view::Post($this,"参数错误!",-1); + return true; + } + + $this->view->referenceData = $reference->getOneReferenceData($id); + + if(!empty($submit)) + { + $ris = new Ris(); + $data = $ris->loadout(); + + if(count($data) < 1) + { + view::Post($this,"输入的RIS信息有误".'查看详细',-1); + return true; + } + + if($ris->updateWithRis($id,$data[0]) === true) + { + view::Post($this,"编辑成功!".'查看详细',-2); + return true; + }else{ + view::Post($this,"编辑失败!".'查看详细',-1); + return true; + } + } + + return true; + }//ris单篇更新 + + + }//文献管理 refAction() + /* * 删除元数据,删除前有确认 */ @@ -1573,8 +1842,8 @@ class Admin_DataController extends Zend_Controller_Action $id = $this->_getParam('attupdate'); - $files=new files(); - $msg = $files -> upload($this->view->config->upload,$_FILES['Filedata'],empty($uuid)?'file':'md'); + $files=new Files(); + $msg = $files -> upload($_FILES['Filedata'],empty($uuid)?'file/':'md/',true); if(empty($msg['error'])) { @@ -1582,7 +1851,7 @@ class Admin_DataController extends Zend_Controller_Action $filename = $msg['db_path']; $filesize = $msg['file_size']; $filedesc = $this->_request->getParam('filedesc'); - $filetype = $msg['file_type']; + $filetype = 'md'; $realname = $msg['realname']; @@ -1901,8 +2170,8 @@ class Admin_DataController extends Zend_Controller_Action exit(); } - $files=new files(); - $msg = $files -> upload($this->view->config->upload,$_FILES['Filedata'],empty($uuid)?'file':'md'); + $files=new Files(); + $msg = $files -> upload($_FILES['Filedata'],empty($uuid)?'file/':'md/',true); if(empty($msg['error'])) { @@ -1910,7 +2179,7 @@ class Admin_DataController extends Zend_Controller_Action $filename = $msg['db_path']; $filesize = $msg['file_size']; $filedesc = $this->_request->getParam('filedesc'); - $filetype = $msg['file_type']; + $filetype = 'md'; $realname = $msg['realname']; @@ -1969,10 +2238,6 @@ class Admin_DataController extends Zend_Controller_Action $rs = $this->db->query($sql); $atts = $rs->fetchAll(); - foreach($atts as $k=>$v) - { - $atts[$k]['html']= $v['realname'].'['. round($v['filesize']/1024,2) .' kb]
'; - } echo Zend_Json::encode($atts); exit(); }else @@ -2489,7 +2754,7 @@ class Admin_DataController extends Zend_Controller_Action }else{ $mail->addTo($this->debug_email); } - @$mail->send(); + //@$mail->send(); $data = array("commited"=>1,"error"=>'该版本已经成功发布!'); $this->jsonexit($data); @@ -3410,13 +3675,13 @@ class Admin_DataController extends Zend_Controller_Action if(empty($uuid)) { $rows = $fund->fetch(NULL,true,0,$keyword); - view::addPaginator($rows,$this->view,$this->_request); + view::addPaginator($rows,$this,10); }else{ include('data/Metadata.php'); $md = new Metadata($this->db); $this->view->md = $md->view($uuid); $rows = $fund->fetch($uuid); - view::addPaginator($rows,$this->view,$this->_request); + view::addPaginator($rows,$this,10); } return true; } @@ -3426,7 +3691,7 @@ class Admin_DataController extends Zend_Controller_Action $this->_helper->viewRenderer('fund-data-list'); $this->view->q = $q = $this->_getParam('q'); $rows = $fund->fetchFromData(true,0,$q); - view::addPaginator($rows,$this->view,$this->_request); + view::addPaginator($rows,$this,10); return true; } @@ -3437,7 +3702,7 @@ class Admin_DataController extends Zend_Controller_Action $id = $this->_getParam('id'); $this->view->fund = $fund->view($id); $rows = $fund->fetchFromData($id,0,$q); - view::addPaginator($rows,$this->view,$this->_request); + view::addPaginator($rows,$this,10); return true; } @@ -3569,7 +3834,7 @@ class Admin_DataController extends Zend_Controller_Action $md = new Metadata($this->db); $this->view->md = $md->view($uuid); - view::addPaginator($rows,$this->view,$this->_request); + view::addPaginator($rows,$this,10); return true; }//formd @@ -3617,7 +3882,7 @@ class Admin_DataController extends Zend_Controller_Action } $rows = $fund->getData($id,$keyword); - view::addPaginator($rows,$this->view,$this->_request); + view::addPaginator($rows,$this,10); } }//fund @@ -3627,6 +3892,7 @@ class Admin_DataController extends Zend_Controller_Action $ac = $this->_getParam('ac'); $submit = $this->_getParam('submit'); $uuid = $this->_getParam('uuid'); + $q=$this->_getParam('q'); include_once("data/Doi.php"); $doi = new Doi($this->db); @@ -3636,8 +3902,8 @@ class Admin_DataController extends Zend_Controller_Action { if(empty($uuid)) { - $rows = $doi->fetch(); - view::addPaginator($rows,$this->view,$this->_request); + $rows = $doi->fetch(0,$q); + view::addPaginator($rows,$this,10); }else{ $this->_redirect('/admin/data/doi/ac/edit/?uuid='.$uuid); return true; @@ -3666,11 +3932,11 @@ class Admin_DataController extends Zend_Controller_Action { $this->view->uuid = $uuid; $this->view->data = $doi->view($uuid); + include('data/Metadata.php'); + $md = new Metadata($this->db); + $metadata = $md->view($uuid); if(empty($this->view->data)) { - include('data/Metadata.php'); - $md = new Metadata($this->db); - $metadata = $md->view($uuid); $this->view->data = array( 'uuid'=>$uuid, 'title'=>$metadata['title'], @@ -3681,6 +3947,7 @@ class Admin_DataController extends Zend_Controller_Action 'publisher_en'=>'Cold and Arid Regions Science Data Center at Lanzhou', ); }else{ + $this->view->data['doi'] = $metadata['doi']; $this->view->data['info'] = $doi->data_process_out($this->view->data); } }else{ diff --git a/application/admin/controllers/DownController.php b/application/admin/controllers/DownController.php index b603c68d..b28592ff 100644 --- a/application/admin/controllers/DownController.php +++ b/application/admin/controllers/DownController.php @@ -1,4 +1,12 @@ messenger=$this->_helper->getHelper('FlashMessenger'); $this->view->messages = $this->messenger->getMessages(); $this->_helper->layout->setLayout('administry'); + $this->view->Theme = new Theme(); } function postDispatch() { @@ -17,10 +26,151 @@ class Admin_DownController extends Zend_Controller_Action { //其他连接 } + + //新离线数据申请管理 + function offlineappsAction() + { + $this->view->navIn = $ac = $this->_getParam('ac'); + $this->view->offlineAppId = $offlineappid = $this->_getParam('offlineappid'); + $submit = $this->_getParam('submit'); + $search = $this->_getParam('search'); + + if(empty($ac)) + { + $this->view->navIn = $ac = "notreceived"; + } + + if($ac == "view") + { + if(empty($offlineappid)) + { + view::Post($this,"参数错误",-1); + return true; + } + + $offlineapp = new Offlineapp(); + + if(view::isXmlHttpRequest() !== true) + { + $this->_helper->viewRenderer('offlineapps-view'); + $this->view->data = $offlineapp->getOneAppInfo($offlineappid); + }else{ + $this->_helper->layout->disableLayout(); + $this->_helper->viewRenderer->setNoRender(); + $this->jsonexit($offlineapp->getOneAppInfo($offlineappid)); + } + return true; + } + + if($ac == "notreceived") + { + $this->_helper->viewRenderer('offlineapps-notreceived'); + $offlineapp = new Offlineapp(); + $data = $offlineapp->fetchNotReceived(); + view::addPaginator($data,$this,20); + return true; + }//未接收的 + + if($ac == "nopdf") + { + $this->_helper->viewRenderer('offlineapps-nopdf'); + $offlineapp = new Offlineapp(); + $data = $offlineapp->fetchNoPdf(); + view::addPaginator($data,$this,20); + return true; + }//没有上传申请表的 + + if($ac == "notpassed") + { + $this->_helper->viewRenderer('offlineapps-notpassed'); + $offlineapp = new Offlineapp(); + $data = $offlineapp->fetchNotApprove(); + view::addPaginator($data,$this,20); + return true; + } + + //接收 + if($ac == "receive") + { + $offlineapp = new Offlineapp(); + $statue = $offlineapp->receive($offlineappid); + if($statue !== true) + { + view::Post($this,$statue); + }else{ + view::Post($this,"接收成功",-1); + } + return true; + } + + //发送给作者 + if($ac == "toauthor") + { + $this->_helper->viewRenderer('offlineapps-toauthor'); + if(empty($submit)) + { + + }else{ + $offlineapp = new Offlineapp(); + } + return true; + } + + //拒绝 + if($ac == "deny") + { + $this->_helper->viewRenderer('offlineapps-deny'); + + if(empty($offlineappid)) + { + view::Post($this,"参数错误",-1); + return true; + } + + if(empty($submit)) + { + $offlineapp = new Offlineapp(); + $this->view->data = $offlineapp->getOneAppInfo($offlineappid); + $mail = new Mail(); + $data = array( + 'user' => $this->view->data[0]['username'], + 'datalist' => $this->view->data[0]['datalist'], + ); + $mail->loadTemplate("offline-deny",$data); + $this->view->mail_body = $mail->body; + $this->view->mail_subject = $mail->subject; + } + + return; + } + + //重置申请表 + if($ac == "resetappform") + { + if(empty($offlineappid)) + { + view::Post($this,"参数错误",-1); + return true; + } + + $offlineapp = new Offlineapp(); + $statue = $offlineapp->resetAppForm($offlineappid); + if($statue !== true) + { + view::Post($this,$statue); + }else{ + view::Post($this,"重置成功",-1); + } + + return true; + } + + } //离线数据申请管理 function offlineappAction() { + set_time_limit(0); include_once("Dataorder.php"); $DO = new Dataorder($this->db); @@ -32,8 +182,23 @@ class Admin_DownController extends Zend_Controller_Action $page =(int)$this->_getParam('page'); $reset =(int)$this->_getParam('reset'); $status =(int)$this->_getParam('status'); + $ac = $this->_getParam('ac'); $q = $this->_getParam('q'); + if($ac == "pending") + { + $keyword = ""; + if(!empty($q)) + { + $keyword = $q; + } + + $rows = $DO->fetchAllOfflineApp(3,$keyword); + + view::addPaginator($rows,$this,10); + return true; + } + if (!$page) $page=1; if ($view) { //查看此次申请的pdf @@ -64,9 +229,17 @@ class Admin_DownController extends Zend_Controller_Action $mail->setFrom($this->view->config->service->email,'西部数据中心服务组'); $mail->send(); - $sql="select pdflink from offlineapp where id=?"; - $row=$this->db->fetchRow($sql,array($start)); - $filecontent=file_get_contents($this->view->config->offline->savepath."/".$row['pdflink']); + //如果是wsn数据则生成数据 + $dataservice = new DataService(); + $offlineapp = new Offlineapp(); + if ($offlineapp->hasWsnData($start)) + { + @$dataservice->makeWsnData(array('uid'=>$row['userid'],'action'=>'prepare')); + } + + $sql="select applicationform as pdflink from offlineapp where id=?"; + $row=$this->db->fetchRow($sql,array($start)); + $filecontent=file_get_contents($row['pdflink']); //对每条数据的管理员用户发送相应的邮件通知,同一用户的邮件需要合并 //需要取出对应数据的标题、uuid,以及对应的作者的email(一条数据可能有多个作者,一次申请可能有多条数据对应同一个作者) @@ -229,8 +402,8 @@ class Admin_DownController extends Zend_Controller_Action $role['distributor']=array(); $role['publisher']=array(); $role['author']=array(); - $single=array(); - if ($rows) + $single=array(); + if ($rows) { foreach($rows as $row) { @@ -390,9 +563,14 @@ class Admin_DownController extends Zend_Controller_Action //$this->_redirect('/admin/down/offlineapp/'.$page); } + //如果是wsn数据则生成数据 + //wsn数据在ftp服务器端进行处理 + /*$dataservice = new DataService(); + @$dataservice->makeWsnData();*/ + $sql="update dataorder set status=5,ts_approved=now() where offlineappid=?"; $this->db->query($sql,array($finish)); - $sql="update offlineapp set ts_approved=now() where id=? and ts_approved is null"; + $sql="update offlineapp set ts_approved=now(),status=5 where id=? and ts_approved is null"; $this->db->query($sql,array($finish)); $sql="select * from offlineapp where id=?"; $row=$this->db->fetchRow($sql,array($finish)); @@ -409,6 +587,7 @@ class Admin_DownController extends Zend_Controller_Action // deal with ftp.westgis.ac.cn, use g6 to add path // todo ... } + //deal with ftp1&ftp2 account, for offline data if ($has_ftp1 || $has_ftp2) { $password=md5('westdc'.$row['userid'].rand(1000,9999)); @@ -612,6 +791,68 @@ class Admin_DownController extends Zend_Controller_Action $this->view->paginator=$paginator; } + + //上传申请表 + function uploadapplicationformAction() + { + $this->_helper->layout->disableLayout(); + $this->_helper->viewRenderer->setNoRender(); + + $id = $this->_getParam('orderid'); + + if(empty($id)) + { + $this->jsonexit(array('error'=>"参数错误")); + return true; + } + + $files = new Files(); + $FileListener = new FileListener(); + @$files->events()->attachAggregate($FileListener); + + $statu = $files->uploadApplicationForm($_FILES['Filedata'],$id); + + if(isset($statu['error'])) + { + $this->jsonexit($statu); + return true; + }else{ + $sql = "UPDATE offlineapp SET applicationform='{$statu['file']}' WHERE id=$id"; + if($this->db->exec($sql)) + { + $this->jsonexit(array("success"=>1)); + return true; + }else{ + $this->jsonexit(array('error'=>"数据库记录更新失败".$sql)); + return true; + } + } + } + + public function applicationformAction() + { + $ac = $this->_getParam('ac'); + if($ac == "view") + { + $link = $this->_getParam('link'); + $content=file_get_contents($link); + header("Content-Disposition: inline; filename=applicationform.pdf"); + header("Content-Type:application/pdf"); + echo $content; + exit(); + } + + if($ac == "download") + { + $link = $this->_getParam('link'); + $content=file_get_contents($link); + + $output = new Output(); + $output->pushDownload($content,"申请表.pdf",'pdf'); + exit(); + } + } + //离线数据服务记录 function offlineAction() { @@ -710,21 +951,13 @@ class Admin_DownController extends Zend_Controller_Action $this->_helper->viewRenderer->setNoRender(); $sql="select * from offlineapp where ts_approved is not null and pdflink is not null order by ts_created desc"; $rows=$this->db->fetchAll($sql); + foreach($rows as $row){ - $content.='"'.$row['username'].'","'.$row['unit'].'","'.$row['phone'].'","'.$row['address'].'","'.$row['postcoe'].'","'.str_replace("\"","'",$row['project']).'","'.str_replace("\"","'",$row['datalist']).'","'.$row['email'].'",'.$row['ts_created']."\n"; + $content.='"'.$row['username'].'","'.$row['unit'].'","'.$row['phone'].'","'.$row['address'].'","'.$row['postcode'].'","'.str_replace("\"","'",$row['project']).'","'.str_replace("\"","'",$row['datalist']).'","'.$row['email'].'",'.$row['ts_created']."\r\n"; } - $this->getResponse()->setHeader('Content-Type', 'application/octet-stream') - ->setHeader('Content-Disposition','attachment; filename="offlineapp.csv"') - ->setHeader('Content-Length', strlen($content)) - ->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($content); - + + $output = new Output($this->db); + $output->Download("offlineapp.csv",$content,"string"); } //下载离线服务记录 else if ($update) { @@ -905,7 +1138,7 @@ class Admin_DownController extends Zend_Controller_Action } $select=$this->db->select(); - $select->from('offlineapp')->where('ts_approved is not null')->where('pdflink is not null')->where('status=0')->order('ts_created desc'); + $select->from('offlineapp')->where('ts_approved is not null')->where('pdflink is not null')->where('status>=0')->order('ts_created desc'); $paginator = Zend_Paginator::factory($select); $paginator->setCurrentPageNumber($this->_getParam('page')); $paginator->setItemCountPerPage($this->view->config->page->max); diff --git a/application/admin/controllers/ReviewController.php b/application/admin/controllers/ReviewController.php index 3a703bf6..001217bf 100644 --- a/application/admin/controllers/ReviewController.php +++ b/application/admin/controllers/ReviewController.php @@ -123,6 +123,24 @@ class Admin_ReviewController extends Zend_Controller_Action } }//changestatus 更改状态 + function editorAction() + { + include_once("helper/view.php"); + include_once("data/Review.php"); + + $this->view->keyword = $keyword = $this->_request->getParam('keyword'); + + $review = new Review(); + if(!empty($keyword)) + { + $filter['keyword'] = $keyword; + $data = $review->needEditor($filter); + }else{ + $data = $review->needEditor(); + } + + \view::addPaginator($data,$this,NULL,20); + } /* * acceptAction()待审元数据 @@ -191,16 +209,12 @@ class Admin_ReviewController extends Zend_Controller_Action $sql = "select m.*,md.title,u.username,u.realname from mdstatus m right join metadata md on md.uuid=m.uuid left join users u on u.id=m.userid - where m.status in (1,2,3,4) order by m.ts_created desc"; + where m.status in (1,2,3,4) + order by m.ts_created desc"; $re = $this->db->query($sql); $rows = $re->fetchAll(); - $paginator = Zend_Paginator::factory($rows); - $paginator->setCurrentPageNumber($this->_getParam('page')); - $paginator->setItemCountPerPage($this->view->config->page->max); - $paginator->setView($this->view); - Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml'); - $this->view->paginator=$paginator; + \view::addPaginator($rows,$this,NULL,20); }//列表 }//acceptAction @@ -586,6 +600,8 @@ class Admin_ReviewController extends Zend_Controller_Action $search=$this->_request->getParam('search'); $filter['keyword'] = $this->_request->getParam('keyword'); $filter['code'] = $this->_request->getParam('code'); + $filter['order'] = $this->_request->getParam('order'); + $filter['sort'] = $this->_request->getParam('sort'); $review = new Review($this->db); if(!empty($search) && !empty($filter)) @@ -593,6 +609,9 @@ class Admin_ReviewController extends Zend_Controller_Action $rows = $review->adminReviews($filter); $this->view->keyword = $filter['keyword']; $this->view->code = $filter['code']; + }if(!empty($filter)) + { + $rows = $review->adminReviews($filter); }else{ $rows = $review->adminReviews(); } diff --git a/application/admin/views/scripts/data/attachmentsadd.phtml b/application/admin/views/scripts/data/attachmentsadd.phtml index c6a37c0a..5660ef70 100644 --- a/application/admin/views/scripts/data/attachmentsadd.phtml +++ b/application/admin/views/scripts/data/attachmentsadd.phtml @@ -7,12 +7,7 @@ $this->breadcrumb('后台首页'); $this->breadcrumb('数据管理'); $this->breadcrumb()->setSeparator(' > '); - $this->headLink()->appendStylesheet('/static/js/uploadify/uploadify.css'); - $this->headScript()->appendFile('/static/js/jquery-1.7.2.min.js'); - $this->headScript()->appendFile('/js/jquery.colorbox-min.js'); - $this->headLink()->appendStylesheet('/css/colorbox.css'); - $this->headScript()->appendFile('/static/js/uploadify/swfobject.js'); - $this->headScript()->appendFile('/static/js/uploadify/jquery.uploadify.v2.1.4.min.js'); + $this->theme->AppendPlus($this,"uploadify"); ?>
partial('data/left.phtml'); ?> @@ -21,7 +16,7 @@ @@ -30,7 +25,8 @@

注:可选择多个文件
-

+
+

@@ -38,65 +34,79 @@
+data['attid']) && !empty($this->data['attid'])){ ?> +' /> + + \ No newline at end of file diff --git a/application/admin/views/scripts/data/ref-files.phtml b/application/admin/views/scripts/data/ref-files.phtml new file mode 100644 index 00000000..9bf1e160 --- /dev/null +++ b/application/admin/views/scripts/data/ref-files.phtml @@ -0,0 +1,105 @@ +headTitle($this->config->title->site); +$this->headTitle('后台管理'); +$this->headTitle()->setSeparator(' - '); +$this->breadcrumb('首页'); +$this->breadcrumb('数据管理'); +$this->breadcrumb('文献管理'); +$this->breadcrumb()->setSeparator(' > '); +$this->theme->AppendPlus($this,'colorbox'); +$this->theme->AppendPlus($this,'admin_plugin'); +?> + +
+
+ partial('data/left.phtml'); ?> +
+
+
+ partial('data/ref-nav.phtml',array('ac'=>$this->ac)); ?> +
+
+
+
+ + +
+
+
+ error)) { ?> + error ?> + + msg)) { ?> + msg ?> + +
+ paginator)): ?> + + + + + + + + + + paginator as $item): + $autoindex++;?> + + + + + + + +
文件名状态操作
未编辑':"已编辑" ?> + 编辑 + 删除 +
+ + +
+ +
+
+ + \ No newline at end of file diff --git a/application/admin/views/scripts/data/ref-mdref-form.phtml b/application/admin/views/scripts/data/ref-mdref-form.phtml new file mode 100644 index 00000000..6721ff29 --- /dev/null +++ b/application/admin/views/scripts/data/ref-mdref-form.phtml @@ -0,0 +1,48 @@ + \ No newline at end of file diff --git a/application/admin/views/scripts/data/ref-metadatas.phtml b/application/admin/views/scripts/data/ref-metadatas.phtml new file mode 100644 index 00000000..f004d4df --- /dev/null +++ b/application/admin/views/scripts/data/ref-metadatas.phtml @@ -0,0 +1,69 @@ +headTitle($this->config->title->site); +$this->headTitle('后台管理'); +$this->headTitle()->setSeparator(' - '); +$this->breadcrumb('首页'); +$this->breadcrumb('数据管理'); +$this->breadcrumb('文献管理'); +$this->breadcrumb()->setSeparator(' > '); +$this->theme->AppendPlus($this,'colorbox'); +$this->theme->AppendPlus($this,'admin_plugin'); +$this->theme->AppendModel($this,'admin-data-ref'); +?> + +
+
+ partial('data/left.phtml'); ?> +
+
+
+ partial('data/ref-nav.phtml',array('ac'=>$this->ac)); ?> +
+ error)) { ?> + error ?> + + msg)) { ?> + msg ?> + + +
+ paginator)): ?> + + + + + + + + + + + paginator as $item): + $autoindex++;?> + + + + + + + + +
元数据类型排序操作
referenceType[$item['reftype']]) ? $this->referenceType[$item['reftype']]:"" ?> + 编辑 + 移除 +
+ + +
+ +
+
+ +partial('data/ref-mdref-form.phtml',array('referenceType'=>$this->referenceType,'refid'=>$this->refid)); ?> + \ No newline at end of file diff --git a/application/admin/views/scripts/data/ref-multiupload.phtml b/application/admin/views/scripts/data/ref-multiupload.phtml new file mode 100644 index 00000000..c2cdb1bf --- /dev/null +++ b/application/admin/views/scripts/data/ref-multiupload.phtml @@ -0,0 +1,120 @@ +headTitle($this->config->title->site); +$this->headTitle('后台管理'); +$this->headTitle()->setSeparator(' - '); +$this->breadcrumb('首页'); +$this->breadcrumb('数据管理'); +$this->breadcrumb('文献管理'); +$this->breadcrumb()->setSeparator(' > '); +$this->theme->AppendPlus($this,'colorbox'); +$this->theme->AppendPlus($this,"uploadify"); +$this->theme->AppendPlus($this,'admin_plugin'); +?> + +
+
+ partial('data/left.phtml'); ?> +
+
+
+ partial('data/ref-nav.phtml',array('ac'=>$this->ac)); ?> +
+ error)) { ?> + error ?> + + msg)) { ?> + msg ?> + +
+
+ +
+ +
+
+
+ +
+ +
+
+ + +data['attid']) && !empty($this->data['attid'])){ ?> +' /> + + \ No newline at end of file diff --git a/application/admin/views/scripts/data/ref-nav.phtml b/application/admin/views/scripts/data/ref-nav.phtml new file mode 100644 index 00000000..85329fdd --- /dev/null +++ b/application/admin/views/scripts/data/ref-nav.phtml @@ -0,0 +1,10 @@ + \ No newline at end of file diff --git a/application/admin/views/scripts/data/ref-ris.phtml b/application/admin/views/scripts/data/ref-ris.phtml new file mode 100644 index 00000000..342bfeb6 --- /dev/null +++ b/application/admin/views/scripts/data/ref-ris.phtml @@ -0,0 +1,67 @@ +headTitle($this->config->title->site); +$this->headTitle('后台管理'); +$this->headTitle()->setSeparator(' - '); +$this->breadcrumb('首页'); +$this->breadcrumb('数据管理'); +$this->breadcrumb('文献管理'); +$this->breadcrumb()->setSeparator(' > '); +$this->theme->AppendPlus($this,'colorbox'); +$this->theme->AppendPlus($this,"uploadify"); +$this->theme->AppendPlus($this,'admin_plugin'); +?> + +
+
+ partial('data/left.phtml'); ?> +
+
+
+ partial('data/ref-nav.phtml',array('ac'=>$this->ac)); ?> +
+ error)) { ?> + error ?> + + msg)) { ?> + msg ?> + + data)) { ?> +
+
+ +
+ +
+
+
+
+ +
+ +
+
+
+ + +
+
+ + data as $k=>$ref) + { + echo '
    '; + foreach($ref as $index=>$value) + { + $v = is_array($value) ? join("|",$value) : $value; + echo '
  • '.$index .":". $v .'
  • '; + } + echo "
"; + } + ?> + + +
+
+ \ No newline at end of file diff --git a/application/admin/views/scripts/data/ref-singleris.phtml b/application/admin/views/scripts/data/ref-singleris.phtml new file mode 100644 index 00000000..54440b16 --- /dev/null +++ b/application/admin/views/scripts/data/ref-singleris.phtml @@ -0,0 +1,63 @@ +headTitle($this->config->title->site); +$this->headTitle('后台管理'); +$this->headTitle()->setSeparator(' - '); +$this->breadcrumb('首页'); +$this->breadcrumb('数据管理'); +$this->breadcrumb('文献管理'); +$this->breadcrumb()->setSeparator(' > '); +$this->theme->AppendPlus($this,'colorbox'); +$this->theme->AppendPlus($this,"uploadify"); +$this->theme->AppendPlus($this,'admin_plugin'); +?> + +
+
+ partial('data/left.phtml'); ?> +
+
+
+ partial('data/ref-nav.phtml',array('ac'=>$this->ac)); ?> +
+ error)) { ?> + error ?> + + msg)) { ?> + msg ?> + +

referenceData['title']) ? $this->referenceData['reference'] : $this->referenceData['title'] ?>

+
+ data)) { ?> +
+
+ +
+ + * 此功能是使用单个文献的 RIS 文本导入并覆盖以前填写过的信息 +
+
+
+ + +
+
+ + data as $k=>$ref) + { + echo '
    '; + foreach($ref as $index=>$value) + { + $v = is_array($value) ? join("|",$value) : $value; + echo '
  • '.$index .":". $v .'
  • '; + } + echo "
"; + } + ?> + + +
+
+ \ No newline at end of file diff --git a/application/admin/views/scripts/data/ref.phtml b/application/admin/views/scripts/data/ref.phtml new file mode 100644 index 00000000..b1298c2b --- /dev/null +++ b/application/admin/views/scripts/data/ref.phtml @@ -0,0 +1,102 @@ +headTitle($this->config->title->site); +$this->headTitle('后台管理'); +$this->headTitle()->setSeparator(' - '); +$this->breadcrumb('首页'); +$this->breadcrumb('数据管理'); +$this->breadcrumb('文献管理'); +$this->breadcrumb()->setSeparator(' > '); +$this->theme->AppendPlus($this,'colorbox'); +$this->theme->AppendPlus($this,'admin_plugin'); +$this->theme->AppendModel($this,'admin-data-ref'); +?> + +
+
+ partial('data/left.phtml'); ?> +
+
+
+ partial('data/ref-nav.phtml',array('ac'=>$this->ac)); ?> +
+
+
+
+ + + + +
+
+
+ error)) { ?> + error ?> + + msg)) { ?> + msg ?> + +
+ paginator)): ?> + + + + + + + + + + + paginator as $item): + $autoindex++;?> + + + + + + + + + + + + + + + + + + + + +
标题 + + + 年份 + + + 记录创建 + + + 操作
+ 编辑 + RIS编辑 + 数据(+) + 删除 +
+ 编辑 + RIS编辑 + 数据 + 删除 +
+ + +
+ +
+
+ +partial('data/ref-mdref-form.phtml',array('referenceType'=>$this->referenceType)); ?> \ No newline at end of file diff --git a/application/admin/views/scripts/data/reference.phtml b/application/admin/views/scripts/data/reference.phtml index 5e426ae5..39ff21ce 100644 --- a/application/admin/views/scripts/data/reference.phtml +++ b/application/admin/views/scripts/data/reference.phtml @@ -56,7 +56,7 @@ foreach ($this->paginator as $item): $i=0; $u=$item['uuid']; endif; - if ($i==0) echo '

元数据:'.$item['title'].'添加

    '; + if ($i==0) echo '

    元数据:'.$item['mdtitle'].'添加

      '; echo '
    1. 文献(编辑 删除 排序):'.$item['place'].'. '.$item['reference'].'
    2. '; endforeach; echo ''; diff --git a/application/admin/views/scripts/down/left.phtml b/application/admin/views/scripts/down/left.phtml index 0736736f..5afd002e 100644 --- a/application/admin/views/scripts/down/left.phtml +++ b/application/admin/views/scripts/down/left.phtml @@ -1,9 +1,10 @@ -
- - +partial('down/offlineapps-uploaderform.phtml'); ?> \ No newline at end of file diff --git a/application/admin/views/scripts/down/offlineapps-notpassed.phtml b/application/admin/views/scripts/down/offlineapps-notpassed.phtml new file mode 100644 index 00000000..e84534bf --- /dev/null +++ b/application/admin/views/scripts/down/offlineapps-notpassed.phtml @@ -0,0 +1,73 @@ +headTitle($this->config->title->site); + $this->headTitle('后台管理'); + $this->headTitle()->setSeparator(' - '); + $this->breadcrumb()->setSeparator(' > '); + $this->Theme->AppendPlus($this,'colorbox'); + $this->Theme->AppendPlus($this,'uploadify'); + $this->Theme->AppendModel($this,'admin-down-offlineapps'); + $this->Theme->AppendModel($this,'sfadmin'); + function applicationform($form) + { + if(empty($form)) + { + return "未提交"; + }else{ + return '查看'; + } + } +?> + +
+
+ partial('down/left.phtml'); ?> +
+
+ + partial('down/offlineapps-navpills.phtml',array('navIn'=>$this->navIn)); ?> + + + + + + + + + + + + + + + + paginator)): ?> + + paginator as $item): ?> + + + + + + + + + + +
申请者提交时间申请表操作
'.mb_substr($item['title'],0,15,"UTF-8")."";echo mb_strlen($item['title'],"UTF-8") > 15 ? "...":"";?> + 查看详细 + 发给作者 + 上传申请表 + 重置申请表 +
+ + +
+
+ +partial('down/offlineapps-uploaderform.phtml'); ?> \ No newline at end of file diff --git a/application/admin/views/scripts/down/offlineapps-notreceived.phtml b/application/admin/views/scripts/down/offlineapps-notreceived.phtml new file mode 100644 index 00000000..c9e8f0b2 --- /dev/null +++ b/application/admin/views/scripts/down/offlineapps-notreceived.phtml @@ -0,0 +1,74 @@ +headTitle($this->config->title->site); + $this->headTitle('后台管理'); + $this->headTitle()->setSeparator(' - '); + $this->breadcrumb()->setSeparator(' > '); + $this->Theme->AppendPlus($this,'colorbox'); + $this->Theme->AppendPlus($this,'uploadify'); + $this->Theme->AppendModel($this,'admin-down-offlineapps'); + $this->Theme->AppendModel($this,'sfadmin'); + function applicationform($form) + { + if(empty($form)) + { + return "未提交"; + }else{ + return '查看 下载'; + } + } +?> + +
+
+ partial('down/left.phtml'); ?> +
+
+ + partial('down/offlineapps-navpills.phtml',array('navIn'=>$this->navIn)); ?> + + + + + + + + + + + + paginator)): ?> + + paginator as $item): ?> + + + + + + + + + + +
申请者提交时间申请表操作
'.mb_substr($item['title'],0,15,"UTF-8")."";echo mb_strlen($item['title'],"UTF-8") > 15 ? "...":"";?> + 查看详细 + 接收 + 退回 + 上传申请表 + 重置申请表 +
+ + +
+
+ +partial('down/offlineapps-uploaderform.phtml'); ?> \ No newline at end of file diff --git a/application/admin/views/scripts/down/offlineapps-toauthor.phtml b/application/admin/views/scripts/down/offlineapps-toauthor.phtml new file mode 100644 index 00000000..0f7a08ed --- /dev/null +++ b/application/admin/views/scripts/down/offlineapps-toauthor.phtml @@ -0,0 +1,42 @@ +headTitle($this->config->title->site); + $this->headTitle('后台管理'); + $this->headTitle()->setSeparator(' - '); + $this->breadcrumb()->setSeparator(' > '); + $this->Theme->AppendPlus($this,'colorbox'); + $this->Theme->AppendPlus($this,'uploadify'); + $this->Theme->AppendModel($this,'admin-down-offlineapps'); + $this->Theme->AppendModel($this,'sfadmin'); + function applicationform($form) + { + if(empty($form)) + { + return "未提交"; + }else{ + return '点击下载'; + } + } +?> + +
+
+ partial('down/left.phtml'); ?> +
+
+ + partial('down/offlineapps-navpills.phtml',array('navIn'=>$this->navIn)); ?> + +

发给作者

+ + + +
+
+ +partial('down/offlineapps-uploaderform.phtml'); ?> \ No newline at end of file diff --git a/application/admin/views/scripts/down/offlineapps-uploaderform.phtml b/application/admin/views/scripts/down/offlineapps-uploaderform.phtml new file mode 100644 index 00000000..3af9cb18 --- /dev/null +++ b/application/admin/views/scripts/down/offlineapps-uploaderform.phtml @@ -0,0 +1,19 @@ + + \ No newline at end of file diff --git a/application/admin/views/scripts/down/offlineapps-view.phtml b/application/admin/views/scripts/down/offlineapps-view.phtml new file mode 100644 index 00000000..d11ca140 --- /dev/null +++ b/application/admin/views/scripts/down/offlineapps-view.phtml @@ -0,0 +1,63 @@ +headTitle($this->config->title->site); + $this->headTitle('后台管理'); + $this->headTitle()->setSeparator(' - '); + $this->breadcrumb()->setSeparator(' > '); + $this->Theme->AppendPlus($this,'colorbox'); + $this->Theme->AppendPlus($this,'uploadify'); + $this->Theme->AppendModel($this,'admin-down-offlineapps'); + $this->Theme->AppendModel($this,'sfadmin'); + function applicationform($form) + { + if(empty($form)) + { + return "未提交"; + }else{ + return '点击下载'; + } + } +?> + +
+
+ partial('down/left.phtml'); ?> +
+
+ + partial('down/offlineapps-navpills.phtml',array('navIn'=>$this->navIn)); ?> + +

查看详细

+ +
    +
  • 申请者:data[0]['username'] ?>
  • +
  • 单位:data[0]['unit'] ?>
  • +
  • 电话:data[0]['phone'] ?>
  • +
  • 地址:data[0]['address'] ?>
  • +
  • 邮编:data[0]['postcode'] ?>
  • +
  • 未签字pdf:data[0]['pdflink'] ?>
  • +
  • 签字pdf:data[0]['applicationform']) && !empty($this->data[0]['applicationform'])) ? '查看 下载':"未提交"?>
  • +
  • 数据列表:data[0]['datalist'] ?>
  • +
  • 邮箱:data[0]['email'] ?>
  • + +
  • 项目编号:data[0]['project_id'] ?>
  • +
  • 项目类型:data[0]['project_type'] ?>
  • +
  • 项目名称:data[0]['project_title'] ?>
  • +
  • 项目负责人:data[0]['leader'] ?>
  • +
  • 项目负责人职称:data[0]['leadertitle'] ?>
  • +
  • 项目介绍:data[0]['project'] ?>
  • + +
  • 申请时间:data[0]['ts_created'] ?>
  • +
  • 接收时间:data[0]['ts_received'] ?>
  • +
  • 通过时间:data[0]['ts_approved'] ?>
  • +
+ +
+
+ +partial('down/offlineapps-uploaderform.phtml'); ?> \ No newline at end of file diff --git a/application/admin/views/scripts/down/offlineapps.phtml b/application/admin/views/scripts/down/offlineapps.phtml new file mode 100644 index 00000000..b89078b9 --- /dev/null +++ b/application/admin/views/scripts/down/offlineapps.phtml @@ -0,0 +1,50 @@ +headTitle($this->config->title->site); + $this->headTitle('后台管理'); + $this->headTitle()->setSeparator(' - '); + $this->breadcrumb()->setSeparator(' > '); +?> + +
+
+ partial('down/left.phtml'); ?> +
+
+ + partial('down/offlineapps-navpills.phtml',array('navIn'=>$this->navIn)); ?> + + + + + + + + + + + paginator)): ?> + + paginator as $item): ?> + + + + + + + + + +
元数据标题责任编辑接收时间操作
+ 分配编辑 +
+ + +
+
\ No newline at end of file diff --git a/application/admin/views/scripts/post-message.phtml b/application/admin/views/scripts/post-message.phtml index 89d2f043..4852db0d 100644 --- a/application/admin/views/scripts/post-message.phtml +++ b/application/admin/views/scripts/post-message.phtml @@ -10,9 +10,9 @@ if(!empty($this->pageTitle))

content ?>url)) echo ",系统正在为您跳转..."?>

url)) {?> - url == -1) { ?> + url)) { ?> 如果没有跳转请点击这样 - + 如果没有跳转请点击这样 diff --git a/application/admin/views/scripts/review/accept.phtml b/application/admin/views/scripts/review/accept.phtml index a2c24848..4f44491d 100644 --- a/application/admin/views/scripts/review/accept.phtml +++ b/application/admin/views/scripts/review/accept.phtml @@ -36,7 +36,7 @@ table thead tr th {background:#EBF2F6;color:#444;} - + @@ -48,7 +48,7 @@ table thead tr th {background:#EBF2F6;color:#444;} diff --git a/application/admin/views/scripts/review/editor.phtml b/application/admin/views/scripts/review/editor.phtml new file mode 100644 index 00000000..80f06c7c --- /dev/null +++ b/application/admin/views/scripts/review/editor.phtml @@ -0,0 +1,60 @@ +headTitle($this->config->title->site); + $this->headTitle('后台管理'); + $this->headTitle()->setSeparator(' - '); + $this->breadcrumb('首页'); + $this->breadcrumb('后台首页'); + $this->breadcrumb('元数据评审'); + $this->breadcrumb()->setSeparator(' > '); +?> + +
+
+ partial('review/left.phtml'); ?> +
+
+ msg or $this->messages) :?> +
+ msg) : ?> +

msg; ?>

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

+ +
+ + + + + + + + + +
元数据标题负责编辑责任编辑 接收时间 操作
- 分配编辑 + 更改责任编辑
+ + + + + + + paginator)): ?> + + paginator as $item): ?> + + + + + + + + + +
元数据标题责任编辑接收时间操作
+ 分配编辑 +
+ +
+ \ No newline at end of file diff --git a/application/admin/views/scripts/review/left.phtml b/application/admin/views/scripts/review/left.phtml index 1937f856..b9ce7de6 100644 --- a/application/admin/views/scripts/review/left.phtml +++ b/application/admin/views/scripts/review/left.phtml @@ -1,6 +1,7 @@ - - \ No newline at end of file diff --git a/application/default/views/scripts/water/view.phtml b/application/default/views/scripts/water/view.phtml index 580455f6..3d4a58e9 100755 --- a/application/default/views/scripts/water/view.phtml +++ b/application/default/views/scripts/water/view.phtml @@ -11,6 +11,9 @@ $this->theme->AppendPlus($this,'google_map_v3'); $this->theme->AppendPlus($this,'colorbox'); $this->nav[] = array('link'=>"/water",'title'=>'黑河综合遥感联合试验'); + if(!empty($this->dataService)) { + $this->theme->AppendModel($this,"dataservice"); + } ?>