|
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/nlyfoods/ |
Upload File : |
<?php
/* Set e-mail recipient */
$recipient = "[email protected],[email protected]";
/* Check all form inputs using check_input function */
/* Practice Information page */
$firstname = check_input($_POST['firstname']);
$lastname = check_input($_POST['lastname']);
$phone = check_input($_POST['phone']);
$email = check_input($_POST['email']);
$textsubject = check_input($_POST['textsubject']);
$text = check_input($_POST['text']);
$subject = "$firstname $lastname sent a message from NealeyFoods.com";
if (!$_POST['firstname'])
{show_error("Your <strong>First Name</strong> is required.");}
if (!$_POST['lastname'])
{show_error("Your <strong>Last Name</strong> is required.");}
if (!$_POST['phone'])
{show_error("Your <strong>Phone Number</strong> is required.");}
/* If phone is not valid show error message */
if (!preg_match("/(?:(?:\+?1\s*(?:[.-]\s*)?)?(?:(\s*([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9])\s*)|([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9]))\s*(?:[.-]\s*)?)([2-9]1[02-9]|[2-9][02-9]1|[2-9][02-9]{2})\s*(?:[.-]\s*)?([0-9]{4})/", $phone))
{show_error("Your <strong>Phone Number</strong> is invalid. 10 digits required! Ex. 555 555 5555");}
if (!$_POST['email'])
{show_error("Your <strong>Email Address</strong> is required.");}
/* If email is not valid show error message */
if (!preg_match("/^([a-zA-Z0-9])+([a-zA-Z0-9\._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9\._-]+)+$/", $email))
{show_error("Your <strong>Email Address</strong> is invalid.");}
/* if (!$_POST['address'])
{show_error("<strong>Address</strong> is required.");} */
/* if (!$_POST['state'])
{show_error("<strong>State</strong> is required.");} */
/* If state is not valid show error message */
/* if (!preg_match("/[a-zA-Z]+/", $state))
{show_error("The <strong>state</strong> is not valid. Use letters only!");} */
/* if (!$_POST['zip'])
{show_error("<strong>ZIP</strong> is required.");} */
/* If ZIP is not valid show error message */
/* if (!preg_match("/^[0-9]{5}(-[0-9]{4})?$/", $zip))
{show_error("The <strong>ZIP code</strong> is not valid. Use 5 or 9 digits and only numbers and dashes!");} */
/* if (!$_POST['url'])
{show_error("<strong>URL</strong> is required.");} */
/* If URL is not valid show error message */
/* if (!preg_match("#^http(s)?://[a-z0-9-_.]+\.[a-z]{2,4}#i", $url))
{show_error("<strong>URL</strong> is invalid.");} */
if (!$_POST['text'])
{show_error("A <strong>Message</strong> is required.");}
/* SPAM checker */
if(stristr($text, 'optimize') == TRUE
|| stristr($text, 'optimization') == TRUE
|| stristr($text, 'optimized') == TRUE
|| stristr($text, 'optimizing') == TRUE
|| stristr($text, 'SEO') == TRUE
|| stristr($text, 'search engine') == TRUE
|| stristr($text, 'rank') == TRUE
|| stristr($text, 'ranking') == TRUE
|| stristr($text, 'ranker') == TRUE
|| stristr($text, 'ranked') == TRUE
|| stristr($text, 'Google') == TRUE
|| stristr($text, 'Bing') == TRUE
|| stristr($text, 'Yahoo') == TRUE
|| stristr($text, 'PageRank') == TRUE
|| stristr($text, 'SERP') == TRUE
|| stristr($text, 'web design') == TRUE
|| stristr($text, 'web designing') == TRUE
|| stristr($text, 'web designer') == TRUE
|| stristr($text, 'web developer') == TRUE
|| stristr($text, 'web master') == TRUE
|| stristr($text, 'webmaster') == TRUE
|| stristr($text, 'keyword') == TRUE
|| stristr($text, 'keyphrase') == TRUE
|| stristr($text, 'increase traffic') == TRUE
|| stristr($text, 'increase rankings') == TRUE
|| stristr($text, 'internet marketing') == TRUE
|| stristr($text, 'online marketing') == TRUE
|| stristr($text, 'targeted traffic') == TRUE
|| stristr($text, 'linkbuilding') == TRUE
|| stristr($text, 'link building') == TRUE
|| stristr($text, 'link builder') == TRUE
|| stristr($text, 'link exchange') == TRUE
|| stristr($text, 'reciprocal link') == TRUE
|| stristr($text, 'targeted link') == TRUE
|| stristr($text, 'link request') == TRUE
|| stristr($text, 'copywriting') == TRUE
|| stristr($text, 'content writing') == TRUE
|| stristr($text, 'PPC') == TRUE)
{show_error("Your message has been flagged as spam, and will not be sent!");}
/* Let's prepare the message for the e-mail */
$message = "
<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
<title>$firstname $lastname sent a message from NealeyFoods.com</title>
<head>
<style type='text/css' media='screen'>
body {font-family: Helvetica, Arial, sans-serif; font-size:14px; color:#555;}
h1 {font-family: Helvetica, Arial, sans-serif; font-size:18px; color:#000;}
a img {border: none;}
</style>
</head>
<body>
<b>$firstname $lastname</b> sent a message from <a href='http://www.nealeyfoods.com'><b>NealeyFoods.com</b></a>!
<br><br><br><br>
<b>First Name:</b> $firstname<br><br>
<b>Last Name:</b> $lastname<br><br>
<b>Phone:</b> $phone<br><br>
<b>Email Address:</b> $email<br><br>
<b>Subject:</b> $textsubject<br><br>
<b>Message:</b> $text<br><br>
</body>
</html>
";
/* Send the message using mail() function */
mail($recipient, $subject, $message, 'Content-Type: text/html; charset=iso-8859-1');
/* Redirect visitor to the thank you page */
header('Location: contact-thanks.html');
exit();
/* Sanitation */
function check_input($data, $problem='')
{
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
if ($problem && strlen($data) == 0)
{
show_error($problem);
}
return $data;
}
function show_error($myError)
{
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" content="Jon West" />
<link type="text/plain" rel="author" href="humans.txt" />
<title>Contact - Nealey Foods Inc.</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/bootstrap-responsive.css" rel="stylesheet">
<link href="css/custom.css" rel="stylesheet">
<link href="css/animate.min.css" rel="stylesheet">
<link href="font-awesome/css/font-awesome.min.css" rel="stylesheet">
<!-- jQuery -->
<script src="js/jquery.js"></script>
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="js/html5shiv.js"></script>
<script src="js/respond.min.js"></script>
<![endif]-->
</head>
<body class="preload">
<div class="top-bar">
<div class="container">
<div class="row-fluid">
<div class="pull-right">
<small><i class="icon-map-marker"></i> 900-18 West Fulton St., Chicago, IL 60607 | <i class="icon-phone"></i> (312) 829-0856</small>
</div>
</div>
</div>
</div>
<div class="container top-padding">
<div class="row-fluid">
<div class="span12">
<a href="index.html"><img src="img/logo.png"></a>
<h3 class="pull-right call-us">
Call us at (312) 829-0856</h3>
</div>
</div>
<br/>
<nav id="navigation">
<div class="navbar">
<div class="navbar-inner">
<div class="container">
<ul class="nav">
<li><a href="index.html">Home</a></li>
<li><a href="about.html">About</a></li>
<li><a href="products-and-services.html">Products/Services</a></li>
<li><a href="food-safety.html">Food Safety</a></li>
<li class="active"><a href="contact.html">Contact</a></li>
</ul>
</div>
</div>
</div>
</nav>
<div class="well white-gradient">
<div class="jumbotron">
<h1><?php echo $myError; ?></h1>
</div>
<hr style="border-color: #ddd;">
<div class="row-fluid marketing">
<div class="span5">
<form method="POST" action="contact.php">
<label>First Name</label>
<input type="text" placeholder="Your First Name" name="firstname" class="span9" value="<?php echo $_POST['firstname']?>">
<label>Last Name</label>
<input type="text" placeholder="Your Last Name" name="lastname" class="span9" value="<?php echo $_POST['lastname']?>">
<label>Phone</label>
<input type="text" placeholder="Phone" name="phone" class="span9" value="<?php echo $_POST['phone']?>">
<label>Email Address</label>
<input type="text" class="span9" placeholder="Your Email" name="email" value="<?php echo $_POST['email']?>">
<label>Subject</label>
<select id="subject" class="span4" name="textsubject">
<option value="general">General</option>
<option value="quote">Quote</option>
<option value="support">Support</option>
</select>
<label>Message</label>
<textarea name="text" id="message" class="span9" rows="4" value="<?=$text;?>">
<?php echo $_POST['text'] ? $_POST['text'] : "" ?>
</textarea>
<br/>
<input type="submit" value="Send" name="submit" class="btn btn-large btn-red">
</form>
</div>
<div class="span7">
<p>900-18 West Fulton St.</p>
<p>Chicago, IL 60607</p>
<p><strong>Phone:</strong> (312) 829-0856</p>
<p><strong>Fax:</strong> (312) 829-8234</p>
<br/>
<div class="iframe-map">
<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=900-18+West+Fulton+Street,+Chicago,+IL+60607&aq=0&oq=900-18+West+Fulton+St.+Chicago,+IL+60607&sll=41.886894,-87.650043&sspn=0.006861,0.013937&ie=UTF8&hq=&hnear=900+W+Fulton+St,+Chicago,+Cook,+Illinois+60607&t=m&z=14&ll=41.886894,-87.650043&output=embed"></iframe><br /><small><a href="http://maps.google.com/maps?f=q&source=embed&hl=en&geocode=&q=900-18+West+Fulton+Street,+Chicago,+IL+60607&aq=0&oq=900-18+West+Fulton+St.+Chicago,+IL+60607&sll=41.886894,-87.650043&sspn=0.006861,0.013937&ie=UTF8&hq=&hnear=900+W+Fulton+St,+Chicago,+Cook,+Illinois+60607&t=m&z=14&ll=41.886894,-87.650043" style="color:#0000FF;text-align:left">View Larger Map</a></small>
</div>
</div>
<img src="img/divider.png" style="margin-top:40px;">
</div>
</div>
<div class="footer">
<p class="pull-left" style="margin-top:10px;">© Nealey Foods</p>
<ul class="social">
<li><a href="https://www.facebook.com/pages/Nealey-Foods-Chicago-Il/100552323374307" onclick="target='newwindow'"><img src="img/facebook.png"></a></li>
<li><a href="http://www.linkedin.com/company/nealey-foods" onclick="target='newwindow'"><img src="img/linkedin.png"></a></li>
<li><a href="https://plus.google.com/115055297294134702602" onclick="target='newwindow'"><img src="img/gplus-32.png" ></a></li>
</ul>
</div>
</div>
<!-- Scroll To Top -->
<a href="#" class="scroll-to-top"><i class="icon-angle-up"></i></a>
<!-- Javascript/Plugins -->
<script src="js/bootstrap.min.js"></script>
<script src="js/dropdown.js"></script>
<script src="js/fluid-video.js"></script>
<script src="js/jquery.backstretch.min.js"></script>
<script src="js/scroll-to-top.js"></script>
<script>
$(document).ready(function() {
$.backstretch("img/bg.jpg", {fade: 1000});
});
</script>
<script>
// stops CSS transitions from firing on page load
$(window).load(function() {
$("body").removeClass("preload");
});
</script>
<script>
$(document).ready(function(){
$('.carousel').carousel({
interval: 7000
});
});
</script>
</body>
<!-- created by Jon West April 30 2013, last modified on November 12 2013 -->
<!-- FRAMEWORK -->
<!-- Bootstrap v2.3.1 Copyright Twitter, Inc | http://twitter.github.io/bootstrap/ | Apache License v2.0 | http://www.apache.org/licenses/LICENSE-2.0 -->
<!-- Icons by Glyphicons | http://glyphicons.com/ -->
<!-- HTML5/CSS3 COMPATIBILITY -->
<!-- HTML5 Shiv by @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed | http://code.google.com/p/html5shiv/ -->
<!-- Respond.js by Scott Jehl | Dual licensed under the MIT or GPL Version 2 licenses | https://github.com/scottjehl/Respond | scottjehl.com -->
<!-- JAVASCRIPT -->
<!-- Convert Menu To Drop Down by Chris Coyier | No License, Free | http://css-tricks.com/license/ | http://css-tricks.com/convert-menu-to-dropdown/ -->
<!-- Animated Scroll To Top | No License, Free -->
<!-- FluidVideo.JS by Chris Coyier and tweaked by Mathias Bynens, Rob G (Mottie) | No License, Free -->
<!-- Backstretch.js by Scott Robbin | MIT Licensed | https://github.com/srobbin/jquery-backstretch, http://srobbin.com/jquery-plugins/backstretch/ | http://opensource.org/licenses/MIT -->
<!-- CSS -->
<!-- Animate.css by Dan Eden | MIT Licensed | https://github.com/daneden/animate.css, http://daneden.me/animate | http://opensource.org/licenses/MIT -->
<!-- Font Awesome 3.1.1 by Dave Gandy | font licensed under SIL OFL 1.1 | MIT Licensed | Documentation licensed under CC BY 3.0 | http://scripts.sil.org/OFL | http://opensource.org/licenses/mit-license.html | http://creativecommons.org/licenses/by/3.0/ -->
<!-- HOME/GENERAL PHOTOS -->
<!-- regentropfen by Turi http://us.fotolia.com/id/27734716 ID# 27734716 -->
<!-- Alte Metall Platte by Thaut Images http://us.fotolia.com/id/56560046 ID# 56560046 -->
<!-- Juicy steak with vegetables by Maksim Kostenko http://us.fotolia.com/id/51361530 ID# 51361530 -->
<!-- Chicken with roasted potatoes by Maksim Shebenko http://us.fotolia.com/id/46146833 ID# 46146833 -->
<!-- Roast chicken with honey by joanna wnuk http://us.fotolia.com/id/50476367 ID# 50476367 -->
<!-- chicken by tycoon101 http://us.fotolia.com/id/56378318 ID# 56378318 -->
<!-- Fresh Raw Meat Background with Beef ... by Kayros Studio http://us.fotolia.com/id/32079780 ID# 32079780 -->
<!-- Menu, Speisekarte Symbole Essen und trin by Hans-J�rg Nisch http://us.fotolia.com/id/38642809 ID# 38642809 -->
<!-- PRODUCTS/SERVICES PHOTOS -->
<!-- metzger bei der arbeit by contrastwerkstatt http://us.fotolia.com/id/51358919 ID# 51358919 -->
<!-- Restaurant design by nokastudio http://us.fotolia.com/id/51853990 ID# 51853990 -->
<!-- FOOD SAFETY PHOTOS -->
<!-- Cutting by Taratorki http://us.fotolia.com/id/21151968 ID# 21151968 -->
<!-- butcher cutting pork meat by tolism http://us.fotolia.com/id/41008035 ID# 41008035 -->
</html>
<?php
exit();
}
// created by Jon West July 25 2012, last modified on November 12 2013
?>