/*Load the data*/ $bothway = NULL; if (array_key_exists('bothway', $_POST) == true) { $bothway = $_POST['bothway']; } $link_conflicts = $sql_manager->check_link_conflicts($playerinfo['sector'], $target_sector); if ($target_information['allow_warpedit'] == 'N' && $bothway) { echo "Using a Warp Editor to remove a two-way link to sector " . $target_sector . " is not permitted!<br />"; TEXT_GOTOMAIN(); include "footer.php"; die; } else { if ($link_conflicts > 0) { /*link between the sectors does excist (one way) lets destroy it*/ if (!$bothway) { if ($sql_manager->delete_warp_link($playerinfo['sector'], $target_sector)) { $playerinfo['dev_warpedit'] = $playerinfo['dev_warpedit'] - 1; $playerinfo['turns'] = $playerinfo['turns'] - 1; $playerinfo['turns_used'] = $playerinfo['turns_used'] + 1; $updated_stats = array('dev_warpedit' => $playerinfo['dev_warpedit'], 'turns' => $playerinfo['turns'], 'turns_used' => $playerinfo['turns_used']); $sql_manager->updatePlayer($user_ship_id, "ships", $updated_stats); echo "The link has been removed between " . $playerinfo['sector'] . " and " . $target_sector . "!<br />"; } else { echo "An error occoured while trying to destroy this warp link.<br />"; } } else { if ($sql_manager->delete_warp_link($playerinfo['sector'], $target_sector)) { $reverse_conflicts = $sql_manager->check_link_conflicts($target_sector, $playerinfo['sector']); if ($link_conflicts > 0) { /*there is a link going back to the current sector and the user wants 2 way, so lets kill it*/ if ($sql_manager->delete_warp_link($target_sector, $playerinfo['sector'])) {