-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapplication.php
More file actions
36 lines (26 loc) · 1.11 KB
/
Copy pathapplication.php
File metadata and controls
36 lines (26 loc) · 1.11 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
<?php
# evilcode.net
# $Id$
class UserApp extends Application {
function __construct() {
parent::__construct();
$this->SitePath = SITE_BASE . '/private/inc';
$this->AppTitle = 'evilcode.net';
$this->Footer = '© 2006 <a href="http://evilcode.net/">evilcode.net</a>';
$this->Footer .= ' | Powered by <a href="http://evilcode.net/projects/exhibition/">Exhibition</a>.';
$this->Footer .= ' | Hosted by <a href="http://infernalhosting.net/">Infernal Hosting</a>.';
# | value of pages that require authentication and their minimum access level
$protected = array();
#$protected[] = array('name' => 'profile', 'level' => 0);
#$protected[] = array('name' => 'admin', 'level' => 1);
$access = (@$_SESSION['user']['access'] === NULL ) ? -1 : $_SESSION['user']['access'];
foreach( $protected as $page ) {
if ($this->Request['page'] == $page['name'] && $access < $page['level'])
Application::HandleHTTPError(403);
}
}
function PrepareContent() {
parent::PrepareContent();
}
}
?>