mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-27 01:39:22 +02:00

* full support for OTHire 0.0.3 * added support for otservers that doesn't use account.name field, instead just account number will be used * (install) moved admin account creation to new step * fixed encryption detection on 0.3 * fixed bug when server_config table doesn't exist * other fixes
49 lines
1.0 KiB
PHP
49 lines
1.0 KiB
PHP
<?php
|
|
require('../common.php');
|
|
|
|
// step
|
|
$step = isset($_POST['step']) ? $_POST['step'] : 'welcome';
|
|
|
|
// includes
|
|
require(SYSTEM . 'functions.php');
|
|
require(BASE . 'install/includes/functions.php');
|
|
require(BASE . 'install/includes/locale.php');
|
|
require(BASE . 'config.local.php');
|
|
|
|
if(isset($_POST['vars']))
|
|
{
|
|
foreach($_POST['vars'] as $key => $value)
|
|
$_SESSION['var_' . $key] = $value;
|
|
}
|
|
|
|
$steps = array(1 => 'welcome', 2 => 'license', 3 => 'requirements', 4 => 'config', 5 => 'database', 6 => 'admin', 7 => 'finish');
|
|
if(!in_array($step, $steps)) // check if step is valid
|
|
die('ERROR: Unknown step.');
|
|
|
|
if($step == 'database')
|
|
{
|
|
foreach($_POST['vars'] as $key => $value)
|
|
{
|
|
if(empty($value))
|
|
{
|
|
$step = 'config';
|
|
$errors = '<p class="error">' . $locale['please_fill_all'] . '</p>';
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
$error = false;
|
|
|
|
// step include
|
|
ob_start();
|
|
require('steps/' . $step . '.php');
|
|
$content = ob_get_contents();
|
|
ob_end_clean();
|
|
|
|
// render
|
|
require('template/template.php');
|
|
//$_SESSION['laststep'] = $step;
|
|
|
|
?>
|