configure() 보호된 메소드

By default set thumbnails path and image manipulation library.
저자: Dmitry (dio) Levashov
protected configure ( ) : void
리턴 void
 /**
  * Configure after successfull mount.
  *
  * @return void
  * @author Dmitry (dio) Levashov
  **/
 protected function configure()
 {
     $this->aroot = realpath($this->root);
     $root = $this->stat($this->root);
     if ($this->options['quarantine']) {
         $this->attributes[] = array('pattern' => '~^' . preg_quote(DIRECTORY_SEPARATOR . $this->options['quarantine']) . '$~', 'read' => false, 'write' => false, 'locked' => true, 'hidden' => true);
     }
     // chek thumbnails path
     if ($this->options['tmbPath']) {
         $this->options['tmbPath'] = strpos($this->options['tmbPath'], DIRECTORY_SEPARATOR) === false ? $this->root . DIRECTORY_SEPARATOR . $this->options['tmbPath'] : $this->_normpath($this->options['tmbPath']);
     }
     parent::configure();
     // if no thumbnails url - try detect it
     if ($root['read'] && !$this->tmbURL && $this->URL) {
         if (strpos($this->tmbPath, $this->root) === 0) {
             $this->tmbURL = $this->URL . str_replace(DIRECTORY_SEPARATOR, '/', substr($this->tmbPath, strlen($this->root) + 1));
             if (preg_match("|[^/?&=]\$|", $this->tmbURL)) {
                 $this->tmbURL .= '/';
             }
         }
     }
     // check quarantine dir
     if (!empty($this->options['quarantine'])) {
         $this->quarantine = $this->root . DIRECTORY_SEPARATOR . $this->options['quarantine'];
         if (!is_dir($this->quarantine) && !$this->_mkdir($this->root, $this->options['quarantine']) || !is_writable($this->quarantine)) {
             $this->archivers['extract'] = array();
             $this->disabled[] = 'extract';
         }
     } else {
         $this->archivers['extract'] = array();
         $this->disabled[] = 'extract';
     }
 }
 protected function configure()
 {
     parent::configure();
     if (!empty($this->options['tmpPath'])) {
         if ((is_dir($this->options['tmpPath']) || @mkdir($this->options['tmpPath'])) && is_writable($this->options['tmpPath'])) {
             $this->tmpPath = $this->options['tmpPath'];
         }
     }
     $this->mimeDetect = 'internal';
 }
예제 #3
0
 protected function configure()
 {
     parent::configure();
     $this->tmpPath = '';
     if (!empty($this->options['tmpPath'])) {
         if ((is_dir($this->options['tmpPath']) || @mkdir($this->options['tmpPath'])) && is_writable($this->options['tmpPath'])) {
             $this->tmpPath = $this->options['tmpPath'];
         }
     }
     if (!$this->tmpPath && ($tmp = elFinder::getStaticVar('commonTempPath'))) {
         $this->tmpPath = $tmp;
     }
     $this->mimeDetect = 'internal';
 }
 protected function configure()
 {
     if ($this->options['tmbPath']) {
         $this->options['tmbPath'] = strpos($this->options['tmbPath'], DIRECTORY_SEPARATOR) === false ? $this->root . DIRECTORY_SEPARATOR . $this->options['tmbPath'] : $this->_normpath($this->options['tmbPath']);
     }
     parent::configure();
     if ($this->attr($this->root, 'read') && !$this->tmbURL && $this->URL) {
         if (strpos($this->tmbPath, $this->root) === 0) {
             $this->tmbURL = $this->URL . str_replace(DIRECTORY_SEPARATOR, '/', substr($this->tmbPath, strlen($this->root) + 1));
             if (preg_match("|[^/?&=]\$|", $this->tmbURL)) {
                 $this->tmbURL .= '/';
             }
         }
     }
     $this->aroot = realpath($this->root);
 }
 /**
  * Set tmp path
  *
  * @return void
  * @author Dmitry (dio) Levashov
  **/
 protected function configure()
 {
     parent::configure();
     if ($tmp = $this->options['tmpPath']) {
         if (!file_exists($tmp)) {
             if (@mkdir($tmp)) {
                 @chmod($tmp, $this->options['tmbPathMode']);
             }
         }
         $this->tmpPath = is_dir($tmp) && is_writable($tmp) ? $tmp : false;
     }
     if (!$this->tmpPath && $this->tmbPath && $this->tmbPathWritable) {
         $this->tmpPath = $this->tmbPath;
     }
     $this->mimeDetect = 'internal';
 }
 protected function configure()
 {
     parent::configure();
     $vfa816edb83e95bf0c8da580bdfd491ef = $this->options['tmpPath'];
     if ($vfa816edb83e95bf0c8da580bdfd491ef) {
         if (!file_exists($vfa816edb83e95bf0c8da580bdfd491ef)) {
             if (@mkdir($vfa816edb83e95bf0c8da580bdfd491ef)) {
                 @chmod($vfa816edb83e95bf0c8da580bdfd491ef, $this->options['tmbPathMode']);
             }
         }
         $this->tmpPath = is_dir($vfa816edb83e95bf0c8da580bdfd491ef) && is_writable($vfa816edb83e95bf0c8da580bdfd491ef);
     }
     if (!$this->tmpPath && $this->tmbPath && $this->tmbPathWritable) {
         $this->tmpPath = $this->tmbPath;
     }
     if (!$this->tmpPath) {
     }
 }
 /**
  * Configure after successfull mount.
  *
  * @return void
  * @author Dmitry (dio) Levashov
  **/
 protected function configure()
 {
     $this->aroot = realpath($this->root);
     $root = $this->stat($this->root);
     if ($this->options['quarantine']) {
         $this->attributes[] = array('pattern' => '~^' . preg_quote(DIRECTORY_SEPARATOR . $this->options['quarantine']) . '$~', 'read' => false, 'write' => false, 'locked' => true, 'hidden' => true);
     }
     parent::configure();
     // check quarantine dir
     if (!empty($this->options['quarantine'])) {
         $this->quarantine = $this->root . DIRECTORY_SEPARATOR . $this->options['quarantine'];
         if (!is_dir($this->quarantine) && !$this->_mkdir($this->root, $this->options['quarantine']) || !is_writable($this->quarantine)) {
             $this->archivers['extract'] = array();
             $this->disabled[] = 'extract';
         }
     } else {
         $this->archivers['extract'] = array();
         $this->disabled[] = 'extract';
     }
 }
