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


PHP CATSUtility::getVersionAsInteger方法代码示例

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


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

示例1: getNews

 /**
  * Returns news for the dashboard (if a new version is available).
  *
  * @return html
  */
 public static function getNews()
 {
     $systemInfoDb = new SystemInfo();
     $systemInfo = $systemInfoDb->getSystemInfo();
     /* Update daily. */
     $lastWeeksDate = time() - SECONDS_IN_A_DAY;
     $lastCheck = strtotime($systemInfo['date_version_checked']);
     if ($lastWeeksDate > $lastCheck) {
         self::checkForUpdate();
         /* Refresh the new information. */
         $systemInfo = $systemInfoDb->getSystemInfo();
     }
     /* Only display new version news if a new version is available. */
     if ($systemInfo['available_version'] > CATSUtility::getVersionAsInteger()) {
         return urldecode($systemInfo['available_version_description']);
     }
     return '';
 }
开发者ID:PublicityPort,项目名称:OpenCATS,代码行数:23,代码来源:NewVersionCheck.php

示例2: _printCommonHeader

 /**
  * Prints template header HTML.
  *
  * @param string page title
  * @param array JavaScript / CSS files to load
  * @return void
  */
 private static function _printCommonHeader($pageTitle, $headIncludes = array())
 {
     if (!is_array($headIncludes)) {
         $headIncludes = array($headIncludes);
     }
     $siteID = $_SESSION['CATS']->getSiteID();
     /* This prevents caching problems when SVN updates are preformed. */
     if ($_SESSION['CATS']->getCachedBuild() > 0) {
         $javascriptAntiCache = '?b=' . $_SESSION['CATS']->getCachedBuild();
     } else {
         $javascriptAntiCache = '?v=' . CATSUtility::getVersionAsInteger();
     }
     echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"', "\n";
     echo '"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">', "\n";
     echo '<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">', "\n";
     echo '<head>', "\n";
     echo '<title>CATS - ', $pageTitle, '</title>', "\n";
     echo '<meta http-equiv="Content-Type" content="text/html; charset=', HTML_ENCODING, '" />', "\n";
     echo '<link rel="icon" href="images/favicon.ico" type="image/x-icon" />', "\n";
     echo '<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon" />', "\n";
     echo '<link rel="alternate" type="application/rss+xml" title="RSS" href="', CATSUtility::getIndexName(), '?m=rss" />', "\n";
     /* Core JS files */
     echo '<script type="text/javascript" src="js/lib.js' . $javascriptAntiCache . '"></script>', "\n";
     echo '<script type="text/javascript" src="js/quickAction.js' . $javascriptAntiCache . '"></script>', "\n";
     echo '<script type="text/javascript" src="js/calendarDateInput.js' . $javascriptAntiCache . '"></script>', "\n";
     echo '<script type="text/javascript" src="js/submodal/subModal.js' . $javascriptAntiCache . '"></script>', "\n";
     echo '<script type="text/javascript" src="js/jquery-1.3.2.min.js' . $javascriptAntiCache . '"></script>', "\n";
     echo '<script type="text/javascript">CATSIndexName = "' . CATSUtility::getIndexName() . '";</script>', "\n";
     $headIncludes[] = 'main.css';
     foreach ($headIncludes as $key => $filename) {
         /* Done manually to prevent a global dependency on FileUtility. */
         if ($filename == 'tinymce') {
             echo '<script language="javascript" type="text/javascript" src="lib/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>' . "\n" . '<script language="javascript" type="text/javascript">tinyMCE.init({
                         mode : "specific_textareas",
                         editor_selector : "mceEditor",
                         width : "100%",
                     	theme : "advanced",
                     	theme_advanced_buttons1 : "bold,italic,strikethrough,separator,bullist,numlist,outdent,indent,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,link,unlink,separator,underline,forecolor,separator,removeformat,cleanup,separator,charmap,separator,undo,redo",
                     	theme_advanced_buttons2 : "",
                     	theme_advanced_buttons3 : "",
                     	language : "en",
                     	theme_advanced_toolbar_location : "top",
                     	theme_advanced_toolbar_align : "left",
                     	theme_advanced_resizing : true,
                     	browsers : "msie,gecko,opera,safari",
                     	dialog_type : "modal",
                     	theme_advanced_resize_horizontal : false,
                     	convert_urls : false,
                     	relative_urls : false,
                     	remove_script_host : false,
                     	force_p_newlines : false,
                     	force_br_newlines : true,
                     	convert_newlines_to_brs : false,
                     	remove_linebreaks : false,
                     	fix_list_elements : true
                     });</script>' . "\n";
         } else {
             $extension = substr($filename, strrpos($filename, '.') + 1);
             $filename .= $javascriptAntiCache;
             if ($extension == 'js') {
                 echo '<script type="text/javascript" src="', $filename, '"></script>', "\n";
             } else {
                 if ($extension == 'css') {
                     echo '<style type="text/css" media="all">@import "', $filename, '";</style>', "\n";
                 }
             }
         }
     }
     echo '<!--[if IE]><link rel="stylesheet" type="text/css" href="ie.css" /><![endif]-->', "\n";
     echo '<![if !IE]><link rel="stylesheet" type="text/css" href="not-ie.css" /><![endif]>', "\n";
     echo '</head>', "\n\n";
 }
