当前位置: 首页>>代码示例>>PHP>>正文


PHP VersionCheck类代码示例

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


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

示例1: index

 /**
  * Display conference management index page.
  */
 function index($args, &$request)
 {
     // Manager requests should come to the Conference context, not Sched Conf
     if ($request->getRequestedSchedConfPath() != 'index') {
         $request->redirect(null, 'index', 'manager');
     }
     $this->validate();
     $this->setupTemplate($request);
     $conference =& $request->getConference();
     $templateMgr =& TemplateManager::getManager($request);
     // Display a warning message if there is a new version of OJS available
     $newVersionAvailable = false;
     if (Config::getVar('general', 'show_upgrade_warning')) {
         import('lib.pkp.classes.site.VersionCheck');
         if ($latestVersion = VersionCheck::checkIfNewVersionExists()) {
             $newVersionAvailable = true;
             $templateMgr->assign('latestVersion', $latestVersion);
             $currentVersion =& VersionCheck::getCurrentDBVersion();
             $templateMgr->assign('currentVersion', $currentVersion->getVersionString());
             // Get contact information for site administrator
             $roleDao = DAORegistry::getDAO('RoleDAO');
             $siteAdmins =& $roleDao->getUsersByRoleId(ROLE_ID_SITE_ADMIN);
             $templateMgr->assign_by_ref('siteAdmin', $siteAdmins->next());
         }
     }
     $templateMgr->assign('newVersionAvailable', $newVersionAvailable);
     $schedConfDao = DAORegistry::getDAO('SchedConfDAO');
     $schedConfs = $schedConfDao->getAll(false, $conference->getId());
     $templateMgr->assign_by_ref('schedConfs', $schedConfs);
     $templateMgr->assign('announcementsEnabled', $conference->getSetting('enableAnnouncements'));
     $templateMgr->assign('helpTopicId', 'conference.index');
     $templateMgr->display(ROLE_PATH_MANAGER . '/index.tpl');
 }
开发者ID:artkuo,项目名称:ocs,代码行数:36,代码来源:ManagerHandler.inc.php

示例2: index

 /**
  * Display journal management index page.
  */
 function index($args, $request)
 {
     $this->setupTemplate($request);
     $journal = $request->getJournal();
     $templateMgr = TemplateManager::getManager($request);
     // Display a warning message if there is a new version of OJS available
     $newVersionAvailable = false;
     if (Config::getVar('general', 'show_upgrade_warning')) {
         import('lib.pkp.classes.site.VersionCheck');
         if ($latestVersion = VersionCheck::checkIfNewVersionExists()) {
             $newVersionAvailable = true;
             $templateMgr->assign('latestVersion', $latestVersion);
             $currentVersion = VersionCheck::getCurrentDBVersion();
             $templateMgr->assign('currentVersion', $currentVersion->getVersionString());
             // Get contact information for site administrator
             $roleDao = DAORegistry::getDAO('RoleDAO');
             $siteAdmins = $roleDao->getUsersByRoleId(ROLE_ID_SITE_ADMIN);
             $templateMgr->assign('siteAdmin', $siteAdmins->next());
         }
     }
     $templateMgr->assign('newVersionAvailable', $newVersionAvailable);
     $templateMgr->assign('publishingMode', $journal->getSetting('publishingMode'));
     $templateMgr->assign('announcementsEnabled', $journal->getSetting('enableAnnouncements'));
     $session = $request->getSession();
     $session->unsetSessionVar('enrolmentReferrer');
     $templateMgr->display('manager/index.tpl');
 }
开发者ID:utlib,项目名称:ojs,代码行数:30,代码来源:ManagerHandler.inc.php

