- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
<?
if ($_GET['view'] == 'login') {
$_POST[email2] = htmlspecialchars(stripslashes($_POST[email]));
$_POST[pass2] = htmlspecialchars(stripslashes($_POST[pass]));
if($_POST['email'] == $_POST['email2'] && $_POST['pass'] == $_POST['pass2']) {
if($_POST['email2'] && $_POST['pass2']) {
$result_310 = mysql_query("SELECT * FROM `gameuser` WHERE `emailx` = '$_POST[email2]'");
$zapros_310 = mysql_fetch_array($result_310);
if($zapros_310['emailx']) {
if($zapros_310['passwordx'] != '' && $zapros_310['passwordx'] == md5($_POST['pass2'])) {
$ipd1 = $_SERVER["REMOTE_ADDR"];
$result_105 = mysql_query("SELECT * FROM `ipblock` WHERE `ip` = '$ipd1'");
$zapros_105 = mysql_fetch_array($result_105);
if($zapros_105['id'] == '' && $zapros_105['ip'] != $ipd1) {
setcookie("iduser", $zapros_310['id']);
setcookie("emailuser", $zapros_310['emailx']);
setcookie ("passuser", $zapros_310['passwordx']);
if($_COOKIE['code'])
if($_COOKIE['code'] != $zapros_310['id'])
mysql_query("INSERT INTO `statistic2` (info, date) VALUES ('".$_COOKIE['code']." change on ".$zapros_310['id']."', now());");
setcookie("code", $zapros_310['id'], time() + 2419200);
$http_host5 = $_SERVER['HTTP_HOST'];
if ($http_host5 == 'dreamdivision.ru') {$http_host5 = "www.dreamdvision.ru";}
if ($http_host5 == 'dreamdivision.ru') {$http_host5 = "www.dreamdivision.ru";}
if($zapros_310['id'] != '1') {$result_311 = mysql_query("UPDATE `gameuser` SET `ip` = '".$_SERVER["REMOTE_ADDR"]."', `host` = '$http_host5' WHERE `id` = '$zapros_310[id]' LIMIT 1");}
$result_312 = mysql_query("SELECT * FROM `iploguser` WHERE `id` = '$zapros_310[id]'");
$zapros_312 = mysql_fetch_array($result_312);
if($zapros_312['ip'] != $ipd1) {
$result_313 = mysql_query("INSERT INTO `iploguser` ( `ip` , `id` ) VALUES ( '$ipd1', '$zapros_310[id]' );");
}
if ($zapros_310['tpcht'] == '0') {
$href1 = "updates.php";
} else if($zapros_310['tpcht'] == '1'){
$href1 = "main.php";
}
header("Location: $href1");
} else {
$smarty->assign('case', '2');
$smarty->assign('message', 'Пароль не верный.');
$smarty->display("index.tpl",$user_theme_name,$user_theme_name);
}
} else {
$smarty->assign('case', '2');
$smarty->assign('message', 'Пароль не верный.');
$smarty->display("index.tpl",$user_theme_name,$user_theme_name);
}
} else {
$smarty->assign('case', '2');
$smarty->assign('message', 'E-mail не верный.');
$smarty->display("index.tpl",$user_theme_name,$user_theme_name);
}
} else {
$smarty->assign('case', '2');
$smarty->assign('message', 'Заполните все поля.');
$smarty->display("index.tpl",$user_theme_name,$user_theme_name);
}
} else {
$smarty->assign('case', '2');
$smarty->assign('message', 'E-mail и/или Пароль содержат недопустимые символы.');
$smarty->display("index.tpl",$user_theme_name,$user_theme_name);
}
}
$smarty->assign('case', '3');
$smarty->display("index.tpl",$user_theme_name,$user_theme_name);