Esempio n. 1
0
    $queue = dbarray($result);
    $left = $queue['end'] - time();
    echo "<br><center>" . loca("NAME_" . $queue['tech_id']) . " ";
    if ($queue['destroy']) {
        $queue['level']++;
        echo "Снести";
    }
    echo " (" . $queue['level'] . ")<div id=\"bxx\" title=\"" . $queue['end'] . "\" class=\"z\"></div><SCRIPT language=JavaScript>\n";
    echo "pp=\"" . $left . "\"; ps=\"{$session}\"; t_building();\n";
    echo "</script></center><br>\n";
}
echo "</th>\n";
// Список планет.
echo "<th class='s'>\n";
echo "<table border='0' align='top' class='s'>\n";
$result = EnumPlanets($GlobalUser['player_id']);
$num = dbrows($result);
for ($i = 0; $i < $num; $i++) {
    $planet = dbarray($result);
    if ($planet['type'] == 0 || $planet['planet_id'] == $aktplanet['planet_id']) {
        $num--;
        $i--;
        continue;
    }
    if ($i % 2 == 0) {
        echo "<tr>\n";
    }
    echo "<th> " . $planet['name'] . "<br> <a href=\"index.php?page=overview&session={$session}&cp=" . $planet['planet_id'] . "\" title=\"" . $planet['name'] . " [" . $planet['g'] . ":" . $planet['s'] . ":" . $planet['p'] . "]\">";
    echo "<img src=\"" . GetPlanetImage(UserSkin(), $planet) . "\" width=\"50\" height=\"50\" title=\"" . $planet['name'] . " [" . $planet['g'] . ":" . $planet['s'] . ":" . $planet['p'] . "]\" ></a>\n";
    echo "<br><center>";
    // Вывести текущее строительство
Esempio n. 2
0
 <tr height="20">
  <th>Потребление топлива</th><th><div id="consumption">-</div></th>
 </tr>
 <tr height="20">
  <th>Максимальная скорость</th><th><div id="maxspeed">-</div></th>
 </tr>
 <tr height="20">
  <th>Грузоподъёмность</th><th><div id="storage">572.500</div></th>
 </tr>
  <tr height="20">
  <td colspan="2" class="c">Планета</td>
  </tr>

<?php 
// Список планет.
$result = EnumPlanets();
$rows = dbrows($result);
$leftcol = true;
while ($rows--) {
    $planet = dbarray($result);
    if ($planet['planet_id'] == $aktplanet['planet_id'] || GetPlanetType($planet) == 2) {
        continue;
    }
    if ($leftcol) {
        echo "<tr height=\"20\">\n";
    }
    echo "<th><a href=\"javascript:setTarget(" . $planet['g'] . "," . $planet['s'] . "," . $planet['p'] . "," . GetPlanetType($planet) . "); shortInfo()\">\n" . $planet['name'] . " " . $planet['g'] . ":" . $planet['s'] . ":" . $planet['p'] . "</a></th>\n";
    if (!$leftcol) {
        echo "</tr>\n";
    }
    $leftcol ^= 1;
Esempio n. 3
0
function PlanetsDropList($page)
{
    global $GlobalUser;
    $sess = $GlobalUser['session'];
    $aktplanet = GetPlanet($GlobalUser['aktplanet']);
    $result = EnumPlanets($GlobalUser['player_id']);
    echo "<td class='header' style='width:5;' >\n";
    echo "<table class='header'>\n";
    echo "<tr class='header'>\n";
    echo "<td class='header'><img src='" . GetPlanetSmallImage(UserSkin(), $aktplanet) . "' width='50' height='50'></td>\n";
    echo "<td class='header'>\n";
    echo "<table class='header'>\n";
    echo "<select size='1' onchange='haha(this)'>\n";
    $plist = array();
    $num = dbrows($result);
    for ($n = 0; $n < $num; $n++) {
        $plist[] = dbarray($result);
    }
    if (key_exists('gid', $_GET)) {
        $gid = "&gid=" . $_GET['gid'];
    }
    if (key_exists('tid', $_GET)) {
        $tid = "&tid=" . $_GET['tid'];
    }
    if (key_exists('mode', $_GET)) {
        $mode = "&mode=" . $_GET['mode'];
    }
    for ($n = 0; $n < $num; $n++) {
        $planet = $plist[$n];
        if ($planet['type'] == 0) {
            continue;
        }
        $cp = $planet['planet_id'];
        $sel = "";
        if ($cp == $GlobalUser['aktplanet']) {
            $sel = "selected";
        }
        $g = $planet['g'];
        $s = $planet['s'];
        $p = $planet['p'];
        $name = $planet['name'];
        echo "    <option value='index.php?page=" . $page . "&session={$sess}&cp={$cp}{$gid}{$tid}{$mode}' {$sel}>{$name}  <a href='index.php?page=galaxy&galaxy={$g}&system={$s}&position={$p}&session={$sess}&cp={$cp}{$gid}{$tid}{$mode}' >[{$g}:{$s}:{$p}]</a></option>\n";
        $moon = DropListHasMoon($plist, $planet);
        if ($moon) {
            $planet = $moon;
            $cp = $planet['planet_id'];
            $sel = "";
            if ($cp == $GlobalUser['aktplanet']) {
                $sel = "selected";
            }
            $g = $planet['g'];
            $s = $planet['s'];
            $p = $planet['p'];
            $name = $planet['name'];
            echo "    <option value='index.php?page=" . $page . "&session={$sess}&cp={$cp}{$gid}{$tid}{$mode}' {$sel}>{$name}  <a href='index.php?page=galaxy&galaxy={$g}&system={$s}&position={$p}&session={$sess}&cp={$cp}{$gid}{$tid}{$mode}' >[{$g}:{$s}:{$p}]</a></option>\n";
        }
    }
    echo "</select></table></td></tr></table></td>\n\n";
}