예제 #1
0
<?php

require_once 'inc/core_xdetector.php';
include_once 'inc/auth_xray.php';
//echo "Global Init...<BR>";
Global_Init();
//echo "Global Init Complete...<BR>";
$auth = Do_Auth();
//if(array_key_exists('command', $_POST)){ $_GET = $_POST; }
if (array_key_exists('Submit', $_POST)) {
    $_GET = $_POST;
}
if (array_key_exists('command', $_POST)) {
    $_GET = $_POST;
}
$command = array_key_exists('command', $_GET) ? $_GET['command'] : "";
$command_error = "";
$command_success = "";
//echo "Begin script...<br>";
if ($_SESSION["auth_is_valid"] && !$_SESSION['first_setup']) {
    //echo "Continuing...<br>";
    @mysql_connect($db['x_host'], $db['x_user'], $db['x_pass']) or die($_SERVER["REQUEST_URI"] . "Could not connect to XRAY DB host [" . $db['x_host'] . "].");
    @mysql_selectdb($db['x_base']) or die($_SERVER["REQUEST_URI"] . "Could not select XRAY DB [" . $db['x_base'] . "]");
    $block_type = array_key_exists('block_type', $_GET) ? $_GET['block_type'] : 56;
    $stone_threshold = array_key_exists('stone_threshold', $_GET) ? $_GET['stone_threshold'] : 500;
    $limit_results = array_key_exists('limit_results', $_GET) ? $_GET['limit_results'] : 100;
    $player_name = array_key_exists('player', $_GET) ? $_GET['player'] : NULL;
    $player_id = Get_Player_IDByName($player_name);
    $show_process = false;
    $require_confirmation = false;
    $_GET['confirm'] = array_key_exists('confirm', $_GET) ? $_GET['confirm'] : NULL;
예제 #2
0
    }
    if ($_SESSION['first_setup']) {
        if ($setup_submit_ok) {
            $setup_stage_tab++;
            //echo "SETUP SUBMIT OK [$setup_stage_tab]<BR>";
        } else {
            echo "SETUP ERROR: [" . $config_error['message'] . "]<BR>";
        }
        if ($setup_stage_tab == $tab_count) {
            $GLOBALS['config_settings']['settings']['first_setup'] = "no";
            $GLOBALS['config']['settings']['first_setup'] = false;
            $outfile_ok = Save_Config_Settings();
            if ($outfile_ok) {
                $_SESSION['first_setup'] = false;
                session_unset();
                Do_Auth(true);
                $config_success .= "<BR><BR>SETUP COMPLETE: You have successfully configured X-Ray Detective.<BR>";
            } else {
                $config_error['message'] .= "ERROR: There was a problem writing to the Settings config file.<BR>";
            }
        }
    }
    if (!$setup_submit_ok && $config_error['message'] == "") {
        $config_error['message'] .= "ERROR: An unknown error occurred. Cannot continue to next step of installation.<BR>";
    }
}
if (!$_SESSION['first_setup'] || $setup_stage_tab == 2) {
    // Attempt to populate the X-Ray Worlds table before loading the Worlds configuration page
    $Find_Worlds_array = Find_WorldTables_Valid();
    $Worlds_all_array = Get_Worlds_All();
    $Worlds_enabled_array = Get_Worlds_Enabled();