开发者ID:rankinp,项目名称:OpenCATS,代码行数:79,代码来源:TemplateUtility.php

示例3: administration

 private function administration()
 {
     /* Bail out if the user doesn't have SA permissions. */
     if ($this->_realAccessLevel < ACCESS_LEVEL_DEMO && !$_SESSION['CATS']->hasUserCategory('careerportal')) {
         CommonErrors::fatal(COMMONERROR_PERMISSION, $this);
     }
     $systemInfo = new SystemInfo();
     $systemInfoData = $systemInfo->getSystemInfo();
     if (isset($systemInfoData['available_version']) && $systemInfoData['available_version'] > CATSUtility::getVersionAsInteger()) {
         $newVersion = true;
     } else {
         $newVersion = false;
     }
     if (isset($systemInfoData['disable_version_check']) && $systemInfoData['disable_version_check']) {
         $versionCheckPref = false;
     } else {
         $versionCheckPref = true;
     }
     if ($this->_realAccessLevel >= ACCESS_LEVEL_ROOT || $this->_realAccessLevel == ACCESS_LEVEL_DEMO) {
         $systemAdministration = true;
     } else {
         $systemAdministration = false;
     }
     // FIXME: 's' isn't a good variable name.
     if (isset($_GET['s'])) {
         switch ($_GET['s']) {
             case 'siteName':
                 $templateFile = './modules/settings/SiteName.tpl';
                 break;
             case 'newVersionCheck':
                 if (!$systemAdministration) {
                     CommonErrors::fatal(COMMONERROR_PERMISSION, $this);
                     return;
                     //$this->fatal(ERROR_NO_PERMISSION);
                 }
                 $this->_template->assign('versionCheckPref', $versionCheckPref);
                 $this->_template->assign('availableVersion', $systemInfoData['available_version']);
                 $this->_template->assign('newVersion', $newVersion);
                 $this->_template->assign('newVersionNews', NewVersionCheck::getNews());
                 $templateFile = './modules/settings/NewVersionCheck.tpl';
                 break;
             case 'passwords':
                 if (!$systemAdministration) {
                     CommonErrors::fatal(COMMONERROR_PERMISSION, $this);
                     return;
                     //$this->fatal(ERROR_NO_PERMISSION);
                 }
                 $templateFile = './modules/settings/Passwords.tpl';
                 break;
             case 'localization':
                 if ($this->_realAccessLevel < ACCESS_LEVEL_SA) {
                     CommonErrors::fatal(COMMONERROR_PERMISSION, $this);
                     return;
                     //$this->fatal(ERROR_NO_PERMISSION);
                 }
                 $this->_template->assign('timeZone', $_SESSION['CATS']->getTimeZone());
                 $this->_template->assign('isDateDMY', $_SESSION['CATS']->isDateDMY());
                 $templateFile = './modules/settings/Localization.tpl';
                 break;
             case 'systemInformation':
                 if ($this->_realAccessLevel < ACCESS_LEVEL_SA) {
                     CommonErrors::fatal(COMMONERROR_PERMISSION, $this);
                     return;
                     //$this->fatal(ERROR_NO_PERMISSION);
                 }
                 $db = DatabaseConnection::getInstance();
                 $databaseVersion = $db->getRDBMSVersion();
                 $installationDirectory = realpath('./');
                 if (SystemUtility::isWindows()) {
                     $OSType = 'Windows';
                 } else {
                     if (SystemUtility::isMacOSX()) {
                         $OSType = 'Mac OS X';
                     } else {
                         $OSType = 'UNIX';
                     }
                 }
                 $schemaVersions = ModuleUtility::getModuleSchemaVersions();
                 $this->_template->assign('databaseVersion', $databaseVersion);
                 $this->_template->assign('installationDirectory', $installationDirectory);
                 $this->_template->assign('OSType', $OSType);
                 $this->_template->assign('schemaVersions', $schemaVersions);
                 $templateFile = './modules/settings/SystemInformation.tpl';
                 break;
             default:
                 $templateFile = './modules/settings/Administration.tpl';
                 break;
         }
     } else {
         $templateFile = './modules/settings/Administration.tpl';
         /* Load extra settings. */
         $extraSettings = array();
         $modules = ModuleUtility::getModules();
         foreach ($modules as $moduleName => $parameters) {
             $extraSettingsModule = $parameters[MODULE_SETTINGS_ENTRIES];
             if ($extraSettingsModule != false) {
                 foreach ($extraSettingsModule as $extraSettingsModuleData) {
                     if ($extraSettingsModuleData[2] <= $this->_realAccessLevel) {
                         $extraSettings[] = $extraSettingsModuleData;
                     }
//.........这里部分代码省略.........
开发者ID:rankinp,项目名称:OpenCATS,代码行数:101,代码来源:SettingsUI.php

示例4: loadTheme


//.........这里部分代码省略.........
                       /* EEO Report subtab.  Shouldn't be visible if EEO tracking is disabled. */
                       $EEOSettings = new EEOSettings($_SESSION['CATS']->getSiteID());
                       $EEOSettingsRS = $EEOSettings->getAll();

                       if ($EEOSettingsRS['enabled'] == 1)
                       {
                           echo '<li><a href="', $link, '" style="'.$style.'">', $subTabText, '</a></li>', "\n";
                       }
                   }


                   /* Tab is ok to draw. */
                   else if ($link != '')
                   {
                       /* Normal subtab. */
                       echo '<li><a href="', $link, '" style="'.$style.'">', $subTabText, '</a></li>', "\n";
                   }
               }

               if (!eval(Hooks::get('TEMPLATE_UTILITY_DRAW_SUBTABS'))) return;

               echo '</ul>';
           }

           echo '</li>';
        }

        $_AUIEO_TABS=  ob_get_clean();

        $systemInfo = new SystemInfo();
        $systemInfoData = $systemInfo->getSystemInfo();
        $AUIEO_DOWNLOAD_LATEST="";
        if (isset($systemInfoData['available_version']) &&
            $systemInfoData['available_version'] > CATSUtility::getVersionAsInteger() &&
            isset($systemInfoData['disable_version_check']) &&
            !$systemInfoData['disable_version_check'] &&
            $_SESSION['CATS']->getAccessLevel() >= ACCESS_LEVEL_SA)
        {
            $AUIEO_DOWNLOAD_LATEST = "<a href='http://www.catsone.com/download.php' target='catsdl'>A new CATS version is available!</a><br />";
        }
        $AUIEO_RECENT="";
        if (!empty($MRU))
        {
            $AUIEO_RECENT = '<span class="MRUTitle">Recent:&nbsp;</span>&nbsp;{$MRU}';
        }
        else
        {
            $AUIEO_RECENT = '<span class="MRUTitle"></span>&nbsp;';
        }
        $AUIEO_HAS_USER_CATEGORY="";
        //FIXME:  Abstract into a hook.
        if ($_SESSION['CATS']->hasUserCategory('msa'))
        {
            $AUIEO_HAS_USER_CATEGORY = "<input type='hidden' name='m' value='asp' />
                <input type='hidden' name='a' value='aspSearch' />
                <span class='quickSearchLabel' id='quickSearchLabel>ASP Search:</span>&nbsp;";
        }
        else
        {
            $AUIEO_HAS_USER_CATEGORY = "<input type='hidden' name='m' value='home' />
                <input type='hidden' name='a' value='quickSearch' />
                <span class='quickSearchLabel' id='quickSearchLabel'>Quick Search:</span>&nbsp;";
        }


        $wildCardString = '';
开发者ID:Hassanj343,项目名称:candidats,代码行数:67,代码来源:Template.php


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