Repository navigation
Expand file tree
/
Copy pathsuccess.php
More file actions
96 lines (79 loc) · 3.21 KB
/
Copy pathsuccess.php
File metadata and controls
96 lines (79 loc) · 3.21 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
91
92
93
94
95
96
<?php
/**
* Name: success.php
* Author: Roger C. Guilherme
* Created: 2026-07-01
* Description: Success page for the ODDS plugin in the ABCD application.
*
* * @package ABCD_Plugins_ODDS
* @requires PHP 8.1+
*
* changelog:
* 20260701 rogercgui Initial creation of LanguageManager class.
*
* */
if (!class_exists('PluginBridge')) {
header("HTTP/1.1 403 Forbidden");
die("Direct access forbidden.");
}
// Log in to ensure that your language is saved
if (session_status() === PHP_SESSION_NONE) {
session_start();
}
// Retrieves the language from the URL (if available) and saves it in the session for subsequent screens
if (isset($_REQUEST['lang']) && !empty($_REQUEST['lang'])) {
$_SESSION['lang'] = trim($_REQUEST['lang']);
}
$lang = $_SESSION['lang'] ?? 'en';
$bridge = PluginBridge::getInstance();
$abcdPath = $bridge->get('abcd_path', realpath(__DIR__ . '/../../../central'));
$pluginPath = realpath(__DIR__);
global $msgstr;
if (!is_array($msgstr)) {
$msgstr = [];
}
@include_once($abcdPath . "/lang/admin.php");
include($pluginPath . "/lang/odds.php");
$mfn = $_SESSION['odds_success_mfn'] ?? null;
$base = $_SESSION['odds_base'] ?? 'odds';
$emailStatus = $_SESSION['odds_email_status'] ?? '';
if (!$mfn) {
header("Location: ?action=form");
exit;
}
unset($_SESSION['odds_success_mfn']);
?>
<link href="/content/plugins/odds/assets/css/odds.css" rel="stylesheet" type="text/css">
<link href="/content/plugins/odds/assets/css/bootstrap.min.css" rel="stylesheet" type="text/css">
<div class="container my-5 py-5 text-center">
<div class="row justify-content-center">
<div class="col-md-8 col-lg-6">
<div class="card shadow-sm border-0 rounded-4">
<div class="card-body p-5">
<div class="mb-4">
<i class="fas fa-check-circle text-success" style="font-size: 5rem;"></i>
</div>
<h2 class="h3 fw-bold text-dark mb-3">
<?php echo $msgstr['notice_success'] ?? 'Request Successfully Sent!'; ?>
</h2>
<p class="text-secondary mb-2 fs-5">
<?php echo $msgstr['odds_cre_rec1'] ?? 'Created record'; ?>
<strong class="text-primary fs-4"><?php echo htmlspecialchars($mfn); ?></strong>
<?php echo $msgstr['odds_cre_rec2'] ?? 'in database'; ?>
<strong class="text-dark"><?php echo htmlspecialchars($base); ?></strong>.
</p>
<?php if (!empty($emailStatus)): ?>
<div class="alert alert-light border mt-4 text-start shadow-sm">
<?php echo $emailStatus; ?>
</div>
<?php endif; ?>
<div class="mt-5">
<a href="?action=form&base=<?php echo urlencode($base); ?>" class="btn btn-outline-primary px-4 py-2 fw-semibold rounded-3">
<i class="fas fa-arrow-left me-2"></i> <?php echo $msgstr['notice_back'] ?? 'Go Back to Form'; ?>
</a>
</div>
</div>
</div>
</div>
</div>
</div>