<?php
//================================================================
// Systeminformationen
//================================================================
$off = $GLOBALS['config_vars']['Sys_on'];
$on  = $GLOBALS['config_vars']['Sys_off'];
$undef = $GLOBALS['config_vars']['Sys_notcheckable'];
$maxupload = str_replace(array('M','m'), '', @ini_get('upload_max_filesize'));
$mysqlversionc = $GLOBALS['db']->mysql_version();

switch(@$_REQUEST['action'])
{
	case '':
	break;
	
	case 'clearcache':
		$_REQUEST['noout'] =1;
		clearCache();
	break;
	
	case 'cleartplcache':
		$_REQUEST['noout'] =1;
		clearTplCache();
	break;
	
	case 'db_options':
		$_REQUEST['noout'] =1;
		db_options($_REQUEST['what'],$config['dbprefix']);
	break;
	
}


//================================================================
// Neueste Benutzer
//================================================================
include_once(BASE_DIR . 'admin/class/class.user.php');
$user = new Users;

//================================================================
// Aktive Bereiche
//================================================================
include_once(BASE_DIR . 'admin/class/class.settings.php');
$settings = new Settings;
$GLOBALS['tmpl']->assign('ActiveAreas', $settings->ActiveAreas());

//================================================================
// Koobi-News
//================================================================
$url = "http://www.dream4.de/cms/koobi_extern_news/index.html";
$f = 1;
$c = 2;
$r = NULL;
$a = NULL;
$cf = NULL;
$pd = NULL;
$page = '';//open_page($url,$f,$c,$r,$a,$cf,$pd);


$GLOBALS['tmpl']->assign('magicquotes', (@ini_get('magic_quotes_gpc') == 1) ? $on : $off);
$GLOBALS['tmpl']->assign('maxmemory', (@ini_get('memory_limit')!='') ? @ini_get('memory_limit') : $undef);
$GLOBALS['tmpl']->assign('maxupload', file_size($maxupload * 1024));
$GLOBALS['tmpl']->assign('phpversion', (@PHP_VERSION != "") ? @PHP_VERSION : $undef);
$GLOBALS['tmpl']->assign('disabledfunctions', (strlen(ini_get('disable_functions')) > 1) ? @ini_get('disable_functions') : $undef);
$GLOBALS['tmpl']->assign('safemode', (@ini_get('safe_mode') == 1) ? $on : $off);
$GLOBALS['tmpl']->assign('mysqlversion', ($mysqlversionc!="") ? $mysqlversionc : $undef);
$GLOBALS['tmpl']->assign('max_execution_time', @ini_get('max_execution_time'));
$GLOBALS['tmpl']->assign('magic_quotes_runtime', (@ini_get('magic_quotes_runtime') == 1) ? $on : $off);
$GLOBALS['tmpl']->assign('magic_quotes_sybase', (@ini_get('magic_quotes_sybase') == 1) ? $on : $off);
$GLOBALS['tmpl']->assign('koobi_news',$page);
$GLOBALS['tmpl']->assign('last_user', $user->UserOverview('new'));
$GLOBALS['tmpl']->assign('db_fields', Tabellen($config['dbprefix']));
$GLOBALS['tmpl']->assign('koobi_version', KOOBI_VERSION);
$GLOBALS['tmpl']->assign('apache_modules', (function_exists('apache_get_modules')) ? apache_get_modules() : 'Function not available on this Server!');
$GLOBALS['tmpl']->assign('all_user', getUserCount());
$GLOBALS['tmpl']->assign('shop_articles', getShopCount());
$GLOBALS['tmpl']->assign('shop_ordercount', getShopOrderCount());
$GLOBALS['tmpl']->assign('NewForumPosts',getLastPostsStartpage());
$GLOBALS['tmpl']->assign('content', $GLOBALS['tmpl']->fetch($GLOBALS['config']['source'] . '/start.tpl'));
?>