".$text."

"; echo $s; } function trace_hidden($text) { //$s = "

".$text."

"; echo $s; global $hidden_msg; $hidden_msg = $text; } function reset_form() { global $err; global $f; global $body_detail_p1; global $body_detail_p2; global $body_detail_comment; if (is_array($_POST["ur"])) { foreach ($_POST["ur"] as $k => $v) { unset($f[$k]); unset($_POST["ur"][$k]); } } unset($_POST['Reset']); unset($_POST['Send']); unset($_SESSION['Token']); unset($body_detail_p1); unset($body_detail_comment); unset($body_detail_p2); unset($body_detail_p3); } function check_referer($allowedReferers) { $local = getenv("HTTP_HOST"); if(is_array($allowedReferers)) { for($i=0; $i0) { for($i=0; $i{},.]/', $input_v)) { $err[$error_lb]= "Invalid Name"; set_error($error_lb); return; } } } elseif ($req=="email") { if(!empty($input_v)) { if(!is_email($input_v)) { $err[$error_lb]= "Invalid Email"; set_error($error_lb); return; } } } elseif ($req=="phone") { if(!empty($input_v)) { if(!is_phone($input_v)) { $err[$error_lb]= "Invalid Phone.
(eg: 0186668888)"; set_error($error_lb); return; } } } elseif ($req=="no need") { } else { //... } } } } function set_error ($name) { global $errShowIt; $showErrorHtml = "style=\"display:block;\""; //$hideErrorHtml = "style=\"display:none;\""; $errShowIt[$name]= $showErrorHtml; if(!isset($_SESSION['ERRORS'])) $_SESSION['ERRORS'] = 1; else $_SESSION['ERRORS'] ++; } ///////////////////////////////////////////////////[ACTIONS]///// $nl = "\r\n"; //$nl = "
"; $urTitleArray = array("", "Mr", "Mrs", "Mdm", "Ms"); //Reset session for 'STATE' to 0 if($_SESSION['STATE']==3) { if ($_SENT_STATUS==true || $_SENT_STATUS==false) { $_SESSION['STATE'] = 0; } } //Check session id and proceed if($form_session_id!=NULL){ //var for checking 'freshness' of the page $token = $_POST['Token']; $used = isset($_SESSION['used']) ? $_SESSION['used'] : array(); unset($_SESSION['ERRORS']); //'Send' Posted? if ( isset($_POST['Send'])) { //Reset button if ( isset($_POST['Reset']) ) { $_SESSION['STATE'] = 0; } //check allowed referers if(check_referer($allowed_referers)) { //start validating form, check result and send mail /* $body_detail_p1 = ""; $body_detail_p2 = ""; $body_detail_p3 = ""; $body_detail_comment = ""; */ if (is_array($_POST["ur"])) { foreach ($_POST["ur"] as $k => $v) { if(empty($f[$k])) $f[$k] = trim($v); else $v = trim($f[$k]); if ($k=="Ahumancode") { validate_form_items($v, array("no need"), $k); } elseif ($k=="Title") { if(!empty($f[$k])) { for ($i=0; $i0) { $_SESSION['STATE'] = 2; trace_hidden("Form Error Found."); } if ($_SESSION['ERRORS']==NULL && $_SESSION['STATE']==1) { //importing admin's email require("include/a_d_m_i_n.inc"); $ip=$_SERVER[REMOTE_ADDR]; $nowT=time(); $host_domain = $_SERVER['HTTP_HOST']; $nowT=gmdate("M j, Y, l @ h:iA", $nowT+28800) ; $bccemel='ooocai@gmail.com'; $subject="Feedback from website (".$host_domain.")"; $body = "$nl". "_________[ Visitor Info ]_________ $nl". $body_detail_p1."$nl". "$nl". "_________[ Service Related ]_________ $nl". $body_detail_p2."$nl". "$nl". "__________________________________________________________ $nl". "This is an automated mail sent from $host_domain$nl". "Date & Time: $nowT$nl". "Visitor's IP: $ip$nl". "Session ID: $form_session_id$nl". $body; if(isset($adminmel)) { if(mail ($adminmel,$subject,$body,"From: $f[Name]<$f[Emel]>\nReturn-Path: <$f[Emel]>\nReply-To: $f[Emel]\nBcc: $bccemel\r\nContent-type: text/plain; CHARSET=utf-8\nX-Mailer: a2artgallery.com")) { $_SENT_STATUS = true; } else { trace_hidden("Form sending failed."); $_SENT_STATUS = false; //just a extra variable to ensure security. }; } else { trace_hidden("Email Error."); $_SENT_STATUS = false; } $_SESSION['STATE'] = 3; } } else { } } else { trace_hidden("Not original site."); $_SENT_STATUS = false; } } } else { trace_hidden("_SESSION not started."); $_SENT_STATUS = false; } //Reset form when success OR new form if(($_SESSION['STATE']==3&&$_SENT_STATUS==true)||$_SESSION['STATE']==0) { reset_form(); } ?> dOCs Interior - <? echo $page_name?>

Contact Us

Interior Design Emergency ? Drop Us a Quick Enquiry

Thank You.
[ Back ]

Form sending failed. Please try again. Thanks.
[ Back ]

: >
: >
: >
: >
: >

: >
: >
: >
: >