Jump to content

mark1million

Moderators
  • Posts

    2283
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by mark1million

  1. I know why you did it to make then required fields but that could have been accomplished another way.

    Echo out your array to see what data is being passed, then you will have some idea whats going on, also check the insert query has not been overwritten and is still capable of being passed to the db.

    Core>Common>RegistrationData.class.php

  2. Core>Modules

      //Whenever your pages are public, you could be running into a risk of bots exessively running this page.
      //This page has tons of queries to run to return the real-time stats, if I were you, I would require login first as it's already done for you.
      if (!Auth::LoggedIn()) {
    	    $this->set('message', 'You must be logged in to view this page!');
    	    $this->render('core_error.tpl');
    	    return;
        }
    

  3. Ok so first thing call the page directly in your browser to see if it works, then you can add it as a cron or a timed script, there are other ways to get that to run without a cron if you dint have access.

  4. This should be your table structure,

    
    CREATE TABLE IF NOT EXISTS `phpvms_schedules` (
     `id` int(11) NOT NULL AUTO_INCREMENT,
     `code` char(3) NOT NULL DEFAULT '',
     `flightnum` varchar(10) NOT NULL DEFAULT '0',
     `depicao` varchar(4) NOT NULL DEFAULT '',
     `arricao` varchar(4) NOT NULL DEFAULT '',
     `route` text NOT NULL,
     `route_details` text NOT NULL,
     `aircraft` text NOT NULL,
     `flightlevel` varchar(6) NOT NULL,
     `distance` float NOT NULL DEFAULT '0',
     `deptime` varchar(15) NOT NULL DEFAULT '',
     `arrtime` varchar(15) NOT NULL DEFAULT '',
     `flighttime` varchar(8) NOT NULL,
     `daysofweek` varchar(7) NOT NULL DEFAULT '0123456',
     `week1` varchar(7) NOT NULL DEFAULT '0123456',
     `week2` varchar(7) NOT NULL DEFAULT '0123456',
     `week3` varchar(7) NOT NULL DEFAULT '0123456',
     `week4` varchar(7) NOT NULL DEFAULT '0123456',
     `price` float NOT NULL,
     `payforflight` float NOT NULL DEFAULT '0',
     `flighttype` varchar(1) NOT NULL DEFAULT 'P',
     `timesflown` int(11) NOT NULL DEFAULT '0',
     `notes` text NOT NULL,
     `enabled` int(11) NOT NULL DEFAULT '1',
     `bidid` int(11) NOT NULL DEFAULT '0',
     PRIMARY KEY (`id`),
     KEY `depicao` (`depicao`),
     KEY `flightnum` (`flightnum`),
     KEY `depicao_arricao` (`depicao`,`arricao`),
     KEY `code` (`code`)
    ) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2684 ;
    

    Just watch that auto increment at the end there, that will be different for you.

  5. Ok so in your database do you have the columns there for weeks?

    Also in your admin schedules template do you have it there and finally in the operations data class file is it in the array there. (Just going from memory may be wrong filename)

  6. HI Roger yes it wasn't specific to kACARS it was when any pirep was filed.

    I tracked it down to the top pilot module, I think David was going to release a fix for it not sure if he updated or not yet.

    Basically this is what i did, removed the listener >Core>Modules>TopPilot like this at the top section,

    
    <?php
    //by:simpilot
    //www.simpilotgroup.com
    
    class TopPilot extends CodonModule {
    
    public $title = 'Top Pilots';
    
    //public function __construct() {
    // CodonEvent::addListener('TopPilot', array('pirep_filed'));
    //}
    public function EventListener($eventinfo) {
    if($eventinfo[0] == 'pirep_filed') {
    self::refresh_pilot_stats();
    }
    }
    
    

    Then i put that function in to a php file in the admin directory,

    
    <?php
    
    define('ADMIN_PANEL', true);
    include dirname(dirname(__FILE__)).'/core/codon.config.php';
    Auth::$userinfo->pilotid = 0;
    /*
    error_reporting(E_ALL);
    ini_set('display_errors', 'on');
    */
    set_time_limit(0);
    ini_set('memory_limit', '-1');
    
    TopPilot::refresh_pilot_stats();
    echo 'Top Pilot Stats Updated';
    
    ?>
    

    Then set up the cron the same way as its usually run for maintenance.

    php -f /srv/www/xxx/xxx/admin/YOUR_FILE_NAME.php

    Just change the YOUR_FILE_NAME.php to whatever you call the file you create and should be good to go.

  7. This is what i use,

    
    <?php
    
    define('ADMIN_PANEL', true);
    include dirname(dirname(__FILE__)).'/core/codon.config.php';
    Auth::$userinfo->pilotid = 0;
    /*
    error_reporting(E_ALL);
    ini_set('display_errors', 'on');
    */
    set_time_limit(0);
    ini_set('memory_limit', '-1');
    
    TopPilot::refresh_pilot_stats();
    echo 'Top Pilot Stats Updated';
    
    ?>
    

  8. Yes there is, i done it with my lot a while ago through phpmyadmin, i cant remember the exact query now but do a backup of that table just incase things get screwed, they you can restore if it goes wrong.

    You can use wild cards so,

    DELETE FROM `phpvms_airports`

    WHERE `icao` =LP**

    Something like that "NOT TESTED" so make sure you test first

  9. Please read the forums, i see you have made 42 poists i think they are all here with bumping the topic.

    Take some time to have a read through the forum categories, their are only beta releases currently being worked on so you will probable have the most current version unless you are running on a beta release.

    There is a line in the config file to enable notification about updates.

  10. Hey Mark,

    My module does not count any rejected PIREPS because I think they aren't worh it for the stats since its rejected.

    So that's why it may be slightly different than other stats type modules.

    Yeah i seen that in the query, thats why i said about the hours difference between top pilots data and yours.

×
×
  • Create New...