isLoggedIn()) { $user_name = $privs->getName(); $user_email = $privs->getEmail(); } $page_title = "P R O P A G A N D A"; $buttonText = "S E N D"; $errorMsg = ""; $pass = 1; $contentQuery = "SELECT sn.title, sn.blurb, snc.id AS section FROM spud_news sn, spud_news_category snc, spud_news_map snm WHERE sn.id = $id AND sn.id = snm.news_id AND snm.category_id = snc.id"; $feature_data = new dbInterface($DB_NAME, $DB_USER, $DB_PASS, $contentQuery); $feature = $feature_data->getRow(); $feature["url"] = $SITEURL.'article/'.$id.'/'.$feature["section"].'/'; $userNameText = "Your Name:"; $userEmailText = "Your Email:"; $friendEmailText = "Friend's Email:"; $messageText = "Message"; // If the submit button was pushed the folowing happens. if ($submit == $buttonText) { // Validation for the message field. Fails on empty string. $valObj = new validation(); $valObj->check_field("Comment", $message_body, 1, ALPHANUM_PUNCT, 1, 1000); $valObj->check_field("Your Name", $user_name, 1, ALPHANUM_PUNCT, 1, 30); $valObj->check_field("Your Email", $user_email, 1, EMAIL, 2, 35); $friendsEmail = split (',', $to_email); for ($i = 0; $i <= end($friendsEmail); $i++) { $valObj->check_field("Friend's Email", $friendsEmail[$i], 1, EMAIL, 2, 35); } //$valObj->check_field("Friend's Email", $to_email, 1, EMAIL, 2, 35); // If the data passes validation if ($valObj->num_errors() == 0) { $message = ereg_replace("\\\\", "", $message_body); $subject = 'A '.$SITENAME.' Recomendation'; $body = $user_name.' thought you might find "'.$feature["title"]."\" stimulating:\n\n\"".$message."\"\n\n".$feature["blurb"]."\n\nSee more at:\n".$feature["url"].$MAIL_FOOTER; $mail_result = mail($to_email, $subject, $body, "From: $user_name <$user_email>\nReply-To: $user_email\nBcc: colin@lavconsulting.com\n\n"); if ($mail_result) { header ("Location: ".$feature["url"]."\n\n"); exit; } else { $errorMsg .= 'Email did not get sent'; error_log("The Email did not get sent.\n$user_email", 1, $erroremail); } } } eval($layout->getLayout('Header', 'Standard')); ?>

Have a friend, or hell, an enemy that you want to send this to because they'll either love it, or it'll drive them wild? Send it on! We don't mind. You're doing our work for us, and we'll love you more than any other site, if you'll do it.

'.$valObj->draw_errors().''; } ?>
*
*
*
(To send to more than one address, seperate each address with a comma.)
 *
* Fields marked with an * are required.
getLayout('Footer', 'Standard')); ?>