هاست لینوکس

آخرین بسته‌ی MyBB: نسخه‌ی 1.8.27 MyBB منتشر شد


امتیاز موضوع:
  • 1 رأی - میانگین امتیازات: 5
  • 1
  • 2
  • 3
  • 4
  • 5
+++مشاهده ای پی افراد در فرم تماس با ما
#11
کلا دیگه بالا نمیاد صفحه تماس

صفحه سفید میادUndecided
پاسخ
#12
بله تگ ?> را فراموش کرده بودم!

index.php

کد php:
<?php 
//مثال ارسال ایمیل نوشته شده توسط حسین علی نژاد.
//Written by Hossein Alinejad
//ِDownload from http://www.pcwsoft.com
//mail:halinejad@gmail.com
session_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Ajax Mail Form</title>
<style type="text/css">
<!--
.style4 {
    font-size: 9pt;
    font-family: "Courier New", Courier, monospace;
}
.style6 {
    font-size: 9pt;
    font-family: Tahoma, Arial;
    color: #40505E;
    border: 1pt solid #9DACBF;
}
.style7 {
    color: #004F9D;
    font-family: Tahoma, Arial;
    font-size: 9pt;
}
a:link {
    text-decoration: none;
}
a:visited {
    text-decoration: none;
    color: #004F9D;
}
a:hover {
    text-decoration: none;
    color: #FF3300;
}
a:active {
    text-decoration: none;
}
.ttop {
    font-family: Tahoma, Arial;
    font-size: 10pt;
    font-weight: bold;
    color: #3B4956;
}
#Layer1 {    position:absolute;
    left:17px;
    top:18px;
    width:41px;
    height:48px;
    z-index:1;
    background-image: url(loading.gif);
    visibility: hidden;
}
.style10 {color: #004F9D; font-family: Tahoma, Arial; font-size: 8pt; }
a {
    font-family: Tahoma, Arial;
    font-size: 8pt;
    color: #004F9D;
}
.style11 {    color: #4E6272;
    font-family: Tahoma, Arial;
    font-size: 8pt;
}
-->
</style>
</head>
<script language="JavaScript" type="text/javascript" src="post.js"></script>
<body >
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td align="center" nowrap="nowrap"></td>
  </tr>
  <tr>
    <td align="center"><div class="ttop" id="resultd"></div></td>
  </tr>
  <tr>
    <td nowrap="nowrap"><form id="form1" name="form1" method="post" action="">
      <div id="Layer1"></div>
      <table width="38%" border="0" align="center" cellpadding="0" cellspacing="6">
        <tr>
          <td width="20%" valign="top" nowrap="nowrap" class="style7"><label>From :</label></td>
          <td colspan="2"><input name="from" type="text" autocomplete=off class="style6" id="from" size="32" /></td>
        </tr>
        <tr>
          <td valign="top" nowrap="nowrap" class="style7">Subject :</td>
          <td colspan="2"><input name="sbj" type="text" autocomplete=off class="style6" id="sbj" size="32" /></td>
        </tr>
        <tr>
          <td valign="top" nowrap="nowrap" class="style7"><label>Message</label>
            :</td>
          <td colspan="2"><textarea name="msg" cols="43" rows="10" class="style6" id="msg"></textarea></td>
        </tr>
        <tr>
          <td class="style7">&nbsp;</td>
          <td width="13%"><img src="cc/CaptchaSecurityImages.php" class="style6" /></td>
          <td width="67%"><table width="100%" border="0" cellspacing="2" cellpadding="0">
            <tr>
              <td nowrap="nowrap"><span class="style10">Enter Security Code Below:</span></td>
            </tr>
            <tr>
              <td><input name="security_code" autocomplete="off" type="text" class="style6" id="security_code" size="20" /></td>
            </tr>

          </table></td>
        </tr>
        <tr>
          <td><label></label></td>
          <td colspan="2"><input id="sb" name="btn"  type="button" class="style6" onclick="javascript:get(this.parentNode);off('sb');loading(&quot;resultd&quot;);" value="Send" />            </td>
        </tr>
      </table>
    </form>    </td>
  </tr>
  <tr>
    <td align="center"><span class="style11">P30vel Ajax contact form ,</span> <span class="style10">
    Powered by</span> <span class="style11">Eh3an.p <span lang="fa">» </span>
    P30vel.ir ®</span> <span class="style10">Version 1.1</span></td>
  </tr>
</table>
</body>
</html> 
پاسخ
 سپاس شده توسطKarimian (۱۳۹۰/۶/۵، ۲۲:۱۹:۲۶ عصر)
#13
ایمیل طرف میاد ولی جای پیام ارسالی و آی پی اینو میده


$ip \n $msg
پاسخ
#14
با عرض پوزش فراموش کرده بودم فایل process_mail صحیح را در ارسال قبلی قرار دهم.

process_mail
کد php:
<?php
session_start
();
$yourmail="ایمیل خود را وارد کنید";
//----------------------------------
if((isset($_POST["from"]))&&(isset($_POST["msg"]))){
//------------
validation();
//------------
$sender=$_POST["from"];
$ip $_SERVER['REMOTE_ADDR'];
$pms=$_POST["msg"];
$to=htmlspecialchars($yourmail);
$from=htmlspecialchars($sender);
$subject=$_POST["sbj"];
$msg=htmlspecialchars($pms);
$message "$ip \n $msg";
mail($to,$subject,$message,$from) or die("ایمیل ارسال نشد.");
print 
"با تشکر به ایمیل شما به ".$to." ارسال شد.در اولین فرصت رسیدگی خواهد شد";
}

function 
validation()
{
if(
$_SESSION['security_code'] == $_POST['security_code'] && !empty($_SESSION['security_code'] ) ) {
 
//if security is ok.
 
if((isset($_POST["from"]))&&(isset($_POST["msg"]))){
  
$sender=$_POST["from"];
  
$pms=$_POST["msg"];
 if(
strlen($sender)==0)
  die(
"فیلد ایمیل شما خالی است.");
 if(! 
strstr($sender,"@"))
  die(
"آدرس ایمیلتان معتبر نیست."); 
 if(
strlen($pms)==0)
 die(
"شما پیامی برای ارسال ننوشتید .");  
 }
 }
  else {
  die(
"کد امنیتی داخل تصویر را به درستی وارد نکرده اید.");
 }
}
?>
پاسخ
 سپاس شده توسطKarimian (۱۳۹۰/۶/۵، ۲۳:۴۱:۵۰ عصر)
#15
نه عزیز این حرفا چیه
دشمنت شرمنده همین که میای وقت میذاری جواب میدی یک دنیا ارزش داره

ممنون دیگه درست شدHeartHeart
پاسخ
 سپاس شده توسطشماره مجازی (۱۴۰۱/۸/۲۶، ۰۱:۴۹:۰۸ صبح) ، گراف مسنجر (۱۴۰۱/۱۰/۳، ۰۴:۱۱:۲۶ صبح) ، چارتر ۴۲۴ (۱۴۰۲/۹/۱۲، ۱۵:۱۱:۰۷ عصر)


پرش به انجمن:


کاربرانِ درحال بازدید از این موضوع: 1 مهمان