forked from prakharsingh1312/cusiege
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathguide.php
More file actions
64 lines (36 loc) · 802 Bytes
/
Copy pathguide.php
File metadata and controls
64 lines (36 loc) · 802 Bytes
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
<?php
session_start();
if(!isset($_SESSION['username']))
{
header("Location: index.php");
}
else
{
$user=$_SESSION['username'];
$team=$_SESSION['team'];
include('dbconfig.php');
$table=$_SESSION['table'];
$query="SELECT username FROM res_$table WHERE username='$user'";
$result=mysqli_query($dbconfig,$query);
$row=mysqli_fetch_array($result,MYSQLI_ASSOC);
if(mysqli_num_rows($result)!=0)
{
$_SESSION['atm']=1;
header('location:play');
}
else
{
$lol=mysqli_query($dbconfig,"INSERT INTO res_$table (username,teamname) VALUES ('$user','$team')");
if($lol)
{
date_default_timezone_set("Asia/Kolkata");
$_SESSION['stime']=date("M d Y H:i:s");
$_SESSION['start']=1;
if($_SESSION['lev']!=3)
header("location:pre");
else
header('location:play');
}
}
}
?>