<?php
ini_set('display_errors','1');
error_reporting (E_ALL);
session_start();
setlocale (LC_ALL, 'de_DE');
header('Content-Type: text/html; charset=utf-8');
date_default_timezone_set('Europe/Berlin'); 
$domain = preg_replace('/[^a-z0-9_]/i', '_', strtolower($_SERVER['SERVER_NAME']));
$session_name = "login_admin_".$domain;

if (empty($module)) $module = 'login';

if (isset($_SESSION['backend'][$session_name]) && $_SESSION['backend'][$session_name]){

	if (isset($_POST['toggle_sidebar'])){
		$_SESSION['backend']['toggle_sidebar'] = $_POST['toggle_sidebar'];
	}
	
	if (isset($_POST['toggle_filter'])){
		$_SESSION['backend']['toggle'][$_POST['backend_module'].'_'.$_POST['module']] = $_POST['toggle_filter'];
		$_SESSION['backend']['toggle_filter'] = $_POST['toggle_filter'];
	}
	
	if (isset($_POST['tab'])){
		$_SESSION['backend']['tab'] = $_POST['tab'];
	}
	
}
?>