اگه كيشه بهم بگين ايراد اين فرم كجاست كه نه ارسال ميكنه و نه نوشته هاى بالاى اون از بين ميره اگه ميشه به صورت نقل قول به من جواب بديد ممنون ميشم فقط زود باشيد و درست شده اون رو يا آپديت كنيد يا به ايميل من ارسال يا تو همين مبحث قرار بدين
کد:
<?php
$admin_email = "[EMAIL="[email protected]"][email protected][/EMAIL]";
if(isset($_POST['submit_msg']))
{
if (empty($HTTP_POST_VARS['name_msg'])){
die('<p><p><center><font face="Tahoma" color="#003399" style="font-size: 9pt"><h1><i>Error!</i></h1><font color="#ff0000"> <br>علت : شما نام خود را در فرم وارد نکرده اید</font><br><br><span style="cursor:hand" ONCLICK="window.history.go(-1);">بازگشت به فرم</span><center></font>');
};
{ if (empty($HTTP_POST_VARS['email_msg'])){
die('<p><p><center><font face="Tahoma" color="#003399" style="font-size: 9pt"><h1><i>Error!</i></h1><font color="#ff0000"> <br>علت : شما ایمیل خود را وارد نکرده اید</font><br><br><span style="cursor:hand" ONCLICK="window.history.go(-1);">بازگشت به فرم</span><center></font>');
};
{ if (empty($HTTP_POST_VARS['msg_body'])){
die('<p><p><center><font face="Tahoma" color="#003399" style="font-size: 9pt"><h1><i>Error!</i></h1><font color="#ff0000"> <br>علت : شما پیامی برای ارسال ننوشته اید</font><br><br><span style="cursor:hand" ONCLICK="window.history.go(-1);">بازگشت به فرم</span><center></font>');
};
$name_msg = htmlspecialchars($HTTP_POST_VARS['name_msg']);
$name_msg = str_replace("&","&",$name_msg);
$name_msg = str_replace("ی","ي",$name_msg);
$msg_body = htmlspecialchars($HTTP_POST_VARS['msg_body']);
$msg_body = str_replace("&","&",$msg_body);
$msg_body = str_replace("ی","ي",$msg_body);
$msg_body = nl2br($msg_body);
if (!empty($HTTP_POST_VARS['url_msg']))
{
$url_msg = str_replace('http://','',$_POST['url_msg']);
$name_msg = "<a target=_blank href=http://".htmlspecialchars($url_msg).">".$name_msg."</a>";
}
if(!strpos($_POST['email_msg'],"@"))
{
print('<p><p><center><font face="Tahoma" color="#003399" style="font-size: 9pt"><h1><i>Error!</i></h1><font color="#ff0000"> <br>علت : شما ایمیل را صحیح وارد نکرده اید</font><br><br><span style="cursor:hand" ONCLICK="window.history.go(-1);">بازگشت به فرم</span><center></font>');
die('<br><br><center><font face="Tahoma" style="font-size: 9pt">مثال : [EMAIL="[email protected]"][email protected][/EMAIL] </center></font>');
};
$from = htmlspecialchars($HTTP_POST_VARS['email_msg']);
$body = '<html>
<head>
<title>نظر جدید برای ارسال به سایت</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Language" content="fa">
</head>
<body>
<table border="1" width="100%" text="#000000" style="font-family:tahoma;font-size:8pt;padding:7px;border-style: dashed; border-width: 3px" bgcolor="#D6DFF7" bordercolor="#D6DFF7" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2" align="center" bgcolor="#D6DFF7">=> نظر جدید <=</td>
</tr>
<tr>
<td width="85%" bgcolor="#FFFFFF" align="right">'.$name_msg.'</td>
<td width="15%" bgcolor="#D6DFF7" dir="rtl">نام و آدرس وب : </td>
</tr>
<tr><td width="85%" bgcolor="#FFFFFF" align="right">'.$msg_body.'</td>
<td width="15%" bgcolor="#D6DFF7" dir="rtl">متن نظر ارسالی : </td>
</tr>
</table>
</body>
</html>';
if(!mail($admin_email,'New Contact us',$body,"From: <$from>\n"."MIME-Version: 1.0\n"."Content-type: text/html; charset=utf-8"))
{
print('<p><p><center><font face="Tahoma" color="#003399" style="font-size: 9pt"><h1><i>The Mail Could not be send!</i></h1><font color="#ff0000"> <br>ارسال ایمیل با مشکل رو بروست لطفا دوباره تلاش کنید و یا بعدا مراجعه نمایید</font><br><br><span style="cursor:hand" ONCLICK="window.history.go(-1);">بازگشت به فرم</span><center></font>');
}else
{
print('<p><p><center><font face="Tahoma" color="#003399" style="font-size: 9pt"><h1><i>Tank You!</i></h1><font color="#ff0000"> <br>پیام شما با موفقیت برای مدیر سایت ارسال شد</font><br>از ارسال شما متشکریم ، نظرات شما منبع اصلی تغییرات در سایت می باشد<br><br><span style="cursor:hand" ONCLICK="window.history.go(-1);"> بازگشت به فرم تماس با ما </span>| <a href="[URL]http://www.js4ir.com[/URL]" target="_blank">powered by js4ir.com</a><center></font>');
}
}
else
{
?>
<html dir="ltr">
<head>
<title>نظر جدید برای ارسال به سایت</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Language" content="fa">
<meta name="Geo.Country" content="IR">
<meta name="Robots" content="all">
<meta http-equiv="Page-Enter" content="blendTrans(Duration=1.0)">
<meta http-equiv="Page-Exit" content="blendTrans(Duration=1.0)">
<style>
#fa {font-family:tahoma;font-size:8pt}
</style>
</head>
<body>
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="605" height="491" id="fa" style="border: 3px dashed #9AABE7" bgcolor="#9AABE7">
<tr>
<td rowspan="5"> </td>
<td> </td>
<td height="268" rowspan="5"> </td>
</tr>
<tr>
<td style="border-style: dashed; border-width: 3px" bgcolor="#D6DFF7" bordercolor="#D6DFF7">
<table border="0" width="100%" cellspacing="0" cellpadding="0" id="fa" height="100%">
<tr>
<td>
<p align="center"><font color="#0000FF">ثبت نظرات</font></td>
</tr>
</table>
</td>
</tr>
<tr>
<td >.</td>
</tr>
<tr>
<td style="border-style: dashed; border-width: 3px;padding-right:5px;padding-left:5px" bgcolor="#FFFFFF" bordercolor="#FFFFFF" dir="rtl" align="right">
<p>مطالب زیر را به دقت بخوانید!</p>
<p>1 . لطفا تمام فیلد ها را برای ارسال پر کنید.</p>
<p>2 . به نظرات شما در اسرع وقت پاسخ داده خواهد شد.</p>
<p>3 . از ارسال نظر شما متشکرم.</p>
<p dir="rtl" align="right">4 . نظرات شما منبع تغییرات در سایت می باشد.</td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
<td valign="top" style="border: 3px dashed #D6DFF7" bgcolor="#D6DFF7"><form name="msg_form" method="POST" >
<table border="0" width="100%" cellspacing="0" cellpadding="0" id="fa" height="201">
<tr><td><input name="name_msg" size="33" id="fa" dir="ltr" tabindex="1" maxlength="30" lang="fa" style="float: right" value="" onclick="this.value=''"></td>
<td width="146" dir="rtl" align="left">نام شما *: </td></tr><tr><td>
<input name="url_msg" size="21" dir="rtl" tabindex="2" maxlength="30" id="fa" style="float: right" value="" onclick="this.value=''"></td>
<td width="146" dir="rtl" align="left">نام سایت : </td></tr>
<tr><td><input name="email_msg" size="33" dir="ltr" tabindex="3" maxlength="30" id="fa" style="float: right" value="" onclick="this.value=''"></td>
<td width="146" dir="rtl" align="left">ایمیل شما *: </td></tr>
<tr><td align="right"><textarea rows="6" name="msg_body" cols="53" dir="rtl" id="fa" tabindex="4" lang="fa" onclick="this.value=''"></textarea></td>
<td width="146" dir="rtl" align="left">نظر یا درخواست شما *: </td></tr>
<tr><td>
<input type="submit" value="ارسال نظر" name="submit_msg" tabindex="5" id="fa" style="float: right" ><!--><input type="reset" value="دوباره" name="reset" tabindex="5" id="fa" style="float: right" ><!--></td>
<td width="146"> </td></tr>
</table>
</td></form>
<td height="207"> </td>
</tr>
<tr>
<td width="60"> </td>
<td width="491" align="center"><!--><center><script type="text/javascript" link="[URL]http://www.hezare.tk">copyright=new[/URL] Date();update=copyright.getFullYear();document.write("CopyRight 2007 - " + update + " - Powered and Designed by hezare.tk");</script></center><!--></td>
<td height="22" width="54"> </td>
</tr>
</table>
</div>
<?php
}
?>
</body>
</html>:)