-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuserpage.php
77 lines (60 loc) · 1.93 KB
/
userpage.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<?php
session_start();
include_once 'interactions/timeout.php';
include_once 'interactions/database.php';
if(!isset($_SESSION['Name'])){
header("Location: index.php");
}
?>
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="style.css">
<!-- Bootstrap CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<title>Personal Page</title>
</head>
<body>
<div id="mySidenav" class="sidenav">
<?php
if($_SERVER['HTTPS'] != "on"){
header("Location: https://" .$_SERVER['HTTP_HOST'] .$_SERVER['REQUEST_URI']);
}
if(isset($_SESSION['Name'])){
echo '<a href="javascript:void(0)" class="closebtn" onclick="closeNav()">×</a>
<a href="index.php">Home</a>
<form id="logoutb" action="interactions/logout.php" method="POST">
<a>
<input name="logout" type="submit" value="Logout">
</a>
</form>';
}
?>
</div>
<div id="main">
<span style="font-size:50px;cursor:pointer" onclick="openNav()">☰</span>
</div>
<h1 id="title" class="text-center font-weight-bold"><span>Personal Page</span></h1>
<?php
include_once './userpagetable.php';
?>
<br><br><br>
<script>
function openNav() {
document.getElementById("mySidenav").style.width = "15%";
document.getElementById("main").style.marginLeft = "10%";
document.body.style.backgroundColor = "rgba(0,0,0,0.4)";
}
function closeNav() {
document.getElementById("mySidenav").style.width = "0";
document.getElementById("main").style.marginLeft= "0";
document.body.style.backgroundColor = "white";
}
</script>
<!-- Optional JavaScript -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>