This repository was archived by the owner on Dec 22, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprofile.php
More file actions
70 lines (67 loc) · 1.48 KB
/
profile.php
File metadata and controls
70 lines (67 loc) · 1.48 KB
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
ini_set('display_errors', 0);
if(!isset($_GET['username']))
{
http_response_code(403);
die();
}
$username = $_GET['username'];
include("utils/db.php");
echo "<!DOCTYPE html>
<html lang=''en'>
<head>
<meta charset='UTF-8'>
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
<title>osu2007srv</title>
<style>
@import url('main.css');
</style>
</head>
<body>
<div id='container'>
<h1>$username</h1>";
if(CheckIfUserExists($conn,$username))
{
$accuracy = round(floatval(GetAccuracy($conn,$username))*100,2);
$score = number_format(GetTotalScoreByUser($conn,$username));
$rank = number_format(GetRank($conn,$username));
$img = GetPfp($conn,$username);
$add = "";
if(CheckIfAdmin($conn,$username))
{
$add = "<p id='adminBadge'>ADMIN</p>";
}
if(CheckIfBanned($username))
{
$days = CalculateBanDaysSince(GetBanDate($conn,$username));
$baninfo2 = "";
if(CheckIfAdmin($conn,$username))
{
$baninfo2 = "";
}
$baninfo = "<p id='adminBadge'>User is restricted<br/>days since restrict: $days<br/>
$baninfo2
</p>";
}
echo "
<img id='pfp' src='/forum/download.php?avatar=$img' height='186' width='186'/>
$add
$baninfo
<pre>
Accuracy: $accuracy%<br/>
Total Score: $score<br/>
Rank: #$rank
</pre>
</form>
</div>
</body>
</html>";
} else {
echo "
User doesn't exist
</form>
</div>
</body>
</html>
";
}