From: Anthony Talarico Date: Thu, 19 Jan 2017 13:27:39 +0000 (-0500) Subject: adding flight data template to test output from the database, adjusting the X-Git-Tag: v1.0.1^2~1 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=d190235d5c18a5c2e206fa27ec53dfba46dd918a;p=WP-Themes%2Fairciu.git adding flight data template to test output from the database, adjusting the flight class file to pull from CIU instead of PLN --- diff --git a/class_flight.php b/class_flight.php index a7d5dd5..b3e9325 100644 --- a/class_flight.php +++ b/class_flight.php @@ -61,7 +61,7 @@ include_once($_SERVER['DOCUMENT_ROOT'].'/wp-config.php' ); { // $this->toolbox = &$toolbox; // $this->DB =& $toolbox->DB; - $this->airports = array('DTW'=>'Detroit Metro','PLN'=>'Pellston'); + $this->airports = array('DTW'=>'Detroit Metro','CIU'=>'Chippewa County'); $this->time_codes = array('A'=>'Actual','E'=>'Estimated','D'=>'Descision','S'=>'Scheduled','R'=>'In-range'); } @@ -133,7 +133,7 @@ include_once($_SERVER['DOCUMENT_ROOT'].'/wp-config.php' ); function get_arr_flight_data() { global $wpdb; - $query = "select *, name AS airline from glm_flight, glm_airlines where flt_orig_date = current_date and flt_leg_dest = 'PLN' and glm_airlines.code = flt_airline order by cur_in_time;"; + $query = "select *, name AS airline from glm_flight, glm_airlines where flt_orig_date = current_date and flt_leg_dest = 'CIU' and glm_airlines.code = flt_airline order by cur_in_time;"; if( $data = $wpdb->get_results( $query, ARRAY_A ) ) { @@ -150,7 +150,7 @@ include_once($_SERVER['DOCUMENT_ROOT'].'/wp-config.php' ); function get_dep_flight_data() { global $wpdb; - $query = "select *, name AS airline from glm_flight, glm_airlines where flt_orig_date = current_date and flt_leg_orig = 'PLN' and glm_airlines.code = flt_airline order by cur_dep_time;"; + $query = "select *, name AS airline from glm_flight, glm_airlines where flt_orig_date = current_date and flt_leg_orig = 'CIU' and glm_airlines.code = flt_airline order by cur_dep_time;"; if( $data = $wpdb->get_results( $query, ARRAY_A ) ) { $this->dep_data = $data; diff --git a/flight-data.php b/flight-data.php new file mode 100644 index 0000000..4ff9753 --- /dev/null +++ b/flight-data.php @@ -0,0 +1,69 @@ + + + +get_flight_data(); ?> + + + +
+
+
+

Arrivals:

+ build_arrivals(); ?> + +
+
+
+
+

Departures:

+ build_departures(); ?> + + last_updated; ?> +
+
+
+ \ No newline at end of file