2020-02-24 09:19:56 +01:00
|
|
|
<?php
|
|
|
|
session_start();
|
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>
|
|
|
|
<link rel="stylesheet" type="text/css" href="%CONTENT_DIR%/style.css">
|
|
|
|
<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>
|
2020-02-25 15:05:02 +01:00
|
|
|
|
2020-02-24 09:07:51 +01:00
|
|
|
<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-02-26 10:27:41 +01:00
|
|
|
<div class="item-2 form">
|
2020-02-26 10:28:59 +01:00
|
|
|
<center><h1><?php echo " $username "; ?> </h1></center>
|
2020-03-02 09:15:55 +01:00
|
|
|
<form action="%CONTENT_DIR%/profile/" method="post">
|
2020-02-26 10:25:38 +01:00
|
|
|
</form>
|
2020-03-04 10:43:42 +01:00
|
|
|
<a href="%CONTENT_DIR%/profile/edit.php">
|
2020-03-04 08:46:35 +01:00
|
|
|
<button>Edit Profile</button>
|
|
|
|
</a>
|
2020-02-24 09:11:17 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-02-25 15:05:02 +01:00
|
|
|
</html>
|