MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
$game->init_player();
include 'include/static/static_components_' . $game->player['user_race'] . '.php';
$filename = 'include/static/static_components_' . $game->player['user_race'] . '_' . $game->player['language'] . '.php';
if (file_exists($filename)) {
    include $filename;
}
error_reporting(E_ERROR);
$STEMPLATE_MODULES = array('view' => constant($game->sprache("TEXT0")), 'create' => constant($game->sprache("TEXT1")), 'compare' => constant($game->sprache("TEXT2")));
$module = !empty($_GET['view']) ? $_GET['view'] : 'view';
$game->out('<span class="caption">' . constant($game->sprache("TEXT3")) . '</span><br><br>' . display_view_navigation('ship_template', $module, $STEMPLATE_MODULES) . '<br><br>');
/* 

function RoundsFire($race, $torso)
{
	// DC ---
	// Brown Bobby Version ROF = 1
	
	$rof = 1;
	
	return $rof;
}

function Torpedoes($race, $torso)
{
	// DC ---
Example #2
0
}
$game->init_player();
if (!$game->SITTING_MODE) {
    $SETTINGS_MODULES = array('general' => constant($game->sprache("TEXT104")), 'password' => constant($game->sprache("TEXT105")), 'loginname' => constant($game->sprache("TEXT106")), 'vacation' => constant($game->sprache("TEXT107")), 'sitting' => constant($game->sprache("TEXT108")), 'gallery' => constant($game->sprache("TEXT109")), 'iplog' => constant($game->sprache("TEXT110")), 'colony' => constant($game->sprache("TEXT111")));
} else {
    $SETTINGS_MODULES['sitting'] = constant($game->sprache("TEXT108"));
    if ($game->player['user_sitting_o10'] == 1) {
        $SETTINGS_MODULES['general'] = constant($game->sprache("TEXT104"));
    }
}
if ($game->SITTING_MODE && $game->player['user_sitting_o10'] != 1) {
    $module = isset($_GET['view']) ? $_GET['view'] : 'sitting';
} else {
    $module = isset($_GET['view']) ? $_GET['view'] : 'general';
}
$game->out('<center><span class="caption">' . constant($game->sprache("TEXT113")) . '</span><br><br>' . display_view_navigation('settings', $module, $SETTINGS_MODULES) . '&nbsp;&nbsp;[<a href="template_manager.php" target="_blank">Skin</a>]</center><br>');
switch ($module) {
    case 'general':
        if ($game->SITTING_MODE && $game->player['user_sitting_o10'] != 1) {
            exit;
        }
        if (!empty($_POST['submit'])) {
            if (check_forbidden_url($_POST['user_avatar'])) {
                display_general($_POST, constant($game->sprache("TEXT114")));
                return;
            }
            if ($_POST['user_avatar'] != $game->player['user_avatar']) {
                if (!($fp = fopen($_POST['user_avatar'], 'rb'))) {
                    display_general($_POST, constant($game->sprache("TEXT115")));
                }
                $n = 0;
Example #3
0
function Show_Alliance()
{
    if (!isset($_REQUEST['view'])) {
        $_REQUEST['view'] = 'overview';
    }
    $_REQUEST['id'] = (int) $_REQUEST['id'];
    global $db;
    global $game;
    global $userquery;
    global $start;
    global $search_name, $STEMPLATE_MODULES;
    // Men BASIC
    Show_Main();
    $query = 'SELECT * FROM alliance WHERE alliance_id="' . $_REQUEST['id'] . '"';
    $alliancequery = $db->query($query);
    if (($alliance = $db->fetchrow($alliancequery)) == false) {
        $game->out('<center><p><span class="sub_caption">' . constant($game->sprache("TEXT7")) . '</span></center>');
    } else {
        $game->out('<table align="center" border="0" cellpadding="0" cellspacing="0" class="style_outer">
  <tr>
    <td width="400" align="center">
    <br>
    <span class="sub_caption">' . constant($game->sprache("TEXT8")) . ' ' . $alliance['alliance_name'] . ' [' . $alliance['alliance_tag'] . ']</span>');
        // Show the alliance logo:
        if (!empty($alliance['alliance_logo'])) {
            $info = getimagesize_remote($alliance['alliance_logo']);
            if ($info[0] > 0 && $info[1] > 0 && $info[0] <= 350 && $info[1] <= 350) {
                $game->out('<table border=0 cellpadding=0 cellspacing=0><tr><td width=350 align="center"><img src="' . $alliance['alliance_logo'] . '"></td></tr></table><br>');
            }
        } else {
            $game->out('<br>');
        }
        // End of logo part
        // Members & Score:
        $membs = $db->queryrow('SELECT COUNT(user_id) AS num FROM user WHERE (user_alliance="' . $alliance['alliance_id'] . '") AND (user_active=1)');
        $members = $membs['num'];
        $game->out('<table boder=0 cellpadding=0 cellspacing=0 class="style_inner"><tr><td width=350><span class="sub_caption"><b><center>' . constant($game->sprache("TEXT9")) . '</center></b></span><br>
<center>
<table border=0 cellpadding=1 cellspacing=1>
<tr><td width=100>' . constant($game->sprache("TEXT10")) . '</td><td>' . $members . '</td></tr>
<tr><td>' . constant($game->sprache("TEXT11")) . '</td><td>' . $alliance['alliance_points'] . '</td></tr>');
        $homepage_name = $alliance['alliance_homepage'];
        if (strlen($alliance['alliance_homepage']) > 30) {
            $homepage_name = substr($alliance['alliance_homepage'], 0, 27);
            $homepage_name = $homepage_name . '...';
        }
        /* 21/05/08 - AC: Check alliance homepage URL */
        $http_ok = stripos($alliance['alliance_homepage'], "http://");
        if ($http_ok === true) {
            $homepage_url = $alliance['alliance_homepage'];
        } else {
            $homepage_url = 'http://' . $alliance['alliance_homepage'];
        }
        /* */
        if (!empty($alliance['alliance_homepage'])) {
            $game->out('<tr><td>' . constant($game->sprache("TEXT12")) . '</td><td><a href="' . $homepage_url . '" target=_blank><b>' . $homepage_name . '</b></a></td></tr>');
        }
        if (!empty($alliance['alliance_irc'])) {
            $game->out('<tr><td>' . constant($game->sprache("TEXT13")) . '</td><td><b>' . $alliance['alliance_irc'] . '</b></a></td></tr>');
        }
        $game->out('</table><br>');
        $game->out('<center>' . display_view_navigation('stats&a2=viewalliance&id=' . $_REQUEST['id'] . '', $_REQUEST['view'], $STEMPLATE_MODULES) . '</center><br>');
        if ($_REQUEST['view'] == 'overview') {
            $game->out('<br><center><span class="sub_caption2">' . constant($game->sprache("TEXT14")) . '</span><br><a href="alliancemap.php?alliance=' . $alliance['alliance_tag'] . '&size=6&map" target=_blank><img src="alliancemap.php?alliance=' . $alliance['alliance_tag'] . '&size=1" border=0></a>');
            $game->out('<br><center><span class="sub_caption2">' . constant($game->sprache("TEXT15")) . '</span>');
            // Allytext:
            $game->out('
<table boder=0 cellpadding=0 cellspacing=0 width=300 class="style_inner"><tr><td width=13>&nbsp;</td><td width=274><center></u>
' . stripslashes($alliance['alliance_text']) . '</center>
</td><td width=13>&nbsp;</td></tr></table><br>
');
        }
        if ($_REQUEST['view'] == 'member') {
            $game->out('<br><center><span class="sub_caption2">' . constant($game->sprache("TEXT16")) . '</span>');
            $sql = 'SELECT user_id, user_name, user_points, user_planets, user_alliance_status
            FROM user
            WHERE user_alliance = ' . $alliance['alliance_id'] . ' AND user_active=1
            ORDER BY user_points DESC';
            if (!($q_user = $db->query($sql))) {
                message(DATABASE_ERROR, 'Could not query alliance user data');
            }
            if ($db->num_rows() == 0) {
                message(NOTICE, constant($game->sprache("TEXT17")));
            }
            $member_status = array(ALLIANCE_STATUS_MEMBER => '%s', ALLIANCE_STATUS_ADMIN => '<span style="color: #FFFF00; font-weight: bold;">%s</span>', ALLIANCE_STATUS_OWNER => '<span style="color: #FF0000; font-weight: bold;">%s</span>', ALLIANCE_STATUS_FINANZ => '%s', ALLIANCE_STATUS_DIPLO => '<span style="color: #FFA500; font-weight: bold;">%s</span>');
            $game->out('
      <table width="300" align="center" border="0" cellpadding="2" cellspacing="2" class="style_inner">
        <tr>
          <td width="160"><b>' . constant($game->sprache("TEXT18")) . '</b></td>
          <td width="70"><b>' . constant($game->sprache("TEXT19")) . '</b></td>
          <td width="70"><b>' . constant($game->sprache("TEXT11")) . '</b></td>
        </tr>
        ');
            while ($user = $db->fetchrow($q_user)) {
                $game->out('
        <tr>
          <td><a href="' . parse_link('a=stats&a2=viewplayer&id=' . $user['user_id']) . '">' . sprintf($member_status[$user['user_alliance_status']], $user['user_name']) . '</a></td>
          <td>' . $user['user_planets'] . '</td>
          <td>' . $user['user_points'] . '</td>
        </tr>
            ');
            }
            $game->out('</table>');
            $game->out('
<br>
<center>
<i>' . constant($game->sprache("TEXT20")) . '</i>&nbsp;&nbsp;&nbsp;<a href="javascript:void(0);">' . constant($game->sprache("TEXT21")) . '</a>&nbsp;&nbsp;&nbsp;' . sprintf($member_status[ALLIANCE_STATUS_DIPLO], constant($game->sprache("TEXT22"))) . '&nbsp;&nbsp;&nbsp;' . sprintf($member_status[ALLIANCE_STATUS_ADMIN], constant($game->sprache("TEXT23"))) . '&nbsp;&nbsp;&nbsp;' . sprintf($member_status[ALLIANCE_STATUS_OWNER], constant($game->sprache("TEXT24"))) . '
</center><br>
    ');
        }
        if ($_REQUEST['view'] == 'pacts') {
            $game->out('<br><center><span class="sub_caption2">' . constant($game->sprache("TEXT25")) . '</span>');
            $sql = 'SELECT d.*,
                   a1.alliance_name AS alliance1_name,
                   a2.alliance_name AS alliance2_name
            FROM (alliance_diplomacy d)
            INNER JOIN (alliance a1) ON a1.alliance_id = d.alliance1_id
            INNER JOIN (alliance a2) ON a2.alliance_id = d.alliance2_id
            WHERE ((d.alliance1_id = ' . $alliance['alliance_id'] . ') OR (d.alliance2_id = ' . $alliance['alliance_id'] . ')) AND (d.status<>"-1")';
            if (!($q_diplomacy = $db->query($sql))) {
                message(DATABASE_ERROR, 'Could not query alliance diplomacy data');
            }
            $game->out('
      <table width="300" align="center" border="0" cellpadding="2" cellspacing="2" class="style_inner">
        <tr>
          <td width="160"><b>' . constant($game->sprache("TEXT26")) . '</b></td>
          <td width="60" align="center"><b>' . constant($game->sprache("TEXT27")) . '</b></td>
          <td width="80" align="center"><b>' . constant($game->sprache("TEXT28")) . '</b></td>
        </tr>
    ');
            while ($diplomacy = $db->fetchrow($q_diplomacy)) {
                $ap = $diplomacy['alliance1_id'] == $alliance['alliance_id'] ? 2 : 1;
                $diplomacy_names = array(ALLIANCE_DIPLOMACY_WAR => constant($game->sprache("TEXT29")), ALLIANCE_DIPLOMACY_NAP => constant($game->sprache("TEXT30")), ALLIANCE_DIPLOMACY_PACT => constant($game->sprache("TEXT31")));
                $game->out('
       <tr>
         <td><a href="' . parse_link('a=stats&a2=viewalliance&id=' . $diplomacy['alliance' . $ap . '_id']) . '">' . $diplomacy['alliance' . $ap . '_name'] . '</a></td>
         <td align="center"><a href="javascript:void(0);">' . $diplomacy_names[$diplomacy['type']] . '</a></td>
         <td align="center">' . date('d.m.y', $diplomacy['date']) . '</td>
       </tr>
        ');
            }
            $game->out('
      </table></center>
      ');
        }
        $game->out('</td></tr></table><br><br></td></tr></table>');
    }
}
Example #4
0
            $atk_alive[$t] = 0;
        }
        if ($dfd_alive[$t] > $dfd_units[$t]) {
            $dfd_alive[$t] = $dfd_units[$t];
        }
        if ($atk_alive[$t] > $atk_units[$t]) {
            $atk_alive[$t] = $atk_units[$t];
        }
        $dfd_alive[$t] = round($dfd_alive[$t]);
        $atk_alive[$t] = round($atk_alive[$t]);
    }
    return array(0 => $atk_alive, 1 => $dfd_alive);
}
$DATABASE_MODULES = array('planets' => constant($game->sprache("TEXT11")), 'racedata' => constant($game->sprache("TEXT12")), 'security' => constant($game->sprache("TEXT13")), 'combatsim' => constant($game->sprache("TEXT14")), 'guide' => constant($game->sprache("TEXT16")));
$module = !empty($_GET['view']) ? $_GET['view'] : 'planets';
$game->out('<span class="caption">' . constant($game->sprache("TEXT0")) . ' ' . $RACE_DATA[$game->player['user_race']][0] . '</span><br><br>' . display_view_navigation('database', $module, $DATABASE_MODULES) . '<br><br>');
if ($module == 'planets' || isset($_GET['planet_type'])) {
    foreach ($PLANETS_TEXT as $type => $data) {
        $type = strtolower($type);
        /* 26/02/09 - AC: Check if it's currently present in the url request */
        if (isset($_GET['planet_type']) && $type == strtolower($_GET['planet_type'])) {
            $high_start = '<span style="color: #FFFF00; font-weight: bold;">';
            $high_end = '</span>';
        } else {
            $high_start = $high_end = '';
        }
        $shipyard_text = array(1 => constant($game->sprache("TEXT114")), 2 => constant($game->sprache("TEXT115")), 3 => constant($game->sprache("TEXT116")), 4 => constant($game->sprache("TEXT117")));
        $game->out('
<table width="450" align="center" border="0" cellpadding="2" cellspacing="2" class="style_outer">
  <tr>
    <td>