示例#1
0
 public function indexAction()
 {
     $opts = array('root' => BASE_PATH . '/uploads/data/', 'URL' => 'uploads/data/', 'rootAlias' => $this->translate('Home'), 'uploadAllow' => array('image/', 'application/pdf', 'application/msword', 'application/vnd.openxmlformats', 'application/xml', 'application/vnd.ms-powerpoint'), 'uploadDeny' => array('application/'), 'uploadOrder' => 'deny,allow', 'mimeDetect' => 'jo');
     $flm = new Helper_Elfinder($opts);
     $flm->run();
     $this->noViewRenderer(true);
 }
 public function indexAction()
 {
     $opts = array('root' => BASE_PATH . '/uploads/data/', 'URL' => 'uploads/data/', 'rootAlias' => $this->translate('Home'), 'disabled' => array(), 'uploadAllow' => array('image/', 'application/pdf', 'application/msword', 'application/vnd.openxmlformats', 'application/xml', 'application/vnd.ms-powerpoint'), 'uploadDeny' => array('application/'), 'uploadOrder' => 'deny,allow', 'mimeDetect' => 'jo');
     if (!WM_Users::allow('create', $this->getRequest()->getController())) {
         $opts['disabled'] = array_merge($opts['disabled'], array('rotateRight', 'rotateLeft', 'extract', 'archive', 'upload', 'copy', 'mkdir', 'mkfile', 'rename', 'paste', 'rm', 'duplicate', 'edit', 'resize'));
     } else {
         if (!WM_Users::allow('edit', $this->getRequest()->getController())) {
             $opts['disabled'] = array_merge($opts['disabled'], array('rotateRight', 'rotateLeft', 'extract', 'archive', 'upload', 'copy', 'mkdir', 'mkfile', 'rename', 'paste', 'rm', 'duplicate', 'edit', 'resize'));
         }
     }
     $flm = new Helper_Elfinder($opts);
     $flm->run();
     $this->noViewRenderer(true);
 }