stuartpb
Members-
Posts
326 -
Joined
-
Last visited
-
Days Won
2
Content Type
Profiles
Forums
phpVMS Resources
Downloads
Everything posted by stuartpb
-
Has anyone else tried this yet? Any success?
-
Thanks Nabeel, I've been trying to figure this out for a while. The code worked perfectly, apart from the $schedule->daysofweek bit, I just had to change it to $route Here's a pic:
-
Don't worry Joeri, next time he asks for help, just ignore him. I know I will be
-
To view those tutorials???? A web browser will do Ahh to view the uploaded CV? You would specify a folder to upload to on your server, and then you could create a FTP account to be able to download the CV. You can do it other ways, the tuts I showed were just a basic introduction. If you google it there are loads of different methods to file uploads.
-
There's a good tutorial on form design here: http://www.tizag.com/htmlT/forms.php If you scroll down, there is a section dealing with the HTML form upload field. Then the php for the upload function can be found here: http://www.tizag.com/phpT/fileupload.php Hope that helps
-
That code I posted in SimPilot's FrontSchedule search thread, for the "your location" to appear in the departure select field proved problematic, as it was setting everyone's location the same as mine. Not sure why, but it was.Anyway, I've managed to sort it out now. I've posted here because I've modified two files: The airport_search.tpl file from the FrontSchedule Addon (located in your core/templates folder when you have installed the addon.) The default schedule_results.tpl that is shipped with phpVMS First up, replace the code shown below from Simpilot's airport_search.tpl with the code underneath that. airport_search.tpl - Original code: <td>Select A Departure Airfield</td> <td> <select class="search" name="depicao"> <option value="">All</option> <?php foreach ($airports as $airport) {echo '<option value="'.$airport->icao.'">'.$airport->icao.' - '.$airport->name.'</option>';} ?> </select> </td> </tr> Replace with: <td>Select A Departure Airfield</td> <td> <select class="search" name="depicao"> <option value="">All</option> <?php if (Auth::LoggedIn()) {?> <?php $reports = PIREPData::getLastReports(Auth::$userinfo->pilotid, 1, PIREP_ACCEPTED); if(is_object($reports)) {echo '<option value="'.$reports->arricao.'">Your current location ('.$reports->arricao.')</option>';} elseif(!$reports) {echo '<option value="'.Auth::$userinfo->hub.'">Your current location ('.Auth::$userinfo->hub.')</option>';}}?> <?php foreach ($airports as $airport) { echo '<option value="'.$airport->icao.'">'.$airport->icao.' - '.$airport->name.'</option>'; }?> </select> </td> </tr> Just to explain exactly what this does again, when a pilot is searching for flights, they can choose the "Your Current Location ()" option from the departure airport search field. Then the results will display flights from either the hub your pilot is located at if they've never flown yet, or if they've filed a pirep and it's been accepted - their last arrival airport. I done this because in my VA, pilots must fly flights in logical order, they can only book flights from the airport they last arrived at. This little amendment to Simpilot's great addon provides pilots with an easy way to find the flights they are eligible to fly. I've made some mods to the schedule_results.tpl file too, so that the add to bid link is removed if the pilot is not located at an airport, their rank is too low for the aircraft and also if the flight is not operating on the day. Original schedule_results.tpl - Delete the following from this file: /* Uncomment this code if you want only schedules which are from the last PIREP that pilot filed */ /*if(Auth::LoggedIn()) { $search = array( 'p.pilotid' => Auth::$userinfo->pilotid, 'p.accepted' => PIREP_ACCEPTED ); $reports = PIREPData::findPIREPS($search, 1); // return only one if(is_object($reports)) { # IF the arrival airport doesn't match the departure airport if($reports->arricao != $route->depicao) { continue; } } }*/ /* Skip over a route if it's not for this day of week Left this here, so it can be omitted if your VA doesn't use this. Comment out these two lines if you don't want to. */ /* Check if a 7 is being used for Sunday, since PHP thinks 0 is Sunday */ $route->daysofweek = str_replace('7', '0', $route->daysofweek); if(strpos($route->daysofweek, date('w')) === false) continue; /* END DAY OF WEEK CHECK */ /* This will skip over a schedule if it's been bid on This only runs if the below setting is enabled If you don't want it to skip, then comment out this code below by adding // in front of each line until the END DISABLE SCHEDULE comment below If you do that, and want to show some text when it's been bid on, see the comment below */ if(Config::Get('DISABLE_SCHED_ON_BID') == true && $route->bidid != 0) { continue; } /* END DISABLE SCHEDULE ON BID */ /* Skip any schedules which have aircraft that the pilot is not rated to fly (according to RANK), only skip them if they are logged in. */ if(Config::Get('RESTRICT_AIRCRAFT_RANKS') === true && Auth::LoggedIn()) { /* This means the aircraft rank level is higher than what the pilot's ranklevel, so just do "continue" and move onto the next route in the list */ if($route->aircraftlevel > Auth::$userinfo->ranklevel) { continue; } } Then replace the following code: <td nowrap> <a href="<?php echo url('/schedules/details/'.$route->id);?>">View Details</a><br /> <a href="<?php echo url('/schedules/brief/'.$route->id);?>">Pilot Brief</a><br /> <?php # Don't allow overlapping bids and a bid exists if(Config::Get('DISABLE_SCHED_ON_BID') == true && $route->bidid != 0) { ?> <a id="<?php echo $route->id; ?>" class="addbid" href="<?php echo actionurl('/schedules/addbid');?>">Add to Bid</a> <?php } else { if(Auth::LoggedIn()) { ?> <a id="<?php echo $route->id; ?>" class="addbid" href="<?php echo url('/schedules/addbid');?>">Add to Bid</a> <?php } } ?> </td> With this code: <td nowrap> <?php if(!Auth::LoggedIn()) {echo 'Restricted Access';} else {?> <a href="<?php echo url('/schedules/brief/'.$route->id);?>">Pilot Brief</a><br/> <?php if(Auth::LoggedIn()) { if(Config::Get('RESTRICT_AIRCRAFT_RANKS') === true && Auth::LoggedIn()) { if($route->ranklevel > Auth::$userinfo->rankid) { continue; } } $route->daysofweek = str_replace('7', '0', $route->daysofweek); if(strpos($route->daysofweek, date('w')) === false) continue; if(Auth::LoggedIn()) { $search = array( 'p.pilotid' => Auth::$userinfo->pilotid, 'p.accepted' => PIREP_ACCEPTED ); $reports = PIREPData::getLastReports(Auth::$userinfo->pilotid, 1, PIREP_ACCEPTED); if(is_object($reports)) { # IF the arrival airport doesn't match the departure airport if($reports->arricao != $route->depicao) { continue; } } if(!$reports) { if (Auth::$userinfo->hub != $route->depicao) { continue; } } } ?> <a id="<?php echo $route->id; ?>" class="addbid" href="<?php echo url('/schedules/addbid');?>"><strong>Book Flight</strong></a> <?php }?> </td> EDIT: If you want to use the aircraft rank restriction, you MUST ensure this option is set to true in the core/app.config.php file, as below: # Pilot pilots to only fly aircraft they're ranked to Config::Set('RESTRICT_AIRCRAFT_RANKS', true); Now, when you or your pilots view the schedule results page, any flights for which you do not have the appropriate rank, is not being operated on the day, or you are not located at the dept airport will not show the add to bid link. Also, if people view the site who are not logged in, they will not see either the pilot brief link or the add to bid. I chose to do this as I wanted only registered members to see detailed flight information. I wanted my pilots to be able to see all the schedules the VA runs, but not be able to book them if any of the restrictions apply. That way they can plan ahead for their flights, by viewing all the schedules. Combined with the airport_search hack, it works really well (in my opinion anyways ) If you try this yourself, BACK UP THE ORIGINAL FILES!!! I can't support this hack, as I only just figured out how to get it working myself. There may be an easier way, if so and anyone knows it, please do share. Cheers, Stuart PS: The original addon by Simpilot can be found here: http://forum.phpvms.net/topic/2197-schedule-search-airline-aircraft-arrival-departure/ Also, I take absolutely no credit for the fantastic module SimPilot wrote, I've simply modified a few lines on one file.
-
As it is, phpVMS will either accept all one way or the other with regards to the pilot rank updates. So you can't have some (or one) on manual rank calculation and others on auto. You could set the option to count transfer hours towards ranking, and give yourself the required amount of hours to obtain the rank. It does seem a bit dishonest though, if you haven't actually racked up the hours.
-
Everybody wants to be staff, but no-one makes the effort!
stuartpb replied to stuartpb's topic in Off-Topic Banter
Thanks guys for the replies. Maybe I've gone the wrong way around when it comes to staff. At the end of the day, I can manage the VA myself for now easily enough, but I wanted potential members to see that there were staff opportunities available now within the VA. I probably shouldn't have worried about that, and concentrated more on just getting members and letting them know that there would be opportunities become available as the VA grows. Oh well, you live and learn -
I started advertising for positions with my VA last week, and I've had a steady trickle of applications for those positions so far. One thing I've noticed from most of these applicants is that they seem to be more after the staff jobs, purely because of the status of staff jobs, and aren't really interested in helping running a VA. Some even seem to be not interested in taking advantage of the flights and everything else that the VA offers. It's a shame really, because the positions available offer up the chance for those who take them to have a real say in how the VA develops. I would have jumped at that chance when I started getting into VA flying. I've now stated that anyone wanting to apply has to first rack up a minimum amount of hours as a member, before they will be considered for any posts. I didn't really want to do that, but it seems like the easy way to sort the big talkers from those who are really interested. Is this something that's common with VA's, and you guys see a lot? Or am I just the unlucky one?
-
Schedule Search (Airline, Aircraft, Arrival, Departure)
stuartpb replied to simpilot's topic in Simpilot Group Addons
I've also modified the departure form field, so that when a pilot is logged in, the first option in that field will be the airport they are currently located at (or their hub if they've never filed a PIREP). This means that pilots can easily view flights only from their current location, and also view all other flights too. If they want to view flights which are departing from their current location, they just select the option. If they want to view flights from other depart airports, they select them etc. If a person viewing the page is not logged in, then this option will not appear. I think this works much better than restricting flight viewing permissions being listed by altering the schedules_result.tpl file. Here's the code: On the airport_search.tpl file of this addon, enter the following at the top of the page: <?php $lastreport = PIREPData::GetLastReports(Auth::$userinfo, 1); if(!$lastreport) {$location = Auth::$userinfo->hub; } else {$location = $lastreport->arricao;} ?> Then in the departure airport search field part of the same file, I made the following adjustment: Original: <tr> <td>Select A Departure Airfield</td> <td> <select class="search" name="depicao"> <option value="">All</option> <?php foreach ($airports as $airport) {echo '<option value="'.$airport->icao.'">'.$airport->icao.' - '.$airport->name.'</option>';} ?> </select> </td> </tr> Amended Code: <tr> <td>Select A Departure Airfield</td> <td> <select class="search" name="depicao"> <?php if(Auth::LoggedIn()) {echo '<option value="'.$location.'">Your Current Location</option>';}?> <option value="">All</option> <?php foreach ($airports as $airport) {echo '<option value="'.$airport->icao.'">'.$airport->icao.' - '.$airport->name.'</option>';} ?> </select> </td> </tr> The added line is: <?php if(Auth::LoggedIn()) {echo '<option value="'.$location.'">Your Current Location</option>';}?> Cheers, Stuart EDIT: I've just finished modifying the airport_search.tpl and the schedule_results.tpl files, so that if a pilot is not at the airports shown in the search results lists, then the "add to bid" (or book flight) link will not show. It also won't show for flights that are not being operated on the day, and if the pilot is not ranked high enough. I didn't want pilots not to be able to see the schedules, so that's why I modded the two files. I also had to make a change or two in the frontschedulesdata.class.php file too. Here's a couple of screens: This is the new despatch front page. Pilots start here, and search for a flight, or view them all. This is the results page. I've used the Datatables js script, so I can easily paginate and sort the table columns. Notice the options, where the add to bid (book flight) isn't present. -
Schedule Search (Airline, Aircraft, Arrival, Departure)
stuartpb replied to simpilot's topic in Simpilot Group Addons
Well after a couple of days trying, and many failed attempts in trying to get the airport name to be output in the schedule search results, I've finally cracked the problem To get the airport names to appear in the search results page I used the following code on the schedules_results.tpl page: For the departure airport name: <?php $field = OperationsData::getAirportInfo($route->depicao);?> <td><?php echo $field->name;?></td> for the arrival airport name: <?php $field = OperationsData::getAirportInfo($route->arricao);?> <td><?php echo $field->name;?></td> I tried creating new queries, modules, and also templates, trying to figure out how to get around the problem, and it turns out all I needed was one extra line of code I knew there was a simple way but struggled finding it! -
I love the landing rate (landingstats) feature that SimPilot & Nabeel brought to phpVMS. I have always had a little niggle with it though, and that was the fact that if a pilot didn't use an ACARS program which records the land rate, or they file a PIREP manually, then the output shows 0. This can be confusing for visitors to your site. So with a slight mod to the output php, any PIREPS submitted without the landing rate present will now show "Not Recorded". You could use whatever text you want. Here's how: <?php if($pirep->landingrate == '0') {echo 'Not recorded';} else {echo "{$pirep->landingrate} ft/min"; }?> I just dropped this in a table cell on my PIREP view page: I think it makes more sense to visitors, than 0.
-
You could do it with an image like that, using css. You could use a table and work out the letter spacing etc. It would be a pig to do though, especially as cross browser rendering differences & user text size preferences could easily make it a mess. I might have a go at designing a layout for it over the weekend, depending on what the rest of the family has planned.
-
Schedule Search (Airline, Aircraft, Arrival, Departure)
stuartpb replied to simpilot's topic in Simpilot Group Addons
Hi Simpilot, I'm looking at adding the schedule search to the new website, but I'm having problems with getting the depname and arrname to show. I've checked what variables are available (depicao and arricao are). I've been trying to figure out how to get these to display in the search results. Any assistance you can offer would be very much appreciated. Thanks, Stuart -
Not sure if you want comments on your website too, but you have asked people's opinions of it, in the polls. So I'd like to offer my thoughts on it if I may? You have some serious styling issues with the website. Firstly and most seriously, the colour scheme. On the recent flights board, you have used light orange text on a white background, making the text virtually unreadable. You have used the same colour scheme (light orange text on white background) on a few other pages too. Make text hard to read on a website, and people will not bother trying. It's a massive turn off for website visitors. There are a few articles on colour choice for websites here: http://www.allwebdesignresources.com/webdesignblogs/graphics/webdesigncolorcombinationsguide/ http://www.forbetterdesigns.com/2009/10/03/the-worst-color-schemes-you-can-choose-for-the-articles-in-your-web-site/ There are also some other styling issues, a couple of the most obvious were these I noticed: When you click on the tabs for the search options, the text disappears and a scrollbar appears in it's place. You haven't resized the ACARS map, so part of it now sits behind the side bar. It doesn't look good for one, and for two, you have the map options inaccessible. You can resize the map in the /core/local.config.php file, as shown here: # Google Map Options Config::Set('MAP_WIDTH', '680px'); Config::Set('MAP_HEIGHT', '480px'); You just need to set the dimensions that work for your site. There are some other issues, such as the amount of information you are trying to cram into the home page, some dead links, and the forum needs styling to match the theme of the main site. I hope you don't mind me giving my opinions, I'm not trying to pull your site down or make fun of it etc. I think that seeing as you asked people's opinions, honesty is the best policy.
-
REALScheduleLite beta 1.0 [DEPRECATED]
stuartpb replied to simpilot's topic in Simpilot Group Addons
I've been messing around with the code that SimPilot wrote for the RealSchedule Lite, and have managed to incorporate chartered flights into the system. I have basically added several aircraft which are going to be used exclusively for chartered flights, and then created dummy schedules for these aircraft (EXACHART1, EXACHART2 etc.). The aircraft will initially be located at my hubs, pilots can then book a chartered flight from these locations, to any of the airports my VA services. Once they file a PIREP, they can then return the aircraft to the hub, or fly another chartered flight elsewhere from that location. Pilots cannot bid on flights that have already been bid on too. I laid down some rules for pilots, that they must return the aircraft to the hub from which it originated, before they take any scheduled flights. They can submit the PIREPs for the chartered flights as normal, but if using ACARS they must change the arr and dest airports. More info on the logic can be found here: http://execair.org/index.php/pages/execairfdm There were quite a few modifications I needed to make to the tpl files, and also to the various bids related tpl files, in order to get this to work properly. I will try and package it all up for download, but I may struggle a lot of my files are heavily modded. Here's a few screenshots: You can see the modded addon here: http://execair.org/index.php/despatch You wont be able to see the booking bits though. -
Waleed, have you tried figuring it out yourself first? There are plenty of tutorials you could follow on CSS styling, and there is enough information on the forum here already to easily achieve what you want. If you took the time to learn some basic web design skills, then you wouldn't be so reliant on asking for help. Also, you can feel the pride in figuring stuff out and be able to say you done it
-
ExecAir is hiring - Management Positions
stuartpb replied to stuartpb's topic in Virtual Airlines Discussion
Thanks matey Much appreciated! -
ExecAir is hiring - Management Positions
stuartpb replied to stuartpb's topic in Virtual Airlines Discussion
Much appreciated Mark, and thanks Hopefully I will get some quality people interested. -
ExecAir is actively seeking applications for staff vacancies as of today. You can find out more about the VA at the website: http://execair.org. I will also be happy to answer any questions, either posted here or sent by email. We ask that all applicants are able to demonstrate that they have some relevant experience, and we are only accepting applications from people aged 18years and over. In addition, all those wishing, staff or pilot members, to join ExecAir will have to undertake an online exam, in which they will be asked 20 multiple choice questions on ExecAir, general avionic and flight simulator knowledge. It is essential that anyone applying reads the ExecAir Pilots Handbook before making the application, it can be found here: http://execair.org/index.php/pages/pilotshandbook The current vacancies at ExecAir are as follows: HR Manager This is a senior position. The post holder is responsible for overseeing recruitment and membership within ExecAir. Flight Operations Director This is a senior position, and the post holder is responsible for developing and promoting the flight operations of ExecAir. Publicity Manager The Publicity Manager is responsible for ensuring ExecAir is being promoted online. In addition, the publicising of ExecAir events and recruitment drives is a direct responsibility with this role. ExecAir Training Director The ETD is responsible for delivering effective, engaging and enjoyable training to all pilots wishing to participate. Training Officers There are two types of training officers, who are overseen by the ExecAir Training Director: ExecAir Systems Training Officer (ESTO) Responsible for providing training to new recruits on the ExecAir PIREP, ACARS and flight booking systems. ExecAir Flight Training Officer (EFTO) Responsible for providing basic and advanced flight training to pilots who wish to undertake such training. Further positions may become available as ExecAir expands its operations. To apply for any of these positions, please send an email to stuart at execair dot org, with the following information: Name Previous Experience Short description of why you are applying Any other relevant information Thanks, Stuart
-
Thanks, and no worries!
-
You should try not to use inline styling as Blu Express showed. The best way to code a website is to keep the styling and markup seperated by using the CSS stylesheet to define the styling and applying classes and id's in the html. As an example, in your html you could set a class for the <h3> element: <h3 class="centredhead"><?php echo $subject;?></h3> And then in the skin's CSS file, you would create the following rule: h3.centredhead { text-align:center; } That way you can seperate the styling from the HTML, which makes life much easier. Also, you can reuse the class you set (.h3.centredhead) and apply other styling options, such as font size, color etc. Another bonus is that you can change the styling of each occurrence of the h3 easily and in one go. If you use inline styling, you would have to manually change every occurrence in the HTML. EDIT: Here are some tutorials on CSS styling: http://www.w3.org/MarkUp/Guide/Style http://www.w3schools.com/css/ http://www.hitmill.com/dhtml/css_intro.html
-
What browser and version are you using to view the page? Can you upload the page and CSS to a server, and then I can take a look? EDIT: Just checked through the code shown on here, and I missed a , out on the code I posted. Here's the corrected CSS: table.flight th { font-family: 'SFAlienEncountersRegular', Arial, Helvetica, sans-serif; font-weight: bolder; font-size: 14px; color: #e0bb26;
-
Is the CSS stylesheet you are using located in the lib/skins/yourskin folder? If so, place the Fonts folder and it's contents in the skin folder you are using. The URL for the font face is relative to the location of the CSS file and not the HTML files.
-
When you create a Font Face kit, there should be several files you need to place on your server. I created a folder called fonts and uploaded these files to this folder. Then for the LED Board font kit I would use the following CSS, which is supplied with each kit in a CSS file. You just have to cut and paste and change the path to the font to match the location on your server: @font-face { font-family: 'LEDBOARDNormal'; src: url('pathtofont/ledboard-webfont.eot'); src: url('pathtofont/ledboard-webfont.eot?#iefix') format('embedded-opentype'), url('pathtofont/ledboard-webfont.woff') format('woff'), url('pathtofont/ledboard-webfont.ttf') format('truetype'), url('pathtofont/ledboard-webfont.svg#LEDBOARDNormal') format('svg'); font-weight: normal; font-style: normal; } /* Then to apply the font to elements I would do the following:*/ table.flight td {font-family: 'LEDBOARDNormal' Arial, Helvetica, sans-serif; /* Adding fallback fonts allows you to control which font will be used if incompatibility occurs, which means graceful degradation. */ /* Add whatever other styling you want eg. color etc */ } Hope that helps?