-
Notifications
You must be signed in to change notification settings - Fork 0
/
profile.php
109 lines (91 loc) · 2.46 KB
/
profile.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<?php
require 'php/config.php';
require 'php/DBconnect.php';
require 'steamauth/steamauth.php';
require_once 'php/User.php';
require_once 'php/LoggedInUser.php';
require_once 'php/Stats.php';
$dbh = new DBConnect();
$stats = new Stats();
if (isset($_SESSION['steamid']))
{
require 'steamauth/userinfo.php';
$loggedInUser = new LoggedInUser($steamprofile['steamid']);
}
if (isset($_GET['steamid']))
{
if ($_GET['steamid'] = $_SESSION['steamid'])
{
$specifiedUser = $loggedInUser;
}
else
{
$specifiedUser = new User($_GET['steamid']);
}
if (!$specifiedUser->registered())
{
echo "<br/>";
echo "User not found. Please check your userid and try again.";
}
else
{
$userForDisplay = $specifiedUser;
}
}
else if (isset($loggedInUser) && $loggedInUser->registered())
{
$userForDisplay = $loggedInUser;
}
else
{
echo "Please register to view your profile or view someone else's by going to profile/steamid.";
}
?>
<!DOCTYPE html>
<html>
<head>
<title><?php echo $userForDisplay->getInfo()['alias'];?> - IbisNet</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="assets/css/vendor.css">
<link rel="stylesheet" type="text/css" href="assets/css/flat-admin.css">
<!-- Theme -->
<link rel="stylesheet" type="text/css" href="./assets/css/theme/blue.css">
<link rel="stylesheet" type="text/css" href="./assets/css/ibisnet.css">
</head>
<body>
<div class="app app-default">
<?php require 'elements/sidebar-nav.php';?>
<div class="app-container">
<?php
require 'elements/navbar.php';
require 'elements/help-actions.html';
if (isset($_GET['steamid']))
{
if (!$specifiedUser->registered())
{
echo "<br/>";
echo "User not found. Please check your userid and try again.";
}
else
{
$userForDisplay = $specifiedUser;
require "elements/profile-page.php";
}
}
else if ($loggedInUser->registered())
{
$userForDisplay = $loggedInUser;
require "elements/profile-page.php";
}
else
{
echo "Please register to view your profile or view someone else's by going to profile/steamid.";
}
?>
</div>
</div>
<script type="text/javascript" src="assets/js/profile-status.js"></script>
<script type="text/javascript" src="assets/js/vendor.js"></script>
<script type="text/javascript" src="assets/js/app.js"></script>
</body>
</html>