Jump to content

web541

Members
  • Posts

    700
  • Joined

  • Last visited

  • Days Won

    17

Everything posted by web541

  1. 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
  2. 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); }
  3. What schedule module are you using?
  4. then go into core/modules/SimBrief/SimBrief.php and change this $this->render('SimBrief/SimBrief.tpl'); to this $this->render('SimBrief/SimBrief.php');
  5. https://github.com/DavidJClark/phpVMS-TopPilot
  6. 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" />
  7. <strong>Download </strong> <a href="<?php echo $aircraft->downloadlink;?>"><?php echo $aircraft->downloadlink; ?></a>
  8. 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/
  9. 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 />
  10. Have a look at this? http://forum.phpvms.net/topic/20897-flight-route-on-live-acars-map/#entry112056
  11. 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
  12. 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
  13. 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
  14. 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
  15. 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%>">
  16. 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
  17. 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
  18. https://github.com/DavidJClark/phpVMS-TopPilot
  19. try commenting out this part $this->set('allroutes', $schedules); to this # $this->set('allroutes', $schedules); and keep $schedules = SchedulesData::getSchedules();
  20. https://github.com/DavidJClark/phpvms_5.5.x
  21. 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)
  22. have you tried this? http://forum.phpvms.net/topic/7431-no-route-passed-solved/#entry49472
  23. Agreed, but if you want a temporary solution, http://forum.phpvms.net/topic/20629-most-common-fixes-phpvms-installation/
  24. Try installing it using this https://github.com/DavidJClark/phpvms_5.5.x
×
×
  • Create New...