示例3: getPatch

 /**
  * Find the applicable patch for the current code version (if available).
  * @param $versionInfo array as returned by parseVersionXML()
  * @param $codeVersion as returned by getCurrentCodeVersion()
  * @return string
  */
 function getPatch(&$versionInfo, $codeVersion = null)
 {
     if (!isset($codeVersion)) {
         $codeVersion =& VersionCheck::getCurrentCodeVersion();
     }
     if (isset($versionInfo['patch'][$codeVersion->getVersionString()])) {
         return $versionInfo['patch'][$codeVersion->getVersionString()];
     }
     return null;
 }
开发者ID:alenoosh,项目名称:ojs,代码行数:16,代码来源:VersionCheck.inc.php

示例4: executePluginTest

 /**
  * Executes the plug-in test.
  * @param $pluginCategory string
  * @param $pluginDir string
  * @param $pluginName string
  * @param $filterGroups array
  */
 protected function executePluginTest($pluginCategory, $pluginDir, $pluginName, $filterGroups)
 {
     // Make sure that the xml configuration is valid.
     $filterConfigFile = 'plugins/' . $pluginCategory . '/' . $pluginDir . '/filter/' . PLUGIN_FILTER_DATAFILE;
     $this->validateXmlConfig(array('./' . $filterConfigFile, './lib/pkp/' . $filterConfigFile));
     // Make sure that data from earlier tests is being deleted first.
     $filterDao =& DAORegistry::getDAO('FilterDAO');
     /* @var $filterDao FilterDAO */
     foreach ($filterGroups as $filterGroupSymbolic) {
         foreach ($filterDao->getObjectsByGroup($filterGroupSymbolic) as $filter) {
             $filterDao->deleteObject($filter);
         }
         foreach ($filterDao->getObjectsByGroup($filterGroupSymbolic, 0, true) as $filter) {
             $filterDao->deleteObject($filter);
         }
     }
     $filterGroupDao =& DAORegistry::getDAO('FilterGroupDAO');
     /* @var $filterGroupDao FilterGroupDAO */
     foreach ($filterGroups as $filterGroupSymbolic) {
         $filterGroupDao->deleteObjectBySymbolic($filterGroupSymbolic);
     }
     // Mock request and router.
     import('lib.pkp.classes.core.PKPRouter');
     import('classes.core.Request');
     $mockRequest = $this->getMock('Request', array('getRouter', 'getUser'));
     $router = new PKPRouter();
     $mockRequest->expects($this->any())->method('getRouter')->will($this->returnValue($router));
     $mockRequest->expects($this->any())->method('getUser')->will($this->returnValue(null));
     Registry::set('request', $mockRequest);
     // Instantiate the installer.
     import('classes.install.Install');
     $installFile = './lib/pkp/tests/plugins/testPluginInstall.xml';
     $params = $this->getConnectionParams();
     $installer = new Install($params, $installFile, true);
     // Parse the plug-ins version.xml.
     import('lib.pkp.classes.site.VersionCheck');
     self::assertFileExists($versionFile = './plugins/' . $pluginCategory . '/' . $pluginDir . '/version.xml');
     self::assertArrayHasKey('version', $versionInfo =& VersionCheck::parseVersionXML($versionFile));
     self::assertType('Version', $pluginVersion =& $versionInfo['version']);
     $installer->setCurrentVersion($pluginVersion);
     // Install the plug-in.
     self::assertTrue($installer->execute());
     // Reset the hook registry.
     Registry::set('hooks', $nullVar = null);
     // Test whether the installation is idempotent.
     self::assertTrue($installer->execute());
     // Test whether the filter groups have been installed.
     foreach ($filterGroups as $filterGroupSymbolic) {
         // Check the group.
         self::assertType('FilterGroup', $filterGroupDao->getObjectBySymbolic($filterGroupSymbolic), $filterGroupSymbolic);
     }
 }
开发者ID:ramonsodoma,项目名称:pkp-lib,代码行数:59,代码来源:PluginTestCase.inc.php

