} if (!isset($_GET["lang"])) { die("lang is not set!"); } session_start(); try { include_once dirname(__FILE__) . "/../scripts-generic/servers.php"; include_once dirname(__FILE__) . "/../scripts-generic/getPDO.php"; include_once dirname(__FILE__) . "/../scripts-generic/PDOQuery.php"; include_once dirname(__FILE__) . "/../scripts-generic/checkAdmin.php"; include_once dirname(__FILE__) . "/config/translation_report.php"; $isMainAdmin = checkMainAdmin(); if ($_GET["serverid"] == "" or $_GET["serverid"] == "-1") { $server = NULL; } else { $server = GetServers()[$_GET["serverid"]]; } $lang = getReportTranslation($_GET["lang"]); $pdo = getPDOConnection(); $conditions = array(); $parameters = array(); if (isset($_GET["report_ids"]) and $_GET["report_ids"][0] != "") { $by_report_ids = $_GET["report_ids"]; $id_count = count($by_report_ids); if ($id_count > 1) { $i = 0; foreach ($by_report_ids as $id) { if ($i < $id_count - 1) { $where .= " r.id = :report_id{$i} OR "; } else { $where .= " r.id = :report_id{$i} ";
$drawingServiceOnList = array_key_exists($drawingServiceOnID, $_POST) ? $_POST[$drawingServiceOnID] : array(); $featureServiceOnList = array_key_exists($featureServiceOnID, $_POST) ? $_POST[$featureServiceOnID] : array(); $mappingServiceOnList = array_key_exists($mappingServiceOnID, $_POST) ? $_POST[$mappingServiceOnID] : array(); $renderingServiceOnList = array_key_exists($renderingServiceOnID, $_POST) ? $_POST[$renderingServiceOnID] : array(); $tileServiceOnList = array_key_exists($tileServiceOnID, $_POST) ? $_POST[$tileServiceOnID] : array(); $onlineList = array_key_exists($onlineID, $_POST) ? $_POST[$onlineID] : array(); } } catch (MgException $e) { CheckForFatalMgException($e); $errorMsg = $e->GetExceptionMessage(); } catch (Exception $e) { $errorMsg = $e->getMessage(); } // Load the display table and save data, if requested. try { $servers = GetServers(); $numServers = GetServerCount(); $currPage = GetPageNumber($servers, $selectedServer, $pageSize); GetPageRange($currPage, $numServers, $pageSize, $firstPageIndex, $lastPageIndex); LoadServerTable($serverTable, $firstPageIndex, $lastPageIndex, true); if (!array_key_exists($selectedServer, $serverTable) && $numServers > 0) { $selectedServer = $servers[$firstPageIndex]; } // Get input values if (!FirstTimeHere($pageName)) { $serverNum = -1; foreach ($serverTable as $key => $val) { if (in_array($key, $serverUpdateList)) { $val->services[DRAWING_SERVICE] = in_array($key, $drawingServiceOnList) ? true : false; $val->services[FEATURE_SERVICE] = in_array($key, $featureServiceOnList) ? true : false; $val->services[MAPPING_SERVICE] = in_array($key, $mappingServiceOnList) ? true : false;
$error = $_lang[ChangeErrorNoOrder]; } } } } head('utf-8', $_lang[ChangeSlotsTitle]); print "<H1 class=pagetitle>" . $_lang[ChangeSlotsTitle] . "</H1><hr class=hr>"; if ($error) { print "<font color=red>" . $_lang[Error] . ": {$error}</font><BR><BR>"; } if (!$host_id) { print "<font color=red>" . $_lang[ErrorBadId] . "</font><br><br>"; } else { $order = GetOrderById($host_id, $_SESSION["userId"]); $tarif = GetTarifById($order->tarif); $server = GetServers($order->serverid); $tarifSpecCost = GetSpecialCost($_SESSION['userId'], "tarif", $tarif->id); if ($tarifSpecCost) { $tarif->cost = $tarifSpecCost["cost2"]; } else { $tarif->cost = $tarif->cost / GetCurrencyKoeficientByCode($tarif->costCurrency); } if ($server->nacenka) { $tarif->cost = $tarif->cost + $tarif->cost / 100 * $server->nacenka; } $tarif->cost = round($tarif->cost * CURK, 2) . " " . CURS . "/" . $_lang[OrderSokraschenieMonth] . " " . $_lang[OrderForSlot]; if ($order->domain) { print "<B>" . $_lang[ChangeDomain] . ":</b> {$order->domain}<Br>"; } print "<b>" . $_lang[ChangeTarif] . ":</b> {$tarif->name} ({$tarif->cost})<Br>"; print "<b>" . $_lang[ChangeSlots] . ":</b> {$order->slots}<Br><br>";
function GetServerObj($s) { $servers = GetServers(); foreach ($servers as $k => $v) { if (0 == strcmp($k, $s)) { return $v["object"]; } } return false; }
<?php include_once dirname(__FILE__) . "/../../scripts-generic/servers.php"; include_once dirname(__FILE__) . "/../config/translation_gotv.php"; ?> <div id="page-content" class="content pages-content"> <div class="input-container"> <label for="select-server"><?php echo $translation["page"]["server"]; ?> :</label> <select id="select-server" name="select-server"> <?php foreach (GetServers() as $id => $row) { echo '<option class="option-server" server_id="' . $row["server_id"] . '">' . $row["name"] . '</option>'; } ?> </select> <label for="input-map"><?php echo $translation["page"]["map"]; ?> :</label> <input type="search" class="input-text" id="input-map" name="input-map"/> <button type="button" id="button-search" class="button-search"> <?php echo $translation["page"]["search"]; ?> </button>