<?php 
  include( "USERS_CONFIG.php" ); 
  include( "USERS_MODS.php" ); 
  include( "generator.php" );
  include( "USERS_FORM.php" ); 
if ( $document_type == "strict" ) {
   echo( '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">' ); 
} else if ( $document_type == "trans" ) { 
   echo( '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' ); 
} else {
   echo( '<!--MIKE SAYS A DOCUMENT TYPE IS IMPORTANT. SHAME ON THE SITE OWNER FOR DISABLING IT... TSK. TSK. BAD SITE OWNER! PUT IT BACK AND KEEP IT VALID (PLEASE)-->' );
} 
?> 
<!--Accessible SeaBeast theme <?=$theme_version ?> by <?=$theme_maker ?>, <?=$theme_date ?>, <?=$maker_link ?>-->
<!--Theme URI: <?=$theme_uri ?>-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?=$document_lang ?>" lang="<?=$document_lang ?>" dir="<?=$letter_direction ?>"> 
<head>
<title><?=$blog_name ?> &raquo; <?=$blog_descrip ?> &raquo; Contact <?=$author_name ?></title>
 <meta http-equiv="Content-Type" content="text/html; charset=<?=$chararcter_set ?>" />
 <meta name="generator" content="SeaBeast Contact Form by <?=$theme_maker ?> <?=$maker_link ?>" />
 <meta http-equiv="imagetoolbar" content="no" />
 <meta name="author" content="<?=$blog_name ?>, <?=$author_name ?>" />
 <meta name="copyright" content="Copyright <?=$launch_year ?>-<?php echo date("Y"); ?>, <?=$blog_name ?>. <?=$copyright_level ?> rights reserved - SeaBeast Theme (c) <?=$theme_date ?>-<?php echo date("Y"); ?> <?=$theme_maker ?> - <?=$maker_link ?>. All rights reserved." />
 <meta name="description" content="<?=$blog_descrip ?>, <?php include("".$install_path."/".$theme_path."/USERS_DESCRIP.php"); ?>, SeaBeast Theme <?=$theme_version ?>, <?=$theme_date ?>, by <?=$theme_maker ?>" />
 <meta name="keywords" content="<?php include("".$install_path."/".$theme_path."/USERS_KEYWRDS.php"); ?>, <?=$author_name ?>, <?=$theme_maker ?>" />
 <!--[if IE]><script type="text/javascript" src="<?=$install_path ?>/<?=$theme_path ?>/focus_js.js"></script><![endif]--> 
 <script type="text/javascript" src="<?=$install_path ?>/<?=$theme_path ?>/USERS_JS.js"></script>
   <style type="text/css" media="screen" title="&#8220;SeaBeast&#8221; <?=$theme_version ?> by <?=$theme_maker ?>"> @import "<?=$install_path ?>/<?=$theme_path ?>/style.css"; a:hover { } </style>
   <style type="text/css" media="screen"> @import "<?=$install_path ?>/<?=$theme_path ?>/USERS_CSS.css"; </style>
   <?=$favicon_link ?> 
   <style type="text/css" media="screen">
     <?php include("dyna_styles.php"); ?> 
   </style>
   <link rel="stylesheet" href="<?=$install_path ?>/<?=$theme_path ?>/print.css" type="text/css" media="print" />
   <link rel="alternate stylesheet" href="<?=$install_path ?>/<?=$theme_path ?>/portable.css" type="text/css" media="handheld, screen" title="&#8220;SeaBeast&#8221; <?=$theme_version ?> Portable by <?=$theme_maker ?>" />
</head>
<body id="SeaBeast" <?=$onload_function ?>>
<div class="strip">
  <img class="strip" src="<?=$install_path ?>/<?=$theme_path ?>/images/sb_banner_on.jpg" width="600" height="160" alt="" />