示例5: systemInfo

 /**
  * Show system information summary.
  * @param $args array
  * @param $request PKPRequest
  */
 function systemInfo($args, $request)
 {
     $this->setupTemplate($request, true);
     $versionDao = DAORegistry::getDAO('VersionDAO');
     $currentVersion = $versionDao->getCurrentVersion();
     $templateMgr = TemplateManager::getManager($request);
     $templateMgr->assign('currentVersion', $currentVersion);
     if ($request->getUserVar('versionCheck')) {
         $latestVersionInfo = VersionCheck::getLatestVersion();
         $latestVersionInfo['patch'] = VersionCheck::getPatch($latestVersionInfo);
         $templateMgr->assign('latestVersionInfo', $latestVersionInfo);
     }
     $templateMgr->display('admin/systemInfo.tpl');
 }
开发者ID:jprk,项目名称:pkp-lib,代码行数:19,代码来源:AdminFunctionsHandler.inc.php

示例6: display

 /**
  * Display the form.
  */
 function display()
 {
     $templateMgr =& TemplateManager::getManager();
     $templateMgr->assign('localeOptions', $this->supportedLocales);
     $templateMgr->assign('clientCharsetOptions', $this->supportedClientCharsets);
     $templateMgr->assign('connectionCharsetOptions', $this->supportedConnectionCharsets);
     $templateMgr->assign('databaseCharsetOptions', $this->supportedDatabaseCharsets);
     $templateMgr->assign('encryptionOptions', $this->supportedEncryptionAlgorithms);
     $templateMgr->assign('databaseDriverOptions', $this->checkDBDrivers());
     $templateMgr->assign('supportsMBString', String::hasMBString() ? Locale::translate('common.yes') : Locale::translate('common.no'));
     $templateMgr->assign('phpIsSupportedVersion', version_compare(PHP_REQUIRED_VERSION, PHP_VERSION) != 1);
     $templateMgr->assign('phpRequiredVersion', PHP_REQUIRED_VERSION);
     $templateMgr->assign('phpVersion', PHP_VERSION);
     $templateMgr->assign('version', VersionCheck::getCurrentCodeVersion());
     parent::display();
 }
开发者ID:alenoosh,项目名称:ojs,代码行数:19,代码来源:InstallForm.inc.php

示例7: index

 /**
  * Display site admin index page.
  */
 function index($args, &$request)
 {
     $this->validate();
     $this->setupTemplate($request);
     $templateMgr =& TemplateManager::getManager();
     // Display a warning message if there is a new version of OJS available
     $newVersionAvailable = false;
     if (Config::getVar('general', 'show_upgrade_warning')) {
         import('lib.pkp.classes.site.VersionCheck');
         if ($latestVersion = VersionCheck::checkIfNewVersionExists()) {
             $newVersionAvailable = true;
             $templateMgr->assign('latestVersion', $latestVersion);
             $currentVersion =& VersionCheck::getCurrentDBVersion();
             $templateMgr->assign('currentVersion', $currentVersion->getVersionString());
         }
     }
     $templateMgr->assign('newVersionAvailable', $newVersionAvailable);
     $templateMgr->display('admin/index.tpl');
 }
开发者ID:Rygbee,项目名称:harvester,代码行数:22,代码来源:AdminHandler.inc.php

示例8: journal

 /**
  * Display The Journal page.
  * @param $args array
  * @param $request PKPRequest
  */
 function journal($args, $request)
 {
     $templateMgr = TemplateManager::getManager($request);
     $this->setupTemplate($request);
     // Display a warning message if there is a new version of OJS available
     if (Config::getVar('general', 'show_upgrade_warning')) {
         import('lib.pkp.classes.site.VersionCheck');
         if ($latestVersion = VersionCheck::checkIfNewVersionExists()) {
             $templateMgr->assign('newVersionAvailable', true);
             $templateMgr->assign('latestVersion', $latestVersion);
             $currentVersion = VersionCheck::getCurrentDBVersion();
             $templateMgr->assign('currentVersion', $currentVersion->getVersionString());
             // Get contact information for site administrator
             $roleDao = DAORegistry::getDAO('RoleDAO');
             $siteAdmins = $roleDao->getUsersByRoleId(ROLE_ID_SITE_ADMIN);
             $templateMgr->assign('siteAdmin', $siteAdmins->next());
         }
     }
     $templateMgr->display('management/settings/journal.tpl');
 }
