<?php

ini_set("pear_path", $config->getValue("includes_path","")."/PEAR/");
ini_set("register_globals", "Off");
ini_set("magic_quotes_gpc", "Off");
ini_set("max_execution_time", "120");

// error reporting
error_reporting($config->getValue("debug",""));

//REQUEST option
if($_SERVER['REQUEST_METHOD']=='POST'){
	session_cache_limiter('private');
	header('Cache-Control: private,max-age=3600,s-maxage=0,proxy-revalidate',true);
	header('Pragma: no-Cache');
} else {
	header("Cache-Control: no-cache, must-revalidate"); 
	header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); 
}

//UTILS
require_once($config->getValue("includes_path","")."/utils.php");

//EMAIL "class_mail"
require_once($config->getValue("includes_path","")."/class_mail.php");

//DATABASE "class_db"
require_once($config->getValue("includes_path","")."/class_db.php");

//PAGE "class_page"
require_once($config->getValue("includes_path","")."/class_page.php");

$page=new class_page($config,$modultype);
$page->setTemplate($config->getValue("templates_path","")."/default.tmpl.php");

$db = new class_db($config,$page); 

if ($db->getErrorCode()==1){
  die;
}else{

//USER "class_user"
  require_once($config->getValue("includes_path","")."/class_user.php");

  $user = new class_user($config,$db,$page);
}



?>