if ($row['name'] == "EXPRESS AIRLINES 1, INC.") $this->arr_data[$key]['name'] = 'Delta Airlines';
if ($row['airline'] == "EXPRESS AIRLINES 1, INC.") $this->arr_data[$key]['airline'] = 'Delta Airlines';
}
- foreach( $this->dep_data as $key)
+ foreach( $this->dep_data as $key=>$value)
{
- $update_times[] = strtotime($row['msg_dtm']);
+ $update_times[] = strtotime($value['msg_dtm']);
if ($row['name'] == "EXPRESS AIRLINES 1, INC.") $this->dep_data[$key]['name'] = '<nobr>Delta Airlines</nobr>';
if ($row['airline'] == "EXPRESS AIRLINES 1, INC.") $this->dep_data[$key]['airline'] = '<nobr>Delta Airlines</nobr>';
}
rsort($update_times);
// get UTC offset for current date/time
$TimeDiff = 4+date("I");
-// $this->last_updated = '<div id="last-update"><p> </p><p><b>Last updated:</b> '.date("n/j/Y g:i a",$update_times[0]-($TimeDiff*60*60)).'</p></div>';
- $query = "SELECT msg_dtm FROM glm_flight
- ORDER BY msg_dtm DESC
- LIMIT 1;";
- $results = $wpdb->get_results($query, ARRAY_A);
- foreach($results as $key=>$value){
- $lastUpdated = date("n/j/Y g:i a", strtotime($value['msg_dtm']) - ($TimeDiff*60*60));
- }
- $this->last_updated = '<div id="last-update"><p> </p><p><b>Last updated:</b> '. $lastUpdated . '</p></div>';
+ $this->last_updated = '<div id="last-update"><p> </p><p><b>Last updated:</b> '.date("n/j/Y g:i a",$update_times[0]-($TimeDiff*60*60)).'</p></div>';
+ // $query = "SELECT msg_dtm FROM glm_flight
+ // ORDER BY msg_dtm DESC
+ // LIMIT 1;";
+ // $results = $wpdb->get_results($query, ARRAY_A);
+ // foreach($results as $key=>$value){
+ // $lastUpdated = date("n/j/Y g:i a", strtotime($value['msg_dtm']) - ($TimeDiff*60*60));
+ // }
+ // $this->last_updated = '<div id="last-update"><p> </p><p><b>Last updated:</b> '. $lastUpdated . '</p></div>';
//echo '<!--<pre>';
//print_r( $update_times );
//echo '</pre>-->';