Jump to content

servetas

Moderators
  • Posts

    1726
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by servetas

  1. Iraklis, where is your problem exactly? It would be better if you could describe the problem more than just pasting a link to a page which is not accessible by anyone else in the forum but you.
  2. As i can understand it is a template problem, it seems that the developer has used wrong variables. Open your lib/skins/lance/pilot_public_profile.tpl (or .php based on your phpVMS version) and replace its content with the following: <style> .bg{ background-color: #ffffff; margin-left: 200px; margin-right: 200px; border-bottom-color: aqua; } a{ color:#212121; } </style> <div class="bg"> <?php if(!$userinfo) { echo '<h3>This pilot does not exist!</h3>'; return; } ?> <h3>Profile For <?php echo $userinfo->firstname . ' ' . $userinfo->lastname?></h3> <table> <tr> <td align="center" valign="top"> <?php if(!file_exists(SITE_ROOT.AVATAR_PATH.'/'.$userinfocode.'.png')) { echo 'No avatar'; } else { echo '<img src="'.SITE_URL.AVATAR_PATH.'/'.$userinfocode.'.png'.'" alt="No Avatar" /> '; } ?> <br /><br /> <img src="<?php echo $userinfo->rankimage?>" alt="" /> </td> <td valign="top"> <ul> <li><strong>Pilot ID: </strong><?php echo $userinfocode ?></li> <li><strong>Rank: </strong><?php echo $userinfo->rank;?></li> <li><strong>Total Flights: </strong><?php echo $userinfo->totalflights?></li> <li><strong>Total Hours: </strong><?php echo Util::AddTime($userinfo->totalhours, $userinfo->transferhours); ?></li> <li><strong>Location: </strong> <img src="<?php echo Countries::getCountryImage($userinfo->location);?>" alt="<?php echo Countries::getCountryName($userinfo->location);?>" /> <?php echo Countries::getCountryName($userinfo->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) { /* To show the image: <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" /> </div>
  3. If you click any name, it redirects you to the same url? This means that the pilot id is hard coded and it's not correct. You will have to use variables instead.
  4. For the pax carried per pilot add this before the ending bracket of the code/common/StasData.class.php file: public static function TotalPilotPax($pilotid) { $key = 'total_pax'; $key .= '_'.$pilotid; $total = CodonCache::read($key); if($total === false) { $total = 0; $sql = "SELECT * FROM ".TABLE_PREFIX."pireps WHERE pilotid='$pilotid' AND accepted=1"; $results = DB::get_results($sql); if($results) { foreach($results as $result) { $total += $result->load; } } CodonCache::write($key, $total, '15minute'); } return $total; } And you can use the code below in order to echo the passengers carried by a pilot. <?php echo StatsData::TotalPilotPax($pilotid); ?> Once again, do not forget to take care of the $pilotid variable on the second part of code. You will have to "pass" the correct variable according to the page you want to include it. As far as i know, phpVMS does not have a cargo value on each pilot's pireps. Are you using any custom pirep field for this?
  5. Open your core/common/StatsData.class.php file and before the last closing bracket (}) add this: public static function TotalPilotMiles($pilotid) { $key = 'total_miles'; $key .= '_'.$pilotid; $total = CodonCache::read($key); if($total === false) { $total = 0; $sql = "SELECT * FROM ".TABLE_PREFIX."pireps WHERE pilotid='$pilotid' AND accepted=1"; $results = DB::get_results($sql); if($results) { foreach($results as $result) { $total += $result->distance; } } CodonCache::write($key, $total, '15minute'); } return $total; } and after that, you can echo the pilot's miles using the part of code below: <?php echo StatsData::TotalPilotMiles($pilot->pilotid); ?> PS: Pay special attention to the $pilot->pilotid, you will have to replace $pilot if the page is using a different variable name. Just to let you know that this script counts the total miles flown by a pilot based on his accepted pireps.
  6. The topbanner does not exist or the location you shared with us is wrong.
  7. <body> <!--start contain--> <p align="center"><img src="http://www.omanair-va.org/resources/charts.jpg" width="923" height="300" alt=""/> </p> <p> </p> <p><strong><em>Charts Files : - </em></strong></p> <p align="center"><strong>Muscat Int Airport </strong></p> <p align="center"><?php if(Auth::$userinfo->totalflights >= 10) { ?> <a href="http://www.omanair-va.org/resources/OOMS.pdf"><img src="http://www.omanair-va.org/resources/Download-Icon.png" width="100" height="100" alt=""/></a><?php } else { echo 'You have to fly at least 10 flights to download.';} ?></p> <p> </p> <p align="center"><strong>Salalah Int Airport </strong></p> <p align="center"><?php if(Auth::$userinfo->totalflights >= 10) { ?><a href="http://www.omanair-va.org/resources/OOSA salalah.pdf"><img src="http://www.omanair-va.org/resources/Download-Icon.png" width="100" height="100" alt=""/></a><?php } else { echo 'You have to fly at least 10 flights to download.';} ?></p> <!--end contain--> </body> Check the above.
  8. Did you try to clear the cache through the maintenance options? Some of the phpVMS statistics are being cached for a specific period of time in order to reduce the server load.
  9. It's on your templates folder/frontpage_main.tpl or .php
  10. Are you referring to this system? http://forum.phpvms.net/topic/21388-sim-brief-for-phpvms/
  11. Instead of $this->render('about.tpl'); You can use: $this->show('about'); And it will work fine with both .php and .tpl phpVMS versions.
  12. Is this what you are looking for? http://forum.phpvms.net/topic/4786-htaccess-url-rewrite-for-indexphp
  13. if(Auth::$userinfo->totalflights >= 10) { //place here the download link } else { echo 'You have to fly at least 10 flights to download.';} Can you check this? It should work if I have not missed anything.
  14. I believe that this is due to the number of airports you have added on your system. You can either increase the memory limit through your server's settings or remove the airports which are not needed (probably you should have thousands of them ).
  15. Where are you getting this error?
  16. If you do not post any more data about your website, none of us will be able to assist you. Please let us know your website url, the css you used for your topbanner, the url of topbanner and any other data you believe that will help us.
  17. I believe that if you use simpilot's version, you will not have any problem
  18. There is not any function to export pilots through your admin center. You can do so using phpmyadmin but you will have to check if there are any changes.
  19. This should work correctly: <ul style="margin-top:10px; margin-left:3px;width:100%;" class="list-group"> <?php foreach($pilots as $pilot) { ?> <li class="list-group-item"><img src="<?php echo Countries::getCountryImage($pilot->location);?>" alt="<?php echo Countries::getCountryName($pilot->location);?>" /> <a href="<?php echo url('/profile/view/'.$pilot->pilotid);?>"><font color="#2f2f2f"><?php echo $pilot->firstname.' '.$pilot->lastname ?></font></a></li> <?php } ?> </ul>
  20. It seems that you are using a wrong variable on your foreach. Can you try using this instead? <ul style="margin-top:10px; margin-left:3px;width:100%;" class="list-group"> <?php foreach($pilots as $allpilot) { ?> <li class="list-group-item"><img src="<?php echo Countries::getCountryImage($pilot->location);?>" alt="<?php echo Countries::getCountryName($pilot->location);?>" /> <a href="<?php echo url('/profile/view/'.$pilot->pilotid);?>"><font color="#2f2f2f"><?php echo $pilot->firstname.' '.$pilot->lastname ?></font></a></li> <?php } ?> </ul>
  21. Did you clear your browser cache too? What are you doing exactly? Can you describe the steps?
×
×
  • Create New...