Location: PHPKode > projects > Trunk.net > reqdetails.php
<?
require "include/functions.php";

dbconn();

loggedinorreturn();

stdhead("Request Details");
$id = $_GET["id"];
$res = mysql_query("SELECT * FROM requests WHERE id = $id") or sqlerr();
$num = mysql_fetch_array($res);

$s = $num["request"]; 

print("<h1>Details Of $s</h1>\n");

print("<table width=\"500\" border=\"1\" cellspacing=\"0\" cellpadding=\"5\">\n");
print("<tr><td align=left>Request</td><td width=90% align=left>$num[request]</td></tr>");
if ($num["descr"])
print("<tr><td align=left>Info</td><td width=90% align=left>$num[descr]</td></tr>");
print("<tr><td align=left>Added</td><td width=90% align=left>$num[added]</td></tr>");

$cres = mysql_query("SELECT username FROM users WHERE id=$num[userid]");
   if (mysql_num_rows($cres) == 1)
   {
     $carr = mysql_fetch_assoc($cres);
     $username = "$carr[username]";
   }
print("<tr><td align=left>Requested&nbsp;By</td><td width=90% align=left>$username</td></tr>");
print("<tr><td align=left>Vote for this request</td><td width=50% align=left><a href=addrequest.php?id=$id><b>Vote</b></a></tr></tr>");

if ($num["filled"] == NULL)
{
print("<form method=get action=reqfilled.php>");
print("<tr><td align=left>Filled Request</td><td>Enter the <b>full</b> URL of the torrent i.e. http://torrents.idle.ro/details.php?id=1 (just copy/paste from another window/tab) or modify the existing URL to have the correct ID number</td></tr>");
print("</table>");
print("<input type=text size=80 name=filledurl value=http://OiNK.me.uk/details.php?id=1>\n");
print("<input type=hidden value=$id name=requestid>");
print("<input type=submit value=\"Fill Request\" style='height: 22px'>\n</form>");
}

print("<p></p><form method=\"get\" action=\"requests.php#add\"><input type=\"submit\" value=\"Add Request\" style='height: 22px' /></form>");
stdfoot();
die;

?>
Return current item: Trunk.net