-
Posts
20 -
Joined
-
Last visited
-
Days Won
1
Content Type
Profiles
Forums
phpVMS Resources
Downloads
Posts posted by Henrique
-
-
okay
-
Is it possible to show on the frontpage, the pilots flying at the moment and where they are?
-
3 hours ago, bbuske said:
If you can use XPIUPC I think it does work. Yes.
But I have not tried yet. I have plans to do so this week though.
niceee
-
Hi folks,
I have a running phpvms on my web and I have a another website, and I want to know if there is a way I can embed the live acars map? I tried figuring out the root part of the acars map. for an ex: www.website.com/map but cant find it on the files. Hope this is clear.
My code:
I'm using open street map<div class="center"> <!-- Full Width Wrapper --> <div class="maincontent-full"> <!-- Full Width Content --> <p> </p> <!-- script pilotos --> <script src="http://dev.henri.com/lib/js/base_map.js"></script> <script src="http://dev.henri.com/lib/js/acarsmap.js"></script> <IFRAME SRC="http://dev.henri.com/action.php/acars" WIDTH=850 HEIGHT=1000> <!-- script pilotos --> <!-- Full Width Wrapper End --> </div> </div> <p> </p> <p> </p> <div class="clear"></div> </div>
-
Is APVacars supported on x plane 11?
-
17 hours ago, ProSkyDesign said:
Personally, I don't recommend to print HTML code with php, please use something like this.
<?php if(!$pilots) { echo 'There are no pilots!'; return; } ?> <table class="tablesorter"> <thead> <tr> <th>Pilot ID</th> <th>Name</th> <th>Rank</th> <th>Flights</th> <th>Hours</th> </tr> </thead> <tbody> <tr> <?php foreach($pilots as $pilot) { ?> <td><a href="<?php echo url('/profile/view/'.$pilot->pilotid);?>"><?php echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid); ?></a></td> <td><?php echo $pilot->firstname . ' '. $pilot->lastname; ?></td> <td><img src="<?php echo $pilot->rankimage; ?>" alt="<?php echo $pilot->rank; ?>" /></td> <td><?php echo $pilot->totalflights; ?></td> <td><?php echo $pilot->totalflights; ?></td> <td><?php echo Util::AddTime($pilot->totalhours, $pilot->transferhours); ?></td> <?php } ?> </tr> </tbody> </table>
Remember to declare $pilots variable first with your codon config.
it worked, thank you very much.
- 1
-
how can i put a table there? table in echo
-
On 10/5/2019 at 5:39 PM, ProSkyDesign said:
now you can access statics functions inside variables like:
$pilots = PilotData::getAllPilots();
and then you can iterate the variable with a foreach loop.
<?php foreach($pilots as $pilot) { echo $pilot->rank; } ?>
Please, be careful including the codon config, include this in top of the file, avoiding headers errors.
Message: Invalid argument supplied for foreach()
-
How can I display the list of pilots on my external site?
I'm using <?php include(/sytem/core/codon.config.php'); ?> ( it is working perfectly, but I just can't make the pilot list for my site. )
-
it worked, thanks
-
1 hour ago, ProAvia said:
There are only 3 files for the RandomFlights module
- In /templates/randomsearch.php - the change I listed above is the only code change in mine from the original file.
- In /template/randomflights.php - my file is the same as the original
- In /modules/Randomflights/RandomFlights.php - my file is the same as the original
Have you actually completed at least one flight to a destination in your DB with the pilot sign-on you are using to test the module? I just checked mine, and with a sign-on that has not completed a flight, the current location is blank - but with a sign-on that has completed at least one flight, the current location is listed.So, basically, that pilot needs at least one PIREP submitted and approve that landed at an airport in your DB before the current location will show in Random Flights.
I think my module is outdated, could you send me what you use?
-
this location is automatically filled with the airport hud, so much so that in the old code it generates normal flights but in its code you it does not generate
-
1 minute ago, ProAvia said:
I will review my files later when I am home and on the computer - and let you know what I have. There may be other changed I made to get it working correctly.
ok thank you so much I'm waiting
-
10 minutes ago, ProAvia said:
5.5.2 - that is the same version I use. Not sure what you mean by "he adds icao and doesn't scale".
As far as current location being blank, you must fly at least one flight to a destination in your db for that field to show your current location. I guess there may be a way around that, but my pilots can't use the random flights generator until they reach a certain rank - and will have flown several flights before then.
Did you try what I posted and did the error disappear?
this location went blank when I put your code
-
8 minutes ago, ProAvia said:
Don't turn off error reporting - work to fix the issue first and foremost.
What version of phpVMS? What version of PHP?
Change
$pilotid = Auth::$userinfo->pilotid; $last_location = PIREPData::getLastReports($pilotid, 1); if(!$last_location) $last_location->arricao = Auth::$userinfo->hub; $last_name = OperationsData::getAirportInfo($last_location->arricao); $equipment = OperationsData::GetAllAircraftSearchList(true); $airlines = OperationsData::getAllAirlines(true); ?>
To
$pilotid = Auth::$userinfo->pilotid; $last_location = PIREPData::getLastReports($pilotid, 1); if(!$last_location) $last_location = new StdClass(); if(!$last_location) $last_location->arricao = Auth::$userinfo->hub; $last_name = OperationsData::getAirportInfo($last_location->arricao); $equipment = OperationsData::GetAllAircraftSearchList(true); $airlines = OperationsData::getAllAirlines(true); ?>
I think that's the only change necessary. I'm on mobile right now and can't easily do a file compare to be sure. If the above doesn't fix it, I will do a file compare once I am near my computer.
My version: php 5.5 simpilot
he adds icao and doesn't scale! https://prnt.sc/oxbes2
-
14 minutes ago, Yash said:
Turn off Error reporting on your server!
when i disable the server warnings it gives this error
Fatal error: Class 'mysqli' not found in C:\Program Files (x86)\Ampps\www\intranet\core\classes\ezdb\ezdb_mysqli.class.php on line 101
-
could you help me with this error?
( Warning: Creating default object from empty value in C:\Program Files (x86)\Ampps\www\core\templates\randomsearch.php on line 12 )
<?php /* * phpVMS Module: Random Itinerary Builder * Coding by Jeffrey Kobus * www.fs-products.net * Verion 1.3 * Dated: 03/22/2011 */ $pilotid = Auth::$userinfo->pilotid; $last_location = PIREPData::getLastReports($pilotid, 1); if(!$last_location) $last_location->arricao = Auth::$userinfo->hub; $last_name = OperationsData::getAirportInfo($last_location->arricao); $equipment = OperationsData::GetAllAircraftSearchList(true); $airlines = OperationsData::getAllAirlines(true); ?> <table border = "0"> <tr> <th scope="col">Random Itinerary from Current Location</th> </tr> <tr><form name="randomflights" id="randomflights" action="<?php echo SITE_URL?>/index.php/randomflights/getRandomFlights" method="post"> <td>Current Location Preselected </td> <table> <tr> <td width ="25%"><b>Current Location:</b></td> <td width ="75%"><select id="depicao" name="depicao"> <option value="<?php echo $last_location->arricao?>"><?php echo $last_location->arricao?> (<?php echo $last_name->name?>)</option> </td> </tr> <tr> <td width ="25%"><b>Airline:</b></td> <td width ="75%"><select id="airline" name="airline"> <option value="">Select Airline</option> <?php if(!$airlines) $airlines = array(); foreach($airlines as $airline) { echo '<option value="'.$airline->code.'">'.$airline->name.'</option>'; } ?> </td> </tr> <tr> <td width ="25%"><b>Aircraft:</b></td> <td width ="75%"><select id="equipment" name="equipment"> <option value="">Select Equipment</option> <?php if(!$equipment) $equipment = array(); foreach($equipment as $equip) { echo '<option value="'.$equip->icao.'">'.$equip->name.'</option>'; } ?> </td> </tr> <tr> <td width ="25%"><b>Number of Flights:</b></td> <td width ="75%"><select id="count" name="count"> <option value="3">3</option> <option value="5">5</option> <option value="15">15</option> </select></td> <td><input type="submit" name="submit" value="Find Random Flights"></td> </tr> </table> </form> </tr> </table>
Flying Now
in Support Forum
Posted · Edited by Henrique
I tried, but the map does not appear and does not show pilots flying