is_name_valid()) { $error_string[] = $error_name; } if ($MAIANFRIEND->is_email_valid()) { $error_string[] = $error_email; } if ($MAIANFRIEND->is_recipients_valid()) { $error_string[] = $no_emails; } if (!$MAIANFRIEND->is_recipients_valid()) { if ($MAIANFRIEND->check_recipients()) { $error_string[] = $error_friend_email; } } if (ENABLE_CAPTCHA) { include('inc/captcha/php-captcha.inc.php'); if (strlen($code)!=CAP_CHARS || !PhpCaptcha::Validate($code)) { $error_string[] = $index_code_error; } } //-------------------------------------- // See if error string array is empty // If it is not, show errors //-------------------------------------- if (!empty($error_string)) { $tpl_error =& new Savant2(); $MAIANFRIEND->show_error($tpl_error,$charset,$error,$error_string,$return); exit; } //------------------------------------------- // If there are no errors, send messages //------------------------------------------- $unique = array(); $unique = $MAIANFRIEND->get_unique_emails(); //-------------------------------------------------- // Send messages // If no comments have been entered, send default //-------------------------------------------------- foreach ($unique as $send) { if ($MAIANFRIEND->is_comments_valid()) { $MAIANFRIEND->send_default_message($send,WEBSITE_NAME,EMAIL_ADDRESS,str_replace('{name}', $name, $recipient_subject)); } else { $MAIANFRIEND->send_recipient_message($send,WEBSITE_NAME,EMAIL_ADDRESS,str_replace('{name}',$name, $recipient_subject)); } } //----------------------------------------- // If enabled, send message to webmaster //----------------------------------------- if (EMAIL_WEBMASTER) { $MAIANFRIEND->send_webmaster_mail(EMAIL_ADDRESS,$webmaster_subject,WEBSITE_NAME); } //----------------------------------------- // If enabled, send message to visitor //----------------------------------------- if (EMAIL_VISITOR) { $MAIANFRIEND->send_visitor_mail(WEBSITE_NAME,$visitor_subject,EMAIL_ADDRESS); } //------------------------------------------- // Display thanks page and we are all done //------------------------------------------- $tpl_thanks =& new Savant2(); $MAIANFRIEND->show_thank_you($tpl_thanks,$charset,$thankyou,$send_details,$unique,$support,$continue); exit; } include('inc/header.php'); //----------------------------------- // Are we showing referrring page? //----------------------------------- $referer = ''; if (REFERER) { $referer = $_SERVER['HTTP_REFERER']; } //------------------------------- // Is the captcha enabled? //------------------------------- $captcha_code = ''; if (ENABLE_CAPTCHA) { $captcha_code = '
";
print_r($result);
echo "";
}
include('inc/footer.php');
?>