Jump to content
Nabeel

Importing Schedules

Recommended Posts

You can import all your schedules from CSV.

Goto "Operations" and then "Import Schedules". There is a link to download the CSV template, or you can download it from the post attachment.

Notes:

The airline MUST be added before you import

For best results - add all your airports before you import. Otherwise, it will go and grab the airport, but this can potentially cause a problem by either PHP running past it's maximum execution time, or completely failing because your host blocks URL fopen commands.

The route, leg, distance, and flight time columns can be blank.

The aircraft REGISTRATION NUMBER must be used. Otherwise it will fail. I need the registration number. If you do not use registration numbers, view this post on how to get around it..

template.zip

Share this post


Link to post
Share on other sites

Hi

I am trying to import schedules and wonder if this is correct...

code,flightnum,depicao,arricao,route,aircraft,distance,deptime,arrtime,flighttime,notes,price,flighttype,daysofweek   

                 

WIF,122,ENBL,ENGM,,LN-WIA,,0633,0730,,,DH8A,12345

Share this post


Link to post
Share on other sites

I don't remember off the top of my head, but the optional fields are listed on that page in the admin panel

Share this post


Link to post
Share on other sites

I import some of the schedules  :P

and what are you use for the days of week? Is it Mo, Tu, We number its not working :D

Share this post


Link to post
Share on other sites

My misstake :D

This is the correct way to import schedules:

code,flightnum,depicao,arricao,route,aircraft,distance,deptime,arrtime,flighttime,notes,price,flighttype,daysofweek   

                 

WIF,122,ENBL,ENGM,,LN-WIA,,0633,0730,,,,P,12345

Days of week:

1=Monday

2=Tuesday

3=Wednesday

4=Thursday

5=Friday

6=Saturday

0=Sunday

Flighttype:

P=Pax

C=Cargo

H=Charter

Share this post


Link to post
Share on other sites

Yup,  it's there on that page:

Flight Type can be "P" (Passenger), "C" (Cargo) or "H" (Charter). Enter it without quotes

Days of week - last column - enter 0-6 for Sunday (0) to Saturday (6): ie: Monday, Wed, Fri, Sat flights will be: 1356 as the value

Share this post


Link to post
Share on other sites

I have a fall schedule and a spring schedule, like the real CP Air did. So what I do is, replace the one with the other when daylight savings happens. But when I do this, some schedules will not get picked up properly in the pilots data, I believe...because they temporarily don't exist. So my quesation is......is there a way to have ALL the scedules in the database at all times, but only show the spring ones in the spring and the fall ones in the fall?! Hope I am making sense :)

Share this post


Link to post
Share on other sites

In the schedules.csv template, the last column is labeled "enabled" if you enter 1 in this column the flight is active, 0 and its inactive. I hope you do not have too many flights to edit manually in Excel but you can export your complete flight schedule to MS Excel, edit the last column and you can even enter spring or fall in the comments section as a reminder. If you are familiar with Excel, sort the csv file in Excel based on the comments column. It would be grouped by "spring" and "fall" then you can make one entry in the first line, copy and paste for the rest. Hey guys, this isn't php or html I know how to DO this!!! Hope this helps you. If you do not understand MS Excel, I am willing to help you. Let me know if you need help.

Share this post


Link to post
Share on other sites

Hi,

I'm having a problem:

- I exported my schedules, changed airline ICAO and tried to import the file.

- I previously changed the airline in phpvms.

The problem is I can't manage to import successfully. It keeps stating that the airline code doesn't exist (but it does exist). It seems that phpvms is reading all the line as the airline code, instead of reading just the two initial letters (TE) as it should. Please see below the error, and the schedules template in attachment:

Airline with code TE,003,LPPT,SBNT,"NAKO4S NAKOS BAROK UN873 SAMAR UN873 LIMAL UN873 CVS UN873 INTOL UN873 NTL",CS-TOO,38000,3054.72,"15:50 GMT"," 20:25 GMT-3"," 7.35"," "," 1968"," P"," 0123456"," 1" does not exist! Skipping...

Airline with code TE,004,SBNT,LPPT,"IBAGA UN873 INTOL UN873 LIMAL UN873 SAMAR UN873 BAROK LIGRA LIGR4A",CS-TOO,37000,3054.72,"21:55 GMT-3"," 08:05 GMT"," 7.1"," "," 1855"," P"," 0123456"," 1" does not exist! Skipping...

