2020-02-24 09:19:56 +01:00
|
|
|
<?php
|
|
|
|
session_start();
|
2020-03-07 21:40:38 +01:00
|
|
|
%SET_LOGIN_VARIABLE%
|
2020-03-02 14:14:54 +01:00
|
|
|
%PLEAZE_NO_CACHE%
|
2020-02-24 09:19:56 +01:00
|
|
|
%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'];
|
2020-02-26 19:03:55 +01:00
|
|
|
|
|
|
|
$navbar = "profile";
|
2020-02-24 09:19:56 +01:00
|
|
|
?>
|
|
|
|
|
2020-02-24 09:07:51 +01:00
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>ThreadR - Profile</title>
|
2020-03-05 04:56:06 +01:00
|
|
|
%STYLESHEET%
|
2020-02-24 09:07:51 +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">
|
|
|
|
</head>
|
|
|
|
<body>
|
2020-02-26 19:03:55 +01:00
|
|
|
%NAVBAR%
|
2020-02-24 09:11:17 +01:00
|
|
|
<div class="container">
|
|
|
|
<div class="item-1">
|
|
|
|
<center><h1>ThreadR</h1></center>
|
|
|
|
</div>
|
2020-03-08 04:10:58 +01:00
|
|
|
<div class="item-2">
|
|
|
|
<section>
|
|
|
|
<center><h1><?php echo " $username "; ?> </h1></center>
|
|
|
|
<form action="%CONTENT_DIR%/profile/" method="post">
|
|
|
|
</form>
|
|
|
|
<a href="%CONTENT_DIR%/profile/edit.php">
|
|
|
|
<button>Edit Profile</button>
|
|
|
|
</a>
|
|
|
|
</section>
|
2020-02-24 09:11:17 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-02-25 15:05:02 +01:00
|
|
|
</html>
|