function Show_Torso()
{
    global $db;
    global $game;
    global $SHIP_TORSO, $SHIP_TORSO_DATA, $UNIT_DESCRIPTION, $UNIT_DATA, $UNIT_NAME, $NEXT_TICK, $ACTUAL_TICK;
    $ship_class = array(constant($game->sprache("TEXT33")), constant($game->sprache("TEXT34")), constant($game->sprache("TEXT35")), constant($game->sprache("TEXT36")), constant($game->sprache("TEXT36")), constant($game->sprache("TEXT37")), constant($game->sprache("TEXT37")), constant($game->sprache("TEXT38")), constant($game->sprache("TEXT38")), constant($game->sprache("TEXT39")), constant($game->sprache("TEXT39")), constant($game->sprache("TEXT40")), constant($game->sprache("TEXT41")));
    $game->out('
<table border=0 cellpadding=2 cellspacing=2 width=475 class="style_outer"><tr><td align="center">

<span class="sub_caption">' . constant($game->sprache("TEXT1")) . ':</span>
<br><span class="sub_caption2">(1/3) ' . constant($game->sprache("TEXT42")) . '</span><br>
<br><table border=0 cellpadding=2 cellspacing=2 width=475 class="style_inner"><tr><td>
<form method="post" action="' . parse_link('a=ship_template&view=create') . '">');
    $game->out('<table border=0 cellpadding=2 cellspacing=2><tr><td>&nbsp;</td><td align="left" width=150><b>' . constant($game->sprache("TEXT43")) . '</b></td><td width=100><b>' . constant($game->sprache("TEXT44")) . '</b></td><td width=50 align="center"><b>' . constant($game->sprache("TEXT45")) . '</b></td><td width=75 align="center"><b>' . constant($game->sprache("TEXT46")) . '</b></td><td width=75 align="center"><b>' . constant($game->sprache("TEXT47")) . '</b></td><td width=50 align="center"><b>' . constant($game->sprache("TEXT48")) . '</b></td></tr>');
    for ($t = 0; $t < count($SHIP_TORSO[$game->player['user_race']]); $t++) {
        //Funktion Rumpfklassen ausblenden
        //by Mojo1987
        if ($game->player['user_race'] == 0) {
            if ($t == 12) {
                break;
            }
        }
        if ($game->player['user_race'] == 1) {
            if ($t == 3) {
                $t = 4;
            }
            if ($t == 8) {
                $t = 9;
            }
            if ($t == 12) {
                break;
            }
        }
        if ($game->player['user_race'] == 2) {
            if ($t == 3) {
                $t = 4;
            }
            if ($t == 6) {
                $t = 7;
            }
            if ($t == 8) {
                $t = 9;
            }
            if ($t == 10) {
                $t = 11;
            }
            if ($t == 12) {
                break;
            }
        }
        if ($game->player['user_race'] == 3) {
            if ($t == 3) {
                $t = 4;
            }
            if ($t == 5) {
                $t = 7;
            }
            if ($t == 8) {
                $t = 9;
            }
            if ($t == 10) {
                break;
            }
        }
        if ($game->player['user_race'] == 4) {
            if ($t == 3) {
                $t = 4;
            }
            if ($t == 6) {
                $t = 9;
            }
            if ($t == 10) {
                $t = 11;
            }
            if ($t == 12) {
                break;
            }
        }
        if ($game->player['user_race'] == 5) {
            if ($t == 3) {
                $t = 4;
            }
            if ($t == 5) {
                $t = 7;
            }
            if ($t == 8) {
                $t = 12;
            }
        }
        if ($game->player['user_race'] == 8) {
            if ($t == 0) {
                $t = 1;
            }
            if ($t == 3) {
                $t = 4;
            }
            if ($t == 5) {
                $t = 7;
            }
            if ($t == 8) {
                $t = 9;
            }
            if ($t == 10) {
                $t = 11;
            }
        }
        if ($game->player['user_race'] == 9) {
            if ($t == 3) {
                $t = 5;
            }
            if ($t == 6) {
                $t = 7;
            }
            if ($t == 8) {
                $t = 9;
            }
            if ($t == 10) {
                break;
            }
        }
        if ($game->player['user_race'] == 10) {
            if ($t == 3) {
                $t = 4;
            }
            if ($t == 5) {
                $t = 7;
            }
            if ($t == 8) {
                $t = 9;
            }
            if ($t == 10) {
                $t = 12;
            }
        }
        if ($game->player['user_race'] == 11) {
            if ($t == 4) {
                $t = 5;
            }
            if ($t == 6) {
                $t = 9;
            }
            if ($t == 10) {
                break;
            }
        }
        $te = $t + 1;
        //Ausgabe Variable f�r den Rumpf
        //Funktion Ende
        $game->out('
<tr><td>' . (GlobalTorsoReq($t) <= $game->player['user_points'] ? '<input type="radio" name="ship_torso" value="' . $t . '">' : '<input type="radio" name="ship_torso" value="-1" disabled="disabled">') . '</td><td><a href="javascript:void(0);" onmouseover="return overlib(\'' . CreateShipInfoText($SHIP_TORSO[$game->player['user_race']][$t]) . '\', CAPTION, \'' . $SHIP_TORSO[$game->player['user_race']][$t][29] . '\', 
WIDTH, 400, ' . OVERLIB_STANDARD . ');" onmouseout="return nd();">' . $SHIP_TORSO[$game->player['user_race']][$t][29] . '</a>&nbsp;</td><td>' . $ship_class[$t] . '</td><td align="center">' . $te . '</td><td align="center">' . (GlobalTorsoReq($t) <= $game->player['user_points'] ? '<span style="color: #00FF00;"><b>' . GlobalTorsoReq($t) . '</b></span>' : '<span style="color: #FF0000;"><b>' . GlobalTorsoReq($t) . '</b></span>') . '</td><td align="center">' . ($game->planet['planet_points'] < LocalTorsoReq($t) ? '<span style="color: #FF0000;"><b>' . LocalTorsoReq($t) . '</b></span>' : '<span style="color: #00FF00;"><b>' . LocalTorsoReq($t) . '</b></span>') . '</td><td align="center">' . (GlobalTorsoReq($t) <= $game->player['user_points'] && $game->planet['planet_points'] >= LocalTorsoReq($t) ? '<span style="color: #00FF00;"><b>' . constant($game->sprache("TEXT49")) . '</b></span>' : '<span style="color: #FF0000;"><b>' . constant($game->sprache("TEXT50")) . '</b></span>') . '</td></tr>

');
    }
    $game->out('</table></select>
<center><br>
<input class="button_nosize" type="submit" name="step1" value="(1/3) ' . constant($game->sprache("TEXT51")) . '" disabled>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
<input class="button_nosize" type="submit" name="step2" value="(2/3) ' . constant($game->sprache("TEXT52")) . '"></center>
</form></td></tr></table></td></tr></table>');
}
Beispiel #2
0
function TemplateMetRequirementsText($template)
{
    global $game;
    //global $ship_components;
    if ($game->player['user_points'] < GlobalTorsoReq($template['ship_torso'])) {
        $game->out('<tr><td>' . constant($game->sprache("TEXT0")) . ' ' . GlobalTorsoReq($template['ship_torso']) . ' ' . constant($game->sprache("TEXT1")) . '</td></tr>');
    }
    if ($game->planet['planet_points'] < LocalTorsoReq($template['ship_torso'])) {
        $game->out('<tr><td>' . constant($game->sprache("TEXT0")) . ' ' . LocalTorsoReq($template['ship_torso']) . ' ' . constant($game->sprache("TEXT2")) . '</td></tr>');
    }
    if (!ComponentMetRequirements(0, $template['component_1'], $template['ship_torso'])) {
    }
    if (!ComponentMetRequirements(1, $template['component_2'], $template['ship_torso'])) {
    }
    if (!ComponentMetRequirements(2, $template['component_3'], $template['ship_torso'])) {
    }
    if (!ComponentMetRequirements(3, $template['component_4'], $template['ship_torso'])) {
    }
    if (!ComponentMetRequirements(4, $template['component_5'], $template['ship_torso'])) {
    }
    if (!ComponentMetRequirements(5, $template['component_6'], $template['ship_torso'])) {
    }
    if (!ComponentMetRequirements(6, $template['component_7'], $template['ship_torso'])) {
    }
    if (!ComponentMetRequirements(7, $template['component_8'], $template['ship_torso'])) {
    }
    if (!ComponentMetRequirements(8, $template['component_9'], $template['ship_torso'])) {
    }
    if (!ComponentMetRequirements(9, $template['component_10'], $template['ship_torso'])) {
    }
    //if ($game->planet['planet_points']<TorsoRequirements($template['ship_torso'],0) || $game->player['user_points']<TorsoRequirements($template['ship_torso'],0)) return 0;
    //echo $template['ship_torso'];
    //return 1;
}