Example #1
0
 public function init($role = null, $intake, $allowed)
 {
     $this->_fileTypes = (require_once '/modal/config/file_types.php');
     // test if file-upload ajax call
     if (isset($_GET['upload']) && $_GET['upload'] == '1' && File::checkPermissions($role)) {
         $this->ajaxUpload();
     }
     $this->_repository = isset($intake) ? Config::get('shared_folder') . DS . $intake : Config::get('shared_folder');
     if (isset($allowed)) {
         $this->_allowedPaths = $allowed;
     }
     self::$_role = $role;
     $_SESSION['simple_auth']['cryptsalt'] = Config::get('encryption_salt');
     // handle actions (copy, paste, delete, rename etc.)
     $this->actions();
     $this->changeDirectory();
     // get current directory file-list
     return $this->getDirectoryList();
 }