Jump to content

shiljo

Members
  • Posts

    88
  • Joined

  • Last visited

Posts posted by shiljo

  1. You can add this to your page:

    <?php
    $pilotid = Auth::$userinfo->pilotid;
    $report = PIREPData::getlasreports($pilotid, 1);
    $aircraft = OperationsData::getaircraftinfo($report->aircraft);
    ?>
    <table>
    <tr><td>Aircraft</td><td>Aircraft Location</td></tr>
    <tr><td><?php echo $aircraft->name ;?></td><td><?php echo $report->arricao ;?></td></tr>
    </table>
    

    You can add this to any page that you want. :D

    Here is my code of fleet page...can you give me hint what to edit???

    <h3>fleet</h3>
     </br>	
    <div class="CSSTableGenerator" >
    <table>
    
    <tr>
    <td><b>ICAO</b></td>
    <td><b>Type</b></td>
    <td><b>Registration</b></td>
    <td><b>Range</b></td>
    <td><b>Empty Weight</b></td>
    <td><b>Cruise Alt</b></td>
    <td><b>Cargo carried</b></td>
    <td><b>Total Hours</b></td>
    <td><b>Total Routes Flown</b></td>
    <td><b>Aircraft status</b></td>
    <td><b>Location</b></td>
    </tr>
    <?php $fleet = OperationsData::GetAllAircraft(); ?>
    <?php foreach ($fleet as $aircraft)
    {
    ?>
    <tr>
    <td><?php echo $aircraft->icao; ?> </td>
    <td><?php echo $aircraft->name; ?> </td>
    <td><?php echo $aircraft->registration; ?></td>
    <td><?php echo $aircraft->range; ?> </td>
    <td><?php echo $aircraft->weight; ?></td>
    <td><?php echo $aircraft->cruise; ?></td>
    <td><#></td>
    <td><?php echo $aircraft->totaltime; ?></td>
    <td><?php echo $aircraft->routesflown; ?></td>
    <td><#></td>
    <?php
    $params = (array('a.registration'=>$aircraft->registration, 'p.accepted'=>PIREP_ACCEPTED));
    $pirep = PIREPData::findPIREPS($params);
    $current_location = $pirep[0]->arricao;
    $current_location2 = $pirep[0]->arrname;
    ?>
    <td><?php echo $current_location.'-'.$current_location2; ?></td>
    </tr>
    <?php } ?>
    </table>
    </div>
    

    I am missing, caego carried...i dont know how to get that...status...GND, FLIGHT or RESERVED if possible and total time and routes flown...number of them...i have code for that inside, but i assume wrong one, doesnt show anything...thank you very much

  2. Thank you Parkho, but i want that to incorporate that shows last location of aircraft, together wizh all A/C data such as Type, REg, Hours Flown, routes flown, cargo carried, status (GND or flight or reserved)...etc...Thare has been one script...but i lost track of it...So if such thing exist i would be very preciated to have that code...:)

    Thank you very much

  3. It's called fleet table, sorry had the name wrong.

    <h1><?php echo SITE_NAME?>'s Fleet Information</h1>
    <table>
    <!-- Fleet Table Version 1.1.2 - fleet_table.tpl
    CHANGES FROM 1.1:
    Added image
    -->
    <table border="1">
    <thead>
    <tr>
    <td><b>Image</b></td>
    <td><b>ICAO</b></td>
    <td><b>Type</b></td>
    <td><b>Registration</b></td>
    <td><b>Range</b></td>
    <td><b>Empty Weight</b></td>
    <td><b>Cruise Alt</b></td>
    <td><b>Max Pax</b></td>
    <td><b>Max Cargo</b></td>
    <td><b>Total Hours</b></td>
    <td><b>Total Routes Flown</b></td>
    <td><b>Location</b></td>
    </tr>
    </thead>
    <tbody>
    <?php foreach ($fleet as $aircraft)
    {
    ?>
    <tr>
    <td><img src="<?php echo $aircraft->imageurl; ?>"></td>
    <td><?php echo $aircraft->icao; ?> </td>
    <td><?php echo $aircraft->name; ?> </td>
    <td><?php echo $aircraft->registration; ?></td>
    <td><?php echo $aircraft->range; ?> </td>
    <td><?php echo $aircraft->weight; ?></td>
    <td><?php echo $aircraft->cruise; ?></td>
    <td><?php echo $aircraft->maxpax; ?></td>
    <td><?php echo $aircraft->maxcargo; ?></td>
    <td><?php echo $aircraft->totaltime; ?></td>
    <td><?php echo $aircraft->routesflown; ?></td>
    <?php
    $params = (array('a.registration'=>$aircraft->registration, 'p.accepted'=>PIREP_ACCEPTED));
    $pirep = PIREPData::findPIREPS($params);
    $current_location = $pirep[0]->arricao;
    $current_location2 = $pirep[0]->arrname;
    ?>
    <td><?php echo $current_location.'-'.$current_location2; ?></td>
    </tr>
    <?php } ?>
    </tbody>
    </table>
    

    something wrong in script, it wont work on mine site...line 26 code wrong ;) it says...help?

  4. Thank you for great addon...one bug...i have cargo 737-700 and ftracker does count its opassangers not cargo, even if cargo is 0 in sql and in fleet admnin...hm...and somehow codes for tables doesnt apply to this one...im new in coding so any help will be pretiated...even i have also 777F and when i go to details of a/c its normally shows cargo carried...

    Thank you very much

  5. Well, now i cant login myself and i cant get password reminder...i did nothing wrong with files. And after adding airports, there are 2 airports in mysql with ids 1 and 12 and there are no airports on list in admin section...blank table...even pages shows 0 and nothing more...when i try to add again same airport from before and wich is not in mysql it also said allready added...something did mixed up..i will try reinstallation again...nothing i can do there i think...any suggestions<?

  6. Hi to all!

    Well as i started to adding airports, no possible. I added Config::Set('AIRPORT_LOOKUP_SERVER','geonames'); in local.config and after then it was, but just for LDZA it cant...i first have problem with this airport on adding... Can u help me ;)

    I just realise...on geonames, ldza is declared as airfield not an airport...how can i change to different search engine...maybe...or to change some settings to add airfield also...this is the problem im sure...

    Now i add from app.config to local this

    /* Can be 'geonames' or 'phpvms'.

    Geonames will use the geonames.org server to look up the airport info

    phpvms will use the phpVMS API server

    */

    Config::Set('AIRPORT_LOOKUP_SERVER', 'phpvms');

    Config::Set('PHPVMS_API_SERVER', 'http://api.phpvms.net');

    Config::Set('PHPVMS_NEWS_FEED', 'http://feeds.feedburner.com/phpvms');

    Config::Set('VACENTRAL_NEWS_FEED', 'http://feeds.feedburner.com/vacentral');

    Config::Set('GEONAME_API_SERVER', 'http://ws.geonames.org');

    And all airports have lost from admin page...but table in db is still there...any help? I did clearing cache and stuff, optimize tables and so...any suggestion?

  7. Hi Simpilot!

    I looked at your scripts and codes, and one thing is in my mind. Regarding that loop thing, so we can only make one loop with single aircraft...it is nonsense, but system works like that. Ok. BUT, if u change in codes that schedules are not shown by a/c id then by arricao maybe or something like that, so system will show all flights but sorted by arricao which are sorted by arrtime...so all flight will be in sight starting with first which comes earlier to destination and so...Is that possible? Im not so familliar with php coding, but my sense teel me something like that ;)

    cheers

  8. I cant get this right, allways having this warnings...

    Warning: Invalid argument supplied for foreach() in /home/croatia/public_html/russian/lib/skins/ObsessBlue/frontpage_main.tpl on line 68

    Warning: Invalid argument supplied for foreach() in /home/croatia/public_html/russian/lib/skins/ObsessBlue/frontpage_main.tpl on line 106

    Template iz in skin folder, is that have something to do because of dbase?

    Thank you

×
×
  • Create New...