Пример #1
0
    echo "You do not have any warp editors.<br/><br/>";
    TEXT_GOTOMAIN();
    include "footer.php";
    die;
}
#DOES THE ZONE ALLOW WARP EDITING?#
$zone_information = $sql_manager->zone_information($playerinfo['sector'], 'allow_warpedit');
if ($zone_information['allow_warpedit'] == 'N') {
    echo "Using a Warp Editor in this sector is not permitted.<br/><br/>";
    TEXT_GOTOMAIN();
    include "footer.php";
    die;
}
#ARE YOU THE OWNER OF THIS SECTOR?#
if ($zone_information['allow_warpedit'] == 'L') {
    $zoneowner_info = $sql_manager->zone_owner_information($zone_information['zone_id']);
    $zoneteam = $sql_manager->team_id($zoneowner_info['owner']);
    if ($zoneowner_info['owner'] != $playerinfo['ship_id']) {
        if ($zoneteam['team'] != $playerinfo['team'] || $playerinfo['team'] == 0) {
            echo "Using a Warp Editor in this sector is not permitted.<br/><br/>";
            TEXT_GOTOMAIN();
            include "footer.php";
            die;
        }
    }
}
/*Play has turns and has warp editors, check to see if the user is trying to do somthing.*/
if (array_key_exists('editor', $_POST) == true) {
    $editor_active = $_POST['editor'];
}
$target_sector = NULL;