Online PHP and Javascript Decoder decode hidden script to uncover its real functionality


Show other level

ini_set('display_errors', 1);
error_reporting(E_ALL|E_STRICT);
define('EASYWIDIR', dirname(dirname(__FILE__)));

class UpdateResponse {
    public $response = '';
    function __construct() {
        $this->response = '';
    }
    function add ($newtext) {
        $this->response .= $newtext;
    }
    function __destruct() {
        unset($this->response);
    }
}

require_once(EASYWIDIR . '/stuff/methods/functionsphp');
require_once(EASYWIDIR . '/stuff/methods/vorlagephp');

$currentStep = (isset($_GET['step']) and $_GET['step'] > 0 and $_GET['step'] < 10) ? (int) $_GET['step'] : 0;
$developer = (isset($_GET['developer']) and $_GET['developer'] == 'Y') ? 'Y' : 'N';
$developerGetParameter = '&amp;developer=' . $developer;
$progressPercent = (100 / 9) * $currentStep ;
$acceptLanguage = strtolower(substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0 , 2));
$fallbackLanguage = (file_exists(EASYWIDIR . '/install/' . $acceptLanguage . '.xml')) ? $acceptLanguage : 'en';
$menuLanguage = (isset($_GET['language']) and strlen($_GET['language']) == 2 and file_exists(EASYWIDIR . '/install/' . $_GET['language'] . '.xml')) ? $_GET['language'] : $fallbackLanguage;
$languageGetParameter = '&amp;language=' . $menuLanguage;
$languageObject = simplexml_load_file(EASYWIDIR . '/install/' . $menuLanguage . '.xml');

$displayToUser = '';
$systemCheckOk = array();
$systemCheckError = array();
$easyWiVersion = ($developer == 'Y') ? '616' : '616';


if ($currentStep == 0) {

    $selectedDeveloper = ($developer == 'Y') ? "selected='selected'" : '';

    $apiResponse = webhostRequest('apigithubcom', $_SERVER['HTTP_HOST'], '/repos/easy-wi/developer/' . (($developer == 'Y') ? 'tags' : 'releases/latest'), null, 443);
    

    $displayToUser = "
<div class='col-md-9'>
<form class='form-horizontal' role='form' action='installphp' method='get'>
  <input type='hidden' name='step' value='0' />
  <input type='hidden' name='language' value='${menuLanguage}' />
  <div class='form-group'>
    <label for='inputVersion' class='col-sm-2 control-label'>Version </label>
    <label for='inputVersion' class='col-sm-2 control-label'>preAlpha01</label>
    
  </div>
</form>
</div>
";

    if (!$json or ($developer == 'N' and !is_object($json)) or ($developer == 'Y' and !is_array($json)) or ($developer == 'N' and property_exists($json, 'tag_name') and $easyWiVersion == $json->tag_name) or ($developer == 'Y' and is_object("@") and property_exists("@", 'name') and $easyWiVersion == "@"->name )) {
        $displayToUser .= "<div class='col-md-12'><div class='jumbotron'><h2>{$languageObject->welcome_header}</h2><p>{$languageObject->welcome_text}</p><div class='pager'><a href='?step=1${languageGetParameter}' class='pull-right'><span class='btn btn-primary btn-lg'>{$languageObject->continue}</span></a></div></div></div>";
    } else {
        $apiVersion = ($developer == 'Y') ? "@"->name : $json->tag_name;
        $displayToUser .= "<div class='col-md-12'><div class='alert alert-warning'><i class='fa fa-exclamation-triangle'></i> {$languageObject->welcome_old_version}<a href='https://githubcom/easy-wi/developer/releases/tag/{$apiVersion}' target='_blank'>{$apiVersion}</a></div><div class='jumbotron'><h2>{$languageObject->welcome_header}</h2><p>{$languageObject->welcome_text}</p><div class='pager'><a href='?step=1${languageGetParameter}' class='pull-right'><span class='btn btn-primary btn-lg'>{$languageObject->continue}</span></a></div></div></div>";
    }

} else {

    if (version_compare(PHP_VERSION, '540') >= 0) {
        $systemCheckOk['php'] = $languageObject->system_ok_php_versionPHP_VERSION;
    } else {
        $systemCheckError['php'] = $languageObject->error_system_php_versionPHP_VERSION;
    }

    $modules = array('openssl', 'json', 'hash', 'ftp', 'SimpleXML', 'curl', 'gd', 'PDO', 'pdo_mysql', 'zip');

    foreach ($modules as $module) {
        if (extension_loaded($module)) {
            $okField = "system_ok_$module";
            $systemCheckOk[$module] = $languageObject->$okField;
        } else {
            $errorField = "error_system_$module";
            $systemCheckError[$module] = $languageObject->$errorField;
        }
    }

    $functions = array('fopen');

    foreach ($functions as $function) {
        if (function_exists($function)) {
            $okField = "system_ok_$function";
            $systemCheckOk[$function] = $languageObject->$okField;
        } else {
            $errorField = "error_system_$function";
            $systemCheckError[$function] = $languageObject->$errorField;
        }
    }

    $folderArray = array(
        'css/',
        'css/default/',
        'images/',
        'images/flags',
        'images/games/',
        'images/games/icons/',
        'js/',
        'js/default/',
        'keys/',
        'languages/',
        'languages/default/',
        'languages/default/de/',
        'languages/default/dk/',
        'languages/default/uk',
        'stuff/',
        'stuff/admin/',
        'stuff/api/',
        'stuff/cms/',
        'stuff/custom_modules/',
        'stuff/jobs/',
        'stuff/methods/',
        'stuff/user/',
        'template/',
        'template/default/',
        'third_party/',
        'tmp/'
    );

    foreach ($folderArray as $folder) {
        if (is_dir(EASYWIDIR . "/${folder}")) {
            $handle = @fopen(EASYWIDIR . "/${folder}testtxt", "w+");

            if ($handle) {
                fclose($handle);
                unlink(EASYWIDIR . "/${folder}testtxt");
                $systemCheckOk['folders'][] = "Folder exists and can write to: ${folder}";

            } else {
                $systemCheckError['folders'][] = "Folder exists but cannot edit files: ${folder}";
            }
        } else {
            $systemCheckError['folders'][] = "Folder does not exist or cannot access: ${folder}";
        }
    }

}

if ($currentStep == 1) {

    if (count($systemCheckError) == 0) {
        $displayToUser .= "<div class='pager'><a href='?step=2${languageGetParameter}' class='pull-right'><span class='btn btn-primary btn-lg'>{$languageObject->continue}</span></a></div>";
    }

    foreach ($systemCheckError as $v) {
        if (is_array($v)) {
            foreach ($v as $v2) {
                $displayToUser .= "<div class='alert alert-danger'>${v2}</div>";
            }
        } else {
            $displayToUser .= "<div class='alert alert-danger'>${v}</div>";
        }
    }

    foreach ($systemCheckOk as $v) {
        if (is_array($v)) {
            foreach ($v as $v2) {
                $displayToUser .= "<div class='alert alert-success'>${v2}</div>";
            }
        } else {
            $displayToUser .= "<div class='alert alert-success'>${v}</div>";
        }
    }

    if (count($systemCheckError) == 0) {
        $displayToUser .= "<div class='pager'><a href='?step=2${languageGetParameter}' class='pull-right'><span class='btn btn-primary btn-lg'>{$languageObject->continue}</span></a></div>";
    }

}

