• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP jpimport函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中jpimport函数的典型用法代码示例。如果您正苦于以下问题:PHP jpimport函数的具体用法?PHP jpimport怎么用?PHP jpimport使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了jpimport函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: logName

 /**
  * Calculates the absolute path to the log file
  */
 function logName()
 {
     if (!class_exists('JoomlapackModelLog')) {
         jpimport('models.log', true);
     }
     return JoomlapackModelLog::getLogFilename();
 }
开发者ID:jnvilo,项目名称:tomasinasanctuary.org,代码行数:10,代码来源:logger.php


示例2: getDirectory

 /**
  * Returns the contents of a directory and their exclusion status
  * @param $root string Start from this folder
  * @return array Directories and their status
  */
 function getDirectory($root)
 {
     // If there's no root directory specified, use the site's root
     $root = is_null($root) ? JPATH_SITE : $root;
     // Initialize filter list
     $this->init();
     // Initialize directories array
     $arDirs = array();
     // Get subfolders
     jpimport('classes.engine.lister.default');
     $FS = new JoomlapackListerAbstraction();
     $allFilesAndDirs = $FS->getDirContents($root);
     if (!($allFilesAndDirs === false)) {
         foreach ($allFilesAndDirs as $fileName) {
             if (is_dir($fileName)) {
                 $fileName = basename($fileName);
                 if (JoomlapackAbstraction::TranslateWinPath($root) == JoomlapackAbstraction::TranslateWinPath(JPATH_SITE) && ($fileName == "." || $fileName == "..")) {
                 } else {
                     if ($this->_folderFilters == "") {
                         $arDirs[$fileName] = false;
                     } else {
                         $arDirs[$fileName] = in_array(JoomlapackAbstraction::TranslateWinPath($root . DS . $fileName), $this->_folderFilters);
                     }
                 }
             }
             // if
         }
         // foreach
     }
     // if
     ksort($arDirs);
     return $arDirs;
 }
开发者ID:reeleis,项目名称:ohiocitycycles,代码行数:38,代码来源:def.php


示例3: selectAlgorithm

 /**
  * Selects the algorithm to use based on the domain name
  *
  * @param string $domain The domain to return algorithm for
  * @return string The algorithm to use
  */
 function selectAlgorithm($domain)
 {
     if (!class_exists('JoomlapackModelregistry')) {
         jpimport('models.registry', true);
     }
     $registry =& JoomlapackModelRegistry::getInstance();
     switch ($domain) {
         case "installer":
             switch ($registry->get('BackupType')) {
                 case 'full':
                     return 'smart';
                     break;
                 default:
                     return '(null)';
                     break;
             }
             break;
         case "PackDB":
             return $registry->get('dbAlgorithm');
             break;
         case "Packing":
             switch ($registry->get('BackupType')) {
                 case 'full':
                     return $registry->get('packAlgorithm');
                     break;
                 default:
                     return '(null)';
                     break;
             }
             break;
         default:
             return "(null)";
             break;
     }
 }
开发者ID:albertobraschi,项目名称:Hab,代码行数:41,代码来源:algorunner.php


