$Op_Game = mysql_fetch_array($sql_game_results);
 if ($Op_Gen['msuit']) {
     $Op_Repaired = AutoRepair("{$Op_Gen['username']}");
     $Op_Game['hp'] = $Op_Repaired['hp'];
     $Op_Game['en'] = $Op_Repaired['en'];
     $Op_Game['sp'] = $Op_Repaired['sp'];
     $Op_Game['status'] = $Op_Repaired['status'];
 }
 $Op_WepA = explode('<!>', $Op_Game['wepa']);
 $CeaseAtkTar = '';
 if ($Op_Game['organization'] == $Pl_Game['organization'] && $Pl_Game['organization'] != '0') {
     $CeaseAtkTar = '1';
 }
 if ($Op_WepA[0] && !$Op_Game['status'] && !$CeaseAtkTar) {
     GetWeaponDetails("{$Op_WepA['0']}", 'Op_SyWepA');
     GetMsDetails("{$Op_Gen['msuit']}", 'Op_Ms');
     $Op_Org = ReturnOrg($Op_Game['organization']);
     if ($Op_Game['organization']) {
         $Op_Rank = ' ' . rankConvert($Op_Game['rank']);
     }
     if ($Op_Game['rights'] == '1') {
         $Op_RightsTitle = "<font style=\"color: yellow;font-weight: Bold;\">&nbsp;" . $RightsClass['Major'] . "</font>";
     } elseif ($Op_Game['rights']) {
         $Op_RightsTitle = "<font style=\"color: yellow;font-weight: Bold;\">&nbsp;" . $RightsClass['Leader'] . "</font>";
     }
     $mini_c++;
     echo "<tr align=center style=\"color: {$Op_Gen['color']}\">";
     echo "<td width=\"20\">{$mini_c}</td>";
     echo "<td width=\"250\">";
     echo "{$Op_Game['gamename']}";
     echo " <font style=\"color: {$Op_Org['color']}\">({$Op_Org['name']}){$Op_RightsTitle}{$Op_Rank}";
Esempio n. 2
0
    echo "</tr>";
    echo "</form></table>";
    postFooter();
    exit;
} elseif ($mode == 'prcmodms' && $actionb && $mod_hp_muiltiple && $mod_en_muiltiple) {
    if ($mod_hp_muiltiple > 10 || $mod_en_muiltiple > 10) {
        echo "一之過最多只能改十次!!<br>";
        PostFooter();
        exit;
    }
    if ($mod_hp_muiltiple <= 0 || $mod_en_muiltiple <= 0) {
        echo "改造次數出了問題!!<br>";
        PostFooter();
        exit;
    }
    GetMsDetails("{$Gen['msuit']}", 'Pl_Ms');
    if ($Game['eqwep'] && $Game['eqwep'] != "0<!>0") {
        unset($Eq_Id, $Eq_Prep, $Eq_Query, $Eq, $a);
        $Eq_Id = explode('<!>', $Game['eqwep']);
        $Eq_Prep = "SELECT `spec` FROM `" . $GLOBALS['DBPrefix'] . "phpeb_sys_wep` WHERE id='" . $Eq_Id[0] . "'";
        $Eq_Query = mysql_query($Eq_Prep);
        $Eq = mysql_fetch_array($Eq_Query);
        if (ereg('(ExtHP)+', $Eq['spec'])) {
            $a = ereg_replace('.*ExtHP<', '', $Eq['spec']);
            $Pl_Ms['hpfix'] += intval($a);
        }
        if (ereg('(ExtEN)+', $Eq['spec'])) {
            $a = ereg_replace('.*ExtEN<', '', $Eq['spec']);
            $Pl_Ms['enfix'] += intval($a);
        }
    }
Esempio n. 3
0
     $GameVal['enmax'] = $GameVal['enmax'] + $BuyMsDVal['enfix'];
     $GameVal['hp'] = $GameVal['hp'] + $BuyMsDVal['hpfix'];
     $GameVal['en'] = $GameVal['en'] + $BuyMsDVal['enfix'];
     $sql = "UPDATE `" . $GLOBALS['DBPrefix'] . "phpeb_user_game_info` SET `hpmax` = '{$GameVal['hpmax']}',\r\n`enmax` = {$GameVal['enmax']}, `hp` = '{$GameVal['hp']}', ";
     if (ereg('(EXAMSystem)+', $BuyMsDVal['spec']) && !ereg('(EXAMSystem)+', $GameVal['spec']) && ereg('(nat|enh|ext)+', $GenVal['typech'])) {
         $GameVal['spec'] .= 'EXAMSystem, ';
         $sql .= "`spec` = '{$GameVal['spec']}', ";
     }
     $sql .= "`en` = {$GameVal['en']} WHERE `username` = '{$Pl_Value['USERNAME']}' LIMIT 1;";
     mysql_query($sql);
     $sql = "UPDATE `" . $GLOBALS['DBPrefix'] . "phpeb_user_general_info` SET `cash` = '{$GenVal['cash']}',\r\n`msuit` = {$GenVal['msuit']} WHERE `username` = '{$Pl_Value['USERNAME']}' LIMIT 1;";
     mysql_query($sql);
     echo "<form action=gmscrn_main.php?action=proc method=post name=frmreturn target=Alpha>";
     echo "<p align=center style=\"font-size: 16pt\">购买完成了!<br><input type=submit value=\"返回\" onClick=\"parent.Beta.location.replace('gen_info.php')\"></p>";
 } elseif ($actionc == 'sell') {
     GetMsDetails("{$GenVal['msuit']}", 'NowMS');
     $Pl_WepD = explode('<!>', $GameVal['eqwep']);
     GetWeaponDetails("{$Pl_WepD['0']}", 'Pl_SyWepD');
     $Pl_WepE = explode('<!>', $GameVal['p_equip']);
     GetWeaponDetails("{$Pl_WepE['0']}", 'Pl_SyWepE');
     if (!$GenVal['msuit']) {
         echo "你没有机体!!<br>";
         PostFooter();
         exit;
     }
     $SellPrice = Floor($NowMS['price'] / 2 + $NowMS['price'] * 0.2);
     $GenVal['cash'] = $GenVal['cash'] + $SellPrice;
     $GameVal['hpmax'] = $GameVal['hpmax'] - $NowMS['hpfix'];
     $GameVal['enmax'] = $GameVal['enmax'] - $NowMS['enfix'];
     $GenVal['msuit'] = '0';
     $HP_Sub = $EN_Sub = 0;
for ($counter = 1; $counter <= $numofoppos; $counter++) {
    unset($Op_Rank, $Op_Org, $Op_RightsTitle, $OrgWarOppos);
    $Op_Gen = mysql_fetch_array($sql_gen_results);
    $sql_game = "SELECT * FROM `" . $GLOBALS['DBPrefix'] . "phpeb_user_game_info` WHERE username = '******'username']}'";
    $sql_game_results = mysql_query($sql_game) or die('出錯2, 原因:' . mysql_error() . '<br>');
    $Op_Game = mysql_fetch_array($sql_game_results);
    $Op_Repaired = AutoRepair("{$Op_Gen['username']}");
    $Op_Game['hp'] = $Op_Repaired['hp'];
    $Op_Game['en'] = $Op_Repaired['en'];
    $Op_Game['sp'] = $Op_Repaired['sp'];
    $Op_Game['status'] = $Op_Repaired['status'];
    $Op_WepA = explode('<!>', $Op_Game['wepa']);
    if ($Op_WepA[0] && !$Op_Game['status']) {
        GetWeaponDetails("{$Op_WepA['0']}", 'Op_SyWepA');
        if (isset($Op_Gen['msuit'])) {
            GetMsDetails($Op_Gen['msuit'], 'Op_Ms');
        }
        $Op_Org = ReturnOrg($Op_Game['organization']);
        if ($Op_Game['organization']) {
            $Op_Rank = ' ' . rankConvert($Op_Game['rank']);
        }
        if ($Op_Game['organization'] && $Op_Game['rights'] == '1') {
            $Op_RightsTitle = "<font style=\"color: yellow;font-weight: Bold;\"> " . $RightsClass['Major'] . "</font>";
        } elseif ($Op_Game['rights']) {
            $Op_RightsTitle = "<font style=\"color: yellow;font-weight: Bold;\"> " . $RightsClass['Leader'] . "</font>";
        }
        $mini_c++;
        echo "<tr align=center style=\"color: {$Op_Gen['color']}\">";
        echo "<td width=\"20\">{$mini_c}</td>";
        echo "<td width=\"250\">";
        echo "{$Op_Game['gamename']}";
 }
 //Adjust to user's setting
 if ($Pl_Settings['gen_img_dir']) {
     $General_Image_Dir = $Pl_Settings['gen_img_dir'];
 }
 if ($Pl_Settings['unit_img_dir']) {
     $Unit_Image_Dir = $Pl_Settings['unit_img_dir'];
 }
 if ($Pl_Settings['base_img_dir']) {
     $Base_Image_Dir = $Pl_Settings['base_img_dir'];
 }
 //Start Printing Table
 if ($UsrGenrl['msuit'] == "nil") {
     $UsrGenrl['msuit'] = '0';
 }
 GetMsDetails("{$UsrGenrl['msuit']}", 'PlMs');
 $Pl_Type = GetChType($UsrGenrl['typech']);
 if ($UsrGenrl['msuit'] && $CFU_Time - $UsrGenrl['time1'] >= 3) {
     $Pl_Repaired = AutoRepair("{$UsrGenrl['username']}");
     $PlGameVal['hp'] = $Pl_Repaired['hp'];
     $PlGameVal['en'] = $Pl_Repaired['en'];
     $PlGameVal['sp'] = $Pl_Repaired['sp'];
     $PlGameVal['status'] = $Pl_Repaired['status'];
 }
 switch ($PlGameVal['status']) {
     case 0:
         $StatusShow = "可發進";
         $StatusColor = '#143DC1';
         break;
     case 1:
         $StatusShow = "修理中";