Jump to content

Tato123

Members
  • Posts

    150
  • Joined

  • Last visited

Posts posted by Tato123

  1. Thank you for your response Mark :)

    actually i created a search form for default schedule function what exactly i wanted is whenever pilots search for any schedule through that form it will fetch the data from database and how the result on result page but now default function behave differently and showing all the schedules below on schedule search form so if anyone can please help me to sort out this thing will be much appreciated i am not using simpilot frontschedule module as it is not compatible with 5.5x version of phpvms.

    if you require more information please do ask.

    Thank you

    Can I have your form please?

  2. I have upgrade the version of phpvms to 5.5

    when i call the function screenshots i have this error

    Fatal error: Class 'Pagination' not found in C:\Program Files (x86)\EasyPHP-DevServer-14.1VC9\data\localweb\newvar\lib\skins\devoops\Screenshots\screenshots_viewer.php on line 3

  3. also for me same error.

    Strict Standards: Non-static method SchedulesData::setBidOnSchedule() should not be called statically in C:\Program Files (x86)\EasyPHP-DevServer-14.1VC11\data\localweb\newvar\core\common\SchedulesData.class.php on line 785

    Bid added

    public static function addBid($pilotid, $routeid) {
        $pilotid = DB::escape($pilotid);
        $routeid = DB::escape($routeid);
        if (DB::get_row('SELECT bidid FROM ' . TABLE_PREFIX . 'bids
      WHERE pilotid=' . $pilotid . ' AND routeid=' . $routeid)) {
    	    return false;
        }	    $pilotid = DB::escape($pilotid);
        $routeid = DB::escape($routeid);
        $sql = 'INSERT INTO ' . TABLE_PREFIX . 'bids (pilotid, routeid, dateadded)
       VALUES (' . $pilotid . ', ' . $routeid . ', NOW())';	    DB::query($sql);
        self::setBidOnSchedule($routeid, DB::$insert_id);	    if (DB::errno() != 0) return false;
        return true;
       }
    

  4. You can take a look here -> https://github.com/D...4664506644bf489 <- I made some changes to allow the functions from phpVMS to work with newer versions of jquery, not pretty right now but it does work. You may want to take a look at that and see if you can work it into your site.

    I have this error

    Strict Standards: Non-static method SchedulesData::setBidOnSchedule() should not be called statically in C:\Program Files (x86)\EasyPHP-DevServer-14.1VC9\data\localweb\newvar\core\common\SchedulesData.class.php on line 785

    Bid added

  5. You can either get rid of your own call to jQuery, or replace the file included with phpVMS and update the head tpl. I would opt for the first as you can't be certain a newer version of jQuery is compatible with the phpVMS code.

    Hi Tom,

    if I remove the call, menus do not work , if I use the call phpvms, menus do not work too because Bootstrap's Javascript requires jQuery version 1.9.1 or higher,

  6. Hello everyone,

    I'm doing the new skin using Bootstrap for my company, but I have some serious problems.

    In layout.tpl file I need to call jquery.js

    <code> <script src = "<? php echo SITE_URL?> / lib / skins / Virtualiroma2 / js / jquery.js"> </ script> </ code>

    Most likely the script is in conflict with that in the file called core_htmlread.tpl

    <script type = "text / javascript">

    var baseurl = "<? php echo SITE_URL;?>";

    GeoURL var = "<? php echo GEONAME_URL;?>";

    </ script>

    <link rel = "stylesheet" media = "all" type = "text / css" href = "<? php echo fileURL ('lib / css / phpvms.css')?>" />

    <meta http-equiv = "Content-Type" content = "text / html; charset = <? php echo Config :: Get ('page_encoding');?>" />

    <script type = "text / javascript" src = "http://ajax.googleap...jquery.min.js"> </ script>

    <script type = "text / javascript" src = "http://ajax.googleap...ery-ui.min.js"> </ script>

    <script type = "text / javascript" src = "http://maps.google.c...s?sensor=true"> </ script>

    <script type = "text / javascript" src = "<? php echo fileURL ('lib / js / jquery.form.js');?>"> </ script>

    <script type = "text / javascript" src = "<? php echo fileURL ('lib / js / phpvms.js');?>"> </ script>

    <script type = "text / javascript" src = "<? php echo fileURL ('lib / js / jquery.dataTables.js');?>"> </ script>

    <? php

    echo $ MODULE_HEAD_INC;

    If you recall from the script file layout.tpl when I try to book a flight "addbid" the system responds with "no route passed".

    If off the script, the system works properly.

    Does anyone know how to help me upgrade JQuery or if there is any solution?

    I tried to search the forum, there are many similar post but was not able to solve the problem.

    Thank You and Good Year 2015 to all

  7. Ok but how i must try to try?

    I must run this

    http://www.virtualiroma.it/newvar/index.php/liveflights?cs=VAR
    

    in my TPL.

    Is possible or not?

    the code of module is:

    <?php
    class liveflightsonline extends CodonModule {
    public function index() { ?>
     <script src="http://maps.google.com/maps/api/js?sensor=true"
    	  type="text/javascript"></script>
    <?php 
    //randomize servers
    //$serv[] = "http://nl1.www.ivao.aero/whazzup.txt";
    //$serv[] = "http://am1.www.ivao.aero/whazzup.txt";
    $serv[] = "http://api.ivao.aero/getdata/whazzup/whazzup.txt";
    $serv[] = "http://api.ivao.aero/getdata/whazzup/whazzup.txt";
    srand ((double) microtime() * 1000000);
    $randomserv = rand(0,count($serv)-1);
    $servers = $serv[$randomserv];
    //readin whazzup.txt
    $file = file($servers);
    $explode = explode(":", $line);
    ?>
    <table width="93%" border="1" align="center" >
     <tr>
       <td  colspan="11" align="center" >
    <center><img src="http://maps.google.com/maps/api/staticmap?center=48.41, 9.8&size=480x300
    <?php
    foreach($file as $line) {
       if(strpos($line,$_GET['cs']) === 0){
     list($callsign,$vid,$realname,$clienttype,$frequency,$latitude,$longitude,$altitude,$groundspeed,
    $planned_aircraft,$planned_tascruise,$planned_depairport,$planned_altitude,$planned_destairport,
    $server,$protrevision,$rating,$transponder,$facilitytype,$visualrange,$planned_revision,
    $planned_flighttype,$planned_deptime,$planned_actdeptime,$planned_hrsenroute,$planned_minenroute,
    $planned_hrsfuel,$planned_minfuel,$planned_altairport,$planned_remarks,$planned_route,
    $planned_depairport_lat,$planned_depairport_lon,$planned_destairport_lat,$planned_destairport_lon,
    $atis_message,$time_last_atis_received,$time_connected,$client_software_name,$client_software_version,
    $adminrating,$atc_or_pilotrating,$planned_altairport2,$planned_typeofflight,$planned_pob,$true_heading,$onground)=explode(":",$line)
    ?>
    &markers=color:blue%7Clabel:P%7C<?php echo $latitude ?>, <?php echo $longitude ?>&sensor=true<?php }} ?>" alt="Map Not Available!" /></center>
    </td>
     </tr>
     </table>
     <table>
    <table border="0">
    <?php
    foreach($file as $line) {
       if(strpos($line,$_GET['cs']) === 0){
     list($callsign,$vid,$realname,$clienttype,$frequency,$latitude,$longitude,$altitude,$groundspeed,
    $planned_aircraft,$planned_tascruise,$planned_depairport,$planned_altitude,$planned_destairport,
    $server,$protrevision,$rating,$transponder,$facilitytype,$visualrange,$planned_revision,
    $planned_flighttype,$planned_deptime,$planned_actdeptime,$planned_hrsenroute,$planned_minenroute,
    $planned_hrsfuel,$planned_minfuel,$planned_altairport,$planned_remarks,$planned_route,
    $planned_depairport_lat,$planned_depairport_lon,$planned_destairport_lat,$planned_destairport_lon,
    $atis_message,$time_last_atis_received,$time_connected,$client_software_name,$client_software_version,
    $adminrating,$atc_or_pilotrating,$planned_altairport2,$planned_typeofflight,$planned_pob,$true_heading,$onground)=explode(":",$line)
    ?>
     <tr>
       <td width="63"><div align="center"><a href="<?php echo SITE_URL; ?>/index.php/liveflights/track?cs=<?php echo $callsign; ?>" target="_blank"><?php echo $callsign ?></a></div></td>
       <td width="165">
      <div align="center">
     <?php
    if (strlen($realname)>=30)
     echo (substr($realname, 0, 30))."...";
     else
     echo $realname
     ?>
       </div></td>
       <td width="33"><div align="center"><?php echo $planned_depairport  ?></div></td>
       <td width="78"><div align="center"><?php echo $planned_destairport  ?></div></td>
       <td width="101"><div align="center"><?php echo (substr($planned_aircraft, 2, 6)) ?></div></td>
       <td width="91"><div align="center"><?php echo $groundspeed ?></div></td>
       <td width="88"><div align="center"><?php echo $altitude ?></div></td>
       <td><div align="center">
      <?php if ($groundspeed=="0") echo 'Gate Open'; elseif  ($altitude>="12000") echo 'En Route'; else echo 'Departing/Arriving'; ?>
       </div></td>
     </tr>
     <?php 
    }
    }
    ?>
    </table>
    <?php
    // server in use
    //echo $serv[$randomserv]?>
    <?php
    }
    public function track() { ?>
    <?php   
    //randomize servers
    //$serv[] = "http://nl1.www.ivao.aero/whazzup.txt";
    //$serv[] = "http://am1.www.ivao.aero/whazzup.txt";
    $serv[] = "http://api.ivao.aero/getdata/whazzup/whazzup.txt";
    $serv[] = "http://api.ivao.aero/getdata/whazzup/whazzup.txt";
    srand ((double) microtime() * 1000000);
    $randomserv = rand(0,count($serv)-1);
    ?>
    <?php
    $file = file($serv[$randomserv]);
    $explode = explode(":", $line);
    foreach($file as $line)
       if(strpos($line,$_GET['cs']) === 0)
    list($callsign,$vid,$realname,$clienttype,$frequency,$latitude,$longitude,$altitude,$groundspeed,
    $planned_aircraft,$planned_tascruise,$planned_depairport,$planned_altitude,$planned_destairport,
    $server,$protrevision,$rating,$transponder,$facilitytype,$visualrange,$planned_revision,
    $planned_flighttype,$planned_deptime,$planned_actdeptime,$planned_hrsenroute,$planned_minenroute,
    $planned_hrsfuel,$planned_minfuel,$planned_altairport,$planned_remarks,$planned_route,
    $planned_depairport_lat,$planned_depairport_lon,$planned_destairport_lat,$planned_destairport_lon,
    $atis_message,$time_last_atis_received,$time_connected,$client_software_name,$client_software_version,
    $adminrating,$atc_or_pilotrating,$planned_altairport2,$planned_typeofflight,$planned_pob,$true_heading,$onground)=explode(":",$line)
    ?>
    <table width="100%" border="1" align="center" class="tablevar" >
     <tr>
       <td width="239" >Callsign:</td>
       <td width="564" ><?php echo $callsign ?></td>
     </tr>
     <tr>
       <td >Partenza:</td>
       <td ><?php echo $planned_depairport  ?></td>
     </tr>
    <tr>
       <td >Meteo alla Partenza:</td>
       <td ><?php
    
    $lines = file("http://wx.ivao.aero/metar.php?id=$planned_depairport");
       $top200 = array_slice(array_reverse($lines),0,1000);
    foreach($top200 as $line)
    {
       echo $line;
    }
    ?>
    </td>
     </tr>
     <tr>
       <td >Destinazione:</td>
       <td ><?php echo $planned_destairport  ?></td>
     </tr>
     <tr>
       <td >Meteo Destinazione:</td>
       <td ><?php
    
    $lines = file("http://wx.ivao.aero/metar.php?id=$planned_destairport");
       $top200 = array_slice(array_reverse($lines),0,1000);
    foreach($top200 as $line)
    {
       echo $line;
    }
    ?></td>
     </tr>
     <tr>
       <td >Aereo:</td>
       <td ><?php echo (substr($planned_aircraft, 2, 6)) ?></td>
     </tr>
     <tr>
       <td >Carburante a bordo per:</td>
       <td ><?php echo $planned_hrsfuel ?> Ore e <?php echo $planned_minfuel ?> minuti</td>
     </tr>
     <tr>
       <td >Passeggeri:</td>
       <td ><?php echo $planned_pob ?></td>
     </tr>
     <tr>
       <td >Ground Speed/Altitude:</td>
       <td ><?php echo $groundspeed ?> / <?php echo $altitude ?>
     </tr>
     <tr>
       <td >Rotta:</td>
       <td ><?php echo $planned_route ?></td>
     </tr>
     <tr>
       <td >Stato:</td>
       <td ><?php if ($groundspeed=="0") echo 'Gate Open'; elseif  ($altitude>="12000") echo 'En Route'; else echo 'Departing/Arriving'; ?>
    </td>
     </tr>
     <tr>
       <td >Pilota al Comando:</td>
       <td ><?php
     if (strlen($realname)>=20)
     echo (substr($realname, 0, 20))."...";
     else
     echo $realname
     ?>
     </td>
     </tr>
       <td >Grado:</td>
       <td ><p style="color:white;font-size:11px; vertical-align:top;">
       <img src="http://www.ivao.aero/data/images/ratings/pilot/<? echo $rating ?>.gif" width="105" height="30" />
     - <?php
    if ($rating == 1 )
    echo  "OBS - Observer";
    elseif ($rating == 2 )
    echo  "Basic Flight Student (FS1)";
    elseif ($rating == 3 )
    echo "Flight Student (FS2)";
    elseif ($rating == 4 )
    echo "Advanced Flight Student (FS3)";
    elseif ($rating == 5 )
    echo "Private Pilot (PP)";
    elseif ($rating == 6 )
    echo "Senior Private Pilot (SPP)";
    elseif ($rating == 7 )
    echo "Commercial Pilot (CP)";
    elseif ($rating == 8 )
    echo "Airline Transport Pilot (ATP)";
    elseif ($rating == 9 )
    echo "Senior Flight Instructor (SFI)";
    elseif ($rating == 10 )
    echo "Chief Flight Instructor (CFI)";
    elseif ($rating == 11 )
    echo "Supervisor (SUP)";
    elseif ($rating == 12 )
    echo "Administrator (ADM)";
    ?>
     </td>
     </tr>
       <tr>
       <td colspan="4" align="center">
    <center><img src="http://maps.google.com/maps/api/staticmap?path=color:0xff0000ff%7Cweight:5%7C&markers=color:blue%7Clabel:Position%7C<?php echo $latitude ?>,<?php echo $longitude ?>&zoom=2&size=600x300&sensor=true" /></center>
     </td>
     </tr>
    </table>
       <?php
    
    }
    
    }
    

  8. Hello,

    I'm trying to do a search for bands of time using the form Frontschedules.

    In the airport search.tpl I entered this search option:

    	  <tr>
    	    <td>Orario</td>
    	    <td>
    		    <select class="search" name="deptime">
    			    <option value="">All</option>
     <option value="00:01|08:00">00.01/08.00</option>
     <option value="08:01|16:00">08.01/16.00</option>
     <option value="16:01|24:00">16.01/24.00</option>
    		    </select>
    	    </td>
        </tr>
    

    In the FrontSchedules.php:

        public function findflight()
    {
     $arricao = DB::escape($this->post->arricao);
    		    $depicao = DB::escape($this->post->depicao);
    		    $airline = DB::escape($this->post->airline);
    		    $aircraft = DB::escape($this->post->aircraft);
        $deptime = DB::escape ($this->post->deptime);
    			  if(!$airline)
    			    {
    				    $airline = '%';
    			    }
    		    if(!$arricao)
    			    {
    				    $arricao = '%';
    			    }
    		    if(!$depicao)
    			    {
    				    $depicao = '%';
    			    }
    		    if($aircraft == !'')
    		    {
    			    $aircrafts = FrontSchedulesData::findaircraft($aircraft);
    			    foreach($aircrafts as $aircraft)
    			    {
    				    $route = FrontSchedulesData::findschedules($arricao, $depicao, $airline, $aircraft->id);
    				    if(!$route){$route=array();}
    				    if(!$routes){$routes=array();}
    				    $routes = array_merge($routes, $route);
    			    }
    		    }
    		    else
    		    {
    		    $routes = FrontSchedulesData::findschedule($arricao, $depicao, $airline, $deptime);
    		    }
     $this->set('allroutes', $routes);
     $this->show('schedule_results.tpl');
    
    }
    

    and inFrontSchedulesData Class:

     public function findschedule($arricao, $depicao, $airline, $deptime)   {
        $query = "SELECT phpvms_schedules.*, phpvms_aircraft.name AS aircraft, phpvms_aircraft.registration
    		    FROM phpvms_schedules, phpvms_aircraft
    		    WHERE phpvms_schedules.depicao LIKE '$depicao'
    		    AND phpvms_schedules.arricao LIKE '$arricao'
       AND phpvms_schedules.deptime LIKE '$deptime'
    		    AND phpvms_schedules.code LIKE '$airline'
    		    AND phpvms_aircraft.id LIKE phpvms_schedules.aircraft";
        return DB::get_results($query);
       }
    

    How is possible changing the query for search the time from the option value?

    If i try with option valure ="8.25" i find all the flight at this time.

    I won't search the range.

    Thanks

×
×
  • Create New...