set_file("_common","./templates/contactUs.htpl"); global $siteMail,$siteName,$siteAddress; if(isset($_POST['email'])) { $error = ''; $i=0; if (!eregi("^[a-zA-Z0-9_\.]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$", $_POST['email'])) $error .= "البريد الذي أدخلته غير صحيح
\n"; if (empty($_POST['name'])) $error .= "لم يتم إدخال الاسم
\n"; if(empty($_POST['content'])) $error .= "لم يتم إدخال المحتوي
\n"; if(empty($_POST['securecode']) || $_POST['securecode'] != $_SESSION['securecode']) $error .= "الكود غير صحيح
\n"; if($error == '') { if(strrpos($_POST['content'],$siteAddress) === false) { $_POST['content'] .= "\n ".$siteAddress.""; } sendMail($siteMail,"رسالة من نموذج أتصل بنا علي شبكة المسلم", "الاسم : ".$_POST['name']."\n البريد الإلكتروني :".$_POST['email']."\nالمحتوي : \n".$_POST['content'],"plain"); header("Location: ./index.php?msg=2"); exit; } else { $t->set_var("errors",$error); $t->set_var($_POST); } } else { $t->set_var("errors",""); $t->set_var("content",""); } //-------------------- mainFram( 1,"اتصل بنا"); ?>