File: /home/httpd/html/baretube.com/reportVideo.php
<?
session_start();
include('admin/db.php');
if(!is_numeric($_GET[id])) {
exit("Missing content id number");
}
if($_POST[name] && $_POST[reason] && $_POST[email] && stripos($_POST[email],'@') && (strtolower($_POST[captchaaa]) == strtolower($_SESSION[captcha]))) {
if(!$_SESSION[flood] || ($_SESSION[flood] != '' && time() > ($_SESSION[flood] + 600))) {
$to = $admin_email;
$subject = "Report Video ($_POST[reason]) - $sitename";
$from = "From: $_POST[name] <$_POST[email]>";
$message = "Reported Video
--------------
Reason: $_POST[reason];
URL: $basehttp/video.php?id=$_GET[id]
Message Body:
$_POST[content]";
if(mail($to,$subject,$message,$from)) {
$_SESSION[flood] = time();
$success = true;
}
}
else {
$flood_control = true;
}
}
$title = 'Report Video';
$headertitle = 'Report Video';
include($basepath.'/templates/template.overall_header.php'); ?>
<? if($flood_control) { ?>
<p style='font-weight: bold;'>We're sorry, you can only send a message once every 10 minutes. Please try again in
<? echo 10-(ceil((time()-$_SESSION[flood])/60)); ?> minute(s).</p>
<? } ?>
<? if($success) { ?>
<p>Your message has been sent, and you should recieve a reply within 24 hours if a reply was requested.</p>
<? } else { ?>
<p>
Please use this form to report any content to us that may be deemed inappropriate.</p>
<p><strong>All fields are mandatory.</strong></p>
<form id="form1" name="form1" method="post" action="">
<?
if(is_numeric($_GET[id])) {
?>
<input type='hidden' name='id' value='<? echo $_GET[id]; ?>' />
<?
}
?>
<table width="500" border="0" align="left">
<tr>
<td width="121">Name</td>
<td width="369"><input name="name" type="text" id="name" style='width: 150px; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; margin-bottom: 5px;' value="<? echo $_SESSION[username]; ?>" maxlength="255" /></td>
</tr>
<tr>
<td>Email Address</td>
<td><input name="email" type="text" id="email" style='width: 150px; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; margin-bottom: 5px;' maxlength="255" /></td>
</tr>
<tr>
<td>Reason</td>
<td><select name="reason" id="reason">
<option value=''>-Select-</option>
<option value="Inappropriate Content">Inappropriate (rape, incest, bestiality, etc)</option>
<option value="Underage">Underage</option>
<option value="Copyright Violation">Copyrighted Material</option>
<option value="Video Not Playing">Video Not Playing</option>
<option value="Other Reason">Other Reason</option>
</select></td>
</tr>
<tr>
<td>Message</td>
<td><textarea style='width: 300px; height: 80px; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; margin-bottom: 5px;' name="content" id="textfield3"></textarea></td>
</tr>
<tr>
<td>Human?</td>
<td><img src='/captcha.php' /><br />
<input class='f02' name="captchaaa" type="text" id="signup_email" size="10" maxlength="35" value='' /></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" name="button" id="button" value="Send Message" /></td>
</tr>
</table>
</form>
<? } ?>
<? include($basepath.'/templates/template.overall_footer.php'); ?>