Hürkal adlı üyeden alıntı

İlgili kod parçasını buraya yapıştırın


Bir tanesi bu bir de profil de aynısı çıkıyor aynı hata

include "globals.php";
$_GET['ID'] = abs((int) $_GET['ID']);
$_GET['qty'] = abs((int) $_GET['qty']);
//itemsend
if($_GET['qty'])
{
$id=$db->query("SELECT iv.*,it.* FROM inventory iv LEFT JOIN items it ON iv.inv_itemid=it.itmid WHERE iv.inv_id={$_GET['ID']} AND iv.inv_userid=$userid LIMIT 1");
if($db->num_rows($id)==0)
{
print "Invalid item ID";
}
else
{
$r=$db->fetch_row($id);
if($_GET['qty'] > $r['inv_qty'])
{
print "You are trying to send more than you have!";
}
else
{
$price=$r['itmsellprice']*$_GET['qty'];
//are we sending it all
item_remove($userid, $r['itmid'], $_GET['qty']);
$db->query("UPDATE users SET money=money+{$price} WHERE userid=$userid");
$priceh="$".($price);
print "You sold {$_GET['qty']} {$r['itmname']}(s) for {$priceh}";
$db->query("INSERT INTO itemselllogs VALUES ('', $userid, {$r['itmid']}, $price, {$_GET['qty']}, unix_timestamp(), '{$ir['username']} sold {$_GET['qty']} {$r['itmname']}(s) for {$priceh}')");
}
}
}
else if($_GET['ID'])
{
$id=$db->query("SELECT iv.*,it.* FROM inventory iv LEFT JOIN items it ON iv.inv_itemid=it.itmid WHERE iv.inv_id={$_GET['ID']} and iv.inv_userid=$userid LIMIT 1");
if($db->num_rows($id)==0)
{
print "Invalid item ID";
}
else
{
$r=$db->fetch_row($id);
print "



Sell Items







Enter how many {$r['itmname']} you want to sell. You have {$r['inv_qty']} to sell.



Quantity: