Location: PHPKode > projects > H-tracker > reqreset.php
<?
//
//  H-Tracker v0.2
//    http://h-tracker.org
//    Based on TorrentTrader (http://www.torrenttrader.org)
//
//
require_once("backend/functions.php");
dbconn();
loggedinonly();

stdhead("Reset Request");

begin_frame("Reset");

$requestid = (int)$_GET["requestid"];

$res = mysql_query("SELECT userid, filled, filledby FROM requests WHERE id =$requestid") or sqlerr();
 $arr = mysql_fetch_assoc($res);


if (($CURUSER[id] == $arr[userid]) || (get_user_class() >= 4) || ($CURUSER[id] == $arr[filledby]))
{
 @mysql_query ("UPDATE torrents SET req = 'n' WHERE id = $arr[filled]") or sqlerr();
 @mysql_query("UPDATE requests SET filled='', filledby=0 WHERE id =$requestid") or sqlerr();
 
 
 print("Request $requestid successfully reset.");
}
else
 print("Sorry, cannot reset a request when you are not the owner");

end_frame();

stdfoot();
?>
Return current item: H-tracker