Compare commits

...

174 Commits

Author SHA1 Message Date
jack 9b6590b4ee update metadata view page in card 2019-01-23 12:36:10 +08:00
jack 36d02af439 update data view page in card 2019-01-23 12:31:16 +08:00
wlx e761d11437 Fix #37: 简化在线下载信息 2016-09-04 10:09:44 +08:00
wlx 6ffc810818 修改专题文献 2016-04-18 16:00:35 +08:00
wlx ca84785f62 修改HiWATER专题文献说法 2016-04-18 15:56:00 +08:00
wlx 280536011d #36 优化HiWATER中字符与数字的混合排序 2016-04-09 12:08:25 +08:00
wlx bbcb2d4488 修复分类未包含问题 2016-04-08 21:11:22 +08:00
wlx 5c3a1711c0 fix #36: 修改HiWATER中数据列表的排序,让其中的站点编号按照大小排序 2016-04-08 17:13:51 +08:00
wlx e456b57b0c 移除相关文献和相关搜索功能,移除文献共享方式文字显示 2016-04-07 16:09:05 +08:00
wlx c2d4b32cf8 修复#35, Bib英文引用问题 2016-04-05 22:17:34 +08:00
wlx 867b75bff0 修复错误入口问题 2015-12-29 14:46:48 +08:00
wlx 580cb14fe5 修复前台数据作者提交数据时的“错误入口”问题 2015-12-29 08:55:30 +08:00
wlx 794589e140 fix westdc/westdc-zf1#24 2015-12-21 23:43:04 +08:00
wlx 5ea7e19d8c 修复后台元数据发布时的xml解析以及搜索构建问题: westdc/westdc-zf1#24 2015-12-21 23:41:16 +08:00
wlx 9eb8483f55 添加引号 2015-11-28 11:08:22 +08:00
wlx f3b2718a72 修改默认跳转为我负责的元数据 2015-11-28 11:04:27 +08:00
wlx a664b2b932 待审中添加“我要审”的链接 2015-11-28 11:00:50 +08:00
wlx 0fd5efe1f3 CARD后台DOI优先使用英文标题 2015-11-27 16:55:36 +08:00
wlx edb0003eec 后台DOI搜索时可以搜索标题和doi 2015-11-27 16:19:22 +08:00
wlx 6adc51b52e 修复后台不能修改指定英文数据目录的问题 2015-10-25 16:42:22 +08:00
wlx b656e80edb Change HiWATER Navigation keywords. 2015-10-25 16:08:27 +08:00
Jianxuan Li c1def61678 Change the hiwater view translation, fix doc thumburl problem. 2015-10-24 23:03:29 +08:00
wlx 224050096e 修正获取radio值的js 2015-09-17 17:04:00 +08:00
wlx abc95dd01c 修复参数参数,修正后台列表中的多语言数据版本问题 2015-09-14 16:33:46 +08:00
wlx ce36f84648 在CARD后台实现多语言数据版本的支持;实现前台多语言文件列表的查看 2015-09-14 16:01:15 +08:00
wlx 522d3b707f translate Chinese into English in file list 2015-09-13 14:15:54 +08:00
wlx 08560165ed 记录onlineapp在线下载中的语言信息 2015-09-08 00:14:56 +08:00
wlx 6f05dcdb87 FIX westdc/westdc-zf1#21, 调整CARD中数据引用逻辑处理 2015-08-12 16:58:40 +08:00
wlx 9c284068bb Add view-tianditu in WATER project 2015-07-25 21:01:44 +08:00
wlx 473015e755 修改元数据摘要的单词分割展示方式 2015-06-29 16:32:52 +08:00
wlx 37f11e3566 fix ip bug 2015-06-29 12:41:29 +08:00
wlx 780ba5a891 用ipip.net库替换了之前版本的ip库,更精确 2015-06-25 20:38:07 +08:00
wlx 0e8b254f1a fix westdc/westdc-zf1#14, add tianditu & google maps support with ip check library. 2015-06-20 15:28:56 +08:00
wlx 8204e5704c 优化功能导航 2015-06-20 10:09:22 +08:00
wlx 093d8db854 fix: westdc/westdc-zf1#15, 修复fund页面问题 2015-06-20 09:58:23 +08:00
wlx 42de94b668 fix westdc/westdc-zf1#6, 优化数据查看页面 2015-06-19 22:09:22 +08:00
wlx 2eda668683 移除无用代码,添加中文CARD文献链接 2015-06-18 23:07:38 +08:00
wlx 42f89981da fix westdc/westdc-zf1#5 : 区分施引文献 2015-06-18 22:45:07 +08:00
wlx 3646e7cbdd 修改数据首页,移除部分内容,扩充专题内容展示 2015-06-17 16:05:39 +08:00
wlx 878ab823e9 change version commit email to admin with english template 2015-06-12 09:20:46 +08:00
Jianxuan Li 23cfddcab3 issue #8 ,change the text 2015-06-09 15:34:45 +08:00
wlx 41fa299bce CARD首页增加专题入口及简要介绍,美化首页的icon,修复: westdc/westdc-zf1#12 2015-06-07 21:59:03 +08:00
wlx c612f611e6 change wrong word 2015-06-07 21:54:58 +08:00
wlx e2811a6f3e change "Related publications" to "Related Publications" 2015-06-06 13:41:28 +08:00
wlx 2dfaaa8d66 ISO 19115中不显示副标题为空的解析错误 2015-06-06 07:23:55 +08:00
wlx 6816e777ad 首页增加专题链接,区分展示在线、离线数据top 5 2015-06-04 21:59:47 +08:00
wlx a839bdde54 修复科技网通行证问题 2015-04-24 09:23:44 +00:00
wlx 9a8d043ff9 修复搜索的错误,移除添加英文版链接 2015-04-24 09:16:39 +00:00
wlx aa7dae955c 修改专题文献处理方式 2015-04-23 08:12:34 +00:00
wlx 2b6f435b14 hiwater关键词修改 2015-04-11 04:02:55 +00:00
wlx 659195942a 切换邮件模板为英文 2015-03-24 06:07:58 +00:00
wlx ffe945b496 修复SQL提取错误 2015-03-20 09:48:58 +00:00
wlx eaa2692fca add doi element for dci 2015-02-12 15:34:02 +00:00
wlx 69d1a8d23a 修改分类说明 2015-01-16 09:49:43 +00:00
wlx b4eb767e6c 修复编辑中的标题缺失问题 2015-01-09 09:55:49 +00:00
wlx b930363955 采用json方法处理postgresql数组 2015-01-09 09:44:43 +00:00
wlx 34616beca3 change map name 2015-01-05 07:38:55 +00:00
wlx ee80c48617 change to tianditu, fix chinese link problem 2015-01-05 07:36:00 +00:00
wlx 2320c27788 fix author error 2015-01-05 07:16:38 +00:00
wlx f49ecfbce3 fix doi xml error 2015-01-05 07:13:51 +00:00
wlx c1c939c57b 限制摘要长度 2015-01-05 07:05:38 +00:00
wlx 48aa21d6a3 显示英文标题 2015-01-05 06:58:25 +00:00
wlx b63db3e7bb 修改DOI注册xml 2015-01-05 06:54:22 +00:00
wlx 109d194b34 change pgsql array problem 2015-01-05 06:50:16 +00:00
wlx 8b3828b287 fix order problem 2015-01-05 05:41:37 +00:00
wlx 1a0657e0aa fix order problem 2015-01-05 05:16:34 +00:00
wlx bcb1ce1370 remove author & org 2015-01-05 05:15:16 +00:00
wlx f16e907d39 fix author problem 2015-01-05 05:13:36 +00:00
wlx 970550a531 fix publisher problem 2015-01-05 05:12:10 +00:00
wlx d694ad6f87 fix publisher problem 2015-01-05 05:09:55 +00:00
wlx fbc2154568 set author & org to null array 2015-01-05 05:08:32 +00:00
wlx d5b3d9db04 set the author and org null 2015-01-05 05:07:09 +00:00
wlx 542bcdd09a avoid to check chinese field 2015-01-05 05:02:10 +00:00
wlx 3e8640675b change site name 2015-01-05 04:58:25 +00:00
wlx 66f92a1beb 修改英文版doi修改方法 2015-01-05 04:55:12 +00:00
wlx f556a1bebb comment warnings 2015-01-05 04:28:10 +00:00
wlx 8b44c44722 fix translation problem. 2014-12-12 06:57:32 +00:00
wlx b4c32e7a16 merge heihedata branch r5010 - r5037 into metadata-en-2.0 2014-12-12 06:52:16 +00:00
wlx cf27b73034 修改部分HiWATER专题功能 2014-11-29 14:37:25 +00:00
wlx ad1fbf588e 更新hiwater导航栏 2014-11-28 03:14:23 +00:00
wlx c7e17207f8 修改hiwater专题 2014-09-30 06:50:23 +00:00
wlx 8f53104216 add hiwater translation 2014-09-30 06:50:20 +00:00
wlx 8c450f4baa 修复ISO 19115中不能保存元数据series的问题 2014-09-19 08:31:02 +00:00
wlx f5d73ba015 修复数据提交中的保存错误 2014-09-19 08:21:00 +00:00
wlx 4dd37341ed fix sql error, change the chinese blank 2014-09-18 11:01:23 +00:00
wlx 5fef38b8ab fix sql error 2014-09-18 07:17:13 +00:00
wlx a03634d816 fix sql error 2014-09-18 07:09:42 +00:00
wlx cc075c5c9e 修复提交错误 2014-09-18 07:07:45 +00:00
wlx 8f4bddc82d merge heihedata branch r4982 - r5009 into metadata-en-2.0 2014-09-18 05:19:23 +00:00
wlx 876ac1e525 完善数据作者的文献和版本管理 2014-09-02 13:06:16 +00:00
wlx e26f395965 修改作者功能 2014-09-02 13:06:15 +00:00
wlx 30635d3be2 merge heihedata branch r4472 to r4980 into metadata-en-2.0 2014-09-02 05:20:24 +00:00
wlx 867b746458 增加离线申请限制 2014-06-24 23:58:46 +00:00
wlx eed79dc33a 数据作者功能翻译 2014-06-24 10:20:36 +00:00
wlx 98cf5afac3 修复版本显示问题 2014-06-23 14:19:44 +00:00
wlx 8102223a87 修复发布后的问题 2014-06-23 06:56:40 +00:00
wlx 237dc74989 修复发布错误的问题 2014-06-23 06:45:27 +00:00
wlx d36469db5f 只显示英文评审的元数据 2014-06-23 06:42:49 +00:00
wlx ebcc6cb2de add absolute path 2014-06-23 06:28:23 +00:00
wlx e3209f8b6f change email name 2014-05-15 13:22:33 +00:00
wlx 4d6bf3f060 upgrade fpdi version 1.5.1, fpdf version 1.7 2014-05-15 13:19:22 +00:00
wlx 60435addd8 change to en email template 2014-05-15 12:42:41 +00:00
wlx 1214c9d53e fix ref page in the pdf problem 2014-05-15 12:23:32 +00:00
wlx 483ac9c6ff 暂时注释掉生成范围选择pdf页 2014-05-15 12:18:07 +00:00
wlx 293598f083 修复pdf不显示文字问题 2014-05-15 12:05:47 +00:00
Li Jianxuan 13f64c4601 添加子集选择时的登录判断 2014-05-15 09:46:36 +00:00
Li Jianxuan 9b83ce6a8c 添加冰川数据子集选择功能 2014-05-15 09:27:41 +00:00
wlx df1f6d3a22 copy data/view 2014-05-12 07:17:31 +00:00
Li Jianxuan 08723b8a43 英文站添加新Dataservice模块,增加冰川数据dataservice
service_type 3
2014-05-12 07:15:24 +00:00
wlx 6da90a2f76 fix data cite title problem 2014-05-10 06:41:54 +00:00
wlx 0a015fa94a change default view theme 2014-05-10 06:36:02 +00:00
wlx 6786e739b0 change version control to en schema. 2014-05-10 06:15:08 +00:00
wlx 56f501da6c change view theme to default 2014-05-10 05:49:43 +00:00
wlx 0e6e907cc6 Add initial review function for CARD. 2014-05-10 05:45:25 +00:00
wlx 56680eff56 fix could not delete metadata problem 2014-05-10 05:31:35 +00:00
wlx 0743137fea 修复后台提交元数据到英文系统的问题 2014-05-10 05:27:51 +00:00
wlx f166c3e3ef switch geonetwork to english 2014-05-10 04:51:25 +00:00
wlx 975a5db9d7 merge heihedata branch r4469 - r4471. 2014-05-09 06:22:07 +00:00
wlx b153bfcedf merge heihedata branch r4465 2014-05-09 02:36:30 +00:00
wlx 42c2cba7bb change default language to en 2014-05-08 13:31:00 +00:00
wlx 045d50424c merge heihedata branch from r4067 to r4462. 2014-05-08 13:25:27 +00:00
wlx 758a254ec9 fix #581, 解决未发布的英文元数据显示到doi列表中的问题 2014-05-08 02:27:37 +00:00
Li Jianxuan 42e2e8b671 修改注册页面中文 2014-04-23 05:33:01 +00:00
Li Jianxuan 71d20e35a9 修改中文为英文 2014-04-23 04:30:30 +00:00
Li Jianxuan 0708a3be3b 修改注册页面,增加验证码输入 2014-04-21 08:10:45 +00:00
wlx d60568c77e change piwik code 2014-03-17 09:37:27 +00:00
wlx 30fb477387 change source from doi to url 2014-03-03 13:35:13 +00:00
wlx 58d3697cdc remove chinese reference 2014-03-03 10:35:36 +00:00
wlx e1670809f3 enhance dci output 2014-03-03 09:54:43 +00:00
wlx 2c2f687518 change help url and footer year. 2014-03-03 08:30:50 +00:00
wlx 8d529553e2 change font 2014-03-03 07:58:43 +00:00
wlx 9578c74bb0 switch to en schema and change pdf to en. 2014-03-03 07:50:27 +00:00
wlx 6be292d525 translate 2014-03-03 07:01:07 +00:00
wlx c97f552d27 translate 2014-03-03 07:00:54 +00:00
wlx e062398cb5 translate 2014-03-03 02:59:24 +00:00
wlx 667f2ded5d translate 2014-03-03 02:29:04 +00:00
wlx e8a7dc6311 add dci action 2014-02-27 14:16:54 +00:00
wlx a44f2b1de3 add google analytics code 2013-11-23 08:59:10 +00:00
wlx 9d69193151 merge heihedata branch from r4064 to r4065 2013-11-11 10:04:03 +00:00
wlx 8cdd8dee9b translation 2013-11-11 08:25:44 +00:00
wlx 3bf9812d72 translation 2013-11-11 08:10:13 +00:00
wlx 1a394fe8ef 修复在线下载问题 2013-11-11 06:45:07 +00:00
wlx 3bf1e7015b remove unused code in todownload action and translation 2013-11-11 06:32:58 +00:00
wlx 7bc34ff31c merge heihedata branche r4053 2013-11-11 04:09:05 +00:00
wlx 6827dbdb5a add wds link to new window 2013-11-11 04:00:10 +00:00
wlx 167d489764 add wds logo in header 2013-11-11 03:57:46 +00:00
wlx 023c1c1b56 add wds logo 2013-11-11 03:57:10 +00:00
wlx d0960adae9 translation 2013-11-11 03:02:21 +00:00
wlx d8a8ffa66f translation 2013-11-10 15:08:45 +00:00
wlx 427e8ef4ae translation & fix problems 2013-11-10 15:08:34 +00:00
wlx d51e7a38ff translation 2013-11-10 15:08:12 +00:00
wlx 10008f2245 fix bigthumb error 2013-11-10 10:52:13 +00:00
wlx 2fa1e199bb change schema to en 2013-11-10 10:40:56 +00:00
wlx e31ccb7cc6 后台实现英文元数据同步 2013-11-10 10:30:29 +00:00
wlx 0457fc712e change geonetwork url 2013-11-10 09:57:59 +00:00
wlx 29087d0e99 fix sql error 2013-11-10 09:46:59 +00:00
wlx a6fd1f9874 change en schema 2013-11-10 09:42:52 +00:00
wlx f78303274f change title 2013-11-10 09:05:25 +00:00
wlx 542432fe3e change text 2013-11-10 09:01:24 +00:00
wlx 1ccce9505c translation 2013-11-10 08:34:30 +00:00
wlx d678da5dfd translation 2013-11-10 08:34:18 +00:00
wlx c1928b5c24 change knowledge content 2013-11-09 15:47:47 +00:00
wlx 44e0f00dc7 change metadata to en schema 2013-11-09 15:47:23 +00:00
wlx d9fbefbd5a translation 2013-11-09 15:46:23 +00:00
wlx 4e994eb218 change to new framework 2013-11-09 15:45:47 +00:00
wlx 65106f88be translation 2013-11-09 15:44:50 +00:00
wlx be471ec795 change the ui 2013-11-07 13:07:33 +00:00
wlx 7e4f79cd47 merge heihedata branch from r4014 to r4031, and merge metadata-en database and chinese database with en schema. 2013-11-07 11:24:49 +00:00
wlx 4e9a496f63 merge from heihedata branch to r4013. 2013-10-28 14:54:21 +00:00
wlx 18f541c43d 切换搜索为英文 2013-09-23 06:25:34 +00:00
wlx e0f5bdd4f0 #538, 修复首页排版不齐问题#538, 修复首页排版不齐问题#538, 修复首页排版不齐问题#538, 修复首页排版不齐问题#538, 修复首页排版不齐问题 2013-07-14 15:14:19 +00:00
wlx fe57d613f3 add china.png 2013-06-23 09:04:46 +00:00
wlx 960014b064 初步切换,logo、首页、数据页面修改 2013-06-23 08:37:52 +00:00
wlx dd4a8366ed 以metadata-3.7作为metadata-en-2.0的基础进行修改 2013-06-21 14:03:51 +00:00
817 changed files with 65076 additions and 18991 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,13 @@
<?php
use Helpers\View as view;
use Files\Files;
use Files\Output;
use Files\Listener\FileListener;
use Order\Manager\Offlineapp;
use Order\Manager\Application;
use data\DataService;
use Mail\Mail;
class Admin_DownController extends Zend_Controller_Action
{
function preDispatch()
@ -8,6 +17,7 @@ class Admin_DownController extends Zend_Controller_Action
$this->messenger=$this->_helper->getHelper('FlashMessenger');
$this->view->messages = $this->messenger->getMessages();
$this->_helper->layout->setLayout('administry');
$this->view->Theme = new Theme();
}
function postDispatch()
{
@ -18,9 +28,150 @@ 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 +183,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
@ -57,16 +223,24 @@ class Admin_DownController extends Zend_Controller_Action
//发送用户邮件进行信息提示和说明
$mail = new WestdcMailer($this->view->config->smtp);
$datalist=str_replace(";","\n",$row['datalist']);
$mailtp=new EmailText($this->db,'offline-start',array('user'=>$username,'datalist'=>$datalist));
$mailtp=new EmailText($this->db,'offline-start-en',array('user'=>$username,'datalist'=>$datalist));
$mail->setBodyText($mailtp->getBody());
$mail->setSubject($mailtp->getSubject());
$mail->addTo($row['email']);
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
$mail->send();
$sql="select pdflink from offlineapp where id=?";
//如果是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($this->view->config->offline->savepath."/".$row['pdflink']);
$filecontent=file_get_contents($row['pdflink']);
//对每条数据的管理员用户发送相应的邮件通知,同一用户的邮件需要合并
//需要取出对应数据的标题、uuid以及对应的作者的email一条数据可能有多个作者一次申请可能有多条数据对应同一个作者
@ -90,7 +264,7 @@ class Admin_DownController extends Zend_Controller_Action
//发送之前的用户申请审核邮件
unset($mail);
$mail = new WestdcMailer($this->view->config->smtp);
$mailtp=new EmailText($this->db,'offline-start-subject',array('user'=>$username,'datalist'=>$data,'source'=>$source));
$mailtp=new EmailText($this->db,'offline-start-subject-en',array('user'=>$username,'datalist'=>$data,'source'=>$source));
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
$mail->setBodyText($mailtp->getBody());
$mail->setSubject($mailtp->getSubject());
@ -114,7 +288,7 @@ class Admin_DownController extends Zend_Controller_Action
{
unset($mail);
$mail = new WestdcMailer($this->view->config->smtp);
$mailtp=new EmailText($this->db,'offline-start-author',array('user'=>$username,'datalist'=>$data,'source'=>$source));
$mailtp=new EmailText($this->db,'offline-start-author-en',array('user'=>$username,'datalist'=>$data,'source'=>$source));
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
$mail->setBodyText($mailtp->getBody());
$mail->setSubject($mailtp->getSubject());
@ -143,7 +317,7 @@ class Admin_DownController extends Zend_Controller_Action
//发送之前的用户申请审核邮件
unset($mail);
$mail = new WestdcMailer($this->view->config->smtp);
$mailtp=new EmailText($this->db,'offline-start-author',array('user'=>$username,'datalist'=>$data));
$mailtp=new EmailText($this->db,'offline-start-author-en',array('user'=>$username,'datalist'=>$data));
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
$mail->setBodyText($mailtp->getBody());
$mail->setSubject($mailtp->getSubject());
@ -167,7 +341,7 @@ class Admin_DownController extends Zend_Controller_Action
{
unset($mail);
$mail = new WestdcMailer($this->view->config->smtp);
$mailtp=new EmailText($this->db,'offline-start-author',array('user'=>$username,'datalist'=>$data));
$mailtp=new EmailText($this->db,'offline-start-author-en',array('user'=>$username,'datalist'=>$data));
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
$mail->setBodyText($mailtp->getBody());
$mail->setSubject($mailtp->getSubject());
@ -195,14 +369,14 @@ class Admin_DownController extends Zend_Controller_Action
{
unset($mail);
$mail = new WestdcMailer($this->view->config->smtp);
$mailtp=new EmailText($this->db,'offline-start-dcadmin',array('user'=>$username,'datalist'=>$data));
$mailtp=new EmailText($this->db,'offline-start-dcadmin-en',array('user'=>$username,'datalist'=>$data));
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
$mail->setBodyText($mailtp->getBody());
$mail->setSubject($mailtp->getSubject());
$addrs=array();
$addrs[] = 'nztong@lzb.ac.cn';
$addrs[] = 'wjian@lzb.ac.cn';
$addrs[] = 'lixin@lzb.ac.cn';
$addrs[] = 'wangliangxu@lzb.ac.cn';
$addrs[] = 'wulizong@lzb.ac.cn';
$mail->addTo($addrs);
$mail->addCc($this->view->config->service->email,'西部数据中心服务组');
$mail->createAttachment($filecontent,'application/octet-stream',Zend_Mime::DISPOSITION_ATTACHMENT, Zend_Mime::ENCODING_BASE64, 'offlineapp.pdf');
@ -325,7 +499,7 @@ class Admin_DownController extends Zend_Controller_Action
{
unset($mail);
$mail = new WestdcMailer($this->view->config->smtp);
$mailtp=new EmailText($this->db,'offline-start-mdadmin',array('user'=>$username,'datalist'=>$data));
$mailtp=new EmailText($this->db,'offline-start-mdadmin-en',array('user'=>$username,'datalist'=>$data));
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
$mail->setBodyText($mailtp->getBody());
$mail->setSubject($mailtp->getSubject());
@ -346,7 +520,7 @@ class Admin_DownController extends Zend_Controller_Action
{
unset($mail);
$mail = new WestdcMailer($this->view->config->smtp);
$mailtp=new EmailText($this->db,'offline-start-mdadmin',array('user'=>$username,'datalist'=>$data));
$mailtp=new EmailText($this->db,'offline-start-mdadmin-en',array('user'=>$username,'datalist'=>$data));
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
$mail->setBodyText($mailtp->getBody());
$mail->setSubject($mailtp->getSubject());
@ -390,9 +564,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 +588,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));
@ -478,13 +658,13 @@ class Admin_DownController extends Zend_Controller_Action
//发送用户邮件进行信息提示和说明
$mail = new WestdcMailer($this->view->config->smtp);
//实例化EmailText
$mailtp=new EmailText($this->db,'offline-finish',
$mailtp=new EmailText($this->db,'offline-finish-en',
array('user'=>$row['username'],'datalist'=>str_replace(";","\n",$row['datalist']),
'ftpuser'=>$user->username,'ftppwd'=>$proftp->pwd,'ftptime'=>$proftp->time,'ftphost'=>$ftphost));
$mail->setBodyText($mailtp->getBody());
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
$mail->setFrom($this->view->config->service->email,'CARD WDS');
$mail->addTo($row['email']);
$mail->addCc($this->view->config->service->email,'西部数据中心服务组');
$mail->addCc($this->view->config->service->email,'CARD WDS');
$mail->setSubject($mailtp->getSubject());
$mail->send();
} //offline deal
@ -612,6 +792,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()
{
@ -633,8 +875,10 @@ class Admin_DownController extends Zend_Controller_Action
if ($form->isValid($formdata)) {
$uploadedData = $form->getValues();
$pdf = basename($form->pdf->getFileName());
$sql="insert into offlineapp (username,email,unit,phone,address,postcode,project,pdflink,datalist,ts_created,ts_approved) values(?,?,?,?,?,?,?,?,?,?,now())";
$this->db->query($sql,array($formdata['username'],$formdata['email'],$formdata['unit'],$formdata['phone'],$formdata['address'],$formdata['postcode'],$formdata['project'],$pdf,$formdata['datalist'],$formdata['ts_approved']));
$sql="insert into offlineapp (username,email,unit,phone,address,postcode,project,pdflink,datalist,ts_created,ts_approved,project_id,project_title,project_type) values(?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
$this->db->query($sql,array($formdata['username'],$formdata['email'],$formdata['unit'],$formdata['phone'],$formdata['address'],$formdata['postcode'],
$formdata['project'],$pdf,$formdata['datalist'],$formdata['ts_approved']),$formdata['ts_approved'],
$formdata['project_id'],$formdata['project_title'],$formdata['project_type']);
$this->messenger->addMessage('提示信息:您已经成功添加该离线服务记录。');
$this->_redirect('/admin/down/offline');
} else {
@ -655,11 +899,14 @@ class Admin_DownController extends Zend_Controller_Action
$pdf = basename($form->pdf->getFileName());
$sql="update offlineapp set username=?,email=?,unit=?,phone=?,address=?,postcode=?,project=?,";
if ($form->pdf->isUploaded()) $sql.="pdflink=?,";
$sql.="datalist=?,ts_approved=? where id=?";
$sql.="datalist=?,ts_approved=?,project_id=?,project_title=?,project_type=? where id=?";
$param=array($formdata['username'],$formdata['email'],$formdata['unit'],$formdata['phone'],$formdata['address'],$formdata['postcode'],$formdata['project']);
if ($form->pdf->isUploaded()) $param[]=$pdf;
$param[]=$formdata['datalist'];
$param[]=$formdata['ts_approved'];
$param[]=$formdata['project_id'];
$param[]=$formdata['project_title'];
$param[]=$formdata['project_type'];
$param[]=$edit;
$this->db->query($sql,$param);
$this->messenger->addMessage('提示信息:您已经编辑添加该记录。');
@ -710,21 +957,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";
}
$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);
foreach($rows as $row){
$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";
}
$output = new Output($this->db);
$output->Download("offlineapp.csv",$content,"string");
} //下载离线服务记录
else if ($update) {
@ -816,9 +1055,15 @@ class Admin_DownController extends Zend_Controller_Action
//设置当前活动sheet的名称
$objActSheet->setTitle('离线服务记录');
if (date('m')==1)
{
$ym=(date('Y')-1).'-12-1';
} else {
$ym=date('Y-').(date('m')-1).'-1';
}
$sql="select o.username,o.unit,o.phone,o.address,o.postcode,o.project,regexp_replace(o.datalist,'\(.+?MB\)','','g') as datalist,date(o.ts_approved) as date,o.email,o.project_id,o.project_type,o.project_title,sum(m.filesize) as filesize
from offlineapp o left join dataorder d on o.id=d.offlineappid left join metadata m on d.uuid=m.uuid
where o.ts_approved>='".date('Y-').(date('m')-1)."-1' and o.ts_approved<'".date('Y-m')."-1' and o.pdflink is not null and o.ts_approved is not null and d.status=5 group by o.id order by o. ts_approved
where o.ts_approved>='".$ym."' and o.ts_approved<'".date('Y-m')."-1' and o.pdflink is not null and o.ts_approved is not null and d.status=5 group by o.id order by o. ts_approved
";
$re = $this->db->query($sql);
$rows = $re->fetchAll();
@ -847,7 +1092,7 @@ class Admin_DownController extends Zend_Controller_Action
$objActSheet->setTitle('在线服务记录');
$sql="select o.username,o.unit,o.phone,o.address,o.postcode,o.project,date(o.ts_created) as date,o.email,o.project_id,o.project_type,o.project_title,m.filesize,m.title
from onlineapp o left join dataorder d on o.id=d.onlineappid left join metadata m on d.uuid=m.uuid
where o.ts_created>='".date('Y-').(date('m')-1)."-1' and o.ts_created<'".date('Y-m')."-1' and d.status=0 order by o. ts_created
where o.ts_created>='".$ym."' and o.ts_created<'".date('Y-m')."-1' and d.status=0 order by o. ts_created
";
$re = $this->db->query($sql);
$rows = $re->fetchAll();
@ -904,16 +1149,15 @@ class Admin_DownController extends Zend_Controller_Action
->setBody($objWriter->save('php://output'));*/
}
$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');
$paginator = Zend_Paginator::factory($select);
$paginator->setCurrentPageNumber($this->_getParam('page'));
$paginator->setItemCountPerPage($this->view->config->page->max);
$paginator->setView($this->view);
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml');
$this->view->paginator=$paginator;
$this->view->page = $this->_getParam('page');
$application = new Application();
$this->view->q = $application->keyword = $this->_getParam('q');
$application->filter = $this->_getParam('filter');
view::addPaginator($application->passed(),$this,20);
return true;
}
//在线数据下载情况仅针对onlineapp表自2011-9-8开始记录。
function onlineAction()
@ -1131,7 +1375,7 @@ class Admin_DownController extends Zend_Controller_Action
$sql = "select distinct u.email
from dataorder d
LEFT JOIN users u on d.userid = u.id
WHERE u.email IS NOT NULL
WHERE u.email IS NOT NULL and d.status in (0,5) and d.ts_approved is not null
AND d.uuid=?
GROUP BY u.email";

View File

@ -119,6 +119,7 @@ class Admin_NewsController extends Zend_Controller_Action
$data['code'] = $this->_request->getParam('code');
$data['fid'] = $this->_request->getParam('fid');
$data['ptype'] = $this->_request->getParam('ptype');
$data['title_en'] = $this->_request->getParam('title_en');
$data['is_pub'] = 1;
@ -193,6 +194,7 @@ class Admin_NewsController extends Zend_Controller_Action
$data['fid'] = $this->_request->getParam('fid');
$data['ptype'] = $this->_request->getParam('ptype');
$data['is_pub'] = $this->_request->getParam('is_pub');
$data['title_en'] = $this->_request->getParam('title_en');
$this->view->info = $data;
@ -380,7 +382,8 @@ class Admin_NewsController extends Zend_Controller_Action
'pubtimer',
'pubtime',
'description',
'keyword'
'keyword',
'language'
);
foreach($_POST as $k=>$v)
{
@ -435,7 +438,8 @@ class Admin_NewsController extends Zend_Controller_Action
'source' => $source,
'ts_published' => $pubtime,
'is_pub' => $pub,
'body' => $body
'body' => $body,
'language' => $language
);
$update = $this->_getParam('update');

View File

@ -16,8 +16,8 @@ class Admin_ReviewController extends Zend_Controller_Action
*/
function indexAction()
{
$sql = "select m.id,md.title,u.username,u.realname,m.status from mdstatus m
right join metadata md on md.uuid=m.uuid
$sql = "select m.id,md.title,u.username,u.realname,m.status from en.mdstatus m
right join en.metadata md on md.uuid=m.uuid
left join users u on u.id=m.userid
order by m.id desc limit 10 ";
$re = $this->db->query($sql);
@ -38,8 +38,8 @@ class Admin_ReviewController extends Zend_Controller_Action
$userid = $user->id;
}
$sql = "select m.id,md.title,u.username,u.realname,m.status from mdstatus m
right join metadata md on md.uuid=m.uuid
$sql = "select m.id,md.title,u.username,u.realname,m.status from en.mdstatus m
right join en.metadata md on md.uuid=m.uuid
left join users u on u.id=m.userid
where u.id='$userid'";
@ -105,11 +105,11 @@ class Admin_ReviewController extends Zend_Controller_Action
else
{
if($status==1)
{$sql = "update mdstatus set status='$status',ts_accepted='now()' where id in ($id)"; }
{$sql = "update en.mdstatus set status='$status',ts_accepted='now()' where id in ($id)"; }
else if($status==5)
{$sql = "update mdstatus set status='$status',ts_finished='now()' where id in ($id)";}
{$sql = "update en.mdstatus set status='$status',ts_finished='now()' where id in ($id)";}
else
{$sql = "update mdstatus set status='$status' where id in ($id)";}
{$sql = "update en.mdstatus set status='$status' where id in ($id)";}
try{
if($this->db->exec($sql)>0)
{
@ -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()待审元数据
@ -142,6 +160,7 @@ class Admin_ReviewController extends Zend_Controller_Action
$invite = $this->_request->getParam('invite');
include_once("helper/view.php");
$this->view->uid=view::User('id');
if($cancel>0)
{
@ -150,7 +169,7 @@ class Admin_ReviewController extends Zend_Controller_Action
//update search document
$search=new Search();
//create search view in xunsearch
$sql="select uuid from mdstatus where id=?";
$sql="select uuid from en.mdstatus where id=?";
$sth = $this->db->prepare($sql);
$sth->execute(array($cancel));
$data = $sth->fetch();
@ -169,8 +188,8 @@ class Admin_ReviewController extends Zend_Controller_Action
$keyword = $this->_request->getParam('keyword');
if(!empty($keyword))
{
$sql = "select m.*,md.title,u.username,u.realname from mdstatus m
right join metadata md on md.uuid=m.uuid
$sql = "select m.*,md.title,u.username,u.realname from en.mdstatus m
right join en.metadata md on md.uuid=m.uuid
left join users u on u.id=m.userid
where m.status in (1,2,3,4)
and md.title like '%$keyword%'
@ -188,19 +207,15 @@ class Admin_ReviewController extends Zend_Controller_Action
}//搜索
else
{
$sql = "select m.*,md.title,u.username,u.realname from mdstatus m
right join metadata md on md.uuid=m.uuid
$sql = "select m.*,md.title,u.username,u.realname from en.mdstatus m
right join en.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
@ -225,8 +240,8 @@ class Admin_ReviewController extends Zend_Controller_Action
if($show>0)
{
$sql = "select m.*,md.*,u.realname from mdstatus m
right join metadata md on md.uuid=m.uuid
$sql = "select m.*,md.*,u.realname from en.mdstatus m
right join en.metadata md on md.uuid=m.uuid
left join users u on u.id=m.userid
where m.id=$show
";
@ -281,8 +296,8 @@ class Admin_ReviewController extends Zend_Controller_Action
$this->view->keyword = $keyword;
}
$sql = "select m.id,md.title,m.status,m.uuid,u.username,u.realname from mdstatus m
right join metadata md on md.uuid=m.uuid
$sql = "select m.id,md.title,m.status,m.uuid,u.username,u.realname from en.mdstatus m
right join en.metadata md on md.uuid=m.uuid
left join users u on u.id=m.userid
where m.status in (2,3,4) $searchjoin order by m.ts_accepted desc";
$rs = $this->db->query($sql);
@ -344,8 +359,8 @@ class Admin_ReviewController extends Zend_Controller_Action
{
if(is_array($exps))
{
$sql = "select m.uuid,m.title,s.status from metadata m
left join mdstatus s on s.uuid=m.uuid
$sql = "select m.uuid,m.title,s.status from en.metadata m
left join en.mdstatus s on s.uuid=m.uuid
where s.id='$id'";
$rs = $this -> db -> query($sql);
@ -490,6 +505,7 @@ class Admin_ReviewController extends Zend_Controller_Action
$id = $this->_request->getParam('id');
$uid = $this->_request->getParam('uid');
$i = $this->_request->getParam('i');
if(empty($id))
{
$this->_redirect("/admin/review");
@ -499,13 +515,19 @@ class Admin_ReviewController extends Zend_Controller_Action
if(!empty($uid))
{
$sql = "update mdstatus set userid='$uid' where id='$id'";
$sql = "update en.mdstatus set userid='$uid' where id='$id'";
if($this->db->exec($sql)>0)
{
include_once('helper/view.php');
view::Post($this,array("content"=>'修改成功','url'=>-1));
view::Post($this,array("content"=>'修改成功','url'=>"/admin/review/myreview"));
return true;
}
}
else if($i == "1") {
$this->_helper->layout->disableLayout();
$this->_helper->viewRenderer('changeadmin-iframe');
}else{
$this->_helper->viewRenderer('changeadmin');
}
$sql = "select u.* from users u
@ -535,7 +557,7 @@ class Admin_ReviewController extends Zend_Controller_Action
$uuid=$this->_request->getParam('uuid');
$userid=Zend_Auth::getInstance()->getIdentity()->id;
$sql = "select * from mdstatus where uuid='$uuid'";
$sql = "select * from en.mdstatus where uuid='$uuid'";
$re = $this->db->query($sql);
$row = $re->fetch();
@ -543,7 +565,7 @@ class Admin_ReviewController extends Zend_Controller_Action
if(empty($row['id']))
{
$sql = "insert into mdstatus (uuid,userid,status) values ('$uuid','$userid','0')";
$sql = "insert into en.mdstatus (uuid,userid,status) values ('$uuid','$userid','0')";
try{
if($this->db->exec($sql)>0)
{
@ -555,7 +577,7 @@ class Admin_ReviewController extends Zend_Controller_Action
return true;
}
} else if ($row['status']==5){
$sql="update mdstatus set status=1,ts_accepted=now() where status=5 and id=".$row['id'];
$sql="update en.mdstatus set status=1,ts_accepted=now() where status=5 and id=".$row['id'];
$this->db->query($sql);
view::Post($this,array("content"=>'操作成功!该数据已重新放入评审','url'=>'/admin/review/accept'));
return true;
@ -586,6 +608,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 +617,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();
}
@ -618,7 +645,7 @@ class Admin_ReviewController extends Zend_Controller_Action
$id = $this->view->id = $this->_request->getParam('id');
$sql="select m.title,m.uuid,array_to_string(array(select distinct(email) from role r left join responsible rs on r.resid=rs.id where r.uuid=m.uuid and length(rs.email)>4),',') as emails from mdstatus s left join metadata m on s.uuid=m.uuid where s.id=?";
$sql="select m.title,m.uuid,array_to_string(array(select distinct(email) from en.role r left join en.responsible rs on r.resid=rs.id where r.uuid=m.uuid and length(rs.email)>4),',') as emails from en.mdstatus s left join en.metadata m on s.uuid=m.uuid where s.id=?";
$res=$this->db->fetchRow($this->db->quoteInto($sql,$id));
$rv=explode(',',$res['emails']);
$rows = array();
@ -730,7 +757,7 @@ class Admin_ReviewController extends Zend_Controller_Action
//update search document
$search=new Search();
//create search view in xunsearch
$sql="select * from xunsearch where uuid in (select uuid from mdstatus where id in (".$ids."))";
$sql="select * from en.xunsearch where uuid in (select uuid from en.mdstatus where id in (".$ids."))";
$sth = $this->db->prepare($sql);
$sth->execute();
while ($data = $sth->fetch())
@ -741,8 +768,8 @@ class Admin_ReviewController extends Zend_Controller_Action
//仅对单条数据发送email信息
if (is_numeric($ids))
{
$sql="select distinct u.email,m.title,m.uuid from mdstatus s left join metadata m on s.uuid=m.uuid
left join mdauthor a on s.uuid=a.uuid left join users u on a.userid=u.id where s.id=? order by u.email";
$sql="select distinct u.email,m.title,m.uuid from en.mdstatus s left join en.metadata m on s.uuid=m.uuid
right join mdauthor a on s.uuid=a.uuid left join users u on a.userid=u.id where s.id=? order by u.email";
$rs=$this->db->query($sql,array($ids));
$rows=$rs->fetchAll();
if ($rows)
@ -786,10 +813,11 @@ class Admin_ReviewController extends Zend_Controller_Action
$this->view->keyword = $keyword;
}
$sql = "select m.id,md.title,md.uuid,u.username,u.realname,m.status,m.ts_created from mdstatus m
right join metadata md on md.uuid=m.uuid
$sql = "select m.id,md.title,md.uuid,u.username,u.realname,m.status,m.ts_created,gn.id as gnid from en.mdstatus m
right join en.metadata md on md.uuid=m.uuid
left join users u on u.id=m.userid
where status=0 $searchjoin order by m.ts_created desc";
left join en.geonetworkmetadata gn on m.uuid=gn.uuid
where m.status=0 $searchjoin order by m.ts_created desc";
$re = $this->db->query($sql);
$rows = $re->fetchAll();
@ -847,10 +875,10 @@ class Admin_ReviewController extends Zend_Controller_Action
$this->view->keyword = $keyword;
}
$sql = "select m.id,md.title,md.uuid,u.username,u.realname,m.status from mdstatus m
right join metadata md on md.uuid=m.uuid
$sql = "select m.id,md.title,md.uuid,u.username,u.realname,m.status from en.mdstatus m
right join en.metadata md on md.uuid=m.uuid
left join users u on u.id=m.userid
where status=-1 $searchjoin";
where m.status=-1 $searchjoin";
$re = $this->db->query($sql);
$rows = $re->fetchAll();
@ -887,10 +915,10 @@ class Admin_ReviewController extends Zend_Controller_Action
$this->view->keyword = $keyword;
}
$sql = "select m.id,md.title,md.uuid,u.username,u.realname,m.status,m.ts_finished from mdstatus m
right join metadata md on md.uuid=m.uuid
$sql = "select m.id,md.title,md.uuid,u.username,u.realname,m.status,m.ts_finished from en.mdstatus m
right join en.metadata md on md.uuid=m.uuid
left join users u on u.id=m.userid
where status=5 $searchjoin";
where m.status=5 $searchjoin order by m.ts_finished desc";
$re = $this->db->query($sql);
$rows = $re->fetchAll();
@ -925,13 +953,13 @@ class Admin_ReviewController extends Zend_Controller_Action
$user = $auth->getIdentity();
$userid = $user->id;
$sql = "select id from mdstatus where userid='$userid' and id='$id'";
$sql = "select id from en.mdstatus where userid='$userid' and id='$id'";
$rs = $this->db->query($sql);
$row = $rs->fetch();
if(!empty($row['id']))
{
$sql = "delete from mdstatus where id='$id'";
$sql = "delete from en.mdstatus where id='$id'";
if($this->db->exec($sql))
{
view::Post($this,array("content"=>'删除成功','url'=>"/admin/review/myreview"));
@ -1262,7 +1290,7 @@ class Admin_ReviewController extends Zend_Controller_Action
}
$sql = "select md.title,md.uuid,u.realname,r.id,r.ts_created,r.is_expert from mdreview r
left join metadata md on md.uuid=r.uuid
left join en.metadata md on md.uuid=r.uuid
left join users u on u.id=r.userid
$wheresql
order by r.ts_created desc
@ -1313,7 +1341,7 @@ class Admin_ReviewController extends Zend_Controller_Action
}
$sql = "select u.id,u.realname as title,count(r.id) as c from mdreview r
left join metadata md on md.uuid=r.uuid
left join en.metadata md on md.uuid=r.uuid
left join users u on u.id=r.userid
$wheresql
GROUP BY u.id,u.realname
@ -1443,7 +1471,7 @@ class Admin_ReviewController extends Zend_Controller_Action
}
$sql = "select md.title,md.uuid,count(r.id) as c from mdreview r
left join metadata md on md.uuid=r.uuid
left join en.metadata md on md.uuid=r.uuid
$wheresql
GROUP BY md.title,md.uuid
";

View File

@ -195,7 +195,32 @@ class Admin_StatController extends Zend_Controller_Action
//按用户统计
function userAction(){
$ac = $this->_getParam('ac');
$this->view->ac = $ac = $this->_getParam('ac');
if($ac == "new")
{
$this->_helper->viewRenderer('user-new');
$this->view->year = $year = !empty($this->_getParam('year')) ? $this->_getParam('year'):date("Y");
$this->view->by = $by = !empty($this->_getParam('by')) ? $this->_getParam('by'):"month";
$userStatistics = new \Statistics\User();
if($by == "month")
{
$this->view->data = $userStatistics->getNewUsersByMonth($year);
}
if($by == "year")
{
$this->view->data = $userStatistics->getNewUsersByYear($year);
}
if($by == "monthavg")
{
$this->view->data = $userStatistics->getAverageSingupByMonth($year);
}
return true;
}
if($ac == "get")
{

View File

@ -602,7 +602,7 @@ class Admin_SysController extends Zend_Controller_Action
$sql = "SELECT m.title,m.uuid,m.filesize,ds.host,ds.path from metadata m
LEFT JOIN mdstatus s ON m.uuid=s.uuid
LEFT JOIN dataset ds ON m.uuid=ds.uuid
where s.status>4 and ds.id not in (select distinct dsid from datafile)
where s.status>4 and (ds.id not in (select distinct dsid from datafile) or ds.id in (select id from dataset where host='ftp2.westgis.ac.cn' and path like '/disk1/WATER%'))
group by m.title,m.uuid,ds.host,ds.path,m.filesize
ORDER BY m.title DESC;";
$sth = $this->db->prepare($sql);
@ -687,7 +687,7 @@ where res.email is not null and role.role in ('resourceProvider','owner','pointO
$this->_helper->viewRenderer('problem-md');
} else if ($ac=='unmoved')
{
$sql = "SELECT distinct m.title,m.uuid,g.id as gid
$sql = "SELECT distinct m.title,m.uuid,g.id as gid,m.filesize,ds.host,ds.path
from metadata m
LEFT JOIN mdstatus s ON m.uuid=s.uuid
left join geonetworkmetadata g on m.uuid=g.uuid
@ -704,9 +704,57 @@ left join dataset ds on ds.uuid=m.uuid
$paginator->setView($this->view);
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml');
$this->view->paginator=$paginator;
$this->_helper->viewRenderer('problem-md');
//$this->_helper->viewRenderer('problem-md');
}
$this->view->activeID="btn-".$ac;
}
//GeoNetwork中元数据批量替换操作
function gnmetadataAction()
{
$this->wdb=Zend_Db::factory($this->view->config->geonetwork);
set_time_limit(0);
$ac=$this->_request->getParam('ac');
//use preg_replace to replace the string
$form=new ReplaceForm();
if ($this->_request->isPost()) {
$formdata=$this->_request->getPost();
$pattern=$formdata["pattern"];
$form->populate($formdata);
if (substr($pattern,0,1)!='/')
{
$pattern='/'.$pattern.'/m';
}
$replace=$formdata["replace"];
if (isset($formdata["test"]))
{
$this->view->test=preg_replace($pattern,$replace,$formdata["source"]);
} elseif (isset($formdata["submit"])) {
$sql="select uuid,data from metadata where istemplate = 'n'";
$rows=$this->wdb->fetchAll($sql);
$this->view->deal=array();
foreach($rows as $k=>$row)
{
//do the replace
$new_data=preg_replace($pattern,$replace,$row['data']);
//防止正则错误
if (!empty($new_data))
{
$sql="update metadata set data=? where uuid='".$row['uuid']."'";
if ($this->wdb->exec($this->wdb->quoteInto($sql,$new_data)))
{
$dom = new DOMDocument();
$dom->loadXML($row['data']);
$title=$dom->getElementsByTagName('resTitle')->item(0)->nodeValue;
$deal['uuid']=$row['uuid'];
$deal['title']=$title;
$this->view->deal[]=$deal;
}
}
}
}
}
$this->view->form=$form;
}
}

View File

@ -1,80 +0,0 @@
<?php
class Admin_TestController extends Zend_Controller_Action
{
function preDispatch()
{
$this->db=Zend_Registry::get('db');
$this->view->config = Zend_Registry::get('config');
$this->messenger=$this->_helper->getHelper('FlashMessenger');
$this->view->messages = $this->messenger->getMessages();
$this->_helper->layout->setLayout('administry');
$this->wdb=Zend_Db::factory('Pdo_Pgsql', array('host'=> '210.77.68.252','username' => 'wlz','password' => 'glacier','dbname'=> 'new_geonetwork'));
}
function postDispatch()
{
$this->view->messages = $this->messenger->getMessages();
}
function indexAction()
{
//其他连接
}
//测试文献的下载链接是否正确
function reftestAction()
{
$sql="select * from reference where link<>''";
$rows=$this->db->query($sql);
foreach($rows as $row)
{
if (substr($row['link'],0,1)=='/')
{
if (!file_exists("http://westdc.westgis.ac.cn".$row['link']))
{
$ref[]=$row;
}
} elseif (!file_exists($row['link'])) {
$ref[]=$row;
}
}
$this->view->ref=$ref;
}
//检查DOI是否有重复
function doiAction()
{
$sql="select doi,uuid,title from metadata where doi<>'' order by doi";
$rows=$this->db->fetchAll($sql);
$sql="select distinct(doi) from metadata where doi<>'' order by doi";
$drows=$this->db->fetchAll($sql);
$c=0;
if (count($rows)!=count($drows))
{
foreach($rows as $k=>$row)
{
if ($row['doi']!=$drows[$k-$c]['doi'])
{
$c++;
$doi[]=$rows[$k-1];
$doi[]=$row;
}
}
$this->view->doi=$doi;
}
}
//检查DOI是否有重复
function nodoiwaterAction()
{
$sql="select uuid,title from metadata where source='0595169a-279e-4b95-819f-129d0ba4280d' and doi='' order by title";
$this->view->rows=$this->db->fetchAll($sql);
}
//检查source不符合要求
function sourceAction()
{
$sql="select uuid,title,source from metadata where title ilike '黑河综合遥感联合试验%' and source=''";
$this->view->rows=$this->db->fetchAll($sql);
}
}

View File

@ -1,4 +1,6 @@
<?php
use Helpers\View;
class Admin_UserController extends Zend_Controller_Action
{
function preDispatch()
@ -1194,6 +1196,35 @@ class Admin_UserController extends Zend_Controller_Action
}//sendemailAction()
public function banAction()
{
$id = $this->_getParam('uid');
$users = new Users\Users();
$status = $users->ban($id);
if($status === TRUE)
{
view::Post($this,"操作成功",-1);
}else{
view::Post($this,"操作失败",-1);
}
}
public function unbanAction()
{
$id = $this->_getParam('uid');
$users = new Users\Users();
$status = $users->unban($id);
if($status === TRUE)
{
view::Post($this,"操作成功",-1);
}else{
view::Post($this,"操作失败",-1);
}
}
public function jsonexit($data){

View File

@ -1,441 +0,0 @@
<?php
class Admin_WatermdController extends Zend_Controller_Action
{
function preDispatch()
{
$this->db=Zend_Registry::get('db');
$this->view->config = Zend_Registry::get('config');
$this->messenger=$this->_helper->getHelper('FlashMessenger');
$this->view->messages = $this->messenger->getMessages();
$this->_helper->layout->setLayout('administry');
$this->wdb=Zend_Db::factory($this->view->config->geonetwork);
set_time_limit(0);
}
function postDispatch()
{
$this->view->messages = $this->messenger->getMessages();
}
function indexAction()
{
//其他连接
}
function replaceAction()
{
//use preg_replace to replace the string
$form=new ReplaceForm();
if ($this->_request->isPost()) {
$formdata=$this->_request->getPost();
$pattern=$formdata["pattern"];
$form->populate($formdata);
if (substr($pattern,0,1)!='/')
{
$pattern='/'.$pattern.'/m';
}
$replace=$formdata["replace"];
if (isset($formdata["test"]))
{
$this->view->test=preg_replace($pattern,$replace,$formdata["source"]);
} elseif (isset($formdata["submit"]))
{
$sql="select uuid,data from metadata where istemplate = 'n'";
$rows=$this->wdb->fetchAll($sql);
$this->view->deal=array();
foreach($rows as $k=>$row)
{
//do the replace
$new_data=preg_replace($pattern,$replace,$row['data']);
//防止正则错误
if (!empty($new_data))
{
$sql="update metadata set data=? where uuid='".$row['uuid']."'";
if ($this->wdb->exec($this->wdb->quoteInto($sql,$new_data)))
{
$dom = new DOMDocument();
$dom->loadXML($row['data']);
$title=$dom->getElementsByTagName('resTitle')->item(0)->nodeValue;
$deal['uuid']=$row['uuid'];
$deal['title']=$title;
$this->view->deal[]=$deal;
}
}
}
}
}
$this->view->form=$form;
}
//替换关键词
function keywordAction()
{
//use preg_replace to replace the string
$form=new ReplaceForm();
$form->pattern->setLabel('原关键词');
$form->replace->setLabel('替换关键词');
if ($this->_request->isPost()) {
$formdata=$this->_request->getPost();
$pattern=$formdata["pattern"];
$form->populate($formdata);
//if (substr($pattern,0,1)!='/')
{
$pattern='/\<keyword\>'.$pattern.'\<\/keyword\>/m';
}
$replace='<keyword>'.$formdata["replace"].'</keyword>';
if (isset($formdata["test"]))
{
$this->view->test=preg_replace($pattern,$replace,$formdata["source"]);
} elseif (isset($formdata["submit"]))
{
$sql="select uuid,data from metadata where istemplate = 'n'";
$rows=$this->wdb->fetchAll($sql);
$this->view->deal=array();
foreach($rows as $k=>$row)
{
//do the replace
$new_data=preg_replace($pattern,$replace,$row['data']);
//防止正则错误
if (!empty($new_data))
{
$sql="update metadata set data=? where uuid='".$row['uuid']."'";
if ($this->wdb->exec($this->wdb->quoteInto($sql,$new_data)))
{
$dom = new DOMDocument();
$dom->loadXML($row['data']);
$title=$dom->getElementsByTagName('resTitle')->item(0)->nodeValue;
$deal['uuid']=$uuid;
$deal['title']=$title;
$this->view->deal[]=$deal;
}
}
}
}
}
$this->view->form=$form;
}
//替换标题和英文标题到数据引用中,以标题为准
function citetitleAction()
{
$form=new ReplaceForm();
$form->setElements(array($form->source,$form->test,$form->submit));
if ($this->_request->isPost()) {
$formdata=$this->_request->getPost();
$form->populate($formdata);
if (isset($formdata["test"]))
{
$dom = new DOMDocument();
$dom->loadXML($formdata['source']);
$root = $dom->getElementsByTagName('Metadata');
$xpath = new DOMXpath($dom);
$title_key=$xpath->query("//Metadata/dataIdInfo/idCitation/resTitle");
$title=$title_key->item(0)->nodeValue;
$title_en_path=$xpath->query("//Metadata/dataIdInfo/idCitation/resAltTitle");
$title_en=$title_en_path->item(0)->nodeValue;
$otherCitDet=$xpath->query("//Metadata/dataIdInfo/idCitation/otherCitDet");
$other=$otherCitDet->item(0)->nodeValue;
$other_cn=mb_strstr($other,'[',true);
$title_o=mb_strstr($other_cn,'.',false);
$title_ol=substr($title_o,1,-4);
$title_old=mb_strstr($title_ol,'.',true);
$other_eng=mb_strstr($other,'[',false);
$titlen_o=mb_strstr($other_eng,'.',false);
$titlen_ol=substr($titlen_o,1,-4);
$titlen_old=mb_strstr($titlen_ol,',',true);
$new_other=str_replace(array($title_old,$titlen_old),array($title,$title_en),$other);
$otherCitDet->item(0)->nodeValue=$new_other;
$this->view->test= $dom->saveXML($root->item(0));
} elseif (isset($formdata["submit"]))
{
$sql="select uuid,data from metadata where istemplate = 'n'";
$rows=$this->wdb->fetchAll($sql);
$this->view->deal=array();
foreach($rows as $k=>$row)
{
//do the replace
$dom = new DOMDocument();
$dom->loadXML($row['data']);
$uuid = $row['uuid'];
$root = $dom->getElementsByTagName('Metadata');
$xpath = new DOMXpath($dom);
$title_key=$xpath->query("//Metadata/dataIdInfo/idCitation/resTitle");
$title=$title_key->item(0)->nodeValue;
$title_en_path=$xpath->query("//Metadata/dataIdInfo/idCitation/resAltTitle");
$title_en=$title_en_path->item(0)->nodeValue;
$otherCitDet=$xpath->query("//Metadata/dataIdInfo/idCitation/otherCitDet");
$other=$otherCitDet->item(0)->nodeValue;
$other_cn=mb_strstr($other,'[',true);
$title_o=mb_strstr($other_cn,'.',false);
$title_ol=substr($title_o,1,-4);
$title_old=mb_strstr($title_ol,'.',true);
$other_eng=mb_strstr($other,'[',false);
$titlen_o=mb_strstr($other_eng,'.',false);
$titlen_ol=substr($titlen_o,1,-4);
$titlen_old=mb_strstr($titlen_ol,',',true);
$new_other=str_replace(array($title_old,$titlen_old),array($title,$title_en),$other);
$otherCitDet->item(0)->nodeValue=$new_other;
$new_data = $dom->saveXML($root->item(0));
//防止错误
if (!empty($new_data))
{
$sql="update metadata set data=? where uuid='".$row['uuid']."'";
if ($this->wdb->exec($this->wdb->quoteInto($sql,$new_data)))
{
$dom = new DOMDocument();
$dom->loadXML($row['data']);
$deal['uuid']=$uuid;
$deal['title']=$title;
$this->view->deal[]=$deal;
}
}
}
}
}
$this->view->form=$form;
}
//文件大小处理
function filesizeAction()
{
$form=new ReplaceForm();
$form->pattern->setLabel('文件大小');
$form->setElements(array($form->pattern,$form->source,$form->test,$form->submit));
if ($this->_request->isPost()) {
$formdata=$this->_request->getPost();
$form->populate($formdata);
if (isset($formdata["test"]))
{
$dom = new DOMDocument();
$dom->loadXML($formdata['source']);
$root = $dom->getElementsByTagName('Metadata');
$xpath = new DOMXpath($dom);
$title_key=$xpath->query("//Metadata/dataIdInfo/idCitation/resTitle");
$title=$title_key->item(0)->nodeValue;
$transize_path=$xpath->query("//Metadata/distInfo/distTranOps/transSize");
$transize_path->item(0)->nodeValue=$formdata['pattern'];
$this->view->test= $dom->saveXML($root->item(0));
} elseif (isset($formdata["submit"]))
{
$sql="select uuid,data from metadata where istemplate = 'n'";
$rows=$this->wdb->fetchAll($sql);
$this->view->deal=array();
$sql="select update_filesize();";
$this->db->exec($sql);
foreach($rows as $k=>$row)
{
//do the replace
$dom = new DOMDocument();
$dom->loadXML($row['data']);
$root = $dom->getElementsByTagName('Metadata');
$uuid = $row['uuid'];
$xpath = new DOMXpath($dom);
$title_key=$xpath->query("//Metadata/dataIdInfo/idCitation/resTitle");
$title=$title_key->item(0)->nodeValue;
$transize_path=$xpath->query("//Metadata/distInfo/distTranOps/transSize");
$sql="select filesize from metadata where uuid = ?";
$this->db->setFetchMode(Zend_Db::FETCH_OBJ);
$row=$this->db->fetchRow($sql,array($uuid));
$transize_path->item(0)->nodeValue=$row->filesize;
$new_data = $dom->saveXML();
//防止错误
if (!empty($new_data))
{
$sql="update metadata set data=? where uuid='$uuid'";
if ($this->wdb->exec($this->wdb->quoteInto($sql,$new_data)))
{
$deal['uuid']=$uuid;
$deal['title']=$title;
$this->view->deal[]=$deal;
}
}
}
}
}
$this->view->form=$form;
}
//修改限制使用说明
//useLimit可以是多项的
function uselimitAction()
{
$form=new ReplaceForm();
$form->pattern->setLabel('使用声明');
$form->setElements(array($form->pattern,$form->source,$form->test,$form->submit));
if ($this->_request->isPost()) {
$formdata=$this->_request->getPost();
$form->populate($formdata);
$limit_text=$formdata['pattern'];
if (isset($formdata["test"]))
{
$dom = new DOMDocument();
$dom->loadXML($formdata['source']);
$root = $dom->getElementsByTagName('Metadata');
$xpath = new DOMXpath($dom);
$title_key=$xpath->query("//Metadata/dataIdInfo/idCitation/resTitle");
$title=$title_key->item(0)->nodeValue;
$uselimits=$xpath->query("//Metadata/dataIdInfo/resConst/Consts/useLimit");
$do_uselimit=1;
foreach($uselimits as $limit)
{
//已经有声明,则不需要处理
if ($limit->nodeValue==$limit_text || (strlen($limit->nodeValue)>3))
$do_uselimit=0;
}
if ($do_uselimit==1)
{
$new_uselimit=$dom->createElement('useLimit',$limit_text);
$new_resconst=$dom->createElement('resConst');
$new_const=$dom->createElement('Consts');
$new_const->appendChild($new_uselimit);
$new_resconst->appendChild($new_const);
$desckey=$xpath->query("//Metadata/dataIdInfo/descKeys")->item(0);
$resconst=$xpath->query("//Metadata/dataIdInfo/resConst")->item(0);
if ($resconst)
$resconst->parentNode->insertBefore($new_resconst,$resconst);
else
$desckey->parentNode->insertBefore($new_resconst,$desckey);
$new_data=$dom->saveXML();
}
$this->view->test= $new_data;
} elseif (isset($formdata["submit"]))
{
$sql="select uuid,data from metadata where istemplate = 'n'";
$rows=$this->wdb->fetchAll($sql);
$this->view->deal=array();
foreach($rows as $k=>$row)
{
//do the replace
$dom = new DOMDocument();
$dom->loadXML($row['data']);
$root = $dom->getElementsByTagName('Metadata');
$uuid = $row['uuid'];
$xpath = new DOMXpath($dom);
$title_key=$xpath->query("//Metadata/dataIdInfo/idCitation/resTitle");
$title=$title_key->item(0)->nodeValue;
$uselimits=$xpath->query("//Metadata/dataIdInfo/resConst/Consts/useLimit");
$do_uselimit=1;
foreach($uselimits as $limit)
{
//已经有声明,则不需要处理
if ($limit->nodeValue==$limit_text || (strlen($limit->nodeValue)>3))
$do_uselimit=0;
}
if ($do_uselimit==1)
{
$new_uselimit=$dom->createElement('useLimit',$limit_text);
$new_resconst=$dom->createElement('resConst');
$new_const=$dom->createElement('Consts');
$new_const->appendChild($new_uselimit);
$new_resconst->appendChild($new_const);
$desckey=$xpath->query("//Metadata/dataIdInfo/descKeys")->item(0);
$resconst=$xpath->query("//Metadata/dataIdInfo/resConst")->item(0);
if ($resconst)
$resconst->parentNode->insertBefore($new_resconst,$resconst);
else
$desckey->parentNode->insertBefore($new_resconst,$desckey);
$new_data=$dom->saveXML();
//防止错误
if (!empty($new_data))
{
$sql="update metadata set data=? where uuid='".$row['uuid']."'";
if ($this->wdb->exec($this->wdb->quoteInto($sql,$new_data)))
{
$deal['uuid']=$uuid;
$deal['title']=$title;
$this->view->deal[]=$deal;
}
}
}
}
}
}
$this->view->form=$form;
}
//联系人信息替换
function contactAction()
{
if ($this->_request->isPost()) {
$formdata=$this->_request->getPost();
if (isset($formdata["test"]))
{
$this->view->test=$this->contactReplace($formdata["testxml"],$formdata);
} elseif (isset($formdata["submit"]))
{
$sql="select uuid,data from metadata where istemplate = 'n' and data like '%".$formdata['oldname']."%'";
$rows=$this->wdb->fetchAll($sql);
$this->view->deal=array();
foreach($rows as $row)
{
//do the replace
$new_data=$this->contactReplace($row["data"],$formdata);
//防止错误
if (!empty($new_data))
{
$sql="update metadata set data=? where uuid='".$row['uuid']."'";
if ($this->wdb->exec($this->wdb->quoteInto($sql,$new_data)))
{
$dom = new DOMDocument();
$dom->loadXML($row['data']);
$title=$dom->getElementsByTagName('resTitle')->item(0)->nodeValue;
$deal['uuid']=$row['uuid'];
$deal['title']=$title;
$this->view->deal[]=$deal;
}
}
}
}
$this->view->formdata=$formdata;
}
}
private function contactReplace($xml,$replace)
{
$dom = new DOMDocument();
$dom->loadXML($xml);
$xpath = new DOMXpath($dom);
$contacts=$xpath->query('//rpIndName');
foreach($contacts as $contact)
{
if ($contact->nodeValue==$replace['oldname'])
{
$newrpIndName=$dom->createElement('rpIndName',$replace['name']);
$newrpOrgName=$dom->createElement('rpOrgName',$replace['unit']);
$newrpCntInfo=$dom->createElement('rpCntInfo');
$newcntPhone=$dom->createElement('cntPhone');
$newrpCntInfo->appendChild($newcntPhone);
$newvoiceNum=$dom->createElement('voiceNum',$replace['voicenum']);
$newcntPhone->appendChild($newvoiceNum);
$newcntAddress=$dom->createElement('cntAddress');
$newrpCntInfo->appendChild($newcntAddress);
$newdelPoint=$dom->createElement('delPoint',$replace['delpoint']);
$newcntAddress->appendChild($newdelPoint);
$newcity=$dom->createElement('city',$replace['city']);
$newcntAddress->appendChild($newcity);
$newarea=$dom->createElement('adminArea',$replace['adminarea']);
$newcntAddress->appendChild($newarea);
$newpostCode=$dom->createElement('postCode',$replace['postcode']);
$newcntAddress->appendChild($newpostCode);
$newcountry=$dom->createElement('country',$replace['country']);
$newcntAddress->appendChild($newcountry);
$neweMailAdd=$dom->createElement('eMailAdd',$replace['email']);
$newcntAddress->appendChild($neweMailAdd);
$rporg=$xpath->query('rpOrgName',$contact->parentNode);
$contact->parentNode->removeChild($rporg->item(0));
$rpcnt=$xpath->query('rpCntInfo',$contact->parentNode);
$contact->parentNode->removeChild($rpcnt->item(0));
$contact->parentNode->insertBefore($newrpIndName,$contact);
$contact->parentNode->insertBefore($newrpOrgName,$contact);
$contact->parentNode->insertBefore($newrpCntInfo,$contact);
$contact->parentNode->removeChild($contact);
}
}
return $dom->saveXML();
}
}

View File

@ -11,13 +11,14 @@
$this->headLink()->appendStylesheet('/css/colorbox.css');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="leftPanel">
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div id="rightPanel">
<div class="col-md-10 col-sm-12">
<?php if ($this->msg or $this->messages) :?>
<div id="message">
<div id="message" class="alert alert-info">
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
@ -26,33 +27,34 @@
</div>
<?php endif; ?>
<div><a href="/admin/data/attachments/add/1">上传新附件</a> | <a href="attachments/search/my">查看我的附件</a></div>
<div class="search">
<form action="" method="get">
<div class="form-group">
<a class="btn btn-primary btn-sm" href="/admin/data/attachments/add/1">上传新附件</a>
<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 input-group">
<input class="form-control" type="text" name="keyword" value="<?php echo $this->keyword; ?>" placeholder="搜索关键字" />
<input type="hidden" name="search" value='1' />
<ul>
<li><label>搜索关键字</label><input type="text" name="keyword" value="<?php echo $this->keyword; ?>" /></li>
<li><input type="submit" class="searchbtn" value="搜索" /></li>
</ul>
<span class="input-group-btn"><button class="btn btn-default" type="submit" class="searchbtn" >搜索</button></span>
</form>
</div><!-- search DIV -->
</div>
<?php if (count($this->paginator)): ?>
<form method="get" action="/admin/data/md/att/1/addatts/1">
<table class="stylized">
<table class="stylized table table-bordered table-striped table-hover">
<thead><tr>
<?php
if(!empty($this->uuid))
echo '<th width="40">选择</th>';
?>
<th width="50">ID</th>
<th width='100'>上传文件名</th>
<th width='80'>类型</th>
<th width='80'>大小</th>
<th width='80'>下载次数</th>
<th width='150'>上传时间</th>
<th width="150">操作</th>
<th width="5%">ID</th>
<th width="45%">上传文件名</th>
<th width="5%">类型</th>
<th width="5%">大小</th>
<th width="8%">下载次数</th>
<th width="16%">上传时间</th>
<th width="28%">操作</th>
</tr></thead>
<tbody id="list">
<?php $autoindex=0;?>
@ -94,6 +96,7 @@ echo '<input type="hidden" name="uuid" value="'.$this->uuid.'" /><input type="hi
<?php endif; ?>
<div class="pagenavi"><?= $this->paginator; ?></div>
</div>
</div>
<script>
function delatt(id){
$.ajax({

View File

@ -7,96 +7,124 @@
$this->breadcrumb('<a href="/admin">后台首页</a>');
$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");
?>
<div id="leftPanel">
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div id="rightPanel">
<div class="ctrlplan">
<a href="/admin/data/md/att/1/uuid/<?php echo $this->uuid;?>">返回元数据附件列表</a>
<a href="/data/<?php echo $this->uuid; ?>">查看元数据</a>
<a href="/admin/data/attachments/">返回附件管理</a>
<div class="col-md-10 col-sm-12">
<div class="form-group">
<a class="btn btn-primary btn-sm" href="/admin/data/md/att/1/uuid/<?php echo $this->uuid;?>">返回元数据附件列表</a>
<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 />
<ul id="datalist"></ul>
<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" />
<input type="button" class="btn btn-small" onclick="$('#file_upload').uploadifyUpload();" value="上传" />
</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>
$(document).ready(function() {
$('#file_upload').uploadify({
'uploader' : '/static/js/uploadify/uploadify.swf',
'scriptData': {'PHPSESSID' : '<?php echo session_id(); ?>'},
'script' : '/admin/data/upload/<?php if(!empty($this->uuid)) echo "uuid/".$this->uuid; ?>',
'cancelImg' : '/static/js/uploadify/cancel.png',
'folder' : '/uploads',
'multi' : true,
'auto' : false,
'displayData' : 'speed',
'buttonImg' : '/static/js/uploadify/selectfile.gif',
'onComplete' : function(event, ID, fileObj, response, data) {
var obj = jQuery.parseJSON(response);
var html;
if(obj.error=='')
{html = obj.html;}else{html = obj.error;}
$('<li/>', {
"id":'uploadedItem_'+obj.attid,
"class":'uploadifyQueueItem',
"html": html
}).appendTo('#datalist');
$('#deletebtn_'+obj.attid).bind('click', function() {
deleteatt(obj.attid);
var _this = {
SessionID: '<?php echo session_id(); ?>'
};
var uploader;
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': '*',
'onUploadSuccess': function (file, data, response) {
upload.onsuccess(file, data, response);
},
'onError' : function (event,ID,fileObj,errorObj) {
alert(errorObj.type + ' Error: ' + errorObj.info);
'onUploadStart': function (file) {
$('#file_upload').uploadify('settings', 'formData', param);
}
});
function deleteatt(id){
});
var upload = {
onsuccess: function (file, data, response) {
_data = $.parseJSON(data);
if (!$.isEmptyObject(_data.error)) {
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="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>';
},
deleteFile: function (id) {
$.ajax({
'type': "POST",
'url': "/admin/data/attachments/",
'url': '/admin/data/attachments/',
'data': 'uuid=<?php echo $this->uuid?>&mdattdel=' + id,
'success': function (data) {
if(data==null){Alert('遇到错误,请重试');return false;}
if(data.error!=null){Alert(data.error);return false;}
if(data.status==1){$('#uploadedItem_'+id).fadeOut("slow");}
},
'beforeSend':function(){},
'complete':function(){},
'timeout': 20000,
'dataType': 'json',
'error': function(){Alert('处理中出现问题,请重试');}
});
if (typeof (data) == 'undefined') {
alert("数据源错误,请联系管理员");
return false;
}
$.getJSON("/admin/data/getatts/uuid/<?php echo $this->uuid;?>", function(data) {
if(data)
{
$.each(data, function(key, val) {
$('<li/>', {
"id":'uploadedItem_'+val['id'],
"class":'uploadifyQueueItem',
"html": val['html']
}).appendTo('#datalist');
$('#deletebtn_'+val['id']).bind('click', function() {
deleteatt(val['id']);
if (!$.isEmptyObject(data.error)) {
alert(data.error);
return false;
}
},
'timeout': 30000,
'error': function () {
alert('附件删除出错');
}
});
}
};
$(document).ready(function () {
$.getJSON("/admin/data/getatts/uuid/<?php echo $this->uuid;?>", function (data) {
if (data) {
$.each(data, function (key, val) {
$('#datalist').append(upload.makeFileHtml(val));
});
}
});

View File

@ -14,13 +14,13 @@
$this->breadcrumb('数据管理');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="leftPanel">
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div id="rightPanel">
<div class="col-md-10 col-sm-12">
<?php if ($this->msg or $this->messages) :?>
<div id="message">
<div id="message" class="alert alert-info">
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
@ -28,14 +28,12 @@
<?php endforeach;endif; ?>
</div>
<?php endif; ?>
<div class="ctrlplan">
<a href="/admin/data/md/att/1/uuid/<?php echo $this->uuid;?>/addatts/1/mdtitle/<?php echo $this->mdtitle ;?>">为此元数据选择附件</a>
<a href="/admin/data/attachments/add/1/uuid/<?php echo $this->uuid;?>">为此元数据添加附件</a>
<a href="/data/<?php echo $this->uuid; ?>">查看元数据</a>
<div class="form-group">
<a class="btn btn-primary btn-sm" href="/admin/data/md/att/1/uuid/<?php echo $this->uuid;?>/addatts/1/mdtitle/<?php echo $this->mdtitle ;?>">为此元数据选择附件</a>
<a class="btn btn-primary btn-sm" href="/admin/data/attachments/add/1/uuid/<?php echo $this->uuid;?>">为此元数据添加附件</a>
<a class="btn btn-primary btn-sm" href="/data/<?php echo $this->uuid; ?>">查看元数据</a>
</div>
<table class="stylized">
<table class="stylized table table-bordered table-striped table-hover">
<thead><tr>
<th width='250'>文件名</th>
<th width='80'>类型</th>
@ -64,7 +62,8 @@
</tr>';
}
?>
</tbody></table>
</tbody>
</table>
</div>
<div style="display:none;">
<form id="fileUpdate" method="post">
@ -76,6 +75,7 @@
</p>
</form>
</div>
</div>
<script>
function delmdatt(id){
$.ajax({

View File

@ -4,55 +4,61 @@ $this->headTitle($this->config->title->author);
$this->headTitle()->setSeparator(' - ');
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->headScript()->appendFile('/js/jquery.colorbox-min.js');
$this->headLink()->appendStylesheet('/css/author.css');
$this->headLink()->appendStylesheet('/css/colorbox.css');
$this->headLink()->appendStylesheet('/js/lib/colorbox/colorbox.css');
$this->headScript()->appendFile('/js/lib/colorbox/jquery.colorbox-min.js');
$this->headScript()->appendFile('/js/modal.js');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
$this->breadcrumb('数据作者管理');
$this->breadcrumb()->setSeparator(' > ');
?>
<div class="row">
<!-- 左侧导航 -->
<div id="leftPanel">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<!-- //左侧导航 -->
<!-- 页面内容 -->
<div id="rightPanel">
<div id="tabs-controller">
<ul>
<li class="box-shadow"><a class="text-shadow" href="/admin/data/author">作者管理</a></li>
<li class="box-shadow"><a class="text-shadow" href="/admin/data/author/ac/list">查看所有数据作者</a></li>
<li class="box-shadow active"><a class="text-shadow" href="/admin/data/author/ac/datas">所有数据</a></li>
</ul>
<div class="col-md-10 col-sm-12">
<div class="form-group">
<a class="btn btn-primary btn-sm" href="/admin/data/author">作者管理</a>
<a class="btn btn-primary btn-sm" href="/admin/data/author/ac/list">查看所有数据作者</a>
<a class="btn btn-primary btn-sm" href="/admin/data/author/ac/datas">所有数据</a>
</div>
<div>
<p>请输入元数据标题关键字进行搜索</p>
<form id="datasearch" class="search_form" action="/admin/data/author/ac/datas">
<input type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" />
<button type="submit" class="btn" id="search_btn">搜索</button>
<div class="input-group form-group">
<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>
</div>
<div id="datalist">
<div id="datalistZ">
<?php
if (count($this->paginator)):
if ($this->mdtitle) echo "<h2>元数据:".$this->mdtitle."</h2>";
echo "<ul>";
echo "<ul class=list-unstyled>";
$autoindex=0;
foreach ($this->paginator as $item):
$autoindex++;?>
<li id="list_<?php echo $item['id'];?>">
<p><a href="/data/<?php echo $item['uuid'];?>" target="_blank"><?php echo $item['title'];?></a> </p>
<p>
<li id="list_<?php echo $item['id'];?>" class="well well-sm">
<h4><a href="/data/<?php echo $item['uuid'];?>" target="_blank"><?php echo $item['title'];?></a> </h4>
<h5>
<?php if ($item['c']) : ?>
作者数量 <span id="sumAuthor_<?php echo $item['id'];?>"><?php echo $item['c']; ?></span> | <a href="/admin/data/author/ac/edit/uuid/<?php echo $item['uuid']; ?>/window/iframe" class="iframe">作者管理</a> |
作者数量 <span id="sumAuthor_<?php echo $item['id'];?>"><?php echo $item['c']; ?></span>
<a class="label label-info" data-trigger="modal" data-title="作者" href="/admin/data/author/ac/edit/uuid/<?php echo $item['uuid']; ?>/window/iframe" class="iframe">
<span class="glyphicon glyphicon-user"></span> 作者管理</a>
<?php endif; ?>
<span id="addauthor_<?php echo $item['id'];?>"><a href="javascript:;" onclick="AddAuthor(<?php echo $item['id']; ?>,'<?php echo $item['uuid']; ?>')">添加作者</a></span>
<span class="form-inline" id="addauthor_<?php echo $item['id'];?>">
<a class="label label-success" href="javascript:;" onclick="AddAuthor(<?php echo $item['id']; ?>,'<?php echo $item['uuid']; ?>')">
<span class="glyphicon glyphicon-plus"></span> 添加作者</a>
</span>
<?php if($item['c']):?>
| <span id="sendmail_<?php echo $item['id'];?>"><a href="javascript:;" onclick="SendMail('<?php echo $item['uuid']; ?>')">发邮件</a></span>
<span id="sendmail_<?php echo $item['id'];?>">
<a class="label label-primary" href="javascript:;" onclick="SendMail('<?php echo $item['uuid']; ?>')">
<span class="glyphicon glyphicon-envelope"></span> 发邮件</a>
</span>
<?php endif;?>
</p>
</h5>
</li>
<?php endforeach;
echo "</ul>";
@ -60,10 +66,11 @@ $this->breadcrumb()->setSeparator(' > ');
<div class="pagenavi"><?= $this->paginator; ?></div>
</div>
</div>
</div>
<!-- //页面内容 -->
<script>
function AddAuthor(id,uuid){
$('#addauthor_'+id).html('用户名:<input type="text" id="authorInp_'+id+'"/><button class="btn btn-green" onclick="addAuthor('+id+',\''+uuid+'\')">添加</button>');
$('#addauthor_'+id).html('用户名:<input class="form-control input-sm" type="text" id="authorInp_'+id+'"/> <button class="btn btn-success btn-sm" onclick="addAuthor('+id+',\''+uuid+'\')">添加</button>');
}
function addAuthor(id,uuid){
$.ajax({
@ -78,7 +85,7 @@ function addAuthor(id,uuid){
if(typeof(data.msg)!='undefined')
{Alert(data.msg);}
if(typeof(data.added)!='undefined')
{$('#addauthor_'+id).html('<a href="javascript:;" onclick="AddAuthor('+id+',\''+uuid+'\')">添加作者</a>');}
{$('#addauthor_'+id).html('<a class="label label-success" href="javascript:;" onclick="AddAuthor('+id+',\''+uuid+'\')"><span class="glyphicon glyphicon-plus"></span> 添加作者</a>');}
}
else{
Alert('出现错误,请稍后再试');

View File

@ -1,25 +1,4 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>作者管理</title>
<link rel="stylesheet" type="text/css" media="screen" href="/css/default.css" />
<script src='/static/js/jquery-1.7.2.min.js' type="text/javascript"></script>
<script type="text/javascript" src="/js/jquery.colorbox-min.js"></script>
<link href="/css/author.css" media="screen" rel="stylesheet" type="text/css"/>
<link href="/static/js/uploadify/uploadify.css" media="screen" rel="stylesheet" type="text/css" />
<link href="/css/colorbox.css" media="screen" rel="stylesheet" type="text/css" />
<style>
#loading{margin:0px;border:none;height:50px;width:98%;background:url(/static/img/colorbox-images/loading.gif) center center no-repeat;display:none;position:absolute;left:0px;top:0px;overflow:hidden;background:#ccc;}
</style>
</head>
<body>
<!-- 页面内容 -->
<div id="warpper">
<div id="loading" class="info info-box"></div>
<div id="datalist">
<ul>
<ul class="list-unstyled">
<?php
if(isset($this->authors))
{
@ -34,10 +13,9 @@
</p>
</li>
<?php } } ?>
</ul></div>
</div>
</ul>
<!-- //页面内容 -->
<script>
<script type="text/javascript">
function update(id){
$.ajax({
'type':"POST",
@ -47,13 +25,13 @@ function update(id){
if (data!=null)
{
if(typeof(data.error)!='undefined')
{Alert(data.error);return false;}
{alert(data.error);return false;}
if(data.msg!=null)
{Alert(data.msg);}
{alert(data.msg);}
if(typeof(data.updated)!='undefined')
{$('#status_'+data.updated).html('已认证');$('#statusChange_'+data.updated).html('');}
}else{
Alert('处理中出现错误');
alert('处理中出现错误');
}
},
'timeout': 30000
@ -70,11 +48,11 @@ function remove(id){
if (data!=null)
{
if(typeof(data.error)!='undefined')
{Alert(data.error);return false;}
{alert(data.error);return false;}
if(typeof(data.deleted)!='undefined')
{$('#author_'+data.deleted).fadeOut("slow",function(){$(this).remove();});}
}else{
Alert('处理中出现错误');
alert('处理中出现错误');
}
},
'timeout': 30000
@ -90,12 +68,8 @@ $('#loading').ajaxSend(function() {
});
$("#loading").ajaxError(function() {
$(this).css('display','none');
Alert('请求超时或服务器开小差了,请刷新页面后重试');
alert('请求超时或服务器开小差了,请刷新页面后重试');
});
function Alert(html){
$.colorbox({'innerWidth':'50%','html':'<h4>'+html+'</h4>'});
}
</script>
</body>
</html>

View File

@ -8,11 +8,11 @@ $this->breadcrumb('数据作者管理');
$this->breadcrumb()->setSeparator(' > ');
$this->theme->AppendPlus($this,"colorbox");
?>
<div class="row-fluid">
<div class="span3">
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div class="span9">
<div class="col-md-10 col-sm-12">
<div id="loading" class="info info-box"></div>
<div id="datalist">
<?php if(!empty($this->authors)) { ?>

View File

@ -2,53 +2,52 @@
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->author);
$this->headTitle()->setSeparator(' - ');
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->headScript()->appendFile('/js/jquery.colorbox-min.js');
$this->headLink()->appendStylesheet('/css/author.css');
$this->headLink()->appendStylesheet('/css/colorbox.css');
$this->headLink()->appendStylesheet('/js/lib/colorbox/colorbox.css');
$this->headScript()->appendFile('/js/lib/colorbox/jquery.colorbox-min.js');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
$this->breadcrumb('数据作者管理');
$this->breadcrumb()->setSeparator(' > ');
?>
<div class="row">
<!-- 左侧导航 -->
<div id="leftPanel">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<!-- //左侧导航 -->
<!-- 页面内容 -->
<div id="rightPanel">
<div id="tabs-controller">
<ul>
<li class="box-shadow"><a class="text-shadow" href="/admin/data/author">作者管理</a></li>
<li class="box-shadow active"><a class="text-shadow" href="/admin/data/author/ac/list">查看所有数据作者</a></li>
<li class="box-shadow"><a class="text-shadow" href="/admin/data/author/ac/datas">所有数据</a></li>
</ul>
<div class="col-md-10 col-sm-12">
<div class="form-group">
<a class="btn btn-primary" href="/admin/data/author">作者管理</a>
<a class="btn btn-primary" href="/admin/data/author/ac/list">查看所有数据作者</a>
<a class="btn btn-primary" href="/admin/data/author/ac/datas">所有数据</a>
</div>
<div>
<p>请输入元数据标题关键字进行搜索</p>
<form id="datasearch" class="search_form" action="/admin/data/author/ac/list">
<input type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" />
<button type="submit" class="btn" id="search_btn">搜索</button>
<div class="input-group form-group">
<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>
</div>
<div id="datalist">
<div id="datalistZ">
<?php
if (count($this->paginator)):
if ($this->mdtitle) echo "<h2>元数据:".$this->mdtitle."</h2>";
echo "<ul>";
echo "<ul class=list-unstyled>";
$autoindex=0;
foreach ($this->paginator as $item):
$autoindex++;?>
<li id="list_<?php echo $item['id'];?>">
<p><a href="/admin/user/show/id/<?= $item['id'] ?>" target="_blank"><?php echo $item['realname'];?></a> </p>
<p>
<li id="list_<?php echo $item['id'];?>" class="well well-sm">
<h4><a href="/admin/user/show/id/<?= $item['id'] ?>" target="_blank"><span class="glyphicon glyphicon-user"></span> <?php echo $item['realname'];?></a> </h4>
<h5>
<?php if ($item['d']) : ?>
数据个数 <span id="sumAuthor_<?php echo $item['id'];?>"><?php echo $item['d']; ?></span> | <a href="javascript:;" onclick="view(<?= $item['id']?>)">查看数据</a> | Email: <span><?= $item['email'];?></span>
数据个数 <span id="sumAuthor_<?php echo $item['id'];?>"><?php echo $item['d']; ?></span>
<a href="javascript:;" onclick="view(<?= $item['id']?>)">查看数据</a>&nbsp;&nbsp;
<!-- <a data-trigger="modal" data-title="数据" href="view(<?= $item['id']?>)" onclick="view(<?= $item['id']?>)" >查看数据2</a> -->
<span><a href="mailto:<?= $item['email']; ?>"><span class="glyphicon glyphicon-envelope"></span> : <?= $item['email']; ?></a></span>
<?php endif; ?>
</p>
</h5>
</li>
<?php endforeach;
echo "</ul>";
@ -56,6 +55,7 @@ $this->breadcrumb()->setSeparator(' > ');
<div class="pagenavi"><?= $this->paginator; ?></div>
</div>
</div>
</div>
<!-- //页面内容 -->
<script>
function view(id){

View File

@ -2,54 +2,58 @@
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->author);
$this->headTitle()->setSeparator(' - ');
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->headScript()->appendFile('/js/jquery.colorbox-min.js');
$this->headScript()->appendFile('/js/modal.js');
$this->headLink()->appendStylesheet('/css/author.css');
$this->headLink()->appendStylesheet('/css/colorbox.css');
$this->headLink()->appendStylesheet('/js/lib/colorbox/colorbox.css');
$this->headScript()->appendFile('/js/lib/colorbox/jquery.colorbox-min.js');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
$this->breadcrumb('数据作者管理');
$this->breadcrumb()->setSeparator(' > ');
?>
<div class="row">
<!-- 左侧导航 -->
<div id="leftPanel">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<!-- //左侧导航 -->
<!-- 页面内容 -->
<div id="rightPanel">
<div id="tabs-controller">
<ul>
<li class="box-shadow active"><a class="text-shadow" href="/admin/data/author">作者管理</a></li>
<li class="box-shadow"><a class="text-shadow" href="/admin/data/author/ac/list">查看所有数据作者</a></li>
<li class="box-shadow"><a class="text-shadow" href="/admin/data/author/ac/datas">所有数据</a></li>
</ul>
<div class="col-md-10 col-sm-12">
<div class="form-group">
<a class="btn btn-primary btn-sm" href="/admin/data/author">作者管理</a>
<a class="btn btn-primary btn-sm" href="/admin/data/author/ac/list">查看所有数据作者</a>
<a class="btn btn-primary btn-sm" href="/admin/data/author/ac/datas">所有数据</a>
</div>
<div>
<p>请输入元数据标题关键字进行搜索</p>
<form id="datasearch" class="search_form" action="/admin/data/author">
<input type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" />
<button type="submit" class="btn" id="search_btn">搜索</button>
<div class="input-group form-group">
<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>
</div>
<div id="datalist">
<div id="datalistZ" >
<?php
if (count($this->paginator)):
if ($this->mdtitle) echo "<h2>元数据:".$this->mdtitle."</h2>";
echo "<ul>";
echo "<ul class=list-unstyled>";
$autoindex=0;
foreach ($this->paginator as $item):
$autoindex++;?>
<li id="list_<?php echo $item['id'];?>">
<p><a href="/data/<?php echo $item['uuid'];?>" target="_blank"><?php echo $item['title'];?></a> </p>
<p>
<li id="list_<?php echo $item['id'];?>" class="well well-sm">
<h4><a href="/data/<?php echo $item['uuid'];?>" target="_blank"><?php echo $item['title'];?></a> </h4>
<p></p>
<h5>
<?php if ($item['c']) : ?>
作者数量 <span id="sumAuthor_<?php echo $item['id'];?>"><?php echo $item['c']; ?></span> | <a href="/admin/data/author/ac/edit/uuid/<?php echo $item['uuid']; ?>/window/iframe" class="iframe">作者管理</a> |
作者数量 <span id="sumAuthor_<?php echo $item['id'];?>"><?php echo $item['c']; ?></span>
<a class="label label-info" data-trigger="modal" data-title="作者" href="/admin/data/author/ac/edit/uuid/<?php echo $item['uuid']; ?>/window/iframe" class="iframe">
<span class="glyphicon glyphicon-user"></span> 作者管理</a>
<?php endif; ?>
<span id="addauthor_<?php echo $item['id'];?>"><a href="javascript:;" onclick="AddAuthor(<?php echo $item['id']; ?>,'<?php echo $item['uuid']; ?>')">添加作者</a></span>
</p>
<span class="form-inline" id="addauthor_<?php echo $item['id'];?>">
<a class="label label-success" href="javascript:;" onclick="AddAuthor(<?php echo $item['id']; ?>,'<?php echo $item['uuid']; ?>')">
<span class="glyphicon glyphicon-plus"></span> 添加作者</a>
</span>
</h5>
</li>
<?php endforeach;
echo "</ul>";
@ -57,10 +61,10 @@ $this->breadcrumb()->setSeparator(' > ');
<div class="pagenavi"><?= $this->paginator; ?></div>
</div>
</div>
<!-- //页面内容 -->
<script>
</div>
<script type="text/javascript">
function AddAuthor(id,uuid){
$('#addauthor_'+id).html('用户名:<input type="text" id="authorInp_'+id+'"/><button class="btn btn-green" onclick="addAuthor('+id+',\''+uuid+'\')">添加</button>');
$('#addauthor_'+id).html('用户名:<input class="form-control input-sm" type="text" id="authorInp_'+id+'"/> <button class="btn btn-success btn-sm" onclick="addAuthor('+id+',\''+uuid+'\')">添加</button>');
}
function addAuthor(id,uuid){
$.ajax({
@ -71,9 +75,9 @@ function addAuthor(id,uuid){
if (typeof(data)=='object')
{
if(typeof(data.error)!='undefined')
{Alert(data.error);return false;}
{alert(data.error);return false;}
if(typeof(data.msg)!='undefined')
{Alert(data.msg);}
{alert(data.msg);}
if(typeof(data.status)!='undefined')
{$('#addauthor_'+id).html('<a href="javascript:;" onclick="AddAuthor('+id+',\''+uuid+'\')">添加作者</a>');}
}
@ -87,9 +91,5 @@ function addAuthor(id,uuid){
}
});
}
$(".iframe").colorbox({iframe:true, width:"80%", height:"80%"});
$(".inline").colorbox({inline:true, width:"50%"});
function Alert(html){
$.colorbox({'innerWidth':'50%','html':'<h4 style="font-size:16px;font-weight:bold;">'+html+'</h4>'});
}
</script>

View File

@ -9,13 +9,14 @@
$this->breadcrumb('导入服务器上元数据目录</a>');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="leftPanel">
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div id="rightPanel">
<div class="col-md-10 col-sm-12">
<form method="POST">
<p>服务器上元数据所在目录含所有子目录的xml文件: <input type="text" name="directory"></p>
<input type="submit" value="导入元数据" />
</form>
</div>
</div>

View File

@ -4,24 +4,25 @@
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
$this->headScript()->appendFile('/js/jquery.colorbox-min.js');
$this->headLink()->appendStylesheet('/css/author.css');
$this->headLink()->appendStylesheet('/css/colorbox.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin">后台首页</a>');
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
$this->breadcrumb('数据反馈管理</a>');
$this->breadcrumb()->setSeparator(' > ');
$this->headScript()->appendFile('/js/lib/colorbox/jquery.colorbox-min.js');
$this->headLink()->appendStylesheet('/js/lib/colorbox/colorbox.css');
?>
<div id="leftPanel">
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div id="rightPanel">
<div class="col-md-10 col-sm-12">
<?php if(isset($this->title)) {
echo "元数据《".$this->title."》的所有评论";
}?>
<?php if ($this->msg or $this->messages) :?>
<div id="message">
<div id="message" class="alert alert-info">
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
@ -29,24 +30,30 @@
<?php endforeach;endif; ?>
</div>
<?php endif; ?>
<div id="datalist">
<div id="datalistZ">
<?php if (count($this->paginator)): ?>
<ul>
<ul class=list-unstyled>
<?php foreach ($this->paginator as $item): ?>
<li>
<p>用户名:<?php ($item['url'])?print '<a href="'.$item['url'].'">'.$item['author'].'</a>':print $item['author']; ?>
EMAIL<?= $item['email']; ?>
[类型:<?= $item['type']; ?>,创建时间:<?= date('Y-m-d',strtotime($item['ts_created'])); ?>
。操作: <a href="/admin/data/comment/delete/<?= $item['id']; ?>">删除</a> <a href="javascript:;" onclick="showreply(<?= $item['id']; ?>)">回复
<?php if($item['reply_count']>0){echo "(".$item['reply_count'].")";}?></a></p>
<p style="display:none;vertical-align:bottom" id="comment_reply_<?= $item['id']; ?>"><textarea id="reply_<?= $item['id']; ?>" class="middle half"></textarea>
<button type="button" onclick="reply(<?= $item['id']; ?>,'<?= $item['uuid']; ?>')" class="btn btn-green" style="vertical-align:bottom">提交</button>
<div style="width:90%; margin:0 auto;">
<ul id="replyList_<?= $item['id']; ?>">
</ul>
<li class="well well-sm">
<h5 class="text-muted">
<span class="glyphicon glyphicon-user"></span>
<?php ($item['url'])?print '<a href="'.$item['url'].'">'.$item['author'].'</a>':print $item['author']; ?>
<span class="glyphicon glyphicon-envelope"></span> EMAIL<?= $item['email']; ?>
[类型:<?= $item['type']; ?>
创建时间:<?= date('Y-m-d',strtotime($item['ts_created'])); ?>
操作: <a href="/admin/data/comment/delete/<?= $item['id']; ?>">
<span class="glyphicon glyphicon-trash"></span>
删除&nbsp;&nbsp;</a> <a href="javascript:;" onclick="showreply(<?= $item['id']; ?>)">
<span class="glyphicon glyphicon-pencil"></span>
回复 <?php if($item['reply_count']>0){echo "(".$item['reply_count'].")";}?></a>
</h5>
<div style="display:none;vertical-align:bottom" id="comment_reply_<?= $item['id']; ?>" class="form-inline h4" >
<textarea id="reply_<?= $item['id']; ?>" class="form-control" style="width: 688px; height: 100px; margin-bottom:9px;"></textarea>
<button type="button" onclick="reply(<?= $item['id']; ?>,'<?= $item['uuid']; ?>')" class="btn btn-primary" >提交</button>
<div style="h4">
<ul class="list-unstyled" id="replyList_<?= $item['id']; ?>"></ul>
</div>
</div>
</p>
<p>元数据:<a href="/data/<?= $item['uuid']; ?>"><?= $item['title']; ?></a></p>
<p><?= $item['content']; ?></p>
<p>IP:<?= $item['ip']; ?>AGENT:<?= $item['agent']; ?></p>
@ -55,7 +62,9 @@ EMAIL<?= $item['email']; ?>
</ul>
<?php endif; ?>
</div>
<?= $this->paginator; ?>
<div class="pagenavi"><?= $this->paginator;?></div>
</div>
</div>
<script>
function reply(id,uuid)
{
@ -97,8 +106,9 @@ function showreply(id){
var html=new Array();
for(i in data)
{
html.push('<li id="subReplyList_'+data[i].id+'">'+data[i].body+
' ['+data[i].username+' | <a href="javascript:void(0);" onClick="delreply('+data[i].id+')">删除</a>]</li>');
html.push('<blockquote><li class="h5" id="subReplyList_'+data[i].id+'"><span class="text-success"> '+data[i].body+
'</span>&nbsp;&nbsp; [ <span class="glyphicon glyphicon-user text-primary"></span> <span class="text-primary">'
+data[i].username+' </span>| <span class="glyphicon glyphicon-trash text-primary"></span> <a href="javascript:void(0);" onClick="delreply('+data[i].id+')">删除</a> ]</li></blockquote>');
}
html = html.join('');
$('#replyList_'+id).html(html);

View File

@ -9,12 +9,12 @@
$this->breadcrumb('导入数据目录文件</a>');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="leftPanel">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div id="rightPanel">
<div class="col-md-10 col-sm-12">
<?php if ($this->msg or $this->messages) :?>
<div id="message">
<div id="message" class="alert alert-info">
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>

View File

@ -9,12 +9,12 @@
$this->breadcrumb('特色数据集管理</a>');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="leftPanel">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div id="rightPanel">
<div class="col-md-10 col-sm-12">
<?php if ($this->msg or $this->messages) :?>
<div id="message">
<div id="message" class="alert alert-info">
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>

View File

@ -9,12 +9,12 @@
$this->breadcrumb('特色数据集管理</a>');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="leftPanel">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div id="rightPanel">
<div class="col-md-10 col-sm-12">
<?php if ($this->msg or $this->messages) :?>
<div id="message">
<div id="message" class="alert alert-info">
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>

View File

@ -2,18 +2,18 @@
$this->headTitle($this->config->title->site);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
//$this->headLink()->appendStylesheet('/css/admin.css');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
$this->breadcrumb('DOI');
$this->breadcrumb()->setSeparator(' > ');
$this->theme->AppendPlus($this,'colorbox');
?>
<div class="row-fluid">
<div class="span2">
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div class="span10">
<div class="col-md-10 col-sm-12">
<div>
<ul class="nav nav-tabs">
<li><a href="/admin/data/doi">浏览所有</a></li>
@ -29,58 +29,61 @@ $this->theme->AppendPlus($this,'colorbox');
<?php if(!empty($this->msg)) { ?>
<?= $this->msg ?>
<?php } else{ ?>
<p></p>
<div class="alert alert-info">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<h4>提示</h4>
如果元数据中标题发生了变更在DOI中也需要变更时需要在这里点击“提交”按钮才能生效
</div>
<form class="form-horizontal" method="post">
<div class="control-group">
<label class="control-label" for="doi">doi</label>
<div class="controls">
<input type="text" id="doi" name="doi" readonly="readonly" value="<?= (isset($this->data['doi'])&&!empty($this->data['doi'])) ? $this->data['doi']:"doi:10.3972/westdc.x.2013.db" ?>" />
<div class="form-group">
<label class="col-md-2 col-sm-2 control-label" for="doi">doi</label>
<div class="col-md-10 col-sm-10">
<input type="text" id="doi" name="doi" readonly="readonly" class="form-control"
value="<?= (isset($this->data['doi'])&&!empty($this->data['doi'])) ? $this->data['doi']:"doi:10.3972/westdc.x.2013.db" ?>" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="uuid">uuid</label>
<div class="controls">
<input type="text" id="uuid" name="uuid" readonly="readonly" value="<?= isset($this->data['uuid']) ? $this->data['uuid']:"" ?>" />
<div class="form-group">
<label class="col-md-2 col-sm-2 control-label" for="uuid">uuid</label>
<div class="col-md-10 col-sm-10">
<input type="text" id="uuid" name="uuid" readonly="readonly" value="<?= isset($this->data['uuid']) ? $this->data['uuid']:"" ?>" class="form-control" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="publisher">发布者</label>
<div class="controls">
<input type="text" id="publisher" name="publisher" value="<?= isset($this->data['publisher']) ? $this->data['publisher']:"" ?>" />
<div class="form-group">
<label class="col-md-2 col-sm-2 control-label" for="publisher">发布者</label>
<div class="col-md-10 col-sm-10">
<input type="text" id="publisher_en" name="publisher_en" value="<?= isset($this->data['publisher_en']) ? $this->data['publisher_en']:"" ?>" class="form-control" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="url">url</label>
<div class="controls">
<input type="text" id="url" name="url" value="<?= isset($this->data['url']) ? $this->data['url']:"" ?>" />
<div class="form-group">
<label class="col-md-2 col-sm-2 control-label" for="url">url</label>
<div class="col-md-10 col-sm-10">
<input type="text" id="url" name="url" value="<?= isset($this->data['url']) ? $this->data['url']:"" ?>" class="form-control" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="title">标题</label>
<div class="controls">
<input type="text" id="title" name="title" readonly="readonly" value="<?= isset($this->data['title']) ? $this->data['title']:"" ?>" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="title_en">英文标题</label>
<div class="controls">
<input type="text" id="title_en" name="title_en" readonly="readonly" value="<?= isset($this->data['title_en']) ? $this->data['title_en']:"" ?>" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="publisher_en">发布者英文</label>
<div class="controls">
<input type="text" id="publisher_en" name="publisher_en" value="<?= isset($this->data['publisher_en']) ? $this->data['publisher_en']:"" ?>" />
<div class="form-group">
<label class="col-md-2 col-sm-2 control-label" for="title">标题</label>
<div class="col-md-10 col-sm-10">
<input type="text" id="title_en" name="title_en" readonly="readonly" value="<?= isset($this->data['title_en']) ? $this->data['title_en']:$this->data['title'] ?>" class="form-control"/>
</div>
</div>
<?php if(empty($this->data['info']) || !is_array($this->data['info'])) {?>
<div class="control-group 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][author_en]" value="" placeholder="作者英文" />
<input type="text" name="info[1][organization_en]" value="" placeholder="单位英文" />
<input type="text" name="info[1][order]" value="" placeholder="排序" />
<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-3">
<input type="text" name="info[1][author_en]" value="" placeholder="Author Name" 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-6">
<input type="text" name="info[1][organization_en]" value="" placeholder="Organization" class="form-control"/>
</div>
</div>
</div>
</div>
<?php }else{ ?>
@ -89,28 +92,36 @@ $this->theme->AppendPlus($this,'colorbox');
foreach($this->data['info'] as $k=>$v){
$index ++;
?>
<div class="control-group infocontrol">
<label class="control-label">info</label>
<div class="controls">
<input type="text" name="info[<?= $k ?>][author]" value="<?= $v['author'] ?>" placeholder="作者" />
<input type="text" name="info[<?= $k ?>][organization]" value="<?= $v['organization'] ?>" placeholder="单位" />
<input type="text" name="info[<?= $k ?>][author_en]" value="<?= $v['author_en'] ?>" placeholder="作者英文" />
<input type="text" name="info[<?= $k ?>][organization_en]" value="<?= $v['organization_en'] ?>" placeholder="单位英文" />
<input type="text" name="info[<?= $k ?>][order]" value="<?= $v['order'] ?>" placeholder="排序" />
<div class="form-group infocontrol">
<label class="col-md-2 col-sm-2 control-label">info</label>
<div class="col-sm-10">
<div class="row">
<div class="col-md-2 col-sm-3">
<input class="form-control" type="text" name="info[<?= $k ?>][author_en]" value="<?= $v['author_en'] ?>" placeholder="Author Name" />
</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 ?>][organization_en]" value="<?= $v['organization_en'] ?>" placeholder="Organization" />
</div>
<div class="col-md-1">
<?php if($index>1){ ?>
<a href="javascript:void(0);" onclick="RmInput(this)"> -删除</a>
<label class="control-label"><a href="javascript:void(0);" onclick="RmInput(this)"> -删除</a></label>
<?php }?>
</div>
</div>
</div>
</div>
<?php } ?>
<?php } ?>
<div class="control-group">
<div class="controls">
<a href="javascript:void(0);" onclick="addinput()">+添加一条</a>
<div class="form-group">
<div class="col-sm-12">
<a class="pull-right" href="javascript:void(0);" onclick="addinput()" >+添加一条</a>
</div>
</div>
<div class="control-group">
<div class="controls">
<div class="form-group">
<div class="col-sm-12">
<input type="hidden" name="submit" value="1" />
<?php if(!empty($this->id)) { ?>
<input type="hidden" name="id" value=" <?=$this->id?> " />
@ -118,7 +129,7 @@ $this->theme->AppendPlus($this,'colorbox');
<?php if(!empty($this->uuid)) { ?>
<input type="hidden" name="uuid" value=" <?=$this->uuid?>" />
<?php } ?>
<button type="submit" class="btn btn-primary">提交</button>
<button type="submit" class="btn btn-primary pull-right">提交</button>
</div>
</div>
</form>
@ -130,21 +141,21 @@ $this->theme->AppendPlus($this,'colorbox');
function addinput(){
var now_index = $('.infocontrol').length;
var index = now_index + 1;
html = '<div class="control-group infocontrol"><div class="controls">'
+ '<input type="text" name="info[' + index + '][author]" placeholder="作者" /> '
+ '<input type="text" name="info[' + index + '][organization]" placeholder="单位" /> '
+ '<input type="text" name="info[' + index + '][author_en]" placeholder="作者英文" /> '
+ '<input type="text" name="info[' + index + '][organization_en]" placeholder="单位英文" /> '
+ '<input type="text" name="info[' + index + '][order]" placeholder="排序" /> '
+ '<a href="javascript:void(0);" onclick="RmInput(this)"> -删除</a>'
+ '</div></div>';
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-3"><input class="form-control" type="text" name="info[' + index + '][author_en]" placeholder="Author Name" /></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_en]" placeholder="Organization" /></div>'
+'<div class="col-md-1"><label class="control-label"><a href="javascript:void(0);" onclick="RmInput(this)"> -删除</a></label></div>'
+'</div></div></div>';
now_index = null;
index = null;
$('.infocontrol').last().after(html);
}
function RmInput(e){
$e = $(e);
$e.parent('div').parent('div.infocontrol').remove();
$e.parent().parent().parent().parent().parent('div.infocontrol').remove();
}
</script>
<!-- //页面内容 -->

View File

@ -2,34 +2,33 @@
$this->headTitle($this->config->title->site);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
$this->breadcrumb('DOI');
$this->breadcrumb()->setSeparator(' > ');
$this->theme->AppendPlus($this,'colorbox');
// $this->theme->AppendPlus($this,'colorbox');
$this->theme->AppendPlus($this,'admin_plugin');
$this->headScript()->appendFile('/js/lib/colorbox/jquery.colorbox-min.js');
$this->headLink()->appendStylesheet('/js/lib/colorbox/colorbox.css');
?>
<style>
table thead tr th {background:#EBF2F6;}
</style>
<div class="row-fluid">
<div class="span2">
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div class="span10">
<div>
<ul class="nav nav-tabs">
<div class="col-md-10 col-sm-12 span10">
<div class="form-group">
<ul class="nav nav-tabs" role="tablist">
<li class="active"><a href="/admin/data/doi">浏览所有</a></li>
</ul>
</div>
<div>
<div class="input-append">
<form id="datasearch" class="search_form" action="">
<input type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" />
<button type="submit" class="btn" id="search_btn">搜索</button>
<div class="input-group form-group">
<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>
</div>
</div>
<?php if(!empty($this->error)) { ?>
<?= $this->error ?>
<?php } ?>
@ -38,7 +37,7 @@ table thead tr th {background:#EBF2F6;}
<?php } else{ ?>
<div id="datalist">
<?php if (count($this->paginator)): ?>
<table class="table table-bordered table-striped">
<table class="stylized table table-bordered table-striped table-hover">
<thead>
<tr>
<th>状态</th>
@ -53,13 +52,15 @@ table thead tr th {background:#EBF2F6;}
$autoindex++;?>
<tr id="DataLine_<?= $item['id']?>">
<td><?php if (!empty($item['ts_published'])) { echo '已发布'; } else if (!empty($item['ts_submitted'])) { echo '已提交'; } ?></td>
<td><a href="/data/<?= $item['uuid'] ?>"><?= $item['title'] ?></a></td>
<td><a href="/data/<?= $item['uuid'] ?>"><?= ($item['title_en'])?$item['title_en']:$item['title'] ?></a></td>
<td><?= $item['doi'] ?></td>
<td>
<a href="/admin/data/doi/ac/edit/uuid/<?= $item['uuid']?>">编辑</a>
<a href="/admin/data/doi/ac/convert/uuid/<?= $item['uuid']?>">导出</a>
<a href="javascript:void(0);" rel="/admin/data/doi/ac/verified/uuid/<?= $item['uuid']?>" class="verified_btn">验证</a>
<?php if(empty($item['ts_published'])) {?>
<a href="javascript:void(0);" onclick="onedel(<?= $item['id']?>)" id="delbtn_<?= $item['id']?>">删除</a>
<?php } ?>
</td>
</tr>
<?php endforeach; ?>

View File

@ -9,12 +9,12 @@
$this->breadcrumb('特色推荐管理</a>');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="leftPanel">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div id="rightPanel">
<div class="col-md-10 col-sm-12">
<?php if ($this->msg or $this->messages) :?>
<div id="message">
<div id="message" class="alert alert-info">
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>

View File

@ -9,12 +9,12 @@
$this->breadcrumb('特色推荐管理</a>');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="leftPanel">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div id="rightPanel">
<div class="col-md-10 col-sm-12">
<?php if ($this->msg or $this->messages) :?>
<div id="message">
<div id="message" class="alert alert-info">
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>

View File

@ -2,26 +2,19 @@
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->author);
$this->headTitle()->setSeparator(' - ');
//$this->headLink()->appendStylesheet('/css/admin.css');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
$this->breadcrumb('支持项目');
$this->breadcrumb()->setSeparator(' > ');
$this->theme->AppendPlus($this,'colorbox');
?>
<div class="row-fluid">
<div class="span2">
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div class="span10">
<div>
<ul class="nav nav-tabs">
<li><a href="/admin/data/fund/ac/datalist">数据相关</a></li>
<li><a href="/admin/data/fund/">所有项目</a></li>
<li class="active"><a href="/admin/data/fund/ac/add">添加新项目</a></li>
</ul>
</div>
<div class="">
<div class="col-md-10 col-sm-12">
<?= $this->partial('data/fund-nav.phtml',array('ac'=>$this->ac,'uuid'=>$this->uuid)); ?>
<?php if(!empty($this->error)) { ?>
<div class="alert alert-block alert-error fade in" id="Alert-error-box">
<a class="close" data-dismiss="alert" href="#">×</a>
@ -43,49 +36,49 @@ $this->theme->AppendPlus($this,'colorbox');
<script language="javascript">setTimeout("self.location='<?php echo $this->jump_url ?>'",3000);</script>
<?php } ?>
<?php } else{ ?>
<p></p>
<form class="form-horizontal" method="post">
<div class="control-group">
<label class="control-label" for="title">项目名称</label>
<div class="controls">
<input type="text" id="title" name="title" value="<?= isset($this->data['title']) ? $this->data['title']:"" ?>" />
<div class="form-group">
<label class="col-sm-2 control-label" for="title">项目名称</label>
<div class="col-sm-6">
<input class="form-control" placeholder="项目名称" type="text" id="title" name="title" value="<?= isset($this->data['title']) ? $this->data['title']:"" ?>" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="fund_id">编号</label>
<div class="controls">
<input type="text" id="fund_id" name="fund_id" value="<?= isset($this->data['fund_id']) ? $this->data['fund_id']:"" ?>" />
<div class="form-group">
<label class="col-sm-2 control-label" for="fund_id">编号</label>
<div class="col-sm-6">
<input class="form-control" placeholder="编号" type="text" id="fund_id" name="fund_id" value="<?= isset($this->data['fund_id']) ? $this->data['fund_id']:"" ?>" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="fund_type">类型</label>
<div class="controls">
<input type="text" id="fund_type" name="fund_type" value="<?= isset($this->data['fund_type']) ? $this->data['fund_type']:"" ?>" />
<div class="form-group">
<label class="col-sm-2 control-label" for="fund_type">类型</label>
<div class="col-sm-6">
<input class="form-control" placeholder="类型" type="text" id="fund_type" name="fund_type" value="<?= isset($this->data['fund_type']) ? $this->data['fund_type']:"" ?>" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="title_en">英文名称</label>
<div class="controls">
<input type="text" id="title_en" name="title_en" value="<?= isset($this->data['title_en']) ? $this->data['title_en']:"" ?>" />
<div class="form-group">
<label class="col-sm-2 control-label" for="title_en">英文名称</label>
<div class="col-sm-6">
<input class="form-control" placeholder="英文名称" type="text" id="title_en" name="title_en" value="<?= isset($this->data['title_en']) ? $this->data['title_en']:"" ?>" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="fund_type_en">英文类型</label>
<div class="controls">
<input type="text" id="fund_type_en" name="fund_type_en" value="<?= isset($this->data['fund_type_en']) ? $this->data['fund_type_en']:"" ?>" />
<div class="form-group">
<label class="col-sm-2 control-label" for="fund_type_en">英文类型</label>
<div class="col-sm-6">
<input class="form-control" placeholder="英文类型" type="text" id="fund_type_en" name="fund_type_en" value="<?= isset($this->data['fund_type_en']) ? $this->data['fund_type_en']:"" ?>" />
</div>
</div>
<div class="control-group">
<div class="controls">
<div class="form-group">
<div class="col-sm-8">
<input type="hidden" name="submit" value="1" />
<?php if(!empty($this->id)) { ?>
<input type="hidden" name="id" value=" <?=$this->id?> " />
<?php } ?>
<button type="submit" class="btn btn-primary">提交</button>
<button type="submit" class="btn btn-primary pull-right">提交</button>
</div>
</div>
</form>
<?php } ?>
</div>
</div>
</div>
<!-- //页面内容 -->

View File

@ -0,0 +1,108 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
$this->breadcrumb('<a href="/">首页</a>');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
$this->breadcrumb('项目管理');
$this->breadcrumb()->setSeparator(' > ');
$this->theme->AppendPlus($this,'colorbox');
$this->theme->AppendPlus($this,'admin_plugin');
$this->theme->AppendModel($this,'admin-data-fund');
?>
<style>
table thead tr th {background:#EBF2F6;}
</style>
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div class="col-md-10 col-sm-12">
<div>
<?= $this->partial('data/fund-nav.phtml',array('ac'=>$this->ac,'uuid'=>$this->uuid)); ?>
</div>
<div>
<h3><?php echo $this->md['title']; ?> <a href="/data/<?php echo $this->uuid; ?>">查看</a></h3>
<div class="input-append">
<form id="datasearch" class="search_form" action="">
<input type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" />
<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; ?>" />
<button type="submit" class="btn" id="search_btn">搜索项目(数据外搜索,可以添加到数据)</button>
</form>
</div>
</div>
<?php if(!empty($this->error)) { ?>
<?= $this->error ?>
<?php } ?>
<?php if(!empty($this->msg)) { ?>
<?= $this->msg ?>
<?php } else{ ?>
<div id="datalist">
<?php if (count($this->paginator)): ?>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>项目名称
<a href="?order=title&sort=ASC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-up"></i></a>
<a href="?order=title&sort=DESC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-down"></i></a>
</th>
<th>编号
<a href="?order=fund_id&sort=ASC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-up"></i></a>
<a href="?order=fund_id&sort=DESC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-down"></i></a>
</th>
<th>类型
<a href="?order=fund_type&sort=ASC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-up"></i></a>
<a href="?order=fund_type&sort=DESC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-down"></i></a>
</th>
<th>英文标题
<a href="?order=title_en&sort=ASC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-up"></i></a>
<a href="?order=title_en&sort=DESC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-down"></i></a>
</th>
<th>英文类型
<a href="?order=fund_type_en&sort=ASC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-up"></i></a>
<a href="?order=fund_type_en&sort=DESC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-down"></i></a>
</th>
<th></th>
<th width="60">操作</th>
</tr>
</thead>
<tbody>
<?php
if($this->page > 1)
{
$autoindex = ($this->page - 1) * $this->pagelimit;
}else{
$autoindex=0;
}
foreach ($this->paginator as $item):
$autoindex++;?>
<tr id="DataLine_<?= $item['mfid']?>">
<td>
[<?= $autoindex ?>]&nbsp;
<?= $item['title'] ?> <a href="/admin/data/fund/ac/add/id/<?= $item['id']?>">项目编辑</a>
<a href="/admin/data/fund/ac/data/id/<?= $item['id'] ?>">数据</a>
</td>
<td><?= $item['fund_id'] ?></td>
<td><?= $item['fund_type'] ?></td>
<td><?= $item['title_en'] ?></td>
<td><?= $item['fund_type_en'] ?></td>
<td><?= $item['place'] ?></td>
<td>
<a href="javascript:void(0);" onclick="$('#mdfund')[0].reset();mdfund.edit(<?= $item['mfid']?>,<?= $item['id']?>,'<?= $this->uuid ?>',<?= $item['place']?>)">编辑</a>
<a href="/admin/data/fund/ac/remove/id/<?= $item['mfid']?>">移除</a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php endif; ?>
<div class="pagenavi"><?= $this->paginator; ?></div>
</div>
<?php } ?>
</div>
</div>
<!-- //页面内容 -->
<?= $this->partial('data/fund-mdfund-form.phtml'); ?>

View File

@ -3,7 +3,8 @@ $this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->author);
$this->headTitle()->setSeparator(' - ');
$this->breadcrumb('<a href="/">首页</a>');
$this->headLink()->appendStylesheet('/css/author.css');
$this->headLink()->appendStylesheet('/css/admin.css');
// $this->headLink()->appendStylesheet('/css/author.css');
$this->breadcrumb()->setSeparator(' > ');
$this->theme->AppendPlus($this,'colorbox');
$this->theme->AppendPlus($this,'admin_plugin');
@ -11,38 +12,22 @@ $this->theme->AppendPlus($this,'admin_plugin');
<style>
table thead tr th {background:#EBF2F6;}
</style>
<div class="row-fluid">
<div class="span2">
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div class="span10">
<div>
<ul class="nav nav-tabs">
<li class="active"><a href="/admin/data/fund/ac/data">数据相关</a></li>
<li><a href="/admin/data/fund/">所有项目</a></li>
<li><a href="/admin/data/fund/ac/add">添加新项目</a></li>
</ul>
<div class="col-md-10 col-sm-12 span10">
<div class=" form-group">
<?= $this->partial('data/fund-nav.phtml',array('ac'=>$this->ac,'uuid'=>$this->uuid)); ?>
</div>
<?php if(!empty($this->md)) { ?>
<div>
<?php if(empty($this->ct)) { ?>
<a class="btn btn-primary pull-right" href="/author/fund/ac/formd/uuid/<?= $this->md['uuid'] ?>"><i class="icon-plus"></i>为此数据添加项目</a>
<?php }else{ ?>
<a class="pull-right btn" href="/author/fund/uuid/<?= $this->md['uuid'] ?>">返回</a>
<div class="pull-right label label-info">点击“添加此项目”即可将项目添加到元数据</div>
<?php } ?>
<h3><?= $this->md['title'] ?>》 的支持项目</h3>
<hr />
</div>
<?php } ?>
<div>
<div class="input-append">
<form id="datasearch" class="search_form" action="">
<input type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" />
<button type="submit" class="btn" id="search_btn">搜索</button>
<div class="input-group form-group">
<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>
</div>
</div>
<?php if(!empty($this->error)) { ?>
<?php if(empty($this->AlertType)) $AlertType = "alert-error";else $AlertType = $this->AlertType;?>
<div class="alert alert-block fade in <?= $AlertType ?>" id="Alert-error-box">
@ -70,28 +55,54 @@ table thead tr th {background:#EBF2F6;}
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>名称</th>
<th>项目编号</th>
<th>项目类型</th>
<th>数据个数</th>
<th width="70">操作</th>
<th>项目名称
<a href="?order=title&sort=ASC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-up"></i></a>
<a href="?order=title&sort=DESC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-down"></i></a>
</th>
<th>编号
<a href="?order=fund_id&sort=ASC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-up"></i></a>
<a href="?order=fund_id&sort=DESC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-down"></i></a>
</th>
<th>类型
<a href="?order=fund_type&sort=ASC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-up"></i></a>
<a href="?order=fund_type&sort=DESC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-down"></i></a>
</th>
<th>英文标题
<a href="?order=title_en&sort=ASC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-up"></i></a>
<a href="?order=title_en&sort=DESC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-down"></i></a>
</th>
<th>英文类型
<a href="?order=fund_type_en&sort=ASC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-up"></i></a>
<a href="?order=fund_type_en&sort=DESC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-down"></i></a>
</th>
<th></th>
<th width="100">操作</th>
</tr>
</thead>
<tbody>
<?php $autoindex=0;
<?php
if($this->page > 1)
{
$autoindex = ($this->page - 1) * $this->pagelimit;
}else{
$autoindex=0;
}
foreach ($this->paginator as $item):
$autoindex++;?>
<?php if(empty($this->md)) { ?>
<tr id="DataLine_<?= $item['id']?>">
<?php }else{?>
<tr id="DataLine_<?= $item['mfid']?>">
<?php }?>
<td><?= $item['title'] ?></td>
<td>
[<?= $autoindex ?>]&nbsp;
<?= $item['title'] ?>
</td>
<td><?= $item['fund_id'] ?></td>
<td><?= $item['fund_type'] ?></td>
<th><?= $item['mds'] ?></th>
<td><?= $item['title_en'] ?></td>
<td><?= $item['fund_type_en'] ?></td>
<td><?= $item['mdcount'] ?></td>
<td>
<a href="/data/fund/ac/dataview/id/<?= $item['id'] ?>">查看数据</a>
<a href="/admin/data/fund/ac/data/id/<?= $item['id'] ?>">数据</a>
<a href="/admin/data/fund/ac/add/id/<?= $item['id']?>">编辑</a>
<a href="/admin/data/fund/ac/delete/id/<?= $item['id']?>">删除</a>
</td>
</tr>
<?php endforeach; ?>
@ -104,10 +115,3 @@ table thead tr th {background:#EBF2F6;}
</div>
</div>
<!-- //页面内容 -->
<script>
var info = {
btn_prefix : "delbtn_",
item_prefix : "DataLine_",
url : "/author/fund/ac/mdfunddel/uuid/<?= $this->md['uuid'] ?>"
}
</script>

View File

@ -0,0 +1,108 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
$this->breadcrumb('<a href="/">首页</a>');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
$this->breadcrumb('项目管理');
$this->breadcrumb()->setSeparator(' > ');
$this->theme->AppendPlus($this,'colorbox');
$this->theme->AppendPlus($this,'admin_plugin');
$this->theme->AppendModel($this,'admin-data-fund');
?>
<style>
table thead tr th {background:#EBF2F6;}
</style>
<div class="row">
<div class="hidden-sm hidden-xs col-md-2 span2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div class="col-md-10 col-sm-12 span10">
<div>
<?= $this->partial('data/fund-nav.phtml',array('ac'=>$this->ac,'uuid'=>$this->uuid)); ?>
</div>
<div>
<h3><?php echo $this->md['title']; ?> <a href="/data/<?php echo $this->uuid; ?>">查看</a></h3>
<div class="input-append">
<form id="datasearch" class="search_form" action="">
<input type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" />
<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; ?>" />
<button type="submit" class="btn" id="search_btn">搜索项目(数据外搜索,可以添加到数据)</button>
</form>
</div>
</div>
<?php if(!empty($this->error)) { ?>
<?= $this->error ?>
<?php } ?>
<?php if(!empty($this->msg)) { ?>
<?= $this->msg ?>
<?php } else{ ?>
<div id="datalist">
<?php if (count($this->paginator)): ?>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>项目名称
<a href="?order=title&sort=ASC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-up"></i></a>
<a href="?order=title&sort=DESC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-down"></i></a>
</th>
<th>编号
<a href="?order=fund_id&sort=ASC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-up"></i></a>
<a href="?order=fund_id&sort=DESC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-down"></i></a>
</th>
<th>类型
<a href="?order=fund_type&sort=ASC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-up"></i></a>
<a href="?order=fund_type&sort=DESC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-down"></i></a>
</th>
<th>英文标题
<a href="?order=title_en&sort=ASC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-up"></i></a>
<a href="?order=title_en&sort=DESC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-down"></i></a>
</th>
<th>英文类型
<a href="?order=fund_type_en&sort=ASC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-up"></i></a>
<a href="?order=fund_type_en&sort=DESC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-down"></i></a>
</th>
<th></th>
<th width="60">操作</th>
</tr>
</thead>
<tbody>
<?php
if($this->page > 1)
{
$autoindex = ($this->page - 1) * $this->pagelimit;
}else{
$autoindex=0;
}
foreach ($this->paginator as $item):
$autoindex++;?>
<tr id="DataLine_<?= $item['mfid']?>">
<td>
[<?= $autoindex ?>]&nbsp;
<?= $item['title'] ?> <a href="/admin/data/fund/ac/add/id/<?= $item['id']?>">项目编辑</a>
<a href="/admin/data/fund/ac/data/id/<?= $item['id'] ?>">数据</a>
</td>
<td><?= $item['fund_id'] ?></td>
<td><?= $item['fund_type'] ?></td>
<td><?= $item['title_en'] ?></td>
<td><?= $item['fund_type_en'] ?></td>
<td><?= $item['place'] ?></td>
<td>
<a href="javascript:void(0);" onclick="$('#mdfund')[0].reset();mdfund.edit('<?= $item['mfid'] ?>',<?= $item['id']?>,'<?= $this->uuid ?>','<?= $item['place']?>')"><?= ($item['mfid'])?'编辑':'添加' ?></a>
<a href="/admin/data/fund/ac/remove/id/<?= $item['mfid']?>">移除</a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php endif; ?>
<div class="pagenavi"><?= $this->paginator; ?></div>
</div>
<?php } ?>
</div>
</div>
<!-- //页面内容 -->
<?= $this->partial('data/fund-mdfund-form.phtml'); ?>

View File

@ -4,7 +4,9 @@ $this->headTitle($this->config->title->author);
$this->headTitle()->setSeparator(' - ');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/author">数据作者</a>');
$this->headLink()->appendStylesheet('/css/author.css');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->breadcrumb('申请成为元数据作者');
$this->breadcrumb()->setSeparator(' > ');
$this->theme->AppendPlus($this,'colorbox');
@ -13,8 +15,8 @@ $this->theme->AppendPlus($this,'admin_plugin');
<style>
table thead tr th {background:#EBF2F6;}
</style>
<div class="row-fluid">
<div class="span3">
<div class="row">
<div class="hidden-sm hidden-xs col-md-2 span2">
<?= $this->partial('author/navi.phtml'); ?>
</div>
<div class="span9">

View File

@ -1,28 +1,26 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->author);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
$this->breadcrumb('<a href="/">首页</a>');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
$this->breadcrumb('支持项目');
$this->breadcrumb('项目管理');
$this->breadcrumb()->setSeparator(' > ');
$this->theme->AppendPlus($this,'colorbox');
$this->theme->AppendPlus($this,'admin_plugin');
$this->theme->AppendModel($this,'admin-data-fund');
?>
<style>
table thead tr th {background:#EBF2F6;}
</style>
<div class="row-fluid">
<div class="span2">
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div class="span10">
<div class="col-md-10 col-sm-12">
<div>
<ul class="nav nav-tabs">
<li><a href="/admin/data/fund/">所有项目</a></li>
<li><a href="/admin/data/fund/ac/add">添加新项目</a></li>
<li class="active"><a href="/admin/data/fund/ac/data/id/<?= $this->id ?>">相关数据</a></li>
</ul>
<?= $this->partial('data/fund-nav.phtml',array('ac'=>$this->ac,'uuid'=>$this->uuid)); ?>
</div>
<div>
<div class="input-append">
@ -35,7 +33,7 @@ table thead tr th {background:#EBF2F6;}
<?php if(!empty($this->error)) { ?>
<?= $this->error ?>
<?php } ?>
<h3><?= $this->info['title'] ?> 的相关数据</h3>
<h3><?= $this->info['title'] ?> [<?= $this->info['fund_id'] ?>]</h3>
<hr />
<div id="datalist">
<?php if (count($this->paginator)): ?>
@ -43,21 +41,18 @@ table thead tr th {background:#EBF2F6;}
<thead>
<tr>
<th>名称</th>
<th width="70">操作</th>
<th width="100">操作</th>
</tr>
</thead>
<tbody>
<?php $autoindex=0;
foreach ($this->paginator as $item):
$autoindex++;?>
<?php if(empty($this->md)) { ?>
<tr id="DataLine_<?= $item['id']?>">
<?php }else{?>
<tr id="DataLine_<?= $item['mfid']?>">
<?php }?>
<td><?= $item['title'] ?></td>
<td>[<?= $autoindex ?>]&nbsp;<a href="/data/<?= $item['uuid'] ?>"><?= $item['title'] ?></a></td>
<td>
<a href="javascript:void(0);" onclick="onedel(<?= $item['id']?>)" id="delbtn_<?= $item['id']?>">删除</a>
<a href="/admin/data/fund/uuid/<?= $item['uuid'] ?>">其他项目</a>
<a href="/admin/data/fund/ac/remove/id/<?= $item['mfid']?>">移除</a>
</td>
</tr>
<?php endforeach; ?>
@ -69,10 +64,3 @@ table thead tr th {background:#EBF2F6;}
</div>
</div>
<!-- //页面内容 -->
<script>
var info = {
btn_prefix : "delbtn_",
item_prefix : "DataLine_",
url : "/admin/data/fund/ac/mdfunddel/"
}
</script>

View File

@ -0,0 +1,44 @@
<!-- Modal -->
<div class="modal fade" id="mdfund-form" >
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="myModalLabel">数据和项目的关联</h4>
</div>
<div class="modal-body">
<form id="mdfund" method="post" class="form-horizontal">
<div class="form-group">
<label class="col-sm-3 control-label" for="inputRefid">项目ID</label>
<div class="col-sm-8">
<input type="text" name="fid" id="inputfid" placeholder="项目ID" class="form-control" value="<?= empty($this->fid) ? "":$this->fid ?>" >
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label" for="inputUuid">元数据UUID</label>
<div class="col-sm-8">
<input type="text" name="uuid" id="inputUuid" placeholder="UUID" class="form-control">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label" for="inputPlace">排序数值(数字)</label>
<div class="col-sm-8">
<input type="text" name="place" id="inputPlace" placeholder="排序" class="form-control">
</div>
</div>
<input type="hidden" name="id" value="" />
</form>
</div>
<div class="modal-footer">
<div class="progress progress-striped active" id="submit-loading" style="display:none;">
<div class="bar" style="width:100%;"></div>
</div>
<button onclick="$('#mdfund')[0].reset();" class="btn">重置</button>
<button onclick="$('#mdfund-form').modal('hide');" class="btn">关闭</button>
<button onclick="mdfund.create()" class="btn btn-primary" id="submit_btn">保存</button>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,12 @@
<ul class="nav nav-tabs">
<?php if (!empty($this->uuid)) : ?>
<li class="active"><a href="/admin/data/fund/uuid/<?= $this->uuid ?>">数据的项目</a></li>
<?php endif; ?>
<li <?= empty($this->ac) && empty($this->uuid) ? 'class="active"':"" ?>><a href="/admin/data/fund">所有项目</a></li>
<li <?= $this->ac=="datalist" ? 'class="active"':"" ?>><a href="/admin/data/fund/ac/datalist">数据相关的项目</a></li>
<li <?= $this->ac=="nodata" ? 'class="active"':"" ?>><a href="/admin/data/fund/ac/nodata">数据不相关的项目</a></li>
<li <?= $this->ac=="add" ? 'class="active"':"" ?>><a href="/admin/data/fund/ac/add">添加新项目</a></li>
<?php if ($this->ac=='data') : ?>
<li class="active"><a href="#">项目相关的数据</a></li>
<?php endif; ?>
</ul>

View File

@ -1,139 +1,100 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->author);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
$this->breadcrumb('支持项目');
$this->breadcrumb('项目管理');
$this->breadcrumb()->setSeparator(' > ');
$this->theme->AppendPlus($this,'colorbox');
$this->theme->AppendPlus($this,'admin_plugin');
$this->theme->AppendModel($this,'admin-data-fund');
?>
<style>
table thead tr th {background:#EBF2F6;}
</style>
<div class="row-fluid">
<div class="span2">
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div class="span10">
<div>
<ul class="nav nav-tabs">
<li><a href="/admin/data/fund/ac/datalist">数据相关</a></li>
<li <?php if(empty($this->md)) { ?>class="active"<?php } ?>><a href="/admin/data/fund/">所有项目</a></li>
<li><a href="/admin/data/fund/ac/add">添加新项目</a></li>
<?php if(!empty($this->md)) { ?>
<li class="active"><a href="/admin/data/fund/">按数据查看</a></li>
<?php } ?>
</ul>
<div class="col-md-10 col-sm-12 span10">
<div class="form-group">
<?= $this->partial('data/fund-nav.phtml',array('ac'=>$this->ac,'uuid'=>$this->uuid)); ?>
</div>
<?php if(!empty($this->md)) { ?>
<div>
<?php if(empty($this->ct)) { ?>
<a class="btn btn-primary pull-right" href="/admin/data/fund/ac/formd/uuid/<?= $this->md['uuid'] ?>"><i class="icon-plus"></i>为此数据添加项目</a>
<?php }else{ ?>
<a class="pull-right btn" href="/admin/data/fund/uuid/<?= $this->md['uuid'] ?>">返回</a>
<div class="pull-right label label-info">点击“添加此项目”即可将项目添加到元数据</div>
<?php } ?>
<h3><?= $this->md['title'] ?>》 的支持项目</h3>
<hr />
</div>
<?php } ?>
<div>
<div class="input-append">
<form id="datasearch" class="search_form" action="">
<input type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" />
<button type="submit" class="btn" id="search_btn">搜索</button>
<div class="input-group form-group">
<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>
</form>
</div>
</div>
<?php if(!empty($this->error)) { ?>
<?php if(empty($this->AlertType)) $AlertType = "alert-error";else $AlertType = $this->AlertType;?>
<div class="alert alert-block fade in <?= $AlertType ?>" id="Alert-error-box">
<a class="close" data-dismiss="alert" href="#">×</a>
<?php if(!is_array($this->error)) { ?><h4 class="alert-heading"><?= $this->error ?></h4><?php } else { ?>
<ul>
<?php foreach($this->error as $v) { ?>
<li><?= $v ?></li>
<?php } ?>
</ul>
<?php } ?>
</div>
<?= $this->error ?>
<?php } ?>
<?php if(!empty($this->msg)) { ?>
<div class="alert <?= $this->AlertType;?>">
<a data-dismiss="alert" class="close">×</a>
<?php echo $this->msg ?>
</div>
<?php if(!empty($this->jump_url)) { ?>
<script language="javascript">setTimeout("self.location='<?php echo $this->jump_url ?>'",3000);</script>
<?php } ?>
<?= $this->msg ?>
<?php } else{ ?>
<div id="datalist">
<?php if (count($this->paginator)): ?>
<table class="table table-bordered table-striped">
<table class="stylized table table-bordered table-striped table-hover">
<thead>
<tr>
<th>名称</th>
<th>编号</th>
<th>类型</th>
<?php if($this->md) { ?>
<th width="80">排序</th>
<?php }else{ ?>
<th>英文标题</th>
<th>英文类型</th>
<?php } ?>
<?php if($this->ct) { ?>
<th>添加</th>
<?php } ?>
<th width="100">操作</th>
<th>项目名称
<a href="?order=title&sort=ASC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-up"></i></a>
<a href="?order=title&sort=DESC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-down"></i></a>
</th>
<th>编号
<a href="?order=fund_id&sort=ASC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-up"></i></a>
<a href="?order=fund_id&sort=DESC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-down"></i></a>
</th>
<th>类型
<a href="?order=fund_type&sort=ASC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-up"></i></a>
<a href="?order=fund_type&sort=DESC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-down"></i></a>
</th>
<th>英文标题
<a href="?order=title_en&sort=ASC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-up"></i></a>
<a href="?order=title_en&sort=DESC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-down"></i></a>
</th>
<th>英文类型
<a href="?order=fund_type_en&sort=ASC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-up"></i></a>
<a href="?order=fund_type_en&sort=DESC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-down"></i></a>
</th>
<th width="110">操作</th>
</tr>
</thead>
<tbody>
<?php $autoindex=0;
<?php
if($this->page > 1)
{
$autoindex = ($this->page - 1) * $this->pagelimit;
}else{
$autoindex=0;
}
foreach ($this->paginator as $item):
$autoindex++;?>
<?php if(empty($this->md)) { ?>
<tr id="DataLine_<?= $item['id']?>">
<?php }else{?>
<tr id="DataLine_<?= $item['mfid']?>">
<?php }?>
<td><?= $item['title'] ?></td>
<td>
[<?= $autoindex ?>]&nbsp;
<?= $item['title'] ?>
</td>
<td><?= $item['fund_id'] ?></td>
<td><?= $item['fund_type'] ?></td>
<?php if($this->md) { ?>
<?php if($this->ct) { ?>
<td><input type="text" name="order" id="order_<?= $item['id']?>" class="span12" /></td>
<?php }else{ ?>
<td><input type="text" name="order" id="order_<?= $item['mfid']?>" class="span12" value="<?= $item['place'] ?>" /></td>
<?php }?>
<?php }else{ ?>
<td><?= $item['title_en'] ?></td>
<td><?= $item['fund_type_en'] ?></td>
<?php } ?>
<?php if($this->ct) { ?>
<td><a href="javascript:void(0);" class="addtomd" rel="<?= $item['id']?>">添加此项目</a></td>
<?php } ?>
<td>
<?php if(empty($this->md)) { ?>
<a href="/admin/data/fund/ac/data/id/<?= $item['id']?>">数据</a>
<a href="/admin/data/fund/ac/edit/id/<?= $item['id']?>">编辑</a>
<a href="javascript:void(0);" onclick="onedel(<?= $item['id']?>)" id="delbtn_<?= $item['id']?>">删除</a>
<?php }else{ ?>
<?php if(empty($this->ct)) { ?><a href="javascript:void(0);" class="changeorder" rel="<?= $item['mfid']?>">排序</a> <?php } ?>
<a href="javascript:void(0);" onclick="onedel(<?= $item['mfid']?>)" id="delbtn_<?= $item['mfid']?>">移除</a>
<?php } ?>
<a href="/admin/data/fund/ac/add/id/<?= $item['id']?>">编辑</a>
<a href="/admin/data/fund/ac/data/id/<?= $item['id'] ?>">数据</a>(<a href="javascript:void(0);" onclick="$('#mdfund')[0].reset();mdfund.edit('',<?= $item['id']?>,'',0,0)">+</a>)
<a href="/admin/data/fund/ac/delete/id/<?= $item['id']?>">删除</a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php else: ?>
<?php if(!empty($this->md)) { ?>
暂无数据,点击标题右侧添加按钮为此数据添加项目
<?php }else{ ?>
暂无数据
<?php } ?>
<?php endif; ?>
<div class="pagenavi"><?= $this->paginator; ?></div>
</div>
@ -141,35 +102,4 @@ table thead tr th {background:#EBF2F6;}
</div>
</div>
<!-- //页面内容 -->
<script>
<?php if(!empty($this->ct)) { ?>
$('.addtomd').each(function(index, element) {
$(this).click(function(){
id = $(this).attr('rel');
order = $('#order_'+id).val();
self.location='/admin/data/fund/ac/formd/uuid/<?= $this->md['uuid'] ?>/id/'+id+'/order/'+ order
});
});
<?php }else{ ?>
$('.changeorder').each(function(index, element) {
$(this).click(function(){
id = $(this).attr('rel');
order = $('#order_'+id).val();
self.location='/admin/data/fund/ac/formd/uuid/<?= $this->md['uuid'] ?>/mfid/'+id+'/order/'+ order
});
});
<?php } ?>
<?php if(empty($this->md)) { ?>
var info = {
btn_prefix : "delbtn_",
item_prefix : "DataLine_",
url : "/admin/data/fund/ac/del"
}
<?php }else{ ?>
var info = {
btn_prefix : "delbtn_",
item_prefix : "DataLine_",
url : "/admin/data/fund/ac/mdfunddel/uuid/<?= $this->md['uuid'] ?>"
}
<?php } ?>
</script>
<?= $this->partial('data/fund-mdfund-form.phtml'); ?>

View File

@ -9,10 +9,10 @@
$this->breadcrumb('上传元数据</a>');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="leftPanel">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div id="rightPanel">
<div class="col-md-10 col-sm-12">
<form enctype="multipart/form-data" method="POST">
<!-- MAX_FILE_SIZE must precede the file input field -->
<input type="hidden" name="MAX_FILE_SIZE" value="3000000" />

View File

@ -8,11 +8,12 @@
$this->breadcrumb('数据管理');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="divContent">
<div id="leftPanel">
<div class="row" >
<div class="hidden-sm col-md-2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div id="rightPanel">
<div class="col-md-10 col-sm-12">
<h3>数据管理</h3>
<hr />
</div>
</div>

View File

@ -1,12 +1,17 @@
<ul>
<li class="title">数据管理</li>
<li><a href="/admin/data/md">元数据管理</a></li>
<li><a href="/admin/data/newdata">新建元数据</a></li>
<li><a href="/admin/data/author">数据作者管理</a></li>
<li><a href="/admin/data/version">数据版本管理</a></li>
<li><a href="/admin/data/comment">数据反馈管理</a></li>
<div class="well">
<ul class="nav nav-stacked">
<li class="nav-header text-muted"><h4>数据管理</h4></li>
<li class="nav-divider"></li>
<li id="Nav-data-md"><a href="/admin/data/md">元数据管理</a></li>
<li id="Nav-data-newdata"><a href="/admin/data/newdata">新建元数据</a></li>
<li id="Nav-data-author"><a href="/admin/data/author">数据作者管理</a></li>
<li id="Nav-data-version"><a href="/admin/data/version">数据版本管理</a></li>
<li id="Nav-data-comment"><a href="/admin/data/comment">数据反馈管理</a></li>
<!--
<li><a href="/admin/data/reference">数据文献管理</a></li>
<li><a href="/admin/data/attachments">数据附件管理</a></li>
-->
<li id="Nav-data-ref"><a href="/admin/data/ref">文献管理</a></li>
<li id="Nav-data-attachments"><a href="/admin/data/attachments">数据附件管理</a></li>
<!--
<li><a href="/admin/data/import">上传元数据文件</a></li>
<li><a href="/admin/data/batchimport">导入服务器元数据目录</a></li>
@ -14,9 +19,11 @@
<li><a href="/admin/data/sync">同步GeoNetwork元数据</a></li>
<li><a href="/admin/data/datasetcd">特色数据集管理</a></li>
<li><a href="/admin/data/newsletter">数据中心通讯管理</a></li>
<li><a href="/admin/data/feature">特色推荐</a></li> -->
<li><a href="/admin/data/source">专题管理</a></li>
<li><a href="/admin/data/project">汇交计划</a></li>
<li><a href="/admin/data/fund">支持项目</a></li>
<li><a href="/admin/data/doi">DOI</a></li>
<li><a href="/admin/data/feature">特色推荐</a></li>
-->
<li id="Nav-data-source"><a href="/admin/data/source">专题管理</a></li>
<li id="Nav-data-project"><a href="/admin/data/project">汇交计划</a></li>
<li id="Nav-data-fund"><a href="/admin/data/fund">支持项目</a></li>
<li id="Nav-data-doi"><a href="/admin/data/doi">DOI</a></li>
</ul>
</div>

View File

@ -24,10 +24,16 @@
{?>
<p>主机:<br /><input type="text" id="host" name="host" value="<?= $this->dataset['host']?>" class="full" /></p>
<p>路径:<br /><input type="text" id="path" name="path" value="<?= $this->dataset['path']?>" class="full" /></p>
<p>语言:<br /><input type="radio" name="lang" value="" <?php if ($this->dataset['lang']=='') echo 'checked="checked"'; ?> /> 不限制语言
<input type="radio" name="lang" value="cn" <?php if ($this->dataset['lang']=='cn') echo 'checked="checked"'; ?> /> 中文
<input type="radio" name="lang" value="en" <?php if ($this->dataset['lang']=='en') echo 'checked="checked"'; ?> /> 英文 </p>
<p><button type="button" class="btn btn-green" onclick="updateDataSet()">修改</button></p>
<?php }else{ ?>
<p>主机:<br /><input type="text" id="host" name="host" value="" class="full" /></p>
<p>路径:<br /><input type="text" id="path" name="path" value="" class="full" /></p>
<p>语言:<br /><input type="radio" name="lang" value="" /> 不限制语言
<input type="radio" name="lang" value="cn" /> 中文
<input type="radio" name="lang" value="en" /> 英文 </p>
<p><button type="button" class="btn btn-green" onclick="addDataSet()">添加</button></p>
<?php } ?>
</div>
@ -40,7 +46,7 @@ function updateDataSet(){
$.ajax({
'type':"POST",
'url':'/admin/data/dataset',
'data':'ac=update&uuid=<?= $this->uuid ?>&host='+$('#host').val()+'&path='+$('#path').val(),
'data':'ac=update&uuid=<?= $this->uuid ?>&host='+$('#host').val()+'&path='+$('#path').val()+'&lang='+$("input[type='radio'][name='lang']:checked").val(),
'success':function(data){
if (typeof(data)=='object')
{
@ -66,7 +72,7 @@ function addDataSet(){
$.ajax({
'type':"POST",
'url':'/admin/data/dataset',
'data':'ac=add&uuid=<?= $this->uuid ?>&host='+$('#host').val()+'&path='+$('#path').val(),
'data':'ac=add&uuid=<?= $this->uuid ?>&host='+$('#host').val()+'&path='+$('#path').val()+'&lang='+$("input[type='radio'][name='lang']:checked").val(),
'success':function(data){
if (typeof(data)=='object')
{

View File

@ -8,14 +8,17 @@
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
$this->breadcrumb('元数据管理</a>');
$this->breadcrumb()->setSeparator(' > ');
$this->theme->AppendPlus($this,'colorbox');
//$this->theme->AppendPlus($this,'colorbox');
$this->headScript()->appendFile('/js/lib/colorbox/jquery.colorbox-min.js');
$this->headLink()->appendStylesheet('/js/lib/colorbox/colorbox.css');
?>
<div id="leftPanel">
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div id="rightPanel">
<div class="col-md-10 col-sm-12">
<?php if ($this->msg or $this->messages) :?>
<div id="message">
<div id="message" class="alert alert-info">
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
@ -24,49 +27,50 @@
</div>
<?php endif; ?>
<div class="right_title">元数据管理</div>
<!-- <div class="right_title">元数据管理</div> -->
<div class="search">
<form action="" method="get">
<div class="input-prepend">
<input type="hidden" name="search" value='1' />
<input class="span2 search-query" type="text" name="keyword" value="<?php echo $this->keyword; ?>" placeholder="搜索关键字"/>
<input type="submit" class="btn" value="搜索" />
</div>
<div class="input-group form-group">
<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>
</form>
</div><!-- search DIV -->
<a href="/admin/data/md/down/1">下载全部xml元数据</a>
<p><a href="/admin/data/md/down/1">下载全部xml元数据</a></p>
<?php if (count($this->paginator)): ?>
<div class="datalist">
<ul>
<ul class="list-unstyled">
<?php foreach ($this->paginator as $item): ?>
<li class="well well-small">
<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>
操作:
<a href="/service/geonetwork?url=metadata.edit?id=<?= $item['gid']; ?>" target="_blank">编辑</a> |
<a href="/admin/data/md/delete/<?= $item['uuid']; ?>">删除</a> |
<a href="/admin/data/sync/uuid/<?= $item['uuid']; ?>">同步</a> |
<a href="/admin/data/reference/show/<?php echo $item['uuid'];?>">文献管理</a> |
<a href="/admin/data/md/att/1/uuid/<?php echo $item['uuid'];?>">附件管理</a> |
<a href="/admin/data/comment/uuid/<?php echo $item['uuid'];?>">反馈管理</a> |
<a href="/admin/data/author/uuid/<?php echo $item['uuid'];?>">作者管理</a> |
<a href="/admin/data/version/uuid/<?php echo $item['uuid'];?>">版本管理</a> |
<?php if ($item['gid']>0) : ?>
<a class="label label-primary" href="/service/geonetwork?url=metadata.edit?id=<?= $item['gid']; ?>" target="_blank">编辑</a>
<?php endif; ?>
<a class="label label-danger" href="/admin/data/md/delete/<?= $item['uuid']; ?>">删除</a>
<!-- <a href="/admin/data/sync/uuid/<?= $item['uuid']; ?>">同步</a> -->
<a class="label label-primary" href="/admin/data/ref/uuid/<?php echo $item['uuid'];?>">文献管理</a>
<a class="label label-primary" href="/admin/data/md/att/1/uuid/<?php echo $item['uuid'];?>">附件管理</a>
<a class="label label-primary" href="/admin/data/comment/uuid/<?php echo $item['uuid'];?>">反馈管理</a>
<a class="label label-primary" href="/admin/data/author/uuid/<?php echo $item['uuid'];?>">作者管理</a>
<a class="label label-primary" href="/admin/data/version/uuid/<?php echo $item['uuid'];?>">版本管理</a>
<?php if (@!is_numeric($item['mdstatus'])) : ?>
<a href="/admin/review/addon/uuid/<?php echo $item['uuid'];?>">放入元数据评审</a> |
<a class="label label-primary" href="/admin/review/addon/uuid/<?php echo $item['uuid'];?>">放入元数据评审</a>
<?php endif; ?>
<a href="/admin/data/source/do/datasource/uuid/<?php echo $item['uuid'];?>">编辑数据来源</a> |
<a class="label label-primary" href="/admin/data/source/do/datasource/uuid/<?php echo $item['uuid'];?>">数据来源</a>
<?php if(!empty($item['datasetid'])):?>
<a href="/admin/data/dataset/ac/getdataset/uuid/<?php echo $item['uuid'];?>" class="iframe">数据路径</a> |
<a href="/admin/data/dataset/ac/import/uuid/<?php echo $item['uuid'];?>" class="iframe">重新导入数据目录</a> |
<a class="label label-primary iframe" href="/admin/data/dataset/ac/getdataset/uuid/<?php echo $item['uuid'];?>">数据路径</a>
<a class="label label-primary iframe" href="/admin/data/dataset/ac/import/uuid/<?php echo $item['uuid'];?>" class="iframe">重新导入数据目录</a>
<?php else: ?>
<a href="/admin/data/dataset/ac/getdataset/uuid/<?php echo $item['uuid'];?>" class="iframe">设置数据路径</a> |
<a class="label label-primary iframe" href="/admin/data/dataset/ac/getdataset/uuid/<?php echo $item['uuid'];?>">设置数据路径</a>
<?php endif;?>
<a class="label label-primary" href="/admin/down/sendmail/uuid/<?php echo $item['uuid'];?>" title="向数据下载者发送通知邮件">邮件通知</a>
<a class="label label-primary" href="/admin/data/fund/uuid/<?php echo $item['uuid'];?>">支持项目</a>
<a class="label label-primary" href="/admin/data/doi/uuid/<?php echo $item['uuid'];?>">DOI</a>
<?php if ($item['datatype']==1 && ($item['mdstatus']==5 || $item['mdstatus']==6)) :?>
<a class="label label-primary iframe" href="/admin/data/author/ac/delegate/uuid/<?php echo $item['uuid'];?>">委托数据中心管理</a>
<?php endif; ?>
<a href="/admin/down/sendmail/uuid/<?php echo $item['uuid'];?>" title="向数据下载者发送通知邮件">邮件通知</a> |
<a href="/admin/data/fund/uuid/<?php echo $item['uuid'];?>">支持项目</a> |
<a href="/admin/data/doi/uuid/<?php echo $item['uuid'];?>">DOI</a>
</p>
<?php if($item['author']) :?>
<p>数据贡献者:<?= $item['author']; ?></p>
@ -79,6 +83,7 @@
<?php endif; ?>
<?php echo $this->paginator; ?>
</div>
</div>
<script>
$(".iframe").colorbox({ iframe: true, width: "50%", height: "50%" });
$(".inline").colorbox({ inline: true, width: "50%" });

View File

@ -13,32 +13,29 @@ $this->breadcrumb('<a href="/admin/data">数据管理</a>');
$this->breadcrumb('新建元数据');
$this->breadcrumb()->setSeparator(' > ');
?>
<div class="row">
<!-- 左侧导航 -->
<div id='leftPanel'>
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<!-- //左侧导航 -->
<!-- 页面内容 -->
<div id="rightPanel">
<div id="tabs-controller">
<ul>
<li class="box-shadow"><a class="text-shadow" href="/admin/data/newdata">未提交数据列表</a></li>
<li class="box-shadow"><a class="text-shadow iframe" href="/service/geonetwork?url=metadata.xmlinsert.form">导入元数据</a></li>
<li class="box-shadow"><a class="text-shadow" href="/admin/data/newdata/ac/add-by-template">根据模板新建元数据</a></li>
<li class="box-shadow active"><a class="text-shadow" href="/admin/data/newdata/ac/add-by-data">根据已有数据新建元数据</a></li>
</ul>
<div class="col-md-10 col-sm-12">
<div class="form-group">
<a class="btn btn-primary btn-sm" href="/admin/data/newdata">未提交数据列表</a>
<a class="btn btn-primary btn-sm" href="/service/geonetwork?url=metadata.xmlinsert.form">导入元数据</a>
<a class="btn btn-primary btn-sm" href="/admin/data/newdata/ac/add-by-template">根据模板新建元数据</a>
<a class="btn btn-primary btn-sm" href="/admin/data/newdata/ac/add-by-data">根据已有数据新建元数据</a>
</div>
<div id="datalist">
<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 type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" />
<button type="submit" class="btn" id="search_btn">搜索</button>
<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
if (count($this->paginator)):
echo "<ul>";
echo "<ul class=list-unstyled>";
$autoindex=0;
foreach ($this->paginator as $item):
$autoindex++;
@ -56,6 +53,7 @@ $this->breadcrumb()->setSeparator(' > ');
</div>
<div class="pagenavi"><?= $this->paginator; ?></div>
</div>
</div>
<!-- //页面内容 -->
<script>
$(".iframe").colorbox({iframe:true, width:"80%", height:"80%"});

View File

@ -14,31 +14,28 @@ $this->breadcrumb('新建元数据');
$this->breadcrumb()->setSeparator(' > ');
?>
<!-- 左侧导航 -->
<div id='leftPanel'>
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<!-- //左侧导航 -->
<!-- 页面内容 -->
<div id="rightPanel">
<div id="tabs-controller">
<ul>
<li class="box-shadow"><a class="text-shadow" href="/admin/data/newdata">未提交数据列表</a></li>
<li class="box-shadow"><a class="text-shadow iframe" href="/service/geonetwork?url=metadata.xmlinsert.form">导入元数据</a></li>
<li class="box-shadow active"><a class="text-shadow" href="/admin/data/newdata/ac/add-by-template">根据模板新建元数据</a></li>
<li class="box-shadow"><a class="text-shadow" href="/admin/data/newdata/ac/add-by-data">根据已有数据新建元数据</a></li>
</ul>
<div class="col-md-10 col-sm-12">
<div class="form-group">
<a class="btn btn-primary btn-sm" href="/admin/data/newdata">未提交数据列表</a>
<a class="btn btn-primary btn-sm" href="/service/geonetwork?url=metadata.xmlinsert.form">导入元数据</a>
<a class="btn btn-primary btn-sm" href="/admin/data/newdata/ac/add-by-template">根据模板新建元数据</a>
<a class="btn btn-primary btn-sm" href="/admin/data/newdata/ac/add-by-data">根据已有数据新建元数据</a>
</div>
<div id="datalist">
<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 type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" />
<button type="submit" class="btn" id="search_btn">搜索</button>
<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
if (count($this->paginator)):
echo "<ul>";
echo "<ul class=list-unstyled>";
$autoindex=0;
foreach ($this->paginator as $item):
$autoindex++;
@ -57,6 +54,7 @@ $this->breadcrumb()->setSeparator(' > ');
</div>
<div class="pagenavi"><?= $this->paginator; ?></div>
</div>
</div>
<!-- //页面内容 -->
<script>
$(".iframe").colorbox({iframe:true, width:"80%", height:"80%"});

View File

@ -3,49 +3,47 @@ $this->headTitle($this->config->title->site);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
$this->headScript()->appendFile('/js/jquery.colorbox-min.js');
$this->headLink()->appendStylesheet('/css/author.css');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->headLink()->appendStylesheet('/css/colorbox.css');
$this->headLink()->appendStylesheet('/js/lib/colorbox/colorbox.css');
$this->headScript()->appendFile('/js/lib/colorbox/jquery.colorbox-min.js');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin">后台首页</a>');
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
$this->breadcrumb('新建元数据');
$this->breadcrumb()->setSeparator(' > ');
?>
<div class="row">
<!-- 左侧导航 -->
<div id='leftPanel'>
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<!-- //左侧导航 -->
<!-- 页面内容 -->
<div id="rightPanel">
<div id="tabs-controller">
<ul>
<li class="box-shadow active"><a class="text-shadow" href="/admin/data/newdata">未提交数据列表</a></li>
<li class="box-shadow"><a class="text-shadow iframe" href="/service/geonetwork?url=metadata.xmlinsert.form">导入元数据</a></li>
<li class="box-shadow"><a class="text-shadow" href="/admin/data/newdata/ac/add-by-template">根据模板新建元数据</a></li>
<li class="box-shadow"><a class="text-shadow" href="/admin/data/newdata/ac/add-by-data">根据已有数据新建元数据</a></li>
</ul>
<div class="col-md-10 col-sm-12">
<div class="form-group">
<a class="btn btn-primary btn-sm" href="/admin/data/newdata">未提交数据列表</a>
<a class="btn btn-primary btn-sm" href="/service/geonetwork?url=metadata.xmlinsert.form">导入元数据</a>
<a class="btn btn-primary btn-sm" href="/admin/data/newdata/ac/add-by-template">根据模板新建元数据</a>
<a class="btn btn-primary btn-sm" href="/admin/data/newdata/ac/add-by-data">根据已有数据新建元数据</a>
</div>
<div id="datalist">
<div id="datalistZ">
<?php
if (count($this->paginator)):
echo "<ul>";
echo "<ul class=list-unstyled>";
$autoindex=0;
foreach ($this->paginator as $item):
$autoindex++;
?>
<li>
<p><?php echo $item['username'];?>(<?php echo $item['realname'];?>) <span class="title"><?php echo $item['title'];?></span>
<a href="/service/geonetwork?url=metadata.show?id=<?php echo $item['id']; ?>" target="_blank">在geonetwork里查看</a>
| <a href="/service/geonetwork?url=metadata.edit?id=<?php echo $item['id']; ?>" target="_blank">在geonetwork里修改</a>
| <a href="/service/geonetwork?url=metadata.delete?id=<?php echo $item['id']; ?>" target="_blank">删除此条数据</a>
| <a onclick="validate(<?php echo $item['id'];?>);" class="more inline">检查元数据错误</a>
| <a onclick="$('#commit_submit').attr('onclick','commit(\'<?php echo $item['id'];?>\');');" href="#commitform" class="more inline">提交评审发布</a>
</p>
<li class="well well-sm">
<h4><?php echo $item['title'];?><small>&nbsp;<?php echo $item['username'];?>( <?php echo $item['realname'];?> ) </small></h4>
<a class="label label-info" href="/service/geonetwork?url=metadata.show?id=<?php echo $item['id']; ?>" target="_blank"><span class="glyphicon glyphicon-zoom-in"></span>&nbsp;在geonetwork里查看</a>
<a class="label label-primary" href="/service/geonetwork?url=metadata.edit?id=<?php echo $item['id']; ?>" target="_blank"><span class="glyphicon glyphicon-pencil"></span>&nbsp;在geonetwork里修改</a>
<a class="label label-danger" href="/service/geonetwork?url=metadata.delete?id=<?php echo $item['id']; ?>" target="_blank"><span class="glyphicon glyphicon-remove"></span>&nbsp;删除此条数据</a>
<a class="label label-primary" onclick="validate(<?php echo $item['id'];?>);" class="more inline"><span class="glyphicon glyphicon-search"></span>&nbsp;检查元数据错误</a>
<a class="label label-success more inline" onclick="$('#commit_submit').attr('onclick','commit(\'<?php echo $item['id'];?>\');');" href="#commitform" ><span class="glyphicon glyphicon-ok"></span>&nbsp;提交评审发布</a>
<span class="text-primary"> &nbsp;版本数:<?= $item['version_count'] ?></span>
</li>
<?php
endforeach;
@ -56,6 +54,7 @@ $this->breadcrumb()->setSeparator(' > ');
</div>
<div class="pagenavi"><?= $this->paginator; ?></div>
</div>
</div>
<!-- //页面内容 -->
<script>
$('#wapper').width($('body').width()-300);
@ -85,7 +84,7 @@ function action(ac,id){
}
});
}
$(".inline").colorbox({inline:true, width:"50%"});
$(".inline").colorbox({inline:true, width:"50%", height:"50%"});
$(".iframe").colorbox({iframe:true, width:"80%", height:"80%"});
function commit(id){
action('commit&changelog='+$('#changelog').val(),id);
@ -99,10 +98,10 @@ function validate(id){
<form>
<p>
<label>简要功能:</label><br />
<textarea class="full" style="resize:none;height:200px;" id="changelog"></textarea>
<textarea rows="12" class="full" style="width:100%;" id="changelog"></textarea>
<br /><small>请输入此数据的简要功能和特色</small>
</p>
<input type="button" onclick="" id="commit_submit" class="btn btn-green big" value="提交"/>
<input type="button" onclick="" id="commit_submit" class="btn btn-success pull-right" value="提交"/>
</form>
</div>
<div class="error"><img src="/images/alert_big_error.png" /><span></span></div>

View File

@ -9,12 +9,13 @@
$this->breadcrumb('数据通讯管理</a>');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="leftPanel">
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div id="rightPanel">
<div class="col-md-10 col-sm-12">
<?php if ($this->msg or $this->messages) :?>
<div id="message">
<div id="message" class="alert alert-info">
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
@ -30,11 +31,10 @@ foreach ($this->newsletters as $nl){
list(,$num)=explode("_",$name);
?>
<div class="newsletter">
<a href="/images/newsletter/<?php echo $nl; ?>" target="_blank">
<img src="/images/newsletter/<?php echo $name; ?>.jpg" /></a><br />
<a href="/images/newsletter/<?php echo $nl; ?>" target="_blank"><?php echo $num;?>期数据通讯</a>
</div>
<?php } ?>
</div>
</div>

View File

@ -2,59 +2,69 @@
$this->headTitle($this->config->title->site);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin">后台首页</a>');
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
$this->breadcrumb('黑河数据集');
$this->breadcrumb()->setSeparator(' > ');
$this->theme->AppendPlus($this,'jquery');
$this->theme->AppendPlus($this,'colorbox');
// $this->theme->AppendPlus($this,'colorbox');
$this->headLink()->appendStylesheet('/css/author.css');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->headScript()->appendFile('/js/lib/colorbox/jquery.colorbox-min.js');
$this->headLink()->appendStylesheet('/js/lib/colorbox/colorbox.css');
?>
<div id="leftPanel">
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div id="rightPanel">
<div class="col-md-10 col-sm-12">
<?php if(!empty($this->searchLink)){ ?>
<div>
<form id="datasearch" class="search_form" action="<?= $this->searchLink ?>">
<input type="text" id="keyword" name="q" value="<?= $this->searchKeyword; ?>" />
<button type="submit" class="btn" id="search_btn">搜索</button>
<div class="input-group form-group">
<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>
<?php }?>
<div>
<h5>
<?= $this->Count; ?> 条记录
</div>
<div id="datalist">
</h5>
<div id="datalistZ">
<?php
if (count($this->paginator)):
echo "<ul>";
echo "<ul class=list-unstyled>";
$autoindex=0;
foreach ($this->paginator as $item):
$autoindex++;
?>
<li>
<p><span class="title"><?php echo $item['title'];?></span></p>
<p>编号:<?= $item['code'];?> | 负责人:<?= $item['name'];?> | 开始时间:<?= $item['pstart'];?> |
 状态:<span id="status_alias_<?= $item['id']?>"><?= $item['status_alias'];?></span></p>
<li class="well well-sm">
<h3><span class="title"><?php echo $item['title'];?></span></h3>
<p class="text-muted">
编号:<?= $item['code'];?>&nbsp;&nbsp;|&nbsp;&nbsp;
负责人:<?= $item['name'];?>&nbsp;&nbsp;|&nbsp;&nbsp;
开始时间:<?= $item['pstart'];?>&nbsp;&nbsp;|&nbsp;&nbsp;
<span id="status_alias_<?= $item['id']?>" <?php if ($item['status'] == 3) echo 'class="glyphicon glyphicon-ok text-success"'; else echo 'class="glyphicon glyphicon-pencil text-warning"'; ?> >状态:<?= $item['status_alias'];?></span>
</p>
<p>
<a href="javascript:void(0);" onclick="$('#inviteFrom_<?= $item['id'];?>').toggle();">邀请跟踪专家</a> | 
<a class="iframe" href="/admin/data/project/ac/showexpert/id/<?= $item['id'];?>">查看跟踪专家</a> | 
<a href="/admin/data/project/ac/upload/pid/<?= $item['id']?>" class="iframe">上传计划</a> | 
<a href="javascript:void(0);" onclick="changeStatus(<?= $item['id'];?>,<?= $item['status']?>)">状态修改</a>
<a href="javascript:void(0);" onclick="$('#inviteFrom_<?= $item['id'];?>').toggle();">邀请跟踪专家</a>&nbsp;&nbsp;|&nbsp;&nbsp;
<a class="iframe" href="/admin/data/project/ac/showexpert/id/<?= $item['id'];?>">查看跟踪专家</a>&nbsp;&nbsp;|&nbsp;&nbsp;
<a href="/admin/data/project/ac/upload/pid/<?= $item['id']?>" class="iframe">上传计划</a>&nbsp;&nbsp;|&nbsp;&nbsp;
<a href="javascript:void(0);" onclick="changeStatus(<?= $item['id'];?>,<?= $item['status']?>)">状态修改</a>&nbsp;&nbsp;|&nbsp;&nbsp;
<?php if(!empty($item['attachid'])) { ?>
 | <a href="/service/attach/id/<?= $item['attachid'];?>">下载</a>
<a href="/service/attach/id/<?= $item['attachid'];?>">下载</a>
<?php } ?>
</p>
<p id="inviteFrom_<?= $item['id'];?>" style="display:none;">
<input type="text" id="expert_name_<?= $item['id'];?>" value="<?= $this->input_NameDefaultVal ?>"
<div id="inviteFrom_<?= $item['id'];?>" style="display:none;" class="form-inline">
<input class="form-control" type="text" id="expert_name_<?= $item['id'];?>" value="<?= $this->input_NameDefaultVal ?>"
onfocus="if(this.value=='<?= $this->input_NameDefaultVal ?>'){this.value=''}" onblur="if(this.value==''){this.value='<?= $this->input_NameDefaultVal ?>'}" />
<input type="text" id="expert_email_<?= $item['id'];?>" value="<?= $this->input_EmailDefaultVal ?>"
<input class="form-control" type="text" id="expert_email_<?= $item['id'];?>" value="<?= $this->input_EmailDefaultVal ?>"
onfocus="if(this.value=='<?= $this->input_EmailDefaultVal ?>'){this.value=''}" onblur="if(this.value==''){this.value='<?= $this->input_EmailDefaultVal ?>'}" />
<button type="button" class="btn btn-green" onclick="invite(<?= $item['id'];?>)" id="inviteBtn_<?= $item['id'];?>">邀请</button>
</p>
<button type="button " class="btn btn-primary" onclick="invite(<?= $item['id'];?>)" id="inviteBtn_<?= $item['id'];?>">邀请</button>
</div>
</li>
<?php
endforeach;
@ -67,7 +77,7 @@
<div id="confirm_dialog" class="cbox_content">
<div class="sepH_c tac"><strong>状态修改</strong></div>
<div id="cbox_dialog_content" class="sepH_c ">
<select id="status_selector" style="width:300px;" name="">
<select id="status_selector" style="width:300px;" name="" class="form-control">
<?php
foreach($this->project_status as $k=>$v)
{
@ -76,10 +86,11 @@
?>
</select>
</div>
<div class="tac" id="cbox_ctl_btns">
<a href="javascript:void(0);" class="btn btn-green" id="confirm_yes"
onclick="changeStatusAction($('#status_selector').attr('name'),$('#status_selector').val());">OK</a>
<a href="javascript:void(0);" class="btn" id="confirm_no" onclick="$.colorbox.close();">Cancel</a>
<div class="tac pull-right" id="cbox_ctl_btns">
<a href="javascript:void(0);" class="btn btn-success btn-sm" id="confirm_yes"
onclick="changeStatusAction($('#status_selector').attr('name'),$('#status_selector').val());">确定</a>
<a href="javascript:void(0);" class="btn btn-danger btn-sm" id="confirm_no" onclick="$.colorbox.close();">取消</a>
</div>
</div>
</div>
</div>
@ -151,5 +162,5 @@ function invite(id){
function Alert(html){
$.colorbox({'innerWidth':'50%','html':'<h4 style="font-size:16px;font-weight:bold;">'+html+'</h4>'});
}
$(".iframe").colorbox({iframe:true, width:"80%", height:"80%"});
$(".iframe").colorbox({iframe:true, width:"50%", height:"50%"});
</script>

View File

@ -0,0 +1,203 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
$this->breadcrumb('<a href="/">首页</a>');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
$this->breadcrumb('文献管理');
$this->breadcrumb()->setSeparator(' > ');
$this->theme->AppendPlus($this,'colorbox');
$this->theme->AppendPlus($this,"uploadify");
$this->theme->AppendPlus($this,'admin_plugin');
?>
<style>
table thead tr th { background: #EBF2F6; }
</style>
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div class="col-md-10 col-sm-12">
<div>
<?= $this->partial('data/ref-nav.phtml',array('ac'=>$this->ac)); ?>
</div>
<?php if(!empty($this->error)) { ?>
<?= $this->error ?>
<?php } ?>
<?php if(!empty($this->msg)) { ?>
<?= $this->msg ?>
<?php } else{ ?>
<form class="form-horizontal" method="post" class="form-horizontal">
<div class="col-md-8">
<p></p>
<div class="form-group">
<label class="col-md-2 col-sm-2 control-label" for="inputTitle">文章标题</label>
<div class="col-md-10 col-sm-10">
<input type="text" name="title" id="inputTitle" class="form-control" value="<?= isset($this->data['title']) ? $this->data['title']:" " ?>">
</div>
</div>
<div class="form-group">
<label class="col-md-2 col-sm-2 control-label" for="inputYear">出版年份</label>
<div class="col-md-10 col-sm-10">
<input class="form-control" type="text" name="year" id="inputYear" value="<?= isset($this->data['year']) ? $this->data['year']:" " ?>">
<select class="span2">
<?php for($i=2000;$i<=(int)date("Y");$i++) {?>
<option value="<?= $i ?>" onclick="$('#inputYear').val(this.value)"><?= $i ?></option>
<?php } ?>
</select>
</div>
</div>
<div class="form-group">
<label class="col-md-2 col-sm-2 control-label" for="inputYear">出版社/期刊</label>
<div class="col-md-10 col-sm-10">
<input type="text" name="publisher" id="inputYear" class="form-control" value="<?= isset($this->data['publisher']) ? $this->data['publisher']:" " ?>">
</div>
</div>
<div class="form-group">
<label class="col-md-2 col-sm-2 control-label" for="inputReference">引用方式(前台显示)</label>
<div class="col-md-10 col-sm-10">
<textarea name="reference" id="inputReference" class="form-control"><?= isset($this->data['reference']) ? $this->data['reference']:"" ?></textarea>
</div>
</div>
<div class="form-group">
<label class="col-md-2 col-sm-2 control-label" for="inputLink">链接(自动填写请留空)</label>
<div class="col-md-10 col-sm-10">
<input type="text" name="link" id="inputLink" class="form-control" value="<?= isset($this->data['link']) ? $this->data['link']:" " ?>" />
</div>
</div>
<div class="form-group">
<label class="col-md-2 col-sm-2 control-label" for="inputType">类型</label>
<div class="col-md-10 col-sm-10">
<input type="text" name="type" id="inputType" class="form-control" value="<?= isset($this->data['type']) ? $this->data['type']:" " ?>">
</div>
</div>
<div class="form-group">
<label class="col-md-2 col-sm-2 control-label" for="inputLanguage">语言</label>
<div class="col-md-10 col-sm-10">
<input type="text" name="language" id="inputLanguage" class="form-control" value="<?= isset($this->data['language']) ? $this->data['language']:" " ?>">
</div>
</div>
<div class="form-group">
<label class="col-md-2 col-sm-2 control-label" for="inputDoi">DOI</label>
<div class="col-md-10 col-sm-10">
<input type="text" name="doi" id="inputDoi" class="form-control" value="<?= isset($this->data['doi']) ? $this->data['doi']:" " ?>">
</div>
</div>
<div class="form-group">
<label class="col-md-2 col-sm-2 control-label" for="inputBibtex">ris</label>
<div class="col-md-10 col-sm-10">
<textarea name="ris" id="inputBibtex" class="form-control"><?= isset($this->data['ris']) ? $this->data['ris']:"" ?></textarea>
</div>
</div>
<div class="form-group">
<label class="col-md-2 col-sm-2 control-label" for="inputAbstract">摘要</label>
<div class="col-md-10 col-sm-10">
<textarea name="abstract" id="inputAbstract" class="form-control"><?= isset($this->data['abstract']) ? $this->data['abstract']:"" ?></textarea>
</div>
</div>
<div class="form-group">
<label class="col-md-2 col-sm-2 control-label" for="inputNote">备注</label>
<div class="col-md-10 col-sm-10">
<textarea name="note" id="inputNote" class="form-control"><?= isset($this->data['note']) ? $this->data['note']:"" ?></textarea>
</div>
</div>
<div class="form-group">
<label class="col-md-2 col-sm-2 control-label" for="inputPDF">PDF</label>
<div class="col-md-10 col-sm-10">
<input type="file" name="Filedata" id="file_upload" />
<div id="uploadedFile"></div>
</div>
</div>
<div class="form-group">
<div class="col-md-2 col-sm-2"></div>
<div class="col-md-5 col-sm-5">
<input type="hidden" name="submit" value="1" />
<button type="submit" class="btn btn-primary">保存</button>
<button type="reset" class="btn btn-default">取消</button>
</div>
</div>
</div>
</form>
<?php } ?>
</div>
</div>
<!-- //页面内容 -->
<script>
$(document).ready(function (e) {
$('#btn-add-author').click(function (e) {
html = '';
$('#author_inputs').append('');
});
});
var _this = {
SessionID: '<?php echo session_id(); ?>'
};
var uploader;
var param;
param = {
"PHPSESSID": _this.SessionID,
};
$(function () {
$('#file_upload').uploadify({
'swf': '/js/lib/uploadify/uploadify.swf',
'uploader': '/admin/data/ref/ac/pdfupload',
'multi': false,
'auto': true,
'fileTypeExts': '*.pdf;*.caj',
'onUploadSuccess': function (file, data, response) {
upload.onsuccess(file, data, response);
},
'onUploadStart': function (file) {
$('#file_upload').uploadify('settings', 'formData', param);
}
});
});
var upload = {
onsuccess: function (file, data, response) {
_data = $.parseJSON(data);
if (!$.isEmptyObject(_data.error)) {
alert(_data.error);
} else {
$('#uploadedFile').html(upload.makeFileHtml(_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>'
+ data.realname
+ '<input type="hidden" name="attid" value="' + data.id + '"></input>'
+ '</div>';
},
deleteFile: function (id) {
$.ajax({
'type': "POST",
'url': '/admin/data/ref/ac/delete',
'data': 'attid=' + id,
'success': function (data) {
if (typeof (data) == 'undefined') {
alert("数据源错误,请联系管理员");
return false;
}
if (!$.isEmptyObject(data.error)) {
alert(data.error);
return false;
}
},
'timeout': 30000,
'error': function () {
alert('附件删除出错');
}
});
}
};
</script>
<?php if(isset($this->data['attid']) && !empty($this->data['attid'])){ ?>
<input type="hidden" id="reference_file_content" value='<?= json_encode($this->data[' file']) ?>' />
<script>
upload.onsuccess('', $('#reference_file_content').val(), "");
</script>
<?php } ?>

View File

@ -0,0 +1,119 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
$this->breadcrumb('<a href="/">首页</a>');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
$this->breadcrumb('文献管理');
$this->breadcrumb()->setSeparator(' > ');
$this->theme->AppendPlus($this,'colorbox');
$this->theme->AppendPlus($this,'admin_plugin');
$this->theme->AppendModel($this,'admin-data-ref');
?>
<style>
table thead tr th { background: #EBF2F6; }
</style>
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div class="col-md-10 col-sm-12">
<div>
<?= $this->partial('data/ref-nav.phtml',array('ac'=>$this->ac,'uuid'=>$this->uuid)); ?>
</div>
<div>
<h3><?php echo $this->md['title']; ?> <a href="/data/<?php echo $this->uuid; ?>">查看</a></h3>
<div class="input-append row">
<form id="datasearch" class="navbar-form" action="">
<input class="form-control" type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" />
<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; ?>" />
<button type="submit" class="btn btn-default" id="search_btn">搜索文献(数据外搜索,可以添加到数据)</button>
</form>
</div>
</div>
<?php if(!empty($this->error)) { ?>
<?= $this->error ?>
<?php } ?>
<?php if(!empty($this->msg)) { ?>
<?= $this->msg ?>
<?php } else{ ?>
<?php if($this->ac == 'westdc'){ ?>
<button type="button" class="btn btn-primary" onclick="$('#mdref')[0].reset();mdref.edit('','','e31f5ea7-a4af-4ae3-9ac1-1a84132c4338',0,0)">添加数据中心文献</button>
<?php } ?>
<?php if(!empty($this->years)) { ?>
<?php foreach($this->years as $k=>$v){ ?>
<a class="btn btn-info" href="?field[year]=<?= $v['year'] ?>"><?= empty($v['year']) ? "未知":$v['year'] ?>(<?= $v['num'] ?>)</a>
<?php } ?>
<?php } ?>
<div id="datalist">
<?php if (count($this->paginator)): ?>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>
标题
<a href="?order=title&sort=ASC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-up"></i></a>
<a href="?order=title&sort=DESC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-down"></i></a>
年份
<a href="?order=year&sort=ASC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-up"></i></a>
<a href="?order=year&sort=DESC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-down"></i></a>
</th>
<th>
创建
<a href="?order=ts_created&sort=ASC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-up"></i></a>
<a href="?order=ts_created&sort=DESC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-down"></i></a>
</th>
<th>类型</th>
<th></th>
<th width="40">操作</th>
</tr>
</thead>
<tbody>
<?php
if($this->page > 1)
{
$autoindex = ($this->page - 1) * $this->pagelimit;
}else{
$autoindex=0;
}
foreach ($this->paginator as $item):
$autoindex++;?>
<tr id="DataLine_<?= $item['id']?>">
<td>
[<?= $autoindex ?>]&nbsp;
<?php if ($item['ris']) :
echo $item['reference'];
else :
?>
{<?php $authors = $this->reference->getAuthorByReference($item['id'],true); echo count($authors) ? join(",",$authors):'<font color="#CC0000">未知作者</font>'; ?>}&nbsp;
{<?= empty($item['title']) ? '<font color="#CC0000">未知标题</font>':$item['title'] ?>}&nbsp;
{<?= empty($item['publisher']) ? '<font color="#CC0000">未知期刊</font>':$item['publisher'] ?>}&nbsp;
{<?= empty($item['year']) ? '<font color="#CC0000">未知年份</font>':$item['year'] ?>}&nbsp;
<?php endif; ?>
<a href="/admin/data/ref/ac/singleris/id/<?= $item['id'] ?>">RIS编辑</a>
<a href="/admin/data/ref/ac/data/id/<?= $item['id'] ?>">数据</a>
</td>
<td><?= date("Y-m-d",strtotime($item['ts_created'])) ?></td>
<td><?= $this->referenceType[$item['reftype']] ?></td>
<td><?= $item['place'] ?></td>
<td>
<a href="javascript:void(0);" onclick="$('#mdref')[0].reset();mdref.edit(<?= $item['mrid']?>,<?= $item['id']?>,'<?= $this->uuid; ?>',<?= $item['reftype']?>,<?= $item['place']?>)">编辑</a>
<a href="/admin/data/ref/ac/deletemdref/mrid/<?= $item['mrid']?>">移除</a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php endif; ?>
<div class="pagenavi"><?= $this->paginator; ?></div>
</div>
<?php } ?>
</div>
</div>
<!-- //页面内容 -->
<?= $this->partial('data/ref-mdref-form.phtml',array('referenceType'=>$this->referenceType)); ?>

View File

@ -0,0 +1,124 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
$this->breadcrumb('<a href="/">首页</a>');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
$this->breadcrumb('文献管理');
$this->breadcrumb()->setSeparator(' > ');
$this->theme->AppendPlus($this,'colorbox');
$this->theme->AppendPlus($this,'admin_plugin');
$this->theme->AppendModel($this,'admin-data-ref');
?>
<style>
table thead tr th { background: #EBF2F6; }
</style>
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div class="col-md-10 col-sm-12">
<div>
<?= $this->partial('data/ref-nav.phtml',array('ac'=>$this->ac,'uuid'=>$this->uuid)); ?>
</div>
<div>
<h3><?php echo $this->md['title']; ?> <a href="/data/<?php echo $this->uuid; ?>">查看</a></h3>
<div class="input-append row">
<form id="datasearch" class="navbar-form" action="">
<input class="form-control" type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" />
<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; ?>" />
<button type="submit" class="btn btn-default" id="search_btn">搜索文献(数据外搜索,可以添加到数据)</button>
</form>
</div>
</div>
<?php if(!empty($this->error)) { ?>
<?= $this->error ?>
<?php } ?>
<?php if(!empty($this->msg)) { ?>
<?= $this->msg ?>
<?php } else{ ?>
<?php if($this->ac == 'westdc'){ ?>
<button type="button" class="btn btn-success" onclick="$('#mdref')[0].reset();mdref.edit('','','e31f5ea7-a4af-4ae3-9ac1-1a84132c4338',0,0)">添加数据中心文献</button>
<?php } ?>
<?php if(!empty($this->years)) { ?>
<?php foreach($this->years as $k=>$v){ ?>
<a class="btn btn-info" href="?field[year]=<?= $v['year'] ?>"><?= empty($v['year']) ? "未知":$v['year'] ?>(<?= $v['num'] ?>)</a>
<?php } ?>
<?php } ?>
<div id="datalist">
<?php if (count($this->paginator)): ?>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>
标题
<a href="?order=title&sort=ASC&q=<?php if(!empty($this->q)) echo $this->q; ?>">
<i class="icon-arrow-up"></i></a>
<a href="?order=title&sort=DESC&q=<?php if(!empty($this->q)) echo $this->q; ?>">
<i class="icon-arrow-down"></i></a>
年份
<a href="?order=year&sort=ASC&q=<?php if(!empty($this->q)) echo $this->q; ?>">
<i class="icon-arrow-up"></i></a>
<a href="?order=year&sort=DESC&q=<?php if(!empty($this->q)) echo $this->q; ?>">
<i class="icon-arrow-down"></i></a>
记录创建
<a href="?order=ts_created&sort=ASC&q=<?php if(!empty($this->q)) echo $this->q; ?>">
<i class="icon-arrow-up"></i></a>
<a href="?order=ts_created&sort=DESC&q=<?php if(!empty($this->q)) echo $this->q; ?>">
<i class="icon-arrow-down"></i></a>
</th>
<th>类型</th>
<th></th>
<th width="70">操作</th>
</tr>
</thead>
<tbody>
<?php
if($this->page > 1)
{
$autoindex = ($this->page - 1) * $this->pagelimit;
}else{
$autoindex=0;
}
foreach ($this->paginator as $item):
$autoindex++;?>
<tr id="DataLine_<?= $item['id']?>">
<td>
[<?= $autoindex ?>]&nbsp;
<?php if ($item['ris']) :
echo $item['reference'];
else :
?>
{<?php $authors = $this->reference->getAuthorByReference($item['id'],true); echo count($authors) ? join(",",$authors):'<font color="#CC0000">未知作者</font>'; ?>}&nbsp;
{<?= empty($item['title']) ? '<font color="#CC0000">未知标题</font>':$item['title'] ?>}&nbsp;
{<?= empty($item['publisher']) ? '<font color="#CC0000">未知期刊</font>':$item['publisher'] ?>}&nbsp;
{<?= empty($item['year']) ? '<font color="#CC0000">未知年份</font>':$item['year'] ?>}&nbsp;
<?php endif; ?>
<a href="/admin/data/ref/ac/singleris/id/<?= $item['id'] ?>">RIS编辑</a>
<a href="/admin/data/ref/ac/data/id/<?= $item['id'] ?>">数据</a>
</td>
<td><?= ($item['reftype']>-1)?$this->referenceType[$item['reftype']]:'' ?></td>
<td><?= $item['place'] ?></td>
<td>
<a href="javascript:void(0);" onclick="$('#mdref')[0].reset();mdref.edit('<?= $item['mrid'] ?>',<?= $item['id']?>,'<?= $this->uuid ?>','<?= $item['reftype'] ?>','<?= $item['place'] ?>')">
<?= ($item['mrid'])?'编辑':'添加' ?>
</a>
<a href="/admin/data/ref/ac/deletemdref/mrid/<?= $item['mrid']?>">移除</a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php endif; ?>
<div class="pagenavi"><?= $this->paginator; ?></div>
</div>
<?php } ?>
</div>
</div>
<!-- //页面内容 -->
<?= $this->partial('data/ref-mdref-form.phtml',array('referenceType'=>$this->referenceType)); ?>

View File

@ -0,0 +1,107 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
$this->breadcrumb('文献管理');
$this->breadcrumb()->setSeparator(' > ');
$this->theme->AppendPlus($this,'colorbox');
$this->theme->AppendPlus($this,'admin_plugin');
?>
<style>
table thead tr th {background:#EBF2F6;}
</style>
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div class="col-md-10 col-sm-12">
<div>
<?= $this->partial('data/ref-nav.phtml',array('ac'=>$this->ac)); ?>
</div>
<div>
<p></p>
<div class="input-group form-group">
<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>
</div>
<?php if(!empty($this->error)) { ?>
<?= $this->error ?>
<?php } ?>
<?php if(!empty($this->msg)) { ?>
<?= $this->msg ?>
<?php } else{ ?>
<div id="datalist">
<?php if (count($this->paginator)): ?>
<p></p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>文件名</th>
<th>状态</th>
<th width="140">操作</th>
</tr>
</thead>
<tbody>
<?php $autoindex=0;
foreach ($this->paginator as $item):
$autoindex++;?>
<tr id="DataLine_<?= $item['id']?>">
<td><?= $item['realname'] ?></td>
<td><?= empty($item['attid']) ? '<font color="#CC0000">未编辑</font>':"已编辑" ?></td>
<td>
<a class="file-editor" href="/admin/data/ref/ac/add/<?= empty($item['attid']) ? 'attid/'.$item['id'] : 'id/'.$item['refid']?>">编辑</a>
<a href="javascript:void(0);" onclick="file.delete(<?= $item['id']?>)" id="delbtn_<?= $item['id']?>">删除</a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php endif; ?>
<div class="pagenavi"><?= $this->paginator; ?></div>
</div>
<?php } ?>
</div>
</div>
<!-- //页面内容 -->
<script>
$(document).ready(function(e) {
});
var file = {
delete : function(id){
if(confirm("是否确定删除?") == false)
{
return false;
}
$.ajax({
'type':"POST",
'url':'/admin/data/ref/ac/delete',
'data':'attid=' + id,
'success':function(data){
if(typeof(data) == 'undefined')
{
alert("数据源错误,请联系管理员");
return false;
}
if(!$.isEmptyObject(data.error))
{
alert(data.error);
return false;
}
$('#DataLine_'+id).fadeOut();
},
'timeout': 30000,
'error': function(){
alert('附件删除出错');
}
});
}
}
</script>

View File

@ -0,0 +1,53 @@
<!-- Modal -->
<div class="modal fade" id="mdref-form" >
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="myModalLabel">添加数据文献</h4>
</div>
<div class="modal-body">
<form id="mdref" method="post" class="form-horizontal">
<div class="form-group">
<label class="col-sm-3 control-label" for="inputRefid">文献ID</label>
<div class="col-sm-8">
<input type="text" name="refid" id="inputfid" placeholder="文献ID" class="form-control" value="<?= empty($this->refid) ? "":$this->refid ?>" >
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label" for="inputUuid">元数据UUID</label>
<div class="col-sm-8">
<input type="text" name="uuid" id="inputUuid" placeholder="UUID" class="form-control">
<span class="help-block"><a href="javascript:void(0);" onclick="$(this).parent('span').prev('input').val('e31f5ea7-a4af-4ae3-9ac1-1a84132c4338')">设为数据中心文献</a></span>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label" for="inputPlace">排序数值(数字)</label>
<div class="col-sm-8">
<input type="text" name="place" id="inputPlace" placeholder="排序" class="form-control">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">文献类型</label>
<div class="col-sm-8">
<?php foreach($this->referenceType as $k=>$v) { ?>
<label class="radio">
<input type="radio" name="reftype" value="<?= $k ?>" /> <?= $v ?>
</label>
<?php } ?>
</div>
</div>
<input type="hidden" name="id" value="" />
</form>
</div>
<div class="modal-footer">
<div class="progress progress-striped active" id="submit-loading" style="display:none;">
<div class="bar" style="width:100%;"></div>
</div>
<button onclick="$('#mdref')[0].reset();" class="btn">重置</button>
<button onclick="$('#mdref-form').modal('hide');" class="btn">关闭</button>
<button onclick="mdref.create()" class="btn btn-primary" id="submit_btn">保存</button>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,70 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->breadcrumb('文献管理');
$this->breadcrumb()->setSeparator(' > ');
$this->theme->AppendPlus($this,'colorbox');
$this->theme->AppendPlus($this,'admin_plugin');
$this->theme->AppendModel($this,'admin-data-ref');
?>
<style>
table thead tr th {background:#EBF2F6;}
</style>
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div class="col-md-10 col-sm-12">
<div class="form-group">
<?= $this->partial('data/ref-nav.phtml',array('ac'=>$this->ac)); ?>
</div>
<?php if(!empty($this->error)) { ?>
<?= $this->error ?>
<?php } ?>
<?php if(!empty($this->msg)) { ?>
<?= $this->msg ?>
<?php } else{ ?>
<div class="form-group"><button type="button" class="btn btn-primary" onclick="$('#mdref')[0].reset();$('#mdref-form').modal('show');">添加一条</button></div>
<div id="datalist">
<?php if (count($this->paginator)): ?>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>元数据</th>
<th>类型</th>
<th>排序</th>
<th width="140">操作</th>
</tr>
</thead>
<tbody>
<?php $autoindex=0;
foreach ($this->paginator as $item):
$autoindex++;?>
<tr id="DataLine_<?= $item['id']?>">
<td><?= $item['title'] ?> <a href="/data/<?= $item['uuid'] ?>" target="_blank">查看</a></td>
<td><?= isset($this->referenceType[$item['reftype']]) ? $this->referenceType[$item['reftype']]:"" ?></td>
<td><?= $item['place'] ?></td>
<td>
<a href="javascript:void(0);" onclick="mdref.edit(<?= $item['id'] ?>,<?= $item['refid']?>,'<?= $item['uuid'] ?>',<?= $item['reftype'] ?>,<?= $item['place'] ?>)">编辑</a>
<a href="/admin/data/ref/ac/delmdref/id/<?= $item['id']?>">移除</a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php endif; ?>
<div class="pagenavi"><?= $this->paginator; ?></div>
</div>
<?php } ?>
</div>
</div>
<!-- //页面内容 -->
<?= $this->partial('data/ref-mdref-form.phtml',array('referenceType'=>$this->referenceType,'refid'=>$this->refid)); ?>
<script>
$(document).ready(function(e) {
});
</script>

View File

@ -0,0 +1,120 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
$this->breadcrumb('文献管理');
$this->breadcrumb()->setSeparator(' > ');
$this->theme->AppendPlus($this,'colorbox');
$this->theme->AppendPlus($this,"uploadify");
$this->theme->AppendPlus($this,'admin_plugin');
?>
<style>
table thead tr th {background:#EBF2F6;}
</style>
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div class="col-md-10 col-sm-12">
<div>
<?= $this->partial('data/ref-nav.phtml',array('ac'=>$this->ac)); ?>
</div>
<?php if(!empty($this->error)) { ?>
<?= $this->error ?>
<?php } ?>
<?php if(!empty($this->msg)) { ?>
<?= $this->msg ?>
<?php } else{ ?>
<form class="form-horizontal" method="post">
<div class="control-group">
<label class="control-label" for="inputPassword">PDF</label>
<div class="controls">
<input type="file" name="Filedata" id="file_upload" />
<div id="uploadedFile"></div>
</div>
</div>
<div class="form-actions">
<a class="btn btn-primary" href="/admin/data/ref/ac/files">文件管理</a>
</div>
</form>
<?php } ?>
</div>
</div>
<!-- //页面内容 -->
<script>
var _this = {
SessionID : '<?php echo session_id(); ?>'
};
var uploader;
var param;
param = {
"PHPSESSID" : _this.SessionID,
"multi" : 'yes'
};
$(function() {
$('#file_upload').uploadify({
'swf' : '/js/lib/uploadify/uploadify.swf',
'uploader' : '/admin/data/ref/ac/pdfupload',
'multi' : true,
'auto' : true,
'fileTypeExts' : '*.pdf;*.caj',
'onUploadSuccess' : function(file, data, response) {
upload.onsuccess(file, data, response);
},
'onUploadStart' : function(file) {
$('#file_upload').uploadify('settings','formData',param);
}
});
});
var upload = {
onsuccess : function(file, data, response){
_data = $.parseJSON(data);
if(!$.isEmptyObject(_data.error))
{
alert(_data.error);
}else{
$('#uploadedFile').append(upload.makeFileHtml(_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>'
+ data.realname
+'<input type="hidden" name="attid" value="'+data.id+'"></input>'
+'</div>';
},
deleteFile : function(id){
$.ajax({
'type':"POST",
'url':'/admin/data/ref/ac/delete',
'data':'attid=' + id,
'success':function(data){
if(typeof(data) == 'undefined')
{
alert("数据源错误,请联系管理员");
return false;
}
if(!$.isEmptyObject(data.error))
{
alert(data.error);
return false;
}
},
'timeout': 30000,
'error': function(){
alert('附件删除出错');
}
});
}
};
</script>
<?php if(isset($this->data['attid']) && !empty($this->data['attid'])){ ?>
<input type="hidden" id="reference_file_content" value='<?= json_encode($this->data['file']) ?>' />
<script>
upload.onsuccess('',$('#reference_file_content').val(),"");
</script>
<?php } ?>

View File

@ -0,0 +1,15 @@
<ul class="nav nav-tabs">
<?php if (!empty($this->uuid)) : ?>
<li class="active"><a href="/admin/data/ref/uuid/<?= $this->uuid ?>">数据文献</a></li>
<?php endif; ?>
<li <?= empty($this->ac) && empty($this->uuid) ? 'class="active"':"" ?>><a href="/admin/data/ref">浏览所有</a></li>
<li <?= $this->ac=="water" ? 'class="active"':"" ?>><a href="/admin/data/ref/ac/water">WATER文献</a></li>
<li <?= $this->ac=="westdc" ? 'class="active"':"" ?>><a href="/admin/data/ref/ac/westdc">数据中心文献</a></li>
<li <?= $this->ac=="todo" ? 'class="active"':"" ?>><a href="/admin/data/ref/ac/todo">无数据文献</a></li>
<li <?= $this->ac=="author" ? 'class="active"':"" ?>><a href="/admin/data/ref/ac/author">数据作者文献</a></li>
<li <?= $this->ac=="add" ? 'class="active"':"" ?>><a href="/admin/data/ref/ac/add">单篇添加</a></li>
<li <?= $this->ac=="multiupload" ? 'class="active"':"" ?>><a href="/admin/data/ref/ac/multiupload">批量上传</a></li>
<li <?= $this->ac=="files" ? 'class="active"':"" ?>><a href="/admin/data/ref/ac/files">文件管理</a></li>
<li <?= $this->ac=="ris" ? 'class="active"':"" ?>><a href="/admin/data/ref/ac/ris">RIS导入</a></li>
<li <?= $this->ac=="risoutput" ? 'class="active"':"" ?>><a href="/admin/data/ref/ac/risoutput">RIS导出</a></li>
</ul>

View File

@ -0,0 +1,70 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
$this->breadcrumb('文献管理');
$this->breadcrumb()->setSeparator(' > ');
$this->theme->AppendPlus($this,'colorbox');
$this->theme->AppendPlus($this,"uploadify");
$this->theme->AppendPlus($this,'admin_plugin');
?>
<style>
table thead tr th {background:#EBF2F6;}
</style>
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div class="col-md-10 col-sm-12">
<div>
<?= $this->partial('data/ref-nav.phtml',array('ac'=>$this->ac)); ?>
</div>
<p></p>
<?php if(!empty($this->error)) { ?>
<?= $this->error ?>
<?php } ?>
<?php if(!empty($this->msg)) { ?>
<?= $this->msg ?>
<?php } else{ ?>
<?php if(empty($this->data)) { ?>
<form class="form-horizontal " method="post" enctype="multipart/form-data">
<div class="form-group">
<label class="col-md-1 col-sm-1 control-label" for="inputPassword">RIS文件</label>
<div class="controls col-md-3 col-sm-3">
<input type="file" name="Filedata" id="file_upload" />
<div id="uploadedFile"></div>
</div>
</div>
<div class="form-group">
<label class="col-md-1 col-sm-1 control-label" for="inputPassword">RIS文本</label>
<div class="controls col-md-3 col-sm-3">
<textarea class="input-block-level form-control" name="ristext" rows="5"></textarea>
</div>
</div>
<div class="form-group">
<div class="col-md-4 col-sm-4">
<input type="hidden" name="submit" value="1" />
<button type="submit" class="btn btn-primary pull-right">导入</button>
</div>
</div>
</form>
<?php }else{ ?>
<?php
foreach($this->data as $k=>$ref)
{
echo '<ul>';
foreach($ref as $index=>$value)
{
$v = is_array($value) ? join("|",$value) : $value;
echo '<li>'.$index .":". $v .'</li>';
}
echo "</ul>";
}
?>
<?php } ?>
<?php } ?>
</div>
</div>
<!-- //页面内容 -->

View File

@ -0,0 +1,48 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
$this->breadcrumb('文献管理');
$this->breadcrumb()->setSeparator(' > ');
$this->theme->AppendPlus($this,'colorbox');
$this->theme->AppendPlus($this,"uploadify");
$this->theme->AppendPlus($this,'admin_plugin');
?>
<style>
table thead tr th {background:#EBF2F6;}
</style>
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div class="col-md-10 col-sm-12">
<div>
<?= $this->partial('data/ref-nav.phtml',array('ac'=>$this->ac)); ?>
</div>
<?php if(!empty($this->error)) { ?>
<?= $this->error ?>
<?php } ?>
<?php if(!empty($this->msg)) { ?>
<?= $this->msg ?>
<?php } else{ ?>
<h3>RIS导出</h3>
<hr />
<div>
<?php if(!empty($this->years)) { ?>
按年份 :
<?php foreach($this->years as $k=>$v){ ?>
<a class="btn btn-info btn-double btn-sm" href="?field[year]=<?= $v['year'] ?>"><?= empty($v['year']) ? "未知":$v['year'] ?>(<?= $v['num'] ?>)</a>
<?php } ?>
<hr />
<?php } ?>
</div>
<div>
其它方式:<a class="btn btn-info" href="?submit=1&mode=all">全部</a>
</div>
<?php } ?>
</div>
</div>
<!-- //页面内容 -->

View File

@ -0,0 +1,62 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
$this->breadcrumb('文献管理');
$this->breadcrumb()->setSeparator(' > ');
$this->theme->AppendPlus($this,'colorbox');
$this->theme->AppendPlus($this,"uploadify");
$this->theme->AppendPlus($this,'admin_plugin');
?>
<style>
table thead tr th {background:#EBF2F6;}
</style>
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div class="col-md-10 col-sm-12">
<div>
<?= $this->partial('data/ref-nav.phtml',array('ac'=>$this->ac)); ?>
</div>
<?php if(!empty($this->error)) { ?>
<?= $this->error ?>
<?php } ?>
<?php if(!empty($this->msg)) { ?>
<?= $this->msg ?>
<?php } else{ ?>
<h3><?= empty($this->referenceData['title']) ? $this->referenceData['reference'] : $this->referenceData['title'] ?></h3>
<hr />
<?php if(empty($this->data)) { ?>
<form class="form-horizontal" method="post" enctype="multipart/form-data">
<div class="form-group">
<label class="col-md-2 col-sm-2 control-label" for="inputPassword">RIS文本</label>
<div class="col-md-5 col-sm-5">
<textarea class="form-control" name="ristext" rows="5"><?= $this->ristext ?></textarea>
<p class="clearfix"></p>
<div class="alert alert-info"> <strong> * </strong>此功能是使用单个文献的 RIS 文本导入并覆盖以前填写过的信息</div>
<input type="hidden" name="submit" value="1" />
<button type="submit" class="btn btn-primary pull-right">导入</button>
</div>
</div>
</form>
<?php }else{ ?>
<?php
foreach($this->data as $k=>$ref)
{
echo '<ul>';
foreach($ref as $index=>$value)
{
$v = is_array($value) ? join("|",$value) : $value;
echo '<li>'.$index .":". $v .'</li>';
}
echo "</ul>";
}
?>
<?php } ?>
<?php } ?>
</div>
</div>
<!-- //页面内容 -->

View File

@ -0,0 +1,113 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
$this->breadcrumb('文献管理');
$this->breadcrumb()->setSeparator(' > ');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->theme->AppendPlus($this,'colorbox');
$this->theme->AppendPlus($this,'admin_plugin');
$this->theme->AppendModel($this,'admin-data-ref');
?>
<style>
table thead tr th { background: #EBF2F6; }
</style>
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div class="col-md-10 col-sm-12">
<div class="form-group">
<?= $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 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>
</form>
</div>
<?php if(!empty($this->error)) { ?>
<?= $this->error ?>
<?php } ?>
<?php if(!empty($this->msg)) { ?>
<?= $this->msg ?>
<?php } else{ ?>
<?php if($this->ac == 'westdc'){ ?>
<button type="button" class="btn btn-primary" onclick="$('#mdref')[0].reset();mdref.edit('','','e31f5ea7-a4af-4ae3-9ac1-1a84132c4338',0,0)">添加数据中心文献</button>
<?php } ?>
<div class="form-group">
<?php if(!empty($this->years)) { ?>
<?php foreach($this->years as $k=>$v){ ?>
<a class="btn btn-info btn-double btn-sm" href="?field[year]=<?= $v['year'] ?>"><?= empty($v['year']) ? "未知":$v['year'] ?>(<?= $v['num'] ?>)</a>
<?php } ?>
<?php } ?>
</div>
<div id="datalist">
<?php if (count($this->paginator)): ?>
<table class="stylized table table-bordered table-striped table-hover">
<thead>
<tr>
<th>
标题
<a href="?order=title&sort=ASC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-up"></i></a>
<a href="?order=title&sort=DESC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-down"></i></a>
年份
<a href="?order=year&sort=ASC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-up"></i></a>
<a href="?order=year&sort=DESC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-down"></i></a>
</th>
<th width="170">
记录创建
<a href="?order=ts_created&sort=ASC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-up"></i></a>
<a href="?order=ts_created&sort=DESC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-down"></i></a>
</th>
<th width="200">操作</th>
</tr>
</thead>
<tbody>
<?php
if($this->page > 1)
{
$autoindex = ($this->page - 1) * $this->pagelimit;
}else{
$autoindex=0;
}
foreach ($this->paginator as $item):
$autoindex++;?>
<tr id="DataLine_<?= $item['id']?>">
<td>
[<?= $autoindex ?>]&nbsp;
<?php if ($item['ris']) :
echo $item['reference'];
else :
?>
{<?php $authors = $this->reference->getAuthorByReference($item['id'],true); echo count($authors) ? join(",",$authors):'<font color="#CC0000">未知作者</font>'; ?>}&nbsp;
{<?= empty($item['title']) ? '<font color="#CC0000">未知标题</font>':$item['title'] ?>}&nbsp;
{<?= empty($item['publisher']) ? '<font color="#CC0000">未知期刊</font>':$item['publisher'] ?>}&nbsp;
{<?= empty($item['year']) ? '<font color="#CC0000">未知年份</font>':$item['year'] ?>}&nbsp;
<?php endif; ?>
</td>
<td><?= date("Y-m-d H:i",strtotime($item['ts_created'])) ?></td>
<td>
<a href="/admin/data/ref/ac/add/id/<?= $item['id']?>">编辑</a>
<a href="/admin/data/ref/ac/singleris/id/<?= $item['id'] ?>">RIS编辑</a>
<a href="/admin/data/ref/ac/data/id/<?= $item['id'] ?>">数据</a>(<a href="javascript:void(0);" onclick="$('#mdref')[0].reset();mdref.edit('',<?= $item['id']?>,'',0,0)">+</a>)
<a href="/admin/data/ref/ac/deleteref/id/<?= $item['id']?>">删除</a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php endif; ?>
<div class="pagenavi"><?= $this->paginator; ?></div>
</div>
<?php } ?>
</div>
</div>
<!-- //页面内容 -->
<?= $this->partial('data/ref-mdref-form.phtml',array('referenceType'=>$this->referenceType)); ?>

View File

@ -11,12 +11,13 @@
$this->theme->AppendPlus($this,'colorbox');
$this->theme->AppendModel($this,"author-literature");
?>
<div id="leftPanel">
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div id="rightPanel">
<div class="col-md-10 col-sm-12">
<?php if ($this->msg or $this->messages) :?>
<div id="message">
<div id="message" class="alert alert-info">
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
@ -56,7 +57,7 @@ foreach ($this->paginator as $item):
$i=0;
$u=$item['uuid'];
endif;
if ($i==0) echo '<div class="well"><h4>元数据:<a href="/data/'.$item['uuid'].'">'.$item['title'].'</a><a href="/admin/data/reference/add/1/uuid/'.$item['uuid'].'">添加</a></h4><ol>';
if ($i==0) echo '<div class="well"><h4>元数据:<a href="/data/'.$item['uuid'].'">'.$item['mdtitle'].'</a><a href="/admin/data/reference/add/1/uuid/'.$item['uuid'].'">添加</a></h4><ol>';
echo '<li>文献(<a href="/admin/data/reference/edit/'.$item['mdid'].'">编辑</a> <a href="/admin/data/reference/delete/'.$item['mdid'].'">删除</a> <a href="javascript:void(0);" class="order" rel="'.$item['mdid'].'" rev="'.$item['place'].'">排序</a>'.$item['place'].'. '.$item['reference'].'</li>';
endforeach;
echo '</ul>';
@ -64,3 +65,4 @@ echo '</ul>';
<?php endif; ?>
<?= $this->paginator; ?>
</div>
</div>

View File

@ -9,12 +9,13 @@
$this->breadcrumb('数据文献管理</a>');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="leftPanel">
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div id="rightPanel">
<div class="col-md-10 col-sm-12">
<?php if ($this->msg or $this->messages) :?>
<div id="message">
<div id="message" class="alert alert-info">
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
@ -49,3 +50,4 @@ if($this->type == 'dc')
<?php }
else ?><?= $this->form; ?>
</div>
</div>

View File

@ -9,12 +9,13 @@
$this->breadcrumb('数据文献管理</a>');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="leftPanel">
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div id="rightPanel">
<div class="col-md-10 col-sm-12">
<?php if ($this->msg or $this->messages) :?>
<div id="message">
<div id="message" class="alert alert-info">
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
@ -32,3 +33,4 @@
<input type="submit" value="导入" />
</form>
</div>
</div>

View File

@ -10,12 +10,13 @@
$this->breadcrumb('项目来源管理');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="leftPanel">
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div id="rightPanel">
<div class="col-md-10 col-sm-12">
<?php if ($this->msg or $this->messages) :?>
<div id="message">
<div id="message" class="alert alert-info">
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
@ -23,36 +24,40 @@
<?php endforeach;endif; ?>
</div>
<?php endif; ?>
<div class="ctrlplan">
<a href="/admin/data/source">项目来源管理</a>
<a href="/admin/data/source/do/add">添加项目来源</a>
<a href="/admin/data/source/do/sync">同步项目来源(以此处为准)</a>
<div class="form-group">
<a class="btn btn-primary btn-sm" href="/admin/data/source">项目来源管理</a>
<a class="btn btn-primary btn-sm" href="/admin/data/source/do/add">添加项目来源</a>
<a class="btn btn-primary btn-sm" href="/admin/data/source/do/sync">同步项目来源(以此处为准)</a>
</div>
<div class="search">
<form action="" method="get">
<div class="input-group form-group">
<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;?>' />
<label>搜索关键字</label><input type="text" class="q" name="q" value="<?php echo $this->q; ?>" />
<input type="submit" class="btn" value="搜索" />
<span class="input-group-btn"><button type="submit" class="btn btn-default">搜索</button></span>
</form>
</div><!-- search DIV -->
<table class="stylized" width="700">
<div class="">
<table class="stylized table table-bordered table-striped table-hover">
<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><?php echo $item['code'];?></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>|
@ -63,6 +68,8 @@
</tbody>
<?php endif; ?>
</table>
</div>
<div class="pagenavi"><?= $this->paginator; ?></div>
</div>
<script>$("#list tr").mouseover(function(){$(this).addClass("high")}).mouseout(function(){$(this).removeClass("high")})</script>
</div>
<script type="text/javascript" >$("#list tr").mouseover(function(){$(this).addClass("high")}).mouseout(function(){$(this).removeClass("high")})</script>

View File

@ -10,13 +10,14 @@
$this->breadcrumb('项目来源管理');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="leftPanel">
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div id="rightPanel">
<div class="col-md-10 col-sm-12">
<?php if ($this->msg or $this->messages) :?>
<div id="message">
<div id="message" class="alert alert-success">
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
@ -24,41 +25,169 @@
<?php endforeach;endif; ?>
</div>
<?php endif; ?>
<div class="ctrlplan">
<a href="/admin/data/source/">项目来源管理</a>
<a href="/admin/data/source/do/add">添加项目来源</a>
<div class="form-group">
<ul class="nav nav-tabs">
<li><a href="/admin/data/source">项目来源管理</a></li>
<li class="active"><a href="/admin/data/source/do/add">添加项目来源</a></li>
</ul>
</div>
<form method="post" action="/admin/data/source">
<p>
<label>标题:</label><br />
<input type="text" name="title" value="<?php echo $this->info['title'];?>" />
</p>
<p>
<label class="required">uuid:</label><br />
<input type="text" name="uuid" value="<?php echo $this->info['uuid'];?>" />
</p>
<p>
<label class="required">Code:</label><br />
<input type="text" name="code" value="<?php echo $this->info['code'];?>" />
</p>
<p>
<label>描述</label><br />
<textarea id="description" class="samll half" name="description"><?php echo $this->info['description'];?></textarea>
</p>
<p>
<label>has_pages</label><br />
<input type="radio" name="has_pages" value="true" <?php if($this->info['has_pages']) echo 'checked="checked"';?> />True <input type="radio" name="has_pages" value="false" <?php if(!$this->info['has_pages']) echo 'checked="checked"';?> />False
</p>
<p>
<label>has_agreement</label><br />
<input type="radio" name="has_agreement" value="true" <?php if($this->info['has_agreement']) echo 'checked="checked"';?> />True <input type="radio" name="has_agreement" value="false" <?php if(!$this->info['has_agreement']) echo 'checked="checked"';?> />False
</p>
<p>
<form method="post" action="/admin/data/source" class="form-horizontal">
<div class="form-group">
<label for="title" 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="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>&nbsp;&nbsp;&nbsp;<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>&nbsp;&nbsp;&nbsp;<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>&nbsp;&nbsp;&nbsp;<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>&nbsp;&nbsp;&nbsp;<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">
<textarea id="form-control" class="samll half form-control" name="description">
<?php echo $this->info['description'];?>
</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>
</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>
</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>
</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>
</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'];?>" />
<input type="hidden" name="do" value="<?php if($this->info['uuid']!='') echo 'edit';else echo 'add';?>" />
<input type="hidden" name="submit" value="1" />
<input type="submit" value="提交" />
</p>
<input type="submit" value="提交" class="btn btn-primary pull-right" />
</div>
</div>
</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>&nbsp;&nbsp;&nbsp;<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>&nbsp;&nbsp;&nbsp;<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>

View File

@ -10,12 +10,13 @@
$this->breadcrumb('项目来源管理');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="leftPanel">
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div id="rightPanel">
<div class="col-md-10 col-sm-12">
<?php if ($this->msg or $this->messages) :?>
<div id="message">
<div id="message" class="alert alert-info">
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
@ -23,16 +24,14 @@
<?php endforeach;endif; ?>
</div>
<?php endif; ?>
<div class="ctrlplan">
<a href="/admin/data/source">项目来源管理</a>
<a href="/admin/data/source/do/add">添加项目来源</a>
</div>
<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>
@ -61,4 +60,5 @@
</table>
<div class="pagenavi"><?= $this->paginator; ?></div>
</div>
</div>
<script>$("#list tr").mouseover(function(){$(this).addClass("high")}).mouseout(function(){$(this).removeClass("high")})</script>

View File

@ -10,13 +10,13 @@
$this->breadcrumb('项目来源管理');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="leftPanel">
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div id="rightPanel">
<div class="col-md-10 col-sm-12">
<?php if ($this->msg or $this->messages) :?>
<div id="message">
<div id="message" class="alert alert-info">
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
@ -24,19 +24,14 @@
<?php endforeach;endif; ?>
</div>
<?php endif; ?>
为元数据《<?php echo $this->info['title'];?>》选择项目来源
<div class="search">
<form action="" method="get">
<input type="hidden" name="search" value='1' />
<input type="hidden" name="id" value='<?php echo $this->id;?>' />
<label>搜索关键字</label><input type="text" class="q" name="q" value="<?php echo $this->q; ?>" />
<input type="submit" class="btn" value="搜索" />
<p>为元数据《<?php echo $this->info['title'];?>》选择项目来源</p>
<div class="input-group">
<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>
</div><!-- search DIV -->
</div>
<!-- search DIV -->
<form method="post">
<table class="stylized" width="700">
<thead>
@ -71,10 +66,7 @@
?>
<input type="submit" value="提交" />
</form>
<?php
if(!empty($this->info['id']))
{
?>
<?php if(!empty($this->info['id'])) { ?>
<form method="post" action="/admin/data/source/">
<input type="hidden" name="uuid" value="<?php echo $this->uuid;?>" />
<input type="hidden" name="do" value="delsource" />
@ -83,9 +75,8 @@
<br /><button type="submit" class="btn btn-red" onclick="return confirm('是否确定删除该来源')">清除数据来源</button>
</form>
<?php
}
?>
} ?>
<div class="pagenavi"><?= $this->paginator; ?></div>
</div>
</div>
<script>$("#list tr").mouseover(function () { $(this).addClass("high") }).mouseout(function () { $(this).removeClass("high") })</script>

View File

@ -9,12 +9,13 @@
$this->breadcrumb('同步GEONETWORK元数据</a>');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="leftPanel">
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div id="rightPanel">
<div class="col-md-10 col-sm-12">
<?php if ($this->msg or $this->messages) :?>
<div id="message">
<div id="message" class="alert alert-info">
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
@ -22,7 +23,6 @@
<?php endforeach;endif; ?>
</div>
<?php endif; ?>
<p>WESTDC有元数据<?php echo $this->mdcount->westdccount; ?>GEONETWORK有元数据<?php echo $this->mdcount->gncount; ?>条。</p>
<p><a href="/admin/data/sync/source/geonetwork">开始同步从GEONETWORK同步到WESTDC若有冲突以GEONETWORK为准</a> </p>
<p><a href="/admin/data/sync/source/westdc">开始同步从WESTDC同步到GEONETWORK</a> </p>
@ -48,3 +48,4 @@
</ul>
<?php endif; ?>
</div>
</div>

View File

@ -10,33 +10,32 @@ $this->breadcrumb('<a href="/admin/data">数据管理</a>');
$this->breadcrumb('数据版本管理');
$this->breadcrumb()->setSeparator(' > ');
?>
<div class="row">
<!-- 左侧导航 -->
<div id="leftPanel">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<!-- //左侧导航 -->
<!-- 页面内容 -->
<div id="rightPanel">
<div id="tabs-controller">
<ul>
<li class="box-shadow"><a class="text-shadow" href="/admin/data/version/">所有版本概况</a></li>
<li class="box-shadow active"><a class="text-shadow" href="/admin/data/version/ac/bydata">逐数据浏览</a></li>
</ul>
<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" href="/admin/data/version/ac/bydata">逐数据浏览</a>
</div>
<p>请输入元数据标题关键字进行搜索</p>
<form id="datasearch" class="search_form" action="/admin/data/version/ac/bydata">
<input type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" />
<button type="submit" class="btn" id="search_btn">搜索</button>
<div class="input-group form-group">
<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 id="datalist">
</div>
<div id="datalistZ">
<?php
if (count($this->paginator)):
echo "<ul>";
echo "<ul class=list-unstyled>";
$autoindex=0;
foreach ($this->paginator as $item):
$autoindex++;?>
<li>
<li class="well well-sm">
<p><a href="/data/<?php echo $item['uuid'];?>" target="_blank"><?php echo $item['title'];?></a></p>
<p>数据库中共有版本数:<?php echo $item['c'];?> (<a href="/admin/data/version/uuid/<?php echo $item['uuid'];?>">查看详细</a>)</p>
</li>
@ -46,6 +45,7 @@ $this->breadcrumb()->setSeparator(' > ');
<div class="pagenavi"><?= $this->paginator; ?></div>
</div>
</div>
</div>
<!-- //页面内容 -->
<script>
$('#wapper').width($('body').width()-300);

View File

@ -13,18 +13,19 @@ $this->breadcrumb('<a href="/admin/data">数据管理</a>');
$this->breadcrumb('查看数据作者');
$this->breadcrumb()->setSeparator(' > ');
?>
<div class="row">
<!-- 左侧导航 -->
<div id="leftPanel">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<!-- //左侧导航 -->
<!-- 页面内容 -->
<div id="rightPanel">
<div id="tabs-controller">
<ul>
<li class="box-shadow"><a class="text-shadow" href="/admin/data/version">所有版本概况</a></li>
<li class="box-shadow"><a class="text-shadow" href="/admin/data/version/ac/bydata">逐数据浏览</a></li>
<div class="col-md-10 col-sm-12">
<div class="form-group">
<ul class="nav nav-tabs" role="tablist">
<li class=""><a href="/admin/data/version">所有版本概况</a></li>
<li class=""><a href="/admin/data/version/ac/bydata">逐数据浏览</a></li>
</ul>
</div>
<?php
@ -43,6 +44,7 @@ $this->breadcrumb()->setSeparator(' > ');
?>
</div>
</div>
<!-- //页面内容 -->
<script>

View File

@ -4,59 +4,56 @@ $this->headTitle($this->config->title->author);
$this->headTitle()->setSeparator(' - ');
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->headScript()->appendFile('/js/jquery.colorbox-min.js');
$this->headScript()->appendFile('/js/lib/colorbox/jquery.colorbox-min.js');
$this->headLink()->appendStylesheet('/css/author.css');
$this->headLink()->appendStylesheet('/css/colorbox.css');
$this->headLink()->appendStylesheet('/js/lib/colorbox/colorbox.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
$this->breadcrumb('数据版本管理');
$this->breadcrumb()->setSeparator(' > ');
?>
<div class="row">
<!-- 左侧导航 -->
<div id="leftPanel">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<!-- //左侧导航 -->
<!-- 页面内容 -->
<div id="rightPanel">
<div id="tabs-controller">
<ul>
<li class="box-shadow <?php if(!$this->mdtitle) echo "active";?>"><a class="text-shadow" href="/admin/data/version">所有版本概况</a></li>
<li class="box-shadow"><a class="text-shadow" href="/admin/data/version/ac/bydata">逐数据浏览</a></li>
<div class="col-md-10 col-sm-12">
<div class="form-group">
<ul class="nav nav-tabs" role="tablist">
<li class="<?php if(!$this->mdtitle) echo "active";?>"><a href="/admin/data/version">所有版本概况</a></li>
<li class=""><a href="/admin/data/version/ac/bydata">逐数据浏览</a></li>
</ul>
</div>
<div id="datalist">
<?php
if (count($this->paginator)):
if ($this->mdtitle) echo "<h2>元数据:".$this->mdtitle."</h2>";
echo "<ul>";
echo "<ul class=list-unstyled>";
$autoindex=0;
$edited=false;
foreach ($this->paginator as $item):
$autoindex++;?>
<li id="list_<?php echo $item['id'];?>">
<p><a href="/data/<?php echo $item['uuid'];?>" target="_blank"><?php echo $item['title'];?></a>
<a href="/admin/data/version/uuid/<?php echo $item['uuid']; ?>">查看此数据所有版本</a>
<?php
if (!$edited && @$item['gid'])
{
$edited=true;
echo '<a href="/service/geonetwork?url=metadata.edit?id='.$item['gid'].'" target="_blank">编辑最新版本</a> ';
}
?>
</p>
<li id="list_<?php echo $item['id'];?>" class="well well-sm">
<h4><a href="/data/<?php echo $item['uuid'];?>" target="_blank"><?php echo $item['title'];?></a>
<small><a class="" href="/admin/data/version/uuid/<?php echo $item['uuid']; ?>">查看此数据所有版本</a>
<?php if (!$edited && @$item['gid'])
{ $edited=true; echo '<a href="/service/geonetwork?url=metadata.edit?id='.$item['gid'].'" target="_blank">编辑最新版本</a> ';} ?>
</small></h4>
<p>版本创建时间: <?php echo date("Y-m-d H:i",strtotime($item['ts_created']));?>
<?php if ($item['userid']) :
echo "发布人: ".(empty($item['realname'])?$item['username']:$item['realname'])." ";
endif;
?>
<a onclick="return confirm('是否确定删除该版本?');" href="javascript:action('delete','<?php echo $item['id'];?>');" class="more">删除</a>
<a onclick="return confirm('是否确定将这个版本恢复到geonetwork');" href="javascript:action('restore','<?php echo $item['id'];?>');" class="more">恢复到geonetwork</a>
<a href="/admin/data/version/ac/diff/id/<?php echo $item['id'];?>" class="more">与前一版对比</a>
<a href="/admin/data/version/ac/diff1/id/<?php echo $item['id'];?>" class="more">与前一发布或提交版对比</a>
<a onclick="$('#commit_submit').attr('onclick','commit(\'<?php echo $item['id'];?>\');');" href="#commitform" class="more inline">提交评审发布</a>
</p>
</p>
<h5>
<a class="label label-danger" onclick="return confirm('是否确定删除该版本?');" href="javascript:action('delete','<?php echo $item['id'];?>');" class="more">
<span class="glyphicon glyphicon-trash"> 删除</a></span>
<a class="label label-primary" class="label label-danger" onclick="return confirm('是否确定将这个版本恢复到geonetwork');" href="javascript:action('restore','<?php echo $item['id'];?>');" class="more">恢复到geonetwork</a>
<a class="label label-primary" href="/admin/data/version/ac/diff/id/<?php echo $item['id'];?>" class="more">与前一版对比</a>
<a class="label label-primary" href="/admin/data/version/ac/diff1/id/<?php echo $item['id'];?>" class="more">与前一发布或提交版对比</a>
<a onclick="$('#commit_submit').attr('onclick','commit(\'<?php echo $item['id'];?>\');');" href="#commitform" class="more inline label label-primary">提交评审发布</a>
</h5>
<?php if ($item['changelog']) : ?>
<p><?php echo $item['changelog']; ?></p>
<?php endif; ?>
@ -95,7 +92,7 @@ function action(ac,id){
}
});
}
$(".inline").colorbox({inline:true, width:"50%"});
$(".inline").colorbox({inline:true, width:"50%", height:"50%"});
function commit(id){
action('commit&changelog='+$('#changelog').val(),id);
}
@ -105,10 +102,10 @@ function commit(id){
<form>
<p>
<label>版本改动:</label><br />
<textarea class="full" style="resize:none;height:200px;" id="changelog"></textarea>
<textarea rows="12" class="full" style="width:100%;" id="changelog"></textarea>
<br /><small>请输入此版本与之前版本的差别</small>
</p>
<input type="button" onclick="" id="commit_submit" class="btn btn-green big" value="提交"/>
<input type="button" onclick="" id="commit_submit" class="btn btn-success pull-right" value="提交"/>
</form>
</div>
<div class="error"><img src="/images/alert_big_error.png" /><span></span></div>

View File

@ -8,15 +8,14 @@
$this->breadcrumb('<a href="/admin/down">申请管理</a>');
$this->breadcrumb('在线下载记录');
$this->breadcrumb()->setSeparator(' > ');
$this->headScript()->appendFile('/js/prototype.js');
?>
<div id="leftPanel">
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('down/left.phtml'); ?>
</div>
<div id="rightPanel">
<div class="col-md-10 col-sm-12">
<?php if ($this->msg or $this->messages) :?>
<div id="message">
<div id="message" class="alert alert-info">
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
@ -24,21 +23,17 @@
<?php endforeach;endif; ?>
</div>
<?php endif; ?>
<div class="right_title"><?php if(!empty($this->title)) echo $this->title;?><?php echo $this->count;?> 数据下载记录</div>
<div class="search">
<form action="/admin/down/data/" method="get">
<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" class="input-group">
<input type="text" name="keyword" value="<?php echo $this->keyword; ?>" class="form-control" placeholder="搜索关键字"/>
<input type="hidden" name="search" value='1' />
<ul>
<li><label>搜索关键字</label><input type="text" name="keyword" value="<?php echo $this->keyword; ?>" /></li>
<li><input type="submit" class="searchbtn" value="搜索" /></li>
</ul>
<span class="input-group-btn"><input type="submit" class="btn btn-default" value="搜索" /></span>
</form>
</div><!-- search DIV -->
<table><thead>
<tr>
<table class="stylized table table-bordered table-striped table-hover">
<thead><tr>
<td width='350'>数据</td>
<td width='150'>下载次数</td>
<td width='150'>操作</td>
@ -47,8 +42,8 @@
<?php $autoindex=0;?>
<?php foreach ($this->paginator as $item): ?>
<?php $autoindex++;?>
<tr class="<?php if($autoindex%2 == 0) echo 'even'; else echo 'odd'; ?>">
<td><a href="/data/<?php echo $item['uuid'];?>" target="_blank"><img src="/images/data.gif" /></a><a href="/admin/down/data/show/<?php echo $item['uuid'];?>"><?php echo $item['title'];?></a></td>
<tr>
<td><a href="/data/<?php echo $item['uuid'];?>" target="_blank"><span class="glyphicon glyphicon-hdd"></span></a> <a href="/admin/down/data/show/<?php echo $item['uuid'];?>"><?php echo $item['title'];?></a></td>
<td><?php echo $item['num']; ?></td>
<td>
<a href='/admin/down/data/show/<?php echo $item['uuid'];?>'>详细</a>
@ -60,3 +55,4 @@
</table>
<div class="pagenavi"><?= $this->paginator; ?></div>
</div>
</div>

View File

@ -7,12 +7,13 @@
$this->breadcrumb('<a href="/admin">后台首页</a>');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="leftPanel">
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('down/left.phtml'); ?>
</div>
<div id="rightPanel">
<div class="col-md-10 col-sm-12">
<?php if ($this->msg or $this->messages) :?>
<div id="message">
<div id="message" class="alert alert-info">
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
@ -20,18 +21,18 @@
<?php endforeach;endif; ?>
</div>
<?php endif; ?>
<div class="right_title">离线申请中可能与网站会员关联的账户列表 (<?php echo $this->count;?> 条)</div>
<div><a href="/admin/down/fixoffline/nouserid/1">查看所有无用户ID的申请记录</a></div>
<h4 class="right_title">离线申请中可能与网站会员关联的账户列表 (<?php echo $this->count;?> 条)</h4><hr />
<p><a class="btn btn-primary" href="/admin/down/fixoffline/nouserid/1">查看所有无用户ID的申请记录</a></p>
<form action="" method="get">
<table><thead>
<tr>
<td width='30'>选择</td>
<table class="stylized table table-bordered table-striped table-hover">
<thead><tr>
<td width='40'>选择</td>
<td width='80'>离线申请ID</td>
<td width='100'>离线申请姓名</td>
<td width='250'>离线申请单位</td>
<td width='100'>用户名</td>
<td width='100'>用户姓名</td>
<td width='250'>用户单位</td>
<td width='220'>用户单位</td>
</tr></thead>
<?php if (count($this->paginator)): ?>
<?php $autoindex=0;?>
@ -51,8 +52,9 @@
</table>
<div style="width:100%;text-align:left;">
<input type="hidden" name="fix" value='1' />
<input type="submit" value="匹配已选择的记录" onclick="return confirm('是否确定匹配这些用户')" />
<input class="btn btn-primary" type="submit" value="匹配已选择的记录" onclick="return confirm('是否确定匹配这些用户')" />
</div>
</form>
<div class="pagenavi"><?= $this->paginator; ?></div>
</div>
</div>

View File

@ -8,9 +8,12 @@
$this->breadcrumb('申请管理');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="leftPanel">
<div class="row">
<div class="hidden-sm col-md-2">
<?= $this->partial('down/left.phtml'); ?>
</div>
<div id="rightPanel">
<div class="col-md-10 col-sm-12">
<h3>申请管理</h3>
<hr />
</div>
</div>

View File

@ -1,9 +1,12 @@
<ul>
<li class="title">申请管理与在线下载记录</li>
<li><a href="/admin/down/offlineapp">离线数据申请管理</a></li>
<li><a href="/admin/down/offline">离线数据服务记录</a></li>
<li><a href="/admin/down/fixoffline">手动同步离线申请用户与网站帐号</a></li>
<li><a href="/admin/down/online">在线数据下载记录从20110908开始</a></li>
<li><a href="/admin/down/user">用户下载记录</a></li>
<li><a href="/admin/down/data">数据下载记录</a></li>
<div class="well">
<ul class="nav nav-stacked">
<li class="nav-header text-muted"><h4>申请管理与在线下载记录</h4></li>
<li class="nav-divider"></li>
<li id="Nav-down-offlineapp"><a href="/admin/down/offlineapp">离线数据申请管理</a></li>
<li id="Nav-down-offline"><a href="/admin/down/offline">离线数据服务记录</a></li>
<li id="Nav-down-fixoffline"><a href="/admin/down/fixoffline">手动同步离线申请用户与网站帐号</a></li>
<li id="Nav-down-online"><a href="/admin/down/online">在线数据下载记录从20110908开始</a></li>
<li id="Nav-down-user"><a href="/admin/down/user">用户下载记录</a></li>
<li id="Nav-down-data"><a href="/admin/down/data">数据下载记录</a></li>
</ul>
</div>

View File

@ -9,12 +9,13 @@
$this->breadcrumb('离线数据申请管理</a>');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="leftPanel">
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('down/left.phtml'); ?>
</div>
<div id="rightPanel">
<div class="col-md-10 col-sm-12">
<?php if ($this->msg or $this->messages) :?>
<div id="message">
<div id="message" class="alert alert-info">
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
@ -22,9 +23,9 @@
<?php endforeach;endif; ?>
</div>
<?php endif; ?>
<div class="right_title">所有无网站用户信息的离线数据服务记录 <?php echo $this->count;?></div>
<div class="right_title">所有无网站用户信息的离线数据服务记录 <?php echo $this->count;?></div><hr />
<?php if (count($this->paginator)): ?>
<table>
<table class="stylized table table-bordered table-striped table-hover">
<thead><tr>
<th width='70'>姓名</th>
<th width='150'>单位</th>
@ -39,13 +40,16 @@
<?php $autoindex=0;?>
<?php foreach ($this->paginator as $item): ?>
<?php $autoindex++;?>
<tr class="<?php if($autoindex%2 == 0) echo 'even'; else echo 'odd'; ?>">
<td><a href="/admin/user/show/id/<?php echo $item['userid'];?>"><img src="/images/user.gif" /></a> <a href="/admin/down/user/show/<?php echo $item['userid'];?>"><?= $item['username']?></a> </td>
<tr>
<td>
<a href="/admin/user/show/id/<?php echo $item['userid'];?>"><span class="glyphicon glyphicon-user"></span></a>
<a href="/admin/down/user/show/<?php echo $item['userid'];?>"><?= $item['username']?></a>
</td>
<td><?= $item['unit']; ?></td>
<td><?= $item['address']; ?></td>
<td><?= $item['postcode']; ?></td>
<td><textarea readonly="readonly" style="width:300px;height:100px;border:none;font-size:12px;<?php if($autoindex%2 == 0) echo 'background:#CCCCCC;'; else echo 'background:#FFF;'; ?>"><?= $item['project']; ?></textarea></td>
<td><textarea readonly="readonly" style="width:300px;height:100px;border:none;font-size:12px;<?php if($autoindex%2 == 0) echo 'background:#CCCCCC;'; else echo 'background:#FFF;'; ?>"><?= $item['datalist']; ?></textarea></td>
<td><textarea readonly="readonly" style="width:98%;height:100px;border:none;font-size:12px;"><?= $item['project']; ?></textarea></td>
<td><textarea readonly="readonly" style="width:98%;height:100px;border:none;font-size:12px;"><?= $item['datalist']; ?></textarea></td>
<td><?= date('Y-m-d',strtotime($item['ts_created'])); ?></td>
<td>
<a href="/admin/down/offline/edit/<?= $item['id']; ?>">编辑</a> |
@ -55,7 +59,9 @@
</td>
</tr>
<?php endforeach; ?>
</tbody></table>
</tbody>
</table>
<?php endif; ?>
<div class="pagenavi"><?= $this->paginator; ?></div>
</div>
</div>

View File

@ -6,19 +6,19 @@
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin">后台首页</a>');
$this->breadcrumb('<a href="/admin/down">申请管理</a>');
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
$this->headScript()->appendFile('/js/jquery.colorbox-min.js');
$this->headLink()->appendStylesheet('/css/author.css');
$this->headLink()->appendStylesheet('/css/colorbox.css');
$this->Theme->AppendPlus($this,'colorbox');
$this->Theme->AppendPlus($this,'uploadify');
$this->breadcrumb('离线数据申请管理</a>');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="leftPanel">
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('down/left.phtml'); ?>
</div>
<div id="rightPanel">
<div class="col-md-10 col-sm-12">
<?php if ($this->msg or $this->messages) :?>
<div id="message">
<div id="message" class="alert alert-info">
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
@ -26,39 +26,57 @@
<?php endforeach;endif; ?>
</div>
<?php endif; ?>
<div class="right_title">离线数据服务记录</div>
<a href="/admin/down/offline/add/1">添加新的离线服务记录</a> | <a href="/admin/down/offline/down/1">下载所有离线服务记录</a> | <a href="/admin/down/offline/update/1" onclick="return confirm('该操作需要较长时间,请不要中途刷新页面,是否确定继续?')">自动匹配离线下载用户与网站用户</a> | <a href="/admin/down/offline/emaillist/1">下载服务用户邮箱列表</a>
| <a href="/admin/down/offline/monthreport/1">下载上月服务记录(科技部上报)</a>
<!-- <h4>离线数据服务记录</h4> -->
<div class="form-group">
<a href="/admin/down/offline/add/1" class="btn btn-primary btn-sm">添加新的离线服务记录</a>
<a href="/admin/down/offline/down/1" class="btn btn-primary btn-sm">下载所有离线服务记录</a>
<a href="/admin/down/offline/update/1" class="btn btn-primary btn-sm" onclick="return confirm('该操作需要较长时间,请不要中途刷新页面,是否确定继续?')">自动匹配离线下载用户与网站用户</a>
<a href="/admin/down/offline/emaillist/1" class="btn btn-primary btn-sm">下载服务用户邮箱列表</a>
<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 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; ?>" />
<span class="input-group-btn"><button type="submit" class="btn btn-default" id="search_btn">搜索</button></span>
</form>
</div>
<?php if (count($this->paginator)): ?>
<table>
<thead><tr>
<th width='70'>姓名</th>
<th width='150'>单位</th>
<th width='150'>地址</th>
<th width='50'>邮编</th>
<th width='300'>用途</th>
<th width='300'>数据清单</th>
<th width='120'>申请时间</th>
<th width='100'>操作</th>
<table class="stylized table table-bordered table-striped table-hover">
<thead>
<tr>
<th width="52">姓名</th>
<th>单位</th>
<th>地址</th>
<th>邮编</th>
<th>用途</th>
<th>数据清单</th>
<th>申请时间</th>
<th>操作</th>
</tr></thead>
<tbody>
<?php $autoindex=0;?>
<?php foreach ($this->paginator as $item): ?>
<?php $autoindex++;?>
<tr class="<?php if($autoindex%2 == 0) echo 'even'; else echo 'odd'; ?>">
<td><a href="/admin/user/show/id/<?php echo $item['userid'];?>"><img src="/images/user.gif" /></a> <a href="/admin/down/user/show/<?php echo $item['userid'];?>"><?= $item['username']?></a> </td>
<td><a href="/admin/down/user/show/<?php echo $item['userid'];?>"><?= $item['username']?></a></td>
<td><?= $item['unit']; ?></td>
<td><?= $item['address']; ?></td>
<td><?= $item['postcode']; ?></td>
<td><textarea readonly="readonly" style="width:300px;height:100px;border:none;font-size:12px;<?php if($autoindex%2 == 0) echo 'background:#CCCCCC;'; else echo 'background:#FFF;'; ?>"><?= $item['project'].'['.$item['project_title'].' | '.$item['project_type'].' | '.$item['project_id'].']'; ?></textarea></td>
<td><textarea readonly="readonly" style="width:300px;height:100px;border:none;font-size:12px;<?php if($autoindex%2 == 0) echo 'background:#CCCCCC;'; else echo 'background:#FFF;'; ?>"><?= $item['datalist']; ?></textarea></td>
<td><textarea readonly="readonly" style="width:280px;height:100px;border:none;font-size:12px;"><?= $item['project'].'['.$item['project_title'].' | '.$item['project_type'].' | '.$item['project_id'].']'; ?></textarea></td>
<td><textarea readonly="readonly" style="width:280px;height:100px;border:none;font-size:12px;"><?= $item['datalist']; ?></textarea></td>
<td><?= date('Y-m-d',strtotime($item['ts_created'])); ?></td>
<td>
<a href="/admin/down/offline/edit/<?= $item['id']; ?><?php if(empty($this->page)) "" ; else echo "/page/".$this->page; ?>">编辑</a> |
<a href="/admin/down/offline/delete/<?= $item['id']; ?>" title="该操作将删除此记录并且删除与此记录有关的申请记录!请谨慎操作" onclick="return confirm('请仅删除测试用途的离线服务记录!')">删除</a> |
<a href="/admin/down/offlineapp/view/<?= $item['id']; ?>">PDF</a> |
<a href="/admin/down/offline/show/<?= $item['id']; ?>">详细</a> |
<a href="javascript:action('finish',<?= $item['id']; ?>);" onclick="return confirm('确定确定重新通过该申请?')">重新通过</a>
<a href="javascript:action('finish',<?= $item['id']; ?>);" onclick="return confirm('确定确定重新通过该申请?')">重新通过</a> |
<a href="javascript:void(0);" onclick="upload.showUploadForm(<?= $item['id'] ?>);">上传签字申请表</a>
<?php if(!empty($item['applicationform'])) { ?>
| <a href="/admin/down/applicationform/ac/view/?link=<?= urlencode($item['applicationform'])?>">查看签字申请表</a>
<?php }?>
</td>
</tr>
<?php endforeach; ?>
@ -66,6 +84,69 @@
<?php endif; ?>
<div class="pagenavi"><?= $this->paginator; ?></div>
</div>
</div><!-- row -->
<div class="modal fade" id="upload-form" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="myModalLabel">申请表上传</h4>
</div>
<div class="modal-body">
<form id="application-form">
<div id="fsUploadProgress">允许上传30M以内的 PDF 文件</div>
<input type="file" name="Filedata" id="file_upload" />
</form>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">取消上传</button>
<button class="btn btn-primary">上传完成</button>
</div>
</div>
</div>
</div>
<script>
//var param = {};
//var upload_count = 0;
var uploader;
var param;
$(function() {
$('#file_upload').uploadify({
'swf' : '/js/lib/uploadify/uploadify.swf',
'uploader' : '/admin/down/uploadapplicationform',
'multi' : false,
'auto' : true,
'fileTypeExts' : '*.pdf; *.jpg',
'onUploadSuccess' : function(file, data, response) {
upload.onsuccess(file, data, response);
},
'onUploadStart' : function(file) {
$('#file_upload').uploadify('settings','formData',param);
}
});
});
var upload = {
onsuccess : function(file, data, response){
_data = $.parseJSON(data);
if(!$.isEmptyObject(_data.error))
{
alert(_data.error);
}else{
$('#upload-form').modal('hide');
window.location = window.location;
}
},
showUploadForm : function(id){
$('#upload-form').modal('show');
param = {
"PHPSESSID" : "<?php echo session_id(); ?>",
'orderid' : id
};
}
};
</script>
<script>
function action(name,id){
var url;

View File

@ -9,12 +9,13 @@
$this->breadcrumb('离线数据服务记录管理</a>');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="leftPanel">
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('down/left.phtml'); ?>
</div>
<div id="rightPanel">
<div class="col-md-10 col-sm-12">
<?php if ($this->msg or $this->messages) :?>
<div id="message">
<div id="message" class="alert alert-info">
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
@ -22,6 +23,9 @@
<?php endforeach;endif; ?>
</div>
<?php endif; ?>
<a href="/admin/down/offline/add/1">添加新的离线服务记录</a>
<a class="btn btn-primary bt-sm" href="/admin/down/offline/add/1">添加新的离线服务记录</a><p></p>
<?= $this->form; ?>
</div>
</div>

View File

@ -6,20 +6,18 @@
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin">后台首页</a>');
$this->breadcrumb('<a href="/admin/down">申请管理</a>');
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
$this->headScript()->appendFile('/js/jquery.colorbox-min.js');
$this->headLink()->appendStylesheet('/css/author.css');
$this->headLink()->appendStylesheet('/css/colorbox.css');
$this->Theme->AppendPlus($this,'colorbox');
$this->Theme->AppendPlus($this,'uploadify');
$this->breadcrumb('离线数据申请管理</a>');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="leftPanel">
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('down/left.phtml'); ?>
</div>
<div id="rightPanel">
<div class="col-md-10 col-sm-12">
<?php if ($this->msg or $this->messages) :?>
<div id="message">
<div id="message" class="alert alert-info">
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
@ -27,57 +25,67 @@
<?php endforeach;endif; ?>
</div>
<?php endif; ?>
<!-- <h4>离线数据申请管理</h4> -->
<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>
<a href="/admin/down/offlineapp/ac/pending" class="btn btn-primary">待处理的申请</a>
<a href="/admin/down/offline" class="btn btn-success">已通过的申请(离线服务记录)</a>
</div>
<div class="right_title">离线数据申请管理</div>
<a href="/admin/down/offlineapp/reset/-1" onclick="return confirm('是否重置该申请?')">重置1年前的所有未收到申请表的记录</a>
| <a href="/admin/down/offlineapp/status/4">已收到的申请</a>
| <a href="/admin/down/offlineapp/status/-1">已拒绝的申请</a>
| <a href="/admin/down/offlineapp">待处理的申请</a>
| <a href="/admin/down/offline">已通过的申请(离线服务记录)</a>
<div class="search">
<form action="/admin/down/offlineapp" method="get">
<input name="search" value="1" type="hidden">
<ul>
<li><input name="q" value="" type="text" placeholder="搜索关键字"></li>
<li><input class="searchbtn" value="搜索" type="submit"></li>
</ul>
<div class="input-group form-group">
<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; ?>" />
<span class="input-group-btn"><button type="submit" class="btn btn-default" id="search_btn">搜索</button></span>
</form>
</div>
<div id="datalist">
<div id="">
<?php
if (count($this->paginator)):
echo "<ul>";
echo '<ul class="list-unstyled">';
$autoindex=0;
foreach ($this->paginator as $item):
$autoindex++;?>
<li id="list_<?php echo $item['id'];?>">
<p>
<a href="mailto:<?= $item['email']; ?>?subject=答复数据申请问题"><?= $item['username']; ?></a> |
<li id="list_<?php echo $item['id'];?>" class="well well-sm">
<h4>
<?= $autoindex ?>.
<a href="mailto:<?= $item['email']; ?>?subject=答复数据申请问题"><span class="glyphicon glyphicon-user"></span> <?= $item['username']; ?></a> |
申请时间:<?= date('Y-m-d',strtotime($item['ts_created'])); ?>
<?php if(!empty($item['ts_received'])) echo " | 收到时间:".date('Y-m-d',strtotime($item['ts_received']));?>
</p>
<p>
</h4>
<p class="text-muted">
单位:<?= $item['unit']; ?> |
地址:<?= $item['address']; ?> |
邮编:<?= $item['postcode']; ?>
</p>
<p>
<blockquote>
用途:
<p style="width:95%;margin:0px auto;"><q><cite><?= $item['project'].'['.$item['project_title'].' | '.$item['project_type'].' | '.$item['project_id'].']'; ?></cite></q></p>
</p>
</blockquote>
<p>数据清单:<?= $item['datalist']; ?></p>
<p>
数据清单:<?= $item['datalist']; ?>
</p>
<p>
<a href="/admin/down/offlineapp/view/<?= $item['id']; ?>">申请表</a> |
<?php if ($item['datastatus']==3) : ?>
<span id="start_<?= $item['id']; ?>"><a href="javascript:action('start',<?= $item['id']; ?>);" onclick="return confirm('确定收到该申请?')">收到</a></span> |
<a class="label label-info" href="/admin/down/offlineapp/view/<?= $item['id']; ?>">原始申请表</a>
<?php if ($item['datastatus']!=4) : ?>
<span id="start_<?= $item['id']; ?>">
<a class="label label-success" href="javascript:action('start',<?= $item['id']; ?>);" onclick="return confirm('确定收到该申请?')">收到</a>
</span>
<?php else: ?>
<a class="label label-success" href="javascript:action('finish',<?= $item['id']; ?>);" onclick="return confirm('确定确定通过该申请?')">通过</a>
<?php endif; ?>
<a href="javascript:action('finish',<?= $item['id']; ?>);" onclick="return confirm('确定确定通过该申请?')">通过</a> |
<a href="javascript:action('deleted',<?= $item['id']; ?>);" onclick="return confirm('确定将此记录删除?')">删除</a> |
<a href="javascript:action('deny',<?= $item['id']; ?>);" onclick="return confirm('确定拒绝该申请?')">拒绝</a> |
<a href="javascript:action('reset',<?= $item['id']; ?>);" onclick="return confirm('是否重置该申请?')">重置</a>
<a class="label label-danger" href="javascript:action('deleted',<?= $item['id']; ?>);" onclick="return confirm('确定将此记录删除?')">删除</a>
<?php if ($item['datastatus']!=-1) : ?>
<a class="label label-warning" href="javascript:action('deny',<?= $item['id']; ?>);" onclick="return confirm('确定拒绝该申请?')">拒绝</a>
<?php endif; ?>
<a class="label label-warning" href="javascript:action('reset',<?= $item['id']; ?>);" onclick="return confirm('是否重置该申请?')">重置</a>
<a class="label label-primary" href="javascript:void(0);" onclick="upload.showUploadForm(<?= $item['id'] ?>);">上传签字申请表</a>
<?php if(!empty($item['applicationform'])) { ?>
<a class="label label-primary" href="/admin/down/applicationform/ac/view/?link=<?= urlencode($item['applicationform'])?>">查看签字申请表</a>
<a class="label label-warning" href="/admin/down/offlineapps/ac/resetappform/?offlineappid=<?= $item['id'] ?>" onclick="return confirm('是否重置该申请表?')">重置申请表</a>
<?php }?>
</p>
</li>
<?php endforeach;
@ -86,8 +94,69 @@
<div class="pagenavi"><?= $this->paginator; ?></div>
</div>
</div>
</div>
<div class="modal fade" id="upload-form" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="myModalLabel">申请表上传</h4>
</div>
<div class="modal-body">
<form id="application-form">
<div id="fsUploadProgress">允许上传30M以内的 PDF 文件</div>
<input type="file" name="Filedata" id="file_upload" />
</form>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">取消上传</button>
<button class="btn btn-primary">上传完成</button>
</div>
</div>
</div>
</div>
<script>
//var param = {};
//var upload_count = 0;
var uploader;
var param;
$(function() {
$('#file_upload').uploadify({
'swf' : '/js/lib/uploadify/uploadify.swf',
'uploader' : '/admin/down/uploadapplicationform',
'multi' : false,
'auto' : true,
'fileTypeExts' : '*.pdf; *.jpg',
'onUploadSuccess' : function(file, data, response) {
upload.onsuccess(file, data, response);
},
'onUploadStart' : function(file) {
$('#file_upload').uploadify('settings','formData',param);
}
});
});
var upload = {
onsuccess : function(file, data, response){
_data = $.parseJSON(data);
if(!$.isEmptyObject(_data.error))
{
alert(_data.error);
}else{
$('#upload-form').modal('hide');
window.location = window.location;
}
},
showUploadForm : function(id){
$('#upload-form').modal('show');
param = {
"PHPSESSID" : "<?php echo session_id(); ?>",
'orderid' : id
};
}
};
function action(name,id){
var url;
if(name == "start")

View File

@ -0,0 +1,15 @@
<ul class="nav nav-pills">
<li class="<?= $this->navIn == "notreceived" ? "active":"" ?>">
<a href="/admin/down/offlineapps/ac/notreceived">未接收</a>
</li>
<li class="<?= $this->navIn == "nopdf" ? "active":"" ?>">
<a href="/admin/down/offlineapps/ac/nopdf">已接收未上传申请表</a>
</li>
<li class="<?= $this->navIn == "notpassed" ? "active":"" ?>">
<a href="/admin/down/offlineapps/ac/notpassed">待审批</a>
</li>
<li class="<?= $this->navIn == "passed" ? "active":"" ?>">
<a href="/admin/down/offlineapps/ac/passed">已上传申请表已通过</a>
</li>
</ul>

View File

@ -0,0 +1,74 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/admin.css');
$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 '<a href="/admin/down/applicationform/ac/download">点击下载</a>';
}
}
?>
<style>
table thead tr th {background:#EBF2F6;color:#444;}
.high{background:#444;color:#FFF;}
</style>
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('down/left.phtml'); ?>
</div>
<div class="col-md-10 col-sm-12">
<?= $this->partial('down/offlineapps-navpills.phtml',array('navIn'=>$this->navIn)); ?>
<form action="" method="get" class="search input-append">
<input type="hidden" name="search" value='1' />
<input type="text" name="keyword" class="q" value="<?php echo $this->keyword; ?>" />
<button type="submit" class="btn">搜索</button>
</form>
<table class="table table-bordered table-hover"><thead>
<tr>
<th><input type="checkbox" class="select_rows" data-tbody="list" /></th>
<th>申请者</th>
<th>提交时间</th>
<th>申请表</th>
<th>操作</th>
</tr></thead>
<?php if (count($this->paginator)): ?>
<tbody id="list">
<?php foreach ($this->paginator as $item): ?>
<tr>
<td><input type="checkbox" class="select_item" value="<?= $item['orderid']?>" /></td>
<td><?php echo $item['realname'].'['.$item['username'].'] <span title="'.$item['title'].'">'.mb_substr($item['title'],0,15,"UTF-8")."</span>";echo mb_strlen($item['title'],"UTF-8") > 15 ? "...":"";?></td>
<td><?php echo date("Y-m-d H:i",strtotime($item['ts_created']));?></td>
<td><?= applicationform($item['applicationform']) ?></td>
<td>
<a href="/admin/down/offlineapps/ac/view/?offlineappid=<?= $item['id'] ?>">查看详细</a>
<a href="/admin/down/offlineapps/ac/receive/?offlineappid=<?= $item['id'] ?>">接收</a>
<a href="/admin/down/offlineapps/ac/return/?offlineappid=<?= $item['id'] ?>">退回</a>
<a href="javascript:void(0);" onclick="upload.showUploadForm(<?= $item['id'] ?>);">上传申请表</a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
<?php endif; ?>
</table>
<div class="pagenavi"><?= $this->paginator; ?></div>
</div><!-- span9 -->
</div>
<script>
var _this = {};
sfadmin.init();
</script>
<?= $this->partial('down/offlineapps-uploaderform.phtml'); ?>

View File

@ -0,0 +1,74 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/admin.css');
$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 '<a href="/admin/down/applicationform/ac/view?link='.$form.'">查看</a>';
}
}
?>
<style>
table thead tr th {background:#EBF2F6;color:#444;}
.high{background:#444;color:#FFF;}
</style>
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('down/left.phtml'); ?>
</div>
<div class="col-md-10 col-sm-12">
<?= $this->partial('down/offlineapps-navpills.phtml',array('navIn'=>$this->navIn)); ?>
<form action="" method="get" class="search input-append">
<input type="hidden" name="search" value='1' />
<input type="text" name="keyword" class="q" value="<?php echo $this->keyword; ?>" />
<button type="submit" class="btn">搜索</button>
</form>
<table class="table table-bordered table-hover"><thead>
<tr>
<th><input type="checkbox" class="select_rows" data-tbody="list" /></th>
<th>申请者</th>
<th>提交时间</th>
<th>申请表</th>
<th>操作</th>
</tr></thead>
<?php if (count($this->paginator)): ?>
<tbody id="list">
<?php foreach ($this->paginator as $item): ?>
<tr>
<td><input type="checkbox" class="select_item" value="<?= $item['orderid']?>" /></td>
<td><?php echo $item['realname'].'['.$item['username'].'] <span title="'.$item['title'].'">'.mb_substr($item['title'],0,15,"UTF-8")."</span>";echo mb_strlen($item['title'],"UTF-8") > 15 ? "...":"";?></td>
<td><?php echo date("Y-m-d H:i",strtotime($item['ts_created']));?></td>
<td><?= applicationform($item['applicationform']) ?></td>
<td>
<a href="/admin/down/offlineapps/ac/view/?offlineappid=<?= $item['id'] ?>">查看详细</a>
<a href="/admin/down/offlineapps/ac/toauthor/?offlineappid=<?= $item['id'] ?>">发给作者</a>
<a href="javascript:void(0);" onclick="upload.showUploadForm(<?= $item['id'] ?>);">上传申请表</a>
<a href="/admin/down/offlineapps/ac/resetappform/?offlineappid=<?= $item['id'] ?>" onclick="return confirm('是否确认重置该用户的申请表?')">重置申请表</a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
<?php endif; ?>
</table>
<div class="pagenavi"><?= $this->paginator; ?></div>
</div><!-- span9 -->
</div>
<script>
var _this = {};
sfadmin.init();
</script>
<?= $this->partial('down/offlineapps-uploaderform.phtml'); ?>

View File

@ -0,0 +1,75 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/admin.css');
$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 '<a href="/admin/down/applicationform/ac/view?link='.$form.'">查看</a> <a href="/admin/down/applicationform/ac/download?link='.$form.'">下载</a>';
}
}
?>
<style>
table thead tr th {background:#EBF2F6;color:#444;}
.high{background:#444;color:#FFF;}
</style>
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('down/left.phtml'); ?>
</div>
<div class="col-md-10 col-sm-12">
<?= $this->partial('down/offlineapps-navpills.phtml',array('navIn'=>$this->navIn)); ?>
<form action="" method="get" class="search input-append">
<input type="hidden" name="search" value='1' />
<input type="text" name="keyword" class="q" value="<?php echo $this->keyword; ?>" />
<button type="submit" class="btn">搜索</button>
</form>
<table class="table table-bordered table-hover"><thead>
<tr>
<th><input type="checkbox" class="select_rows" data-tbody="list" /></th>
<th>申请者</th>
<th>提交时间</th>
<th>申请表</th>
<th>操作</th>
</tr></thead>
<?php if (count($this->paginator)): ?>
<tbody id="list">
<?php foreach ($this->paginator as $item): ?>
<tr>
<td><input type="checkbox" class="select_item" value="<?= $item['orderid']?>" /></td>
<td><?php echo $item['realname'].'['.$item['username'].'] <span title="'.$item['title'].'">'.mb_substr($item['title'],0,15,"UTF-8")."</span>";echo mb_strlen($item['title'],"UTF-8") > 15 ? "...":"";?></td>
<td><?php echo date("Y-m-d H:i",strtotime($item['ts_created']));?></td>
<td><?= applicationform($item['applicationform']) ?></td>
<td>
<a href="/admin/down/offlineapps/ac/view/?offlineappid=<?= $item['id'] ?>">查看详细</a>
<a href="/admin/down/offlineapps/ac/receive/?offlineappid=<?= $item['id'] ?>">接收</a>
<a href="/admin/down/offlineapps/ac/deny/offlineappid/<?= $item['id'] ?>">退回</a>
<a href="javascript:void(0);" onclick="upload.showUploadForm(<?= $item['id'] ?>);">上传申请表</a>
<a href="/admin/down/offlineapps/ac/resetappform/?offlineappid=<?= $item['id'] ?>" onclick="return confirm('是否确认重置该用户的申请表?')">重置申请表</a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
<?php endif; ?>
</table>
<div class="pagenavi"><?= $this->paginator; ?></div>
</div><!-- span9 -->
</div>
<script>
var _this = {};
sfadmin.init();
</script>
<?= $this->partial('down/offlineapps-uploaderform.phtml'); ?>

View File

@ -0,0 +1,43 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/admin.css');
$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 '<a href="/admin/down/applicationform/ac/download">点击下载</a>';
}
}
?>
<style>
table thead tr th {background:#EBF2F6;color:#444;}
.high{background:#444;color:#FFF;}
</style>
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('down/left.phtml'); ?>
</div>
<div class="col-md-10 col-sm-12">
<?= $this->partial('down/offlineapps-navpills.phtml',array('navIn'=>$this->navIn)); ?>
<h2>发给作者</h2>
</div><!-- span9 -->
</div>
<script>
var _this = {};
sfadmin.init();
</script>
<?= $this->partial('down/offlineapps-uploaderform.phtml'); ?>

View File

@ -0,0 +1,19 @@
<div id="upload-form" class="modal hide fade" tabindex="-1" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="myModalLabel">申请表上传</h3>
</div>
<div class="modal-body">
<form id="application-form">
<div id="fsUploadProgress">允许上传20M以内的 PDF 文件</div>
<input type="file" name="Filedata" id="file_upload" />
</form>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">取消上传</button>
<button class="btn btn-primary">上传完成</button>
</div>
</div>
<script>
_this.SessionID = '<?php echo session_id(); ?>';
</script>

View File

@ -0,0 +1,64 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/admin.css');
$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 '<a href="/admin/down/applicationform/ac/download">点击下载</a>';
}
}
?>
<style>
table thead tr th {background:#EBF2F6;color:#444;}
.high{background:#444;color:#FFF;}
</style>
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('down/left.phtml'); ?>
</div>
<div class="col-md-10 col-sm-12">
<?= $this->partial('down/offlineapps-navpills.phtml',array('navIn'=>$this->navIn)); ?>
<h2>查看详细</h2>
<ul>
<li>申请者:<?= $this->data[0]['username'] ?></li>
<li>单位:<?= $this->data[0]['unit'] ?></li>
<li>电话:<?= $this->data[0]['phone'] ?></li>
<li>地址:<?= $this->data[0]['address'] ?></li>
<li>邮编:<?= $this->data[0]['postcode'] ?></li>
<li>未签字pdf<?= $this->data[0]['pdflink'] ?></li>
<li>签字pdf<?= ( isset($this->data[0]['applicationform']) && !empty($this->data[0]['applicationform'])) ? '<a href="">查看</a> <a href="">下载</a>':"未提交"?></li>
<li>数据列表:<?= $this->data[0]['datalist'] ?></li>
<li>邮箱:<?= $this->data[0]['email'] ?></li>
<li>项目编号:<?= $this->data[0]['project_id'] ?></li>
<li>项目类型:<?= $this->data[0]['project_type'] ?></li>
<li>项目名称:<?= $this->data[0]['project_title'] ?></li>
<li>项目负责人:<?= $this->data[0]['leader'] ?></li>
<li>项目负责人职称:<?= $this->data[0]['leadertitle'] ?></li>
<li>项目介绍:<?= $this->data[0]['project'] ?></li>
<li>申请时间:<?= $this->data[0]['ts_created'] ?></li>
<li>接收时间:<?= $this->data[0]['ts_received'] ?></li>
<li>通过时间:<?= $this->data[0]['ts_approved'] ?></li>
</ul>
</div><!-- span9 -->
</div>
<script>
var _this = {};
sfadmin.init();
</script>
<?= $this->partial('down/offlineapps-uploaderform.phtml'); ?>

View File

@ -0,0 +1,49 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->breadcrumb()->setSeparator(' > ');
?>
<style>
table thead tr th {background:#EBF2F6;color:#444;}
.high{background:#444;color:#FFF;}
</style>
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('down/left.phtml'); ?>
</div>
<div class="col-md-10 col-sm-12">
<?= $this->partial('down/offlineapps-navpills.phtml',array('navIn'=>$this->navIn)); ?>
<form action="" method="get" class="search input-append">
<input type="hidden" name="search" value='1' />
<input type="text" name="keyword" class="q" value="<?php echo $this->keyword; ?>" />
<button type="submit" class="btn">搜索</button>
</form>
<table class="table table-bordered table-hover"><thead>
<tr>
<th width='600'>元数据标题</th>
<th width='120'>责任编辑</th>
<th width='120'>接收时间</th>
<th width='180'>操作</th>
</tr></thead>
<?php if (count($this->paginator)): ?>
<tbody id="list">
<?php foreach ($this->paginator as $item): ?>
<tr>
<td><a href="/data/<?php echo $item['uuid'];?>"><?= $item['title']?></a></td>
<td><?php echo $item['realname'].'['.$item['username'].']'; ?></td>
<td><?php echo date("Y-m-d H:i",strtotime($item['ts_accepted']));?></td>
<td>
<a href="/admin/review/changeadmin/?id=<?php echo $item['id'];?>">分配编辑</a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
<?php endif; ?>
</table>
<div class="pagenavi"><?= $this->paginator; ?></div>
</div><!-- span9 -->
</div>

View File

@ -10,14 +10,12 @@
$this->breadcrumb()->setSeparator(' > ');
$this->headScript()->appendFile('/js/prototype.js');
?>
<div id="divContent">
<div id="leftPanel">
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('down/left.phtml'); ?>
</div>
<?php if ($this->msg or $this->messages) :?>
<div id="message">
<div id="message" class="alert alert-info">
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
@ -25,10 +23,8 @@
<?php endforeach;endif; ?>
</div>
<?php endif; ?>
<div id="rightPanel">
<table>
<div class="col-md-10 col-sm-12">
<table class="stylized table table-bordered table-striped table-hover">
<tr><td width='80'>姓名</td><td><?php echo $this->infos['username'];?></td></tr>
<tr><td>单位</td><td><?php echo $this->infos['unit'];?></td></tr>
<tr><td>电话</td><td><?php echo $this->infos['phone'];?></td></tr>
@ -36,7 +32,7 @@
<tr><td>邮编</td><td><?php echo $this->infos['postcode'];?></td></tr>
<tr><td>电话</td><td><?php echo $this->infos['phone'];?></td></tr>
<tr><td>Email</td><td><?php echo $this->infos['email'];?></td></tr>
<tr><td>用途</td><td><textarea style="width:500px;height:200px;font-size:12px;" readonly="readonly"><?php echo $this->infos['project'];?></textarea></td></tr>
<tr><td>用途</td><td><textarea style="width: 99%; height: 163px;" readonly="readonly"><?php echo $this->infos['project'];?></textarea></td></tr>
<tr><td>时间</td><td><?php echo date('Y-m-d H:i:s', strtotime($this->infos['ts_created']));?></td></tr>
</table>
</div>

View File

@ -9,11 +9,12 @@
$this->breadcrumb('在线数据下载记录</a>');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="leftPanel">
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('down/left.phtml'); ?>
</div>
<?php if ($this->msg or $this->messages) :?>
<div id="message">
<div id="message" class="alert alert-info">
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
@ -21,42 +22,40 @@
<?php endforeach;endif; ?>
</div>
<?php endif; ?>
<div id="rightPanel">
<div class="right_title"><?php if(!empty($this->title)) echo $this->title;?>共有 <?php echo $this->count;?> 条在线下载记录</div>
<div class="search">
<form action="/admin/down/search/" method="get">
<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 input-group">
<input type="text" name="keyword" value="<?php echo $this->keyword; ?>" class="form-control" placeholder="搜索关键字" />
<input type="hidden" name="search" value='1' />
<ul>
<li><label>搜索关键字</label><input type="text" name="keyword" value="<?php echo $this->keyword; ?>" /></li>
<li><input type="submit" class="searchbtn" value="搜索" /></li>
</ul>
<span class="input-group-btn"><input class="btn btn-default" type="submit" class="searchbtn" value="搜索" /></span>
</form>
</div><!-- search DIV -->
<table>
<thead>
<tr>
<div class="table-responsive">
<table class="stylized table table-bordered table-striped table-hover">
<thead><tr>
<td width='100'>姓名</td>
<td width='150'>单位</td>
<td width='350'>数据</td>
<td width='300'>用途</td>
<td width='120'>下载时间</td>
<td width='100'>操作</td>
</tr>
</thead>
</tr></thead>
<?php if (count($this->paginator)): ?>
<?php $autoindex=0;?>
<?php foreach ($this->paginator as $item): ?>
<?php $autoindex++;?>
<tr class="<?php if($autoindex%2 == 0) echo 'even'; else echo 'odd'; ?>">
<td><a href="/admin/user/show/id/<?php echo $item['userid'];?>"><img src="/images/user.gif" /></a><a href="/admin/down/user/show/<?php echo $item['userid'];?>"><?= $item['username']?></a> </td>
<tr>
<td>
<a href="/admin/user/show/id/<?php echo $item['userid'];?>"><span class="glyphicon glyphicon-user"></span></a>
<a href="/admin/down/user/show/<?php echo $item['userid'];?>"><?= $item['username']?></a>
</td>
<td><?= $item['unit']?></td>
<td><a href="/data/<?php echo $item['uuid'];?>" target="_blank"><img src="/images/data.gif" /></a><a href="/admin/down/data/show/<?php echo $item['uuid'];?>"><?php echo $item['title'];?></a></td>
<td><textarea readonly="readonly" style="width:300px;height:100px;border:none;font-size:12px;<?php if($autoindex%2 == 0) echo 'background:#CCCCCC;'; else echo 'background:#FFF;'; ?>"><?php echo $item['project']; ?></textarea></td>
<td>
<a href="/data/<?php echo $item['uuid'];?>" target="_blank"><span class="glyphicon glyphicon-hdd"></span></a>
<a href="/admin/down/data/show/<?php echo $item['uuid'];?>"><?php echo $item['title'];?></a>
</td>
<td><textarea readonly="readonly" style="width:98%;height:98%;border:none;font-size:12px;background:#FFF;"><?php echo $item['project']; ?></textarea></td>
<td><?php echo date('Y-m-d H:i:s', strtotime($item['ts_created'])); ?></td>
<td>
<a href='/admin/down/online/show/<?php echo $item['id'];?>'>详细</a>
@ -66,5 +65,7 @@
<?php endforeach; ?>
<?php endif; ?>
</table>
</div>
<div class="pagenavi"><?= $this->paginator; ?></div>
</div>
</div>

View File

@ -10,12 +10,12 @@
$this->breadcrumb()->setSeparator(' > ');
$this->headScript()->appendFile('/js/prototype.js');
?>
<div id="leftPanel">
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('down/left.phtml'); ?>
</div>
<?php if ($this->msg or $this->messages) :?>
<div id="message">
<div id="message" class="alert alert-info">
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
@ -23,8 +23,8 @@
<?php endforeach;endif; ?>
</div>
<?php endif; ?>
<div id="rightPanel">
<table>
<div class="col-md-10 col-sm-12">
<table class="stylized table table-bordered table-striped table-hover">
<tr><td>用户</td><td><a href="/admin/user/show/id/<?php echo $this->infos['uid'];?>"><?php echo $this->infos['uname'];?> </a> <a href="/admin/down/user/show/<?php echo $this->infos['uid'];?>">用户下载记录 </a></td></tr>
<tr><td>姓名</td><td><?php echo $this->infos['username'];?></td></tr>
<tr><td>数据</td><td><a href="/data/<?php echo $this->infos['uuid'];?>"><?php echo $this->infos['title'];?></a><a href="/admin/down/data/show/<?php echo $this->infos['uuid'];?>">数据下载记录</a></td></tr>
@ -34,7 +34,7 @@
<tr><td>邮编</td><td><?php echo $this->infos['postcode'];?></td></tr>
<tr><td>电话</td><td><?php echo $this->infos['phone'];?></td></tr>
<tr><td>Email</td><td><?php echo $this->infos['email'];?></td></tr>
<tr><td>用途</td><td><textarea style="width:500px;height:200px;font-size:12px;"><?php echo $this->infos['project'];?></textarea></td></tr>
<tr><td>用途</td><td><textarea style="width:99%;height:200px;font-size:12px;"><?php echo $this->infos['project'];?></textarea></td></tr>
<tr><td>项目编号</td><td><?php echo $this->infos['project_id'];?></td></tr>
<tr><td>项目标题</td><td><?php echo $this->infos['project_title'];?></td></tr>
<tr><td>项目类型</td><td><?php echo $this->infos['project_type'];?></td></tr>
@ -42,3 +42,4 @@
<tr><td>时间</td><td><?php echo date('Y-m-d H:i:s', strtotime($this->infos['ts_created']));?></td></tr>
</table>
</div>
</div>

View File

@ -12,10 +12,11 @@
$this->headScript()->appendFile('/js/jquery.colorbox-min.js');
$this->headLink()->appendStylesheet('/css/colorbox.css');
?>
<div id="leftPanel">
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div id="rightPanel">
<div class="col-md-10 col-sm-12">
<?php
if(!empty($this->error))
{
@ -54,6 +55,7 @@
}
?>
</div>
</div>
<script>
$('#wapper').width($('body').width()-300);
function sendmail(){

View File

@ -10,12 +10,12 @@
$this->breadcrumb()->setSeparator(' > ');
$this->headScript()->appendFile('/js/prototype.js');
?>
<div id="leftPanel">
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('down/left.phtml'); ?>
</div>
<?php if ($this->msg or $this->messages) :?>
<div id="message">
<div id="message" class="alert alert-info">
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
@ -23,11 +23,14 @@
<?php endforeach;endif; ?>
</div>
<?php endif; ?>
<div id="rightPanel">
<div><a href="/data/<?php echo $this->infos['uuid'];?>" target="_blank"><img src="/images/data.gif" /></a><?php echo $this->infos['title']; ?>” 的下载记录</div>
<table><thead>
<tr>
<div class="col-md-10 col-sm-12">
<h4>
<a href="/data/<?php echo $this->infos['uuid'];?>" target="_blank">
<span class="glyphicon glyphicon-hdd"></span><?php echo $this->infos['title']; ?></a> 的下载记录
</h4>
<hr />
<table class="stylized table table-bordered table-striped table-hover">
<thead><tr>
<td width='120'>用户</td>
<td width='350'>姓名</td>
<td width='150'>下载时间</td>
@ -37,8 +40,8 @@
<?php $autoindex=0;?>
<?php foreach ($this->paginator as $item): ?>
<?php $autoindex++;?>
<tr class="<?php if($autoindex%2 == 0) echo 'even'; else echo 'odd'; ?>">
<td><a href="/admin/user/show/id/<?php echo $item['userid'];?>"><img src="/images/user.gif" /></a> <a href="/admin/down/user/show/<?php echo $item['userid'];?>"><?= $item['username']?></a> </td>
<tr >
<td><a href="/admin/user/show/id/<?php echo $item['userid'];?>"><span class="glyphicon glyphicon-user"></span></a> <a href="/admin/down/user/show/<?php echo $item['userid'];?>"><?= $item['username']?></a> </td>
<td><a href="/admin/down/data/show/<?php echo $item['uuid'];?>"><?php echo $item['realname'];?></a></td>
<td><?php echo date('Y-m-d H:i:s', strtotime($item['ts_created'])); ?></td>
<td>
@ -55,3 +58,4 @@
</table>
<div class="pagenavi"><?= $this->paginator; ?></div>
</div>
</div>

View File

@ -10,12 +10,12 @@
$this->breadcrumb()->setSeparator(' > ');
$this->headScript()->appendFile('/js/prototype.js');
?>
<div id="leftPanel">
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('down/left.phtml'); ?>
</div>
<?php if ($this->msg or $this->messages) :?>
<div id="message">
<div id="message" class="alert alert-info">
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
@ -23,11 +23,11 @@
<?php endforeach;endif; ?>
</div>
<?php endif; ?>
<div id="rightPanel">
<div style="font-size:16px;line-height:30px;">用户 “<?php echo $this->infos['username']; ?>” 的下载记录</div>
<table><thead>
<tr>
<div class="col-md-10 col-sm-12">
<h4>用户 “<?php echo $this->infos['username']; ?>” 的下载记录dd</h4>
<hr />
<table class="stylized table table-bordered table-striped table-hover">
<thead><tr>
<td width='100'>姓名</td>
<td width='350'>数据</td>
<td width='150'>下载时间</td>
@ -37,9 +37,9 @@
<?php $autoindex=0;?>
<?php foreach ($this->paginator as $item): ?>
<?php $autoindex++;?>
<tr class="<?php if($autoindex%2 == 0) echo 'even'; else echo 'odd'; ?>">
<td><a href="/admin/user/show/id/<?php echo $item['userid'];?>"><img src="/images/user.gif" /></a> <a href="/admin/down/user/show/<?php echo $item['userid'];?>"><?= $item['username']?></a> </td>
<td><a href="/data/<?php echo $item['uuid'];?>" target="_blank"><img src="/images/data.gif" /></a><a href="/admin/down/data/show/<?php echo $item['uuid'];?>"><?php echo $item['title'];?></a>(<?php echo $item['filesize'];?>MB)</td>
<tr>
<td><a href="/admin/user/show/id/<?php echo $item['userid'];?>"><span class="glyphicon glyphicon-user"></span></a> <a href="/admin/down/user/show/<?php echo $item['userid'];?>"><?= $item['username']?></a> </td>
<td><a href="/data/<?php echo $item['uuid'];?>" target="_blank"><span class="glyphicon glyphicon-hdd"></span></a><a href="/admin/down/data/show/<?php echo $item['uuid'];?>"><?php echo $item['title'];?></a>(<?php echo $item['filesize'];?>MB)</td>
<td><?php echo date('Y-m-d H:i:s', strtotime($item['ts_created'])); ?></td>
<td>
<?php if($item['onlineappid']>0){echo '<a href="/admin/down/online/show/'.$item['onlineappid'].'">详细</a>';} ?>
@ -53,3 +53,4 @@
</table>
<div class="pagenavi"><?= $this->paginator; ?></div>
</div>
</div>

View File

@ -8,10 +8,10 @@
$this->breadcrumb('申请管理');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="leftPanel">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('down/left.phtml'); ?>
</div>
<div id="rightPanel">
<div class="col-md-10 col-sm-12">
<div class="right_title">离线申请中可能与网站会员关联的账户列表 (<?php echo $this->count;?> 条)</div>

View File

@ -8,14 +8,14 @@
$this->breadcrumb('<a href="/admin/down">申请管理</a>');
$this->breadcrumb('在线下载记录');
$this->breadcrumb()->setSeparator(' > ');
$this->headScript()->appendFile('/js/prototype.js');
?>
<div id="leftPanel">
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('down/left.phtml'); ?>
</div>
<div id="rightPanel">
<div class="col-md-10 col-sm-12">
<?php if ($this->msg or $this->messages) :?>
<div id="message">
<div id="message" class="alert alert-info">
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
@ -23,21 +23,18 @@
<?php endforeach;endif; ?>
</div>
<?php endif; ?>
<div class="right_title"><?php if(!empty($this->title)) echo $this->title;?><?php echo $this->count;?> 数据下载记录</div>
<div class="search">
<form action="/admin/down/user/" method="get">
<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" class="input-group">
<input type="text" name="keyword" value="<?php echo $this->keyword; ?>" class="form-control" placeholder="搜索关键字" />
<input type="hidden" name="search" value='1' />
<ul>
<li><label>搜索关键字</label><input type="text" name="keyword" value="<?php echo $this->keyword; ?>" /></li>
<li><input type="submit" class="searchbtn" value="搜索" /></li>
</ul>
<span class="input-group-btn"><input type="submit" class="btn btn-default" value="搜索" /></span>
</form>
</div><!-- search DIV -->
<table><thead>
<tr>
<table class="stylized table table-bordered table-striped table-hover">
<thead><tr>
<td width='150'>姓名</td>
<td width='350'>单位</td>
<td width='150'>下载次数</td>
@ -48,15 +45,14 @@
<?php foreach ($this->paginator as $item): ?>
<?php $autoindex++;?>
<tr class="<?php if($autoindex%2 == 0) echo 'even'; else echo 'odd'; ?>">
<td><a href="/admin/user/show/id/<?php echo $item['uid'];?>"><img src="/images/user.gif" /></a> <a href="/admin/down/user/show/<?php echo $item['uid'];?>"><?= $item['realname']?></a> </td>
<td><a href="/admin/user/show/id/<?php echo $item['uid'];?>"><span class="glyphicon glyphicon-user"></span></a> <a href="/admin/down/user/show/<?php echo $item['uid'];?>"><?= $item['realname']?></a> </td>
<td><?php echo $item['unit']; ?></td>
<td><?php echo $item['num']; ?></td>
<td>
<a href='/admin/down/user/show/<?php echo $item['uid'];?>'>详细</a>
</td>
<td><a href='/admin/down/user/show/<?php echo $item['uid'];?>'>详细</a></td>
</tr>
<?php endforeach; ?>
<?php endif; ?>
</table>
<div class="pagenavi"><?= $this->paginator; ?></div>
</div>
</div>

View File

@ -1,3 +1,7 @@
<?php if(!empty($this->pageID)) {?>
<script>$('#Nav-<?= $this->pageID?>').addClass("active");</script>
<?php } ?>
<?php
$path = explode('?',$_SERVER['REQUEST_URI']);
$url = explode('/',$path[0]);
if (isset($url[2]) && isset($url[3]))
$text = '-'.$url[2].'-'.$url[3];
?>
<script>$('#Nav<?= $text; ?>').addClass("active");</script>

View File

@ -1,8 +1,13 @@
<div class="masthead">
<div class="navbar">
<div class="navbar-inner">
<div class="container">
<ul class="nav" id="mainmenu">
<div class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<button data-target=".navbar-collapse" data-toggle="collapse" class="navbar-toggle collapsed" type="button">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav" id="mainmenu">
<!-- CSS Tabs -->
<li><a href="/"><span>前台</span></a></li>
<li><a href="/admin"><span>后台首页</span></a></li>
@ -14,13 +19,13 @@
<li><a href="/admin/stat"><span>统计数据</span></a></li>
<li><a href="/admin/sys"><span>系统管理</span></a></li>
</ul>
<p class="navbar-text pull-right">
<p class="navbar-text pull-right hidden-xs hidden-sm">
<?php
$auth = Zend_Auth::getInstance();
if($auth->hasIdentity())
{
if($auth->hasIdentity()) {
$user = $auth->getIdentity();
echo '<a href="/account/edit">'.$user->username.'</a> <a href="/account/logout">注销</a>';
echo '<a href="/account/edit"><span class="glyphicon glyphicon-user"></span> '.$user->username.'</a>&nbsp;
<a href="/account/logout"><span class="glyphicon glyphicon-off"></span> 注销</a>';
}
?>
</p>

View File

@ -8,9 +8,12 @@
$this->breadcrumb('黑河数据集');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="leftPanel">
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('heihe/left.phtml'); ?>
</div>
<div id="rightPanel">
</div>
<div>
</div>

View File

@ -1,4 +1,7 @@
<ul>
<li class="title">黑河数据集</li>
<li><a href="/admin/heihe/project">项目</a></li>
<div class="well">
<ul class="nav nav-stacked">
<li class="nav-header text-muted"><h4>黑河数据集</h4></li>
<li class="nav-divider"></li>
<li id="Nav-heihe-project"><a class="active" href="/admin/heihe/project">项目</a></li>
</ul>
</div>

View File

@ -13,15 +13,17 @@
$this->headLink()->appendStylesheet('/css/colorbox.css');
$this->headLink()->appendStylesheet('/css/author.css');
?>
<div id="leftPanel">
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('heihe/left.phtml'); ?>
</div>
<div id="rightPanel">
<div id="col-md-10 col-sm-12">
<?php if(!empty($this->searchLink)){ ?>
<div>
<form id="datasearch" class="search_form" action="<?= $this->searchLink ?>">
<input type="text" id="keyword" name="q" value="<?= $this->searchKeyword; ?>" />
<button type="submit" class="btn" id="search_btn">搜索</button>
<div class="input-group form-group">
<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>
<?php }?>
@ -31,7 +33,7 @@
<div id="datalist">
<?php
if (count($this->paginator)):
echo "<ul>";
echo "<ul class=input-prepend>";
$autoindex=0;
foreach ($this->paginator as $item):
$autoindex++;
@ -59,6 +61,7 @@
</div>
<div class="pagenavi"><?= $this->paginator; ?></div>
</div>
</div>
<script>
function invite(id){
var dom = "#inviteBtn_"+id;

View File

@ -10,7 +10,7 @@
$this->breadcrumb('后台管理首页');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="OneColumn">
<div id="OneColumn" class="row">
<?= $this->partial('data/left.phtml'); ?>
<?= $this->partial('down/left.phtml'); ?>
<?= $this->partial('user/left.phtml'); ?>
@ -18,11 +18,6 @@
<?= $this->partial('news/left.phtml'); ?>
<?= $this->partial('stat/left.phtml'); ?>
<?= $this->partial('sys/left.phtml'); ?>
<ul>
<li class="title">其他工具</a></li>
<li><a href="/admin/watermd">WATER元数据处理工具</a></li>
<li><a href="/admin/test">数据测试管理</a></li>
</ul>
</div>
<!--
<script>

View File

@ -4,33 +4,34 @@
$this->headTitle()->setSeparator(' - ');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin">后台首页</a>');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->breadcrumb('<a href="/admin/news">新闻中心</a>');
$this->breadcrumb('栏目添加');
?>
<div class="row">
<div class="span3">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('news/left.phtml'); ?>
</div>
<div class="span9">
<div class="col-md-10 col-sm-12">
<?php if (!empty($this->error)) :?>
<div id="message">
<div id="message" class="alert alert-info">
<?php echo $this->error;?>
</div>
<?php endif; ?>
<?php if(empty($this->msg)) {?>
<form id="sampleform" method="post" action="#">
<fieldset>
<legend>栏目添加</legend>
<p>
<label class="required" for="ctitle">栏目标题</label><br/>
<input type="text" id="ctitle" class="half" value="<?php if(!empty($this->info['title'])) echo $this->info['title'];?>" name="ctitle"/>
</p>
<p>
<label class="required" for="ptype">栏目类型</label><br/>
<select name="ptype">
<h4>栏目添加</h4>
<hr />
<form id="sampleform" method="post" action="#" class="form-horizontal">
<div class="form-group">
<label for="ctitle" class="required col-md-2 col-sm-2 col-xs-2 control-label">栏目标题:</label>
<div class="col-md-4 col-sm-4 col-xs-4">
<input type="text" id="ctitle" class="half form-control" value="<?php if(!empty($this->info['title'])) echo $this->info['title'];?>" name="ctitle"/>
</div>
</div>
<div class="form-group">
<label for="ptype" class="required col-md-2 col-sm-2 col-xs-2 control-label">栏目类型:</label>
<div class="col-md-4 col-sm-4 col-xs-4">
<select name="ptype" class="form-control">
<?php if(!empty($this->ptype)) :?>
<?php foreach($this->ptype as $k=>$v) : ?>
<?php if(empty($this->info['ptype'])) {?>
@ -46,11 +47,12 @@
<?php endforeach;?>
<?php endif; ?>
</select>
</p>
<p>
<label>父级栏目</label><br />
<select name="fid">
</div>
</div>
<div class="form-group">
<label for="fid" class="required col-md-2 col-sm-2 col-xs-2 control-label">父级栏目:</label>
<div class="col-md-4 col-sm-4 col-xs-4">
<select name="fid" class="form-control" >
<option value="0"></option>
<?php if(!empty($this->categories)) :?>
<?php foreach($this->categories as $v) : ?>
@ -73,19 +75,30 @@
<?php endforeach;?>
<?php endif; ?>
</select>
</p>
<p>
<label class="required" for="code">栏目URL</label><br/>
<input type="text" id="code" class="half" value="<?php if(!empty($this->info['code'])) echo $this->info['code'];?>" name="code"/>(仅小写英文字母与数字)
<small>如填写: technology 则前台访问地址为: http://westdc.westgis.ac.cn/news/technology </small>
</p>
</div>
</div>
<div class="form-group">
<label for="code" class="required col-md-2 col-sm-2 col-xs-2 control-label">栏目URL</label>
<div class="col-md-4 col-sm-4 col-xs-4">
<input type="text" id="code" class="half form-control" value="<?php if(!empty($this->info['code'])) echo $this->info['code'];?>" name="code"/>
<h5>(仅小写英文字母与数字)</h5>
<h5><small>如填写: technology 则前台访问地址为: http://westdc.westgis.ac.cn/news/technology </small></h5>
</div>
</div>
<div class="form-group">
<label for="title_en" class="required col-md-2 col-sm-2 col-xs-2 control-label">英文标题:</label>
<div class="col-md-4 col-sm-4 col-xs-4">
<input type="text" id="title_en" class="half form-control" value="<?php if(!empty($this->info['title_en'])) echo $this->info['title_en'];?>" name="title_en" />
</div>
</div>
<div class="form-group">
<label for="" class="required col-md-2 col-sm-2 col-xs-2 control-label"></label>
<div class="col-md-4 col-sm-4 col-xs-4">
<input type="hidden" name="submit" value="1" />
<p class="box"><input type="submit" class="btn btn-green big" value="提交"/> or <input type="reset" class="btn" value="重置"/></p>
</fieldset>
<input type="submit" class="btn btn-primary" value="提交"/>
<input type="reset" class="btn btn-danger" value="重置"/>
</div>
</div>
</form>
<?php }else{ ?>

View File

@ -7,16 +7,17 @@
$this->headLink()->appendStylesheet('/css/colorbox.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin">后台首页</a>');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->breadcrumb('<a href="/admin/news">新闻中心</a>');
$this->breadcrumb('栏目管理');
?>
<div class="row">
<div class="span3">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('news/left.phtml'); ?>
</div>
<div class="span9">
<div class="col-md-10 col-sm-12">
<?php if ($this->msg or $this->messages) :?>
<div id="message">
<div id="message" class="alert alert-info">
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
@ -24,19 +25,19 @@
<?php endforeach;endif; ?>
</div>
<?php endif; ?>
<form id="sampleform" method="post" action="#">
<fieldset>
<legend>栏目添加</legend>
<p>
<label class="required" for="ctitle">栏目标题</label><br/>
<input type="text" id="ctitle" class="half" value="<?php if(!empty($this->info['title'])) echo $this->info['title'];?>" name="ctitle"/>
</p>
<p>
<label class="required" for="ptype">栏目类型</label><br/>
<select name="ptype">
<h4>栏目修改</h4>
<hr />
<form id="sampleform" method="post" action="#" class="form-horizontal">
<div class="form-group">
<label for="ctitle" class="required col-md-2 col-sm-2 col-xs-2 control-label">栏目标题:</label>
<div class="col-md-4 col-sm-4 col-xs-4">
<input type="text" id="ctitle" class="half form-control" value="<?php if(!empty($this->info['title'])) echo $this->info['title'];?>" name="ctitle"/>
</div>
</div>
<div class="form-group">
<label for="ptype" class="required col-md-2 col-sm-2 col-xs-2 control-label">栏目类型:</label>
<div class="col-md-4 col-sm-4 col-xs-4">
<select name="ptype" class="form-control">
<?php if(!empty($this->ptype)) :?>
<?php foreach($this->ptype as $k=>$v) : ?>
<?php if(empty($this->info['ptype'])) {?>
@ -52,25 +53,35 @@
<?php endforeach;?>
<?php endif; ?>
</select>
</p>
<p>
<label class="required" for="code">栏目URL</label><br/>
<input type="text" id="code" class="half" value="<?php if(!empty($this->info['code'])) echo $this->info['code'];?>" name="code"/>(仅小写英文字母与数字)
<small>如填写: technology 则前台访问地址为: http://westdc.westgis.ac.cn/news/technology </small>
</p>
<p>
<label class="required" for="display">是否显示:</label><br/>
<select name="is_pub" id="display">
</div>
</div>
<div class="form-group">
<label for="code" class="required col-md-2 col-sm-2 col-xs-2 control-label">栏目URL</label>
<div class="col-md-4 col-sm-4 col-xs-4">
<input type="text" id="code" class="half form-control" value="<?php if(!empty($this->info['code'])) echo $this->info['code'];?>" name="code"/>
<h5>(仅小写英文字母与数字)</h5>
<h5><small>如填写: technology 则前台访问地址为: http://westdc.westgis.ac.cn/news/technology </small></h5>
</div>
</div>
<div class="form-group">
<label for="title_en" class="required col-md-2 col-sm-2 col-xs-2 control-label">英文标题:</label>
<div class="col-md-4 col-sm-4 col-xs-4">
<input type="text" id="title_en" class="half form-control" value="<?php if(!empty($this->info['title_en'])) echo $this->info['title_en'];?>" name="title_en" />
</div>
</div>
<div class="form-group">
<label for="is_pub" class="required col-md-2 col-sm-2 col-xs-2 control-label">是否显示:</label>
<div class="col-md-4 col-sm-4 col-xs-4">
<select name="is_pub" id="display" class="form-control">
<option value="true" <?php if(empty($this->info['is_pub']) || $this->info['is_pub']==true)echo 'selected="selected"'; ?>>显示</option>
<option value="false" <?php if(!empty($this->info['is_pub'])) if($this->info['is_pub'] == false )echo 'selected="selected"'; ?>>隐藏</option>
</select>
</p>
<p>
<label>父级栏目</label><br />
<select name="fid">
</div>
</div>
<div class="form-group">
<label for="fid" class="required col-md-2 col-sm-2 col-xs-2 control-label">父级栏目:</label>
<div class="col-md-4 col-sm-4 col-xs-4">
<select name="fid" class="form-control">
<option value="0"></option>
<?php if(!empty($this->categories)) :?>
<?php foreach($this->categories as $v) : ?>
@ -93,15 +104,17 @@
<?php endforeach;?>
<?php endif; ?>
</select>
</p>
</div>
</div>
<div class="form-group">
<label for="is_pub" class="required col-md-2 col-sm-2 col-xs-2 control-label">是否显示:</label>
<div class="col-md-4 col-sm-4 col-xs-4">
<input type="hidden" name="submit" value="1" />
<input type="hidden" name="edit" value="<?= $this->info['id']?>"? />
<p class="box"><input type="submit" class="btn btn-green big" value="提交"/> or <input type="reset" class="btn" value="重置"/></p>
</fieldset>
<input type="submit" class="btn btn-primary" value="提交"/>
<input type="reset" class="btn btn-danger" value="重置"/>
</div>
</div>
</form>
</div>
</div>

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