示例4: display

 function display()
 {
     $task = JRequest::getCmd('task', 'default');
     switch ($task) {
         case 'showcomment':
             JToolBarHelper::title(JText::_('JOOMLAPACK') . ': <small><small>' . JText::_('BUADMIN') . '</small></small>');
             JToolBarHelper::back('Back', 'index.php?option=' . JRequest::getCmd('option') . '&view=buadmin');
             JoomlapackHelperUtils::addLiveHelp('buadmin');
             $document =& JFactory::getDocument();
             $document->addStyleSheet(JURI::base() . 'components/com_joomlapack/assets/css/joomlapack.css');
             jpimport('models.statistics', true);
             $model =& JoomlapackModelStatistics::getInstance('Statistics', 'JoomlapackModel');
             $model->setId(JRequest::getInt('id'));
             $record =& $model->getStatistic();
             $this->assignRef('record', $record);
             JRequest::setVar('tpl', 'comment');
             break;
         case 'restore':
             JToolBarHelper::title(JText::_('JOOMLAPACK') . ': <small><small>' . JText::_('BUADMIN') . '</small></small>');
             JRequest::setVar('tpl', 'restore');
             $this->assign('password', JRequest::getVar('password'));
             $this->assign('link', JRequest::getVar('linktarget'));
             break;
         default:
             $registry =& JoomlapackModelRegistry::getInstance();
             $easy = $registry->get('easymode', false);
             if (!$easy) {
                 JToolBarHelper::title(JText::_('JOOMLAPACK') . ': <small><small>' . JText::_('BUADMIN') . '</small></small>');
             } else {
                 JToolBarHelper::title(JText::_('JOOMLAPACKEASY') . ': <small><small>' . JText::_('BUADMIN') . '</small></small>');
             }
             JToolBarHelper::back('Back', 'index.php?option=' . JRequest::getCmd('option'));
             JToolBarHelper::spacer();
             JToolBarHelper::deleteList();
             JToolBarHelper::custom('deletefiles', 'delete.png', 'delete_f2.png', JText::_('STATS_LABEL_DELETEFILES'), true);
             JToolBarHelper::save('download', JText::_('STATS_LOG_DOWNLOAD'));
             if (!$easy) {
                 JToolBarHelper::editList('showcomment', JText::_('STATS_LOG_VIEWCOMMENT'));
                 if (JPSPECIALEDITION) {
                     JToolBarHelper::publish('restore', JText::_('STATS_LOG_RESTORE'));
                 }
             }
             JToolBarHelper::spacer();
             if (!$easy) {
                 JoomlapackHelperUtils::addLiveHelp('buadmin');
             } else {
                 JoomlapackHelperUtils::addLiveHelp('buadmineasy');
             }
             $document =& JFactory::getDocument();
             $document->addStyleSheet(JURI::base() . 'components/com_joomlapack/assets/css/joomlapack.css');
             jpimport('models.statistics', true);
             $model =& JoomlapackModelStatistics::getInstance('Statistics', 'JoomlapackModel');
             $list =& $model->getStatisticsListWithMeta();
             $this->assignRef('list', $list);
             $this->assignRef('pagination', $model->getPagination());
             $this->assign('easy', $easy);
             break;
     }
     parent::display(JRequest::getVar('tpl'));
 }
开发者ID:albertobraschi,项目名称:Hab,代码行数:60,代码来源:view.html.php


示例5: display

 function display()
 {
     // Decide what to do; delegate data loading to private methods
     $task = JRequest::getCmd('task', 'display');
     $layout = JRequest::getCmd('layout', 'default');
     JToolBarHelper::title(JText::_('JOOMLAPACK') . ': <small><small>' . JText::_('CRONMAN') . '</small></small>');
     switch ($layout) {
         case 'default_edit':
             // Get the CRON configuration definition
             if ($task == 'add') {
                 $definition = null;
                 $registry =& JoomlapackModelRegistry::getInstance();
                 $secret = $registry->get('secret_key');
                 $this->assign('secret', $secret);
             } else {
                 $id = JRequest::getInt('id', 0);
                 $model =& $this->getModel('cronman');
                 $definition = $model->getConfiguration($id);
             }
             $this->assign('definition', $definition);
             // Get some lists and pass them on
             $model =& $this->getModel('cronman');
             $postops = $model->getPostOpList();
             $this->assign('postops', $postops);
             // Add the buttons
             JToolBarHelper::save();
             JToolBarHelper::apply();
             JToolBarHelper::cancel();
             break;
         case 'default':
         default:
             $this->_default();
             break;
     }
     // Load the util helper
     $this->loadHelper('utils');
     // Add a spacer, a help button and show the template
     JToolBarHelper::spacer();
     JoomlapackHelperUtils::addLiveHelp('profiles');
     // Load a list of profiles
     $model =& $this->getModel('cronman');
     jpimport('models.profiles', true);
     $profilesmodel = new JoomlapackModelProfiles();
     $profiles_objects = $profilesmodel->getProfilesList(true);
     $profiles = array();
     foreach ($profiles_objects as $profile) {
         $id = $profile->id;
         $profiles[(string) $id] = $profile->description;
     }
     unset($profiles_objects);
     unset($profilesmodel);
     $this->assign('profiles', $profiles);
     // Add JoomlaPack CSS
     $document =& JFactory::getDocument();
     $document->addStyleSheet(JURI::base() . '/components/com_joomlapack/assets/css/joomlapack.css');
     // Show the view
     parent::display();
 }