if ($currentStep == 2 and count($systemCheckError) == 0) {

    $host = 'localhost';
    $db = '';
    $user = '';
    $pwd = '';
    $aeskey = passwordgenerate(20);

    if (file_exists(EASYWIDIR . '/stuff/configphp')) {
        require_once(EASYWIDIR . '/stuff/configphp');
    }
    if (file_exists(EASYWIDIR . '/stuff/keyphrasefilephp')) {
        require_once(EASYWIDIR . '/stuff/keyphrasefilephp');
    }

    $displayToUser = "
<form class='form-horizontal' role='form' action='installphp?step=3${languageGetParameter}' method='post'>
  <div class='form-group'>
    <label for='inputHost' class='col-sm-2 control-label'>{$languageObject->host}</label>
    <div class='col-sm-10'>
      <input type='text' class='form-control' id='inputHost' name='host' value='${host}' required>
    </div>
  </div>
  <div class='form-group'>
    <label for='inputDB' class='col-sm-2 control-label'>{$languageObject->db}</label>
    <div class='col-sm-10'>
      <input type='text' class='form-control' id='inputDB' name='db' value='${db}' required>
    </div>
  </div>
  <div class='form-group'>
    <label for='inputUser' class='col-sm-2 control-label'>{$languageObject->user}</label>
    <div class='col-sm-10'>
      <input type='text' class='form-control' id='inputUser' name='user' value='${user}' required>
    </div>
  </div>
  <div class='form-group'>
    <label for='inputPassword' class='col-sm-2 control-label'>{$languageObject->passw_1}</label>
    <div class='col-sm-10'>
      <input type='password' class='form-control' id='inputPassword' name='pwd' value='${pwd}' required>
    </div>
  </div>
  <div class='form-group'>
    <label for='inputAESKey' class='col-sm-2 control-label'>{$languageObject->aeskey}</label>
    <div class='col-sm-10'>
      <input type='text' class='form-control' id='inputAESKey' name='aeskey' value='${aeskey}' required>
      <p class='help-block'>{$languageObject->aeskey2}</p>
      <p class='help-block'>{$languageObject->aeskey3}</p>
    </div>
  </div>
  <div class='form-group'>
    <div class='col-sm-offset-2 col-sm-10'>
      <button type='submit' class='btn btn-primary btn-lg pull-right'>{$languageObject->continue}</button>
    </div>
  </div>
</form>
";

} else if ($currentStep > 2 and count($systemCheckError) == 0) {

    if ($currentStep == 3 and isset($_POST['db'])) {

        try {

            $sql = new PDO("mysql:host=${_POST['host']};dbname=${_POST['db']}", $_POST['user'], $_POST['pwd'], array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
            $sql->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

            $configFp = @fopen(EASYWIDIR . '/stuff/configphp', "w+");

            if ($configFp) {

                $configdata = "// This file was generated by the easy-wicom installer

$host = '" . addcslashes($_POST['host'], "'") . "';
$user = '" . addcslashes($_POST['user'], "'") . "';
$db = '" . addcslashes($_POST['db'], "'") . "';
$pwd = '" . addcslashes($_POST['pwd'], "'") . "';
$captcha = '0';
$title = '';
$debug = '0';
$timezone = 'Europe/Berlin';
$coloreddashboard = false;
$easywitweets = true;
";

                @fwrite($configFp, $configdata);

                fclose($configFp);

            } else {
                $systemCheckError['configphp'] = "<div class='alert alert-danger'>{$languageObject->error_config_php_data}</div>";
            }

            $keyFp = @fopen(EASYWIDIR . '/stuff/keyphrasefilephp', "w+");

            if ($keyFp) {
                $configdata='// This file was generated by the easy-wicom installer

$aeskey = "' . addcslashes($_POST['aeskey'], "'") . '";
';

                @fwrite($keyFp, $configdata);

                fclose($keyFp);
            } else {
                $systemCheckError['keyphrasefilephp'] = "<div class='alert alert-danger'>{$languageObject->error_keyphrase_php_create}</div>";
            }

        } catch(PDOException $error) {

            $systemCheckError['db_connect'] = "<div class='alert alert-danger'>{$error->getMessage()}</div>";

        }

    }

    if (!isset($sql) ) {

        if (file_exists(EASYWIDIR . '/stuff/configphp') and file_exists(EASYWIDIR . '/stuff/keyphrasefilephp')) {

            if ($currentStep == 3 and isset($_POST['db'])) {
                $displayToUser .= "<div class='alert alert-success'>{$languageObject->ok_files_created}</div>";
            }

            require_once(EASYWIDIR . '/stuff/configphp');
            require_once(EASYWIDIR . '/stuff/keyphrasefilephp');

            if (isset($host) and isset($db) and isset($user) and isset($pwd)) {

                try {

                    $sql = new PDO("mysql:host=${host};dbname=${db}", $user, $pwd, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
                    $sql->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

                } catch(PDOException $error) {

                    $systemCheckError['db_connect'] = "<div class='alert alert-danger'>{$error->getMessage()}</div>";

                }

            } else {
                $systemCheckError['configphp'] = "<div class='alert alert-danger'>{$languageObject->error_config_php_data}</div>";
            }

        } else {

            if (isset($_POST['db'])) {
                $systemCheckError['keyphrasefilephp'] = "<div class='alert alert-danger'>{$languageObject->error_keyphrase_php_create}</div>";
            } else {
                $systemCheckError['configphp'] = "<div class='alert alert-danger'>{$languageObject->error_config_keyphrase_php_missing}</div>";
            }
        }
    }
}

if ($currentStep == 3 and count($systemCheckError) == 0) {
    $displayToUser .= "<div class='alert alert-success'>{$languageObject->ok_files_created}</div>";
    $displayToUser .= "<div class='alert alert-success'>{$languageObject->ok_db_connect}</div>";
    $displayToUser .= "<div class='pager'><a href='?step=4${languageGetParameter}' class='pull-right'><span class='btn btn-primary btn-lg'>{$languageObject->continue}</span></a></div>";
}

if ($currentStep == 4 and count($systemCheckError) == 0) {

    try {

        $response = new UpdateResponse();

        require_once(EASYWIDIR . '/stuff/methods/class_tablesphp');

        $tables = new Tables($db);
        $tables->createMissingTables();

        foreach($tables->getExecutedSql() as $change){
            if ($change) {
                $response->add($change . '<br>');
            }
        }

        if (strlen($response->response) > 0) {

            $displayToUser .= "<div class='alert alert-success'>{$languageObject->ok_db_tables_create}</div>";
            $displayToUser .= "<div class='alert alert-success'>{$response->response}</div>";

        } else {
            $displayToUser .= "<div class='alert alert-success'>{$languageObject->ok_db_tables_create}</div>";
        }

        $displayToUser .= "<div class='pager'><a href='?step=5${languageGetParameter}' class='pull-right'><span class='btn btn-primary btn-lg'>{$languageObject->continue}</span></a></div>";

    } catch(PDOException $error) {
        $systemCheckError['tables_addphp'] = "<div class='alert alert-danger'>{$error->getMessage()}" . implode("\r\n", $tables->getExecutedSql()) . "</div>";
    }
}

if ($currentStep == 5 and count($systemCheckError) == 0) {

    try {

        $response = new UpdateResponse();

        require_once(EASYWIDIR . '/stuff/methods/class_tablesphp');

        $tables = new Tables($db);
        $response->add('Repairing tables if needed.<br>');
        $tables->correctTablesStatus();
        $tables->correctExistingTables();

        foreach($tables->getExecutedSql() as $change){
            $response->add($change . '<br>');
        }

        if (strpos($response->response, 'Error: no such table:') !== false) {

            $systemCheckError['tables_repairphp'] = "<div class='alert alert-danger'>{$response->response}</div>";

        } else {

            if (strlen($response->response) > 0) {

                $displayToUser .= "<div class='alert alert-success'>{$languageObject->ok_db_tables_check_repair}</div>";
                $displayToUser .= "<div class='alert alert-success'>{$response->response}</div>";

            } else {
                $displayToUser .= "<div class='alert alert-success'>{$languageObject->ok_db_tables_check}</div>";
            }

            $displayToUser .= "<div class='pager'><a href='?step=6${languageGetParameter}' class='pull-right'><span class='btn btn-primary btn-lg'>{$languageObject->continue}</span></a></div>";

        }

    } catch(PDOException $error) {

        $systemCheckError['tables_repairphp'] = "<div class='alert alert-danger'>{$error->getMessage()}</div>";

    }

}

if ($currentStep == 6 and count($systemCheckError) == 0) {

    $cname = '';
    $email = '';

    $query = $sql->prepare("SELECT `cname`,`mail` FROM `userdata` WHERE `id`=1");
    $query->execute();
    while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
        $cname = $row['cname'];
        $email = $row['mail'];
    }

    if (isset($_POST['passw1'])) {

        if ($_POST['passw1'] != $_POST['passw2'] or !preg_match('/^[\w\S]{6,120}$/', $_POST['passw1'])) {
            $displayToUser .= "<div class='alert alert-danger'>{$languageObject->error_password}</div>";
        }

        if (filter_var($_POST['email'], FILTER_VALIDATE_EMAIL)) {
            $email = $_POST['email'];
        } else {
            $displayToUser .= "<div class='alert alert-danger'>{$languageObject->error_email}</div>";
        }

        if (strlen($_POST['cname']) == 0) {
            $displayToUser .= "<div class='alert alert-danger'>{$languageObject->error_cname}</div>";
        } else {
            $cname = $_POST['cname'];
        }
    }

    if (!isset($_POST['passw1']) or strlen($displayToUser) > 0) {

        $displayToUser .= "
<form class='form-horizontal' role='form' action='installphp?step=6${languageGetParameter}' method='post'>
  <div class='form-group'>
    <label for='inputUser' class='col-sm-2 control-label'>{$languageObject->user2}</label>
    <div class='col-sm-10'>
      <input type='text' class='form-control' id='inputUser' name='cname' value='${cname}' required>
    </div>
  </div>
  <div class='form-group'>
    <label for='inputEmail' class='col-sm-2 control-label'>{$languageObject->email}</label>
    <div class='col-sm-10'>
      <input type='email' class='form-control' id='inputEmail' name='email' value='${email}' required>
    </div>
  </div>
  <div class='form-group'>
    <label for='inputPassword1' class='col-sm-2 control-label'>{$languageObject->passw_1}</label>
    <div class='col-sm-10'>
      <input type='password' class='form-control' id='inputPassword1' name='passw1' value='' required>
    </div>
  </div>
  <div class='form-group'>
    <label for='inputPassword2' class='col-sm-2 control-label'>{$languageObject->passw_2}</label>
    <div class='col-sm-10'>
      <input type='password' class='form-control' id='inputPassword2' name='passw2' value='' required>
    </div>
  </div>
  <div class='form-group'>
    <div class='col-sm-offset-2 col-sm-10'>
      <button type='submit' class='btn btn-primary btn-lg pull-right'>{$languageObject->continue}</button>
    </div>
  </div>
</form>
";

    } else {

        try {

            $query = $sql->prepare("INSERT INTO `userdata` (`id`,`cname`,`mail`,`security`,`accounttype`,`creationTime`,`updateTime`) VALUES (1,?,?,?,'a',NOW(),NOW()) ON DUPLICATE KEY UPDATE `cname`=VALUES(`cname`),`mail`=VALUES(`mail`)");
            $query->execute(array($cname, $email, md5($_POST['passw1'])));

            $query = $sql->prepare("INSERT INTO `usergroups` (`id`,`defaultgroup`,`name`,`grouptype`,`root`,`miniroot`) VALUES (1,'Y','Admin Default','a','Y','N') ON DUPLICATE KEY UPDATE `id`=VALUES(`id`)");
            $query->execute();
            $query = $sql->prepare("INSERT INTO `usergroups` (`id`,`defaultgroup`,`name`,`grouptype`,`root`,`miniroot`) VALUES (2,'Y','Reseller Default','r','Y','N') ON DUPLICATE KEY UPDATE `id`=VALUES(`id`)");
            $query->execute();
            $query = $sql->prepare("INSERT INTO `usergroups` (`id`,`defaultgroup`,`name`,`grouptype`,`root`,`miniroot`) VALUES (3,'Y','User Default','u','N','Y') ON DUPLICATE KEY UPDATE `id`=VALUES(`id`)");
            $query->execute();

            $query = $sql->prepare("INSERT INTO `userdata_groups` (`userID`,`groupID`) VALUES (1,1) ON DUPLICATE KEY UPDATE `userID`=VALUES(`userID`)");
            $query->execute();

            $displayToUser .= "<div class='alert alert-success'>{$languageObject->ok_admin_user}</div>";
            $displayToUser .= "<div class='pager'><a href='?step=7${languageGetParameter}' class='pull-right'><span class='btn btn-primary btn-lg'>{$languageObject->continue}</span></a></div>";

        } catch(PDOException $error) {

            $systemCheckError['tables_repairphp'] = "<div class='alert alert-danger'>{$error->getMessage()}</div>";

        }
    }
}

if ($currentStep == 7 and count($systemCheckError) == 0) {

    $languages = array();
    $language = '';
    $prefix1 = "Y";
    $prefix2 = "user";
    $faillogins = 5;
    $brandname = "by myhostcom";

    $selectedCaptcha = '';
    $selectedPrefix = '';

    $query = $sql->prepare("SELECT `pageurl` FROM `page_settings` WHERE `resellerid`=0");
    $query->execute();
    $installUrl = (string) $query->fetchColumn();

    if (strlen($installUrl) == 0) {
        $installUrl = 'http://' . $_SERVER['SERVER_NAME'] . '/';
    }

    if (strlen($_SERVER['SERVER_NAME']) == 0 and isset($_SERVER['HTTP_REFERER'])) {
        $installUrl = str_replace(array('&language=de', '&language=en', '&language=dk'), '', str_replace('install/installphp?step=6', '', $_SERVER['HTTP_REFERER']));
    }

    while (substr($installUrl, -2) == '//') {
        $installUrl = substr($installUrl, 0, strlen($installUrl) -1 );
    }

    $defaultTimeZone = (@ini_get('datetimezone') != "") ? ini_get('datetimezone') : 'Europe/Berlin';

    $query = $sql->prepare("SELECT `mail` FROM `userdata` WHERE `id`=1");
    $query->execute();
    $email = $query->fetchColumn();

    $query = $sql->prepare("SELECT `language`,`prefix1`,`prefix2`,`faillogins`,`brandname` FROM `settings` WHERE `resellerid`=0 LIMIT 1");
    $query->execute();
    while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
        $language = $row['language'];
        $prefix1 = $row['prefix1'];
        $prefix2 = $row['prefix2'];
        $faillogins = $row['faillogins'];
        $brandname = $row['brandname'];
    }

    $query = $sql->prepare("SELECT `email_setting_value` FROM `settings_email` WHERE `reseller_id`=0 AND `email_setting_name`='email' LIMIT 1");
    $query->execute();
    while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
        $email = $row['email_setting_value'];
    }

    if (isset($_POST['email'])) {

        if (filter_var($_POST['email'], FILTER_VALIDATE_EMAIL)) {
            $email = $_POST['email'];
        } else {
            $displayToUser .= "<div class='alert alert-danger'>{$languageObject->error_email}</div>";
        }

    }

    if ($captcha == 1) {
        $selectedCaptcha = 'selected="selected"';
    }

    if ($prefix1 == 'Y') {
        $selectedPrefix = 'selected="selected"';
    }

    if (is_dir(EASYWIDIR . "/languages/default/")){
        $dirs = scandir(EASYWIDIR . "/languages/default/");
        foreach ($dirs as $row) {
            if (preg_match("/^[a-z]{2}+$/", $row)) {
                $languages[] = ($row == $menuLanguage) ? "<option value='${row}' selected='selected'>$row</option>" : "<option value='${row}'>$row</option>";
             }
        }
    }

    $languages = implode('', $languages);

    if (!isset($_POST['email']) or strlen($displayToUser) > 0) {

        $displayToUser .= "
<form class='form-horizontal' role='form' action='installphp?step=7${languageGetParameter}' method='post'>
  <div class='form-group'>
    <label for='inputInstallUrl' class='col-sm-2 control-label'>{$languageObject->installUrl}</label>
    <div class='col-sm-10'>
      <input type='text' class='form-control' id='inputInstallUrl' name='installUrl' value='${installUrl}' required>
    </div>
  </div>
  <div class='form-group'>
    <label for='inputInstallTimezone' class='col-sm-2 control-label'>{$languageObject->timezone}</label>
    <div class='col-sm-10'>
    <select id='inputInstallTimezone' class='form-control' name='timezone'>";

        foreach (timezone_identifiers_list() as $time) {
            $displayToUser .= ($time == $defaultTimeZone) ? "<option selected='selected'>{$time}</option>" : "<option>{$time}</option>";
        }

        $displayToUser .= "
    </select>
    </div>
  </div>
  <div class='form-group'>
    <label for='inputTitle' class='col-sm-2 control-label'>{$languageObject->title}</label>
    <div class='col-sm-10'>
      <input type='text' class='form-control' id='inputTitle' name='title' value='${title}' required>
    </div>
  </div>
  <div class='form-group'>
    <label for='inputLanguage' class='col-sm-2 control-label'>{$languageObject->language}</label>
    <div class='col-sm-10'>
      <select name='language' class='form-control' id='inputLanguage'>${languages}</select>
    </div>
  </div>
  <div class='form-group'>
    <label for='inputEmail' class='col-sm-2 control-label'>{$languageObject->email}</label>
    <div class='col-sm-10'>
      <input type='email' class='form-control' id='inputEmail' name='email' value='${email}' required>
      <p class='help-block'>{$languageObject->email2}</p>
    </div>
  </div>
  <div class='form-group'>
    <label for='inputCaptcha' class='col-sm-2 control-label'>{$languageObject->captcha}</label>
    <div class='col-sm-10'>
      <select name='captcha' class='form-control' id='inputCaptcha'>
      <option value='0'>{$languageObject->no}</option>
      <option value='1' ${selectedCaptcha}>{$languageObject->yes}</option>
      </select>
      <p class='help-block'>{$languageObject->captcha_2}</p>
    </div>
  </div>
  <div class='form-group'>
    <label for='inputFaillogins' class='col-sm-2 control-label'>{$languageObject->faillogins}</label>
    <div class='col-sm-10'>
      <input type='number' class='form-control' id='inputFaillogins' name='faillogins' value='${faillogins}' required>
      <p class='help-block'>{$languageObject->faillogins2}</p>
    </div>
  </div>
  <div class='form-group'>
    <label for='inputBrandname' class='col-sm-2 control-label'>{$languageObject->brandname}</label>
    <div class='col-sm-10'>
      <input type='text' class='form-control' id='inputBrandname' name='brandname' value='${brandname}' required>
      <p class='help-block'>{$languageObject->brandname2}</p>
    </div>
  </div>
  <div class='form-group'>
    <label for='inputPrefix1' class='col-sm-2 control-label'>{$languageObject->prefix1}</label>
    <div class='col-sm-10'>
      <select name='prefix1' class='form-control' id='inputPrefix1'>
      <option value='N'>{$languageObject->no}</option>
      <option value='Y' ${selectedPrefix}>{$languageObject->yes}</option>
      </select>
    </div>
  </div>
  <div class='form-group'>
    <label for='inputPrefix' class='col-sm-2 control-label'>{$languageObject->prefix3}</label>
    <div class='col-sm-10'>
      <input type='text' class='form-control' id='inputPrefix' name='prefix2' value='${prefix2}' required>
      <p class='help-block'>{$languageObject->prefix2}</p>
    </div>
  </div>
  <div class='form-group'>
    <div class='col-sm-offset-2 col-sm-10'>
      <button type='submit' class='btn btn-primary btn-lg pull-right'>{$languageObject->continue}</button>
    </div>
  </div>
</form>
";

    } else {

        try {

            $query = $sql->prepare("INSERT INTO `easywi_statistics_current` (`userID`) VALUES (0) ON DUPLICATE KEY UPDATE `userID`=`userID`");
            $query->execute();

            $query = $sql->prepare("INSERT INTO `page_settings` (`id`,`pageurl`,`resellerid`) VALUES (1,?,0) ON DUPLICATE KEY UPDATE `pageurl`=VALUES(`pageurl`)");
            $query->execute(array($_POST['installUrl']));

            $query = $sql->prepare("INSERT INTO `settings` (`id`,`template`,`language`,`prefix1`,`prefix2`,`faillogins`,`brandname`,`developer`,`cronjob_ips`,`imageserver`,`resellerid`) VALUES (1,'default',?,?,?,?,?,?,'','imageseasy-wicom::easy-wi',0) ON DUPLICATE KEY UPDATE `language`=VALUES(`language`),`prefix1`=VALUES(`prefix1`),`prefix2`=VALUES(`prefix2`),`faillogins`=VALUES(`faillogins`),`brandname`=VALUES(`brandname`),`developer`=VALUES(`developer`),`imageserver`=VALUES(`imageserver`)");
            $query->execute(array($_POST['language'], $_POST['prefix1'], $_POST['prefix2'], $_POST['faillogins'], $_POST['brandname'], $developer));

            $query = $sql->prepare("INSERT INTO `settings_email` (`reseller_id`,`email_setting_name`,`email_setting_value`) VALUES (0,'email',?) ON DUPLICATE KEY UPDATE `email_setting_value`=VALUES(`email_setting_value`)");
            $query->execute(array($_POST['email']));

            $query = $sql->prepare("INSERT INTO `eac` (`id`,`resellerid`) VALUES (1,0) ON DUPLICATE KEY UPDATE `resellerid`=`resellerid`");
            $query->execute();

            $query = $sql->prepare("INSERT INTO `lendsettings` (`id`,`resellerid`) VALUES (1,0) ON DUPLICATE KEY UPDATE `resellerid`=`resellerid`");
            $query->execute();

            $query = $sql->prepare("INSERT INTO `traffic_settings` (`id`,`type`) VALUES (1,'mysql') ON DUPLICATE KEY UPDATE `type`=`type`");
            $query->execute();

            $query = $sql->prepare("INSERT INTO `easywi_version` (`id`,`version`,`de`,`en`) VALUES (1,'${easyWiVersion}','','') ON DUPLICATE KEY UPDATE `id`=`id`");
            $query->execute();

            $query = $sql->prepare("INSERT INTO `page_pages` (`id`,`authorid`,`type`) VALUES (1,0,'about') ON DUPLICATE KEY UPDATE `id`=`id`");
            $query->execute();

            $query = $sql->prepare("INSERT INTO `feeds_settings` (`settingsID`,`resellerID`) VALUES (1,0) ON DUPLICATE KEY UPDATE `settingsID`=`settingsID`");
            $query->execute();

            $query = $sql->prepare("INSERT INTO `settings_email_category` (`id`, `name`, `reseller_id`) VALUES (1, 'vServer', 0), (2, 'Server', 0), (3, 'Ticket', 0), (4, 'General', 0), (5, 'VoiceServer', 0), (6, 'GameServer', 0) ON DUPLICATE KEY UPDATE `id`=`id`");
            $query->execute();

            //Install E-Mail template
            include(EASYWIDIR . '/stuff/data/email_templatesphp');
            foreach ($emailTemplates as $template) {
                $query = $sql->prepare($template['query']);
                $query->execute(array(0));
            }


            $query = $sql->prepare("INSERT INTO `resellerimages` (`id`, `distro`, `description`, `bitversion`, `pxelinux`) VALUES (1, 'other', 'Rescue 32bit', 32, 'DISPLAY boottxt\r\nDEFAULT rescue\r\nTIMEOUT 10\r\n\r\nLABEL default\r\n        kernel /rescue/vmlinuz-rescue\r\n        append initrd=/rescue/initramigz setkmap=de dodhcp rootpass=%rescuepass% scandelay=5 boothttp=http://1111/rescue/32/sysrcddat') ON DUPLICATE KEY UPDATE `id`=`id`");
            $query->execute();
            $query = $sql->prepare("INSERT INTO `resellerimages` (`id`, `distro`, `description`, `bitversion`, `pxelinux`) VALUES (2, 'other', 'Rescue 64bit', 64, 'DISPLAY boottxt\r\nDEFAULT rescue\r\nTIMEOUT 10\r\n\r\nLABEL default\r\n        kernel /rescue/vmlinuz-rescue\r\n        append initrd=/rescue/initramigz setkmap=de dodhcp rootpass=%rescuepass% scandelay=5 boothttp=http://1111/rescue/64/sysrcddat') ON DUPLICATE KEY UPDATE `id`=`id`");
            $query->execute();

            $configFp = @fopen(EASYWIDIR . '/stuff/configphp', "w+");

            if ($configFp) {

                $configdata = "// This file was generated by the easy-wicom installer

$host = '" . $host . "';
$user = '" . $user . "';
$db = '" . $db . "';
$pwd = '" . $pwd . "';
$captcha = '" . $_POST['captcha'] . "';
$title = '" . $_POST['title'] . "';
$debug = '0';
$timezone = '" . $_POST['timezone'] . "';
$coloreddashboard = false;
$easywitweets = true;
";

                @fwrite($configFp, $configdata);

                fclose($configFp);

            }

            $displayToUser .= "<div class='alert alert-success'>{$languageObject->ok_configuration}</div>";
            $displayToUser .= "<div class='pager'><a href='?step=8${languageGetParameter}' class='pull-right'><span class='btn btn-primary btn-lg'>{$languageObject->continue}</span></a></div>";

        } catch(PDOException $error) {

            $displayToUser = "<div class='alert alert-danger'>{$error->getMessage()}</div>";

        }

    }
}

