當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Install::checkTimeTrexVersion方法代碼示例

本文整理匯總了PHP中Install::checkTimeTrexVersion方法的典型用法代碼示例。如果您正苦於以下問題:PHP Install::checkTimeTrexVersion方法的具體用法?PHP Install::checkTimeTrexVersion怎麽用?PHP Install::checkTimeTrexVersion使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Install的用法示例。


在下文中一共展示了Install::checkTimeTrexVersion方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: phpinfo

$action = Misc::findSubmitButton();
switch ($action) {
    case 'phpinfo':
        phpinfo();
        exit;
        break;
    case 'back':
        Debug::Text('Back', __FILE__, __LINE__, __METHOD__, 10);
        Redirect::Page(URLBuilder::getURL(NULL, 'install.php'));
        break;
    case 'next':
        Debug::Text('Next', __FILE__, __LINE__, __METHOD__, 10);
        if ($external_installer == 1) {
            Redirect::Page(URLBuilder::getURL(array('external_installer' => $external_installer), 'DatabaseSchema.php'));
        } else {
            Redirect::Page(URLBuilder::getURL(NULL, 'DatabaseConfig.php'));
        }
        break;
    default:
        break;
}
$handle = @fopen('http://www.timetrex.com/' . URLBuilder::getURL(array_merge(array('v' => $install_obj->getFullApplicationVersion(), 'page' => 'require'), $install_obj->getFailedRequirements()), 'pre_install.php'), "r");
@fclose($handle);
$check_all_requirements = $install_obj->checkAllRequirements();
if ($external_installer == 1 and $check_all_requirements == 0 and $install_obj->checkTimeTrexVersion() == 0) {
    //Using external installer and there is no missing requirements, automatically send to next page.
    Redirect::Page(URLBuilder::getURL(array('external_installer' => $external_installer, 'action:next' => 'next'), $_SERVER['SCRIPT_NAME']));
}
$smarty->assign_by_ref('install_obj', $install_obj);
$smarty->assign_by_ref('external_installer', $external_installer);
$smarty->display('install/Requirements.tpl');
開發者ID:J-P-Hanafin,項目名稱:TimeTrex-1,代碼行數:31,代碼來源:Requirements.php

示例2: Install

     $force = FALSE;
 }
 if ($force == TRUE) {
     echo "Force Mode enabled...\n";
     //Force installer_enabled to TRUE so we don't have to manually modify the config file with scripts.
     $config_vars['other']['installer_enabled'] = TRUE;
 }
 //Re-initialize install object with new config file.
 $install_obj = new Install();
 $install_obj->cleanCacheDirectory();
 if ($install_obj->isInstallMode() == FALSE) {
     echo "ERROR: Install mode is not enabled in the timetrex.ini.php file!\n";
     exit(1);
 } else {
     $check_all_requirements = $install_obj->checkAllRequirements(TRUE);
     if ($check_all_requirements == 0 and $install_obj->checkTimeTrexVersion() == 0) {
         $install_obj->setDatabaseConnection($db);
         //Default connection
         //Make sure at least one company exists in the database, this only works for upgrades, not initial installs.
         if ($install_obj->checkDatabaseExists($config_vars['database']['database_name']) == TRUE) {
             if ($install_obj->checkTableExists('company') == TRUE) {
                 //Table could be created, but check to make sure a company actually exists too.
                 $clf = TTnew('CompanyListFactory');
                 $clf->getAll();
                 if ($clf->getRecordCount() >= 1) {
                     $install_obj->setIsUpgrade(TRUE);
                 } else {
                     //No company exists, send them to the create company page.
                     $install_obj->setIsUpgrade(FALSE);
                 }
             } else {
開發者ID:alachaum,項目名稱:timetrex,代碼行數:31,代碼來源:unattended_upgrade.php


注:本文中的Install::checkTimeTrexVersion方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。