예제 #8
0
 /**
 * Configure after successfull mount.
 *
 * @return void
 * @author Dmitry (dio) Levashov
 **/
 protected function configure()
 {
     parent::configure();
     if (!$this->tmp) {
         $this->disabled[] = 'archive';
         $this->disabled[] = 'extract';
     }
 }
 /**
  * Configure after successfull mount.
  *
  * @return void
  * @author Dmitry (dio) Levashov
  **/
 protected function configure()
 {
     parent::configure();
     if (!empty($this->options['tmpPath'])) {
         if ((is_dir($this->options['tmpPath']) || @mkdir($this->options['tmpPath'], 0755, true)) && is_writable($this->options['tmpPath'])) {
             $this->tmp = $this->options['tmpPath'];
         }
     }
     if (!$this->tmp && ($tmp = elFinder::getStaticVar('commonTempPath'))) {
         $this->tmp = $tmp;
     }
     if (!$this->tmp && $this->tmbPath) {
         $this->tmp = $this->tmbPath;
     }
     if (!$this->tmp) {
         $this->disabled[] = 'mkfile';
         $this->disabled[] = 'paste';
         $this->disabled[] = 'duplicate';
         $this->disabled[] = 'upload';
         $this->disabled[] = 'edit';
         $this->disabled[] = 'archive';
         $this->disabled[] = 'extract';
     }
     // echo $this->tmp;
 }
 /**
  * Set tmp path
  *
  * @return void
  * @author Dmitry (dio) Levashov
  **/
 protected function configure()
 {
     parent::configure();
     if ($tmp = $this->options['tmpPath']) {
         if (!file_exists($tmp)) {
             if (mkdir($tmp)) {
                 chmod($tmp, $this->options['tmbPathMode']);
             }
         }
         $this->tmpPath = is_dir($tmp) && is_writable($tmp) ? $tmp : false;
     }
     if (!$this->tmpPath && ($tmp = elFinder::getStaticVar('commonTempPath'))) {
         $this->tmpPath = $tmp;
     }
     if (!$this->tmpPath && $this->tmbPath && $this->tmbPathWritable) {
         $this->tmpPath = $this->tmbPath;
     }
     $this->mimeDetect = 'internal';
 }
