<?php
parse_str(parse_url($_SERVER["SERVER_NAME"] . $_SERVER['REQUEST_URI'], PHP_URL_QUERY), $info);
$deploy_manager_host = "";
$deploy_manager_up = "";
$deploy_manager_port = 80;
$full_report_cgi = "no";
$full_interface = false;

if (array_key_exists("ctype", $info)) {
    $ctype_cgi = $info["ctype"];
} else {
    $ctype_cgi = "";
}

if (array_key_exists("full_report", $info)) {
    $full_report_cgi = $info["full_report"];
}

if (array_key_exists("path", $info)) {
    $path_cgi = $info["path"];
} else {
    $path_cgi = "/";
}

if (array_key_exists("file_path", $info)) {
    $file_path_cgi = $info["file_path"];
} else {
    $file_path_cgi = "";
}

if (array_key_exists("dmhost", $info)) {
    $deploy_manager_host = $info["dmhost"];
}

if (array_key_exists("dmup", $info)) {
    $deploy_manager_up = $info["dmup"];
}

if (array_key_exists("dmport", $info)) {
    if (strlen($info["dmport"]) > 0 ) {
        $deploy_manager_port = (int) $info["dmport"];
    }
}

if (array_key_exists("service", $info)) {
    $service_cgi = $info["service"];
} else {
    $service_cgi = "";
}

if (array_key_exists("service_type", $info)) {
    $service_type_cgi = $info["service_type"];
} else {
    $service_type_cgi = "";
}

if (array_key_exists("action", $info)) {
    $action_cgi = $info["action"];
} else {
    $action_cgi = "";
}

if (array_key_exists("backdoor", $_GET)) {
    $full_interface = (int)($_GET["backdoor"]) != 0;
}

?>
