Jump to content

Txmmy83

Members
  • Posts

    493
  • Joined

  • Last visited

Posts posted by Txmmy83

  1. ok found the Problem I think

    echo '<option value="'.url('/StatsCenter/index?month='.$startmonth.'&year='.$startyear.'').'">'.$month_name.' - '.$startyear.'</option>';
    

    should be vStatsCenter instead of StatsCenter on line 35 in vStatsCenter.tpl

  2. got it work I have set my bid expires after 48 hours= 2 days

    hope that help others ;)

    			 <?php
    $lastbids = SchedulesData::GetAllBids();
    if (count($lastbids) > 0)
    { ?>
    <table width="100%">
    <tr>
    <th align="left"><b>Flight</b></td>
    <th align="left"><b>Pilot</b></td>
    <th align="left"><b>From</b></td>
    <th align="left"><b>To</b></td>
    <th align="left"><b>Aircraft</b></td>
    <th align="left"><b>Booked On</b></td>
    <th align="left"><b>Bid Expires</b></td>
    </tr>
    <?php
    foreach($lastbids as $lastbid)
    	  {
      $pilot_info = PilotData::GetPilotData($lastbid->pilotid);
      $date = date($lastbid->dateadded);
    $sNeuesDatum = date("Y-m-d", strtotime("$date + 2 day"));
    ?>
    <tr>
    <td align="left"><?php echo $lastbid->code; ?><?php echo $lastbid->flightnum; ?></td>
    <td align="left"><?php echo $pilot_info->firstname.' '.$pilot_info->lastname; ?></td>
    <td align="left"><?php echo $lastbid->depicao;?></td>
    <td align="left"><?php echo $lastbid->arricao; ?></td>
    <td align="left"><?php echo $lastbid->aircraft; ?></td>
    <td align="left"><?php echo $lastbid->dateadded;?></td>
    <td align="left"><?php echo $sNeuesDatum;?></td>
    </tr>
    	 <?php
    	 }
    			    } else { ?>
    							 <p style="color:#cccccc; font-size:22px; text-align:center;">No bookings!</p>
    			    <?php
    			    }
    	 ?>
    </table>
    

  3. if you have more than one Airline running on one phpvms install this code is more than usefull :)

    <td align="left"><?php echo $lastbid->code; ?><?php echo $lastbid->flightnum; ?></td>
    

    replaced your "FRX" Airline prefix with a code piece that takes the Airline code used in Schedule

    is it possible to get the valid thru date of an bid example from 2012-05-23 - 2012-05-27

  4. sorry that I hijack your Topic ;)

    but I have a question I want to know if it is possible to Show icao & country in an hub ordered pilotlist

    that it show something like this Panama City Tocumen - MPTO, Panama

    I have to say I have managed to make it look this before but I have forgotten how :(

    best regards,

    Thomas

  5. many thanks kyle :D

    i have add this <?php MainController::Run('vAwards', 'showPilotIssuedAwards', $userinfo->pilotid); ?>

    in my profile_main.tpl, i have added the award, but in pilot center dont'view the award

    same problem here

    best regards,

    Thomas

  6. Your likely going to have to edit the admin core files, and what if you updated your phpVMS and you'll lose that feature?

    If you want to go ahead and agree with that and it's not my fault for you to lose that feature when you update, and I'll type a piece of a code, simple and I'll show you how.

    yes please help me with the code :)

    just found out that 30 works better as multiplicator

    thanks in advance

    Thomas

  7. You would need to edit the core files, but I'm not sure what your trying to do here.

    Are you saying that you don't want the price to be counted in the schedule flight and use the php math in the code you used and put it in the schedules? Is that that your trying to do?

    what I want to do is that php math calculates the flight price for me and fill it in the flightplan formular :)

    it works great with Charter Modul from Simpilot

    but I don't know how I can get it into the schedule submit form in admin backend

  8. think it have not been asked before? if yes please give me a hint where

    I have added something like this to simpilots charter module to get prices for the charter flights which works quite well ;)

    $charter[price] = ($distance/100)*20;
    

    is it possible to remove the manual price input and do it in background following maths operations like above?

    Best Regards and Thanks in advance

    Thomas

  9. Hi Jeffrey,

    Thanks, but i cannot find the CodonEvent::Dispatch('pirep_filed','PIREPS', $_POST); In the core/modules/acars/acars.php

    Perhaps it in another file?

    yeah same here only codonEvent::Dispatch I have in my acars.php

    is CodonEvent::Dispatch('refresh_acars', 'ACARS');

  10. For starters, you do not have the script.js or the style.css files linked to the location you have them on your site.

    They should be:

    <script type="text/javascript" src="http://www.mysite.com/jslocation/script.js"></script>
    <link rel="stylesheet" href="http://www.mysite.com/csslocation/style.css" type="text/css" media="screen" />
    

    sorry I forgot to mention that in my code sections :(

  11. <?php
    class Aircraft_Condition extends CodonModule
    {
    public function __construct() {
    			CodonEvent::addListener('Aircraft_Condition');
    
    }
    public function EventListener($eventinfo) {
    
    			if($eventinfo[0] == 'pirep_filed') {
    
      $pirepinfo = $eventinfo[2];		
    			 $aircraft = OperationsData::getAircraftByReg($pirepinfo->registration);
      $pirepinfo->landingrate = intval($pirepinfo->landingrate);
      if($pirepinfo->landingrate < -100 && $pirepinfo->landingrate > -500)
    			  $cond = $aircraft->cond -20;
    			 else
    			  $cond = 100;
    
    			 $update = $this->updateAircraft($aircraft->id, $cond);
    			}
    
    }
    private function updateAircraft($id, $cond) {
     $sql = 'UPDATE '.TABLE_PREFIX."aircraft
      SET `cond` = '$cond'
      WHERE `id` = '$id'";
    
     $res = DB::query($sql);
     if(DB::errno() != 0)
      return false;
    
     CodonCache::delete('all_aircraft');
     CodonCache::delete('all_aircraft_enabled');
     CodonCache::delete('all_aircraft_search');
     CodonCache::delete('all_aircraft_search_enabled');
    
     return true;
    }
    }
    

    I have checked out simpilots TopPilots code and the hook is setup the same so I am not sure why this is not working. Are you sure that you have a column in the aircraft table named 'cond'?

    I am wondering if the $pirepinfo is actually being filed.

    yes cond table is aircraft table in DB also the Pirep is filed without Problems ;)

×
×
  • Create New...