Ejemplo n.º 1
0
Archivo: Test.php Proyecto: phpscr/usvn
 private function setConsoleLocale()
 {
     if (PHP_OS == "Linux") {
         USVN_ConsoleUtils::setLocale("en_US.utf8");
     } else {
         USVN_ConsoleUtils::setLocale("en_US.UTF-8");
     }
 }
Ejemplo n.º 2
0
require_once 'Zend/Loader.php';
Zend_Loader::registerAutoload();
require_once USVN_APP_DIR . '/functions.php';
require_once USVN_APP_DIR . '/install/install.php';
$GLOBALS['language'] = 'en_US';
if (file_exists(USVN_CONFIG_FILE)) {
    try {
        $config = new USVN_Config_Ini(USVN_CONFIG_FILE, 'general');
        if (isset($config->translation->locale)) {
            $GLOBALS['language'] = $config->translation->locale;
        }
        if (isset($config->timezone)) {
            date_default_timezone_set($config->timezone);
        }
        if (isset($config->system->locale)) {
            USVN_ConsoleUtils::setLocale($config->system->locale);
        }
        if (isset($config->database->adapterName)) {
            Zend_Db_Table::setDefaultAdapter(Zend_Db::factory($config->database->adapterName, $config->database->options->toArray()));
            Zend_Db_Table::getDefaultAdapter()->getProfiler()->setEnabled(true);
            USVN_Db_Table::$prefix = $config->database->prefix;
        }
        Zend_Registry::set('config', $config);
    } catch (Exception $e) {
    }
}
USVN_Translation::initTranslation($GLOBALS['language'], USVN_LOCALE_DIRECTORY);
$installSteps = array(1 => 'System Check', 2 => 'Language Selection', 3 => 'License Agreement', 4 => 'USVN Configuration', 5 => 'Database Installation', 6 => 'Administrator User Creation', 7 => 'Check for a Newer Version', 8 => 'Installation is over');
//------------------------------------------------------------------------------------------------
include 'views/head.html';
try {