Example #1
0
 function checkCaptcha(&$provided_required, &$missing)
 {
     global $mosConfig_absolute_path;
     $securityimages4 = $mosConfig_absolute_path . '/administrator/components/com_securityimages/server.php';
     $securityimages5 = $mosConfig_absolute_path . '/plugins/system/securityimages.php';
     $checkSecurity = true;
     $packageName = 'securityVMRegistrationCheck';
     if (file_exists($securityimages4)) {
         include_once $securityimages4;
         $security_refid = vmGet($_POST, $packageName . '_refid');
         $security_try = vmGet($_POST, $packageName . '_try');
         $security_reload = vmGet($_POST, $packageName . '_reload');
         $checkSecurity = checkSecurityImage($security_refid, $security_try);
     } else {
         if (file_exists($securityimages5)) {
             global $mainframe;
             $security_try = vmGet($_POST, $packageName . '_try');
             $mainframe->triggerEvent('onSecurityImagesCheck', array($security_try, &$checkSecurity));
         }
     }
     if (!$checkSecurity) {
         $provided_required = false;
         $missing .= $field->name . ",";
     }
 }
Example #2
0
        $objMyForm->securityImageHelp = $form_data->securityHelpText;
        if ($objMyForm->formSubmited()) {
            if (isset($_REQUEST['PFSecurity_refid'])) {
                $security_refid = $_REQUEST['PFSecurity_refid'];
                $security_try = $_REQUEST['PFSecurity_try'];
                $security_reload = $_REQUEST['PFSecurity_reload'];
                if ($pfDebug) {
                    echo "<h1>1REFID: {$security_refid}</h1>";
                    echo "<h1>1TRY: {$security_try}</h1>";
                    echo "<h1>1RELOAD: {$security_reload}</h1>";
                }
                //$securityOK = checkSecurityImage($security_refid, $security_try);
                if (!isset($securityImagesLet3rdpartyOverideChoosenPlugin)) {
                    $securityImagesLet3rdpartyOverideChoosenPlugin = false;
                }
                $securityOK = @checkSecurityImage($security_refid, $security_try, $security_reload);
                if (!$securityOK) {
                    unset($_REQUEST['submit']);
                    $objMyForm->securityImageError = $form_data->securityErrorText;
                } else {
                    $objMyForm->securityImageError = "";
                }
            }
        }
    }
}
$objMyForm->strSkin = $mosConfig_absolute_path . "/components/com_performs/skins/{$theme}/tpl_form.html";
$objMyForm->replaceSubmitButton = $form_data->replaceSubmitButton;
$objMyForm->submitImageUrl = $form_data->submitImageUrl;
$objMyForm->submitImageWidth = $form_data->submitImageWidth;
$objMyForm->submitImageHeight = $form_data->submitImageHeight;