From b99f34f6d58dc3ae3625a50643cf414837e683da Mon Sep 17 00:00:00 2001
From: wlx
Date: Mon, 20 May 2013 22:29:47 +0000
Subject: [PATCH 01/19] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=95=B0=E6=8D=AE?=
=?UTF-8?q?=E5=BC=95=E7=94=A8=E6=96=B9=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
application/default/views/scripts/heihe/view.phtml | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/application/default/views/scripts/heihe/view.phtml b/application/default/views/scripts/heihe/view.phtml
index 6ea73d04..4128182d 100755
--- a/application/default/views/scripts/heihe/view.phtml
+++ b/application/default/views/scripts/heihe/view.phtml
@@ -40,10 +40,13 @@ if ($md->title_en) echo '
'.$this->escape($md->title_en);?>
datadoi) || !strpos($md->citation,$md->datadoi)) : ?>文章的引用
- escape($md->citation);?>
- datadoi) && !strpos($md->citation,$md->datadoi)) : ?>
+ escape($md->citation);if (strpos($md->citation,$md->datadoi)) : ?>
+ (下载引用:RIS格式 | RIS英文格式 | Bibtex格式 | Bibtex英文格式)
+
+
+ datadoi) && !strpos($md->citation,$md->datadoi)) : ?>
数据的引用authors,1,-1).'. '.$md->title.'. '.$md->publisher.', '.$md->publish_year.'. doi:'.$md->doi;
+ echo substr($md->authors,1,-1).'. '.$md->title.'. '.$md->publisher.', '.(empty($md->ts_published)?$md->publish_year:date('Y',strtotime($md->ts_published))).'. doi:'.$md->doi;
echo ' ['.str_replace('"','',substr($md->author_en,1,-1)).'. '.$md->title_en.'. '.$md->publisher_en.', '.$md->publish_year.'. doi:'.$md->doi.']';
?> (下载引用:RIS格式 | RIS英文格式 | Bibtex格式 | Bibtex英文格式)
ref) : ?>
From f602aca71eefa4fa83fbb2b226d5f894d9ada2a8 Mon Sep 17 00:00:00 2001
From: Li Jianxuan
Date: Tue, 21 May 2013 09:37:33 +0000
Subject: [PATCH 02/19] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=96=B0=E9=97=BB?=
=?UTF-8?q?=E6=A0=8F=E7=9B=AE=E7=9A=84=E9=A1=BA=E5=BA=8F=E4=BF=AE=E6=94=B9?=
=?UTF-8?q?=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../admin/controllers/NewsController.php | 36 +-
.../admin/views/scripts/news/catlog.phtml | 224 ++++++------
.../admin/views/scripts/news/move.phtml | 33 ++
application/models/ArchiveCategory.php | 326 +++++++++++++++++-
application/models/helper/view.php | 8 +-
5 files changed, 501 insertions(+), 126 deletions(-)
create mode 100644 application/admin/views/scripts/news/move.phtml
diff --git a/application/admin/controllers/NewsController.php b/application/admin/controllers/NewsController.php
index 5d1770d1..772be9ab 100644
--- a/application/admin/controllers/NewsController.php
+++ b/application/admin/controllers/NewsController.php
@@ -8,6 +8,7 @@ class Admin_NewsController extends Zend_Controller_Action
$this->messenger=$this->_helper->getHelper('FlashMessenger');
$this->view->messages = $this->messenger->getMessages();
$this->_helper->layout->setLayout('administry');
+ $this->view->theme = new Theme();
}
function postDispatch()
{
@@ -628,7 +629,40 @@ class Admin_NewsController extends Zend_Controller_Action
return $newString;
}
-
+ public function moveAction()
+ {
+ $up = (int)$this->_getParam('up');
+ $down = (int)$this->_getParam('down');
+
+ include_once('helper/view.php');
+ include_once('ArchiveCategory.php');
+
+ if(empty($up) && empty($down))
+ {
+ view::Post("参数错误",$this,-1);
+ return true;
+ }
+
+ $category = new ArchiveCategory($this->db);
+
+ if(!empty($up))
+ {
+ $s = $category->move('up',$up);
+ }
+ if(!empty($down))
+ {
+ $s = $category->move('down',$down);
+ }
+
+ if(is_array($s))
+ {
+ $this->view->moved = $s;
+ }else{
+ view::Post($this,$s,-1);
+ }
+
+ return true;
+ }
}
diff --git a/application/admin/views/scripts/news/catlog.phtml b/application/admin/views/scripts/news/catlog.phtml
index 6dd5da93..c7bd805d 100644
--- a/application/admin/views/scripts/news/catlog.phtml
+++ b/application/admin/views/scripts/news/catlog.phtml
@@ -2,126 +2,128 @@
$this->headTitle($this->config->title->site);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
- $this->headScript()->appendFile('/js/jquery-1.7.min.js');
- $this->headLink()->appendStylesheet('/css/admin.css');
- $this->headScript()->appendFile('/js/jquery.colorbox-min.js');
- $this->headLink()->appendStylesheet('/css/author.css');
- $this->headLink()->appendStylesheet('/css/colorbox.css');
$this->breadcrumb('首页');
$this->breadcrumb('后台首页');
$this->breadcrumb('新闻中心');
$this->breadcrumb('栏目管理');
+ $this->theme->AppendPlus($this,"colorbox");
?>
-
-= $this->partial('news/left.phtml'); ?>
-
-
-msg or $this->messages) :?>
-
-msg) : ?>
-
msg; ?>
-messages): foreach($this->messages as $msg): ?>
-
-
-
-
-
-
-
-
- 栏目名称 |
- 栏目类型 |
- 栏目管理 |
-
-
-
- catlogs))
- {
- $top = 0;
- $deep = 0;
- foreach($this->catlogs as $k=>$v)
- {
- if($v[$this->deepField]>0)
- {
- $style = "text-indent:". $v[$this->deepField]*12 ."px;";
- }else{
- $style = "";
- }
- echo '
-
-
- |
-
- '.$v['ptype'].'
- |
-
- 浏览
- 文档
- 编辑
- 删除 |
-
';
- }
-
- }else{
- echo '暂无数据 | |
';
- }
- ?>
-
-
-
-
+
+
+
diff --git a/application/default/views/scripts/author/fund.phtml b/application/default/views/scripts/author/fund.phtml
index 4b5b96e7..3fbe7ad7 100644
--- a/application/default/views/scripts/author/fund.phtml
+++ b/application/default/views/scripts/author/fund.phtml
@@ -1,163 +1,167 @@
-headTitle($this->config->title->site);
-$this->headTitle($this->config->title->author);
-$this->headTitle()->setSeparator(' - ');
-$this->breadcrumb('首页');
-$this->breadcrumb('数据作者');
-$this->headLink()->appendStylesheet('/css/author.css');
-$this->breadcrumb('申请成为元数据作者');
-$this->breadcrumb()->setSeparator(' > ');
-$this->theme->AppendPlus($this,'colorbox');
-$this->theme->AppendPlus($this,'admin_plugin');
-?>
-
-
-
- = $this->partial('author/navi.phtml'); ?>
-
-
-
- md)) { ?>
-
- ct)) { ?>
-
为此数据添加项目
-
-
返回
-
点击“添加此项目”即可将项目添加到元数据
-
-
《= $this->md['title'] ?>》 的支持项目
-
-
-
-
- error)) { ?>
- AlertType)) $AlertType = "alert-error";else $AlertType = $this->AlertType;?>
-
-
×
- error)) { ?>
= $this->error ?>
-
- error as $v) { ?>
- - = $v ?>
-
-
-
-
-
- msg)) { ?>
-
- jump_url)) { ?>
-
-
-
-
- paginator)): ?>
-
-
-
= $this->paginator; ?>
-
-
-
-
-
-
+headTitle($this->config->title->site);
+$this->headTitle($this->config->title->author);
+$this->headTitle()->setSeparator(' - ');
+$this->breadcrumb('首页');
+$this->breadcrumb('数据作者');
+$this->headLink()->appendStylesheet('/css/author.css');
+$this->breadcrumb('申请成为元数据作者');
+$this->breadcrumb()->setSeparator(' > ');
+$this->theme->AppendPlus($this,'colorbox');
+$this->theme->AppendPlus($this,'admin_plugin');
+?>
+
+
+
+ = $this->partial('author/navi.phtml'); ?>
+
+
+
+ md)) { ?>
+
+ ct)) { ?>
+
为此数据添加项目
+
+
返回
+
点击“添加此项目”即可将项目添加到元数据
+
+
《= $this->md['title'] ?>》 的支持项目
+
+
+
+
+ error)) { ?>
+ AlertType)) $AlertType = "alert-error";else $AlertType = $this->AlertType;?>
+
+
×
+ error)) { ?>
= $this->error ?>
+
+ error as $v) { ?>
+ - = $v ?>
+
+
+
+
+
+ msg)) { ?>
+
+ jump_url)) { ?>
+
+
+
+
+ paginator)): ?>
+
+
+
= $this->paginator; ?>
+
+
+
+
+
+
diff --git a/application/default/views/scripts/author/navi.phtml b/application/default/views/scripts/author/navi.phtml
index 97828358..7aa38b97 100644
--- a/application/default/views/scripts/author/navi.phtml
+++ b/application/default/views/scripts/author/navi.phtml
@@ -1,20 +1,20 @@
-
diff --git a/application/default/views/scripts/author/fund.phtml b/application/default/views/scripts/author/fund.phtml
index 3fbe7ad7..3fbe0d9e 100644
--- a/application/default/views/scripts/author/fund.phtml
+++ b/application/default/views/scripts/author/fund.phtml
@@ -126,6 +126,12 @@ table thead tr th {background:#EBF2F6;}
+
+ md)) { ?>
+ 暂无数据,点击标题右侧添加按钮为此数据添加项目
+
+ 暂无数据
+
= $this->paginator; ?>
From ebe72051246cd96268615d48b88464ecaa73b3a9 Mon Sep 17 00:00:00 2001
From: wlx
Date: Fri, 24 May 2013 08:37:35 +0000
Subject: [PATCH 15/19] change ftp to ftp2.westgis.ac.cn
---
.../default/controllers/HeiheController.php | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/application/default/controllers/HeiheController.php b/application/default/controllers/HeiheController.php
index fcdc94a1..49b2491b 100644
--- a/application/default/controllers/HeiheController.php
+++ b/application/default/controllers/HeiheController.php
@@ -509,7 +509,7 @@ class HeiheController extends DataController
// 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)";
$this->db->query($sql,array($changelog,$u_id,$row['uuid']));
- file_get_contents("http://ftp1.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");
//自动添加数据分类为黑河
$sql="insert into datasource (uuid,sourceid) values(?,1)";
$sth=$this->db->prepare($sql);
@@ -613,8 +613,11 @@ class HeiheController extends DataController
//ftp路径
$homedir = "/disk1/WestDC/upload/".$uuid."/";
+ //ftp用户表
+ $ftptable=' pureftp ';//ftp2.westgis.ac.cn
- $sql = "SELECT * FROM proftpusers WHERE userid='$uname' ORDER BY pkid DESC";
+ //$sql = "SELECT * FROM proftpusers WHERE userid='$uname' ORDER BY pkid DESC";
+ $sql = "SELECT * FROM $ftptable WHERE userid='$uname' ORDER BY pkid DESC";
$sth = $this->db->prepare($sql);
$sth->execute();
$row = $sth->fetch();
@@ -624,7 +627,7 @@ class HeiheController extends DataController
//$old=umask(0);
//@mkdir($homedir,0777);
//umask($old);
- $page=file_get_contents('http://ftp1.westgis.ac.cn/proftp_upload.php?uuid='.$uuid);
+ $page=file_get_contents('http://ftp2.westgis.ac.cn/proftp_upload.php?uuid='.$uuid);
if (!empty($page)) die($page);//there are errors in visit ftp page
@@ -642,14 +645,15 @@ class HeiheController extends DataController
return true;
}else{
- $uid = 109;
+ $uid = 1002;
$gid = 1002;
$passwd = $this->genRandomString(16);
//$sql = "UPDATE proftpusers SET passwd=?,uid=?,gid=?,homedir=? WHERE userid=?";
//$sth = $this->db->prepare($sql);
//$rs = $sth->execute(array($passwd,$uid,$gid,$homedir,$uname));
- $sql="update proftpusers SET passwd='".$passwd."',uid=".$uid.",gid=".$gid.",homedir='".$homedir."' WHERE userid='".$uname."'";
+ //$sql="update proftpusers SET passwd='".$passwd."',uid=".$uid.",gid=".$gid.",homedir='".$homedir."' WHERE userid='".$uname."'";
+ $sql="update ".$ftptable." SET passwd='".$passwd."',uid=".$uid.",gid=".$gid.",homedir='".$homedir."' WHERE userid='".$uname."'";
$rs=$this->db->query($sql);
if($rs)
{
@@ -671,14 +675,15 @@ class HeiheController extends DataController
}
else{
- $uid = 109;
+ $uid = 1002;
$gid = 1002;
$passwd = $this->genRandomString(16);
//$sql = "INSERT INTO proftpusers (userid,passwd,uid,gid,homedir) VALUES (?,?,?,?,?)";
//$sth = $this->db->prepare($sql);
//$rs = $sth->execute(array($uname,$passwd,$uid,$gid,$homedir));
- $sql="insert into proftpusers (userid,passwd,uid,gid,homedir) values('".$uname."','".$passwd."',109,1002,'".$homedir."')";
+ //$sql="insert into proftpusers (userid,passwd,uid,gid,homedir) values('".$uname."','".$passwd."',109,1002,'".$homedir."')";
+ $sql="insert into ".$ftptalbe." (userid,passwd,uid,gid,homedir) values('".$uname."','".$passwd."',1002,1002,'".$homedir."')";
$rs=$this->db->query($sql);
if($rs)
{
From 13296214af81c9f0a0c1a34765478655ebb01e55 Mon Sep 17 00:00:00 2001
From: wlx
Date: Fri, 24 May 2013 08:39:32 +0000
Subject: [PATCH 16/19] chagne ftp1 to ftp2
---
application/default/views/scripts/heihe/submit-unsubmit.phtml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/application/default/views/scripts/heihe/submit-unsubmit.phtml b/application/default/views/scripts/heihe/submit-unsubmit.phtml
index de3271a2..db1f2755 100644
--- a/application/default/views/scripts/heihe/submit-unsubmit.phtml
+++ b/application/default/views/scripts/heihe/submit-unsubmit.phtml
@@ -97,7 +97,7 @@ function getFtp(uuid){
{
if(data.statu > 0)
{
- var html = '临时FTP帐号信息(此帐号仅对应当前数据集!)
ftp://ftp1.westgis.ac.cn/
'+
+ var html = '临时FTP帐号信息(此帐号仅对应当前数据集!)
ftp://ftp2.westgis.ac.cn/
'+
'用户名:'+data.user+
'
密码:'+data.passwd+'
'
+'或直接点击此链接
';
From 170df8fbeabf79702c5f035ab9cf8d88a4b4e283 Mon Sep 17 00:00:00 2001
From: wlx
Date: Fri, 24 May 2013 08:48:52 +0000
Subject: [PATCH 17/19] fix spell error
---
application/default/controllers/HeiheController.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/application/default/controllers/HeiheController.php b/application/default/controllers/HeiheController.php
index 49b2491b..6b13b8a3 100644
--- a/application/default/controllers/HeiheController.php
+++ b/application/default/controllers/HeiheController.php
@@ -683,7 +683,7 @@ class HeiheController extends DataController
//$sth = $this->db->prepare($sql);
//$rs = $sth->execute(array($uname,$passwd,$uid,$gid,$homedir));
//$sql="insert into proftpusers (userid,passwd,uid,gid,homedir) values('".$uname."','".$passwd."',109,1002,'".$homedir."')";
- $sql="insert into ".$ftptalbe." (userid,passwd,uid,gid,homedir) values('".$uname."','".$passwd."',1002,1002,'".$homedir."')";
+ $sql="insert into ".$ftptable." (userid,passwd,uid,gid,homedir) values('".$uname."','".$passwd."',1002,1002,'".$homedir."')";
$rs=$this->db->query($sql);
if($rs)
{
From 703c42f7781ebfd08c936ee6233ca589beedd324 Mon Sep 17 00:00:00 2001
From: wlx
Date: Fri, 24 May 2013 09:02:54 +0000
Subject: [PATCH 18/19] change ftp1 to ftp2
---
.../default/controllers/AuthorController.php | 19 +++++++++----------
.../views/scripts/author/newdata.phtml | 2 +-
2 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/application/default/controllers/AuthorController.php b/application/default/controllers/AuthorController.php
index e8240980..0b9d6f0e 100644
--- a/application/default/controllers/AuthorController.php
+++ b/application/default/controllers/AuthorController.php
@@ -2384,7 +2384,7 @@ class AuthorController extends Zend_Controller_Action
// 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)";
$this->db->query($sql,array($changelog,$u_id,$row['uuid']));
- file_get_contents("http://ftp1.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);
@@ -2484,8 +2484,12 @@ class AuthorController extends Zend_Controller_Action
//ftp路径
$homedir = "/disk1/WestDC/upload/".$uuid."/";
+ //ftp用户表
+ $ftptable=' pureftp ';//ftp2.westgis.ac.cn
+ $uid = 1002;
+ $gid = 1002;
- $sql = "SELECT * FROM proftpusers WHERE userid='$uname' ORDER BY pkid DESC";
+ $sql = "SELECT * FROM $ftptable WHERE userid='$uname' ORDER BY pkid DESC";
$sth = $this->db->prepare($sql);
$sth->execute();
$row = $sth->fetch();
@@ -2495,7 +2499,7 @@ class AuthorController extends Zend_Controller_Action
//$old=umask(0);
//@mkdir($homedir,0777);
//umask($old);
- $page=file_get_contents('http://ftp1.westgis.ac.cn/proftp_upload.php?uuid='.$uuid);
+ $page=file_get_contents('http://ftp2.westgis.ac.cn/proftp_upload.php?uuid='.$uuid);
if (!empty($page)) die($page);//there are errors in visit ftp page
@@ -2513,14 +2517,11 @@ class AuthorController extends Zend_Controller_Action
return true;
}else{
- $uid = 109;
- $gid = 1002;
-
$passwd = $this->genRandomString(16);
//$sql = "UPDATE proftpusers SET passwd=?,uid=?,gid=?,homedir=? WHERE userid=?";
//$sth = $this->db->prepare($sql);
//$rs = $sth->execute(array($passwd,$uid,$gid,$homedir,$uname));
- $sql="update proftpusers SET passwd='".$passwd."',uid=".$uid.",gid=".$gid.",homedir='".$homedir."' WHERE userid='".$uname."'";
+ $sql="update ".$ftptable." SET passwd='".$passwd."',uid=".$uid.",gid=".$gid.",homedir='".$homedir."' WHERE userid='".$uname."'";
$rs=$this->db->query($sql);
if($rs)
{
@@ -2542,14 +2543,12 @@ class AuthorController extends Zend_Controller_Action
}
else{
- $uid = 109;
- $gid = 1002;
$passwd = $this->genRandomString(16);
//$sql = "INSERT INTO proftpusers (userid,passwd,uid,gid,homedir) VALUES (?,?,?,?,?)";
//$sth = $this->db->prepare($sql);
//$rs = $sth->execute(array($uname,$passwd,$uid,$gid,$homedir));
- $sql="insert into proftpusers (userid,passwd,uid,gid,homedir) values('".$uname."','".$passwd."',109,1002,'".$homedir."')";
+ $sql="insert into ".$ftptable." (userid,passwd,uid,gid,homedir) values('".$uname."','".$passwd."',".$uid.",".$gid.",'".$homedir."')";
$rs=$this->db->query($sql);
if($rs)
{
diff --git a/application/default/views/scripts/author/newdata.phtml b/application/default/views/scripts/author/newdata.phtml
index abe534ac..b9452845 100644
--- a/application/default/views/scripts/author/newdata.phtml
+++ b/application/default/views/scripts/author/newdata.phtml
@@ -96,7 +96,7 @@ function getFtp(uuid){
{
if(data.statu > 0)
{
- var html = '临时FTP帐号信息(此帐号仅对应当前数据集!)
ftp://ftp1.westgis.ac.cn/
'+
+ var html = '临时FTP帐号信息(此帐号仅对应当前数据集!)
ftp://ftp2.westgis.ac.cn/
'+
'用户名:'+data.user+
'
密码:'+data.passwd+'
'
+'或直接点击此链接
';
From c34347d14cf3da9b611a575f31ce17e93d088795 Mon Sep 17 00:00:00 2001
From: Li Jianxuan
Date: Fri, 24 May 2013 09:16:40 +0000
Subject: [PATCH 19/19] =?UTF-8?q?=E5=90=8E=E5=8F=B0=E8=AF=84=E5=AE=A1?=
=?UTF-8?q?=E6=84=8F=E8=A7=81=E5=8F=8D=E9=A6=88=E4=B8=AD=E6=B7=BB=E5=8A=A0?=
=?UTF-8?q?=E4=BA=86=E5=88=B0westdc=E9=82=AE=E7=AE=B1=E7=9A=84=E6=9A=97?=
=?UTF-8?q?=E9=80=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
application/admin/controllers/ReviewController.php | 1 +
1 file changed, 1 insertion(+)
diff --git a/application/admin/controllers/ReviewController.php b/application/admin/controllers/ReviewController.php
index cd642a33..0a58ec17 100644
--- a/application/admin/controllers/ReviewController.php
+++ b/application/admin/controllers/ReviewController.php
@@ -1557,6 +1557,7 @@ class Admin_ReviewController extends Zend_Controller_Action
{
$mail->addTo($v);
}
+ $mail->addBcc($this->view->config->service->email);
$mail->setSubject($title);
if($mail->send())