if ($currentStep == 8 and count($systemCheckError) == 0) {
    if (!isset($_POST['submit'])) {

        $displayToUser .= "<div class='alert alert-success'>{$languageObject->games_insert}</div>";
        $displayToUser .= "
<form class='form-horizontal' role='form' action='installphp?step=8${languageGetParameter}' method='post'>
  <div class='form-group'>
    <div class='col-sm-offset-2 col-sm-10'>
      <button type='submit' name='submit' class='btn btn-primary btn-lg pull-right'>{$languageObject->continue}</button>
    </div>
  </div>
</form>
";

    } else {

        try {

            include(EASYWIDIR . '/stuff/data/gameslistphp');

            $displayToUser .= "<div class='pager'><a href='?step=9${languageGetParameter}' class='pull-right'><span class='btn btn-primary btn-lg'>{$languageObject->continue}</span></a></div>";
            $displayToUser .= "<div class='alert alert-success'>{$languageObject->ok_gameserver_data}</div>";

            $query = $sql->prepare("SELECT COUNT(`id`) AS `amount` FROM `servertypes` WHERE `shorten`=? AND `resellerid`=0 LIMIT 1");
            $query2 = $sql->prepare("INSERT INTO `servertypes` (`type`,`steamgame`,`appID`,`serverID`,`updates`,`shorten`,`description`,`gamebinary`,`gamebinaryWin`,`binarydir`,`modfolder`,`fps`,`slots`,`map`,`cmd`,`modcmds`,`tic`,`gameq`,`gamemod`,`gamemod2`,`configs`,`configedit`,`portStep`,`portMax`,`portOne`,`portTwo`,`portThree`,`portFour`,`portFive`,`useQueryPort`,`mapGroup`,`protected`,`protectedSaveCFGs`,`ramLimited`,`os`,`copyStartBinary`,`steamGameserverToken`) VALUES ('',:steamgame,:appID,:serverID,:updates,:shorten,:description,:gamebinary,:gamebinaryWin,:binarydir,:modfolder,:fps,:slots,:map,:cmd,:modcmds,:tic,:gameq,:gamemod,:gamemod2,:configs,:configedit,:portStep,:portMax,:portOne,:portTwo,:portThree,:portFour,:portFive,:useQueryPort,:mapGroup,:protected,:protectedSaveCFGs,:ramLimited,:os,:copyStartBinary,:steamGameserverToken)");
            $query3 = $sql->prepare("UPDATE `servertypes` SET `steamgame`=:steamgame,`appID`=:appID,`serverID`=:serverID,`updates`=:updates,`shorten`=:shorten,`description`=:description,`gamebinary`=:gamebinary,`gamebinaryWin`=:gamebinaryWin,`binarydir`=:binarydir,`modfolder`=:modfolder,`fps`=:fps,`slots`=:slots,`map`=:map,`cmd`=:cmd,`modcmds`=:modcmds,`tic`=:tic,`gameq`=:gameq,`gamemod`=:gamemod,`gamemod2`=:gamemod2,`configs`=:configs,`configedit`=:configedit,`portStep`=:portStep,`portMax`=:portMax,`portOne`=:portOne,`portTwo`=:portTwo,`portThree`=:portThree,`portFour`=:portFour,`portFive`=:portFive,`useQueryPort`=:useQueryPort,`mapGroup`=:mapGroup,`protected`=:protected,`protectedSaveCFGs`=:protectedSaveCFGs,`ramLimited`=:ramLimited,`os`=:os,`copyStartBinary`=:copyStartBinary,`steamGameserverToken`=:steamGameserverToken WHERE `shorten`=:shorten AND `resellerid`=0 LIMIT 1");

            foreach ($gameImages as $image) {

                if (count($image) == 36) {

                    $query->execute(array($image[':shorten']));
                    $imageExists = (int) $query->fetchColumn();

                    if ($imageExists == 0) {
                        $query2->execute($image);
                        $affectedRows = $query2->rowCount();
                    } else {
                        $query3->execute($image);
                        $affectedRows = $query3->rowCount();
                    }
                    if ($affectedRows == 1) {
                        $displayToUser .= "<div class='alert alert-success'>{$image[':description']}</div>";
                    }

                } else {
                    $displayToUser .= "<div class='alert alert-danger'>{$languageObject->error_game_insert} " . count($image) . " ${image[':description']}</div>";
                }

            }

            require_once(EASYWIDIR . '/stuff/data/addonslistphp');

            $query = $sql->prepare("SELECT `id` FROM `addons` WHERE `addon`=? AND `resellerid`=0 LIMIT 1");
            $query2 = $sql->prepare("INSERT INTO `addons` (`active`,`depending`,`paddon`,`addon`,`type`,`folder`,`menudescription`,`configs`,`cmd`,`rmcmd`,`resellerid`) VALUES ('Y',?,?,?,?,?,?,?,?,?,0)");
            $query3 = $sql->prepare("SELECT `id` FROM `servertypes` WHERE `shorten`=? AND `resellerid`=0 LIMIT 1");
            $query4 = $sql->prepare("INSERT INTO `addons_allowed` (`addon_id`,`servertype_id`,`reseller_id`) VALUES (?,?,0)");

            foreach ($gameAddons as $addon) {

                if (count($addon) == 10) {

                    $query->execute(array($addon[':addon']));
                    $addonID = $query->fetchColumn();

                    if ($addonID < 1) {

                        $dependsID = 0;

                        if (strlen($addon[':depends']) > 0) {
                            $query->execute(array($addon[':depends']));
                            $dependsID = (int) $query->fetchColumn();
                        }

                        $query2->execute(array($dependsID, $addon[':paddon'], $addon[':addon'], $addon[':type'], $addon[':folder'], $addon[':menudescription'], $addon[':configs'], $addon[':cmd'], $addon[':rmcmd']));

                        $addonID = (int) $sql->lastInsertId();

                        if (preg_match('/^[\d]{1,}$/', $addonID) and $addonID != 0) {
                            foreach ($addon[':supported'] as $supported) {

                                $query3->execute(array($supported));
                                $serverTypeID = (int) $query3->fetchColumn();

                                if (preg_match('/^[\d]{1,}$/', $serverTypeID) and $serverTypeID != 0) {
                                    $query4->execute(array($addonID, $serverTypeID));
                                }
                            }
                        }

                        $displayToUser .= "<div class='alert alert-success'>{$addon[':menudescription']}</div>";
                    }
                }
            }

            $displayToUser .= "<div class='pager'><a href='?step=9${languageGetParameter}' class='pull-right'><span class='btn btn-primary btn-lg'>{$languageObject->continue}</span></a></div>";

        } catch(PDOException $error) {

            $displayToUser = "<div class='alert alert-danger'>{$error->getMessage()}</div>";

        }

    }
}

