forked from 711clan/bans.sevenelevenclan.org
/
admin.php
107 lines (84 loc) · 2.82 KB
/
admin.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
103
104
105
106
107
<?php
/*
AMXBans v6.0
Copyright 2009, 2010 by SeToY & |PJ|ShOrTy
This file is part of AMXBans.
AMXBans is free software, but it's licensed under the
Creative Commons - Attribution-NonCommercial-ShareAlike 2.0
AMXBans is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
You should have received a copy of the cc-nC-SA along with AMXBans.
If not, see <http://creativecommons.org/licenses/by-nc-sa/2.0/>.
*/
session_start();
require_once("include/config.inc.php");
require_once("include/access.inc.php");
require_once("include/menu.inc.php");
require_once("include/logfunc.inc.php");
require_once("include/functions.inc.php");
require_once("include/sql.inc.php");
if(!$_SESSION["loggedin"]) {
header("Location:index.php");
}
$site_start = "so_in"; //Admin Start Page
//Seiten Verwaltung wm_ms
//UserLevel Verwaltung wm_ul
//Webadmin Verwaltung wm_wa
//AMXX Admin Verwaltung sm_av
//Server Verwaltung sm_sv
//Server Admins Verwaltung sm_sa
//ban reasons verwaltung sm_bg
//server info so_in
$admin_site = "default";
$user_msg = "";
$smarty = new dynamicPage;
//modul page loader
$modul=basename($_GET["modul"]);
if(isset($_GET["modul"]) && file_exists("include/modules/modul_".$modul.".php")) {
include("include/modules/modul_".$modul.".php");
$modul_exists=1;
}
//admin page loader
$site=basename($_GET["site"]);
if(!$modul_exists) {
if(isset($_GET["site"]) && file_exists("include/admin/admin_".$site.".php")) {
include("include/admin/admin_".$site.".php");
} else {
include("include/admin/admin_".$site_start.".php");
}
}
//get module menu (only active)
$modules_menu_count=0;
$modules_menu=sql_get_modules(1,$modules_menu_count);
// Template generieren
$smarty->assign("meta","");
$smarty->assign("title",$title2);
$smarty->assign("version_web",$config->v_web);
$smarty->assign("banner",$config->banner);
$smarty->assign("banner_url",$config->banner_url);
// amxbans.css available in design? if not, take default one.
if(file_exists("templates/".$config->design."/amxbans.css")) {
$smarty->assign("design",$config->design);
}
$smarty->assign("dir",$config->document_root);
$smarty->assign("current_lang",$config->default_lang);
$smarty->assign("this",$_SERVER['PHP_SELF']);
$smarty->assign("menu",$menu);
$smarty->assign("modules_menu",$modules_menu);
$smarty->assign("modules_menu_count",$modules_menu_count);
$smarty->assign("msg",$user_msg);
if($modul_exists==1) {
$smarty->assign("site",$modul_site);
} else {
$smarty->assign("site",$admin_site);
}
$smarty->display('main_header.tpl');
$smarty->display('admin_index.tpl');
if($modul_exists==1) {
$smarty->display('modul_'.$modul_site.'.tpl');
} else {
$smarty->display('admin_'.$admin_site.'.tpl');
}
$smarty->display('main_footer.tpl');
?>