This repository has been archived by the owner on Nov 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
viewprofile.php
176 lines (161 loc) · 9.41 KB
/
viewprofile.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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
<?php
require_once "app/require.php";
require_once "app/controllers/CheatController.php";
$user = new UserController();
$cheat = new CheatController();
Session::init();
if (!Session::isLogged()) {
Util::redirect("auth/login.php");
}
$suc = @$_GET["suc"];
$username = Session::get("username");
$uid = Session::get("uid");
Util::banCheck();
if ($_SERVER["REQUEST_METHOD"] === "GET") {
if (isset($_GET["uid"])) {
$getuid = $_GET["uid"];
$userbyid = $user->getuserbyuid($getuid);
$username = $userbyid->username;
} else {
Util::display("<script>window.history.back();</script>");
}
}
Util::head($username);
$sub = $user->getSubStatus($username);
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
<title>Profile - Brand</title>
<link rel="icon" type="image/png" href="favicon.png">
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet"href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/aos/2.3.4/aos.css">
<link rel="stylesheet" href="assets/css/untitled.css">
</head>
<body id="page-top">
<div id="wrapper">
<?php Util::navbar(); ?>
<div class="d-flex flex-column" id="content-wrapper">
<div id="content" style="background: #121421;">
<nav class="navbar navbar-light navbar-expand bg-white shadow mb-4 topbar static-top">
<div class="container-fluid"><button class="btn d-md-none rounded-circle me-3" id="sidebarToggleTop" type="button"><i class="fas fa-bars" style="color: rgb(255,255,255);"></i></button>
<ul class="navbar-nav flex-nowrap ms-auto">
<li class="nav-item dropdown no-arrow mx-1">
<div class="shadow dropdown-list dropdown-menu dropdown-menu-end" aria-labelledby="alertsDropdown"></div>
</li>
<li class="nav-item dropdown no-arrow">
<div class="nav-item dropdown no-arrow"><a class="dropdown-toggle nav-link" aria-expanded="false" data-bs-toggle="dropdown" href="#"><span class="d-none d-lg-inline me-2 text-gray-600 small" style="color: #ffffff !important;"><?php Util::display(
Session::get("username")
); ?></span>
<?php if (Util::getavatar($uid) == false): ?>
<img class="border rounded-circle img-profile" src="assets/img/avatars/Portrait_Placeholder.png" style="border-color: rgb(255,255,255)!important;">
<?php else: ?>
<img class="rounded-circle img-profile" src="<?php echo Util::getavatar(
$uid
); ?>" style="border-color: rgb(255,255,255)!important;">
<?php endif; ?>
</a>
<div class="dropdown-menu shadow dropdown-menu-end animated--grow-in" style="background: #252935;border-style: none;margin-top: 11px;box-shadow: 0px 0px 3px 2px rgba(0,0,0,0.16)!important;"><a class="dropdown-item" href="profile.php" style="color: rgb(255,255,255);"><i class="fas fa-user fa-sm fa-fw me-2 text-gray-400" style="color: rgb(255,255,255)!important;"></i> Profile</a><a class="dropdown-item" id="logout" href=<?php echo SITE_URL .
SUB_DIR .
"/auth/logout.php"; ?> style="color: rgb(255,255,255);"><i class="fas fa-sign-out-alt fa-sm fa-fw me-2 text-gray-400" style="color: rgb(255,255,255)!important;"></i> Logout</a></div>
</div>
</li>
</ul>
</div>
</nav>
<div class="container-fluid">
<h3 class="text-dark mb-4" data-aos="fade-down" data-aos-duration="800">Profile of <?php Util::Display(
$userbyid->username
); ?></h3>
<div class="row mb-3" data-aos="fade-down" data-aos-duration="600">
<div class="col-lg-4">
<div class="card mb-3" style="background: #252935;border-style: none;">
<div class="card-body text-center shadow" style="background: #252935;border-style: none;"> <?php if (
Util::getavatar($userbyid->uid) == false
): ?>
<img width="160" height="160" class="border rounded-circle img-profile" src="assets/img/avatars/Portrait_Placeholder.png" style="border-color: rgb(255,255,255)!important;">
<?php else: ?>
<?php
$ext = pathinfo(
Util::getavatar($userbyid->uid),
PATHINFO_EXTENSION
);
$name = $userbyid->uid . "." . $ext;
?>
<a href="<?php Util::display(
Util::getavatar($userbyid->uid)
); ?>" download="<?php Util::display(
$name
); ?>">
<img width="160" height="160" class="rounded-circle img-profile" src="<?php Util::display(
Util::getavatar($userbyid->uid)
); ?>" style="border-color: rgb(255,255,255)!important;"></a>
<?php endif; ?>
<h3 class="text-dark mb-4" style="text-align: center;margin-top: 16px;margin-bottom: 18px;font-weight: bold;">
<?php
Util::display("UID: ");
Util::display($userbyid->uid);
Util::display("<br>");
Util::display("Username: ");
Util::display($userbyid->username);
Util::display("<br>");
Util::display("Subscription: ");
if ($cheat->getCheatData()->frozen != 0) {
Util::display("Frozen <i class='fas fa-snowflake fa-sm' ></i>");
} else {
if ($sub > 8000) {
Util::display("Lifetime");
} else {
if ($sub >= 0) {
Util::display("$sub days");
} else {
Util::display(
'<i class="fa fa-times"></i>'
);
}
}
}
Util::display("<br>");
$days = Util::getjoinprofile(
$userbyid->createdAt
);
Util::display("Joined: $days days ago");
Util::display("<br>");
Util::display("Administrator: ");
if ($userbyid->admin > 0) {
Util::display("<i class='fa fa-check'></i>");
} else {
Util::display(
'<i class="fa fa-times"></i>'
);
}
Util::display("<br>");
Util::display("Supporter: ");
if ($userbyid->supp > 0) {
Util::display("<i class='fa fa-check'></i>");
} else {
Util::display(
'<i class="fa fa-times"></i>'
);
}
?></h3>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="assets/bootstrap/js/bootstrap.min.js"></script>
<script src="assets/js/bs-init.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/aos/2.3.4/aos.js"></script>
<script src="assets/js/theme.js"></script>
</body>
<?php Util::footer(); ?>
</html>