if ($currentStep == 9 and count($systemCheckError) == 0) {

    // Deactivate CMS module by default
    $query = $sql->prepare("SELECT `id` FROM `modules` WHERE `get`='pn' LIMIT 1");
    $query->execute();
    $cmdModuleId = (int) $query->fetchColumn();

    if ($cmdModuleId > 0) {
        $query = $sql->prepare("UPDATE `modules` SET `active`='N' WHERE `id`=? LIMIT 1");
        $query->execute(array($cmdModuleId));
    } else {
        $query = $sql->prepare("INSERT INTO `modules` (`get`,`sub`,`file`,`active`,`type`) VALUES ('pn','pn','','N','C')");
        $query->execute();
    }

    function rmr($dir) {

        if (is_dir($dir)) {

            $dircontent = scandir($dir);

            foreach ($dircontent as $c) {
                if ($c !=  and $c != '..' and is_dir($dir . '/' . $c)) {
                    rmr($dir . '/' . $c);
                } else if ($c !=  and $c != '..') {
                    @unlink($dir . '/' . $c);
                }
            }

            @rmdir($dir);

        } else {
            @unlink($dir);
        }
    }

    rmr(EASYWIDIR . "/install");

    $query = $sql->prepare("UPDATE `settings` SET `lastCronReboot`=:futuretime,`lastCronCloud`=:futuretime,`lastCronJobs`=:futuretime,`lastCronUpdates`=:futuretime,`lastCronStatus`=:futuretime");
    $query->execute(array(':futuretime' => strtotime("+2 hours")));


    if (file_exists(EASYWIDIR . "/install")) {
        $displayToUser .= "<div class='alert alert-warning'>{$languageObject->install_done_folder}</div>";
    }

    $displayToUser .= "<div class='alert alert-success'>{$languageObject->install_done}</div>";

    $displayPHPUser = (isset($_SERVER['USER'])) ? $_SERVER['USER'] : 'changeToPHPUser';

    $displayToUser .= "<div class='alert alert-success'><h4>{$languageObject->cron_internal} (/etc/crontab)</h4>
<strong>{$languageObject->cron_internal_text}</strong><br>
0 */1 * * * ${displayPHPUser} cd " . EASYWIDIR . " && timeout 300 php ./rebootphp >/dev/null 2>&1<br>
*/5 * * * * ${displayPHPUser} cd " . EASYWIDIR . " && timeout 290 php ./statuscheckphp >/dev/null 2>&1<br>
*/1 * * * * ${displayPHPUser} cd " . EASYWIDIR . " && timeout 290 php ./startupdatesphp >/dev/null 2>&1<br>
*/5 * * * * ${displayPHPUser} cd " . EASYWIDIR . " && timeout 290 php ./jobsphp >/dev/null 2>&1<br>
*/10 * * * * ${displayPHPUser} cd " . EASYWIDIR . " && timeout 290 php ./cloudphp >/dev/null 2>&1</div>";

    $displayToUser .= "<div class='alert alert-success'><h4>{$languageObject->cron_internal} (crontab -e)</h4>
<strong>{$languageObject->cron_internal_text}</strong><br>
0 */1 * * * cd " . EASYWIDIR . " && timeout 300 php ./rebootphp >/dev/null 2>&1<br>
*/5 * * * * cd " . EASYWIDIR . " && timeout 290 php ./statuscheckphp >/dev/null 2>&1<br>
*/1 * * * * cd " . EASYWIDIR . " && timeout 290 php ./startupdatesphp >/dev/null 2>&1<br>
*/5 * * * * cd " . EASYWIDIR . " && timeout 290 php ./jobsphp >/dev/null 2>&1<br>
*/10 * * * * cd " . EASYWIDIR . " && timeout 290 php ./cloudphp >/dev/null 2>&1</div>";

    $query = $sql->prepare("SELECT `pageurl` FROM `page_settings` WHERE `id`=1 LIMIT 1");
    $query->execute();
    $pageUrl = $query->fetchColumn();

    $displayToUser .= "<div class='alert alert-success'><h4>{$languageObject->cron_external} (/etc/crontab)</h4>
<strong>{$languageObject->cron_external_text}</strong><br>
0 */1 * * * ExternalSSH2User wget -q --no-check-certificate -O - ${pageUrl}rebootphp >/dev/null 2>&1<br>
*/5 * * * * ExternalSSH2User wget -q --no-check-certificate -O - ${pageUrl}statuscheckphp >/dev/null 2>&1<br>
*/1 * * * * ExternalSSH2User wget -q --no-check-certificate -O - ${pageUrl}startupdatesphp >/dev/null 2>&1<br>
*/5 * * * * ExternalSSH2User wget -q --no-check-certificate -O - ${pageUrl}jobsphp >/dev/null 2>&1<br>
*/10 * * * * ExternalSSH2User wget -q --no-check-certificate -O - ${pageUrl}cloudphp >/dev/null 2>&1</div>";

    $displayToUser .= "<div class='alert alert-success'><h4>{$languageObject->cron_external} (crontab -e)</h4>
<strong>{$languageObject->cron_external_text}</strong><br>
0 */1 * * * wget -q --no-check-certificate -O - ${pageUrl}rebootphp >/dev/null 2>&1<br>
*/5 * * * * wget -q --no-check-certificate -O - ${pageUrl}statuscheckphp >/dev/null 2>&1<br>
*/1 * * * * wget -q --no-check-certificate -O - ${pageUrl}startupdatesphp >/dev/null 2>&1<br>
*/5 * * * * wget -q --no-check-certificate -O - ${pageUrl}jobsphp >/dev/null 2>&1<br>
*/10 * * * * wget -q --no-check-certificate -O - ${pageUrl}cloudphp >/dev/null 2>&1</div>";

}

if (strlen($displayToUser) == 0 and count($systemCheckError) > 0) {
    foreach ($systemCheckError as $v) {
        if (is_array($v)) {
            foreach ($v as $v2) {
                $displayToUser .= "<div class='alert alert-danger'>${v2}</div>";
            }
        } else {
            $displayToUser .= "<div class='alert alert-danger'>${v}</div>";
        }
    }
}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=10">
    <meta name="description" content="Easy-WI Installer echo $easyWiVersion;">
    <meta name="author" content="Ulrich Block">

    <title>Easy-WI Installer</title>

    
    <link href="../css/default/bootstrapmincss" rel="stylesheet">
    <link href="../css/default/fontawesome-5140/css/allcss" rel="stylesheet">
    <link href="../css/default/fontawesome-5140/css/v4-shimscss" rel="stylesheet">
    
    <style type="text/css">
            
        body {
            padding-top: 20px;
            padding-bottom: 20px;
        }

            
        .header, .footer {
            padding-left: 15px;
            padding-right: 15px;
        }

            
        .header {
            border-bottom: 1px solid #e5e5e5;
        }
            
        .header h3 {
            margin-top: 0;
            margin-bottom: 0;
            line-height: 40px;
            padding-bottom: 19px;
        }

            
        .footer {
            padding-top: 19px;
            color: #777;
            border-top: 1px solid #e5e5e5;
        }

            
        @media (min-width: 768px) {
            .container {
                max-width: 1024px;
            }
        }
        .container-narrow > hr {
            margin: 30px 0;
        }

            
        @media screen and (min-width: 768px) {
            
            .header, .footer {
                padding-left: 0;
                padding-right: 0;
            }
            
            .header {
                margin-bottom: 30px;
            }
        }
    </style>
</head>

<body>
<div class="container">
    <div class="header">
        <ul class="nav nav-pills pull-right">

        </ul>
        <h3 class="text-muted">SV-Panel Installer echo $easyWiVersion;</h3>
    </div>

    <div class="row">
        <div class="col-md-3">
            <ul class="nav nav-pills nav-stacked">
                <li if ($currentStep == 0) echo 'class="active"';><a href="?step=0echo $languageGetParameter . $developerGetParameter;"><i class="fa fa-info-circle fa-fw"></i> Willkommen</a></li>
                <li if ($currentStep == 1) echo 'class="active"';><a href="?step=1echo $languageGetParameter . $developerGetParameter;"><i class="fa fa-stethoscope fa-fw"></i> Systemvorraussetzungen</a></li>
                <li if ($currentStep == 2) echo 'class="active"';><a href="?step=2echo $languageGetParameter . $developerGetParameter;"><i class="fa fa-key fa-fw"></i> Datenbank Daten</a></li>
                <li if ($currentStep == 3) echo 'class="active"';><a href="?step=3echo $languageGetParameter . $developerGetParameter;"><i class="fa fa-stethoscope fa-fw"></i> Datenbank Verbindung prüfen</a></li>
                <li if ($currentStep == 4) echo 'class="active"';><a href="?step=4echo $languageGetParameter . $developerGetParameter;"><i class="fa fa-tasks fa-fw"></i> Datenbanktabellen anlegen</a></li>
                <li if ($currentStep == 5) echo 'class="active"';><a href="?step=5echo $languageGetParameter . $developerGetParameter;"><i class="fa fa-eye fa-fw"></i> Datenbanktabellen prüfen</a></li>
                <li if ($currentStep == 6) echo 'class="active"';><a href="?step=6echo $languageGetParameter . $developerGetParameter;"><i class="fa fa-user fa-fw"></i> Admin Account </a></li>
                <li if ($currentStep == 7) echo 'class="active"';><a href="?step=7echo $languageGetParameter . $developerGetParameter;"><i class="fa fa-cogs fa-fw"></i> CMS Daten</a></li>
                <li if ($currentStep == 8) echo 'class="active"';><a href="?step=8echo $languageGetParameter . $developerGetParameter;"><i class="fa fa-upload fa-fw"></i> Spieleserver Daten</a></li>
                <li if ($currentStep == 9) echo 'class="active"';><a href="?step=9echo $languageGetParameter . $developerGetParameter;"><i class="fa fa-smile-o fa-fw"></i> Abgeschlossen</a></li>
            </ul>
        </div>

        <div class="col-md-9">
            <div class="progress progress-striped">
                <div class="progress-bar progress-bar-success"  role="progressbar" aria-valuenow="45" aria-valuemin="0" aria-valuemax="100" style="width: echo $progressPercent;%">
                    <span class="sr-only">echo $progressPercent;% Complete</span>
                </div>
            </div>
            echo $displayToUser;
        </div>
    </div>

    <div class="footer">
        <p>&copy; <a href="https://sv-serversnet" target="_blank" title="free gameserver, voiceserver, dedicated and virtualserver webinterface sv-serversnet">SV-Serversnet</a> 2020 - echo date('Y');</p>
    </div>

</div> 



