neededAccessLevel = 3; // default module if $_GET['mod'] is not set if(!$_GET['mod']) $_GET['mod'] = DEFAULT_MODULE; if($_GET['mod']) //include selected module if(is_file($init->path_modules."mod_".$_GET['mod']."/".$GLOBALS['location']."index.php")){ include $init->path_modules."mod_".$_GET['mod']."/".$GLOBALS['location']."index.php"; } else{ // Show warning message if selected module does not exist $basic->error_vars = array($_GET['mod']); $basic->addError(_NO_MODULE, $basic->error_vars); } $tpl = $templates->tplRead(); // retrieve HTML code from template file // Array with keywords which is used in the template and corresponding values for replacement if($sendMail==1){ $DBemail=$dataBase->getTableValue("t_contacts", "email", 1); $subject = "Online Contact Form"; $headers = "From: ".stripslashes($HTTP_POST_VARS['firstname'])." ".stripslashes($HTTP_POST_VARS['lastname'])." <".stripslashes($_POST['email']).">\r\n"; $message=""; $message.=_FORM_SENDER_IP.": ".$GLOBALS['REMOTE_ADDR']."\n\n"; $message.=_YOUR_FIRSTNAME.": ".stripslashes($HTTP_POST_VARS['firstname'])."\n"; $message.=_YOUR_LASTNAME.": ".stripslashes($HTTP_POST_VARS['lastname'])."\n"; $message.=_YOUR_PHONE.": ".stripslashes($HTTP_POST_VARS['phone'])."\n"; $message.=_YOUR_EMAIL.": ".stripslashes($HTTP_POST_VARS['email'])."\n"; $message.=_YOUR_ADDRESS.": ".stripslashes($HTTP_POST_VARS['address']).", ".stripslashes($HTTP_POST_VARS['address_zip'])."\n\n"; $message.="".stripslashes($HTTP_POST_VARS['description'])."\n"; $send=@mail($DBemail, $subject, $message, $headers); $dataBase->setEmailLog($_POST['firstname']." ".$_POST['lastname'], $_POST['email'], $_POST['phone'], $_POST['address'], $_POST['address_zip'], '6'); } if(!$dataBase->getTableValue("t_config", "value", "dd_show", "field")) $dd_show = false; else $dd_show = true; $arr = array( 'errors' => $basic->printError(), 'messages' => $basic->printMessage(), 'content' => $content, 'content2' => $content2, 'content3' => $content3, 'path' => $templates->template_path, 'dir' => $GLOBALS['dir'], 'lang_path' => $_SESSION['cur_lang'], 'IEpageTitle' => ($IEpageTitle)?$IEpageTitle:$pageTitle, 'pageTitle' => strtoupper($pageTitle), 'pageTitle2' => strtoupper($pageTitle2), 'pageTitle3' => strtoupper($pageTitle3), 'meta_keywords' => ($meta_keywords)?$meta_keywords:DEFAULT_META_KEYWORDS, 'meta_description' => ($meta_description)?$meta_description:DEFAULT_META_DESCRIPTION, 'copy' => $basic->copyrightYears(COPY_FORM), 'adminMenu' => ($users->userAccessLevel() <= $users->neededAccessLevel)?'ADMIN PANEL
':'', 'footer_mail' => $dataBase->getTableValue("t_config", "value", "email", "field"), 'footer_phone' => $dataBase->getTableValue("t_config", "value", "phone", "field"), 'dd' => $dd_show, 'header' => $basic->headers(), 'preImages' => $preImages, 'blocks' => $dataBase->blocks(), ); $tpl = $templates->tplReplace($tpl,$arr); $trans = array ( 'src="templates' => 'src="'.$basic->backPath().'templates', 'src="uploads' => 'src="'.$basic->backPath().'uploads', "src = 'uploads" => "src='".$basic->backPath()."uploads", 'href="templates' => 'href="'.$basic->backPath().'templates', 'background="templates' => 'background="'.$basic->backPath().'templates', '[space]' => ' ', ); $tpl = strtr($tpl, $trans); // echo $SCRIPT_NAME."?".$QUERY_STRING."
"; // echo $GLOBALS['REQUEST_URI']; // produce final HTML of form after replacements echo $templates->tplPrint($tpl); ?>