$target = dbr(); if ($GAME_VARS['sudden_death'] == 1 && $user['login_id'] != 1) { //SD check #ensure target isn't dead. db("select count(ship_id) from {$db_name}_ships where login_id = '{$target['login_id']}'"); $count = dbr(); if (!isset($count[0]) || isset($count[0]) && $count[0] <= 0) { print_page($cw['sudden_death'], $st[735]); } } elseif ($user_ship['shipclass'] < 3) { print_page($cw['Error'], $st[736]); } if (isset($do_ship)) { //user has selected stuff to transfer $num_ships = count($do_ship); $target_ship_count = ship_counter($target['login_id']); $estimated_cost = $num_ships * $cost_per_transfer; $loop_txt = ""; $rs .= "<p /><a href='send_ship.php?target={$target['login_id']}'>" . $cw['tranfer_another_ship'] . "</a><br />"; #var_dump($target_ship_count); db2("select * from user_accounts where login_id = '" . $target['login_id'] . "' LIMIT 1"); $user_transferto = dbr2(); db2("select * from user_accounts where login_id = '" . $user['login_id'] . "' LIMIT 1"); $user_transferfrom = dbr2(); if ($user['cash'] < $estimated_cost) { # ensure have enough cash $text .= sprintf($st[737], $estimated_cost, $estimated_cost) . $cw['credits'] . "."; } elseif ($num_ships < 1) { $text .= $st[738]; } elseif ($target_ship_count['other_reached'] == 1 && $target_ship_count['war_reached'] == 1) { $text .= "<b class='b1'>{$target['login_name']}</b> " . $st[739];
} if (!isset($ship_stats['config'])) { $ship_stats['config'] = ""; } //begin ship checks if ($user['one_brob'] && config_check("oo", $ship_stats)) { db("select ship_id from {$db_name}_ships where login_id = '{$user['login_id']}' && config REGEXP 'oo'"); $results = dbr(); if (!empty($results['ship_id'])) { print_page($cw['flagship'], $st[370]); } else { $ship_stats['cost'] = $ship_stats['cost'] * $user['one_brob']; $ship_stats['tcost'] = $ship_stats['tcost'] * $user['one_brob']; } } $num_ships = ship_counter($user['login_id']); if ($num_ships['war_reached'] && config_check("bs", $ship_stats)) { $error_str = sprintf($st[371], $num_ships[warships], $GAME_VARS[max_warships]); } elseif ($num_ships['other_reached'] && !config_check("bs", $ship_stats)) { $error_str = sprintf($st[372], $num_ships[other_ships], $GAME_VARS[max_other_ships]); } elseif ($ship_type == 1 || $ship_type == 0) { $error_str = $st[373]; } elseif (!avail_check($ship_type)) { $error_str .= $st[374]; } elseif ($user['cash'] < $ship_stats['cost']) { $error_str = sprintf($st[375], $ship_stats[name]); } elseif ($user['tech'] < $ship_stats['tcost']) { $error_str = sprintf($st[376], $ship_stats[name]); } elseif (!isset($ship_name)) { $rs = "<p /><a href='bm_ships.php'>" . $cw['return_to_blacmarket_ships'] . "</a>"; get_var($cw['name_your_new_ship'], 'bm_ships.php', sprintf($st[377], $num_ships[total_ships]) . "<b class='b1'>{$ship_stats['name']}</b>:(20 Char Max)", 'ship_name', '');