forked from Forceu/barcodebuddy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
error.php
48 lines (38 loc) · 1.02 KB
/
error.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
<?php
/**
* Barcode Buddy for Grocy
*
* PHP version 7
*
* LICENSE: This source file is subject to version 3.0 of the GNU General
* Public License v3.0 that is attached to this project.
*
* @author Marc Ole Bulling
* @copyright 2019 Marc Ole Bulling
* @license https://www.gnu.org/licenses/gpl-3.0.en.html GNU GPL v3.0
* @since File available since Release 1.3
*/
/**
* Display errors
*
*
* @author Marc Ole Bulling
* @copyright 2019 Marc Ole Bulling
* @license https://www.gnu.org/licenses/gpl-3.0.en.html GNU GPL v3.0
* @since File available since Release 1.3
*
*/
/** This file should only be loaded if an error has occured
* The global variable $ERROR_MESSAGE needs to be set
* with the error message.
*/
if (!isset($ERROR_MESSAGE)) {
header("Location: index.php");
}
require_once __DIR__ . "/incl/webui.inc.php";
$webUi = new WebUiGenerator(MENU_ERROR);
$webUi->addHeader();
$webUi->addCard("<b>Error</b>", $ERROR_MESSAGE);
$webUi->addFooter();
$webUi->printHtml();
?>