Members Vangelis Posted December 10, 2012 Members Report Posted December 10, 2012 Hello boys and girls I have a question regarding our new virtual airline we where using fsairliners and we decided to swith to phpvms and for that reason i am migrating the look of fsairliners to phpvms at some point everything is ok Pireps are showin in a nice table the pirep details are linkable but i have a small problem with the log i managed to explode the log file by modifing the fspax module with a custon char but in the log at the end by the comments of fspax an n i shown in front of the text example Flight Critique -Are angry because they didn't reach their destination (flight too short). n<---- You made a very smooth landing. (+50) n<---You landed at the scheduled airport. (+30) n<--- Your arrived too early at your destination airport.(13h56:24 difference) (-100) n<--- Here are the links to the tables so you can have a visual idea of what i am talking about Main Table http://www.gsairways...atestpireps.php Pirep Detail http://www.gsairways...etail.php?ID=19 and this is the code of my query <?php require 'dbcon.php'; $result1 = mysql_query("SELECT `phpvms_pireps`.`pirepid` , `phpvms_pilots`.`lastname` , `phpvms_pilots`.`firstname` , `phpvms_pireps`.`fuelused` , `phpvms_aircraft`.`name` , `phpvms_aircraft`.`registration` , `phpvms_pireps`.`fuelprice` , `phpvms_pireps`.`revenue` , `phpvms_pireps`.`log` FROM `gsairway_vms`.`phpvms_pireps` INNER JOIN `gsairway_vms`.`phpvms_pilots` ON (`phpvms_pireps`.`pilotid` = `phpvms_pilots`.`pilotid`) INNER JOIN `gsairway_vms`.`phpvms_aircraft` ON (`phpvms_aircraft`.`id` = `phpvms_pireps`.`aircraft`)WHERE phpvms_pireps.pirepid='$_GET[iD]';"); if (!$result1) { echo 'Could not run query: ' . mysql_error(); exit; } $row1 = mysql_fetch_object($result1); $splitlog = explode("$$", $row1->log); for($i = 0; $i < count($splitlog); $i++) $result = mysql_query("SELECT * FROM phpvms_pireps WHERE pirepid = '$_GET[iD]'"); if (!$result) { echo 'Could not run query: ' . mysql_error(); exit; } $row = mysql_fetch_object($result); mysql_close($link); ?> so my question is how do i get rid of the n ? Thank you in advance Quote
Moderators Parkho Posted December 10, 2012 Moderators Report Posted December 10, 2012 I have integrated the fspax log into phpvms modifying the pirep table and the faspax config file to insert each line of the log file into a separate DB field then I managed to basically get rid of the "n" in front of each log data. Quote
Members Vangelis Posted December 10, 2012 Author Members Report Posted December 10, 2012 Wow that was fast Thank you for the answer 1st are you able to send me your fspax.php in order to do it like the way you mention 2ond isnt there another way ? in order to avoid any fuss with db changes Quote
Moderators Parkho Posted December 10, 2012 Moderators Report Posted December 10, 2012 Here is the fspax config file. Sorry, I'm unable to give you the DB PIREPS table with the modification since my older website is long gone and I could give you this file from the last back up of my older website but I think you can figure it our, no big deal. Also, I can tag along and help you set it up. fspax.zip Quote
Moderators Parkho Posted December 10, 2012 Moderators Report Posted December 10, 2012 2ond isnt there another way ? in order to avoid any fuss with db changes Believe it or not i have tried all ways with no luck. Quote
Members Vangelis Posted December 10, 2012 Author Members Report Posted December 10, 2012 Thank you for the file i will figure out the db fields from the script I will give it a go 2night and will post the results also 1 idea came up to explode the array field by using the n as identifier i will try that asswel and report back . Thank again for your help Quote
Members Vangelis Posted December 10, 2012 Author Members Report Posted December 10, 2012 So i made the changes and i altered the db table but it seems that all the data goes into the log cell Here is a screen shot of the db table phpvms_pilots http://www.baggelis.com/printscreen.bmp and a raw data of the log cell CompanyName=Greek Scouts Airways<br />nPilotName=Vangelis Boulasikis<br />nFlightId=GSA185<br />nOnlineNetworkNbr=0<br />nFlightDate=2012-12-09<br />nAircraftName=iFly 737-800 (Wide screen)<br />nAircraftType=MEJ<br />nNbrPassengers=118<br />nCargoWeight=0 kg<br />nMtow=78244 kg<br />nStartAircraftWeight=60681 kg<br />nEndAircraftWeight=53280 kg<br />nStartFuelQuantity=10446 kg<br />nEndFuelQuantity=2970 kg<br />nDepartureIcaoName=LGKV - Megas Alexandros Intl - Greece<br />nArrivalIcaoName=LGTS - Makedonia - Greece<br />nDepartureLocalHour=20:36<br />nArrivalLocalHour=21:30<br />nDepartureGmtHour=19:36:00<br />nArrivalGmtHour=20:31:00<br />nTotalBlockTime=00:55:05<br />nTotalBlockTimeNight=00:55:05<br />nTotalAirbornTime=00:48:26<br />nTotalTimeOnGround=00:11:51<br />nTotalDistance=78 Nm<br />nMaxAltitude=12260ft<br />nCruiseSpeed=307 kt<br />nCruiseMachSpeed=0.48<br />nCruiseTimeStartSec=330<br />nCruiseTimeStopSec=968<br />nCruiseFuelStart=5277 kg<br />nCruiseFuelStop=4851 kg<br />nLandingSpeed=122 kt<br />nLandingPitch=5.66<br />nTouchDownVertSpeedFt=-526.92<br />nCaptainSentMayday=0<br />nCrashFlag=0<br />nFlightResult=Perfect<br />nPassengersOpinion=100<br />nPassengersOpinionText=-Are relieved to have landed safely after the extreme weather they experienced during landing.<br>n-Wonder if they landed or if they crashed (hard landing).<br>n<br />nFailureText=<br />nCasualtiesText=<br />nPilotBonusText=Perfect Flight, no problems and very satisfied passengers. (+150)<br>nYou landed at the scheduled airport. (+30)<br>nExtreme weather conditions during approach, but a safe landing and satisfied passengers. (+100)<br>n<br />nBonusPoints=280<br />nPilotPenalityText=Flight regulations require that you have sufficient fuel reserves upon landing (45 mn); you only had reserves for 00h19 of flight. (-300)<br>n<br />nPenalityPoints=300<br />nBitsPenalityDisabled=0<br />n Quote
parkho25 Posted December 11, 2012 Report Posted December 11, 2012 So i made the changes and i altered the db table but it seems that all the data goes into the log cell Here is a screen shot of the db table phpvms_pilots http://www.baggelis....printscreen.bmp and a raw data of the log cell CompanyName=Greek Scouts Airways<br />nPilotName=Vangelis Boulasikis<br />nFlightId=GSA185<br />nOnlineNetworkNbr=0<br />nFlightDate=2012-12-09<br />nAircraftName=iFly 737-800 (Wide screen)<br />nAircraftType=MEJ<br />nNbrPassengers=118<br />nCargoWeight=0 kg<br />nMtow=78244 kg<br />nStartAircraftWeight=60681 kg<br />nEndAircraftWeight=53280 kg<br />nStartFuelQuantity=10446 kg<br />nEndFuelQuantity=2970 kg<br />nDepartureIcaoName=LGKV - Megas Alexandros Intl - Greece<br />nArrivalIcaoName=LGTS - Makedonia - Greece<br />nDepartureLocalHour=20:36<br />nArrivalLocalHour=21:30<br />nDepartureGmtHour=19:36:00<br />nArrivalGmtHour=20:31:00<br />nTotalBlockTime=00:55:05<br />nTotalBlockTimeNight=00:55:05<br />nTotalAirbornTime=00:48:26<br />nTotalTimeOnGround=00:11:51<br />nTotalDistance=78 Nm<br />nMaxAltitude=12260ft<br />nCruiseSpeed=307 kt<br />nCruiseMachSpeed=0.48<br />nCruiseTimeStartSec=330<br />nCruiseTimeStopSec=968<br />nCruiseFuelStart=5277 kg<br />nCruiseFuelStop=4851 kg<br />nLandingSpeed=122 kt<br />nLandingPitch=5.66<br />nTouchDownVertSpeedFt=-526.92<br />nCaptainSentMayday=0<br />nCrashFlag=0<br />nFlightResult=Perfect<br />nPassengersOpinion=100<br />nPassengersOpinionText=-Are relieved to have landed safely after the extreme weather they experienced during landing.<br>n-Wonder if they landed or if they crashed (hard landing).<br>n<br />nFailureText=<br />nCasualtiesText=<br />nPilotBonusText=Perfect Flight, no problems and very satisfied passengers. (+150)<br>nYou landed at the scheduled airport. (+30)<br>nExtreme weather conditions during approach, but a safe landing and satisfied passengers. (+100)<br>n<br />nBonusPoints=280<br />nPilotPenalityText=Flight regulations require that you have sufficient fuel reserves upon landing (45 mn); you only had reserves for 00h19 of flight. (-300)<br>n<br />nPenalityPoints=300<br />nBitsPenalityDisabled=0<br />n So now you need to get each value one by one and show it in a table. Quote
MichaelKattirtzis Posted April 26, 2016 Report Posted April 26, 2016 Ok guys i need your help once again In fspax.php file should i change this 'pilotpenaltytext'=>$_POST['PilotPenalityText'],); to this 'pilotpenaltytext'=>$npilotpenaltytext['PilotPenalityText'],); or this 'pilotpenaltytext'=>$npilotpenaltytext,); or leave it as is and just create the db entries ? ($npilotpenaltytext is the created db entry ) Quote
MichaelKattirtzis Posted April 27, 2016 Report Posted April 27, 2016 Basicly no matter what i do i created the db cell in phpvms_pireps that is varchar for eg . npilotpenalty but the variable does not go in the box why is that Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.