Exemplo n.º 1
0
function Error($text)
{
    global $GlobalUser;
    if (!$GlobalUser) {
        $GlobalUser = array();
        $GlobalUser['player_id'] = 0;
    }
    $text = str_replace('\\"', """, $text);
    $text = str_replace('\'', "’", $text);
    $text = str_replace('\\`', "‘", $text);
    $now = time();
    $error = array(null, $GlobalUser['player_id'], $_SERVER['REMOTE_ADDR'], $_SERVER['HTTP_USER_AGENT'], $_SERVER['REQUEST_URI'], $text, $now);
    $id = AddDBRow($error, 'errors');
    Logout($_GET['session']);
    // Завершить сессию.
    ob_clean();
    // Отменить предыдущий HTML.
    PageHeader("error", true, false);
    echo "<center><font size=\"3\"><b>\n";
    echo "<br /><br />\n";
    echo "<font color=\"#FF0000\">Произошла ошибка</font> - {$text}\n";
    echo "<br /><br />\n";
    echo BackTrace() . "<br /><br />\n";
    echo "Аварийное завершение программы.<br/><br/>Обратитесь в Службу поддержки или на форум, в раздел \"Ошибки\".\n";
    echo "<br /><br />\n";
    echo "Error-ID: {$id}</b></font></center>\n";
    //PageFooter ();
    ob_end_flush();
    exit;
}
Exemplo n.º 2
0
function PlanetDestroyMenu()
{
    global $GlobalUser;
    $aktplanet = GetPlanet($GlobalUser['aktplanet']);
    PageHeader("renameplanet");
    echo "<!-- CONTENT AREA -->\n";
    echo "<div id='content'>\n";
    echo "<center>\n\n";
    echo "<h1>Переименовать/покинуть планету</h1>\n";
    echo "<form action=\"index.php?page=renameplanet&session=" . $_GET['session'] . "&pl=" . $aktplanet['planet_id'] . "\" method=\"POST\">\n";
    echo "<input type='hidden' name='page' value='renameplanet'>\n";
    echo "<center>\n\n";
    echo "<table width=\"519\">\n";
    echo "<tr><td class=\"c\" colspan=\"3\">Вопросы на всякий случай</td></tr>\n";
    echo "<tr><th colspan=\"3\">Уничтожение планеты [" . $aktplanet['g'] . ":" . $aktplanet['s'] . ":" . $aktplanet['p'] . "] подтвердить паролем</th></tr>\n";
    echo "<tr><input type=\"hidden\" name=\"deleteid\" value =\"" . $aktplanet['planet_id'] . "\">\n";
    echo "<th>Пароль</th><th><input type=\"password\" name=\"pw\"></th>\n";
    echo "<th><input type=\"submit\" name=\"aktion\" value=\"Удалить планету!\" alt=\"Покинуть колонию\"></th></tr>\n";
    echo "</table>\n</form>\n</center>\n\n";
    echo "<br><br><br><br>\n";
    echo "</center>\n";
    echo "</div>\n";
    echo "<!-- END CONTENT AREA -->\n";
    PageFooter();
    ob_end_flush();
    exit;
}
Exemplo n.º 3
0
        if ($_GET['a'] == 2) {
            if (key_exists('suchtext', $_POST) && $_POST['suchtext'] !== "") {
                $result = SearchAllyTag($_POST['suchtext']);
                AllyPage_SearchResult($result);
            }
        }
    }
}
// ***********************************************************
include "allianzen_main.php";
include "allianzen_members.php";
include "allianzen_ranks.php";
include "allianzen_settings.php";
include "allianzen_circular.php";
include "allianzen_misc.php";
PageHeader("allianzen");
echo "<!-- CONTENT AREA -->\n";
echo "<div id='content'>\n";
echo "<center>\n";
echo "<script src=\"js/cntchar.js\" type=\"text/javascript\"></script><script src=\"js/win.js\" type=\"text/javascript\"></script>\n";
if ($GlobalUser['ally_id'] == 0) {
    $app_id = GetUserApplication($GlobalUser['player_id']);
    if ($app_id > 0) {
        AllyPage_Already($app_id);
    } else {
        if (key_exists('a', $_GET) && $_GET['a'] == 1) {
            AllyPage_CreateAlly($_POST['tag'], $_POST['name']);
        } else {
            if (key_exists('a', $_GET) && $_GET['a'] == 2) {
                AllyPage_Search($_POST['suchtext'], $SearchResults);
            } else {
Exemplo n.º 4
0
loca_add("fleet", $GlobalUni['lang']);
if (key_exists('cp', $_GET)) {
    SelectPlanet($GlobalUser['player_id'], intval($_GET['cp']));
}
$GlobalUser['aktplanet'] = GetSelectedPlanet($GlobalUser['player_id']);
$now = time();
UpdateQueue($now);
$aktplanet = GetPlanet($GlobalUser['aktplanet']);
$aktplanet = ProdResources($aktplanet, $aktplanet['lastpeek'], $now);
UpdatePlanetActivity($aktplanet['planet_id']);
UpdateLastClick($GlobalUser['player_id']);
$session = $_GET['session'];
if (method() !== "POST") {
    MyGoto("flotten1");
}
PageHeader("flotten2");
?>

<!-- CONTENT AREA -->
<div id='content'>
<center>


  <script language="JavaScript" src="js/flotten.js"></script>
  <script language="JavaScript" src="js/ocnt.js"></script>

  <script type="text/javascript">

  function getStorageFaktor(){
    return 1  }
Exemplo n.º 5
0
                // Списать ТМ.
                if ($GlobalUser['dm'] >= $required) {
                    $GlobalUser['dm'] -= $required;
                } else {
                    $GlobalUser['dmfree'] -= $required - $GlobalUser['dm'];
                    $GlobalUser['dm'] = 0;
                }
                $query = "UPDATE " . $db_prefix . "users SET dm = '" . $GlobalUser['dm'] . "', dmfree = '" . $GlobalUser['dmfree'] . "' WHERE player_id = " . $GlobalUser['player_id'];
                dbquery($query);
                RecruitOfficer($GlobalUser['player_id'], $qcmd[$type], $days * 24 * 60 * 60);
                $MicropaymentMessage = loca("PREM_OK") . "<br>";
            }
        }
    }
}
PageHeader("micropayment");
echo "<!-- CONTENT AREA -->\n";
echo "<div id='content'>\n";
echo "<center>\n";
// ************************************************************************************
?>

<center>

          <div id="header" style="background-image:url('img/kasino_600x120.jpg'); width:600px;height:120px;">
            <div id="headtext1" style="position:relative; top:25px; left:-160px;font-size:18px;font-weight:bold; color:f3d2b1;"><?php 
echo loca("PREM_HEAD1");
?>
</div>
            <div id="headtext2" style="position:relative;float:right;top:23px;left:-240px;font-size:13px;font-weight:bold;color:#c2f1fd;"><?php 
echo loca("PREM_HEAD2");
Exemplo n.º 6
0
$not_enough_deut = ($aktplanet['g'] != $coord_g || $aktplanet['s'] != $coord_s) && $aktplanet['d'] < 10;
// Списать 10 дейтерия за просмотр не домашней системы (только для обычных пользователей)
if (!$not_enough_deut && $GlobalUser['admin'] == 0) {
    if ($aktplanet['g'] != $coord_g || $aktplanet['s'] != $coord_s) {
        AdjustResources(0, 0, 10, $aktplanet['planet_id'], '-');
        $aktplanet = GetPlanet($aktplanet['planet_id']);
    }
}
$result = EnumOwnFleetQueue($GlobalUser['player_id']);
$nowfleet = dbrows($result);
$maxfleet = $GlobalUser['r108'] + 1;
$prem = PremiumStatus($GlobalUser);
if ($prem['admiral']) {
    $maxfleet += 2;
}
PageHeader("galaxy", true);
echo "<!-- CONTENT AREA -->\n";
echo "<div id='content'>\n";
echo "<center>\n\n";
/***** Скрипты. *****/
?>

  <script  language="JavaScript">
  function galaxy_submit(value) {
      document.getElementById('auto').name = value;
      document.getElementById('galaxy_form').submit();
  }

  function fenster(target_url,win_name) {
  var new_win = window.open(target_url,win_name,'scrollbars=yes,menubar=no,top=0,left=0,toolbar=no,width=550,height=280,resizable=yes');
  new_win.focus();
Exemplo n.º 7
0
        }
    }
    for ($n = 202; $n <= 215; $n++) {
        if ($RapidFire[$n][$gid] > 1) {
            $res .= rapidIn($n, $RapidFire[$n][$gid]);
        }
    }
    for ($n = 401; $n <= 408; $n++) {
        if ($RapidFire[$n][$gid] > 1) {
            $res .= rapidIn($n, $RapidFire[$n][$gid]);
        }
    }
    return $res;
}
$gid = intval($_GET['gid']);
PageHeader("infos");
echo "<!-- CONTENT AREA -->\n";
echo "<div id='content'>\n";
echo "<center>\n";
echo "<table width=\"519\">\n";
if ($gid > 200 && $gid < 300) {
    echo "<!-- begin fleet or defense information -->\n";
    echo "<tr><td class=\"c\" colspan=\"2\">Информация      о флоте:</td></tr>\n";
    echo "<tr><th>Название</th><th>" . loca("NAME_{$gid}") . "</th></tr>\n";
    echo "<tr><th colspan=\"2\">\n";
    echo "<table border=\"0\">\n";
    echo "<tr><td valign=\"top\"><img border=\"0\" src=\"" . UserSkin() . "gebaeude/{$gid}.gif\" width=\"120\" height=\"120\"></td>\n";
    echo "<td>" . loca("LONG_{$gid}") . "<br/>" . rapid($gid) . "</td>\n";
    echo "</tr></table></th></tr>\n";
    echo "<tr><th>Структура</th><th>" . nicenum($UnitParam[$gid][0]) . "</th></tr>\n";
    echo "<tr><th>Мощность щита</th><th>" . nicenum($UnitParam[$gid][1]) . "</th></tr>\n";
// Стандартные флоты.
$MAX = 13;
loca_add("menu", $GlobalUni['lang']);
if (key_exists('cp', $_GET)) {
    SelectPlanet($GlobalUser['player_id'], intval($_GET['cp']));
}
$GlobalUser['aktplanet'] = GetSelectedPlanet($GlobalUser['player_id']);
$now = time();
UpdateQueue($now);
$aktplanet = GetPlanet($GlobalUser['aktplanet']);
$aktplanet = ProdResources($aktplanet, $aktplanet['lastpeek'], $now);
UpdatePlanetActivity($aktplanet['planet_id']);
UpdateLastClick($GlobalUser['player_id']);
$session = $_GET['session'];
PageHeader("fleet_templates");
$temp_map = array(202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 213, 214, 215);
// без сс
// Вырезать из строки всякие инжекции.
function SecureText($text)
{
    $search = array("'<script[^>]*?>.*?</script>'si", "'<[\\/\\!]*?[^<>]*?>'si", "'([\r\n])[\\s]+'");
    // Вырезает пробельные символы
    $replace = array("", "", "\\1", "\\1");
    $str = preg_replace($search, $replace, $text);
    $str = str_replace("`", "", $str);
    $str = str_replace("'", "", $str);
    $str = str_replace("\"", "", $str);
    $str = str_replace("%0", "", $str);
    return $str;
}
Exemplo n.º 9
0
// Ракета не может выгрузить во флот топлива меньше, чем он потребляет в указанное количество часов.
$DepotError = "";
loca_add("common", $GlobalUni['lang']);
loca_add("menu", $GlobalUni['lang']);
if (key_exists('cp', $_GET)) {
    SelectPlanet($GlobalUser['player_id'], intval($_GET['cp']));
}
$GlobalUser['aktplanet'] = GetSelectedPlanet($GlobalUser['player_id']);
$now = time();
UpdateQueue($now);
$aktplanet = GetPlanet($GlobalUser['aktplanet']);
$aktplanet = ProdResources($aktplanet, $aktplanet['lastpeek'], $now);
UpdatePlanetActivity($aktplanet['planet_id']);
UpdateLastClick($GlobalUser['player_id']);
$session = $_GET['session'];
PageHeader("allianzdepot");
echo "<!-- CONTENT AREA -->\n";
echo "<div id='content'>\n";
echo "<center>\n";
$fleetmap = array(202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215);
// Запустить ракету со снабжением
$depot_cap = 10000 * pow(2, $aktplanet['b34']);
if ($aktplanet['b34']) {
    $deut_avail = min(floor($aktplanet['d']), $depot_cap);
} else {
    $deut_avail = 0;
}
$loaded = $deut_avail;
// Отправить ракету поочередности к каждому флоту
$result = GetHoldingFleets($aktplanet['planet_id']);
$rows = dbrows($result);
Exemplo n.º 10
0
    $f = fopen($fleetlock, 'w');
    fclose($f);
    $fleet_id = DispatchFleet($fleet, $origin, $target, $order, $flighttime, $cargo_m, $cargo_k, $cargo_d, $cons['fleet'] + $cons['probes'], time(), $union_id, $hold_time);
    $queue = GetFleetQueue($fleet_id);
    UserLog($aktplanet['owner_id'], "FLEET", "Отправка флота {$fleet_id}: " . GetMissionNameDebug($order) . " " . $origin['name'] . " [" . $origin['g'] . ":" . $origin['s'] . ":" . $origin['p'] . "] -&gt; " . $target['name'] . " [" . $target['g'] . ":" . $target['s'] . ":" . $target['p'] . "]<br>" . DumpFleet($fleet) . "<br>" . "Время полёта: " . BuildDurationFormat($flighttime) . ", удержание: " . BuildDurationFormat($hold_time) . ", затраты дейтерия: " . nicenum($cons['fleet'] + $cons['probes']) . ", союз: " . $union_id);
    if ($union_id) {
        $union_time = UpdateUnionTime($union_id, $queue['end'], $fleet_id);
        UpdateFleetTime($fleet_id, $union_time);
    }
    // Поднять флот с планеты.
    AdjustResources($cargo_m, $cargo_k, $cargo_d + $cons['fleet'] + $cons['probes'], $origin['planet_id'], '-');
    AdjustShips($fleet, $origin['planet_id'], '-');
    unlink($fleetlock);
    //    echo "<br>";
    //    print_r ( $queue);
    PageHeader("flottenversand", false, true, "flotten1", 1);
    ?>

<!-- CONTENT AREA -->
<div id='content'>
<center>
  <script language="JavaScript" src="js/flotten.js"></script>
  <table width="519" border="0" cellpadding="0" cellspacing="1">

   <tr height="20">
    <td class="c" colspan="2">
      <span class="success">Флот отправлен:</span>
    </td>
   </tr>
   <tr height="20">
  <th>Задание</th><th><?php 
Exemplo n.º 11
0
            BuildEnque(intval($_GET['planet']), intval($_GET['techid']), 1);
        } else {
            if ($_GET['modus'] === 'remove') {
                BuildDeque(intval($_GET['planet']), intval($_GET['listid']));
            }
        }
    }
}
$now = time();
UpdateQueue($now);
$aktplanet = GetPlanet($GlobalUser['aktplanet']);
$aktplanet = ProdResources($aktplanet, $aktplanet['lastpeek'], $now);
UpdatePlanetActivity($aktplanet['planet_id']);
UpdateLastClick($GlobalUser['player_id']);
$session = $_GET['session'];
PageHeader("imperium", true);
$planettype = intval($_GET['planettype']);
if ($GlobalUni['moons']) {
    if ($planettype != 1 && $planettype != 3) {
        $planettype = 1;
    }
} else {
    if ($planettype != 1) {
        $planettype = 1;
    }
}
// Загрузить список планет/лун.
$plist = array();
$moons = $num = 0;
if ($planettype == 1 || $planettype == 3) {
    $result = EnumPlanets();
Exemplo n.º 12
0
<?php

// Написать сообщение игроку.
loca_add("menu", $GlobalUni['lang']);
if (key_exists('cp', $_GET)) {
    SelectPlanet($GlobalUser['player_id'], intval($_GET['cp']));
}
$GlobalUser['aktplanet'] = GetSelectedPlanet($GlobalUser['player_id']);
$now = time();
UpdateQueue($now);
$aktplanet = GetPlanet($GlobalUser['aktplanet']);
$aktplanet = ProdResources($aktplanet, $aktplanet['lastpeek'], $now);
UpdatePlanetActivity($aktplanet['planet_id']);
UpdateLastClick($GlobalUser['player_id']);
PageHeader("writemessages");
function SendNotActivated()
{
    global $GlobalUser;
    $unitab = LoadUniverse();
    $uni = $unitab['num'];
    echo "<html>\n";
    echo " <head>\n";
    echo "  <link rel='stylesheet' type='text/css' href='css/default.css' />\n";
    echo "  <link rel='stylesheet' type='text/css' href='css/formate.css' />\n";
    echo "  <link rel=\"stylesheet\" type=\"text/css\" href=\"formate.css\" />\n";
    echo "  <link rel=\"stylesheet\" type=\"text/css\" href=\"css/combox.css\">\n";
    echo "  <meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\" />\n";
    echo "  <title>Вселенная {$uni} ОГейм</title>\n";
    echo " </head>\n\n";
    echo " <body>\n";
    echo "  <center><font size=\"3\"><b>\n";
Exemplo n.º 13
0
$OverviewError = "";
require_once "overview_events.php";
if (key_exists('cp', $_GET)) {
    SelectPlanet($GlobalUser['player_id'], intval($_GET['cp']));
}
$GlobalUser['aktplanet'] = GetSelectedPlanet($GlobalUser['player_id']);
$now = time();
if ($GlobalUser['admin'] == 0) {
    UpdateQueue($now);
}
// Не обновлять Обзор для админов
$aktplanet = GetPlanet($GlobalUser['aktplanet']);
$aktplanet = ProdResources($aktplanet, $aktplanet['lastpeek'], $now);
UpdateLastClick($GlobalUser['player_id']);
$session = $_GET['session'];
PageHeader("overview");
// *******************************************************************
if (key_exists('lgn', $_GET)) {
    UpdatePlanetActivity($aktplanet['planet_id']);
    // Обновить активность на Главной планете при входе в игру.
}
$uni = $GlobalUni;
?>

<!-- CONTENT AREA --> 
<div id='content'> 
<center> 
<script type="text/javascript"> 
<!--
function t_building() {
    v = new Date();
Exemplo n.º 14
0
<?php

// Статистика
loca_add("menu", $GlobalUser['lang']);
if (key_exists('cp', $_GET)) {
    SelectPlanet($GlobalUser['player_id'], intval($_GET['cp']));
}
$GlobalUser['aktplanet'] = GetSelectedPlanet($GlobalUser['player_id']);
$now = time();
UpdateQueue($now);
$aktplanet = GetPlanet($GlobalUser['aktplanet']);
$aktplanet = ProdResources($aktplanet, $aktplanet['lastpeek'], $now);
UpdatePlanetActivity($aktplanet['planet_id']);
UpdateLastClick($GlobalUser['player_id']);
$session = $_GET['session'];
PageHeader("statistics");
$start = -1;
if (key_exists("start", $_REQUEST)) {
    $start = intval($_REQUEST['start']);
}
$type = "";
if (key_exists("type", $_REQUEST)) {
    $type = $_REQUEST['type'];
}
$who = "player";
if (key_exists("who", $_REQUEST)) {
    $who = $_REQUEST['who'];
}
?>

<!-- CONTENT AREA --> 
Exemplo n.º 15
0
        if ($exist4) {
            $query .= "sprod = {$last4}, ";
        }
        if ($exist12) {
            $query .= "fprod = {$last12}, ";
        }
        if ($exist212) {
            $query .= "ssprod = {$last212}, ";
        }
        $query .= " type = type WHERE planet_id = {$planet_id}";
        dbquery($query);
    }
    $aktplanet = GetPlanet($GlobalUser['aktplanet']);
    // перегрузить планету.
}
PageHeader("resources");
echo "<!-- CONTENT AREA -->\n";
echo "<div id='content'>\n";
echo "<center>\n";
// ***********************************************************************
function get_prod($id, $planet)
{
    switch ($id) {
        case 1:
            return 100 * $planet['mprod'];
        case 2:
            return 100 * $planet['kprod'];
        case 3:
            return 100 * $planet['dprod'];
        case 4:
            return 100 * $planet['sprod'];
Exemplo n.º 16
0
// Технологии (детали).
loca_add("menu", $GlobalUser['lang']);
loca_add("techtree", $GlobalUser['lang']);
if (key_exists('cp', $_GET)) {
    SelectPlanet($GlobalUser['player_id'], intval($_GET['cp']));
}
$GlobalUser['aktplanet'] = GetSelectedPlanet($GlobalUser['player_id']);
$now = time();
UpdateQueue($now);
$aktplanet = GetPlanet($GlobalUser['aktplanet']);
$aktplanet = ProdResources($aktplanet, $aktplanet['lastpeek'], $now);
UpdatePlanetActivity($aktplanet['planet_id']);
UpdateLastClick($GlobalUser['player_id']);
$session = $_GET['session'];
PageHeader("techtreedetails");
echo "<!-- CONTENT AREA -->\n";
echo "<div id='content'>\n";
echo "<center>\n";
// **************************************************************************************
// Список объектов что-чему требуется.
$reqs = array(1 => array(), 2 => array(), 3 => array(), 4 => array(), 12 => array(3 => 5, 113 => 3), 14 => array(), 15 => array(14 => 10, 108 => 10), 21 => array(14 => 2), 22 => array(), 23 => array(), 24 => array(), 31 => array(), 33 => array(15 => 1, 113 => 12), 34 => array(), 44 => array(21 => 1), 106 => array(31 => 3), 108 => array(31 => 1), 109 => array(31 => 4), 110 => array(113 => 3, 31 => 6), 111 => array(31 => 2), 113 => array(31 => 1), 114 => array(113 => 5, 110 => 5, 31 => 7), 115 => array(113 => 1), 117 => array(113 => 1, 31 => 2), 118 => array(114 => 3), 120 => array(113 => 2), 121 => array(31 => 4, 120 => 5, 113 => 4), 122 => array(113 => 8, 120 => 10, 121 => 5), 123 => array(31 => 10, 108 => 8, 114 => 8), 124 => array(106 => 4, 117 => 3), 199 => array(31 => 12), 202 => array(21 => 2, 115 => 2), 203 => array(21 => 4, 115 => 6), 204 => array(21 => 1, 115 => 1), 205 => array(21 => 3, 111 => 2, 117 => 2), 206 => array(21 => 5, 117 => 4, 121 => 2), 207 => array(21 => 7, 118 => 4), 208 => array(21 => 4, 117 => 3), 209 => array(21 => 4, 115 => 6, 110 => 2), 210 => array(21 => 3, 115 => 3, 106 => 2), 211 => array(117 => 6, 21 => 8, 122 => 5), 212 => array(21 => 1), 213 => array(21 => 9, 118 => 6, 114 => 5), 214 => array(21 => 12, 118 => 7, 114 => 6, 199 => 1), 215 => array(114 => 5, 120 => 12, 118 => 5, 21 => 8), 401 => array(21 => 1), 402 => array(113 => 1, 21 => 2, 120 => 3), 403 => array(113 => 3, 21 => 4, 120 => 6), 404 => array(21 => 6, 113 => 6, 109 => 3, 110 => 1), 405 => array(21 => 4, 121 => 4), 406 => array(21 => 8, 122 => 7), 407 => array(110 => 2, 21 => 1), 408 => array(110 => 6, 21 => 6), 502 => array(44 => 2, 21 => 1), 503 => array(44 => 4, 21 => 1, 117 => 1), 41 => array(), 42 => array(41 => 1), 43 => array(41 => 1, 114 => 7));
// **************************************************************************************
$tree = array();
$filter = array();
$reclevel = -1;
$maxreclevel = -1;
function walk_tree($arr, $id)
{
    global $reqs, $reclevel, $maxreclevel, $tree;
    $reclevel++;
Exemplo n.º 17
0
        if ($resqueue == null) {
            if (key_exists('bau', $_GET)) {
                StartResearch($GlobalUser['player_id'], $aktplanet['planet_id'], intval($_GET['bau']), $now);
            }
            $aktplanet = GetPlanet($GlobalUser['aktplanet']);
            // обновить состояние планеты.
        } else {
            if (key_exists('unbau', $_GET)) {
                StopResearch($GlobalUser['player_id']);
            }
            $aktplanet = GetPlanet($GlobalUser['aktplanet']);
            // обновить состояние планеты.
        }
    }
}
PageHeader("buildings");
echo "<!-- CONTENT AREA -->\n";
echo "<div id='content'>\n";
echo "<center>\n";
echo "<title> \n";
echo "Постройки#Gebaeude\n";
echo "</title> \n";
echo "<script type=\"text/javascript\"> \n\n";
echo "function setMax(key, number){\n";
echo "    document.getElementsByName('fmenge['+key+']')[0].value=number;\n";
echo "}\n";
echo "</script> \n";
$unitab = LoadUniverse();
$speed = $unitab['speed'];
// ************************************************ Верфь ************************************************
$fleetmap = array(202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215);
Exemplo n.º 18
0
function HTMLBody()
{
    $page = Page::getInstance();
    $html = "<body>";
    $html .= "<div id='pageCSS'>" . $page->getCSS() . "</div>";
    $html .= "<div id='fs'></div>";
    //$html.= file_get_contents("img/icons.svg");
    $html .= "<header class='headerContainer' >";
    $html .= SiteHeader();
    $html .= "</header>";
    $html .= "<nav class='menuContainer'>";
    $html .= SiteMenu();
    $html .= "</nav>";
    $html .= "<div class='pageContainer'>";
    $html .= "<div class='module module--page pageWrapper'>";
    $html .= PageHeader();
    $html .= PageNav();
    $html .= PageContent();
    $html .= PageAds();
    $html .= "</div>";
    $html .= "</div>";
    $html .= "<footer class='footerContainer'>";
    $html .= SiteFooter();
    $html .= "</footer>";
    //$html.= js('_assets/js/components/es5-shim');
    //$html .= "<script>var DEBUG = true, POLYFILLPROMISE = false;</script>";
    /*
    $html .= js('_assets/js/olli/module');
    $html .= includelib('_assets/js/olli', 'build.json');
    
    //$html.= js('js/olli');
    
    $html .= js('_assets/js/olli/test');
    */
    ///*
    $html .= "<script>var DEBUG = true, FORCE_PROMISE = this['Promise']?false:true;</script>";
    $html .= js('_assets/es6/vendors/browser');
    $html .= js('_assets/es6/vendors/system-polyfills');
    $html .= js('_assets/es6/vendors/system');
    $html .= "<script>";
    $html .= "System.config({";
    $html .= "    transpiler: 'babel'";
    //$html .= "    baseURL: '_assets/es6/olli'";
    $html .= "  });";
    $html .= "System.import('_assets/es6/olli/olli-test.js?cache=" . time() . "');";
    $html .= "</script>";
    //*/
    /*
        $html.= js('js/olli-dev');
        $html .= js('_assets/js/olli/test');
    */
    $html .= "</body>";
    return $html;
}
Exemplo n.º 19
0
<?php

/**
 * Index page for site
 *
 * @copyright  2009 Deckchair UK Ltd www.deckchair.co.uk
 * @author     Simon Pollard
 * @version    v1.0
*/
// included all classes needed
include "classes/main.php";
// set up meta description
$description = "";
// set up meta keywords
$keywords = "";
// load page header - sends to classes/main.php (title, meta desc, meta keyword, css (if needed))
PageHeader("Welcome", $description, $keywords, "indexpage");
echo "<p></p>\n";
// load page footer - sends to classes/main.php
PageFooter();
Exemplo n.º 20
0
<?php

loca_add("menu", $GlobalUser['lang']);
loca_add("search", $GlobalUser['lang']);
if (key_exists('cp', $_GET)) {
    SelectPlanet($GlobalUser['player_id'], intval($_GET['cp']));
}
$GlobalUser['aktplanet'] = GetSelectedPlanet($GlobalUser['player_id']);
$now = time();
UpdateQueue($now);
$aktplanet = GetPlanet($GlobalUser['aktplanet']);
$aktplanet = ProdResources($aktplanet, $aktplanet['lastpeek'], $now);
UpdatePlanetActivity($aktplanet['planet_id']);
UpdateLastClick($GlobalUser['player_id']);
$session = $_GET['session'];
PageHeader("suche");
$SEARCH_LIMIT = 25;
$SearchResult = "";
$searchtext = "";
// Вырезать из строки всякие инжекции.
function SecureText($text)
{
    $search = array("'<script[^>]*?>.*?</script>'si", "'<[\\/\\!]*?[^<>]*?>'si", "'([\r\n])[\\s]+'");
    // Вырезает пробельные символы
    $replace = array("", "", "\\1", "\\1");
    $str = preg_replace($search, $replace, $text);
    $str = str_replace("`", "", $str);
    $str = str_replace("'", "", $str);
    $str = str_replace("\"", "", $str);
    $str = str_replace("%0", "", $str);
    return $str;
Exemplo n.º 21
0
 /**
  * Forum-specific export format
  * @todo Project file size / export time and possibly break into multiple files
  * 
  */
 protected function ForumExport($Ex)
 {
     // Begin
     PageHeader();
     $Ex->BeginExport('export ' . date('Y-m-d His') . '.txt.gz', 'Vanilla 1.x');
     // Users
     $User_Map = array('UserID' => 'UserID', 'Name' => 'Name', 'Password' => 'Password', 'Email' => 'Email', 'CountComments' => 'CountComments');
     $Ex->ExportTable('User', "SELECT * FROM :_User", $User_Map);
     // ":_" will be replaced by database prefix
     // Roles
     /*
        'RoleID' => 'int', 
        'Name' => 'varchar(100)', 
        'Description' => 'varchar(200)'
     */
     $Role_Map = array('RoleID' => 'RoleID', 'Name' => 'Name', 'Description' => 'Description');
     $Ex->ExportTable('Role', 'select * from :_Role', $Role_Map);
     // UserRoles
     /*
        'UserID' => 'int', 
        'RoleID' => 'int'
     */
     $UserRole_Map = array('UserID' => 'UserID', 'RoleID' => 'RoleID');
     $Ex->ExportTable('UserRole', 'select UserID, RoleID from :_User', $UserRole_Map);
     // Categories
     /*
               'CategoryID' => 'int', 
               'Name' => 'varchar(30)', 
               'Description' => 'varchar(250)', 
               'ParentCategoryID' => 'int', 
               'DateInserted' => 'datetime', 
               'InsertUserID' => 'int', 
               'DateUpdated' => 'datetime', 
               'UpdateUserID' => 'int'
     */
     $Category_Map = array('CategoryID' => 'CategoryID', 'Name' => 'Name', 'Description' => 'Description');
     $Ex->ExportTable('Category', "select CategoryID, Name, Description from :_Category", $Category_Map);
     // Discussions
     /*
        'DiscussionID' => 'int', 
        'Name' => 'varchar(100)', 
        'CategoryID' => 'int', 
        'Body' => 'text', 
        'Format' => 'varchar(20)', 
        'DateInserted' => 'datetime', 
        'InsertUserID' => 'int', 
        'DateUpdated' => 'datetime', 
        'UpdateUserID' => 'int', 
        'Score' => 'float', 
        'Announce' => 'tinyint', 
        'Closed' => 'tinyint'
     */
     $Discussion_Map = array('DiscussionID' => 'DiscussionID', 'Name' => 'Name', 'CategoryID' => 'CategoryID', 'Body' => 'Body', 'DateInserted' => 'DateCreated', 'InsertUserID' => 'AuthUserID', 'DateUpdated' => 'DateLastActive', 'UpdateUserID' => 'LastUserID', 'Closed' => 'Closed');
     $Ex->ExportTable('Discussion', "\n         SELECT d.*,c.Body FROM :_Discussion d\n         LEFT JOIN :_Comment c ON (c.CommentID = d.FirstCommentID)", $Discussion_Map);
     // Comments
     /*
        'CommentID' => 'int', 
        'DiscussionID' => 'int', 
        'DateInserted' => 'datetime', 
        'InsertUserID' => 'int', 
        'DateUpdated' => 'datetime', 
        'UpdateUserID' => 'int', 
        'Format' => 'varchar(20)', 
        'Body' => 'text', 
        'Score' => 'float'
     */
     $Comment_Map = array('CommentID' => 'CommentID', 'DiscussionID' => 'DiscussionID', 'InsertUserID' => 'AuthUserID', 'DateInserted' => 'DateCreated', 'UpdateUserID' => 'EditUserID', 'DateUpdated' => 'DateEdited', 'Body' => 'Body');
     $Ex->ExportTable('Comment', "\n         SELECT * FROM :_Comment c\n         WHERE c.WhisperUserID = 0", $Comment_Map);
     // Conversations
     /*
         'ConversationID' => 'int', 
         'FirstMessageID' => 'int', 
         'DateInserted' => 'datetime', 
         'InsertUserID' => 'int', 
         'DateUpdated' => 'datetime', 
         'UpdateUserID' => 'int'
     */
     $Conversation_Map = array('ConversationID' => 'DiscussionID', 'InsertUserID' => 'AuthUserID', 'DateInserted' => 'DateCreated', 'UpdateUserID' => 'EditUserID', 'DateUpdated' => 'DateEdited');
     $Ex->ExportTable('Conversation', "SELECT DISTINCT DiscussionID, AuthUserID, DateCreated, EditUserID, DateEdited \n         FROM :_Comment c\n         WHERE c.WhisperUserID > 0\n         GROUP BY DiscussionID", $Conversation_Map);
     // ConversationMessage
     /*
        'MessageID' => 'int', 
        'ConversationID' => 'int', 
        'Body' => 'text', 
        'InsertUserID' => 'int', 
        'DateInserted' => 'datetime'
     */
     $ConversationMessage_Map = array('MessageID' => 'CommentID', 'ConversationID' => 'DiscussionID', 'Body' => 'Body', 'InsertUserID' => 'AuthUserID', 'DateInserted' => 'DateCreated');
     $Ex->ExportTable('ConversationMessage', "\n         SELECT CommentID, DiscussionID, AuthUserID, DateCreated, Body FROM :_Comment c\n         WHERE c.WhisperUserID > 0", $ConversationMessage_Map);
     // UserConversation
     $Ex->Query("CREATE TEMPORARY TABLE VanillaExportUserConversations (`UserID` INT NOT NULL ,`ConversationID` INT NOT NULL)");
     $Ex->Query("\n            INSERT INTO VanillaExportUserConversations (ConversationID, UserID) \n            SELECT DISTINCT DiscussionID AS ConversationID, AuthUserID AS UserID FROM :_Comment \n            WHERE WhisperUserID > 0\n            GROUP BY DiscussionID");
     $Ex->Query("\n            INSERT INTO VanillaExportUserConversations (ConversationID, UserID) \n            SELECT DISTINCT DiscussionID AS ConversationID, WhisperUserID AS UserID FROM :_Comment\n            WHERE WhisperUserID > 0\n            GROUP BY DiscussionID");
     /*
        'UserID' => 'int', 
        'ConversationID' => 'int', 
        'LastMessageID' => 'int'
     */
     $UserConversation_Map = array('UserID' => 'UserID', 'ConversationID' => 'ConversationID');
     $Ex->ExportTable('UserConversation', "SELECT ConversationID, UserID FROM VanillaExportUserConversations", $UserConversation_Map);
     // End
     $Ex->EndExport();
     PageFooter();
 }
Exemplo n.º 22
0
        }
    }
    if (key_exists('union_name', $_POST) && $uni['acs'] > 0) {
        $fleet_id = intval($_POST['flotten']);
        $union_id = CreateUnion($fleet_id, "KV" . $fleet_id);
        RenameUnion($union_id, $_POST['union_name']);
        // переименовать
    }
    if (key_exists('user_name', $_POST) && $uni['acs'] > 0) {
        $fleet_id = intval($_POST['flotten']);
        $union_id = CreateUnion($fleet_id, "KV" . $fleet_id);
        $FleetError = AddUnionMember($union_id, $_POST['user_name']);
        // добавить игрока
    }
}
PageHeader("flotten1");
$result = EnumOwnFleetQueue($GlobalUser['player_id']);
// Количество флотов
$nowfleet = $rows = dbrows($result);
$maxfleet = $GlobalUser['r108'] + 1;
$prem = PremiumStatus($GlobalUser);
if ($prem['admiral']) {
    $maxfleet += 2;
}
$expnum = GetExpeditionsCount($GlobalUser['player_id']);
// Количество экспедиций
$maxexp = floor(sqrt($GlobalUser['r124']));
?>

<!-- CONTENT AREA -->
<div id='content'>
Exemplo n.º 23
0
if ($galaxy > $uni['galaxies']) {
    $galaxy = $uni['galaxies'];
}
if ($system < 1) {
    $system = 1;
}
if ($system > $uni['systems']) {
    $system = $uni['systems'];
}
if ($planet < 0) {
    $planet = 0;
}
if ($planet > 16) {
    $planet = 16;
}
PageHeader("flotten3");
?>

<!-- CONTENT AREA -->
<div id='content'>
<center>

  <script language="JavaScript" src="js/flotten.js"></script>
  <script type="text/javascript">

  function getStorageFaktor(){
    return 1;
  }

  </script>
Exemplo n.º 24
0
<?php

// Список заявок на вступление в альянс.
loca_add("menu", $GlobalUni['lang']);
if (key_exists('cp', $_GET)) {
    SelectPlanet($GlobalUser['player_id'], intval($_GET['cp']));
}
$GlobalUser['aktplanet'] = GetSelectedPlanet($GlobalUser['player_id']);
$now = time();
UpdateQueue($now);
$aktplanet = GetPlanet($GlobalUser['aktplanet']);
$aktplanet = ProdResources($aktplanet, $aktplanet['lastpeek'], $now);
UpdatePlanetActivity($aktplanet['planet_id']);
UpdateLastClick($GlobalUser['player_id']);
$session = $_GET['session'];
PageHeader("bewerbungen");
$ally = LoadAlly($GlobalUser['ally_id']);
$show = 0;
if (key_exists('show', $_GET)) {
    $show = intval($_GET['show']);
}
$sort = 1;
if (key_exists('sort', $_GET)) {
    $sort = intval($_GET['sort']) & 1;
}
if (method() === "POST") {
    if ($_POST['aktion'] === "Принять" && $show > 0) {
        $app = LoadApplication($show);
        $ally_id = $ally['ally_id'];
        $player_id = $app['player_id'];
        $newcomer = LoadUser($player_id);
Exemplo n.º 25
0
                        $YPos -= 1 * $line_height;
                        $LeftOvers = $pdf->addTextWrap(300, $YPos, 300, $FontSize2, '');
                    } elseif (count($Split) == 2) {
                        $YPos -= 1 * $line_height;
                        $LeftOvers = $pdf->addTextWrap(300, $YPos, 300, $FontSize2, $Split[$i]);
                    } elseif (count($Split) >= 3) {
                        $YPos -= 1 * $line_height;
                        $LeftOvers = $pdf->addTextWrap(300, $YPos, 300, $FontSize2, $Split[$i]);
                    }
                }
                /*end for*/
            }
        }
        /*end if full descriptions*/
        if ($YPos < $Bottom_Margin + $line_height) {
            PageHeader();
        }
    }
    /*end inventory valn while loop */
    $FontSize = 10;
    /*Print out the category totals */
    $FileName = $_SESSION['DatabaseName'] . '_' . _('Price_List') . '_' . date('Y-m-d') . '.pdf';
    ob_clean();
    $pdf->OutputD($FileName);
    $pdf->__destruct();
} else {
    /*The option to print PDF was not hit */
    $title = _('Price Listing');
    include 'includes/header.inc';
    echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/customer.png" title="' . _('Price List') . '" alt="" />
         ' . ' ' . _('Print a price list') . '</p>';
Exemplo n.º 26
0
    }
}
function IsSelected($option, $value)
{
    global $GlobalUser;
    if ($GlobalUser[$option] == $value) {
        return "selected";
    } else {
        return "";
    }
}
function isValidEmail($email)
{
    return eregi("^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,3})\$", $email);
}
PageHeader("options");
$unitab = LoadUniverse();
$speed = $unitab['speed'];
$prem = PremiumStatus($GlobalUser);
?>

<!-- CONTENT AREA -->
<div id='content'>
<center>
 <table width="519">

<?php 
// Выключить Режим Отпуска.
if (method() === "POST") {
    if (time() >= $GlobalUser['vacation_until'] && $_POST['urlaub_aus'] === "on" && $GlobalUser['vacation']) {
        $OptionsError = va(loca("OPTIONS_MSG_VMDISABLED"), $GlobalUser['oname']) . "\n<br/>\n";
Exemplo n.º 27
0
include "admin_queue.php";
include "admin_uni.php";
include "admin_errors.php";
include "admin_debug.php";
include "admin_sim.php";
include "admin_broadcast.php";
include "admin_expedition.php";
include "admin_logins.php";
include "admin_checksum.php";
include "admin_bots.php";
include "admin_battle.php";
include "admin_userlogs.php";
include "admin_botedit.php";
include "admin_coupons.php";
// ========================================================================================
PageHeader("admin", true);
echo "<!-- CONTENT AREA -->\n";
echo "<div id='content'>\n";
echo "<center>\n";
echo "<table width=\"750\" border=\"0\" cellpadding=\"0\" cellspacing=\"1\">\n\n";
if ($mode === "Home") {
    Admin_Home();
} else {
    if ($mode === "Fleetlogs") {
        Admin_Fleetlogs();
    } else {
        if ($mode === "Browse") {
            Admin_Browse();
        } else {
            if ($mode === "Reports") {
                Admin_Reports();
Exemplo n.º 28
0
/*----------Vars----------------*/
/*------------------------------*/
$sAction = $_REQUEST['action'];
$sError = '';
define('BX_SKIP_INSTALL_CHECK', true);
// --------------------------------------------
if ($sAction == 'step6' || $sAction == 'step7' || $sAction == 'compile_languages') {
    require_once '../inc/header.inc.php';
    require_once BX_DIRECTORY_PATH_INC . 'db.inc.php';
    require_once BX_DIRECTORY_PATH_INC . 'design.inc.php';
}
// --------------------------------------------
require_once '../inc/classes/BxDolIO.php';
$sInstallPageContent = InstallPageContent($sError);
mb_internal_encoding('UTF-8');
echo PageHeader($sAction, $sError);
echo $sInstallPageContent;
echo PageFooter($sAction);
function InstallPageContent(&$sError)
{
    global $aConf, $confFirst, $aDbConf, $aGeneral;
    $sRet = '';
    switch ($_REQUEST['action']) {
        case 'compile_languages':
            performInstallLanguages();
            $sRet .= 'Default Dolphin language was recompiled';
            break;
        case 'step7':
            $sRet .= genMainDolphinPage();
            break;
        case 'step6':
Exemplo n.º 29
0
<?php

// Сообщения (пока вариант без Командира).
loca_add("menu", $GlobalUni['lang']);
if (key_exists('cp', $_GET)) {
    SelectPlanet($GlobalUser['player_id'], intval($_GET['cp']));
}
$GlobalUser['aktplanet'] = GetSelectedPlanet($GlobalUser['player_id']);
$now = time();
UpdateQueue($now);
$aktplanet = GetPlanet($GlobalUser['aktplanet']);
$aktplanet = ProdResources($aktplanet, $aktplanet['lastpeek'], $now);
UpdatePlanetActivity($aktplanet['planet_id']);
UpdateLastClick($GlobalUser['player_id']);
PageHeader("messages");
// *******************************************************************
$MAXMSG = 25;
// Количество сообщений на странице.
$uni = LoadUniverse();
DeleteExpiredMessages($GlobalUser['player_id']);
// Удалить сообщения которые хранятся дольше 24 часов.
// Заголовок таблицы
echo "<!-- CONTENT AREA -->\n";
echo "<div id='content'>\n";
echo "<center>\n";
//echo "GET: "; print_r ($_GET); echo "<br>";
//echo "POST: "; print_r ($_POST); echo "<br>";
if (method() === "POST") {
    //print_r ($_POST);
    $player_id = $GlobalUser['player_id'];
    if ($_POST['deletemessages'] === "deleteall") {
Exemplo n.º 30
0
        if ($id) {
            $ShowActivateDlg = true;
            $coupon = LoadCoupon($id);
        } else {
            $CouponError = "Неверный код или купон уже погашен";
        }
        //Код более не действителен.
        //Неверный код
    } else {
        if ($_POST['action'] === "activate") {
            ActivateCoupon($GlobalUser, $code);
            MyGoto("micropayment");
        }
    }
}
PageHeader("payment");
?>

<!-- CONTENT AREA -->
<div id='content'>
<center>

<?php 
if ($ShowActivateDlg) {
    ?>

<form action="" method="POST" accept-charset="text/plain; charset=utf-8">
<input type="hidden" name="action" value="activate">
<input type="hidden" name="couponcode" value="<?php 
    echo $coupon['code'];
    ?>