This commit is contained in:
ui0ppk 2023-02-04 23:40:50 +02:00
parent 3484cf648f
commit af7ad204ca
3 changed files with 52 additions and 16 deletions

View File

@ -1,2 +1,39 @@
<h1>error <?php echo $_GET["code"]; ?></h1>
<p>(this is a placeholder by the way)</p>
<?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 mx-auto position-absolute top-50 start-50 translate-middle text-center" style="width: 100%;">
dssda
</main>
</body>
</html>

View File

@ -23,7 +23,10 @@ $himsgs = [
"Heyyo",
"Howdy",
"Hi there",
"Ahoy"
"Ahoy",
"Ay",
"Sup",
"Wassup"
];
$himsg = array_rand($himsgs);
$himsg = $himsgs[$himsg];

View File

@ -1,23 +1,16 @@
<?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
header("Location: ?id=".$_SESSION['user']);
} else {
$id = (int)$_GET["id"];
}
@ -28,16 +21,19 @@ $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>
<h1>yeah im not hired to fucking make css/html -nolanwhy</h1>
<h1>welcome to <?php echo htmlspecialchars($requestUser["username"]); ?>'s profile!!!!!</h1>
<h1>his acc was created at <?php echo htmlspecialchars($requestUser["date"]); ?>
<p>thats all</p>
<main class="container" style="width: 100%;">
</main>
</body>
</html>