<?php
require_once "../../lib/db/config.php";
require_once "../../lib/db/DbSimple/Generic.php";
require_once "functions.php";
require_once "../config.php";

$err=array();

$DB = DbSimple_Generic::connect('mysql://'.$config['db']['login'].':'.$config['db']['pass'].'@'.$config['db']['host'].'/'.$config['db']['name']);
$DB->setErrorHandler('databaseErrorHandler');
$DB->query("SET NAMES 'UTF8'");

function databaseErrorHandler($message, $info) {
	if (!error_reporting()) return;
	$err[]='SQL Error: '.$message;
} 

$mod = "login";
session_start();
$_SESSION=array();
login();

?>