* e-mail: info@openeclass.org * ======================================================================== */ // Check if user is administrator and if yes continue // Othewise exit with appropriate message $require_admin = true; require_once '../../include/baseTheme.php'; require_once 'modules/auth/auth.inc.php'; require_once 'modules/admin/extconfig/externals.php'; require_once 'modules/admin/extconfig/autojudgeapp.php'; $nameTools = $langAutoJudge; $navigation[] = array('url' => 'index.php', 'name' => $langAdmin); $navigation[] = array('url' => 'extapp.php', 'name' => $langExtAppConfig); $available_themes = active_subdirs("$webDir/template", 'theme.html'); // Scan the connectors directory and locate the appropriate classes $connectorClasses = AutojudgeApp::getAutoJudgeServices(); // Save new auto_judge.php if (isset($_POST['submit'])) { set_config('autojudge_connector', $_POST['formconnector']); foreach($connectorClasses as $curConnectorClass) { $connector = new $curConnectorClass(); foreach($connector->getConfigFields() as $curField => $curLabel) { set_config($curField, $_POST['form'.$curField]); } } // Display result message
<div class='form-group'> <label class='col-sm-3 control-label'>$langGuestLoginLabel:</label> <div class='col-sm-9'>" . selection(array('off' => $m['deactivate'], 'on' => $m['activate'], 'link' => $langGuestLoginLinks), 'course_guest', get_config('course_guest', 'on'), "class='form-control'") . " </div> </div> </fieldset> </div> </div>"; $active_ui_languages = explode(' ', get_config('active_ui_languages')); $langdirs = active_subdirs($webDir . '/lang', 'messages.inc.php'); $sel = array(); $selectable_langs = array(); $cbox_dont_display_login_form = get_config('dont_display_login_form') ? 'checked' : ''; $cbox_hide_login_link = get_config('hide_login_link') ? 'checked' : ''; foreach ($language_codes as $langcode => $langname) { if (in_array($langcode, $langdirs)) { $loclangname = $langNameOfLang[$langname]; if (in_array($langcode, $active_ui_languages)) { $selectable_langs[$langcode] = $loclangname; } $checked = in_array($langcode, $active_ui_languages) ? ' checked' : ''; $sel[] = "<div class='checkbox'> <label> <input type='checkbox' name='av_lang[]' value='$langcode'$checked> $loclangname
$langStep = $langStep6; $_SESSION['step'] = 6; $GLOBALS['mysqlServer'] = $dbHostForm; $GLOBALS['mysqlUser'] = $dbUsernameForm; $GLOBALS['mysqlPassword'] = $dbPassForm; $GLOBALS['mysqlMainDb'] = $dbNameForm; if (mysql_errno() > 0) { // problem with server $no = mysql_errno(); $msg = mysql_error(); $tool_content .= "[" . $no . "] - " . $msg . "\n\t\t<div class='alert alert-warning'>{$langErrorMysql}</div>\n\t\t<ul class='installBullet'>\n\t\t<li>{$langdbhost}: {$dbHostForm}</li>\n\t\t<li>{$langDBLogin}: {$dbUsernameForm}</li>\n\t\t<li>{$langDBPassword}: " . q($dbPassForm) . "</li>\n\t\t</ul>\n\t\t<p>{$langBackStep3_2}</p><br />\n\t\t<form action='{$_SERVER['SCRIPT_NAME']}' method='post'>\n\t\t<input class='btn btn-primary' type='submit' name='install3' value='< {$langBackStep3}' />" . hidden_vars($all_vars) . "</form>"; draw($tool_content); exit; } $mysqlMainDb = $dbNameForm; $active_ui_languages = implode(' ', active_subdirs('../lang', 'messages.inc.php')); // create main database require 'install_db.php'; // create config.php $stringConfig = '<?php /* ======================================================== * Open eClass 3.0 configuration file * Created by install on ' . date('Y-m-d H:i') . ' * ======================================================== */ $mysqlServer = ' . quote($dbHostForm) . '; $mysqlUser = '******'; $mysqlPassword = '******'; $mysqlMainDb = ' . quote($mysqlMainDb) . '; '; $fd = @fopen("../config/config.php", "w");