} } elseif ($c_obj->getStatus() == 30) { $error_message = TTi18n::gettext('Sorry, your company\'s account has been CANCELLED, please contact customer support if you believe this is an error'); } } $validator->isTrue('user_name', FALSE, $error_message); } break; default: Misc::redirectMobileBrowser(); //Redirect mobile browsers automatically. Don't do it if the submit button is pressed though. if (DEPLOYMENT_ON_DEMAND == FALSE and isset($config_vars['other']['installer_enabled']) and $config_vars['other']['installer_enabled'] == TRUE) { //Installer is enabled, check to see if any companies have been created, if not redirect to installer automatically, as they skipped it somehow. //Check if Company table exists first, incase the installer hasn't run at all, this avoids a SQL error. $install_obj = new Install(); if ($install_obj->checkTableExists('company') == TRUE) { $clf = TTnew('CompanyListFactory'); $clf->getAll(); if ($clf->getRecordCount() == 0) { Redirect::Page(URLBuilder::getURL(array('external_installer' => 1), 'install/install.php')); } } else { Redirect::Page(URLBuilder::getURL(array('external_installer' => 1), 'install/install.php')); } } break; } $smarty->assign_by_ref('user_name', $user_name); $smarty->assign_by_ref('password', $password); $smarty->assign_by_ref('password_reset', $password_reset); $smarty->assign('language_options', TTi18n::getLanguageArray());
*/ $smarty->assign('title', TTi18n::gettext($title = '3. Database Configuration')); // See index.php /* * Get FORM variables */ extract(FormVariables::GetVariables(array('action', 'data', 'external_installer'))); $install_obj = new Install(); if ($install_obj->isInstallMode() == FALSE) { Redirect::Page(URLBuilder::getURL(NULL, 'install.php')); } $database_engine = TRUE; $install_obj->setDatabaseConnection($db); //Default connection if ($install_obj->checkDatabaseExists($config_vars['database']['database_name']) == TRUE) { if ($install_obj->checkTableExists('system_setting') == TRUE) { $install_obj->setIsUpgrade(TRUE); //$upgrade = TRUE; } else { $install_obj->setIsUpgrade(FALSE); //$upgrade = FALSE; } } $action = Misc::findSubmitButton(); switch ($action) { case 'install_schema': //Need to create the tables after the database //exists and Database.inc.php has made a connection. //Otherwise we can't use objects yet. //Debug::setVerbosity(11); Debug::Text('Install Schema', __FILE__, __LINE__, __METHOD__, 10);