Ejemplo n.º 1
0
 public function CreateUTF8Banner($data)
 {
     global $LNG;
     $image = imagecreatefromjpeg($this->source);
     $Font = $data['ttf_file'];
     if (!file_exists($Font)) {
         $this->BannerError('TTF Font missing!');
     }
     // Colors
     $color = imagecolorallocate($image, 255, 255, 225);
     $shadow = imagecolorallocate($image, 33, 33, 33);
     $total = $data['wons'] + $data['loos'] + $data['draws'];
     $quote = $total != 0 ? $data['wons'] / $total * 100 : 0;
     // Username
     imagettftext($image, 20, 0, 20, 31, $shadow, $Font, $data['username']);
     imagettftext($image, 20, 0, 20, 30, $color, $Font, $data['username']);
     imagettftext($image, 16, 0, 250, 31, $shadow, $Font, $data['game_name']);
     imagettftext($image, 16, 0, 250, 30, $color, $Font, $data['game_name']);
     imagettftext($image, 11, 0, 20, 60, $shadow, $Font, $LNG['ub_rank'] . ': ' . $data['total_rank']);
     imagettftext($image, 11, 0, 20, 59, $color, $Font, $LNG['ub_rank'] . ': ' . $data['total_rank']);
     imagettftext($image, 11, 0, 20, 81, $shadow, $Font, $LNG['ub_points'] . ': ' . html_entity_decode(shortly_number($data['total_points'])));
     imagettftext($image, 11, 0, 20, 80, $color, $Font, $LNG['ub_points'] . ': ' . html_entity_decode(shortly_number($data['total_points'])));
     imagettftext($image, 11, 0, 250, 60, $shadow, $Font, $LNG['ub_fights'] . ': ' . html_entity_decode(shortly_number($total, 0)));
     imagettftext($image, 11, 0, 250, 59, $color, $Font, $LNG['ub_fights'] . ': ' . html_entity_decode(shortly_number($total, 0)));
     imagettftext($image, 11, 0, 250, 81, $shadow, $Font, $LNG['ub_quote'] . ': ' . html_entity_decode(shortly_number($quote, 2)) . '%');
     imagettftext($image, 11, 0, 250, 80, $color, $Font, $LNG['ub_quote'] . ': ' . html_entity_decode(shortly_number($quote, 2)) . '%');
     if (!isset($_GET['debug'])) {
         HTTP::sendHeader('Content-type', 'image/jpg');
     }
     imagejpeg($image);
     imagedestroy($image);
 }
