forked from cfinke/anyInventory
-
Notifications
You must be signed in to change notification settings - Fork 0
/
error_handler.php
executable file
·46 lines (38 loc) · 1.65 KB
/
error_handler.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
<?php
require_once("globals.php");
$title = APP_TITLE.": ".ERROR;
$errors = array();
$errors[0] = array(ERROR,ERROR_DUPLICATE_FIELD,"breadcrumbs"=>ERROR);
$errors[1] = array(ERROR,ERROR_BAD_DEFAULT_VALUE,"breadcrumbs"=>ERROR);
$errors[2] = array(ERROR,ERROR_EMPTY_CATEGORY,"breadcrumbs"=>ERROR);
$errors[3] = array(ERROR,ERROR_NO_COMMON_FIELDS,"breadcrumbs"=>ERROR);
$errors[5] = array(ERROR,ERROR_ALERT_NO_CATEGORIES,'breadcrumbs'=>ERROR);
$errors[6] = array(ERROR,ERROR_ALERT_NO_ITEMS,'breadcrumbs'=>ERROR);
$errors[7] = array(ERROR,ERROR_NO_TOP_LEVEL_EDIT,'breadcrumbs'=>ERROR);
$errors[8] = array(ERROR,ERROR_NO_VALUES,'breadcrumbs'=>ERROR);
$errors[10] = array(ACCESS_DENIED,ERROR_PRIVELEGES,'breadcrumbs'=>ACCESS_DENIED);
$errors[11] = array(ACCESS_DENIED,ERROR_PRIVELEGES,'breadcrumbs'=>ACCESS_DENIED);
$errors[12] = array(ACCESS_DENIED,ERROR_PRIVELEGES,'breadcrumbs'=>ACCESS_DENIED);
$errors[13] = array(ACCESS_DENIED,ERROR_PRIVELEGES,'breadcrumbs'=>ACCESS_DENIED);
$errors[14] = array(ACCESS_DENIED,ERROR_DELETE_OWN_ACCOUNT,'breadcrumbs'=>ACCESS_DENIED);
$errors[15] = array(ACCESS_DENIED,ERROR_PRIVELEGES,'breadcrumbs'=>ACCESS_DENIED);
$errors[16] = array(ERROR,ERROR_DUPLICATE_USER,'breadcrumbs'=>ERROR);
$errors[17] = array(ERROR,ERROR_BARCODE,"breadcrumbs"=>ERROR);
$breadcrumbs = $errors[$_GET["eid"]]["breadcrumbs"];
$output = '
<table class="standardTable" cellspacing="0">
<tr class="tableHeader">
<td>'.$errors[$_GET["eid"]][0].'</td>
</tr>
<tr>
<td class="tableData">
<table>
<tr>
<td>'.$errors[$_GET["eid"]][1].'</td>
</tr>
</table>
</td>
</tr>
</table>';
display($output);
?>