-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.php
64 lines (54 loc) · 1.66 KB
/
index.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
<?php
session_start();
include 'database.php';
$newconn = $conn->prepare('INSERT INTO data (ip, timestamp) VALUES (?, ?)');
if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
$ip = $_SERVER['HTTP_CLIENT_IP'];
} elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
} else {
$ip = $_SERVER['REMOTE_ADDR'];
}
$newconn->bindParam(1, $ip);
//timestmap
$thistime = date('Y-M-d g:ia');
$newconn->bindParam(2, $thistime);
if($newconn->execute()){
}
else
{
echo 'DB set error';
}
?>
<html>
<head>
<title>Mog's Betting</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.4/css/bootstrap.min.css">
<link rel="stylesheet" href="styles.css">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="x-ua-compatible" content="ie=edge">
</head>
<body>
<div class="container">
<div class="roomheader">
<span class="list-group-item active">Mog's CSGO</span>
</div>
<div class="jumbotron">
<h1 class="display-1">Mog's CSGO</h1>
<p class="lead">Making profits & competitive play easy</p>
<div align="right"><?php if(isset($_SESSION['username'])){ echo $_SESSION['username'] . ' <a href="logout.php">Logout</a>'; }
else{
echo '<div align="right"><a href="login.php">Login</a></div>';
} ?></div>
</div>
<center>
<div><a href="betting.php" class="btn btn-primary">Betting</a> <a href="comp.php" class="btn btn-secondary">Competitive</a></div><br><br>
<img src="hiko.jpg" class="img-fluid" alt="Hiko"></img>
<small class="form-text text-muted">Hiko, Cloud9</small>
</center>
</div>
<div class="footer">
</div>
</body>
</html>