|
Server : Apache/2.4.62 System : FreeBSD fbsdweb2.web.rcn.net 14.1-RELEASE FreeBSD 14.1-RELEASE releng/14.1-n267679-10e31f0946d8 GENERIC amd64 User : www ( 80) PHP Version : 8.3.8 Disable Function : NONE Directory : /domains/smartny/domains/ |
Upload File : |
<?php
$name = $_POST['NAME']; // field values
$company = $_POST['COMPANY'];
$email = $_POST['EMAIL'];
$city = $_POST['CITY'];
$state = $_POST['STATE'];
$message = $_POST['COMMENTS'];
$country = $_POST['COUNTRY'];
$industry= $_POST['INDUSTRY'];
$publish = $_POST['PUBLISING'];
// Variables to control
$services='0';
$software='0';
$languages='0';
$ckc = strchr($name,' ');
if (!$ckc)
{
echo '<h3>For accuracy in our reply, the Name field<br/>must be two or more words. Example: Bill Trams</h3>';
exit;
}
$ckc = strchr($company,' ');
if (!$ckc)
{
echo '<h3>Company or Name must be two or more words.<br/>Examples IBM Corporation or Bill Trams</h3>';
exit;
}
if (strlen($email) < 10) exit; // stop nonsense
$ck = stristr($message,"http",true);
if ($ck)
{
echo '<h3>Please remove the http link from the<br/>message field and send again.</h3>';
exit;
}
$today = date('l jS M g:i Y'); // date
$formcontent="New Contact ($today):\n Name: $name \n Company: $company \n Email: $email \n City: $city \n State: $state \n Country: $country\n Message: $message\n Industry: $industry\n Tool: $publish\n";
// languages first box set
if (isset($_POST['CE'])=="true")
{
if ($languages=='0')
{
$formcontent .= "\n Languages: CE ";
$languages='1';
}
else $formcontent .= " | CE ";
}
if (isset($_POST['STE'])=="true")
{
if ($languages=="0")
{
$formcontent .= "\n Languages: STE ";
$languages='1';
}
else $formcontent .= " | STE ";
}
if (isset($_POST['PE'])=="true")
{
if ($languages=='0')
{
$formcontent .= "\n Languages: PLAIN ";
$languages='1';
}
else $formcontent .= " | PLAIN ";
}
// kit 2nd box set
if (isset($_POST['KIT'])=="true")
{
if ($services=='0')
{
$formcontent .= "\n Services: STARTER KIT ";
$services='1';
}
else $formcontent .= " | STARTER KIT ";
}
if (isset($_POST['TRAIN'])=="true")
{
if ($services=='0')
{
$formcontent .= "\n Services: WRITER TRAINING ";
$services='1';
}
else $formcontent .= " | WRITER TRAINING ";
}
if (isset($_POST['SERVICE'])=="true")
{
if ($services=='0')
{
$formcontent .= "\n Services: TRANSLATION ";
$services='1';
}
else $formcontent .= " | TRANSLATION ";
}
// maxit thirds box set
if (isset($_POST['MAXIT'])=="true")
{
if ($software=='0')
{
$formcontent .= "\n Software: MAXit ";
$software='1';
}
else $formcontent .= " | MAXit ";
}
if (isset($_POST['MINER'])=="true")
{
if ($software=='0')
{
$formcontent .= "\n Software: MINER ";
$software='1';
}
else $formcontent .= " | MINER ";
}
if (isset($_POST['LEXMGR'])=="true")
{
if ($software=='0')
{
$formcontent .= "\n Software: LEXMGR ";
$software='1';
}
else $formcontent .= " | LEXMGR ";
}
$formcontent .= "\n++++++++++++++++++++++++# END OF FORM #+++++++++++++++++++++++";
if (strlen($formcontent) < 150) exit; // stop nonsense
$recipient = "[email protected]";
$subject = "New Contact from web site";
$mailheader = "From: $email \r\n";
mail($recipient, $subject, $formcontent, $mailheader) or die("SMARTNY Error(56)!");
echo "<h3>Thank you for contacting smartny.com.<br/>Our SMART Team will reply within 24 hours.</h3>";
?>