Ejemplo n.º 2
0
function GetElementPrice($user, $planet, $Element, $userfactor = true)
{
    global $pricelist, $resource, $lang;
    if ($userfactor) {
        $level = $planet[$resource[$Element]] ? $planet[$resource[$Element]] : $user[$resource[$Element]];
    }
    $is_buyeable = true;
    $array = array('metal' => $lang["Metal"], 'crystal' => $lang["Crystal"], 'deuterium' => $lang["Deuterium"], 'darkmatter' => $lang["Darkmatter"], 'energy_max' => $lang["Energy"]);
    $text = "<div><fieldset style='border-width:thin; border-color:black; border-style:solid;'><legend>" . $lang['fgp_require'] . "</legend>";
    $text .= "<table align='center' width='90%' border='0' cellspacing='3'>";
    // Colocamos los Iconos de los Requisitos
    $text .= "<tr>";
    foreach ($array as $ResType => $ResTitle) {
        if ($pricelist[$Element][$ResType] != 0) {
            $text .= "<td align='center'><img src='styles/images/requisitos/" . $ResType . ".png' width='40' alt='" . $ResTitle . "' title='" . $ResTitle . "'></td> ";
        }
    }
    $text .= "</tr>";
    // Colocamos los textos de los requisitos
    $text .= "<tr>";
    foreach ($array as $ResType => $ResTitle) {
        if ($pricelist[$Element][$ResType] != 0) {
            $text .= "<td align='center'>";
            if ($userfactor) {
                $cost = floor($pricelist[$Element][$ResType] * pow($pricelist[$Element]['factor'], $level));
            } else {
                $cost = floor($pricelist[$Element][$ResType]);
            }
            if ($cost > $planet[$ResType]) {
                $text .= "<b style=\"color:red;\"> <t title=\"-" . shortly_number($cost - $planet[$ResType]) . "\">";
                $text .= "<span class=\"noresources\">" . shortly_number($cost) . "</span></t></b> ";
                $is_buyeable = false;
            } else {
                $text .= "<b style=\"color:lime;\">" . shortly_number($cost) . "</b> ";
            }
        }
    }
    $text .= "</tr></table></fieldset></div>";
    return $text;
}
Ejemplo n.º 3
0
function ShowAccountDataPage()
{
    global $USER, $reslist, $resource, $LNG;
    $template = new template();
    $id_u = HTTP::_GP('id_u', 0);
    if (!empty($id_u)) {
        $OnlyQueryLogin = $GLOBALS['DATABASE']->getFirstRow("SELECT `id`, `authlevel` FROM " . USERS . " WHERE `id` = '" . $id_u . "' AND `universe` = '" . $_SESSION['adminuni'] . "';");
        if (!isset($OnlyQueryLogin)) {
            exit($template->message($LNG['ac_username_doesnt'], '?page=accoutdata'));
        } else {
            foreach (array_merge($reslist['officier'], $reslist['tech']) as $ID) {
                $SpecifyItemsUQ .= "u.`" . $resource[$ID] . "`,";
            }
            // COMIENZA SAQUEO DE DATOS DE LA TABLA DE USUARIOS
            $SpecifyItemsU = "u.id,u.username,u.email,u.email_2,u.authlevel,u.id_planet,u.galaxy,u.system,u.planet,u.user_lastip,u.ip_at_reg,u.darkmatter,u.register_time,u.onlinetime,u.urlaubs_modus,u.\n\t\t\t urlaubs_until,u.ally_id,a.ally_name," . $SpecifyItemsUQ . "\n\t\t\t u.ally_register_time,u.ally_rank_id,u.bana,u.banaday";
            $UserQuery = $GLOBALS['DATABASE']->getFirstRow("SELECT " . $SpecifyItemsU . " FROM " . USERS . " as u LEFT JOIN " . SESSION . " as s ON s.userID = u.id LEFT JOIN " . ALLIANCE . " a ON a.id = u.ally_id WHERE u.`id` = '" . $id_u . "';");
            $reg_time = _date($LNG['php_tdformat'], $UserQuery['register_time'], $USER['timezone']);
            $onlinetime = _date($LNG['php_tdformat'], $UserQuery['onlinetime'], $USER['timezone']);
            $id = $UserQuery['id'];
            $nombre = $UserQuery['username'];
            $email_1 = $UserQuery['email'];
            $email_2 = $UserQuery['email_2'];
            $ip = $UserQuery['ip_at_reg'];
            $ip2 = $UserQuery['user_lastip'];
            $id_p = $UserQuery['id_planet'];
            $g = $UserQuery['galaxy'];
            $s = $UserQuery['system'];
            $p = $UserQuery['planet'];
            $info = $UserQuery['user_ua'];
            $alianza = $UserQuery['ally_name'];
            $nivel = $LNG['rank'][$UserQuery['authlevel']];
            $vacas = $LNG['one_is_yes'][$UserQuery['urlaubs_modus']];
            $suspen = $LNG['one_is_yes'][$UserQuery['bana']];
            $mo = "<a title=\"" . pretty_number($UserQuery['darkmatter']) . "\">" . shortly_number($UserQuery['darkmatter']) . "</a>";
            foreach ($reslist['officier'] as $ID) {
                $officier[] = $ID;
            }
            foreach ($reslist['tech'] as $ID) {
                $techno[] = $ID;
            }
            $techoffi = "";
            for ($i = 0; $i < max(count($reslist['officier']), count($reslist['tech'])); $i++) {
                $techoffi .= isset($techno[$i]) ? "<tr><td>" . $LNG['tech'][$techno[$i]] . ": <font color=aqua>" . $UserQuery[$resource[$techno[$i]]] . "</font></td>" : "<tr><td>&nbsp;</td>";
                $techoffi .= isset($officier[$i]) ? "<td>" . $LNG['tech'][$officier[$i]] . ": <font color=aqua>" . $UserQuery[$resource[$officier[$i]]] . "</font></td></tr>" : "<td>&nbsp;</td></tr>";
            }
            if ($UserQuery['bana'] != 0) {
                $mas = '<a ref="#" onclick="$(\'#banned\').slideToggle();return false"> ' . $LNG['ac_more'] . '</a>';
                $BannedQuery = $GLOBALS['DATABASE']->getFirstRow("SELECT theme,time,longer,author FROM " . BANNED . " WHERE `who` = '" . $UserQuery['username'] . "';");
                $sus_longer = _date($LNG['php_tdformat'], $BannedQuery['longer'], $USER['timezone']);
                $sus_time = _date($LNG['php_tdformat'], $BannedQuery['time'], $USER['timezone']);
                $sus_reason = $BannedQuery['theme'];
                $sus_author = $BannedQuery['author'];
            }
            // COMIENZA EL SAQUEO DE DATOS DE LA TABLA DE PUNTAJE
            $SpecifyItemsS = "tech_count,defs_count,fleet_count,build_count,build_points,tech_points,defs_points,fleet_points,tech_rank,build_rank,defs_rank,fleet_rank,total_points,\n\t\t\tstat_type";
            $StatQuery = $GLOBALS['DATABASE']->getFirstRow("SELECT " . $SpecifyItemsS . " FROM " . STATPOINTS . " WHERE `id_owner` = '" . $id_u . "' AND `stat_type` = '1';");
            $count_tecno = pretty_number($StatQuery['tech_count']);
            $count_def = pretty_number($StatQuery['defs_count']);
            $count_fleet = pretty_number($StatQuery['fleet_count']);
            $count_builds = pretty_number($StatQuery['build_count']);
            $point_builds = pretty_number($StatQuery['build_points']);
            $point_tecno = pretty_number($StatQuery['tech_points']);
            $point_def = pretty_number($StatQuery['defs_points']);
            $point_fleet = pretty_number($StatQuery['fleet_points']);
            $ranking_tecno = $StatQuery['tech_rank'];
            $ranking_builds = $StatQuery['build_rank'];
            $ranking_def = $StatQuery['defs_rank'];
            $ranking_fleet = $StatQuery['fleet_rank'];
            $total_points = pretty_number($StatQuery['total_points']);
            // COMIENZA EL SAQUEO DE DATOS DE LA ALIANZA
            $AliID = $UserQuery['ally_id'];
            if ($alianza == 0 && $AliID == 0) {
                $alianza = $LNG['ac_no_ally'];
                $AllianceHave = "<span class=\"no_moon\"><img src=\"./styles/resource/images/admin/arrowright.png\" width=\"16\" height=\"10\"/> \n\t\t\t\t\t\t\t" . $LNG['ac_alliance'] . "&nbsp;" . $LNG['ac_no_alliance'] . "</span>";
            } elseif ($alianza != NULL && $AliID != 0) {
                include_once 'includes/functions/BBCode.php';
                $AllianceHave = '<a href="#" onclick="$(\'#alianza\').slideToggle();return false" class="link">
							<img src="./styles/resource/images/admin/arrowright.png" width="16" height="10"> ' . $LNG['ac_alliance'] . '</a>';
                $SpecifyItemsA = "ally_owner,id,ally_tag,ally_name,ally_web,ally_description,ally_text,ally_request,ally_image,ally_members,ally_register_time";
                $AllianceQuery = $GLOBALS['DATABASE']->getFirstRow("SELECT " . $SpecifyItemsA . " FROM " . ALLIANCE . " WHERE `ally_name` = '" . $alianza . "';");
                $alianza = $alianza;
                $id_ali = " (" . $LNG['ac_ali_idid'] . "&nbsp;" . $AliID . ")";
                $id_aliz = $AllianceQuery['id'];
                $tag = $AllianceQuery['ally_tag'];
                $ali_nom = $AllianceQuery['ally_name'];
                $ali_cant = $AllianceQuery['ally_members'];
                $ally_register_time = _date($LNG['php_tdformat'], $AllianceQuery['ally_register_time'], $USER['timezone']);
                $ali_lider = $AllianceQuery['ally_owner'];
                $ali_web = $AllianceQuery['ally_web'] != NULL ? "<a href=" . $AllianceQuery['ally_web'] . " target=_blank>" . $AllianceQuery['ally_web'] . "</a>" : $LNG['ac_no_web'];
                if ($AllianceQuery['ally_description'] != NULL) {
                    $ali_ext2 = bbcode($AllianceQuery['ally_description']);
                    $ali_ext = "<a href=\"#\" rel=\"toggle[externo]\">" . $LNG['ac_view_text_ext'] . "</a>";
                } else {
                    $ali_ext = $LNG['ac_no_text_ext'];
                }
                if ($AllianceQuery['ally_text'] != NULL) {
                    $ali_int2 = bbcode($AllianceQuery['ally_text']);
                    $ali_int = "<a href=\"#\" rel=\"toggle[interno]\">" . $LNG['ac_view_text_int'] . "</a>";
                } else {
                    $ali_int = $LNG['ac_no_text_int'];
                }
                if ($AllianceQuery['ally_request'] != NULL) {
                    $ali_sol2 = bbcode($AllianceQuery['ally_request']);
                    $ali_sol = "<a href=\"#\" rel=\"toggle[solicitud]\">" . $LNG['ac_view_text_sol'] . "</a>";
                } else {
                    $ali_sol = $LNG['ac_no_text_sol'];
                }
                if ($AllianceQuery['ally_image'] != NULL) {
                    $ali_logo2 = $AllianceQuery['ally_image'];
                    $ali_logo = "<a href=\"#\" rel=\"toggle[imagen]\">" . $LNG['ac_view_image2'] . "</a>";
                } else {
                    $ali_logo = $LNG['ac_no_img'];
                }
                $SearchLeader = $GLOBALS['DATABASE']->getFirstRow("SELECT `username` FROM " . USERS . " WHERE `id` = '" . $ali_lider . "';");
                $ali_lider = $SearchLeader['username'];
                $StatQueryAlly = $GLOBALS['DATABASE']->getFirstRow("SELECT " . $SpecifyItemsS . " FROM " . STATPOINTS . " WHERE `id_owner` = '" . $ali_lider . "' AND `stat_type` = '2';");
                $count_tecno_ali = pretty_number($StatQueryAlly['tech_count']);
                $count_def_ali = pretty_number($StatQueryAlly['defs_count']);
                $count_fleet_ali = pretty_number($StatQueryAlly['fleet_count']);
                $count_builds_ali = pretty_number($StatQueryAlly['build_count']);
                $point_builds_ali = pretty_number($StatQueryAlly['build_points']);
                $point_tecno_ali = pretty_number($StatQueryAlly['tech_points']);
                $point_def_ali = pretty_number($StatQueryAlly['defs_points']);
                $point_fleet_ali = pretty_number($StatQueryAlly['fleet_points']);
                $ranking_tecno_ali = pretty_number($StatQueryAlly['tech_rank']);
                $ranking_builds_ali = pretty_number($StatQueryAlly['build_rank']);
                $ranking_def_ali = pretty_number($StatQueryAlly['defs_rank']);
                $ranking_fleet_ali = pretty_number($StatQueryAlly['fleet_rank']);
                $total_points_ali = pretty_number($StatQueryAlly['total_points']);
            }
            foreach (array_merge($reslist['fleet'], $reslist['build'], $reslist['defense']) as $ID) {
                $SpecifyItemsPQ .= "`" . $resource[$ID] . "`,";
                $RES[$resource[$ID]] = "<tr><td width=\"150\">" . $LNG['tech'][$ID] . "</td>";
            }
            $names = "<tr><th class=\"center\" width=\"150\">&nbsp;</th>";
            // COMIENZA EL SAQUEO DE DATOS DE LOS PLANETAS
            $SpecifyItemsP = "planet_type,id,name,galaxy,system,planet,destruyed,diameter,field_current,field_max,temp_min,temp_max,metal,crystal,deuterium,energy," . $SpecifyItemsPQ . "energy_used";
            $PlanetsQuery = $GLOBALS['DATABASE']->query("SELECT " . $SpecifyItemsP . " FROM " . PLANETS . " WHERE `id_owner` = '" . $id_u . "';");
            while ($PlanetsWhile = $GLOBALS['DATABASE']->fetch_array($PlanetsQuery)) {
                if ($PlanetsWhile['planet_type'] == 3) {
                    $Planettt = $PlanetsWhile['name'] . "&nbsp;(" . $LNG['ac_moon'] . ")<br><font color=aqua>[" . $PlanetsWhile['galaxy'] . ":" . $PlanetsWhile['system'] . ":" . $PlanetsWhile['planet'] . "]</font>";
                    $MoonZ = 0;
                    $Moons = $PlanetsWhile['name'] . "&nbsp;(" . $LNG['ac_moon'] . ")<br><font color=aqua>[" . $PlanetsWhile['galaxy'] . ":" . $PlanetsWhile['system'] . ":" . $PlanetsWhile['planet'] . "]</font>";
                    $MoonZ++;
                } else {
                    $Planettt = $PlanetsWhile['name'] . "<br><font color=aqua>[" . $PlanetsWhile['galaxy'] . ":" . $PlanetsWhile['system'] . ":" . $PlanetsWhile['planet'] . "]</font>";
                }
                if ($PlanetsWhile["destruyed"] == 0) {
                    $planets_moons .= "\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>" . $Planettt . "</td>\n\t\t\t\t\t\t<td>" . $PlanetsWhile['id'] . "</td>\n\t\t\t\t\t\t<td>" . pretty_number($PlanetsWhile['diameter']) . "</td>\n\t\t\t\t\t\t<td>" . pretty_number($PlanetsWhile['field_current']) . " / " . pretty_number(CalculateMaxPlanetFields($PlanetsWhile)) . " (" . pretty_number($PlanetsWhile['field_current']) . " / " . pretty_number($PlanetsWhile['field_max']) . ")</td>\n\t\t\t\t\t\t<td>" . pretty_number($PlanetsWhile['temp_min']) . " / " . pretty_number($PlanetsWhile['temp_max']) . "</td>" . (allowedTo('ShowQuickEditorPage') ? "<td><a href=\"javascript:openEdit('" . $PlanetsWhile['id'] . "', 'planet');\" border=\"0\"><img src=\"./styles/resource/images/admin/GO.png\" title=" . $LNG['se_search_edit'] . "></a></td>" : "") . "</tr>";
                    $SumOfEnergy = $PlanetsWhile['energy'] + $PlanetsWhile['energy_used'];
                    if ($SumOfEnergy < 0) {
                        $Color = "<font color=#FF6600>" . shortly_number($SumOfEnergy) . "</font>";
                    } elseif ($SumOfEnergy > 0) {
                        $Color = "<font color=lime>" . shortly_number($SumOfEnergy) . "</font>";
                    } else {
                        $Color = shortly_number($SumOfEnergy);
                    }
                    $resources .= "\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>" . $Planettt . "</td>\n\t\t\t\t\t\t<td><a title=\"" . pretty_number($PlanetsWhile['metal']) . "\">" . shortly_number($PlanetsWhile['metal']) . "</a></td>\n\t\t\t\t\t\t<td><a title=\"" . pretty_number($PlanetsWhile['crystal']) . "\">" . shortly_number($PlanetsWhile['crystal']) . "</a></td>\n\t\t\t\t\t\t<td><a title=\"" . pretty_number($PlanetsWhile['deuterium']) . "\">" . shortly_number($PlanetsWhile['deuterium']) . "</a></td>\n\t\t\t\t\t\t<td><a title=\"" . pretty_number($SumOfEnergy) . "\">" . $Color . "</a>/<a title=\"" . pretty_number($PlanetsWhile['energy']) . "\">" . shortly_number($PlanetsWhile['energy']) . "</a></td>\n\t\t\t\t\t</tr>";
                    $names .= "<th class=\"center\" width=\"60\">" . $Planettt . "</th>";
                    foreach (array_merge($reslist['fleet'], $reslist['build'], $reslist['defense']) as $ID) {
                        $RES[$resource[$ID]] .= "<td width=\"60\"><a title=\"" . pretty_number($PlanetsWhile[$resource[$ID]]) . "\">" . shortly_number($PlanetsWhile[$resource[$ID]]) . "</a></td>";
                    }
                    $MoonHave = $MoonZ != 0 ? '<a href="#" onclick="$(\'#especiales\').slideToggle();return false" class="link"><img src="./styles/resource/images/admin/arrowright.png" width="16" height="10"/> ' . $LNG['moon_build'] . "</a>" : "<span class=\"no_moon\"><img src=\"./styles/resource/images/admin/arrowright.png\" width=\"16\" height=\"10\"/>" . $LNG['moon_build'] . "&nbsp;" . $LNG['ac_moons_no'] . "</span>";
                }
                $DestruyeD = 0;
                if ($PlanetsWhile["destruyed"] > 0) {
                    $destroyed .= "\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>" . $PlanetsWhile['name'] . "</td>\n\t\t\t\t\t\t\t<td>" . $PlanetsWhile['id'] . "</td>\n\t\t\t\t\t\t\t<td>[" . $PlanetsWhile['galaxy'] . ":" . $PlanetsWhile['system'] . ":" . $PlanetsWhile['planet'] . "]</td>\n\t\t\t\t\t\t\t<td>" . date("d-m-Y   H:i:s", $PlanetsWhile['destruyed']) . "</td>\n\t\t\t\t\t\t</tr>";
                    $DestruyeD++;
                }
            }
            $names .= "</tr>";
            foreach (array_merge($reslist['fleet'], $reslist['build'], $reslist['defense']) as $ID) {
                $RES[$resource[$ID]] .= "</tr>";
            }
            foreach ($reslist['build'] as $ID) {
                $build .= $RES[$resource[$ID]];
            }
            foreach ($reslist['fleet'] as $ID) {
                $fleet .= $RES[$resource[$ID]];
            }
            foreach ($reslist['defense'] as $ID) {
                $defense .= $RES[$resource[$ID]];
            }
            $template->assign_vars(array('DestruyeD' => $DestruyeD, 'destroyed' => $destroyed, 'resources' => $resources, 'mo' => $mo, 'names' => $names, 'build' => $build, 'fleet' => $fleet, 'defense' => $defense, 'planets_moons' => $planets_moons, 'ali_lider' => $ali_lider, 'AllianceHave' => $AllianceHave, 'point_tecno' => $point_tecno, 'count_tecno' => $count_tecno, 'ranking_tecno' => $ranking_tecno, 'defenses_title' => $defenses_title, 'point_def' => $point_def, 'count_def' => $count_def, 'ranking_def' => $ranking_def, 'point_fleet' => $point_fleet, 'count_fleet' => $count_fleet, 'ranking_fleet' => $ranking_fleet, 'point_builds' => $point_builds, 'count_builds' => $count_builds, 'ranking_builds' => $ranking_builds, 'total_points' => $total_points, 'point_tecno_ali' => $point_tecno_ali, 'count_tecno_ali' => $count_tecno_ali, 'ranking_tecno_ali' => $ranking_tecno_ali, 'point_def_ali' => $point_def_ali, 'count_def_ali' => $count_def_ali, 'ranking_def_ali' => $ranking_def_ali, 'point_fleet_ali' => $point_fleet_ali, 'count_fleet_ali' => $count_fleet_ali, 'ranking_fleet_ali' => $ranking_fleet_ali, 'point_builds_ali' => $point_builds_ali, 'count_builds_ali' => $count_builds_ali, 'ranking_builds_ali' => $ranking_builds_ali, 'total_points_ali' => $total_points_ali, 'input_id' => $input_id, 'id_aliz' => $id_aliz, 'tag' => $tag, 'ali_nom' => $ali_nom, 'ali_ext' => $ali_ext, 'ali_ext' => $ali_ext2, 'ali_int' => $ali_int, 'ali_int' => $ali_int2, 'ali_sol2' => $ali_sol2, 'ali_sol' => $ali_sol, 'ali_logo' => $ali_logo, 'ali_logo2' => $ali_logo2, 'ali_web' => $ali_web, 'ally_register_time' => $ally_register_time, 'ali_cant' => $ali_cant, 'alianza' => $alianza, 'input_id' => $input_id, 'id' => $id, 'nombre' => $nombre, 'nivel' => $nivel, 'vacas' => $vacas, 'suspen' => $suspen, 'mas' => $mas, 'id_ali' => $id_ali, 'ip' => $ip, 'ip2' => $ip2, 'ipcheck' => true, 'reg_time' => $reg_time, 'onlinetime' => $onlinetime, 'id_p' => $id_p, 'g' => $g, 's' => $s, 'p' => $p, 'info' => $info, 'email_1' => $email_1, 'email_2' => $email_2, 'sus_time' => $sus_time, 'sus_longer' => $sus_longer, 'sus_reason' => $sus_reason, 'sus_author' => $sus_author, 'techoffi' => $techoffi, 'canedit' => allowedTo('ShowQuickEditorPage'), 'buildings_title' => $LNG['buildings_title'], 'buildings_title' => $LNG['buildings_title'], 'researchs_title	' => $LNG['researchs_title'], 'ships_title' => $LNG['ships_title'], 'defenses_title' => $LNG['defenses_title'], 'ac_recent_destroyed_planets' => $LNG['ac_recent_destroyed_planets'], 'ac_isnodestruyed' => $LNG['ac_isnodestruyed'], 'ac_note_k' => $LNG['ac_note_k'], 'ac_leyend' => $LNG['ac_leyend'], 'ac_account_data' => $LNG['ac_account_data'], 'ac_name' => $LNG['ac_name'], 'ac_mail' => $LNG['ac_mail'], 'ac_perm_mail' => $LNG['ac_perm_mail'], 'ac_auth_level' => $LNG['ac_auth_level'], 'ac_on_vacation' => $LNG['ac_on_vacation'], 'ac_banned' => $LNG['ac_banned'], 'ac_alliance' => $LNG['ac_alliance'], 'ac_reg_ip' => $LNG['ac_reg_ip'], 'ac_last_ip' => $LNG['ac_last_ip'], 'ac_checkip_title' => $LNG['ac_checkip_title'], 'ac_register_time' => $LNG['ac_register_time'], 'ac_act_time' => $LNG['ac_act_time'], 'ac_home_planet_id' => $LNG['ac_home_planet_id'], 'ac_home_planet_coord' => $LNG['ac_home_planet_coord'], 'ac_user_system' => $LNG['ac_user_system'], 'ac_ranking' => $LNG['ac_ranking'], 'ac_see_ranking' => $LNG['ac_see_ranking'], 'ac_user_ranking' => $LNG['ac_user_ranking'], 'ac_points_count' => $LNG['ac_points_count'], 'ac_ranking' => $LNG['ac_ranking'], 'ac_total_points' => $LNG['ac_total_points'], 'ac_suspended_title' => $LNG['ac_suspended_title'], 'ac_suspended_time' => $LNG['ac_suspended_time'], 'ac_suspended_longer' => $LNG['ac_suspended_longer'], 'ac_suspended_reason' => $LNG['ac_suspended_reason'], 'ac_suspended_autor' => $LNG['ac_suspended_autor'], 'ac_info_ally' => $LNG['ac_info_ally'], 'ac_leader' => $LNG['ac_leader'], 'ac_tag' => $LNG['ac_tag'], 'ac_name_ali' => $LNG['ac_name_ali'], 'ac_ext_text		' => $LNG['ac_ext_text'], 'ac_int_text' => $LNG['ac_int_text'], 'ac_sol_text' => $LNG['ac_sol_text'], 'ac_image' => $LNG['ac_image'], 'ac_ally_web' => $LNG['ac_ally_web'], 'ac_total_members' => $LNG['ac_total_members'], 'ac_ranking' => $LNG['ac_ranking'], 'ac_see_ranking' => $LNG['ac_see_ranking'], 'ac_view_image' => $LNG['ac_view_image'], 'ac_urlnow' => $LNG['ac_urlnow'], 'ac_ally_ranking' => $LNG['ac_ally_ranking'], 'ac_points_count' => $LNG['ac_points_count'], 'ac_ranking' => $LNG['ac_ranking'], 'ac_total_points' => $LNG['ac_total_points'], 'ac_id_names_coords' => $LNG['ac_id_names_coords'], 'ac_name' => $LNG['ac_name'], 'ac_diameter' => $LNG['ac_diameter'], 'ac_fields' => $LNG['ac_fields'], 'ac_temperature' => $LNG['ac_temperature'], 'se_search_edit' => $LNG['se_search_edit'], 'resources_title' => $LNG['resources_title'], 'ac_name' => $LNG['ac_name'], 'Metal' => $LNG['tech'][901], 'Crystal' => $LNG['tech'][902], 'Deuterium' => $LNG['tech'][903], 'Energy' => $LNG['tech'][911], 'Darkmatter' => $LNG['tech'][921], 'buildings_title' => $LNG['buildings_title'], 'ships_title' => $LNG['ships_title'], 'defenses_title' => $LNG['defenses_title'], 'ac_officier_research' => $LNG['ac_officier_research'], 'researchs_title' => $LNG['researchs_title'], 'officiers_title' => $LNG['officiers_title'], 'ac_name' => $LNG['ac_name'], 'input_id' => $LNG['input_id'], 'ac_coords' => $LNG['ac_coords'], 'ac_time_destruyed' => $LNG['ac_time_destruyed']));
            $template->show('AccountDataPageDetail.tpl');
        }
        exit;
    }
    $Userlist = "";
    $UserWhileLogin = $GLOBALS['DATABASE']->query("SELECT `id`, `username`, `authlevel` FROM " . USERS . " WHERE `authlevel` <= '" . $USER['authlevel'] . "' AND `universe` = '" . $_SESSION['adminuni'] . "' ORDER BY `username` ASC;");
    while ($UserList = $GLOBALS['DATABASE']->fetch_array($UserWhileLogin)) {
        $Userlist .= "<option value=\"" . $UserList['id'] . "\">" . $UserList['username'] . "&nbsp;&nbsp;(" . $LNG['rank'][$UserList['authlevel']] . ")</option>";
    }
    $template->loadscript('filterlist.js');
    $template->assign_vars(array('Userlist' => $Userlist, 'ac_enter_user_id' => $LNG['ac_enter_user_id'], 'bo_select_title' => $LNG['bo_select_title'], 'button_filter' => $LNG['button_filter'], 'button_deselect' => $LNG['button_deselect'], 'ac_select_id_num' => $LNG['ac_select_id_num'], 'button_submit' => $LNG['button_submit']));
    $template->show('AccountDataPageIntro.tpl');
}
Ejemplo n.º 4
0
 private function Menus()
 {
     global $PLANET, $LNG, $USER, $CONF;
     //PlanetMenu
     if (empty($this->UserPlanets)) {
         $this->getplanets();
     }
     $this->loadscript("planetmenu.js");
     $this->loadscript("topnav.js");
     $this->execscript("PlanetMenu();");
     $this->phpself = "?page=" . request_var('page', '') . "&amp;mode=" . request_var('mode', '');
     $PlanetSelect = array();
     $Scripttime = array();
     foreach ($this->UserPlanets as $CurPlanetID => $PlanetQuery) {
         if (!empty($PlanetQuery['b_building_id'])) {
             $QueueArray = explode(";", $PlanetQuery['b_building_id']);
             $ActualCount = count($QueueArray);
             for ($ID = 0; $ID < $ActualCount; $ID++) {
                 $ListIDArray = explode(",", $QueueArray[$ID]);
                 if ($ListIDArray[3] > TIMESTAMP) {
                     $Scripttime[$PlanetQuery['id']][] = $ListIDArray[3];
                 }
             }
         }
         $Planetlist[$PlanetQuery['id']] = array('url' => $this->phpself . "&amp;cp=" . $PlanetQuery['id'], 'name' => $PlanetQuery['name'] . ($PlanetQuery['planet_type'] == 3 ? " (" . $LNG['fcm_moon'] . ")" : ""), 'image' => $PlanetQuery['image'], 'galaxy' => $PlanetQuery['galaxy'], 'system' => $PlanetQuery['system'], 'planet' => $PlanetQuery['planet'], 'ptype' => $PlanetQuery['planet_type']);
         $PlanetSelect[$this->phpself . "&amp;cp=" . $PlanetQuery['id']] = $PlanetQuery['name'] . ($PlanetQuery['planet_type'] == 3 ? " (" . $LNG['fcm_moon'] . ")" : "") . "&nbsp;[" . $PlanetQuery['galaxy'] . ":" . $PlanetQuery['system'] . ":" . $PlanetQuery['planet'] . "]&nbsp;&nbsp;";
     }
     if ($USER['urlaubs_modus'] == 1) {
         $CONF['metal_basic_income'] = 0;
         $CONF['crystal_basic_income'] = 0;
         $CONF['deuterium_basic_income'] = 0;
         $CONF['norio_basic_income'] = 0;
     }
     $this->assign_vars(array('PlanetMenu' => $Planetlist, 'show_planetmenu' => $LNG['show_planetmenu'], 'current_pid' => $PLANET['id'], 'Scripttime' => json_encode($Scripttime), 'lm_overview' => $LNG['lm_overview'], 'lm_empire' => $LNG['lm_empire'], 'lm_buildings' => $LNG['lm_buildings'], 'lm_resources' => $LNG['lm_resources'], 'lm_trader' => $LNG['lm_trader'], 'lm_fleettrader' => $LNG['lm_fleettrader'], 'lm_research' => $LNG['lm_research'], 'lm_shipshard' => $LNG['lm_shipshard'], 'lm_fleet' => $LNG['lm_fleet'], 'lm_technology' => $LNG['lm_technology'], 'lm_galaxy' => $LNG['lm_galaxy'], 'lm_defenses' => $LNG['lm_defenses'], 'lm_alliance' => $LNG['lm_alliance'], 'lm_forums' => $LNG['lm_forums'], 'lm_officiers' => $LNG['lm_officiers'], 'lm_statistics' => $LNG['lm_statistics'], 'lm_records' => $LNG['lm_records'], 'lm_topkb' => $LNG['lm_topkb'], 'lm_search' => $LNG['lm_search'], 'lm_battlesim' => $LNG['lm_battlesim'], 'lm_messages' => $LNG['lm_messages'], 'lm_notes' => $LNG['lm_notes'], 'lm_buddylist' => $LNG['lm_buddylist'], 'lm_chat' => $LNG['lm_chat'], 'lm_support' => $LNG['lm_support'], 'lm_faq' => $LNG['lm_faq'], 'lm_options' => $LNG['lm_options'], 'lm_banned' => $LNG['lm_banned'], 'lm_rules' => $LNG['lm_rules'], 'lm_logout' => $LNG['lm_logout'], 'new_message' => $USER['new_message'], 'forum_url' => $CONF['forum_url'], 'lm_administration' => $LNG['lm_administration'], 'topnav' => true, 'metal' => $PLANET['metal'], 'crystal' => $PLANET['crystal'], 'deuterium' => $PLANET['deuterium'], 'norio' => $PLANET['norio'], 'energy' => $PLANET["energy_max"] + $PLANET["energy_used"] < 0 ? colorRed(pretty_number($PLANET["energy_max"] + $PLANET["energy_used"]) . "/" . pretty_number($PLANET["energy_max"])) : pretty_number($PLANET["energy_max"] + $PLANET["energy_used"]) . "/" . pretty_number($PLANET["energy_max"]), 'darkmatter' => pretty_number($USER["darkmatter"]), 'metal_max' => shortly_number($PLANET["metal_max"]), 'crystal_max' => shortly_number($PLANET["crystal_max"]), 'deuterium_max' => shortly_number($PLANET["deuterium_max"]), 'norio_max' => shortly_number($PLANET["norio_max"]), 'alt_metal_max' => pretty_number($PLANET["metal_max"]), 'alt_crystal_max' => pretty_number($PLANET["crystal_max"]), 'alt_deuterium_max' => pretty_number($PLANET["deuterium_max"]), 'alt_norio_max' => pretty_number($PLANET["norio_max"]), 'js_metal_max' => floattostring($PLANET["metal_max"]), 'js_crystal_max' => floattostring($PLANET["crystal_max"]), 'js_deuterium_max' => floattostring($PLANET["deuterium_max"]), 'js_norio_max' => floattostring($PLANET["norio_max"]), 'js_metal_hr' => $PLANET['planet_type'] == 1 ? floattostring($PLANET['metal_perhour'] + $CONF['metal_basic_income'] * $CONF['resource_multiplier']) : 0, 'js_crystal_hr' => $PLANET['planet_type'] == 1 ? floattostring($PLANET['crystal_perhour'] + $CONF['crystal_basic_income'] * $CONF['resource_multiplier']) : 0, 'js_deuterium_hr' => $PLANET['planet_type'] == 1 ? floattostring($PLANET['deuterium_perhour'] + $CONF['deuterium_basic_income'] * $CONF['resource_multiplier']) : 0, 'js_norio_hr' => $PLANET['planet_type'] == 1 ? floattostring($PLANET['norio_perhour'] + $CONF['norio_basic_income'] * $CONF['resource_multiplier']) : 0, 'current_planet' => $this->phpself . "&amp;cp=" . $PLANET['id'], 'tn_vacation_mode' => $LNG['tn_vacation_mode'], 'closed' => !$CONF['game_disable'] ? $LNG['ov_closed'] : false, 'vacation' => $USER['urlaubs_modus'] ? date(TDFORMAT, $USER['urlaubs_until']) : false, 'delete' => $USER['db_deaktjava'] ? sprintf($LNG['tn_delete_mode'], date(TDFORMAT, strtotime("+7 day", $USER['db_deaktjava']))) : false, 'image' => $PLANET['image'], 'settings_tnstor' => $USER['settings_tnstor'], 'PlanetSelect' => $PlanetSelect, 'Metal' => $LNG['Metal'], 'Crystal' => $LNG['Crystal'], 'Deuterium' => $LNG['Deuterium'], 'Norio' => $LNG['Norio'], 'Darkmatter' => $LNG['Darkmatter'], 'Energy' => $LNG['Energy']));
 }
