-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlogproc.php
68 lines (68 loc) · 1.48 KB
/
logproc.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
<?php
$pas = file_get_contents('settings/gamePass.txt');
$usrName = $_POST['usr'];
$usrPas = $_POST['pass'];
$dirty = $_COOKIE['validity'];
if($dirty != '1')
{
if(($usrName != '') and ($usrPas != ''))
{
$usrPas = strtoupper($usrPas);
$pas = strtoupper($pas);
if($pas == $usrPas)
{
$usrCount = file_get_contents('users/userCount.txt');
$maxPlayTime = file_get_contents('settings/maxPlayTime.txt');
$usrCount = $usrCount + 1;
file_put_contents('users/userCount.txt',$usrCount);
mkdir("users/$usrCount");
file_put_contents("users/$usrCount/playerName.txt",$usrName);
file_put_contents("users/$usrCount/marks.txt","");
setcookie("user", "$usrCount", time()+60*$maxPlayTime);
setcookie("validity", "1", time()+3600*12);
echo "
<html>
<head>
</head>
<body>
<div style='width:100%;height:5%;background:#34495E;'>
<center>
<h1 style='color:white;'>Even if the world ends ... Do not refresh this page !!!
</h1>
</center>
</div>
<br>
<br>
</body>
</html>
";
include 'rules.html';
echo "
<html>
<head>
</head>
<body>
<br>
<br>
<a href='arena.php'>
<div style='width:100%;height:5%;background:#E74C3C;'>
<center>
<h1 style='color:white;'>After understanding the rules Click here to continue !!!
</h1>
</center>
</div>
</a>
<br>
</body>
</html>
";
}
}
}
else
{
echo "
<img src='pics/gover.jpg' style='position:absolute;top:0px;left:0px;width:100%;height:100%;'>
";
}
?>