-
Notifications
You must be signed in to change notification settings - Fork 5
/
input.php
77 lines (62 loc) · 2.89 KB
/
input.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
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
67
68
69
70
71
72
73
74
75
76
77
<?php
#-----------------------------------------------------#
# ********* WAP-MOTORS ********* #
# Made by : VANTUZ #
# E-mail : [email protected] #
# Site : http://pizdec.ru #
# WAP-Site : http://visavi.net #
# ICQ : 36-44-66 #
# Вы не имеете право вносить изменения в код скрипта #
# для его дальнейшего распространения #
#-----------------------------------------------------#
require_once ("includes/start.php");
require_once ("includes/functions.php");
require_once ("includes/header.php");
sleep(1);
if (isset($_POST['login'])) {$login = check($_POST['login']);} else {$login = check($_GET['login']);}
if (isset($_POST['pass'])) {$pass = check($_POST['pass']);} else {$pass = check($_GET['pass']);}
if (isset($_POST['cookietrue'])) {$cookietrue = (int)$_POST['cookietrue'];} else {$cookietrue = (int)$_GET['cookietrue'];}
if (isset($_GET['action'])) {$action = check($_GET['action']);} else {$action = "";}
############################################################################################
## Авторизация ##
############################################################################################
if ($action==""){
if (preg_match('|^[a-z0-9\-]+$|i',$login) && preg_match('|^[a-z0-9\-]+$|i',$pass)){
if (file_exists(DATADIR."profil/$login.prof")){
$inform = file_get_contents(DATADIR."profil/$login.prof");
$info = explode(":||:",$inform);
if ($login==$info[0] && md5(md5($pass))==$info[1]) {
if ($cookietrue==1){
$apar = xoft_encode($pass,$config['keypass']);
$alog = xoft_encode($login,$config['keypass']);
setcookie("cookpar", $apar, time()+3600*24*365);
setcookie("cooklog", $alog, time()+3600*24*365);
}
setcookie("cookname", $login, time()+3600*24*365);
$pr_ip = explode(".",$ip_addr);
$my_ip = $pr_ip[0].$pr_ip[1].$pr_ip[2];
$_SESSION['log'] = $login;
$_SESSION['par'] = $pass;
$_SESSION['my_ip'] = $my_ip;
change_profil($login, array(11=>$info[11]+1, 14=>$ip, 25=>1, 44=>SITETIME));
header ("Location: index.php"); exit;
}}}
header ("Location: pages/login.php?isset=inputoff"); exit;
}
############################################################################################
## Выход ##
############################################################################################
if ($action=="exit"){
if (is_user()) {
change_profil($log, array(25=>0));
}
unset($_SESSION['log']);
unset($_SESSION['par']);
setcookie('cookpar', '');
setcookie('cooklog', '');
session_unset();
setcookie(session_name(), '');
session_destroy();
header ("Location: index.php?isset=exit"); exit;
}
?>