index.php 1.04 KB
Newer Older
Raphael Wintrich's avatar
Raphael Wintrich committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
<?php 
/*
if(isset($_GET['g_path']))
{
	$path = explode('/', $_GET['g_path']);
	//print_r($path);
	
	
	switch ($path[0])
	{
		case 'group' :
			$_GET['page'] = 'bezirk';
			$_GET['bid'] = $path[1];
			$_GET['sub'] = $path[2];
			break;
			
		default:
			break;
	}
	
}
*/
Raphael Wintrich's avatar
Raphael Wintrich committed
23

Raphael Wintrich's avatar
Raphael Wintrich committed
24
require_once 'lib/inc.php';
Matthias Larisch's avatar
Matthias Larisch committed
25 26
addCss('/css/gen/style.css?v='.VERSION);
addScript('/js/gen/script.js?v='.VERSION);
Raphael Wintrich's avatar
Raphael Wintrich committed
27 28 29 30 31 32 33 34 35 36 37 38 39

//importUsers();

getCurrent();
$menu = getMenu();

getMessages();
makeHead();

if(isset($_POST['form_submit']))
{
	if(handleForm($_POST['form_submit']))
	{
Raphael Wintrich's avatar
Raphael Wintrich committed
40
		go('/?page='.getPage());
Raphael Wintrich's avatar
Raphael Wintrich committed
41 42 43
	}
}
$msgbar = '';
Raphael's avatar
Raphael committed
44
$logolink = '/';
Raphael Wintrich's avatar
Raphael Wintrich committed
45 46 47
if(S::may())
{
	$msgbar = v_msgBar();
Raphael's avatar
Raphael committed
48
	$logolink = '/?page=dashboard';
Raphael Wintrich's avatar
Raphael Wintrich committed
49
}
Raphael Wintrich's avatar
Raphael Wintrich committed
50 51 52 53
else
{
	$msgbar = v_login();
}
Raphael Wintrich's avatar
Raphael Wintrich committed
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
/*
 * check for page caching
 */
if(isset($g_page_cache[$_SERVER['REQUEST_URI']][$g_page_cache_mode]))
{
	ob_start();
	include 'tpl/'.$g_template.'.php';
	$page = ob_get_contents();
	Mem::setPageCache
	(
		$page,
		$g_page_cache[$_SERVER['REQUEST_URI']][$g_page_cache_mode]
	);
	ob_end_clean();
	
	echo $page;
}
else
{
	include 'tpl/'.$g_template.'.php';
}