diff --git a/application/admin/controllers/DataController.php b/application/admin/controllers/DataController.php index 8f199708..d35a3351 100755 --- a/application/admin/controllers/DataController.php +++ b/application/admin/controllers/DataController.php @@ -4028,7 +4028,7 @@ class Admin_DataController extends Zend_Controller_Action $data['info'] = $info; $data['info'] = $doi->sksort($data['info'],"order",SORT_ASC); } - $state = $doi->update($data,$uuid); + $state = $doi->update_en($data,$uuid); if($state) { $this->view->msg = view::Msg('alert-success',"修改成功!",'/admin/data/doi/uuid/'.$uuid); diff --git a/application/admin/views/scripts/data/doi-add.phtml b/application/admin/views/scripts/data/doi-add.phtml index 11da9d56..00f56737 100644 --- a/application/admin/views/scripts/data/doi-add.phtml +++ b/application/admin/views/scripts/data/doi-add.phtml @@ -68,38 +68,20 @@ $this->theme->AppendPlus($this,'colorbox'); " class="form-control"/> -
- -
- " class="form-control" /> -
-
-
- -
- " class="form-control" /> -
-
data['info']) || !is_array($this->data['info'])) {?>
-
- -
- +
-
- -
- +
@@ -114,15 +96,13 @@ $this->theme->AppendPlus($this,'colorbox');
-
- +
-
- +
1){ ?> @@ -163,11 +143,9 @@ function addinput(){ var index = now_index + 1; html = '
' +'
' - +'
' - +'
' + +'
' +'
' - +'
' - +'
' + +'
' +'' +'
'; now_index = null; diff --git a/application/models/data/Doi.php b/application/models/data/Doi.php index 31e6eeae..7a92c5e1 100644 --- a/application/models/data/Doi.php +++ b/application/models/data/Doi.php @@ -83,6 +83,47 @@ class Doi extends Zend_Controller_Plugin_Abstract } } } + + function update_en($data,$uuid,$uid=0){ + if(!empty($uid)) + { + 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) + { + return $this->add($data); + }else { + $this->data_process_in($data); + //include_once("helper/view.php"); + //view::Dump($data); + include_once("helper/dbh.php"); + $dbh = new dbh($this->db); + if(is_numeric($uuid)) + { + $condition = " id=$uuid "; + }else{ + $condition = " uuid='$uuid' "; + } + $data['publisher_en']=$data['publisher']; + $data['publisher']=''; + $data['title_en']=$data['title']; + $data['title']=''; + $state = $dbh->update($this->tbl_doi,$data,$condition,true); + + if( $state == true) + { + return true; + }else{ + return $state; + } + } + } function data_process_in(&$data){ $authors = array();