</div><!--strip-->
<!--begin offsets (tab onto page with keyboard to see these links in action)-->
 <ul class="offset">
  <li><a id="top" href="#content">Jump to <span class="blk">Form</span>&nbsp;&raquo;</a></li>
  <li><a href="#sidebar">Jump to <span class="blk">Side-Bar</span>&nbsp;&raquo;</a></li>
  <li><a href="#main_pages">Jump to <span class="blk">Navigation</span>&nbsp;&raquo;</a></li>
  <li><a href="#farbar">Jump to <span class="blk">Far-Bar</span>&nbsp;&raquo;</a></li>
  <li><a href="#footer">Jump to <span class="blk">Footer</span>&nbsp;&raquo;</a></li>
 </ul>
<!--end offsets--> 
<div id="page">
<hr />
 <div id="header">
  <div id="headerimg">
   <h1><a href="<?=$install_path ?>/" title="<?=$blog_home_link ?>"><span></span><?=$blog_name ?><small><br /><?=$blog_descrip ?></small></a></h1>
  </div>
 </div>
 <hr /> 
<div id="content" class="narrowcolumn"><a name="content"></a>
<div class="post">
<h2 class="dot2">Contact <?=$author_name ?></h2>
<div class="entrytext">
 <!--Green-Beast.com PHP Contact Form v.2.0 Begin-->