<script src="../js/default/jqueryminjs" type="text/javascript"></script>
<script src="../js/default/bootstrapminjs" type="text/javascript"></script>
</body>
</html>

ini_set('display_errors', 1);
error_reporting(E_ALL|E_STRICT);
define('EASYWIDIR', dirname(dirname(__FILE__)));

class UpdateResponse {
    public $response = '';
    function __construct() {
        $this->response = '';
    }
    function add ($newtext) {
        $this->response .= $newtext;
    }
    function __destruct() {
        unset($this->response);
    }
}

require_once(EASYWIDIR . '/stuff/methods/functionsphp');
require_once(EASYWIDIR . '/stuff/methods/vorlagephp');

$currentStep = (isset($_GET['step']) and $_GET['step'] > 0 and $_GET['step'] < 10) ? (int) $_GET['step'] : 0;
$developer = (isset($_GET['developer']) and $_GET['developer'] == 'Y') ? 'Y' : 'N';
$developerGetParameter = '&amp;developer=' . $developer;
$progressPercent = (100 / 9) * $currentStep ;
$acceptLanguage = strtolower(substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0 , 2));
$fallbackLanguage = (file_exists(EASYWIDIR . '/install/' . $acceptLanguage . '.xml')) ? $acceptLanguage : 'en';
$menuLanguage = (isset($_GET['language']) and strlen($_GET['language']) == 2 and file_exists(EASYWIDIR . '/install/' . $_GET['language'] . '.xml')) ? $_GET['language'] : $fallbackLanguage;
$languageGetParameter = '&amp;language=' . $menuLanguage;
$languageObject = simplexml_load_file(EASYWIDIR . '/install/' . $menuLanguage . '.xml');

$displayToUser = '';
$systemCheckOk = array();
$systemCheckError = array();
$easyWiVersion = ($developer == 'Y') ? '616' : '616';


if ($currentStep == 0) {

    $selectedDeveloper = ($developer == 'Y') ? "selected='selected'" : '';

    $apiResponse = webhostRequest('apigithubcom', $_SERVER['HTTP_HOST'], '/repos/easy-wi/developer/' . (($developer == 'Y') ? 'tags' : 'releases/latest'), null, 443);
    

    $displayToUser = "
<div class='col-md-9'>
<form class='form-horizontal' role='form' action='installphp' method='get'>
  <input type='hidden' name='step' value='0' />
  <input type='hidden' name='language' value='${menuLanguage}' />
  <div class='form-group'>
    <label for='inputVersion' class='col-sm-2 control-label'>Version </label>
    <label for='inputVersion' class='col-sm-2 control-label'>preAlpha01</label>
    
  </div>
</form>
</div>
";

    if (!$json or ($developer == 'N' and !is_object($json)) or ($developer == 'Y' and !is_array($json)) or ($developer == 'N' and property_exists($json, 'tag_name') and $easyWiVersion == $json->tag_name) or ($developer == 'Y' and is_object("@") and property_exists("@", 'name') and $easyWiVersion == "@"->name )) {
        $displayToUser .= "<div class='col-md-12'><div class='jumbotron'><h2>{$languageObject->welcome_header}</h2><p>{$languageObject->welcome_text}</p><div class='pager'><a href='?step=1${languageGetParameter}' class='pull-right'><span class='btn btn-primary btn-lg'>{$languageObject->continue}</span></a></div></div></div>";
    } else {
        $apiVersion = ($developer == 'Y') ? "@"->name : $json->tag_name;
        $displayToUser .= "<div class='col-md-12'><div class='alert alert-warning'><i class='fa fa-exclamation-triangle'></i> {$languageObject->welcome_old_version}<a href='https://githubcom/easy-wi/developer/releases/tag/{$apiVersion}' target='_blank'>{$apiVersion}</a></div><div class='jumbotron'><h2>{$languageObject->welcome_header}</h2><p>{$languageObject->welcome_text}</p><div class='pager'><a href='?step=1${languageGetParameter}' class='pull-right'><span class='btn btn-primary btn-lg'>{$languageObject->continue}</span></a></div></div></div>";
    }

} else {

    if (version_compare(PHP_VERSION, '540') >= 0) {
        $systemCheckOk['php'] = $languageObject->system_ok_php_versionPHP_VERSION;
    } else {
        $systemCheckError['php'] = $languageObject->error_system_php_versionPHP_VERSION;
    }

    $modules = array('openssl', 'json', 'hash', 'ftp', 'SimpleXML', 'curl', 'gd', 'PDO', 'pdo_mysql', 'zip');

    foreach ($modules as $module) {
        if (extension_loaded($module)) {
            $okField = "system_ok_$module";
            $systemCheckOk[$module] = $languageObject->$okField;
        } else {
            $errorField = "error_system_$module";
            $systemCheckError[$module] = $languageObject->$errorField;
        }
    }

    $functions = array('fopen');

    foreach ($functions as $function) {
        if (function_exists($function)) {
            $okField = "system_ok_$function";
            $systemCheckOk[$function] = $languageObject->$okField;
        } else {
            $errorField = "error_system_$function";
            $systemCheckError[$function] = $languageObject->$errorField;
        }
    }

    $folderArray = array(
        'css/',
        'css/default/',
        'images/',
        'images/flags',
        'images/games/',
        'images/games/icons/',
        'js/',
        'js/default/',
        'keys/',
        'languages/',
        'languages/default/',
        'languages/default/de/',
        'languages/default/dk/',
        'languages/default/uk',
        'stuff/',
        'stuff/admin/',
        'stuff/api/',
        'stuff/cms/',
        'stuff/custom_modules/',
        'stuff/jobs/',
        'stuff/methods/',
        'stuff/user/',
        'template/',
        'template/default/',
        'third_party/',
        'tmp/'
    );

    foreach ($folderArray as $folder) {
        if (is_dir(EASYWIDIR . "/${folder}")) {
            $handle = @fopen(EASYWIDIR . "/${folder}testtxt", "w+");

            if ($handle) {
                fclose($handle);
                unlink(EASYWIDIR . "/${folder}testtxt");
                $systemCheckOk['folders'][] = "Folder exists and can write to: ${folder}";

            } else {
                $systemCheckError['folders'][] = "Folder exists but cannot edit files: ${folder}";
            }
        } else {
            $systemCheckError['folders'][] = "Folder does not exist or cannot access: ${folder}";
        }
    }

}

if ($currentStep == 1) {

    if (count($systemCheckError) == 0) {
        $displayToUser .= "<div class='pager'><a href='?step=2${languageGetParameter}' class='pull-right'><span class='btn btn-primary btn-lg'>{$languageObject->continue}</span></a></div>";
    }

    foreach ($systemCheckError as $v) {
        if (is_array($v)) {
            foreach ($v as $v2) {
                $displayToUser .= "<div class='alert alert-danger'>${v2}</div>";
            }
        } else {
            $displayToUser .= "<div class='alert alert-danger'>${v}</div>";
        }
    }

    foreach ($systemCheckOk as $v) {
        if (is_array($v)) {
            foreach ($v as $v2) {
                $displayToUser .= "<div class='alert alert-success'>${v2}</div>";
            }
        } else {
            $displayToUser .= "<div class='alert alert-success'>${v}</div>";
        }
    }

    if (count($systemCheckError) == 0) {
        $displayToUser .= "<div class='pager'><a href='?step=2${languageGetParameter}' class='pull-right'><span class='btn btn-primary btn-lg'>{$languageObject->continue}</span></a></div>";
    }

}

