Jump to content

mark1million

Moderators
  • Posts

    2283
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by mark1million

  1. Then if that is the problem you will need to edit the following to your prefix, Core Common TopPilotData.class.php

    Look at the top and change, FROM phpvms_pireps to your prefix or for a universal fix,

    FROM `" . TABLE_PREFIX .

    <?php
    //by:simpilot
    //www.simpilotgroup.com
    class TopPilotData extends CodonData $query = "SELECT * FROM phpvms_pireps
    {
       public function get_monthly_stats($month, $year) {
           $query = "SELECT * FROM phpvms_pireps WHERE MONTH(submitdate) = '$month' AND YEAR(submitdate) = '$year'";
    
           return DB::get_results($query);
       }
    
       public function record_stats($pilot_id, $totalflights, $totaltime, $totalmiles, $startmonth, $startyear) {
           $query = "INSERT INTO top_flights (pilot_id, flights, hours, miles, month, year)
                   VALUES('$pilot_id', '$totalflights', '$totaltime', '$totalmiles', '$startmonth', '$startyear')";
    
           DB::query($query);
       }
    
       public function clear_table()   {
           $query = "TRUNCATE TABLE top_flights";
    
           DB::query($query);
       }
    
       public function top_pilot_flights($month, $year, $howmany)    {
           $query = "SELECT * FROM top_flights WHERE month='$month' AND year='$year' ORDER BY flights DESC LIMIT $howmany";
    
           return DB::get_results($query);
       }
    
       public function top_pilot_hours($month, $year, $howmany)    {
           $query = "SELECT * FROM top_flights WHERE month='$month' AND year='$year' ORDER BY hours DESC LIMIT $howmany";
    
           return DB::get_results($query);
       }
    
       public function top_pilot_miles($month, $year, $howmany)    {
           $query = "SELECT * FROM top_flights WHERE month='$month' AND year='$year' ORDER BY miles DESC LIMIT $howmany";
    
           return DB::get_results($query);
       }
    
       public function alltime_flights ($howmany)  {
           $query = "SELECT pilotid, totalflights FROM phpvms_pilots ORDER BY totalflights DESC LIMIT $howmany";
    
           return DB::get_results($query);
       }
    
       public function alltime_hours ($howmany)  {
           $query = "SELECT pilotid, totalhours FROM phpvms_pilots ORDER BY totalhours DESC LIMIT $howmany";
    
           return DB::get_results($query);
       }
    }
    

  2. You can search in the forums here, the code for % complete is in here. Then you need to change the map icons 365 of them lol well you can skip 5 degrees or so, to get an idea take a look in to the lib/images/inair.

  3. Hey,

    I have been messing about for a while and cant get it to work, brain has totally fried now.

    This is what i currently have which is not right but it does work,

    echo "<td align=center> <a href=\"../index.php/pireps/view/$pirep->pirepid\"/> $pirep->code$pirep->flightnum </a> </td>";
    

    So when i change it to the below the url works fine but i can seem to echo out the variable to display the EZY flight number all i get in the table is the code $pirep->code$pirep->flightnum.

    echo '<td align=center> <a href='.SITE_URL.'/index.php/pireps/view/'.$pirep->pirepid.'/>$pirep->code$pirep->flightnum </a> </td>';

    Help would be greatly appreciated from one of you experts :)

    Cheers.

  4. Change your password now as everyone knows it.

    Make sure the user has all the permissions to access the database, Also if you just moving you don't need to recreate the database just import the old one using phpmyadmin or the command line.

  5. Its a bit of a grey area, some VA's use time acceleration and some don't, all VA's are different the main point is that only the actual hours flown is recorded to the pilots profile not the scheduled hours.

    There is something that can be done, we use it on another VA, the tracking system detects time acceleration and resets the sim back to x1 normal rate, im sure Jeff could add this to the custom kACARS program.

  6. Some finance data ie pilot pay seems screwed when you do a reset finances, Stats data total flights and total hours need rounding.

    Groups and group login permissions don't seem to work.

    Off the top of my head that's about it for the time being.

  7. <?php Screenshots::show_newest_screenshot(); ?>

    Go to the template code and redefine the size in there. screenshots_new.tpl

    Please just use the search, you can answer all your questions as they are all in this forum. We have all come across most problems with solutions posted.

    • Like 2
  8. You could use jquery as a popup, or just code it up to display in its own page like, its something that i meant to do but never had the time really.

    $pilot = PilotData::getPilotData($screenshot->pilot_id);
    echo '<b>Random Screenshot!</b><br /><a href="'.SITE_URL.'/pics/'.$screenshot->file_name.'" target="_blank"><img src="'.SITE_URL.'/pics/'.$screenshot->file_name.'" alt="Random Screenshot" width="180px" height="125px" border="0" /></a>                <br />Submitted By '.$pilot->firstname.' - '.PilotData::GetPilotCode($pilot->code, $screenshot->pilot_id)
       .'<br />On - ';
    echo $date;
    ?>
    
    

    That code belongs in the Screenshots>screenshots_random.tpl in your skins folder.

    As you can see you can define the initial smaller dimensions and when you click the image it will open up full size on its own page.

×
×
  • Create New...