<div>
<?php
// Posted variables
  if ($_POST)
   {
     $name = $_POST['name'];           // required field
     $email = $_POST['email'];         // required field
     $phone = $_POST['phone'];     
     $url = $_POST['url'];
     $reason = $_POST['reason'];       // required field
     $topicbody = $_POST['topicbody']; // required field

// Strip PHP slashes
     $name = stripslashes($name);
     $email = stripslashes($email);
     $phone = stripslashes($phone);
     $reason = stripslashes($reason);
     $topicbody = stripslashes($topicbody);

// HTML special characters transformation to sanitize the inputs
     $name = htmlspecialchars("$name", ENT_NOQUOTES);
     $email = htmlspecialchars("$email", ENT_COMPAT);
     $phone = htmlspecialchars("$phone", ENT_COMPAT);
     $reason = htmlspecialchars("$reason", ENT_QUOTES);
     $topicbody = htmlspecialchars("$topicbody", ENT_NOQUOTES);

// Fixed variables
     $ltd = date( "l, F jS, Y - g:i a" ) ;
     $ip = getenv( "REMOTE_ADDR" );
     $hr = getenv( "HTTP_REFERER" );
     $hst = gethostbyaddr( $_SERVER['REMOTE_ADDR'] );
     $ua = $_SERVER['HTTP_USER_AGENT'];

// This better be the referrer
     $self_location = "".$install_path."/".$theme_path."/contact.php";

// Email header
     $email_header = "From: $email\n"."Reply-To: $email\n"."MIME-Version: 1.0\n"."Content-type: text/plain; charset=\"ISO-8859-1\"\n"."Content-transfer-encoding: quoted-printable\n"; 

// Required fields need stuffing or get an error showing fields needed
if ( !isset($name,$email,$reason,$topicbody) || empty($name) || empty($reason) || empty($topicbody) ){
   print '   <h2 id="results" class="error">Whoops! You made an Error!</h2> 
            <h3>Sorry. An error has occurred!</h3> 
              <p>The following &#8220;Required&#8221; fields were not filled in. Using your &#8220;Back&#8221; button, please go back and fill in all required fields.</p>'."\n";
   echo '<dl><dt><span class="error">Field(s) Missed:</span></dt> '."\n";
if( empty($name) ) { 
   echo '<dd>&#8220;Enter your full name&#8221;</dd>'."\n"; 
}
if( empty($email) ) { 
   echo '<dd>&#8220;Enter your email address&#8221;</dd>'."\n"; 
}
if ( empty($reason) ) { 
   echo '<dd>&#8220;Select a contact reason&#8221;</dd>'."\n"; 
}
if ( empty($topicbody) ) { 
   echo '<dd>&#8220;Enter your message&#8221;</dd>'."\n"; 
}
   echo '</dl>'."\n";
} else {

// Email again as it can error two ways - It can be empty
if ( !isset($email) || empty($email) ) {
   echo '   <h2 id="results" class="error">Whoops! You made an Error!</h2>
   <h3>Sorry. An error has occurred!</h3>
    <p>The following &#8220;Required&#8221; fields were not filled in. Using your &#8220;Back&#8221; button, please go back and fill in all required fields.</p>
     <dl>
      <dt><span class="error">Field(s) Missed:</span></dt>
       <dd>&#8220;Enter your email address&#8221;</dd>
     </dl>';

// Or the email doesn't seem to be properly formed
} else if ( strpos($email,".") === FALSE || strpos($email,"@") === FALSE ) {
 echo '   <h2 id="results" class="error">Whoops! You made an Error!</h2>
   <h3>Sorry. An error has occurred!</h3> 
    <p><span class="error"><strong>Invalid Email:</strong></span> The email address you have submitted seems to be invalid. Using your &#8220;Back&#8221; button, please go back and check the address you entered. Please try not to worry, '.$i_or_we.' really do respect your privacy. '.$your_thanks.'!</p>';

// Let match the referrer to ensure it's sent from here and not elsewhere
} else if ( $_SERVER['HTTP_REFERER'] !== $self_location ) {
   echo ( '   <h2 id="results" class="error">Whoops! You made an Error!</h2>
   <h3>Sorry. An error has occurred!</h3>
    <p>It <em>seems</em> as if you&#8217;re trying to post remotely as we have have not detected the proper referrer, or you may have tried to re-submit the form via a browser refresh. Using your &#8220;Back&#8221; button, please go back and try again. Or try regular <a href="mailto:'.$youremail.'?subject=I%20couldn\'t%20use%20the%20'.$blog_name.'%20contact%20form">Email</a>!</p>' );

// And now let's see if the variable for submit matches what's required
} else if ( !(isset($_POST['send'])) ) {
   echo( '   <h2 id="results" class="error">Whoops! You made an Error!</h2>
   <h3>Sorry. An error has occurred!</h3>
    <p>It <em>seems</em> as if you&#8217;re trying to post remotely as there are some unmatched variables in your post. Using your &#8220;Back&#8221; button, please go back and try again.</p>' );
}

// This will check to see if it's a server doin' the sendin'
else if(!isset($_SERVER['HTTP_USER_AGENT'])){
   echo( '   <h2 id="results" class="error">Whoops! You made an Error!</h2>
   <h3>Sorry. An error has occurred!</h3>
    <p>It <em>seems</em> as if you&#8217;re a proper <abbr><span class="abbr" title="HyperText Transfer Protocol">HTTP</span></abbr> user agent to make contact. Are you a server or something?</p>' );

// Holy smokes, looks like all's cool and we can send the message
} else {
   $message = "Hello $author_name,\n\nYou are being contacted via $blog_name by $name\n\n$name has provided the following information so you may contact them:\n\n   Email: $email\n   Phone: $phone\n   Website: $url\n\n$name has contacted you to: $reason.\n\n$name has supplied the following comments:\n   $topicbody\n\n\nOther Collected Information:\n   IP Address: $ip\n   Time Stamp: $ltd\n   Referrer: $hr\n   Host: $hst\n   User Agent: $ua\n\n";

// The mail function helps, let's send this stuff
mail("$youremail", "$name is contacting ".$author_name." via $blog_name", $message, $email_header);

// And let's inform the user and show them what they sent
   echo "   <h2 id=\"results\" class=\"success\">Yes! Submission Successful!</h2> 
   <h3><small>[<a style=\"display:inline;background:transparent;\" href=\"$install_path\">Clear Results &amp; Return to $blog_home_link</a>]</small></h3>
    <p>You have successfully sent a message $my_or_our way. $your_thanks, <em>$name</em>. If appropriate to your message, $i_or_we will get back to you shortly. You submitted the following information:</p> 
     <ul>
      <li>$name</li>
      <li><a href=\"mailto:$email\">$email</a></li>
      <li>$phone</li>
      <li><a href=\"$url\">$url</a></li>
     </ul>
    <p>You&#8217;re making contact to <em>$reason</em>.</p>
    <p>And you added the following message:</p>
      <blockquote>
        $topicbody
        <cite>$name</cite>
      </blockquote>
     <dl>
      <dt>Form submitted by:</dt>
       <dd><small>$name<br />$ip<br />$ltd</small></dd>
     </dl>\n";
   }
}
} else {
// No errors so far? No successes so far? No confirmation? Hmm. Maybe the user needs a contact form
?>
<form method="post" action="<?= $_SERVER["PHP_SELF"]; ?>#results" id="contactform">
<!--Form Info-->
	<p>This contact form is a great way to communicate with <?=$me_or_us ?>.</p>
  <div class="hr"><hr /></div>
<!--Required Info-->
   <fieldset>
   <legend>Required contact info:</legend>
     <p><label for="name">Enter your full name<br /><input type="text" name="name" id="name" size="35" maxlength="50" value="" /></label></p>
     <p><label for="email">Enter your email address<br /><input type="text" name="email" id="email" size="35" maxlength="50" value="" /></label></p><br />
   </fieldset>
<!--Optional Info-->
   <fieldset>
    <legend>Optional contact info:</legend>
      <p><label for="phone">Enter your phone number<br /><input type="text" name="phone" id="phone" size="35" maxlength="50" value="" /></label></p>
      <p><label for="url">Enter your website address<br /><input type="text" name="url" id="url" size="35" maxlength="50" value="http://" /></label></p><br />
   </fieldset>
<!--Required Form Options-->
   <fieldset>
    <legend>Required contact reason:</legend>
      <p><label for="reason">Select a contact reason<br />
      <select name="reason" id="reason" style="cursor:pointer;">
       <option value="" selected="selected">Please make a selection</option>
       <option value="<?=@$opt01_value ?>"><?=@$opt01_visible ?></option>
       <option value="<?=@$opt02_value ?>"><?=@$opt02_visible ?></option>
       <option value="<?=@$opt03_value ?>"><?=@$opt03_visible ?></option>
       <option value="<?=@$opt04_value ?>"><?=@$opt04_visible ?></option>
       <option value="<?=@$opt05_value ?>"><?=@$opt05_visible ?></option>
       <option value="<?=@$opt06_value ?>"><?=@$opt06_visible ?></option>
       <option value="<?=@$opt07_value ?>"><?=@$opt07_visible ?></option>
       <option value="<?=@$opt08_value ?>"><?=@$opt08_visible ?></option>
       <option value="<?=@$opt09_value ?>"><?=@$opt09_visible ?></option>
       <option value="<?=@$opt10_value ?>"><?=@$opt10_visible ?></option>
       <option value="<?=@$opt11_value ?>"><?=@$opt11_visible ?></option>
       <option value="<?=@$opt12_value ?>"><?=@$opt12_visible ?></option>
       <option value="<?=@$opt13_value ?>"><?=@$opt13_visible ?></option>
       <option value="<?=@$opt14_value ?>"><?=@$opt14_visible ?></option>
       <option value="<?=@$opt15_value ?>"><?=@$opt15_visible ?></option>
      </select>
      </label></p><br />
    </fieldset>
<!--Required Form Comments Area-->
    <fieldset>
     <legend>Required comments area:</legend>
       <p><label for="topicbody">Enter your message<br /><textarea rows="6" cols="32" name="topicbody" id="topicbody"></textarea></label></p><br />
    </fieldset>
<!--Form Buttons-->
    <fieldset>
     <legend>Time to send it to <?=$me_or_us ?>:</legend>
       <p>Okay, great, one more step: Click the &#8220;Submit Form&#8221; button. If appropriate to your message, you will be contacted shortly.</p>
       <p style="text-align:right;"><input style="cursor:pointer;width:140px;height:1.9em;" class="button" type="submit" alt="Submit Form" value="Submit Form" name="send" id="send" title="Click Button to Submit Form" /> <input style="cursor:pointer;width:140px;height:1.9em;margin-right:4px;" class="button" name="change" type="reset" id="change" value="Reset Form" alt="Reset Form" title="Click Button to Reset Form &amp; Clear Entries" /></p><br />
    </fieldset>
</form>
<?php // Tah-tah, don't touch this. This is the end of the echoed form
 }
?>
</div>
<!--Green-Beast.com PHP Contact Form v.2.0 End-->
</div>
<div class="hr"><hr /></div>
   <p class="alignright" style="font-size:0.8em; clear:both;">|<a style="padding:1px;" href="#top" title="Jump to Page Top">Top</a> | <a style="padding:1px;" href="#content" title="Jump to Content Top">Content</a>|</p>
</div>
</div>
<div id="sidebar"><a name="sidebar"></a>
 <hr />
 <div id="center_logo">
   <strong><a style="cursor:<?=$logo_cursor ?>; margin:auto;" href="<?=$logo_target ?>" title="<?=$logo_title_text ?>"><img src="<?=$install_path ?>/<?=$theme_path ?>/images/sb_accesspatch.gif" width="1" height="1" alt="<?=$logo_alt_text ?>" /></a></strong>
 </div>
 <ul>
<?php
if ( $author_display == "hide" ) {
   echo( '<!--' );
} else {
   echo( '<!--Author structure end-->' );
}
?>
   <li><h2><?=$blog_author ?></h2>
     <p class="little"><img class="right <?=$author_pic ?>" src="<?=$install_path ?>/<?=$theme_path ?>/images/sb_author_pic.<?=$author_pic_type ?>" width="50" height="65" alt="<?=$author_pic_alt ?>" /> <?=@$your_salutation ?>. <?=@$I_am_or_We_are ?> <a href="<?=@$author_bio_url ?>"><?=@$author_name ?></a> and this is  <?=@$blog_name ?>. <?=@$your_welcome ?>.<br />
<?php
if ( $author_display == "hide" ) {
   echo( '-->
  <li>
   <p class="little">' );
} else {
   echo( '<!--Author structure end-->' );
}
?>
    <span class="contact_link"> <strong><a href="<?=$install_path ?>">&nbsp;<?=$blog_home_link ?>&nbsp;</a></strong></span></p>
   </li>
<?php
if ( $options_display == "hide" ) {
   echo( '<!--' );
} else {
   echo( '<!--Contact Options structure begin-->' );
}
?>
   <li><h2 id="contact_options"><?=$contact_options ?></h2>
   <p><strong><?=$postal_info ?></strong><br />
     <?=$author_name ?><br />
     <?=@$addy_1 ?> <?=@$addy_2 ?><br />
     <?=@$city_1 ?> <?=@$state_1 ?><br />
     <?=@$zcode_1 ?> <?=@$cntry_1 ?></p>
   <p><strong><?=$telecom_info ?></strong><br />
     <abbr><span class="abbr" title="<?=@$line1_name ?>"><?=@$line1_abbr ?></span></abbr> <?=@$line1 ?><br />
     <abbr><span class="abbr" title="<?=@$line2_name ?>"><?=@$line2_abbr ?></span></abbr> <?=@$line2 ?></p></li> 
<?php
if ( $options_display == "hide" ) {
   echo( '-->' );
} else {
   echo( '<!--Contact Options structure end-->' );
}
?>
 </ul>
<ul>
  <li><h2 id="main_pages">Main Pages</h2>
  <ul>
    <li><a href="<?=$install_path ?>"><?=$blog_home_link ?></a></li>
    <li><a style="cursor:default;" title="You are here" href="<?=$install_path ?>/<?=$theme_path ?>/contact.php">Contact Page</a></li>
  </ul>
  </li>
</ul>
 <h2><?=$user_sidebar_head ?></h2>
   <?php include("USERS_SIDEBAR.php"); ?> 
   <p class="alignright">|<a style="padding:1px;" href="#top" title="Jump to Page Top">Top</a> | <a style="padding:1px;" href="#sidebar" title="Jump to Sidebar Top">Sidebar</a>|</p>
</div>
<!--before the footer, we grab the farbar-->
<div id="farbar"><a name="farbar"></a>
   <hr />
<?php
if ( $functions_display == "hide" ) {
   echo( '<!--' );
} else {
   echo( '<!--Functions box structure begin-->' );
}
?>
 <div id="function_box">
  <h2><?=$blog_functions ?></h2>
   <?php include("USERS_FUNCTION.php"); ?> 
 </div>
<?php
if ( $functions_display == "hide" ) {
   echo( '-->' );
} else {
   echo( '<!--Functions box structure end-->' );
}
if ( $icons_display == "hide" ) {
   echo( '<!--' );
} else {
   echo( '<!--Blog Icons structure begin-->' );
}
?>
 <div id="icons_box">
  <ul>
    <li><h2><?=$blog_icons ?></h2>
    <ul>
      <?php @include("USERS_ICONS.php"); ?>
    </ul>
    </li>
   </ul>
 </div>
<?php


if ( $icons_display == "hide" ) {
   echo( '-->' );
} else {
   echo( '<!--Blog Icons structure end-->' );
}
?>
 <div id="users_farbar">
  <h2><?=$blog_farbar_head ?></h2>
   <?php include("USERS_FARBAR.php"); ?> 
 </div><!--users farbar box-->
   <p class="alignright">|<a style="padding:1px;" href="#top" title="Jump to Page Top">Top</a> | <a style="padding:1px;" href="#farbar" title="Jump to Farbar Top">FarBar</a>|</p>
</div> 
<hr />
 <div id="footer">
  <p>Copyright &copy; <?=$launch_year ?>-<?php echo date("Y"); ?>, <a href="<?=$install_path ?>" title="<?=$blog_name ?>: <?=$blog_home_link ?>"><?=$blog_name ?></a>. <?=$copyright_level ?> rights reserved. |<a style="padding:1px;" href="#top" title="Jump to Page Top">Top</a>|<br />
  <!--please don't remove the links to WordPress and Mike Cherim. It is a courtesy-->
  <?=$blog_name ?> is powered by <a href="http://wordpress.org/">WordPress</a><span class="<?=$hide_show_stats ?>"> and has had <?php
   @$file  = ''.$install_path.'/seabeast_myipfile'.$ipfile_codename.'.txt';
   @$ip    = getenv('REMOTE_ADDR')."\n";
   @$data  = @file($file);
   @$Count = @count($data);
if ( $hide_show_stats == "show" ) {
   $write_status = "w";
} else if ( $hide_show_stats == "hide" ){
   $write_status = "r";
}

if ( !in_array(@$ip,@$data) ) {
 if ( @$handle = fopen($file, 'w') ) {
   fwrite ($handle, @$ip.implode('',@$data));
   fclose ($handle);
  }
 }
if ( $hide_show_stats == "show" ) {
   echo @$Count;
} else if ( $hide_show_stats == "hide" ) {
   echo ("(Stats Disabled)");
}
?> unique visitors</span><br /><small style="font-size:0.85em;">Accessible &#8220;<a href="http://green-beast.com/seabeast/">SeaBeast</a>&#8221; theme <?=$theme_version ?> <span title="All rights reserved">&copy; <?=$theme_date ?>-<?php echo date("Y"); ?></span> by <a href="<?=$maker_link ?>"><?=$theme_maker ?></a></small></p>
 </div>
</div>
 <div id="preloader">
<hr />
   <p><small><em><strong>Attention: This is the end of the usable page!</strong><br />The images below are preloaded standbys only.<br />This is helpful to those with slower Internet connections.</em></small></p>
   <img src="<?=$install_path ?>/<?=$theme_path ?>/images/sb_logo_on.<?=$logo_img_type ?>" width="160" height="<?=$logo_height ?>" alt="" /> <img src="<?=$install_path ?>/<?=$theme_path ?>/images/sb_read.gif" width="50" height="20" alt="" /> <img src="<?=$install_path ?>/<?=$theme_path ?>/images/sb_read_on.gif" width="50" height="20" alt="" /> <img src="<?=$install_path ?>/<?=$theme_path ?>/images/sb_readsml.gif" width="50" height="20" alt="" /> <img src="<?=$install_path ?>/<?=$theme_path ?>/images/sb_readsml_on.gif" width="50" height="20" alt="" />
</div><!--preloader-->
</body>
</html>