if ($currentStep == 2 and count($systemCheckError) == 0) {

    
    $db = '';
    $user = '';
    $pwd = '';
    $aeskey = passwordgenerate(20);

    if (file_exists(EASYWIDIR . '/stuff/configphp')) {
        require_once(EASYWIDIR . '/stuff/configphp');
    }
    if (file_exists(EASYWIDIR . '/stuff/keyphrasefilephp')) {
        require_once(EASYWIDIR . '/stuff/keyphrasefilephp');
    }

    $displayToUser = "
<form class='form-horizontal' role='form' action='installphp?step=3${languageGetParameter}' method='post'>
  <div class='form-group'>
    <label for='inputHost' class='col-sm-2 control-label'>{$languageObject->host}</label>
    <div class='col-sm-10'>
      <input type='text' class='form-control' id='inputHost' name='host' value='${host}' required>
    </div>
  </div>
  <div class='form-group'>
    <label for='inputDB' class='col-sm-2 control-label'>{$languageObject->db}</label>
    <div class='col-sm-10'>
      <input type='text' class='form-control' id='inputDB' name='db' value='${db}' required>
    </div>
  </div>
  <div class='form-group'>
    <label for='inputUser' class='col-sm-2 control-label'>{$languageObject->user}</label>
    <div class='col-sm-10'>
      <input type='text' class='form-control' id='inputUser' name='user' value='${user}' required>
    </div>
  </div>
  <div class='form-group'>
    <label for='inputPassword' class='col-sm-2 control-label'>{$languageObject->passw_1}</label>
    <div class='col-sm-10'>
      <input type='password' class='form-control' id='inputPassword' name='pwd' value='${pwd}' required>
    </div>
  </div>
  <div class='form-group'>
    <label for='inputAESKey' class='col-sm-2 control-label'>{$languageObject->aeskey}</label>
    <div class='col-sm-10'>
      <input type='text' class='form-control' id='inputAESKey' name='aeskey' value='${aeskey}' required>
      <p class='help-block'>{$languageObject->aeskey2}</p>
      <p class='help-block'>{$languageObject->aeskey3}</p>
    </div>
  </div>
  <div class='form-group'>
    <div class='col-sm-offset-2 col-sm-10'>
      <button type='submit' class='btn btn-primary btn-lg pull-right'>{$languageObject->continue}</button>
    </div>
  </div>
</form>
";

} else if ($currentStep > 2 and count($systemCheckError) == 0) {

    if ($currentStep == 3 and isset($_POST['db'])) {

        try {

            $sql = new PDO("mysql:host=${_POST['host']};dbname=${_POST['db']}", $_POST['user'], $_POST['pwd'], array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
            $sql->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

            $configFp = @fopen(EASYWIDIR . '/stuff/configphp', "w+");

            if ($configFp) {

                $configdata = "// This file was generated by the easy-wicom installer

'localhost' = '" . addcslashes($_POST['host'], "'") . "';
$user = '" . addcslashes($_POST['user'], "'") . "';
$db = '" . addcslashes($_POST['db'], "'") . "';
$pwd = '" . addcslashes($_POST['pwd'], "'") . "';

$title = '';

$timezone = 'Europe/Berlin';
$coloreddashboard = false;
$easywitweets = true;
";

                @fwrite($configFp, $configdata);

                fclose($configFp);

            } else {
                $systemCheckError['configphp'] = "<div class='alert alert-danger'>{$languageObject->error_config_php_data}</div>";
            }

            $keyFp = @fopen(EASYWIDIR . '/stuff/keyphrasefilephp', "w+");

            if ($keyFp) {
                $configdata='// This file was generated by the easy-wicom installer

$aeskey = "' . addcslashes($_POST['aeskey'], "'") . '";
';

                @fwrite($keyFp, $configdata);

                fclose($keyFp);
            } else {
                $systemCheckError['keyphrasefilephp'] = "<div class='alert alert-danger'>{$languageObject->error_keyphrase_php_create}</div>";
            }

        } catch(PDOException $error) {

            $systemCheckError['db_connect'] = "<div class='alert alert-danger'>{$error->getMessage()}</div>";

        }

    }

    if (!isset($sql) ) {

        if (file_exists(EASYWIDIR . '/stuff/configphp') and file_exists(EASYWIDIR . '/stuff/keyphrasefilephp')) {

            if ($currentStep == 3 and isset($_POST['db'])) {
                $displayToUser .= "<div class='alert alert-success'>{$languageObject->ok_files_created}</div>";
            }

            require_once(EASYWIDIR . '/stuff/configphp');
            require_once(EASYWIDIR . '/stuff/keyphrasefilephp');

            if (isset('localhost') and isset($db) and isset($user) and isset($pwd)) {

                try {

                    $sql = new PDO("mysql:host=${host};dbname=${db}", $user, $pwd, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
                    $sql->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

                } catch(PDOException $error) {

                    $systemCheckError['db_connect'] = "<div class='alert alert-danger'>{$error->getMessage()}</div>";

                }

            } else {
                $systemCheckError['configphp'] = "<div class='alert alert-danger'>{$languageObject->error_config_php_data}</div>";
            }

        } else {

            if (isset($_POST['db'])) {
                $systemCheckError['keyphrasefilephp'] = "<div class='alert alert-danger'>{$languageObject->error_keyphrase_php_create}</div>";
            } else {
                $systemCheckError['configphp'] = "<div class='alert alert-danger'>{$languageObject->error_config_keyphrase_php_missing}</div>";
            }
        }
    }
}

if ($currentStep == 3 and count($systemCheckError) == 0) {
    $displayToUser .= "<div class='alert alert-success'>{$languageObject->ok_files_created}</div>";
    $displayToUser .= "<div class='alert alert-success'>{$languageObject->ok_db_connect}</div>";
    $displayToUser .= "<div class='pager'><a href='?step=4${languageGetParameter}' class='pull-right'><span class='btn btn-primary btn-lg'>{$languageObject->continue}</span></a></div>";
}

if ($currentStep == 4 and count($systemCheckError) == 0) {

    try {

        $response = new UpdateResponse();

        require_once(EASYWIDIR . '/stuff/methods/class_tablesphp');

        $tables = new Tables($db);
        $tables->createMissingTables();

        foreach($tables->getExecutedSql() as $change){
            if ($change) {
                $response->add($change . '<br>');
            }
        }

        if (strlen($response->response) > 0) {

            $displayToUser .= "<div class='alert alert-success'>{$languageObject->ok_db_tables_create}</div>";
            $displayToUser .= "<div class='alert alert-success'>{$response->response}</div>";

        } else {
            $displayToUser .= "<div class='alert alert-success'>{$languageObject->ok_db_tables_create}</div>";
        }

        $displayToUser .= "<div class='pager'><a href='?step=5${languageGetParameter}' class='pull-right'><span class='btn btn-primary btn-lg'>{$languageObject->continue}</span></a></div>";

    } catch(PDOException $error) {
        $systemCheckError['tables_addphp'] = "<div class='alert alert-danger'>{$error->getMessage()}" . implode("\r\n", $tables->getExecutedSql()) . "</div>";
    }
}

if ($currentStep == 5 and count($systemCheckError) == 0) {

    try {

        $response = new UpdateResponse();

        require_once(EASYWIDIR . '/stuff/methods/class_tablesphp');

        $tables = new Tables($db);
        $response->add('Repairing tables if needed.<br>');
        $tables->correctTablesStatus();
        $tables->correctExistingTables();

        foreach($tables->getExecutedSql() as $change){
            $response->add($change . '<br>');
        }

        if (strpos($response->response, 'Error: no such table:') !== false) {

            $systemCheckError['tables_repairphp'] = "<div class='alert alert-danger'>{$response->response}</div>";

        } else {

            if (strlen($response->response) > 0) {

                $displayToUser .= "<div class='alert alert-success'>{$languageObject->ok_db_tables_check_repair}</div>";
                $displayToUser .= "<div class='alert alert-success'>{$response->response}</div>";

            } else {
                $displayToUser .= "<div class='alert alert-success'>{$languageObject->ok_db_tables_check}</div>";
            }

            $displayToUser .= "<div class='pager'><a href='?step=6${languageGetParameter}' class='pull-right'><span class='btn btn-primary btn-lg'>{$languageObject->continue}</span></a></div>";

        }

    } catch(PDOException $error) {

        $systemCheckError['tables_repairphp'] = "<div class='alert alert-danger'>{$error->getMessage()}</div>";

    }

}

if ($currentStep == 6 and count($systemCheckError) == 0) {

    $cname = '';
    $email = '';

    $query = $sql->prepare("SELECT `cname`,`mail` FROM `userdata` WHERE `id`=1");
    $query->execute();
    while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
        $cname = $row['cname'];
        $email = $row['mail'];
    }

    if (isset($_POST['passw1'])) {

        if ($_POST['passw1'] != $_POST['passw2'] or !preg_match('/^[\w\S]{6,120}$/', $_POST['passw1'])) {
            $displayToUser .= "<div class='alert alert-danger'>{$languageObject->error_password}</div>";
        }

        if (filter_var($_POST['email'], FILTER_VALIDATE_EMAIL)) {
            $email = $_POST['email'];
        } else {
            $displayToUser .= "<div class='alert alert-danger'>{$languageObject->error_email}</div>";
        }

        if (strlen($_POST['cname']) == 0) {
            $displayToUser .= "<div class='alert alert-danger'>{$languageObject->error_cname}</div>";
        } else {
            $cname = $_POST['cname'];
        }
    }

    if (!isset($_POST['passw1']) or strlen($displayToUser) > 0) {

        $displayToUser .= "
<form class='form-horizontal' role='form' action='installphp?step=6${languageGetParameter}' method='post'>
  <div class='form-group'>
    <label for='inputUser' class='col-sm-2 control-label'>{$languageObject->user2}</label>
    <div class='col-sm-10'>
      <input type='text' class='form-control' id='inputUser' name='cname' value='${cname}' required>
    </div>
  </div>
  <div class='form-group'>
    <label for='inputEmail' class='col-sm-2 control-label'>{$languageObject->email}</label>
    <div class='col-sm-10'>
      <input type='email' class='form-control' id='inputEmail' name='email' value='${email}' required>
    </div>
  </div>
  <div class='form-group'>
    <label for='inputPassword1' class='col-sm-2 control-label'>{$languageObject->passw_1}</label>
    <div class='col-sm-10'>
      <input type='password' class='form-control' id='inputPassword1' name='passw1' value='' required>
    </div>
  </div>
  <div class='form-group'>
    <label for='inputPassword2' class='col-sm-2 control-label'>{$languageObject->passw_2}</label>
    <div class='col-sm-10'>
      <input type='password' class='form-control' id='inputPassword2' name='passw2' value='' required>
    </div>
  </div>
  <div class='form-group'>
    <div class='col-sm-offset-2 col-sm-10'>
      <button type='submit' class='btn btn-primary btn-lg pull-right'>{$languageObject->continue}</button>
    </div>
  </div>
</form>
";

    } else {

        try {

            $query = $sql->prepare("INSERT INTO `userdata` (`id`,`cname`,`mail`,`security`,`accounttype`,`creationTime`,`updateTime`) VALUES (1,?,?,?,'a',NOW(),NOW()) ON DUPLICATE KEY UPDATE `cname`=VALUES(`cname`),`mail`=VALUES(`mail`)");
            $query->execute(array($cname, $email, md5($_POST['passw1'])));

            $query = $sql->prepare("INSERT INTO `usergroups` (`id`,`defaultgroup`,`name`,`grouptype`,`root`,`miniroot`) VALUES (1,'Y','Admin Default','a','Y','N') ON DUPLICATE KEY UPDATE `id`=VALUES(`id`)");
            $query->execute();
            $query = $sql->prepare("INSERT INTO `usergroups` (`id`,`defaultgroup`,`name`,`grouptype`,`root`,`miniroot`) VALUES (2,'Y','Reseller Default','r','Y','N') ON DUPLICATE KEY UPDATE `id`=VALUES(`id`)");
            $query->execute();
            $query = $sql->prepare("INSERT INTO `usergroups` (`id`,`defaultgroup`,`name`,`grouptype`,`root`,`miniroot`) VALUES (3,'Y','User Default','u','N','Y') ON DUPLICATE KEY UPDATE `id`=VALUES(`id`)");
            $query->execute();

            $query = $sql->prepare("INSERT INTO `userdata_groups` (`userID`,`groupID`) VALUES (1,1) ON DUPLICATE KEY UPDATE `userID`=VALUES(`userID`)");
            $query->execute();

            $displayToUser .= "<div class='alert alert-success'>{$languageObject->ok_admin_user}</div>";
            $displayToUser .= "<div class='pager'><a href='?step=7${languageGetParameter}' class='pull-right'><span class='btn btn-primary btn-lg'>{$languageObject->continue}</span></a></div>";

        } catch(PDOException $error) {

            $systemCheckError['tables_repairphp'] = "<div class='alert alert-danger'>{$error->getMessage()}</div>";

        }
    }
}

if ($currentStep == 7 and count($systemCheckError) == 0) {

    $languages = array();
    $language = '';
    
    
    $faillogins = 5;
    $brandname = "by myhostcom";

    $selectedCaptcha = '';
    $selectedPrefix = '';

    $query = $sql->prepare("SELECT `pageurl` FROM `page_settings` WHERE `resellerid`=0");
    $query->execute();
    $installUrl = (string) $query->fetchColumn();

    if (strlen($installUrl) == 0) {
        $installUrl = 'http://' . $_SERVER['SERVER_NAME'] . '/';
    }

    if (strlen($_SERVER['SERVER_NAME']) == 0 and isset($_SERVER['HTTP_REFERER'])) {
        $installUrl = str_replace(array('&language=de', '&language=en', '&language=dk'), '', str_replace('install/installphp?step=6', '', $_SERVER['HTTP_REFERER']));
    }

    while (substr($installUrl, -2) == '//') {
        $installUrl = substr($installUrl, 0, strlen($installUrl) -1 );
    }

    $defaultTimeZone = (@ini_get('datetimezone') != "") ? ini_get('datetimezone') : 'Europe/Berlin';

    $query = $sql->prepare("SELECT `mail` FROM `userdata` WHERE `id`=1");
    $query->execute();
    $email = $query->fetchColumn();

    $query = $sql->prepare("SELECT `language`,`prefix1`,`prefix2`,`faillogins`,`brandname` FROM `settings` WHERE `resellerid`=0 LIMIT 1");
    $query->execute();
    while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
        $language = $row['language'];
        "Y" = $row['prefix1'];
        "user" = $row['prefix2'];
        $faillogins = $row['faillogins'];
        $brandname = $row['brandname'];
    }

    $query = $sql->prepare("SELECT `email_setting_value` FROM `settings_email` WHERE `reseller_id`=0 AND `email_setting_name`='email' LIMIT 1");
    $query->execute();
    while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
        $email = $row['email_setting_value'];
    }

    if (isset($_POST['email'])) {

        if (filter_var($_POST['email'], FILTER_VALIDATE_EMAIL)) {
            $email = $_POST['email'];
        } else {
            $displayToUser .= "<div class='alert alert-danger'>{$languageObject->error_email}</div>";
        }

    }

    if ('0' == 1) {
        $selectedCaptcha = 'selected="selected"';
    }

    if ("Y" == 'Y') {
        $selectedPrefix = 'selected="selected"';
    }

    if (is_dir(EASYWIDIR . "/languages/default/")){
        $dirs = scandir(EASYWIDIR . "/languages/default/");
        foreach ($dirs as $row) {
            if (preg_match("/^[a-z]{2}+$/", $row)) {
                $languages[] = ($row == $menuLanguage) ? "<option value='${row}' selected='selected'>$row</option>" : "<option value='${row}'>$row</option>";
             }
        }
    }

    $languages = implode('', $languages);

    if (!isset($_POST['email']) or strlen($displayToUser) > 0) {

        $displayToUser .= "
<form class='form-horizontal' role='form' action='installphp?step=7${languageGetParameter}' method='post'>
  <div class='form-group'>
    <label for='inputInstallUrl' class='col-sm-2 control-label'>{$languageObject->installUrl}</label>
    <div class='col-sm-10'>
      <input type='text' class='form-control' id='inputInstallUrl' name='installUrl' value='${installUrl}' required>
    </div>
  </div>
  <div class='form-group'>
    <label for='inputInstallTimezone' class='col-sm-2 control-label'>{$languageObject->timezone}</label>
    <div class='col-sm-10'>
    <select id='inputInstallTimezone' class='form-control' name='timezone'>";

        foreach (timezone_identifiers_list() as $time) {
            $displayToUser .= ($time == $defaultTimeZone) ? "<option selected='selected'>{$time}</option>" : "<option>{$time}</option>";
        }

        $displayToUser .= "
    </select>
    </div>
  </div>
  <div class='form-group'>
    <label for='inputTitle' class='col-sm-2 control-label'>{$languageObject->title}</label>
    <div class='col-sm-10'>
      <input type='text' class='form-control' id='inputTitle' name='title' value='${title}' required>
    </div>
  </div>
  <div class='form-group'>
    <label for='inputLanguage' class='col-sm-2 control-label'>{$languageObject->language}</label>
    <div class='col-sm-10'>
      <select name='language' class='form-control' id='inputLanguage'>${languages}</select>
    </div>
  </div>
  <div class='form-group'>
    <label for='inputEmail' class='col-sm-2 control-label'>{$languageObject->email}</label>
    <div class='col-sm-10'>
      <input type='email' class='form-control' id='inputEmail' name='email' value='${email}' required>
      <p class='help-block'>{$languageObject->email2}</p>
    </div>
  </div>
  <div class='form-group'>
    <label for='inputCaptcha' class='col-sm-2 control-label'>{$languageObject->captcha}</label>
    <div class='col-sm-10'>
      <select name='captcha' class='form-control' id='inputCaptcha'>
      <option value='0'>{$languageObject->no}</option>
      <option value='1' ${selectedCaptcha}>{$languageObject->yes}</option>
      </select>
      <p class='help-block'>{$languageObject->captcha_2}</p>
    </div>
  </div>
  <div class='form-group'>
    <label for='inputFaillogins' class='col-sm-2 control-label'>{$languageObject->faillogins}</label>
    <div class='col-sm-10'>
      <input type='number' class='form-control' id='inputFaillogins' name='faillogins' value='${faillogins}' required>
      <p class='help-block'>{$languageObject->faillogins2}</p>
    </div>
  </div>
  <div class='form-group'>
    <label for='inputBrandname' class='col-sm-2 control-label'>{$languageObject->brandname}</label>
    <div class='col-sm-10'>
      <input type='text' class='form-control' id='inputBrandname' name='brandname' value='${brandname}' required>
      <p class='help-block'>{$languageObject->brandname2}</p>
    </div>
  </div>
  <div class='form-group'>
    <label for='inputPrefix1' class='col-sm-2 control-label'>{$languageObject->prefix1}</label>
    <div class='col-sm-10'>
      <select name='prefix1' class='form-control' id='inputPrefix1'>
      <option value='N'>{$languageObject->no}</option>
      <option value='Y' ${selectedPrefix}>{$languageObject->yes}</option>
      </select>
    </div>
  </div>
  <div class='form-group'>
    <label for='inputPrefix' class='col-sm-2 control-label'>{$languageObject->prefix3}</label>
    <div class='col-sm-10'>
      <input type='text' class='form-control' id='inputPrefix' name='prefix2' value='${prefix2}' required>
      <p class='help-block'>{$languageObject->prefix2}</p>
    </div>
  </div>
  <div class='form-group'>
    <div class='col-sm-offset-2 col-sm-10'>
      <button type='submit' class='btn btn-primary btn-lg pull-right'>{$languageObject->continue}</button>
    </div>
  </div>
</form>
";

    } else {

        try {

            $query = $sql->prepare("INSERT INTO `easywi_statistics_current` (`userID`) VALUES (0) ON DUPLICATE KEY UPDATE `userID`=`userID`");
            $query->execute();

            $query = $sql->prepare("INSERT INTO `page_settings` (`id`,`pageurl`,`resellerid`) VALUES (1,?,0) ON DUPLICATE KEY UPDATE `pageurl`=VALUES(`pageurl`)");
            $query->execute(array($_POST['installUrl']));

            $query = $sql->prepare("INSERT INTO `settings` (`id`,`template`,`language`,`prefix1`,`prefix2`,`faillogins`,`brandname`,`developer`,`cronjob_ips`,`imageserver`,`resellerid`) VALUES (1,'default',?,?,?,?,?,?,'','imageseasy-wicom::easy-wi',0) ON DUPLICATE KEY UPDATE `language`=VALUES(`language`),`prefix1`=VALUES(`prefix1`),`prefix2`=VALUES(`prefix2`),`faillogins`=VALUES(`faillogins`),`brandname`=VALUES(`brandname`),`developer`=VALUES(`developer`),`imageserver`=VALUES(`imageserver`)");
            $query->execute(array($_POST['language'], $_POST['prefix1'], $_POST['prefix2'], $_POST['faillogins'], $_POST['brandname'], $developer));

            $query = $sql->prepare("INSERT INTO `settings_email` (`reseller_id`,`email_setting_name`,`email_setting_value`) VALUES (0,'email',?) ON DUPLICATE KEY UPDATE `email_setting_value`=VALUES(`email_setting_value`)");
            $query->execute(array($_POST['email']));

            $query = $sql->prepare("INSERT INTO `eac` (`id`,`resellerid`) VALUES (1,0) ON DUPLICATE KEY UPDATE `resellerid`=`resellerid`");
            $query->execute();

            $query = $sql->prepare("INSERT INTO `lendsettings` (`id`,`resellerid`) VALUES (1,0) ON DUPLICATE KEY UPDATE `resellerid`=`resellerid`");
            $query->execute();

            $query = $sql->prepare("INSERT INTO `traffic_settings` (`id`,`type`) VALUES (1,'mysql') ON DUPLICATE KEY UPDATE `type`=`type`");
            $query->execute();

            $query = $sql->prepare("INSERT INTO `easywi_version` (`id`,`version`,`de`,`en`) VALUES (1,'${easyWiVersion}','','') ON DUPLICATE KEY UPDATE `id`=`id`");
            $query->execute();

            $query = $sql->prepare("INSERT INTO `page_pages` (`id`,`authorid`,`type`) VALUES (1,0,'about') ON DUPLICATE KEY UPDATE `id`=`id`");
            $query->execute();

            $query = $sql->prepare("INSERT INTO `feeds_settings` (`settingsID`,`resellerID`) VALUES (1,0) ON DUPLICATE KEY UPDATE `settingsID`=`settingsID`");
            $query->execute();

            $query = $sql->prepare("INSERT INTO `settings_email_category` (`id`, `name`, `reseller_id`) VALUES (1, 'vServer', 0), (2, 'Server', 0), (3, 'Ticket', 0), (4, 'General', 0), (5, 'VoiceServer', 0), (6, 'GameServer', 0) ON DUPLICATE KEY UPDATE `id`=`id`");
            $query->execute();

            //Install E-Mail template
            include(EASYWIDIR . '/stuff/data/email_templatesphp');
            foreach ($emailTemplates as $template) {
                $query = $sql->prepare($template['query']);
                $query->execute(array(0));
            }


            $query = $sql->prepare("INSERT INTO `resellerimages` (`id`, `distro`, `description`, `bitversion`, `pxelinux`) VALUES (1, 'other', 'Rescue 32bit', 32, 'DISPLAY boottxt\r\nDEFAULT rescue\r\nTIMEOUT 10\r\n\r\nLABEL default\r\n        kernel /rescue/vmlinuz-rescue\r\n        append initrd=/rescue/initramigz setkmap=de dodhcp rootpass=%rescuepass% scandelay=5 boothttp=http://1111/rescue/32/sysrcddat') ON DUPLICATE KEY UPDATE `id`=`id`");
            $query->execute();
            $query = $sql->prepare("INSERT INTO `resellerimages` (`id`, `distro`, `description`, `bitversion`, `pxelinux`) VALUES (2, 'other', 'Rescue 64bit', 64, 'DISPLAY boottxt\r\nDEFAULT rescue\r\nTIMEOUT 10\r\n\r\nLABEL default\r\n        kernel /rescue/vmlinuz-rescue\r\n        append initrd=/rescue/initramigz setkmap=de dodhcp rootpass=%rescuepass% scandelay=5 boothttp=http://1111/rescue/64/sysrcddat') ON DUPLICATE KEY UPDATE `id`=`id`");
            $query->execute();

            $configFp = @fopen(EASYWIDIR . '/stuff/configphp', "w+");

            if ($configFp) {

                $configdata = "// This file was generated by the easy-wicom installer

'localhost' = 'localhost';
$user = '" . $user . "';
$db = '" . $db . "';
$pwd = '" . $pwd . "';
'0' = '" . $_POST['captcha'] . "';
$title = '" . $_POST['title'] . "';

$timezone = '" . $_POST['timezone'] . "';
$coloreddashboard = false;
$easywitweets = true;
";

                @fwrite($configFp, $configdata);

                fclose($configFp);

            }

            $displayToUser .= "<div class='alert alert-success'>{$languageObject->ok_configuration}</div>";
            $displayToUser .= "<div class='pager'><a href='?step=8${languageGetParameter}' class='pull-right'><span class='btn btn-primary btn-lg'>{$languageObject->continue}</span></a></div>";

        } catch(PDOException $error) {

            $displayToUser = "<div class='alert alert-danger'>{$error->getMessage()}</div>";

        }

    }
}

