コード例 #1
0
 public function to_string()
 {
     date_default_timezone_set('America/New_York');
     $res = "Total cost: \${$this->cost}</br>";
     $res = "{$res} Total flights: {$this->num_flights}</br>";
     $fuck_php = round($this->get_trip_time() / 60, 0);
     $time = date('Y-m-d H:i:s', $this->flights[0]['e_depart_time']);
     $res = "{$res} Departs at: {$time} </br>";
     $time = date('Y-m-d H:i:s', $this->flights[$this->num_flights - 1]['e_arrival_time']);
     $res = "{$res} Arrives at: {$time} </br>";
     $res = "{$res} Total time (minutes): {$fuck_php}</br>";
     $res = "{$res} Flights: </br>";
     $count = 1;
     foreach ($this->flights as $flight) {
         $a = Airport::get_name_by_id($flight['org_id'], new users());
         $b = Airport::get_name_by_id($flight['dest_id'], new users());
         $res = $res . $count . " : " . $a . " to " . $b . "</br>";
         //$res .= "     departs at: " .  date('D M j, Y - g:i', $flight['e_depart_time']) . "<br>";
         //$res .= "     arrives at: " .  date('D M j, Y - g:i', $flight['e_arrival_time']) . "<br>";
         $res .= "     departs at: " . $flight['e_depart_time'] . "<br>";
         $res .= "     arrives at: " . $flight['e_arrival_time'] . "<br>";
         $count++;
     }
     $res .= "<br>";
     return $res;
 }