Ejemplo n.º 5
0
 if ($PlanetsWhile["destruyed"] == 0) {
     $parse['planets_moons'] .= "\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<th>" . $Planettt . "</th>\r\n\t\t\t\t\t\t<th>" . $PlanetsWhile['id'] . "</th>\r\n\t\t\t\t\t\t<th>" . pretty_number($PlanetsWhile['diameter']) . "</th>\r\n\t\t\t\t\t\t<th>" . pretty_number($PlanetsWhile['field_current']) . "/" . pretty_number($PlanetsWhile['field_max']) . "</th>\r\n\t\t\t\t\t\t<th>" . pretty_number($PlanetsWhile['temp_min']) . "/" . pretty_number($PlanetsWhile['temp_max']) . "</th>\r\n\t\t\t\t\t</tr>";
     $SumOfEnergy = $PlanetsWhile['energy_max'] + $PlanetsWhile['energy_used'];
     if ($SumOfEnergy < 0) {
         $Color = "<font color=#FF6600>" . shortly_number($SumOfEnergy) . "</font>";
     } elseif ($SumOfEnergy > 0) {
         $Color = "<font color=lime>" . shortly_number($SumOfEnergy) . "</font>";
     } else {
         $Color = shortly_number($SumOfEnergy);
     }
     $parse['resources'] .= "\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<th>" . $Planettt . "</th>\r\n\t\t\t\t\t\t<th><a title=\"" . pretty_number($PlanetsWhile['metal']) . "\">" . shortly_number($PlanetsWhile['metal']) . "</a></th>\r\n\t\t\t\t\t\t<th><a title=\"" . pretty_number($PlanetsWhile['crystal']) . "\">" . shortly_number($PlanetsWhile['crystal']) . "</a></th>\r\n\t\t\t\t\t\t<th><a title=\"" . pretty_number($PlanetsWhile['deuterium']) . "\">" . shortly_number($PlanetsWhile['deuterium']) . "</a></th>\r\n\t\t\t\t\t\t<th><a title=\"" . pretty_number($SumOfEnergy) . "\">" . $Color . "</a>/<a title=\"" . pretty_number($PlanetsWhile['energy_max']) . "\">" . shortly_number($PlanetsWhile['energy_max']) . "</a></th>\r\n\t\t\t\t\t</tr>";
     $parse['ships'] .= "\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<th width=\"10%\">" . $Planettt . "</th>\r\n\t\t\t\t\t\t<th width=\"10%\"><a title=\"" . pretty_number($PlanetsWhile['small_ship_cargo']) . "\">" . shortly_number($PlanetsWhile['small_ship_cargo']) . "</a></th>\r\n\t\t\t\t\t\t<th width=\"10%\"><a title=\"" . pretty_number($PlanetsWhile['big_ship_cargo']) . "\">" . shortly_number($PlanetsWhile['big_ship_cargo']) . "</a></th>\r\n\t\t\t\t\t\t<th width=\"10%\"><a title=\"" . pretty_number($PlanetsWhile['light_hunter']) . "\">" . shortly_number($PlanetsWhile['light_hunter']) . "</a></th>\r\n\t\t\t\t\t\t<th width=\"10%\"><a title=\"" . pretty_number($PlanetsWhile['heavy_hunter']) . "\">" . shortly_number($PlanetsWhile['heavy_hunter']) . "</a></th>\r\n\t\t\t\t\t\t<th width=\"10%\"><a title=\"" . pretty_number($PlanetsWhile['crusher']) . "\">" . shortly_number($PlanetsWhile['crusher']) . "</a></th>\r\n\t\t\t\t\t\t<th width=\"10%\"><a title=\"" . pretty_number($PlanetsWhile['battle_ship']) . "\">" . shortly_number($PlanetsWhile['battle_ship']) . "</a></th>\r\n\t\t\t\t\t\t<th width=\"10%\"><a title=\"" . pretty_number($PlanetsWhile['colonizer']) . "\">" . shortly_number($PlanetsWhile['colonizer']) . "</a></th>\r\n\t\t\t\t\t\t<th width=\"10%\"><a title=\"" . pretty_number($PlanetsWhile['recycler']) . "\">" . shortly_number($PlanetsWhile['recycler']) . "</a></th>\r\n\t\t\t\t\t\t<th width=\"10%\"><a title=\"" . pretty_number($PlanetsWhile['spy_sonde']) . "\">" . shortly_number($PlanetsWhile['spy_sonde']) . "</a></th>\r\n\t\t\t\t\t\t<th width=\"10%\"><a title=\"" . pretty_number($PlanetsWhile['bomber_ship']) . "\">" . shortly_number($PlanetsWhile['bomber_ship']) . "</a></th>\r\n\t\t\t\t\t\t<th width=\"10%\"><a title=\"" . pretty_number($PlanetsWhile['solar_satelit']) . "\">" . shortly_number($PlanetsWhile['solar_satelit']) . "</a></th>\r\n\t\t\t\t\t\t<th width=\"10%\"><a title=\"" . pretty_number($PlanetsWhile['destructor']) . "\">" . shortly_number($PlanetsWhile['destructor']) . "</a></th>\r\n\t\t\t\t\t\t<th width=\"10%\"><a title=\"" . pretty_number($PlanetsWhile['dearth_star']) . "\">" . shortly_number($PlanetsWhile['dearth_star']) . "</a></th>\r\n\t\t\t\t\t\t<th width=\"10%\"><a title=\"" . pretty_number($PlanetsWhile['battleship']) . "\">" . shortly_number($PlanetsWhile['battleship']) . "</a></th>\r\n\t\t\t\t\t\t<th width=\"10%\"><a title=\"" . pretty_number($PlanetsWhile['supernova']) . "\">" . shortly_number($PlanetsWhile['supernova']) . "</a></th>\r\n\t\t\t\t\t</tr>";
     $parse['defenses'] .= "\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<th width=\"10%\">" . $Planettt . "</th>\r\n\t\t\t\t\t\t<th width=\"10%\"><a title=\"" . pretty_number($PlanetsWhile['misil_launcher']) . "\">" . shortly_number($PlanetsWhile['misil_launcher']) . "</a></th>\r\n\t\t\t\t\t\t<th width=\"10%\"><a title=\"" . pretty_number($PlanetsWhile['small_laser']) . "\">" . shortly_number($PlanetsWhile['small_laser']) . "</a></th>\r\n\t\t\t\t\t\t<th width=\"10%\"><a title=\"" . pretty_number($PlanetsWhile['big_laser']) . "\">" . shortly_number($PlanetsWhile['big_laser']) . "</a></th>\r\n\t\t\t\t\t\t<th width=\"10%\"><a title=\"" . pretty_number($PlanetsWhile['gauss_canyon']) . "\">" . shortly_number($PlanetsWhile['gauss_canyon']) . "</a></th>\r\n\t\t\t\t\t\t<th width=\"10%\"><a title=\"" . pretty_number($PlanetsWhile['ionic_canyon']) . "\">" . shortly_number($PlanetsWhile['ionic_canyon']) . "</a></th>\r\n\t\t\t\t\t\t<th width=\"10%\"><a title=\"" . pretty_number($PlanetsWhile['buster_canyon']) . "\">" . shortly_number($PlanetsWhile['buster_canyon']) . "</a></th>\r\n\t\t\t\t\t\t<th width=\"10%\"><a title=\"" . pretty_number($PlanetsWhile['small_protection_shield']) . "\">" . shortly_number($PlanetsWhile['small_protection_shield']) . "</a></th>\r\n\t\t\t\t\t\t<th width=\"10%\"><a title=\"" . pretty_number($PlanetsWhile['big_protection_shield']) . "\">" . shortly_number($PlanetsWhile['big_protection_shield']) . "</a></th>\r\n\t\t\t\t\t\t<th width=\"10%\"><a title=\"" . pretty_number($PlanetsWhile['planet_protector']) . "\">" . shortly_number($PlanetsWhile['planet_protector']) . "</a></th>\r\n\t\t\t\t\t\t<th width=\"10%\"><a title=\"" . pretty_number($PlanetsWhile['interceptor_misil']) . "\">" . shortly_number($PlanetsWhile['interceptor_misil']) . "</a></th>\r\n\t\t\t\t\t\t<th width=\"10%\"><a title=\"" . pretty_number($PlanetsWhile['interplanetary_misil']) . "\">" . shortly_number($PlanetsWhile['interplanetary_misil']) . "</a></th>\r\n\t\t\t\t\t</tr>";
     $parse['buildings'] .= "\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<th width=\"10%\">" . $Planettt . "</th>\r\n\t\t\t\t\t\t<th width=\"10%\"><a title=\"" . pretty_number($PlanetsWhile['metal_mine']) . "\">" . shortly_number($PlanetsWhile['metal_mine']) . "</a></th>\r\n\t\t\t\t\t\t<th width=\"10%\"><a title=\"" . pretty_number($PlanetsWhile['crystal_mine']) . "\">" . shortly_number($PlanetsWhile['crystal_mine']) . "</a></th>\r\n\t\t\t\t\t\t<th width=\"10%\"><a title=\"" . pretty_number($PlanetsWhile['deuterium_sintetizer']) . "\">" . shortly_number($PlanetsWhile['deuterium_sintetizer']) . "</a></th>\r\n\t\t\t\t\t\t<th width=\"10%\"><a title=\"" . pretty_number($PlanetsWhile['solar_plant']) . "\">" . shortly_number($PlanetsWhile['solar_plant']) . "</a></th>\r\n\t\t\t\t\t\t<th width=\"10%\"><a title=\"" . pretty_number($PlanetsWhile['fusion_plant']) . "\">" . shortly_number($PlanetsWhile['fusion_plant']) . "</a></th>\r\n\t\t\t\t\t\t<th width=\"10%\"><a title=\"" . pretty_number($PlanetsWhile['robot_factory']) . "\">" . shortly_number($PlanetsWhile['robot_factory']) . "</a></th>\r\n\t\t\t\t\t\t<th width=\"10%\"><a title=\"" . pretty_number($PlanetsWhile['nano_factory']) . "\">" . shortly_number($PlanetsWhile['nano_factory']) . "</a></th>\r\n\t\t\t\t\t\t<th width=\"10%\"><a title=\"" . pretty_number($PlanetsWhile['hangar']) . "\">" . shortly_number($PlanetsWhile['hangar']) . "</a></th>\r\n\t\t\t\t\t\t<th width=\"10%\"><a title=\"" . pretty_number($PlanetsWhile['metal_store']) . "\">" . shortly_number($PlanetsWhile['metal_store']) . "</a></th>\r\n\t\t\t\t\t\t<th width=\"10%\"><a title=\"" . pretty_number($PlanetsWhile['crystal_store']) . "\">" . shortly_number($PlanetsWhile['crystal_store']) . "</a></th>\r\n\t\t\t\t\t\t<th width=\"10%\"><a title=\"" . pretty_number($PlanetsWhile['deuterium_store']) . "\">" . shortly_number($PlanetsWhile['deuterium_store']) . "</a></th>\r\n\t\t\t\t\t\t<th width=\"10%\"><a title=\"" . pretty_number($PlanetsWhile['laboratory']) . "\">" . shortly_number($PlanetsWhile['laboratory']) . "</a></th>\r\n\t\t\t\t\t\t<th width=\"10%\"><a title=\"" . pretty_number($PlanetsWhile['terraformer']) . "\">" . shortly_number($PlanetsWhile['terraformer']) . "</a></th>\r\n\t\t\t\t\t\t<th width=\"10%\"><a title=\"" . pretty_number($PlanetsWhile['ally_deposit']) . "\">" . shortly_number($PlanetsWhile['ally_deposit']) . "</a></th>\r\n\t\t\t\t\t\t<th width=\"30%\"><a title=\"" . pretty_number($PlanetsWhile['silo']) . "\">" . shortly_number($PlanetsWhile['silo']) . "</a></th>\r\n\t\t\t\t\t</tr>";
     if ($PlanetsWhile['planet_type'] == 3) {
         $parse['moon_buildings'] .= "\r\n\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t<th width=\"10%\">" . $Moons . "</th>\r\n\t\t\t\t\t\t\t<th width=\"10%\"><a title=\"" . pretty_number($PlanetsWhile['mondbasis']) . "\">" . shortly_number($PlanetsWhile['mondbasis']) . "</a></th>\r\n\t\t\t\t\t\t\t<th width=\"10%\"><a title=\"" . pretty_number($PlanetsWhile['phalanx']) . "\">" . shortly_number($PlanetsWhile['phalanx']) . "</a></th>\r\n\t\t\t\t\t\t\t<th width=\"10%\"><a title=\"" . pretty_number($PlanetsWhile['sprungtor']) . "\">" . shortly_number($PlanetsWhile['sprungtor']) . "</a></th>\r\n\t\t\t\t\t\t</tr>";
     }
     if ($MoonZ != 0) {
         $parse['MoonHave'] = "<a href=\"javascript:animatedcollapse.toggle('especiales')\" class=\"link\">\r\n\t\t\t\t\t\t\t<img src=\"../styles/images/Adm/arrowright.png\" width=\"16\" height=\"10\"/> " . $lang['moon_build'] . "</a>";
     } else {
         $parse['MoonHave'] = "<span class=\"no_moon\"><img src=\"../styles/images/Adm/arrowright.png\" width=\"16\" height=\"10\"/>\r\n\t\t\t\t\t\t\t" . $lang['moon_build'] . "&nbsp;" . $lang['ac_moons_no'] . "</span>";
     }
 }
 $DestruyeD = 0;
 if ($PlanetsWhile["destruyed"] > 0) {
     $parse['destroyed'] .= "\r\n\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t<th>" . $PlanetsWhile['name'] . "</th>\r\n\t\t\t\t\t\t\t<th>" . $PlanetsWhile['id'] . "</th>\r\n\t\t\t\t\t\t\t<th>[" . $PlanetsWhile['galaxy'] . ":" . $PlanetsWhile['system'] . ":" . $PlanetsWhile['planet'] . "]</th>\r\n\t\t\t\t\t\t\t<th>" . date("d-m-Y   H:i:s", $PlanetsWhile['destruyed']) . "</th>\r\n\t\t\t\t\t\t</tr>";
     $DestruyeD++;
 }
 if ($DestruyeD != 0) {
     $parse['DestructionHave'] = "<a href=\"javascript:animatedcollapse.toggle('destr')\" class=\"link\">\r\n\t\t\t\t\t\t<img src=\"../styles/images/Adm/arrowright.png\" width=\"16\" height=\"10\"/> " . $lang['ac_recent_destroyed_planets'] . "</a>";
 } else {
Ejemplo n.º 6
0
 function show()
 {
     global $LNG, $ProdGrid, $resource, $reslist, $USER, $PLANET;
     $config = Config::get();
     if ($USER['urlaubs_modus'] == 1 || $PLANET['planet_type'] != 1) {
         $basicIncome[901] = 0;
         $basicIncome[902] = 0;
         $basicIncome[903] = 0;
         $basicIncome[911] = 0;
     } else {
         $basicIncome[901] = $config->{$resource[901] . '_basic_income'};
         $basicIncome[902] = $config->{$resource[902] . '_basic_income'};
         $basicIncome[903] = $config->{$resource[903] . '_basic_income'};
         $basicIncome[911] = $config->{$resource[911] . '_basic_income'};
     }
     $temp = array(901 => array('plus' => 0, 'minus' => 0), 902 => array('plus' => 0, 'minus' => 0), 903 => array('plus' => 0, 'minus' => 0), 911 => array('plus' => 0, 'minus' => 0));
     $ressIDs = array_merge(array(), $reslist['resstype'][1], $reslist['resstype'][2]);
     $productionList = array();
     if ($PLANET['energy_used'] != 0) {
         $prodLevel = min(1, $PLANET['energy'] / abs($PLANET['energy_used']));
     } else {
         $prodLevel = 0;
     }
     /* Data for eval */
     $BuildEnergy = $USER[$resource[113]];
     $BuildTemp = $PLANET['temp_max'];
     foreach ($reslist['prod'] as $ProdID) {
         if (isset($PLANET[$resource[$ProdID]]) && $PLANET[$resource[$ProdID]] == 0) {
             continue;
         }
         if (isset($USER[$resource[$ProdID]]) && $USER[$resource[$ProdID]] == 0) {
             continue;
         }
         $productionList[$ProdID] = array('production' => array(901 => 0, 902 => 0, 903 => 0, 911 => 0), 'elementLevel' => $PLANET[$resource[$ProdID]], 'prodLevel' => $PLANET[$resource[$ProdID] . '_porcent']);
         /* Data for eval */
         $BuildLevel = $PLANET[$resource[$ProdID]];
         $BuildLevelFactor = $PLANET[$resource[$ProdID] . '_porcent'];
         foreach ($ressIDs as $ID) {
             if (!isset($ProdGrid[$ProdID]['production'][$ID])) {
                 continue;
             }
             $Production = eval(ResourceUpdate::getProd($ProdGrid[$ProdID]['production'][$ID]));
             if (in_array($ID, $reslist['resstype'][2])) {
                 $Production *= $config->energySpeed;
             } else {
                 $Production *= $prodLevel * $config->resource_multiplier;
             }
             $productionList[$ProdID]['production'][$ID] = $Production;
             if ($Production > 0) {
                 if ($PLANET[$resource[$ID]] == 0) {
                     continue;
                 }
                 $temp[$ID]['plus'] += $Production;
             } else {
                 $temp[$ID]['minus'] += $Production;
             }
         }
     }
     $storage = array(901 => shortly_number($PLANET[$resource[901] . '_max']), 902 => shortly_number($PLANET[$resource[902] . '_max']), 903 => shortly_number($PLANET[$resource[903] . '_max']));
     $basicProduction = array(901 => $basicIncome[901] * $config->resource_multiplier, 902 => $basicIncome[902] * $config->resource_multiplier, 903 => $basicIncome[903] * $config->resource_multiplier, 911 => $basicIncome[911] * $config->energySpeed);
     $totalProduction = array(901 => $PLANET[$resource[901] . '_perhour'] + $basicProduction[901], 902 => $PLANET[$resource[902] . '_perhour'] + $basicProduction[902], 903 => $PLANET[$resource[903] . '_perhour'] + $basicProduction[903], 911 => $PLANET[$resource[911]] + $basicProduction[911] + $PLANET[$resource[911] . '_used']);
     $bonusProduction = array(901 => $temp[901]['plus'] * ($USER['factor']['Resource'] + 0.02 * $USER[$resource[131]]), 902 => $temp[902]['plus'] * ($USER['factor']['Resource'] + 0.02 * $USER[$resource[132]]), 903 => $temp[903]['plus'] * ($USER['factor']['Resource'] + 0.02 * $USER[$resource[133]]), 911 => $temp[911]['plus'] * $USER['factor']['Energy']);
     $dailyProduction = array(901 => $totalProduction[901] * 24, 902 => $totalProduction[902] * 24, 903 => $totalProduction[903] * 24, 911 => $totalProduction[911]);
     $weeklyProduction = array(901 => $totalProduction[901] * 168, 902 => $totalProduction[902] * 168, 903 => $totalProduction[903] * 168, 911 => $totalProduction[911]);
     $prodSelector = array();
     foreach (range(10, 0) as $percent) {
         $prodSelector[$percent] = $percent * 10 . '%';
     }
     $this->assign(array('header' => sprintf($LNG['rs_production_on_planet'], $PLANET['name']), 'prodSelector' => $prodSelector, 'productionList' => $productionList, 'basicProduction' => $basicProduction, 'totalProduction' => $totalProduction, 'bonusProduction' => $bonusProduction, 'dailyProduction' => $dailyProduction, 'weeklyProduction' => $weeklyProduction, 'storage' => $storage));
     $this->display('page.resources.default.tpl');
 }
Ejemplo n.º 7
0
 function issue()
 {
     global $USER, $PLANET, $LNG, $UNI, $CONF;
     if (!$this->rights['BANK']) {
         $this->redirectToHome();
     }
     $Userlist = "";
     $UserWhileLogin = $GLOBALS['DATABASE']->query("SELECT `id_planet`, `username` FROM " . USERS . " WHERE `ally_id` = '" . $this->allianceData['id'] . "' ORDER BY `username` ASC;");
     while ($UserList = $GLOBALS['DATABASE']->fetch_array($UserWhileLogin)) {
         $Userlist .= "<option value=\"" . $UserList['id_planet'] . "\">" . $UserList['username'] . "</option>";
     }
     $storages = $GLOBALS['DATABASE']->query("SELECT storage_metal, storage_crystal, storage_deuterium FROM " . ALLIANCE . " WHERE id = " . $this->allianceData['id'] . ";");
     $storages = $GLOBALS['DATABASE']->fetch_array($storages);
     $this->tplObj->assign_vars(array('Userlist' => $Userlist, 'storage_metal' => shortly_number($storages['storage_metal']), 'storage_crystal' => shortly_number($storages['storage_crystal']), 'storage_deuterium' => shortly_number($storages['storage_deuterium']), 'storage_metal1' => $storages['storage_metal'], 'storage_crystal1' => $storages['storage_crystal'], 'storage_deuterium1' => $storages['storage_deuterium']));
     $this->display('page.alliance.issue.tpl');
 }
Ejemplo n.º 8
0
 private function topnav()
 {
     global $PLANET, $LNG, $USER, $CONF;
     $this->phpself = "?page=" . request_var('page', '') . "&amp;mode=" . request_var('mode', '');
     $this->loadscript("topnav.js");
     if (empty($this->UserPlanets)) {
         $this->getplanets();
     }
     foreach ($this->UserPlanets as $CurPlanetID => $CurPlanet) {
         $SelectorVaules[] = $this->phpself . "&amp;cp=" . $CurPlanet['id'];
         $SelectorNames[] = $CurPlanet['name'] . ($CurPlanet['planet_type'] == 3 ? " (" . $LNG['fcm_moon'] . ")" : "") . "&nbsp;[" . $CurPlanet['galaxy'] . ":" . $CurPlanet['system'] . ":" . $CurPlanet['planet'] . "]&nbsp;&nbsp;";
     }
     if ($USER['urlaubs_modus'] == 1) {
         $CONF['metal_basic_income'] = 0;
         $CONF['crystal_basic_income'] = 0;
         $CONF['deuterium_basic_income'] = 0;
     }
     $this->assign_vars(array('topnav' => true, 'metal' => $PLANET['metal'], 'crystal' => $PLANET['crystal'], 'deuterium' => $PLANET['deuterium'], 'energy' => $PLANET["energy_max"] + $PLANET["energy_used"] < 0 ? colorRed(pretty_number($PLANET["energy_max"] + $PLANET["energy_used"]) . "/" . pretty_number($PLANET["energy_max"])) : pretty_number($PLANET["energy_max"] + $PLANET["energy_used"]) . "/" . pretty_number($PLANET["energy_max"]), 'darkmatter' => pretty_number($USER["darkmatter"]), 'metal_max' => shortly_number($PLANET["metal_max"]), 'crystal_max' => shortly_number($PLANET["crystal_max"]), 'deuterium_max' => shortly_number($PLANET["deuterium_max"]), 'alt_metal_max' => pretty_number($PLANET["metal_max"]), 'alt_crystal_max' => pretty_number($PLANET["crystal_max"]), 'alt_deuterium_max' => pretty_number($PLANET["deuterium_max"]), 'js_metal_max' => floattostring($PLANET["metal_max"]), 'js_crystal_max' => floattostring($PLANET["crystal_max"]), 'js_deuterium_max' => floattostring($PLANET["deuterium_max"]), 'js_metal_hr' => floattostring($PLANET['metal_perhour'] + $CONF['metal_basic_income'] * $CONF['resource_multiplier']), 'js_crystal_hr' => floattostring($PLANET['crystal_perhour'] + $CONF['crystal_basic_income'] * $CONF['resource_multiplier']), 'js_deuterium_hr' => floattostring($PLANET['deuterium_perhour'] + $CONF['deuterium_basic_income'] * $CONF['resource_multiplier']), 'current_panet' => $this->phpself . "&amp;cp=" . $_SESSION['planet'], 'tn_vacation_mode' => $LNG['tn_vacation_mode'], 'closed' => !$CONF['game_disable'] ? $LNG['ov_closed'] : false, 'vacation' => $USER['urlaubs_modus'] ? date('d.m.Y H:i:s', $USER['urlaubs_until']) : false, 'delete' => $USER['db_deaktjava'] ? sprintf($LNG['tn_delete_mode'], date('d. M Y\\, H:i:s', strtotime("+7 day", $USER['db_deaktjava']))) : false, 'image' => $PLANET['image'], 'settings_tnstor' => $USER['settings_tnstor'], 'SelectorVaules' => $SelectorVaules, 'SelectorNames' => $SelectorNames, 'Metal' => $LNG['Metal'], 'Crystal' => $LNG['Crystal'], 'Deuterium' => $LNG['Deuterium'], 'Darkmatter' => $LNG['Darkmatter'], 'Energy' => $LNG['Energy']));
 }
 function show()
 {
     global $LNG, $UNI, $ProdGrid, $resource, $reslist, $CONF, $pricelist, $USER, $PLANET;
     $PlanetRess = new ResourceUpdate();
     $PlanetRess->CalcResource();
     $PlanetRess->SavePlanetToDb();
     if ($USER['urlaubs_modus'] == 1) {
         $basicIncome[901] = 0;
         $basicIncome[902] = 0;
         $basicIncome[903] = 0;
         $basicIncome[911] = 0;
     } else {
         $basicIncome[901] = Config::get($resource[901] . '_basic_income');
         $basicIncome[902] = Config::get($resource[902] . '_basic_income');
         $basicIncome[903] = Config::get($resource[903] . '_basic_income');
         $basicIncome[911] = Config::get($resource[911] . '_basic_income');
     }
     $temp = array(901 => array('plus' => 0, 'minus' => 0), 902 => array('plus' => 0, 'minus' => 0), 903 => array('plus' => 0, 'minus' => 0), 911 => array('plus' => 0, 'minus' => 0));
     $BuildTemp = $PLANET['temp_max'];
     $BuildEnergy = $USER[$resource[113]];
     $ressIDs = array_merge(array(), $reslist['resstype'][1], $reslist['resstype'][2]);
     if ($PLANET['energy_used'] != 0) {
         $prodLevel = min(1, $PLANET['energy'] / abs($PLANET['energy_used']));
     } else {
         $prodLevel = 0;
     }
     foreach ($reslist['prod'] as $ProdID) {
         $BuildLevelFactor = $PLANET[$resource[$ProdID] . '_porcent'];
         $BuildLevel = $PLANET[$resource[$ProdID]];
         $premium_resource = 0;
         $peacefull_resource = 0;
         if ($USER['premium_reward_extraction'] > 0 && $USER['premium_reward_extraction_days'] > TIMESTAMP) {
             $premium_resource = $USER['premium_reward_extraction'];
         }
         $premium_resource = $premium_resource;
         if ($USER['experience_peace_level'] > 0) {
             $peacefull_resource = $USER['experience_peace_level'];
         }
         $peacefull_resource = $peacefull_resource;
         $academy_mines = 0;
         if ($USER['academy_1201'] > 0) {
             $academy_mines = getbonusOneBis(1201, $USER['academy_1201']);
         }
         $academy_mines = $academy_mines;
         $daily_prod_bonus = 0;
         if ($USER['daily_produ'] > TIMESTAMP) {
             $daily_prod_bonus = 30;
         }
         $daily_prod_bonus = $daily_prod_bonus;
         $academy_energy = 0;
         if ($USER['academy_1202'] > 0) {
             $academy_energy = getbonusOneBis(1202, $USER['academy_1202']);
         }
         $academy_energy = $academy_energy;
         $academy_fusion = 0;
         if ($USER['academy_1209'] > 0) {
             $academy_fusion = getbonusOneBis(1209, $USER['academy_1209']);
         }
         $academy_fusion = $academy_fusion;
         $academy_solar = 0;
         if ($USER['academy_1210'] > 0) {
             $academy_solar = getbonusOneBis(1210, $USER['academy_1210']);
         }
         $academy_solar = $academy_solar;
         $combat_collider = 0;
         if ($USER['combat_reward_collider'] > 0) {
             $combat_collider = $USER['combat_reward_collider'];
         }
         $combat_collider = $combat_collider;
         $allyInfo = $GLOBALS['DATABASE']->query("SELECT alliance_prod FROM `uni1_alliance` WHERE id = " . $USER['ally_id'] . ";");
         $allyInfo = $GLOBALS['DATABASE']->fetch_array($allyInfo);
         $alliance_prod = 0;
         if ($allyInfo['alliance_prod'] > 0) {
             $alliance_prod = $allyInfo['alliance_prod'];
         }
         $alliance_prod = $alliance_prod;
         $productionList[$ProdID] = array('production' => array(901 => 0, 902 => 0, 903 => 0, 911 => 0), 'elementLevel' => $PLANET[$resource[$ProdID]], 'prodLevel' => $PLANET[$resource[$ProdID] . '_porcent']);
         foreach ($ressIDs as $ID) {
             if (!isset($ProdGrid[$ProdID]['production'][$ID])) {
                 continue;
             }
             $Production = eval(ResourceUpdate::getProd($ProdGrid[$ProdID]['production'][$ID]));
             if ($ID != 911) {
                 $Production *= $prodLevel * Config::get('resource_multiplier');
             } else {
                 $Production *= Config::get('energySpeed');
             }
             $productionList[$ProdID]['production'][$ID] = $Production;
             if ($Production > 0) {
                 if ($PLANET[$resource[$ID]] == 0) {
                     continue;
                 }
                 $temp[$ID]['plus'] += $Production;
             } else {
                 $temp[$ID]['minus'] += $Production;
             }
         }
     }
     $storage = array(901 => shortly_number($PLANET[$resource[901] . '_max']), 902 => shortly_number($PLANET[$resource[902] . '_max']), 903 => shortly_number($PLANET[$resource[903] . '_max']));
     $basicProduction = array(901 => $basicIncome[901] * Config::get('resource_multiplier'), 902 => $basicIncome[902] * Config::get('resource_multiplier'), 903 => $basicIncome[903] * Config::get('resource_multiplier'), 911 => $basicIncome[911] * Config::get('energySpeed'));
     $totalProduction = array(901 => $PLANET[$resource[901] . '_perhour'] + $basicProduction[901], 902 => $PLANET[$resource[902] . '_perhour'] + $basicProduction[902], 903 => $PLANET[$resource[903] . '_perhour'] + $basicProduction[903], 911 => $PLANET[$resource[911]] + $basicProduction[911] + $PLANET[$resource[911] . '_used']);
     $bonusProduction = array(901 => $temp[901]['plus'] * ($USER['factor']['Resource'] + 0.05 * $USER[$resource[131]]), 902 => $temp[902]['plus'] * ($USER['factor']['Resource'] + 0.05 * $USER[$resource[132]]), 903 => $temp[903]['plus'] * ($USER['factor']['Resource'] + 0.05 * $USER[$resource[133]]), 911 => $temp[911]['plus'] * $USER['factor']['Energy']);
     $dailyProduction = array(901 => $totalProduction[901] * 24, 902 => $totalProduction[902] * 24, 903 => $totalProduction[903] * 24, 911 => $totalProduction[911]);
     $weeklyProduction = array(901 => $totalProduction[901] * 168, 902 => $totalProduction[902] * 168, 903 => $totalProduction[903] * 168, 911 => $totalProduction[911]);
     $prodSelector = array();
     foreach (range(0, 10) as $procent) {
         $prodSelector[$procent] = $procent * 10 . '%';
     }
     $this->tplObj->assign_vars(array('header' => sprintf($LNG['rs_production_on_planet'], $PLANET['name']), 'prodSelector' => $prodSelector, 'productionList' => $productionList, 'basicProduction' => $basicProduction, 'totalProduction' => $totalProduction, 'bonusProduction' => $bonusProduction, 'dailyProduction' => $dailyProduction, 'weeklyProduction' => $weeklyProduction, 'storage' => $storage));
     $this->display('page.resources.default.tpl');
 }
Ejemplo n.º 10
0
 function show()
 {
     global $LNG, $ProdGrid, $resource, $reslist, $CONF, $pricelist, $USER, $PLANET;
     //if($USER['id'] != 1){
     //$this->printMessage("<span class='rouge'>This page is under maintenace, come back in some minutes</span>", true, array('game.php?page=overview', 2));
     //}
     if ($USER['urlaubs_modus'] == 1 || $PLANET['planet_type'] != 1) {
         $basicIncome[901] = 0;
         $basicIncome[902] = 0;
         $basicIncome[903] = 0;
         $basicIncome[904] = 0;
         $basicIncome[911] = 0;
     } else {
         $basicIncome[901] = Config::get($resource[901] . '_basic_income');
         $basicIncome[902] = Config::get($resource[902] . '_basic_income');
         $basicIncome[903] = Config::get($resource[903] . '_basic_income');
         $basicIncome[904] = Config::get($resource[904] . '_basic_income');
         $basicIncome[911] = Config::get($resource[911] . '_basic_income');
     }
     $temp = array(901 => array('plus' => 0, 'minus' => 0), 902 => array('plus' => 0, 'minus' => 0), 903 => array('plus' => 0, 'minus' => 0), 904 => array('plus' => 0, 'minus' => 0), 911 => array('plus' => 0, 'minus' => 0));
     $BuildTemp = $PLANET['temp_max'];
     $BuildEnergy = $USER[$resource[113]];
     $ressIDs = array_merge(array(), $reslist['resstype'][1], $reslist['resstype'][2]);
     if ($PLANET['energy_used'] != 0) {
         $prodLevel = min(1, $PLANET['energy'] / abs($PLANET['energy_used']));
     } else {
         $prodLevel = 0;
     }
     $prodList = array(4, 10, 1, 2, 3, 48, 7, 8, 9, 11);
     foreach ($prodList as $ProdID) {
         $BuildLevelFactor = $PLANET[$resource[$ProdID] . '_porcent'];
         $BuildLevel = $PLANET[$resource[$ProdID]];
         $productionList[$ProdID] = array('production' => array(901 => 0, 902 => 0, 903 => 0, 904 => 0, 911 => 0), 'elementLevel' => $PLANET[$resource[$ProdID]], 'prodLevel' => $PLANET[$resource[$ProdID] . '_porcent'] * 10);
         foreach ($ressIDs as $ID) {
             if (!isset($ProdGrid[$ProdID]['production'][$ID])) {
                 continue;
             }
             $Production = eval(ResourceUpdate::getProd($ProdGrid[$ProdID]['production'][$ID]));
             if ($ID != 911) {
                 $Production *= $prodLevel * 20;
             } else {
                 $Production *= Config::get('energySpeed');
             }
             $productionList[$ProdID]['production'][$ID] = $Production;
             if ($Production > 0) {
                 if ($PLANET[$resource[$ID]] == 0) {
                     continue;
                 }
                 $temp[$ID]['plus'] += $Production;
             } else {
                 $temp[$ID]['minus'] += $Production;
             }
         }
     }
     $storage = array(901 => shortly_number($PLANET[$resource[901] . '_max']), 902 => shortly_number($PLANET[$resource[902] . '_max']), 903 => shortly_number($PLANET[$resource[903] . '_max']), 904 => shortly_number($PLANET[$resource[904] . '_max']));
     $basicProduction = array(901 => $basicIncome[901] * Config::get('resource_multiplier'), 902 => $basicIncome[902] * Config::get('resource_multiplier'), 903 => $basicIncome[903] * Config::get('resource_multiplier'), 904 => $basicIncome[904] * Config::get('resource_multiplier'), 911 => $basicIncome[911] * Config::get('energySpeed'));
     $totalProduction = array(901 => $PLANET[$resource[901] . '_perhour'] + $basicProduction[901], 902 => $PLANET[$resource[902] . '_perhour'] + $basicProduction[902], 903 => $PLANET[$resource[903] . '_perhour'] + $basicProduction[903], 904 => $PLANET[$resource[904] . '_perhour'] + $basicProduction[904], 911 => $PLANET[$resource[911]] + $basicProduction[911] + $PLANET[$resource[911] . '_used']);
     $bonusProduction = array(901 => $temp[901]['plus'] * ($USER['factor']['Resource'] + 0.02 * $USER[$resource[131]]), 902 => $temp[902]['plus'] * ($USER['factor']['Resource'] + 0.02 * $USER[$resource[132]]), 903 => $temp[903]['plus'] * ($USER['factor']['Resource'] + 0.02 * $USER[$resource[133]]), 904 => $temp[904]['plus'] * ($USER['factor']['Resource'] + 0.02 * $USER[$resource[133]]), 911 => $temp[911]['plus'] * $USER['factor']['Energy']);
     $dailyProduction = array(901 => $totalProduction[901] * 24, 902 => $totalProduction[902] * 24, 903 => $totalProduction[903] * 24, 904 => $totalProduction[904] * 24, 911 => $totalProduction[911]);
     $weeklyProduction = array(901 => $totalProduction[901] * 168, 902 => $totalProduction[902] * 168, 903 => $totalProduction[903] * 168, 904 => $totalProduction[904] * 168, 911 => $totalProduction[911]);
     $CivilProduction = array(901 => $totalProduction[901] / 100 * 0.0002 * $PLANET['civil'], 902 => $totalProduction[902] / 100 * 0.0002 * $PLANET['civil'], 903 => $totalProduction[903] / 100 * 0.0002 * $PLANET['civil'], 904 => $totalProduction[904] / 100 * 0.0002 * $PLANET['civil'], 911 => 0);
     $prodSelector = array();
     foreach (range(0, 10) as $procent) {
         $prodSelector[$procent] = $procent * 10 . '%';
     }
     $this->tplObj->loadscript('resource.js');
     $this->tplObj->assign_vars(array('header' => sprintf($LNG['rs_production_on_planet'], $PLANET['name']), 'prodSelector' => $prodSelector, 'productionList' => $productionList, 'basicProduction' => $basicProduction, 'totalProduction' => $totalProduction, 'bonusProduction' => $bonusProduction, 'dailyProduction' => $dailyProduction, 'weeklyProduction' => $weeklyProduction, 'CivilProduction' => $CivilProduction, 'storage' => $storage, 'colo_metal' => $PLANET['colo_metal'], 'colo_crystal' => $PLANET['colo_crystal'], 'colo_deut' => $PLANET['colo_deut'], 'colo_elyrium' => $PLANET['colo_elyrium'], 'metalprod' => $PLANET['metal_mine_porcent'] * 10, 'crystalprod' => $PLANET['crystal_mine_porcent'] * 10, 'deutprod' => $PLANET['deuterium_sintetizer_porcent'] * 10, 'elyriumprod' => $PLANET['elyrium_mine_porcent'] * 10));
     $this->display('page.resources.default.tpl');
 }