开发者ID:Ratmir15,项目名称:Joomla---formula-of-success,代码行数:58,代码来源:view.html.php


示例6: addWarning

function addWarning($warning)
{
    jpimport('core.cube');
    jpimport('helpers.backup', true);
    $cube =& JoomlapackCUBE::getInstance();
    $cube->addWarning($warning);
    $cube->save();
    return;
}
开发者ID:rlee1962,项目名称:diylegalcenter,代码行数:9,代码来源:default_raw.php


示例7: renderFormattedLog

 function renderFormattedLog()
 {
     // -- Get the log's file name
     // Make sure the model is loaded
     if (!class_exists('JoomlapackModelLog')) {
         jpimport('models.log', true);
     }
     // Get log's file name
     $model = new JoomlapackModelLog();
     $logName = $model->getLogFilename();
     // Load JFile class
     jimport('joomla.filesystem.file');
     if (!JFile::exists($logName)) {
         // Oops! The log doesn't exist!
         echo '<p>' . JText::_('LOG_ERROR_LOGFILENOTEXISTS') . '</p>';
         return;
     } else {
         // Allright, let's load and render it
         $fp = fopen($logName, "rt");
         if ($fp === FALSE) {
             // Oops! The log isn't readable?!
             echo '<p>' . JText::_('LOG_ERROR_UNREADABLE') . '</p>';
             return;
         }
         while (!feof($fp)) {
             $line = fgets($fp);
             if (!$line) {
                 return;
             }
             $exploded = explode("|", $line, 3);
             unset($line);
             switch (trim($exploded[0])) {
                 case "ERROR":
                     $fmtString = "<span style=\"color: red; font-weight: bold;\">[";
                     break;
                 case "WARNING":
                     $fmtString = "<span style=\"color: #D8AD00; font-weight: bold;\">[";
                     break;
                 case "INFO":
                     $fmtString = "<span style=\"color: black;\">[";
                     break;
                 case "DEBUG":
                     $fmtString = "<span style=\"color: #666666; font-size: small;\">[";
                     break;
                 default:
                     $fmtString = "<span style=\"font-size: small;\">[";
                     break;
             }
             $fmtString .= $exploded[1] . "] " . htmlspecialchars($exploded[2]) . "</span><br/>\n";
             unset($exploded);
             echo $fmtString;
             unset($fmtString);
             ob_flush();
         }
     }
 }
开发者ID:BackupTheBerlios,项目名称:kmit-svn,代码行数:56,代码来源:log.php


示例8: echoHTML

 function echoHTML()
 {
     jpimport('classes.engine.lister.default');
     $lister = new JoomlapackListerAbstraction();
     echo "<h2>Default method</h2>";
     $data = $lister->getDirContents('/');
     $this->do_dump($data);
     echo "<h2>glob</h2>";
     $data = $lister->_getDirContents_glob('/');
     $this->do_dump($data);
 }
开发者ID:reeleis,项目名称:ohiocitycycles,代码行数:11,代码来源:debug.php


示例9: display

 function display()
 {
     $task = JRequest::getCmd('task', 'default');
     $act = JRequest::getCmd('act', 'start');
     // Set the toolbar title
     JToolBarHelper::title(JText::_('JOOMLAPACK') . ':: <small><small>' . JText::_('BACKUP') . '</small></small>');
     // Load the util helper
     $this->loadHelper('utils');
     switch ($task) {
         case 'backup':
             if (!class_exists('JoomlapackModelRegistry')) {
                 jpimport('models.registry', true);
             }
             $registry =& JoomlapackModelRegistry::getInstance();
             $this->assign('backupMethod', $registry->get('backupMethod'));
             break;
         case 'error':
             $this->assign('errormessage', JRequest::getString('message'));
             JToolBarHelper::back('Back', 'index.php?option=' . JRequest::getCmd('option'));
             break;
         case 'finised':
             JToolBarHelper::back('Back', 'index.php?option=' . JRequest::getCmd('option'));
             JToolBarHelper::spacer();
             JoomlapackHelperUtils::addLiveHelp('backup');
             break;
         default:
             // Add some buttons
             JToolBarHelper::back('Back', 'index.php?option=' . JRequest::getCmd('option'));
             JToolBarHelper::spacer();
             JoomlapackHelperUtils::addLiveHelp('backup');
             // Load model
             $model =& $this->getModel('backup');
             // Load the Status Helper
             jpimport('helpers.status', true);
             $helper =& JoomlapackHelperStatus::getInstance();
             // Pass on data
             $this->assign('haserrors', !$helper->status);
             $this->assign('hasquirks', $helper->hasQuirks());
             $this->assign('quirks', $helper->getQuirksCell(!$helper->status));
             $this->assign('description', $model->getDescription());
             $this->assign('comment', $model->getComment());
             $this->assign('profile', $model->getProfileID());
             $this->assign('profilelist', $model->getProfilesList());
             break;
     }
     $css = JURI::base() . 'components/com_joomlapack/assets/css/joomlapack.css';
     $document =& JFactory::getDocument();
     $document->addStyleSheet($css);
     parent::display(JRequest::getCmd('tpl', null));
 }
