2023-11-19 12:24:38 +00:00
|
|
|
|
|
|
|
<link rel="stylesheet" href="/styles/profiles.css">
|
|
|
|
|
|
|
|
<?php
|
|
|
|
|
|
|
|
if (!$_SESSION['auth']) {
|
|
|
|
header('Location: /signin?callback=/profile');
|
|
|
|
}
|
|
|
|
|
|
|
|
$profile = db_execute("SELECT * FROM `profiles` WHERE id = ? LIMIT 1", [$user['id']]);
|
|
|
|
|
|
|
|
if (empty($profile)) {
|
|
|
|
$profile = [
|
2024-02-20 19:49:42 +00:00
|
|
|
"id" => "9999999",
|
2023-11-19 12:24:38 +00:00
|
|
|
"public_display_name" => false,
|
|
|
|
"public_avatar" => false,
|
|
|
|
"description" => null,
|
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
$avatar = "https://cdn.byecorps.com/id/profile/default.png";
|
|
|
|
$display_name = "";
|
|
|
|
|
|
|
|
if ($_SESSION['id'] != $profile['id']) {
|
|
|
|
if ($profile['public_avatar']) {
|
|
|
|
$avatar = get_avatar_url($profile['id']);
|
|
|
|
}
|
|
|
|
if ($profile['public_display_name']) {
|
|
|
|
$display_name = get_display_name($profile['id'], false);
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
$avatar = get_avatar_url($profile['id']);
|
|
|
|
$display_name = get_display_name($profile['id'], false);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
<div id="profile">
|
|
|
|
<img src="<?= $avatar ?>" class="avatar" alt="Avatar">
|
|
|
|
<div class="info">
|
|
|
|
<div class="displayname"><?= $display_name ?></div>
|
2023-11-19 12:36:49 +00:00
|
|
|
<div class="bcid"><?= format_bcid( $profile['id'] ); ?></div>
|
2023-11-19 12:24:38 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="details">
|
|
|
|
<div id="badges">
|
|
|
|
<h2>Badges</h2>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="info">
|
|
|
|
<h2>Info</h2>
|
|
|
|
|
|
|
|
<table>
|
|
|
|
<tr>
|
|
|
|
<th>Joined</th>
|
|
|
|
<td><?= $user['created_date'] ?></td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|