Exemplo n.º 1
0
 if ($gateway_data['paypal_required'] == 1 && empty($_POST['TPL_pp_email'])) {
     $missing['paypal'] = true;
 }
 if ($gateway_data['authnet_required'] == 1 && (empty($_POST['TPL_authnet_id']) || empty($_POST['TPL_authnet_pass']))) {
     $missing['authnet'] = true;
 }
 if ($gateway_data['moneybookers_required'] == 1 && (empty($_POST['TPL_moneybookers_email']) || !preg_match('/^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9-]+([\\.][a-z0-9-]+)+$/i', $_POST['TPL_moneybookers_email']))) {
     $missing['moneybookers'] = true;
 }
 if ($gateway_data['toocheckout_required'] == 1 && empty($_POST['TPL_toocheckout_id'])) {
     $missing['toocheckout'] = true;
 }
 if ($gateway_data['worldpay_required'] == 1 && empty($_POST['TPL_worldpay_id'])) {
     $missing['worldpay'] = true;
 }
 if (checkMissing()) {
     $ERR = $ERR_047;
 }
 if (!isset($ERR)) {
     $birth_day = isset($_POST['TPL_day']) ? $_POST['TPL_day'] : '';
     $birth_month = isset($_POST['TPL_month']) ? $_POST['TPL_month'] : '';
     $birth_year = isset($_POST['TPL_year']) ? $_POST['TPL_year'] : '';
     $DATE = $birth_year . $birth_month . $birth_day;
     if ($system->SETTINGS['spam_register'] == 2) {
         $resp = recaptcha_check_answer($system->SETTINGS['recaptcha_private'], $_SERVER['REMOTE_ADDR'], $_POST['recaptcha_challenge_field'], $_POST['recaptcha_response_field']);
     }
     if ($system->SETTINGS['spam_register'] == 2 && !$resp->is_valid) {
         $ERR = $MSG['752'];
     } elseif ($system->SETTINGS['spam_register'] == 1 && !$resp->check($_POST['captcha_code'])) {
         $ERR = $MSG['752'];
     } elseif (strlen($_POST['TPL_nick']) < 6) {
Exemplo n.º 2
0
 }
 if (empty($_POST['TPL_zip']) && $MANDATORY_FIELDS['zip'] == 'y') {
     $missing['zip'] = true;
 }
 if (empty($_POST['TPL_phone']) && $MANDATORY_FIELDS['tel'] == 'y') {
     $missing['tel'] = true;
 }
 if ((empty($_POST['TPL_day']) || empty($_POST['TPL_month']) || empty($_POST['TPL_year'])) && $MANDATORY_FIELDS['birthdate'] == 'y') {
     $missing['birthday'] = true;
 }
 foreach ($gateway_data as $gateway) {
     if ($gateway['gateway_required'] == 1 && isset($_POST[$gateway['name']]['address']) && empty($_POST[$gateway['name']]['address'])) {
         $missing[$gateway['name']] = true;
     }
 }
 if (checkMissing($missing)) {
     $ERR = $ERR_047;
 }
 if ($system->SETTINGS['wordsfilter'] == 'y') {
     if ($_POST['TPL_nick'] != $system->filter($_POST['TPL_nick'])) {
         $ERR = $MSG['wordfilter_banned_username'];
         // User name altered by word filter
     }
 }
 if (!isset($ERR)) {
     $birth_day = isset($_POST['TPL_day']) ? $_POST['TPL_day'] : '';
     $birth_month = isset($_POST['TPL_month']) ? $_POST['TPL_month'] : '';
     $birth_year = isset($_POST['TPL_year']) ? $_POST['TPL_year'] : '';
     $DATE = $birth_year . $birth_month . $birth_day;
     if ($system->SETTINGS['spam_register'] == 2) {
         $recaptcha_response = isset($_POST['g-recaptcha-response']) ? $_POST['g-recaptcha-response'] : '';