-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwelcome.php
42 lines (34 loc) · 1.16 KB
/
welcome.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
<?php
include_once __DIR__ . "/vendor/autoload.php";
use Rx\SessionAdmin;
$sessionAdmin = new SessionAdmin();
$sessionAdmin->activateSession(); // like session_start()
if(!$_SESSION['urlIsAllowedToLoad']){
header('Location: metaevents.php');
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div style="margin: 20px;">
<h1>you are in welcome</h1>
<h3>only logged users can see this page</h3>
</div>
<div style="margin: 20px;">
<button type="button" class="btn btn-primary ml-3" onclick="location.href = 'exit.php'">Logout</button>
</div>
<div style="margin: 20px;">The $_SESSION data:</div>
<div style="margin: 20px;"><?php echo "<pre>" . json_encode($_SESSION, JSON_PRETTY_PRINT) . "</pre>";?></div>
<script src="js/jquery-3.7.1.min.js"></script>
<script src="js/autobahn.min.js"></script>
<script src="js/simpleBrowserClient.js"></script>
<script>
connect(<?php echo $_SESSION['id_user'] ?>);
</script>
</body>
</html>