Esempio n. 1
0
}
if ($action == 'get_all_flights') {
    getAdminAllFlights();
}
if ($action == 'delete_flight') {
    deleteFlight($_GET['flight_id']);
}
if ($action == 'edit_flight') {
    editFlight($_GET['flight_id'], $_GET['flight_no'], $_GET['flight_from'], $_GET['flight_to'], $_GET['departure_time'], $_GET['arrival_time'], $_GET['price'], $_GET['economy_seats'], $_GET['business_seats']);
}
if ($action == 'create_flight') {
    createFlight($_GET['flight_no'], $_GET['flight_from'], $_GET['flight_to'], $_GET['departure_time'], $_GET['arrival_time'], $_GET['price'], $_GET['economy_seats'], $_GET['business_seats']);
}
if ($action == 'get_passengers') {
    getPassengers($_GET['flight_id']);
}
if ($action == 'cancel_booking') {
    cancelBooking($_GET['booking_id']);
}
if ($action == 'get_airports') {
    getAirports();
}
if ($action == 'generate_flights') {
    generateFlights();
}
if ($action == 'send_sms') {
    sendSMS($_GET['flight_id']);
}
if ($action == "generatePassengers") {
    generatePassengers(100);
}
Esempio n. 2
0
<?php

require_once 'functions.php';
readCSV();
if (isset($_GET[ajaxOp]) && isset($_GET[action])) {
    if ($_GET[action] == "getAir") {
        $airports = readCSV();
        echo getAirports($_GET[ajaxOp], $airports);
    } else {
        if ($_GET[action] == "getCountries") {
            $airports = readCSV();
            echo getCountries($_GET[ajaxOp], $airports);
        }
    }
} else {
    ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link href="jquery.vector-map.css" media="screen" rel="stylesheet" type="text/css" />
<link href="maps.css" media="screen" rel="stylesheet" type="text/css" />
<link href="../styles/reset.css" media="screen" rel="stylesheet" type="text/css" />
<script src="../scripts/jquery-1.4.2.min.js" type="text/javascript"></script>
<script src="../scripts/jquery-ui-1.8.18.custom.min.js" type="text/javascript"></script>
<script type="text/javascript" src="../scripts/jquery.jscrollpane.js"></script>
<script type="text/javascript" src="../scripts/jquery.mousewheel.js"></script>
<script type="text/javascript" src="../scripts/autocomplete-ui.js"></script>
<script src="jquery.vector-map.js" type="text/javascript"></script>