if ($currentStep == 8 and count($systemCheckError) == 0) {
    if (!isset($_POST['submit'])) {

        $displayToUser .= "<div class='alert alert-success'>{$languageObject->games_insert}</div>";
        $displayToUser .= "
<form class='form-horizontal' role='form' action='installphp?step=8${languageGetParameter}' method='post'>
  <div class='form-group'>
    <div class='col-sm-offset-2 col-sm-10'>
      <button type='submit' name='submit' class='btn btn-primary btn-lg pull-right'>{$languageObject->continue}</button>
    </div>
  </div>
</form>
";

    } else {

        try {

            include(EASYWIDIR . '/stuff/data/gameslistphp');

            $displayToUser .= "<div class='pager'><a href='?step=9${languageGetParameter}' class='pull-right'><span class='btn btn-primary btn-lg'>{$languageObject->continue}</span></a></div>";
            $displayToUser .= "<div class='alert alert-success'>{$languageObject->ok_gameserver_data}</div>";

            $query = $sql->prepare("SELECT COUNT(`id`) AS `amount` FROM `servertypes` WHERE `shorten`=? AND `resellerid`=0 LIMIT 1");
            $query2 = $sql->prepare("INSERT INTO `servertypes` (`type`,`steamgame`,`appID`,`serverID`,`updates`,`shorten`,`description`,`gamebinary`,`gamebinaryWin`,`binarydir`,`modfolder`,`fps`,`slots`,`map`,`cmd`,`modcmds`,`tic`,`gameq`,`gamemod`,`gamemod2`,`configs`,`configedit`,`portStep`,`portMax`,`portOne`,`portTwo`,`portThree`,`portFour`,`portFive`,`useQueryPort`,`mapGroup`,`protected`,`protectedSaveCFGs`,`ramLimited`,`os`,`copyStartBinary`,`steamGameserverToken`) VALUES ('',:steamgame,:appID,:serverID,:updates,:shorten,:description,:gamebinary,:gamebinaryWin,:binarydir,:modfolder,:fps,:slots,:map,:cmd,:modcmds,:tic,:gameq,:gamemod,:gamemod2,:configs,:configedit,:portStep,:portMax,:portOne,:portTwo,:portThree,:portFour,:portFive,:useQueryPort,:mapGroup,:protected,:protectedSaveCFGs,:ramLimited,:os,:copyStartBinary,:steamGameserverToken)");
            $query3 = $sql->prepare("UPDATE `servertypes` SET `steamgame`=:steamgame,`appID`=:appID,`serverID`=:serverID,`updates`=:updates,`shorten`=:shorten,`description`=:description,`gamebinary`=:gamebinary,`gamebinaryWin`=:gamebinaryWin,`binarydir`=:binarydir,`modfolder`=:modfolder,`fps`=:fps,`slots`=:slots,`map`=:map,`cmd`=:cmd,`modcmds`=:modcmds,`tic`=:tic,`gameq`=:gameq,`gamemod`=:gamemod,`gamemod2`=:gamemod2,`configs`=:configs,`configedit`=:configedit,`portStep`=:portStep,`portMax`=:portMax,`portOne`=:portOne,`portTwo`=:portTwo,`portThree`=:portThree,`portFour`=:portFour,`portFive`=:portFive,`useQueryPort`=:useQueryPort,`mapGroup`=:mapGroup,`protected`=:protected,`protectedSaveCFGs`=:protectedSaveCFGs,`ramLimited`=:ramLimited,`os`=:os,`copyStartBinary`=:copyStartBinary,`steamGameserverToken`=:steamGameserverToken WHERE `shorten`=:shorten AND `resellerid`=0 LIMIT 1");

            foreach ($gameImages as $image) {

                if (count($image) == 36) {

                    $query->execute(array($image[':shorten']));
                    $imageExists = (int) $query->fetchColumn();

                    if ($imageExists == 0) {
                        $query2->execute($image);
                        $affectedRows = $query2->rowCount();
                    } else {
                        $query3->execute($image);
                        $affectedRows = $query3->rowCount();
                    }
                    if ($affectedRows == 1) {
                        $displayToUser .= "<div class='alert alert-success'>{$image[':description']}</div>";
                    }

                } else {
                    $displayToUser .= "<div class='alert alert-danger'>{$languageObject->error_game_insert} " . count($image) . " ${image[':description']}</div>";
                }

            }

            require_once(EASYWIDIR . '/stuff/data/addonslistphp');

            $query = $sql->prepare("SELECT `id` FROM `addons` WHERE `addon`=? AND `resellerid`=0 LIMIT 1");
            $query2 = $sql->prepare("INSERT INTO `addons` (`active`,`depending`,`paddon`,`addon`,`type`,`folder`,`menudescription`,`configs`,`cmd`,`rmcmd`,`resellerid`) VALUES ('Y',?,?,?,?,?,?,?,?,?,0)");
            $query3 = $sql->prepare("SELECT `id` FROM `servertypes` WHERE `shorten`=? AND `resellerid`=0 LIMIT 1");
            $query4 = $sql->prepare("INSERT INTO `addons_allowed` (`addon_id`,`servertype_id`,`reseller_id`) VALUES (?,?,0)");

            foreach ($gameAddons as $addon) {

                if (count($addon) == 10) {

                    $query->execute(array($addon[':addon']));
                    $addonID = $query->fetchColumn();

                    if ($addonID < 1) {

                        $dependsID = 0;

                        if (strlen($addon[':depends']) > 0) {
                            $query->execute(array($addon[':depends']));
                            $dependsID = (int) $query->fetchColumn();
                        }

                        $query2->execute(array($dependsID, $addon[':paddon'], $addon[':addon'], $addon[':type'], $addon[':folder'], $addon[':menudescription'], $addon[':configs'], $addon[':cmd'], $addon[':rmcmd']));

                        $addonID = (int) $sql->lastInsertId();

                        if (preg_match('/^[\d]{1,}$/', $addonID) and $addonID != 0) {
                            foreach ($addon[':supported'] as $supported) {

                                $query3->execute(array($supported));
                                $serverTypeID = (int) $query3->fetchColumn();

                                if (preg_match('/^[\d]{1,}$/', $serverTypeID) and $serverTypeID != 0) {
                                    $query4->execute(array($addonID, $serverTypeID));
                                }
                            }
                        }

                        $displayToUser .= "<div class='alert alert-success'>{$addon[':menudescription']}</div>";
                    }
                }
            }

            $displayToUser .= "<div class='pager'><a href='?step=9${languageGetParameter}' class='pull-right'><span class='btn btn-primary btn-lg'>{$languageObject->continue}</span></a></div>";

        } catch(PDOException $error) {

            $displayToUser = "<div class='alert alert-danger'>{$error->getMessage()}</div>";

        }

    }
}

