Jump to content

bass

Members
  • Posts

    240
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by bass

  1. A little work on the code, and I have now it turns out (see photo) Any errors seen in the photo that the flight booked, but in the column "status" indicates that the flight "Available" ((((Must show "Booked". I can not fix, help!
  2. vFleetTracker I try to make so that page (indeks.tpl) shows the status of each aircraft. - This plane is not booked - This plane is booked - The aircraft in flight - You do not have access to this aircraft. If the aircraft is free - it is possible to click and see which flight you can do it in view of what he's airport. <?php $data = OperationsData::getAllAircraft(); $online = ACARSData::GetACARSData(); $lastbid = ACARSData::GetACARSData(); $airports = array(); foreach(OperationsData::getAllAirports() as $aircraft) $airports[$aircraft->icao] = $aircraft; foreach($data as $aircraft){ if($aircraft->charter == 0) { if($aircraft->icao != 'SU95') continue; $_online = false; if($aircraft->enabled == 0 && $online) foreach($online as $fullname) $fullname->aircraft == $aircraft->registration and $fullname->phasedetail != 'Arrived' and $_online = true; $sujet = $sujet +1; } } foreach($data as $aircraft){ if($aircraft->icao != 'T204') continue; if($aircraft->charter == 0) { $_online = false; if($aircraft->enabled == 0 && $online) foreach($online as $lastbid) $lastbid->aircraft == $aircraft->registration and $lastbid->phasedetail != 'Arrived' and $_online = true; $bong = $bong +1; } } ?><div class="ras"> <table width="95%" class="tablesorter" id="tabledlist"> <thead> <tr> <th class="regul" colspan="11"><div align="center"><img class="le" src="<?php echo SITE_URL?>/lib/skins/red/images/H3.png" /> Авиапарк <img class="pr" src="<?php echo SITE_URL?>/lib/skins/red/images/H3.png" /></div></th> </tr> <tr> <th>Модель самолета </th> <th>Суперджет 100</th> <th>Ту 204-100 </th> <th>А330</th> <th>А321</th> <th>А320</th> <th>А319</th> </tr> </thead> <tbody><tr class="mod"> <td align="center">Количество самолетов </td> <td align="center"><?php echo $sujet?></td> <td align="center"><?php echo $bong?></td> <td align="center"><?php echo $airbigit?></td> <td align="center"><?php echo $airmmal?></td> <td align="center"><?php echo $airsmal?></td> <td align="center"><?php echo $airmal?></td> </tr> </tbody> </table> <div class="park-wrap"> <div class="tt"> <div class="box_craft"> <img class="tt12" src="/lib/skins/red/images/craft/t204.jpg"> <br><br> <h99 class="blue"><span class=parks>Ту 204-100 </span></h99> <br><br> <table class="list" width="100%"> <colgroup><col width="23"><col width="58"><col><col width="40"><col width="70"></colgroup> <tbody><tr><td class="h"></td><td class="h">tail</td><td class="h">type</td><td class="h">now</td><td class="h">status</td></tr> <?php foreach($data as $aircraft){ if($aircraft->icao != 'T204') continue; $_online = false; if($aircraft->enabled == 0 && $online) foreach($online as $lastbid) $lastbid->aircraft == $aircraft->registration and $lastbid->phasedetail != 'Arrived' and $_online = true; if($aircraft->delplane == 0) { ?> <tr> <td class="vac_img" title="Red Wings"><img src="/lib/skins/red/images/H3.png"></td> <td class="light" nowrap=""><a href="<?php echo url('/vFleetTracker/view/'.$aircraft->registration);?>" class="blue"><?php echo $aircraft->registration?></a></td> <td class="light" nowrap="" align="center"><?php echo $aircraft->fullname?></td> <td class="light" title="<?php echo $airports[$aircraft->now]->name.', '.$airports[$aircraft->now]->country ?>"><?php echo $aircraft->now ?></td> <td class="light" nowrap=""> <?php if($aircraft->enabled == 1) { if(Auth::LoggedIn()) { ?> <a href="<?php echo url('/schedules?depicao='.$aircraft->now.'&ac='.$aircraft->id);?>" style="color: green;">Свободен</a> <?php }else{ ?> <div style="color:#FF0000;">Нет допуска </div> <?php } }else { if($_online){ ?> <div style="color:royalblue;">В полете </div> <?php }else { ?> <div style="color:#FF0000;">Занят</div> <?php } } ?> </td> </tr> <?php } } ?> </tbody></table> </div></div> <div class="tt"> <div class="box_craft"> <img class="tt12" src="/lib/skins/red/images/craft/ssj.jpg"> <br><br><h99 class="blue"><span class=parks>SSJ-100</span></h99><br><br> <table class="list" width="100%"> <colgroup><col width="23"><col width="58"><col><col width="40"><col width="70"></colgroup> <tbody><tr><td class="h"></td><td class="h">tail</td><td class="h">type</td><td class="h">now</td><td class="h">status</td></tr> <?php foreach($data as $aircraft){ if($aircraft->icao != 'SU95') continue; $_online = false; if($aircraft->enabled == 0 && $online) foreach($online as $fullname) $fullname->aircraft == $aircraft->registration and $fullname->phasedetail != 'Arrived' and $_online = true; ?> <tr> <td class="vac_img" title="Red wings"><img src="/lib/skins/red/images/H3.png"></td> <td class="light" nowrap=""><a href="<?php echo url('/vFleetTracker/view/'.$aircraft->registration);?>" class="blue"><?php echo $aircraft->registration?></a></td> <td class="light" nowrap="" align="center"><?php echo $aircraft->fullname?></td> <td class="light" title="<?php echo $airports[$aircraft->now]->name.', '.$airports[$aircraft->now]->country ?>"><img src="<?php echo SITE_URL;?>/lib/images/countries/<?php echo strtolower($imgicao);?>.png" onmouseover="return overlib('<?php echo $lastlocation.' - '.$country->name.' - '.$country->country;?>');" onmouseout="return nd();"> <?php echo $lastlocation;?></td> <td class="light" nowrap=""> <?php if($aircraft->enabled == 1) { if(Auth::LoggedIn()) { ?> <a href="<?php echo url('/schedules?depicao='.$aircraft->now.'&ac='.$aircraft->id);?>" style="color: green;">Свободен</a> <?php }else{ ?> <div style="color:#FF0000;">Нет допуска </div> <?php } }else { if($_online){ ?> <div style="color:royalblue;">В полете </div> <?php }else { ?> <div style="color:#FF0000;">Занят</div> <?php } } ?> </td> </tr> <?php } ?> </tbody></table> </div></div> <table width="100%" height="21" border="0" cellpadding="0" cellspacing="0"> <tr> <td> </td> <td> </td> </tr> </table> </div></div> </div> </div>
  3. How do you do it? I'm using this code, but it shows only the freedom or not the flight. You can make it so that showed - Aircraft at the airport is no <?php if(Config::Get('DISABLE_SCHED_ON_BID') == true && $route->bidid != 0) { ?> <div class="btn btn-danger btn-sm sharp disabled">Booked</div> <?php } else { ?> <a data-toggle="modal" href="<?php echo SITE_URL?>/action.php/Fltbook" data-target="#confirm" class="btn btn-success btn-md">Available</a> <?php } ?>
  4. I can not say I found this code on the Internet. With my agent is working.
  5. If you want to see the flight evaluation scale from 0 to 100. What can I install the code in pirep_viewreport.tpl <?php $log = explode('*', $pirep->log); $sover = $fstall = $pritir = $perfl = $normall = $bad = $vbad = $crash = 0; foreach($log as $line) { if(preg_match('/Overspeed!/i', $line)) $sover = 2; if(preg_match('/Stall!/i', $line)) $fstall = 15; if(preg_match('/landed at/i', $line)) { $rate = explode('at -', $line); $rate2 = explode('fpm ', $rate[1]); if($rate2[0] <= 49) $pritir = 0; elseif($rate2[0] <= 250 && $rate2[0] >= 49) $perfl = 0; elseif($rate2[0] <= 500 && $rate2[0] >= 250) $normall = 0; elseif($rate2[0] <= 700 && $rate2[0] >= 500) $bad = 5; elseif($rate2[0] <= 1600 && $rate2[0] >= 700) $vbad = 20; elseif($rate2[0] >= 1600) $crash = 99; } } $full = 100; $report = 100 - $sover - $fstall - $pritir - $perfl - $normall - $bad - $vbad - $crash; $report = $report <= 0 ? 0 : $report; if($report < 100) { ?> <font color="red"> <?php echo $report ?></font> <?php } else { ?> <?php echo $report ?> <?php } ?>
  6. I try this code, but it does not work as expected. <?php # Don't allow overlapping bids and a bid exists if(Config::Get('DISABLE_SCHED_ON_BID') == true && $schedule->bidid != 0) { if($schedule->online){ ?> <strong style="color:royalblue;font-weight:normal;">In Flight </strong> <?php }else{ ?> <strong style="color:#FF0000;font-weight:normal;">Book</strong> <?php } } elseif($schedule->aircraft_count == 0) { ?> <strong style="color:#FF0000;font-weight:normal;">No Aircraft <?php } else { ?> <a data-toggle="modal" href="/index.php/Fltbook" data-target="#confirm" class="btn btn-success btn-md">Free</a> <?php } ?>
  7. Help to complete the code. This code should reflect the flight status. - Flight free - No aircraft at the airport - Book as can be seen from the code below, now there is no warning that the aircraft is out of this airport. How do I add ??? at the moment I am using the following code: <?php if(Config::Get('DISABLE_SCHED_ON_BID') == true && $route->bidid != 0) { ?> <?php $search1 = (array( 'a.registration' => $route->registration, 's.bidid != 0' )); $schedules = SchedulesData::findSchedules($search1); $disabled = $schedules[0]->registration;if($route->registration==$disabled) { continue; } ?> <div class="btn btn-danger btn-sm sharp disabled">Book</div> <?php } else { ?> <a data-toggle="modal" href="/index.php/Fltbook" data-target="#confirm" class="btn btn-success btn-md">Free</a> <?php } ?>
  8. https://cloud.mail.ru/public/MS1R/nbHsxACx9 It is possible that this page be attached to your unit?
  9. Hello, can you help with the module? I have the source code of the page "shedules_result" with a very good feature, but unfortunately do not have the module ((( Can you help to recreate and make it work? I think that you might be interested in this module.)
  10. The plane is generally in another airport, and I was able to make his reservation on a flight from another airport in general ((
  11. I have a problem. Departure airport has 2 aircraft. When I added the flight, it was installed on the aircraft flight (Example BN-QVI!) when I try to make the registration of flight, I can register for the flight of any aircraft regardless of what was added when you create a flight in the admin panel
  12. Hello, someone has put to your website this flight map? https://github.com/R-Tur/Vatsim-Flight-Map I have now is a map from another website (Iframe). I would not depend on anybody and put his flight map. Now there is an error associated with the key. Maybe I'm wrong, can someone help make flying the card to work?
  13. skin free, I did so that everyone could see my work. Specifically, in this template on the main page, not the picture, and the video, it is not working because the video was removed from free hosting.
  14. bass

    Skins VAC-VSR

    I sent you a private message
  15. bass

    Skins VAC-VSR

    Yes, there is and English language. I wrote you a private message.
  16. bass

    Skins VAC-VSR

    Hi everyone, saw a new message on the forum with useful scripts and decided to create another new website. It so happened.!) If someone is interested, email me.
  17. Parkho says I have this error due to old version of phpvms
  18. Don't understand where to enter (the road) to do the calculations exactly my route filled when adding a flight.? " we whant have in briefing our route! away from us so LUNAG A713 NOGRI R834 MF DCT ITINA DCT RW DCT GEKLA DCT and this comes from you LUNAG G710 INGEN W114 OK A300 MF RW32K! maybe it's because of the AIRAC 1403?"
  19. <?php /** * Codon PHP Framework * www.nsslive.net/codon * Software License Agreement (BSD License) * * Copyright (c) 2008 Nabeel Shahzad, nsslive.net * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * @author Nabeel Shahzad * @copyright Copyright (c) 2008, Nabeel Shahzad * @link http://www.nsslive.net/codon * @license BSD License * @package codon_core */ class TemplateSet { public $template_path = ''; public $enable_caching = false; public $cache_timeout; public $tpl_ext = '.tpl'; protected $vars = array(); /*public function __construct($path='') { if($path!='') $this->Set($path); }*/ /** * Set the default path to look for the templates * * @param string $path Path to the templates folder */ public function setTemplatePath($path) { # Remove trailing directory separator $len = strlen($path); if($path[$len-1] == DS) $path=substr($path, 0, $len-1); $this->template_path = $path; } public function enableCaching($bool=true) { $this->enable_caching = $bool; } /** * Clear all variables */ public function clearVars() { $this->vars = array(); } /** * Set a variable to the template, call in the template * as $name * * @param mixed $name Variable name * @param mixed $value Variable value */ public function set($name, $value) { // See if they're setting the template as a file // Check if the file exists if (is_string($value) && $value != '' && substr($value, -3) == $this->tpl_ext) { if(file_exists($this->template_path . DS . $value)) { $value = $this->GetTemplate($value, true); } } $this->vars[$name] = $value; } /** * Alias to self::ShowTemplate(); * * @param string $tpl_name Template name including extention * @param bool $checkskin Check the skin folder or not */ public function show($tpl_name, $checkskin=true, $force_base=false) { return $this->ShowTemplate($tpl_name, $checkskin, $force_base); } public function showVars() { extract($this->vars, EXTR_OVERWRITE); echo '<pre>'; print_r(get_defined_vars()); echo '</pre>'; } /** * Show a template on screen, checks to see if the * template is cached or not as well. To return a template, * use self::GetTemplate(); this ends up calling GetTemplate() * if the cache is empty or disabled * * @param string $tpl_name Template name including extention * @param bool $checkskin Check the skin folder or not * @return mixed This is the return value description * */ public function showTemplate($tpl_name, $checkskin=true, $force_base=false) { if($this->enable_caching == true) { $cached_file = CACHE_PATH . DS . $tpl_name; // The cache has expired if((time() - filemtime($cached_file)) > ($this->cache_timeout*3600)) { unlink($cached_file); $tpl_output = $this->GetTemplate($tpl_name, true, $checkskin, $force_base); echo $tpl_output; //cache it into the storage file if($this->enable_caching == true) { $fp = fopen($cached_file, 'w'); fwrite($fp, $tpl_output, strlen($tpl_output)); fclose($fp); } } else // Cache not expired, so just include that cache { @include $cached_file; } } else { return $this->getTemplate($tpl_name, false, $checkskin, $force_base); } } /** * Alias to $this->GetTemplate() * * @param string $tpl_name Template to return (with extension) * @param bool $ret Return the template or output it on the screen * @param bool $checkskin Check the active skin folder for the template first * @return mixed Returns template text is $ret is true * */ public function get($tpl_name, $ret=false, $checkskin=true, $force_base=false) { return $this->getTemplate($tpl_name, $ret, $checkskin, $force_base); } /** * GetTemplate * This gets the actual template data from a template, and fills * in the variables * * @param string $tpl_name Template to return (with extension) * @param bool $ret Return the template or output it on the screen * @param bool $checkskin Check the active skin folder for the template first * @param bool $force_base Force it to read from the base template dir * @return mixed Returns template text is $ret is true * */ public function getTemplate($tpl_name, $ret=false, $checkskin=true, $force_base=false) { /* See if the file has been over-rided in the skin directory */ if(strstr($tpl_name, $this->tpl_ext) === false) { $tpl_name .= $this->tpl_ext; } if($force_base === true) { $old_tpl = $this->template_path; $this->template_path = Config::Get('BASE_TEMPLATE_PATH'); if($checkskin === true) { if(defined('SKINS_PATH') && file_exists(SKINS_PATH . DS . $tpl_name)) { $tpl_path = SKINS_PATH . DS . $tpl_name; } else { $tpl_path = $this->template_path . DS . $tpl_name; } } } if((!defined('ADMIN_PANEL') || $force_base == true) && $checkskin == true) { if(defined('SKINS_PATH') && file_exists(SKINS_PATH . DS . $tpl_name)) { $tpl_path = SKINS_PATH . DS . $tpl_name; } else { $tpl_path = $this->template_path . DS . $tpl_name; } } else { $tpl_path = $this->template_path . DS . $tpl_name; } if($force_base) { $this->template_path = $old_tpl; } if(!file_exists($tpl_path)) { trigger_error('The template file "'.$tpl_path.'" doesn\'t exist'); return; } extract($this->vars, EXTR_OVERWRITE); ob_start(); include $tpl_path; $cont = ob_get_contents(); ob_end_clean(); # Check if we wanna return if($ret==true) return $cont; echo $cont; } /** * ShowModule * This is an alias to MainController::Run(); calls a function * in a module. Returns back whatever the called function returns * * @param string $ModuleName Module name to call * @param string $MethodName Function which to call in the module * @return mixed This is the return value description * */ public function showModule($ModuleName, $MethodName='ShowTemplate') { return MainController::Run($ModuleName, $MethodName); } } Like this I got the code, did as written in this thread, did not help. I can something not so made? Can I help you? (I use an old version of phpvms)
  20. I also have this error, can not remove. Due to this error fails to add anything in the admin panel of the site.
  21. You can add something like the registration number of the aircraft? that he showed up in the list? because in one port can not be one A320
  22. Deprecated: Non-static method FBSVData::findschedules() should not be called statically, assuming $this from incompatible context in /home/u300880035/public_html/core/modules/FBSV11/FBSV11.php on line 47 error, how to fix?
  23. bass

    Skin Question

    <?php Template::Show('xxxxxxxx.tpl'); ?> ???? This
×
×
  • Create New...