$TD_width = "80"; $BASEURL = "www.WebbIT.us"; /// this is the URL of the web site you are preparing this for $formname = "Receipt of online email"; // used as the subject line of email to Visitor // Date function $todaysdate = date('m/d/Y', // Date format is just year (4 digits) month (2 digits) day (2 digits) no separators mktime( 0,0,0, date('m'), date('d'), date('Y'))); $createsate = "$todaysdate"; $year = date('Y', // Date format is just year (4 digits) month (2 digits) day (2 digits) no separators mktime( 0,0,0, date('m'), date('d'), date('Y'))); // You can adjust the time out put for clock if you need to. I am using this // for a Server Time Stamp, comparing variables from News Feed system. // Have not built in any other features like Day light Savings, cause it is // not used here. // $hourdiff is used to change the calculation of the hour from the server setup which is USA East Coast // The server time does adjust for Daylight Savings Time $hourdiff = "-2"; // hours difference between server time and Eastern Standard Time $timeadjust = ($hourdiff * 60 * 60); // Calculate out amount of seconds to adjust clock $servertime = date(" H:i",mktime() + $timeadjust); // Unix time stamp - just Hour and minute, with separators $createtime = "$servertime"; /// Obtain User information IP address and Browser Type $remote_address = getenv("REMOTE_ADDR"); /// Get Browser type $agent = getenv("HTTP_USER_AGENT"); $LTR_bdy = "This is an automated response to your inquiry. Just as you have received this response from me, please feel confident that your E-Mail is sitting in my In-Box. We are very excited about the additional services www.WebbIT.us now offers. With redundent backbone connections, server(s) preformance monitoring services, data backed up every 24 hours, with off site copies that span up to four weeks, we only need to establish your web site or company service(s). WebbIT approaches service from a small business mentality. Offering customized personal and business solutions. Ranging from Flash based home pages with dynamic radio players to fully developed backend business operations for sales tracking, order creation, tracking manufacturing, employee time cards, reporting and much more. We appreciate being of service to you and thank you very much for your EMail. "; $PS_bdy = "P.S. This E-Mail Box is for OUR business use. Spam is not welcome and will be reported on the second offense. Thank you for removing us from your list if this applies to this email."; // Main file to pull automated response from - pull file $form_block = <<<_BLOCK_
_BLOCK_; if ($op != "ds") { echo "$form_block"; } else if ($op == "ds") { $to_process = ''; if ( (ereg("(http)",$comment)) || (ereg("(mailto)",$comment)) || (ereg("(href)",$comment)) ){ $to_process = "no"; } if ($to_process != "no"){ /// Error checking for form input fields /// Check First Name Field if ($firstname == "") { $firstname_err = "NameName"; $send = $send + 1; } if (eregi ("^.+[a-z0-9-]{1,}$", $firstname)) { }else{ $firstname_err = "Name"; $send = $send + 1; } /// Check Phone Field if ( (ereg("^[0-9]{3}\\.[0-9]{3}\\.[0-9]{4}$",$phone, $arrA)) || (ereg("^[0-9]{3}\\-[0-9]{3}\\-[0-9]{4}$",$phone, $arrA))){ }else{ $phone_err = "Phone302-123-4567"; $send = $send + 1; } /// Check EMail Address if (ereg("^(.+)@(.+)\\.(.+)$",$email, $arr)){ // $email_err = "address: $arr[0] U.N. $arr[1] D.N. $arr[2] T L $arr[3]"; }else{ $email_err = "E-Mail"; $send = $send + 1; } if ($send == 0) { $subjecta = "Professional Web Site design inquiry"; $OUREMAIL = "Kit@WebbIT.us"; $WHO = "Kit Creighton"; $offcolor = array('fuck', 'FUCK', 'SHIT', 'shit', 'fucking', 'FUCKING', 'fucker', 'FUCKER', 'BASTARD', 'bastard', 'bitch', 'BITCH', 'mother fucker', 'MOTHER FUCKER', 'PENIS', 'penis', 'prick', 'cunt', 'CUNT', 'pussy', 'PUSSY'); $firstname = str_replace($offcolor, '!@#$', $firstname); $email = str_replace($offcolor, '!@#$', $email); /// Mail being sent to server POP account $msg .= "Dear "; $msg .= $WHO; $msg .= ", \n\n"; $msg .= "Contact request. \n\n"; $msg .= "Phone: "; $msg .= "$phone \n\n"; $msg .= "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \n"; $msg .= "Email was sent from $remote_address IP address.\n"; $msg .= "Using $browser_result.\n"; $msg .= "Date: $todaysdate Server Time: $servertime\n"; $msg .= "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \n\n"; $to = $OUREMAIL; $subject = $subjecta; $mailheaders ="From: $email - $firstname $lastname\n"; $mailheaders .="Reply-To: $email\n"; $mailheaders .="Subject: $subject\n\n"; mail($to, $subject, $msg, $mailheaders); echo "Thank You for the EMail.
"; echo "Your EMail has been sent.
"; echo "We will be contacting you within the next
business day
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"; echo "$arr[1]@$arr[2].$arr[3]
"; echo "Email sent from $remote_IP address.
"; echo "Using $browser_result
"; echo "Date: $todaysdate
Server Time: $servertime
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
";
$mail_sent = "yes";
$msg = "";
if ($mail_sent == "yes") {
/// Now send letter to Visitor using main and P.S. text files
$msg .= "Dear $firstname $lastname,\n\n";
$msg .= $LTR_bdy ;
$msg .= "\n\n";
$msg .= $WHO;
$msg .= "\n";
$msg .= "mailto:";
$msg .= $OUREMAIL;
$msg .= "\n";
$msg .= $BASEURL;
$msg .= "\n\n\n";
$msg .= "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n";
$msg .= "Email was sent from $remote_address IP address.\n";
$msg .= "Using the follwing EMail Address: $arr[1]@$arr[2].$arr[3]\n";
$msg .= "Using $browser_result\n";
$msg .= "Date: $todaysdate Server Time: $servertime\n";
$msg .= "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n";
$msg .= "$PS_bdy";
$to = $email;
$subject = "$formname";
$mailheaders ="From: "; // $from -
$mailheaders .= $WHO;
$mailheaders .="\n";
$mailheaders .="Reply-To: ";
$mailheaders .= $OUREMAIL;
$mailheaders .="\n";
mail($to, $subject, $msg, $mailheaders);
$mail_sent = "yes";
}
}else{
echo "
| $form_block | $firstname_err $phone_err $email_err |