<?php include '../lib/common.php'; $page_title = Lang::string('login-forgot'); $email1 = !empty($_REQUEST['forgot']['email']) ? preg_replace("/[^0-9a-zA-Z@\\.\\!#\$%\\&\\*+_\\~\\?\\-]/", "", $_REQUEST['forgot']['email']) : false; $captcha_error = false; if (!empty($_REQUEST['forgot']) && $email1 && $_SESSION["forgot_uniq"] == $_REQUEST['uniq']) { if (empty($CFG->google_recaptch_api_key) || empty($CFG->google_recaptch_api_secret)) { include_once 'securimage/securimage.php'; $securimage = new Securimage(); $captcha_error = empty($_REQUEST['forgot']['captcha']) || !$securimage->check($_REQUEST['forgot']['captcha']); } else { $captcha = new Form('captcha'); $captcha->reCaptchaCheck(1); if (!empty($captcha->errors) && is_array($captcha->errors)) { $captcha_error = true; Errors::add($captcha->errors['recaptcha']); } } if (!$captcha_error) { API::add('User', 'resetUser', array($email1)); $query = API::send(); Messages::$messages = array(); Messages::add(Lang::string('login-password-sent-message')); } else { Errors::add(Lang::string('login-capcha-error')); } } $_SESSION["forgot_uniq"] = md5(uniqid(mt_rand(), true)); include 'includes/head.php'; ?>
$_REQUEST['is_caco'] = !empty($_REQUEST['form_name']) && empty($_REQUEST['is_caco']) ? array('contact' => 1) : (!empty($_REQUEST['is_caco']) ? $_REQUEST['is_caco'] : false); } if (empty($_REQUEST['form_name'])) { unset($_REQUEST['contact']); } API::add('Content', 'getRecord', array('contact')); API::add('Content', 'getRecord', array('contact-small')); API::add('User', 'getCountries'); $query = API::send(); $content = $query['Content']['getRecord']['results'][0]; $content1 = $query['Content']['getRecord']['results'][1]; $page_title = $content['title']; $countries = $query['User']['getCountries']['results'][0]; $contact = new Form('contact', Lang::url('contact.php'), false, 'form2'); $contact->verify(); $contact->reCaptchaCheck(); if (!empty($_REQUEST['contact']) && (empty($_SESSION["contact_uniq"]) || $_SESSION["contact_uniq"] != $_REQUEST['contact']['uniq'])) { $contact->errors[] = 'Page expired.'; } if (!empty($_REQUEST['contact']) && is_array($contact->errors)) { $errors = array(); foreach ($contact->errors as $key => $error) { if (stristr($error, 'login-required-error')) { $errors[] = Lang::string('settings-' . str_replace('_', '-', $key)) . ' ' . Lang::string('login-required-error'); } elseif (strstr($error, '-')) { $errors[] = Lang::string($error); } else { $errors[] = $error; } } Errors::$errors = $errors;
include '../lib/common.php'; //$_REQUEST['register']['first_name'] = (!empty($_REQUEST['register']['first_name'])) ? preg_replace("/[^\pL a-zA-Z0-9@\s\._-]/u", "",$_REQUEST['register']['first_name']) : false; //$_REQUEST['register']['last_name'] = (!empty($_REQUEST['register']['last_name'])) ? preg_replace("/[^\pL a-zA-Z0-9@\s\._-]/u", "",$_REQUEST['register']['last_name']) : false; $_REQUEST['register']['country'] = !empty($_REQUEST['register']['country']) ? preg_replace("/[^0-9]/", "", $_REQUEST['register']['country']) : false; $_REQUEST['register']['email'] = !empty($_REQUEST['register']['email']) ? preg_replace("/[^0-9a-zA-Z@\\.\\!#\$%\\&\\*+_\\~\\?\\-]/", "", $_REQUEST['register']['email']) : false; $_REQUEST['register']['default_currency'] = !empty($_REQUEST['register']['default_currency']) ? preg_replace("/[^0-9]/", "", $_REQUEST['register']['default_currency']) : false; if (empty($CFG->google_recaptch_api_key) || empty($CFG->google_recaptch_api_secret)) { $_REQUEST['is_caco'] = !empty($_REQUEST['form_name']) && empty($_REQUEST['is_caco']) ? array('register' => 1) : (!empty($_REQUEST['is_caco']) ? $_REQUEST['is_caco'] : false); } if (empty($_REQUEST['form_name'])) { unset($_REQUEST['register']); } $register = new Form('register', Lang::url('register.php'), false, 'form3'); unset($register->info['uniq']); $register->verify(); $register->reCaptchaCheck(); if (!empty($_REQUEST['register']) && (empty($_SESSION["register_uniq"]) || $_SESSION["register_uniq"] != $_REQUEST['register']['uniq'])) { $register->errors[] = 'Page expired.'; } if (!empty($_REQUEST['register']) && !$register->info['terms']) { $register->errors[] = Lang::string('settings-terms-error'); } if (!empty($_REQUEST['register']) && $CFG->register_status == 'suspended') { $register->errors[] = Lang::string('register-disabled'); } if (!empty($_REQUEST['register']) && is_array($register->errors)) { $errors = array(); if ($register->errors) { foreach ($register->errors as $key => $error) { if (stristr($error, 'login-required-error')) { $errors[] = Lang::string('settings-' . str_replace('_', '-', $key)) . ' ' . Lang::string('login-required-error');