Revision 190, 1.4 KB
(checked in by exi, 15 years ago)
|
This is a big update...
Moved all admin scripts to common/admin.
Moved all includes and classes to common/includes.
Edited all include-paths to reflect the movement.
Fixed a bug with the session system allowing every registered user to access admin pages.
Replaced calls to date() to use a wrapper so gmdate can be used.
Replaced some calls to $config with calls to the static object.
Fixed a big which caused the portrait_grab to not download a new picute.
Added a classified-state to kills.
Removed the sync_server server script in this tree.
Added code to help modules find the includes to index.php.
|
Line | |
---|
1 | <?php |
---|
2 | require_once('common/includes/class.map.php'); |
---|
3 | |
---|
4 | function checkColors($context) |
---|
5 | { |
---|
6 | global $view; |
---|
7 | |
---|
8 | $a = array('line', 'bg', 'hl', 'normal', 'capt'); |
---|
9 | foreach ($a as $b) |
---|
10 | { |
---|
11 | if ($string = config::get('map_'.$context.'_cl_'.$b)) |
---|
12 | { |
---|
13 | $tmp = explode(',', $string); |
---|
14 | $function = 'set'.$b.'color'; |
---|
15 | $view->$function($tmp[0], $tmp[1], $tmp[2]); |
---|
16 | } |
---|
17 | } |
---|
18 | } |
---|
19 | |
---|
20 | $view = new MapView(slashfix($_GET['mode']), intval($_GET['size'])); |
---|
21 | $view->setSystemID(intval($_GET['sys_id'])); |
---|
22 | switch ($_GET['mode']) |
---|
23 | { |
---|
24 | case "map": |
---|
25 | $view->setTitle("Region"); |
---|
26 | $view->showLines(config::get('map_map_showlines')); |
---|
27 | $view->paintSecurity(config::get('map_map_security')); |
---|
28 | checkColors('map'); |
---|
29 | break; |
---|
30 | case "region": |
---|
31 | $view->setTitle("Constellation"); |
---|
32 | $view->showLines(config::get('map_reg_showlines')); |
---|
33 | $view->paintSecurity(config::get('map_reg_security')); |
---|
34 | $view->setOffset(25); |
---|
35 | checkColors('reg'); |
---|
36 | break; |
---|
37 | case "cons": |
---|
38 | $view->showLines(config::get('map_con_showlines')); |
---|
39 | $view->showSysNames(config::get('map_con_shownames')); |
---|
40 | $view->paintSecurity(config::get('map_con_security')); |
---|
41 | $view->setOffset(25); |
---|
42 | checkColors('con'); |
---|
43 | break; |
---|
44 | default: exit; |
---|
45 | } |
---|
46 | |
---|
47 | $view->generate(); |
---|
48 | ?> |
---|