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
258 changed files with 8298 additions and 8425 deletions

File diff suppressed because it is too large Load Diff

View File

@ -72,15 +72,6 @@ class Admin_DownController extends Zend_Controller_Action
return true;
}//未接收的
if($ac == "notsubmitted")
{
$this->_helper->viewRenderer('offlineapps-notreceived');
$offlineapp = new Offlineapp();
$data = $offlineapp->fetchNotSubmitted();
view::addPaginator($data,$this,20);
return true;
}//未接收的
if($ac == "nopdf")
{
$this->_helper->viewRenderer('offlineapps-nopdf');
@ -207,8 +198,8 @@ class Admin_DownController extends Zend_Controller_Action
view::addPaginator($rows,$this,10);
return true;
}
}
if (!$page) $page=1;
if ($view) {
//查看此次申请的pdf
@ -232,7 +223,7 @@ 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']);
@ -273,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());
@ -297,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());
@ -326,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());
@ -350,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());
@ -378,7 +369,7 @@ 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());
@ -508,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());
@ -529,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());
@ -667,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

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)
{
@ -160,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)
{
@ -168,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();
@ -187,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%'
@ -206,8 +207,8 @@ 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";
@ -239,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
";
@ -295,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);
@ -358,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);
@ -514,11 +515,11 @@ 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;
}
}
@ -556,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();
@ -564,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)
{
@ -576,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;
@ -644,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();
@ -756,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())
@ -767,7 +768,7 @@ 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
$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();
@ -812,10 +813,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_created,gn.id as gnid 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
left join geonetworkmetadata gn on m.uuid=gn.uuid
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);
@ -874,8 +875,8 @@ 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 m.status=-1 $searchjoin";
@ -914,8 +915,8 @@ 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 m.status=5 $searchjoin order by m.ts_finished desc";
@ -952,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"));
@ -1289,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
@ -1340,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
@ -1470,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

@ -53,7 +53,7 @@ $this->theme->AppendPlus($this,'colorbox');
<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" name="publisher" value="<?= isset($this->data['publisher']) ? $this->data['publisher']:"" ?>" class="form-control" />
<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="form-group">
@ -65,19 +65,7 @@ $this->theme->AppendPlus($this,'colorbox');
<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" name="title" readonly="readonly" value="<?= isset($this->data['title']) ? $this->data['title']:"" ?>" class="form-control"/>
</div>
</div>
<div class="form-group">
<label class="col-md-2 col-sm-2 control-label" for="title_en">英文标题</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']:"" ?>" class="form-control" />
</div>
</div>
<div class="form-group">
<label class="col-md-2 col-sm-2 control-label" for="publisher_en">发布者英文</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" />
<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>
@ -86,20 +74,14 @@ $this->theme->AppendPlus($this,'colorbox');
<label class="col-md-2 col-sm-2 control-label" for="title_en">info</label>
<div class="col-md-10 col-sm-10">
<div class="controls row">
<div class="col-md-2 col-sm-4">
<input type="text" name="info[1][author]" value="" placeholder="作者" class="form-control"/>
</div>
<div class="col-md-2 col-sm-3">
<input type="text" name="info[1][author_en]" value="" placeholder="作者英文" class="form-control"/>
<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-7">
<input type="text" name="info[1][organization]" value="" placeholder="单位" class="form-control"/>
</div>
<div class="col-md-3 col-sm-6">
<input type="text" name="info[1][organization_en]" value="" placeholder="单位英文" class="form-control"/>
<input type="text" name="info[1][organization_en]" value="" placeholder="Organization" class="form-control"/>
</div>
</div>
</div>
@ -114,15 +96,13 @@ $this->theme->AppendPlus($this,'colorbox');
<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-4"><input class="form-control" type="text" name="info[<?= $k ?>][author]" value="<?= $v['author'] ?>" placeholder="作者" /></div>
<div class="col-md-2 col-sm-3">
<input class="form-control" type="text" name="info[<?= $k ?>][author_en]" value="<?= $v['author_en'] ?>" placeholder="作者英文" />
<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-7"><input class="form-control" type="text" name="info[<?= $k ?>][organization]" value="<?= $v['organization'] ?>" placeholder="单位" /></div>
<div class="col-md-3 col-sm-6">
<input class="form-control" type="text" name="info[<?= $k ?>][organization_en]" value="<?= $v['organization_en'] ?>" placeholder="单位英文" />
<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){ ?>
@ -163,11 +143,9 @@ function addinput(){
var index = now_index + 1;
html = '<div class="form-group infocontrol"><label class="col-md-2 col-sm-2 control-label">info</label>'
+'<div class="col-sm-10"><div class="controls row">'
+'<div class="col-md-2 col-sm-4"><input class="form-control" type="text" name="info[' + index + '][author]" placeholder="作者" /></div>'
+'<div class="col-md-2 col-sm-3"><input class="form-control" type="text" name="info[' + index + '][author_en]" placeholder="作者英文" /></div>'
+'<div class="col-md-2 col-sm-3"><input class="form-control" type="text" name="info[' + index + '][author_en]" placeholder="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-7"><input class="form-control" type="text" name="info[' + index + '][organization]" placeholder="单位" /></div>'
+'<div class="col-md-3 col-sm-6"><input class="form-control" type="text" name="info[' + index + '][organization_en]" placeholder="单位英文" /></div>'
+'<div class="col-md-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;

View File

@ -52,7 +52,7 @@
$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>

View File

@ -25,6 +25,5 @@
<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>
<li id="Nav-data-spatial"><a href="/admin/data/spatial">数据时空范围</a></li>
</ul>
</div>

View File

@ -33,7 +33,7 @@
<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>
<input type="radio" name="lang" value="en" /> 英文 </p>
<p><button type="button" class="btn btn-green" onclick="addDataSet()">添加</button></p>
<?php } ?>
</div>

View File

@ -43,9 +43,7 @@
<?php foreach ($this->paginator as $item): ?>
<li class="well well-sm">
<h4><a href="/data/<?= $item['uuid']; ?>" class="title"><?= $item['title']; ?></a></h4>
<p>大小:<?= $item['filesize']; ?>M创建时间<?= date('Y-m-d',strtotime($item['ts_created'])); ?>,查看:<?= $item['viewed']; ?>次。</p>
<?php if(isset($item['heihe_fund_title']) && !empty($item['heihe_fund_title'])) { ?><p>计划内项目: <?= $item['heihe_fund_title'] ?></p><?php } ?>
<p>
<p>大小:<?= $item['filesize']; ?>M创建时间<?= date('Y-m-d',strtotime($item['ts_created'])); ?>,查看:<?= $item['viewed']; ?>次。</p> <p>
操作:
<?php if ($item['gid']>0) : ?>
<a class="label label-primary" href="/service/geonetwork?url=metadata.edit?id=<?= $item['gid']; ?>" target="_blank">编辑</a>
@ -73,12 +71,6 @@
<?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; ?>
<?php if (!isset($item['genid']) || !$item['genid']>0) : ?>
<a class="label label-primary iframe" href="/admin/data/gnenexport/uuid/<?php echo $item['uuid'];?>">导入英文版</a>
<?php endif; ?>
<?php if (!isset($item['stid']) || !$item['stid']>0) : ?>
<a class="label label-primary" href="/admin/data/spatial/ac/edit/uuid/<?php echo $item['uuid']; ?>">数据时空范围采集</a>
<?php endif; ?>
</p>
<?php if($item['author']) :?>
<p>数据贡献者:<?= $item['author']; ?></p>

View File

@ -1,77 +0,0 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin">后台首页</a>');
$this->breadcrumb('<a href="/admin/heihe">黑河数据集</a>');
$this->breadcrumb('黑河数据集');
$this->breadcrumb()->setSeparator(' > ');
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
$this->headScript()->appendFile('/js/jquery.colorbox-min.js');
$this->headLink()->appendStylesheet('/css/colorbox.css');
$this->headLink()->appendStylesheet('/css/author.css');
?>
<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">
<h2>统计信息</h2>
<hr />
<h4>数据:</h4>
<p>项目个数:<?= $this->projectsCount ?></p>
<p>数据条数:<?= $this->dataCount ?></p>
<p>总数据量:<?= round($this->dataFileSize / 1024 , 2) . 'GB' ?></p>
<p>文件个数:<a href="javascript:void(0);" id="fileCount">点击查看</a></p>
<p>服务次数(人/次)<a href="/admin/data/project/ac/userdown"><?= $this->applyTimes ?></a></p>
<p>服务次数(人/合并次,单个用户多次申请算作一次服务) <?= $this->applyTimesDistanct ?></p>
<p>服务次数(数据条/次)<?= $this->dataApplyTimes ?></p>
<h4>项目服务情况<small>(数据中心所有数据向计划内项目提供的服务)</small></h4>
<p>为黑河计划项目服务的次数-离线:<?= $this->offlineServiceTimes ?></p>
<p>为黑河计划项目服务的数据量-离线:<?= round($this->offlineServiceSize,2) ?>GB</p>
<p>为黑河计划项目服务的次数-在线:<?= $this->onlineServiceTimes ?></p>
<p>为黑河计划项目服务的数据量-在线:<?= round($this->onlineServiceSize ,2) ?>GB</p>
<p>为黑河计划项目服务的次数-总数:<?= $this->onlineServiceTimes + $this->offlineServiceTimes ?></p>
<p>为黑河计划项目服务的数据量-总数:<?= round($this->onlineServiceSize + $this->offlineServiceSize ,2)?>GB</p>
<p>服务计划内项目个数-离线:<?= $this->offlineServiceProjects ?></p>
<p>服务计划内项目个数-在线:<?= $this->onlineServiceProjects ?></p>
<p>服务计划内项目个数-综合(在线离线合并)<?= $this->allServiceProjects ?></p>
<h3>选择项目进行统计</h3>
<form method="get">
<div class="form-group">
<?php foreach($this->projects as $v) { ?>
<label class="checkbox-inline" title="<?= $v['title'] ?>">
<input type="checkbox" name="fund_id[]" value="<?= $v['code'] ?>" <?= (is_array($this->funds) && in_array($v['code'],$this->funds)) ? "checked":'' ?> title="<?= $v['title'] ?>" /><?= $v['code'] ?>
</label>
<?php }?>
</div>
<button type="submit" name="submit" value="1" class="btn btn-success">重新统计</button>
</form>
</div>
</div>
<?php $query = isset($_GET) && count($_GET) ? "?".http_build_query($_GET) :"" ; ?>
<script>
$('#fileCount').click(function(){
$.ajax({
'type': "POST",
'url': "<?= $query ?>",
'data': '',
'success': function(data){
$('#fileCount').after(data);
$('#fileCount').remove();
},
'beforeSend':function(){
$('#fileCount').html('正在加载...');
}
})
});
</script>

View File

@ -1,89 +0,0 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
$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->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 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">
<?php if(!empty($this->searchLink)){ ?>
<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 class="">
<a href="/admin/data/project/ac/status" class="btn btn-info">统计</a>
<a href="/admin/data/project/ac/datas" class="btn btn-info">计划内的数据</a>
<a href="/admin/data/project/ac/download" class="btn btn-info">计划内的下载纪录</a>
</div>
<h5>
<?= $this->Count; ?> 条记录
</h5>
<div id="datalistZ">
<?php if (count($this->paginator)): ?>
<table class="table">
<thead>
<th>用户ID</th>
<th>用户名</th>
<th>姓名</th>
<th>下载次数</th>
</thead>
<tbody>
<?php
$autoindex=0;
foreach ($this->paginator as $item):
$autoindex++;
?>
<tr>
<td><?= $item['id'] ?></td>
<td><?= $item['username'] ?></td>
<td><?= $item['realname'] ?></td>
<td><?= $item['c'] ?></td>
</tr>
<?php endforeach;?>
</tbody>
</table>
<?php endif; ?>
</div>
<div class="pagenavi"><?= $this->paginator; ?></div>
</div>
<div style="display:none;">
<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="" class="form-control">
<?php
foreach($this->project_status as $k=>$v)
{
echo '<option value="'.$k.'">'.$v.'</option>';
}
?>
</select>
</div>
<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>

View File

@ -28,11 +28,6 @@
</form>
</div>
<?php }?>
<div class="">
<a href="/admin/data/project/ac/status" class="btn btn-info">统计</a>
<a href="/admin/data/project/ac/datas" class="btn btn-info">计划内的数据</a>
<a href="/admin/data/project/ac/userdown" class="btn btn-info">计划内的下载纪录</a>
</div>
<h5>
<?= $this->Count; ?> 条记录
</h5>

View File

@ -196,7 +196,7 @@
};
</script>
<?php if(isset($this->data['attid']) && !empty($this->data['attid'])){ ?>
<input type="hidden" id="reference_file_content" value='<?= json_encode($this->data['file']) ?>' />
<input type="hidden" id="reference_file_content" value='<?= json_encode($this->data[' file']) ?>' />
<script>
upload.onsuccess('', $('#reference_file_content').val(), "");
</script>

View File

@ -1,121 +0,0 @@
<?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');
?>
<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>
<ul class="nav nav-tabs">
<li><a href="/admin/data/spatial">浏览所有</a></li>
<?php if(!empty($this->uuid)) {?>
<li class="active"><a href="javascript:void(0);">编辑</a></li>
<?php }?>
</ul>
</div>
<div class="">
<?php if(!empty($this->error)) { ?>
<?= $this->error ?>
<?php } ?>
<?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>
1. 空间范围请使用经纬度dd格式进行添加。<br/>
2. 日期精确到天。中括号代表包含,小括号代表不包含。
</div>
<h2><?php echo $this->data[0]['title']; ?></h2>
<form class="form-horizontal" method="post">
<div id="datalist">
<?php if (count($this->data)): ?>
<table class="stylized table table-bordered table-striped table-hover">
<thead>
<tr>
<th width="60%">空间范围</th>
<th>时间范围</th>
<th width="100">操作</th>
</tr>
</thead>
<tbody>
<?php $autoindex=0;
foreach ($this->data as $item):
if (isset($item['id']) && $item['id']>0) :
$autoindex++; ?>
<tr class="infocontrol">
<td><textarea class="col-md-12" rows="3" name="info[<?= $autoindex ?>][spatial]" ><?= $item['spatial'] ?></textarea></td>
<td><input type="text" name="info[<?= $autoindex ?>][temporal]" class="form-control" value="<?= $item['temporal'] ?>" /></td>
<td>
编辑:点 线 矩形 多边形
<a href="javascript:void(0);" onclick="onedel(<?= $item['id']?>)" id="delbtn_<?= $item['id']?>">删除</a>
</td>
<input type="hidden" name="info[<?= $autoindex ?>][id]" value=" <?=$item->id?> " />
</tr>
<?php endif; endforeach; if ((count($this->data)==1) && !isset($this->data[0]['id'])) :
$item=$this->data[0]; ?>
<tr class="infocontrol">
<td><textarea class="col-md-12" rows="3" name="info[1][spatial]" ><?= $item['spatial'] ?></textarea></td>
<td><input type="text" name="info[1][temporal]" class="form-control"
value="<?= $item['temporal'] ?>" /></td>
<td>
点 线 矩形 多边形
<a href="/admin/data/spatial/ac/edit/uuid/<?= $item['uuid']?>">编辑</a>
</td>
<input type="hidden" name="info[1][id]" value="0" />
</tr>
<?php endif; endif;?>
</tbody>
</table>
</div>
<div class="form-group">
<div class="col-sm-12">
<a class="pull-right" href="javascript:void(0);" onclick="addinput()" >+为该数据添加一行新时空范围</a>
</div>
</div>
<div class="form-group">
<div class="col-sm-12">
<input type="hidden" name="submit" value="1" />
<?php if(!empty($this->uuid)) { ?>
<input type="hidden" name="uuid" value=" <?=$this->uuid?>" />
<?php } ?>
<button type="submit" class="btn btn-primary pull-right">提交</button>
</div>
</div>
</form>
<?php } ?>
</div>
</div>
</div>
<script>
function addinput(){
var now_index = $('.infocontrol').length;
var index = now_index + 1;
html = '<tr class="infocontrol">'
+'<td><textarea class="col-md-12" rows="3" name="info['+index+'][spatial]" placeholder="WKT Geometry"></textarea></td>'
+'<td><input type="text" name="info['+index+'][temporal]" class="form-control" value="" placeholder="Date range"/></td>'
+'<td><a href="">点 线 矩形 多边形</a>'
+' <label class="control-label"><a href="javascript:void(0);" onclick="RmInput(this)"> -删除</a></label>'
+'</td><input type="hidden" name="info['+index+'][id]" value="0" />'
+'</tr>';
now_index = null;
index = null;
$('.infocontrol').last().after(html);
}
function RmInput(e){
$e = $(e);
$e.parent().parent().parent('tr.infocontrol').remove();
}
</script>
<!-- //页面内容 -->

View File

@ -1,167 +0,0 @@
<?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,'admin_plugin');
$this->headScript()->appendFile('/js/lib/colorbox/jquery.colorbox-min.js');
$this->headLink()->appendStylesheet('/js/lib/colorbox/colorbox.css');
?>
<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 span10">
<div class="form-group">
<ul class="nav nav-tabs" role="tablist">
<li class="active"><a href="/admin/data/spatial">浏览所有</a></li>
</ul>
</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="搜索关键字" />
<span class="input-group-btn"><button class="btn btn-default" type="submit" id="search_btn">搜索</button></span>
</form>
</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="stylized table table-bordered table-striped table-hover">
<thead>
<tr>
<th>元数据</th>
<th>空间范围</th>
<th>时间范围</th>
<th>修改时间</th>
<th width="100">操作</th>
</tr>
</thead>
<tbody>
<?php $autoindex=0;
foreach ($this->paginator as $item):
$autoindex++;?>
<tr id="DataLine_<?= $item['id']?>">
<td><a href="/data/<?= $item['uuid'] ?>"><?= $item['title'] ?></a></td>
<td><?= $item['spatial'] ?></td>
<td><?= $item['temporal'] ?></td>
<td><?= date("Y-m-d H:i",strtotime($item['ts_changed'])) ?></td>
<td>
<a href="/admin/data/spatial/ac/edit/uuid/<?= $item['uuid']?>">编辑</a>
<a href="javascript:void(0);" onclick="onedel(<?= $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>
var info = {
btn_prefix : "delbtn_",
item_prefix : "DataLine_",
url : "/admin/data/spatial/ac/del"
}
$(document).ready(function(e) {
$('.verified_btn').click(function(e) {
$(this).ajaxmsg({
callback:function(){window.location.reload();}
});
});
});
(function( $ ){
$.fn.ajaxmsg = function( options ) {
var settings = $.extend( {
url:'',
callback : '',
}, options);
var methods = {
msg : function(id)
{
methods.submited();
},
creatWindow : function(content){
$.colorbox({
initialHeight: '0',
initialWidth: '0',
html: methods.dialog(content),
opacity: '0.3',
onComplete: function(){
$('.confirm_yes').click(function(e){
e.preventDefault();
if(typeof(settings.callback)=='function')
{
settings.callback();
}
$.colorbox.close();
});
$('.confirm_no').click(function(e){
e.preventDefault();
$.colorbox.close();
});
}
});
},
submited : function(){
$.ajax({
'type':"POST",
'url':settings.url,
'data':'',
'success':function(data){
if (typeof(data)=='object')
{
if(typeof(data.error)!='undefined')
{alert(data.error);}
if(typeof(data.success)!='undefined')
{
methods.creatWindow(data.success);
}
}
else{
alert('出现错误,请稍候再试');
}
},
'timeout': 30000,
'error': function(){
alert('出现错误,请刷新后重试');
}
});
},
dialog : function(content){
HTML = '<div class=""><div class="modal-header"><h3>提示信息</h3></div>'
+ '<div class="modal-body"><div class=" span5">'+content+'</div></div>'
+ '<div class="modal-footer"><a href="javascript:void(0);" class="btn btn-primary confirm_yes">确定</a></div></div>';
return HTML;
}
}
this.each(function() {
settings.url = $(this).attr('rel');
if(settings.url == '')
{
alert('参数错误');
}
methods.msg();
});
};
})( jQuery );
</script>

View File

@ -19,11 +19,8 @@
<!-- 页面内容 -->
<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/unpublish">已发布数据的未发布版本</a></li>
<li class="active"><a href="/admin/data/version/ac/bydata">逐数据浏览</a></li>
</ul>
<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>
<div class="input-group form-group">
<form id="datasearch" class="search_form input-group" action="/admin/data/version/ac/bydata">

View File

@ -1,115 +0,0 @@
<?php
$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/lib/colorbox/jquery.colorbox-min.js');
$this->headLink()->appendStylesheet('/css/author.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 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">
<ul class="nav nav-tabs" role="tablist">
<li class=""><a href="/admin/data/version">所有版本概况</a></li>
<li class="active"><a href="/admin/data/version/ac/unpublish">已发布数据的未发布版本</a></li>
<li class=""><a href="/admin/data/version/ac/bydata">逐数据浏览</a></li>
</ul>
</div>
<?php
if (count($this->paginator)):
if ($this->mdtitle) echo "<h2>元数据:".$this->mdtitle."</h2>";
echo "<ul class=list-unstyled>";
$autoindex=0;
$edited=false;
foreach ($this->paginator as $item):
$autoindex++;?>
<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['owner']) :
echo "修改者: ".(empty($item['realname'])?$item['username']:$item['realname'])." ";
endif;
?>
</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; ?>
</li>
<?php endforeach;
echo "</ul>";
endif; ?>
<div class="pagenavi"><?= $this->paginator; ?></div>
</div>
</div>
<!-- //页面内容 -->
<script>
$('#wapper').width($('body').width()-300);
function action(ac,id){
$.ajax({
'type':"POST",
'url':'/admin/data/version/',
'data':'ac='+ ac +'&id='+id,
'success':function(data){
if (typeof(data)=='object')
{
if(typeof(data.error)!='undefined')
{$.colorbox({'innerWidth':'50%','html':data.error});}
if(typeof(data.deleted)!='undefined')
{$('#list_'+data.deleted).fadeOut("slow",function(){$(this).remove();});}
if(typeof(data.commited)!='undefined')
{$('#changelog').val('');$('#commit_submit').attr('onclick','');}
}
else{
$.colorbox({'innerWidth':'50%','html':'<h4>出现错误,请稍候再试</h4>'});
}
},
'timeout': 30000,
'error': function(){
$.colorbox({'innerWidth':'50%','html':'<h4>处理中出现错误,请刷新页面后重试</h4>'});
}
});
}
$(".inline").colorbox({inline:true, width:"50%", height:"50%"});
function commit(id){
action('commit&changelog='+$('#changelog').val(),id);
}
</script>
<div class="colorbox" style="display:none;">
<div id="commitform">
<form>
<p>
<label>版本改动:</label><br />
<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-success pull-right" value="提交"/>
</form>
</div>
<div class="error"><img src="/images/alert_big_error.png" /><span></span></div>
<div class="ok"><img src="/images/alert_big_ok.png" /><span></span></div>
<div class="warning"><img src="/images/alert_big_warning.png" /><span></span></div>
</div>

View File

@ -23,7 +23,6 @@
<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/unpublish">已发布数据的未发布版本</a></li>
<li class=""><a href="/admin/data/version/ac/bydata">逐数据浏览</a></li>
</ul>
</div>

View File

@ -11,8 +11,5 @@
<li class="<?= $this->navIn == "passed" ? "active":"" ?>">
<a href="/admin/down/offlineapps/ac/passed">已上传申请表已通过</a>
</li>
<li class="<?= $this->navIn == "notsubmitted" ? "active":"" ?>">
<a href="/admin/down/offlineapps/ac/notsubmitted">未接收未上传申请表</a>
</li>
</ul>

View File

@ -1,24 +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>
<!-- Modal -->
<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" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="myModalLabel">申请表上传</h4>
</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>
</div>
</div>
</script>

View File

@ -178,7 +178,7 @@ $(document).ready(function(){
<label class="checkbox-inline">
<input type="checkbox" id="pubtimeturn" name="pubtimer" value="1" <?php if($this->ev['is_pub']==true && !empty($this->ev['ts_published'])) echo 'checked="checked"'; ?>/>定时发布?
</label>
<input class="form-control" type="text" name="pubtime" id="pubtime" value="<?php echo date("Y-m-d H:i",strtotime($this->ev['ts_published']));?>" />
<input class="form-control" type="text" name="pubtime" id="pubtime" value="<?php echo date("Y-m-d H:i",strtotime($this->ev['ts_published']));?>" readonly="readonly" disabled />
<span class="text-muted"> e.g. 2011-10-28 9:35 or 2011-10-28 21:35</span>
</div>
</div>
@ -321,4 +321,4 @@ function uploadError(msg,id){
var html = msg+'<div class="cancel"><a href="javascript:;" id="deletebtn_'+id+'"><img border="0" src="/static/js/uploadify/cancel.png" /></a></div>';
return html;
}
</script>
</script>

View File

@ -44,7 +44,8 @@
<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>
<a href="/admin/review/changeadmin/?id=<?php echo $item['id'];?>">更改责任编辑</a> |
<a href="/admin/review/changeadmin/id/<?php echo $item['id'];?>/uid/<?php echo $this->uid; ?>">我要审</a>
</td>
</tr>
<?php endforeach; ?>

View File

@ -5,50 +5,36 @@ db.params.username = gis
db.params.password = gispassword
db.params.dbname = metadata
geonetwork.url=http://westdc.westgis.ac.cn/geonetwork/
geonetwork.url=http://card.westgis.ac.cn/geonetwork/
geonetwork.adapter = PDO_PGSQL
geonetwork.params.host = localhost
geonetwork.params.username = gis
geonetwork.params.password = gispassword
geonetwork.params.dbname = geonetwork
geonetwork.params.dbname = wdscar_geonetwork
watergeonetwork.url=http://210.77.68.237:8080/geonetwork/
waterdb.adapter = PDO_PGSQL
waterdb.params.host = 210.77.68.237
waterdb.params.username = postgres
waterdb.params.password = "test@))("
waterdb.params.dbname = geonetwork252
seekspace.url=http://seekspace.resip.ac.cn/
seekspace.handleurl=http://seekspace.resip.ac.cn/handle
google.maps.api=ABQIAAAACD-MqkkoOm60o_dvwdcKVhRBSKpgcP88GYi6r2Of16IkMX_4YhSBQsywCi4J2_fh4nBuWmK7gyRjLg
bing.api=4BC90E1E9ED351ECE0D9FB71509BC3CC1264340C
bigthumb.path=../geonetwork/data/
temp.path=/tmp/
upload=../data/upload/
paths.newsletter=images/newsletter/
logging.file = /var/www/test.westgis.ac.cn/data/logs/debug.log
page.limit=10
import.dir=../data/import
title.site=寒区旱区科学数据中心
title.data=数据产品
title.site=Cold and Arid Regions Science Data Center
title.data=Dataset
title.heihe=黑河计划数据管理中心
title.yrnmr=黄河上游宁蒙河段综合数据
title.glacier=中国冰川资源及其变化调查
title.review=数据评审
title.author=数据作者
title.knowledge=知识积累
title.netkites=移动文献查询服务
title.author=For AUTHOR
title.knowledge=Knowledge
supportemail=westdc@lzb.ac.cn
reportemail=westdc-report-subscribe@lists.westgis.ac.cn
smtp.username=westdc@lzb.ac.cn
smtp.password=ilovewestdc
smtp.host=smtp.cstnet.cn
smtp.ssl=TLS
smtp.auth=login
smtp.name=数据中心服务组
smtp.name=CARD Support Team
ftp.user=newwestdc
ftp.password=westdcforsmall
@ -76,14 +62,6 @@ routes.tag.route = "data/tag/:key"
routes.tag.defaults.controller = "data"
routes.tag.defaults.action = "tag"
routes.netkites1.type = "Zend_Controller_Router_Route_Static"
routes.netkites1.route = "knowledge/netkites"
routes.netkites1.defaults.controller = netkites
routes.netkites1.defaults.action = index
routes.netkites.route = "knowledge/netkites/:action/*"
routes.netkites.defaults.controller = netkites
routes.dataid.route = "data/:id"
routes.dataid.defaults.controller = "data"
routes.dataid.defaults.action = "view"

View File

@ -5,7 +5,7 @@ class AboutController extends Zend_Controller_Action
function indexAction()
{
$archives=new Archive($this->db);
$this->view->item=$archives->getOneArchive('中心简介','about');
$this->view->item=$archives->getOneArchive('Mission and Goals','about');
}
function preDispatch()
{
@ -31,7 +31,7 @@ class AboutController extends Zend_Controller_Action
$mail->setSubject($formData['subject']);
$mail->addTo($this->view->config->supportemail);
$mail->send();
$this->messenger->addMessage('发送成功!');
$this->messenger->addMessage('Send Successful!');
$this->_redirect('/about/contact');
}
} else {
@ -47,12 +47,12 @@ class AboutController extends Zend_Controller_Action
function termsAction()
{
$archives=new Archive($this->db);
$this->view->item=$archives->getOneArchive('使用条款','about');
$this->view->item=$archives->getOneArchive('Terms','about');
}
function backgroundAction()
{
$archives=new Archive($this->db);
$this->view->item=$archives->getOneArchive('发展历史','about');
$this->view->item=$archives->getOneArchive('CARD History','about');
}
function legalAction()
{
@ -61,13 +61,13 @@ class AboutController extends Zend_Controller_Action
}
function supportusAction()
{
$archives=new Archive($this->db);
$this->view->item=$archives->getOneArchive('支持我们','about');
$archives=new Archive($this->db);
$this->view->item=$archives->getOneArchive('Support Us','about');
}
function copyrightAction()
{
$archives=new Archive($this->db);
$this->view->item=$archives->getOneArchive('数据与版权','about');
$archives=new Archive($this->db);
$this->view->item=$archives->getOneArchive('Use and Copyrights','about');
}
function linkAction()
{
@ -81,8 +81,8 @@ class AboutController extends Zend_Controller_Action
}
function sponsorsAction()
{
$archives=new Archive($this->db);
$this->view->item=$archives->getOneArchive('支持项目','about');
$archives=new Archive($this->db);
$this->view->item=$archives->getOneArchive('Sponsors','about');
}
function publicationAction()
{

View File

@ -58,16 +58,10 @@ class AccountController extends Zend_Controller_Action
$this->view->avatar = $avatar->Get($user->email,140);
$this->view->projectType = array(
"" => '',
"国家973计划项目课题" => "国家973计划项目课题",
"国家863计划课题"=>"国家863计划课题",
"国家级科技支撑课题" => "国家级科技支撑课题",
"国家级科技重大专项" => "国家级科技重大专项",
"国家级国家重大工程" => "国家级国家重大工程",
"国家级国家自然科学基金" => "国家级国家自然科学基金",
"国际合作项目"=>"国际合作项目",
"省部级项目" => "省部级项目",
"其他项目工程" => "其他项目工程",
"None" => '',
"National Funding" => "National Funding",
"Thesis or Dissertation"=>"Thesis or Dissertation",
"Others" => "Others"
);
$submit = $this->_getParam('submit');
@ -79,12 +73,12 @@ class AccountController extends Zend_Controller_Action
if($this->db->update("users",$data,"id=$uid"))
{
$this->view->AlertType = "alert-success";
$this->view->msg = "修改成功!";
$this->view->msg = "Update success.";
$this->view->jump_url = "/account/edit";
return true;
}else{
$this->view->AlertType = "alert-error";
$this->view->error = "修改失败,请重试";
$this->view->error = "Update failure.";
$this->view->info = $data;
return true;
}
@ -145,17 +139,17 @@ class AccountController extends Zend_Controller_Action
$this->view->AlertType = "alert-error";
if(strlen($data['password'])>18 || strlen($data['new_password'])>18)
{
$this->view->error = view::Error("密码过长");
$this->view->error = view::Error("Password too long.");
return true;
}
if(strlen($data['new_password'])<=6 || strlen($data['new_password_confrim'])<=6)
{
$this->view->error = view::Error("密码过短请输入大于6位的密码");
$this->view->error = view::Error("Too short password. The min length is 6.");
return true;
}
if(md5($data['new_password']) != md5($data['new_password_confrim']))
{
$this->view->error = view::Error("两次输入的密码不相同");
$this->view->error = view::Error("Twice password are not same.");
return true;
}
@ -165,7 +159,7 @@ class AccountController extends Zend_Controller_Action
if(md5($data['password']) != $row['password'])
{
$this->view->error = view::Error("原密码不正确");
$this->view->error = view::Error("The old password is wrong.");
return true;
}
@ -176,10 +170,10 @@ class AccountController extends Zend_Controller_Action
if($this->db->update("users",$data,"id=$uid"))
{
view::Post($this,array("content"=>'修改成功!','url'=>'/account/secure'));
view::Post($this,array("content"=>'Update success.','url'=>'/account/secure'));
return true;
}else{
$this->view->error = view::Error("修改失败");
$this->view->error = view::Error("Update failure.");
return true;
}
}else{
@ -197,7 +191,7 @@ class AccountController extends Zend_Controller_Action
if(!preg_match("/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/i",$email))
{
$this->view->error = view::Error("错误的邮箱格式");
$this->view->error = view::Error("Wrong email.");
return true;
}
@ -207,7 +201,7 @@ class AccountController extends Zend_Controller_Action
if(md5($password) != $row['password'])
{
$this->view->error = view::Error("原密码错误");
$this->view->error = view::Error("The old password is wrong.");
return true;
}
@ -215,10 +209,10 @@ class AccountController extends Zend_Controller_Action
if($this->db->update("users",$data,"id=$uid"))
{
view::Post($this,array("content"=>'修改成功!','url'=>'/account/secure'));
view::Post($this,array("content"=>'Update success.','url'=>'/account/secure'));
return true;
}else{
$this->view->error = view::Error("修改失败");
$this->view->error = view::Error("Update failure.");
return true;
}
}else{
@ -253,7 +247,7 @@ class AccountController extends Zend_Controller_Action
{
$order = new \Order\Order();
$this->view->projectType = array_merge(array(""=>""),$order->projectType);
$this->view->projectType = array_merge(array("None"=>""),$order->projectType);
$submit = $this->_getParam("submit");
@ -271,7 +265,7 @@ class AccountController extends Zend_Controller_Action
$this->view->place = $status['place'];
}
}else{
view::Post($this,"注册成功!","/");
view::Post($this,"Successful register.","/");
return true;
}
}
@ -289,7 +283,7 @@ class AccountController extends Zend_Controller_Action
$auth = Zend_Auth::getInstance();
if ($auth->hasIdentity())
{
view::Post($this,"您已经登录,无需重复登录","/index");
view::Post($this,"You are login now.","/index");
return true;
}
@ -327,7 +321,7 @@ class AccountController extends Zend_Controller_Action
if($captcha->isValid($captchaword) !== true)
{
$this->view->error = view::Error("验证码错误");
$this->view->error = view::Error("Wrong captcha.");
$this->view->captcha = $captcha->setCaptcha();
return true;
}
@ -345,7 +339,8 @@ class AccountController extends Zend_Controller_Action
return true;
}
view::Post($this,"登录成功,正在跳转",$tohref);
view::Post($this,"Login successful, jumping...",$tohref);
return true;
}else{
$this->view->captcha = $captcha->setCaptcha();
@ -367,7 +362,8 @@ class AccountController extends Zend_Controller_Action
exit();
}
}
public function logoutAction()
{
$auth = Zend_Auth::getInstance();
@ -391,7 +387,7 @@ class AccountController extends Zend_Controller_Action
if(!$captcha->isValid($captchaword))
{
$this->view->error = view::Error("验证码错误");
$this->view->error = view::Error("Wrong captcha.");
$this->view->captcha = $captcha->setCaptcha();
return true;
}
@ -406,7 +402,7 @@ class AccountController extends Zend_Controller_Action
return true;
}
view::Post($this,"您的密码重置申请已提交,请在邮箱中查看");
view::Post($this,"Please check the activation link in your email.");
return true;
}else{
$this->view->captcha = $captcha->setCaptcha();
@ -436,7 +432,7 @@ class AccountController extends Zend_Controller_Action
return true;
}
view::Post($this,"您的密码修改成功!请使用新密码登录","/account/login");
view::Post($this,"Password change successful, please use the password log in.","/account/login");
return true;
}
}//修改密码

View File

@ -37,7 +37,7 @@ class ArchivesController extends Zend_Controller_Action
$time = date("Y-m-d H:i:s",time());
$sql = "SELECT id,title,code,ptype FROM ".$News->tbl_categorys." where ptype='news'";
$sql = "SELECT id,title_en,code,ptype FROM ".$News->tbl_categorys." where ptype='news'";
$sth = $this->db->query($sql);
$rows = $sth->fetchAll();
@ -48,7 +48,7 @@ class ArchivesController extends Zend_Controller_Action
$sql = "SELECT n.*,c.title as typetitle,c.code FROM ".$News->tbl_archives." n
left join ".$News->tbl_catalog." ct on ct.aid=n.id
left join ".$News->tbl_categorys." c on c.id = ct.cid
WHERE n.ts_published<'$time' AND ct.cid={$v['id']} AND n.is_pub=true
WHERE n.language='en' and n.ts_published<'$time' AND ct.cid={$v['id']} AND n.is_pub=true
ORDER BY ts_published DESC
LIMIT 10";
@ -67,7 +67,7 @@ class ArchivesController extends Zend_Controller_Action
);
$url = $News->makeCategoryUrl($parts);
$newslist[$v['id']] = array("title"=>$v['title'],"url"=>$url,"id"=>$v['id'],"list"=>$archives);
$newslist[$v['id']] = array("title"=>$v['title_en'],"url"=>$url,"id"=>$v['id'],"list"=>$archives);
}
$this->view->lists = $newslist;
@ -130,7 +130,7 @@ class ArchivesController extends Zend_Controller_Action
$sql = "SELECT n.*,c.id as typeid,c.code FROM ".$News->tbl_archives." n
left join ".$News->tbl_catalog." ct on ct.aid=n.id
left join ".$News->tbl_categorys." c ON ct.cid=c.id
WHERE c.id='{$row['id']}' AND n.ts_published<'".$time."' AND n.is_pub=true
WHERE n.language='en' and c.id='{$row['id']}' AND n.ts_published<'".$time."' AND n.is_pub=true
ORDER BY n.ts_published DESC";
$rs = $this->db->query($sql);

View File

@ -7,7 +7,7 @@
@link http://
*/
use data\DataService;
use Helpers\View as viewAssist;
use Helpers\View as view;
use Reference\Reference;
use Reference\Ris;
include_once("data/Author.php");
@ -40,7 +40,7 @@ class AuthorController extends Zend_Controller_Action
{
$this->view->pageID = "author-index";
$archives=new Archive($this->db);
$this->view->item=$archives->getOneArchive('数据作者介绍','help');
$this->view->item=$archives->getOneArchive('How to submit data into CARD','help');
}
@ -77,7 +77,7 @@ class AuthorController extends Zend_Controller_Action
if(empty($ac) || $ac=="online" || $ac == "searchonline")
{
$sql = "SELECT o.id,o.userid,o.unit,o.username,o.ts_created,o.project,m.title,m.uuid FROM onlineapp as o
LEFT JOIN metadata as m ON o.uuid=m.uuid
LEFT JOIN en.metadata as m ON o.uuid=m.uuid
LEFT JOIN mdauthor as a ON a.uuid=o.uuid
WHERE (o.id in (SELECT distinct(onlineappid) from dataorder where status>=0)) AND a.userid = ? AND a.status=1";
if ($ac=="searchonline")
@ -119,13 +119,13 @@ class AuthorController extends Zend_Controller_Action
if(!preg_match("/^[0-9A-Za-z]{8}-[0-9A-Za-z]{4}-[0-9A-Za-z]{4}-[0-9A-Za-z]{4}-[0-9A-Za-z]{12}$/",$uuid))
{
echo "参数有误!";exit();
echo "Wrong parameter!";exit();
}
//如果用户已经下载过了,就无法在更改对数据申请的意见
$sql = "select md.title,d.uuid,d.status as datastatus,d.authorpermitted from dataorder d
left join offlineapp o on o.id=d.offlineappid
left join metadata md on md.uuid=d.uuid
left join en.metadata md on md.uuid=d.uuid
left join mdauthor a on a.uuid=d.uuid
where o.ts_approved is null and o.pdflink is not null
and d.uuid=? and a.userid=? and d.id=? AND a.status=1
@ -137,12 +137,12 @@ class AuthorController extends Zend_Controller_Action
if($row['datastatus']>4)
{
echo "该申请已经通过并且发放数据";
echo "Order has been approved.";
exit();
}
else if (empty($row) || $row['datastatus']!=4)
{
echo "该数据申请存在问题,请联系数据中心!";
echo "Problems found, please contact CARD via email.";
exit();
}
@ -154,7 +154,7 @@ class AuthorController extends Zend_Controller_Action
if($sth->execute(array($uuid,$oid)))
{
//发送相关邮件给数据中心服务人员
$sql="select m.title,a.username from dataorder o left join metadata m on o.uuid=m.uuid left join offlineapp a on o.offlineappid=a.id where o.id=?";
$sql="select m.title,a.username from dataorder o left join en.metadata m on o.uuid=m.uuid left join offlineapp a on o.offlineappid=a.id where o.id=?";
$sth = $this->db->prepare($sql);
$sth->execute(array($oid));
$row = $sth->fetch();
@ -343,10 +343,10 @@ class AuthorController extends Zend_Controller_Action
$baseStyle = "btn box-shadow";
$selectedStyle = "disabled";
$confrimText = "同意";
$confrimText = "Agree";
$confrimFunc = 'onclick="confirm(\''.$uuid.'\',\''.$oid.'\')"';
$objectionText = "反对";
$objectionText = "NOT Agree";
$objectionFunc = 'onclick="objection(\''.$uuid.'\',\''.$oid.'\')"';
$btns='';
@ -398,11 +398,11 @@ class AuthorController extends Zend_Controller_Action
//列表
if(empty($ac) || $ac=='list' || $ac=='search'){
$sql = "SELECT a.*,m.title,m.description,g.id as gid,mds.status as mdstatus,gen.id as genid FROM normalmetadata m
$sql = "SELECT a.*,m.title,m.description,g.id as gid,mds.status as mdstatus,gcn.id as genid FROM en.normalmetadata m
LEFT JOIN mdauthor a ON m.uuid=a.uuid
LEFT JOIN geonetworkmetadata g on m.uuid=g.uuid
left join en.geonetworkmetadata gen on m.uuid=gen.uuid
LEFT JOIN mdstatus mds ON m.uuid=mds.uuid
LEFT JOIN en.geonetworkmetadata g on m.uuid=g.uuid
LEFT JOIN en.mdstatus mds ON m.uuid=mds.uuid
LEFT JOIN geonetworkmetadata gcn on m.uuid=gcn.uuid
WHERE a.userid=? AND a.status>=0 ";
if ($ac=='search')
{
@ -436,7 +436,7 @@ class AuthorController extends Zend_Controller_Action
try{
$sql = "SELECT a.id,a.activation,a.ts_created,a.ts_activated,md.title,a.uuid,u.id as userid,u.realname,u.email FROM mdauthor a
LEFT JOIN metadata md ON a.uuid=md.uuid
LEFT JOIN en.metadata md ON a.uuid=md.uuid
LEFT JOIN users u ON a.userid=u.id
WHERE a.activation=?";
@ -1587,8 +1587,8 @@ class AuthorController extends Zend_Controller_Action
$sql = "SELECT u.realname,u.unit,u.email,m.title,m.description FROM normalmetadata m
LEFT JOIN mdauthor a ON m.uuid=a.uuid
LEFT JOIN users u ON u.id=a.userid
WHERE a.status>=0 AND m.uuid=? AND a.status=1
ORDER BY a.status DESC,a.id DESC";
WHERE status>=0 AND m.uuid=? AND a.status=1
ORDER BY status DESC,a.id DESC";
$sth = $this->db->prepare($sql);
$sth->execute(array($uuid));
@ -1623,8 +1623,8 @@ class AuthorController extends Zend_Controller_Action
if (!empty($uuid) && empty($ac))
{
//view the versions of the data
$sql = "SELECT md.title,md.uuid,v.ts_created,v.changelog,v.userid,v.id,u.username,u.realname FROM mdversion v
LEFT JOIN metadata md ON md.uuid=v.uuid
$sql = "SELECT md.title,md.uuid,v.ts_created,v.changelog,v.userid,v.id,u.username,u.realname FROM en.mdversion v
LEFT JOIN en.metadata md ON md.uuid=v.uuid
LEFT JOIN mdauthor a ON md.uuid=a.uuid
left join users u on v.userid=u.id
WHERE md.title IS NOT NULL AND a.userid=? and v.uuid=? AND a.status=1
@ -1646,8 +1646,8 @@ class AuthorController extends Zend_Controller_Action
//查看所有版本列表
else if((empty($ac) && empty($uuid))|| $ac=='list')
{
$sql = "SELECT md.title,md.uuid,v.ts_created,v.changelog,v.userid,v.id,u.username,u.realname FROM mdversion v
LEFT JOIN metadata md ON md.uuid=v.uuid
$sql = "SELECT md.title,md.uuid,v.ts_created,v.changelog,v.userid,v.id,u.username,u.realname FROM en.mdversion v
LEFT JOIN en.metadata md ON md.uuid=v.uuid
LEFT JOIN mdauthor a ON md.uuid=a.uuid
left join users u on v.userid=u.id
WHERE md.title IS NOT NULL AND a.userid=? AND a.status=1
@ -1672,8 +1672,8 @@ class AuthorController extends Zend_Controller_Action
$keywords = $this->_request->getParam('q');
if(!empty($keywords))
$this->view->q = $keywords;
$sql = "SELECT md.title,md.uuid,count(v.id) as c FROM mdversion v
LEFT JOIN metadata md ON md.uuid=v.uuid
$sql = "SELECT md.title,md.uuid,count(v.id) as c FROM en.mdversion v
LEFT JOIN en.metadata md ON md.uuid=v.uuid
LEFT JOIN mdauthor a ON md.uuid=a.uuid
WHERE md.title IS NOT NULL AND a.userid=? AND a.status=1";
if(!empty($keywords))
@ -1716,7 +1716,7 @@ class AuthorController extends Zend_Controller_Action
return true;
}
$sql = "DELETE FROM mdversion v
$sql = "DELETE FROM en.mdversion v
USING mdauthor a
WHERE v.uuid=a.uuid and v.id=? AND a.userid=? AND a.status=1";
$sth = $this->db->prepare($sql);
@ -1759,7 +1759,7 @@ class AuthorController extends Zend_Controller_Action
}
$this->wdb=Zend_Db::factory($this->view->config->geonetwork);
$sql = "SELECT v.xml,v.uuid FROM mdversion v
$sql = "SELECT v.xml,v.uuid FROM en.mdversion v
LEFT JOIN mdauthor a ON a.uuid=v.uuid
WHERE v.id=? AND a.userid=? AND a.status=1";
$sth = $this->db->prepare($sql);
@ -1827,7 +1827,7 @@ class AuthorController extends Zend_Controller_Action
}
// 1. 权限认定
$sql="select a.* from mdauthor a left join mdversion v on a.uuid=v.uuid
$sql="select a.* from mdauthor a left join en.mdversion v on a.uuid=v.uuid
where a.status=1 and a.userid=? and v.id=?";
$sth=$this->db->prepare($sql);
$sth->execute(array($u_id,$id));
@ -1839,12 +1839,12 @@ class AuthorController extends Zend_Controller_Action
return true;
}
// 2. 保存变化记录 save changelog & userid
$sql = "UPDATE mdversion SET changelog=?,userid=? WHERE id=?";
$sql = "UPDATE en.mdversion SET changelog=?,userid=? WHERE id=?";
$this->db->query($sql,array($changelog,$u_id,$id));
// 3. 获取数据评审状态
$sql = "SELECT s.*,v.xml,m.title FROM mdstatus s left join mdversion v on s.uuid=v.uuid
left join metadata m on s.uuid=m.uuid WHERE v.id=?";
$sql = "SELECT s.*,v.xml,m.title FROM en.mdstatus s left join en.mdversion v on s.uuid=v.uuid
left join en.metadata m on s.uuid=m.uuid WHERE v.id=?";
$sth = $this->db->prepare($sql);
$sth->execute(array($id));
$row = $sth->fetch();
@ -1853,7 +1853,7 @@ class AuthorController extends Zend_Controller_Action
$search=new Search();
//create search view in xunsearch
//$sql="select m.uuid,m.title,m.description,x.data,array_to_string(ARRAY( SELECT keyword.keyword FROM keyword WHERE keyword.id = m.id), ', '::text) AS keyword from normalmetadata m left join xml x on m.id=x.id where m.uuid=?";
$sql="select * from xunsearch where uuid=?";
$sql="select * from en.xunsearch where uuid=?";
$sth = $this->db->prepare($sql);
$sth->execute(array($row['uuid']));
$data = $sth->fetch();
@ -1861,7 +1861,7 @@ class AuthorController extends Zend_Controller_Action
if (empty($row)) //无对应记录
{
$sql="select m.id from metadata m left join mdversion v on m.uuid=v.uuid where v.id=?";
$sql="select m.id from en.metadata m left join en.mdversion v on m.uuid=v.uuid where v.id=?";
$sth=$this->db->prepare($sql);
$sth->execute(array($id));
$mrow=$sth->fetch();
@ -1878,13 +1878,13 @@ class AuthorController extends Zend_Controller_Action
}
@$iso->saveDB($this->db);
//进入评审库
$sql="insert into mdstatus (uuid,status,userid) select uuid,0,? from mdversion where id=?";
$sql="insert into en.mdstatus (uuid,status,userid) select uuid,0,? from en.mdversion where id=?";
$this->db->query($sql,array($u_id,$id));
//email to admin
$mail=new WestdcMailer($this->view->config->smtp);
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
$mailtp=new EmailText($this->db,"metadata-new-admin",array(
$mail->setFrom($this->view->config->service->email,'CARD Support Team');
$mailtp=new EmailText($this->db,"metadata-new-admin-en",array(
'user' => $user->username,
'uuid' => $iso->uuid,
'email'=> $user->email,
@ -1905,8 +1905,8 @@ class AuthorController extends Zend_Controller_Action
unset($mailtp);
//email to author
$mail=new WestdcMailer($this->view->config->smtp);
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
$mailtp=new EmailText($this->db,"metadata-new-author",array(
$mail->setFrom($this->view->config->service->email,'CARD support team');
$mailtp=new EmailText($this->db,"metadata-new-author-en",array(
'user' => $user->username,
'uuid' => $iso->uuid,
'email'=> $user->email,
@ -1940,15 +1940,15 @@ class AuthorController extends Zend_Controller_Action
@$iso->saveDB($this->db);
//移除中间版本
$sql="delete from mdversion where uuid in (select uuid from mdversion where id=?) and changelog is null";
$sql="delete from en.mdversion where uuid in (select uuid from en.mdversion where id=?) and changelog is null";
$this->db->query($sql,array($id));
//修改评审状态为发布,且由其提交的用户进行管理
$sql="insert into mdstatus (uuid,status,userid) select uuid,6,? from mdversion where id=?";
$sql="insert into en.mdstatus (uuid,status,userid) select uuid,6,? from en.mdversion where id=?";
$this->db->query($sql,array($u_id,$id));
//email to admin & author
$mail=new WestdcMailer($this->view->config->smtp);
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
$mail->setFrom($this->view->config->service->email,'CARD Support Team');
$mailtp=new EmailText($this->db,"metadata-release",array(
'user' => $user->username,
'uuid' => $row['uuid'],
@ -1988,8 +1988,8 @@ class AuthorController extends Zend_Controller_Action
//email to admin
$mail=new WestdcMailer($this->view->config->smtp);
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
$mailtp=new EmailText($this->db,"version-commit-admin",array(
$mail->setFrom($this->view->config->service->email,'CARD Support Team');
$mailtp=new EmailText($this->db,"version-commit-admin-en",array(
'user' => $user->username,
'uuid' => $row['uuid'],
'email'=> $user->email,
@ -2011,8 +2011,8 @@ class AuthorController extends Zend_Controller_Action
unset($mailtp);
//email to author
$mail=new WestdcMailer($this->view->config->smtp);
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
$mailtp=new EmailText($this->db,"version-commit-author",array(
$mail->setFrom($this->view->config->service->email,'CARD Support Team');
$mailtp=new EmailText($this->db,"version-commit-author-en",array(
'user' => $user->username,
'uuid' => $row['uuid'],
'email'=> $user->email,
@ -2041,8 +2041,8 @@ class AuthorController extends Zend_Controller_Action
@$iso->loadXML($row['xml']);
//email to admin
$mail=new WestdcMailer($this->view->config->smtp);
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
$mailtp=new EmailText($this->db,"version-commit-admin",array(
$mail->setFrom($this->view->config->service->email,'CARD Support Team');
$mailtp=new EmailText($this->db,"version-commit-admin-en",array(
'user' => $user->username,
'uuid' => $row['uuid'],
'email'=> $user->email,
@ -2064,8 +2064,8 @@ class AuthorController extends Zend_Controller_Action
unset($mailtp);
//email to author
$mail=new WestdcMailer($this->view->config->smtp);
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
$mailtp=new EmailText($this->db,"version-commit-author",array(
$mail->setFrom($this->view->config->service->email,'CARD Support Team');
$mailtp=new EmailText($this->db,"version-commit-author-en",array(
'user' => $user->username,
'uuid' => $row['uuid'],
'email'=> $user->email,
@ -2092,7 +2092,7 @@ class AuthorController extends Zend_Controller_Action
unset($mail);
unset($mailtp);
$mail=new WestdcMailer($this->view->config->smtp);
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
$mail->setFrom($this->view->config->service->email,'CARD Support Team');
$mailtp=new EmailText($this->db,"version-commit-expert",array(
'user' => $user->username,
'uuid' => $row['uuid'],
@ -2133,12 +2133,12 @@ class AuthorController extends Zend_Controller_Action
@$iso->saveDB($this->db);
//移除中间版本
$sql="delete from mdversion where uuid in (select uuid from mdversion where id=?) and changelog is null";
$sql="delete from en.mdversion where uuid in (select uuid from en.mdversion where id=?) and changelog is null";
$this->db->query($sql,array($id));
//email to admin & author
$mail=new WestdcMailer($this->view->config->smtp);
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
$mail->setFrom($this->view->config->service->email,'CARD Support Team');
$mailtp=new EmailText($this->db,"metadata-release",array(
'user' => $user->username,
'uuid' => $row['uuid'],
@ -2184,16 +2184,16 @@ class AuthorController extends Zend_Controller_Action
return true;
}
$sql = "SELECT v.uuid,md.title FROM mdversion v
$sql = "SELECT v.uuid,md.title FROM en.mdversion v
LEFT JOIN mdauthor a ON a.uuid=v.uuid
LEFT JOIN metadata md ON v.uuid=md.uuid
LEFT JOIN en.metadata md ON v.uuid=md.uuid
WHERE v.id=? AND a.userid=? AND a.status=1";
$sth = $this->db->prepare($sql);
$sth -> execute(array($id,$u_id));
$row = $sth->fetch();
$sql = "SELECT v.* FROM mdversion v
$sql = "SELECT v.* FROM en.mdversion v
WHERE v.uuid=? AND v.id<=?
ORDER BY v.ts_created DESC
LIMIT ?";
@ -2239,8 +2239,8 @@ class AuthorController extends Zend_Controller_Action
//查看属于自己的所有的未提交数据列表
else if((empty($ac) && empty($uuid))|| $ac=='list')
{
$sql = "SELECT (regexp_matches(gn.data,'<resTitle>(.*)</resTitle>'))[1] as title,gn.id,gn.uuid FROM geonetworkmetadata gn
WHERE gn.uuid not in (select uuid from metadata) and gn.owner=?
$sql = "SELECT (regexp_matches(gn.data,'<resTitle>(.*)</resTitle>'))[1] as title,gn.id,gn.uuid FROM en.geonetworkmetadata gn
WHERE gn.uuid not in (select uuid from en.metadata) and gn.owner=?
order by gn.id desc
";
$sth = $this->db->prepare($sql);
@ -2289,8 +2289,8 @@ class AuthorController extends Zend_Controller_Action
else if($ac=="add-by-data")
{
$keywords = $this->_request->getParam('q');
$sql = "SELECT md.title,md.uuid,md.description,gn.id as gid FROM normalmetadata md
left join geonetworkmetadata gn on md.uuid=gn.uuid
$sql = "SELECT md.title,md.uuid,md.description,gn.id as gid FROM en.normalmetadata md
left join en.geonetworkmetadata gn on md.uuid=gn.uuid
WHERE gn.id is not null";
if(!empty($keywords))
{
@ -2323,7 +2323,7 @@ class AuthorController extends Zend_Controller_Action
$id = $this->_request->getParam('id');
if(empty($id) || !is_numeric($id))
{
$data = array("error"=>"参数错误");
$data = array("error"=>"Wrong parameter");
$this->jsonexit($data);
return true;
}
@ -2331,7 +2331,7 @@ class AuthorController extends Zend_Controller_Action
$changelog = $this->_request->getParam('changelog');
if(empty($changelog))
{
$data = array("error"=>$this->alertbox('warning','请输入变更信息'));
$data = array("error"=>$this->alertbox('warning','Please add log:'));
$this->jsonexit($data);
return true;
}
@ -2343,7 +2343,7 @@ class AuthorController extends Zend_Controller_Action
$row=$sth->fetch();
if (empty($row))
{
$data = array("error"=>'无权限修改数据');
$data = array("error"=>'No edit rights.');
$this->jsonexit($data);
return true;
}
@ -2352,30 +2352,33 @@ class AuthorController extends Zend_Controller_Action
@$iso->loadXML($row['data']);
if ($iso->validate())
{
$data=array("error"=>"元数据导入过程中发现错误。<br />".implode("<br />",$iso->error));
$data=array("error"=>"Errors found in import metadata.<br />".implode("<br />",$iso->error));
$this->jsonexit($data);
return true;
}
// 保存数据作者信息
$sql="insert into mdauthor (uuid,userid,ts_activated,status) select ?,?,now(),1 where not exists (select id from mdauthor where uuid=? and userid=?)";
// 仅保存不存在的作者信息
$sql="insert into mdauthor (uuid,userid,ts_activated,status) select ?,?,now(),1 where not exists
(select id from mdauthor where uuid=? and userid=?)";
$this->db->query($sql,array($row['uuid'],$u_id,$row['uuid'],$u_id));
// 2. 保存变化记录 save changelog & userid for the latest version
$sql = "UPDATE mdversion SET changelog=?,userid=? WHERE id in (select id from mdversion where uuid=? order by ts_created desc limit 1)";
$sql = "UPDATE en.mdversion SET changelog=?,userid=? WHERE id in (select id from en.mdversion where uuid=? order by ts_created desc limit 1)";
$this->db->query($sql,array($changelog,$u_id,$row['uuid']));
file_get_contents("http://ftp2.westgis.ac.cn/proftp_upload.php?uuid=".$row['uuid']."&filelist=1");
//暂时不导入文件信息(英文版数据的文件信息都在中文版导入过)
//file_get_contents("http://ftp2.westgis.ac.cn/proftp_upload.php?uuid=".$row['uuid']."&filelist=1");
// 3. 保存数据评审状态
//导入元数据
@$iso->saveDB($this->db);
//进入评审库
$sql="insert into mdstatus (uuid,status,userid) select ?,0,? where not exists (select id from mdstatus where uuid=? and userid=?)";
$sql="insert into en.mdstatus (uuid,status,userid) select ?,0,? where not exists (select id from en.mdstatus where uuid=? and userid=?)";
$this->db->query($sql,array($row['uuid'],$u_id,$row['uuid'],$u_id));
//email to admin
$mail=new WestdcMailer($this->view->config->smtp);
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
$mailtp=new EmailText($this->db,"metadata-new-admin",array(
$mail->setFrom($this->view->config->service->email,'CARD Support Team');
$mailtp=new EmailText($this->db,"metadata-new-admin-en",array(
'user' => $user->username,
'uuid' => $iso->uuid,
'email'=> $user->email,
@ -2396,8 +2399,8 @@ class AuthorController extends Zend_Controller_Action
unset($mailtp);
//email to author
$mail=new WestdcMailer($this->view->config->smtp);
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
$mailtp=new EmailText($this->db,"metadata-new-author",array(
$mail->setFrom($this->view->config->service->email,'CARD Support Team');
$mailtp=new EmailText($this->db,"metadata-new-author-en",array(
'user' => $user->username,
'uuid' => $iso->uuid,
'email'=> $user->email,
@ -2415,11 +2418,11 @@ class AuthorController extends Zend_Controller_Action
}
@$mail->send();
$data = array("commited"=>1,"error"=>$this->alertbox('ok','该版本已经成功提交,请等待数据中心进一步处理!'));
$data = array("commited"=>1,"error"=>$this->alertbox('ok','The submit is successful, please wait for review.'));
$this->jsonexit($data);
return true;
}catch(Exception $e) {
$msg = "提交失败,请确认权限后重试";
$msg = "Aborted, Please contact the CARD Support Team.";
if($this->debug>0)
{$msg .= $e->getMessage();}
$data = array("error"=>$this->alertbox('error',$msg));
@ -2446,7 +2449,7 @@ class AuthorController extends Zend_Controller_Action
return true;
}
//安全检查: uuid必须是当前用户且为新建数据
$sql="select * from geonetworkmetadata where uuid=? and uuid not in (select uuid from metadata) and owner=?";
$sql="select * from en.geonetworkmetadata where uuid=? and uuid not in (select uuid from metadata) and owner=?";
$sth=$this->db->prepare($sql);
$sth->execute(array($uuid,$u_id));
$row=$sth->fetch();
@ -2568,7 +2571,7 @@ class AuthorController extends Zend_Controller_Action
}
//安全考虑
if (!empty($uuid) && !viewAssist::isUuid($uuid)) die();
if (!empty($uuid) && !view::isUuid($uuid)) die();
//include_once("helper/view.php");
include_once("data/Author.php");
@ -2588,14 +2591,14 @@ class AuthorController extends Zend_Controller_Action
if(empty($ac) && empty($uuid))
{
$this->view->referenceType = $reference->referenceType();
viewAssist::addPaginator($reference->getReferencesByAuthor($u_id),$this, $this->view->pagelimit);
view::addPaginator($reference->getReferencesByAuthor($u_id),$this, $this->view->pagelimit);
return true;
}
//逐文献浏览
else if ($ac=="byliter")
{
$this->_helper->viewRenderer('literature-byliter');
viewAssist::addPaginator($reference->getReferencesByAuthor($u_id,1,0),$this, $this->view->pagelimit);
view::addPaginator($reference->getReferencesByAuthor($u_id,1,0),$this, $this->view->pagelimit);
return true;
}
//浏览数据的文献
@ -2605,13 +2608,13 @@ class AuthorController extends Zend_Controller_Action
if (empty($keyword))
{
$this->_helper->viewRenderer('literature-viewdata');
viewAssist::addPaginator($reference->getReferencesByAuthorUUID($u_id,$uuid,0),$this, $this->view->pagelimit);
view::addPaginator($reference->getReferencesByAuthorUUID($u_id,$uuid,0),$this, $this->view->pagelimit);
} else {
$this->_helper->viewRenderer('literature-refsearch');
$sql="select title from metadata where uuid='$uuid'";
$sql="select title from en.metadata where uuid='$uuid'";
$rs=$this->db->fetchRow($sql);
$this->view->mdtitle=$rs['title'];
viewAssist::addPaginator($reference->fetchReferencesWithUUID($uuid),$this, $this->view->pagelimit);
view::addPaginator($reference->fetchReferencesWithUUID($uuid),$this, $this->view->pagelimit);
}
return true;
}
@ -2621,7 +2624,7 @@ class AuthorController extends Zend_Controller_Action
{
$this->view->referenceType = $reference->referenceType();
$this->_helper->viewRenderer('literature-cited');
viewAssist::addPaginator($reference->getReferencesByAuthor($u_id,1,1),$this, $this->view->pagelimit);
view::addPaginator($reference->getReferencesByAuthor($u_id,1,1),$this, $this->view->pagelimit);
return true;
}
@ -2708,10 +2711,126 @@ class AuthorController extends Zend_Controller_Action
return true;
}
}
//添加文献信息
else if($ac == "add")
{
//查看单条文献的所有数据
if (!empty($id) && empty($ac))
{
$sql = "SELECT md.title,md.uuid,r.id,r.reference,r.link,(a.userid-?) as isauthor FROM mdref mr
LEFT JOIN en.metadata md ON md.uuid=mr.uuid
LEFT JOIN mdauthor a ON md.uuid=a.uuid
left join reference r on mr.refid=r.id
WHERE md.title IS NOT NULL AND mr.refid=? AND a.status=1
order by md.ts_created desc
";
$sth = $this->db->prepare($sql);
$sth->execute(array($u_id,$id));
$rows = $sth->fetchAll();
@$this->view->mdtitle=$rows[0]['reference'];
$paginator = Zend_Paginator::factory($rows);
$paginator->setCurrentPageNumber($this->_getParam('page'));
$paginator->setItemCountPerPage(15);
$paginator->setView($this->view);
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
$this->view->paginator=$paginator;
$this->_helper->viewRenderer('literature-viewliter');
}
//查看所有文献列表
else if((empty($ac) && empty($uuid)) && empty($id))
{
$keywords = $this->_request->getParam('q');
$sql = "SELECT md.title,md.uuid,r.reference,r.id,mr.id as mrid FROM mdref mr
LEFT JOIN en.metadata md ON md.uuid=mr.uuid
LEFT JOIN mdauthor a ON md.uuid=a.uuid
left join reference r on mr.refid=r.id
WHERE md.title IS NOT NULL AND a.userid=? AND a.status=1";
if(!empty($keywords))
$this->view->q = $keywords;
if(!empty($keywords))
{
$search=new SimpleSearch($keywords);
$where=$search->sql_expr(array("r.reference","md.title","md.description"));
$sql.=' and '.$where;
}
$sql.=" order by md.ts_created desc";
$sth = $this->db->prepare($sql);
$sth->execute(array($u_id));
$rows = $sth->fetchAll();
$paginator = Zend_Paginator::factory($rows);
$paginator->setCurrentPageNumber($this->_getParam('page'));
$paginator->setItemCountPerPage(15);
$paginator->setView($this->view);
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
$this->view->paginator=$paginator;
}
//按文献浏览
else if($ac=="byliter")
{
$keywords = $this->_request->getParam('q');
if(!empty($keywords))
$this->view->q = $keywords;
$sql = "SELECT count(md.uuid) as c,r.reference,r.id FROM reference r
left join mdref mr on r.id=mr.refid
LEFT JOIN en.metadata md ON md.uuid=mr.uuid
LEFT JOIN mdauthor a ON md.uuid=a.uuid
WHERE md.title IS NOT NULL AND a.userid=? AND a.status=1";
if(!empty($keywords))
{
$search=new SimpleSearch($keywords);
$where=$search->sql_expr(array("r.reference"));
$sql.=' and '.$where;
}
$sql.=" group by r.reference,r.id";
$sth = $this->db->prepare($sql);
$sth->execute(array($u_id));
$rows = $sth->fetchAll();
$paginator = Zend_Paginator::factory($rows);
$paginator->setCurrentPageNumber($this->_getParam('page'));
$paginator->setItemCountPerPage(10);
$paginator->setView($this->view);
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
$this->view->paginator=$paginator;
$this->_helper->viewRenderer('literature-byliter');
}
//单条文献的信息
else if ($ac == "get")
{
$this->_helper->layout->disableLayout();
$this->_helper->viewRenderer->setNoRender();
$id = $this->_getParam('id');
$data = $author->Literature->getOne($id);
$this->jsonexit($data);
return true;
}
//按数据浏览
else if($ac=="bydata")
{
$keywords = $this->_request->getParam('q');
if(!empty($keywords))
{
$lit = $author->Literature->bydata($keywords);
$this->view->q = $keywords;
}else{
$lit = $author->Literature->bydata();
}
view::addPaginator($lit,$this->view,$this->_request);
$this->_helper->viewRenderer('literature-bydata');
}
//添加文献信息
else if($ac == "add")
{
$submit = $this->_request->getParam('submit');
if(!empty($submit))
{
@ -2819,7 +2938,7 @@ class AuthorController extends Zend_Controller_Action
exit();
}
}catch(Exception $e){
$msg['error'] = "错误:".$e->getMessage();
$msg['error'] = "Error: ".$e->getMessage();
echo Zend_Json::encode($msg);
exit();
}
@ -4086,19 +4205,18 @@ class AuthorController extends Zend_Controller_Action
$text = '<h4>'.$body.'</h4>';
return $text;
}
}
}
//导出元数据到英文版本
public function gnenexportAction()
{
//use Helpers\View as view;
$uuid = $this->_getParam('uuid');
$auth = Zend_Auth::getInstance();
if($auth->hasIdentity())
{
$user = $auth->getIdentity();
$u_id = $user->id;
if (!empty($uuid) && !Helpers\View::isUuid($uuid)) die();
if (!empty($uuid) && !view::isUuid($uuid)) die();
$sql="select * from mdauthor where uuid=? and userid=? and status in (0,1)";
$sth = $this->db->prepare($sql);
$sth->execute(array($uuid,$u_id));

File diff suppressed because it is too large Load Diff

View File

@ -49,12 +49,6 @@ class HaiheController extends DataController
$this->_helper->viewRenderer('base');
}
function huailaiAction()
{
$this->getmd(array('怀来县'),'place');
$this->_helper->viewRenderer('base');
}
function viewAction()
{
parent::viewAction();

View File

@ -5,9 +5,9 @@ class HiwaterController extends DataController
function preDispatch()
{
parent::preDispatch();
//$this->_helper->layout->setLayout('hiwater');
$this->debug = 1;
parent::preDispatch();
$this->debug = 0;
$acName = $this->_request->getActionName();
if(in_array($acName,array("aviation","radiometer","lidar","ccdlidar","widas",'ccdwidas',"nearvis","thermal")))
{
@ -17,7 +17,7 @@ class HiwaterController extends DataController
{
$this->view->pageIn = "collapse2";
}
else if(in_array($acName,array("hmon",'hmon2012','hmon2013','hmon2014','hmon2015','hmon2016','hmon2017','hmon2012up','hmon2012middle','hmon2012down','hmon2013up','hmon2013middle','hmon2013down','hmon2014up','hmon2014middle','hmon2014down','hmon2015up','hmon2015middle','hmon2015down','hmon2016up','hmon2016middle','hmon2016down','hmon2017up','hmon2017middle','hmon2017down','super','normal','prec')))
else if(in_array($acName,array("hmon",'hmon2012','hmon2013','hmon2012up','hmon2012middle','hmon2012down','hmon2013up','hmon2013middle','hmon2013down','super','normal','prec')))
{
$this->view->pageIn = "collapse3";
}
@ -33,7 +33,7 @@ class HiwaterController extends DataController
{
$this->view->pageIn = "collapse6";
}
else if(in_array($acName,array("rsproduct","dem","precipitation",'sm',"snow","vegtype","vegcov",'phenology','npp','lst')))
else if(in_array($acName,array("rsproduct","dem","precipitation",'sm',"snow","vegtype","vegcov",'phenology','npp')))
{
$this->view->pageIn = "collapse7";
}
@ -46,15 +46,15 @@ class HiwaterController extends DataController
$this->view->pageIn = "collapse9";
}
$this->view->pageID = "hiwater-".$acName;
$this->_helper->layout->setLayout('heihe');
//$this->_helper->layout->setLayout('heihe');
}
function indexAction()
{
$sql="select m.uuid,m.title,m.id,m.description from normalmetadata m left join thumbnail t on m.id=t.id where m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and length(t.data)>2 order by random() limit 3";
$sql="select m.uuid,m.title,m.id,m.description from en.normalmetadata m left join en.thumbnail t on m.id=t.id where m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and length(t.data)>2 order by random() limit 3";
$this->view->meatdata=$this->db->fetchAll($sql);
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('HiWATER黑河流域生态-水文过程综合遥感观测联合试验','about');
$this->view->info = $archive->getOneArchive('Heihe Watershed Allied Telemetry Experimental Research (HiWATER)','about');
}
/*
@ -65,11 +65,11 @@ class HiwaterController extends DataController
$page=(int)$this->_request->getParam('page');
if (empty($page)) $page=1;
$offset=$this->limit*($page-1);
$state=$this->db->query("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') ");
$state=$this->db->query("select count(*) from en.normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') ");
$row=$state->fetchAll();
$sum=$row[0]['count'];
$select=$this->db->select();
$select->from('normalmetadata','*')->where(" uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') ")->order('title desc')->limitPage($page,$this->limit);
$select->from('en.normalmetadata','*')->where(" uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') ")->order('title desc')->limitPage($page,$this->limit);
$this->view->metadata = $this->db->fetchAll($select);
$this->view->page=new Pagination($sum,$page,$this->limit);
$this->view->offset=$offset+1;
@ -80,11 +80,11 @@ class HiwaterController extends DataController
$page=(int)$this->_request->getParam('page');
if (empty($page)) $page=1;
$offset=$this->limit*($page-1);
$state=$this->db->query("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') ");
$state=$this->db->query("select count(*) from en.normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') ");
$row=$state->fetchAll();
$sum=$row[0]['count'];
$select=$this->db->select();
$select->from('normalmetadata as m','m.*')
$select->from('en.normalmetadata as m','m.*')
->where(" uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') ")
->order('m.title desc')->limitPage($page,$this->limit);
$this->view->metadata = $this->db->fetchAll($select);
@ -96,97 +96,97 @@ class HiwaterController extends DataController
$page=(int)$this->_request->getParam('page');
if (empty($page)) $page=1;
$offset=$this->limit*($page-1);
$row=$this->db->fetchAll("select count(*) from reference where id in (select refid from mdref where uuid in (select uuid from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') ))");
$row=$this->db->fetchAll("select count(*) from reference where language<>'zh' and id in (select refid from mdref where uuid in (select uuid from en.normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') ))");
$sum=$row[0]['count'];
$sql="select * from reference where id in (select refid from mdref where uuid in (select uuid from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') )) order by reference limit ? offset ?";
$sql="select * from reference where language<>'zh' and id in (select refid from mdref where uuid in (select uuid from en.normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') )) order by reference limit ? offset ?";
$this->view->refs=$this->db->fetchAll($sql,array($this->limit,$offset));
$this->view->page=new Pagination($sum,$page,$this->limit,"文献");
$this->view->page=new Pagination($sum,$page,$this->limit,"literatures");
$this->view->offset=$offset+1;
}
function aviationAction()
{
$this->getmdlimited(array('WiDAS','PLMR','Lidar','CASI','热红外高光谱数据'),'航空遥感');
$this->getmdlimited(array('WiDAS','WIDAS','PLMR','LIDAR','CASI','thermal-infrared hyperspectral data'),'airborne remote sensing');
$this->_helper->viewRenderer('base');
}
function radiometerAction()
{
$this->getmdlimited('PLMR','航空遥感');
$this->getmdlimited('PLMR','airborne remote sensing');
$this->_helper->viewRenderer('base');
}
function lidarAction()
{
$this->getmdlimited('激光雷达','航空遥感',array('CCD'));
$this->getmdlimited('LIDAR','airborne remote sensing',array('CCD'));
$this->_helper->viewRenderer('base');
}
function ccdlidarAction()
{
$this->getmdrestricted(array('CCD','航空遥感',"激光雷达"));
$this->getmdrestricted(array('CCD','airborne remote sensing',"LIDAR"));
$this->_helper->viewRenderer('base');
}
function widasAction()
{
$this->getmdlimited('WIDAS','航空遥感',array('CCD'));
$this->getmdlimited('WIDAS','airborne remote sensing',array('CCD'));
$this->_helper->viewRenderer('base');
}
function ccdwidasAction()
{
$this->getmdrestricted(array('CCD','航空遥感','WIDAS'));
$this->getmdrestricted(array('CCD','airborne remote sensing','WIDAS'));
$this->_helper->viewRenderer('base');
}
function nearvisAction()
{
$this->getmdlimited('CASI','航空遥感');
$this->getmdlimited('CASI','airborne remote sensing');
$this->_helper->viewRenderer('base');
}
function thermalAction()
{
$this->getmdlimited('热红外高光谱数据','航空遥感');
$this->getmdlimited('thermal-infrared hyperspectral data','airborne remote sensing');
$this->_helper->viewRenderer('base');
}
function airborneAction()
{
$this->getmdlimited(array('DEM','DSM','DOM','地表反照率','地表反射率','植被类型','植被结构参数','土壤水分','地表温度'),'航空遥感产品');
$this->getmdlimited(array('DEM','DSM','DOM','albedo','land use','vegetation type','Vegetation structure parameters','soil water content','land surface temperature'),'airborne remote sensing data products');
$this->_helper->viewRenderer('base');
}
function demdsmAction()
{
$this->getmdlimited(array('DEM','DSM','DOM'),"航空遥感产品");
$this->getmdlimited(array('DEM','DSM','DOM'),"airborne remote sensing data products");
$this->_helper->viewRenderer('base');
}
function reflectanceAction()
{
$this->getmdlimited(array('地表反照率','地表反射率'),"航空遥感产品");
$this->getmdlimited(array('albedo'),"airborne remote sensing data products");
$this->_helper->viewRenderer('base');
}
function vegtypeairAction()
{
$this->getmdlimited(array('植被类型'),'航空遥感产品');
$this->getmdlimited(array('vegetation type','land use'),'airborne remote sensing data products');
$this->_helper->viewRenderer('base');
}
function vegparamAction()
{
$this->getmdlimited(array("",'植被结构参数'),"航空遥感产品");
$this->getmdlimited(array("",'Vegetation structure parameters'),"airborne remote sensing data products");
$this->_helper->viewRenderer('base');
}
function soilmoistureAction()
{
$this->getmdlimited(array('','土壤水分'),"航空遥感产品");
$this->getmdlimited(array('','soil water content'),"airborne remote sensing data products");
$this->_helper->viewRenderer('base');
}
function temperatureAction()
{
$this->getmdlimited(array('','地表温度'),"航空遥感产品");
$this->getmdlimited(array('','land surface temperature'),"airborne remote sensing data products");
$this->_helper->viewRenderer('base');
}
function hmonAction()
{
$this->getmd(array('水文气象观测网'));
$this->getmd(array('Hydrometeorology observation network'));
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('HiWATER:流域水文气象观测网','about');
$this->view->info = $archive->getOneArchive('HiWATER-HMon','about');
$this->_helper->viewRenderer('base');
}
function superAction()
@ -203,24 +203,24 @@ class HiwaterController extends DataController
function autometeoAction()
{
$this->getmdlimited(array('','自动气象站'),'通量观测矩阵');
$this->getmdlimited(array('','automatic weather station'),'flux observation matrix');
$this->_helper->viewRenderer('base');
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('HiWATER-通量观测矩阵','about');
$this->view->info = $archive->getOneArchive('HiWATER-MSO','about');
}
function ecAction()
{
$this->getmdlimited(array('','涡动相关仪'),'通量观测矩阵');
$this->getmdlimited(array('','eddy covariance system'),'flux observation matrix');
$this->_helper->viewRenderer('base');
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('HiWATER-通量观测矩阵','about');
$this->view->info = $archive->getOneArchive('HiWATER-MSO','about');
}
function lasAction()
{
$this->getmdlimited(array('','大孔径闪烁仪'),'通量观测矩阵');
$this->getmdlimited(array('','large aperture scintillometer'),'flux observation matrix');
$this->_helper->viewRenderer('base');
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('HiWATER-通量观测矩阵','about');
$this->view->info = $archive->getOneArchive('HiWATER-MSO','about');
}
function precAction()
@ -231,28 +231,28 @@ class HiwaterController extends DataController
function cgsAction()
{
$this->getmd(array('定标观测','地基遥感观测','地面同步观测'));
$this->getmd(array('calibration measurement','ground measurement','synchronous observation'));
$this->_helper->viewRenderer('base');
}
function calibrationAction()
{
$this->getmd(array('','定标观测'));
$this->getmd(array('','calibration measurement'));
$this->_helper->viewRenderer('base');
}
function groundAction()
{
$this->getmd(array('','地基遥感观测'));
$this->getmd(array('','ground measurement'));
$this->_helper->viewRenderer('base');
}
function syncAction()
{
$this->getmd(array('','地面同步观测'));
$this->getmd(array('','synchronous observation'));
$this->_helper->viewRenderer('base');
}
function wsnAction()
{
$this->getmd(array('WATERNET','SoilNET','BNUNET','BNULAI'));
$this->getmdlimited(array('WATERNET','SoilNET','BNUNET','LAI'),'Eco-hydrological Wireless Sensor Network');
$this->_helper->viewRenderer('base');
}
function waternetAction()
@ -272,13 +272,13 @@ class HiwaterController extends DataController
}
function bnulaiAction()
{
$this->getmdlimited('LAI','生态水文无线传感器网络');
$this->getmdlimited('LAI','Eco-hydrological Wireless Sensor Network');
$this->_helper->viewRenderer('base');
}
function satelliteAction()
{
$this->getmd(array('','卫星遥感'));
$this->getmd(array('','satellite remote sensing'));
$this->_helper->viewRenderer('base');
}
@ -309,33 +309,33 @@ class HiwaterController extends DataController
function msoAction()
{
$this->getmdlimited(array('自动气象站','涡动相关仪','大孔径闪烁仪','稳定同位素观测系统','热扩散液流计TDP','宇宙射线土壤水分'),'通量观测矩阵');
$this->getmdlimited(array('automatic weather station','eddy covariance system','large aperture scintillometer','stable isotope','TDP','cosmic-ray soil moisture observing system'),'flux observation matrix');
$this->_helper->viewRenderer('base');
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('HiWATER-通量观测矩阵','about');
$this->view->info = $archive->getOneArchive('HiWATER-MSO','about');
}
function isotopeAction()
{
$this->getmdlimited(array('','稳定同位素观测系统'),'通量观测矩阵');
$this->getmdlimited(array('','stable isotope'),'flux observation matrix');
$this->_helper->viewRenderer('base');
}
function tdpAction()
{
$this->getmdlimited(array('','热扩散液流计TDP'),'通量观测矩阵');
$this->getmdlimited(array('','TDP'),'flux observation matrix');
$this->_helper->viewRenderer('base');
}
function cosmosAction()
{
$this->getmdlimited(array('','宇宙射线土壤水分'),'通量观测矩阵');
$this->getmdlimited(array('','cosmic-ray soil moisture observing system'),'flux observation matrix');
$this->_helper->viewRenderer('base');
}
function rsproductAction()
{
$this->getmd(array('卫星遥感产品'));
$this->getmdlimited(array('DEM','DOM','降水','soil moisture','snow','vegetation type','vegetation cover','crop phenology','NPP'),'satellite remote sensing data products');
$this->_helper->viewRenderer('base');
}
@ -352,178 +352,82 @@ class HiwaterController extends DataController
}
function smAction()
{
$this->getmdlimited(array('土壤水分',""),'卫星遥感产品');
$this->getmdlimited(array('soil moisture',""),'satellite remote sensing data products');
$this->_helper->viewRenderer('base');
}
function snowAction()
{
$this->getmdlimited(array('积雪',""),'卫星遥感产品');
$this->getmdlimited(array('snow',""),'satellite remote sensing data products');
$this->_helper->viewRenderer('base');
}
function vegtypeAction()
{
$this->getmdlimited(array('植被类型',''),'卫星遥感产品');
$this->getmdlimited(array('vegetation type',''),'satellite remote sensing data products');
$this->_helper->viewRenderer('base');
}
function vegcovAction()
{
$this->getmdlimited(array('植被覆盖度',''),'卫星遥感产品');
$this->getmdlimited(array('vegetation cover',''),'satellite remote sensing data products');
$this->_helper->viewRenderer('base');
}
function phenologyAction()
{
$this->getmdlimited(array('物候期',''),'卫星遥感产品');
$this->getmdlimited(array('crop phenology',''),'satellite remote sensing data products');
$this->_helper->viewRenderer('base');
}
function nppAction()
{
$this->getmdlimited(array('NPP',''),'卫星遥感产品');
$this->getmdlimited(array('NPP',''),'satellite remote sensing data products');
$this->_helper->viewRenderer('base');
}
function lstAction()
{
$this->getmdlimited(array('地表温度',''),'卫星遥感产品');
$this->_helper->viewRenderer('base');
}
function hmon2012Action()
{
$this->getmdrestricted(array('2012','水文气象观测网'));
$this->getmdrestricted(array('2012','Hydrometeorology observation network'));
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('HiWATER:流域水文气象观测网','about');
$this->view->info = $archive->getOneArchive('HiWATER-HMon','about');
$this->_helper->viewRenderer('base');
}
function hmon2013Action()
{
$this->getmdrestricted(array('2013','水文气象观测网'));
$this->getmdrestricted(array('2013','Hydrometeorology observation network'));
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('HiWATER流域水文气象观测网','about');
$this->_helper->viewRenderer('base');
}
function hmon2014Action()
{
$this->getmdrestricted(array('2014','水文气象观测网'));
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('HiWATER流域水文气象观测网','about');
$this->view->info = $archive->getOneArchive('HiWATER-HMon','about');
$this->_helper->viewRenderer('base');
}
function hmon2012upAction()
{
$this->getmdrestricted(array('2012','上游寒区水文试验区','水文气象观测网'));
$this->getmdrestricted(array('2012','上游寒区水文试验区','Hydrometeorology observation network'));
$this->_helper->viewRenderer('base');
}
function hmon2012middleAction()
{
$this->getmdrestricted(array('2012','中游人工绿洲试验区','水文气象观测网'));
$this->getmdrestricted(array('2012','中游人工绿洲试验区','Hydrometeorology observation network'));
$this->_helper->viewRenderer('base');
}
function hmon2012downAction()
{
$this->getmdrestricted(array('2012','下游天然绿洲试验区','水文气象观测网'));
$this->getmdrestricted(array('2012','下游天然绿洲试验区','Hydrometeorology observation network'));
$this->_helper->viewRenderer('base');
}
function hmon2013upAction()
{
$this->getmdrestricted(array('2013','上游寒区水文试验区','水文气象观测网'));
$this->getmdrestricted(array('2013','上游寒区水文试验区','Hydrometeorology observation network'));
$this->_helper->viewRenderer('base');
}
function hmon2013middleAction()
{
$this->getmdrestricted(array('2013','中游人工绿洲试验区','水文气象观测网'));
$this->getmdrestricted(array('2013','中游人工绿洲试验区','Hydrometeorology observation network'));
$this->_helper->viewRenderer('base');
}
function hmon2013downAction()
{
$this->getmdrestricted(array('2013','下游天然绿洲试验区','水文气象观测网'));
$this->_helper->viewRenderer('base');
}
function hmon2014upAction()
{
$this->getmdrestricted(array('2014','上游寒区水文试验区','水文气象观测网'));
$this->_helper->viewRenderer('base');
}
function hmon2014middleAction()
{
$this->getmdrestricted(array('2014','中游人工绿洲试验区','水文气象观测网'));
$this->_helper->viewRenderer('base');
}
function hmon2014downAction()
{
$this->getmdrestricted(array('2014','下游天然绿洲试验区','水文气象观测网'));
$this->getmdrestricted(array('2013','下游天然绿洲试验区','Hydrometeorology observation network'));
$this->_helper->viewRenderer('base');
}
function hmon2015Action()
{
$this->getmdrestricted(array('2015','水文气象观测网'));
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('HiWATER流域水文气象观测网','about');
$this->_helper->viewRenderer('base');
}
function hmon2015upAction()
{
$this->getmdrestricted(array('2015','上游寒区水文试验区','水文气象观测网'));
$this->_helper->viewRenderer('base');
}
function hmon2015middleAction()
{
$this->getmdrestricted(array('2015','中游人工绿洲试验区','水文气象观测网'));
$this->_helper->viewRenderer('base');
}
function hmon2015downAction()
{
$this->getmdrestricted(array('2015','下游天然绿洲试验区','水文气象观测网'));
$this->_helper->viewRenderer('base');
}
function hmon2016Action()
{
$this->getmdrestricted(array('2016','水文气象观测网'));
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('HiWATER流域水文气象观测网','about');
$this->_helper->viewRenderer('base');
}
function hmon2016upAction()
{
$this->getmdrestricted(array('2016','上游寒区水文试验区','水文气象观测网'));
$this->_helper->viewRenderer('base');
}
function hmon2016middleAction()
{
$this->getmdrestricted(array('2016','中游人工绿洲试验区','水文气象观测网'));
$this->_helper->viewRenderer('base');
}
function hmon2016downAction()
{
$this->getmdrestricted(array('2016','下游天然绿洲试验区','水文气象观测网'));
$this->_helper->viewRenderer('base');
}
function hmon2017Action()
{
$this->getmdrestricted(array('2017','水文气象观测网'));
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('HiWATER流域水文气象观测网','about');
$this->_helper->viewRenderer('base');
}
function hmon2017upAction()
{
$this->getmdrestricted(array('2017','上游寒区水文试验区','水文气象观测网'));
$this->_helper->viewRenderer('base');
}
function hmon2017middleAction()
{
$this->getmdrestricted(array('2017','中游人工绿洲试验区','水文气象观测网'));
$this->_helper->viewRenderer('base');
}
function hmon2017downAction()
{
$this->getmdrestricted(array('2017','下游天然绿洲试验区','水文气象观测网'));
$this->_helper->viewRenderer('base');
}
function listAction()
{
$sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') order by timebegin,title";
$sql="select uuid,title from en.normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') order by timebegin,title";
$this->view->metadata=$this->db->fetchAll($sql);
}
@ -536,15 +440,15 @@ class HiwaterController extends DataController
$offset=$this->limit*($page-1);
if (!empty($key)) {
$this->view->codename=$key;
$sql=$this->db->quoteInto("select count(k.id) from keyword k left join normalmetadata m on k.id=m.id where m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and k.keyword=?",$key);
$sql=$this->db->quoteInto("select count(k.id) from en.keyword k left join en.normalmetadata m on k.id=m.id where m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and k.keyword=?",$key);
$state=$this->db->query($sql);
$row=$state->fetchAll();
$sum=$row[0]['count'];
$sql="select uuid,title,id,description from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and id in (select id from keyword where keyword='".$key."') order by timebegin,title limit ? offset ?";
$sql="select uuid,title,id,description from en.normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and id in (select id from en.keyword where keyword='".$key."') order by timebegin,title limit ? offset ?";
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
$this->view->page=new Pagination($sum,$page,$this->limit);
} else {
$sql="select k.keyword,count(*),k.keytype from keyword k left join normalmetadata m on k.id=m.id where m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') ";
$sql="select k.keyword,count(*),k.keytype from en.keyword k left join en.normalmetadata m on k.id=m.id where m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') ";
if (!empty($keytype) && ($keytype=='place' || $keytype=='theme' || $keytype=='discipline'||$keytype=='temporal')) $sql.=" and k.keytype='".$keytype."'";
$sql.=' group by k.keyword,k.keytype order by k.keytype,k.keyword,count desc';
$state=$this->db->query($sql);
@ -566,9 +470,9 @@ class HiwaterController extends DataController
$page=@(int)$this->_request->getParam('page');
if (empty($page)) $page=1;
$offset=$this->limit*($page-1);
$row=$this->db->fetchAll("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and ".$where);
$row=$this->db->fetchAll("select count(*) from en.normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and ".$where);
$sum=$row[0]['count'];
$sql="select uuid,title,id,description from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and ".$where." order by timebegin,title limit ? offset ?";
$sql="select uuid,title,id,description from en.normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and ".$where." order by timebegin,title limit ? offset ?";
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
$this->view->page=new Pagination($sum,$page,$this->limit);
$this->view->key=$key;
@ -578,19 +482,19 @@ class HiwaterController extends DataController
function timemapAction()
{
$sql="select id,uuid,west,south,north,east,title,timebegin,timeend from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and timebegin is not null";
$sql="select id,uuid,west,south,north,east,title,timebegin,timeend from en.normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and timebegin is not null";
$this->view->rows=$this->db->fetchAll($sql);
}
function timelineAction()
{
$fn="hiwatertime.xml";
$rows=$this->db->fetchAll("select ts_created from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') order by ts_created desc limit 1");
$rows=$this->db->fetchAll("select ts_created from en.normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') order by ts_created desc limit 1");
$last_update=strtotime($rows[0]['ts_created']);
if (!file_exists($fn) || (filemtime($fn)<$last_update))
{
$dateformat="M j Y";
$rows=$this->db->fetchAll("select id,uuid,description,title,timebegin,timeend from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and timebegin is not null order by timebegin,title");
$rows=$this->db->fetchAll("select id,uuid,description,title,timebegin,timeend from en.normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and timebegin is not null order by timebegin,title");
$timexml='<data>';
foreach($rows as $row) {
$timexml.='<event start="'.date($dateformat,strtotime($row['timebegin'])).' GMT+0800" ';
@ -615,11 +519,11 @@ class HiwaterController extends DataController
$page=(int)$this->_request->getParam('page');
if (empty($page)) $page=1;
$offset=$this->limit*($page-1);
$this->view->category=$this->db->fetchAll("select c.code,name,name_zh,count(*) from category c left join normalmetadata m on c.id=m.id,categorycode cc where c.code=cc.code and m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') group by c.code,cc.name,cc.name_zh");
$this->view->category=$this->db->fetchAll("select c.code,name,name_zh,count(*) from category c left join en.normalmetadata m on c.id=m.id,categorycode cc where c.code=cc.code and m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') group by c.code,cc.name,cc.name_zh");
if ($code>0 && $code<20) {
$row=$this->db->fetchAll("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and id in (select id from category where code=".$code.")");
$row=$this->db->fetchAll("select count(*) from en.normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and id in (select id from category where code=".$code.")");
$sum=$row[0]['count'];
$sql="select uuid,title,description,id from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and id in (select distinct id from category where code=".$code.") order by timebegin,title limit ? offset ?";
$sql="select uuid,title,description,id from en.normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and id in (select distinct id from category where code=".$code.") order by timebegin,title limit ? offset ?";
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
$this->view->page=new Pagination($sum,$page,$this->limit);
$this->view->offset=$offset+1;
@ -633,7 +537,12 @@ class HiwaterController extends DataController
function viewAction()
{
parent::viewAction();
$this->_helper->viewRenderer('hiwater/view');
include_once("ipip/IP.class.php");
$ip=new IP();
if (!$ip->mainland_verify())
$this->_helper->viewRenderer('hiwater/view');
else
$this->_helper->viewRenderer('hiwater/view-tianditu');
}
private function getmd($keyword,$type='theme')
@ -654,11 +563,13 @@ class HiwaterController extends DataController
$key.=")";
$keyword=$key;
$state=$this->db->query("select count(m.*) from normalmetadata m left join datasource d on m.uuid=d.uuid left join source s on d.sourceid=s.id where s.code='hiwater' and m.id in (select id from keyword where keytype='".$type."' and keyword in ".$keyword.")");
$state=$this->db->query("select count(m.*) from en.normalmetadata m left join datasource d on m.uuid=d.uuid left join source s on d.sourceid=s.id where s.code='hiwater' and m.id in (select id from en.keyword where keytype='".$type."' and keyword in ".$keyword.")");
$row=$state->fetchAll();
$sum=$row[0]['count'];
//@todo: add order with title
$sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and id in (select id from keyword where keytype='".$type."' and keyword in ".$keyword.") order by title limit ? offset ?";
$sql="select uuid,title from en.normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater')
and id in (select id from en.keyword where keytype='".$type."' and keyword in ".$keyword.")
order by regexp_replace(title,'[0-9]+','','g'),(substring(title, '([0-9]+)'))::int limit ? offset ?";
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
$this->view->page=new Pagination($sum,$page,$this->limit);
$this->view->offset=$offset+1;
@ -701,20 +612,20 @@ class HiwaterController extends DataController
$withoutkey.=")";
}
$sql="select count(m.*) from normalmetadata m left join datasource d on m.uuid=d.uuid left join source s on d.sourceid=s.id
where s.code='hiwater' and m.id in (select id from keyword where keyword='".$limited."')
and m.id in (select id from keyword where keyword in ".$keyword.")";
if (!empty($without)) $sql.=" and m.id not in (select id from keyword where keyword in $withoutkey)";
$sql="select count(m.*) from en.normalmetadata m left join datasource d on m.uuid=d.uuid left join source s on d.sourceid=s.id
where s.code='hiwater' and m.id in (select id from en.keyword where lower(keyword)=lower('".$limited."'))
and m.id in (select id from en.keyword where keyword in ".$keyword.")";
if (!empty($without)) $sql.=" and m.id not in (select id from en.keyword where keyword in $withoutkey)";
$state=$this->db->query($sql);
$row=$state->fetchAll();
$sum=$row[0]['count'];
//@todo: add order with title
$sql="select uuid,title from normalmetadata where
$sql="select uuid,title from en.normalmetadata where
uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater')
and id in (select id from keyword where keyword='".$limited."')
and id in (select id from keyword where keyword in ".$keyword.")";
if (!empty($without)) $sql.=" and id not in (select id from keyword where keyword in $withoutkey)";
$sql.=" order by title limit ? offset ?";
and id in (select id from en.keyword where lower(keyword)=lower('".$limited."'))
and id in (select id from en.keyword where keyword in ".$keyword.")";
if (!empty($without)) $sql.=" and id not in (select id from en.keyword where keyword in $withoutkey)";
$sql.=" order by regexp_replace(title,'[0-9]+','','g'),(substring(title, '([0-9]+)'))::int limit ? offset ?";
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
$this->view->page=new Pagination($sum,$page,$this->limit);
$this->view->offset=$offset+1;
@ -734,20 +645,20 @@ class HiwaterController extends DataController
$key="(";
foreach($keyword as $k)
{
$key.="m.id in (select id from keyword where keyword='".$k."') and ";
$key.="m.id in (select id from en.keyword where keyword='".$k."') and ";
}
$key=substr($key,0,-4);
$key.=")";
$keyword=$key;
$state=$this->db->query("select count(m.*) from normalmetadata m left join datasource d on m.uuid=d.uuid left join source s on d.sourceid=s.id where s.code='hiwater' and $keyword");
$state=$this->db->query("select count(m.*) from en.normalmetadata m left join datasource d on m.uuid=d.uuid left join source s on d.sourceid=s.id where s.code='hiwater' and $keyword");
$row=$state->fetchAll();
$sum=$row[0]['count'];
//@todo: add order with title
$sql="select uuid,title from normalmetadata m where m.uuid in
$sql="select uuid,title from en.normalmetadata m where m.uuid in
(select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater')
and $keyword
order by title limit ? offset ?";
order by regexp_replace(title,'[0-9]+','','g'),(substring(title, '([0-9]+)'))::int limit ? offset ?";
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
$this->view->page=new Pagination($sum,$page,$this->limit);
$this->view->offset=$offset+1;
@ -766,7 +677,7 @@ class HiwaterController extends DataController
//列出作者的数据
$sql="select username,realname from users where id=?";
$this->view->author=$this->db->fetchRow($sql,array($id));
$sql="select m.* from normalmetadata m left join mdauthor a on a.uuid=m.uuid where m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and a.userid=?";
$sql="select m.* from en.normalmetadata m left join mdauthor a on a.uuid=m.uuid where m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and a.userid=?";
$sth = $this->db->prepare($sql);
$sth->execute(array($id));
$rows = $sth->fetchAll();
@ -778,7 +689,7 @@ class HiwaterController extends DataController
$this->view->paginator=$paginator;
} else {
//已经认证过的数据作者
$sql="select u.username,u.realname,u.id,count(u.id) as count from mdauthor a left join users u on a.userid=u.id where a.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and a.status=1 and a.uuid in (select uuid from normalmetadata) group by u.id,u.username,u.realname";
$sql="select u.username,u.realname,u.id,count(u.id) as count from mdauthor a left join users u on a.userid=u.id where a.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and a.status=1 and a.uuid in (select uuid from en.normalmetadata) group by u.id,u.username,u.realname";
$sth = $this->db->prepare($sql);
$sth->execute();
$rows = $sth->fetchAll();
@ -795,9 +706,9 @@ class HiwaterController extends DataController
$this->view->ac='unverified';
if ($id) {
//列出数据
$sql="select individual as username from responsible where id=?";
$sql="select individual as username from en.responsible where id=?";
$this->view->author=$this->db->fetchRow($sql,array($id));
$sql="select distinct m.* from normalmetadata m left join role r on m.uuid=r.uuid left join responsible s on r.resid=s.id where r.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and r.role in ('pointOfContact','resourceProvider','owner') and s.id=?";
$sql="select distinct m.* from en.normalmetadata m left join en.role r on m.uuid=r.uuid left join en.responsible s on r.resid=s.id where r.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and r.role in ('pointOfContact','resourceProvider','owner') and s.id=?";
$sth = $this->db->prepare($sql);
$sth->execute(array($id));
$rows = $sth->fetchAll();
@ -809,7 +720,7 @@ class HiwaterController extends DataController
$this->view->paginator=$paginator;
} else {
//列出所有作者
$sql="select distinct responsible.individual as username,responsible.id from responsible left join role on role.resid=responsible.id where role.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and role.role in ('pointOfContact','resourceProvider','owner')";
$sql="select distinct responsible.individual as username,responsible.id from en.responsible left join en.role on role.resid=responsible.id where role.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and role.role in ('pointOfContact','resourceProvider','owner')";
$sth = $this->db->prepare($sql);
$sth->execute();
$rows = $sth->fetchAll();
@ -830,7 +741,7 @@ class HiwaterController extends DataController
$sql="select * from fund where id=?";
$this->view->fund=$this->db->fetchRow($sql,array($id));
if ($this->view->fund) {
$sql="select distinct m.* from normalmetadata m left join mdfund mf on m.uuid=mf.uuid where m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and mf.fid=?";
$sql="select distinct m.* from en.normalmetadata m left join mdfund mf on m.uuid=mf.uuid where m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and mf.fid=?";
$sth = $this->db->prepare($sql);
$sth->execute(array($id));
$rows = $sth->fetchAll();
@ -843,7 +754,7 @@ class HiwaterController extends DataController
}
} else {
//提供全部分类列表
$sql="select f.id,f.title,f.fund_id,f.fund_type,f.ts_created,count(m.id) as datacount,sum(md.filesize) as filesize from fund f left join mdfund m on f.id=m.fid left join metadata md on m.uuid=md.uuid where m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') group by f.id,f.title,f.fund_id,f.fund_type,f.ts_created order by f.ts_created desc";
$sql="select f.id,f.title_en,f.fund_id,f.fund_type_en,f.ts_created,count(m.id) as datacount,sum(md.filesize) as filesize from fund f left join mdfund m on f.id=m.fid right join en.normalmetadata md on m.uuid=md.uuid where m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') group by f.id,f.title,f.fund_id,f.fund_type,f.ts_created order by f.ts_created desc";
$sth = $this->db->prepare($sql);
$sth->execute();
$rows = $sth->fetchAll();
@ -861,11 +772,11 @@ class HiwaterController extends DataController
{
$page = $this->_request->getParam('page');
$name = $this->_request->getParam('name');
$state=$this->db->query("select distinct responsible.organisation from responsible left join role on role.resid=responsible.id where role.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and role.role in ('pointOfContact','resourceProvider','owner')");
$state=$this->db->query("select distinct responsible.organisation from en.responsible left join en.role on role.resid=responsible.id where role.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and role.role in ('pointOfContact','resourceProvider','owner')");
$this->view->organisation=$state->fetchAll();
if (!empty($name)) {
$this->view->codename=$name;
$sql="select distinct m.* from normalmetadata m left join role r on m.uuid=r.uuid left join responsible s on r.resid=s.id where m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and r.role in ('pointOfContact','resourceProvider','owner') and s.organisation=?";
$sql="select distinct m.* from en.normalmetadata m left join en.role r on m.uuid=r.uuid left join en.responsible s on r.resid=s.id where m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and r.role in ('pointOfContact','resourceProvider','owner') and s.organisation=?";
$sth = $this->db->prepare($sql);
$sth->execute(array($name));
$rows = $sth->fetchAll();

View File

@ -10,10 +10,10 @@ class IndexController extends Zend_Controller_Action
$this->view->main_nav_pageID = "index";
}
function indexAction()
{
function indexAction()
{
//统计数据
$sql='select (select count(*) from users) as usernum,(select count(*) from metadata) as metanum,(select count(*) from offlineapp where ts_approved is not null ) as offlinenum';
$sql='select (select count(*) from users) as usernum,(select count(*) from normalmetadata) as metanum,(select count(*) from offlineapp where ts_approved is not null ) as offlinenum';
$row=$this->db->fetchRow($sql);
$this->view->usernum=$row['usernum'];
$this->view->metanum=$row['metanum'];
@ -21,7 +21,7 @@ class IndexController extends Zend_Controller_Action
/*$sql='select count(*) from metadata';
$row=$this->db->fetchRow($sql);
$this->view->metanum=$row['count'];*/
$sql="select sum(filesize) as sum,datatype from metadata group by datatype";
$sql="select sum(filesize) as sum,datatype from normalmetadata group by datatype";
$rows=$this->db->fetchAll($sql);
foreach($rows as $row)
{
@ -30,14 +30,11 @@ class IndexController extends Zend_Controller_Action
else
$this->view->onlinesize=$row['sum'];
}
//特色推荐
$sql="select * from datafeature order by id desc";
$this->view->feature=$this->db->fetchRow($sql);
//下载最多数据(top 5)
$sql="select uuid,title,id from normalmetadata where id in (select m.id from normalmetadata m left join dataorder d on m.uuid=d.uuid where m.datatype=0 group by m.id order by count(d.uuid) desc limit 5)";
$sql="select uuid,title,id from en.normalmetadata where id in (select m.id from en.normalmetadata m left join dataorder d on m.uuid=d.uuid where m.datatype=0 group by m.id order by count(d.uuid) desc limit 5)";
$this->db->setFetchMode(Zend_Db::FETCH_OBJ);
$this->view->mdtop=$this->db->fetchAll($sql);
$sql="select uuid,title,id from normalmetadata where id in (select m.id from normalmetadata m left join dataorder d on m.uuid=d.uuid where m.datatype=1 group by m.id order by count(d.uuid) desc limit 5)";
$sql="select uuid,title,id from en.normalmetadata where id in (select m.id from en.normalmetadata m left join dataorder d on m.uuid=d.uuid where m.datatype=1 group by m.id order by count(d.uuid) desc limit 5)";
$this->view->offlinemdtop=$this->db->fetchAll($sql);
$sql="select m.uuid,m.title,m.id,m.description from normalmetadata m left join thumbnail t on m.id=t.id where length(t.data)>2 order by random()";
$this->view->mdrandom=$this->db->fetchRow($sql);
@ -50,7 +47,7 @@ class IndexController extends Zend_Controller_Action
$News = new Archive($this->db);
$time = date("Y-m-d H:i:s",time());
$sql = "SELECT * FROM archive WHERE is_pub=true AND ts_published<'$time' AND image!='' and id in (select ar_catalog.aid from ar_category left join ar_catalog on ar_category.id=ar_catalog.cid where ar_category.code='featured') order by ts_published desc LIMIT 5";
$sql = "SELECT * FROM archive WHERE language='en' and is_pub=true AND ts_published<'$time' AND image!='' and id in (select ar_catalog.aid from ar_category left join ar_catalog on ar_category.id=ar_catalog.cid where ar_category.code='featured') order by ts_published desc LIMIT 5";
$sth = $this->db->query($sql);
$rows = $sth->fetchAll(PDO::FETCH_BOTH);
@ -63,7 +60,7 @@ class IndexController extends Zend_Controller_Action
$this->view->news = $rows;
//$time = date("Y-m-d H:i:s",time());
$sql = "SELECT * FROM archive WHERE is_pub=true AND ts_published<now() and id in (select ar_catalog.aid from ar_catalog left join ar_category on ar_catalog.cid=ar_category.id where ar_category.ptype='news') order by ts_published desc LIMIT 12 ";
$sql = "SELECT * FROM archive WHERE language='en' and is_pub=true AND ts_published<now() and id in (select ar_catalog.aid from ar_catalog left join ar_category on ar_catalog.cid=ar_category.id where ar_category.ptype='news') order by ts_published desc LIMIT 12 ";
$sth = $this->db->query($sql);
$rows = $sth->fetchAll(PDO::FETCH_BOTH);
@ -77,7 +74,7 @@ class IndexController extends Zend_Controller_Action
$this->view->list_news = $rows;
$sql="select d.*,m.ts_published as publish_year from datadoi d left join metadata m on d.uuid=m.uuid where length(d.title)>1 and d.ts_published is not null order by ts_published desc limit 4";
$sql="select d.*,m.ts_published as publish_year from datadoi d right join en.normalmetadata m on d.uuid=m.uuid where d.ts_published is not null order by ts_published desc limit 4";
$sth = $this->db->query($sql);
$this->view->dois = $sth->fetchAll();

View File

@ -15,7 +15,7 @@ class KnowledgeController extends Zend_Controller_Action
function datacenterAction()
{
$siteid="e31f5ea7-a4af-4ae3-9ac1-1a84132c4338";//site uuid from geonetowrk
$sql="select * from mdref mr left join reference r on mr.refid=r.id where mr.uuid=? order by r.year desc, reference desc";
$sql="select r.*,mr.reftype from mdref mr left join reference r on mr.refid=r.id where r.language<>'zh' and mr.uuid=? order by r.id desc";
$sth = $this->db->prepare($sql);
$sth->execute(array($siteid));
$rows = $sth->fetchAll();
@ -26,56 +26,52 @@ class KnowledgeController extends Zend_Controller_Action
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
$this->view->paginator=$paginator;
}
function waterAction()
{
$sql="select * from reference where id in (select refid from mdref where uuid in (select uuid from en.normalmetadata)) order by year desc, reference desc";
$sth = $this->db->prepare($sql);
$sth->execute();
$rows = $sth->fetchAll();
$paginator = Zend_Paginator::factory($rows);
$paginator->setCurrentPageNumber($this->_getParam('page'));
$paginator->setItemCountPerPage(10);
$paginator->setView($this->view);
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
$this->view->paginator=$paginator;
}
function userAction()
{
$uuid=$this->_request->getParam('uuid');
if (preg_match('/([a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12})/',$uuid))
{
$sql="select uuid,title from metadata where uuid='$uuid'";
$sth = $this->db->prepare($sql);
$sth->execute();
$this->view->md = $sth->fetch();
$sql="select * from reference where id in (select refid from mdref where reftype=1 and uuid='$uuid') order by year desc, reference desc";
} else
$sql="select * from reference where id in (select refid from mdref where reftype=1 and uuid in (select uuid from normalmetadata)) order by year desc, reference desc";
$sth = $this->db->prepare($sql);
$sth->execute();
$rows = $sth->fetchAll();
$paginator = Zend_Paginator::factory($rows);
$paginator->setCurrentPageNumber($this->_getParam('page'));
$paginator->setItemCountPerPage(10);
$paginator->setView($this->view);
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
$this->view->paginator=$paginator;
}
{
$sql="select * from reference where language<>'zh' and id in (select refid from mdref where reftype=1 and uuid in (select uuid from en.normalmetadata)) order by id desc";
$sth = $this->db->prepare($sql);
$sth->execute();
$rows = $sth->fetchAll();
$paginator = Zend_Paginator::factory($rows);
$paginator->setCurrentPageNumber($this->_getParam('page'));
$paginator->setItemCountPerPage(10);
$paginator->setView($this->view);
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
$this->view->paginator=$paginator;
}
function authorAction()
{
$sql="select * from reference where language<>'zh' and id in (select refid from mdref where reftype=0 and uuid in (select uuid from en.normalmetadata)) order by id desc";
$sth = $this->db->prepare($sql);
$sth->execute();
$rows = $sth->fetchAll();
$paginator = Zend_Paginator::factory($rows);
$paginator->setCurrentPageNumber($this->_getParam('page'));
$paginator->setItemCountPerPage(10);
$paginator->setView($this->view);
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
$this->view->paginator=$paginator;
}
function waterAction()
{
$sql="select * from reference where language<>'zh' and id in
(select refid from mdref where uuid in
(select m.uuid from en.normalmetadata m left join datasource ds on ds.uuid=m.uuid left join source s on ds.sourceid=s.id where s.code='water'))
order by id desc";
$sth = $this->db->prepare($sql);
$sth->execute();
$rows = $sth->fetchAll();
$paginator = Zend_Paginator::factory($rows);
$paginator->setCurrentPageNumber($this->_getParam('page'));
$paginator->setItemCountPerPage(10);
$paginator->setView($this->view);
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
$this->view->paginator=$paginator;
}
function authorAction()
{
$sql="select * from reference where id in (select refid from mdref where reftype=0 and uuid in (select uuid from normalmetadata)) order by year desc, reference desc";
$sth = $this->db->prepare($sql);
$sth->execute();
$rows = $sth->fetchAll();
$paginator = Zend_Paginator::factory($rows);
$paginator->setCurrentPageNumber($this->_getParam('page'));
$paginator->setItemCountPerPage(10);
$paginator->setView($this->view);
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
$this->view->paginator=$paginator;
}
function westplanAction()
{
@ -131,9 +127,7 @@ class KnowledgeController extends Zend_Controller_Action
$this->view->key=$key;
$this->view->source=$source;
$this->_helper->viewRenderer('search-data');
}
}
function paperAction()
{
$id = (int)$this->_request->getParam('id');

View File

@ -1,12 +0,0 @@
<?php
class NepalquakeController extends Zend_Controller_Action
{
function indexAction()
{
$this->_helper->ViewRenderer->setNoRender();
$this->_helper->layout->disableLayout();
$this->_redirect("http://nepalquake.westgis.ac.cn/");
}
}

View File

@ -12,11 +12,8 @@ class QzrController extends DataController
function indexAction()
{
//$sql="select m.uuid,m.title,m.id,m.description from normalmetadata m left join thumbnail t on m.id=t.id where m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='heihe') and length(t.data)>2 order by random() limit 3";
//$this->view->meatdata=$this->db->fetchAll($sql);
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('青藏铁路介绍','about');
$this->_helper->viewRenderer('base');
$sql="select m.uuid,m.title,m.id,m.description from normalmetadata m left join thumbnail t on m.id=t.id where m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='heihe') and length(t.data)>2 order by random() limit 3";
$this->view->meatdata=$this->db->fetchAll($sql);
}
function newsAction()

View File

@ -40,33 +40,6 @@ class SearchController extends Zend_Controller_Action
header("Content-Type: application/json; charset=utf-8");
echo $search->suggest($q);
}
function hotAction()
{
$sql="select m.uuid,title from normalmetadata m left join mdstat s on m.uuid=s.uuid order by s.viewed desc limit 10";
$sth = $this->db->prepare($sql);
$sth ->execute();
$rows = $sth->fetchAll();
$this->_helper->layout->disableLayout();
$this->_helper->viewRenderer->setNoRender();
header("Content-Type: application/json; charset=utf-8");
echo json_encode($rows);
}
function latestAction()
{
$sql="select uuid,title from normalmetadata order by ts_created desc limit 10";
$sth = $this->db->prepare($sql);
$sth ->execute();
$rows = $sth->fetchAll();
$this->_helper->layout->disableLayout();
$this->_helper->viewRenderer->setNoRender();
header("Content-Type: application/json; charset=utf-8");
echo json_encode($rows);
}
function advanceAction()
{
$this->view->east=$this->getParam('east');

View File

@ -28,7 +28,7 @@ class ServiceController extends Zend_Controller_Action
function xmlAction()
{
$uuid=$this->_request->getParam('uuid');
$row=$this->db->fetchRow("select xml.data from xml left join metadata on xml.id=metadata.id where metadata.uuid=?",array($uuid));
$row=$this->db->fetchRow("select xml.data from en.xml left join en.metadata on xml.id=metadata.id where metadata.uuid=?",array($uuid));
$this->_helper->layout->disableLayout();
$this->_helper->viewRenderer->setNoRender();
$this->getResponse()->setHeader('Content-Type', 'text/xml')
@ -47,7 +47,7 @@ class ServiceController extends Zend_Controller_Action
} else {
$where=$this->db->quoteInto('m.id = ?',$id);
}
$sql="select t.* from thumbnail t left join metadata m on t.id=m.id where ".$where;
$sql="select t.* from en.thumbnail t left join en.metadata m on t.id=m.id where ".$where;
$thumb=$this->db->fetchRow($sql);
$this->_helper->layout->disableLayout();
$this->_helper->viewRenderer->setNoRender();
@ -76,7 +76,7 @@ class ServiceController extends Zend_Controller_Action
} else {
$where=$this->db->quoteInto('m.id = ?',$id);
}
$sql="select g.id as gid,t.filename,t.filetype from geonetworkmetadata g left join metadata m on g.uuid=m.uuid left join thumbnail t on t.id=m.id where ".$where;
$sql="select g.id as gid,t.filename,t.filetype from en.geonetworkmetadata g left join en.metadata m on g.uuid=m.uuid left join en.thumbnail t on t.id=m.id where ".$where;
$thumb=$this->db->fetchRow($sql);
$this->_helper->layout->disableLayout();
$this->_helper->viewRenderer->setNoRender();
@ -277,11 +277,11 @@ class ServiceController extends Zend_Controller_Action
{
$sql="select g.data,m.title,m.description,g.id,m.projection,m.citation,m.title_en
,m.ts_published,d.doi as datadoi,d.authors,d.author_en,d.publisher,d.publisher_en, date_part('year',d.ts_published) as publish_year
from metadata m left join thumbnail t on m.id=t.id
from en.metadata m left join en.thumbnail t on m.id=t.id
left join datadoi d on d.uuid=m.uuid
left join geonetworkmetadata g on g.uuid=m.uuid where m.uuid=".$this->db->quote($uuid);
left join en.geonetworkmetadata g on g.uuid=m.uuid where m.uuid=".$this->db->quote($uuid);
$row=$this->db->fetchRow($sql);
$sql="select r.* from reference r left join mdref m on m.refid=r.id where m.reftype=0 and m.uuid=? order by m.place";
$sql="select r.* from reference r left join mdref m on m.refid=r.id where r.language<>'zh' and m.reftype=0 and m.uuid=? order by m.place";
$sql=$this->db->quoteInto($sql,$uuid);
$ref=$this->db->fetchAll($sql);
$reference='<ol>';
@ -317,11 +317,13 @@ class ServiceController extends Zend_Controller_Action
$citation=$row['citation'];
if (!empty($row['datadoi']) && !strpos($row['citation'],$row['datadoi']))
{
$citation='<li>文章引用:'.$row['citation'].'</li>';
$citation.="<li>数据的引用:";
$citation='<li>Paper Citation'.$row['citation'].'</li>';
$citation.="<li>Data Citation";
$citation.=substr($row['authors'],1,-1).'. '.$row['title'].'. '.$row['publisher'].', '.(empty($row['ts_published'])?$row['publish_year']:date('Y',strtotime($row['ts_published']))).'. doi:'.$row['datadoi'];
$citation.=' ['.str_replace('"','',substr($row['author_en'],1,-1)).'. '.$row['title_en'].'. '.$row['publisher_en'].', '.(empty($row['ts_published'])?$row['publish_year']:date('Y',strtotime($row['ts_published']))).'. doi:'.$row['datadoi'].']';
$citation.="</li>";
} else {
$citation=$row['citation'];
}
}
@ -332,7 +334,7 @@ class ServiceController extends Zend_Controller_Action
$fund="";
foreach($ref as $k=>$refer)
{
$fund.='<li>'.$refer['fund_type'].''.str_replace(array("\r\n", "\n", "\r"),'',$refer['title']).'(编号:'.$refer['fund_id'].")</li>";
$fund.='<li>'.$refer['fund_type_en'].''.str_replace(array("\r\n", "\n", "\r"),'',$refer['title_en']).' (No: '.$refer['fund_id'].")</li>";
}
if (empty($fund)) $fund=$row['suppinfo'];
@ -425,11 +427,11 @@ class ServiceController extends Zend_Controller_Action
{
$sql="select g.data,m.title,m.citation,m.suppinfo,m.doi,m.filesize,m.fileformat,m.south,m.east,m.west,m.north,date(m.timebegin) as timebegin,date(m.timeend) as timeend,m.title_en,m.uuid,m.description,g.id,m.projection,t.filetype
,m.ts_published,d.doi as datadoi,d.authors,d.author_en,d.publisher,d.publisher_en, date_part('year',d.ts_published) as publish_year
from metadata m left join thumbnail t on m.id=t.id
from en.metadata m left join en.thumbnail t on m.id=t.id
left join datadoi d on d.uuid=m.uuid
left join geonetworkmetadata g on g.uuid=m.uuid where m.uuid=".$this->db->quote($uuid);
left join en.geonetworkmetadata g on g.uuid=m.uuid where m.uuid=".$this->db->quote($uuid);
$row=$this->db->fetchRow($sql);
$sql="select r.* from reference r left join mdref m on m.refid=r.id where m.reftype=0 and m.uuid=? order by m.place";
$sql="select r.* from reference r left join mdref m on m.refid=r.id where r.language<>'zh' and m.reftype=0 and m.uuid=? order by m.place";
$sql=$this->db->quoteInto($sql,$uuid);
$ref=$this->db->fetchAll($sql);
$reference="";
@ -456,18 +458,18 @@ class ServiceController extends Zend_Controller_Action
$fund="";
foreach($ref as $k=>$refer)
{
$fund.=($k+1).'. '.$refer['fund_type'].''.str_replace(array("\r\n", "\n", "\r"),'',$refer['title']).'(编号:'.$refer['fund_id'].")\r\n";
$fund.=($k+1).'. '.$refer['fund_type_en'].''.str_replace(array("\r\n", "\n", "\r"),'',$refer['title_en']).'(No: '.$refer['fund_id'].")\r\n";
}
if (!empty($fund)) $row['suppinfo']=$fund;
$sql="select cc.name as category, cc.name_zh from metadata m left join category c on m.id=c.id left join categorycode cc on c.code=cc.code where m.uuid=".$this->db->quote($uuid);
$sql="select cc.name, cc.name_zh from en.metadata m left join en.category c on m.id=c.id left join categorycode cc on c.code=cc.code where m.uuid=".$this->db->quote($uuid);
$cat=$this->db->fetchAll($sql);
$row['category_zh']='';
$row['category']='';
foreach($cat as $category)
{
$row['category_zh'].=$category['name_zh'].' ';
$row['category'].=$category['name'].' ';
}
$sql="select u.uselimit from mdlimit ml left join metadata m on ml.uuid=m.uuid left join uselimit u on ml.lid=u.id where m.uuid=?";
$sql="select u.uselimit from en.mdlimit ml left join en.metadata m on ml.uuid=m.uuid left join en.uselimit u on ml.lid=u.id where m.uuid=?";
$sql=$this->db->quoteInto($sql,$uuid);
$limits=$this->db->fetchAll($sql);
$uselimits="";
@ -477,20 +479,20 @@ class ServiceController extends Zend_Controller_Action
$uselimits.=($k+1).'. '.str_replace(array("\r\n", "\n", "\r"),'',$limit['uselimit'])."\r\n";
}
$row['uselimits']=$uselimits;
$sql="select ol.* from onlineresource ol left join metadata m on ol.uuid=m.uuid where m.uuid=?";
$sql="select ol.* from en.onlineresource ol left join en.metadata m on ol.uuid=m.uuid where m.uuid=?";
$sql=$this->db->quoteInto($sql,$uuid);
$row['resources']=$this->db->fetchAll($sql);
$sql="select r.role,s.* from role r left join responsible s on r.resid=s.id left join metadata m on m.uuid=r.uuid where m.uuid=? order by r.role,r.id";
$sql="select r.role,s.* from en.role r left join en.responsible s on r.resid=s.id left join en.metadata m on m.uuid=r.uuid where m.uuid=? order by r.role,r.id";
$sql=$this->db->quoteInto($sql,$uuid);
$row['contacts']=$this->db->fetchAll($sql);
$sql="select k.keyword, k.keytype from keyword k left join metadata m on k.id=m.id where m.uuid=? order by k.keytype";
$sql="select k.keyword, k.keytype from en.keyword k left join en.metadata m on k.id=m.id where m.uuid=? order by k.keytype";
$sql=$this->db->quoteInto($sql,$uuid);
$keys=$this->db->fetchAll($sql);
$keyword=array();
foreach($keys as $key)
{
@$keyword[$key['keytype']].=$key['keyword'].'';
@$keyword[$key['keytype']].=$key['keyword'].', ';
}
$row['keyword']=$keyword;
@ -517,6 +519,8 @@ class ServiceController extends Zend_Controller_Action
$cit.="\r\n数据的引用:";
$cit.=substr($row['authors'],1,-1).'. '.$row['title'].'. '.$row['publisher'].', '.(empty($row['ts_published'])?$row['publish_year']:date('Y',strtotime($row['ts_published']))).'. doi:'.$row['datadoi'];
$cit.=' ['.str_replace('"','',substr($row['author_en'],1,-1)).'. '.$row['title_en'].'. '.$row['publisher_en'].', '.(empty($row['ts_published'])?$row['publish_year']:date('Y',strtotime($row['ts_published']))).'. doi:'.$row['datadoi'].']';
} else {
$cit=$row['citation'];
}
}
$row['citation']=$cit;
@ -540,7 +544,7 @@ class ServiceController extends Zend_Controller_Action
$pdf->metadata=$row;
$pdf->Draw();
$pdf->setTitle($row['title'],true);
$pdf->setAuthor('寒区旱区科学数据中心',true);
$pdf->setAuthor('CARD-WDS',true);
$this->getResponse()->setHeader('Content-Type', 'application/pdf');
//->setHeader('Content-Disposition','inline; filename="'.$row['title'].'.pdf"');
$pdf->Output($row['title'].'.pdf','I');
@ -558,11 +562,11 @@ class ServiceController extends Zend_Controller_Action
{
$sql="select g.data,m.title,m.citation,m.suppinfo,m.doi,m.filesize,m.fileformat,m.ts_created,m.south,m.east,m.west,m.north,date(m.timebegin) as timebegin,date(m.timeend) as timeend,m.title_en,m.uuid,m.description,g.id,m.projection,t.filetype
,m.ts_published,d.doi as datadoi,d.authors,d.author_en,d.publisher,d.publisher_en, date_part('year',d.ts_published) as publish_year
from metadata m left join thumbnail t on m.id=t.id
from en.metadata m left join en.thumbnail t on m.id=t.id
left join datadoi d on d.uuid=m.uuid
left join geonetworkmetadata g on g.uuid=m.uuid where m.uuid=".$this->db->quote($uuid);
left join en.geonetworkmetadata g on g.uuid=m.uuid where m.uuid=".$this->db->quote($uuid);
$row=$this->db->fetchRow($sql);
$sql="select r.* from reference r left join mdref m on m.refid=r.id where m.reftype=0 and m.uuid=? order by m.place";
$sql="select r.* from reference r left join mdref m on m.refid=r.id where r.language<>'zh' and m.reftype=0 and m.uuid=? order by m.place";
$sql=$this->db->quoteInto($sql,$uuid);
$ref=$this->db->fetchAll($sql);
$reference="";
@ -589,18 +593,18 @@ class ServiceController extends Zend_Controller_Action
$fund="";
foreach($ref as $k=>$refer)
{
$fund.=($k+1).'. '.$refer['fund_type'].''.str_replace(array("\r\n", "\n", "\r"),'',$refer['title']).'(编号:'.$refer['fund_id'].")\r\n";
$fund.=($k+1).'. '.$refer['fund_type_en'].''.str_replace(array("\r\n", "\n", "\r"),'',$refer['title_en']).'(No: '.$refer['fund_id'].")\r\n";
}
if (!empty($fund)) $row['suppinfo']=$fund;
$sql="select cc.name as category, cc.name_zh from metadata m left join category c on m.id=c.id left join categorycode cc on c.code=cc.code where m.uuid=".$this->db->quote($uuid);
$sql="select cc.name as category, cc.name_zh from en.metadata m left join en.category c on m.id=c.id left join categorycode cc on c.code=cc.code where m.uuid=".$this->db->quote($uuid);
$cat=$this->db->fetchAll($sql);
$row['category_zh']='';
foreach($cat as $category)
{
$row['category_zh'].=$category['name_zh'].' ';
}
$sql="select u.uselimit from mdlimit ml left join metadata m on ml.uuid=m.uuid left join uselimit u on ml.lid=u.id where m.uuid=?";
$sql="select u.uselimit from en.mdlimit ml left join en.metadata m on ml.uuid=m.uuid left join en.uselimit u on ml.lid=u.id where m.uuid=?";
$sql=$this->db->quoteInto($sql,$uuid);
$limits=$this->db->fetchAll($sql);
$uselimits="";
@ -610,7 +614,7 @@ class ServiceController extends Zend_Controller_Action
$uselimits.=($k+1).'. '.str_replace(array("\r\n", "\n", "\r"),'',$limit['uselimit'])."\r\n";
}
$row['uselimits']=$uselimits;
$sql="select ol.* from onlineresource ol left join metadata m on ol.uuid=m.uuid where m.uuid=?";
$sql="select ol.* from en.onlineresource ol left join en.metadata m on ol.uuid=m.uuid where m.uuid=?";
$sql=$this->db->quoteInto($sql,$uuid);
$res=$this->db->fetchAll($sql);
$resource="";
@ -619,22 +623,22 @@ class ServiceController extends Zend_Controller_Action
$resource.=($k+1).". ".$r['name'].' '.$r['linkage']."\n";
}
$row['resources']=$resource;
$sql="select r.role,s.* from role r left join responsible s on r.resid=s.id left join metadata m on m.uuid=r.uuid where m.uuid=? order by r.role,r.id";
$sql="select r.role,s.* from en.role r left join en.responsible s on r.resid=s.id left join en.metadata m on m.uuid=r.uuid where m.uuid=? order by r.role,r.id";
if ($ac=='simple')
$sql="select r.role,s.* from role r left join responsible s on r.resid=s.id left join metadata m on m.uuid=r.uuid where r.role in ('resourceProvider','owner','pointOfContact') and m.uuid=? order by r.role,r.id";
$sql="select r.role,s.* from en.role r left join en.responsible s on r.resid=s.id left join en.metadata m on m.uuid=r.uuid where r.role in ('resourceProvider','owner','pointOfContact') and m.uuid=? order by r.role,r.id";
$sql=$this->db->quoteInto($sql,$uuid);
$contact=$this->db->fetchAll($sql);
$contacts="";
$party_zh=array('resourceProvider'=>'资源提供者','custodian'=>'维护者','owner'=>'拥有者','user'=>'用户','distributor'=>'数据服务联系人','originator'=>'创建者','pointOfContact'=>'联系人','principalInvestigator'=>'数据调查与处理者','processor'=>'处理者','publisher'=>'元数据发布者','author'=>'元数据作者');
$party_zh=array('resourceProvider'=>'Resource Provider','custodian'=>'Custodian','owner'=>'Owner','user'=>'User','distributor'=>'Distributor','originator'=>'Originator','pointOfContact'=>'Point of Contact','principalInvestigator'=>'Principal Investigator','processor'=>'Process','publisher'=>'Publisher','author'=>'Author');
foreach($contact as $k=>$c)
{
@$contacts.=($k+1).". ".$party_zh[$c['role']]."\n";
@$contacts.=$c['individual'].' 单位:'.$c['organisation']."\n";
@$contacts.='地址:'.$c['country'].' '.$c['administractive'].' '.$c['city'].' '.$c['delivery']."\n";
@$contacts.='邮编:'.$c['postal'].' 电话:'.$c['phone'].' 邮件:'.$c['email']."\n\n";
@$contacts.=$c['individual'].' Organization: '.$c['organisation']."\n";
@$contacts.='Address: '.$c['country'].' '.$c['administractive'].' '.$c['city'].' '.$c['delivery']."\n";
@$contacts.='Zip code: '.$c['postal'].' Phone: '.$c['phone'].' Email: '.$c['email']."\n\n";
}
$row['contacts']=$contacts;
$sql="select k.keyword, k.keytype from keyword k left join metadata m on k.id=m.id where m.uuid=? order by k.keytype";
$sql="select k.keyword, k.keytype from en.keyword k left join en.metadata m on k.id=m.id where m.uuid=? order by k.keytype";
$sql=$this->db->quoteInto($sql,$uuid);
$keys=$this->db->fetchAll($sql);
$keyword=array();
@ -685,7 +689,7 @@ class ServiceController extends Zend_Controller_Action
$search[]="</table>";
$replace[]="</table:table>";
$table=str_replace($search,$replace,$table[0]);*/
$row['description']=@str_replace($tables[$k][0],"\n 【表格内容暂不支持,请访问网站查看,此处请忽略】\n",$row['description']);
$row['description']=@str_replace($tables[$k][0],"\n [ Table content is omit here, please visit the website.]\n",$row['description']);
}
require_once('odtphp/library/odf.php');
@ -726,6 +730,8 @@ class ServiceController extends Zend_Controller_Action
$cit.="\r\n数据的引用:";
$cit.=substr($row['authors'],1,-1).'. '.$row['title'].'. '.$row['publisher'].', '.(empty($row['ts_published'])?$row['publish_year']:date('Y',strtotime($row['ts_published']))).'. doi:'.$row['datadoi'];
$cit.=' ['.str_replace('"','',substr($row['author_en'],1,-1)).'. '.$row['title_en'].'. '.$row['publisher_en'].', '.(empty($row['ts_published'])?$row['publish_year']:date('Y',strtotime($row['ts_published']))).'. doi:'.$row['datadoi'].']';
} else {
$cit=$row['citation'];
}
}
@$odf->setVars('citation',$cit,true,'utf-8');
@ -738,8 +744,8 @@ class ServiceController extends Zend_Controller_Action
@$odf->setVars('east',$row['east'],true,'utf-8');
if (!$ac=='simple')
{
@$odf->setImage('bigthumb', 'http://westdc.westgis.ac.cn/service/bigthumb/uuid/'.$row['uuid']);
@$odf->setImage('thumb', 'http://westdc.westgis.ac.cn/service/thumb/uuid/'.$row['uuid']);
@$odf->setImage('bigthumb', 'http://card.westgis.ac.cn/service/bigthumb/uuid/'.$row['uuid']);
@$odf->setImage('thumb', 'http://card.westgis.ac.cn/service/thumb/uuid/'.$row['uuid']);
@$odf->setVars('projection',$row['projection'],true,'utf-8');
@$odf->setVars('resolution',$row['resolution'],true,'utf-8');
@$odf->setVars('rfdenom',$row['rfdenom'],true,'utf-8');
@ -749,7 +755,7 @@ class ServiceController extends Zend_Controller_Action
@$odf->setVars('suppinfo',$row['suppinfo'],true,'utf-8');
@$odf->setVars('contacts',$row['contacts'],true,'utf-8');
} else {
@$odf->setImage('qrcode', 'http://westdc.westgis.ac.cn/service/qrcode/uuid/'.$row['uuid']);
@$odf->setImage('qrcode', 'http://card.westgis.ac.cn/service/qrcode/uuid/'.$row['uuid']);
}
$odf->exportAsAttachedFile($row['title'].'.odt');
@ -867,7 +873,7 @@ class ServiceController extends Zend_Controller_Action
$this->_helper->viewRenderer->setNoRender();
$uuid=$this->_request->getParam('uuid');
$sql="select f.filename,f.id,s.uuid,f.depth,f.filesize as filesize,f.ts_created from datafile f,dataset s where s.id=f.dsid and s.lang in ('','cn') and s.uuid=? and f.depth=1 and f.filename<>'/uuid.txt' order by f.isdir desc,f.filename";
$sql="select f.filename,f.id,s.uuid,f.depth,f.filesize as filesize,f.ts_created from datafile f,dataset s where s.id=f.dsid and s.lang in ('','en') and s.uuid=? and f.depth=1 and f.filename<>'/uuid.txt' order by f.isdir desc,f.filename";
$files=$this->db->fetchAll($this->db->quoteInto($sql,$uuid));
//文件大小处理
foreach($files as $k=>$v)
@ -898,7 +904,7 @@ class ServiceController extends Zend_Controller_Action
$subpath=(int)$this->_request->getParam('subpath');
$depth=(int)$this->_request->getParam('depth');
$depth++;
$sql="select f.*,s.uuid from datafile f,dataset s where s.id=f.dsid and s.lang in ('','cn') and s.uuid=? and f.depth=".$depth." and f.filename<>'/uuid.txt' and f.filename ilike (select filename from datafile where id=".$subpath.")||'%' order by f.isdir desc,f.filename";
$sql="select f.*,s.uuid from datafile f,dataset s where s.id=f.dsid and s.lang in ('','en') and s.uuid=? and f.depth=".$depth." and f.filename<>'/uuid.txt' and f.filename ilike (select filename from datafile where id=".$subpath.")||'%' order by f.isdir desc,f.filename";
$files=$this->db->fetchAll($this->db->quoteInto($sql,$uuid));
foreach($files as $k=>$v)
@ -1098,7 +1104,7 @@ class ServiceController extends Zend_Controller_Action
$q = $this->_request->getParam('q');
$rez = $this->google_search_api(array(
'q' => $q, // 查询内容
'key' => $this->config->google->maps->api,
'key' => 'ABQIAAAACD-MqkkoOm60o_dvwdcKVhQZ6FKmpkjmtV0YgdpDmHkvWF4pMRRbrl4iUSDP3HkLNg5iOMge8vdOvg',//$this->config->google->maps->api,
'userip' => $_SERVER['REMOTE_ADDR'],
'rsz' => 5
));
@ -1256,7 +1262,7 @@ class ServiceController extends Zend_Controller_Action
$pre='';
$next='';
$sql = "select d.uuid,count(distinct(d.userid)) as downtimes,m.title from dataorder d left join metadata m on d.uuid=m.uuid where d.userid in (
$sql = "select d.uuid,count(distinct(d.userid)) as downtimes,m.title from dataorder d left join en.metadata m on d.uuid=m.uuid where d.userid in (
select distinct(userid) from dataorder where uuid=? and status in (0,5)
) and d.uuid<>? and length(m.title)>2 group by d.uuid,m.title order by count(distinct(d.userid)) desc";
@ -1301,7 +1307,7 @@ class ServiceController extends Zend_Controller_Action
<img src="/service/thumb/uuid/'.$c['uuid'].'" alt="'.$c['title'].'" title="'.$c['title'].'"
class="pull-left img-polaroid img-rounded" style="height:80px;"/>
<h4><a target="_blank" href="/data/'.$c['uuid'].'"><span class="title">'.$c['title'].'</span></a></h4>
<h5>推荐指数:'.$c['downtimes'].'</h5>
<h5>Recommendation Index: '.$c['downtimes'].'</h5>
</li>';
}
echo '</ul>';
@ -1320,16 +1326,16 @@ class ServiceController extends Zend_Controller_Action
$this->_helper->viewRenderer->setNoRender();
$uuid = $this->_request->getParam('uuid');
$sql="select m.id from normalmetadata m left join mdstatus s on m.uuid=s.uuid
$sql="select m.id from en.normalmetadata m left join en.mdstatus s on m.uuid=s.uuid
left join thumbnail t on t.id=m.id left join geonetworkmetadata g on m.uuid=g.uuid where ";
$where=$this->db->quoteInto('m.uuid = ?',$uuid);
$sql.=$where;
$row=$this->db->fetchRow($sql);
if (!$row) exit("读取信息错误");
if (!$row) exit("Error");
$id=$row['id'];
//相关元数据,根据同名关键词实现
$sql="select distinct(md.uuid),md.title from keyword kw left join normalmetadata md on kw.id=md.id where length(md.title)>2 and kw.keyword in (select k.keyword from keyword k left join metadata m on k.id=m.id where m.id=? and k.keytype='theme') and kw.id<>?";
$sql="select distinct(md.uuid),md.title from en.keyword kw left join en.normalmetadata md on kw.id=md.id where length(md.title)>2 and kw.keyword in (select k.keyword from en.keyword k left join en.metadata m on k.id=m.id where m.id=? and k.keytype='theme') and kw.id<>?";
$rows=$this->db->fetchAll($sql,array($id,$id));
$paginator = Zend_Paginator::factory($rows);
@ -1400,7 +1406,7 @@ class ServiceController extends Zend_Controller_Action
$pageSize = 10;//每页容量
$sql = "select distinct md.title,md.uuid from mdref mr
right join normalmetadata md on md.uuid=mr.uuid
right join en.normalmetadata md on md.uuid=mr.uuid
where mr.refid=$id";
$pagnation="";
if(isset($page))
@ -1551,7 +1557,7 @@ class ServiceController extends Zend_Controller_Action
//$this->_helper->viewRenderer->setNoRender();
//$this->_helper->layout->disableLayout();
$auth = Zend_Auth::getInstance();
$url = $this->config->geonetwork->url.'/srv/cn/'.urldecode($this->_request->getParam('url'));
$url = $this->config->geonetwork->url.'/srv/en/'.urldecode($this->_request->getParam('url'));
if (!$auth->hasIdentity())
{
//$this->_redirect('/account/login?href=/service/geonetwork?url='.$url);
@ -1844,6 +1850,7 @@ class ServiceController extends Zend_Controller_Action
</TitleList>
<Source>
<SourceURL>http://card.westgis.ac.cn/data/'.$uuid.'</SourceURL>
<DOI>'.$row['doi'].'</DOI>
<SourceRepository AbbreviatedRepository="CARD">CARD</SourceRepository>
<PublicationYear>'.date('Y',strtotime($row['ts_published'])).'</PublicationYear>
</Source>

View File

@ -4,7 +4,7 @@ class WaterController extends DataController
private $limit=20;
function preDispatch()
{
parent::preDispatch();
parent::preDispatch();
$this->debug = 0;
$acName = $this->_request->getActionName();
if(in_array($acName,array("cold","bg","ar","bdk","eb")))
@ -39,216 +39,303 @@ class WaterController extends DataController
}
function indexAction()
{
}
{
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('WATER - Watershed Allied Telemetry Experimental Research','about');
}
function documentAction()
{
$page=(int)$this->_request->getParam('page');
if (empty($page)) $page=1;
$offset=$this->limit*($page-1);
$row=$this->db->fetchAll("select count(*) from reference where id in (select refid from mdref where uuid in (select m.uuid from normalmetadata m left join datasource d on m.uuid=d.uuid left join source s on s.id=d.sourceid where s.code='water'))");
$sum=$row[0]['count'];
$sql="select * from reference where id in (select refid from mdref where uuid in (select m.uuid from normalmetadata m left join datasource d on m.uuid=d.uuid left join source s on s.id=d.sourceid where s.code='water')) order by reference limit ? offset ?";
$page=(int)$this->_request->getParam('page');
if (empty($page)) $page=1;
$offset=$this->limit*($page-1);
$row=$this->db->fetchAll("select count(*) from reference where language<>'zh' and id in (select refid from mdref where uuid in (select m.uuid from en.normalmetadata m left join datasource d on m.uuid=d.uuid left join source s on s.id=d.sourceid where s.code='water'))");
$sum=$row[0]['count'];
$sql="select * from reference where language<>'zh' and id in (select refid from mdref where uuid in (select m.uuid from normalmetadata m left join datasource d on m.uuid=d.uuid left join source s on s.id=d.sourceid where s.code='water')) order by reference limit ? offset ?";
$this->view->refs=$this->db->fetchAll($sql,array($this->limit,$offset));
$this->view->page=new Pagination($sum,$page,$this->limit,"文献");
$this->view->offset=$offset+1;
}
function surveystdAction()
{
}
$this->view->page=new Pagination($sum,$page,$this->limit,"Publications");
$this->view->offset=$offset+1;
}
function coldAction()
{
$this->getmd('上游寒区水文试验区');
$this->getmd('the cold region hydrology experimental area','place');
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('WATER: Cold region hydrology experiment','about');
$this->_helper->viewRenderer('base');
}
function bgAction()
{
$this->getmd('冰沟流域加密观测区');
$this->getmd('Binggou watershed foci experimental area','place');
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('WATER: Binggou watershed foci experimental area','about');
$this->_helper->viewRenderer('base');
}
function arAction()
{
$this->getmd('阿柔加密观测区');
$this->getmd("A''rou foci experimental area",'place');
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive("WATER: Arou foci experimental area",'about');
$this->_helper->viewRenderer('base');
}
function bdkAction()
{
$this->getmd('扁都口加密观测区');
$this->getmd('Biandukou (BDK) foci experimental area','place');
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('WATER: Biandukou (BDK) foci experimental area','about');
$this->_helper->viewRenderer('base');
}
function ebAction()
{
$this->getmd('峨堡加密观测区');
$this->getmd('Ebao foci experimental area','place');
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('WATER: Ebao foci experimental area','about');
$this->_helper->viewRenderer('base');
}
function forestAction()
{
$this->getmd('森林水文试验区');
$this->getmd('the forest hydrology experimental area','place');
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('WATER: Forest hydrology experimental area','about');
$this->_helper->viewRenderer('base');
}
function dykAction()
{
$this->getmd('大野口流域加密观测区');
$this->getmd('Dayekou watershed foci experimental area','place');
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('WATER: Dayekou watershed foci experimental area','about');
$this->_helper->viewRenderer('base');
}
function plgAction()
{
$this->getmd('排露沟流域加密观测区');
$this->getmd('Pailugou watershed (PLG) foci experimental area','place');
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('WATER: Pailugou watershed (PLG) foci experimental area','about');
$this->_helper->viewRenderer('base');
}
function aridAction()
{
$this->getmd('中游干旱区水文试验区');
$this->getmd('the arid region hydrology experimental area','place');
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('WATER: Arid region hydrology experimental area','about');
$this->_helper->viewRenderer('base');
}
function hzzAction()
{
$this->getmd('花寨子荒漠加密观测区');
$this->getmd('Huazhaizi foci experimental area','place');
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('WATER: Huazhaizi foci experimental area','about');
$this->_helper->viewRenderer('base');
}
function ykAction()
{
$this->getmd('盈科绿洲加密观测区');
$this->getmd('Yingke oasis station','place');
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('WATER: Yingke oasis station','about');
$this->_helper->viewRenderer('base');
}
function zyAction()
{
$this->getmd('张掖市加密观测区');
$this->getmd('Zhangye city (ZY) foci experimental area','place');
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('WATER: Zhangye city (ZY) foci experimental area','about');
$this->_helper->viewRenderer('base');
}
function zynocAction()
{
$this->getmd('观象台加密观测区');
$this->getmd('National observatory on climatology at Zhangye (ZYNOC)','place');
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('WATER: National observatory on climatology at Zhangye (ZYNOC)','about');
$this->_helper->viewRenderer('base');
}
function lzgAction()
{
$this->getmd('临泽草地加密观测区');
$this->getmd('Linze grassland foci experimental area','place');
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('WATER: Linze grassland foci experimental area','about');
$this->_helper->viewRenderer('base');
}
function lzsAction()
{
$this->getmd('临泽站加密观测区');
$this->getmd('Linze station foci experimental area','place');
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('WATER: Linze station foci experimental area','about');
$this->_helper->viewRenderer('base');
}
function meteoAction()
{
$this->getmd('气象水文','theme');
$this->getmd('meteorology and hydrology','theme');
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('WATER: meteorology and hydrology','about');
$this->_helper->viewRenderer('base');
}
function autometeoAction()
{
$this->getmd('气象观测','theme');
$this->getmd('the meteorological observation','theme');
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('WATER: the meteorological observation','about');
$this->_helper->viewRenderer('base');
}
function mobilemeteoAction()
{
$this->getmd('移动气象观测','theme');
$this->getmd('the mobile meteorological observation','theme');
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('WATER: the mobile meteorological observation','about');
$this->_helper->viewRenderer('base');
}
function ecAction()
{
$this->getmd('涡动相关','theme');
$this->getmd('eddy covariance','theme');
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('WATER: eddy covariance','about');
$this->_helper->viewRenderer('base');
}
function lasAction()
{
$this->getmd('大孔径闪烁仪','theme');
$this->getmd('the large aperture scintillometer','theme');
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('WATER: the large aperture scintillometer','about');
$this->_helper->viewRenderer('base');
}
function normalmeteoAction()
{
$this->getmd('常规气象观测','theme');
$this->getmd('the routine meteorological observation','theme');
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('WATER: the routine meteorological observation','about');
$this->_helper->viewRenderer('base');
}
function regionalmeteoAction()
{
$this->getmd('区域气象观测','theme');
$this->getmd('the regional meteorological observation','theme');
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('WATER: the regional meteorological observation','about');
$this->_helper->viewRenderer('base');
}
function dopplerAction()
{
$this->getmd('降雨','theme');
$this->getmd('dual-polarization Doppler weather radar','theme');
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('WATER: dual-polarization Doppler weather radar','about');
$this->_helper->viewRenderer('base');
}
function hydroAction()
{
$this->getmd('水文','theme');
$this->getmd('hydrology','theme');
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('WATER: hydrology','about');
$this->_helper->viewRenderer('base');
}
function airsoundingAction()
{
$this->getmd('大气廓线','theme');
$this->getmd('atmospheric profile','theme');
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('WATER: atmospheric profile','about');
$this->_helper->viewRenderer('base');
}
function aireboneAction()
{
$this->getmd('航空遥感','theme');
$this->getmd('airborne remote sensing','theme');
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('WATER: airborne remote sensing','about');
$this->_helper->viewRenderer('base');
}
function radiometerAction()
{
$page=(int)$this->_request->getParam('page');
if (empty($page)) $page=1;
$offset=$this->limit*($page-1);
$state=$this->db->query("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') and id in (select id from keyword where keytype='theme' and keyword ilike '%波段机载微波辐射计') and id in (select id from keyword where keytype='theme' and keyword='航空遥感')");
$row=$state->fetchAll();
$sum=$row[0]['count'];
$sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') and id in (select id from keyword where keytype='theme' and keyword ilike '%波段机载微波辐射计') and id in (select id from keyword where keytype='theme' and keyword='航空遥感') order by timebegin,title limit ? offset ?";
$page=(int)$this->_request->getParam('page');
if (empty($page)) $page=1;
$offset=$this->limit*($page-1);
$state=$this->db->query("select count(*) from en.normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') and id in (select id from en.keyword where keytype='theme' and keyword ilike '%microwave radiometer') and id in (select id from en.keyword where keytype='theme' and keyword='airborne remote sensing')");
$row=$state->fetchAll();
$sum=$row[0]['count'];
$sql="select uuid,title from en.normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') and id in (select id from en.keyword where keytype='theme' and keyword ilike '%microwave radiometer') and id in (select id from en.keyword where keytype='theme' and keyword='airborne remote sensing') order by timebegin,title limit ? offset ?";
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
$this->view->page=new Pagination($sum,$page,$this->limit);
$this->view->offset=$offset+1;
$this->view->page=new Pagination($sum,$page,$this->limit);
$this->view->offset=$offset+1;
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('WATER: Microwave radiometers','about');
$this->_helper->viewRenderer('base');
}
function lidarAction()
{
//$this->getmd('激光雷达','theme');
$page=(int)$this->_request->getParam('page');
if (empty($page)) $page=1;
$offset=$this->limit*($page-1);
$state=$this->db->query("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') and id in (select id from keyword where keytype='theme' and keyword='激光雷达') and id in (select id from keyword where keytype='theme' and keyword='航空遥感')");
$row=$state->fetchAll();
$sum=$row[0]['count'];
$sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') and id in (select id from keyword where keytype='theme' and keyword='激光雷达') and id in (select id from keyword where keytype='theme' and keyword='航空遥感') order by timebegin,title limit ? offset ?";
$page=(int)$this->_request->getParam('page');
if (empty($page)) $page=1;
$offset=$this->limit*($page-1);
$state=$this->db->query("select count(*) from en.normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') and id in (select id from en.keyword where keytype='theme' and keyword='lidar') and id in (select id from en.keyword where keytype='theme' and keyword='airborne remote sensing')");
$row=$state->fetchAll();
$sum=$row[0]['count'];
$sql="select uuid,title from en.normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') and id in (select id from en.keyword where keytype='theme' and keyword='lidar') and id in (select id from en.keyword where keytype='theme' and keyword='airborne remote sensing') order by timebegin,title limit ? offset ?";
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
$this->view->page=new Pagination($sum,$page,$this->limit);
$this->view->offset=$offset+1;
$this->view->page=new Pagination($sum,$page,$this->limit);
$this->view->offset=$offset+1;
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('WATER: LiDAR','about');
$this->_helper->viewRenderer('base');
}
function widasAction()
{
//$this->getmd('WiDAS','theme');
$page=(int)$this->_request->getParam('page');
if (empty($page)) $page=1;
$offset=$this->limit*($page-1);
$state=$this->db->query("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') and id in (select id from keyword where keytype='theme' and keyword='红外广角双模式成像仪WiDAS') and id in (select id from keyword where keytype='theme' and keyword='航空遥感')");
$row=$state->fetchAll();
$sum=$row[0]['count'];
$sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') and id in (select id from keyword where keytype='theme' and keyword='红外广角双模式成像仪WiDAS') and id in (select id from keyword where keytype='theme' and keyword='航空遥感') order by timebegin,title limit ? offset ?";
$page=(int)$this->_request->getParam('page');
if (empty($page)) $page=1;
$offset=$this->limit*($page-1);
$state=$this->db->query("select count(*) from en.normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') and id in (select id from en.keyword where keytype='theme' and keyword='Wide-angle Infrared Dual-mode line/area Array Scanner,WiDAS') and id in (select id from en.keyword where keytype='theme' and keyword='airborne remote sensing')");
$row=$state->fetchAll();
$sum=$row[0]['count'];
$sql="select uuid,title from en.normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') and id in (select id from en.keyword where keytype='theme' and keyword='Wide-angle Infrared Dual-mode line/area Array Scanner,WiDAS') and id in (select id from en.keyword where keytype='theme' and keyword='airborne remote sensing') order by timebegin,title limit ? offset ?";
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
$this->view->page=new Pagination($sum,$page,$this->limit);
$this->view->offset=$offset+1;
$this->view->page=new Pagination($sum,$page,$this->limit);
$this->view->offset=$offset+1;
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('WATER: WiDAS','about');
$this->_helper->viewRenderer('base');
}
function asdAction()
{
//$this->getmd('成像光谱仪OMIS-II','theme');
$page=(int)$this->_request->getParam('page');
if (empty($page)) $page=1;
$offset=$this->limit*($page-1);
$state=$this->db->query("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') and id in (select id from keyword where keytype='theme' and keyword='成像光谱仪OMIS-II') and id in (select id from keyword where keytype='theme' and keyword='航空遥感')");
$row=$state->fetchAll();
$sum=$row[0]['count'];
$sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') and id in (select id from keyword where keytype='theme' and keyword='成像光谱仪OMIS-II') and id in (select id from keyword where keytype='theme' and keyword='航空遥感') order by timebegin,title limit ? offset ?";
$page=(int)$this->_request->getParam('page');
if (empty($page)) $page=1;
$offset=$this->limit*($page-1);
$state=$this->db->query("select count(*) from en.normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') and id in (select id from en.keyword where keytype='theme' and keyword='SWPHI') and id in (select id from en.keyword where keytype='theme' and keyword='airborne remote sensing')");
$row=$state->fetchAll();
$sum=$row[0]['count'];
$sql="select uuid,title from en.normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') and id in (select id from en.keyword where keytype='theme' and keyword='SWPHI') and id in (select id from en.keyword where keytype='theme' and keyword='airborne remote sensing') order by timebegin,title limit ? offset ?";
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
$this->view->page=new Pagination($sum,$page,$this->limit);
$this->view->offset=$offset+1;
$this->view->page=new Pagination($sum,$page,$this->limit);
$this->view->offset=$offset+1;
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('WATER: OMIS-II','about');
$this->_helper->viewRenderer('base');
}
function satelliteAction()
{
$this->getmd('卫星遥感','theme');
$this->getmd('satellite remote sensing','theme');
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('WATER: satellite remote sensing','about');
$this->_helper->viewRenderer('base');
}
function tagAction()
{
$key = $this->_request->getParam('key');
$page=(int)$this->_request->getParam('page');
if (empty($page)) $page=1;
$offset=$this->limit*($page-1);
if (!empty($key)) {
$this->view->codename=$key;
$sql=$this->db->quoteInto('select count(id) from keyword where keyword=?',$key);
$state=$this->db->query($sql);
$row=$state->fetchAll();
$sum=$row[0]['count'];
$sql="select uuid,title,id,description from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') and id in (select id from keyword where keyword='".$key."') order by timebegin,title limit ? offset ?";
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
$this->view->page=new Pagination($sum,$page,$this->limit);
} else {
$state=$this->db->query("select keyword.keyword,count(*) from keyword left join normalmetadata m on keyword.id=m.id where keyword.keytype='place' and m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') group by keyword.keyword order by count desc");
$k1=$state->fetchAll();
$state=$this->db->query("select k.keyword,count(k.keyword) from keyword k left join normalmetadata m on k.id=m.id where k.keytype='theme' and m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') group by k.keyword order by k.keyword");
$k2=$state->fetchAll();
$state=$this->db->query("select k.keyword,count(k.keyword) from keyword k left join normalmetadata m on k.id=m.id where k.keytype='discipline' and m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') group by k.keyword order by k.keyword");
$k3=$state->fetchAll();
$state=$this->db->query("select k.keyword,count(k.keyword) from keyword k left join normalmetadata m on k.id=m.id where k.keytype='stratum' and m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') group by k.keyword order by k.keyword");
$k4=$state->fetchAll();
$state=$this->db->query("select keyword.keyword,count(*) from keyword left join normalmetadata m on keyword.id=m.id where keyword.keytype='temporal' and m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') group by keyword.keyword order by keyword.keyword");
$k5=$state->fetchAll();
$this->view->keywords=array('place'=>$k1,'theme'=>$k2,'discipline'=>$k3,'stratum'=>$k4,'temporal'=>$k5);
}
}
function tagAction()
{
$key = $this->_request->getParam('key');
$keytype = $this->_request->getParam('keytype');
$page=(int)$this->_request->getParam('page');
if (empty($page)) $page=1;
$offset=$this->limit*($page-1);
if (!empty($key)) {
$this->view->codename=$key;
$sql=$this->db->quoteInto("select count(k.id) from en.keyword k left join en.normalmetadata m on k.id=m.id where length(k.keyword)>0 and m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') and k.keyword=?",$key);
$state=$this->db->query($sql);
$row=$state->fetchAll();
$sum=$row[0]['count'];
$sql="select uuid,title,id,description from en.normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') and id in (select id from en.keyword where keyword='".$key."') order by timebegin,title limit ? offset ?";
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
$this->view->page=new Pagination($sum,$page,$this->limit);
} else {
$sql="select k.keyword,count(*),k.keytype from en.keyword k left join en.normalmetadata m on k.id=m.id where length(k.keyword)>0 and m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') ";
if (!empty($keytype) && ($keytype=='place' || $keytype=='theme' || $keytype=='discipline'||$keytype=='temporal')) $sql.=" and k.keytype='".$keytype."'";
$sql.=' group by k.keyword,k.keytype order by k.keytype,k.keyword,count desc';
$state=$this->db->query($sql);
$this->view->keytype=$keytype;
$this->view->keywords=$state->fetchAll();
}
}
function searchAction()
{
@ -263,9 +350,9 @@ class WaterController extends DataController
$page=@(int)$this->_request->getParam('page');
if (empty($page)) $page=1;
$offset=$this->limit*($page-1);
$row=$this->db->fetchAll("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') and ".$where);
$row=$this->db->fetchAll("select count(*) from en.normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') and ".$where);
$sum=$row[0]['count'];
$sql="select uuid,title,id,description from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') and ".$where." order by timebegin,title limit ? offset ?";
$sql="select uuid,title,id,description from en.normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') and ".$where." order by timebegin,title limit ? offset ?";
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
$this->view->page=new Pagination($sum,$page,$this->limit);
$this->view->key=$key;
@ -275,24 +362,24 @@ class WaterController extends DataController
function timemapAction()
{
$sql="select id,uuid,west,south,north,east,title,timebegin,timeend from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') and timebegin is not null and timebegin::date>date('2007-01-01')";
$sql="select id,uuid,west,south,north,east,title,timebegin,timeend from en.normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') and timebegin is not null and timebegin::date>date('2007-01-01')";
$this->view->rows=$this->db->fetchAll($sql);
}
function timelineAction()
{
$fn="watertime.xml";
$rows=$this->db->fetchAll("select ts_created from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') order by ts_created desc limit 1");
$rows=$this->db->fetchAll("select ts_created from en.normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') order by ts_created desc limit 1");
$last_update=strtotime($rows[0]['ts_created']);
if (!file_exists($fn) || (filemtime($fn)<$last_update))
{
$dateformat="M j Y";
$rows=$this->db->fetchAll("select id,uuid,description,title,timebegin,timeend from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') and timebegin is not null order by timebegin,title");
$rows=$this->db->fetchAll("select id,uuid,description,title,timebegin,timeend from en.normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') and timebegin is not null order by timebegin,title");
$timexml='<data>';
foreach($rows as $row) {
$timexml.='<event start="'.date($dateformat,strtotime($row['timebegin'])).' GMT+0800" ';
if ($row['timeend']!='' && $row['timeend']!=$row['timebegin']) $timexml.=' end="'.date($dateformat,strtotime($row['timeend'])).'" isDuration="true"';
$timexml.= ' title="'.htmlspecialchars(mb_substr($row['title'],11,mb_strlen($row['title'],'UTF-8')-10,'UTF-8')).'" image="/images/westdc_40w.gif" link="/water/'.$row['uuid'].'">';
$timexml.= ' title="'.htmlspecialchars(mb_substr($row['title'],6,mb_strlen($row['title'],'UTF-8')-6,'UTF-8')).'" image="/images/westdc_40w.gif" link="/water/'.$row['uuid'].'">';
$desc_length=mb_strlen($row['description'],"UTF-8");
$desc=mb_substr($row['description'],0,($desc_length>300)?300:$desc_length,"UTF-8");
if ($desc_length>300) $desc.=" ...";
@ -329,18 +416,155 @@ class WaterController extends DataController
}
private function getmd($keyword,$type='place')
{
$page=(int)$this->_request->getParam('page');
if (empty($page)) $page=1;
$offset=$this->limit*($page-1);
$state=$this->db->query("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') and id in (select id from keyword where keytype='".$type."' and keyword='".$keyword."')");
$row=$state->fetchAll();
$sum=$row[0]['count'];
//@todo: add order with title
$sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') and id in (select id from keyword where keytype='".$type."' and keyword='".$keyword."') order by timebegin,title limit ? offset ?";
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
$this->view->page=new Pagination($sum,$page,$this->limit);
$this->view->offset=$offset+1;
private function getmd($keyword,$type='theme')
{
$page=(int)$this->_request->getParam('page');
if (empty($page)) $page=1;
$offset=$this->limit*($page-1);
if (!is_array($keyword))
{
$keyword=array($keyword);
}
$key="(";
foreach($keyword as $k)
{
$key.="'".$k."',";
}
$key=substr($key,0,-1);
$key.=")";
$keyword=$key;
$state=$this->db->query("select count(m.*) from en.normalmetadata m left join datasource d on m.uuid=d.uuid left join source s on d.sourceid=s.id where s.code='water' and m.id in (select id from en.keyword where keytype='".$type."' and keyword in ".$keyword.")");
$row=$state->fetchAll();
$sum=$row[0]['count'];
//@todo: add order with title
$sql="select uuid,title from en.normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') and id in (select id from en.keyword where keytype='".$type."' and keyword in ".$keyword.") order by title limit ? offset ?";
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
$this->view->page=new Pagination($sum,$page,$this->limit);
$this->view->offset=$offset+1;
}
//获取多项条件并列关系的数据并必须满足limited条件
//$keyword:字符串或字符串数组
//$limited:限制字符串
private function getmdlimited($keyword,$limited)
{
$page=(int)$this->_request->getParam('page');
if (empty($page)) $page=1;
$offset=$this->limit*($page-1);
if (!is_array($keyword))
{
$keyword=array($keyword);
}
$key="(";
foreach($keyword as $k)
{
$key.="'".$k."',";
}
$key=substr($key,0,-1);
$key.=")";
$keyword=$key;
$state=$this->db->query("select count(m.*) from en.normalmetadata m left join datasource d on m.uuid=d.uuid left join source s on d.sourceid=s.id where s.code='water' and m.id in (select id from en.keyword where keyword='".$limited."') and m.id in (select id from en.keyword where keyword in ".$keyword.")");
$row=$state->fetchAll();
$sum=$row[0]['count'];
//@todo: add order with title
$sql="select uuid,title from en.normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') and id in (select id from en.keyword where keyword='".$limited."') and id in (select id from en.keyword where keyword in ".$keyword.") order by title limit ? offset ?";
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
$this->view->page=new Pagination($sum,$page,$this->limit);
$this->view->offset=$offset+1;
}
//基于数据作者的浏览(包括认证后的数据作者以及未认证的数据作者)
function authorAction()
{
$ac = $this->_request->getParam('ac');
$id = (int)$this->_request->getParam('id');
if ($ac=='verified') {
//已经认证过的数据作者
$this->view->tabID='author-verified';
$this->view->ac='verified';
if ($id) {
//列出作者的数据
$sql="select username,realname from users where id=?";
$this->view->author=$this->db->fetchRow($sql,array($id));
$sql="select m.* from normalmetadata m left join mdauthor a on a.uuid=m.uuid where m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and a.userid=?";
$sth = $this->db->prepare($sql);
$sth->execute(array($id));
$rows = $sth->fetchAll();
$paginator = Zend_Paginator::factory($rows);
$paginator->setCurrentPageNumber($this->_getParam('page'));
$paginator->setItemCountPerPage(10);
$paginator->setView($this->view);
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
$this->view->paginator=$paginator;
} else {
//已经认证过的数据作者
$sql="select u.username,u.realname,u.id,count(u.id) as count from mdauthor a left join users u on a.userid=u.id where a.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and a.status=1 and a.uuid in (select uuid from normalmetadata) group by u.id,u.username,u.realname";
$sth = $this->db->prepare($sql);
$sth->execute();
$rows = $sth->fetchAll();
$paginator = Zend_Paginator::factory($rows);
$paginator->setCurrentPageNumber($this->_getParam('page'));
$paginator->setItemCountPerPage(50);
$paginator->setView($this->view);
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
$this->view->paginator=$paginator;
}
} else if ($ac=='unverified' || empty($ac)) {
//未认证的数据作者
$this->view->tabID='author-unverified';
$this->view->ac='unverified';
if ($id) {
//列出数据
$sql="select individual as username from responsible where id=?";
$this->view->author=$this->db->fetchRow($sql,array($id));
$sql="select distinct m.* from normalmetadata m left join role r on m.uuid=r.uuid left join responsible s on r.resid=s.id where r.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and r.role in ('pointOfContact','resourceProvider','owner') and s.id=?";
$sth = $this->db->prepare($sql);
$sth->execute(array($id));
$rows = $sth->fetchAll();
$paginator = Zend_Paginator::factory($rows);
$paginator->setCurrentPageNumber($this->_getParam('page'));
$paginator->setItemCountPerPage(10);
$paginator->setView($this->view);
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
$this->view->paginator=$paginator;
} else {
//列出所有作者
$sql="select distinct responsible.individual as username,responsible.id from responsible left join role on role.resid=responsible.id where role.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and role.role in ('pointOfContact','resourceProvider','owner')";
$sth = $this->db->prepare($sql);
$sth->execute();
$rows = $sth->fetchAll();
$paginator = Zend_Paginator::factory($rows);
$paginator->setCurrentPageNumber($this->_getParam('page'));
$paginator->setItemCountPerPage(50);
$paginator->setView($this->view);
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
$this->view->paginator=$paginator;
}
}
}
function organizationAction()
{
$page = $this->_request->getParam('page');
$name = $this->_request->getParam('name');
$state=$this->db->query("select distinct responsible.organisation from en.responsible left join en.role on role.resid=responsible.id where role.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and role.role in ('pointOfContact','resourceProvider','owner')");
$this->view->organisation=$state->fetchAll();
if (!empty($name)) {
$this->view->codename=$name;
$sql="select distinct m.* from en.normalmetadata m left join en.role r on m.uuid=r.uuid left join en.responsible s on r.resid=s.id where m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and r.role in ('pointOfContact','resourceProvider','owner') and s.organisation=?";
$sth = $this->db->prepare($sql);
$sth->execute(array($name));
$rows = $sth->fetchAll();
$paginator = Zend_Paginator::factory($rows);
$paginator->setCurrentPageNumber($this->_getParam('page'));
$paginator->setItemCountPerPage(10);
$paginator->setView($this->view);
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
$this->view->paginator=$paginator;
} else {
//提供全部分类列表
}
}
}

View File

@ -15,8 +15,6 @@ class YrnmrController extends DataController
{
$sql="select m.uuid,m.title,m.id,m.description from normalmetadata m left join thumbnail t on m.id=t.id where m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr') and length(t.data)>2 order by random() limit 3";
$this->view->meatdata=$this->db->fetchAll($sql);
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('黄河上游宁蒙河段:数据简介','about');
}
/*
@ -68,113 +66,126 @@ class YrnmrController extends DataController
function baseAction()
{
$this->getmd(array('基础地理','陆地表层','遥感影像','水文地质','社会经济'));
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('YRNMR-基础数据','about');
$page=(int)$this->_request->getParam('page');
if (empty($page)) $page=1;
$offset=$this->limit*($page-1);
$state=$this->db->query("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr') and id in (select id from keyword where keytype='theme' and (keyword='冰川' or keyword='沙漠' or keyword='地貌' or keyword='植被' or keyword='草场' or keyword='沙漠化' or keyword='基础地理' or keyword='遥感影像' or keyword='水文地质' or keyword='社会经济' or keyword='人口' or keyword='SWAT' or keyword='NPP' or keyword='WRF' or keyword='辐射' or keyword='NEP'))");
$row=$state->fetchAll();
$sum=$row[0]['count'];
$sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr') and id in (select id from keyword where keytype='theme' and (keyword='冰川' or keyword='沙漠' or keyword='地貌' or keyword='植被' or keyword='草场' or keyword='沙漠化' or keyword='基础地理' or keyword='遥感影像' or keyword='水文地质' or keyword='社会经济' or keyword='人口' or keyword='SWAT' or keyword='NPP' or keyword='WRF' or keyword='辐射' or keyword='NEP')) order by timebegin,title limit ? offset ?";
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
$this->view->page=new Pagination($sum,$page,$this->limit);
$this->view->offset=$offset+1;
}
function geobaseAction()
{
$this->getmd('基础地理');
$this->_helper->viewRenderer('base');
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('YRNMR-基础地理','about');
}
function landsurfaceAction()
{
$this->getmd('陆地表层');
$this->_helper->viewRenderer('base');
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('YRNMR-陆地表层','about');
}
function rsAction()
{
$this->getmd('遥感影像');
$this->_helper->viewRenderer('base');
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('YRNMR-遥感影像','about');
}
function waterAction()
{
$this->getmd('水文地质');
$this->_helper->viewRenderer('base');
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('YRNMR-水文地质','about');
}
function modelAction()
{
$this->getmd('模型数据');
$this->_helper->viewRenderer('base');
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('YRNMR-模型数据','about');
}
function economicAction()
{
$this->getmd('社会经济');
$this->_helper->viewRenderer('base');
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('YRNMR-社会经济','about');
}
function coreAction()
{
$this->getmd(array('DEM','土地利用','土壤','气象','水文观测','实验'));
$this->_helper->viewRenderer('base');
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('YRNMR-核心数据','about');
$page=(int)$this->_request->getParam('page');
if (empty($page)) $page=1;
$offset=$this->limit*($page-1);
$state=$this->db->query("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr') and id in (select id from keyword where keytype='theme' and (keyword='DEM' or keyword='土地利用' or keyword='土壤' or keyword='气象' or keyword='水文观测' or keyword='灌溉' or keyword='试验'))");
$row=$state->fetchAll();
$sum=$row[0]['count'];
$sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr') and id in (select id from keyword where keytype='theme' and (keyword='DEM' or keyword='土地利用' or keyword='土壤' or keyword='气象' or keyword='水文观测' or keyword='灌溉' or keyword='试验')) order by timebegin,title limit ? offset ?";
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
$this->view->page=new Pagination($sum,$page,$this->limit);
$this->view->offset=$offset+1;
}
function demAction()
{
$this->getmd('DEM');
$this->_helper->viewRenderer('base');
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('YRNMR-DEM','about');
}
function rsAction()
{
$this->getmd('遥感影像');
}
function waterAction()
{
$this->getmd('水文地质');
}
function modelAction()
{
$page=(int)$this->_request->getParam('page');
if (empty($page)) $page=1;
$offset=$this->limit*($page-1);
$state=$this->db->query("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr') and id in (select id from keyword where keytype='theme' and (keyword='WRF' or keyword='NPP' or keyword='SWAT' or keyword='NEP' or keyword='辐射'))");
$row=$state->fetchAll();
$sum=$row[0]['count'];
$sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr') and id in (select id from keyword where keytype='theme' and (keyword='WRF' or keyword='NPP' or keyword='SWAT' or keyword='NEP' or keyword='辐射')) order by timebegin,title limit ? offset ?";
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
$this->view->page=new Pagination($sum,$page,$this->limit);
$this->view->offset=$offset+1;
}
function economicAction()
{
$page=(int)$this->_request->getParam('page');
if (empty($page)) $page=1;
$offset=$this->limit*($page-1);
$state=$this->db->query("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr') and id in (select id from keyword where keytype='theme' and (keyword='人口' or keyword='社会经济'))");
$row=$state->fetchAll();
$sum=$row[0]['count'];
$sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr') and id in (select id from keyword where keytype='theme' and (keyword='人口' or keyword='社会经济')) order by timebegin,title limit ? offset ?";
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
$this->view->page=new Pagination($sum,$page,$this->limit);
$this->view->offset=$offset+1;
}
function landsurfaceAction()
{
$page=(int)$this->_request->getParam('page');
if (empty($page)) $page=1;
$offset=$this->limit*($page-1);
$state=$this->db->query("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr') and id in (select id from keyword where keytype='theme' and (keyword='冰川' or keyword='沙漠' or keyword='地貌' or keyword='植被' or keyword='草场' or keyword='沙漠化'))");
$row=$state->fetchAll();
$sum=$row[0]['count'];
$sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr') and id in (select id from keyword where keytype='theme' and (keyword='冰川' or keyword='沙漠' or keyword='地貌' or keyword='植被' or keyword='草场' or keyword='沙漠化')) order by timebegin,title limit ? offset ?";
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
$this->view->page=new Pagination($sum,$page,$this->limit);
$this->view->offset=$offset+1;
}
function landuseAction()
{
$this->getmd('土地利用');
$this->_helper->viewRenderer('base');
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('YRNMR-土地利用','about');
$this->getmd('土地利用','theme');
}
function soilAction()
{
$this->getmd('土壤');
$this->_helper->viewRenderer('base');
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('YRNMR-土地利用','about');
$this->getmd('土壤','theme');
}
function meteoAction()
{
$this->getmd('气象');
$this->_helper->viewRenderer('base');
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('YRNMR-气象','about');
$this->getmd('气象','theme');
}
function hydroAction()
{
$this->getmd('水文观测','theme');
}
function irragationAction()
{
$this->getmd('灌溉','theme');
}
function expAction()
{
$this->getmd('实验');
$this->_helper->viewRenderer('base');
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('YRNMR-实验','about');
$this->getmd('实验','theme');
}
function obsAction()
{
$this->getmd('观测');
$this->_helper->viewRenderer('base');
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('YRNMR-观测','about');
$this->getmd('观测','theme');
}
function listAction()
@ -186,13 +197,12 @@ class YrnmrController extends DataController
function tagAction()
{
$key = $this->_request->getParam('key');
$keytype = $this->_request->getParam('keytype');
$page=(int)$this->_request->getParam('page');
if (empty($page)) $page=1;
$offset=$this->limit*($page-1);
if (!empty($key)) {
$this->view->codename=$key;
$sql=$this->db->quoteInto("select count(k.id) from keyword k left join normalmetadata m on k.id=m.id where m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr') and k.keyword=?",$key);
$sql=$this->db->quoteInto('select count(id) from keyword where keyword=?',$key);
$state=$this->db->query($sql);
$row=$state->fetchAll();
$sum=$row[0]['count'];
@ -200,12 +210,17 @@ class YrnmrController extends DataController
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
$this->view->page=new Pagination($sum,$page,$this->limit);
} else {
$sql="select k.keyword,count(*),k.keytype from keyword k left join normalmetadata m on k.id=m.id where m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr') ";
if (!empty($keytype) && ($keytype=='place' || $keytype=='theme' || $keytype=='discipline'||$keytype=='temporal')) $sql.=" and k.keytype='".$keytype."'";
$sql.=' group by k.keyword,k.keytype order by k.keytype,k.keyword,count desc';
$state=$this->db->query($sql);
$this->view->keytype=$keytype;
$this->view->keywords=$state->fetchAll();
$state=$this->db->query("select keyword.keyword,count(*) from keyword left join normalmetadata m on keyword.id=m.id where keyword.keytype='place' and m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr') group by keyword.keyword order by count desc");
$k1=$state->fetchAll();
$state=$this->db->query("select k.keyword,count(k.keyword) from keyword k left join normalmetadata m on k.id=m.id where k.keytype='theme' and m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr') group by k.keyword order by k.keyword");
$k2=$state->fetchAll();
$state=$this->db->query("select k.keyword,count(k.keyword) from keyword k left join normalmetadata m on k.id=m.id where k.keytype='discipline' and m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr') group by k.keyword order by k.keyword");
$k3=$state->fetchAll();
$state=$this->db->query("select k.keyword,count(k.keyword) from keyword k left join normalmetadata m on k.id=m.id where k.keytype='stratum' and m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr') group by k.keyword order by k.keyword");
$k4=$state->fetchAll();
$state=$this->db->query("select keyword.keyword,count(*) from keyword left join normalmetadata m on keyword.id=m.id where keyword.keytype='temporal' and m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr') group by keyword.keyword order by keyword.keyword");
$k5=$state->fetchAll();
$this->view->keywords=array('place'=>$k1,'theme'=>$k2,'discipline'=>$k3,'stratum'=>$k4,'temporal'=>$k5);
}
}
@ -291,113 +306,11 @@ class YrnmrController extends DataController
$page=(int)$this->_request->getParam('page');
if (empty($page)) $page=1;
$offset=$this->limit*($page-1);
if (!is_array($keyword))
{
$keyword=array($keyword);
}
$key="(";
foreach($keyword as $k)
{
$key.="'".$k."',";
}
$key=substr($key,0,-1);
$key.=")";
$keyword=$key;
$state=$this->db->query("select count(m.*) from normalmetadata m left join datasource d on m.uuid=d.uuid left join source s on d.sourceid=s.id where s.code='yrnmr' and m.id in (select id from keyword where keytype='".$type."' and keyword in ".$keyword.")");
$state=$this->db->query("select count(m.*) from normalmetadata m left join datasource d on m.uuid=d.uuid left join source s on d.sourceid=s.id where s.code='yrnmr' and m.id in (select id from keyword where keytype='".$type."' and keyword='".$keyword."')");
$row=$state->fetchAll();
$sum=$row[0]['count'];
//@todo: add order with title
$sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr') and id in (select id from keyword where keytype='".$type."' and keyword in ".$keyword.") order by title limit ? offset ?";
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
$this->view->page=new Pagination($sum,$page,$this->limit);
$this->view->offset=$offset+1;
}
//获取多项条件并列关系的数据并必须满足limited条件
//$keyword:字符串或字符串数组
//$limited:限制字符串
//$without:明确不包含的字符串数组
private function getmdlimited($keyword,$limited,$without='')
{
$page=(int)$this->_request->getParam('page');
if (empty($page)) $page=1;
$offset=$this->limit*($page-1);
if (!is_array($keyword))
{
$keyword=array($keyword);
}
$key="(";
foreach($keyword as $k)
{
$key.="'".$k."',";
}
$key=substr($key,0,-1);
$key.=")";
$keyword=$key;
if (!empty($without))
{
if (!is_array($without))
{
$without=array($without);
}
$withoutkey="(";
foreach ($without as $wo)
{
$withoutkey.="'".$wo."',";
}
$withoutkey=substr($withoutkey,0,-1);
$withoutkey.=")";
}
$sql="select count(m.*) from normalmetadata m left join datasource d on m.uuid=d.uuid left join source s on d.sourceid=s.id
where s.code='yrnmr' and m.id in (select id from keyword where keyword='".$limited."')
and m.id in (select id from keyword where keyword in ".$keyword.")";
if (!empty($without)) $sql.=" and m.id not in (select id from keyword where keyword in $withoutkey)";
$state=$this->db->query($sql);
$row=$state->fetchAll();
$sum=$row[0]['count'];
//@todo: add order with title
$sql="select uuid,title from normalmetadata where
uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr')
and id in (select id from keyword where keyword='".$limited."')
and id in (select id from keyword where keyword in ".$keyword.")";
if (!empty($without)) $sql.=" and id not in (select id from keyword where keyword in $withoutkey)";
$sql.=" order by title limit ? offset ?";
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
$this->view->page=new Pagination($sum,$page,$this->limit);
$this->view->offset=$offset+1;
}
//获取多项必须满足的条件
//$keyword:字符串或字符串数组
private function getmdrestricted($keyword)
{
$page=(int)$this->_request->getParam('page');
if (empty($page)) $page=1;
$offset=$this->limit*($page-1);
if (!is_array($keyword))
{
$keyword=array($keyword);
}
$key="(";
foreach($keyword as $k)
{
$key.="m.id in (select id from keyword where keyword='".$k."') and ";
}
$key=substr($key,0,-4);
$key.=")";
$keyword=$key;
$state=$this->db->query("select count(m.*) from normalmetadata m left join datasource d on m.uuid=d.uuid left join source s on d.sourceid=s.id where s.code='yrnmr' and $keyword");
$row=$state->fetchAll();
$sum=$row[0]['count'];
//@todo: add order with title
$sql="select uuid,title from normalmetadata m where m.uuid in
(select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr')
and $keyword
order by title limit ? offset ?";
$sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr') and id in (select id from keyword where keytype='".$type."' and keyword='".$keyword."') order by timebegin,title limit ? offset ?";
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
$this->view->page=new Pagination($sum,$page,$this->limit);
$this->view->offset=$offset+1;

View File

@ -1,11 +1,11 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('发展历史');
$this->headTitle('CARD History');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/about.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/about">关于本站</a>');
$this->breadcrumb('发展历史');
$this->breadcrumb('<a href="/">Home</a>');
$this->breadcrumb('<a href="/about">About Us</a>');
$this->breadcrumb('CARD History');
$this->breadcrumb()->setSeparator(' > ');
?>
<div class="row">
@ -14,7 +14,7 @@ $this->breadcrumb()->setSeparator(' > ');
</div>
<div class="span9">
<div id="content">
<h2>发展历史</h2>
<h2>CARD History</h2>
<?= $this->item['body']; ?>
</div>
</div>

View File

@ -1,11 +1,11 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('联系我们');
$this->headTitle('Contact');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/about.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/about">关于本站</a>');
$this->breadcrumb('联系我们');
$this->breadcrumb('<a href="/">Home</a>');
$this->breadcrumb('<a href="/about">About</a>');
$this->breadcrumb('Contact');
$this->breadcrumb()->setSeparator(' > ');
?>
<div class="row">
@ -14,22 +14,22 @@ $this->breadcrumb()->setSeparator(' > ');
</div>
<div class="span9">
<div id="content">
<h2>联系我们</h2>
<h2>Contact</h2>
<div id="offline">
<p class="title">离线方式</p>
<p class="title">Mailing address:</p>
<p>
中国西部环境与生态科学数据中心<br />
中国科学院寒区旱区环境与工程研究所 6#1102<br />
甘肃省兰州市东岗西路320号<br />
邮编:730000<br />
Cold and Arid Regions Science Data Center at Lanzhou<br />
Cold and Arid Regions Environmental and Engineering Research Institute, Chinese Academy of Sciences<br />
Room 6#1102, Donggang West Road 320, Lanzhou, Gansu, China<br />
Zip Code: 730000<br />
E-mail: westdc@lzb.ac.cn<br />
电话: +86-931-4967287<br />
Tel: +86-931-4967287<br />
<br />
</div>
<div id="online">
<p class="title">在线联系</p>
<p class="note">请填写以下表单系统会自动发送到westdc邮箱里</p>
<p class="title">Online Email</p>
<p class="note">Send email via this form to our service mailbox.</p>
<?php echo $this->form; ?>
<?php if (!empty($this->messages)) : ?>

View File

@ -1,11 +1,11 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('联系我们');
$this->headTitle('Use & Copyrights');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/about.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/about">关于本站</a>');
$this->breadcrumb('联系我们');
$this->breadcrumb('<a href="/">Home</a>');
$this->breadcrumb('<a href="/about">About</a>');
$this->breadcrumb('Use & Copyrights');
$this->breadcrumb()->setSeparator(' > ');
?>
<div class="row">
@ -14,7 +14,7 @@ $this->breadcrumb()->setSeparator(' > ');
</div>
<div class="span9">
<div id="content">
<h2>数据与版权</h2>
<h2>Use & Copyrights</h2>
<?= $this->item['body']; ?>
</div>
</div>

View File

@ -1,10 +1,10 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('关于我们');
$this->headTitle('Abut Us');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/about.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('关于我们');
$this->breadcrumb('<a href="/">Home</a>');
$this->breadcrumb('Abut Us');
$this->breadcrumb()->setSeparator(' > ');
?>
<div class="row">
@ -13,7 +13,7 @@ $this->breadcrumb()->setSeparator(' > ');
</div>
<div class="span9">
<div id="content">
<h2>中心简介</h2>
<h2>Mission & Goals</h2>
<?= $this->item['body']; ?>
</div>
</div>

View File

@ -1,15 +1,11 @@
<div class="sidebar-nav bs-review-nav">
<ul class="nav nav-list bs-review-sidenav">
<li id="Nav-about-index"><a href="/about/"><i class="icon-chevron-right"></i>中心简介</a></li>
<li id="Nav-about-background"><a href="/about/background"><i class="icon-chevron-right"></i>发展历史</a></li>
<li id="Nav-about-sponsors"><a href="/about/sponsors"><i class="icon-chevron-right"></i>支持项目</a></li>
<li id="Nav-about-honor"><a href="/about/honor"><i class="icon-chevron-right"></i>服务成效</a></li>
<li id="Nav-about-publication"><a href="/about/publication"><i class="icon-chevron-right"></i>成果发表</a></li>
<li id="Nav-about-copyright"><a href="/about/copyright"><i class="icon-chevron-right"></i>数据与版权</a></li>
<li id="Nav-about-legal"><a href="/about/legal"><i class="icon-chevron-right"></i>隐私政策</a></li>
<li id="Nav-about-terms"><a href="/about/terms"><i class="icon-chevron-right"></i>使用条款</a></li>
<li id="Nav-about-supportus"><a href="/about/supportus"><i class="icon-chevron-right"></i>支持我们</a></li>
<li id="Nav-about-contact"><a href="/about/contact"><i class="icon-chevron-right"></i>联系我们</a></li>
<li id="Nav-about-link"><a href="/about/link"><i class="icon-chevron-right"></i>友情链接</a></li>
<li id="Nav-about-index"><a href="/about/"><i class="icon-chevron-right"></i>Mission & Goals</a></li>
<li id="Nav-about-background"><a href="/about/background"><i class="icon-chevron-right"></i>Background</a></li>
<li id="Nav-about-sponsors"><a href="/about/sponsors"><i class="icon-chevron-right"></i>Sponsors</a></li>
<li id="Nav-about-copyright"><a href="/about/copyright"><i class="icon-chevron-right"></i>Use & Copyrights</a></li>
<li id="Nav-about-terms"><a href="/about/terms"><i class="icon-chevron-right"></i>Terms</a></li>
<li id="Nav-about-supportus"><a href="/about/supportus"><i class="icon-chevron-right"></i>Support Us</a></li>
<li id="Nav-about-contact"><a href="/about/contact"><i class="icon-chevron-right"></i>Contact</a></li>
</ul>
</div>

View File

@ -1,11 +1,11 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('支持项目');
$this->headTitle('Sponsors');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/about.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/about">关于本站</a>');
$this->breadcrumb('支持项目');
$this->breadcrumb('<a href="/">Home</a>');
$this->breadcrumb('<a href="/about">About</a>');
$this->breadcrumb('Sponsors');
$this->breadcrumb()->setSeparator(' > ');
?>
<div class="row">
@ -14,7 +14,7 @@ $this->breadcrumb()->setSeparator(' > ');
</div>
<div class="span9">
<div id="content">
<h2>支持项目</h2>
<h2>Sponsors</h2>
<?= $this->item['body']; ?>
</div>
</div>

View File

@ -1,11 +1,11 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('支持我们');
$this->headTitle('Support Us');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/about.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/about">关于本站</a>');
$this->breadcrumb('支持我们');
$this->breadcrumb('<a href="/">Home</a>');
$this->breadcrumb('<a href="/about">About</a>');
$this->breadcrumb('Support Us');
$this->breadcrumb()->setSeparator(' > ');
?>
<div class="row">
@ -14,7 +14,7 @@ $this->breadcrumb()->setSeparator(' > ');
</div>
<div class="span9">
<div id="content">
<h2>支持我们</h2>
<h2>Support Us</h2>
<?= $this->item['body']; ?>
</div>
</div>

View File

@ -1,11 +1,11 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('使用条款和免责申明');
$this->headTitle('Terms');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/about.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/about">关于本站</a>');
$this->breadcrumb('使用条款和免责申明');
$this->breadcrumb('<a href="/">Home</a>');
$this->breadcrumb('<a href="/about">About</a>');
$this->breadcrumb('Terms');
$this->breadcrumb()->setSeparator(' > ');
?>
<div class="row">
@ -14,7 +14,7 @@ $this->breadcrumb()->setSeparator(' > ');
</div>
<div class="span9">
<div id="content">
<h2>使用条款和免责申明</h2>
<h2>Terms</h2>
<?= $this->item['body']; ?>
</div>
</div>

View File

@ -1,9 +1,9 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('用户登录');
$this->headTitle('Login');
$this->headTitle()->setSeparator(' - ');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/account/login">用户登录</a>');
$this->breadcrumb('<a href="/">Home</a>');
$this->breadcrumb('<a href="/account/login">Login</a>');
$this->breadcrumb()->setSeparator(' > ');
?>
<div class="row-fluid">
@ -12,19 +12,19 @@
<?php } ?>
<form method="post" class="form-horizontal">
<div class="control-group">
<label class="control-label" for="username">用户名</label>
<label class="control-label" for="username">Username</label>
<div class="controls">
<input id="username" type="text" value="" name="username" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="password">密码</label>
<label class="control-label" for="password">Password</label>
<div class="controls">
<input id="password" type="password" value="" name="password" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="confirm_password">确认密码</label>
<label class="control-label" for="confirm_password">Confirm password</label>
<div class="controls">
<input id="confirm_password" type="password" value="" name="confirm_password" />
</div>
@ -33,8 +33,8 @@
<div class="controls">
<input type="hidden" name="submit" value="1" />
<input type="hidden" name="salt" value="<?= $this->salt ?>" />
<button type="submit" class="btn">提交</button>
<a href="/account/login">登录 </a> <a href="/account/register">注册新用户</a>
<button type="submit" class="btn">Submit</button>
<a href="/account/login">Login</a> <a href="/account/register">Register new username</a>
</div>
</div>
</form>

View File

@ -1,6 +1,6 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('网站接入');
$this->headTitle('Website connection');
$this->headTitle()->setSeparator(' - ');
?>
<div class="row">
@ -10,7 +10,7 @@
</div><!--/.well -->
</div><!--/span-->
<div class="span9">
<h3>应用接入</h3>
<h3>Application connection</h3>
<hr />
<?php if(!empty($this->msg)) { ?>
<?= $this->msg ?>
@ -20,13 +20,13 @@
<?php } ?>
<form action="" method="post" class="form-horizontal">
<div class="control-group ">
<label class="control-label" for="name">名称</label>
<label class="control-label" for="name">Name</label>
<div class="controls">
<input type="text" id="name" name="name" value="<?php echo empty($this->info['name']) ? "":$this->info['name']; ?>" />
</div>
</div>
<div class="control-group ">
<label class="control-label" for="name">重定向地址</label>
<label class="control-label" for="name">Redirect address</label>
<div class="controls">
<input type="text" id="uri" name="uri" value="<?php echo empty($this->info['uri']) ? "":$this->info['uri']; ?>" />
</div>
@ -34,8 +34,8 @@
<div class="form-actions">
<input type="hidden" name="submit" value="submit" />
<button type="submit" class="btn btn-primary">确定</button>
<button type="button" class="btn">取消</button>
<button type="submit" class="btn btn-primary">OK</button>
<button type="button" class="btn">Cancel</button>
</div>
</form>
<?php }?>

View File

@ -1,6 +1,6 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('我的账户');
$this->headTitle('My account');
$this->headTitle()->setSeparator(' - ');
?>
<div class="row">
@ -10,8 +10,8 @@
</div><!--/.well -->
</div><!--/span-->
<div class="span9">
<a href="/account/application/ac/add" class="btn btn-info pull-right">应用接入</a>
<h3>应用管理</h3>
<a href="/account/application/ac/add" class="btn btn-info pull-right">Application connection</a>
<h3>Manage application</h3>
<hr />
<?php if(!empty($this->msg)) { ?>
<?= $this->msg ?>

View File

@ -1,9 +1,9 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('用户登录');
$this->headTitle('Login');
$this->headTitle()->setSeparator(' - ');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/account/login">用户登录</a>');
$this->breadcrumb('<a href="/">Home</a>');
$this->breadcrumb('<a href="/account/login">Login</a>');
$this->breadcrumb()->setSeparator(' > ');
?>
<style>
@ -23,7 +23,7 @@
</style>
<div class="row-fluid">
<div class="span12">
<?= empty($this->target_name) ? "":"您已经使用 <strong>".$this->target_name."</strong> 账号登录<hr />" ?>
<?= empty($this->target_name) ? "":"YOu have use the <strong>".$this->target_name."</strong> account logged in.<hr />" ?>
</div>
</div>
<div class="row-fluid">

View File

@ -1,6 +1,6 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('我的账户');
$this->headTitle('My account');
$this->headTitle()->setSeparator(' - ');
?>
<div class="row">
@ -10,7 +10,7 @@
</div><!--/.well -->
</div><!--/span-->
<div class="span9">
<h3>修改账户信息</h3>
<h3>Setting</h3>
<hr />
<?php if(!empty($this->msg)) { ?>
<?php if(!empty($this->jump_url)) {?>
@ -19,7 +19,7 @@
<?php echo $this->msg ?>
</div>
<?php if(!empty($this->jump_url)) { ?>
<br /><a href="<?= $this->jump_url ?>">如果页面没有自动跳转请点击这里</a>
<br /><a href="<?= $this->jump_url ?>">Please click this url if you could not auto jump.</a>
<script language="javascript">setTimeout("self.location='<?php echo $this->jump_url ?>'",3000);</script>
<?php } ?>
<?php } ?>
@ -38,44 +38,45 @@
<?php } ?>
<form action="/account/edit" method="post" class="form-horizontal">
<div class="control-group ">
<label class="control-label">头像</label>
<label class="control-label">Gravatar</label>
<div class="controls">
<img src="<?= $this->avatar ?>" class="img-polaroid">
<span class="help-inline">您的头像信息使用<a href="https://cn.gravatar.com/">Gravatar</a>头像信息<br />请使用西部数据中心注册的Email账号在<a href="https://cn.gravatar.com/">Gravatar</a>网站设置头像<br />设置好头像后重新登录网站即可更新头像</span>
<span class="help-inline">Your gravatar use <a href="https://cn.gravatar.com/">Gravatar</a>.<br />Please use the email you registered in CARD register in
<a href="https://cn.gravatar.com/">Gravatar</a> to set the gravatar.<br />You need re-login to change the gravatar.</span>
</div>
</div>
<div class="control-group ">
<label class="control-label">真实姓名</label>
<label class="control-label">Real name</label>
<div class="controls">
<input type="text" name="realname" value="<?php echo empty($this->info['realname']) ? "":$this->info['realname']; ?>" />
</div>
</div>
<div class="control-group ">
<label class="control-label">工作单位</label>
<label class="control-label">Organization</label>
<div class="controls">
<input type="text" name="unit" value="<?php echo empty($this->info['unit']) ? "":$this->info['unit']; ?>" class="input-block-level" />
</div>
</div>
<div class="control-group ">
<label class="control-label">联系地址</label>
<label class="control-label">Address</label>
<div class="controls">
<input type="text" name="address" value="<?php echo empty($this->info['address']) ? "":$this->info['address']; ?>" class="input-block-level" />
</div>
</div>
<div class="control-group ">
<label class="control-label">联系电话</label>
<label class="control-label">Phone</label>
<div class="controls">
<input type="text" name="phone" value="<?php echo empty($this->info['phone']) ? "":$this->info['phone']; ?>" />
</div>
</div>
<div class="control-group ">
<label class="control-label">邮编</label>
<label class="control-label">Zip code</label>
<div class="controls">
<input type="text" name="postcode" value="<?php echo empty($this->info['postcode']) ? "":$this->info['postcode']; ?>" />
</div>
</div>
<div class="control-group ">
<label class="control-label">项目类型</label>
<label class="control-label">Fund type</label>
<div class="controls">
<select id="project_type" name="project_type">
<?php if(!empty($this->projectType)) { ?>
@ -99,27 +100,27 @@
</div>
</div>
<div class="control-group ">
<label class="control-label">项目编号</label>
<label class="control-label">Fund number</label>
<div class="controls">
<input type="text" name="project_id" value="<?php echo empty($this->info['project_id']) ? "":$this->info['project_id']; ?>" />
</div>
</div>
<div class="control-group ">
<label class="control-label">项目名称</label>
<label class="control-label">Funt name</label>
<div class="controls">
<input type="text" name="project_title" value="<?php echo empty($this->info['project_title']) ? "":$this->info['project_title']; ?>" class="input-block-level" />
</div>
</div>
<div class="control-group ">
<label class="control-label">项目简介</label>
<label class="control-label">Last Data Usage</label>
<div class="controls">
<textarea name="project" class="input-block-level"><?php echo empty($this->info['project']) ? "":$this->info['project']; ?></textarea>
</div>
</div>
<div class="form-actions">
<input type="hidden" name="submit" value="submit" />
<button type="submit" class="btn btn-primary">确定</button>
<button type="button" class="btn">取消</button>
<button type="submit" class="btn btn-primary">Ok</button>
<button type="button" class="btn">Cancel</button>
</div>
</form>
<?php }?>

View File

@ -1,12 +1,12 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('用户登录');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/register.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/account/fetchpwd">找回密码</a>');
$this->breadcrumb()->setSeparator(' > ');
?>
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('Login');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/register.css');
$this->breadcrumb('<a href="/">Home</a>');
$this->breadcrumb('<a href="/account/fetchpwd">Fetch password</a>');
$this->breadcrumb()->setSeparator(' > ');
?>
<div class="row-fluid">
<?php if(!empty($this->error)) { ?>
<?= $this->error ?>
@ -16,15 +16,15 @@
<label class="control-label" for="email">E-mail</label>
<div class="controls">
<input id="email" type="text" value="" name="email" />
<span class="help-block">请输入注册时填写的Email地址</span>
<span class="help-block">Your email address</span>
</div>
</div>
<div class="control-group">
<label class="control-label" for="captcha">验证码</label>
<label class="control-label" for="captcha">Captcha</label>
<div class="controls">
<input id="captcha" type="text" value="" name="captcha" />
<img id="captcha_img" src="<?php echo $this->captcha ?>" style="cursor:pointer" />
<a href="javascript:void(0);" onclick="changecaptcha()">看不清?</a>
<a href="javascript:void(0);" onclick="changecaptcha()">Not clear?</a>
</div>
</div>
<div class="control-group">
@ -33,8 +33,8 @@
<?php if(!empty($this->href)){?>
<input type="hidden" name="href" value="<?= $this->href ?>" />
<?php }?>
<button type="submit" class="btn">提交</button>
<a href="/account/login">登录 </a> <a href="/account/register">注册新用户</a>
<button type="submit" class="btn">submit</button>
<a href="/account/register">Register new username</a>
</div>
</div>
</form>
@ -52,4 +52,4 @@ function changecaptcha(){
}
});
}
</script>
</script>

View File

@ -1,6 +1,6 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('我的账户');
$this->headTitle('My account');
$this->headTitle()->setSeparator(' - ');
?>
<div class="row">
@ -10,15 +10,15 @@
</div><!--/.well -->
</div><!--/span-->
<div class="span9">
<h3>账户信息</h3>
<h3>Account</h3>
<hr />
<?php if(!empty($this->info)) {?>
<dl class="dl-horizontal">
<dt>头像</dt>
<dt>Gravatar</dt>
<dd><img src="<?= $this->avatar ?>" class="img-polaroid"></dd>
</dl>
<dl class="dl-horizontal">
<dt>用户名</dt>
<dt>Username</dt>
<dd><?php echo $this->info['username'] ?></dd>
</dl>
<dl class="dl-horizontal">
@ -26,23 +26,23 @@
<dd><?php echo $this->info['email'] ?></dd>
</dl>
<dl class="dl-horizontal">
<dt>真实姓名</dt>
<dt>Real Name</dt>
<dd><?php echo $this->info['realname'] ?></dd>
</dl>
<dl class="dl-horizontal">
<dt>工作单位</dt>
<dt>Organization</dt>
<dd><?php echo $this->info['unit'] ?></dd>
</dl>
<dl class="dl-horizontal">
<dt>项目</dt>
<dt>Fund</dt>
<dd><?php echo $this->info['project_title'] ?></dd>
</dl>
<dl class="dl-horizontal">
<dt>账号注册时间</dt>
<dt>Register date</dt>
<dd><?php echo date("Y-m-d H:i",strtotime($this->info['ts_created'])) ?></dd>
</dl>
<dl class="dl-horizontal">
<dt>上次登录时间</dt>
<dt>Last login</dt>
<dd><?php echo date("Y-m-d H:i",strtotime($this->info['ts_last_login'])) ?></dd>
</dl>
<?php } ?>

View File

@ -1,11 +1,10 @@
<ul class="nav nav-list">
<li class="nav-header">应用</li>
<li id="Nav-account-dataorder"><a href="/data/order">数据篮</a></li>
<!-- <li id="Nav-account-myfav"><a href="/account/myfav">我的收藏</a></li> -->
<!--<li id="Nav-account-application"><a href="/account/application">我的应用</a></li>-->
<li class="nav-header">账户</li>
<li id="Nav-account-index"><a href="/account">账户信息</a></li>
<li id="Nav-account-secure"><a href="/account/secure">安全性</a></li>
<li id="Nav-account-edit"><a href="/account/edit">设置</a></li>
<li class="nav-header">App</li>
<li id="Nav-account-dataorder"><a href="/data/order">Data Cart</a></li>
<!-- <li id="Nav-account-myfav"><a href="/account/myfav">Favorite</a></li> -->
<li class="nav-header">Account</li>
<li id="Nav-account-index"><a href="/account">Account info</a></li>
<li id="Nav-account-secure"><a href="/account/secure">Security</a></li>
<li id="Nav-account-edit"><a href="/account/edit">Setting</a></li>
<!-- <li><a href="/account/linkin">关联账号</a></li> -->
</ul>

View File

@ -1,38 +1,38 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('用户登录');
$this->headTitle('login');
$this->headTitle()->setSeparator(' - ');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/account/login">用户登录</a>');
$this->breadcrumb('<a href="/">Home</a>');
$this->breadcrumb('<a href="/account/login">Login</a>');
$this->breadcrumb()->setSeparator(' > ');
?>
<div class="row-fluid">
<form class="form-horizontal" method="post">
<?php if(empty($this->error)) { ?>
<div class="alert alert-info alert-login">
请输入用户名和密码登录
Please input your username and password
</div>
<? }else{ ?>
<?= $this->error ?>
<?php } ?>
<div class="control-group">
<label class="control-label" for="username">用户名</label>
<label class="control-label" for="username">Username</label>
<div class="controls">
<input id="username" type="text" value="" name="username" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="password">密码</label>
<label class="control-label" for="password">Password</label>
<div class="controls">
<input id="password" type="password" value="" name="password" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="captcha">验证码</label>
<label class="control-label" for="captcha">Captcha</label>
<div class="controls">
<input id="captcha" type="text" value="" name="captcha" />
<img id="captcha_img" src="<?php echo $this->captcha ?>" style="cursor:pointer" />
<a href="javascript:void(0);" onclick="changecaptcha()">看不清?</a>
<a href="javascript:void(0);" onclick="changecaptcha()">Not clear?</a>
</div>
</div>
<div class="control-group">
@ -41,15 +41,12 @@
<?php if(!empty($this->href)){?>
<input type="hidden" name="href" value="<?= $this->href ?>" />
<?php }?>
<label class="checkbox"><input id="remember" type="checkbox" value="1" name="remember">记住我</label>
<button type="submit" class="btn">登录</button>
<a href="/account/fetchpwd">忘记密码?</a>
<label class="checkbox"><input id="remember" type="checkbox" value="1" name="remember">Remember me</label>
<button type="submit" class="btn">Login</button>
<a href="/account/fetchpwd">Forgot password?</a>
</div>
</div>
</form>
<hr />
<h5>其它账号登录</h5>
<a href="/account/oauth2login/type/escience">中国科技网通行证</a>
</div>
<script>
$('#captcha_img').click(function(e) {

View File

@ -1,141 +1,108 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('用户注册');
$this->headTitle('Register');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/register.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/account/register">用户注册</a>');
$this->breadcrumb('<a href="/">Home</a>');
$this->breadcrumb('<a href="/account/register">Register</a>');
$this->breadcrumb()->setSeparator(' > ');
?>
<div class="row-fluit">
<form class="form-horizontal" method="post" id="register">
<?php if(empty($this->error)) { ?>
<div class="alert alert-info alert-login">
请输入您的基本信息进行注册
Create a new account
</div>
<? }else{ ?>
<?= $this->error ?>
<?php } ?>
<div class="control-group">
<label class="control-label" for="username">用户名</label>
<label class="control-label" for="username">Username</label>
<div class="controls">
<input id="username" type="text" value="<?= isset($this->data['username']) ? $this->data['username']:"" ?>" name="username" />
<span class="help-inline">(必填)</span>
<span class="help-inline">(required)</span>
</div>
</div>
<div class="control-group">
<label class="control-label" for="password">密码</label>
<label class="control-label" for="password">Password</label>
<div class="controls">
<input id="password" type="password" value="" name="password" />
<span class="help-inline">(必填)</span>
<span class="help-inline">(required)</span>
</div>
</div>
<div class="control-group">
<label class="control-label" for="confirm_password">确认密码</label>
<label class="control-label" for="confirm_password">Confirm password</label>
<div class="controls">
<input id="confirm_password" type="password" value="" name="confirm_password" />
<span class="help-inline">(必填)</span>
<span class="help-inline">(re-typein password)</span>
</div>
</div>
<div class="control-group">
<label class="control-label" for="email">E-Mail</label>
<label class="control-label" for="email">EMail</label>
<div class="controls">
<input id="email" type="text" value="<?= isset($this->data['email']) ? $this->data['email']:"" ?>" name="email" />
<span class="help-inline">(必填)</span>
<span class="help-inline">(required)</span>
</div>
</div>
<div class="control-group">
<label class="control-label" for="realname">真实姓名</label>
<label class="control-label" for="realname">Name</label>
<div class="controls">
<input id="realname" type="text" value="<?= isset($this->data['realname']) ? $this->data['realname']:"" ?>" name="realname" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="phone">电话</label>
<label class="control-label" for="phone">Phone</label>
<div class="controls">
<input id="phone" type="text" value="<?= isset($this->data['phone']) ? $this->data['phone']:"" ?>" name="phone" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="unit">单位</label>
<label class="control-label" for="unit">Organization</label>
<div class="controls">
<input id="unit" type="text" value="<?= isset($this->data['unit']) ? $this->data['unit']:"" ?>" name="unit" class="input-block-level" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="address">联系地址</label>
<label class="control-label" for="address">Address</label>
<div class="controls">
<input id="address" type="text" value="<?= isset($this->data['address']) ? $this->data['address']:"" ?>" name="address" class="input-block-level" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="project_id">项目编号</label>
<div class="controls">
<input id="project_id" type="text" value="<?= isset($this->data['project_id']) ? $this->data['project_id']:"" ?>" name="project_id" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="project_leader">项目负责人</label>
<div class="controls">
<input id="project_leader" type="text" value="<?= isset($this->data['project_leader']) ? $this->data['project_leader']:"" ?>" name="project_leader" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="project_type">项目类型</label>
<div class="controls">
<select id="project_type" name="project_type">
<?php if(!empty($this->projectType)) { ?>
<?php foreach($this->projectType as $k=>$v) { ?>
<?php if(empty($this->data['project_type'])) {?>
<?php if($v == "") { ?>
<option value="<?= $v ?>" selected="selected"><?= $k ?></option>
<?php }else { ?>
<option value="<?= $v ?>"><?= $k ?></option>
<?php }
} else {?>
<?php if($v == $this->data['project_type']) { ?>
<option value="<?= $v ?>" selected="selected"><?= $k ?></option>
<?php }else { ?>
<option value="<?= $v ?>"><?= $k ?></option>
<?php }
}?>
<?php } ?>
<?php } ?>
</select>
</div>
</div>
<div class="control-group">
<label class="control-label" for="project_title">项目名称</label>
<div class="controls">
<input id="project_title" type="text" value="<?= isset($this->data['project_title']) ? $this->data['project_title']:"" ?>" name="project_title" class="input-block-level" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="project">项目介绍</label>
<label class="control-label" for="project">Fund</label>
<div class="controls">
<input id="project" type="text" value="<?= isset($this->data['project']) ? $this->data['project']:"" ?>" name="project" class="input-block-level" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="captcha">Captcha</label>
<div class="controls">
<input id="captcha" type="text" value="" name="captcha" />
<img id="captcha_img" src="<?php echo $this->captcha ?>" style="cursor:pointer" />
<a href="javascript:void(0);" onclick="changecaptcha()">Reload captcha</a>
</div>
</div>
<div class="form-actions">
<input type="hidden" name="submit" value="1" />
<?php if(!empty($this->href)){?>
<input type="hidden" name="href" value="<?= $this->href ?>" />
<?php }?>
<button type="submit" class="btn btn-primary">提交</button>
<a href="/account/fetchpwd">忘记密码?</a>
<button type="submit" class="btn btn-primary">Submit</button>
<a href="/account/fetchpwd">forget password</a>
</div>
</form>
</div>
<?php if(!empty($this->place)){ ?>
<script>
var input = $("#register input[name=<?= $this->place ?>]");
input.parent('div').parent('div.control-group').addClass('error');
input.focus();
input.blur(function(e){
if(input.val() != '')
{
input.parent('div').parent('div.control-group').removeClass('error');
}
$('#captcha_img').click(function(e) {
changecaptcha();
});
</script>
<?php } ?>
function changecaptcha(){
$.ajax({
url:"/account/captcha",
data:"<?= time() ?>",
success: function(src){
document.getElementById('captcha_img').src = src;
}
});
}
</script>

View File

@ -1,6 +1,6 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('我的账户');
$this->headTitle('My account');
$this->headTitle()->setSeparator(' - ');
$this->theme->AppendPlus($this,'colorbox');
?>
@ -11,12 +11,12 @@
</div><!--/.well -->
</div><!--/span-->
<div class="span9">
<h3>修改安全性设置</h3>
<h3>Security</h3>
<hr />
<div class="tabbable">
<ul class="nav nav-tabs">
<li <?php if($this->section == "email" || empty($this->section)) echo 'class="active"'?>><a href="#tab2" data-toggle="tab">电子邮箱</a></li>
<li <?php if($this->section == "password") echo 'class="active"'?>><a href="#tab3" data-toggle="tab">修改密码</a></li>
<li <?php if($this->section == "email" || empty($this->section)) echo 'class="active"'?>><a href="#tab2" data-toggle="tab">Email</a></li>
<li <?php if($this->section == "password") echo 'class="active"'?>><a href="#tab3" data-toggle="tab">Change password</a></li>
</ul>
<?php if(!empty($this->error)) { ?>
<?= $this->error ?>
@ -32,16 +32,16 @@
</div>
</div>
<div class="control-group">
<label class="control-label">密码:</label>
<label class="control-label">Password:</label>
<div class="controls">
<input type="password" name="password" />
<span class="help-inline">如果要修改邮箱,请输入原密码</span>
<span class="help-inline">Require old password to change the Email</span>
</div>
</div>
<div class="form-actions">
<input type="hidden" name="submit" value="submit" />
<button type="submit" class="btn btn-green" class="btn btn-primary">保存</button>
<button type="reset" id="reset" class="btn">取消</button>
<button type="submit" class="btn btn-green" class="btn btn-primary">Save</button>
<button type="reset" id="reset" class="btn">Cancel</button>
</div>
</form>
</div>
@ -50,28 +50,28 @@
<div id="password">
<form action="/account/secure" method="post" class="form-horizontal">
<div class="control-group ">
<label class="control-label">当前密码</label>
<label class="control-label">Old Password</label>
<div class="controls">
<input name="password" type="password" value="" />
<span class="help-inline">如果要修改密码,请输入原密码</span>
<span class="help-inline">Require old password to change the Password</span>
</div>
</div>
<div class="control-group ">
<label class="control-label">新密码</label>
<label class="control-label">New Password</label>
<div class="controls">
<input type="password" name="new_password" value="" />
</div>
</div>
<div class="control-group ">
<label class="control-label">确认新密码</label>
<label class="control-label">New Password Confirm</label>
<div class="controls">
<input type="password" name="new_password_confrim" value="" />
</div>
</div>
<div class="form-actions">
<input type="hidden" name="submit" value="submit" />
<button type="submit" class="btn btn-primary">确定</button>
<button type="button" class="btn">取消</button>
<button type="submit" class="btn btn-primary">Submit</button>
<button type="button" class="btn">Cancel</button>
</div>
</form>
</div>

View File

@ -3,8 +3,8 @@ $config = Zend_Registry::get('config');
$this->headTitle($config->title->site);
$this->headTitle($this->infos['title']);
$this->headTitle()->setSeparator(' - ');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/archives/">新闻中心</a>');
$this->breadcrumb('<a href="/">Home</a>');
$this->breadcrumb('<a href="/archives/">News & Events</a>');
$this->breadcrumb('<a href="/archives/'.$this->ptype.'/'.$this->type.'">'.$this->infos['typename'].'</a>');
$this->breadcrumb($this->infos['title']);
$this->breadcrumb()->setSeparator(' > ');
@ -17,7 +17,7 @@ $this->headLink()->appendStylesheet('/css/news.css');
<div class="span3">
<div class="bs-review-nav sidebar-nav">
<ul class="nav nav-list bs-review-sidenav">
<li><a href="/archives"><i class="icon-chevron-right"></i>新闻中心</a></li>
<li><a href="/archives"><i class="icon-chevron-right"></i>News & Events</a></li>
<?php
if(count($this->types))
{
@ -25,7 +25,7 @@ $this->headLink()->appendStylesheet('/css/news.css');
{
$haed = "";
if(!empty($v[$this->deepField])) {$haed = str_repeat(' ',$v[$this->deepField]);}
echo '<li'.($v['code']==$this->type?' class="active"':'').'><a href="'.$v['url'].'"><i class="icon-chevron-right"></i>'.$haed.$v['title'].'</a></li>';
echo '<li'.($v['code']==$this->type?' class="active"':'').'><a href="'.$v['url'].'"><i class="icon-chevron-right"></i>'.$haed.$v['title_en'].'</a></li>';
$haed = "";
}
}
@ -35,10 +35,10 @@ $this->headLink()->appendStylesheet('/css/news.css');
</div>
<div class="span9" id="archive_body">
<h3 class="text-center"><?php echo $this->infos['title'];?></h3>
<div class="text-center">[<?php echo date("Y-m-d",strtotime($this->infos['ts_published']));?>]&nbsp;&nbsp;来源&nbsp;:&nbsp;<?php echo $this->infos['source'];?></div>
<div class="text-center">[<?php echo date("Y-m-d",strtotime($this->infos['ts_published']));?>]&nbsp;&nbsp;From&nbsp;:&nbsp;<?php echo $this->infos['source'];?></div>
<?php if(!empty($this->mdinfo)){?>
<?php foreach($this->mdinfo as $v){ ?>
<div class="info">相关数据:《<a href="/data/<?= $v['uuid']?>"><?= $v['title']?></a></div>
<div class="info">Related data: <a href="/data/<?= $v['uuid']?>"><?= $v['title']?></a></div>
<?php } } ?>
<div class="media">
<div class="pull-left">

View File

@ -1,9 +1,9 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('新闻中心');
$this->headTitle('News & Events');
$this->headTitle()->setSeparator(' - ');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('新闻中心');
$this->breadcrumb('<a href="/">Home</a>');
$this->breadcrumb('News & Events');
$this->breadcrumb()->setSeparator(' > ');
$this->headLink()->appendStylesheet('/css/news.css');
$this->theme->AppendPlus($this,'masonry');
@ -12,7 +12,7 @@ $this->theme->AppendPlus($this,'masonry');
<div class="span3">
<div class="sidebar-nav bs-review-nav">
<ul class="nav nav-list bs-review-sidenav">
<li class="active"><a href="/archives"><i class="icon-chevron-right"></i>新闻中心</a></li>
<li class="active"><a href="/archives"><i class="icon-chevron-right"></i>News & Events</a></li>
<?php
if(count($this->types))
{
@ -20,7 +20,7 @@ $this->theme->AppendPlus($this,'masonry');
{
$haed = "";
if(!empty($v[$this->deepField])) {$haed = str_repeat(' ',$v[$this->deepField]);}
echo '<li><a href="'.$v['url'].'"><i class="icon-chevron-right"></i>'.$haed.$v['title'].'</a></li>';
echo '<li><a href="'.$v['url'].'"><i class="icon-chevron-right"></i>'.$haed.$v['title_en'].'</a></li>';
$haed = "";
}
}

View File

@ -1,9 +1,9 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('新闻中心');
$this->headTitle('News & Events');
$this->headTitle()->setSeparator(' - ');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/archives/">新闻中心</a>');
$this->breadcrumb('<a href="/">Home</a>');
$this->breadcrumb('<a href="/archives/">News & Events</a>');
$this->breadcrumb($this->title);
$this->breadcrumb()->setSeparator(' > ');
$this->headLink()->appendStylesheet('/css/news.css');
@ -12,7 +12,7 @@ $this->headLink()->appendStylesheet('/css/news.css');
<div class="span3">
<div class="bs-review-nav sidebar-nav">
<ul class="nav nav-list bs-review-sidenav">
<li><a href="/archives"><i class="icon-chevron-right"></i>新闻中心</a></li>
<li><a href="/archives"><i class="icon-chevron-right"></i>News & Events</a></li>
<?php
if(count($this->types))
{
@ -20,7 +20,7 @@ $this->headLink()->appendStylesheet('/css/news.css');
{
$haed = "";
if(!empty($v[$this->deepField])) {$haed = str_repeat(' ',$v[$this->deepField]);}
echo '<li'.($v['code']==$this->type?' class="active"':'').'><a href="'.$v['url'].'"><i class="icon-chevron-right"></i>'.$haed.$v['title'].'</a></li>';
echo '<li'.($v['code']==$this->type?' class="active"':'').'><a href="'.$v['url'].'"><i class="icon-chevron-right"></i>'.$haed.$v['title_en'].'</a></li>';
$haed = "";
}
}
@ -60,7 +60,7 @@ $this->headLink()->appendStylesheet('/css/news.css');
}
else
{
echo '暂无数据';
echo 'No news now.';
}
?>
</ul>

View File

@ -3,9 +3,9 @@ $this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->author);
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/author.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/author">数据作者</a>');
$this->breadcrumb('我的数据');
$this->breadcrumb('<a href="/">Home</a>');
$this->breadcrumb('<a href="/author">Author</a>');
$this->breadcrumb('My datasets');
$this->breadcrumb()->setSeparator(' > ');
?>
<div class="row">

View File

@ -4,9 +4,9 @@ $this->headTitle($this->config->title->author);
$this->headTitle()->setSeparator(' - ');
$this->theme->AppendPlus($this,'colorbox');
$this->headLink()->appendStylesheet('/css/author.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/author">数据作者</a>');
$this->breadcrumb('我的数据');
$this->breadcrumb('<a href="/">Home</a>');
$this->breadcrumb('<a href="/author">Author</a>');
$this->breadcrumb('My datasets');
$this->breadcrumb()->setSeparator(' > ');
?>
<div class="row">
@ -14,12 +14,10 @@ $this->breadcrumb()->setSeparator(' > ');
<?= $this->partial('author/navi.phtml'); ?>
</div>
<div class="span9">
<p>请输入元数据标题关键字进行搜索</p>
<div class="input-append">
<form id="datasearch" class="search_form" action="/author/accept/ac/search">
<input class="span2" type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>">
<button class="btn" type="submit">搜索</button>
<input class="span2" type="text" id="keyword" name="q" placeholder="Search in title" value="<?php if(!empty($this->q)) echo $this->q; ?>">
<button class="btn" type="submit">Search</button>
</form>
</div>
<div>
@ -32,32 +30,16 @@ $this->breadcrumb()->setSeparator(' > ');
<li class="well">
<h4><a href="/data/<?php echo $item['uuid'];?>" target="_blank" class="title"><?php echo $item['title'];?></a></h4>
<?php if($item['status']==1) : ?>
<span class="dtctrlplan">【操作:
<a href="/author/inauthor/ac/datalist/uuid/<?php echo $item['uuid']; ?>">申请管理</a> |
<a href="/author/comment/ac/view/uuid/<?php echo $item['uuid']; ?>">反馈</a> |
<a href="/author/document/uuid/<?php echo $item['uuid']; ?>">文档</a> |
<a href="/author/literature/uuid/<?php echo $item['uuid']; ?>">文献</a> |
<a href="/author/literature/ac/add/uuid/<?php echo $item['uuid']; ?>" class="more iframe">添加文献</a> |
<a href="/service/geonetwork?url=metadata.edit?id=<?php echo $item['gid']; ?>" target="_blank">修改元数据</a> |
<a href="/author/version/uuid/<?php echo $item['uuid']; ?>">版本</a> |
<a href="/author/qa/uuid/<?php echo $item['uuid']; ?>">QA</a> |
<a href="/author/news/uuid/<?php echo $item['uuid']; ?>">新闻</a> |
<a href="/author/viewauthors/uuid/<?php echo $item['uuid']; ?>">所有作者</a>
<?php if($item['mdstatus']==6) {?>
| <a href="/author/delegate/uuid/<?php echo $item['uuid'];?>" onclick="return confirm('是否确定将该数据委托至数据中心?');">委托</a>
<?php } if($item['mdstatus']==7){ ?>
| <a href="/author/delegate/ac/cancel/uuid/<?php echo $item['uuid'];?>" onclick="return confirm('是否确定取消该数据的委托?');">取消委托</a>
<?php }?> |
<a href="/author/sendmail/uuid/<?php echo $item['uuid']; ?>">邮件通知</a> |
<a href="/author/fund/uuid/<?php echo $item['uuid']; ?>">支持项目</a> |
<a href="/author/doi/ac/edit/uuid/<?php echo $item['uuid']; ?>">DOI</a>
<?php if (!isset($item['genid']) || !$item['genid']>0) : ?>
| <a class="more iframe" href="/author/gnenexport/uuid/<?php echo $item['uuid'];?>">导入英文版</a>
<?php endif; ?>
<span class="dtctrlplan"> [
<a href="/service/geonetwork?url=metadata.edit?id=<?php echo $item['gid']; ?>" target="_blank">Edit metadata</a> |
<a href="/author/literature/uuid/<?php echo $item['uuid']; ?>">Literatures</a> |
<a href="/author/literature/ac/add/uuid/<?php echo $item['uuid']; ?>" class="more iframe">Add new literature</a> |
<a href="/author/version/uuid/<?php echo $item['uuid']; ?>">Versions</a>
]
</span>
<?php endif; ?>
<p><?php echo mb_strlen($item['description'])>400?$this->escape(mb_substr($item['description'],0,400,'UTF-8').'...'):$this->escape($item['description']); ?></p>
<p>
<?php

View File

@ -4,7 +4,7 @@ $this->headTitle($this->config->title->author);
$this->headTitle()->setSeparator(' - ');
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
$this->headLink()->appendStylesheet('/css/author.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/">Home</a>');
$this->breadcrumb($this->config->title->author);
$this->breadcrumb()->setSeparator(' > ');
?>

View File

@ -4,9 +4,9 @@ $this->headTitle($this->config->title->author);
$this->headTitle()->setSeparator(' - ');
$this->theme->AppendPlus($this,'colorbox');
$this->headLink()->appendStylesheet('/css/author.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/author">数据作者</a>');
$this->breadcrumb('数据文献管理');
$this->breadcrumb('<a href="/">Home</a>');
$this->breadcrumb('<a href="/author">Author</a>');
$this->breadcrumb('Literatures');
$this->breadcrumb()->setSeparator(' > ');
?>
<div class="row">

View File

@ -15,11 +15,11 @@ $this->breadcrumb()->setSeparator(' > ');
</div>
<div class="span9">
<?= $this->partial('author/literature-nav.phtml',array('ac'=>$this->ac,'uuid'=>$this->uuid)); ?>
<p>请输入文献标题关键字进行搜索</p>
<p>Search by keywords in the title of literatures</p>
<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>
<button type="submit" class="btn" id="search_btn">Search</button>
</form>
</div>
<div>
@ -37,9 +37,9 @@ $this->breadcrumb()->setSeparator(' > ');
?>
<li class="well">
<p><?= $autoindex ?>. <?php echo $item['reference'];?></p>
<p>共有<?php echo $item['c'];?>条数据推荐此文献。
<a href="/knowledge/paper/id/<?php echo $item['id'];?>">查看</a>
| <a href="javascript:;" onclick="showdata('<?php echo $item['id'];?>',0)"><i class="icon-external-link text-success"></i>文献对应数据</a>
<p><?php echo $item['c'];?> datasets recommend this literature.
<a href="/knowledge/paper/id/<?php echo $item['id'];?>">View</a>
| <a href="javascript:;" onclick="showdata('<?php echo $item['id'];?>',0)"><i class="icon-external-link text-success"></i>Datasets</a>
</p>
</li>
<?php endforeach;

View File

@ -15,11 +15,11 @@ $this->breadcrumb()->setSeparator(' > ');
</div>
<div class="span9">
<?= $this->partial('author/literature-nav.phtml',array('ac'=>$this->ac,'uuid'=>$this->uuid)); ?>
<p>请输入文献标题关键字进行搜索</p>
<p>Search by keywords in the title of literatures</p>
<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>
<button type="submit" class="btn" id="search_btn">Search</button>
</form>
</div>
<div>

View File

@ -1,8 +1,8 @@
<ul class="nav nav-tabs">
<?php if (!empty($this->uuid)) : ?>
<li class="active"><a href="/author/literature/uuid/<?= $this->uuid ?>">数据文献</a></li>
<li class="active"><a href="/author/literature/uuid/<?= $this->uuid ?>">Data literatures</a></li>
<?php endif; ?>
<li <?= empty($this->ac) && empty($this->uuid) ? 'class="active"':"" ?>><a href="/author/literature">逐数据浏览</a></li>
<li <?= $this->ac=="byliter" ? 'class="active"':"" ?>><a href="/author/literature/ac/byliter">逐文献浏览</a></li>
<li <?= $this->ac=="cited" ? 'class="active"':"" ?>><a href="/author/literature/ac/cited">施引文献</a></li>
<li <?= empty($this->ac) && empty($this->uuid) ? 'class="active"':"" ?>><a href="/author/literature">By datasets</a></li>
<li <?= $this->ac=="byliter" ? 'class="active"':"" ?>><a href="/author/literature/ac/byliter">By literatures</a></li>
<li <?= $this->ac=="cited" ? 'class="active"':"" ?>><a href="/author/literature/ac/cited">Cited literatures</a></li>
</ul>

View File

@ -8,9 +8,9 @@ $this->headLink()->appendStylesheet('/css/author.css');
$this->headScript()->appendFile('/static/js/uploadify/swfobject.js');
$this->headScript()->appendFile('/static/js/uploadify/jquery.uploadify.v2.1.4.min.js');
$this->headLink()->appendStylesheet('/static/js/uploadify/uploadify.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/author">数据作者</a>');
$this->breadcrumb('数据文献管理');
$this->breadcrumb('<a href="/">Home</a>');
$this->breadcrumb('<a href="/author">Author</a>');
$this->breadcrumb('Literatures');
$this->breadcrumb()->setSeparator(' > ');
?>
<div class="row">
@ -19,12 +19,12 @@ $this->breadcrumb()->setSeparator(' > ');
</div>
<div class="span9">
<?= $this->partial('author/literature-nav.phtml',array('ac'=>$this->ac,'uuid'=>$this->uuid)); ?>
<h4>数据标题:<a href="/data/<?= $this->uuid ?>"><?= $this->paginator->getItem(0)['mdtitle'] ?></a></h4>
<p>请输入文献标题关键字进行搜索添加 或 <a href="/author/literature/ac/add/uuid/<?php echo $this->uuid;?>" class="more iframe btn">直接添加新文献</a></p>
<h4>Dataset: <a href="/data/<?= $this->uuid ?>"><?= $this->paginator->getItem(0)['mdtitle'] ?></a></h4>
<p>Search by keywords in the title of literatures or <a href="/author/literature/ac/add/uuid/<?php echo $this->uuid;?>" class="more iframe btn">Add literatures for the dataset</a></p>
<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>
<button type="submit" class="btn" id="search_btn">Search and link the literatures</button>
</form>
</div>
<div>
@ -43,13 +43,13 @@ $this->breadcrumb()->setSeparator(' > ');
<li class="well" id="list_<?php echo $item['id'].$item['uuid'];?>">
<p><strong><?= $this->referenceType[$item['reftype']] ?></strong> <?= $autoindex ?>. <?php echo $item['reference'];?></p>
<p>
<a href="/knowledge/paper/id/<?php echo $item['id'];?>">查看</a>
| <a href="javascript:;" onclick="showdata('<?php echo $item['id'];?>',0)"><i class="icon-external-link text-success"></i>文献对应数据</a>
[ <a href="/knowledge/paper/id/<?php echo $item['id'];?>">View</a>
| <a href="javascript:;" onclick="showdata('<?php echo $item['id'];?>',0)"><i class="icon-external-link text-success"></i>Datasets related with the literature</a>
<?php if ($item['reftype']==0) :?>
| <a href="javascript:void(0);" class="order" rel="<?= $item['mrid'];?>" rev="<?= $item['place']?>">排序</a>
| <a onclick="return confirm('是否确定移除该文献?');" href="javascript:action('remove&id=<?php echo $item['mrid'];?>','<?php echo $item['uuid'];?>');" class="more">移除</a>
| <a href="javascript:void(0);" class="order" rel="<?= $item['mrid'];?>" rev="<?= $item['place']?>">Place</a>
| <a onclick="return confirm('Sure to remove the literature?');" href="javascript:action('remove&id=<?php echo $item['mrid'];?>','<?php echo $item['uuid'];?>');" class="more">Remove</a>
<?php endif; ?>
</p>
]</p>
</li>
<?php endforeach;
echo "</ul>";

View File

@ -7,9 +7,9 @@ $this->headScript()->appendFile('/static/js/uploadify/swfobject.js');
$this->headScript()->appendFile('/static/js/uploadify/jquery.uploadify.v2.1.4.min.js');
$this->headLink()->appendStylesheet('/static/js/uploadify/uploadify.css');
$this->headLink()->appendStylesheet('/css/author.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/author">数据作者</a>');
$this->breadcrumb('数据文献管理');
$this->breadcrumb('<a href="/">Home</a>');
$this->breadcrumb('<a href="/author">Author</a>');
$this->breadcrumb('Literatures');
$this->breadcrumb()->setSeparator(' > ');
?>
<div class="row">
@ -18,11 +18,11 @@ $this->breadcrumb()->setSeparator(' > ');
</div>
<div class="span9">
<?= $this->partial('author/literature-nav.phtml',array('ac'=>$this->ac,'uuid'=>$this->uuid)); ?>
<p>请输入元数据关键字进行搜索</p>
<p>Search by keywords</p>
<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>
<button type="submit" class="btn" id="search_btn">Search</button>
</form>
</div>
<div>
@ -40,11 +40,11 @@ $this->breadcrumb()->setSeparator(' > ');
?>
<li class="well" id="list_<?php echo $item['uuid'];?>">
<h4><?= $autoindex ?>. <a href="/data/<?php echo $item['uuid'];?>" target="_blank"><?php echo $item['title'];?></a></h4>
【 共推荐文献<?php echo $item['c'];?> |
<?php if ($item['c']>0) :?><a href="/author/literature/uuid/<?php echo $item['uuid'];?>">查看相关文献</a>
[ Recommended <?php echo $item['c'];?> literatures |
<?php if ($item['c']>0) :?><a href="/author/literature/uuid/<?php echo $item['uuid'];?>">Related literatures</a>
| <?php endif; ?>
<a href="/author/literature/ac/add/uuid/<?php echo $item['uuid'];?>" class="more iframe">添加文献</a>
<a href="/author/literature/ac/add/uuid/<?php echo $item['uuid'];?>" class="more iframe">Add literature</a>
]
</li>
<?php endforeach;
echo "</ul>";
@ -73,12 +73,12 @@ function action(ac,uuid){
{window.location.reload();}
}
else{
$.colorbox({'innerWidth':'50%','html':'<img src="/images/alert_big_warning.png" /><h4>出现错误,请稍候再试</h4>'});
$.colorbox({'innerWidth':'50%','html':'<img src="/images/alert_big_warning.png" /><h4>Error ocupied, please retry.</h4>'});
}
},
'timeout': 30000,
'error': function(){
$.colorbox({'innerWidth':'50%','html':'<img src="/images/alert_big_error.png" /><h4>处理中出现错误,请刷新页面后重试</h4>'});
$.colorbox({'innerWidth':'50%','html':'<img src="/images/alert_big_error.png" /><h4>Error in process, please refresh current page.</h4>'});
}
});
}

View File

@ -1,20 +1,9 @@
<div class="sidebar-nav bs-review-nav">
<ul class="nav nav-list bs-review-sidenav">
<li id="Nav-author-index"><a href="/author/"><i class="icon-chevron-right"></i>介绍</a></li>
<li id="Nav-author-newdata"><a href="/author/newdata"><i class="icon-chevron-right"></i>新建数据</a></li>
<li id="Nav-author-apply"><a href="/author/apply"><i class="icon-chevron-right"></i>数据认证</a></li>
<li id="Nav-author-accept"><a href="/author/accept"><i class="icon-chevron-right"></i>我的数据</a></li>
<li id="Nav-author-inauthor"><a href="/author/inauthor"><i class="icon-chevron-right"></i>数据申请管理</a></li>
<li id="Nav-author-comment"><a href="/author/comment"><i class="icon-chevron-right"></i>数据反馈管理</a></li>
<li id="Nav-author-literature"><a href="/author/literature"><i class="icon-chevron-right"></i>数据文献管理</a></li>
<li id="Nav-author-document"><a href="/author/document"><i class="icon-chevron-right"></i>数据文档管理</a></li>
<li id="Nav-author-news"><a href="/author/news"><i class="icon-chevron-right"></i>数据新闻管理</a></li>
<li id="Nav-author-version"><a href="/author/version"><i class="icon-chevron-right"></i>数据版本管理</a></li>
<li id="Nav-author-fund"><a href="/author/fund/ac/data"><i class="icon-chevron-right"></i>支持项目</a></li>
<li id="Nav-author-doi"><a href="/author/doi"><i class="icon-chevron-right"></i>DOI</a></li>
<!--
<li><a href="/author/survey">数据调查</a></li>
<li><a href="/author/qa">数据QA</a></li> -->
<li id="Nav-author-statics"><a href="/author/statics"><i class="icon-chevron-right"></i>信息统计</a></li>
<li id="Nav-author-index"><a href="/author/"><i class="icon-chevron-right"></i>Introduce</a></li>
<li id="Nav-author-newdata"><a href="/author/newdata"><i class="icon-chevron-right"></i>Submit data</a></li>
<li id="Nav-author-accept"><a href="/author/accept"><i class="icon-chevron-right"></i>My datasets</a></li>
<li id="Nav-author-literature"><a href="/author/literature"><i class="icon-chevron-right"></i>Literatures</a></li>
<li id="Nav-author-version"><a href="/author/version"><i class="icon-chevron-right"></i>Versions</a></li>
</ul>
</div>

View File

@ -4,9 +4,9 @@ $this->headTitle($this->config->title->author);
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/author.css');
$this->theme->AppendPlus($this,'colorbox');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/author">数据作者</a>');
$this->breadcrumb('新建数据');
$this->breadcrumb('<a href="/">Home</a>');
$this->breadcrumb('<a href="/author">Author</a>');
$this->breadcrumb('Submit data');
$this->breadcrumb()->setSeparator(' > ');
?>
<div class="row">
@ -17,19 +17,19 @@ $this->breadcrumb()->setSeparator(' > ');
<div>
<ul class="nav nav-pills">
<li class=""><a href="/author/newdata">未提交数据列表</a></li>
<li class=""><a class="iframe" href="/service/geonetwork?url=metadata.xmlinsert.form">导入元数据</a></li>
<li class=""><a href="/author/newdata/ac/add-by-template">根据模板新建元数据</a></li>
<li class="active"><a href="/author/newdata/ac/add-by-data">根据已有数据新建元数据</a></li>
<li class=""><a href="/author/newdata">Unsubmitted</a></li>
<li class=""><a class="iframe" href="/service/geonetwork?url=metadata.xmlinsert.form">Import new metadata</a></li>
<li class=""><a href="/author/newdata/ac/add-by-template">Create new metadata with templates</a></li>
<li class="active"><a href="/author/newdata/ac/add-by-data">Create new metadata with existed metadata</a></li>
</ul>
</div>
<div>
<h2>根据已有数据创建元数据</h2>
<h2>Create new metadata with existed metadata</h2>
<div class="input-append">
<form id="datasearch" class="search_form" action="/author/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>
<button type="submit" class="btn" id="search_btn">Search</button>
</form>
</div>
<?php
@ -41,8 +41,8 @@ $this->breadcrumb()->setSeparator(' > ');
?>
<li class="well">
<h4><?php echo $item['title'];?></h4>
<p><a href="/service/geonetwork?url=metadata.create?group=2<?php echo urlencode('&id='.$item['gid']); ?>" target="_blank">以此为模板新建</a>
| <a href="/data/<?php echo $item['uuid'];?>" target="_blank">查看数据</a></p>
<p>[<a href="/service/geonetwork?url=metadata.create?group=2<?php echo urlencode('&id='.$item['gid']); ?>" target="_blank">Create new metadata based on this data</a>
| <a href="/data/<?php echo $item['uuid'];?>" target="_blank">View data</a>]</p>
<p><?php echo mb_strlen($item['description'])>400?$this->escape(mb_substr($item['description'],0,400,'UTF-8').'...'):$this->escape($item['description']); ?></p>
</li>
<?php

View File

@ -17,19 +17,19 @@ $this->breadcrumb()->setSeparator(' > ');
<div>
<ul class="nav nav-pills">
<li class=""><a href="/author/newdata">未提交数据列表</a></li>
<li class=""><a class="iframe" href="/service/geonetwork?url=metadata.xmlinsert.form">导入元数据</a></li>
<li class="active"><a href="/author/newdata/ac/add-by-template">根据模板新建元数据</a></li>
<li class=""><a href="/author/newdata/ac/add-by-data">根据已有数据新建元数据</a></li>
<li class=""><a href="/author/newdata">Unsubmitted</a></li>
<li class=""><a class="iframe" href="/service/geonetwork?url=metadata.xmlinsert.form">Import new metadata</a></li>
<li class="active"><a href="/author/newdata/ac/add-by-template">Create new metadata with templates</a></li>
<li class=""><a href="/author/newdata/ac/add-by-data">Create new metadata with existed metadata</a></li>
</ul>
</div>
<div>
<h3>根据预制元数据模板创建数据</h3>
<h3>Create new metadata with templates</h3>
<div class="input-append">
<form id="datasearch" class="search_form" action="/author/newdata/ac/add-by-template">
<input class="span2" type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>">
<button class="btn" type="submit">搜索</button>
<button class="btn" type="submit">Search</button>
</form>
</div>
<?php

View File

@ -4,9 +4,9 @@ $this->headTitle($this->config->title->author);
$this->headTitle()->setSeparator(' - ');
$this->theme->AppendPlus($this,'colorbox');
$this->headLink()->appendStylesheet('/css/author.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/">Home</a>');
$this->breadcrumb('<a href="/author">'.$this->config->title->author.'</a>');
$this->breadcrumb('新建数据');
$this->breadcrumb('Submit data');
$this->breadcrumb()->setSeparator(' > ');
?>
<div class="row">
@ -17,10 +17,10 @@ $this->breadcrumb()->setSeparator(' > ');
<div>
<ul class="nav nav-pills">
<li class="active"><a href="/author/newdata">未提交数据列表</a></li>
<li class=""><a class="iframe" href="/service/geonetwork?url=metadata.xmlinsert.form">导入元数据</a></li>
<li class=""><a href="/author/newdata/ac/add-by-template">根据模板新建元数据</a></li>
<li class=""><a href="/author/newdata/ac/add-by-data">根据已有数据新建元数据</a></li>
<li class="active"><a href="/author/newdata">Unsubmitted</a></li>
<li class=""><a class="iframe" href="/service/geonetwork?url=metadata.xmlinsert.form">Import new metadata</a></li>
<li class=""><a href="/author/newdata/ac/add-by-template">Create new metadata with templates</a></li>
<li class=""><a href="/author/newdata/ac/add-by-data">Create new metadata with existed metadata</a></li>
</ul>
</div>
@ -34,18 +34,18 @@ $this->breadcrumb()->setSeparator(' > ');
?>
<li class="well">
<h4><?php echo $item['title'];?></h4>
<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 href="javascript:;" onclick="getFtp('<?php echo $item['uuid'];?>')">FTP数据上传</a>
| <a onclick="$('#commit_submit').attr('onclick','commit(\'<?php echo $item['id'];?>\');');" href="#commitform" class="more inline">提交评审发布</a>
<a href="/service/geonetwork?url=metadata.show?id=<?php echo $item['id']; ?>" target="_blank">View in GeoNetwork</a>
| <a href="/service/geonetwork?url=metadata.edit?id=<?php echo $item['id']; ?>" target="_blank">Edit in GeoNetwork</a>
| <a href="/service/geonetwork?url=metadata.delete?id=<?php echo $item['id']; ?>" target="_blank">Delete</a>
| <a href="javascript:;" onclick="getFtp('<?php echo $item['uuid'];?>')">Upload data via FTP (get account)</a>
| <a onclick="$('#commit_submit').attr('onclick','commit(\'<?php echo $item['id'];?>\');');" href="#commitform" class="more inline">Submit for review</a>
</p>
</li>
<?php
endforeach;
echo "</ul>";
else :
echo "<p>您当前没有未提交的数据。</p>";
echo "<p>No unsubmitted data now.</p>";
endif; ?>
</div>
<div class="pagenavi"><?= $this->paginator; ?></div>
@ -68,12 +68,12 @@ function action(ac,id){
{$('#changelog').val('');$('#commit_submit').attr('onclick','');}
}
else{
$.colorbox({'innerWidth':'50%','html':'<img src="/images/alert_big_warning.png" /><h4>出现错误,请稍候再试</h4>'});
$.colorbox({'innerWidth':'50%','html':'<img src="/images/alert_big_warning.png" /><h4>Error occupied, please try again later</h4>'});
}
},
'timeout': 30000,
'error': function(){
$.colorbox({'innerWidth':'50%','html':'<img src="/images/alert_big_error.png" /><h4>处理中出现错误,请刷新页面后重试</h4>'});
$.colorbox({'innerWidth':'50%','html':'<img src="/images/alert_big_error.png" /><h4>Errors occupied in processing, please try again later.</h4>'});
}
});
}
@ -96,21 +96,21 @@ function getFtp(uuid){
{
if(data.statu > 0)
{
var html = '<p>临时FTP帐号信息<b>(此帐号仅对应当前数据集!)</b></p><p>ftp://ftp2.westgis.ac.cn/</p>'+
'<p>用户名:'+data.user+
'</p><p>密码:'+data.passwd+'</p>'
+'<p><a href="ftp://'+data.user+':'+data.passwd+'@ftp2.westgis.ac.cn/">或直接点击此链接</a></p>';
var html = '<p>Your FTP account<b>(just upload this data!)</b></p><p>ftp://ftp2.westgis.ac.cn/</p>'+
'<p>username:'+data.user+
'</p><p>password:'+data.passwd+'</p>'
+'<p><a href="ftp://'+data.user+':'+data.passwd+'@ftp2.westgis.ac.cn/">Direct connect</a></p>';
Alert(html);
}
}
}
else{
Alert('出现错误,请稍候再试</h4>');
Alert('errors</h4>');
}
},
'timeout': 30000,
'error': function(){
Alert('处理中出现错误,请刷新页面后重试</h4>');
Alert('errors</h4>');
}
});
}
@ -122,11 +122,11 @@ function Alert(html){
<div id="commitform">
<form>
<p>
<label>简要功能:</label><br />
<label>Introduction briefly:</label><br />
<textarea class="full" style="resize:none;height:200px;" id="changelog"></textarea>
<br /><small>请输入此数据的简要功能和特色</small>
<br /><small>Please describe the dataset briefly</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-green big" value="Submit"/>
</form>
</div>
<div class="error"><img src="/images/alert_big_error.png" /><span></span></div>

View File

@ -4,9 +4,9 @@ $this->headTitle($this->config->title->author);
$this->headTitle()->setSeparator(' - ');
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
$this->headLink()->appendStylesheet('/css/author.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/author">数据作者</a>');
$this->breadcrumb('数据版本管理');
$this->breadcrumb('<a href="/">Home</a>');
$this->breadcrumb('<a href="/author">Author</a>');
$this->breadcrumb('Versions');
$this->breadcrumb()->setSeparator(' > ');
?>
<div class="row">
@ -17,14 +17,14 @@ $this->breadcrumb()->setSeparator(' > ');
<div>
<ul class="nav nav-pills">
<li class=""><a href="/author/version/">所有版本概况</a></li>
<li class="active"><a href="/author/version/ac/bydata">逐数据浏览</a></li>
<li class=""><a href="/author/version/">All versions</a></li>
<li class="active"><a href="/author/version/ac/bydata">By dataset</a></li>
</ul>
</div>
<div class="input-append">
<form id="datasearch" class="search_form" action="/author/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>
<button type="submit" class="btn" id="search_btn">Search</button>
</form>
</div>
<div>
@ -36,7 +36,7 @@ $this->breadcrumb()->setSeparator(' > ');
$autoindex++;?>
<li class="well">
<p><a href="/data/<?php echo $item['uuid'];?>" target="_blank"><?php echo $item['title'];?></a></p>
<p>数据库中共有版本数:<?php echo $item['c'];?> (<a href="/author/version/uuid/<?php echo $item['uuid'];?>">查看详细</a>)</p>
<p>Versions: <?php echo $item['c'];?> (<a href="/author/version/uuid/<?php echo $item['uuid'];?>">Details</a>)</p>
</li>
<?php endforeach;
echo "</ul>";

View File

@ -6,9 +6,8 @@ $this->headScript()->appendFile('/js/diffview.js');
$this->headScript()->appendFile('/js/difflib.js');
$this->headLink()->appendStylesheet('/css/author.css');
$this->headLink()->appendStylesheet('/css/diffview.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/author">数据作者</a>');
$this->breadcrumb('查看数据作者');
$this->breadcrumb('<a href="/">Home</a>');
$this->breadcrumb('<a href="/author">Author</a>');
$this->breadcrumb()->setSeparator(' > ');
?>
<div class="row">
@ -19,8 +18,8 @@ $this->breadcrumb()->setSeparator(' > ');
<div>
<ul class="nav nav-pills">
<li><a href="/author/version">所有版本概况</a></li>
<li><a href="/author/version/ac/bydata">逐数据浏览</a></li>
<li><a href="/author/version">All versions</a></li>
<li><a href="/author/version/ac/bydata">By datasets</a></li>
</ul>
</div>
<?php

View File

@ -4,9 +4,9 @@ $this->headTitle($this->config->title->author);
$this->headTitle()->setSeparator(' - ');
$this->theme->AppendPlus($this,'colorbox');
$this->headLink()->appendStylesheet('/css/author.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/author">数据作者</a>');
$this->breadcrumb('数据版本管理');
$this->breadcrumb('<a href="/">Home</a>');
$this->breadcrumb('<a href="/author">Author</a>');
$this->breadcrumb('Versions');
$this->breadcrumb()->setSeparator(' > ');
?>
<div class="row">
@ -17,33 +17,33 @@ $this->breadcrumb()->setSeparator(' > ');
<div>
<ul class="nav nav-pills">
<li class="<?php if(!$this->mdtitle) echo "active";?>"><a class="" href="/author/version">所有版本概况</a></li>
<li class=""><a class="" href="/author/version/ac/bydata">逐数据浏览</a></li>
<li class="<?php if(!$this->mdtitle) echo "active";?>"><a class="" href="/author/version">All versions</a></li>
<li class=""><a class="" href="/author/version/ac/bydata">By datasets</a></li>
</ul>
</div>
<div>
<?php
if (count($this->paginator)):
if ($this->mdtitle) echo "<h2>元数据:".$this->mdtitle."</h2>";
if ($this->mdtitle) echo "<h2>Dataset: ".$this->mdtitle."</h2>";
echo '<ul class="unstyled">';
$autoindex=0;
foreach ($this->paginator as $item):
$autoindex++;?>
<li class="well" id="list_<?php echo $item['id'];?>">
<p><a href="/data/<?php echo $item['uuid'];?>" target="_blank"><?php echo $item['title'];?></a>
<a href="/author/version/uuid/<?php echo $item['uuid']; ?>">查看此数据所有版本</a></p>
<p>版本创建时间: <?php echo date("Y-m-d H:i",strtotime($item['ts_created']));?>
[<a href="/author/version/uuid/<?php echo $item['uuid']; ?>">All versions</a>]</p>
<p>Created: <?php echo date("Y-m-d H:i",strtotime($item['ts_created']));?>
<?php if ($item['userid']) :
echo "发布人: ".(empty($item['realname'])?$item['username']:$item['realname'])." 【";
echo "Releaser ".(empty($item['realname'])?$item['username']:$item['realname'])." 【";
else :
?>
<a onclick="return confirm('是否确定删除该版本?');" href="javascript:action('delete','<?php echo $item['id'];?>');" class="more">删除</a>
[<a onclick="return confirm('Sure to delete this version?');" href="javascript:action('delete','<?php echo $item['id'];?>');" class="more">Delete</a>
<?php endif; ?>
<a onclick="return confirm('是否确定将这个版本恢复到geonetwork');" href="javascript:action('restore','<?php echo $item['id'];?>');" class="more">恢复到geonetwork</a>
<a href="/author/version/ac/diff/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>
<a onclick="return confirm('Sure to restore this version to Geonetwork');" href="javascript:action('restore','<?php echo $item['id'];?>');" class="more">Restore to Geonetwork</a>
<a href="/author/version/ac/diff/id/<?php echo $item['id'];?>" class="more">Diff with previous version</a>
<a onclick="$('#commit_submit').attr('onclick','commit(\'<?php echo $item['id'];?>\');');" href="#commitform" class="more inline">Commit this version</a>
]</p>
<?php if ($item['changelog']) : ?>
<p><?php echo $item['changelog']; ?></p>
<?php endif; ?>
@ -91,9 +91,9 @@ function commit(id){
<div id="commitform">
<form>
<p>
<label>版本改动:</label><br />
<label>Changelog:</label><br />
<textarea class="input-block-level" style="resize:none;height:200px;" id="changelog"></textarea>
<br /><small>请输入此版本与之前版本的差别</small>
<br /><small>Please input the difference of the version</small>
</p>
<input type="button" onclick="" id="commit_submit" class="btn btn-green big" value="提交"/>
</form>

View File

@ -1,13 +1,10 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle('高级搜索');
$this->headTitle('Advance Search');
if (!empty($this->codename)) $this->headTitle($this->codename);
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/metadata.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/data">'.$this->config->title->data.'</a>');
$this->breadcrumb('高级搜索');
//$this->headLink()->appendStylesheet('/css/metadata.css');
$this->breadcrumb()->setSeparator(' > ');
$this->theme->AppendPlus($this,'google_map_v3');
$this->theme->AppendPlus($this,'google_map_keydragzone');
@ -37,13 +34,13 @@ foreach($this->metadata as $md) : ?>
<div class="span8" id="map_canvas" style="height:500px;"></div>
<div class="span4">
<form id="search" enctype="application/x-www-form-urlencoded" action="/search" method="get">
<fieldset><legend>时间范围</legend>
<fieldset><legend>Temporal Range</legend>
<label>
开始时间
Star
<input name="begin" type="text" id="begin" />
</label>
<label>
结束时间
End
<input name="end" type="text" id="end" />
</label>
</fieldset>

View File

@ -1,17 +1,17 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle('数据作者浏览');
$this->headTitle('By Author');
$this->headTitle()->setSeparator(' - ');
$this->nav[] = array('link'=>"/data/author",'title'=>'数据作者浏览');
$this->nav[] = array('link'=>"/data/author",'title'=>'By Author');
$this->theme->AppendPlus($this,'colorbox');
?>
<div class='row-fluid'>
<?= $this->render('breadcrumbs.phtml') ?>
<?= $this->partial('data/tools.phtml'); ?>
<ul class="nav nav-tabs">
<li id="Nav-author-unverified"><a href="/data/author">未认证的数据作者<?php if ($this->author && $this->ac=='unverified') echo ''.$this->author['username']; ?></a></li>
<li id="Nav-author-verified"><a href="/data/author/ac/verified">已认证的数据作者<?php if ($this->author && $this->ac=='verified') echo ''.$this->author['username'].'['.$this->author['realname'].']'; ?></a></li>
<li id="Nav-author-unverified"><a href="/data/author">Unverified Author<?php if ($this->author && $this->ac=='unverified') echo ''.$this->author['username']; ?></a></li>
<li id="Nav-author-verified"><a href="/data/author/ac/verified">Verified author<?php if ($this->author && $this->ac=='verified') echo ''.$this->author['username'].'['.$this->author['realname'].']'; ?></a></li>
</ul>
</div>
<?php if ($this->author) : ?>

View File

@ -1,10 +1,10 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle('全部浏览');
$this->headTitle('Browse');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/metadata.css');
$this->nav[] = array('link'=>"/data/browse",'title'=>'全部浏览');
$this->nav[] = array('link'=>"/data/browse",'title'=>'Browse');
$this->theme->AppendPlus($this,'colorbox');
?>
<div class="row-fluid">

View File

@ -1,21 +1,21 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle('分类浏览');
$this->headTitle('By Categories');
if (!empty($this->codename)) $this->headTitle($this->codename);
$this->headTitle()->setSeparator(' - ');
$this->nav[] = array('link'=>"/data/category",'title'=>'分类浏览');
$this->nav[] = array('link'=>"/data/category",'title'=>'By Categories');
?>
<div class="row-fluid">
<?= $this->render('breadcrumbs.phtml'); ?>
<?= $this->partial('data/tools.phtml'); ?>
</div>
<div class="row-fluid">
<h4>数据集类别</h4>
<h4>ISO 19115 Categories</h4>
<ul class="nav nav-pills">
<?php foreach($this->category as $cg) : ?>
<li <?php if (!empty($this->metadata)) : if($cg['name'] == $this->codename || $cg['name_zh'] == $this->codename ){?> class="active" <?php } endif; ?>>
<a href='/data/category/code/<?php echo $cg['code']; ?>'><?php (empty($cg['name_zh']))?print($cg['name']):print($cg['name_zh']); ?>
<li <?php if (!empty($this->metadata)) : if($cg['name'] == $this->codename || $cg['name'] == $this->codename ){?> class="active" <?php } endif; ?>>
<a href='/data/category/code/<?php echo $cg['code']; ?>'><?php print($cg['name']); ?>
<span class="note">(<?php echo $cg['count']; ?>)</span></a></li>
<?php endforeach; ?>
</ul>
@ -23,7 +23,7 @@ $this->nav[] = array('link'=>"/data/category",'title'=>'分类浏览');
<div class="row-fluid">
<?php if (!empty($this->metadata)) : ?>
<div id='metacontent'>
<h4>当前浏览<?php echo $this->codename; ?></h4>
<h4>Current<?php echo $this->codename; ?></h4>
<?php echo $this->page->getNavigation(); ?>
<hr />
<?php foreach($this->metadata as $md) : ?>

View File

@ -1,20 +1,20 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle('DOI浏览');
$this->headTitle('By DOI');
$this->headTitle()->setSeparator(' - ');
$this->nav[] = array('link'=>"/data/doi",'title'=>'DOI浏览');
$this->nav[] = array('link'=>"/data/doi",'title'=>'By DOI');
$this->theme->AppendPlus($this,'colorbox');
?>
<div class='row-fluid'>
<?= $this->render('breadcrumbs.phtml') ?>
<?= $this->partial('data/tools.phtml'); ?>
<ul class="nav nav-tabs">
<li id="Nav-doi-publish"><a href="/data/doi">已发布DOI的数据</a></li>
<li id="Nav-doi-submit"><a href="/data/doi/ac/submit">已提交DOI申请的数据</a></li>
<li id="Nav-doi-unsubmit"><a href="/data/doi/ac/unsubmit">未提交DOI申请的数据</a></li>
<li id="Nav-doi-prepare"><a href="/data/doi/ac/prepare">准备申请DOI的数据</a></li>
<li id="Nav-doi-unready"><a href="/data/doi/ac/unready">无DOI的数据</a></li>
<li id="Nav-doi-publish"><a href="/data/doi">Published DOI</a></li>
<li id="Nav-doi-submit"><a href="/data/doi/ac/submit">Submitted DOI</a></li>
<li id="Nav-doi-unsubmit"><a href="/data/doi/ac/unsubmit">Unsubmitted DOI</a></li>
<li id="Nav-doi-prepare"><a href="/data/doi/ac/prepare">Prepared for DOI</a></li>
<li id="Nav-doi-unready"><a href="/data/doi/ac/unready">No DOI</a></li>
</ul>
</div>
<?php if (!empty($this->paginator)) : ?>
@ -28,10 +28,10 @@ $this->theme->AppendPlus($this,'colorbox');
<h4 class="media-heading"><a href="/data/<?php echo $md['uuid'];?>"><?php echo $this->escape($md['title']);?></a></h4>
<?php if (@$md['datadoi']) : ?>
<h4 class="media-heading">DOI:<?php echo $md['datadoi'];?>
<?php if (@$md['ts_submitted']) : ?> <span class="label label-info">申请日期:<?php echo $md['ts_submitted'];?></span>
<?php else: if (@$md['ts_created']) : ?> <span class="label label-info">创建日期:<?php echo $md['ts_created'];?></span> <?php endif; ?>
<?php if (@$md['ts_submitted']) : ?> <span class="label label-info">Submitted Date: <?php echo $md['ts_submitted'];?></span>
<?php else: if (@$md['ts_created']) : ?> <span class="label label-info">Created Date: <?php echo $md['ts_created'];?></span> <?php endif; ?>
<?php endif; ?>
<?php if (@$md['ts_published']) : ?> <span class="label label-success">发布日期:<?php echo $md['ts_published'];?></span><?php endif; ?>
<?php if (@$md['ts_published']) : ?> <span class="label label-success">Published Date: <?php echo $md['ts_published'];?></span><?php endif; ?>
</h4>
<?php else: if (@$md['doi']): ?>
<h4 class="media-heading">DOI:<?php echo $md['doi']; ?></h4>
@ -44,7 +44,7 @@ $this->theme->AppendPlus($this,'colorbox');
<?php endforeach; ?>
<div class="pagenavi"><?= $this->paginator; ?></div>
<?php else : ?>
暂无对应信息。
No metadata.
<?php endif; ?>
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){

View File

@ -1,11 +1,11 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle('下载');
$this->headTitle('Download');
$this->headTitle()->setSeparator(' - ');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/">Home</a>');
$this->breadcrumb('<a href="/data">'.$this->config->title->data.'</a>');
$this->breadcrumb('下载');
$this->breadcrumb('Download');
$this->breadcrumb()->setSeparator(' > ');
?>
<div class="row">
@ -16,7 +16,7 @@
</div><!--/span-->
<div class="span9">
<h1><?php echo $this->md['title']; ?>(<?php echo $this->md['filesize']; ?>MB)</h1>
<fieldset><legend>FTP下载地址</legend>
<fieldset><legend>FTP URL</legend>
<ul>
<?php if ($this->ftpurl) : ?>
<li><a href="<?php echo $this->ftpurl; ?>"><?php echo $this->ftpurl; ?></a></li>
@ -24,17 +24,11 @@
</ul>
</fieldset>
<fieldset><legend>FTP使用说明</legend>
帐号信息如下:<ul><li>FTP的用户名<?php echo $this->username; ?></li>
<li>FTP的密码<?php echo $this->userpass; ?></li>
<li>密码有效期限<?php echo $this->ftptime; ?></li>
<fieldset><legend>FTP Usage</legend>
Your FTP account: <ul><li>Username: <?php echo $this->username; ?></li>
<li>Password<?php echo $this->userpass; ?></li>
<li>Active Time<?php echo $this->ftptime; ?></li>
</ul>
<?php if ($this->md['host']=='ftp.westgis.ac.cn') : ?>
<p class="text-error">请注意此FTP需要在登陆后手工输入目录地址</p>
<?php endif; ?>
<p>FTP是一种常用的文件传输协议西部数据中心推荐您使用使用开源的<a href="http://filezilla-project.org">FileZilla</a>软件来进行数据下载您也可以使用您自己喜欢的FTP客户端来进行数据下载。</p>
<p>在使用FTP中遇到问题可以参考<a href="/archives/news/localnews/archive-7.html">数据的FTP下载问题</a></p>
<img src="/images/filezilla-westdc.png" alt="以FileZilla演示如何下载数据" />
</fieldset>
</div>
</div>

View File

@ -1,9 +1,9 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle('支持项目');
$this->headTitle('Funding');
$this->headTitle()->setSeparator(' - ');
$this->nav[] = array('link'=>"/data/fund",'title'=>'支持项目浏览');
$this->nav[] = array('link'=>"/data/fund",'title'=>'Funding');
?>
<div class='row-fluid'>
<?= $this->render('breadcrumbs.phtml') ?>
@ -14,10 +14,10 @@ $this->nav[] = array('link'=>"/data/fund",'title'=>'支持项目浏览');
<div class="pagenavi"><?= $this->paginator; ?></div>
<?php foreach($this->paginator as $md) : ?>
<div class="well">
<h4><a href="/data/fund/id/<?php echo $md['id'];?>"><?php echo $this->escape($md['title']);?></a></h4>
编号:<?php echo $md['fund_id']; ?> | 类型:<?php echo $md['fund_type']; ?> | 提供数据集:<?php echo $md['datacount']; ?>条,<?php echo $md['filesize']>5000?(round($md['filesize']/1024,2)).'GB':$md['filesize'].'MB'; ?></div>
<h4><a href="/data/fund/id/<?php echo $md['id'];?>"><?php echo $this->escape($md['title_en']);?></a></h4>
<?php echo trim($md['fund_type_en'],'"'); ?> (<a href="/data/fund/id/<?php echo $md['id'];?>">No: <?php echo $md['fund_id']; ?></a>), has <?php echo $md['datacount']; ?> datasets, volume <?php echo $md['filesize']>5000?(round($md['filesize']/1024,2)).'GB':$md['filesize'].'MB'; ?></div>
<?php endforeach; ?>
<div class="pagenavi"><?= $this->paginator; ?></div>
<?php else : ?>
暂无对应信息。
No metadata.
<?php endif; ?>

View File

@ -1,9 +1,9 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle('支持项目');
$this->headTitle('Funding');
$this->headTitle()->setSeparator(' - ');
$this->nav[] = array('link'=>"/data/fund",'title'=>'支持项目浏览');
$this->nav[] = array('link'=>"/data/fund",'title'=>'By Fund');
$this->theme->AppendPlus($this,'colorbox');
?>
<div class='row-fluid'>
@ -11,8 +11,8 @@ $this->theme->AppendPlus($this,'colorbox');
<?= $this->partial('data/tools.phtml'); ?>
</div>
<div class="well">
<h4><a href="/data/fund/id/<?php echo $this->fund['id'];?>"><?php echo $this->escape($this->fund['title']);?></a></h4>
编号:<?php echo $this->fund['fund_id']; ?> | 类型:<?php echo $this->fund['fund_type']; ?>
<h4><a href="/data/fund/id/<?php echo $this->fund['id'];?>"><?php echo $this->escape($this->fund['title_en']);?></a></h4>
<?php echo trim($this->fund['fund_type_en'],'"'); ?> (<a href="/data/fund/id/<?php echo $this->fund['id'];?>">No: <?php echo $this->fund['fund_id']; ?></a>)
</div>
<?php if (!empty($this->paginator)) : ?>
<hr />
@ -30,7 +30,7 @@ $this->theme->AppendPlus($this,'colorbox');
<?php endforeach; ?>
<div class="pagenavi"><?= $this->paginator; ?></div>
<?php else : ?>
暂无对应信息。
No information.
<?php endif; ?>
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){

View File

@ -2,147 +2,96 @@
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle()->setSeparator(' - ');
?>
<style>
.fieldlist ul li{line-height:24px;padding:5px;}
.fieldlist ul li:hover{color:#FFF;background:#0088CC;border-radius: 6px 6px 6px 6px;}
.fieldlist ul li:hover a{color:#FFF; text-decoration:none;}
.news_list ul li{line-height:24px;}
</style>
?>
<div class="row">
<div class="span12">
<h4><i class="icon-folder-open"></i>专题数据集</h4>
<a class="btn btn-info" href="/heihe/"><i class="icon-folder-open"></i>黑河计划</a>
<a class="btn btn-info" href="/hiwater"><i class="icon-folder-open"></i>黑河生态水文遥感试验(HiWATER)</a>
<a class="btn btn-info" href="/water"><i class="icon-folder-open"></i>黑河综合遥感联合试验(WATER)</a>
<a class="btn btn-info" href="/haihe"><i class="icon-folder-open"></i>海河流域多尺度地表通量与气象要素观测</a>
<a class="btn btn-info" href="/yrnmr"><i class="icon-folder-open"></i>黄河上游宁蒙河段</a>
<a class="btn btn-info disabled" href="/glacier"><i class="icon-folder-open"></i>中国冰川资源及其变化调查</a>
</div>
<div class="span12">
<h4><i class="icon-flag"></i>特色导航</h4>
<h4><i class="icon-flag"></i>Datasets Navigator</h4>
<form method="get" action="/search" id="search" class="form-search">
<div class="input-append">
<input type="text" value="" id="q" name="q" class="span2 search-query" placeholder="全文搜索">
<button type="submit" class="btn"><i class="icon-search"></i>搜索</button>
<input type="text" value="" id="q" name="q" class="span2 search-query" placeholder="Full Text Search">
<button type="submit" class="btn"><i class="icon-search"></i>Search</button>
</div>
<a class="btn" href="/search/advance"><i class="icon-search"></i>高级搜索</a>
<a class="btn" href="/data/browse"><i class="icon-reorder"></i>数据列表浏览</a>
<a class="btn" href="/data/onlinelist"><i class="icon-th"></i>在线数据清单</a>
<a class="btn" href="/data/offlinelist"><i class="icon-th"></i>离线数据清单</a>
<a class="btn" href="/search/advance"><i class="icon-search"></i>Advance Search</a>
<a class="btn" href="/data/browse"><i class="icon-reorder"></i>Browse</a>
<a class="btn" href="/data/onlinelist"><i class="icon-th"></i>Online List</a>
<a class="btn" href="/data/offlinelist"><i class="icon-th"></i>Offline List</a>
<a class="btn" href="/data/map"><i class="icon-globe"></i>Extend Map</a>
<a class="btn" href="/data/timeline"><i class="icon-calendar"></i>Timeline</a>
<a class="btn" href="/data/timemap"><i class="icon-film"></i>TimeMap</a>
</form>
<ul class="unstyled inline">
<li><a class="btn" href="/data/thumb"><i class="icon-picture"></i>缩略图浏览</a></li>
<li><a class="btn" href="/data/timeline"><i class="icon-calendar"></i>时间轴浏览</a></li>
<li><a class="btn" href="/data/extent"><i class="icon-globe"></i>空间浏览</a></li>
<li><a class="btn" href="/data/timemap"><i class="icon-film"></i>时空浏览</a></li>
<li><a class="btn" href="/data/organization"><i class="icon-filter"></i>单位浏览</a></li>
<li><a class="btn" href="/data/fund"><i class="icon-money"></i>项目浏览</a></li>
<li><a class="btn" href="/data/author"><i class="icon-user-md"></i>作者浏览</a></li>
<li><a class="btn" href="/knowledge"><i class="icon-exchange"></i>文献浏览</a></li>
<li><a class="btn" href="/data/doi"><i class="icon-paper-clip"></i>DOI浏览</a></li>
<li><a class="btn" href="/data/thumb"><i class="icon-picture"></i>Thumbnail</a></li>
<li><a class="btn" href="/data/organization"><i class="icon-filter"></i>By Organization</a></li>
<li><a class="btn" href="/data/fund"><i class="icon-money"></i>By Fund</a></li>
<li><a class="btn" href="/data/author"><i class="icon-user-md"></i>By Author</a></li>
<li><a class="btn" href="/data/doi"><i class="icon-paper-clip"></i>By DOI</a></li>
<li><a class="btn" href="/data/category"><i class="icon-th-large"></i>By ISO 19115 Categories</a></li>
<li><a class="btn" href="/data/series"><i class="icon-signal"></i>By Series</a></li>
</ul>
</div>
<div class="span12">
<h4><i class="icon-folder-open"></i>Data Collections</h4>
<div class="span5 well well-small">
<h4>Watershed Allied Telemetry Experimental Research (WATER)</h4>
<img src="/images/WATER-256.png" class="img-circle pull-right" width=128/>
<p>WATER is an airborne, satellite- and ground-based integrated remote sensing experiment aiming to improve the observing ability of remote sensing technique, and understanding and predictability of hydrological and related ecological processes on catchment scale.</p>
<p><a class="btn btn-info" href="/water"><i class="icon-folder-open"></i>WATER</a></p>
</div>
<div class="span5 well well-small">
<h4>Heihe Watershed Allied Telemetry Experimental Research (HiWATER)</h4>
<img src="/images/hiwater-256.png" class="img-circle pull-right" width=128/>
<p>HiWATER is an eco-hydrological experiment designed from an interdisciplinary perspective to addresses problems including heterogeneity, scaling, uncertainty, and closing water cycle at the watershed scale. HiWATER was formally initialized in May 2012 and will last four years until 2015.</p>
<p><a class="btn btn-info" href="/hiwater"><i class="icon-folder-open"></i>HiWATER</a></p>
</div>
</div>
<?php
$keytypezh=array('place'=>'地点关键词','theme'=>'主题关键词','discipline'=>'学科关键词','stratum'=>'地层关键词','temporal'=>'时间关键词');
$keytypezh=array('place'=>'Place Keywords','theme'=>'Theme Keywords','discipline'=>'Discipline Keywords','stratum'=>'Stratum Keywords','temporal'=>'Temporal Keywords');
$type='theme';
?>
<div class="span6">
<div class="span12">
<h4><a href="/data/tag/keytype/theme"><i class="icon-tags"></i><?php echo $keytypezh[$type]; ?></a></h4>
<ul class="unstyled inline">
<?php foreach($this->keywords[$type] as $cg) : ?>
<li><a href='/data/tag/<?php echo $cg['keyword']; ?>'><i class="icon-tag"></i><?php echo $cg['keyword']; ?></a><span class="note">(<?php echo $cg['count']; ?>)</span></li>
<?php endforeach; ?>
</ul>
</div>
<?php
$type='discipline';
?>
<div class="span6">
<h4><a href="/data/tag/keytype/discipline"><i class="icon-tags"></i><?php echo $keytypezh[$type]; ?></a></h4>
<ul class="unstyled inline">
<?php foreach($this->keywords[$type] as $cg) : ?>
<li><a href='/data/tag/<?php echo $cg['keyword']; ?>'><i class="icon-tag"></i><?php echo $cg['keyword']; ?></a><span class="note">(<?php echo $cg['count']; ?>)</span></li>
<li><a href='/data/tag/key/<?php echo urlencode($cg['keyword']); ?>'><i class="icon-tag"></i><?php echo $cg['keyword']; ?></a><span class="note">(<?php echo $cg['count']; ?>)</span></li>
<?php endforeach; ?>
</ul>
</div>
</div>
<div class="row">
<?php
$type='place';
?>
<div class="span6">
<div class="span12">
<h4><a href="/data/tag/keytype/place"><i class="icon-tags"></i><?php echo $keytypezh[$type]; ?></a></h4>
<ul class="unstyled inline">
<?php foreach($this->keywords[$type] as $cg) : ?>
<li><a href='/data/tag/<?php echo $cg['keyword']; ?>'><i class="icon-tag"></i><?php echo $cg['keyword']; ?></a><span class="note">(<?php echo $cg['count']; ?>)</span></li>
<li><a href='/data/tag/<?php echo urlencode($cg['keyword']); ?>'><i class="icon-tag"></i><?php echo $cg['keyword']; ?></a><span class="note">(<?php echo $cg['count']; ?>)</span></li>
<?php endforeach; ?>
</ul>
</div>
<?php
$type='temporal';
?>
<div class="span6">
<div class="span12">
<h4><a href="/data/tag/keytype/temporal"><i class="icon-tags"></i><?php echo $keytypezh[$type]; ?></a></h4>
<ul class="unstyled inline">
<?php foreach($this->keywords[$type] as $cg) : ?>
<li><a href='/data/tag/<?php echo $cg['keyword']; ?>'><i class="icon-tag"></i><?php echo $cg['keyword']; ?></a><span class="note">(<?php echo $cg['count']; ?>)</span></li>
<li><a href='/data/tag/<?php echo urlencode($cg['keyword']); ?>'><i class="icon-tag"></i><?php echo $cg['keyword']; ?></a><span class="note">(<?php echo $cg['count']; ?>)</span></li>
<?php endforeach; ?>
</ul>
</div>
</div>
<div class="row">
<div class="span6">
<h4><img src="/images/dbs.png" align="absmiddle" />数据导航</h4>
<div class="fieldlist">
<fieldset><legend><a href="/data/category">数据集类别</a></legend>
<ul class="unstyled inline">
<?php foreach($this->category as $cg) : ?>
<li><a href='/data/category/code/<?php echo $cg['code']; ?>'><i class="icon-th-large"></i><?php (empty($cg['name_zh']))?print($cg['name']):print($cg['name_zh']); ?></a><span class="note">(<?php echo $cg['count']; ?>)</span></li>
<?php endforeach; ?>
</ul></fieldset>
</div>
<div class="fieldlist">
<?php if ($this->serie) : ?>
<div id='series' class="fieldlist">
<fieldset><legend><a href="/data/series">数据集序列</a></legend>
<ul class="unstyled inline">
<?php foreach($this->serie as $cg) : ?>
<li><a href='/data/series/<?php echo $cg['id']; ?>'><i class="icon-list-ol"></i><?php echo $cg['name']; ?></a><span class="note">(<?php echo $cg['count']; ?>)</span></li>
<?php endforeach; ?>
</ul></fieldset>
</div>
<?php endif; ?>
</div>
</div><!-- /left -->
<div class="span6">
<div class="news_list">
<h4><img src="/images/dbs.png" align="absmiddle" />数据最近更新<a href="/data/feed" target="_blank"><img src="images/rss.png"></a></h4>
<div class="span12">
<h4><img src="/images/dbs.png" align="absmiddle" /><a href="/data/browse">Latest Updates</a><a href="/data/feed" target="_blank"><img src="images/rss.png"></a></h4>
<ul class="unstyled">
<?php foreach($this->metadata as $md) : ?>
<li><img src="/images/westdc_20w.gif" /> <a href="/data/<?php echo $md['uuid'];?>"><?php echo $this->escape($md['title']);?></a> </li>
<?php endforeach; ?>
<li class="more"><a href="/data/browse" class="pull-right">更多</a></li>
</ul>
</div>
<div>
<h4><img src="/images/Project24x24_24-bit.png" align="absmiddle" />&nbsp;数据服务</h4>
<div class="items">
<div class="item">
<ul class="unstyled">
<li>-&nbsp;&nbsp;&nbsp;<a href="/data/offlineapp">离线数据服务记录最近20个</a></li>
<li>-&nbsp;&nbsp;&nbsp;<a href="/data/request">如何从西部数据中心申请数据</a></li>
<li>-&nbsp;&nbsp;&nbsp;<a href="/data/submit">如何在西部数据中心发布数据</a></li>
</ul>
</div>
</div>
</div>
</div><!-- /right -->
</div>

View File

@ -1,10 +1,10 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle("空间浏览");
$this->headTitle("Extent Map Browse");
$this->headTitle()->setSeparator(' - ');
$this->theme->AppendPlus($this,'tianditu');
$this->nav[] = array('link'=>"/data/map",'title'=>'空间导航');
$this->nav[] = array('link'=>"/data/map",'title'=>'Extent Map Browse');
?>
<style type="text/css">
#data_canvas .well {background:#FFF;}
@ -19,18 +19,18 @@ $this->nav[] = array('link'=>"/data/map",'title'=>'空间导航');
<button type="button" class="btn" onclick="mapmethods.action(map,1);">搜索</button>
</div>
</form>
<h4>将地图中范围调整至要搜索数据的范围,然后点击“搜索数据”按钮查看当前范围的所有数据</h4>
<h4>Zoom the map to an extent, then click "Search Data" to view the data that locate in the current map extent.</h4>
</div>
<hr />
<div class="row-fluid">
<div class="span6">
<div><button class="btn btn-large btn-block" type="button" id="searchbtn" onclick="mapmethods.action(map,1);">查看数据</button></div>
<div><button class="btn btn-large btn-block" type="button" id="searchbtn" onclick="mapmethods.action(map,1);">View data</button></div>
<hr />
<div id="map_canvas" style="height:500px;">
</div>
</div>
<div class="span6">
<div><button class="btn btn-large btn-block" type="button" onclick="$('#data_canvas').html('');">清除列表</button></div>
<div><button class="btn btn-large btn-block" type="button" onclick="$('#data_canvas').html('');">Clear list</button></div>
<hr />
<div class="well well-small" style="height:500px;overflow-y:scroll;">
<ul id="data_canvas" class="unstyled">
@ -97,7 +97,7 @@ var mapmethods = {
},
action : function(map,ajax){
range = mapmethods.getbounds(map);
$('#searchbtn').html("搜索数据:(" + range['east'] + "," + range['north'] + ") to (" + range['west'] + "," + range['south'] + ")");
$('#searchbtn').html("Search Data: (" + range['east'] + "," + range['north'] + ") to (" + range['west'] + "," + range['south'] + ")");
if(ajax == 1)
mapmethods.ajax(range);
//return range;
@ -131,12 +131,12 @@ var mapmethods = {
mapmethods.list(data);
}
else{
alert('此区域无数据');
alert('No data in current extent');
}
},
'timeout': 15000,
'error': function(){
alert('处理中出现错误,请刷新页面后重试');
alert('Errors found!');
},
'beforeSend':function(){
btn.attr('onclick','');
@ -158,8 +158,8 @@ var mapmethods = {
html += '<li class="well well-small">'
+ '<p><a href="/data/'+data[i].uuid+'">'+data[i].title+'</a></p>'
+ '<div class="input-append">'
+ '<a class="btn" href="javascript:void(0);" onclick="setRectangle('+data[i].east+','+data[i].west+','+data[i].south+','+data[i].north+')" title="在地图上查看数据范围"><i class="icon-eye-open"></i></a>'
+ '<a class="btn" href="/data/'+data[i].uuid+'" title="查看数据信息"><i class="icon-search"></i></a>'
+ '<a class="btn" href="javascript:void(0);" onclick="setRectangle('+data[i].east+','+data[i].west+','+data[i].south+','+data[i].north+')" title="View the extent of data"><i class="icon-eye-open"></i></a>'
+ '<a class="btn" href="/data/'+data[i].uuid+'" title="View Data"><i class="icon-search"></i></a>'
+ '</div>'
+ '</li>';
}

View File

@ -1,16 +1,16 @@
<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>
<h3 id="myModalLabel">Upload your application(pdf)</h3>
</div>
<div class="modal-body">
<form id="application-form">
<div id="fsUploadProgress">允许上传20M以内的 PDF 文件</div>
<div id="fsUploadProgress">Please make sure your pdf is less than 20M.</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" data-dismiss="modal" aria-hidden="true">Cancel</button>
</div>
</div>
<script>

View File

@ -1,11 +1,11 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle('离线数据浏览');
$this->headTitle('Offline Data Browse');
$this->headTitle($this->codename);
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/metadata.css');
$this->nav[] = array('link'=>"/data/offline",'title'=>'离线数据浏览');
$this->nav[] = array('link'=>"/data/offline",'title'=>'Offline Data Browse');
?>
<div class="row-fluid">
<?= $this->render('breadcrumbs.phtml'); ?>

View File

@ -1,6 +1,6 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('我的账户');
$this->headTitle('My account');
$this->headTitle()->setSeparator(' - ');
$this->theme->AppendPlus($this,'jquery');
$this->theme->AppendPlus($this,'colorbox');
@ -12,7 +12,7 @@
</div><!--/.well -->
</div><!--/span-->
<div class="span9">
<h3>在线数据下载申请</h3>
<h3>Online data Download</h3>
<hr />
<?php if(!empty($this->msg)) { ?>
<?php if(!empty($this->jump_url)) {?>
@ -21,7 +21,7 @@
<?php echo $this->msg ?>
</div>
<?php if(!empty($this->jump_url)) { ?>
<br /><a href="<?= $this->jump_url ?>">如果页面没有自动跳转请点击这里</a>
<br /><a href="<?= $this->jump_url ?>">Please click this url if your browser is not support auto jump.</a>
<script language="javascript">setTimeout("self.location='<?php echo $this->jump_url ?>'",3000);</script>
<?php } ?>
<?php } ?>
@ -40,43 +40,46 @@
<?php } ?>
<form action="/data/todownload/" method="post" class="form-horizontal">
<div class="control-group ">
<label class="control-label">真实姓名</label>
<label class="control-label">Real Name</label>
<div class="controls">
<input type="text" name="realname" value="<?php echo empty($this->info['realname']) ? "":$this->info['realname']; ?>" />
</div>
</div>
<div class="control-group ">
<label class="control-label">工作单位</label>
<label class="control-label">Company/Organization</label>
<div class="controls">
<input class="input-block-level" type="text" name="unit" value="<?php echo empty($this->info['unit']) ? "":$this->info['unit']; ?>" />
</div>
</div>
<!--
<div class="control-group ">
<label class="control-label">联系地址</label>
<label class="control-label">Address</label>
<div class="controls">
<input class="input-block-level" type="text" name="address" value="<?php echo empty($this->info['address']) ? "":$this->info['address']; ?>" />
</div>
</div>
<div class="control-group ">
<label class="control-label">联系电话</label>
<label class="control-label">Phone</label>
<div class="controls">
<input type="text" name="phone" value="<?php echo empty($this->info['phone']) ? "":$this->info['phone']; ?>" />
</div>
</div>
<div class="control-group ">
<label class="control-label">邮编</label>
<label class="control-label">Postcode</label>
<div class="controls">
<input type="text" name="postcode" value="<?php echo empty($this->info['postcode']) ? "":$this->info['postcode']; ?>" />
</div>
</div>
-->
<div class="control-group ">
<label class="control-label">电子邮箱</label>
<label class="control-label">Email</label>
<div class="controls">
<input type="email" name="email" value="<?php echo empty($this->info['email']) ? "":$this->info['email']; ?>" required />
</div>
</div>
<!--
<div class="control-group ">
<label class="control-label">项目类型</label>
<label class="control-label">Fund</label>
<div class="controls">
<select id="project_type" name="project_type">
<?php if(!empty($this->projectType)) { ?>
@ -100,51 +103,35 @@
</div>
</div>
<div class="control-group ">
<label class="control-label">项目编号</label>
<label class="control-label">Fund number</label>
<div class="controls">
<input type="text" name="project_id" value="<?php echo empty($this->info['project_id']) ? "":$this->info['project_id']; ?>" />
</div>
</div>
<div class="control-group ">
<label class="control-label">项目名称</label>
<label class="control-label">Fund title</label>
<div class="controls">
<input class="input-block-level" type="text" name="project_title" value="<?php echo empty($this->info['project_title']) ? "":$this->info['project_title']; ?>" />
</div>
</div>
<div class="control-group ">
<label class="control-label">项目负责人</label>
<label class="control-label">Fund PI</label>
<div class="controls">
<input class="input-block-level" type="text" name="project_leader" value="<?php echo empty($this->info['project_leader']) ? "":$this->info['project_leader']; ?>" />
</div>
</div>
-->
<div class="control-group ">
<label class="control-label">数据用途</label>
<label class="control-label">Data Usage</label>
<div class="controls">
<textarea name="project" rows="3" class="input-block-level"><?php echo empty($this->info['project']) ? "":$this->info['project']; ?></textarea>
</div>
</div>
<div class="control-group ">
<label class="control-label">填写说明</label>
<div class="controls">
请您填写完整的数据用途信息,包括项目类型、编号、题目、负责人等信息;若仅用于论文写作,请告知研究题目或主要内容,并注明导师姓名;其他用途如实注明即可。清晰明确的数据用途有助于我们更快得审核和通过申请,也会使您更快获得数据!
<br />
<br />
例一:<br />
项目类型973<br />
项目名称:飞行终端区复杂场景建模的理论与方法子课题:基于多源遥感影像的目标和场景三维重建研究<br />
项目编号2010CB731801<br />
项目负责人:邵振峰<br />
使用目的:用于模拟基于多源遥感影像的目标和场景<br />
<br />
例二:<br />
硕士毕业论文:《全波形激光雷达数据处理研究》,导师:李传荣研究员。<br />
</div>
</div>
<div class="form-actions">
<input type="hidden" name="uuid" value="<?= $this->uuid ?>" />
<input type="hidden" name="submit" value="submit" />
<button type="submit" class="btn btn-primary">确定</button>
<a class="btn" href="/data/<?= $this->uuid ?>">取消</a>
<button type="submit" class="btn btn-primary">Submit</button>
<a class="btn" href="/data/<?= $this->uuid ?>">Cancel</a>
</div>
</form>
<?php }?>

View File

@ -1,11 +1,11 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle('在线数据浏览');
$this->headTitle('Online Data Browse');
$this->headTitle($this->codename);
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/metadata.css');
$this->nav[] = array('link'=>"/data/offline",'title'=>'在线数据浏览');
$this->nav[] = array('link'=>"/data/online",'title'=>'Online Data Browse');
?>
<div>
<?= $this->render('breadcrumbs.phtml'); ?>

View File

@ -1,13 +1,13 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle('离线申请');
$this->headTitle('Offline Order');
$this->headTitle()->setSeparator(' - ');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/">Home</a>');
$this->breadcrumb('<a href="/data">'.$this->config->title->data.'</a>');
$this->breadcrumb('离线申请');
$this->breadcrumb('Offline Order');
$this->breadcrumb()->setSeparator(' > ');
$this->nav[] = array('link'=>"/data/order",'title'=>'数据蓝');
$this->nav[] = array('link'=>"/data/order",'title'=>'Data cart');
?>
<?= $this->render('breadcrumbs.phtml') ?>
<div class="row">
@ -18,7 +18,7 @@ $this->nav[] = array('link'=>"/data/order",'title'=>'数据蓝');
</div><!--/.well -->
</div><!--/span-->
<div class="span9">
<h3>数据篮</h3>
<h3>Data cart</h3>
<hr />
<?php
if(!empty($this->msg))
@ -26,7 +26,7 @@ $this->nav[] = array('link'=>"/data/order",'title'=>'数据蓝');
echo $this->msg;
}
?>
<h2>请选择要下载的数据</h2>
<h2>Please choose dataset.</h2>
<!-- /content -->
</div><!--/span-->
</div><!--/row-->

View File

@ -1,9 +1,9 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle('离线申请');
$this->headTitle('Offline Application');
$this->headTitle()->setSeparator(' - ');
$this->nav[] = array('link'=>"/data/order",'title'=>'数据蓝');
$this->nav[] = array('link'=>"/data/order",'title'=>'Cart');
$this->theme->AppendPlus($this,'colorbox');
$this->theme->AppendPlus($this,'uploadify');
$this->theme->AppendModel($this,'offlineapp-uploader');
@ -17,7 +17,7 @@
</div><!--/.well -->
</div><!--/span-->
<div class="span9">
<h3>数据篮</h3>
<h3>Ordering Cart</h3>
<hr />
<?php
if(!empty($this->msg))
@ -27,49 +27,50 @@
?>
<ul class="nav nav-tabs">
<li id="Nav-order-offline1"><a href="/data/order/ac/offline1">未生成的申请<?= !empty($this->counts['offline1']) ? '<span class="badge badge-info">'.$this->counts['offline1'].'</span>':'' ?></a></li>
<li id="Nav-order-offline2"><a href="/data/order/ac/offline2">待提交的订单<?= !empty($this->counts['offline2']) ? '<span class="badge badge-info">'.$this->counts['offline2'].'</span>':'' ?></a></li>
<li id="Nav-order-offline3"><a href="/data/order/ac/offline3">待审批的订单<?= !empty($this->counts['offline3']) ? '<span class="badge badge-info">'.$this->counts['offline3'].'</span>':'' ?></a></li>
<li id="Nav-order-offline4"><a href="/data/order/ac/offline4">已通过的申请<?= !empty($this->counts['offline4']) ? '<span class="badge badge-info">'.$this->counts['offline4'].'</span>':'' ?></a></li>
<li id="Nav-order-online"><a href="/data/order/ac/online">在线数据<?= !empty($this->counts['onlineapp']) ? '<span class="badge badge-info">'.$this->counts['onlineapp'].'</span>':'' ?></a></li>
<li id="Nav-order-offline1"><a href="/data/order/ac/offline1">Unsubmitted<?= !empty($this->counts['offline1']) ? '<span class="badge badge-info">'.$this->counts['offline1'].'</span>':'' ?></a></li>
<li id="Nav-order-offline2"><a href="/data/order/ac/offline2">Submitting<?= !empty($this->counts['offline2']) ? '<span class="badge badge-info">'.$this->counts['offline2'].'</span>':'' ?></a></li>
<li id="Nav-order-offline3"><a href="/data/order/ac/offline3">Wating Audit<?= !empty($this->counts['offline3']) ? '<span class="badge badge-info">'.$this->counts['offline3'].'</span>':'' ?></a></li>
<li id="Nav-order-offline4"><a href="/data/order/ac/offline4">Approved Application<?= !empty($this->counts['offline4']) ? '<span class="badge badge-info">'.$this->counts['offline4'].'</span>':'' ?></a></li>
<li id="Nav-order-online"><a href="/data/order/ac/online">Online Data<?= !empty($this->counts['onlineapp']) ? '<span class="badge badge-info">'.$this->counts['onlineapp'].'</span>':'' ?></a></li>
</ul>
<!-- content -->
<?php if (!empty($this->paginator)) : ?>
<div class="pagenavi"><?= $this->paginator; ?></div>
<?php if ($this->tabID=='order-offline2') { ?>
<div class="well alert alert-error">重要说明:完成一个订单需要三个步骤,即<strong>生成pdf</strong><strong>上传签字后的pdf</strong><strong>确认订单</strong>。请确保上传的pdf和当前订单中的数据相同否则无法受理。若不相同请重新生成、上传。</div>
<div class="well alert alert-error">Note: One order require 3 steps, first generate the <strong>PDF</strong>, second <strong>upload the pdf with personal signature</strong>, and
<strong>confirm the order</strong>. Please make sure the data list in your uploaded pdf is same as your order.</div>
<?php } ?>
<table class="table table-bordered table-striped">
<thead>
<th>时间</th>
<th>标题</th>
<th>Date</th>
<th>Title</th>
<th>
<?php if ($this->tabID=='order-offline1') {
echo '<a class="btn btn-primary" href="/data/order/apply/all">全部放入订单</a>最多5条';
echo '<a class="btn btn-primary" href="/data/order/apply/all">Put all into Application</a>(maximum is 5)';
} elseif ($this->tabID=='order-offline2') {
if(count($this->paginator))
{
echo '<a class="btn btn-primary" href="/data/order/pdf/1">生成pdf</a> ';
echo '<a class="btn btn-primary" href="/data/order/pdf/1">pdf</a> ';
if($this->offlineappid >1)
{
if(empty($this->applicationform))
{
echo '<a class="btn btn-primary" href="javascript:void(0);" onclick="upload.showUploadForm('.$this->offlineappid.');">上传pdf</a>';
echo '<a class="btn btn-primary" href="javascript:void(0);" onclick="upload.showUploadForm('.$this->offlineappid.');">upload pdf</a>';
}
else
{
echo '<a class="btn btn-warning" href="javascript:void(0);" onclick="upload.showUploadForm('.$this->offlineappid.');">重新上传pdf</a>
<a class="btn btn-success" href="/data/order/ac/commitapplicationform/?offlineappid='.$this->offlineappid.'">确认订单</a>';
echo '<a class="btn btn-warning" href="javascript:void(0);" onclick="upload.showUploadForm('.$this->offlineappid.');">re-upload pdf</a>
<a class="btn btn-success" href="/data/order/ac/commitapplicationform/?offlineappid='.$this->offlineappid.'">confirm order</a>';
}
}
}
} elseif ($this->tabID=='order-offline3') {
if(count($this->paginator))
{
echo "请等待审核";
echo "Wait approvement";
}
} elseif ($this->tabID=='order-offline4') {
echo '通过时间';
echo 'Approved time';
}
?>
@ -87,18 +88,18 @@ echo '通过时间';
<td>
<?php
if ($this->tabID=='order-offline1') {
echo '<a href="/data/order/apply/'.$order['id'].'" class="btn btn-primary">放入订单</a>
<a href="/data/order/cancel/'.$order['id'].'" class="btn">移除</a>';
echo '<a href="/data/order/apply/'.$order['id'].'" class="btn btn-primary">put into order</a>
<a href="/data/order/cancel/'.$order['id'].'" class="btn">remove</a>';
} elseif ($this->tabID=='order-offline2') {
switch($order['status']) {
case 2:
if(empty($order['applicationform']))
echo "请生成pdf并上传".' <a class="btn" href="/data/order/cancel/'.$order['id'].'">移除</a>';
echo "Please scan the pdf and upload".' <a class="btn" href="/data/order/cancel/'.$order['id'].'">remove</a>';
else
echo '<span class="label label-success">PDF已上传,请确认订单</span>';
echo '<span class="label label-success">You have uploaded the PDF, please confirm the order</span>';
break;
case 3:
echo '<span class="label label-success">申请表已上传</span>';
echo '<span class="label label-success">PDF has been uploaded.</span>';
break;
default:
break;
@ -107,18 +108,18 @@ if ($this->tabID=='order-offline1') {
switch($order['status']) {
case 3:
if(!empty($order['applicationform']))
echo '<span class="label label-success">申请表已上传</span>';
echo '<span class="label label-success">PDF has been uploaded.</span>';
else
echo '<span class="label label-warning">请上传申请表</span>';
echo '<span class="label label-warning">Please upload the PDF</span>';
break;
case 4:
if(!empty($order['applicationform']))
{ echo "已收到申请,请等待审批。日期:";echo date('Y-m-d',strtotime($order['ts_received']));}
{ echo "The order has received, please wait the approvement. Date: ";echo date('Y-m-d',strtotime($order['ts_received']));}
else
echo '<span class="label label-warning">请上传申请表</span>';
echo '<span class="label label-warning">Please upload the PDF</span>';
break;
case 5:
echo "已通过申请,请查收邮件";
echo "Approved, please check email";
break;
default:
break;

View File

@ -1,10 +1,10 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle('分单位浏览');
$this->headTitle('Organization Browse');
if (!empty($this->codename)) $this->headTitle($this->codename);
$this->headTitle()->setSeparator(' - ');
$this->nav[] = array('link'=>"/data/organization",'title'=>'分单位浏览');
$this->nav[] = array('link'=>"/data/organization",'title'=>'Organization Browse');
$this->theme->AppendPlus($this,'colorbox');
?>
<div class="row-fluid">
@ -13,7 +13,7 @@ $this->theme->AppendPlus($this,'colorbox');
</div>
<?php if (!empty($this->paginator)) : ?>
<h3>当前浏览:<?php echo $this->codename; ?></h3>
<h3>Current Browse: <?php echo $this->codename; ?></h3>
<div class="pagenavi"><?= $this->paginator; ?></div>
<ul id="datalist">
<?php foreach($this->paginator as $md) : ?>

View File

@ -1,12 +1,12 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle('离线申请');
$this->headTitle('Offline Order');
$this->headTitle()->setSeparator(' - ');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/">Home</a>');
$this->breadcrumb('<a href="/data">'.$this->config->title->data.'</a>');
$this->breadcrumb('<a href="/data/order">离线申请</a>');
$this->breadcrumb('生成离线申请表');
$this->breadcrumb('<a href="/data/order">Offline Order</a>');
$this->breadcrumb('Offline Order PDF generate');
$this->breadcrumb()->setSeparator(' > ');
?>
<div class="row">
@ -16,8 +16,8 @@
</div><!--/.well -->
</div><!--/span-->
<div class="span9">
<h3>离线申请提交</h3>
<h4>数据清单</h4>
<h3>Submit Offline Order</h3>
<h4>Dataset list</h4>
<blockquote>
<ul class="unstyled">
<?php foreach ($this->data2 as $i=>$md) : ?>
@ -25,11 +25,7 @@
<?php endforeach; ?>
</ul></blockquote>
<hr />
<h4>申请表填写说明</h4>
<blockquote>
<p class="text-info">其中用途部分,请填写您的详细使用目的;项目类型请从列表中选择,若无对应的项目支持,请选择其他项目工程;如项目无编号信息,则填写“无”;硕博论文请在用途中注明。</p>
<p class="text-success">详细准确的信息能使您更快通过申请。(数据提供者会根据您提供的信息来进行决策判断)</p></blockquote>
<h4>申请表(请务必填写真实信息以便审核通过)</h4>
<h4>Offline PDF form</h4>
<?php if ($this->messages): foreach($this->messages as $msg): ?>
<div class="alert"><?php echo $msg; ?></div>
<?php endforeach;endif; ?>
@ -41,7 +37,7 @@
<?php endif; ?>
<form id="OfflinePdf" enctype="application/x-www-form-urlencoded" class="form-horizontal" action="" method="post">
<div class="control-group">
<label class="control-label" name="realname">真实姓名</label>
<label class="control-label" name="realname">Name</label>
<div class="controls">
<input type="text" name="realname" id="realname" value="<?= empty($this->formData['realname']) ? "":$this->formData['realname']?>" helper="formText"> </div>
</div>
@ -53,40 +49,40 @@
</div>
<div class="control-group">
<label class="control-label" name="phone">电话</label>
<label class="control-label" name="phone">Phone</label>
<div class="controls">
<input type="text" name="phone" id="phone" value="<?= empty($this->formData['phone']) ? "":$this->formData['phone']?>" helper="formText"> </div>
</div>
<div class="control-group">
<label class="control-label" name="unit">单位</label>
<label class="control-label" name="unit">Company/Organization</label>
<div class="controls">
<input type="text" name="unit" id="unit" value="<?= empty($this->formData['unit']) ? "":$this->formData['unit']?>" helper="formText" class="input-block-level"> </div>
</div>
<div class="control-group">
<label class="control-label" name="address">联系地址</label>
<label class="control-label" name="address">Address</label>
<div class="controls">
<input type="text" name="address" id="address" value="<?= empty($this->formData['address']) ? "":$this->formData['address']?>" helper="formText" class="input-block-level"> </div>
</div>
<div class="control-group">
<label class="control-label" name="postcode">邮编</label>
<label class="control-label" name="postcode">Postcode</label>
<div class="controls">
<input type="text" name="postcode" id="postcode" value="<?= empty($this->formData['postcode']) ? "":$this->formData['postcode']?>" helper="formText"> </div>
</div>
<div class="control-group">
<label class="control-label" name="project_id">项目编号</label>
<label class="control-label" name="project_id">Fund number</label>
<div class="controls">
<input type="text" name="project_id" id="project_id" value="<?= empty($this->formData['project_id']) ? "":$this->formData['project_id']?>" helper="formText"> </div>
</div>
<div class="control-group">
<label class="control-label" name="project_type">项目类型</label>
<label class="control-label" name="project_type">Fund type</label>
<div class="controls">
<select name="project_type" id="project_type" helper="formSelect">
<option value="" label="请选择项目类型" <?= empty($this->formData['project_type']) ? 'selected="selected"':"" ?>>请选择项目类型</option>
<option value="" label="Fund type" <?= empty($this->formData['project_type']) ? 'selected="selected"':"" ?>>Fund type</option>
<?php foreach($this->projectType as $k=>$v) {?>
<option value="<?= $v ?>" <?= $this->formData['project_type'] == $v ? 'selected="selected"':"" ?>><?= $k ?></option>
<?php }?>
@ -95,21 +91,21 @@
</div>
<div class="control-group">
<label class="control-label" name="project_title">项目名称</label>
<label class="control-label" name="project_title">Fund title</label>
<div class="controls">
<input type="text" name="project_title" id="project_title" value="<?= empty($this->formData['project_title']) ? "":$this->formData['project_title']?>" helper="formText" class="input-block-level">
</div>
</div>
<div class="control-group">
<label class="control-label" name="leader">项目负责人</label>
<label class="control-label" name="leader">Fund PI</label>
<div class="controls">
<input type="text" name="project_leader" id="leader" value="<?= empty($this->formData['project_leader']) ? "":$this->formData['project_leader']?>" helper="formText" class="input">
</div>
</div>
<div class="control-group">
<label class="control-label" name="project">用途<br/>(请详细描述使用目的)</label>
<label class="control-label" name="project">Data Usage<br/>(Please write about 50-100 words)</label>
<div class="controls">
<textarea name="project" id="project" helper="formTextarea" rows="3" class="input-block-level" cols="80"><?= empty($this->formData['project']) ? "":$this->formData['project']?></textarea> </div>
</div>
@ -118,15 +114,15 @@
<div class="controls">
<input type="hidden" name="id" value="8018" helper="formHidden" id="id">
<input type="submit" name="save" id="savebutton" value="预览PDF" class="btn">
<input type="submit" name="save" id="savebutton" value="PDF Preview" class="btn">
<input type="submit" name="submit" id="submitbutton" value="生成并下载PDF" class="btn btn-primary">
<input type="submit" name="submit" id="submitbutton" value="Download PDF" class="btn btn-primary">
</div>
</div>
<div class="control-group">
<div class="controls">
<div class="alert alert-success">生成PDF并下载后打印并签字之后将申请表制作成PDF文件并且<a href="/data/order/ac/offline2">在线上传PDF</a>通过Email或者邮寄方式提交的申请将被拒绝</div>
<div class="alert alert-success">When download the PDF, please sign your name, and re-generate the PDF and <a href="/data/order/ac/offline2">upload PDF</a></div>
</div>
</div>
</form>

View File

@ -1,25 +1,25 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle('数据集序列序列');
$this->headTitle('Data Series');
$this->headTitle($this->codename);
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/metadata.css');
$this->nav[] = array('link'=>"/data/series",'title'=>'数据集序列浏览');
$this->nav[] = array('link'=>"/data/series",'title'=>'Data Series');
?>
<div class="row-fluid">
<?= $this->render('breadcrumbs.phtml'); ?>
<?= $this->partial('data/tools.phtml'); ?>
</div>
<div id='leftnav'>
<fieldset><legend>数据集序列</legend>
<fieldset><legend>Data Series</legend>
<ul>
<?php foreach($this->serie as $cg) : ?>
<li><a href='/data/series/<?php echo $cg['name']; ?>'><?php echo $cg['name']; ?></a>(<?php echo $cg['count']; ?>)</li>
<?php endforeach; ?>
</ul></fieldset>
<?php if ($this->showtools) : ?>
<fieldset><legend>本序列中常用地点关键词</legend>
<fieldset><legend>Place tags:</legend>
<ul>
<?php foreach($this->places as $place) : ?>
<li><a href='/data/series/<?php echo $this->seriesid; ?>/<?php echo urlencode($place['keyword']); ?>'><?php echo $place['keyword']; ?></a><span class="note">(<?php echo $place['count']; ?>)</span></li>
@ -30,7 +30,7 @@ $this->nav[] = array('link'=>"/data/series",'title'=>'数据集序列浏览');
</div>
<?php if (!empty($this->metadata)) : ?>
<div id='metacontent'>
<h1>当前浏览数据集序列:<?php echo $this->codename; ?></h1>
<h1>Current series: <?php echo $this->codename; ?></h1>
<?php echo $this->page->getNavigation(); ?>
<hr />
<?php foreach($this->metadata as $md) : ?>

View File

@ -1,59 +1,50 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
if (!empty($this->codename)) $this->headTitle($this->codename);
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/metadata.css');
$this->nav[] = array('link'=>"/data/tag",'title'=>'关键词浏览');
$this->theme->AppendPlus($this,'colorbox');
?>
<div id='row-fluid'>
<?= $this->render('breadcrumbs.phtml') ?>
<?= $this->partial('data/tools.phtml'); ?>
</div>
<?php if (!empty($this->metadata)) : ?>
<div id='metacontent'>
<h1>当前浏览:<?php echo $this->codename; ?></h1>
<?php echo $this->page->getNavigation(); ?>
<hr />
<?php foreach($this->metadata as $md) : ?>
<div class="mditem">
<div class="thumb">
<a href="/service/bigthumb/uuid/<?= $md['uuid'] ?>" class="colorbox">
<img src="/service/thumb/id/<?php echo $md['id'];?>" />
</a>
</div>
<h2><a href="/data/<?php echo $md['uuid']; ?>"><?php echo $this->escape($md['title']);?></a></h2>
<span><?php echo mb_strlen($md['description'])>400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']);?></span>
</div>
<?php endforeach; ?>
<?php echo $this->page->getNavigation(); ?>
</div>
<?php else : ?>
<div id='leftnav'>
<?php
$keytypezh=array('place'=>'地点关键词','theme'=>'主题关键词','discipline'=>'学科关键词','stratum'=>'地层关键词','temporal'=>'时间关键词');
$type='';
foreach($this->keywords as $cg) :
if ($type!=$cg['keytype']) :
if ($type!='') : ?>
</ul></fieldset>
<?php endif;
$type=$cg['keytype'];
?>
<fieldset><legend><?php echo $keytypezh[$type]; ?></legend>
<ul>
<li><a href='/data/tag/<?php echo urlencode($cg['keyword']); ?>'><?php echo $cg['keyword']; ?></a><span class="note">(<?php echo $cg['count']; ?>)</span></li>
<?php else : ?>
<li><a href='/data/tag/<?php echo urlencode($cg['keyword']); ?>'><?php echo $cg['keyword']; ?></a><span class="note">(<?php echo $cg['count']; ?>)</span></li>
<?php endif; ?>
<?php endforeach; ?>
</ul>
</fieldset></div>
<?php endif; ?>
<script>
$(document).ready(function(){
$(".colorbox").colorbox({rel:"colorbox",photo:"true",transition:"fade"});
$(".colorbox").colorbox({photo:"true"});
});
</script>
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/water.css');
$this->nav[] = array('link'=>"/data/tag",'title'=>'Tags Browse');
?>
<?= $this->render('breadcrumbs.phtml'); ?>
<div class="row"> <div class="span12">
<?php if (!empty($this->metadata)) : ?>
<div id='mdlist'>
<h1>Tags: <?php echo $this->codename; ?> [<a href="/data/tag/">All tags</a>]</h1>
<?php echo $this->page->getNavigation(); ?>
<hr />
<div class="md-list">
<ol start="<?php echo $this->offset; ?>">
<?php foreach($this->metadata as $md) : ?>
<li><a href="/data/view/uuid/<?php echo $md['uuid']; ?>" title="<?php echo mb_strlen($md['description'])>400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']);?>"><?php echo $md['title']; ?></a></li>
<?php endforeach; ?>
</ol>
</div>
<hr />
<?php echo $this->page->getNavigation(); ?>
</div>
<?php else : ?>
<div>
<?php
$keytypezh=array('place'=>'Place','theme'=>'Theme','discipline'=>'Discipline','stratum'=>'Stratum','temporal'=>'Temporal');
$type='';
foreach($this->keywords as $cg) :
if ($type!=$cg['keytype']) :
if ($type!='') : ?>
</ul>
<?php endif;
$type=$cg['keytype'];
?>
<h4><a href="/data/tag/keytype/<?php echo $type; ?>"><?php echo $keytypezh[$type]; ?></a>
<?php if ($this->keytype) : ?><a class="pull-right" href="/data/tag"><i class="icon-tags"></i>All tags</a> <?php endif; ?></h4>
<ul class="inline">
<li><a href='/data/tag/key/<?php echo urlencode($cg['keyword']); ?>'><i class="icon-tag"></i><?php echo $cg['keyword']; ?></a><span class="note">(<?php echo $cg['count']; ?>)</span></li>
<?php else : ?>
<li><a href='/data/tag/key/<?php echo urlencode($cg['keyword']); ?>'><i class="icon-tag"></i><?php echo $cg['keyword']; ?></a><span class="note">(<?php echo $cg['count']; ?>)</span></li>
<?php endif; ?>
<?php endforeach; ?>
</ul>
</fieldset></div>
<?php endif; ?>
</div>
</div>

View File

@ -1,10 +1,10 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle('缩略图浏览');
$this->headTitle('Thumbnail Browse');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/water.css');
$this->nav[] = array('link'=>"/data/thumb",'title'=>'缩略图浏览');
$this->nav[] = array('link'=>"/data/thumb",'title'=>'Thumbnail Browse');
$this->theme->AppendPlus($this,'masonry');
$this->theme->AppendPlus($this,'colorbox');
?>
@ -23,7 +23,7 @@ $this->theme->AppendPlus($this,'colorbox');
<?php echo mb_strlen($md['description'])>120?$this->escape(mb_substr($md['description'],0,120,'UTF-8').'...'):$this->escape($md['description']);?>
</p>
</div>
<span class="pull-right"><a href="/data/<?php echo $md['uuid'];?>" class="btn"><i class="icon-zoom-in"></i>查看</a></span>
<span class="pull-right"><a href="/data/<?php echo $md['uuid'];?>" class="btn"><i class="icon-zoom-in"></i>Detail</a></span>
</li>
<?php endforeach; ?>
</ul>

View File

@ -1,13 +1,13 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle('时间轴导航');
$this->headTitle('Timeline');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/metadata.css');
$this->headScript()->appendFile('/js/timeline_var.js');
$this->headScript()->appendFile('/js/timeline_js/timeline-api.js?bundle=true');
$this->headScript()->appendFile('/js/time.js');
$this->nav[] = array('link'=>"/data/timeline",'title'=>'时间轴导航');
$this->nav[] = array('link'=>"/data/timeline",'title'=>'Timeline');
?>
<div class="row-fluid"><?= $this->render('breadcrumbs.phtml'); ?><?= $this->partial('data/tools.phtml'); ?></div>
<div id="tl" class="timeline-default" style="clear:left;height: 400px;"> </div>

View File

@ -1,34 +1,57 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle('时空导航');
$this->headTitle('Timemap');
$this->headTitle()->setSeparator(' - ');
//$this->theme->AppendPlus($this,'colorbox');
$this->theme->AppendPlus($this,'timemap');
$this->headScript()->appendFile('/js/OpenLayers.js');
//$this->headScript()->appendFile('/js/timeline_var.js');
//$this->headScript()->appendFile('/js/timeline_js/timeline-api.js');
$this->nav[] = array('link'=>"/data/timemap",'title'=>'时空导航');
//$this->headLink()->appendStylesheet('/css/metadata.css');
$this->theme->AppendPlus($this,'google_map_v3');
$this->theme->AppendPlus($this,'colorbox');
$this->headScript()->appendFile('/js/timeline_var.js');
$this->headScript()->appendFile('/js/timeline_js/timeline-api.js');
$this->headScript()->appendFile('/js/timemap.2.0.1/lib/mxn/mxn.js?(googlev3)');
$this->headScript()->appendFile('/js/timemap.2.0.1/timemap.pack.js');
$this->nav[] = array('link'=>"/data/timemap",'title'=>'Timemap');
?>
<style>
img{max-width:none}
</style>
<div class="row-fluid"><?= $this->render('breadcrumbs.phtml'); ?><?= $this->partial('data/tools.phtml'); ?></div>
<div id="timemap">
<div id="timeline" style="height:300px;border-bottom:1px solid #abc;"></div>
<div id="map" style="height:400px;"></div>
<div id="timeline" style="height:500px;border-right:1px solid #abc;width:50%;float:left;"></div>
<div id="map" style="height:500px;"></div>
</div>
<script type="text/javascript" charset="utf-8">
//$('#map').height($(window).height());
//$('#timeline').height($(window).height());
//$("html,body").animate({scrollTop:$('#timemap').offset().top},600);
$('#map').height($(window).height());
$('#timeline').height($(window).height());
$("html,body").animate({scrollTop:$('#timemap').offset().top},600);
var tm;
$(function() {
$(function() {
// make a custom map style
var styledMapType = new google.maps.StyledMapType([
{
featureType: "water",
elementType: "all",
stylers: [
{ saturation: 0 },
{ lightness: 100 }
]
},
{
featureType: "all",
elementType: "all",
stylers: [
{ saturation: -100 }
]
}
], {
name: "white"
});
tm = TimeMap.init({
mapId: "map", // Id of map div element (required)
timelineId: "timeline", // Id of timeline div element (required)
scrollTo: "2008-06-01",
options: {
eventIconPath: "../images/"
},
@ -69,5 +92,11 @@ $(function() {
Timeline.DateTime.DECADE
]
});
// set the map to our custom style
var gmap = tm.getNativeMap();
gmap.mapTypes.set("white", styledMapType);
gmap.setMapTypeId("white");
});
</script>

View File

@ -1,11 +1,11 @@
<ul class="nav nav-pills">
<li class="nav-header">特色导航方式</li>
<li><a href="/data/tag"><i class="icon-tags"></i>关键词浏览</a></li>
<li><a href="/data/series"><i class="icon-th-list"></i>序列浏览</a></li>
<li><a href="/data/category"><i class="icon-th"></i>分类浏览</a></li>
<li><a href="/data/timeline"><i class="icon-tasks"></i>时间轴浏览</a></li>
<!-- <li><a href="/data/extent"><i class="icon-globe"></i>空间浏览</a></li> -->
<li><a href="/data/timemap"><i class="icon-film"></i>时空浏览</a></li>
<li><a href="/data/browse"><i class="icon-align-justify"></i>全部浏览</a></li>
<!-- <li><a href="/data/advancesearch"><i class="icon-search"></i>高级搜索</a></li> -->
<li class="nav-header">Navigation:</li>
<li><a href="/data/tag"><i class="icon-tags"></i>By Keywords</a></li>
<li><a href="/data/series"><i class="icon-th-list"></i>By Series</a></li>
<li><a href="/data/category"><i class="icon-th"></i>By Categories</a></li>
<li><a href="/data/timeline"><i class="icon-tasks"></i>Timeline</a></li>
<!-- <li><a href="/data/map"><i class="icon-globe"></i>Map</a></li> -->
<li><a href="/data/timemap"><i class="icon-film"></i>TimeMap</a></li>
<li><a href="/data/browse"><i class="icon-align-justify"></i>Browse</a></li>
<!-- <li><a href="/search/advance"><i class="icon-search"></i>Advance Search</a></li> -->
</ul>

View File

@ -0,0 +1,544 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle($this->metadata->title);
$this->headTitle()->setSeparator(' - ');
$this->theme->AppendPlus($this,'tianditu');
$this->theme->AppendPlus($this,'colorbox');
if(!empty($this->dataService)) {
$this->theme->AppendModel($this,"dataservice");
}
?>
<style>
h3.gs_rt{font-size:110%;}
#file-list li:hover {background-color: #f5f5f5;}
#file-list li li:hover {background-color: #dedede;}
#file-list li li li:hover {background-color: #eeeeee;}
#watermap img {max-width:none;}
</style>
<?= $this->render('breadcrumbs.phtml'); ?>
<?php $md=$this->metadata;if ($md):?>
<h3><?php echo $this->escape($md->title);
if ($md->title_en) echo '<br />'.$this->escape($md->title_en);
if ($md->mdid) echo '<a class="pull-right btn btn-large btn-primary" href="http://westdc.westgis.ac.cn/data/'.$md->uuid.'"><i class="icon-external-link"></i> Chinese Version</a>';?>
</h3>
<hr />
<div class="row">
<div class="span8">
<div>
<a class="colorbox pull-right" title="<?php echo $md->title; ?>" href="/service/bigthumb/uuid/<?php echo $md->uuid; ?>"><img src="/service/thumb/uuid/<?php echo $md->uuid;?>"/></a>
<p style="word-break:break-word;word-wrap:break-word;overflow:hidden;">
<?php echo str_replace(array("\r\n", "\n", "\r"),'</p><p>',$md->description);?>
</p>
</div>
<div>
<?php if ($this->mcitation && (count($this->mcitation)>1) ) : ?>
<hr />
<h4><i class="icon-quote-left text-success"></i>Citations<a class="btn btn-danger pull-right" href="/archives/help/platform/archive-107.html" ><i class="icon-comment"></i>Help</a></h4>
<ol>
<?php foreach($this->mcitation as $ref) :
echo '<li>'.$ref->reference;
echo '<a href="/knowledge/paper/id/'.$ref->id.'"><i class="icon-info-sign text-success"></i>Detail</a>';
if (empty($ref->link))
{
if(!empty($ref->attid))
echo '<a href="/service/attach/id/'.$ref->attid.'"><i class="icon-download text-success"></i>Download</a>';
}else{
echo '<a href="'.$ref->link.'"><i class="icon-download text-success"></i>Download</a>';
}
echo "</li>";
endforeach;
?>
</ol>
<?php elseif (($md->citation) || (count($this->mcitation)==1)) :
if (!$md->citation) $md->citation=$this->mcitation[0]->reference;
?>
<hr />
<h4><i class="icon-quote-left muted"></i>Citation<a class="btn btn-danger pull-right" href="/archives/help/platform/archive-107.html" ><i class="icon-comment"></i>Help</a></h4>
<p><?php if (empty($md->datadoi) || !strpos($md->citation,$md->datadoi)) : ?>
<span class="label label-info">Paper Cite</span>
<?php endif; echo $this->escape($md->citation);
if (strpos($md->citation,$md->datadoi)) : ?>
(Download: <a href="/service/ris/lang/en/uuid/<?php echo $md->uuid; ?>">RIS</a> |
<a href="/service/bibtex/lang/en/uuid/<?php echo $md->uuid; ?>">Bibtex</a>)
<?php endif; ?>
</p>
<?php if (!empty($md->datadoi) && !strpos($md->citation,$md->datadoi)) : ?>
<p><span class="label label-info">Dataset Cite</span>
<?php echo str_replace('"','',substr($md->author_en,1,-1)).'. '.$md->title.'. '.$md->publisher_en.', '.(empty($md->ts_published)?$md->publish_year:date('Y',strtotime($md->ts_published))).'. doi:'.$md->doi; ?>
(Download: <a href="/service/ris/lang/en/uuid/<?php echo $md->uuid; ?>">RIS</a> |
<a href="/service/bibtex/lang/en/uuid/<?php echo $md->uuid; ?>">Bibtex</a>)</p>
<?php endif; endif; ?>
<?php if ($this->ref) : ?>
<hr />
<h4><i class="icon-eye-open text-success"></i>Related Publications (Recommended by Author)</h4>
<ol>
<?php foreach($this->ref as $ref) :
echo '<li>'.$ref->reference;
echo '<a href="/knowledge/paper/id/'.$ref->id.'"><i class="icon-info-sign text-success"></i>Detail</a>';
if (empty($ref->link))
{
if(!empty($ref->attid))
echo ' <a href="/service/attach/id/'.$ref->attid.'"><i class="icon-download text-success"></i>Download</a>';
}else{
echo ' <a href="'.$ref->link.'"><i class="icon-download text-success"></i>Download</a>';
}
echo "</li>";
endforeach;
?>
</ol>
<?php endif; if ($this->themeref) :?>
<hr />
<h4><i class="icon-eye-open text-success"></i>Special Publications</h4>
<ol>
<?php foreach($this->themeref as $ref) :
echo '<li>'.$ref->reference;
echo '<a href="/knowledge/paper/id/'.$ref->id.'"><i class="icon-info-sign text-success"></i>Detail</a>';
if (empty($ref->link))
{
if(!empty($ref->attid))
echo ' | <a href="/service/attach/id/'.$ref->attid.'"><i class="icon-download text-success"></i>Download</a>';
}else{
echo ' | <a href="'.$ref->link.'"><i class="icon-download text-success"></i>Download</a>';
}
echo "</li>";
endforeach;
?>
</ol>
<?php endif; if ($this->userref) : ?>
<hr />
<h4><i class="icon-eye-open text-success"></i>Cited By</h4>
<ol>
<?php foreach($this->userref as $ref) :
echo '<li>'.$ref->reference;
echo '<a href="/knowledge/paper/id/'.$ref->id.'"><i class="icon-info-sign text-success"></i>Detail</a>';
if (empty($ref->link))
{
if(!empty($ref->attid))
echo ' <a href="/service/attach/id/'.$ref->attid.'"><i class="icon-download text-success"></i>Download</a>';
}else{
echo ' <a href="'.$ref->link.'"><i class="icon-download text-success"></i>Download</a>';
}
echo "</li>";
endforeach;
if (count($this->userref)==15)
{
echo '<a class="btn btn-success pull-right" href="/knowledge/user/uuid/'.$md->uuid.'" ><i class="icon-info-sign"></i>More</a>';
}
?>
</ol>
<?php endif; ?>
<hr />
<h4><i class="icon-legal text-warning"></i>Limitations</h4>
<?php
if ($this->uselimits) :
foreach($this->uselimits as $uselimit) :
echo '<p>'.str_replace(array("\r\n", "\n", "\r"),'</p><p>',$this->escape($uselimit->uselimit)).'</p>';
endforeach;
?>
<?php endif; ?>
<?php if($this->data_archives){ ?>
<h4>Dataset News</h4>
<ul>
<?php
foreach($this->data_archives as $v){?>
<li><a href="<?= $v['url']['archive_url']?>"><?= $v['title']?></a></li>
<?php } ?>
</ul>
<hr />
<?php }?>
<?php if ($md->suppinfo || $this->fund) : ?>
<h4><i class="icon-money text-info"></i>Fund</h4>
<?php if(!empty($this->fund)) : ?>
<ul>
<?php foreach($this->fund as $k=>$v) : ?>
<li><?= $v['fund_type_en'] ?> (<a href="/data/fund/id/<?= $v['id']?>">No. <?= $v['fund_id']?></a>)</li>
<?php endforeach; ?>
</ul>
<?php elseif(!empty($md->suppinfo)) : ?>
<?php echo '<p>'.str_replace(array("\r\n", "\n", "\r"),'</p><p>',$this->escape($md->suppinfo)).'</p>';?>
<?php endif; ?>
<hr />
<?php endif; ?>
<?php if ($this->resources) : ?>
<h4><i class="icon-bolt text-warning"></i>Online Resources</h4>
<ul class="unstyled inline"><?php foreach($this->resources as $link) : ?>
<li><a class="label" href="<?php echo $link->linkage; ?>" title="<?php echo $link->description; ?>">
<?php
if (!empty($link->name))
echo $link->name;
elseif (!empty($link->description))
echo $link->description;
else
echo $link->linkage;
?></a></li>
<?php endforeach; ?>
</ul>
<hr />
<?php endif; ?>
</div>
<div>
<?php
$keywords = array();
foreach($this->keys as $cg){
if($cg['keytype']=="theme")
$keywords[]=$cg['keyword'];
}
$ev = join(" ",$keywords);
?>
<div class="tabbable"> <!-- Only required for left/right tabs -->
<ul class="nav nav-tabs">
<li><a href="#related" data-toggle="tab" id="related_t">Related Dataset</a></li>
<li><a href="#literature" data-toggle="tab" id="literature_t">Related Literatures</a></li>
<li><a href="#gsearch" data-toggle="tab" id="gsearch_t">Searching</a></li>
<li><a href="#recommend" data-toggle="tab" id="recommend_t">Recommendation</a></li>
</ul>
<div class="tab-content">
<div id="related" class="tab-pane">
</div>
<div id="literature" class="tab-pane">
<div id="literature-list">
</div>
</div>
<div id="gsearch" class="tab-pane">
<ul id="searchlist" class="unstyled well well-small"></ul>
</div>
<div id="recommend" class="tab-pane">
</div>
</div>
</div>
<!--
<hr />
<div id="comments">
<?php if ($md->status>0 and $md->status<5) : ?>
<p class="strong">This data is not published yet. You are invited to review this dataset, to make the data released as soon as possible.<a class="btn btn-primary" href="/review/review/uuid/<?php echo $md->uuid; ?>">评审</a></p>
<?php else : ?>
<h4>Comment</h4>
<div id="allcomments">
<div id="loading"><img src="/images/loading.gif" />Loading</div>
</div>
<?php
$auth = Zend_Auth::getInstance();
if($auth->hasIdentity())
{
$user = $auth->getIdentity();
$name = $user->realname;
$email = $user->email;
}else
{
$name = "";
$email = "";
}
?>
<form class="form-horizontal" id="postcommentform">
<div class="control-group">
<label class="control-label">Name</label>
<div class="controls">
<input type="text" name="author" value="<?php echo $name;?>" />
</div>
</div>
<div class="control-group">
<label class="control-label">Email</label>
<div class="controls">
<input type="text" name="email" value="<?php echo $email;?>" />
</div>
</div>
<div class="control-group">
<label class="control-label">Website</label>
<div class="controls">
<input type="text" name="url" value="" /> <span class="help-block">e.g. http://westdc.westgis.ac.cn/</span>
</div>
</div>
<div class="control-group">
<label class="control-label">Content</label>
<div class="controls">
<textarea name="content" class="span5"></textarea>
</div>
</div>
<div class="control-group">
<label class="control-label">Captcha</label>
<div class="controls">
<img id="imgcode" style="margin-bottom:-10px;cursor:pointer;border:0px;" src="/service/imgcode/" onClick="this.src=this.src+'?'"><input type="text" name="vdcode" id="vdcode" maxlength="4" value="" />
</div>
</div>
<div class="control-group">
<div class="controls">
<input type="hidden" name="mdtitle" value="<?php echo $md->title;?>" />
<input type="hidden" name="uuid" value="<?php echo $md->uuid;?>" />
<a class="btn btn-primary" id="postcomment" href="javascript:;" onclick="postcomment();">Submit</a><button type="reset" id="reset" class="btn">Reset</button><span id="returninfo"></span>
</div>
</div>
</form>
<div id="infobox"></div>
<?php endif; ?>
</div> -->
</div>
</div>
<div class="span4">
<ul class="well well-small inline unstyled">
<li><a href="/data/category"><i class="icon-th text-warning"></i>Category: </a></li>
<?php foreach($this->category as $cat): ?>
<li><a href="/data/category/code/<?php echo $cat->code;?>"><i class="icon-th-large"></i><?php echo $this->escape($cat->name);?></a></li>
<?php endforeach; ?>
</ul>
<?php
$kw=array('discipline'=>'Discipline','place'=>'Place','theme'=>'Theme','temporal'=>'Temporal','stratum'=>'Stratum');
$kt='';
$i=0;
foreach($this->keys as $cg) :
if ($kt==$cg['keytype']) :
$i+=1;
else :
if (!empty($kt)) echo '</ul>';
$kt=$cg['keytype'];
$i=0;
endif;
if ($i==0) {
?>
<ul class="well well-small inline unstyled">
<li><a href="/data/tag/keytype/<?php echo $kt; ?>"><i class="icon-tags text-warning"></i><?php echo $kw[$kt]; ?></a></li>
<?
}
echo '<li><a href="/data/tag/key/'.urlencode($cg['keyword']).'"><i class="icon-tag"></i>'.$cg['keyword'].'</a></li>';
endforeach;
?></ul>
<?php if ($md->doi) : ?>
<ul class="well well-small inline unstyled"><li><span class="label label-success">DOI</span> <a href="http://dx.doi.org/<?php echo $md->doi; ?>"><?php echo $md->doi; ?></a></li></ul>
<?php endif; ?>
<div>
<hr />
<h4>Information<a class="btn pull-right" href="javascript:void(0);" id="show-list" title="" rel="<?= $md->uuid;?>"><i class="icon-file"></i>File list</a></h4>
<ul class="inline unstyled well">
<?php if ($md->fileformat) : ?>
<li><strong>File Format: </strong><?php echo $md->fileformat; ?></li>
<?php endif; ?>
<li><strong>Size: </strong><?php echo $md->filesize; ?>MB</li>
<?php if ($this->downloaded>9) :?>
<li><strong>Downloaded: </strong><?php echo $this->downloaded; ?></li>
<?php endif; ?>
<li><strong>Viewed: </strong><?php echo $this->viewed; ?></li>
<!--
<?php if ($md->projection) : ?>
<li id="projection" title="<?= $this->projection; ?>">数据投影:
<?php
$p=explode(" ",$this->projection);
$p=explode("=",$p[0]);
if (!empty($p[1]))
echo $p[1];
else
{
if (is_numeric($md->projection)) echo 'EPSG_CODE_';
echo $md->projection;
}
?></li>
<?php endif; ?>
-->
<?php if (!empty($md->timebegin)) : ?>
<li id="datatimes"><strong>Temporal Range: </strong><?php echo date('Y-m-d',strtotime($md->timebegin));if (!empty($md->timeend)) echo " to ".date('Y-m-d',strtotime($md->timeend)); ?></li>
<?php endif; ?>
<?php if ($this->attachments) : ?>
<li id="attach"><span>Documents: </span>
<?php foreach ($this->attachments as $k=>$a) : ?>
<a href="/service/attach/id/<?php echo $a->id; ?>" title="<?php echo $a->realname; ?>"><img src="/images/document.png"></a>
<?php endforeach; ?>
<a href="/service/attach/zip/<?php echo $md->uuid; ?>"><img src="/images/zip_icon.gif" title="打包下载"/></a>
</li>
<?php endif; ?>
<li id="datatype"><strong>Sharing: </strong><?php if ($md->datatype) print "Offline"; else print "Online";?> </li>
</ul>
<div id="linkurl">
<?php if ($md->status>0 and $md->status<5) : ?>
<a href="/review/review/uuid/<?php echo $md->uuid; ?>" class="btn btn-primary btn-large btn-block" title="You are invited to review this dataset.">Reviewing</a>
<?php else : if (!$md->datatype) : ?>
<?php if ($md->uuid != '00fcd2b2-cb9f-4620-a1b5-58cf05cd6d4d'): ?>
<a href="/data/todownload/?uuid=<?= $md->uuid?>" class="btn btn-primary btn-large btn-block" title="Download">
Download
</a>
<?php else: ?>
<a href="ftp://210.72.14.198:2121/" class="btn btn-primary btn-large btn-block" title="Download">
Download
</a>
<?php endif; ?>
<?php else: ?>
<?php
if(!empty($this->dataService)) { ?>
<?php if($this->dataService['service_type'] == 2) { ?>
<a href="javascript:void(0);" class="btn btn-primary btn-large btn-block" title="Select the subset" onclick="westdc.dataservice.choiceData('<?= $md->uuid ?>',this);">
<?php }else if($this->dataService['service_type'] == 3) {?>
<a href="#selectDataWindow" role="button" class="btn btn-primary btn-large btn-block" data-toggle="modal">
<?php } ?>
<?php }else{ ?>
<a href="/data/order/uuid/<?php echo $md->uuid; ?>" class="btn btn-primary btn-large btn-block" title="Free of Charge!">
<?php } ?>
Put in the Basket
</a>
<?php endif;endif; ?>
</div>
</div>
<hr />
<h4>Map</h4>
<div id='watermap' style="width:100%;height:300px;"></div>
<hr />
<h4>Contacts</h4>
<div id="authors">
<ul class="unstyled">
<?php
$party_zh=array('resourceProvider'=>'Resource Provider','custodian'=>'Custodian','owner'=>'Owner','user'=>'User','distributor'=>'Distributor','originator'=>'Originator','pointOfContact'=>'Point Of Contact','principalInvestigator'=>'Principal Investigator','processor'=>'Processor','publisher'=>'Publisher','author'=>'Author');
$r='';
$i=0;
foreach($this->authors as $k=>$author) :
if ($author->role!=$r)
{
$r=$author->role;
$i=0;
if ($k>0) echo '</li>';
echo '<li>'.$party_zh[$author->role].'';
}
if ($i>0) echo '';
$i+=1;
if (!empty($author->email) && $r!='principalInvestigator')
echo '<a href="mailto:'.$author->email.'">';
echo '<strong title="'.$author->organisation.'">';
if (!empty($author->individual))
echo $author->individual;
else
echo $author->organisation;
echo '</strong>';
if (!empty($author->email)) echo '</a>';
if ($k+1==count($this->authors)) echo '</li>';
endforeach;
?>
</ul>
<hr />
<ul class="unstyled">
<li>Last update: <?php print date('Y-m-d',strtotime($md->ts_created)); ?></li>
<li><strong>Download Metadata:</strong>
<a href="/service/pdf/uuid/<?php echo $md->uuid; ?>"><img src="/images/pdf_icon.gif" alt="Adobe PDF" title="Adobe PDF"></a>
<a href="/service/odt/uuid/<?php echo $md->uuid; ?>"><img src="/images/odt_icon.gif" alt="OpenOffice odt" title="OpenOffice odt"></a>
<a href="/service/doc/uuid/<?php echo $md->uuid; ?>"><img src="/images/doc_icon.gif" alt="Word doc" title="Word doc"></a>
<a href="/service/xml/uuid/<?php echo $md->uuid;?>"><img src="/images/xml_icon.gif" alt="XML" title="XML"></a>
</li>
<!--<li><a href="/data/detail/id/<?php echo $md->id;?>">详细元数据</a></li>-->
<?php if($this->version->c>0):?>
<li id="dataversion">Version: <a href="javascript:void(0);" onclick="dataVersion('<?php echo $md->uuid;?>')" title=""><?= $this->version->c ?><img src="/images/list_extensions.gif" style="vertical-align:middle" /></a></li>
<?php endif;?>
</ul>
</div>
<hr />
</div>
</div>
<script src="/js/metadata-view.js"></script>
<script type="text/javascript" charset="utf-8">
$(function() {
$(".colorbox").colorbox({photo:"true"});
$('.googlesearch').click(function(){googleSearch('<?php echo $ev;?>');});
$('.bingsearch').click(function(){bingSearch('<?php echo $ev;?>');});
$('.cnkiSearch').click(function(){cnkiSearch('<?php echo $ev;?>');});
$('.scholar').click(function(){scholarSearch('<?php echo $ev;?>');});
$('#related_t').click(function(){related(1);});
$('#recommend_t').click(function(){recommend(0);});
$('#literature_t').click(function(){scholarSearch('<?php echo $ev;?>');$('.literatures').parent('li').addClass('active')});
$('.literatures').click(function(){literature(1);});
ajaxpage(0);
related(1);
$('.lit-nav-btn').each(function(index, element) {
$(this).click(function(){
$('.lit-nav').children('li').each(function(index, element) {
$(this).removeClass('active');
});
$(this).parent('li').addClass('active');
});
});
$('#gsearch_t').click(function(){
if($('#searchlist').children('li').length<1)
{
googleSearch('<?php echo $ev;?>');
}
});
$('#show-list').click(function(e) {
method.filelist.get($(this).attr('rel'));
});
});
//ajax literature
function literature(page){
literature_get(page,'<?= $md->uuid; ?>');
}
//ajax related
function related(page){
related_get(page,'<?= $md->uuid; ?>');
}
//ajax recommend
function recommend(page){
recommend_get(page,'<?= $md->uuid; ?>');
}
function getFileList(){
getFileList_h('<?php echo $md->uuid;?>');
}
function ajaxpage(page){
ajaxpage_get(page,'<?= $md->uuid; ?>');
}
<?php if ($this->downhistory) : ?>
$('#recommend_t').parent('li').addClass('active');
$('#recommend').addClass('active');
recommend(0);
<?php else : ?>
$('#related_t').parent('li').addClass('active');
$('#related').addClass('active');
<? endif; ?>
var config = { projection: "EPSG:4326"}
var map=new TMap("watermap",config);
var lat=<?= ($md->south+$md->north)/2; ?>;
var lng=<?= ($md->east+$md->west)/2; ?>;
map.centerAndZoom(new TLngLat(lng,lat),12);
map.setMapType(TMAP_HYBRID_MAP);
<?php if ($md->north==$md->south && $md->east==$md->west) :?>
var marker=new TMarker(new TLngLat(lng,lat));
map.addOverLay(marker);
<?php else :?>
var p1=new TLngLat(<?= $md->west ?>,<?= $md->south ?>);
var p2=new TLngLat(<?= $md->west ?>,<?= $md->north ?>);
var p3=new TLngLat(<?= $md->east ?>,<?= $md->north ?>);
var p4=new TLngLat(<?= $md->east ?>,<?= $md->south ?>);
map.setViewport(new Array(p1,p2,p3,p4));
var bounds = new TBounds(<?= $md->west; ?>,<?= $md->south; ?>,<?= $md->east; ?>,<?= $md->north; ?>);
var config = {
strokeColor:"blue", //折线颜色
fillColor:"#FFFFFF", //填充颜色。当参数为空时,折线覆盖物将没有填充效果
strokeWeight:"3px", //折线的宽度,以像素为单位
opacity:0.3, //折线的透明度取值范围0 - 1
strokeStyle:"dashed" //折线的样式solid或dashed
};
var rect = new TRect(bounds,config);
map.addOverLay(rect);
//map.zoomOut();
<?php endif; ?>
var config = {
type:"TMAP_NAVIGATION_CONTROL_SMALL", //缩放平移的显示类型
anchor:"TMAP_ANCHOR_TOP_LEFT", //缩放平移控件显示的位置
offset:[0,0], //缩放平移控件的偏移值 showZoomInfo:true //是否显示级别提示信息true表示显示false表示隐藏。
};
//创建缩放平移控件对象
control=new TNavigationControl(config);
//添加缩放平移控件
map.addControl(control);
</script>
<?php else: ?>
<p>Cannot find the metadata.</p>
<?php endif;?>
<?php if(!empty($this->dataService)) { ?>
<?php if($this->dataService['service_type'] == 2) { ?>
<?php $this->theme->AppendPlus($this,'datepicker'); ?>
<script src="/js/lib/custom/models/dataservice.js"></script>
<?php }else if($this->dataService['service_type'] == 3) {?>
<?php $this->theme->AppendPlus($this,'datepicker'); ?>
<!-- <script src="/js/lib/custom/models/dataservice.geodata.js"></script> -->
<?php } ?>
<?php } ?>

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