<?php include "../include/config.php"; function randomPassword() { $n = mt_rand(); $hash = antispamhash($n); $ret = substr(preg_replace("/[^a-zA-Z0-9]/", "", $hash), 0, 8); return $ret; } $post_get = new GetVarClass(); $email = $post_get->getemail("email"); $c = $post_get->getint("c"); $chash = $post_get->getvar("chash"); if (!$email) { die("Регистрация невозможна: введите корректный e-mail. "); } if (antispamhash($c) != $chash) { die("Регистрация невозможна: анти-спам тест не пройден. "); } $userid = emailToId($email); if ($userid) { $text = <<<EOT E-mail {$email} уже зарегистрирован. На всякий случай мы отправили вам ваш пароль на почту еще раз. <br /> Воспользуйтесь <a href="/#login">формой входа</a> на главной странице. <br /> По техническим вопросам обращайтесь к Бодигриму (andrew.lelechenko@gmail.com, skype bodigrim). EOT; echo $text; remindPassword($userid);