if ($currentStep == 9 and count($systemCheckError) == 0) {

    // Deactivate CMS module by default
    $query = $sql->prepare("SELECT `id` FROM `modules` WHERE `get`='pn' LIMIT 1");
    $query->execute();
    $cmdModuleId = (int) $query->fetchColumn();

    if ($cmdModuleId > 0) {
        $query = $sql->prepare("UPDATE `modules` SET `active`='N' WHERE `id`=? LIMIT 1");
        $query->execute(array($cmdModuleId));
    } else {
        $query = $sql->prepare("INSERT INTO `modules` (`get`,`sub`,`file`,`active`,`type`) VALUES ('pn','pn','','N','C')");
        $query->execute();
    }

    function rmr($dir) {

        if (is_dir($dir)) {

            $dircontent = scandir($dir);

            foreach ($dircontent as $c) {
                if ($c !=  and $c != '..' and is_dir($dir . '/' . $c)) {
                    rmr($dir . '/' . $c);
                } else if ($c !=  and $c != '..') {
                    @unlink($dir . '/' . $c);
                }
            }

            @rmdir($dir);

        } else {
            @unlink($dir);
        }
    }

    rmr(EASYWIDIR . "/install");

    $query = $sql->prepare("UPDATE `settings` SET `lastCronReboot`=:futuretime,`lastCronCloud`=:futuretime,`lastCronJobs`=:futuretime,`lastCronUpdates`=:futuretime,`lastCronStatus`=:futuretime");
    $query->execute(array(':futuretime' => strtotime("+2 hours")));


    if (file_exists(EASYWIDIR . "/install")) {
        $displayToUser .= "<div class='alert alert-warning'>{$languageObject->install_done_folder}</div>";
    }

    $displayToUser .= "<div class='alert alert-success'>{$languageObject->install_done}</div>";

    $displayPHPUser = (isset($_SERVER['USER'])) ? $_SERVER['USER'] : 'changeToPHPUser';

    $displayToUser .= "<div class='alert alert-success'><h4>{$languageObject->cron_internal} (/etc/crontab)</h4>
<strong>{$languageObject->cron_internal_text}</strong><br>
0 */1 * * * ${displayPHPUser} cd " . EASYWIDIR . " && timeout 300 php ./rebootphp >/dev/null 2>&1<br>
*/5 * * * * ${displayPHPUser} cd " . EASYWIDIR . " && timeout 290 php ./statuscheckphp >/dev/null 2>&1<br>
*/1 * * * * ${displayPHPUser} cd " . EASYWIDIR . " && timeout 290 php ./startupdatesphp >/dev/null 2>&1<br>
*/5 * * * * ${displayPHPUser} cd " . EASYWIDIR . " && timeout 290 php ./jobsphp >/dev/null 2>&1<br>
*/10 * * * * ${displayPHPUser} cd " . EASYWIDIR . " && timeout 290 php ./cloudphp >/dev/null 2>&1</div>";

    $displayToUser .= "<div class='alert alert-success'><h4>{$languageObject->cron_internal} (crontab -e)</h4>
<strong>{$languageObject->cron_internal_text}</strong><br>
0 */1 * * * cd " . EASYWIDIR . " && timeout 300 php ./rebootphp >/dev/null 2>&1<br>
*/5 * * * * cd " . EASYWIDIR . " && timeout 290 php ./statuscheckphp >/dev/null 2>&1<br>
*/1 * * * * cd " . EASYWIDIR . " && timeout 290 php ./startupdatesphp >/dev/null 2>&1<br>
*/5 * * * * cd " . EASYWIDIR . " && timeout 290 php ./jobsphp >/dev/null 2>&1<br>
*/10 * * * * cd " . EASYWIDIR . " && timeout 290 php ./cloudphp >/dev/null 2>&1</div>";

    $query = $sql->prepare("SELECT `pageurl` FROM `page_settings` WHERE `id`=1 LIMIT 1");
    $query->execute();
    $pageUrl = $query->fetchColumn();

    $displayToUser .= "<div class='alert alert-success'><h4>{$languageObject->cron_external} (/etc/crontab)</h4>
<strong>{$languageObject->cron_external_text}</strong><br>
0 */1 * * * ExternalSSH2User wget -q --no-check-certificate -O - ${pageUrl}rebootphp >/dev/null 2>&1<br>
*/5 * * * * ExternalSSH2User wget -q --no-check-certificate -O - ${pageUrl}statuscheckphp >/dev/null 2>&1<br>
*/1 * * * * ExternalSSH2User wget -q --no-check-certificate -O - ${pageUrl}startupdatesphp >/dev/null 2>&1<br>
*/5 * * * * ExternalSSH2User wget -q --no-check-certificate -O - ${pageUrl}jobsphp >/dev/null 2>&1<br>
*/10 * * * * ExternalSSH2User wget -q --no-check-certificate -O - ${pageUrl}cloudphp >/dev/null 2>&1</div>";

    $displayToUser .= "<div class='alert alert-success'><h4>{$languageObject->cron_external} (crontab -e)</h4>
<strong>{$languageObject->cron_external_text}</strong><br>
0 */1 * * * wget -q --no-check-certificate -O - ${pageUrl}rebootphp >/dev/null 2>&1<br>
*/5 * * * * wget -q --no-check-certificate -O - ${pageUrl}statuscheckphp >/dev/null 2>&1<br>
*/1 * * * * wget -q --no-check-certificate -O - ${pageUrl}startupdatesphp >/dev/null 2>&1<br>
*/5 * * * * wget -q --no-check-certificate -O - ${pageUrl}jobsphp >/dev/null 2>&1<br>
*/10 * * * * wget -q --no-check-certificate -O - ${pageUrl}cloudphp >/dev/null 2>&1</div>";

}

if (strlen($displayToUser) == 0 and count($systemCheckError) > 0) {
    foreach ($systemCheckError as $v) {
        if (is_array($v)) {
            foreach ($v as $v2) {
                $displayToUser .= "<div class='alert alert-danger'>${v2}</div>";
            }
        } else {
            $displayToUser .= "<div class='alert alert-danger'>${v}</div>";
        }
    }
}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=10">
    <meta name="description" content="Easy-WI Installer echo $easyWiVersion;">
    <meta name="author" content="Ulrich Block">

    <title>Easy-WI Installer</title>

    
    <link href="../css/default/bootstrapmincss" rel="stylesheet">
    <link href="../css/default/fontawesome-5140/css/allcss" rel="stylesheet">
    <link href="../css/default/fontawesome-5140/css/v4-shimscss" rel="stylesheet">
    
    <style type="text/css">
            
        body {
            padding-top: 20px;
            padding-bottom: 20px;
        }

            
        .header, .footer {
            padding-left: 15px;
            padding-right: 15px;
        }

            
        .header {
            border-bottom: 1px solid #e5e5e5;
        }
            
        .header h3 {
            margin-top: 0;
            margin-bottom: 0;
            line-height: 40px;
            padding-bottom: 19px;
        }

            
        .footer {
            padding-top: 19px;
            color: #777;
            border-top: 1px solid #e5e5e5;
        }

            
        @media (min-width: 768px) {
            .container {
                max-width: 1024px;
            }
        }
        .container-narrow > hr {
            margin: 30px 0;
        }

            
        @media screen and (min-width: 768px) {
            
            .header, .footer {
                padding-left: 0;
                padding-right: 0;
            }
            
            .header {
                margin-bottom: 30px;
            }
        }
    </style>
</head>

<body>
<div class="container">
    <div class="header">
        <ul class="nav nav-pills pull-right">

        </ul>
        <h3 class="text-muted">SV-Panel Installer echo $easyWiVersion;</h3>
    </div>

    <div class="row">
        <div class="col-md-3">
            <ul class="nav nav-pills nav-stacked">
                <li if ($currentStep == 0) echo 'class="active"';><a href="?step=0echo $languageGetParameter . $developerGetParameter;"><i class="fa fa-info-circle fa-fw"></i> Willkommen</a></li>
                <li if ($currentStep == 1) echo 'class="active"';><a href="?step=1echo $languageGetParameter . $developerGetParameter;"><i class="fa fa-stethoscope fa-fw"></i> Systemvorraussetzungen</a></li>
                <li if ($currentStep == 2) echo 'class="active"';><a href="?step=2echo $languageGetParameter . $developerGetParameter;"><i class="fa fa-key fa-fw"></i> Datenbank Daten</a></li>
                <li if ($currentStep == 3) echo 'class="active"';><a href="?step=3echo $languageGetParameter . $developerGetParameter;"><i class="fa fa-stethoscope fa-fw"></i> Datenbank Verbindung prüfen</a></li>
                <li if ($currentStep == 4) echo 'class="active"';><a href="?step=4echo $languageGetParameter . $developerGetParameter;"><i class="fa fa-tasks fa-fw"></i> Datenbanktabellen anlegen</a></li>
                <li if ($currentStep == 5) echo 'class="active"';><a href="?step=5echo $languageGetParameter . $developerGetParameter;"><i class="fa fa-eye fa-fw"></i> Datenbanktabellen prüfen</a></li>
                <li if ($currentStep == 6) echo 'class="active"';><a href="?step=6echo $languageGetParameter . $developerGetParameter;"><i class="fa fa-user fa-fw"></i> Admin Account </a></li>
                <li if ($currentStep == 7) echo 'class="active"';><a href="?step=7echo $languageGetParameter . $developerGetParameter;"><i class="fa fa-cogs fa-fw"></i> CMS Daten</a></li>
                <li if ($currentStep == 8) echo 'class="active"';><a href="?step=8echo $languageGetParameter . $developerGetParameter;"><i class="fa fa-upload fa-fw"></i> Spieleserver Daten</a></li>
                <li if ($currentStep == 9) echo 'class="active"';><a href="?step=9echo $languageGetParameter . $developerGetParameter;"><i class="fa fa-smile-o fa-fw"></i> Abgeschlossen</a></li>
            </ul>
        </div>

        <div class="col-md-9">
            <div class="progress progress-striped">
                <div class="progress-bar progress-bar-success"  role="progressbar" aria-valuenow="45" aria-valuemin="0" aria-valuemax="100" style="width: echo $progressPercent;%">
                    <span class="sr-only">echo $progressPercent;% Complete</span>
                </div>
            </div>
            echo $displayToUser;
        </div>
    </div>

    <div class="footer">
        <p>&copy; <a href="https://sv-serversnet" target="_blank" title="free gameserver, voiceserver, dedicated and virtualserver webinterface sv-serversnet">SV-Serversnet</a> 2020 - echo date('Y');</p>
    </div>

</div> 



<script src="../js/default/jqueryminjs" type="text/javascript"></script>
<script src="../js/default/bootstrapminjs" type="text/javascript"></script>
</body>
</html>



© 2021 Quttera Ltd. All rights reserved.