2020-02-21 06:54:51 +01:00
|
|
|
<?php
|
|
|
|
session_start();
|
|
|
|
//Todo: make this a setting for users that use VPNs/Proxies and seem to jump around the world rather quickly...
|
2020-02-24 04:09:40 +01:00
|
|
|
%NO_CHEAP_SESSION_STEALING%
|
2020-02-21 06:54:51 +01:00
|
|
|
|
|
|
|
$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'];
|
|
|
|
?>
|
|
|
|
<!DOCTYPE html>
|
2020-02-18 16:35:10 +01:00
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>ThreadR</title>
|
2020-02-19 10:56:38 +01:00
|
|
|
<link rel="stylesheet" type="text/css" href="%CONTENT_DIR%/style.css">
|
2020-02-23 20:16:54 +01:00
|
|
|
<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">
|
2020-02-18 16:35:10 +01:00
|
|
|
</head>
|
|
|
|
<body>
|
2020-02-19 10:56:38 +01:00
|
|
|
<ul class="topnav">
|
2020-02-23 01:03:04 +01:00
|
|
|
<li><a class="active" href="%CONTENT_DIR%/userhome/"><img src="%CONTENT_DIR%/img/ThreadR_Home.svg" alt="Home" /></a></li>
|
2020-02-19 22:57:54 +01:00
|
|
|
<li><a href="%CONTENT_DIR%/news/">News</a></li>
|
2020-02-24 08:39:14 +01:00
|
|
|
<!--<li><a href="%CONTENT_DIR%/boards/">Boards</a></li>-->
|
|
|
|
<div class="dropdown">
|
|
|
|
<button class="dropbtn">Boards
|
|
|
|
<i class="fa fa-caret-down"></i>
|
|
|
|
</button>
|
|
|
|
<div class="dropdown-content">
|
|
|
|
<a href="%CONTENT_DIR%/boards/">Board 1</a>
|
|
|
|
<a href="#">Board 2</a>
|
|
|
|
<a href="#">Board 3</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-02-19 10:56:38 +01:00
|
|
|
<li><a href="%CONTENT_DIR%/about/">About</a></li>
|
2020-02-21 10:08:11 +01:00
|
|
|
<li class="right"><a href="%CONTENT_DIR%/logout/">Log Out</a></li>
|
2020-02-19 10:56:38 +01:00
|
|
|
</ul>
|
2020-02-19 23:32:52 +01:00
|
|
|
<br />
|
|
|
|
<div class="container">
|
|
|
|
<div class="item-1">
|
2020-02-19 23:33:42 +01:00
|
|
|
<center><h1>ThreadR</h1></center>
|
2020-02-19 23:32:52 +01:00
|
|
|
</div>
|
|
|
|
<div class="item-2">
|
2020-02-21 06:54:51 +01:00
|
|
|
<center><h3><?php echo "Welcome back, $username !";?> </h3></center>
|
2020-02-19 23:32:52 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-02-19 15:03:09 +01:00
|
|
|
</html>
|