-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsplash.php
More file actions
90 lines (72 loc) · 3.4 KB
/
splash.php
File metadata and controls
90 lines (72 loc) · 3.4 KB
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
78
79
80
81
82
83
84
85
86
87
88
89
90
<?php
$_SESSION['splash'] = true;
$error = '';
if (empty($splashConfig)) $splashConfig = [];
$asset_version = $splashConfig['asset_version'] ?? '';
if ($asset_version === '') {
$asset_version = filemtime(__FILE__);
}
$asset_version = htmlspecialchars((string)$asset_version, ENT_QUOTES, 'UTF-8');
require_once 'staticpages/disclaimer_text.php';
#file_put_contents("mylog.log", "\$_SESSION in Splash.php BEFORE changes = ".print_r($_SESSION,1)."\n\n\n", FILE_APPEND);
if (!empty($_SESSION['user_data']['userid']) && (empty($_SESSION['authorized']) || $_SESSION['authorized'] !== true)){
$error = '<br>The user ' . $_SESSION['user_data']['userid'] . " is not authorized to use this tool<br>\n";
$_SESSION['splash'] = false;
}
#file_put_contents("mylog.log", "\$_SESSION in Splash.php AFTER changes = ".print_r($_SESSION,1)."\n\n\n", FILE_APPEND);
#file_put_contents("mylog.log", "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \n\n\n\n\n\n\n", FILE_APPEND);
?><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><?php echo htmlspecialchars($splashConfig['app_title'], ENT_QUOTES, 'UTF-8'); ?></title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="style.v2.02.css?v=<?php echo $asset_version; ?>" rel="stylesheet">
</head>
<body>
<div class="container">
<div class="header row align-items-center">
<div class="col-sm-4">
<?php
$logo = htmlspecialchars($splashConfig['app_logo'] ?? 'NHLBI_Logo_Vector.svg', ENT_QUOTES, 'UTF-8');
$logoAlt = htmlspecialchars($splashConfig['app_logo_alt'] ?? 'NHLBI Chat', ENT_QUOTES, 'UTF-8');
?>
<img src="images/<?php echo $logo; ?>" class="logo" alt="<?php echo $logoAlt; ?>">
</div>
<div class="col-sm-4 text-center">
<h1><?php echo htmlspecialchars($splashConfig['app_title'] ?? 'NHLBI Chat', ENT_QUOTES, 'UTF-8'); ?></h1>
</div>
<div class="col-sm-4 text-end">
<?php
if (!empty($user)) echo '<p id="username">Hello '.$user.'</p>'."\n";
?>
</div>
</div>
<div class="row">
<div class="col-md-1 columns">
</div>
<div class="col-md-10 columns">
<div>
<?php echo $topbox; ?>
<?php
if (!empty($error)) echo '<span style="color:red">'.$error.'</span></p>'."\n";
require_once 'staticpages/notification_center.html';
echo $maintext;
# require_once 'staticpages/model_text.html';
?>
<p class="borderedbox" style="text-align: center;">
<a title="Click here to go to authentication" href="auth_redirect.php">Proceed</a></p>
<!-- Chat messages will be added here -->
</div>
<div class="footer">
<?php $disclosure = htmlspecialchars($splashConfig['disclosure_link'] ?? '#', ENT_QUOTES, 'UTF-8'); ?>
<p><a title="Open the disclosure information in a new window" href="<?php echo $disclosure; ?>" target="_Blank" title="Vulnerability Disclosure">Vulnerability Disclosure</a></p>
</div>
</div>
<div class="col-md-1 columns">
</div>
</div>
</div>
</body>
</html>