have to
This commit is contained in:
parent
3484cf648f
commit
af7ad204ca
41
error.php
41
error.php
|
|
@ -1,2 +1,39 @@
|
||||||
<h1>error <?php echo $_GET["code"]; ?></h1>
|
<?php
|
||||||
<p>(this is a placeholder by the way)</p>
|
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>
|
||||||
|
|
|
||||||
5
home.php
5
home.php
|
|
@ -23,7 +23,10 @@ $himsgs = [
|
||||||
"Heyyo",
|
"Heyyo",
|
||||||
"Howdy",
|
"Howdy",
|
||||||
"Hi there",
|
"Hi there",
|
||||||
"Ahoy"
|
"Ahoy",
|
||||||
|
"Ay",
|
||||||
|
"Sup",
|
||||||
|
"Wassup"
|
||||||
];
|
];
|
||||||
$himsg = array_rand($himsgs);
|
$himsg = array_rand($himsgs);
|
||||||
$himsg = $himsgs[$himsg];
|
$himsg = $himsgs[$himsg];
|
||||||
|
|
|
||||||
22
user.php
22
user.php
|
|
@ -1,23 +1,16 @@
|
||||||
<?php
|
<?php
|
||||||
session_start();
|
session_start();
|
||||||
?>
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html data-bs-theme="dark">
|
|
||||||
<head>
|
|
||||||
<?php
|
|
||||||
|
|
||||||
require_once 'core/classes.php';
|
require_once 'core/classes.php';
|
||||||
require_once 'core/classes/user.php';
|
require_once 'core/classes/user.php';
|
||||||
if(isset($_SESSION['user'])) {
|
if(isset($_SESSION['user'])) {
|
||||||
$user = new User($con, $_SESSION['user']);
|
$user = new User($con, $_SESSION['user']);
|
||||||
} else {
|
|
||||||
echo ''; // fuck you
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// some shitty code by nolanwhy
|
// some shitty code by nolanwhy
|
||||||
// yes i coded all of this inside github editor
|
// yes i coded all of this inside github editor
|
||||||
if(!isset($_GET["id"])) {
|
if(!isset($_GET["id"])) {
|
||||||
die("go fuck yourself (no id)"); // todo: redirect to 404
|
header("Location: ?id=".$_SESSION['user']);
|
||||||
} else {
|
} else {
|
||||||
$id = (int)$_GET["id"];
|
$id = (int)$_GET["id"];
|
||||||
}
|
}
|
||||||
|
|
@ -28,16 +21,19 @@ $requestUser = $q->fetch();
|
||||||
if(!$requestUser) {
|
if(!$requestUser) {
|
||||||
die("go fuck yourself (can't find user)"); // todo: redirect to 404
|
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 = new PartyStarter;
|
||||||
$getitstarted->header();
|
$getitstarted->header();
|
||||||
?>
|
?>
|
||||||
</head>
|
</head>
|
||||||
<title><?php echo $sitename; ?> | <?php echo htmlspecialchars($requestUser["username"]); ?></title>
|
<title><?php echo $sitename; ?> | <?php echo htmlspecialchars($requestUser["username"]); ?></title>
|
||||||
<body>
|
<body>
|
||||||
<h1>yeah im not hired to fucking make css/html -nolanwhy</h1>
|
<main class="container" style="width: 100%;">
|
||||||
<h1>welcome to <?php echo htmlspecialchars($requestUser["username"]); ?>'s profile!!!!!</h1>
|
|
||||||
<h1>his acc was created at <?php echo htmlspecialchars($requestUser["date"]); ?>
|
</main>
|
||||||
<p>thats all</p>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue