sql_query("select * from faq order by position"); $faq = $db->fetched_array(); $smarty->assign('faq',$faq); //diseases $db->sql_query("select * from diseases where new='1' order by position"); $diseases = $db->fetched_array(); $smarty->assign("diseases",$diseases); //solutions $db->sql_query("select * from solutions where new='1' order by position"); $solutions = $db->fetched_array(); $smarty->assign("solutions",$solutions); if(isset($_POST['fullname']) and isset($_POST['question']) and isset($_POST['email'])) { $db->sql_query("select * from vars where id='admin_email'"); $email = $db->fetch_item("value"); $to_email=$email; $subject = "Ask a Question Form Submission from ".S_PROJECT_NAME; $from_name = S_PROJECT_NAME; $from_email = "noreply@detamed.xi-digital.com"; $to_name = "Website administrator"; $headers = "From: $from_name<$from_email>\n"; $headers .= "Reply-To: <$from_email>\n"; $headers .= "MIME-Version: 1.0\n"; $message = "Contact form has been submited by ".$_POST['fullname'].", ".$_POST['email']."\n\n\n"; $message .= "Full Name: ".$_POST['fullname']."\n"; $message .= "E-Mail: ".$_POST['email']."\n"; $message .= "Question: ".$_POST['question']."\n"; //mail("$to_name<$to_email>", $subject, $message, $headers); $displaymessage=""; $smarty->assign("message",$displaymessage); } $smarty->display('faq.html'); ?>