56 lines
1.6 KiB
PHP
56 lines
1.6 KiB
PHP
<?php
|
|
session_start();
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html data-bs-theme="dark">
|
|
<head>
|
|
<?php
|
|
|
|
require_once 'core/classes.php';
|
|
require_once 'core/classes/user.php';
|
|
if(isset($_SESSION['user'])) {
|
|
$user = new User($con, $_SESSION['user']);
|
|
} else {
|
|
echo ''; // fuck you
|
|
}
|
|
|
|
// some shitty code by nolanwhy
|
|
// yes i coded all of this inside github editor
|
|
if(!isset($_GET["id"])) {
|
|
die("go fuck yourself (no id)"); // todo: redirect to 404
|
|
} else {
|
|
$id = (int)$_GET["id"];
|
|
}
|
|
$q = $con->prepare("SELECT * FROM users WHERE id = :id");
|
|
$q->bindParam(':id',$id,PDO::PARAM_INT);
|
|
$q->execute();
|
|
$requestUser = $q->fetch();
|
|
if(!$requestUser) {
|
|
die("go fuck yourself (can't find user)"); // todo: redirect to 404
|
|
}
|
|
|
|
$getitstarted = new PartyStarter;
|
|
$getitstarted->header();
|
|
?>
|
|
</head>
|
|
<title><?php echo $sitename; ?> | <?php echo htmlspecialchars($requestUser["username"]); ?></title>
|
|
<body>
|
|
<main class="container text-white" style="width: 100%;">
|
|
<div class="card shadow-sm" style="height: 11.75rem;">
|
|
<div class="card-group" style=" margin-left: 10px; margin-top: 10px;">
|
|
<!-- start card -->
|
|
<div class="card text-white border border-0" style="max-width: 130px;">
|
|
<a style="text-decoration: none; text-align: center; margin-bottom: 9px;">
|
|
<div class="card-body">
|
|
<img src="assets/renders/user/headshot?userId=<?php echo (int)htmlspecialchars($requestUser["id"]); ?>" class="rounded-circle" width=100 height=100></img>
|
|
</div>
|
|
</a>
|
|
</div><!-- end card -->
|
|
<h1><?php echo htmlspecialchars($requestUser["username"]); ?></h1>
|
|
<h3 class="text-muted">"i love sex grublox"</h3>
|
|
<!-- yes i tried making it -->
|
|
</div></div>
|
|
</main>
|
|
</body>
|
|
</html>
|