//error_reporting(E_ALL);
error_reporting(E_ALL & ~E_NOTICE);
//ini_set('error_reporting', E_ALL);
session_start();
$time_start = microtime(true);
if ($_GET['dbg']=='on') $_SESSION['dbg'] = 1;
elseif($_GET['dbg']=='off') $_SESSION['dbg'] = 0;
include "include/config.php";
include "include/phpdtools.php";
include "include/elements.php";
include "include/rewrite.php";
include "include/other.php";
if ($_GET['qq']) {
$_SESSION['qq'] = 1;
if ($_SESSION['qq']) {
ini_set('error_reporting', E_ALL);
error_reporting(E_ALL ^ E_NOTICE);
}}
//set_order_points(8, 1);
if (!get_cks('ses')) set_cks('ses', session_id());
$nocart = (int)mysql_dw('cart', "ses='".esc1($_SESSION['ses'])."' && ido=0", 'SUM(no)');
$emailSend = mysql_dw("admin", 1, "email");
$emailReq = mysql_dw("admin", 1, "email_req");
$phoneHeader = mysql_dw("admin", 1, "tel");
$faxHeader = mysql_dw("admin", 1, "fax");
$breadcrumb[$ladr] = "Home";
$template = 'layout'; // default template
$page = 'home'; // default page
$seo = array (
'title'=> $site_name,
'keywords'=> '',
'description'=> '',
);
include "routes/route.php";
include "controllers/menus.php";
@include 'controllers/'.$page.'.php';
//echo $page;
//--------------------------------------------------------------
if (!$content) $content = $page;
$time_model = microtime(true);
include $view.$template.'.php';
//set_stats();
//----------------------------------------------------------------
if ($dbg_site){
echo "[model|template|content|view] = [$page|$template|$content|$_SESSION[view]]";
pr2($aurl, '$aurl
$self=['.$self.']
$ruri=['.$ruri.']
$sget=['.$sget.']');
pr2($cart, '$cart');
pr2($_COOKIE, '$_COOKIE');
pr2($_SESSION, '$_SESSION');
pr2($get, '$get');
pr2($_POST, '$_POST');
pr2($user, '$user');
pr2($_SERVER, '$_SERVER');
}