Jump to content

Daniboi

Members
  • Posts

    35
  • Joined

  • Last visited

Posts posted by Daniboi

  1. On 11/15/2016 at 4:25 PM, Parkho said:

    I have created a new tab version for Toppilot itself. Please download and replace the template files and download and add JS, CSS files. Don't forget to add the following to your layout.php

     

    
    <script type="text/javascript" src="<?php echo fileurl('lib/js/toppilot.js');?>"></script>
    <link rel="stylesheet" href="<?php echo fileurl('lib/css/toppilot.css');?>" />
    
     

     

    between <head></head> tags.

    Cheers

    Screenshots

    tp1.png

    tp2.png

    tp3.png


    Where can I download the JS and CSS files @Parkho?

  2. This is the code in PIREPData.class.php:

     

      public static function getLastReports($pilotid, $count = 1, $status = '') {
    
            if($pilotid == '') {
                return false;
            }
    
            $sql = 'SELECT * FROM ' . TABLE_PREFIX . 'pireps
    					WHERE pilotid=' . intval($pilotid);
    
            # Check it via the status
            if ($status != '') {
                $sql .= ' AND accepted=' . intval($status);
            }
    
            $sql .= ' ORDER BY submitdate DESC
    					LIMIT ' . intval($count);
    
            if ($count == 1) return DB::get_row($sql);
            else  return DB::get_results($sql);
        }

     

  3. 26 minutes ago, PikoSim said:

    Could be your id code id wrong. Can you check what result it is giving by using this

     

    <?php echo json_encode($pilot) ?> 

     

    if it is giving a result then probably you can use the object it is returning

     

    Am I going to add that in the pilot_public_profile.php file?

  4. Hello once again!

    Today, I got a problem because I want to view 5 most recent flights for a pilot in the pilot_public_profile.php file.

     

    this is what I tried to add, but didn’t work, I just got a emty Array of the flights:

    <?php echo PIREPData::getLastReports($pilot->pilotid, 5, PIREP_ACCEPTED);

    The $pilot variable is the variable that is Main used in the file.

×
×
  • Create New...