开发者ID:bkroll,项目名称:ojs,代码行数:25,代码来源:SettingsHandler.inc.php

示例9: systemInfo

 /**
  * Show system information summary.
  */
 function systemInfo()
 {
     $this->validate();
     $this->setupTemplate(true);
     $configData =& Config::getData();
     $dbconn =& DBConnection::getConn();
     $dbServerInfo = $dbconn->ServerInfo();
     $versionDao =& DAORegistry::getDAO('VersionDAO');
     $currentVersion =& $versionDao->getCurrentVersion();
     $versionHistory =& $versionDao->getVersionHistory();
     $serverInfo = array('admin.server.platform' => Core::serverPHPOS(), 'admin.server.phpVersion' => Core::serverPHPVersion(), 'admin.server.apacheVersion' => function_exists('apache_get_version') ? apache_get_version() : Locale::translate('common.notAvailable'), 'admin.server.dbDriver' => Config::getVar('database', 'driver'), 'admin.server.dbVersion' => empty($dbServerInfo['description']) ? $dbServerInfo['version'] : $dbServerInfo['description']);
     $templateMgr =& TemplateManager::getManager();
     $templateMgr->assign_by_ref('currentVersion', $currentVersion);
     $templateMgr->assign_by_ref('versionHistory', $versionHistory);
     $templateMgr->assign_by_ref('configData', $configData);
     $templateMgr->assign_by_ref('serverInfo', $serverInfo);
     if (Request::getUserVar('versionCheck')) {
         $latestVersionInfo =& VersionCheck::getLatestVersion();
         $latestVersionInfo['patch'] = VersionCheck::getPatch($latestVersionInfo);
         $templateMgr->assign_by_ref('latestVersionInfo', $latestVersionInfo);
     }
     $templateMgr->display('admin/systemInfo.tpl');
 }
开发者ID:ramonsodoma,项目名称:harvester,代码行数:26,代码来源:AdminFunctionsHandler.inc.php

示例10: fetch

 /**
  * Handle fetch requests for this plugin.
  */
 function fetch()
 {
     $plugin =& $this->getPLNPlugin();
     $templateMgr =& TemplateManager::getManager();
     $journal =& Request::getJournal();
     $templateMgr->assign_by_ref('journal', $journal);
     $pluginVersionFile = $this->getPluginPath() . DIRECTORY_SEPARATOR . 'version.xml';
     $pluginVersion =& VersionCheck::parseVersionXml($pluginVersionFile);
     $templateMgr->assign_by_ref('pluginVersion', $pluginVersion);
     $terms = array();
     $termsAccepted = $plugin->termsAgreed($journal->getId());
     if ($termsAccepted) {
         $templateMgr->assign('termsAccepted', 'yes');
         $terms = unserialize($plugin->getSetting($journal->getId(), 'terms_of_use'));
         $termsAgreement = unserialize($plugin->getSetting($journal->getId(), 'terms_of_use_agreement'));
     } else {
         $templateMgr->assign('termsAccepted', 'no');
     }
     $termKeys = array_keys($terms);
     $termsDisplay = array();
     foreach ($termKeys as $key) {
         $termsDisplay[] = array('key' => $key, 'term' => $terms[$key]['term'], 'updated' => $terms[$key]['updated'], 'accepted' => $termsAgreement[$key]);
     }
     $templateMgr->assign('termsDisplay', new ArrayItemIterator($termsDisplay));
     $versionDao =& DAORegistry::getDAO('VersionDAO');
     $ojsVersion =& $versionDao->getCurrentVersion();
     $templateMgr->assign('ojsVersion', $ojsVersion->getVersionString());
     $publishedArticlesDAO =& DAORegistry::getDAO('PublishedArticleDAO');
     $range = new DBResultRange(PLN_PLUGIN_PING_ARTICLE_COUNT);
     $publishedArticles =& $publishedArticlesDAO->getPublishedArticlesByJournalId($journal->getId(), $range, true);
     $templateMgr->assign_by_ref('articles', $publishedArticles);
     $templateMgr->assign_by_ref('pln_network', $plugin->getSetting($journal->getId(), 'pln_network'));
     $templateMgr->display($this->getTemplatePath() . DIRECTORY_SEPARATOR . 'ping.tpl', 'text/xml');
     return true;
 }
