<?
if(true)
{
?>
<html>
<head>
<title>LogEdit - ANSI to HTML Converter</title>
<link rel="STYLESHEET" type="text/css" href="logedit.css">

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-6118765-1");
pageTracker._setDomainName("none");
pageTracker._setAllowLinker(true);
pageTracker._trackPageview();
</script>


</head>
<body>
<?
if(@!$_POST["submit"])
{
?>
<h2>Contact Form</h2>
<table>
<tr>
<td>
Fill out the following form and I will answer as soon as possible.<br>
<form method="post" action="contact.php">
Reply adress (your email adress):
<br>
<input type="text" name="reply" size="40">
<br>
Subject:
<br>
<input type="text" name="subject" size="70">
<br>

Comment:
<br>
<textarea rows="10" cols="70" name="comment">
</textarea>
<br>
<input type="submit" name="submit" value="Send Comment">
</form>


</TD>
</TR>
</TABLE>
<?
}
else
{
echo "<TABLE>";
echo "<TR>";
echo "<TD class=listlogs align=left>";
//echo "Processing mail";
if(@$_POST["comment"]&&$_POST["reply"]&&$_POST["subject"])
{
	$from = strip_tags($_POST["reply"]);
	if (eregi("\r",$from) || eregi("\n",$from)){
     die("Why ?? :(");
   }
	
	$subject = strip_tags($_POST["subject"]);
   if (eregi("\r",$subject) || eregi("\n",$subject)){
     die("Why ?? :(");
   }
	
	$comment = strip_tags($_POST["comment"]);
	$comment .= "\r\n\r\n";
	$comment .= "MetaData:\r\n";
	$comment .= "IP: ".$REMOTE_ADDR."\r\n";
	$comment .= "Host: ".$REMOTE_HOST."\r\n";
	$comment .= "Date: ".date("m.d.y")."\r\n";
	$comment .= "Time: ".date("H:i:s")."\r\n";
	
//	$r = mail("logedit@deathlogs.com", "$subject", $comment,
//     "From: $from\r\n" .
//     "Reply-To: $from\r\n" .
//     "X-Mailer: PHP/" . phpversion());
	  
  	$loggfile = "logedit@deathlogs.com".
	$subject."\r\n".
   "From: $from\r\n".
   "Reply-To: $from\r\n".
   "X-Mailer: PHP/".
	phpversion()."\r\n\r\n".
	$comment;

	$q4444 = "insert into maillog (body) VALUES ('$loggfile')";  
	$r4444 = mysql_query($q4444);

	if($r===true)
	{
		echo "Message Sent, <a href=\"index.html\">back to main page</a>";
	}
	else
	{
		echo "Problems in sending.";
	}
}
else
{
echo "You need out to fill in all the fields of the form.";
}
echo "</TD>";
echo "</TR>";
echo "</TABLE>";
}

?>
<body>
</html>
<?
}
else
{
	echo "this page has been temporarily disabled";
}
?>
