root/dev/common/class.session.php @ 181

Revision 181, 0.6 KB (checked in by exi, 14 years ago)

Changed admin/options to show the actual page as page title.
admin_menu.php now also loads settings from mods.
Added event manager and the first 2 events (comment/killmail added).
Changed config to be in a separate file and modified it to be called static with config::get().
http_request now stores the socket status in $this->status.
Changed MapView? to store pictures based on KB_SITE so it doesnt show a map with wrong colors for the current killboard on a multi-site installation.
Changed options to handle element options (like 'edit:size:40').
Changed options to use the static calls to config.
Changed Page to use the static calls to config.
Changed Session to use session_name() to determine if it should start a session.
index.php now loads module-init-scripts.
Changed post.php to use config and it should now also use the mailserver configuration directive to send emails.
Added a mail_forward-mod to show how easy it can be to develop mods once there are enough events listed.
Fixed 2 typos in battle_overview.tpl.

Line 
1<?php
2require_once('db.php');
3
4class Session
5{
6    function Session()
7    {
8        if (isset($_REQUEST[session_name()]))
9        {
10            session_start();
11        }
12    }
13
14    function isAdmin()
15    {
16        return isset($_SESSION['admin']);
17    }
18
19    function isSuperAdmin()
20    {
21        return isset($_SESSION['admin_super']);
22    }
23
24    function create($super)
25    {
26        session_start();
27        $_SESSION['admin'] = 1;
28        $_SESSION['admin_super'] = $super;
29    }
30
31    function destroy()
32    {
33        session_destroy();
34    }
35}
36?>
Note: See TracBrowser for help on using the browser.