From 8f4bddc82d737ba4c06aeefdae45c37617cb7381 Mon Sep 17 00:00:00 2001 From: wlx Date: Thu, 18 Sep 2014 05:19:23 +0000 Subject: [PATCH] merge heihedata branch r4982 - r5009 into metadata-en-2.0 --- .../admin/controllers/ReviewController.php | 6 +- .../admin/controllers/SysController.php | 50 +- .../admin/controllers/TestController.php | 80 ---- .../admin/controllers/UserController.php | 35 +- .../admin/controllers/WatermdController.php | 441 ------------------ .../admin/views/scripts/data/doi-add.phtml | 33 +- .../admin/views/scripts/down/offlineapp.phtml | 15 +- .../admin/views/scripts/index/index.phtml | 8 - .../admin/views/scripts/news/newsadd.phtml | 2 + .../admin/views/scripts/sys/gnmetadata.phtml | 31 ++ .../admin/views/scripts/sys/left.phtml | 1 + .../admin/views/scripts/test/doi.phtml | 39 -- .../admin/views/scripts/test/index.phtml | 19 - .../admin/views/scripts/test/left.phtml | 9 - .../admin/views/scripts/test/nodoiwater.phtml | 38 -- .../admin/views/scripts/test/reftest.phtml | 40 -- .../admin/views/scripts/test/source.phtml | 41 -- .../admin/views/scripts/user/list.phtml | 7 + .../views/scripts/watermd/citetitle.phtml | 43 -- .../admin/views/scripts/watermd/contact.phtml | 60 --- .../views/scripts/watermd/filesize.phtml | 44 -- .../admin/views/scripts/watermd/index.phtml | 32 -- .../admin/views/scripts/watermd/keyword.phtml | 45 -- .../admin/views/scripts/watermd/left.phtml | 11 - .../admin/views/scripts/watermd/replace.phtml | 43 -- .../views/scripts/watermd/uselimit.phtml | 43 -- .../default/controllers/HiwaterController.php | 55 ++- .../default/views/scripts/footer.phtml | 3 +- .../default/views/scripts/heihe/view.phtml | 21 +- .../default/views/scripts/hiwater/navi.phtml | 223 +++------ .../default/views/scripts/hiwater/view.phtml | 21 +- .../views/scripts/search/advance.phtml | 8 +- .../module/Users/Operation/LoginOperate.php | 6 +- application/module/Users/Users.php | 52 ++- htdocs/index.php | 3 +- 35 files changed, 367 insertions(+), 1241 deletions(-) delete mode 100644 application/admin/controllers/TestController.php delete mode 100644 application/admin/controllers/WatermdController.php create mode 100644 application/admin/views/scripts/sys/gnmetadata.phtml delete mode 100644 application/admin/views/scripts/test/doi.phtml delete mode 100644 application/admin/views/scripts/test/index.phtml delete mode 100644 application/admin/views/scripts/test/left.phtml delete mode 100644 application/admin/views/scripts/test/nodoiwater.phtml delete mode 100644 application/admin/views/scripts/test/reftest.phtml delete mode 100644 application/admin/views/scripts/test/source.phtml delete mode 100644 application/admin/views/scripts/watermd/citetitle.phtml delete mode 100644 application/admin/views/scripts/watermd/contact.phtml delete mode 100644 application/admin/views/scripts/watermd/filesize.phtml delete mode 100644 application/admin/views/scripts/watermd/index.phtml delete mode 100644 application/admin/views/scripts/watermd/keyword.phtml delete mode 100644 application/admin/views/scripts/watermd/left.phtml delete mode 100644 application/admin/views/scripts/watermd/replace.phtml delete mode 100644 application/admin/views/scripts/watermd/uselimit.phtml diff --git a/application/admin/controllers/ReviewController.php b/application/admin/controllers/ReviewController.php index b89b3d54..ab8f9519 100644 --- a/application/admin/controllers/ReviewController.php +++ b/application/admin/controllers/ReviewController.php @@ -816,7 +816,7 @@ class Admin_ReviewController extends Zend_Controller_Action right join en.metadata md on md.uuid=m.uuid left join users u on u.id=m.userid left join en.geonetworkmetadata gn on m.uuid=gn.uuid - where status=0 $searchjoin order by m.ts_created desc"; + where m.status=0 $searchjoin order by m.ts_created desc"; $re = $this->db->query($sql); $rows = $re->fetchAll(); @@ -877,7 +877,7 @@ class Admin_ReviewController extends Zend_Controller_Action $sql = "select m.id,md.title,md.uuid,u.username,u.realname,m.status from en.mdstatus m right join en.metadata md on md.uuid=m.uuid left join users u on u.id=m.userid - where status=-1 $searchjoin"; + where m.status=-1 $searchjoin"; $re = $this->db->query($sql); $rows = $re->fetchAll(); @@ -917,7 +917,7 @@ class Admin_ReviewController extends Zend_Controller_Action $sql = "select m.id,md.title,md.uuid,u.username,u.realname,m.status,m.ts_finished from en.mdstatus m right join en.metadata md on md.uuid=m.uuid left join users u on u.id=m.userid - where status=5 $searchjoin order by m.ts_finished desc"; + where m.status=5 $searchjoin order by m.ts_finished desc"; $re = $this->db->query($sql); $rows = $re->fetchAll(); diff --git a/application/admin/controllers/SysController.php b/application/admin/controllers/SysController.php index fffc88f0..23819a28 100644 --- a/application/admin/controllers/SysController.php +++ b/application/admin/controllers/SysController.php @@ -8,7 +8,7 @@ class Admin_SysController extends Zend_Controller_Action $this->messenger=$this->_helper->getHelper('FlashMessenger'); $this->view->messages = $this->messenger->getMessages(); $this->_helper->layout->setLayout('administry');//新UI - $this->view->theme = new Theme(); + $this->view->theme = new Theme(); } function postDispatch() @@ -707,6 +707,54 @@ left join dataset ds on ds.uuid=m.uuid //$this->_helper->viewRenderer('problem-md'); } $this->view->activeID="btn-".$ac; + } + + //GeoNetwork中元数据批量替换操作 + function gnmetadataAction() + { + $this->wdb=Zend_Db::factory($this->view->config->geonetwork); + set_time_limit(0); + $ac=$this->_request->getParam('ac'); + //use preg_replace to replace the string + $form=new ReplaceForm(); + if ($this->_request->isPost()) { + $formdata=$this->_request->getPost(); + $pattern=$formdata["pattern"]; + $form->populate($formdata); + if (substr($pattern,0,1)!='/') + { + $pattern='/'.$pattern.'/m'; + } + $replace=$formdata["replace"]; + if (isset($formdata["test"])) + { + $this->view->test=preg_replace($pattern,$replace,$formdata["source"]); + } elseif (isset($formdata["submit"])) { + $sql="select uuid,data from metadata where istemplate = 'n'"; + $rows=$this->wdb->fetchAll($sql); + $this->view->deal=array(); + foreach($rows as $k=>$row) + { + //do the replace + $new_data=preg_replace($pattern,$replace,$row['data']); + //防止正则错误 + if (!empty($new_data)) + { + $sql="update metadata set data=? where uuid='".$row['uuid']."'"; + if ($this->wdb->exec($this->wdb->quoteInto($sql,$new_data))) + { + $dom = new DOMDocument(); + $dom->loadXML($row['data']); + $title=$dom->getElementsByTagName('resTitle')->item(0)->nodeValue; + $deal['uuid']=$row['uuid']; + $deal['title']=$title; + $this->view->deal[]=$deal; + } + } + } + } + } + $this->view->form=$form; } } diff --git a/application/admin/controllers/TestController.php b/application/admin/controllers/TestController.php deleted file mode 100644 index f47212ab..00000000 --- a/application/admin/controllers/TestController.php +++ /dev/null @@ -1,80 +0,0 @@ -db=Zend_Registry::get('db'); - $this->view->config = Zend_Registry::get('config'); - $this->messenger=$this->_helper->getHelper('FlashMessenger'); - $this->view->messages = $this->messenger->getMessages(); - $this->_helper->layout->setLayout('administry'); - $this->wdb=Zend_Db::factory('Pdo_Pgsql', array('host'=> '210.77.68.252','username' => 'wlz','password' => 'glacier','dbname'=> 'new_geonetwork')); - } - function postDispatch() - { - $this->view->messages = $this->messenger->getMessages(); - } - function indexAction() - { - //其他连接 - } - - - //测试文献的下载链接是否正确 - function reftestAction() - { - $sql="select * from reference where link<>''"; - $rows=$this->db->query($sql); - foreach($rows as $row) - { - if (substr($row['link'],0,1)=='/') - { - if (!file_exists("http://westdc.westgis.ac.cn".$row['link'])) - { - $ref[]=$row; - } - } elseif (!file_exists($row['link'])) { - $ref[]=$row; - } - } - $this->view->ref=$ref; - } - - //检查DOI是否有重复 - function doiAction() - { - $sql="select doi,uuid,title from metadata where doi<>'' order by doi"; - $rows=$this->db->fetchAll($sql); - $sql="select distinct(doi) from metadata where doi<>'' order by doi"; - $drows=$this->db->fetchAll($sql); - $c=0; - if (count($rows)!=count($drows)) - { - foreach($rows as $k=>$row) - { - if ($row['doi']!=$drows[$k-$c]['doi']) - { - $c++; - $doi[]=$rows[$k-1]; - $doi[]=$row; - } - } - $this->view->doi=$doi; - } - } - - //检查DOI是否有重复 - function nodoiwaterAction() - { - $sql="select uuid,title from metadata where source='0595169a-279e-4b95-819f-129d0ba4280d' and doi='' order by title"; - $this->view->rows=$this->db->fetchAll($sql); - } - - //检查source不符合要求 - function sourceAction() - { - $sql="select uuid,title,source from metadata where title ilike '黑河综合遥感联合试验%' and source=''"; - $this->view->rows=$this->db->fetchAll($sql); - } -} - diff --git a/application/admin/controllers/UserController.php b/application/admin/controllers/UserController.php index 9106f7c7..d372f8cb 100755 --- a/application/admin/controllers/UserController.php +++ b/application/admin/controllers/UserController.php @@ -1,4 +1,6 @@ _getParam('uid'); + $users = new Users\Users(); + + $status = $users->ban($id); + if($status === TRUE) + { + view::Post($this,"操作成功",-1); + }else{ + view::Post($this,"操作失败",-1); + } + } + + public function unbanAction() + { + $id = $this->_getParam('uid'); + $users = new Users\Users(); + + $status = $users->unban($id); + if($status === TRUE) + { + view::Post($this,"操作成功",-1); + }else{ + view::Post($this,"操作失败",-1); + } + + } + + public function jsonexit($data){ $this->getResponse()->setHeader('Content-Type', 'application/json')->appendBody(json_encode($data,JSON_NUMERIC_CHECK)); diff --git a/application/admin/controllers/WatermdController.php b/application/admin/controllers/WatermdController.php deleted file mode 100644 index d8b98e39..00000000 --- a/application/admin/controllers/WatermdController.php +++ /dev/null @@ -1,441 +0,0 @@ -db=Zend_Registry::get('db'); - $this->view->config = Zend_Registry::get('config'); - $this->messenger=$this->_helper->getHelper('FlashMessenger'); - $this->view->messages = $this->messenger->getMessages(); - $this->_helper->layout->setLayout('administry'); - $this->wdb=Zend_Db::factory($this->view->config->geonetwork); - set_time_limit(0); - } - function postDispatch() - { - $this->view->messages = $this->messenger->getMessages(); - } - function indexAction() - { - //其他连接 - } - - function replaceAction() - { - //use preg_replace to replace the string - $form=new ReplaceForm(); - if ($this->_request->isPost()) { - $formdata=$this->_request->getPost(); - $pattern=$formdata["pattern"]; - $form->populate($formdata); - if (substr($pattern,0,1)!='/') - { - $pattern='/'.$pattern.'/m'; - } - $replace=$formdata["replace"]; - if (isset($formdata["test"])) - { - $this->view->test=preg_replace($pattern,$replace,$formdata["source"]); - } elseif (isset($formdata["submit"])) - { - $sql="select uuid,data from metadata where istemplate = 'n'"; - $rows=$this->wdb->fetchAll($sql); - $this->view->deal=array(); - foreach($rows as $k=>$row) - { - //do the replace - $new_data=preg_replace($pattern,$replace,$row['data']); - //防止正则错误 - if (!empty($new_data)) - { - $sql="update metadata set data=? where uuid='".$row['uuid']."'"; - if ($this->wdb->exec($this->wdb->quoteInto($sql,$new_data))) - { - $dom = new DOMDocument(); - $dom->loadXML($row['data']); - $title=$dom->getElementsByTagName('resTitle')->item(0)->nodeValue; - $deal['uuid']=$row['uuid']; - $deal['title']=$title; - $this->view->deal[]=$deal; - } - } - } - } - } - $this->view->form=$form; - } - - //替换关键词 - function keywordAction() - { - //use preg_replace to replace the string - $form=new ReplaceForm(); - $form->pattern->setLabel('原关键词'); - $form->replace->setLabel('替换关键词'); - if ($this->_request->isPost()) { - $formdata=$this->_request->getPost(); - $pattern=$formdata["pattern"]; - $form->populate($formdata); - //if (substr($pattern,0,1)!='/') - { - $pattern='/\'.$pattern.'\<\/keyword\>/m'; - } - $replace=''.$formdata["replace"].''; - if (isset($formdata["test"])) - { - $this->view->test=preg_replace($pattern,$replace,$formdata["source"]); - } elseif (isset($formdata["submit"])) - { - $sql="select uuid,data from metadata where istemplate = 'n'"; - $rows=$this->wdb->fetchAll($sql); - $this->view->deal=array(); - foreach($rows as $k=>$row) - { - //do the replace - $new_data=preg_replace($pattern,$replace,$row['data']); - //防止正则错误 - if (!empty($new_data)) - { - $sql="update metadata set data=? where uuid='".$row['uuid']."'"; - if ($this->wdb->exec($this->wdb->quoteInto($sql,$new_data))) - { - $dom = new DOMDocument(); - $dom->loadXML($row['data']); - $title=$dom->getElementsByTagName('resTitle')->item(0)->nodeValue; - $deal['uuid']=$uuid; - $deal['title']=$title; - $this->view->deal[]=$deal; - } - } - } - } - } - $this->view->form=$form; - } - - //替换标题和英文标题到数据引用中,以标题为准 - function citetitleAction() - { - $form=new ReplaceForm(); - $form->setElements(array($form->source,$form->test,$form->submit)); - - if ($this->_request->isPost()) { - $formdata=$this->_request->getPost(); - $form->populate($formdata); - if (isset($formdata["test"])) - { - $dom = new DOMDocument(); - $dom->loadXML($formdata['source']); - $root = $dom->getElementsByTagName('Metadata'); - $xpath = new DOMXpath($dom); - $title_key=$xpath->query("//Metadata/dataIdInfo/idCitation/resTitle"); - $title=$title_key->item(0)->nodeValue; - $title_en_path=$xpath->query("//Metadata/dataIdInfo/idCitation/resAltTitle"); - $title_en=$title_en_path->item(0)->nodeValue; - $otherCitDet=$xpath->query("//Metadata/dataIdInfo/idCitation/otherCitDet"); - $other=$otherCitDet->item(0)->nodeValue; - $other_cn=mb_strstr($other,'[',true); - $title_o=mb_strstr($other_cn,'.',false); - $title_ol=substr($title_o,1,-4); - $title_old=mb_strstr($title_ol,'.',true); - $other_eng=mb_strstr($other,'[',false); - $titlen_o=mb_strstr($other_eng,'.',false); - $titlen_ol=substr($titlen_o,1,-4); - $titlen_old=mb_strstr($titlen_ol,',',true); - $new_other=str_replace(array($title_old,$titlen_old),array($title,$title_en),$other); - $otherCitDet->item(0)->nodeValue=$new_other; - $this->view->test= $dom->saveXML($root->item(0)); - } elseif (isset($formdata["submit"])) - { - $sql="select uuid,data from metadata where istemplate = 'n'"; - $rows=$this->wdb->fetchAll($sql); - $this->view->deal=array(); - foreach($rows as $k=>$row) - { - //do the replace - $dom = new DOMDocument(); - $dom->loadXML($row['data']); - $uuid = $row['uuid']; - $root = $dom->getElementsByTagName('Metadata'); - $xpath = new DOMXpath($dom); - $title_key=$xpath->query("//Metadata/dataIdInfo/idCitation/resTitle"); - $title=$title_key->item(0)->nodeValue; - $title_en_path=$xpath->query("//Metadata/dataIdInfo/idCitation/resAltTitle"); - $title_en=$title_en_path->item(0)->nodeValue; - $otherCitDet=$xpath->query("//Metadata/dataIdInfo/idCitation/otherCitDet"); - $other=$otherCitDet->item(0)->nodeValue; - $other_cn=mb_strstr($other,'[',true); - $title_o=mb_strstr($other_cn,'.',false); - $title_ol=substr($title_o,1,-4); - $title_old=mb_strstr($title_ol,'.',true); - $other_eng=mb_strstr($other,'[',false); - $titlen_o=mb_strstr($other_eng,'.',false); - $titlen_ol=substr($titlen_o,1,-4); - $titlen_old=mb_strstr($titlen_ol,',',true); - $new_other=str_replace(array($title_old,$titlen_old),array($title,$title_en),$other); - $otherCitDet->item(0)->nodeValue=$new_other; - $new_data = $dom->saveXML($root->item(0)); - //防止错误 - if (!empty($new_data)) - { - $sql="update metadata set data=? where uuid='".$row['uuid']."'"; - if ($this->wdb->exec($this->wdb->quoteInto($sql,$new_data))) - { - $dom = new DOMDocument(); - $dom->loadXML($row['data']); - $deal['uuid']=$uuid; - $deal['title']=$title; - $this->view->deal[]=$deal; - } - } - } - } - } - $this->view->form=$form; - } - - //文件大小处理 - function filesizeAction() - { - $form=new ReplaceForm(); - $form->pattern->setLabel('文件大小'); - $form->setElements(array($form->pattern,$form->source,$form->test,$form->submit)); - - if ($this->_request->isPost()) { - $formdata=$this->_request->getPost(); - $form->populate($formdata); - if (isset($formdata["test"])) - { - $dom = new DOMDocument(); - $dom->loadXML($formdata['source']); - $root = $dom->getElementsByTagName('Metadata'); - $xpath = new DOMXpath($dom); - $title_key=$xpath->query("//Metadata/dataIdInfo/idCitation/resTitle"); - $title=$title_key->item(0)->nodeValue; - $transize_path=$xpath->query("//Metadata/distInfo/distTranOps/transSize"); - $transize_path->item(0)->nodeValue=$formdata['pattern']; - $this->view->test= $dom->saveXML($root->item(0)); - } elseif (isset($formdata["submit"])) - { - $sql="select uuid,data from metadata where istemplate = 'n'"; - $rows=$this->wdb->fetchAll($sql); - $this->view->deal=array(); - $sql="select update_filesize();"; - $this->db->exec($sql); - foreach($rows as $k=>$row) - { - //do the replace - $dom = new DOMDocument(); - $dom->loadXML($row['data']); - $root = $dom->getElementsByTagName('Metadata'); - $uuid = $row['uuid']; - $xpath = new DOMXpath($dom); - $title_key=$xpath->query("//Metadata/dataIdInfo/idCitation/resTitle"); - $title=$title_key->item(0)->nodeValue; - $transize_path=$xpath->query("//Metadata/distInfo/distTranOps/transSize"); - $sql="select filesize from metadata where uuid = ?"; - $this->db->setFetchMode(Zend_Db::FETCH_OBJ); - $row=$this->db->fetchRow($sql,array($uuid)); - $transize_path->item(0)->nodeValue=$row->filesize; - $new_data = $dom->saveXML(); - //防止错误 - if (!empty($new_data)) - { - $sql="update metadata set data=? where uuid='$uuid'"; - if ($this->wdb->exec($this->wdb->quoteInto($sql,$new_data))) - { - $deal['uuid']=$uuid; - $deal['title']=$title; - $this->view->deal[]=$deal; - } - } - } - } - } - $this->view->form=$form; - } - - //修改限制使用说明 - //useLimit可以是多项的 - function uselimitAction() - { - $form=new ReplaceForm(); - $form->pattern->setLabel('使用声明'); - $form->setElements(array($form->pattern,$form->source,$form->test,$form->submit)); - - if ($this->_request->isPost()) { - $formdata=$this->_request->getPost(); - $form->populate($formdata); - $limit_text=$formdata['pattern']; - if (isset($formdata["test"])) - { - $dom = new DOMDocument(); - $dom->loadXML($formdata['source']); - $root = $dom->getElementsByTagName('Metadata'); - $xpath = new DOMXpath($dom); - $title_key=$xpath->query("//Metadata/dataIdInfo/idCitation/resTitle"); - $title=$title_key->item(0)->nodeValue; - $uselimits=$xpath->query("//Metadata/dataIdInfo/resConst/Consts/useLimit"); - $do_uselimit=1; - foreach($uselimits as $limit) - { - //已经有声明,则不需要处理 - if ($limit->nodeValue==$limit_text || (strlen($limit->nodeValue)>3)) - $do_uselimit=0; - } - if ($do_uselimit==1) - { - $new_uselimit=$dom->createElement('useLimit',$limit_text); - $new_resconst=$dom->createElement('resConst'); - $new_const=$dom->createElement('Consts'); - $new_const->appendChild($new_uselimit); - $new_resconst->appendChild($new_const); - $desckey=$xpath->query("//Metadata/dataIdInfo/descKeys")->item(0); - $resconst=$xpath->query("//Metadata/dataIdInfo/resConst")->item(0); - if ($resconst) - $resconst->parentNode->insertBefore($new_resconst,$resconst); - else - $desckey->parentNode->insertBefore($new_resconst,$desckey); - $new_data=$dom->saveXML(); - } - $this->view->test= $new_data; - } elseif (isset($formdata["submit"])) - { - $sql="select uuid,data from metadata where istemplate = 'n'"; - $rows=$this->wdb->fetchAll($sql); - $this->view->deal=array(); - foreach($rows as $k=>$row) - { - //do the replace - $dom = new DOMDocument(); - $dom->loadXML($row['data']); - $root = $dom->getElementsByTagName('Metadata'); - $uuid = $row['uuid']; - $xpath = new DOMXpath($dom); - $title_key=$xpath->query("//Metadata/dataIdInfo/idCitation/resTitle"); - $title=$title_key->item(0)->nodeValue; - $uselimits=$xpath->query("//Metadata/dataIdInfo/resConst/Consts/useLimit"); - $do_uselimit=1; - foreach($uselimits as $limit) - { - //已经有声明,则不需要处理 - if ($limit->nodeValue==$limit_text || (strlen($limit->nodeValue)>3)) - $do_uselimit=0; - } - if ($do_uselimit==1) - { - $new_uselimit=$dom->createElement('useLimit',$limit_text); - $new_resconst=$dom->createElement('resConst'); - $new_const=$dom->createElement('Consts'); - $new_const->appendChild($new_uselimit); - $new_resconst->appendChild($new_const); - $desckey=$xpath->query("//Metadata/dataIdInfo/descKeys")->item(0); - $resconst=$xpath->query("//Metadata/dataIdInfo/resConst")->item(0); - if ($resconst) - $resconst->parentNode->insertBefore($new_resconst,$resconst); - else - $desckey->parentNode->insertBefore($new_resconst,$desckey); - $new_data=$dom->saveXML(); - //防止错误 - if (!empty($new_data)) - { - $sql="update metadata set data=? where uuid='".$row['uuid']."'"; - if ($this->wdb->exec($this->wdb->quoteInto($sql,$new_data))) - { - $deal['uuid']=$uuid; - $deal['title']=$title; - $this->view->deal[]=$deal; - } - } - } - } - } - } - $this->view->form=$form; - } - - //联系人信息替换 - function contactAction() - { - if ($this->_request->isPost()) { - $formdata=$this->_request->getPost(); - if (isset($formdata["test"])) - { - $this->view->test=$this->contactReplace($formdata["testxml"],$formdata); - } elseif (isset($formdata["submit"])) - { - $sql="select uuid,data from metadata where istemplate = 'n' and data like '%".$formdata['oldname']."%'"; - $rows=$this->wdb->fetchAll($sql); - $this->view->deal=array(); - foreach($rows as $row) - { - //do the replace - $new_data=$this->contactReplace($row["data"],$formdata); - //防止错误 - if (!empty($new_data)) - { - $sql="update metadata set data=? where uuid='".$row['uuid']."'"; - if ($this->wdb->exec($this->wdb->quoteInto($sql,$new_data))) - { - $dom = new DOMDocument(); - $dom->loadXML($row['data']); - $title=$dom->getElementsByTagName('resTitle')->item(0)->nodeValue; - $deal['uuid']=$row['uuid']; - $deal['title']=$title; - $this->view->deal[]=$deal; - } - } - } - } - $this->view->formdata=$formdata; - } - } - - private function contactReplace($xml,$replace) - { - $dom = new DOMDocument(); - $dom->loadXML($xml); - $xpath = new DOMXpath($dom); - $contacts=$xpath->query('//rpIndName'); - foreach($contacts as $contact) - { - if ($contact->nodeValue==$replace['oldname']) - { - $newrpIndName=$dom->createElement('rpIndName',$replace['name']); - $newrpOrgName=$dom->createElement('rpOrgName',$replace['unit']); - $newrpCntInfo=$dom->createElement('rpCntInfo'); - $newcntPhone=$dom->createElement('cntPhone'); - $newrpCntInfo->appendChild($newcntPhone); - $newvoiceNum=$dom->createElement('voiceNum',$replace['voicenum']); - $newcntPhone->appendChild($newvoiceNum); - $newcntAddress=$dom->createElement('cntAddress'); - $newrpCntInfo->appendChild($newcntAddress); - $newdelPoint=$dom->createElement('delPoint',$replace['delpoint']); - $newcntAddress->appendChild($newdelPoint); - $newcity=$dom->createElement('city',$replace['city']); - $newcntAddress->appendChild($newcity); - $newarea=$dom->createElement('adminArea',$replace['adminarea']); - $newcntAddress->appendChild($newarea); - $newpostCode=$dom->createElement('postCode',$replace['postcode']); - $newcntAddress->appendChild($newpostCode); - $newcountry=$dom->createElement('country',$replace['country']); - $newcntAddress->appendChild($newcountry); - $neweMailAdd=$dom->createElement('eMailAdd',$replace['email']); - $newcntAddress->appendChild($neweMailAdd); - - $rporg=$xpath->query('rpOrgName',$contact->parentNode); - $contact->parentNode->removeChild($rporg->item(0)); - $rpcnt=$xpath->query('rpCntInfo',$contact->parentNode); - $contact->parentNode->removeChild($rpcnt->item(0)); - - $contact->parentNode->insertBefore($newrpIndName,$contact); - $contact->parentNode->insertBefore($newrpOrgName,$contact); - $contact->parentNode->insertBefore($newrpCntInfo,$contact); - - $contact->parentNode->removeChild($contact); - } - } - return $dom->saveXML(); - } -} - diff --git a/application/admin/views/scripts/data/doi-add.phtml b/application/admin/views/scripts/data/doi-add.phtml index 948c5e3c..b0484e8e 100644 --- a/application/admin/views/scripts/data/doi-add.phtml +++ b/application/admin/views/scripts/data/doi-add.phtml @@ -81,7 +81,7 @@ $this->theme->AppendPlus($this,'colorbox'); data['info']) || !is_array($this->data['info'])) {?> -
+
@@ -114,7 +114,7 @@ $this->theme->AppendPlus($this,'colorbox');
1){ ?> - +
@@ -122,11 +122,11 @@ $this->theme->AppendPlus($this,'colorbox');
-
- -
+
+ +
@@ -149,21 +149,22 @@ function addinput(){ var now_index = $('.infocontrol').length; var index = now_index + 1; html = '
' - + '
' - + '
' - + '
' - + '
' - + '
' - + '
' - + '' - + '
'; + +'
' + +'
' + +'
' + +'
' + +'
' + +'
' + +'' + +'
'; now_index = null; index = null; $('.infocontrol').last().after(html); } function RmInput(e){ $e = $(e); - $e.parent('div').parent('div.infocontrol').remove(); + $e.parent().parent().parent().parent().parent('div.infocontrol').remove(); + } \ No newline at end of file diff --git a/application/admin/views/scripts/down/offlineapp.phtml b/application/admin/views/scripts/down/offlineapp.phtml index 91078a24..c53e7143 100644 --- a/application/admin/views/scripts/down/offlineapp.phtml +++ b/application/admin/views/scripts/down/offlineapp.phtml @@ -69,12 +69,17 @@

数据清单:

原始申请表 - - ">收到 - + + + 收到 + + 通过 + 删除 - 拒绝 + + 拒绝 + 重置 上传签字申请表 @@ -111,8 +116,6 @@

-P.@.[zb(5)].Zz -

Cannot find the metadata.

diff --git a/application/default/views/scripts/hiwater/navi.phtml b/application/default/views/scripts/hiwater/navi.phtml index 57fbb7aa..429e2c8d 100644 --- a/application/default/views/scripts/hiwater/navi.phtml +++ b/application/default/views/scripts/hiwater/navi.phtml @@ -1,17 +1,18 @@ - +