This commit is contained in:
ui0ppk 2023-02-04 23:45:11 +02:00
parent fba0c6f24f
commit 5d6615709d
1 changed files with 39 additions and 0 deletions

View File

@ -0,0 +1,39 @@
<?php
session_start();
require_once 'core/classes.php';
require_once 'core/classes/user.php';
if(isset($_SESSION['user'])) {
$user = new User($con, $_SESSION['user']);
}
// some shitty code by nolanwhy
// yes i coded all of this inside github editor
if(!isset($_GET["id"])) {
header("Location: ?id=".$_SESSION['user']);
} 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
}
?>
<!DOCTYPE html>
<html data-bs-theme="dark">
<head>
<?php
$getitstarted = new PartyStarter;
$getitstarted->header();
?>
</head>
<title><?php echo $sitename; ?> | <?php echo htmlspecialchars($requestUser["username"]); ?></title>
<body>
<main class="container" style="width: 100%;">
</main>
</body>
</html>