Jump to content

Cor

Members
  • Posts

    280
  • Joined

  • Last visited

Posts posted by Cor

  1. 7 hours ago, ProAvia said:

     

    BINGO!!!

     

    Look in your server logs and find the IP addresses behind these registrations - and if you choose, block them.

     

    That is a solution if you have 1 a week orso, but if you have around 20 till 40 a week, you get a little bit tired of it and

    I am looking for a way that if people "choosing" Afghanistan that it will be treated as spam.

     

    I already blocked a range of IP addresses it getting ridiculous 

  2. Hi,

    I have copied it except for this part

    8 hours ago, shakamonkey88 said:

    //Google reCaptcha //updated to Google noCaptcha 1/15 $resp = null; $reCaptcha = new ReCaptcha(RECAPTCHA_PRIVATE_KEY); // Was there a reCAPTCHA response? if ($_POST["g-recaptcha-response"]) { $resp = $reCaptcha->verifyResponse( $_SERVER["REMOTE_ADDR"], $_POST["g-recaptcha-response"] ); } //check if reCaptcha response was valid if ($resp == null) { $error = true; $this->set('captcha_error', 'reCaptcha Validation Error'); } //end Google reCaptcha

    that gave an error 🙂

    I then tried to register with an E-mail adres that was used for the spam and it still just register despite the outcome was if you put the url in another browser

    Quote

    <response success="true"> <type>email</type> <appears>yes</appears> <lastseen>2019-11-28 03:26:30</lastseen> <frequency>1</frequency> <type>ip</type> <appears>no</appears> <frequency>0</frequency> </response>

    So I am a little lost now 🙄

    Regards,

    Cor

     

  3. This is how I have it now:

     

    /**
         * Registration::ProcessRegistration()
         *
         * @return
         */
        protected function ProcessRegistration()
        {
        
               // Yes, there was an error
            if(!$this->VerifyData()) {
                $this->ShowForm();
                return;
            }
            
            $vbv="VBV";
            
            $data = array(
                'firstname' => $this->post->firstname,
                'lastname' => $this->post->lastname,
                'email' => $this->post->email,
                'password' => $this->post->password1,
                'code' => $vbv,
                'location' => $this->post->location,
                'hub' => $this->post->hub,
                'confirm' => false
            );
            
        
            if(CodonEvent::Dispatch('registration_precomplete', 'Registration', $_POST) == false) {
                return false;
            }
            
                    // Check email for known spammer
    $url = 'http://www.stopforumspam.com/api?email='.$data['email'].'&ip='.$_SERVER['REMOTE_ADDR'];
    $file = new CodonWebService();
    $contents = $file->get($url);
    $response = simplexml_load_string($contents);
    $reject = FALSE;
    foreach($response->appears as $row)
    {
        if($row == 'yes'){$reject = TRUE;}
    }
    if($reject == TRUE){
            $this->set('message', 'Your email or IP address appears on our spam database, we therefore assume
                you are a spammer and are rejecting your registration request. If you feel this is incorrect please contact us.');
            $this->render('core_error.tpl');
            //send email that spam registration rejected
            $email = 'your email here';
            $sub = 'Spam Registration Rejected';;
            $message = 'Spam pilot registration rejected using email '.$data['email'].' and
                IP address '.$_SERVER['REMOTE_ADDR'].' on '.date('m/d/Y', time()).' at '.date('g:ia', time());
            Util::SendEmail($email, $sub, $message);
    return false;
    }
    //end spam check
            

            $ret = RegistrationData::CheckUserEmail($data['email']);

            if($ret) {
                $this->set('error', Lang::gs('email.inuse'));
                $this->render('registration_error.tpl');
                return false;
            }

  4. 8 hours ago, Cor said:

    Did you further testing and while on the page the board is empty, see picture. The source of the page is looking like this:

    So the data is getting updated but after the refreshing it is not showing up in the flightboard. It only shows up the first tume you open the page.

    Getting confussed 

    Happy sunday

    Cor

     

    Correction,

    The data is refreshed only it shows up in black characters, so no splitflap animation.

    The only way to keep it running is a total refresh of the page.

    Regards,

    Cor

  5. Did you further testing and while on the page the board is empty, see picture. The source of the page is looking like this:

    Quote

    <div id="fboard"><table class="profile">

    <script type="text/javascript" src="https://www.virtual-classics.com/lib/js/jquery.splitflap.js"></script>

    <script type="text/javascript" src="https://www.virtual-classics.com/lib/js/coolclock.js"></script>

    <script type="text/javascript" src="https://www.virtual-classics.com/lib/js/moreskins.js"></script>

    <script type="text/javascript" src="https://www.virtual-classics.com/lib/js/excanvas.js"></script>

    <div style="background:#444;color:#fff;margin:0;padding:5px">

    <img src="https://www.virtual-classics.com/lib/images/jaratinfo.gif" style="height:40px;float:left" alt=""/>

    <span style="font-size: 18px;padding:9px 0 9px 15px;font-weight: bold;display:inline-block">Flightboard Virtual Classics VA</span>

    <canvas id="c1" style="float: right" class="CoolClock:terminalClock:20:noSeconds" width="20" height="20" style="width: 20px; height: 20px;"></canvas>

    </div>

    <table style="text-align:center; background:#222; width: 100%">

    <thead>

    <tr style="background:#444;color:#fff">

    <th>Arr.Time</th>

    <th>Callsign</th>

    <th>Dep</th>

    <th>Arr</th>

    <th>Pilot</th>

    <th>Aircraft</th>

    <th>Status</th>

    </tr>

    </thead>

    <tbody>

    <tr>

    <td width="5%" class="flightboard">1005</td>

    <td width="10%"class="flightboard">VB72120</td>

    <td width="7%" class="flightboard">VYYY</td>

    <td width="7%" class="flightboard">VTBD</td>

    <td width="31%" class="flightboard">Nico Knol</td>

    <td width="7%" class="flightboard">B738</t d>

    <td width="38%" class="flightboard">Boarding</td>

    </tr>

    </tbody>

    <tr>

    <td width="5%" class="flightboard">1006</td>

    <td width="10%"class="flightboard">VBV298</td>

    <td width="7%" class="flightboard">EHAM</td>

    <td width="7%" class="flightboard">LEBB</td>

    <td width="31%" class="flightboard">Pieter Veelo</td>

    <td width="7%" class="flightboard">B738</t d>

    <td width="38%" class="flightboard">Boarding</td>

    </tr>

    </tbody>

    <tr>

    <td width="5%" class="flightboard">1007</td>

    <td width="10%"class="flightboard">VBV6LR</td>

    <td width="7%" class="flightboard">EGKK</td>

    <td width="7%" class="flightboard">ELLX</td>

    <td width="31%" class="flightboard">Cor de Bruin</td>

    <td width="7%" class="flightboard">A319</t d>

    <td width="38%" class="flightboard">Preflight</td>

    </tr>

    </tbody>

    <tr>

    <td width="5%" class="flightboard">1049</td>

    <td width="10%"class="flightboard">VBV307</td>

    <td width="7%" class="flightboard">EHAL</td>

    <td width="7%" class="flightboard">EHMZ</td>

    <td width="31%" class="flightboard">Jaap Den Ouden</td>

    <td width="7%" class="flightboard">DC3</t d>

    <td width="38%" class="flightboard">Cruise</td>

    </tr>

    </tbody>

    <table style="text-align:center; background:#222; width: 100%">

    <thead>

    <tr style="background:#444;color:#fff">

    <td style="font-size: 18px;padding:9px 0 9px 15px;font-weight: bold;display:inline-block float: left">V-Bird VA group</td>

    </tr>

    </table>

    <script>

    (function ($) {

    $(document).ready(function () {

    var ratio = 0.235;

    $('.flightboard')

    .splitFlap({

    image: '/lib/images/chars.png',

    speed: 10, // letter/sec

    speedVariation: 2,

    charWidth: 50 * ratio,

    charHeight: 100 * ratio,

    imageSize: (2500 * ratio) + 'px ' + (100 * ratio) + 'px'

    });

    });

    })(jQuery);

    </script>

    </div>

    So the data is getting updated but after the refreshing it is not showing up in the flightboard. It only shows up the first tume you open the page.

    Getting confussed 

    Happy sunday

    Cor

     

  6. 5 hours ago, mark1million said:

    If i remember right what i did was put the flightboard code on a separate php page so in the root of your install, then all i did was include that page where i wanted the flight board to show up.

     

    I put the include in a div and used javascript to auto refresh it.

     

    So in my case it was this at the top of the page frontpage_main.php

     

    <script type="text/javascript">
    setInterval(function() {
        $("#fboard").load(location.href+" #fboard>*","");
    }, 60000);
    </script>
     

    And where i wanted the flight board to show up,

     

    <div id="fboard"><?php include 'flightboard.php';?></div>

     

    Hope that helps.

     

    Hi @mark1million,

     

    It is refreshing but when it has refreshed the flightboard is empty 😞

    Close but not yet 🙂

    Regards,

    Cor

  7. 7 hours ago, mark1million said:

    Hey Cor are you looking for just the flights in your acars system or something else?

     

    If its just on your site i can supply you with some code no problem, I have the two boards on my sites.

     

    jetva.co.uk and tuivirtual.com

    Goodmorning @mark1million,

    Yes just for the flights in my acarssystem and just on my site as a replacemnet flightboard for the Flash one.

    Appriciate your help.

    Regards,

    Cor

     

  8. This is de code in the frontpage.tpl

     

    Quote

    <?php
       
        $acarsdata = ACARSData::GetACARSData();
          
       usort ($acarsdata , function($a, $b)
      {
        return strcmp($a->arrtime, $b->arrtime);
      });
        if($acarsdata == '') {
        ?>
        <td class="flightboard"><?php echo "There are no live flights now!"?></td>
        <tr></tr>
        <tr></tr>
        <tr></tr>
        <tr></tr>
        <tr></tr>
        <tr></tr>
        <td class="flightboard"><?php echo "Join the V-Bird VA Group"?></td>
        <tr></tr>
        <tr></tr>
        <tr></tr>
        <tr></tr>
        <tr></tr>
        <tr></tr>
        <td class="flightboard"><?php echo "www.vbirdva.com"?></td>
        <tr></tr>
        <tr></tr>
        <tr></tr>
        <tr></tr>
        <tr></tr>
        <tr></tr>
        <td class="flightboard"><?php echo "Dare to be Different!!!"?></td>
        <tr></tr>
        <tr></tr>
        <tr></tr>
        <tr></tr>
        <tr></tr>
        <tr></tr>
        <?php
     }    
        else

        foreach($acarsdata as $flight) {
      ?>
    <tr>
    <td width="5%" class="flightboard"><?php echo date("Hi", strtotime($flight->arrtime)) ?></td>
    <td width="10%"class="flightboard"><?php echo $flight->flightnum  ?></td>
    <td width="5%" class="flightboard"><?php echo $flight->depicao ?></td>
    <td width="5%" class="flightboard"><?php echo $flight->arricao ?></td>
    <td width="5%" class="flightboard"><?php echo $flight->aircraft ?></t d>
    <td width="35%" class="flightboard"><?php echo $flight->pilotname ?></td>
    <td width="40%" class="flightboard"><?php echo $flight->phasedetail ?></td>
    </tr>
    </tbody>
    <?php
    }
    }
    ?>
    </table>
       <script>
        (function ($) {
            $(document).ready(function () {
                   var ratio = 0.235;
                $('.flightboard')
                        .splitFlap({
                            image: '/lib/images/chars.png',
                            speed:          10,    // letter/sec
                            speedVariation: 2,
                            charWidth:  50 * ratio,
                            charHeight: 100 * ratio,
                            imageSize:  (2500 * ratio) + 'px ' + (100 * ratio) + 'px'
                        });
            });
        })(jQuery);
    </script>

     

  9. On 9/18/2019 at 8:41 PM, Cor said:

    Hi  @LeonardIGO4036

    Tried to find something about AJAX on this forum but that did not work so that is something I culd use some help with.

    Also the sortingpart I need to look into as i want the list in order of the arrival time.

    As a middle aged man and no really programming skills I already am pleased that I have come this far with help

    from you and Jim.

    Any further help is appriciated.

    Regards,

    Cor

     

    Also the sortingpart I need to look into as i want the list in order of the arrival time. - DONE 🙂

  10. On 9/17/2019 at 8:30 PM, LeonardIGO4036 said:

    Looks crazy @Cor. Good job. 

    To update the flight boards dynamically, use JS & AJAX. Set the code to load information from a url and parse it into the board, additionally add a "SetInterval" function with a custom time frame on JS so that the code refreshes accordingly. 

    Let me know if you need any help ;)

    Cheers! 

    Hi  @LeonardIGO4036

    Tried to find something about AJAX on this forum but that did not work so that is something I culd use some help with.

    Also the sortingpart I need to look into as i want the list in order of the arrival time.

    As a middle aged man and no really programming skills I already am pleased that I have come this far with help

    from you and Jim.

    Any further help is appriciated.

    Regards,

    Cor

     

  11. 3 hours ago, LeonardIGO4036 said:

    Hey @Cor, Any luck yet? I've done this way looooong back for a project. I can't share the exact code here cuz the client paid for it....but I sure can help.
    As far as I can recollect, if you can get splitflap.js to work on your crew side / website without any issues, all that is left would be to pass on some variables using the help of a little php. 

    
    <?php 
    	// First, let's get the ACARS data from phpVMS
    	$acarsdata = ACARSData::GetACARSData(); 
    	
    	//Checking if the data is empty and showing a message 
    	if($acarsdata == '') {
    	echo "Whoops, there are no live flights now!";
    	} else {
    		foreach($acarsdata as $flight) {
     			echo $flight->code.$flight->flightnum; // Displays flight number eg: VMS1024F
    			echo $flight->depicao; // Displays the departure ICAO code
    			echo $flight->arricao; // '' Arrival ICAO code
    			echo $flight->phasedetail; // Phase detail-> Boarding, Take-off, Climb etc.			
    		}			
    	}
    ?>

     

    So, if you can insert this piece of code in your page where you have splitflap.js working, you can get the acars data from phpVMS and display it there. 
    Use <?php ?> tags to break the php code where ever necessary so that you're able to format the code with HTML to make it work with the split flap. 

    I know this was a bit bare bones, but let me know how it goes. 

    P.S Emphasizing on "Live Free or Die" @Heritage1, I'd like to add something which I found on the internet a long time ago, a quote from this site, which reads 
     

    Hoping things become better for people who seek help from this forum. 
    Cheers, 
    Leonard.

    Hey @LeonardIGO4036

    I have made some progress see https://www.virtual-classics.com.(second website we have)  I need to tweak it still a little bit and also see how it can automaticly update the board. But for a few hours playing with it I am happy with the result so far 🙂

    Regards,

    Cor

  12. Hi Jim,

    I hope you are staying because we need some people who are willing to help others and I still can use some help. I do not know who is giving shakamonkey88 the moderatorship but

    I will sent a mail to Nabeel. I do not know how old shakamonkey88 is but this is not the way to moderate as I now aware that he did this already four times to you.

    This use to be a good place to get your info. Guess it is not anymore.

    If you would help me splitflap I would appriciate this.

    Regards,

    Cor

     

  13. On 9/8/2019 at 10:50 PM, shakamonkey88 said:

    People should just not use flash on their site at all.  Period. And it isn't just Google Chrome Jim, it is also Mozilla too.  Hell, even Adobe themselves are killing off flash next year.  C'mon guys, move on from flash already!

    Yep I will as soon as I have a replacement 😂😂

  14. On 3/13/2017 at 4:22 PM, Tummi said:
    
    Fatal error: Uncaught exception 'Exception' with message 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's message inbox on 03/13/2017', '2', '1489418110')' at line 2' in /home/oneengin/public_html/core/common/MailData.class.php:92 Stack trace: #0 /home/oneengin/public_html/core/modules/Mail/Mail.php(138): MailData::send_new_mail('2', '1', 'VA Discounts', 'You received a ...', 2, 1489418110) #1 /home/oneengin/public_html/core/modules/Mail/Mail.php(38): Mail->send() #2 [internal function]: Mail->index() #3 /home/oneengin/public_html/core/classes/MainController.class.php(218): call_user_func_array(Array, Array) #4 /home/oneengin/public_html/index.php(70): MainController::RunAllActions() #5 {main} thrown in /home/oneengin/public_html/core/common/MailData.class.php on line 92

     

    after sending an airmail to all Pilots...

    Did this problem get solved? And how?

     

    Regards,


    Cor

  15. Hello,

    Just updated the server to Debian 9 and PHP 5.6.34 and now I have a problem that my manual pireps will not save and I also did a test with Kacars and also those pireps won´t

    save. Does anyone has does problems too and how do I solve them :-)

     

    Regards,


    Cor

×
×
  • Create New...