示例#1
0
$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');
示例#2
0
$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(FALSE, array('clean_cache', 'file_permissions', 'file_checksums'))), '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');
示例#3
0
 */
//Allow both CLI and CGI PHP binaries to call maint scripts.
if (PHP_SAPI != 'cli' and PHP_SAPI != 'cgi' and PHP_SAPI != 'cgi-fcgi') {
    echo "This script can only be called from the Command Line.\n";
    exit;
}
if (version_compare(PHP_VERSION, 5, '<') == 1) {
    echo "You are currently using PHP v" . PHP_VERSION . " TimeTrex requires PHP v5 or greater!\n";
    exit;
}
//Allow CLI scripts to run much longer.
ini_set('max_execution_time', 7200);
//Check post install requirements, because PHP CLI usually uses a different php.ini file.
$install_obj = new Install();
if ($install_obj->checkAllRequirements(TRUE) == 1) {
    $failed_requirements = $install_obj->getFailedRequirements(TRUE);
    unset($failed_requirements[0]);
    echo "----WARNING----WARNING----WARNING-----\n";
    echo "--------------------------------------\n";
    echo "Minimum PHP Requirements are NOT met!!\n";
    echo "--------------------------------------\n";
    echo "Failed Requirements: " . implode(',', (array) $failed_requirements) . " \n";
    echo "--------------------------------------\n\n\n";
}
TTi18n::chooseBestLocale();
//Make sure a locale is set, specifically when generating PDFs.
//Uncomment the below block to force debug logging with maintenance jobs.
/*
Debug::setEnable( TRUE );
Debug::setBufferOutput( TRUE );
Debug::setEnableLog( TRUE );
示例#4
0
 * $Id: CheckForUpdate.php 1396 2007-11-07 16:49:35Z ipso $
 * $Date: 2007-11-07 08:49:35 -0800 (Wed, 07 Nov 2007) $
 */
/*
 * Checks for any version updates...
 *
 */
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'includes' . DIRECTORY_SEPARATOR . 'global.inc.php';
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'includes' . DIRECTORY_SEPARATOR . 'CLI.inc.php';
//
//Check system requirements.
//
if (PRODUCTION == TRUE and DEPLOYMENT_ON_DEMAND == FALSE) {
    Debug::Text('Checking system requirements... ' . TTDate::getDate('DATE+TIME', time()), __FILE__, __LINE__, __METHOD__, 10);
    $install_obj = new Install();
    $failed_requirment_requirements = $install_obj->getFailedRequirements(FALSE, array('clean_cache', 'file_checksums'));
    $sslf = new SystemSettingListFactory();
    $sslf->getByName('valid_install_requirements');
    if ($sslf->getRecordCount() == 1) {
        $obj = $sslf->getCurrent();
    } else {
        $obj = new SystemSettingListFactory();
    }
    $obj->setName('valid_install_requirements');
    if (is_array($failed_requirment_requirements) and count($failed_requirment_requirements) > 1) {
        $obj->setValue(0);
        Debug::Text('Failed system requirements: ' . implode($failed_requirment_requirements), __FILE__, __LINE__, __METHOD__, 10);
        TTLog::addEntry(0, 510, 'Failed system requirements: ' . implode($failed_requirment_requirements), 0, 'company');
    } else {
        $obj->setValue(1);
    }