开发者ID:farhanabbas1983,项目名称:ojs-1,代码行数:38,代码来源:PLNGatewayPlugin.inc.php

示例11: display

 /**
  * Display the form.
  */
 function display()
 {
     $templateMgr = TemplateManager::getManager($this->_request);
     $templateMgr->assign('version', VersionCheck::getCurrentCodeVersion());
     parent::display($this->_request);
 }
开发者ID:jprk,项目名称:pkp-lib,代码行数:9,代码来源:MaintenanceForm.inc.php

示例12: checkIfNewVersionExists

 /**
  * Checks the application's version against the latest version 
  * on the PKP servers.
  * @return string or false if no newer version
  */
 function checkIfNewVersionExists()
 {
     $versionInfo =& VersionCheck::getLatestVersion();
     $latestVersion = $versionInfo['release'];
     $currentVersion =& VersionCheck::getCurrentDBVersion();
     if ($currentVersion->compare($latestVersion) < 0) {
         return $latestVersion;
     } else {
         return false;
     }
 }
开发者ID:farhanabbas1983,项目名称:ojs-1,代码行数:16,代码来源:VersionCheck.inc.php

示例13: createData

 /**
  * Create initial required data.
  * @return boolean
  */
 function createData()
 {
     if ($this->getParam('manualInstall')) {
         // Add insert statements for default data
         // FIXME use ADODB data dictionary?
         $this->executeSQL(sprintf('INSERT INTO site (primary_locale, installed_locales) VALUES (\'%s\', \'%s\')', $this->getParam('locale'), join(':', $this->installedLocales)));
         $this->executeSQL(sprintf('INSERT INTO site_settings (setting_name, setting_type, setting_value, locale) VALUES (\'%s\', \'%s\', \'%s\', \'%s\')', 'title', 'string', addslashes(Locale::translate(INSTALLER_DEFAULT_SITE_TITLE)), $this->getParam('locale')));
         $this->executeSQL(sprintf('INSERT INTO site_settings (setting_name, setting_type, setting_value, locale) VALUES (\'%s\', \'%s\', \'%s\', \'%s\')', 'contactName', 'string', addslashes(Locale::translate(INSTALLER_DEFAULT_SITE_TITLE)), $this->getParam('locale')));
         $this->executeSQL(sprintf('INSERT INTO site_settings (setting_name, setting_type, setting_value, locale) VALUES (\'%s\', \'%s\', \'%s\', \'%s\')', 'contactEmail', 'string', addslashes($this->getParam('adminEmail')), $this->getParam('locale')));
         $this->executeSQL(sprintf('INSERT INTO users (username, first_name, last_name, password, email, date_registered, date_last_login) VALUES (\'%s\', \'%s\', \'%s\', \'%s\', \'%s\', \'%s\', \'%s\')', $this->getParam('adminUsername'), $this->getParam('adminUsername'), $this->getParam('adminUsername'), Validation::encryptCredentials($this->getParam('adminUsername'), $this->getParam('adminPassword'), $this->getParam('encryption')), $this->getParam('adminEmail'), Core::getCurrentDate(), Core::getCurrentDate()));
         $this->executeSQL(sprintf('INSERT INTO roles (conference_id, user_id, role_id) VALUES (%d, (SELECT user_id FROM users WHERE username = \'%s\'), %d)', 0, $this->getParam('adminUsername'), ROLE_ID_SITE_ADMIN));
         // Install email template list and data for each locale
         $emailTemplateDao =& DAORegistry::getDAO('EmailTemplateDAO');
         foreach ($emailTemplateDao->installEmailTemplates($emailTemplateDao->getMainEmailTemplatesFilename(), true) as $sql) {
             $this->executeSQL($sql);
         }
         foreach ($this->installedLocales as $locale) {
             foreach ($emailTemplateDao->installEmailTemplateData($emailTemplateDao->getMainEmailTemplateDataFilename($locale), true) as $sql) {
                 $this->executeSQL($sql);
             }
         }
     } else {
         // Add initial site data
         $locale = $this->getParam('locale');
         $siteDao =& DAORegistry::getDAO('SiteDAO', $this->dbconn);
         $site = new Site();
         $site->setRedirect(0);
         $site->setMinPasswordLength(INSTALLER_DEFAULT_MIN_PASSWORD_LENGTH);
         $site->setPrimaryLocale($locale);
         $site->setInstalledLocales($this->installedLocales);
         $site->setSupportedLocales($this->installedLocales);
         if (!$siteDao->insertSite($site)) {
             $this->setError(INSTALLER_ERROR_DB, $this->dbconn->errorMsg());
             return false;
         }
         $siteSettingsDao =& DAORegistry::getDAO('SiteSettingsDAO');
         $siteSettingsDao->updateSetting('title', array($locale => Locale::translate(INSTALLER_DEFAULT_SITE_TITLE)), null, true);
         $siteSettingsDao->updateSetting('contactName', array($locale => Locale::translate(INSTALLER_DEFAULT_SITE_TITLE)), null, true);
         $siteSettingsDao->updateSetting('contactEmail', array($locale => $this->getParam('adminEmail')), null, true);
         // Add initial site administrator user
         $userDao =& DAORegistry::getDAO('UserDAO', $this->dbconn);
         $user = new User();
         $user->setUsername($this->getParam('adminUsername'));
         $user->setPassword(Validation::encryptCredentials($this->getParam('adminUsername'), $this->getParam('adminPassword'), $this->getParam('encryption')));
         $user->setFirstName($user->getUsername());
         $user->setLastName('');
         $user->setEmail($this->getParam('adminEmail'));
         if (!$userDao->insertUser($user)) {
             $this->setError(INSTALLER_ERROR_DB, $this->dbconn->errorMsg());
             return false;
         }
         $roleDao =& DAORegistry::getDao('RoleDAO', $this->dbconn);
         $role = new Role();
         $role->setConferenceId(0);
         $role->setUserId($user->getId());
         $role->setRoleId(ROLE_ID_SITE_ADMIN);
         if (!$roleDao->insertRole($role)) {
             $this->setError(INSTALLER_ERROR_DB, $this->dbconn->errorMsg());
             return false;
         }
         // Install email template list and data for each locale
         $emailTemplateDao =& DAORegistry::getDAO('EmailTemplateDAO');
         $emailTemplateDao->installEmailTemplates($emailTemplateDao->getMainEmailTemplatesFilename());
         foreach ($this->installedLocales as $locale) {
             $emailTemplateDao->installEmailTemplateData($emailTemplateDao->getMainEmailTemplateDataFilename($locale));
         }
         // Add initial plugin data to versions table
         $versionDao =& DAORegistry::getDAO('VersionDAO');
         import('site.VersionCheck');
         $categories = PluginRegistry::getCategories();
         foreach ($categories as $category) {
             PluginRegistry::loadCategory($category, true);
             $plugins = PluginRegistry::getPlugins($category);
             foreach ($plugins as $plugin) {
                 $versionFile = $plugin->getPluginPath() . '/version.xml';
                 if (FileManager::fileExists($versionFile)) {
                     $versionInfo =& VersionCheck::parseVersionXML($versionFile);
                     $pluginVersion = $versionInfo['version'];
                     $pluginVersion->setCurrent(1);
                     $versionDao->insertVersion($pluginVersion);
                 } else {
                     $pluginVersion = new Version();
                     $pluginVersion->setMajor(1);
                     $pluginVersion->setMinor(0);
                     $pluginVersion->setRevision(0);
                     $pluginVersion->setBuild(0);
                     $pluginVersion->setDateInstalled(Core::getCurrentDate());
                     $pluginVersion->setCurrent(1);
                     $pluginVersion->setProductType('plugins.' . $category);
                     $pluginVersion->setProduct(basename($plugin->getPluginPath()));
                     $versionDao->insertVersion($pluginVersion);
                 }
             }
         }
     }
     return true;
//.........这里部分代码省略.........
开发者ID:jalperin,项目名称:ocs,代码行数:101,代码来源:Install.inc.php

示例14: elseif

            }
        } elseif (strlen($subtext)) {
            imagettftext($image, 11, 0, $imageMarginLeft, 43, $color, $font, $subtext);
        }
        return $image;
    }
    private function displayImage($arrText)
    {
        header('Content-Type: image/png');
        //show empty pixel if version is recent
        if ($arrText[0] == 0) {
            echo base64_decode('iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAACnej3aAAAAAXRSTlMAQObYZgAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=');
            exit;
        }
        //Check for cached images
        $strCacheName = md5($arrText[0] . '_' . $arrText[4] . '_' . $arrText[5] . '_' . $arrText[6]);
        $strCacheFolder = 'cache/images/';
        if (file_exists($strCacheFolder . $strCacheName . '.png') && filemtime($strCacheFolder . $strCacheName . '.png') + 3600 > time()) {
            echo file_get_contents($strCacheFolder . $strCacheName . '.png');
            exit;
        } else {
            $image = $this->createImageWithText($arrText[1], $arrText[2], $arrText[3], $arrText[0]);
            imagepng($image, $strCacheFolder . $strCacheName . '.png', 0);
            imagedestroy($image);
            echo file_get_contents($strCacheFolder . $strCacheName . '.png');
            exit;
        }
    }
}
$versionCheck = new VersionCheck();
$versionCheck->handler();
开发者ID:EQdkpPlus,项目名称:misc-wikitools,代码行数:31,代码来源:tools.php

