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%
|
2020-03-08 16:19:27 +01:00
|
|
|
%REQUIRE_LOGIN%
|
2020-02-24 09:19:56 +01:00
|
|
|
|
|
|
|
$pdo = new PDO('mysql:host=localhost;dbname=web', 'webstuff', 'Schei// auf Pa$$w0rter!');
|
2020-03-08 16:27:02 +01:00
|
|
|
$error = false;
|
|
|
|
$error_message = "";
|
|
|
|
if (!$error) {
|
|
|
|
$statement = $pdo->prepare("SELECT name FROM users WHERE id=:uid"); // to be replaced with optional user name off the user data table
|
|
|
|
$statement->execute(array("uid"=>$_SESSION[user_id]));
|
|
|
|
$dbentry = $statement->fetch();
|
|
|
|
$username = $dbentry[name];
|
|
|
|
}
|
|
|
|
if (!$result) {
|
|
|
|
$error_message = "Error: SQL error.\n" . $statement->queryString . "\n" . $statement->errorInfo()[2];
|
|
|
|
}
|
|
|
|
|
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-03-09 12:18:22 +01:00
|
|
|
%NAVBAR%
|
|
|
|
<div class="container">
|
|
|
|
<div class="item-1">
|
|
|
|
<center><h1>ThreadR</h1></center>
|
|
|
|
</div>
|
|
|
|
<div class="item-2">
|
|
|
|
<?php
|
|
|
|
if(isset($_GET['action'])) {
|
|
|
|
if($_GET['action']=='edit') {
|
|
|
|
include("./edit.php");
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
include("./default.php");
|
2020-03-08 16:24:40 +01:00
|
|
|
}
|
2020-03-09 12:18:22 +01:00
|
|
|
?>
|
|
|
|
</div>
|
2020-02-24 09:11:17 +01:00
|
|
|
</div>
|
2020-03-09 12:18:22 +01:00
|
|
|
%BANNER_COOKIES%
|
|
|
|
</body>
|
2020-02-25 15:05:02 +01:00
|
|
|
</html>
|