Exemplo n.º 1
0
 public static function merge($message_array)
 {
     if (!is_array(self::$messages)) {
         self::$messages = $message_array;
     }
     if (is_array($message_array)) {
         self::$messages = array_merge(self::$messages, $message_array);
     }
 }
Exemplo n.º 2
0
    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';
?>
<div class="page_title">
	<div class="container">
		<div class="title"><h1><?php 
echo Lang::string('login-forgot');
?>
</h1></div>
        <div class="pagenation">&nbsp;<a href="index.php"><?php 
Exemplo n.º 3
0
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;
} elseif (!empty($_REQUEST['contact']) && !is_array($contact->errors)) {
    API::add('SiteEmail', 'contactForm', array($contact->info));
    $query = API::send();
    Messages::$messages = array(Lang::string('contact-message'));
    $show_message = true;
    $show_mask = true;
}
$_SESSION["contact_uniq"] = md5(uniqid(mt_rand(), true));
include 'includes/head.php';
?>
<div class="page_title">
	<div class="container">
		<div class="title"><h1><?php 
echo $page_title;
?>
</h1></div>
        <div class="pagenation">&nbsp;<a href="<?php 
echo Lang::url('index.php');
?>
Exemplo n.º 4
0
 public static function clearMessages()
 {
     self::$messages = array();
 }