web541
Members-
Posts
700 -
Joined
-
Last visited
-
Days Won
17
Content Type
Profiles
Forums
phpVMS Resources
Downloads
Everything posted by web541
-
Yeah, same issue here, I assume you are using the phpvms 5.5.x version, therefore all public function should be replaced with public static function in core/common/PIREPAcData.class.php or conveniently, use this version that I modified a while back http://forum.phpvms.net/topic/20692-auto-acceptreject-pirep/page__st__160#entry123625
-
http://forum.phpvms.net/topic/23604-google-maps-api-key/#entry124242
-
Replace the code with the original with the () and then go into core/common/PIREPAcData.class.php and find this public function get_criteria() and replace it with public static function get_criteria()
-
You never know, but considering all his modules are gone, it might just be a cleanout. I guess we'll have to wait and see.
-
I agree, and tell us what it does. By the looks of things, you're just putting all routes on a map using php. It would be easier to parse a JSON object for this type of project rather than echo-ing PHP in almost every line.
-
If you're code is the default, try using this <?php echo $route->distance . Config::Get('UNITS') ;?> If not, please post what line 118 is for you. core/templates/FBSV/schedule_results.php
-
Try clearing your cache? If that doesn't work, you can try (not recommended) removing the code from the source where the signature is made. core/common/PilotData.class.php lines 110-126 Remove this Reset signatures and clear cache once again and see if it works.
-
I see you're using X10 Hosting, there have been issues with them in the past. Check this post to fix the error Fatal error: Cannot re-assign auto-global variable _FILES http://forum.phpvms....s-installation/ Or even better, install phpVMS using this version https://github.com/D...rk/phpvms_5.5.x
-
Ah ok, anyway I've whipped up a quick module for you, all the info you need is in the readme. I do suggest testing it locally before you move it to your actual va though. If you find any bugs (it was a quick module, so my eyes could be off ), let me know and I'm sure either myself or someone else can help you out. If you are looking for such a system where you can let your pilots book any registration (by aircraft ICAO) on the schedule, then have a look at this topic http://forum.phpvms.net/topic/23227-fleetairline-management/ Booking.zip
-
Hi Keith, Care to explain a bit more about what you mean by "one aircraft per schedule rotation".
-
This is because every time the pilot jumpseats, it takes the cost of the jumpseat out of the `totalpay` of the pilot. When you reset the pay, it just calculates all the PIREPS and makes an amount from that without calculating the amount and then subtracting the amount that the pilot has jumpseated. I suggest you use the `payadjust` field in phpvms I haven't tried this, but if you want to you can (backup first) core/common/FBSVData.class.php public static function purchase_ticket($pilot_id, $total, $cost) { $query = 'UPDATE '.TABLE_PREFIX.'pilots SET totalpay='.$total.' WHERE pilotid='.$pilot_id; DB::query($query); $query = "UPDATE ".TABLE_PREFIX."pilots SET payadjust = payadjust + '$cost'"; DB::query($query); } core/common/PilotData.class.php (edit this function) /** * Go through the ledger and update the totalpay for a pilot * * @param mixed $pilotid * @return void */ public static function resetPilotPay($pilotid) { $total = DB::get_row( 'SELECT SUM(`amount`) AS `total` FROM `'.TABLE_PREFIX.'ledger` WHERE `pilotid`='.$pilotid ); $pilot = DB::get_row("SELECT * FROM ".TABLE_PREFIX."pilots WHERE `pilotid` = '$pilotid'"); $total->total = ($total->total - $pilot->payadjust); self::updateProfile($pilotid, array('totalpay' => $total->total)); return $total->total; } core/modules/FBSV11/FBSV11.php public function purchase() { $id = DB::escape($_GET['id']); $cost = $_GET['cost']; $curmoney = Auth::$userinfo->totalpay; $total = ($curmoney - $cost); FBSVData::purchase_ticket(Auth::$userinfo->pilotid, $total, $cost); FBSVData::update_pilot_location($id); header('Location: '.url('/FBSV11')); }
-
Try this? <script> // Separate each dataTable into their own function to target them only $(document).ready(function() { $('#idhere').dataTable(); }); $(document).ready(function() { $('#fleet').dataTable(); }); // Or even this one, but I recommend using the id's otherwise every table on the page will be datatables $(document).ready(function() { $('.table').dataTable(); }); </script> And here are your table tags <table id="idhere" class="table"> <table id="fleet" class="table"> <table class="table">
-
You put that code I gave you in your code on the page Assuming it was the above code, I've modified it for you <script type="text/javascript"> $(document).ready(function() { $('.table').dataTable({ "sPaginationType": "full_numbers", "lengthMenu": "[ [10, 20, 50], [10, 20, 50] ]" }); }); </script> As for the "no route passed" error, do a search on the forums, it's a common problem, usually based with a jQuery problem, so check that in your skin, the only place you've specified it is in your core_htmlhead.php file. If that doesn't work, I've found in the past that the best solution is this one http://forum.phpvms.net/topic/7431-no-route-passed-solved/#entry49472
-
In your ___.dataTable{[ javascript function, place this "lengthMenu": [ [10, 20, 50], [10, 20, 50]]
-
http://forum.phpvms.net/topic/9181-new-logacars-software-apvacars/ Remember to read the license agreement carefully.
-
[SOLVED] Version confusion and .php modules
web541 replied to BewareOfButtlice's topic in Support Forum
Check This http://forum.phpvms....ot-found-error/ https://github.com/DavidJClark/phpvms_5.5.x -
1. Check your browser's console for any errors 2. Make sure that the files are actually in the correct location 3. Re-Upload all files of the module 4. If the accordion requires jQuery to work, make sure your version/ordering is correct As I don't own the module myself, I can't provide you with much other help, so you might want to contact the developer
-
^^ you can try that... Also make sure that you are using this version https://github.com/DavidJClark/phpVMS-PopUpNews and upload that one via the plugin manager as there have been a few updates (not recent, but recent enough for php 5.5.x) View the changes here https://github.com/DavidJClark/phpVMS-PopUpNews/commit/794f12ff2dc704dc0333ec5dc719759f818cc176 https://github.com/DavidJClark/phpVMS-PopUpNews/commit/6a41b8bf28e1a18e9ef82965e57b8db653059ddc
-
Try this, moved around some things to make it better for phpVMS, it may not work for you so switch some things around at your discretion Main problem for this error is that you weren't closing <?php ?> tags properly and having raw php just anywhere on your page. <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content=""> <meta name="author" content=""> <link rel="shortcut icon" href="assets/ico/favicon.ico"> <title><?php echo $page_title ?></title> <!-- Stylesheets --> <link href="<?php echo SITE_URL?>/lib/skins/fijivirtual/css/font-awesome.css" rel="stylesheet" media="all" /> <link href="<?php echo SITE_URL?>/lib/skins/fijivirtual/css/theme.css" rel="stylesheet" media="all" /> <!-- Just for debugging purposes. Don't actually copy this line! --> <!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]--> <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script> <![endif]--> <?php // ALL Javascript REFERENCES should be added below this line echo $page_htmlhead; ?> <!-- Bootstrap Core Javascript ================================================== --> <!-- // Removed this reference as it's already defined in core_htmlhead.php --> <!-- Might have trouble with this line if you get "no route passed --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <script src="assets/js/bootstrap.min.js"></script> <script src="assets/js/retina-1.1.0.js"></script> <script src="assets/js/jquery.hoverdir.js"></script> <script src="assets/js/jquery.hoverex.min.js"></script> <script src="assets/js/jquery.prettyPhoto.js"></script> <script src="assets/js/jquery.isotope.min.js"></script> <script src="assets/js/custom.js"></script> <script src="assets/js/wow.min.js"></script> </head> <body> <?php echo $page_htmlreq; ?> <script src="https://cdnjs.cloudflare.com/ajax/libs/smoothscroll/1.4.4/SmoothScroll.min.js"></script> <script src="assets/js/modernizr.js"></script> <?php if(!Auth::LoggedIn()) { /* * This stuff will only show * When the user is not logged in */ ?> <!-- Hiding the NAVBAR at your request <div class="navbar navbar-default navbar-fixed-top"> <div class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a href="<?php echo SITE_URL; ?>"><img src="http://i.imgur.com/3Yx4zKu.png" alt="Logo" class="img-responsive" style="max-height: 40px; margin-top: 5px; margin-left: 10px"></a> </div> <div class="navbar-collapse collapse navbar-right"> <ul class="nav navbar-nav"> <li class="active"><a href="index.html">DISCOVER</a></li> <li><a href="about.html">ABOUT</a></li> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">APPLY <b class="caret"></b></a> <ul class="dropdown-menu"> <li><a href="faqs.html"><i class="fa fa-question-circle" aria-hidden="true" style="margin-right: 2px;"></i> FREQUENTLY ASKED QUESTIONS</a></li> <li><a href="apply.html"><i class="fa fa-edit" aria-hidden="true" style="margin-right: 2px;"></i> SUBMIT AN APPLICATION</a></li> </ul> </li> <li><a href=""><i class="fa fa-lock" aria-hidden="true"></i></a></li> </ul> </div> </div> </div> --> <?php } // End if not logged in else { // Else they are logged in and they can see a few more links /* $userinfo variable has been defined with the pilots user information */ ?> <div class="navbar navbar-default navbar-fixed-top"> <div class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a href="<?php echo SITE_URL; ?>"><img src="http://i.imgur.com/3Yx4zKu.png" alt="Logo" class="img-responsive" style="max-height: 40px; margin-top: 5px; margin-left: 10px"></a> </div> <div class="navbar-collapse collapse navbar-right"> <ul class="nav navbar-nav"> <li class="active"><a href="index.html">DISCOVER</a></li> <li><a href="about.html">ABOUT</a></li> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">APPLY <b class="caret"></b></a> <ul class="dropdown-menu"> <li><a href="faqs.html"><i class="fa fa-question-circle" aria-hidden="true" style="margin-right: 2px;"></i> FREQUENTLY ASKED QUESTIONS</a></li> <li><a href="apply.html"><i class="fa fa-edit" aria-hidden="true" style="margin-right: 2px;"></i> SUBMIT AN APPLICATION</a></li> </ul> </li> <li><a href=""><i class="fa fa-lock" aria-hidden="true"></i></a></li> </ul> </div><!--/.nav-collapse --> </div> </div> <?php } /* End the else */ ?> <!-- Not sure what these DIVS are closing, but I'll leave them in there --> </div> </div> <div id="bodytext"> <?php /* This will insert all of the "meat" of the page in there - the template which is generated, depending on which page you're on. To change these templates, check out the docs on the site. They're under the /core/templates folder, and to change them, copy them into the folder of your skin (the folder this file is in right now. */ echo $page_content; ?> </div> </div> <!-- ***************************************************************************************************************** HEADERWRAP ***************************************************************************************************************** --> <!-- Header image goes here --> <!-- ***************************************************************************************************************** SERVICE LOGOS ***************************************************************************************************************** --> <!-- ***************************************************************************************************************** TESTIMONIALS ***************************************************************************************************************** --> <!-- ***************************************************************************************************************** MIDDLE CONTENT ***************************************************************************************************************** --> <!-- ***************************************************************************************************************** OUR CLIENTS ***************************************************************************************************************** --> <!-- ***************************************************************************************************************** FOOTER ***************************************************************************************************************** --> <?php if(Auth::LoggedIn()) { ?> <div id="footer"> <div class="container"> </div> <div class="row text-center"> <p> © 2016 Fiji Virtual | Website designed by Max Dyba</p> </div> </div> <?php } // Close If Logged In IF Statement ?> </body> </html>
-
Problem with Pilot List (Lance Skin)
web541 replied to CascadeAirwaysVirtual's topic in Support Forum
<?php if(!$allpilots) { echo 'There are no pilots!'; return; } ?> <style> .borders{ margin-left: 100px; margin-right:100px; } </style> <div class="borders"> <h3><?php echo $title?></h3> <table class="table"> <thead> <tr> <th>Pilot ID</th> <th>Name</th> <th>Rank</th> <th>Flights</th> <th>Hours</th> </tr> </thead> <tbody> <?php foreach($allpilots as $pilot) { /* To include a custom field, use the following example: <td> <?php echo PilotData::GetFieldValue($pilot->pilotid, 'VATSIM ID'); ?> </td> For instance, if you added a field called "IVAO Callsign": echo PilotData::GetFieldValue($pilot->pilotid, 'IVAO Callsign'); */ // To skip a retired pilot, uncomment the next line: //if($pilot->retired == 1) { continue; } ?> <tr> <td width="1%" nowrap><a href="<?php echo url('/profile/view/'.$pilot->pilotid);?>"> <?php echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid)?></a> </td> <td> <img src="<?php echo Countries::getCountryImage($pilot->location);?>" alt="<?php echo Countries::getCountryName($pilot->location);?>" /> <?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 Util::AddTime($pilot->totalhours, $pilot->transferhours); ?></td> <?php } ?> </tbody> </table> </div> -
Maybe try this: public static function get_pilots_newscreenshot($pilot_id, $count) { $query = "SELECT id, file_name, file_description, pilot_id, UNIX_TIMESTAMP(date_uploaded) AS date FROM ".TABLE_PREFIX."screenshots WHERE pilot_id='$pilot_id' AND file_approved='1' ORDER BY date_uploaded DESC LIMIT $count;"; return DB::get_results($query); } I added the ".TABLE_PREFIX." In front of the table name which should allow it to pick up the data now
-
I just noticed that in your previous post that you said you modified the module Just to clarify, in core/modules/Screenshots/Screenshots.php You have these public function { And in core/common/ScreenshotsData.class.php you have these public static function { If that doesn't work, then you might have to wait for Dave, you can try to hide the error in the meantime but that is not ideal
-
I can't speak for @TheBulk, but it should work as it should under https:// provided that you do change all http:// references to https:// and change your site url in local.config.php to https:// One issue I suspect will happen though is the adding airports function, because the api.vacentral.net server is using the http:// protocol, you might get a mixed content exception error in your console which won't allow it to search. But if you've got a separate way to search these airports e.g. finding the lat/lng/airport info separately or modifying the script to search another server, then I can't see why it wouldn't work.
-
http://forum.phpvms.net/topic/22757-vacentral-status-and-updates/#entry120870 http://forum.phpvms.net/topic/20739-trouble-with-airports-also/#entry111443 http://forum.phpvms.net/topic/20668-add-new-airport-error/#entry111021