From 8faf4836eeabd7d8c822d3dc6146b38d7f5c456e Mon Sep 17 00:00:00 2001 From: Li Jianxuan Date: Thu, 9 May 2013 03:53:27 +0000 Subject: [PATCH 01/14] =?UTF-8?q?=E4=BF=AE=E6=94=B9DOI=E6=8E=92=E5=BA=8F?= =?UTF-8?q?=EF=BC=8C=E6=B7=BB=E5=8A=A0=E4=BF=AE=E6=94=B9email=E7=9A=84?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../default/controllers/AccountController.php | 134 ++++++++++++------ .../default/controllers/AuthorController.php | 6 +- .../views/scripts/account/secure.phtml | 110 +++++++------- application/models/data/Doi.php | 2 +- application/models/helper/view.php | 2 +- 5 files changed, 154 insertions(+), 100 deletions(-) diff --git a/application/default/controllers/AccountController.php b/application/default/controllers/AccountController.php index ecd01e20..c9f790af 100755 --- a/application/default/controllers/AccountController.php +++ b/application/default/controllers/AccountController.php @@ -114,6 +114,7 @@ class AccountController extends Zend_Controller_Action { $this->view->pageID = "account-secure"; + include_once("helper/view.php"); include_once("Users.php"); $usr = new Users($this->db); @@ -124,60 +125,99 @@ class AccountController extends Zend_Controller_Action $uid = $user->id; } + $opt = $this->_getParam('opt'); $submit = $this->_getParam('submit'); - if(!empty($submit)) + if(empty($opt)) { - $data = $this->AccountSecureParamFilter(); - - $this->view->AlertType = "alert-error"; - if(strlen($data['password'])>18 || strlen($data['new_password'])>18) + $this->view->section = "password"; + if(!empty($submit)) { - $this->view->error = "密码过长"; - return true; - } - if(strlen($data['new_password'])<=6 || strlen($data['new_password_confrim'])<=6) - { - $this->view->error = "密码过短,请输入大于6位的密码"; - return true; - } - if(md5($data['new_password']) != md5($data['new_password_confrim'])) - { - $this->view->error = "两次输入的密码不相同"; - return true; - } - - $sql = "SELECT password FROM users WHERE id=$uid"; - $rs = $this->db->query($sql); - $row = $rs->fetch(); - - if(md5($data['password']) != $row['password']) - { - $this->view->error = "原密码不正确"; - return true; - } - - $data['password'] = md5($data['new_password']); - - unset($data['new_password']); - unset($data['new_password_confrim']); - - if($this->db->update("users",$data,"id=$uid")) - { - $this->view->AlertType = "alert-success"; - $this->view->msg = "修改成功!"; - $this->view->jump_url = "/account/secure"; - return true; - }else{ + $data = $this->AccountSecureParamFilter(); + $this->view->AlertType = "alert-error"; - $this->view->error = "修改失败,请重试"; - $this->view->info = $data; - return true; + if(strlen($data['password'])>18 || strlen($data['new_password'])>18) + { + $this->view->error = view::Error("密码过长"); + return true; + } + if(strlen($data['new_password'])<=6 || strlen($data['new_password_confrim'])<=6) + { + $this->view->error = view::Error("密码过短,请输入大于6位的密码"); + return true; + } + if(md5($data['new_password']) != md5($data['new_password_confrim'])) + { + $this->view->error = view::Error("两次输入的密码不相同"); + return true; + } + + $sql = "SELECT password FROM users WHERE id=$uid"; + $rs = $this->db->query($sql); + $row = $rs->fetch(); + + if(md5($data['password']) != $row['password']) + { + $this->view->error = view::Error("原密码不正确"); + return true; + } + + $data['password'] = md5($data['new_password']); + + unset($data['new_password']); + unset($data['new_password_confrim']); + + if($this->db->update("users",$data,"id=$uid")) + { + view::Post($this,array("content"=>'修改成功!','url'=>'/account/secure')); + return true; + }else{ + $this->view->error = view::Error("修改失败"); + return true; + } + }else{ + $this->view->info = $usr->getUserInfo($uid); } - }else{ - $this->view->info = $usr->getUserInfo($uid); - } + }//password + if($opt == "email") + { + $this->view->section = "email"; + if(!empty($submit)) + { + $email = $this->_getParam('email'); + $password = $this->_getParam('password'); + + if(!preg_match("/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/i",$email)) + { + $this->view->error = view::Error("错误的邮箱格式"); + return true; + } + + $sql = "SELECT password FROM users WHERE id=$uid"; + $rs = $this->db->query($sql); + $row = $rs->fetch(); + + if(md5($password) != $row['password']) + { + $this->view->error = view::Error("原密码错误"); + return true; + } + + $data['email'] = $email; + + if($this->db->update("users",$data,"id=$uid")) + { + view::Post($this,array("content"=>'修改成功!','url'=>'/account/secure')); + return true; + }else{ + $this->view->error = view::Error("修改失败"); + return true; + } + }else{ + $this->view->info = $usr->getUserInfo($uid); + } + }//email } function AccountSecureParamFilter(){ diff --git a/application/default/controllers/AuthorController.php b/application/default/controllers/AuthorController.php index 6ce39d74..b4c7c80c 100644 --- a/application/default/controllers/AuthorController.php +++ b/application/default/controllers/AuthorController.php @@ -4060,11 +4060,11 @@ class AuthorController extends Zend_Controller_Action $this->view->data = $data; $info = $doi->checkinfo($data['info']); if(!is_array($info)){ - $this->view->error = view::Error('alert-error',$info,-1); + $this->view->error = view::Error($info); return true; }else{ $data['info'] = $info; - $data['info'] = $doi->sksort($data['info'],"order",SORT_DESC); + $data['info'] = $doi->sksort($data['info'],"order",SORT_ASC); } $uid = view::User('id'); $state = $doi->update($data,$uuid,$uid); @@ -4073,7 +4073,7 @@ class AuthorController extends Zend_Controller_Action $this->view->msg = view::Msg('alert-success',"修改成功!",'/author/doi/uuid/'.$uuid); return false; }else{ - $this->view->error = view::Error('alert-error',"修改失败",-1); + $this->view->error = view::Error("修改失败"); return false; } } diff --git a/application/default/views/scripts/account/secure.phtml b/application/default/views/scripts/account/secure.phtml index 93d707d4..9ce66cb2 100644 --- a/application/default/views/scripts/account/secure.phtml +++ b/application/default/views/scripts/account/secure.phtml @@ -13,56 +13,70 @@

