From 8aa78ef1f29f95b5fa6821c7099f4662f6be0fd5 Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Thu, 31 Mar 2016 11:39:14 -0400 Subject: [PATCH] testing inclusion of db_auto_exec to make sure output buffer doest supress functions --- glmfds.php | 80 +++++++++++++++++++++++++++--------------------------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/glmfds.php b/glmfds.php index 88430bd..4550ab9 100644 --- a/glmfds.php +++ b/glmfds.php @@ -171,46 +171,46 @@ class FlightData{ if( $flight_type != 'Z' ) { -// if( ($f = db_auto_get_row( "SELECT msg_seq_id FROM flight WHERE flt_orig_date = '$flt_orig_date' AND flt_numb = '$flt_numb';", 0, SI_CONN_STR, FALSE )) == false ) -// { -// db_auto_exec( "INSERT INTO flight -// ( -// msg_dtm, msg_seq_id, flt_orig_date, flt_airline, flt_numb, flt_leg_orig, flt_leg_dest, flt_leg_vers, -// sch_leg_orig, sch_leg_dest, sch_dep_time, sch_off_time, sch_on_time, sch_in_time, cur_dep_time, cur_dep_time_code, -// cur_off_time , cur_off_time_code, cur_on_time, cur_on_time_code, cur_in_time, cur_in_time_code, delay_code, -// depart_gate, arriv_gate, radio_code, aircraft, reg_numb, remarks, food_code, flight_type, downline_leg, -// overfly, canceled, dep_ontime, arriv_ontime -// ) -// VALUES -// ( -// '$msg_dtm', '$msg_seq_id', '$flt_orig_date', '$flt_airline', '$flt_numb', '$flt_leg_orig', '$flt_leg_dest', $flt_leg_vers, -// '$sch_leg_orig', '$sch_leg_dest', '$sch_dep_time', '$sch_off_time', '$sch_on_time', '$sch_in_time', '$cur_dep_time', '$cur_dep_time_code', -// '$cur_off_time', '$cur_off_time_code', '$cur_on_time', '$cur_on_time_code', '$cur_in_time', '$cur_in_time_code', '$delay_code', -// '$depart_gate', '$arriv_gate', '$radio_code', '$aircraft', '$reg_numb', '$remarks', '$food_code', '$flight_type', '$downline_leg', -// '$overfly', '$canceled', '$dep_ontime', '$arriv_ontime' -// );", SI_CONN_STR, FALSE ); -// -// echo "Flight $flt_numb on $flt_orig_date added
"; -// } -// else -// { -// if( $msg_seq_id <= $f['msg_seq_id'] ) -// echo 'Duplicate message or message out of sequence.
'; -// else -// { -// db_auto_exec( "UPDATE flight SET -// msg_dtm = '$msg_dtm', msg_seq_id = '$msg_seq_id', -// flt_leg_orig = '$flt_leg_orig', flt_leg_dest = '$flt_leg_dest', flt_leg_vers = $flt_leg_vers, sch_leg_orig = '$sch_leg_orig', -// sch_leg_dest = '$sch_leg_dest', sch_dep_time = '$sch_dep_time', sch_off_time = '$sch_off_time', sch_on_time = '$sch_on_time', -// sch_in_time = '$sch_in_time', cur_dep_time = '$cur_dep_time', cur_dep_time_code = '$cur_dep_time_code', cur_off_time = '$cur_off_time', -// cur_off_time_code = '$cur_off_time_code', cur_on_time = '$cur_on_time', cur_on_time_code = '$cur_on_time_code', cur_in_time = '$cur_in_time', -// cur_in_time_code = '$cur_in_time_code', delay_code = '$delay_code', depart_gate = '$depart_gate', arriv_gate = '$arriv_gate', -// radio_code = '$radio_code', aircraft = '$aircraft', reg_numb = '$reg_numb', remarks = '$remarks', food_code = '$food_code', flight_type = '$flight_type', -// downline_leg = '$downline_leg', overfly = '$overfly', canceled = '$canceled', dep_ontime = '$dep_ontime', arriv_ontime = '$arriv_ontime' -// WHERE flt_orig_date = '$flt_orig_date' AND flt_numb = '$flt_numb';", SI_CONN_STR, FALSE ); -// echo "Flight $flt_numb on $flt_orig_date updated
"; -// } -// } + if( ($f = db_auto_get_row( "SELECT msg_seq_id FROM flight WHERE flt_orig_date = '$flt_orig_date' AND flt_numb = '$flt_numb';", 0, SI_CONN_STR, FALSE )) == false ) + { + db_auto_exec( "INSERT INTO flight + ( + msg_dtm, msg_seq_id, flt_orig_date, flt_airline, flt_numb, flt_leg_orig, flt_leg_dest, flt_leg_vers, + sch_leg_orig, sch_leg_dest, sch_dep_time, sch_off_time, sch_on_time, sch_in_time, cur_dep_time, cur_dep_time_code, + cur_off_time , cur_off_time_code, cur_on_time, cur_on_time_code, cur_in_time, cur_in_time_code, delay_code, + depart_gate, arriv_gate, radio_code, aircraft, reg_numb, remarks, food_code, flight_type, downline_leg, + overfly, canceled, dep_ontime, arriv_ontime + ) + VALUES + ( + '$msg_dtm', '$msg_seq_id', '$flt_orig_date', '$flt_airline', '$flt_numb', '$flt_leg_orig', '$flt_leg_dest', $flt_leg_vers, + '$sch_leg_orig', '$sch_leg_dest', '$sch_dep_time', '$sch_off_time', '$sch_on_time', '$sch_in_time', '$cur_dep_time', '$cur_dep_time_code', + '$cur_off_time', '$cur_off_time_code', '$cur_on_time', '$cur_on_time_code', '$cur_in_time', '$cur_in_time_code', '$delay_code', + '$depart_gate', '$arriv_gate', '$radio_code', '$aircraft', '$reg_numb', '$remarks', '$food_code', '$flight_type', '$downline_leg', + '$overfly', '$canceled', '$dep_ontime', '$arriv_ontime' + );", SI_CONN_STR, FALSE ); + + echo "Flight $flt_numb on $flt_orig_date added
"; + } + else + { + if( $msg_seq_id <= $f['msg_seq_id'] ) + echo 'Duplicate message or message out of sequence.
'; + else + { + db_auto_exec( "UPDATE flight SET + msg_dtm = '$msg_dtm', msg_seq_id = '$msg_seq_id', + flt_leg_orig = '$flt_leg_orig', flt_leg_dest = '$flt_leg_dest', flt_leg_vers = $flt_leg_vers, sch_leg_orig = '$sch_leg_orig', + sch_leg_dest = '$sch_leg_dest', sch_dep_time = '$sch_dep_time', sch_off_time = '$sch_off_time', sch_on_time = '$sch_on_time', + sch_in_time = '$sch_in_time', cur_dep_time = '$cur_dep_time', cur_dep_time_code = '$cur_dep_time_code', cur_off_time = '$cur_off_time', + cur_off_time_code = '$cur_off_time_code', cur_on_time = '$cur_on_time', cur_on_time_code = '$cur_on_time_code', cur_in_time = '$cur_in_time', + cur_in_time_code = '$cur_in_time_code', delay_code = '$delay_code', depart_gate = '$depart_gate', arriv_gate = '$arriv_gate', + radio_code = '$radio_code', aircraft = '$aircraft', reg_numb = '$reg_numb', remarks = '$remarks', food_code = '$food_code', flight_type = '$flight_type', + downline_leg = '$downline_leg', overfly = '$overfly', canceled = '$canceled', dep_ontime = '$dep_ontime', arriv_ontime = '$arriv_ontime' + WHERE flt_orig_date = '$flt_orig_date' AND flt_numb = '$flt_numb';", SI_CONN_STR, FALSE ); + echo "Flight $flt_numb on $flt_orig_date updated
"; + } + } } // end of if flight_type != 'Z' } -- 2.17.1