/
testreg.php
31 lines (30 loc) · 1012 Bytes
/
testreg.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
/**
* ----------------------------------------------
* Flame Web-site (PHP/MySQL)
* Copyright (c) Maksim <<Klym>> Klimenko
* URL: http://clan-flame.ru
* ----------------------------------------------
*/
session_start();
require("blocks/autoload.php");
require("blocks/db.php");
if (isset($_SESSION['email'])) {
die("<html><head><meta http-equiv='refresh' content='0; url=/'></head></html>");
}
if (isset($_POST['email'])) {$email = $_POST['email']; if (empty($email)) {unset($email);}}
if (isset($_POST['password'])) {$password = $_POST['password']; if (empty($password)) {unset($password);}}
if (isset($email) || isset($password)) {
$user = new User();
$email = $user->checkUserData($email);
$password = md5($password);
$password = strrev($password);
$user->email = $email;
$user->password = $password;
$user->db = $db;
$user->checkUser(session_id());
}
else {
exit("Вы не ввели не всю информацию, вернитесь и заполните все поля.");
}
?>