Airline with code TE,011,LPPT,SBRF,"NAKO2N NAKOS BAROK UN873 SAMAR UN873 LIMAL UN873 INTOL UN873 NTL UZ10 RUMBA UW33 REC ESGUMA",CS-TOO,36000,3166.24,"16:30 GMT"," 21:30 GMT-3"," 8"," "," 1162"," P"," 0123456"," 1" does not exist! Skipping...

Airline with code TE,012,SBRF,LPPT,"ISAD3A ISADO ESGUM UB623 FNO UN857 NEURA UN857 BOTNO UN857 ETIBA UN857 DEREV UN729 SAMAR UN873 BAROK LIGRA LIGR4A",CS-TOO,35000,3166.24,"23:25 GMT-3"," 10:00 GMT"," 7.35"," "," 1150"," P"," 0123456"," 1" does not exist! Skipping...

Airline with code TE,019,LPPT,SBSV,"BUSE2P BUSEN LUTAK 3520N 3026N 2529N ULTEM 1032N NANIK UN741 JOBER UN741 FLZ UZ19 FROTI BONF BONF",CS-TOO,36000,3512.83,"16:30 GMT"," 23:15 GMT-3"," 8.45"," "," 1111"," P"," 0123456"," 1" does not exist! Skipping...

Airline with code TE,024,SBSV,LPPT,"PUCA NTL UN873 FEMUR UN873 INTOL UN873 IPERA UN873 LIMAL UN873 SAMAR UN873 BAROK LIGRA LIGR4A",CS-TOO,37000,3512.83,"23:55 GMT-3"," 11:10 GMT"," 8.15"," "," 1005"," P"," 0123456"," 1" does not exist! Skipping...

Airline with code TE,027,LPPT,SBFZ,"GANS4S GANSU NELSO UN741 GAMBA UN741 NANIK UN741 JOBER UN741 FLZ",CS-TOO,38000,3033.81,"16:35 GMT"," 21:05 GMT-3"," 7.3"," "," 1121"," P"," 0123456"," 1" does not exist! Skipping...

Airline with code TE,028,SBFZ,LPPT,"URAXA MAGNO UN866 SAKSI UN866 IREDO UN866 APASO UN866 KONBA UN866 BEXAL LIGRA LIGR4A",CS-TOO,39000,3033.81,"00:55 GMT-3"," 11:00 GMT"," 7.05"," "," 1025"," P"," 0123456"," 1" does not exist! Skipping...

Airline with code TE,047,LPPT,SBPA,"NAKO2N NAKOS BAROK UN873 SAMAR UN873 LIMAL UN873 POMAT UN873 INTOL UN873 FEMUR UN873 NTL UN873 GONZA UW58 MAVIK UW58 SCB UA310 CTB UW24 OCASO HERA1",CS-TOO,38000,4757.22,"09:40 GMT"," 18:55 GMT-3"," 11.15"," "," 1213"," P"," 0123456"," 1" does not exist! Skipping...

Anyone can help?

Tony

Share this post


Link to post
Share on other sites

Hi,

I'm having a problem:

- I exported my schedules, changed airline ICAO and tried to import the file.

- I previously changed the airline in phpvms.

The problem is I can't manage to import successfully. It keeps stating that the airline code doesn't exist (but it does exist). It seems that phpvms is reading all the line as the airline code, instead of reading just the two initial letters (TE) as it should. Please see below the error, and the schedules template in attachment:

Airline with code TE,003,LPPT,SBNT,"NAKO4S NAKOS BAROK UN873 SAMAR UN873 LIMAL UN873 CVS UN873 INTOL UN873 NTL",CS-TOO,38000,3054.72,"15:50 GMT"," 20:25 GMT-3"," 7.35"," "," 1968"," P"," 0123456"," 1" does not exist! Skipping...

Airline with code TE,004,SBNT,LPPT,"IBAGA UN873 INTOL UN873 LIMAL UN873 SAMAR UN873 BAROK LIGRA LIGR4A",CS-TOO,37000,3054.72,"21:55 GMT-3"," 08:05 GMT"," 7.1"," "," 1855"," P"," 0123456"," 1" does not exist! Skipping...

