1 |
<?php |
1 |
<?php |
2 |
|
2 |
|
3 |
/** |
3 |
/** |
4 |
* Admin interface file. |
4 |
* Admin interface file. |
5 |
* |
5 |
* |
6 |
* Checks the selected 'action', checks user permissions, calls the appropriate |
6 |
* Checks the selected 'action', checks user permissions, calls the appropriate |
7 |
* methods and sets the required include file. Finally it includes the admin |
7 |
* methods and sets the required include file. Finally it includes the admin |
8 |
* template's index file. |
8 |
* template's index file. |
9 |
* |
9 |
* |
10 |
* @author Tamlyn Rhodes <tam at zenology dot co dot uk> |
10 |
* @author Tamlyn Rhodes <tam at zenology dot co dot uk> |
11 |
* @package singapore |
11 |
* @package singapore |
12 |
* @license http://opensource.org/licenses/gpl-license.php GNU General Public License |
12 |
* @license http://opensource.org/licenses/gpl-license.php GNU General Public License |
13 |
* @copyright (c)2003, 2004 Tamlyn Rhodes |
13 |
* @copyright (c)2003, 2004 Tamlyn Rhodes |
14 |
* @version $Id: admin.php,v 1.36 2006/01/27 13:31:24 tamlyn Exp $ |
14 |
* @version $Id: admin.php,v 1.36 2006/01/27 13:31:24 tamlyn Exp $ |
15 |
*/ |
15 |
*/ |
16 |
|
16 |
|
17 |
//include admin class |
17 |
//include admin class |
18 |
require_once "includes/admin.class.php"; |
18 |
require_once "includes/admin.class.php"; |
19 |
|
19 |
|
20 |
//create the admin object |
20 |
//create the admin object |
21 |
$sg = new sgAdmin(); |
21 |
$sg = new sgAdmin(); |
22 |
|
22 |
|
23 |
//set session arg separator to be xml compliant |
23 |
//set session arg separator to be xml compliant |
24 |
ini_set("arg_separator.output", "&"); |
24 |
ini_set("arg_separator.output", "&"); |
25 |
|
25 |
|
26 |
//start session |
26 |
//start session |
27 |
session_name($sg->config->session_name); |
27 |
session_name($sg->config->session_name); |
28 |
@session_start(); |
28 |
@session_start(); |
29 |
|
29 |
|
30 |
//load user details (must be done after session_start) |
30 |
//load user details (must be done after session_start) |
31 |
$sg->loadUser(); |
31 |
$sg->loadUser(); |
32 |
|
32 |
|
33 |
//send content-type and character encoding header |
33 |
//send content-type and character encoding header |
34 |
@header("Content-type: text/html; charset=".$sg->character_set); |
34 |
@header("Content-type: text/html; charset=".$sg->character_set); |
35 |
|
35 |
|
36 |
//perform admin action |
36 |
//perform admin action |
37 |
$sg->doAction(); |
37 |
$sg->doAction(); |
38 |
|
38 |
|
39 |
//pass control over to template |
39 |
//pass control over to template |
40 |
include $sg->config->pathto_admin_template."index.tpl.php"; |
40 |
include $sg->config->pathto_admin_template."index.tpl.php"; |
41 |
|
41 |
|
42 |
|
42 |
|
43 |
?> |
43 |
?> |