开发者ID:BackupTheBerlios,项目名称:kmit-svn,代码行数:50,代码来源:view.html.php


示例10: testFTPConnection

function testFTPConnection($host, $port, $user, $pass, $initdir, $usessl, $passive)
{
    jpimport('abstract.enginearchiver');
    jpimport('engine.packer.directftp');
    jpimport('core.utility.logger');
    $config = array('host' => $host, 'port' => $port, 'user' => $user, 'pass' => $pass, 'initdir' => $initdir, 'usessl' => $usessl, 'passive' => $passive);
    $test = new JoomlapackPackerDirectftp();
    $test->initialize('', '', $config);
    $errors = $test->getError();
    if (empty($errors)) {
        return true;
    } else {
        return $errors;
    }
}
开发者ID:rlee1962,项目名称:diylegalcenter,代码行数:15,代码来源:default_raw.php


示例11: getLogFilename

 function getLogFilename()
 {
     // Make sure the registry model is loaded
     if (!class_exists('JoomlapackModelRegistry')) {
         jpimport('models.registry', true);
     }
     // Get output directory
     $registry =& JoomlapackModelRegistry::getInstance();
     $outdir = $registry->get('OutputDirectory');
     // Get log's file name
     $logName = $outdir . DS . 'joomlapack.log';
     // Tidy up the path to the file
     jimport('joomla.filesystem.file');
     return $logName;
 }
开发者ID:albertobraschi,项目名称:Hab,代码行数:15,代码来源:log.php


示例12: _checkPermissions

 /**
  * Check that the user has sufficient permissions, or die in error
  *
  */
 function _checkPermissions()
 {
     jpimport('models.registry', true);
     $registry =& JoomlapackModelRegistry::getInstance();
     // Is frontend backup enabled?
     $febEnabled = $registry->get('enableFrontend');
     if (!$febEnabled) {
         die('403 ' . JText::_('ERROR_NOT_ENABLED'));
     }
     // Is the key good?
     $key = JRequest::getVar('key');
     $validKey = $registry->get('secretWord');
     if ($key != $validKey) {
         die('403 ' . JText::_('ERROR_INVALID_KEY'));
     }
 }
开发者ID:joomla-example,项目名称:joomla-repo,代码行数:20,代码来源:backup.php


示例13: _processCUBE

function _processCUBE()
{
    jpimport('core.cube');
    $cube =& JoomlapackCUBE::getInstance();
    $array = $cube->getCUBEArray();
    if ($array['Error'] != '') {
        $action = 'error';
        $message = $array['Error'];
    } elseif ($array['HasRun'] == 1) {
        $action = 'finished';
        $message = '';
    } else {
        $action = 'step';
        $message = '';
    }
    return array($action, $message);
}
开发者ID:albertobraschi,项目名称:Hab,代码行数:17,代码来源:default_raw.php