Airline with code TE,011,LPPT,SBRF,"NAKO2N NAKOS BAROK UN873 SAMAR UN873 LIMAL UN873 INTOL UN873 NTL UZ10 RUMBA UW33 REC ESGUMA",CS-TOO,36000,3166.24,"16:30 GMT"," 21:30 GMT-3"," 8"," "," 1162"," P"," 0123456"," 1" does not exist! Skipping...

Airline with code TE,012,SBRF,LPPT,"ISAD3A ISADO ESGUM UB623 FNO UN857 NEURA UN857 BOTNO UN857 ETIBA UN857 DEREV UN729 SAMAR UN873 BAROK LIGRA LIGR4A",CS-TOO,35000,3166.24,"23:25 GMT-3"," 10:00 GMT"," 7.35"," "," 1150"," P"," 0123456"," 1" does not exist! Skipping...

Airline with code TE,019,LPPT,SBSV,"BUSE2P BUSEN LUTAK 3520N 3026N 2529N ULTEM 1032N NANIK UN741 JOBER UN741 FLZ UZ19 FROTI BONF BONF",CS-TOO,36000,3512.83,"16:30 GMT"," 23:15 GMT-3"," 8.45"," "," 1111"," P"," 0123456"," 1" does not exist! Skipping...

Airline with code TE,024,SBSV,LPPT,"PUCA NTL UN873 FEMUR UN873 INTOL UN873 IPERA UN873 LIMAL UN873 SAMAR UN873 BAROK LIGRA LIGR4A",CS-TOO,37000,3512.83,"23:55 GMT-3"," 11:10 GMT"," 8.15"," "," 1005"," P"," 0123456"," 1" does not exist! Skipping...

Airline with code TE,027,LPPT,SBFZ,"GANS4S GANSU NELSO UN741 GAMBA UN741 NANIK UN741 JOBER UN741 FLZ",CS-TOO,38000,3033.81,"16:35 GMT"," 21:05 GMT-3"," 7.3"," "," 1121"," P"," 0123456"," 1" does not exist! Skipping...

Airline with code TE,028,SBFZ,LPPT,"URAXA MAGNO UN866 SAKSI UN866 IREDO UN866 APASO UN866 KONBA UN866 BEXAL LIGRA LIGR4A",CS-TOO,39000,3033.81,"00:55 GMT-3"," 11:00 GMT"," 7.05"," "," 1025"," P"," 0123456"," 1" does not exist! Skipping...

Airline with code TE,047,LPPT,SBPA,"NAKO2N NAKOS BAROK UN873 SAMAR UN873 LIMAL UN873 POMAT UN873 INTOL UN873 FEMUR UN873 NTL UN873 GONZA UW58 MAVIK UW58 SCB UA310 CTB UW24 OCASO HERA1",CS-TOO,38000,4757.22,"09:40 GMT"," 18:55 GMT-3"," 11.15"," "," 1213"," P"," 0123456"," 1" does not exist! Skipping...

Anyone can help?

Tony

schedules.csv

Share this post


Link to post
Share on other sites

I downloaded your schedules.csv file and opened it in MS Excel. Everything is jumbled together and not being placed into the proper columns, which is why phpvms is NOT reading it correctly when you try to upload it. They are complete lines of text to Excel and phpvms. As i see it you are going to have open the file in Excel and put the proper information into the proper columns to use it,

I am going to go back and give this a minute or two to see how to do this and get beck here.

I'm back, the only way I see to fix this which is what I did, is to insert a blank line above your first schedule, enter the info one column at a time manually, skip the route until all info is in the line. Then delete everything in the line in the entry area except the route, copy it into the route column. Sorry you have 214 schedules. I would suggest you save your schedule with a new name and periodically save as you enter not to lose your changes.

If someone knows a better way, help him out.

  • Like 1

Share this post


Link to post
Share on other sites

Hi tgycgijoes,

Thanks for the help. Your explanation gave some ideas and I found a solution that I post here in case someone in the future has a similar problem.

I edited the csv file in notepad and found that before the airline code the line started with ". This was not visible in Excel.

So I deleted the " character, and saved in notepad. Then I opened the csv file in excel, didn't change anything, just did a save.

Uploaded and it's fine!

Regards,

Share this post


Link to post
Share on other sites

×