diff --git a/application/admin/controllers/DataController.php b/application/admin/controllers/DataController.php index ed125cf4..27584057 100755 --- a/application/admin/controllers/DataController.php +++ b/application/admin/controllers/DataController.php @@ -1788,8 +1788,8 @@ class Admin_DataController extends Zend_Controller_Action $id = $this->_getParam('attupdate'); - $files=new files(); - $msg = $files -> upload($this->view->config->upload,$_FILES['Filedata'],empty($uuid)?'file':'md'); + $files=new Files(); + $msg = $files -> upload($_FILES['Filedata'],empty($uuid)?'file/':'md/',true); if(empty($msg['error'])) { @@ -1797,7 +1797,7 @@ class Admin_DataController extends Zend_Controller_Action $filename = $msg['db_path']; $filesize = $msg['file_size']; $filedesc = $this->_request->getParam('filedesc'); - $filetype = $msg['file_type']; + $filetype = 'md'; $realname = $msg['realname']; @@ -2116,8 +2116,8 @@ class Admin_DataController extends Zend_Controller_Action exit(); } - $files=new files(); - $msg = $files -> upload($this->view->config->upload,$_FILES['Filedata'],empty($uuid)?'file':'md'); + $files=new Files(); + $msg = $files -> upload($_FILES['Filedata'],empty($uuid)?'file/':'md/',true); if(empty($msg['error'])) { @@ -2125,7 +2125,7 @@ class Admin_DataController extends Zend_Controller_Action $filename = $msg['db_path']; $filesize = $msg['file_size']; $filedesc = $this->_request->getParam('filedesc'); - $filetype = $msg['file_type']; + $filetype = 'md'; $realname = $msg['realname']; @@ -2184,10 +2184,6 @@ class Admin_DataController extends Zend_Controller_Action $rs = $this->db->query($sql); $atts = $rs->fetchAll(); - foreach($atts as $k=>$v) - { - $atts[$k]['html']= $v['realname'].'['. round($v['filesize']/1024,2) .' kb]
'; - } echo Zend_Json::encode($atts); exit(); }else diff --git a/application/admin/views/scripts/data/attachmentsadd.phtml b/application/admin/views/scripts/data/attachmentsadd.phtml index c6a37c0a..5660ef70 100644 --- a/application/admin/views/scripts/data/attachmentsadd.phtml +++ b/application/admin/views/scripts/data/attachmentsadd.phtml @@ -7,12 +7,7 @@ $this->breadcrumb('后台首页'); $this->breadcrumb('数据管理'); $this->breadcrumb()->setSeparator(' > '); - $this->headLink()->appendStylesheet('/static/js/uploadify/uploadify.css'); - $this->headScript()->appendFile('/static/js/jquery-1.7.2.min.js'); - $this->headScript()->appendFile('/js/jquery.colorbox-min.js'); - $this->headLink()->appendStylesheet('/css/colorbox.css'); - $this->headScript()->appendFile('/static/js/uploadify/swfobject.js'); - $this->headScript()->appendFile('/static/js/uploadify/jquery.uploadify.v2.1.4.min.js'); + $this->theme->AppendPlus($this,"uploadify"); ?>
partial('data/left.phtml'); ?> @@ -21,7 +16,7 @@
返回元数据附件列表 -查看元数据 +查看元数据 返回附件管理
@@ -30,7 +25,8 @@

注:可选择多个文件
-

+
+

@@ -38,65 +34,79 @@