$_POST['res_2'] = $adata['taxes_2'] - $ftaxes[1]; $bbb = 1; } if ($_POST['res_3'] + $ftaxes[2] > $adata['taxes_3']) { $_POST['res_3'] = $adata['taxes_3'] - $ftaxes[2]; $ccc = 1; } $sql = 'SELECT u.*,p.planet_id FROM (user u) LEFT JOIN (planets p) ON p.planet_id=' . $_POST['receiver'] . ' WHERE u.user_id=p.planet_owner AND u.user_alliance=' . $game->player['user_alliance']; if (($user = $db->queryrow($sql)) === false || !isset($user['planet_id'])) { redirect('a=alliance_taxes'); } $planet = $user['planet_id']; account_log($game->player['user_id'], $user['user_id'], 3); if ($db->query('INSERT INTO scheduler_resourcetrade (planet,resource_1,resource_2,resource_3,resource_4,unit_1,unit_2,unit_3,unit_4,unit_5,unit_6,arrival_time) VALUES ("' . $planet . '","' . $_POST['res_1'] . '","' . $_POST['res_2'] . '","' . $_POST['res_3'] . '",0,0,0,0,0,0,0,"' . ($ACTUAL_TICK + $distance) . '")') == true) { $ships = ceil(($_POST['res_1'] + $_POST['res_2'] + $_POST['res_3']) / MAX_TRANSPORT_RESOURCES); send_fake_transporter(array(FERENGI_TRADESHIP_ID => $ships), FERENGI_USERID, 0, $planet, $ACTUAL_TICK + $distance); if ($aaa == 0) { $wert_1 = $_POST['res_1'] + $ftaxes[0]; } else { $wert_1 = $_POST['res_1']; } if ($bbb == 0) { $wert_2 = $_POST['res_2'] + $ftaxes[1]; } else { $wert_2 = $_POST['res_2']; } if ($ccc == 0) { $wert_3 = $_POST['res_3'] + $ftaxes[2]; } else { $wert_3 = $_POST['res_3']; }
unit_6=unit_6-' . $tradeunit['unit_6'] . ' WHERE planet_id= "' . $game->planet['planet_id'] . '"'; if ($db->query($sql) == true) { $sql = 'INSERT INTO scheduler_resourcetrade (planet,resource_1,resource_2,resource_3,unit_1,unit_2,unit_3,unit_4,unit_5,unit_6,arrival_time) VALUES ("' . $dest['planet_id'] . '","' . $traderes1 . '","' . $traderes2 . '","' . $traderes3 . '","' . $tradeunit['unit_1'] . '","' . $tradeunit['unit_2'] . '","' . $tradeunit['unit_3'] . '","' . $tradeunit['unit_4'] . '","' . $tradeunit['unit_5'] . '","' . $tradeunit['unit_6'] . '","' . ($ACTUAL_TICK + $distance) . '")'; if ($db->query($sql) == true) { // Fake Fleets starts: $res = $traderes1 + $traderes2 + $traderes3; $unit = $tradeunit['unit_1'] + $tradeunit['unit_2'] + $tradeunit['unit_3'] + $tradeunit['unit_4'] + $tradeunit['unit_5'] + $tradeunit['unit_6']; $shipsr = ceil($res / MAX_TRANSPORT_RESOURCES); $shipsu = ceil($unit / MAX_TRANSPORT_UNITS); $ships = max($shipsr, $shipsu); if ($ships < 1) { $ships = 1; } send_fake_transporter(array(FERENGI_TRADESHIP_ID => $ships), FERENGI_USERID, $game->planet['planet_id'], $dest['planet_id']); $db->query('UPDATE config SET ferengitax_1=ferengitax_1+' . $gebuehr[0] . ', ferengitax_2=ferengitax_2+' . $gebuehr[1] . ', ferengitax_3=ferengitax_3+' . $gebuehr[2]); } } redirect('a=tactical_cartography&planet_id=' . encode_planet_id($dpid)); } elseif (!empty($_POST['jump'])) { $type = (int) $_POST['jump_type']; switch ($type) { case 1: if (empty($_POST['memo_jump'])) { message(NOTICE, constant($game->sprache("TEXT28"))); } $memo_pieces = explode('-', $_POST['memo_jump']); if (count($memo_pieces) != 2) { message(GENERAL, constant($game->sprache("TEXT29")), 'count($memo_pieces) = ' . count($memo_pieces)); }