コード例 #2
0
ファイル: Receipt.php プロジェクト: NLP-Project/GatorAirlines
if (isset($_POST['go'])) {
    $message = " <div   style=background-image:url(images/ticket.jpg); width:959px;height:500px;><strong>Print ticket<strong>\n\t   <img input type=image src=images/print.png height=40px width=40px onClick=window.print()/>\n\t<form id=CheckOutForm action=survey.php method=post >\n\t<div style=margin-left:400px;>\n\t<tr><br/><br/><br/><br/>\n\t<strong><td>First Name</td></strong>\n\t<?\techo {$_POST['First_N']}\t?>\n\t</br>\n\t\n\t<strong><td>Last Name</td></strong>\n\t<?\techo {$_POST['Last_N']}\t?>\n\t</br>\n\t\n\t<strong><td>Email</td></strong>\n\t<?\techo {$_POST['email']}\t?>\n\t</br>\n\t\n\t<strong><td>Your Flight ID: </td></strong>\n\t<?\techo {$this_id}\t?>\n\t</br>\n\t\n\t<!-- ONLY DOES FOR 1 SEAT SELECTED -->\n\t<strong><td>Your Seat(s) ID: </td></strong>\n\t<?\techo {$_SESSION['seat_id']};\t?>\n\t</br>\n\t\n\t<strong><td>From: </td></strong>\n\t<? echo {$a}\t?>\n\t</br>\n\t\n\t<strong><td>TO: </td></strong>\n\t<? echo {$b}\t?>\n\t</br>\n\t\n\t<strong><td>Departure Time: </td></strong>\n\t<? echo {$d_date}\t?>\n\t</br>\n\t\n\t<strong><td>Arrival Time: </td></strong>\n\t<? echo {$a_date}\t?>\n\t</br>\n\t\n\t<button><input type=submit id =Sumbit class=button1 value=Take quick survey><button>\n\t\n\t</div>";
    $email = new email($_POST['email'], $message, "Password Recovery (GA)");
    $email->send_email();
}
$users = new users();
$num = trim($_SESSION['leave_ids']);
$id_array = explode("_", $num);
$this_id = $id_array[0];
$seat = $_SESSION['seat_id'];
$flight = $users->get_specific_flight($this_id);
$d_time = $flight[0]['e_depart_time'];
$a_time = $flight[0]['e_arrival_time'];
//echo $this_id;
$a = Airport::get_name_by_id($flight[0]['org_id'], $users);
$b = Airport::get_name_by_id($flight[0]['dest_id'], $users);
$d_date = date('M j, Y - g:ia', $d_time);
$a_date = date('M j, Y - g:ia', $a_time);
//$d_date = $_SESSION['d_time'];
//$a_date = $_SESSION['a_time'];
$record = array();
//$record['seat_id'] = $seat;
if (isset($_SESSION['leave_ids'])) {
    if (isset($_SESSION['loggedIn'])) {
        $record['cid'] = $_SESSION['cid'];
    } else {
        $record['cid'] = 1;
    }
    $price = $users->get_price($flight[0]['flight_id']);
    $record['price'] = $price[0]['coach_class_cost'];
    $record['flight_id'] = $flight[0]['flight_id'];
コード例 #3
0
ファイル: search.php プロジェクト: NLP-Project/GatorAirlines
	<?php 
include 'section/header2.php';
?>


	<section id="content">
		   <div class="wrapper pad1">
		   
		 
		 

<?php 
//output routes
$to_routes = $routes->depart_routes;
$a = Airport::get_name_by_id($_POST['org'], $user);
$b = Airport::get_name_by_id($_POST['dest'], $user);
$option_num = 1;
if (count($to_routes) == 0) {
    echo "Sorry, no flights available";
    //header("location: home.php?e=1");
}
?>

<form class="flight_selection" action="SeatAssignments.php" method="POST">
<center>
<table>
    <tr>
        <td style='width: 50px'><center>Option</center></td>
        <td style='width: 150px'><center>Depart Time</center></td>
        <td style='width: 150px'><center>Arrival Time</center></td>
        <td style='width: 50px'><center>Cost</center></td>
コード例 #4
0
	<section id="content">
		   <div class="wrapper pad1">
		   
		 <!--  DO YOU WORK HERE !!!! -->  
		 
		 
	 
		   
 <?php 
echo "<strong>My Flights</strong><img src= images/plus.png class=but1 />";
echo "<div class=content_1 style=background-color:#eee9e9;>";
echo "you currently have " . count($reservations) . " reservation(s) on your account.";
echo " <table width=77% border=1 cellpadding=5>\n  <tr>\n  <td><strong>Departure</strong></td>\n    <td><strong>Destination</strong></td>\n    <td><strong>Ticket#</strong></td>\n    <td><strong>Flight#</strong></td>\n    <td><strong>Seat#</strong></td>\n    <td><strong>Price</strong></td>\n\t<td><strong>Status</strong></td>\n\t<td><strong>Action</strong></td>\n  </tr>";
foreach ($results as $result) {
    $depart = Airport::get_name_by_id($result['org_id'], $users);
    $arrival = Airport::get_name_by_id($result['dest_id'], $users);
    $ticket_id = $result['ticket_id'];
    echo "<tr>\n    <td>{$depart}</td>\n\t<td>{$arrival}</td>\n    <td>{$result['ticket_id']}</td>\n    <td>{$result['flight_id']}</td>\n    <td>{$result['seat_id']}</td>\n    <td>\${$result['price']}</td>\n\t<td><strong style=color:green;>Active</strong></td>";
    echo "<td><a href='checkin.php?id=" . $result['ticket_id'] . "'><input type=submit style=background-color:#87ceeb;  value=check-in></td>";
    echo "<td><a href='delete.php?id=" . $result['ticket_id'] . "'><button class=button1 onclick='return doConfirmDelete(this.id);'>Delete</button></a></td>";
    echo "\n  </tr>";
}
echo "</table>";
echo "</div>";
?>
     
		   
		 
				        </div>
			</section>
			
コード例 #5
0
 public function get_layovers()
 {
     foreach ($this->flights as $flight) {
         $a = Airport::get_name_by_id($flight['org_id'], new users());
         $b = Airport::get_name_by_id($flight['dest_id'], new users());
         $depart = $flight['e_depart_time'];
         $arrive = $flight['e_arrival_time'];
     }
 }