دوستان, من با استفاده از یه script اماده یه فرمی برای ارسال دعوت ساختم, همه چیز عالی کار میکنه, فقط میخوام موقعی که شخصی این صفحه رو به دوستش ارسال میکنه من هم یک نسخه از این ایمیل رو دریافت کنم. لطفا راهنماییم کنید.
این لینک فرم: http://www.jcspa.com/scripts/refer/pda.php
اینم کد PHP
<?php
error_reporting(E_ALL&(~E_NOTICE));
session_start();
/*
*/
################################# Configuration Options ###################################
$mailtype="text/html"; // "text/html" or "text/plain";
$verification=true; // true or false - to display verification code or not
$subject="%FNAME% says: Interested in PDA?";
############# Do not change anything below unless you know what you are doing ##############
function send_mail($from,$to,$subject,$message,$ctype='text/html')
{
$mail_mime .= "MIME-Version: 1.0\n";
$mail_mime .= "Content-Type: $ctype;\n";
$texte .=$message;
if(!mail($to, $subject, $texte,"Reply-to: $from\nFrom: $from\n".$mail_mime)) echo ("Cannot send mail.");
}
//same function like in JS
function display_code($seed,$seed2)
{
$code="";
$code=($seed * 8 - 39) - ($seed*7 +78);
$code=$code-$seed2;
if($code<0) $code=0-$code;
return $code;
}
if(!empty($_POST[ok]))
{
$all_ok=1;
if($verification)
{
//check verification code
$scode=display_code($_SESSION[seed],$_SESSION[seed2]);
if($scode!=$_POST
این لینک فرم: http://www.jcspa.com/scripts/refer/pda.php
اینم کد PHP
<?php
error_reporting(E_ALL&(~E_NOTICE));
session_start();
/*
*/
################################# Configuration Options ###################################
$mailtype="text/html"; // "text/html" or "text/plain";
$verification=true; // true or false - to display verification code or not
$subject="%FNAME% says: Interested in PDA?";
############# Do not change anything below unless you know what you are doing ##############
function send_mail($from,$to,$subject,$message,$ctype='text/html')
{
$mail_mime .= "MIME-Version: 1.0\n";
$mail_mime .= "Content-Type: $ctype;\n";
$texte .=$message;
if(!mail($to, $subject, $texte,"Reply-to: $from\nFrom: $from\n".$mail_mime)) echo ("Cannot send mail.");
}
//same function like in JS
function display_code($seed,$seed2)
{
$code="";
$code=($seed * 8 - 39) - ($seed*7 +78);
$code=$code-$seed2;
if($code<0) $code=0-$code;
return $code;
}
if(!empty($_POST[ok]))
{
$all_ok=1;
if($verification)
{
//check verification code
$scode=display_code($_SESSION[seed],$_SESSION[seed2]);
if($scode!=$_POST
کد:
)
{
$all_ok=0;
}
//clear the seeds from session
$_SESSION[seed]="";
$_SESSION[seed2]="";
}
}
if($all_ok)
{
//actually send it
$subject=str_replace("%FNAME%",$_POST[yourname],$subject);
$message="Hello $_POST[friendname],<p>
This is $_POST[yourname],I thought you might be interested in PDA so I am sending this brief introduction to the association and how you could benefit from becoming a PDA member.<p>
Our profession seems to change almost daily. But one thing does not change: The importance of pertinent and trustworthy information remains paramount. For decades, PDA has provided professionals like us with professional and career development resources full of information to help us deliver effective medicines as quickly and safely as possible.<p>
What would you get by becoming a PDA member? You would interact with our member network of approximately 24,000 professional peers. You would qualify for significant member discounts on almost all PDA offerings. You would have access to exclusive “Members-only” functions of our website, such as the Job Bank and Membership Directory. And you would receive practical and informative publications, such as PDA’s official publication, the scholarly, multidisciplinary peer-reviewed “Drug Information Journal,” and member newsletter, “PDA Today.”<p>
What would you pay to become a PDA member? Annual membership costs $130 (US), 130 Euros, or 14,000 yen, plus pertinent taxes in Europe and Japan.<p>
I invite you to learn more about the benefits of becoming a PDA member by visiting www.pda.org/join or by contacting [email protected] for more information.
\n\n<br><br>";
$message.=nl2br($_POST[message]);
send_mail($_POST[youremail],$_POST[friendemail],$subject,$message);
echo "<script language=\"javascript\">
alert('Thank you! Your email has been sent');
window.location='$_POST[url]';
</script>";
}
else
{
//prepare the URL
if($_GET[comefrom])
{
$url=str_replace("^^^","&",$_GET[comefrom]);
}
else
{
$url=$_SERVER[HTTP_REFERER];
}
//prepare 2 seed numbers
$seed=mt_rand(1000,9999);
$_SESSION[seed]=$seed;
$seed2=mt_rand(1000,9999);
$_SESSION[seed2]=$seed2;
//display the page
require_once("refer.html");
}
?>