-
Notifications
You must be signed in to change notification settings - Fork 0
/
error.php
102 lines (79 loc) · 1.72 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
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
97
98
99
100
101
102
<?php
/**
*
* BrewFeed
*
* filename: error_handler.php
*
* Copyright: Lars Jacobsen
* Author: Lars Jacobsen
*
*
**/
ini_set('date.timezone' , 'Europe/Copenhagen');
define('PAGE_PARSE_START_TIME', microtime());
error_reporting(E_ALL & ~E_NOTICE);
require_once('phpqrcode/qrlib.php');
require_once('fnc/solo.inc.php');
require_once('fnc/error_handler.inc.php');
require_once('fnc/dbhandler.fnc.php');
require_once('fnc/user_manager.inc.php');
require_once('fnc/htmlmotor.inc.php');
require_once('fnc/session.fnc.php');
$usermgr = new UserManager();
$userid = $usermgr->sessionLoggedIn(session_id());
$msg = 'Unknown Error';
$page_title = "Error";
if (isset($_SESSION['exception']))
{
$exc = $_SESSION['exception'];
$msg = $exc->getMessage();
}
else if (isset($_SESSION['errstr']))
{
$msg = $_SESSION['errstr'];
}
else if (!isset($_SESSION))
{
$msg = <<<EOM
Unable to initialise the session. Please verify
that the session data directory exists.
EOM;
}
else
{
$msg = 'Unknown Error';
}
/**
* Make sure that the next time an error occurs, we reset
* these error data.
*/
unset($_SESSION['exception']);
unset($_SESSION['errstr']);
$time_start = explode(' ', PAGE_PARSE_START_TIME);
$page = new htmlmotor("BrewFeed");
$page->Header();
if ($userid === -1)
{
$page->MenuOutNot();
}
else
{
$page->MenuOut();
}
echo <<<HTML_OUT
<table align="center" bgcolor="white" height="700px" width="100%" border="0">
<tr>
<td>
<form id="login" action="index.php?page=liusco.php" method="post">
<h1>BEERFEED</h1>
<h3>$msg</h3>
<fieldset id="actions">
<a href="">Glemt adgangskode?</a><a href="index.php?page=crusfo.php">Ny bruger</a>
</fieldset>
</form>
</td>
</tr>
</table>
HTML_OUT;
?>