<?php

if (isset($_SERVER['HTTP_REFERER'])){
  $httpreferer=true;
  require_once("../pg_config.php");

  $modultype="ajax_data";

  //set config
  $config = new class_config(); 

  ini_set("register_globals", "Off");
  ini_set("magic_quotes_gpc", "Off");
  ini_set("max_execution_time", "300");

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

  //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");

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

  $ajax_db = new class_db($config,$ajax_page); 

}else{
  echo "Rácsapok a kezedre!";
}
?>