修改安全性设置


- msg)) { ?> - jump_url)) {?> -
- × - msg ?> -
- jump_url)) { ?> -
如果页面没有自动跳转请点击这里 - - - - +
+ error)) { ?> -
- × - error)) { ?>

error ?>

-
    - error as $v) { ?> -
  • - -
- -
+ error ?> -
-
- -
- - 如果要修改密码,请输入原密码 -
+
+
section)) echo 'active'?>" id="tab2"> +
+ +
+ +
+ +
+
+
+ +
+ + 如果要修改邮箱,请输入原密码 +
+
+
+ + + +
+
-
- -
- -
+
+
" id="tab3"> +
+
+
+ +
+ + 如果要修改密码,请输入原密码 +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ + + +
+
-
- -
- -
-
-
- - - -
- - +
-
+
+
+
diff --git a/application/models/data/Doi.php b/application/models/data/Doi.php index 8fd74392..4196a0c1 100644 --- a/application/models/data/Doi.php +++ b/application/models/data/Doi.php @@ -108,7 +108,7 @@ class Doi extends Zend_Controller_Plugin_Abstract 'organization'=>$orgs[$k], 'author_en'=>$authors_en[$k], 'organization_en'=>$orgs_en[$k], - 'order'=> 5*count($authors)-($k*5) + 'order'=> count($authors)+($k-1) ); } //include_once("helper/view.php"); diff --git a/application/models/helper/view.php b/application/models/helper/view.php index 8718edb5..b54364d6 100644 --- a/application/models/helper/view.php +++ b/application/models/helper/view.php @@ -37,7 +37,7 @@ class view extends Zend_Controller_Plugin_Abstract return $html; } - static function Error($type,$content,$url=''){ + static function Error($content,$type='',$url=''){ if(empty($type)) { $AlertType = "alert-error"; From 4b95fa48f51dd0f90f7f3c48b322e0a7dda15c8c Mon Sep 17 00:00:00 2001 From: Li Jianxuan Date: Thu, 9 May 2013 03:55:46 +0000 Subject: [PATCH 02/14] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9D=83=E9=99=90?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/models/data/Doi.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/application/models/data/Doi.php b/application/models/data/Doi.php index 4196a0c1..92182264 100644 --- a/application/models/data/Doi.php +++ b/application/models/data/Doi.php @@ -39,11 +39,14 @@ class Doi extends Zend_Controller_Plugin_Abstract } function update($data,$uuid,$uid=0){ - include_once("data/Author.php"); - $author = new Author($this->db); - if($author->checkAuthor($uuid,$uid)==false) + if(!empty($uid)) { - return "您没有权限"; + include_once("data/Author.php"); + $author = new Author($this->db); + if($author->checkAuthor($uuid,$uid)==false) + { + return "您没有权限"; + } } $doi_info = $this->view($uuid); if($doi_info == false) From 126a7b8f6a05f9c98f78a0a8489bb65fce458c93 Mon Sep 17 00:00:00 2001 From: Li Jianxuan Date: Thu, 9 May 2013 07:12:56 +0000 Subject: [PATCH 03/14] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86doi=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/controllers/DataController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/admin/controllers/DataController.php b/application/admin/controllers/DataController.php index f445184a..6923d025 100755 --- a/application/admin/controllers/DataController.php +++ b/application/admin/controllers/DataController.php @@ -3630,7 +3630,7 @@ class Admin_DataController extends Zend_Controller_Action return true; }else{ $data['info'] = $info; - $data['info'] = $doi->sksort($data['info'],"order",SORT_DESC); + $data['info'] = $doi->sksort($data['info'],"order",SORT_ASC); } $state = $doi->update($data,$uuid); if($state) From 5f514c5263a05553e8b7a66d9103e36c2b482f2c Mon Sep 17 00:00:00 2001 From: Li Jianxuan Date: Thu, 9 May 2013 08:20:44 +0000 Subject: [PATCH 04/14] =?UTF-8?q?=E4=BF=AE=E6=94=B9DOI=E4=B8=AD=E7=9A=84?= =?UTF-8?q?=E7=A9=BA=E6=A0=BC=E5=92=8C=E9=80=97=E5=8F=B7=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/controllers/DataController.php | 4 ++-- application/models/data/Doi.php | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/application/admin/controllers/DataController.php b/application/admin/controllers/DataController.php index 6923d025..7f6ac475 100755 --- a/application/admin/controllers/DataController.php +++ b/application/admin/controllers/DataController.php @@ -3626,7 +3626,7 @@ class Admin_DataController extends Zend_Controller_Action $this->view->data = $data; $info = $doi->checkinfo($data['info']); if(!is_array($info)){ - $this->view->error = view::Error('alert-error',$info,-1); + $this->view->error = view::Error($info); return true; }else{ $data['info'] = $info; @@ -3638,7 +3638,7 @@ class Admin_DataController extends Zend_Controller_Action $this->view->msg = view::Msg('alert-success',"修改成功!",'/admin/data/doi/uuid/'.$uuid); return false; }else{ - $this->view->error = view::Error('alert-error',"修改失败",-1); + $this->view->error = view::Error("修改失败"); return false; } } diff --git a/application/models/data/Doi.php b/application/models/data/Doi.php index 92182264..2b47d4c0 100644 --- a/application/models/data/Doi.php +++ b/application/models/data/Doi.php @@ -82,10 +82,10 @@ class Doi extends Zend_Controller_Plugin_Abstract $orgs_en = array(); foreach($data['info'] as $k=>$v) { - $authors[$v['order']] = $v['author']; - $orgs[$v['order']] = $v['organization']; - $authors_en[$v['order']] = $v['author_en']; - $orgs_en[$v['order']] = $v['organization_en']; + $authors[$v['order']] = str_replace(",",",",$v['author']); + $orgs[$v['order']] = str_replace(",",",",$v['organization']); + $authors_en[$v['order']] = str_replace(",",",",$v['author_en']); + $orgs_en[$v['order']] = str_replace(",",",",$v['organization_en']); } $authors = "{".join(",",$authors)."}"; $orgs = "{".join(",",$orgs)."}"; @@ -107,10 +107,10 @@ class Doi extends Zend_Controller_Plugin_Abstract foreach($authors as $k=>$v) { $info[$k] = array( - 'author'=>$authors[$k], - 'organization'=>$orgs[$k], - 'author_en'=>$authors_en[$k], - 'organization_en'=>$orgs_en[$k], + 'author'=>str_replace("\"","",$authors[$k]), + 'organization'=>str_replace("\"","",$orgs[$k]), + 'author_en'=>str_replace("\"","",$authors_en[$k]), + 'organization_en'=>str_replace("\"","",$orgs_en[$k]), 'order'=> count($authors)+($k-1) ); } From 92324ade271db44359e07edb257948f1a4a1e91d Mon Sep 17 00:00:00 2001 From: Li Jianxuan Date: Thu, 9 May 2013 10:01:13 +0000 Subject: [PATCH 05/14] =?UTF-8?q?=E4=BF=AE=E6=94=B9DOI=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E7=9A=84=E5=8F=AA=E8=AF=BB=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/views/scripts/data/doi-add.phtml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/application/admin/views/scripts/data/doi-add.phtml b/application/admin/views/scripts/data/doi-add.phtml index b896c4c5..fcee2f92 100644 --- a/application/admin/views/scripts/data/doi-add.phtml +++ b/application/admin/views/scripts/data/doi-add.phtml @@ -33,13 +33,13 @@ $this->theme->AppendPlus($this,'colorbox');
- " /> + " />
- " /> + " />
@@ -57,13 +57,13 @@ $this->theme->AppendPlus($this,'colorbox');
- " /> + " />
- " /> + " />
From fc22b57557ad01ed7de20dab07e54b7037af90cb Mon Sep 17 00:00:00 2001 From: wlx Date: Thu, 9 May 2013 15:39:41 +0000 Subject: [PATCH 06/14] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E4=B8=AD=E5=BF=83=E5=90=8D=E7=A7=B0=EF=BC=9B=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=97=A0=E7=BC=A9=E7=95=A5=E5=9B=BE=E7=9A=84=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/default/controllers/ServiceController.php | 2 +- application/models/MetadataPDF.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/application/default/controllers/ServiceController.php b/application/default/controllers/ServiceController.php index 7fd559b9..e4da41cc 100644 --- a/application/default/controllers/ServiceController.php +++ b/application/default/controllers/ServiceController.php @@ -443,7 +443,7 @@ class ServiceController extends Zend_Controller_Action $pdf->metadata=$row; $pdf->Draw(); $pdf->setTitle($row['title'],true); - $pdf->setAuthor('中国西部环境与生态科学数据中心',true); + $pdf->setAuthor('寒区旱区科学数据中心',true); $this->getResponse()->setHeader('Content-Type', 'application/pdf'); //->setHeader('Content-Disposition','inline; filename="'.$row['title'].'.pdf"'); $pdf->Output($row['title'].'.pdf','I'); diff --git a/application/models/MetadataPDF.php b/application/models/MetadataPDF.php index b7ab0fd3..aa2a5402 100644 --- a/application/models/MetadataPDF.php +++ b/application/models/MetadataPDF.php @@ -28,10 +28,10 @@ class MetadataPDF extends PDF_Unicode $this->Image('http://westdc.westgis.ac.cn/images/westdc_logo_white.gif',80,30,0,0,'','http://westdc.westgis.ac.cn/'); $this->SetFont('uGB','B',20); $this->setXY(0,70); - $this->Cell(0,0,'中国西部环境与生态科学数据中心',0,2,'C',false,'http://westdc.westgis.ac.cn/'); + $this->Cell(0,0,'寒区旱区科学数据中心',0,2,'C',false,'http://westdc.westgis.ac.cn/'); $imgurl='http://'.$_SERVER['SERVER_NAME'].'/service/bigthumb/uuid/'.$this->metadata['uuid']; $imgsize=getimagesize($imgurl); - if ($imgsize) + if (this->metadata['filetype'] && $imgsize) { if ($imgsize[0]/$imgsize[1]>200/180) $this->Image($imgurl,5,110,200,0,$this->metadata['filetype']); @@ -104,7 +104,7 @@ class MetadataPDF extends PDF_Unicode $this->ln(5); $x=$this->getX();$y=$this->getY(); $w=50*abs(($this->metadata['north']-$this->metadata['south'])/($this->metadata['west']-$this->metadata['east'])); - $this->Image('http://'.$_SERVER['SERVER_NAME'].'/service/thumb/uuid/'.$this->metadata['uuid'],$x+80+$w,$y,0,50,$this->metadata['filetype']); + if ($this->metadata['filetype']) $this->Image('http://'.$_SERVER['SERVER_NAME'].'/service/thumb/uuid/'.$this->metadata['uuid'],$x+80+$w,$y,0,50,$this->metadata['filetype']); $this->rect($x+50,$y,$w,50); $this->setXY($x+55,$y-4); $this->write(5,'N:'.$this->metadata['north']); From 86bbfeea38775720624fa406c340eb473b86c364 Mon Sep 17 00:00:00 2001 From: wlx Date: Thu, 9 May 2013 16:03:41 +0000 Subject: [PATCH 07/14] fix sql error when there is no data in xml table --- application/default/controllers/ServiceController.php | 2 +- application/models/MetadataPDF.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/application/default/controllers/ServiceController.php b/application/default/controllers/ServiceController.php index e4da41cc..52f59339 100644 --- a/application/default/controllers/ServiceController.php +++ b/application/default/controllers/ServiceController.php @@ -375,7 +375,7 @@ class ServiceController extends Zend_Controller_Action { $sql="select x.data,m.title,m.citation,m.suppinfo,m.doi,m.filesize,m.fileformat,m.south,m.east,m.west,m.north,m.timebegin,m.timeend,m.title_en,m.uuid,m.description,g.id,m.projection,t.filetype, cc.name as category, cc.name_zh as category_zh - from xml x left join metadata m on m.id=x.id left join thumbnail t on x.id=t.id + from metadata m left join xml x on m.id=x.id left join thumbnail t on x.id=t.id left join category c on c.id=m.id left join categorycode cc on c.code=cc.code left join geonetworkmetadata g on g.uuid=m.uuid where m.uuid=".$this->db->quote($uuid); $row=$this->db->fetchRow($sql); diff --git a/application/models/MetadataPDF.php b/application/models/MetadataPDF.php index aa2a5402..32670194 100644 --- a/application/models/MetadataPDF.php +++ b/application/models/MetadataPDF.php @@ -31,7 +31,7 @@ class MetadataPDF extends PDF_Unicode $this->Cell(0,0,'寒区旱区科学数据中心',0,2,'C',false,'http://westdc.westgis.ac.cn/'); $imgurl='http://'.$_SERVER['SERVER_NAME'].'/service/bigthumb/uuid/'.$this->metadata['uuid']; $imgsize=getimagesize($imgurl); - if (this->metadata['filetype'] && $imgsize) + if ($this->metadata['filetype'] && $imgsize) { if ($imgsize[0]/$imgsize[1]>200/180) $this->Image($imgurl,5,110,200,0,$this->metadata['filetype']); From b9de4d435f60a672719cbef81dc9f849cd6c344a Mon Sep 17 00:00:00 2001 From: wlx Date: Thu, 9 May 2013 16:13:15 +0000 Subject: [PATCH 08/14] change doc conversion sql --- application/default/controllers/ServiceController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/default/controllers/ServiceController.php b/application/default/controllers/ServiceController.php index 52f59339..a348c236 100644 --- a/application/default/controllers/ServiceController.php +++ b/application/default/controllers/ServiceController.php @@ -269,7 +269,7 @@ class ServiceController extends Zend_Controller_Action $review=$this->_request->getParam('review'); if (!empty($uuid)) { - $sql="select x.data,m.title,m.description,g.id,m.projection from xml x left join metadata m on m.id=x.id left join geonetworkmetadata g on g.uuid=m.uuid where m.uuid=".$this->db->quote($uuid); + $sql="select g.data,m.title,m.description,g.id,m.projection from metadata m left join xml x on m.id=x.id left join 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.uuid=?"; $sql=$this->db->quoteInto($sql,$uuid); From d0adb5ac5397813e16fcef57a450a03cfd3ecdc8 Mon Sep 17 00:00:00 2001 From: wlx Date: Thu, 9 May 2013 16:36:49 +0000 Subject: [PATCH 09/14] test doc converison --- application/default/controllers/ServiceController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/default/controllers/ServiceController.php b/application/default/controllers/ServiceController.php index a348c236..2dffa930 100644 --- a/application/default/controllers/ServiceController.php +++ b/application/default/controllers/ServiceController.php @@ -340,9 +340,9 @@ class ServiceController extends Zend_Controller_Action if (preg_match("/MSIE/", $ua)) { $dispostion = 'attachment; filename="'.urlencode($row['title']).'.doc"'; } else if (preg_match("/Firefox/", $ua)) { - $dispostion; + //$dispostion; } else { - $dispostion = 'attachment; filename*="'.urlencode($row['title']).'.doc"'; + //$dispostion = 'attachment; filename*="'.urlencode($row['title']).'.doc"'; } $content.=$xslt->transformToXML($dom); From 9bf53a378f629a82d60ac77f623b0c6eade0364c Mon Sep 17 00:00:00 2001 From: wlx Date: Thu, 9 May 2013 16:43:15 +0000 Subject: [PATCH 10/14] test doc download in safari --- application/default/controllers/ServiceController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/default/controllers/ServiceController.php b/application/default/controllers/ServiceController.php index 2dffa930..afff27e5 100644 --- a/application/default/controllers/ServiceController.php +++ b/application/default/controllers/ServiceController.php @@ -342,7 +342,7 @@ class ServiceController extends Zend_Controller_Action } else if (preg_match("/Firefox/", $ua)) { //$dispostion; } else { - //$dispostion = 'attachment; filename*="'.urlencode($row['title']).'.doc"'; + $dispostion = 'attachment; filename='.rawurlencode($row['title']).'.doc'; } $content.=$xslt->transformToXML($dom); From dd2a992086828f244ba8c510a8eb04f9baa17e7f Mon Sep 17 00:00:00 2001 From: wlx Date: Thu, 9 May 2013 16:44:34 +0000 Subject: [PATCH 11/14] change rawurlencode --- application/default/controllers/ServiceController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/default/controllers/ServiceController.php b/application/default/controllers/ServiceController.php index afff27e5..30b2e01a 100644 --- a/application/default/controllers/ServiceController.php +++ b/application/default/controllers/ServiceController.php @@ -342,7 +342,7 @@ class ServiceController extends Zend_Controller_Action } else if (preg_match("/Firefox/", $ua)) { //$dispostion; } else { - $dispostion = 'attachment; filename='.rawurlencode($row['title']).'.doc'; + $dispostion = 'attachment; filename='.urlencode($row['title']).'.doc'; } $content.=$xslt->transformToXML($dom); From df2cf12784ebf7a2b06a0abbdc5b7710ceaa9abc Mon Sep 17 00:00:00 2001 From: wlx Date: Thu, 9 May 2013 16:50:11 +0000 Subject: [PATCH 12/14] try raw encode title --- application/default/controllers/ServiceController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/default/controllers/ServiceController.php b/application/default/controllers/ServiceController.php index 30b2e01a..f67219ed 100644 --- a/application/default/controllers/ServiceController.php +++ b/application/default/controllers/ServiceController.php @@ -342,7 +342,7 @@ class ServiceController extends Zend_Controller_Action } else if (preg_match("/Firefox/", $ua)) { //$dispostion; } else { - $dispostion = 'attachment; filename='.urlencode($row['title']).'.doc'; + $dispostion = 'attachment; filename='.$row['title'].'.doc'; } $content.=$xslt->transformToXML($dom); From 81d22f6475f6a4e9ddfe22e559748da777c37651 Mon Sep 17 00:00:00 2001 From: wlx Date: Thu, 9 May 2013 16:52:05 +0000 Subject: [PATCH 13/14] try --- application/default/controllers/ServiceController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/default/controllers/ServiceController.php b/application/default/controllers/ServiceController.php index f67219ed..5abb15ae 100644 --- a/application/default/controllers/ServiceController.php +++ b/application/default/controllers/ServiceController.php @@ -342,7 +342,7 @@ class ServiceController extends Zend_Controller_Action } else if (preg_match("/Firefox/", $ua)) { //$dispostion; } else { - $dispostion = 'attachment; filename='.$row['title'].'.doc'; + $dispostion = 'attachment; filename="'.$row['title'].'.doc"'; } $content.=$xslt->transformToXML($dom); From f1ea3066497ab76c14b235d3ac1fea8d61427586 Mon Sep 17 00:00:00 2001 From: wlx Date: Fri, 10 May 2013 01:55:46 +0000 Subject: [PATCH 14/14] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=90=8E=E5=8F=B0?= =?UTF-8?q?=E8=AF=84=E5=AE=A1=E7=9A=84=E5=B1=95=E7=A4=BA=EF=BC=8C=E5=B0=86?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=91=98=E4=BF=A1=E6=81=AF=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E5=87=BA=E6=9D=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/controllers/ReviewController.php | 9 +++++---- application/admin/views/scripts/review/inreview.phtml | 4 +++- application/admin/views/scripts/review/reviewed.phtml | 4 +++- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/application/admin/controllers/ReviewController.php b/application/admin/controllers/ReviewController.php index 940f884b..c79e2953 100644 --- a/application/admin/controllers/ReviewController.php +++ b/application/admin/controllers/ReviewController.php @@ -282,9 +282,10 @@ class Admin_ReviewController extends Zend_Controller_Action $this->view->keyword = $keyword; } - $sql = "select m.id,md.title,m.status,m.uuid from mdstatus m - right join metadata md on md.uuid=m.uuid - where m.status in (2,3,4) $searchjoin"; + $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 + 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); $rows = $rs->fetchAll(); @@ -591,7 +592,7 @@ class Admin_ReviewController extends Zend_Controller_Action $sql = "select m.id,md.uuid,md.title,u.username,u.realname,m.status from mdstatus m right join metadata md on md.uuid=m.uuid left join users u on u.id=m.userid - where m.status in (0,1,2,3,4) and u.id='$userid' $searchjoin order by m.status desc"; + where m.status in (0,1,2,3,4) and u.id='$userid' $searchjoin order by m.status desc,m.ts_accepted desc"; $re = $this->db->query($sql); $rows = $re->fetchAll(); diff --git a/application/admin/views/scripts/review/inreview.phtml b/application/admin/views/scripts/review/inreview.phtml index 9ae8bf83..3712e39e 100644 --- a/application/admin/views/scripts/review/inreview.phtml +++ b/application/admin/views/scripts/review/inreview.phtml @@ -33,8 +33,9 @@ - + + paginator)): ?> @@ -43,6 +44,7 @@ +
标题标题 状态管理员 操作
查看详细 邀请专家 更改管理员 diff --git a/application/admin/views/scripts/review/reviewed.phtml b/application/admin/views/scripts/review/reviewed.phtml index d3c74486..46a1bcad 100644 --- a/application/admin/views/scripts/review/reviewed.phtml +++ b/application/admin/views/scripts/review/reviewed.phtml @@ -32,7 +32,8 @@ - + + @@ -41,6 +42,7 @@ paginator as $item): ?> +
标题标题管理员 结束时间 操作
查看评审意见 重新评审