/
confirmation.php
59 lines (51 loc) · 1.63 KB
/
confirmation.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
<?php
// File: confirmation.php
// Authors: Gordon Doore, Parth Parth
// Purpose: Confirmation page after upload/record a file
// Last modified: 07/23/2023
include "utils/config.php";
include "mail.php";
// Check if the session is not already started, start a new session
if (session_status() === PHP_SESSION_NONE) {
session_start();
}
// Check if an email was sent
if (isset($_SESSION['email']) && isset($_SESSION['confirmation'])) {
sendMail("File Uploaded", "Your file has been uploaded to the C3 Database Repo.", $_SESSION['email'], $mail_pass);
unset($_SESSION['confirmation']);
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>C3 | Confirmation</title>
<link rel="stylesheet" href="utils/css/dashboard-common.css">
<link rel="stylesheet" href="utils/css/dashboard.css">
</head>
<body>
<div class="wrapper-background">
<p> </p>
</div>
<div class="wrapper">
<?php include "navbar.php"; ?>
<div class="content-wrapper">
<div class="content">
<?php // Retrieve and display the debugging messages
if (isset($_SESSION['update']) && !empty($_SESSION['update'])) {
echo "<h1>Confirmation:</h1>";
foreach ($_SESSION['update'] as $message) {
echo "<p>$message</p>";
}
unset($_SESSION['update']);
} else {
echo "<p>No debugging messages found. You may be seeing this if this page was refreshed.</p>";
}
?>
</div>
</div>
</div>
</body>
</html>