#
# Refer Page v1.0 (c)2000 Blake McDonald (webmaster@dark-library.com)
# Get this cript and more at www.phpnewbie.net
#
// log file and date output, these proabably won't have to be changed
$log_file = "referrer.txt";
$date_output = date("n/j/y h:i:s A");
// Config the email sent out here!
// The key of the codes you can use in the email are below.
// Please test out a message to make sure it's what you want before you put it up on your site.
/*
$date_output
this is the date the refer of the page was sent
$url
this is the URL that the person is sending
$senders_name
this is the name of the person sending email to someone
$senders_email
this is the email address of the sender
$emails
this is the list of email(s) of the people the send is referring
$message
this is the message the persons types and sends along with the link
*/
// now below you can use those above codes to put information into the emails
################### config the emails here! ###################
// put what you want the title of the email to be here
$send_refer_Email_message_title = "NMKarate - Message sent from $senders_name";
// put in what you want the email it's self to say here
$send_refer_Email_message = "Sent on $date_output:
$senders_name <$senders_email> is interested in joining the organization.
They have also left the following message:
$message";
################### STOP! ###################
?>
Send this NM Karate page to a friend
if(empty($message)) {
$message = htmlspecialchars("I am interested in joining your organization! Please send me more information!");
}
if(!empty($send)){
if(empty($senders_name) || empty($senders_email) || empty($senders_phone) || empty($senders_besttime) || empty($message)) {
echo "The following errors have occured.
";
if(empty($message)){ echo "You didn't enter a message
"; }
if(empty($senders_name)){ echo "You didn't enter your name
"; }
//if(empty($emails)){ echo "You didn't enter any emails to send it to
"; }
if(empty($senders_email)){ echo "You didn't enter your email
"; }
if(empty($senders_phone)){ echo "You didn't enter your phone number
"; }
if(empty($senders_besttime)){ echo "You didn't enter the best time to call
"; }
echo "
Please fix them and try again.";
$error = "yes";
} else {
$email_to = "kenlee104@hotmail.com";
$message = stripslashes($message);
$senders_name = stripslashes($senders_name);
mail("$email_to", "$send_refer_Email_message_title", "$send_refer_Email_message", "From: <$senders_email>");
$message = str_replace ("\r\n","
", $message);
$to_log = "$date_output|::|$url|::|$senders_name|::|$senders_email|::|$emails|::|$message|::|\n";
// logs the email
$fp = fopen($log_file, "a");
$fw = fwrite($fp, $to_log);
fclose($fp);
echo "Thank you! Your message has been sent. Please close this window.";
}
}
if(empty($send) || $error == "yes"){
$message = stripslashes($message);
$senders_name = stripslashes($senders_name);
echo "";
}
?>