Beispiel #1
0
<?php

if (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == "") {
    $redirect = "https://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
    header("HTTP/1.1 301 Moved Permanently");
    header("Location: {$redirect}");
}
require_once 'includes/functions.php';
$flights = new flights();
?>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<link href="images/default.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="images/colorbox.css" type="text/css" media="screen" />
<title><?php 
echo $flights->title;
?>
</title>
<script type="text/javascript" src="https://www.google.com/jsapi?key=<?php 
echo $google_key;
?>
"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
<script type="text/javascript" src="https://maps.google.com/maps/api/js?sensor=false&key=<?php 
echo $google_key;
?>
"></script>
<script type="text/javascript" src="images/markermanager/markermanager_packed.js"></script>
Beispiel #2
0
 $af_id = htmlspecialchars($_GET['fromairport']);
 //Airport to
 $at_id = htmlspecialchars($_GET['toairport']);
 /* For later
 		$af_id = airports::search(htmlspecialchars($_GET['fromairport']));
 		//Airport to
 		$at_id = airports::search(htmlspecialchars($_GET['toairport']));
 		*/
 //Leave Date
 $ds = htmlspecialchars($_GET['datestart']);
 //Return Date
 $dr = htmlspecialchars($_GET['datereturn']);
 //lookup flight from
 $ff_id = flights::getFlight_by_locations($af_id, $at_id);
 //lookup flight return
 $fr_id = flights::getFlight_by_locations($at_id, $af_id);
 //flights from
 if ($ff_id) {
     $from_flights = flight_details::getFlights_detail_by_ut($ff_id, $ds);
     array_push($result, $from_flights);
 } else {
     echo "No matches found, try another date.";
 }
 if (isset($_GET['datereturn'])) {
     //return flights
     if ($fr_id) {
         $return_flights = flight_details::getFlights_detail_by_ut($fr_id, $dr);
         array_push($result, $return_flights);
     } else {
         echo "No matches found, try another return date.";
     }
Beispiel #3
0
<?php

require_once "includes/functions.php";
$flights = new flights();
if ($argv[1] == "foursquare") {
    $flights->getFoursquare();
}
if (isset($_REQUEST['frob'])) {
    if ($flights->authenticated) {
        $flights->setFlickr();
    }
    exit;
}
if (isset($_REQUEST['code'])) {
    if ($flights->authenticated) {
        $flights->setFoursquare();
    }
    exit;
}
//$mysqli = new mysqli($db_host, $db_username, $db_password, $db_name);
//if (mysqli_connect_errno()) {
//   printf("Can't connect to MySQL Server. Errorcode: %s\n", mysqli_connect_error());
//   exit;
//}
$action = $_REQUEST['action'];
switch ($action) {
    case "airports":
        echo $flights->getGeoAirports();
        break;
    case "toggle":
        if ($flights->authenticated == 1) {