本文整理汇总了PHP中elFinderVolumeDriver类的典型用法代码示例。如果您正苦于以下问题:PHP elFinderVolumeDriver类的具体用法?PHP elFinderVolumeDriver怎么用?PHP elFinderVolumeDriver使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了elFinderVolumeDriver类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _findSymlinks
/**
* Recursive symlinks search
*
* @param string $path file/dir path
* @return bool
* @author Dmitry (dio) Levashov
**/
protected function _findSymlinks($path)
{
if (is_link($path)) {
return true;
}
if (is_dir($path)) {
foreach (scandir($path) as $name) {
if ($name != '.' && $name != '..') {
$p = $path . DIRECTORY_SEPARATOR . $name;
if (is_link($p) || !$this->nameAccepted($name) || ($mimeByName = elFinderVolumeDriver::mimetypeInternalDetect($name)) && $mimeByName !== 'unknown' && !$this->allowPutMime($mimeByName)) {
$this->setError(elFinder::ERROR_SAVE, $name);
return true;
}
if (is_dir($p) && $this->_findSymlinks($p)) {
return true;
} elseif (is_file($p)) {
$this->archiveSize += sprintf('%u', filesize($p));
}
}
}
} else {
$this->archiveSize += sprintf('%u', filesize($path));
}
return false;
}
示例2: mimetype
/**
* Return file mimetype
*
* @param string $path file path
* @return string
* @author Dmitry (dio) Levashov
**/
protected function mimetype($path, $name = '')
{
$type = '';
if ($name === '') {
$name = $path;
}
$ext = false === ($pos = strrpos($name, '.')) ? '' : substr($name, $pos + 1);
if ($this->mimeDetect == 'finfo') {
if ($type = @finfo_file($this->finfo, $path)) {
if ($ext && preg_match('~^application/(?:octet-stream|(?:x-)?zip)~', $type)) {
if (isset(elFinderVolumeDriver::$mimetypes[$ext])) {
$type = elFinderVolumeDriver::$mimetypes[$ext];
}
} else {
if ($ext === 'js' && preg_match('~^text/~', $type)) {
$type = 'text/javascript';
}
}
} else {
$type = 'unknown';
}
} elseif ($this->mimeDetect == 'mime_content_type') {
$type = mime_content_type($path);
} else {
$type = elFinderVolumeDriver::mimetypeInternalDetect($path);
}
$type = explode(';', $type);
$type = trim($type[0]);
if (in_array($type, array('application/x-empty', 'inode/x-empty'))) {
// finfo return this mime for empty files
$type = 'text/plain';
} elseif ($type == 'application/x-zip') {
// http://elrte.org/redmine/issues/163
$type = 'application/zip';
}
// mime type normalization
$_checkKey = strtolower($ext . ':' . $type);
if (isset($this->options['mimeMap'][$_checkKey])) {
$type = $this->options['mimeMap'][$_checkKey];
}
return $type == 'unknown' && $this->mimeDetect != 'internal' ? elFinderVolumeDriver::mimetypeInternalDetect($path) : $type;
}
示例3: copyFrom
/**
* Copy file from another volume.
* Return new file path or false.
*
* @param Object $volume source volume
* @param string $src source file hash
* @param string $destination destination dir path
* @param string $name file name
* @return string|false
* @author Dmitry (dio) Levashov
**/
protected function copyFrom($volume, $src, $destination, $name)
{
if (($source = $volume->file($src)) == false) {
return $this->setError(elFinder::ERROR_COPY, '#' . $src, $volume->error());
}
$errpath = $volume->path($source['hash']);
if (!$this->nameAccepted($source['name'])) {
return $this->setError(elFinder::ERROR_COPY, $errpath, elFinder::ERROR_INVALID_NAME);
}
if (!$source['read']) {
return $this->setError(elFinder::ERROR_COPY, $errpath, elFinder::ERROR_PERM_DENIED);
}
if ($source['mime'] == 'directory') {
$test = $this->stat($this->joinPathCE($destination, $name));
$this->clearcache();
if ($test && $test['mime'] != 'directory' || !($test = $this->mkdir($this->encode($destination), $name))) {
//if ((!$stat || $stat['mime'] != 'directory') && $this->convEncOut(!$this->_mkdir($this->convEncIn($destination), $this->convEncIn($name)))) {
return $this->setError(elFinder::ERROR_COPY, $errpath);
}
$path = $this->joinPathCE($destination, $name);
$path = $this->decode($test['hash']);
foreach ($volume->scandir($src) as $entr) {
if (!$this->copyFrom($volume, $entr['hash'], $path, $entr['name'])) {
$this->remove($path, true);
// fall back
return $this->setError($this->error, elFinder::ERROR_COPY, $errpath);
}
}
} else {
// $mime = $source['mime'];
// $w = $h = 0;
if ($dim = $volume->dimensions($src)) {
$s = explode('x', $dim);
$source['width'] = $s[0];
$source['height'] = $s[1];
}
if (($fp = $volume->open($src)) == false || ($path = $this->saveCE($fp, $destination, $name, $source)) == false) {
$fp && $volume->close($fp, $src);
return $this->setError(elFinder::ERROR_COPY, $errpath);
}
$volume->close($fp, $src);
// MIME check
$stat = $this->stat($path);
$mimeByName = elFinderVolumeDriver::mimetypeInternalDetect($stat['name']);
if ($stat['mime'] === $mimeByName) {
$mimeByName = '';
}
if (!$this->allowPutMime($stat['mime']) || $mimeByName && $mimeByName !== 'unknown' && !$this->allowPutMime($mimeByName)) {
$this->remove($path, true);
return $this->setError(elFinder::ERROR_UPLOAD_FILE_MIME, $errpath);
}
}
return $path;
}
示例4: configure
/**
* 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';
}
}
示例5: configure
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';
}
示例6: configure
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';
}
示例7: configure
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);
}
示例8: configure
/**
* 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';
}
}
示例9: debug
/**
* Return debug info for client
*
* @return array
* @author Dmitry (dio) Levashov
**/
public function debug()
{
$debug = parent::debug();
$debug['sqlCount'] = $this->sqlCnt;
if ($this->dbError) {
$debug['dbError'] = $this->dbError;
}
return $debug;
}
示例10: mount
/**
* "Mount" volume.
* Return true if volume available for read or write,
* false - otherwise
*
* @return bool
* @author Dmitry (dio) Levashov
* @author Alexey Sukhotin
**/
public function mount(array $opts)
{
if (empty($opts['path'])) {
return false;
}
$this->options = array_merge($this->options, $opts);
$this->id = $this->driverId . (!empty($this->options['id']) ? $this->options['id'] : elFinder::$volumesCnt++) . '_';
$this->root = $this->_normpath($this->options['path']);
$this->separator = isset($this->options['separator']) ? $this->options['separator'] : DIRECTORY_SEPARATOR;
// default file attribute
$this->defaults = array('read' => isset($this->options['defaults']['read']) ? !!$this->options['defaults']['read'] : true, 'write' => isset($this->options['defaults']['write']) ? !!$this->options['defaults']['write'] : true, 'locked' => false, 'hidden' => false);
// root attributes
$this->attributes[] = array('pattern' => '~^' . preg_quote(DIRECTORY_SEPARATOR) . '$~', 'locked' => true, 'hidden' => false);
// set files attributes
if (!empty($this->options['attributes']) && is_array($this->options['attributes'])) {
foreach ($this->options['attributes'] as $a) {
// attributes must contain pattern and at least one rule
if (!empty($a['pattern']) || count($a) > 1) {
$this->attributes[] = $a;
}
}
}
if (!empty($this->options['accessControl'])) {
if (is_string($this->options['accessControl']) && function_exists($this->options['accessControl'])) {
$this->access = $this->options['accessControl'];
} elseif (is_array($this->options['accessControl']) && count($this->options['accessControl']) > 1 && is_object($this->options['accessControl'][0]) && method_exists($this->options['accessControl'][0], $this->options['accessControl'][1])) {
$this->access = array($this->options['accessControl'][0], $this->options['accessControl'][1]);
}
}
// debug($this->attributes);
if (!$this->init()) {
return false;
}
$this->today = mktime(0, 0, 0, date('m'), date('d'), date('Y'));
$this->yesterday = $this->today - 86400;
// check some options is arrays
$this->uploadAllow = isset($this->options['uploadAllow']) && is_array($this->options['uploadAllow']) ? $this->options['uploadAllow'] : array();
$this->uploadDeny = isset($this->options['uploadDeny']) && is_array($this->options['uploadDeny']) ? $this->options['uploadDeny'] : array();
$parts = explode(',', isset($this->options['uploadOrder']) ? $this->options['uploadOrder'] : 'deny,allow');
$this->uploadOrder = array(trim($parts[0]), trim($parts[1]));
if (!empty($this->options['uploadMaxSize'])) {
$size = '' . $this->options['uploadMaxSize'];
$unit = strtolower(substr($size, strlen($size) - 1));
$n = 1;
switch ($unit) {
case 'k':
$n = 1024;
break;
case 'm':
$n = 1048576;
break;
case 'g':
$n = 1073741824;
}
$this->uploadMaxSize = intval($size) * $n;
}
$this->disabled = isset($this->options['disabled']) && is_array($this->options['disabled']) ? $this->options['disabled'] : array();
$this->cryptLib = $this->options['cryptLib'];
$this->mimeDetect = $this->options['mimeDetect'];
// find available mimetype detect method
$type = strtolower($this->options['mimeDetect']);
$type = preg_match('/^(finfo|mime_content_type|internal|auto)$/i', $type) ? $type : 'auto';
$regexp = '/text\\/x\\-(php|c\\+\\+)/';
if (($type == 'finfo' || $type == 'auto') && class_exists('finfo') && preg_match($regexp, array_shift(explode(';', @finfo_file(finfo_open(FILEINFO_MIME), __FILE__))))) {
$type = 'finfo';
} elseif (($type == 'mime_content_type' || $type == 'auto') && function_exists('mime_content_type') && preg_match($regexp, array_shift(explode(';', mime_content_type(__FILE__))))) {
$type = 'mime_content_type';
} else {
$type = 'internal';
}
$this->mimeDetect = $type;
// load mimes from external file for mimeDetect == 'internal'
// based on Alexey Sukhotin idea and patch: http://elrte.org/redmine/issues/163
// file must be in file directory or in parent one
if ($this->mimeDetect == 'internal' && !self::$mimetypesLoaded) {
self::$mimetypesLoaded = true;
$this->mimeDetect = 'internal';
$file = false;
if (!empty($this->options['mimefile']) && file_exists($this->options['mimefile'])) {
$file = $this->options['mimefile'];
} elseif (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mime.types')) {
$file = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mime.types';
} elseif (file_exists(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'mime.types')) {
$file = dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'mime.types';
}
if ($file && file_exists($file)) {
$mimecf = file($file);
foreach ($mimecf as $line_num => $line) {
if (!preg_match('/^\\s*#/', $line)) {
$mime = preg_split('/\\s+/', $line, -1, PREG_SPLIT_NO_EMPTY);
for ($i = 1, $size = count($mime); $i < $size; $i++) {
//.........这里部分代码省略.........
示例11: configure
/**
* 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;
}
示例12: _save
/**
* Create new file and write into it from file pointer
* Return new file path or false on error.
*
* @param resource $fp file pointer
* @param string $dir target dir path
* @param string $name file name
* @return bool|string
* @author Dmitry (dio) Levashov
**/
protected function _save($fp, $dir, $name)
{
$this->clearstat();
$id = $this->_joinPath($dir, $name);
if ($this->tmpPath) {
$tmp = $this->tmpPath . DIRECTORY_SEPARATOR . $name;
if (!($target = @fopen($tmp, 'wb'))) {
return false;
}
while (!feof($fp)) {
fwrite($target, fread($fp, 8192));
}
fclose($target);
$mime = parent::mimetype($tmp);
$width = $height = 0;
if (strpos($mime, 'image') === 0) {
if ($s = getimagesize($tmp)) {
$width = $s[0];
$height = $s[1];
}
}
$sql = $id > 0 ? 'REPLACE INTO %s (id, parent_id, name, content, size, mtime, mime, width, height) VALUES (' . $id . ', %d, "%s", LOAD_FILE("%s"), %d, %d, "%s", %d, %d)' : 'INSERT INTO %s (parent_id, name, content, size, mtime, mime, width, height) VALUES (%d, "%s", LOAD_FILE("%s"), %d, %d, "%s", %d, %d)';
$sql = sprintf($sql, $this->tbf, $dir, $this->db->real_escape_string($name), realpath($tmp), filesize($tmp), time(), $mime, $width, $height);
} else {
$this->mimeDetect = 'internal';
$mime = parent::mimetype($name);
$stat = fstat($fp);
$size = $stat['size'];
$content = '';
while (!feof($fp)) {
$content .= fread($fp, 8192);
}
$sql = $id > 0 ? 'REPLACE INTO %s (id, parent_id, name, content, size, mtime, mime, width, height) VALUES (' . $id . ', %d, "%s", "%s", %d, %d, "%s", %d, %d)' : 'INSERT INTO %s (parent_id, name, content, size, mtime, mime, width, height) VALUES (%d, "%s", "%s", %d, %d, "%s", %d, %d)';
$sql = sprintf($sql, $this->tbf, $dir, $this->db->real_escape_string($name), '0x' . bin2hex($content), $size, time(), $mime, 0, 0);
}
if ($this->query($sql)) {
if ($tmp) {
unlink($tmp);
}
return $id > 0 ? $id : $this->db->insert_id;
}
if ($tmp) {
unlink($tmp);
}
return false;
}
示例13: doSearch
/**
* Recursive files search
*
* @param string $path dir path
* @param string $q search string
* @param array $mimes
* @return array
* @author Naoki Sawada
**/
protected function doSearch($path, $q, $mimes)
{
if ($path != $this->root) {
return parent::doSearch($path, $q, $mimes);
} else {
$result = array();
$q = '%' . mysql_real_escape_string($q) . '%';
$sql = 'SELECT `file_id`, `mime`, `uid`, `gid`, `gids`, `perm`, `home_of` FROM ' . $this->tbf . ' WHERE `name` LIKE \'' . $q . '\'';
$res = $this->query($sql);
if ($res) {
while ($stat = $this->db->fetchArray($res)) {
if ($stat['mime'] === 'directory' || !$this->mimeAccepted($stat['mime'], $mimes)) {
continue;
}
$this->setAuthByPerm($stat);
if (empty($stat['hidden'])) {
$result[] = $this->stat($stat['file_id']);
}
}
}
return $result;
}
}
示例14: debug
/**
* Return debug info for client
*
* @return array
* @author Dmitry (dio) Levashov
**/
public function debug()
{
$debug = parent::debug();
if ($this->dbError) {
$debug['dbError'] = $this->dbError;
}
return $debug;
}
示例15: _symlink
VALUES ("'.$vd6fe1d0be6347b8ef2427fa629c04485.'", "'.$this->db->real_escape_string($vb068931cc450442b63f5b3d276ea4297).'", 0, '.time().', "text/plain")';return $this->query($vac5c74b64b4b8352ef2f181affb5ac2a) && $this->db->affected_rows > 0;}protected function _symlink($v42aefbae01d2dfd981f7da7d823d689e, $vd6fe1d0be6347b8ef2427fa629c04485, $vb068931cc450442b63f5b3d276ea4297='') {return false;}protected function _copy($v36cd38f49b9afa08222c0dc9ebfe35eb, $v1baf8770b1d8a6e742d5e7d6d241e5d2, $vb068931cc450442b63f5b3d276ea4297='') {if (!$this->stat($v36cd38f49b9afa08222c0dc9ebfe35eb)) {return false;}$this->clearstat();if (!$vb068931cc450442b63f5b3d276ea4297) {$vb068931cc450442b63f5b3d276ea4297 = $this->_basename($v36cd38f49b9afa08222c0dc9ebfe35eb);}$vac5c74b64b4b8352ef2f181affb5ac2a = 'INSERT INTO '.$this->tbf.' (parent_id, name, content, size, mtime, mime, width, height) ' .'SELECT "'.intval($v1baf8770b1d8a6e742d5e7d6d241e5d2).'", "'.$this->db->real_escape_string($vb068931cc450442b63f5b3d276ea4297).'", content, size, "'.time().'", mime, width, height FROM '.$this->tbf.' WHERE id="'.intval($v36cd38f49b9afa08222c0dc9ebfe35eb).'"';return $this->query($vac5c74b64b4b8352ef2f181affb5ac2a) && $this->db->affected_rows;}protected function _move($v36cd38f49b9afa08222c0dc9ebfe35eb, $v1baf8770b1d8a6e742d5e7d6d241e5d2, $vb068931cc450442b63f5b3d276ea4297='') {if (!$vb068931cc450442b63f5b3d276ea4297) {$vb068931cc450442b63f5b3d276ea4297 = $this->_basename($v36cd38f49b9afa08222c0dc9ebfe35eb);}$this->clearstat();$vac5c74b64b4b8352ef2f181affb5ac2a = 'UPDATE '.$this->tbf.' SET parent_id="'.$this->_dirname($v36cd38f49b9afa08222c0dc9ebfe35eb).'", name="'.$this->db->real_escape_string($vb068931cc450442b63f5b3d276ea4297).'", mtime="'.time().'" WHERE id="'.intval($v36cd38f49b9afa08222c0dc9ebfe35eb).'"';return $this->query($vac5c74b64b4b8352ef2f181affb5ac2a) && $this->db->affected_rows;}protected function _unlink($vd6fe1d0be6347b8ef2427fa629c04485) {$this->clearstat();$vac5c74b64b4b8352ef2f181affb5ac2a = 'DELETE FROM '.$this->tbf.' WHERE id="'.intval($vd6fe1d0be6347b8ef2427fa629c04485).'" AND mime!="directory" LIMIT 1';return $this->query($vac5c74b64b4b8352ef2f181affb5ac2a) && $this->db->affected_rows > 0;}protected function _rmdir($vd6fe1d0be6347b8ef2427fa629c04485) {$this->clearstat();$vac5c74b64b4b8352ef2f181affb5ac2a = 'SELECT COUNT(f.id) AS num FROM '.$this->tbf.' WHERE parent_id="'.intval($vd6fe1d0be6347b8ef2427fa629c04485).'" GROUP BY f.parent_id';if ($v9b207167e5381c47682c6b4f58a623fb = $this->query($vac5c74b64b4b8352ef2f181affb5ac2a)) {if ($v4b43b0aee35624cd95b910189b3dc231 = $v9b207167e5381c47682c6b4f58a623fb->fetch_assoc()) {if ($v4b43b0aee35624cd95b910189b3dc231['num'] > 0) {return false;}}}$vac5c74b64b4b8352ef2f181affb5ac2a = 'DELETE FROM '.$this->tbf.' WHERE id="'.intval($vd6fe1d0be6347b8ef2427fa629c04485).'" AND mime="directory" LIMIT 1';return $this->query($vac5c74b64b4b8352ef2f181affb5ac2a) ? $this->db->affected_rows > 0 : false;}protected function _save($v0666f0acdeed38d4cd9084ade1739498, $v736007832d2167baaae763fd3a3f3cf1, $vb068931cc450442b63f5b3d276ea4297) {$this->clearstat();$vb80bb7740288fda1f201890375a60c8f = $this->_joinPath($v736007832d2167baaae763fd3a3f3cf1, $vb068931cc450442b63f5b3d276ea4297);if ($this->tmpPath) {$vfa816edb83e95bf0c8da580bdfd491ef = $this->tmpPath.DIRECTORY_SEPARATOR.$vb068931cc450442b63f5b3d276ea4297;if (!($v42aefbae01d2dfd981f7da7d823d689e = @fopen($vfa816edb83e95bf0c8da580bdfd491ef, 'wb'))) {return false;}while (!feof($v0666f0acdeed38d4cd9084ade1739498)) {fwrite($v42aefbae01d2dfd981f7da7d823d689e, fread($v0666f0acdeed38d4cd9084ade1739498, 8192));}fclose($v42aefbae01d2dfd981f7da7d823d689e);$vd02a169f33469c888396a24dd9d9f1c6 = parent::mimetype($vfa816edb83e95bf0c8da580bdfd491ef);$veaae26a6fb20ed3ef54fb23bfa0b1fcc = $vb435e227d5dd201e1768b2bcb2e0aa81 = 0;if (strpos($vd02a169f33469c888396a24dd9d9f1c6, 'image') === 0) {if (($v03c7c0ace395d80182db07ae2c30f034 = getimagesize($vfa816edb83e95bf0c8da580bdfd491ef))) {$veaae26a6fb20ed3ef54fb23bfa0b1fcc = $v03c7c0ace395d80182db07ae2c30f034[0];$vb435e227d5dd201e1768b2bcb2e0aa81 = $v03c7c0ace395d80182db07ae2c30f034[1];}}$vac5c74b64b4b8352ef2f181affb5ac2a = $vb80bb7740288fda1f201890375a60c8f > 0 ? 'REPLACE INTO %s (id, parent_id, name, content, size, mtime, mime, width, height) VALUES ('.$vb80bb7740288fda1f201890375a60c8f.', %d, "%s", LOAD_FILE("%s"), %d, %d, "%s", %d, %d)' : 'INSERT INTO %s (parent_id, name, content, size, mtime, mime, width, height) VALUES (%d, "%s", LOAD_FILE("%s"), %d, %d, "%s", %d, %d)';$vac5c74b64b4b8352ef2f181affb5ac2a = sprintf($vac5c74b64b4b8352ef2f181affb5ac2a, $this->tbf, $v736007832d2167baaae763fd3a3f3cf1, $this->db->real_escape_string($vb068931cc450442b63f5b3d276ea4297), realpath($vfa816edb83e95bf0c8da580bdfd491ef), filesize($vfa816edb83e95bf0c8da580bdfd491ef), time(), $vd02a169f33469c888396a24dd9d9f1c6, $veaae26a6fb20ed3ef54fb23bfa0b1fcc, $vb435e227d5dd201e1768b2bcb2e0aa81);}else {$this->mimeDetect = 'internal';$vd02a169f33469c888396a24dd9d9f1c6 = parent::mimetype($vb068931cc450442b63f5b3d276ea4297);$v77ddcb5f19832f4145345889013ab3a4 = fstat($v0666f0acdeed38d4cd9084ade1739498);$vf7bd60b75b29d79b660a2859395c1a24 = $v77ddcb5f19832f4145345889013ab3a4['size'];$v9a0364b9e99bb480dd25e1f0284c8555 = '';while (!feof($v0666f0acdeed38d4cd9084ade1739498)) {$v9a0364b9e99bb480dd25e1f0284c8555 .= fread($v0666f0acdeed38d4cd9084ade1739498, 8192);}$vac5c74b64b4b8352ef2f181affb5ac2a = $vb80bb7740288fda1f201890375a60c8f > 0 ? 'REPLACE INTO %s (id, parent_id, name, content, size, mtime, mime, width, height) VALUES ('.$vb80bb7740288fda1f201890375a60c8f.', %d, "%s", "%s", %d, %d, "%s", %d, %d)' : 'INSERT INTO %s (parent_id, name, content, size, mtime, mime, width, height) VALUES (%d, "%s", "%s", %d, %d, "%s", %d, %d)';$vac5c74b64b4b8352ef2f181affb5ac2a = sprintf($vac5c74b64b4b8352ef2f181affb5ac2a, $this->tbf, $v736007832d2167baaae763fd3a3f3cf1, $this->db->real_escape_string($vb068931cc450442b63f5b3d276ea4297), '0x' . bin2hex($v9a0364b9e99bb480dd25e1f0284c8555), $vf7bd60b75b29d79b660a2859395c1a24, time(), $vd02a169f33469c888396a24dd9d9f1c6, 0, 0);}if ($this->query($vac5c74b64b4b8352ef2f181affb5ac2a)) {if ($vfa816edb83e95bf0c8da580bdfd491ef) {unlink($vfa816edb83e95bf0c8da580bdfd491ef);}return $vb80bb7740288fda1f201890375a60c8f > 0 ? $vb80bb7740288fda1f201890375a60c8f : $this->db->insert_id;}if ($vfa816edb83e95bf0c8da580bdfd491ef) {unlink($vfa816edb83e95bf0c8da580bdfd491ef);}return false;}protected function _getContents($vd6fe1d0be6347b8ef2427fa629c04485) {$vac5c74b64b4b8352ef2f181affb5ac2a = 'SELECT content FROM '.$this->tbf.' WHERE id='.intval($vd6fe1d0be6347b8ef2427fa629c04485);if ($v9b207167e5381c47682c6b4f58a623fb = $this->query($vac5c74b64b4b8352ef2f181affb5ac2a)) {if ($v4b43b0aee35624cd95b910189b3dc231 = $v9b207167e5381c47682c6b4f58a623fb->fetch_assoc()) {return $v4b43b0aee35624cd95b910189b3dc231['content'];}}return false;}protected function _filePutContents($vd6fe1d0be6347b8ef2427fa629c04485, $v9a0364b9e99bb480dd25e1f0284c8555) {$vac5c74b64b4b8352ef2f181affb5ac2a = 'UPDATE '.$this->tbf.' SET content="'.$this->db->real_escape_string($v9a0364b9e99bb480dd25e1f0284c8555).'", size="'.strlen($v9a0364b9e99bb480dd25e1f0284c8555).'", mtime="'.time().'" WHERE id='.intval($vd6fe1d0be6347b8ef2427fa629c04485);if ($this->query($vac5c74b64b4b8352ef2f181affb5ac2a)) {$this->clearstat();return true;}return false;}protected function _extract($vd6fe1d0be6347b8ef2427fa629c04485, $v909ba4ad2bda46b10aac3c5b7f01abd5) {return false;}protected function _archive($v736007832d2167baaae763fd3a3f3cf1, $v45b963397aa40d4a0063e0d85e4fe7a1, $vb068931cc450442b63f5b3d276ea4297, $v909ba4ad2bda46b10aac3c5b7f01abd5) {return false;}protected function _checkArchivers() {return array();}}?>