<?php
$starttime = explode(' ', microtime());
$starttime = $starttime[1] + $starttime[0];
//sendmail_path = "sendmail -t -i -F xxxxxx@houseoftracks.co.uk -f xxxxxx@houseoftracks.co.uk"
$title = $POST["title"];
$filename = $POST["filename"];
$review = $POST["review"];
$author = $POST["author"];
$footer = $POST["footer"];
$linkstart = $POST["linkstart"];
$linkend = $POST["linkend"];
$password = $POST["password"];
$time=date("H:i:s");
$sender = $_POST["email"];
$sentfrom = "From: donotreply@houseoftracks.co.uk";
$sendto = "xxxxxx@houseoftracks.co.uk,xxxxxx@houseoftracks.co.uk,xxxxxx@houseoftracks.co.uk";
$msgsubj = "HoT Alert : $author has submitted a review";
$message = "Hi Team,
$author has just submitted a review.
$title
http://www.houseoftracks.co.uk/<<<SAVELOCATION>>>/$filename.html
$review
Review by $author,
$sender
If you spot any spelling mistakes or have any comments about this article, please email Dave and let him know as soon as possible. David Apple will now tidy up this review and add it to the House of Tracks Homepage and the RSS Feed.
Thanks,
House of Tracks";
if(($title=='')||($filename=='')||($review=='')||($author=='')||($sender=='')||(crypt($password, '<<<ENCRYPTED PASSWORD>>>') !== '<<<ENCRYPTED PASSWORD>>>'))
{
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html><head><title>House of Tracks - Unpopulated Fields</title><link media="screen" href="http://www.houseoftracks.co.uk/css/newstyle.css" type="text/css" rel="stylesheet"></head><body>
<div class="whitespace">
<div class="leftspace">
<div class="leftbox">
<h3>Unpopulated Fields</h3>
<p><leftp>You have not populated all of the fields or to put it another way, you have not filled in all of the boxes. Please go back and try again or use the link below.</leftp></p>
<p><leftp><a href="http://www.houseoftracks.co.uk/">House of Tracks Homepage</a></leftp></p>
</div>
</div>
</div></body></html>
<?
}
else {
if(mail($sendto, $msgsubj, $message, $sentfrom))
{
$myFile = "../../../<<<SAVELOCATION>>>/$filename.html";
$fh = fopen($myFile, 'w') or die("can't open file");
$stringData = "$linkstart$filename$linkend\n";
fwrite($fh, $stringData);
$stringData = "<h2>$title</h2>\n";
fwrite($fh, $stringData);
$stringData = "<p>$review</p><p><span class="author">Review by $author.</span></p>\n";
fwrite($fh, $stringData);
$stringData = "$footer\n";
fwrite($fh, $stringData);
fclose($fh);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html><head><title>House of Tracks - Review Submitted</title><link media="screen" href="http://www.houseoftracks.co.uk/css/newstyle.css" type="text/css" rel="stylesheet"></head><body>
<div class="whitespace">
<div class="leftspace">
<div class="leftbox">
<h3>Your review has been submitted</h3>
<p><leftp>Thank you for submitting you review. It will be checked, tidied up and published on the House of Tracks website as soon as Dave gets around to it.</leftp></p>
<p><leftp>Keep up the good work.</leftp></p>
<p><leftp><a href="http://www.houseoftracks.co.uk/">House of Tracks Homepage</a></leftp></p>
</div>
</div>
</div></body></html>
<?
}
else { echo "<center><b>Please try again later.</b></center>"; }
}
$mtime = explode(' ', microtime());
$totaltime = $mtime[0] + $mtime[1] - $starttime;
printf('<br><center>Email script process time was %.3f seconds.</center>', $totaltime);
?>