Ejemplo n.º 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');
Ejemplo n.º 2
0
 * $Date: 2010-07-28 14:16:05 -0700 (Wed, 28 Jul 2010) $
 */
//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 );