$code = base64_encode($_POST['email']);
mail($_POST['email'], 'Registartion on the forum color-school.dev', 'Link for activation: http://color-school.dev/account/activate/code/' . $code, 'From:color-school.dev');
MessageSend(3, 'You are registerd, activate <b> ' . $_POST['email'] . '</b> email');
else if ($Module == 'activate' and $Param['code']) {
if (!$_SESSION['USER_ACTIVE_EMAIL']) {
$email = base64_decode($Param['code']);
if (strpos($email, '@') !== false) {
mysqli_query($CONNECT, "UPDATE `users` SET `active` = 1 WHERE `email` = '$email'");
$_SESSION['USER_ACTIVE_EMAIL'] = $email;
MessageSend(3, 'E-mail <b>' . $email . '</b> activated.', '/login');
} else MessageSend(1, 'E-mail address <b>' . $_SESSION['USER_ACTIVE_EMAIL'] . '</b> doe not activate.', '/login');
} else MessageSend(1, 'E-mail address <b>' . $_SESSION['USER_ACTIVE_EMAIL'] . '</b> already is active!.', '/login');
}