/** * Returns the file data for a file by offsest in the ZIP archive * * @access private * @param int $key The position of the file in the archive. * @return string Uncompresed file data buffer * @since 1.5 */ function _getFileData($key) { if ($this->_metadata[$key]['_method'] == 0x8) { // If zlib extention is loaded use it if (extension_loaded('zlib')) { return @gzinflate(substr($this->_data, $this->_metadata[$key]['_dataStart'], $this->_metadata[$key]['csize'])); } } elseif ($this->_metadata[$key]['_method'] == 0x0) { /* Files that aren't compressed. */ return substr($this->_data, $this->_metadata[$key]['_dataStart'], $this->_metadata[$key]['csize']); } elseif ($this->_metadata[$key]['_method'] == 0x12) { // Is bz2 extension loaded? If not try to load it if (!extension_loaded('bz2')) { if (ext_isWindows()) { @dl('php_bz2.dll'); } else { @dl('bz2.so'); } } // If bz2 extention is sucessfully loaded use it if (extension_loaded('bz2')) { return bzdecompress(substr($this->_data, $this->_metadata[$key]['_dataStart'], $this->_metadata[$key]['csize'])); } } return ''; }
echo $login_res->getMessage(); $GLOBALS['file_mode'] = $_SESSION['file_mode'] = 'file'; } } } //------------------------------------------------------------------------------ if ($GLOBALS["require_login"]) { // LOGIN require _EXT_PATH . "/include/login.php"; if ($GLOBALS["action"] == "logout") { logout(); } else { login(); } } if (ext_isWindows()) { if (strstr($GLOBALS['home_dir'], ':')) { $GLOBALS['home_dir'][0] = strtoupper($GLOBALS['home_dir'][0]); } } //------------------------------------------------------------------------------ if (!isset($_REQUEST['dir'])) { $GLOBALS["dir"] = $dir = extGetParam($_SESSION, 'ext_' . $GLOBALS['file_mode'] . 'dir', ''); if (!empty($dir)) { $dir = @$dir[0] == '/' ? substr($dir, 1) : $dir; } $try_this = ext_isFTPMode() ? '/' . $dir : $GLOBALS['home_dir'] . '/' . $dir; if (!empty($dir) && !$GLOBALS['ext_File']->file_exists($try_this)) { $dir = ''; } } else {