Jump to content

Sava

Members
  • Posts

    575
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Sava

  1. I added that to the code just minutes after initially posting, (as I also tried on a Linux server after the initial code dev on Windows) so I thought you included that but it seems you got my code before I updated it :) If you check, there is actually the strlower function already there :P

    • Like 1
  2. I am assuming you are gonna used this in the schedules so I am passing $route->depicao for the ICAO you want to search for. Change this to reflect your script if using anywhere else. ;)

    <?php
    $country = OperationsData::getAirportInfo($route->depicao); //or change to pass in the departure icao of the airport...
       	 $imgicao = array_search($country->country, Countries::$countries);
    ?>
    <img src="<?php echo SITE_URL;?>/lib/images/countries/<?php echo strlower($imgicao);?>.png" alt="<?php echo $imgicao;?>"
    

    the end result something like this for me ;)

    Vcifv8g.png

    • Like 3
  3. You can create an index function(method) with just code for displaying the form, and then make the form's action /module/newmethod

    And then do:

    Public function newmethod()

    {

    //do insert code here

    }

    hope you follow by now.

    The second option is to have the submit code in the index function as well but you need to include an if statement to see if the button has been pressed $this->post->submit should be what you are looking for.

    Look at my Hub Transfer or LoA modules that are just pure CRUD code, and you'll get an idea.

    Sorry for the format. Writing from the iPad.

  4. As far as I see it, you cannot change what is displayed, because it is calculated randomly taking into account the load factor and max pax inside kACARS. You can however change what is in the end sent into the DB.

    The $load variable you mentioned should be changed to anything you want. :)

    But I guess that is not what you need :)

  5. I am not sure I follow correctly, but you can only change what data is already being sent to kACARS.

    You are limited to what kACARS can already display within its fields.

    For example, when I modified how my schedules work, I modified the kACARS_Free.php file to send different data then it actually would with stock schedules - it sends the chosen a/c from the aircraft column in the bids table instead the one in the schedules. I also modified what you get when you click Get Aircraft.

    All interaction is done from that file.

    If you be more specific with what you need I can help out.

  6. Some people asked me questions and there seems to be a misunderstanding on what this module will do.

    It doesn't have any integration with paypal or anything like that. It allows pilots to purchase 'fake items' like Cars, houses or anything you add for a price that is taken from their vAccounts.

    All purchase items will be available on the pages of those pilots or anywhere you want.

    I am thinking of creating the possiblitty of also trading and selling items between pilots but that might come as some sort of Advanced version.

    Never the less, that is what the base version would cover. There isn't any connection to for example book a special aicraft for your own tour or something like that which some of you asked.

  7. While I am really not a fan of the layout you have, it looks nice. You might also want to disable the popup that is displayed when you right click. Quite annoying and it doesn't server any purpose since FF for exmaple has an option that says "Disable this page from making popups in the future". And in other browsers you can just use the menu to view the source.

    Nice site all in all.

    • Like 1
  8. You can block viewing of indexes and direct access to files.

    Add this to the .htaccess file.

    Options All -Indexes

    <FilesMatch "\.(htaccess|htpasswd|ini|phps|fla|psd|log|sh|tpl)$">

    Order Allow,Deny

    Deny from all

    </FilesMatch>

    Btw, if the server lets you actually DOWNLOAD .php files than apache or whatever you are running isn't set correctly and that is a big issue. ;)

×
×
  • Create New...