Here are the scripts involved:
<?php
include_once("configure.php");
////////////////////
///Display Header///
////////////////////
function displayHeader() {
global $contacttitle, $bannerurl, $bannerwidth, $bannerheight, $header, $border, $theme;
if ($header) {
echo "<html><head>\n";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">\n";
echo "<title>$contacttitle</title>\n";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"themes/$theme\">\n";
echo "</head>\n";
echo "<body>\n";
echo "<p align=\"center\"><img src=\"$bannerurl\" border=\"$border\" width=\"$bannerwidth\" height=\"$bannerheight\" alt=\"$contacttitle\"></p>\n";
echo "<p align=\"center\"><b>$contacttitle</b></p>\n";
echo "<hr size=\"1\" width=\"500\">\n";
}
else
{
echo "<html><head>\n";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">\n";
echo "<title>$contacttitle</title>\n";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"themes/$theme\">\n";
echo "</head>\n";
echo "<body>\n";
echo "<p align=\"center\"><b>$contacttitle</b></p>\n";
echo "<hr size=\"1\" width=\"500\">\n";
}
}
/////////////////////
///End of function///
/////////////////////
////////////////////////////////////////////////////////////
///Display Footer - Please DO NOT remove this information///
////////////////////////////////////////////////////////////
function displayFooter() {
echo "<hr size=\"1\" width=\"500\">\n";
echo "<br><p align=\"center\"><font size=\"1\" face=\"Verdana\">\n";
echo "Powered by </font><a class=\"footer\" href=\"http://www.maiandream.co.uk/scripts.php\" target=\"_blank\" title=\"Maian_Mail v1.2\">\n";
echo "<font size=\"1\" face=\"Verdana\">Maian_Mail v1.2</font></a></p>\n";
echo "</body>\n";
echo "</html>\n";
}
/////////////////////
///End of function///
/////////////////////
///////////////////////////
///Error Display Message///
///////////////////////////
function errorDisplay() {
global $form_error, $form_return;
echo "<p align=\"center\">$form_error</p>\n";
echo "<p align=\"center\"><a href=\"javascript:history.go(-1)\" title=\"$form_return\">$form_return</a></p>\n";
displayFooter();
exit;
}
/////////////////////
///End of function///
/////////////////////
///////////////////////////////
///Thank you display message///
///////////////////////////////
function thankYou() {
global $form_thanks, $form_message;
echo "<div align=\"center\"><center>\n";
echo "<table border=\"0\" width=\"500\">\n";
echo " <tr>\n";
echo " <td><p align=\"center\"><br>$form_thanks</p>\n";
echo " <p align=\"center\">$form_message<br>\n";
echo " </td>\n";
echo " </tr>\n";
echo "</table>\n";
echo "</center></div>\n";
displayFooter();
exit;
}
/////////////////////
///End of function///
/////////////////////
////////////////////////////////////
///Check for valid e-mail address///
////////////////////////////////////
function validEmail() {
global $form_emailerror, $email, $form_return;
$email = $_REQUEST['email'];
if (!eregi("([a-z]|[0-9]|.|-|)+@([a-z]|[0-9]|.|-|)+.([a-z]|[0-9]){2,3}$", $email, $arr_vars))
{
echo "<p align=\"center\">$form_emailerror</p>\n";
echo "<p align=\"center\"><a href=\"javascript:history.go(-1)\" title=\"$form_return\">$form_return</a></p>\n";
displayFooter();
exit;
}
else
{
return false;
}
}
/////////////////////
///End of function///
/////////////////////
///////////////
///Send Mail///
///////////////
function sendMail() {
global $name, $email, $send_options, $subject, $recipient_send, $comments, $owner, $siteurl, $sitename, $siteemail,
$email_message, $email_subject, $auto_vis_subject, $auto_vis_message, $auto_vis_message_array, $copy;
$name = $REQUEST['name'];
$subject = $REQUEST['subject'];
$email = $REQUEST['email'];
$copy = $REQUEST['copy'];
$comments = $REQUEST['comments'];
$recipient_send = $REQUEST['recipient_send'];
if ($send_options)
{
$email_message = stripslashes($email_message);
mail($recipient_send, $email_subject, $email_message, "From: $name<$email>");
if ($copy)
{
mail($email, $auto_vis_subject, $auto_vis_message_array, "From: $sitename<$siteemail>");
}
}
else
{
$email_message = stripslashes($email_message);
mail($siteemail, $email_subject, $email_message, "From: $name<$email>");
if ($copy)
{
mail($email, $auto_vis_subject, $auto_vis_message, "From: $sitename<$siteemail>");
}
}
}
/////////////////////
///End of function///
/////////////////////
?>