class elFinderVolumeLocalFileSystem extends elFinderVolumeDriver {protected $driverId = 'l';public function __construct() {$this->options['alias']    = '';$this->options['dirMode']  = 0777;$this->options['fileMode'] = 0666;}protected function configure() {if ($this->options['tmbPath']) {$this->options['tmbPath'] = strpos($this->options['tmbPath'], DIRECTORY_SEPARATOR) === false    ? $this->root.DIRECTORY_SEPARATOR.$this->options['tmbPath']    : $this->_normpath($this->options['tmbPath']);}parent::configure();if ($this->attr($this->root, 'read') && !$this->tmbURL && $this->URL) {if (strpos($this->tmbPath, $this->root) === 0) {$this->tmbURL = $this->URL.str_replace(DIRECTORY_SEPARATOR, '/', substr($this->tmbPath, strlen($this->root)+1));if (preg_match("|[^/?&=]$|", $this->tmbURL)) {$this->tmbURL .= '/';}}}$this->aroot = realpath($this->root);}protected function _dirname($vd6fe1d0be6347b8ef2427fa629c04485) {return dirname($vd6fe1d0be6347b8ef2427fa629c04485);}protected function _basename($vd6fe1d0be6347b8ef2427fa629c04485) {return basename($vd6fe1d0be6347b8ef2427fa629c04485);}protected function _joinPath($v736007832d2167baaae763fd3a3f3cf1, $vb068931cc450442b63f5b3d276ea4297) {return $v736007832d2167baaae763fd3a3f3cf1.DIRECTORY_SEPARATOR.$vb068931cc450442b63f5b3d276ea4297;}protected function _normpath($vd6fe1d0be6347b8ef2427fa629c04485) {if (empty($vd6fe1d0be6347b8ef2427fa629c04485)) {return '.';}if (strpos($vd6fe1d0be6347b8ef2427fa629c04485, '/') === 0) {$vfdac4ab05d92d57054e15e5cf027bbb8 = true;}else {$vfdac4ab05d92d57054e15e5cf027bbb8 = false;}if (($vfdac4ab05d92d57054e15e5cf027bbb8)  && (strpos($vd6fe1d0be6347b8ef2427fa629c04485, '//') === 0)  && (strpos($vd6fe1d0be6347b8ef2427fa629c04485, '///') === false)) {$vfdac4ab05d92d57054e15e5cf027bbb8 = 2;}$vfdac4ab05d92d57054e15e5cf027bbb8 = (int) $vfdac4ab05d92d57054e15e5cf027bbb8;$vdf05b7ad61706b638b2f032978f0c19e = explode('/', $vd6fe1d0be6347b8ef2427fa629c04485);$vc602ff896b51cb4a55b121ac0e6106fa = array();foreach ($vdf05b7ad61706b638b2f032978f0c19e as $v005480c8a6a0357d17cff2e8eb7e060d) {if (in_array($v005480c8a6a0357d17cff2e8eb7e060d, array('', '.'))) {continue;}if (($v005480c8a6a0357d17cff2e8eb7e060d != '..')   || (!$vfdac4ab05d92d57054e15e5cf027bbb8 && !$vc602ff896b51cb4a55b121ac0e6106fa)   || ($vc602ff896b51cb4a55b121ac0e6106fa && (end($vc602ff896b51cb4a55b121ac0e6106fa) == '..'))) {array_push($vc602ff896b51cb4a55b121ac0e6106fa, $v005480c8a6a0357d17cff2e8eb7e060d);}elseif ($vc602ff896b51cb4a55b121ac0e6106fa) {array_pop($vc602ff896b51cb4a55b121ac0e6106fa);}}$vdf05b7ad61706b638b2f032978f0c19e = $vc602ff896b51cb4a55b121ac0e6106fa;$vd6fe1d0be6347b8ef2427fa629c04485 = implode('/', $vdf05b7ad61706b638b2f032978f0c19e);if ($vfdac4ab05d92d57054e15e5cf027bbb8) {$vd6fe1d0be6347b8ef2427fa629c04485 = str_repeat('/', $vfdac4ab05d92d57054e15e5cf027bbb8) . $vd6fe1d0be6347b8ef2427fa629c04485;}return $vd6fe1d0be6347b8ef2427fa629c04485 ? $vd6fe1d0be6347b8ef2427fa629c04485 : '.';}protected function _relpath($vd6fe1d0be6347b8ef2427fa629c04485) {return $vd6fe1d0be6347b8ef2427fa629c04485 == $this->root ? '' : substr($vd6fe1d0be6347b8ef2427fa629c04485, strlen($this->root)+1);}protected function _abspath($vd6fe1d0be6347b8ef2427fa629c04485) {return $vd6fe1d0be6347b8ef2427fa629c04485 == DIRECTORY_SEPARATOR ? $this->root : $this->root.DIRECTORY_SEPARATOR.$vd6fe1d0be6347b8ef2427fa629c04485;}protected function _path($vd6fe1d0be6347b8ef2427fa629c04485) {return $this->rootName.($vd6fe1d0be6347b8ef2427fa629c04485 == $this->root ? '' : $this->separator.$this->_relpath($vd6fe1d0be6347b8ef2427fa629c04485));}protected function _inpath($vd6fe1d0be6347b8ef2427fa629c04485, $vd0e45878043844ffc41aac437e86b602) {return $vd6fe1d0be6347b8ef2427fa629c04485 == $vd0e45878043844ffc41aac437e86b602 || strpos($vd6fe1d0be6347b8ef2427fa629c04485, $vd0e45878043844ffc41aac437e86b602.DIRECTORY_SEPARATOR) === 0;}protected function _fileExists($vd6fe1d0be6347b8ef2427fa629c04485) {return file_exists($vd6fe1d0be6347b8ef2427fa629c04485);}protected function _isDir($vd6fe1d0be6347b8ef2427fa629c04485) {return is_dir($vd6fe1d0be6347b8ef2427fa629c04485);}protected function _isFile($vd6fe1d0be6347b8ef2427fa629c04485) {return is_file($vd6fe1d0be6347b8ef2427fa629c04485);}protected function _isLink($vd6fe1d0be6347b8ef2427fa629c04485) {return is_link($vd6fe1d0be6347b8ef2427fa629c04485);}protected function _isReadable($vd6fe1d0be6347b8ef2427fa629c04485) {return is_readable($vd6fe1d0be6347b8ef2427fa629c04485);}protected function _isWritable($vd6fe1d0be6347b8ef2427fa629c04485) {return is_writable($vd6fe1d0be6347b8ef2427fa629c04485);}protected function _isLocked($vd6fe1d0be6347b8ef2427fa629c04485) {return false;}protected function _isHidden($vd6fe1d0be6347b8ef2427fa629c04485) {return false;}protected function _filesize($vd6fe1d0be6347b8ef2427fa629c04485) {return @filesize($vd6fe1d0be6347b8ef2427fa629c04485);}protected function _filemtime($vd6fe1d0be6347b8ef2427fa629c04485) {return @filemtime($vd6fe1d0be6347b8ef2427fa629c04485);}protected function _subdirs($vd6fe1d0be6347b8ef2427fa629c04485) {if (is_dir($vd6fe1d0be6347b8ef2427fa629c04485) && is_readable($vd6fe1d0be6347b8ef2427fa629c04485)) {$v736007832d2167baaae763fd3a3f3cf1 = dir($vd6fe1d0be6347b8ef2427fa629c04485);while (($v1043bfc77febe75fafec0c4309faccf1 = $v736007832d2167baaae763fd3a3f3cf1->read()) !== false) {$v83878c91171338902e0fe0fb97a8c47a = $v736007832d2167baaae763fd3a3f3cf1->path.DIRECTORY_SEPARATOR.$v1043bfc77febe75fafec0c4309faccf1;if ($v1043bfc77febe75fafec0c4309faccf1 != '.' && $v1043bfc77febe75fafec0c4309faccf1 != '..' && is_dir($v83878c91171338902e0fe0fb97a8c47a) && !$this->attr($v83878c91171338902e0fe0fb97a8c47a, 'hidden')) {$v736007832d2167baaae763fd3a3f3cf1->close();return true;}}$v736007832d2167baaae763fd3a3f3cf1->close();}return false;}protected function _dimensions($vd6fe1d0be6347b8ef2427fa629c04485, $vd02a169f33469c888396a24dd9d9f1c6) {return strpos($vd02a169f33469c888396a24dd9d9f1c6, 'image') === 0 && ($v03c7c0ace395d80182db07ae2c30f034 = @getimagesize($vd6fe1d0be6347b8ef2427fa629c04485)) !== false   ? $v03c7c0ace395d80182db07ae2c30f034[0].'x'.$v03c7c0ace395d80182db07ae2c30f034[1]   : false;}protected function _lstat($vd6fe1d0be6347b8ef2427fa629c04485) {return lstat($vd6fe1d0be6347b8ef2427fa629c04485);}protected function _readlink($vd6fe1d0be6347b8ef2427fa629c04485) {if (!($v42aefbae01d2dfd981f7da7d823d689e = @readlink($vd6fe1d0be6347b8ef2427fa629c04485))) {return false;}if (substr($v42aefbae01d2dfd981f7da7d823d689e, 0, 1) != DIRECTORY_SEPARATOR) {$v42aefbae01d2dfd981f7da7d823d689e = dirname($vd6fe1d0be6347b8ef2427fa629c04485).DIRECTORY_SEPARATOR.$v42aefbae01d2dfd981f7da7d823d689e;}$veb5f43c01d9f67247dfac6b155735906 = realpath($v42aefbae01d2dfd981f7da7d823d689e);if (!$veb5f43c01d9f67247dfac6b155735906) {return false;}if ($this->_inpath($veb5f43c01d9f67247dfac6b155735906, $this->aroot)) {return $this->_normpath($this->root.DIRECTORY_SEPARATOR.substr($veb5f43c01d9f67247dfac6b155735906, strlen($this->aroot)+1));}return false;}protected function _scandir($vd6fe1d0be6347b8ef2427fa629c04485) {$v45b963397aa40d4a0063e0d85e4fe7a1 = array();foreach (scandir($vd6fe1d0be6347b8ef2427fa629c04485) as $vb068931cc450442b63f5b3d276ea4297) {if ($vb068931cc450442b63f5b3d276ea4297 != '.' && $vb068931cc450442b63f5b3d276ea4297 != '..') {$v45b963397aa40d4a0063e0d85e4fe7a1[] = $vd6fe1d0be6347b8ef2427fa629c04485.DIRECTORY_SEPARATOR.$vb068931cc450442b63f5b3d276ea4297;}}return $v45b963397aa40d4a0063e0d85e4fe7a1;}protected function _fopen($vd6fe1d0be6347b8ef2427fa629c04485, $v15d61712450a686a7f365adf4fef581f='rb') {return @fopen($vd6fe1d0be6347b8ef2427fa629c04485, $v15d61712450a686a7f365adf4fef581f);}protected function _fclose($v0666f0acdeed38d4cd9084ade1739498, $vd6fe1d0be6347b8ef2427fa629c04485) {return @fclose($v0666f0acdeed38d4cd9084ade1739498);}protected function _mkdir($vd6fe1d0be6347b8ef2427fa629c04485, $vb068931cc450442b63f5b3d276ea4297) {$vd6fe1d0be6347b8ef2427fa629c04485 = $vd6fe1d0be6347b8ef2427fa629c04485.DIRECTORY_SEPARATOR.$vb068931cc450442b63f5b3d276ea4297;if (@mkdir($vd6fe1d0be6347b8ef2427fa629c04485)) {@chmod($vd6fe1d0be6347b8ef2427fa629c04485, $this->options['dirMode']);return true;}return false;}protected function _mkfile($vd6fe1d0be6347b8ef2427fa629c04485, $vb068931cc450442b63f5b3d276ea4297) {$vd6fe1d0be6347b8ef2427fa629c04485 = $vd6fe1d0be6347b8ef2427fa629c04485.DIRECTORY_SEPARATOR.$vb068931cc450442b63f5b3d276ea4297;if (($v0666f0acdeed38d4cd9084ade1739498 = @fopen($vd6fe1d0be6347b8ef2427fa629c04485, 'w'))) {@fclose($v0666f0acdeed38d4cd9084ade1739498);@chmod($vd6fe1d0be6347b8ef2427fa629c04485, $this->options['fileMode']);return true;}return false;}protected function _symlink($v42aefbae01d2dfd981f7da7d823d689e, $vd6fe1d0be6347b8ef2427fa629c04485, $vb068931cc450442b63f5b3d276ea4297='') {if (!$vb068931cc450442b63f5b3d276ea4297) {$vb068931cc450442b63f5b3d276ea4297 = basename($vd6fe1d0be6347b8ef2427fa629c04485);}return @symlink('.'.DIRECTORY_SEPARATOR.$this->_relpath($v42aefbae01d2dfd981f7da7d823d689e), $vd6fe1d0be6347b8ef2427fa629c04485.DIRECTORY_SEPARATOR.$vb068931cc450442b63f5b3d276ea4297);}protected function _copy($v36cd38f49b9afa08222c0dc9ebfe35eb, $v1baf8770b1d8a6e742d5e7d6d241e5d2, $vb068931cc450442b63f5b3d276ea4297='') {$v42aefbae01d2dfd981f7da7d823d689e = $v1baf8770b1d8a6e742d5e7d6d241e5d2.DIRECTORY_SEPARATOR.($vb068931cc450442b63f5b3d276ea4297 ? $vb068931cc450442b63f5b3d276ea4297 : basename($v36cd38f49b9afa08222c0dc9ebfe35eb));return copy($v36cd38f49b9afa08222c0dc9ebfe35eb, $v42aefbae01d2dfd981f7da7d823d689e);}protected function _move($v36cd38f49b9afa08222c0dc9ebfe35eb, $v1baf8770b1d8a6e742d5e7d6d241e5d2, $vb068931cc450442b63f5b3d276ea4297='') {$v42aefbae01d2dfd981f7da7d823d689e = $v1baf8770b1d8a6e742d5e7d6d241e5d2.DIRECTORY_SEPARATOR.($vb068931cc450442b63f5b3d276ea4297 ? $vb068931cc450442b63f5b3d276ea4297 : basename($v36cd38f49b9afa08222c0dc9ebfe35eb));return @rename($v36cd38f49b9afa08222c0dc9ebfe35eb, $v42aefbae01d2dfd981f7da7d823d689e);}protected function _unlink($vd6fe1d0be6347b8ef2427fa629c04485) {return @unlink($vd6fe1d0be6347b8ef2427fa629c04485);}protected function _rmdir($vd6fe1d0be6347b8ef2427fa629c04485) {return @rmdir($vd6fe1d0be6347b8ef2427fa629c04485);}protected function _save($v0666f0acdeed38d4cd9084ade1739498, $v736007832d2167baaae763fd3a3f3cf1, $vb068931cc450442b63f5b3d276ea4297) {$vd6fe1d0be6347b8ef2427fa629c04485 = $v736007832d2167baaae763fd3a3f3cf1.DIRECTORY_SEPARATOR.$vb068931cc450442b63f5b3d276ea4297;if (!($v42aefbae01d2dfd981f7da7d823d689e = @fopen($vd6fe1d0be6347b8ef2427fa629c04485, 'wb'))) {return false;}while (!feof($v0666f0acdeed38d4cd9084ade1739498)) {fwrite($v42aefbae01d2dfd981f7da7d823d689e, fread($v0666f0acdeed38d4cd9084ade1739498, 8192));}fclose($v42aefbae01d2dfd981f7da7d823d689e);@chmod($vd6fe1d0be6347b8ef2427fa629c04485, $this->options['fileMode']);clearstatcache();return $vd6fe1d0be6347b8ef2427fa629c04485;}protected function _getContents($vd6fe1d0be6347b8ef2427fa629c04485) {return file_get_contents($vd6fe1d0be6347b8ef2427fa629c04485);}protected function _filePutContents($vd6fe1d0be6347b8ef2427fa629c04485, $v9a0364b9e99bb480dd25e1f0284c8555) {if (@file_put_contents($vd6fe1d0be6347b8ef2427fa629c04485, $v9a0364b9e99bb480dd25e1f0284c8555, LOCK_EX)) {clearstatcache();return true;}return false;}protected function _checkArchivers() {if (!function_exists('exec')) {$this->options['archivers'] = $this->options['archive'] = array();return;}$vf8d59458d418fd16e7e3873414455064 = array(   'create'  => array(),   'extract' => array()   );$this->procExec('tar --version', $vd95679752134a2d9eb61dbd7b91c4bcc, $vc3ba283e7b4b7a91db1fd3115ef6ad3f);if ($vc3ba283e7b4b7a91db1fd3115ef6ad3f == 0) {$vf8d59458d418fd16e7e3873414455064['create']['application/x-tar']  = array('cmd' => 'tar', 'argc' => '-cf', 'ext' => 'tar');$vf8d59458d418fd16e7e3873414455064['extract']['application/x-tar'] = array('cmd' => 'tar', 'argc' => '-xf', 'ext' => 'tar');$v098f6bcd4621d373cade4e832627b4f6 = $this->procExec('gzip --version', $vd95679752134a2d9eb61dbd7b91c4bcc, $v4a8a08f09d37b73795649038408b5f33);if ($v4a8a08f09d37b73795649038408b5f33 == 0) {$vf8d59458d418fd16e7e3873414455064['create']['application/x-gzip']  = array('cmd' => 'tar', 'argc' => '-czf', 'ext' => 'tgz');$vf8d59458d418fd16e7e3873414455064['extract']['application/x-gzip'] = array('cmd' => 'tar', 'argc' => '-xzf', 'ext' => 'tgz');}$v098f6bcd4621d373cade4e832627b4f6 = $this->procExec('bzip2 --version', $vd95679752134a2d9eb61dbd7b91c4bcc, $v4a8a08f09d37b73795649038408b5f33);if ($v4a8a08f09d37b73795649038408b5f33 == 0) {$vf8d59458d418fd16e7e3873414455064['create']['application/x-bzip2']  = array('cmd' => 'tar', 'argc' => '-cjf', 'ext' => 'tbz');$vf8d59458d418fd16e7e3873414455064['extract']['application/x-bzip2'] = array('cmd' => 'tar', 'argc' => '-xjf', 'ext' => 'tbz');}}$this->procExec('zip --version', $vd95679752134a2d9eb61dbd7b91c4bcc, $v4a8a08f09d37b73795649038408b5f33);if ($v4a8a08f09d37b73795649038408b5f33 == 0) {$vf8d59458d418fd16e7e3873414455064['create']['application/zip']  = array('cmd' => 'zip', 'argc' => '-r9', 'ext' => 'zip');}$this->procExec('unzip --help', $vd95679752134a2d9eb61dbd7b91c4bcc, $v4a8a08f09d37b73795649038408b5f33);if ($v4a8a08f09d37b73795649038408b5f33 == 0) {$vf8d59458d418fd16e7e3873414455064['extract']['application/zip'] = array('cmd' => 'unzip', 'argc' => '',  'ext' => 'zip');}$this->procExec('rar --version', $vd95679752134a2d9eb61dbd7b91c4bcc, $v4a8a08f09d37b73795649038408b5f33);if ($v4a8a08f09d37b73795649038408b5f33 == 0 || $v4a8a08f09d37b73795649038408b5f33 == 7) {$vf8d59458d418fd16e7e3873414455064['create']['application/x-rar']  = array('cmd' => 'rar', 'argc' => 'a -inul', 'ext' => 'rar');$vf8d59458d418fd16e7e3873414455064['extract']['application/x-rar'] = array('cmd' => 'rar', 'argc' => 'x -y',    'ext' => 'rar');}else {$v098f6bcd4621d373cade4e832627b4f6 = $this->procExec('unrar', $vd95679752134a2d9eb61dbd7b91c4bcc, $v4a8a08f09d37b73795649038408b5f33);if ($v4a8a08f09d37b73795649038408b5f33==0 || $v4a8a08f09d37b73795649038408b5f33 == 7) {$vf8d59458d418fd16e7e3873414455064['extract']['application/x-rar'] = array('cmd' => 'unrar', 'argc' => 'x -y', 'ext' => 'rar');}}$this->procExec('7za --help', $vd95679752134a2d9eb61dbd7b91c4bcc, $v4a8a08f09d37b73795649038408b5f33);if ($v4a8a08f09d37b73795649038408b5f33 == 0) {$vf8d59458d418fd16e7e3873414455064['create']['application/x-7z-compressed']  = array('cmd' => '7za', 'argc' => 'a', 'ext' => '7z');$vf8d59458d418fd16e7e3873414455064['extract']['application/x-7z-compressed'] = array('cmd' => '7za', 'argc' => 'e -y', 'ext' => '7z');if (empty($vf8d59458d418fd16e7e3873414455064['create']['application/x-gzip'])) {$vf8d59458d418fd16e7e3873414455064['create']['application/x-gzip'] = array('cmd' => '7za', 'argc' => 'a -tgzip', 'ext' => 'tar.gz');}if (empty($vf8d59458d418fd16e7e3873414455064['extract']['application/x-gzip'])) {$vf8d59458d418fd16e7e3873414455064['extract']['application/x-gzip'] = array('cmd' => '7za', 'argc' => 'e -tgzip -y', 'ext' => 'tar.gz');}if (empty($vf8d59458d418fd16e7e3873414455064['create']['application/x-bzip2'])) {$vf8d59458d418fd16e7e3873414455064['create']['application/x-bzip2'] = array('cmd' => '7za', 'argc' => 'a -tbzip2', 'ext' => 'tar.bz');}if (empty($vf8d59458d418fd16e7e3873414455064['extract']['application/x-bzip2'])) {$vf8d59458d418fd16e7e3873414455064['extract']['application/x-bzip2'] = array('cmd' => '7za', 'argc' => 'a -tbzip2 -y', 'ext' => 'tar.bz');}if (empty($vf8d59458d418fd16e7e3873414455064['create']['application/zip'])) {$vf8d59458d418fd16e7e3873414455064['create']['application/zip'] = array('cmd' => '7za', 'argc' => 'a -tzip -l', 'ext' => 'zip');}if (empty($vf8d59458d418fd16e7e3873414455064['extract']['application/zip'])) {$vf8d59458d418fd16e7e3873414455064['extract']['application/zip'] = array('cmd' => '7za', 'argc' => 'e -tzip -y', 'ext' => 'zip');}if (empty($vf8d59458d418fd16e7e3873414455064['create']['application/x-tar'])) {$vf8d59458d418fd16e7e3873414455064['create']['application/x-tar'] = array('cmd' => '7za', 'argc' => 'a -ttar -l', 'ext' => 'tar');}if (empty($vf8d59458d418fd16e7e3873414455064['extract']['application/x-tar'])) {$vf8d59458d418fd16e7e3873414455064['extract']['application/x-tar'] = array('cmd' => '7za', 'argc' => 'e -ttar -y', 'ext' => 'tar');}}$this->archivers = $vf8d59458d418fd16e7e3873414455064;}protected function _extract($vd6fe1d0be6347b8ef2427fa629c04485, $v909ba4ad2bda46b10aac3c5b7f01abd5) {$v109633366fd0d46d371ede589998abaa = getcwd();$v736007832d2167baaae763fd3a3f3cf1 = $this->_dirname($vd6fe1d0be6347b8ef2427fa629c04485);chdir($v736007832d2167baaae763fd3a3f3cf1);$vdfff0a7fa1a55c8c1a4966c19f6da452 = $v909ba4ad2bda46b10aac3c5b7f01abd5['cmd'].' '.$v909ba4ad2bda46b10aac3c5b7f01abd5['argc'].' '.escapeshellarg($this->_basename($vd6fe1d0be6347b8ef2427fa629c04485));$this->procExec($vdfff0a7fa1a55c8c1a4966c19f6da452, $vd95679752134a2d9eb61dbd7b91c4bcc, $v4a8a08f09d37b73795649038408b5f33);chdir($v109633366fd0d46d371ede589998abaa);return true;}protected function _archive($v736007832d2167baaae763fd3a3f3cf1, $v45b963397aa40d4a0063e0d85e4fe7a1, $vb068931cc450442b63f5b3d276ea4297, $v909ba4ad2bda46b10aac3c5b7f01abd5) {$v109633366fd0d46d371ede589998abaa = getcwd();chdir($v736007832d2167baaae763fd3a3f3cf1);$v45b963397aa40d4a0063e0d85e4fe7a1 = array_map('escapeshellarg', $v45b963397aa40d4a0063e0d85e4fe7a1);$vdfff0a7fa1a55c8c1a4966c19f6da452 = $v909ba4ad2bda46b10aac3c5b7f01abd5['cmd'].' '.$v909ba4ad2bda46b10aac3c5b7f01abd5['argc'].' '.escapeshellarg($vb068931cc450442b63f5b3d276ea4297).' '.implode(' ', $v45b963397aa40d4a0063e0d85e4fe7a1);$this->procExec($vdfff0a7fa1a55c8c1a4966c19f6da452, $vd95679752134a2d9eb61dbd7b91c4bcc, $v4a8a08f09d37b73795649038408b5f33);chdir($v109633366fd0d46d371ede589998abaa);$vd6fe1d0be6347b8ef2427fa629c04485 = $v736007832d2167baaae763fd3a3f3cf1.DIRECTORY_SEPARATOR.$vb068931cc450442b63f5b3d276ea4297;return file_exists($vd6fe1d0be6347b8ef2427fa629c04485) ? $vd6fe1d0be6347b8ef2427fa629c04485 : false;$this->checkArchivers();$v736007832d2167baaae763fd3a3f3cf1 = $this->decode($args['current']);$vaa6f6d62574dedec24672f4ae1c9ca26 = $args['targets'];$v45b963397aa40d4a0063e0d85e4fe7a1 = array();$v212be369d46788be295dbb6516442fee  = '';foreach ($vaa6f6d62574dedec24672f4ae1c9ca26 as $v42aefbae01d2dfd981f7da7d823d689e) {$v8fa14cdd754f91cc6554c9e71929cce7 = $this->file($v42aefbae01d2dfd981f7da7d823d689e);$v212be369d46788be295dbb6516442fee .= escapeshellarg($v8fa14cdd754f91cc6554c9e71929cce7['name']).' ';$v45b963397aa40d4a0063e0d85e4fe7a1[] = $v8fa14cdd754f91cc6554c9e71929cce7;}$v909ba4ad2bda46b10aac3c5b7f01abd5  = $this->options['archivers']['create'][$args['type']];if ($v909ba4ad2bda46b10aac3c5b7f01abd5) {$vb068931cc450442b63f5b3d276ea4297 = (count($v45b963397aa40d4a0063e0d85e4fe7a1) == 1 ? basename($v45b963397aa40d4a0063e0d85e4fe7a1[0]) : $args['name']) . '.' . $v909ba4ad2bda46b10aac3c5b7f01abd5['ext'] ;$vb068931cc450442b63f5b3d276ea4297 = $this->uniqueName($v736007832d2167baaae763fd3a3f3cf1, $vb068931cc450442b63f5b3d276ea4297, '-', false);$v109633366fd0d46d371ede589998abaa = getcwd();chdir($v736007832d2167baaae763fd3a3f3cf1);$vdfff0a7fa1a55c8c1a4966c19f6da452 = $v909ba4ad2bda46b10aac3c5b7f01abd5['cmd'].' '.$v909ba4ad2bda46b10aac3c5b7f01abd5['argc'].' '.escapeshellarg($vb068931cc450442b63f5b3d276ea4297).' '.$v212be369d46788be295dbb6516442fee;$this->procExec($vdfff0a7fa1a55c8c1a4966c19f6da452, $vd95679752134a2d9eb61dbd7b91c4bcc, $v4a8a08f09d37b73795649038408b5f33);chdir($v109633366fd0d46d371ede589998abaa);if ($v4a8a08f09d37b73795649038408b5f33 == 0) {$v0361b5d917ea31386aa0cd1fa4e55bc5 = $this->stat($v736007832d2167baaae763fd3a3f3cf1 . $this->options['separator'] . $vb068931cc450442b63f5b3d276ea4297);return array($v0361b5d917ea31386aa0cd1fa4e55bc5);}return false;}return false;}}?>
class elFinderVolumeMySQL extends elFinderVolumeDriver {protected $driverId = 'm';protected $db = null;protected $tbf = '';protected $accessControl = null;protected $tmpPath = '';protected $cache = array();protected $paths = array();protected $sqlCnt = 0;public function __construct() {$veb4112b6a6b76c8a84808a40baa94769 = array(   'host'          => 'localhost',   'user'          => '',   'pass'          => '',   'db'            => '',   'port'          => null,   'socket'        => null,   'files_table'   => 'elfinder_file',   'tmbPath'       => '',   'tmpPath'       => ''  );$this->options = array_merge($this->options, $veb4112b6a6b76c8a84808a40baa94769);}protected function init() {if (!$this->options['host']   ||  !$this->options['user']   ||  !$this->options['pass']   ||  !$this->options['db']  ||  !$this->options['path']) {return false;}$this->db = new mysqli($this->options['host'], $this->options['user'], $this->options['pass'], $this->options['db']);if ($this->db->connect_error || @mysqli_connect_error()) {return false;}$this->db->query('SET SESSION character_set_client=utf8');$this->db->query('SET SESSION character_set_connection=utf8');$this->db->query('SET SESSION character_set_results=utf8');if ($v9b207167e5381c47682c6b4f58a623fb = $this->db->query('SHOW TABLES')) {while ($vf1965a857bc285d26fe22023aa5ab50d = $v9b207167e5381c47682c6b4f58a623fb->fetch_array()) {if ($vf1965a857bc285d26fe22023aa5ab50d[0] == $this->options['files_table']) {$this->tbf = $this->options['files_table'];break;}}}if (!$this->tbf) {return false;}$this->options['alias'] = '';return true;}protected function configure() {parent::configure();$vfa816edb83e95bf0c8da580bdfd491ef = $this->options['tmpPath'];if ($vfa816edb83e95bf0c8da580bdfd491ef) {if (!file_exists($vfa816edb83e95bf0c8da580bdfd491ef)) {if (@mkdir($vfa816edb83e95bf0c8da580bdfd491ef)) {@chmod($vfa816edb83e95bf0c8da580bdfd491ef, $this->options['tmbPathMode']);}}$this->tmpPath = is_dir($vfa816edb83e95bf0c8da580bdfd491ef) && is_writable($vfa816edb83e95bf0c8da580bdfd491ef);}if (!$this->tmpPath && $this->tmbPath && $this->tmbPathWritable) {$this->tmpPath = $this->tmbPath;}if (!$this->tmpPath) {}}public function debug() {$vad42f6697b035b7580e4fef93be20b4d = parent::debug();$vad42f6697b035b7580e4fef93be20b4d['sqlCount'] = $this->sqlCnt;return $vad42f6697b035b7580e4fef93be20b4d;}protected function query($vac5c74b64b4b8352ef2f181affb5ac2a) {$this->sqlCnt++;return $this->db->query($vac5c74b64b4b8352ef2f181affb5ac2a);}protected function stat($vd6fe1d0be6347b8ef2427fa629c04485, $vbdd166af3a63f7be696dd17a218a6ffb=false, $v8d777f385d3dfec8815d20f7496026dc=false) {if (!isset($this->cache[$vd6fe1d0be6347b8ef2427fa629c04485])) {if (!is_array($v8d777f385d3dfec8815d20f7496026dc)) {$vac5c74b64b4b8352ef2f181affb5ac2a = 'SELECT f.id, f.parent_id, f.name, f.size, f.mtime, f.mime, f.width, f.height, ch.id AS dirs
 /**
  * Configure after successfull mount.
  *
  * @author Dmitry (dio) Levashov
  **/
 protected function configure()
 {
     parent::configure();
     $this->disabled[] = 'archive';
     $this->disabled[] = 'extract';
     if ($this->isMyReload()) {
         $this->_gd_getDirectoryData(false);
     }
 }
 /**
  * Set tmp path
  *
  * @return void
  * @author Dmitry (dio) Levashov
  **/
 protected function configure()
 {
     parent::configure();
     $tmp = $this->options['tmpPath'];
     if ($tmp) {
         if (!file_exists($tmp)) {
             if (@mkdir($tmp)) {
                 @chmod($tmp, $this->options['tmbPathMode']);
             }
         }
         $this->tmpPath = is_dir($tmp) && is_writable($tmp);
     }
     if (!$this->tmpPath && $this->tmbPath && $this->tmbPathWritable) {
         $this->tmpPath = $this->tmbPath;
     }
     if (!$this->tmpPath) {
         // $this->disabled[] = 'upload';
         // $this->disabled[] = 'paste';
     }
 }
 /**
  * Configure after successfull mount.
  *
  * @return void
  * @author Dmitry (dio) Levashov
  **/
 protected function configure()
 {
     $root = $this->stat($this->root);
     // chek thumbnails path
     if ($this->options['tmbPath']) {
         $this->options['tmbPath'] = strpos($this->options['tmbPath'], DIRECTORY_SEPARATOR) === false ? $this->_abspath($this->options['tmbPath']) : $this->_normpath($this->options['tmbPath']);
     }
     parent::configure();
     // set $this->tmp by options['tmpPath']
     $this->tmp = '';
     if (!empty($this->options['tmpPath'])) {
         if ((is_dir($this->options['tmpPath']) || mkdir($this->options['tmpPath'], 0755, true)) && is_writable($this->options['tmpPath'])) {
             $this->tmp = $this->options['tmpPath'];
         }
     }
     if (!$this->tmp && ($tmp = elFinder::getStaticVar('commonTempPath'))) {
         $this->tmp = $tmp;
     }
     // if no thumbnails url - try detect it
     if ($root['read'] && !$this->tmbURL && $this->URL) {
         if (strpos($this->tmbPath, $this->root) === 0) {
             $this->tmbURL = $this->URL . str_replace(DIRECTORY_SEPARATOR, '/', substr($this->tmbPath, strlen($this->root) + 1));
             if (preg_match("|[^/?&=]\$|", $this->tmbURL)) {
                 $this->tmbURL .= '/';
             }
         }
     }
     // check quarantine dir
     $this->quarantine = '';
     if (!empty($this->options['quarantine'])) {
         if (is_dir($this->options['quarantine'])) {
             if (is_writable($this->options['quarantine'])) {
                 $this->quarantine = $this->options['quarantine'];
             }
             $this->options['quarantine'] = '';
         } else {
             $this->quarantine = $this->_abspath($this->options['quarantine']);
             if (!is_dir($this->quarantine) && !mkdir($this->quarantine) || !is_writable($this->quarantine)) {
                 $this->options['quarantine'] = $this->quarantine = '';
             }
         }
     }
     if (!$this->quarantine) {
         if (!$this->tmp) {
             $this->archivers['extract'] = array();
             $this->disabled[] = 'extract';
         } else {
             $this->quarantine = $this->tmp;
         }
     }
     if ($this->options['quarantine']) {
         $this->attributes[] = array('pattern' => '~^' . preg_quote(DIRECTORY_SEPARATOR . $this->options['quarantine']) . '$~', 'read' => false, 'write' => false, 'locked' => true, 'hidden' => true);
     }
     if (!empty($this->options['keepTimestamp'])) {
         $this->options['keepTimestamp'] = array_flip($this->options['keepTimestamp']);
     }
 }