forked from root/threadr.lostcave.ddnss.de
37 lines
1.2 KiB
PHP
37 lines
1.2 KiB
PHP
<?php
|
|
%PLEAZE_NO_CACHE%
|
|
session_start();
|
|
//Todo: make this a setting for users that use VPNs/Proxies and seem to jump around the world rather quickly...
|
|
%NO_CHEAP_SESSION_STEALING%
|
|
|
|
$pdo = new PDO('mysql:host=localhost;dbname=web', 'webstuff', 'Schei// auf Pa$$w0rter!');
|
|
$statement = $pdo->prepare('SELECT name FROM users WHERE id = :user_id;'); // to be replaced with optional user name off the user data table
|
|
$result = $statement->execute(array('user_id' => $_SESSION['user_id']));
|
|
$dbentry = $statement->fetch();
|
|
$username = $dbentry['name'];
|
|
|
|
$navbar = "home";
|
|
//ToDo: differentiate between home and userhome (or auto-redirect)
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>ThreadR</title>
|
|
%STYLESHEET%
|
|
<link rel="icon" type="image/png" href="%CONTENT_DIR%/img/favicon-32x32.png" sizes="32x32" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
</head>
|
|
<body>
|
|
%NAVBAR%
|
|
<div class="container">
|
|
<div class="item-1">
|
|
<center><h1>ThreadR</h1></center>
|
|
</div>
|
|
<div class="item-2">
|
|
<center><h3><?php echo "Welcome back, $username !";?> </h3></center>
|
|
<form action="%CONTENT_DIR%/boards/post.php" method="post">
|
|
<input type="submit" value="Post something">
|
|
</div>
|
|
</div>
|
|
</html>
|