<?
//
// H-Tracker v0.2
// http://h-tracker.org
// Based on TorrentTrader (http://www.torrenttrader.org)
//
//
require "backend/functions.php";
dbconn();
loggedinonly();
if($CURUSER["class"] < 2){
$class = get_user_class_name(2);
show_error_msg("Error","U must be $class to make requests");
}
stdhead("Requests Page");
begin_frame("" . MAKE_REQUEST . "");
print("<br>\n");
if ($site_config["REQUESTSON"]) {
$where = "WHERE userid = " . $CURUSER["id"] . "";
$res2 = mysql_query("SELECT * FROM requests $where") or die (mysql_error());
$num2 = mysql_num_rows($res2);
?>
<center><big><b><font color=red>If this is abused, it will be for VIP only!</font></b></big><br>
<table border=0 width=90% cellspacing=0 cellpadding=3>
<tr><td><li><b>Before posting a request, please make sure to search the site first to make sure it's not already
posted.</li>
<li><u>1 request per day per member</u>. Any more than that will be deleted by a moderator.</li></b>
<br><br/></td></tr>
<tr><td class=colhead align=left><? print("" . SEARCH . " " . TORRENT . ""); ?></td></tr>
<tr><td align=left><form method="get" action=torrents-search.php>
<input type="text" name="<? print("" . SEARCH . "\n"); ?>" size="40" value="<?= htmlspecialchars($searchstr) ?>" /><br>
in
<select name="cat">
<option value="0">(all types)</option>
<?
$cats = genrelist();
$catdropdown = "";
foreach ($cats as $cat) {
$catdropdown .= "<option value=\"" . $cat["id"] . "\"";
if ($cat["id"] == (int)$_GET["cat"])
$catdropdown .= " selected=\"selected\"";
$catdropdown .= ">" . htmlspecialchars($cat["parent_cat"]) . ": " . htmlspecialchars($cat["name"]) . "</option>\n";
}
$deadchkbox = "<input type=\"checkbox\" name=\"incldead\" value=\"1\"";
if ($_GET["incldead"])
$deadchkbox .= " checked=\"checked\"";
$deadchkbox .= " /> " . INC_DEAD . "\n";
?>
<?= $catdropdown ?>
</select>
<?= $deadchkbox ?>
<input type="submit" value="<? print("" . SEARCH . "\n"); ?>" />
</form>
</td></tr></table><BR><HR><BR>
<li><b>When possible, please provide a full scene release name.<br>
or use public sites such as NFOrce or VCDQ for help with that.</b></li><br>
<? print("<br>\n");
print("<form method=post action=takerequest.php><a name=add id=add></a>\n");
print("<CENTER><table border=0 width=90% cellspacing=0 cellpadding=3>\n");
print("<tr><td class=colhead align=center><B>" . MAKE_REQUEST . "</B></a></td><tr>\n");
print("<tr><td align=center><b>Title: </b><input type=text size=40 name=requesttitle>");
?>
<select name="category">
<option value="0">(Select a Category)</option>
<?
$res2 = mysql_query("SELECT id, name,parent_cat FROM categories order by parent_cat");
$num = mysql_num_rows($res2);
$catdropdown2 = "";
for ($i = 0; $i < $num; ++$i)
{
$cats2 = mysql_fetch_assoc($res2);
$catdropdown2 .= "<option value=\"" . $cats2["id"] . "\"";
$catdropdown2 .= ">" . htmlspecialchars($cats2["parent_cat"]) . ": " . htmlspecialchars($cats2["name"]) . "</option>\n";
}
?>
<?= $catdropdown2 ?>
</select>
<? print("<br>\n");
print("<tr><td align=center>Additional Information <b>(Optional - but be generous!</b>)<br><textarea name=descr rows=7
cols=60></textarea>\n");
print("<tr><td align=center><input type=submit value='" . SUBMIT . "' style='height: 22px'>\n");
print("</form>\n");
print("</table></CENTER>\n");
} else {
echo "<b><font color=red>Sorry, requests are currently disabled.<br><Br>";
}
end_frame();
stdfoot();
?>