Plugin Directory

Changeset 2932294


Ignore:
Timestamp:
06/29/2023 01:22:57 PM (3 years ago)
Author:
nickjamescom
Message:

Resolved the Google reCAPTCHA Bug

Location:
apm-child/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • apm-child/trunk/mc-main.php

    r2932284 r2932294  
    99Author: Nick James
    1010E-mail: admin@nickjamesadmin.com
    11 Version: 3.6
     11Version: 3.6.1
    1212Author URI: http://www.pluginpixie.com
    1313*/
    1414
    1515global $APM_SUBSCRIPTION_VER;
    16 $APM_SUBSCRIPTION_VER = "3.6";
     16$APM_SUBSCRIPTION_VER = "3.6.1";
    1717
    1818define('APM_SUBSCRIPTION_PATH', plugins_url().'/'. basename(dirname(__FILE__)).'/');
  • apm-child/trunk/optin-monster-settings.php

    r2932284 r2932294  
    7373   
    7474
    75     $rand_num_one = mt_rand(1, 10);
    76     $rand_num_two = mt_rand(1, 10);
    77     $rand_symbol = "";
    78    
    79     if($rand_num_one > $rand_num_two)
    80     {
    81         $rand_symbol = "-";
    82     }
    83    
    84     if($rand_num_one < $rand_num_two)
    85     {
    86         $rand_symbol = "+";
    87     }
    88    
    89     if($rand_num_one == $rand_num_two)
    90     {
    91         $rand_symbol = "+";
    92     }
    93    
    94    
    95     //$user_task = '<div class="main_div" style="margin-bottom:15px;"><div class="rand_num">'.$rand_num_one .$rand_symbol.$rand_num_two .'=</div><div class="user_input"><input type="number" name="spam_check_input" value="" required="true" /></div></div>';
    96    
    97     $user_task = $rand_num_one .$rand_symbol.$rand_num_two;
    98 
    99      $apm_return_base_url = ( isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on' ? 'https' : 'http' ) . '://' .  $_SERVER['HTTP_HOST'];
    100      $apm_return_url = $apm_return_base_url . $_SERVER["REQUEST_URI"];
    101    
    102    
    103     $subscriber_first_name = $subscriber_email = $val_error_message = '';
    104    
    105     if(isset($_GET['nm']) && $_GET['nm'] != '')
    106     {
    107         $subscriber_first_name = addslashes_gpc(sanitize_text_field($_GET['nm']));
    108         $val_error_message = 'Incorrect answer to math question please try again!';
    109     }
    110    
    111     if(isset($_GET['em']) && $_GET['em'] != '')
    112     {
    113         $subscriber_email = addslashes_gpc(sanitize_email($_GET['em']));
    114     }
     75    /** Start Google reCAPTCHA coding **/
     76
     77    $url = "http://affiliatepromembership.com/wp-content/plugins/mi-email-subscribers/outside_requests.php";
     78   
     79    $postdata = array(
     80        'mode' => 'get_google_recaptcha',
     81        'aff_id' => $recordCrediantial['user_email_id']
     82    );
     83    $args = array(
     84        'body' => $postdata,
     85        'timeout' => 45,
     86        'redirection' => 5,
     87        'httpversion' => '1.0',
     88        'blocking' => true,
     89        'headers' => array(),
     90        'cookies' => array()
     91    );
     92   
     93   
     94    $response = wp_remote_post( $url, $args );
     95    $resultList = $response['body'];
     96    $resultList = json_decode($resultList);
     97   
     98    $recaptcha_site_key = $resultList->google_recaptcha_key;
     99   
    115100   
    116101?>
    117 <style>
    118     .main_div{
    119         display: flex;
    120         justify-content: center;
    121         align-items: center;
    122         margin-bottom:15px;
    123     }
    124    
    125     .user_input{
    126         width: 100px;
    127     }
    128    
    129     .user_input input{
    130         text-align: center;
    131         font-size: 30px;
    132         font-weight: 600;
    133         color: #333;
    134         padding: 0 !important;
    135         width: 80px !important;
    136     }
    137    
    138     .rand_num{
    139         font-size: 42px!important;
    140     }
    141    
    142 </style>
     102
    143103
    144104<script type="text/javascript">
     
    148108       
    149109       
    150         app.setCustomVariable('subscriber_first_name', '<?php echo $subscriber_first_name; ?>');
    151         app.setCustomVariable('subscriber_email', '<?php echo $subscriber_email; ?>');
    152        
    153        
    154110        app.setCustomVariable('account_id', '<?php echo esc_html($recordCrediantial['aweber_account_number'],'apm-child')?>');
    155111
     
    172128        app.setCustomVariable('duplicate_email', '<input type="hidden" name="duplicate_email" value="http://<?php echo esc_html($_SERVER['HTTP_HOST'],'apm-child')?>/aweber-subscription-failed" />');
    173129       
    174         app.setCustomVariable('recaptcha_sitekey', '<?php echo __($recaptcha_site_key, 'apm-child')?>');
     130        app.setCustomVariable('recaptcha_token', '<?php echo __($recaptcha_site_key, 'apm-child')?>');
    175131       
    176132
  • apm-child/trunk/readme.txt

    r2932284 r2932294  
    228228Added Google reCAPTCHA V3
    229229*Version update
     230
     2313.6.1
     232Bug Fixes
     233*Version update
Note: See TracChangeset for help on using the changeset viewer.