web541
Members-
Posts
700 -
Joined
-
Last visited
-
Days Won
17
Content Type
Profiles
Forums
phpVMS Resources
Downloads
Everything posted by web541
-
I could be wrong, but according to the github files, he has specified to use the ICAO as the value so it should be like this <select class="dispinput" name="type"> <?php $equipment = OperationsData::getAllAircraft(true); if(!$equipment) $equipment = array(); foreach($equipment as $equip) { echo '<option value="'.$equip->icao.'">'.$equip->name.'</option>'; } ?> </select> And I've also specified (true) to allow the query to attach only the aircraft that are enabled, of course you can remove that to search every aircraft like above --------------------------------- Again, not sure if this is the case, but you may find yourself with duplicates of many aircraft as it's pulling each aircraft from the database. Instead, what i recommend doing is using this in your form <select class="dispinput" name="type"> <?php $equipment = OperationsData::getAllAircraftSingle(true); if(!$equipment) $equipment = array(); foreach($equipment as $equip) { echo '<option value="'.$equip->icao.'">'.$equip->icao.' - '.$equip->name.'</option>'; } ?> </select> and in OperationsData.class.php in core/common place this anywhere in that file (under the getAllAircraft($onlyenabled == false) function for neatness) public static function getAllAircraftSingle($onlyenabled = false) { if ($onlyenabled == true) { $sql = "SELECT * FROM ".TABLE_PREFIX."aircraft a LEFT JOIN ".TABLE_PREFIX."ranks r ON r.rankid = a.minrank WHERE enabled = 1 GROUP BY(a.icao) ORDER BY a.icao ASC"; } else { $sql = "SELECT * FROM ".TABLE_PREFIX."aircraft a LEFT JOIN ".TABLE_PREFIX."ranks r ON r.rankid = a.minrank GROUP BY(a.icao) ORDER BY a.icao ASC"; } $all_aircraft = DB::get_results($sql); if(!$all_aircraft) { $all_aircraft = array(); } return $all_aircraft; } And that should work by giving you a different entry for each icao and specifying (true) will work as above as well but it will only show the icao if the whole fleet with that icao has been enabled
-
try going into core/common find this public static function getAllCharts() { $sql = 'SELECT * FROM `charts` ORDER BY `id` ASC'; return DB::get_results($sql); } and replace it with this public static function getAllCharts() { $sql = 'SELECT * FROM `charts` ORDER BY `icao` ASC'; return DB::get_results($sql); }
-
What schedule module are you using?
-
then go into core/modules/SimBrief/SimBrief.php and change this $this->render('SimBrief/SimBrief.tpl'); to this $this->render('SimBrief/SimBrief.php');
-
https://github.com/DavidJClark/phpVMS-TopPilot
-
Try this? <?php if(!defined('IN_PHPVMS') && IN_PHPVMS !== true) { die(); } ?> <?php if(!$pilot) { echo '<h3>This pilot does not exist!</h3>'; return; } ?> <h3>Profile For <?php echo $pilot->firstname . ' ' . $pilot->lastname?></h3> <table> <tr> <td align="center" valign="top"> <?php if(!file_exists(SITE_ROOT.AVATAR_PATH.'/'.$pilotcode.'.png')) { echo 'No avatar'; } else { echo '<img src="'.SITE_URL.AVATAR_PATH.'/'.$pilotcode.'.png'.'" alt="No Avatar" /> '; } ?> <br /><br /> <img src="<?php echo $pilot->rankimage?>" alt="" /> </td> <td valign="top"> <ul> <li><strong>Pilot ID: </strong><?php echo $pilotcode ?></li> <li><strong>Rank: </strong><?php echo $pilot->rank;?></li> <li><strong>Total Flights: </strong><?php echo $pilot->totalflights?></li> <li><strong>Total Hours: </strong><?php echo Util::AddTime($pilot->totalhours, $pilot->transferhours); ?></li> <li><strong>Location: </strong> <img src="<?php echo Countries::getCountryImage($pilot->location);?>" alt="<?php echo Countries::getCountryName($pilot->location);?>" /> <?php echo Countries::getCountryName($pilot->location);?> </li> <?php // Show the public fields if($allfields) { foreach($allfields as $field) { echo "<li><strong>$field->title: </strong>$field->value</li>"; } } ?> </ul> <p> <strong>Awards</strong> <?php if(is_array($allawards)) { ?> <ul> <?php foreach($allawards as $award) { <img src="<?php echo $award->image?>" alt="<?php echo $award->descrip?>" /> ?> <li><?php echo $award->name ?></li> <?php } ?> </ul> <?php } ?> </p> </td> </tr> </table> <!-- Google Chart Implementation - OFC Replacement - simpilot --> <img src="<?php echo $chart_url ?>" alt="Pirep Chart" />
-
<strong>Download </strong> <a href="<?php echo $aircraft->downloadlink;?>"><?php echo $aircraft->downloadlink; ?></a>
-
Unable to Send PIREP's to the VACENTRAL server
web541 replied to elfrost's topic in General & Support
Tried this? http://forum.phpvms.net/topic/22786-notice-vacentral-api-server-url-changing-permanently/#entry120785 http://forum.phpvms.net/topic/22850-phpvms-centraldata-updates/ -
try this? <li style="overflow:hidden;"> <a href="<?php echo url('/downloads/dl/'.$download->id);?>"> <?php echo $download->name?></a><br /> <a href="<?php echo $download->image; ?>" target="_blank"><img src="<?php echo $download->image?>" style="width:150px; vertical-align:middle;" /></a><br /> <?php echo $download->description?><br /> <em>Downloaded <?php echo $download->hits? times</em></li><br />
-
Have a look at this? http://forum.phpvms.net/topic/20897-flight-route-on-live-acars-map/#entry112056
-
I haven't used this in a while (hence why I'm not sure if it will work) But you could try using this Just put it in a folder called PHPBBRegister inside core/modules so core modules PHPBBRegister PHPBBRegister.php (is the file above) Otherwise you can check out Dave's version for SMF here https://github.com/D...MS-SMF_Register and change a few table names Which I guess is more up-to-date
-
Template file and TPL sidebar in admin panel
web541 replied to CapitalConnectVirtualGroup's topic in Support Forum
If you go to core/templates, is ruleregs.php there or is it named ruleregs.tpl if it is named ruleregs.tpl, rename it to ruleregs.php -
Go to admin/modules/PirepAutoAccept/PirepAutoAccept.php and on line 20 change this $this->set('sidebar', 'PirepAutoAccept/sidebar_PirepAutoAccept.tpl'); to this $this->set('sidebar', 'PirepAutoAccept/sidebar_PirepAutoAccept.php'); then change the file admin/templates/PirepAutoAccept/sidebar_PirepAutoAccept.tpl to admin/templates/PirepAutoAccept/sidebar_PirepAutoAccept.php PirepAutoAccept - PHP.zip
-
I think what Servetas is trying to say is that could you please post your code for the whole section for current flights and not just the image link
-
Best option would be to do this http://forum.phpvms.net/topic/21412-showing-airline-logos-on-live-map-solved/#entry114903 then you will end up with this <img class="img-responsive" src="<?php echo SITE_URL;?>/airlines/<%=flight.flightcode%>.png" alt="<%=flight.flightcode%>">
-
Fatal error: Class 'DB' not found in Auth.class.php
web541 replied to elekaj34's topic in Support Forum
Also make sure you have uploaded all your files (some of them might be corrupted) and also make sure that your database has been connected correctly. Also try to run www.yoursiteurl/install/checkdb.php and www.yoursiteurl/install/checkinstall.php -
Try changing the file endings from .tpl to .php Or you can try this https://github.com/web541/Advanced_Fleet-master Advanced_Fleet-master.zip
-
https://github.com/DavidJClark/phpVMS-TopPilot
-
try commenting out this part $this->set('allroutes', $schedules); to this # $this->set('allroutes', $schedules); and keep $schedules = SchedulesData::getSchedules();
-
https://github.com/DavidJClark/phpvms_5.5.x
-
Large amount of schedules causing memory problems
web541 replied to ahughes3's topic in Support Forum
Are you using the default schedules module (http://yoursite.com/index.php/schedules/view) or a different one? I have achieved dataTables pagination here , but I got most of the code somewhere on the forums (such as here) -
have you tried this? http://forum.phpvms.net/topic/7431-no-route-passed-solved/#entry49472
-
[SOLVED]Host upgraded server and php version, no getting errors
web541 replied to RocketRod's topic in Support Forum
Agreed, but if you want a temporary solution, http://forum.phpvms.net/topic/20629-most-common-fixes-phpvms-installation/ -
[SOLVED]Host upgraded server and php version, no getting errors
web541 replied to RocketRod's topic in Support Forum
Try installing it using this https://github.com/DavidJClark/phpvms_5.5.x