<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>SEO Workstation News</title>
<link href="news.css" rel="stylesheet" type="text/css" /></head>
<body style="width:640px">
<?php
$username = $_GET['username'];
?>
<?php
if(isset($_POST['featureReq'])) {

    // EDIT THE 2 LINES BELOW AS REQUIRED
    $email_to = "support@seoworkstation.com";
    $email_subject = "Feature request" ;

    function died($error) {
        // your error code can go here
        echo "We are very sorry, but there were error(s) found with the request you submitted. ";
        echo $error."<br/><em></em><br/>";
        echo "Please try again.<br /><br />";
    }

    // validation expected data exists
    if(!isset($_POST['username']) ) {
        died('We are sorry, but there appears to be a problem with the form you submitted.');       
    }
	$username = $_POST['username'];
	
    $featureReq = $_POST['featureReq']; // required

    $error_message = "";
    $string_exp = "/^[A-Za-z .'-]+$/";
  
  if(strlen($featureReq) < 2) {
    $error_message .= 'The Feature Request you entered does not appear to be valid.<br />';
  }
  if(strlen($error_message) > 0) {
    died($error_message);
  } else {
    $email_message = "Form details below.\n\n";
	$email_from = $username;
    function clean_string($string) {
      $bad = array("content-type","bcc:","to:","cc:","href");
      return str_replace($bad,"",$string);
    }

    $email_message .= "From: ".clean_string($username)."\n";
    $email_message .= "Feature Request: \n______________________\n".clean_string($featureReq)."\n";


	// create email headers
	$headers = 'From: '.$email_from."\r\n".
	'Reply-To: '.$email_from."\r\n" .
	'X-Mailer: PHP/' . phpversion();
	
	mail($email_to, $email_subject, $email_message, $headers);  
	
	echo "<p class=\"greetings\">Thank you for requesting a feature!</p>";
  }
}
?>

<div>
<div style="width:50%;position: relative;float: left;">
<p class="newTitle">
	SEO Workstation – News
  </p>
</div>
<div style="width:50%;position: relative;float: left; text-align:right;display:table-cell;vertical-align:middle"><a href="mailto:support@seoworkstation.com"><img src="images/support.png" alt="Support" longdesc="mailtp" border="0"/></a>
</div>
</div>
<div style="clear:both;"></div>
<div>
<p class="greetings">
	Greetings SEO&rsquo;er!
</p>
<p>Would you like to request a feature?</p>	
<form name="contactform" method="post" action="index.php">
    <table width="634">
         <tbody>
         <tr>
           <td width="208" valign="top"><span style="font-size:14.0pt;line-height:115%">I would like to request:</span></td>
            <td width="414" valign="top">
              <textarea name="featureReq" maxlength="1000" cols="40" rows="6"></textarea>
            </td>
        </tr>
        <tr>
            <td colspan="2" style="text-align:center">
                <input type="submit" value="Send Reuest">
            </td>
        </tr>
    </tbody></table>
  <input  type="hidden" name="username" size="30" value='<?php echo $username; ?>'>
</form>


<p><u>Version 1.0 is Here !!!</u></p>
<p>New Features:</p>
<p>Register and Post Web 2.0 Websites - Wordpress, Elgg, SocialEngine</p>
<p>New <strong>Tools</strong>: </p>
<p>- Proxy Scraper</p>
<p>- URL Scraper</p>
<p>&nbsp;</p>	

</div>
</body>
</html>