示例14: echoHTML

    function echoHTML()
    {
        jpimport('helpers.lang');
        $errorStack = array();
        // Initialize an errors stack
        // Cleanup locks
        jpimport('classes.core.cube');
        JoomlapackCUBE::cleanup();
        // Test for the existence of a default temporary folder
        if (!is_dir(JPATH_COMPONENT_ADMINISTRATOR . DS . 'backup')) {
            // Temp dir doesn't exist; try to create one
            if (!@mkdir(JPATH_COMPONENT_ADMINISTRATOR . DS . 'backup')) {
                $errorStack[] = JoomlapackLangManager::_('UNLOCK_CANTCREATEDIR');
            } else {
                // Try creating a deafult .htaccess
                $htaccess = <<<END
Deny from all
END;
                $fp = @fopen(JPATH_COMPONENT_ADMINISTRATOR . DS . 'backup' . DS . '.htaccess');
                if ($fp === false) {
                    $errorStack[] = JoomlapackLangManager::_('UNLOCK_CANTCREATEHTACCESS');
                } else {
                    @fputs($fp, $htaccess);
                    @fclose($fp);
                }
            }
        }
        // Get some more HTML fragments
        echo JoomlapackCommonHTML::getAdminHeadingHTML(JoomlapackLangManager::_('CPANEL_UNLOCK'));
        ?>
		<p>
		<?php 
        if (count($errorStack) == 0) {
            echo JoomlapackLangManager::_('UNLOCK_DONE');
        } else {
            foreach ($errorStack as $error) {
                echo "<p class=\"error\">{$error}</p>";
            }
        }
        ?>
		</p>
		<?php 
    }
开发者ID:reeleis,项目名称:ohiocitycycles,代码行数:43,代码来源:reset.php


示例15: getDirectory

 /**
  * Gets the contents of a directory and flags excluded files
  *
  * @param string $root The directory to scan
  * @return array An associative array of associative arrays (use the code, Luke!)
  */
 function getDirectory($root)
 {
     // If there's no root directory specified, use the site's root
     $root = is_null($root) ? JPATH_SITE : $root;
     $isSiteRoot = JoomlapackAbstraction::TranslateWinPath($root) == JoomlapackAbstraction::TranslateWinPath(JPATH_SITE);
     // Initialize filter list
     $this->init();
     // Initialize the two arrays to be returned
     $arDirs = array();
     $arFiles = array();
     // Get directory's contents
     jpimport('classes.engine.lister.default');
     $FS = new JoomlapackListerAbstraction();
     $allFilesAndDirs = $FS->getDirContents($root);
     if (!($allFilesAndDirs === false)) {
         foreach ($allFilesAndDirs as $fileName) {
             //$fileName = basename($fileName);
             if (is_dir($fileName)) {
                 $fileName = basename($fileName);
                 if ($isSiteRoot && ($fileName == '.' || $fileName == '..') || $fileName == '.') {
                     // Don't include . and .. for site's root, or . for all dirs
                 } else {
                     if ($fileName != '.') {
                         $arDirs[] = $fileName;
                     }
                 }
             } elseif (is_file($fileName)) {
                 $fileName = basename($fileName);
                 $excluded = is_array($this->_singleFileFilters) ? in_array(JoomlapackAbstraction::TranslateWinPath($root . DS . $fileName), $this->_singleFileFilters) : false;
                 $arFiles[$fileName] = $excluded;
             }
         }
     }
     sort($arDirs);
     $ret['folders'] = $arDirs;
     unset($arDirs);
     $ret['files'] = $arFiles;
     unset($arFiles);
     return $ret;
 }
开发者ID:reeleis,项目名称:ohiocitycycles,代码行数:46,代码来源:sff.php


示例16: display

 /**
  * Displays the Control Panel (main page)
  * Accessible at index.php?option=com_joomlapack
  *
  */
 function display()
 {
     $registry =& JoomlapackModelRegistry::getInstance();
     // FIX 2.1.b2 - Disabled the nag screen because of incompatibility with some servers
     /*
     // Make sure the user has seen the license nag screen
     $nagscreen = $registry->get('nagscreen',false);
     if(!$nagscreen)
     {
     $this->setRedirect(JURI::base().'index.php?option=com_joomlapack&view=nag' );
     return;
     }
     */
     // Invalidate stale backups
     jpimport('core.cube');
     JoomlapackCUBE::reset();
     // If this is the Easy Mode, force switch to profile #1 (default profile)
     if ($registry->get('easymode', false)) {
         $session =& JFactory::getSession();
         $session->set('profile', 1, 'joomlapack');
     }
     // Display the panel
     parent::display();
 }
