CFVA Posted January 19, 2018 Report Share Posted January 19, 2018 (edited) When exporting the schedule from the Admin Centre option, it is exporting the daysofweek column with a preceding SPACE i.e. " 0123456" not "0123456". This gives the problem that when imported back SATURDAY is always missing from the schedule, as it imports " 012345" Any ideas please as it is really annoying have to edit the whole column everytime Edited January 22, 2018 by LakerVirtual SOLVED Quote Link to comment Share on other sites More sharing options...
Moderators servetas Posted January 20, 2018 Moderators Report Share Posted January 20, 2018 Hmmm, which phpVMS version are you using? Quote Link to comment Share on other sites More sharing options...
CFVA Posted January 21, 2018 Author Report Share Posted January 21, 2018 23 hours ago, servetas said: Hmmm, which phpVMS version are you using? simpilot 5.5.2 Quote Link to comment Share on other sites More sharing options...
Moderators servetas Posted January 21, 2018 Moderators Report Share Posted January 21, 2018 I do not believe that this is the issue but can you try the following solution? Open your admin/modules/Import/Import.php, on lines 305-306 you should have something like this: $line = "{$s->code},{$s->flightnum},{$s->depicao},{$s->arricao},"."{$s->route},{$s->registration},{$s->flightlevel},{$s->distance}," . "{$s->deptime},{$s->arrtime},{$s->flighttime},{$s->notes},"."{$s->price},{$s->flighttype},{$s->daysofweek},{$s->enabled},{$s->week1},{$s->week2},{$s->week3},{$s->week4}"; As you can see, I have remove all the spaces between all the elements and especially the {$s->daysofweek}. Could you please attach your Import.php file? The most practical way is running a mysql command through phpMyAdmin as soon as you import your schedules that will automatically select all the days of the week. UPDATE phpvms_schedules SET daysofweek='0123456', week1='0123456', week2='0123456', week3='0123456', week4='0123456' WHERE 1; Just do not forget to replace "phpvms_" with your own database tables prefix if you are using a different one. Quote Link to comment Share on other sites More sharing options...
CFVA Posted January 22, 2018 Author Report Share Posted January 22, 2018 18 hours ago, servetas said: I do not believe that this is the issue but can you try the following solution? Open your admin/modules/Import/Import.php, on lines 305-306 you should have something like this: $line = "{$s->code},{$s->flightnum},{$s->depicao},{$s->arricao},"."{$s->route},{$s->registration},{$s->flightlevel},{$s->distance}," . "{$s->deptime},{$s->arrtime},{$s->flighttime},{$s->notes},"."{$s->price},{$s->flighttype},{$s->daysofweek},{$s->enabled},{$s->week1},{$s->week2},{$s->week3},{$s->week4}"; As you can see, I have remove all the spaces between all the elements and especially the {$s->daysofweek}. Could you please attach your Import.php file? The most practical way is running a mysql command through phpMyAdmin as soon as you import your schedules that will automatically select all the days of the week. UPDATE phpvms_schedules SET daysofweek='0123456', week1='0123456', week2='0123456', week3='0123456', week4='0123456' WHERE 1; Just do not forget to replace "phpvms_" with your own database tables prefix if you are using a different one. That seems to have solved it, by replacing the line of code in import.php. There were other columns that had spaces added everytime on export but all seems ok now. Thanks for the help Quote Link to comment Share on other sites More sharing options...
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.