<?php
if (session_id() == "")
{
   session_start();
}
if ($_SERVER['REQUEST_METHOD'] == 'POST' && $_POST['formid'] == 'indexform2')
{
   if (isset($_POST['captcha_code'],$_SESSION['random_txt']) && md5($_POST['captcha_code']) == $_SESSION['random_txt'])
   {
      unset($_POST['captcha_code'],$_SESSION['random_txt']);
   }
   else
   {
      echo '<b>The entered code was wrong.</b><br>';
      echo '<a href="javascript:history.back()">Go Back</a>';
      exit;
   }
}
?>
<?php
function ValidateEmail($email)
{
   $pattern = '/^([0-9a-z]([-.\w]*[0-9a-z])*@(([0-9a-z])+([-\w]*[0-9a-z])*\.)+[a-z]{2,6})$/i';
   return preg_match($pattern, $email);
}
if ($_SERVER['REQUEST_METHOD'] == 'POST' && $_POST['formid'] == 'indexform2')
{
   $mailto = 'info@pokamates.com';
   $mailfrom = isset($_POST['email']) ? $_POST['email'] : $mailto;
   $mailcc = 'billy@pokamates.com';
   $mailbcc = 'CRoos@drltd.com';
   $subject = 'Inquiry from Pokamates Web Site';
   $message = 'Inquiry from Pokamates Web Site';
   $success_url = './thankyou.html';
   $error_url = '';
   $error = '';
   $eol = "\n";
   $max_filesize = isset($_POST['filesize']) ? $_POST['filesize'] * 1024 : 1024000;
   $boundary = md5(uniqid(time()));

   $header  = 'From: '.$mailfrom.$eol;
   $header .= 'Reply-To: '.$mailfrom.$eol;
   $header .= 'Cc: '.$mailcc.$eol;
   $header .= 'Bcc: '.$mailbcc.$eol;
   $header .= 'MIME-Version: 1.0'.$eol;
   $header .= 'Content-Type: multipart/mixed; boundary="'.$boundary.'"'.$eol;
   $header .= 'X-Mailer: PHP v'.phpversion().$eol;
   if (!ValidateEmail($mailfrom))
   {
      $error .= "The specified email address is invalid!\n<br>";
   }

   if (!empty($error))
   {
      $errorcode = file_get_contents($error_url);
      $replace = "##error##";
      $errorcode = str_replace($replace, $error, $errorcode);
      echo $errorcode;
      exit;
   }

   $internalfields = array ("submit", "reset", "send", "filesize", "formid", "captcha_code", "recaptcha_challenge_field", "recaptcha_response_field");
   $message .= $eol;
   $message .= "IP Address : ";
   $message .= $_SERVER['REMOTE_ADDR'];
   $message .= $eol;
   foreach ($_POST as $key => $value)
   {
      if (!in_array(strtolower($key), $internalfields))
      {
         if (!is_array($value))
         {
            $message .= ucwords(str_replace("_", " ", $key)) . " : " . $value . $eol;
         }
         else
         {
            $message .= ucwords(str_replace("_", " ", $key)) . " : " . implode(",", $value) . $eol;
         }
      }
   }
   $body  = 'This is a multi-part message in MIME format.'.$eol.$eol;
   $body .= '--'.$boundary.$eol;
   $body .= 'Content-Type: text/plain; charset=ISO-8859-1'.$eol;
   $body .= 'Content-Transfer-Encoding: 8bit'.$eol;
   $body .= $eol.stripslashes($message).$eol;
   if (!empty($_FILES))
   {
       foreach ($_FILES as $key => $value)
       {
          if ($_FILES[$key]['error'] == 0 && $_FILES[$key]['size'] <= $max_filesize)
          {
             $body .= '--'.$boundary.$eol;
             $body .= 'Content-Type: '.$_FILES[$key]['type'].'; name='.$_FILES[$key]['name'].$eol;
             $body .= 'Content-Transfer-Encoding: base64'.$eol;
             $body .= 'Content-Disposition: attachment; filename='.$_FILES[$key]['name'].$eol;
             $body .= $eol.chunk_split(base64_encode(file_get_contents($_FILES[$key]['tmp_name']))).$eol;
          }
      }
   }
   $body .= '--'.$boundary.'--'.$eol;
   if ($mailto != '')
   {
      mail($mailto, $subject, $body, $header);
   }
   header('Location: '.$success_url);
   exit;
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Contact PokaMates</title>
<meta name="description" content="Contact Us At PokaMates - The First Two Dimensional Poker Board Game Ever!">
<meta name="generator" content="WYSIWYG Web Builder 10 - http://www.wysiwygwebbuilder.com">
<style type="text/css">
div#container
{
   width: 1087px;
   position: relative;
   margin: 0 auto 0 auto;
   text-align: left;
}
body
{
   background-color: #FF0000;
   background-image: url(images/back2.png);
   background-position: left top;
   background-repeat: repeat-x;
   color: #000000;
   font-family: Arial;
   font-size: 13px;
   margin: 0;
   text-align: center;
}
a
{
   color: #0000FF;
   text-decoration: underline;
}
a:visited
{
   color: #800080;
}
a:active
{
   color: #FF0000;
}
a:hover
{
   color: #0000FF;
   text-decoration: underline;
}
a.RED
{
   color: #FF0000;
   text-decoration: none;
}
a.RED:visited
{
   color: #FF0000;
   text-decoration: none;
}
a.RED:active
{
   color: #FF0000;
   text-decoration: none;
}
a.RED:hover
{
   color: #FF0000;
   text-decoration: none;
}
.CustomStyle
{
   font-family: "Courier New";
   font-size: 16px;
   font-weight: bold;
   font-style: normal;
   text-decoration: none;
   color: #000080;
   background-color: transparent;
}
#Image2
{
   border: 0px #000000 solid;
   left: 0;
   top: 0;
   width: 100%;
   height: 100%;
}
#Image3
{
   border: 0px #000000 solid;
   left: 0;
   top: 0;
   width: 100%;
   height: 100%;
}
#Image4
{
   border: 0px #000000 solid;
   left: 0;
   top: 0;
   width: 100%;
   height: 100%;
}
#wb_CssMenu1
{
   border: 0px #C0C0C0 solid;
   background-color: transparent;
}
#wb_CssMenu1 ul
{
   list-style-type: none;
   margin: 0;
   padding: 0;
}
#wb_CssMenu1 li
{
   float: left;
   margin: 0;
   padding: 0px 3px 0px 0px;
}
#wb_CssMenu1 a
{
   display: block;
   float: left;
   color: #000000;
   border: 0px #FF0000 solid;
   background-color: #FFD700;
   background-image: none;
   font-family: Arial;
   font-size: 15px;
   font-weight: bold;
   font-style: normal;
   text-decoration: none;
   height: 28px;
   line-height: 28px;
   padding: 0px 9px 0px 9px;
   vertical-align: middle;
   text-align: center;
}
#wb_CssMenu1 li:hover a, #wb_CssMenu1 a:hover
{
   color: #FFD700;
   background-color: #FF0000;
   background-image: none;
   border: 0px #C0C0C0 solid;
}
#wb_CssMenu1 li.firstmain
{
   padding-left: 0px;
}
#wb_CssMenu1 li.lastmain
{
   padding-right: 0px;
}
#wb_CssMenu1 br
{
   clear: both;
   font-size: 1px;
   height: 0;
   line-height: 0;
}
#wb_Text1 
{
   background-color: transparent;
   border: 0px #000000 solid;
   padding: 0;
   margin: 0;
   text-align: left;
}
#wb_Text1 div
{
   text-align: left;
}
#Image9
{
   border: 0px #000000 solid;
   left: 0;
   top: 0;
   width: 100%;
   height: 100%;
}
#wb_Text4 
{
   background-color: transparent;
   border: 0px #000000 solid;
   padding: 0;
   margin: 0;
   text-align: left;
}
#wb_Text4 div
{
   text-align: left;
}
#Image5
{
   border: 0px #000000 solid;
   left: 0;
   top: 0;
   width: 100%;
   height: 100%;
}
#Image10
{
   border: 0px #000000 solid;
   left: 0;
   top: 0;
   width: 100%;
   height: 100%;
}
#Image1
{
   border: 0px #000000 solid;
   left: 0;
   top: 0;
   width: 100%;
   height: 100%;
}
#Shape1
{
   border-width: 0;
}
#Image2
{
   border: 0px #000000 solid;
   left: 0;
   top: 0;
   width: 100%;
   height: 100%;
}
#wb_Text2 
{
   background-color: transparent;
   border: 0px #000000 solid;
   padding: 0;
   margin: 0;
   text-align: center;
}
#wb_Text2 div
{
   text-align: center;
}
#Image3
{
   border: 0px #000000 solid;
   left: 0;
   top: 0;
   width: 100%;
   height: 100%;
}
#Image1
{
   border: 0px #000000 solid;
   left: 0;
   top: 0;
   width: 100%;
   height: 100%;
}
#wb_Text2 
{
   background-color: transparent;
   border: 0px #000000 solid;
   padding: 0;
   margin: 0;
   text-align: center;
}
#wb_Text2 div
{
   text-align: center;
}
#wb_indexText2 
{
   background-color: transparent;
   border: 0px #000000 solid;
   padding: 0;
   margin: 0;
   text-align: left;
}
#wb_indexText2 div
{
   text-align: left;
}
#indexEditbox2
{
   border: 1px #C0C0C0 solid;
   background-color: #FFFFFF;
   color :#000000;
   font-family: Arial;
   font-size: 13px;
   text-align: left;
   vertical-align: middle;
}
#wb_indexText4 
{
   background-color: transparent;
   border: 0px #000000 solid;
   padding: 0;
   margin: 0;
   text-align: left;
}
#wb_indexText4 div
{
   text-align: left;
}
#indexEditbox4
{
   border: 1px #C0C0C0 solid;
   background-color: #FFFFFF;
   color :#000000;
   font-family: Arial;
   font-size: 13px;
   text-align: left;
   vertical-align: middle;
}
#indexEditbox6
{
   border: 1px #C0C0C0 solid;
   background-color: #FFFFFF;
   color :#000000;
   font-family: Arial;
   font-size: 13px;
   text-align: left;
   vertical-align: middle;
}
#wb_indexText6 
{
   background-color: transparent;
   border: 0px #000000 solid;
   padding: 0;
   margin: 0;
   text-align: left;
}
#wb_indexText6 div
{
   text-align: left;
}
#general-liability-insuranceTextArea1
{
   border: 1px #C0C0C0 solid;
   background-color: #FFFFFF;
   color :#000000;
   font-family: Arial;
   font-size: 13px;
   text-align: left;
   resize: none;
}
#wb_general-liability-insuranceText2 
{
   background-color: transparent;
   border: 0px #000000 solid;
   padding: 0;
   margin: 0;
   text-align: left;
}
#wb_general-liability-insuranceText2 div
{
   text-align: left;
}
#general-liability-insuranceButton1
{
   color: #000000;
   font-family: Arial;
   font-size: 13px;
}
#Shape3
{
   border-width: 0;
}
#Shape2
{
   border-width: 0;
}
#Shape4
{
   border-width: 0;
}
#wb_Text2 
{
   background-color: transparent;
   border: 0px #000000 solid;
   padding: 0;
   margin: 0;
   text-align: left;
}
#wb_Text2 div
{
   text-align: left;
}
#Image9
{
   border: 0px #000000 solid;
   left: 0;
   top: 0;
   width: 100%;
   height: 100%;
}
#Image6
{
   border: 0px #000000 solid;
   left: 0;
   top: 0;
   width: 100%;
   height: 100%;
}
#Image7
{
   border-width: 0;
   left: 0;
   top: 0;
   width: 100%;
   height: 100%;
}
#Image8
{
   border: 0px #000000 solid;
   left: 0;
   top: 0;
   width: 100%;
   height: 100%;
}
#Image4
{
   border: 0px #000000 solid;
   left: 0;
   top: 0;
   width: 100%;
   height: 100%;
}
#Shape1
{
   border-width: 0;
}
#wb_indexForm2
{
   background-color: transparent;
   border: 0px #000000 solid;
}
#Image5
{
   border: 0px #000000 solid;
   left: 0;
   top: 0;
   width: 100%;
   height: 100%;
}
#wb_Captcha1 span
{
   display: block;
   overflow: hidden;
   padding: 0 4px 0 5px;
}
#Captcha1
{
   border: 1px #A9A9A9 solid;
   background-color: #FFFFFF;
   color :#000000;
   font-family: Arial;
   font-size: 13px;
   text-align: left;
   vertical-align: middle;
}
</style>
</head>
<body>
<div id="container">
<div id="wb_Image2" style="position:absolute;left:832px;top:220px;width:245px;height:667px;z-index:24;">
<img src="images/right.png" id="Image2" alt=""></div>
<div id="wb_Image3" style="position:absolute;left:10px;top:231px;width:245px;height:667px;z-index:25;">
<img src="images/left2.png" id="Image3" alt=""></div>
<div id="wb_MasterObjects1" style="position:absolute;left:0px;top:0px;width:973px;height:220px;z-index:26;">
<div id="wb_Image4" style="position:absolute;left:189px;top:0px;width:242px;height:182px;z-index:0;">
<img src="images/boardgame.jpg" id="Image4" alt=""></div>
<div id="wb_CssMenu1" style="position:absolute;left:113px;top:192px;width:860px;height:28px;z-index:1;">
<ul>
<li class="firstmain"><a href="./index.html" target="_self">&nbsp;&nbsp;Home&nbsp;&nbsp;</a>
</li>
<li><a href="./about-poka-mates.html" target="_self">&nbsp;&nbsp;About&nbsp;Us&nbsp;&nbsp;&nbsp;</a>
</li>
<li><a href="./how-to-play-pokamates.html" target="_self">&nbsp;&nbsp;How&nbsp;To&nbsp;Play&nbsp;&nbsp;&nbsp;</a>
</li>
<li><a href="./hints-tips-pokamates.html" target="_self">&nbsp;&nbsp;Hints&nbsp;and&nbsp;Tips&nbsp;&nbsp;&nbsp;</a>
</li>
<li><a href="./faq-pokamates.html" target="_self">&nbsp;&nbsp;FAQ&nbsp;&nbsp;</a>
</li>
<li><a href="./downloads-pokamates.html" target="_self">&nbsp;&nbsp;Downloads&nbsp;&nbsp;&nbsp;</a>
</li>
<li><a href="./media.html" target="_self">&nbsp;&nbsp;Media&nbsp;&nbsp;</a>
</li>
<li><a href="./contact-pokamates.php" target="_self">&nbsp;&nbsp;Contact&nbsp;Us&nbsp;&nbsp;&nbsp;</a>
</li>
</ul>
<br>
</div>
<div id="wb_Text1" style="position:absolute;left:333px;top:18px;width:337px;height:38px;z-index:2;text-align:left;">
<span style="color:#FFFF00;font-family:Arial;font-size:17px;"><strong>A Family Fun Way To Play Poker!<br>For Ages 12 to old and older!</strong></span></div>
<div id="wb_Image9" style="position:absolute;left:676px;top:18px;width:178px;height:30px;z-index:3;">
<a href="http://www.amazon.com/PokaMates/dp/B00B6VXATA/ref=sr_1_1?ie=UTF8&qid=1381505628&sr=8-1&keywords=pokamates" target="_blank"><img src="images/buy-from-button-amazon-small.png" id="Image9" alt=""></a></div>
<div id="wb_Text4" style="position:absolute;left:864px;top:18px;width:99px;height:16px;z-index:4;text-align:left;">
<span style="color:#F8CF51;font-family:'Bookman Old Style';font-size:13px;"><strong>FOLLOW US:</strong></span></div>
<div id="wb_Image5" style="position:absolute;left:861px;top:41px;width:28px;height:28px;z-index:5;">
<a href="https://www.facebook.com/BTFG.PokaMates" target="_blank"><img src="images/facebook.png" id="Image5" alt=""></a></div>
<div id="wb_Image10" style="position:absolute;left:893px;top:41px;width:28px;height:28px;z-index:6;">
<a href="https://twitter.com/Pokamates" target="_blank"><img src="images/twitter.png" id="Image10" alt=""></a></div>
<div id="wb_Image1" style="position:absolute;left:100px;top:8px;width:164px;height:167px;z-index:7;">
<img src="images/poka-mates-logo.png" id="Image1" alt=""></div>
<div id="wb_Shape1" style="position:absolute;left:678px;top:87px;width:285px;height:91px;z-index:8;">
<a href="https://itunes.apple.com/us/app/pokamates/id838980446?mt=8" target="_blank"><img src="images/img0050.png" id="Shape1" alt="" style="width:285px;height:91px;"></a></div>
<div id="wb_Image2" style="position:absolute;left:868px;top:97px;width:75px;height:73px;z-index:9;">
<a href="https://itunes.apple.com/us/app/pokamates/id838980446?mt=8" target="_blank"><img src="images/pokamates-app-small.png" id="Image2" alt=""></a></div>
<div id="wb_Text2" style="position:absolute;left:685px;top:96px;width:164px;height:72px;text-align:center;z-index:10;">
<span style="color:#F8CF51;font-family:'Bookman Old Style';font-size:15px;"><strong><a href="https://itunes.apple.com/us/app/pokamates/id838980446?mt=8" target="_blank" class="RED">CLICK TO DOWNLOAD THE POKAMATES<br>APP!</a></strong></span></div>
<div id="wb_Image3" style="position:absolute;left:929px;top:44px;width:23px;height:23px;z-index:11;">
<a href="http://instagram.com/pokamates#" target="_blank"><img src="images/instagram.jpg" id="Image3" alt=""></a></div>
</div>
<div id="wb_MasterObjects2" style="position:absolute;left:22px;top:879px;width:679px;height:82px;z-index:27;">
<div id="wb_Image1" style="position:absolute;left:374px;top:32px;width:76px;height:50px;z-index:12;">
<a href="http://www.nexgraphics.com" target="_blank"><img src="images/usapng.png" id="Image1" alt=""></a></div>
<div id="wb_Text2" style="position:absolute;left:441px;top:38px;width:238px;height:32px;text-align:center;z-index:13;">
<span style="color:#FFFF00;font-family:Arial;font-size:13px;"><strong>Proudly Designed in the U.S.A.<br>by</strong></span><span style="color:#000000;font-family:Arial;font-size:13px;"> <u><a href="http://www.nexgraphics.com" target="_blank">Nex Graphics</a></u> </span><span style="color:#000000;font-family:'Bookman Old Style';font-size:13px;">&nbsp; </span></div>
</div>
<div id="wb_Shape3" style="position:absolute;left:89px;top:260px;width:893px;height:639px;z-index:28;">
<img src="images/img0016.png" id="Shape3" alt="" style="width:893px;height:639px;"></div>
<div id="wb_Shape2" style="position:absolute;left:90px;top:261px;width:891px;height:40px;z-index:29;">
<img src="images/img0017.png" id="Shape2" alt="" style="width:891px;height:40px;"></div>
<div id="wb_Shape4" style="position:absolute;left:379px;top:265px;width:305px;height:31px;z-index:30;">
<img src="images/img0018.png" id="Shape4" alt="" style="width:305px;height:31px;"></div>
<div id="wb_Text2" style="position:absolute;left:457px;top:268px;width:162px;height:25px;z-index:31;text-align:left;">
<span style="color:#FFFF00;font-family:Tahoma;font-size:21px;"><strong>CONTACT US</strong></span></div>
<div id="wb_Image9" style="position:absolute;left:130px;top:556px;width:365px;height:255px;z-index:32;">
<img src="images/chips-cards.png" id="Image9" alt=""></div>
<div id="wb_Image6" style="position:absolute;left:237px;top:347px;width:67px;height:75px;z-index:33;">
<img src="images/clubs-black.png" id="Image6" alt=""></div>
<div id="wb_Image7" style="position:absolute;left:174px;top:348px;width:83px;height:87px;z-index:34;">
<img src="images/img0019.png" id="Image7" alt=""></div>
<div id="wb_Image8" style="position:absolute;left:809px;top:689px;width:55px;height:75px;z-index:35;">
<img src="images/diamond-red.png" id="Image8" alt=""></div>
<div id="wb_Image4" style="position:absolute;left:676px;top:273px;width:271px;height:208px;z-index:36;">
<img src="images/contact-chips.png" id="Image4" alt=""></div>
<div id="wb_Shape1" style="position:absolute;left:224px;top:389px;width:603px;height:377px;z-index:37;">
<img src="images/img0020.png" id="Shape1" alt="" style="width:603px;height:377px;"></div>
<div id="wb_indexForm2" style="position:absolute;left:241px;top:418px;width:567px;height:325px;z-index:38;">
<form name="Poka_Mates" method="post" action="<?php echo basename(__FILE__); ?>" enctype="multipart/form-data" id="indexForm2">
<input type="hidden" name="formid" value="indexform2">
<div id="wb_indexText2" style="position:absolute;left:69px;top:12px;width:68px;height:19px;z-index:14;text-align:left;">
<span style="color:#FFFFFF;font-family:Arial;font-size:16px;"><strong>Name:</strong></span></div>
<input type="text" id="indexEditbox2" style="position:absolute;left:138px;top:10px;width:329px;height:22px;line-height:22px;z-index:15;" name="Name" value="">
<div id="wb_indexText4" style="position:absolute;left:70px;top:52px;width:59px;height:19px;z-index:16;text-align:left;">
<span style="color:#FFFFFF;font-family:Arial;font-size:16px;"><strong>Email:</strong></span></div>
<input type="text" id="indexEditbox4" style="position:absolute;left:138px;top:47px;width:329px;height:22px;line-height:22px;z-index:17;" name="Email" value="">
<input type="text" id="indexEditbox6" style="position:absolute;left:138px;top:84px;width:329px;height:22px;line-height:22px;z-index:18;" name="Phone" value="">
<div id="wb_indexText6" style="position:absolute;left:63px;top:88px;width:70px;height:19px;z-index:19;text-align:left;">
<span style="color:#FFFFFF;font-family:Arial;font-size:16px;"><strong>Phone:</strong></span></div>
<textarea name="Comments" id="general-liability-insuranceTextArea1" style="position:absolute;left:138px;top:122px;width:330px;height:53px;z-index:20;" rows="2" cols="49"></textarea>
<input type="submit" id="general-liability-insuranceButton1" name="" value="CONTACT US" style="position:absolute;left:180px;top:233px;width:175px;height:25px;z-index:21;">
<div id="wb_general-liability-insuranceText2" style="position:absolute;left:29px;top:138px;width:99px;height:19px;z-index:22;text-align:left;">
<span style="color:#FFFFFF;font-family:Arial;font-size:16px;"><strong>Comments:</strong></span></div>
<div id="wb_Captcha1" style="position:absolute;left:186px;top:188px;width:216px;height:36px;z-index:23;">
<img src="captcha1.php" alt="Click for new image" title="Click for new image" style="cursor:pointer;float:left;width:100px;height:38px;" onclick="this.src='captcha1.php?'+Math.random()">
<span><input type="text" id="Captcha1" style="margin-top:16px;width:100%;height:20px;line-height:20px;" name="captcha_code" value=""></span></div>
</form>
</div>
<div id="wb_Image5" style="position:absolute;left:774px;top:664px;width:59px;height:75px;z-index:39;">
<img src="images/spades-black.png" id="Image5" alt=""></div>
</div>
<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-45000742-1', 'pokamates.com');
  ga('send', 'pageview');

</script>
</body>
</html>