开发者ID:BackupTheBerlios,项目名称:kmit-svn,代码行数:29,代码来源:cpanel.php


示例17: _addFile

 /**
  * The most basic file transaction: add a single entry (file or directory) to
  * the archive.
  *
  * @param bool $isVirtual If true, the next parameter contains file data instead of a file name
  * @param string $sourceNameOrData Absolute file name to read data from or the file data itself is $isVirtual is true
  * @param string $targetName The (relative) file name under which to store the file in the archive
  * @return True on success, false otherwise
  * @since 1.2.1
  * @access protected
  * @abstract 
  */
 function _addFile($isVirtual, &$sourceNameOrData, $targetName)
 {
     static $configuration;
     if (!$configuration) {
         jpimport('models.registry', true);
         $configuration =& JoomlapackModelRegistry::getInstance();
     }
     // See if it's a directory
     $isDir = $isVirtual ? false : is_dir($sourceNameOrData);
     // Get real size before compression
     if ($isVirtual) {
         $fileSize = strlen($sourceNameOrData);
     } else {
         $fileSize = $isDir ? 0 : filesize($sourceNameOrData);
     }
     // Decide if we will compress
     if ($isDir) {
         $compressionMethod = 0;
         // don't compress directories...
     } else {
         // Do we have plenty of memory left?
         $memLimit = ini_get("memory_limit");
         if (is_numeric($memLimit) && $memLimit < 0) {
             $memLimit = "";
         }
         // 1.2a3 -- Rare case with memory_limit < 0, e.g. -1Mb!
         if ($memLimit == "" || $fileSize >= _JoomlapackPackerZIP_COMPRESSION_THRESHOLD) {
             // No memory limit, or over 1Mb files => always compress up to 1Mb files (otherwise it times out)
             $compressionMethod = $fileSize <= _JoomlapackPackerZIP_COMPRESSION_THRESHOLD ? 1 : 0;
         } elseif (function_exists("memory_get_usage")) {
             // PHP can report memory usage, see if there's enough available memory; Joomla! alone eats about 5-6Mb! This code is called on files <= 1Mb
             $memLimit = $this->_return_bytes($memLimit);
             $availableRAM = $memLimit - memory_get_usage();
             $compressionMethod = $availableRAM / 2.5 >= $fileSize ? 1 : 0;
         } else {
             // PHP can't report memory usage, compress only files up to 512Kb (conservative approach) and hope it doesn't break
             $compressionMethod = $fileSize <= 524288 ? 1 : 0;
         }
     }
     $compressionMethod = function_exists("gzcompress") ? $compressionMethod : 0;
     $storedName = $targetName;
     /* "Entity Description BLock" segment. */
     $unc_len =& $fileSize;
     // File size
     $storedName .= $isDir ? "/" : "";
     if ($compressionMethod == 1) {
         if ($isVirtual) {
             $udata =& $sourceNameOrData;
         } else {
             // Get uncompressed data
             if (function_exists("file_get_contents") && _JoomlapackPackerZIP_FORCE_FOPEN == false) {
                 $udata = @file_get_contents($sourceNameOrData);
                 // PHP > 4.3.0 saves us the trouble
             } else {
                 // Argh... the hard way!
                 $udatafp = @fopen($sourceNameOrData, "rb");
                 if (!($udatafp === false)) {
                     $udata = "";
                     while (!feof($udatafp)) {
                         // Keep-alive on file reading
                         if ($configuration->get("enableMySQLKeepalive", false)) {
                             list($usec, $sec) = explode(" ", microtime());
                             $endTime = (double) $usec + (double) $sec;
                             if ($endTime - $this->startTime > 0.5) {
                                 $this->startTime = $endTime;
                                 JoomlapackCUBETables::WriteVar('dummy', 1);
                             }
                         }
                         $udata .= fread($udatafp, JPPACK_CHUNK);
                     }
                     fclose($udatafp);
                 } else {
                     $udata = false;
                 }
             }
         }
         if ($udata === FALSE) {
             // Unreadable file, skip it.
             JoomlapackLogger::WriteLog(_JP_LOG_WARNING, JText::sprintf('CUBE_WARN_UNREADABLEFILE', $sourceNameOrData));
             return false;
         } else {
             // Proceed with compression
             $zdata = @gzcompress($udata);
             if ($zdata === false) {
                 // If compression fails, let it behave like no compression was available
                 $c_len =& $unc_len;
                 $compressionMethod = 0;
             } else {
//.........这里部分代码省略.........
开发者ID:albertobraschi,项目名称:Hab,代码行数:101,代码来源:jpa.php


示例18: _loadAndCacheFilters

 /**
  * Loads the exclusion filters off the db and caches them inside the object
  */
 function _loadAndCacheFilters()
 {
     jpimport('core.utility.filtermanager');
     JoomlapackLogger::WriteLog(_JP_LOG_DEBUG, "JoomlapackCUBEDomainPack :: Initializing filter manager");
     $filterManager = new JoomlapackCUBEFilterManager();
     $filterManager->init();
     JoomlapackLogger::WriteLog(_JP_LOG_DEBUG, "JoomlapackCUBEDomainPack :: Getting Directory Exclusion Filters");
     $this->_ExcludeDirs = $filterManager->getFilters('folder');
     JoomlapackLogger::WriteLog(_JP_LOG_DEBUG, "JoomlapackCUBEDomainPack :: Getting Single File Filters");
     $this->_ExcludeFiles = $filterManager->getFilters('singlefile');
     JoomlapackLogger::WriteLog(_JP_LOG_DEBUG, "JoomlapackCUBEDomainPack :: Getting Contained Files Filters");
     $this->_skipContainedFiles = $filterManager->getFilters('containedfiles');
     JoomlapackLogger::WriteLog(_JP_LOG_DEBUG, "JoomlapackCUBEDomainPack :: Getting Contained Directories Filters");
     $this->_skipContainedDirectories = $filterManager->getFilters('containeddirectories');
     JoomlapackLogger::WriteLog(_JP_LOG_DEBUG, "JoomlapackCUBEDomainPack :: Done with filter manager");
     unset($filterManager);
 }
开发者ID:rlee1962,项目名称:diylegalcenter,代码行数:20,代码来源:pack.php


示例19: defined

 * @since 1.3
 */
// Protect from unauthorized access
defined('_JEXEC') or die('Restricted Access');
?>
<h1><?php 
echo JText::_('BACKUP_HEADER_BACKINGUP');
?>
</h1>
<p><?php 
echo JText::_('BACKUP_TEXT_BACKINGUP');
?>
</p>
<?php 
if ($this->backupMethod == 'ajax') {
    jpimport('helpers.sajax', true);
    sajax_init();
    sajax_force_page_ajax('backup');
    sajax_export('start', 'tick', 'renderProgress');
    $description = JRequest::getString('description');
    $comment = JRequest::getString('comment');
    $baseURL = str_replace('\\', '%5c', JURI::base() . 'index.php?option=com_joomlapack&view=backup&task=');
    ?>
<!-- AJAX-powered backup method -->
<script type="text/javascript" language="Javascript">
	/**
	 * (S)AJAX JavaScript
	 */
	<?php 
    sajax_show_javascript();
    ?>
开发者ID:albertobraschi,项目名称:Hab,代码行数:31,代码来源:default_backup.php


示例20: defined

* @version		$Id$
* @license 		http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @since		2.1
*
* JoomlaPack is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* 
* GZipped TAR Creation Module
*
* Creates a TAR file (originally uncompressed) using the PEAR library and the
* Archive_Tar module, then compresses it using the gzip system command
*/
defined('_JEXEC') or die('Restricted access');
jpimport('engine.packer.tar');
// Load the ancestor class
class JoomlapackPackerTARGZ extends JoomlapackPackerTAR
{
    /**
     * The final compressed archive's location
     * @var string
     */
    var $_archiveFilename;
    /**
     * The temporary uncompressed archive's location
     * @var string
     */
    var $_tempFilename;
    /**
     * Class constructor - initializes internal operating parameters
开发者ID:albertobraschi,项目名称:Hab,代码行数:31,代码来源:targz.php



注:本文中的jpimport函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP jq_form_remote_tag函数代码示例发布时间:2022-05-15
下一篇:
PHP journal函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap