sql = new MySQLconnect; $smarty->browser = new Browser; $smarty->compile_check = true; $smarty->caching = 0; // 1 is on for 1 hour $smarty->template_dir = $_SERVER['DOCUMENT_ROOT'].'/frontend'; $smarty->compile_dir = $_SERVER['DOCUMENT_ROOT'].'/cached/frontend_c'; $smarty->plugins_dir[] = $_SERVER['DOCUMENT_ROOT'].'/libs/custom_plugins'; // get lang existing languages if (isset($_GET['lang'])) { foreach($allLangs as $l) { if ($l == $_GET['lang']) $lang = $_GET['lang']; } } if (!isset($lang)) $lang= $allLangs[0]; define("LANG", $lang); // end get lang // set default vars $smarty->assign("lang",$lang); if (!isset($_GET['param'])) { $params = explode('/',$_SERVER['REQUEST_URI']); array_shift($params); }else { $params = explode("/", $_GET['param']); } $smarty->assign("_GET", $params); $smarty->assign("_ROOT",'/frontend/'); // custom $smarty->assign("custom_urls",$custom_urls); $smarty->assign("_COMPANYNAME",$companyname); $smarty->debugging = false; $smarty->display('index.tpl'); ?>