示例15: display

 /**
  * Display the form.
  */
 function display()
 {
     $templateMgr =& TemplateManager::getManager();
     $templateMgr->assign('localeOptions', $this->supportedLocales);
     $templateMgr->assign('localesComplete', $this->localesComplete);
     $templateMgr->assign('clientCharsetOptions', $this->supportedClientCharsets);
     $templateMgr->assign('connectionCharsetOptions', $this->supportedConnectionCharsets);
     $templateMgr->assign('databaseCharsetOptions', $this->supportedDatabaseCharsets);
     $templateMgr->assign('encryptionOptions', $this->supportedEncryptionAlgorithms);
     $templateMgr->assign('allowFileUploads', get_cfg_var('file_uploads') ? __('common.yes') : __('common.no'));
     $templateMgr->assign('maxFileUploadSize', get_cfg_var('upload_max_filesize'));
     $templateMgr->assign('databaseDriverOptions', $this->checkDBDrivers());
     $templateMgr->assign('supportsMBString', String::hasMBString() ? __('common.yes') : __('common.no'));
     $templateMgr->assign('phpIsSupportedVersion', version_compare(PHP_REQUIRED_VERSION, PHP_VERSION) != 1);
     $templateMgr->assign('phpRequiredVersion', PHP_REQUIRED_VERSION);
     $templateMgr->assign('phpVersion', PHP_VERSION);
     $templateMgr->assign('version', VersionCheck::getCurrentCodeVersion());
     $templateMgr->assign('passwordLength', INSTALLER_DEFAULT_MIN_PASSWORD_LENGTH);
     parent::display();
 }
开发者ID:EreminDm,项目名称:water-cao,代码行数:23,代码来源:InstallForm.inc.php


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