$trade_id = htmlspecialchars($_GET["trade_id"], ENT_QUOTES); if (is_numeric($trade_id)) { query_getTradeByTradeID($mysqli, $trade, $trade_id); if ($trade["user_id"] == $_SESSION["user_id"]) { $popup_message = 'A trade offer will be sent to you shortly to collect your items. Your security code is: <b>'; $popup_message .= $trade["trade_code"]; $popup_message .= '</b>. The status of your trade can be found in your profile. '; } } } } else { if ($status == '5') { if (!empty($_SESSION["user_id"])) { $trade_id = htmlspecialchars($_GET["trade_id"], ENT_QUOTES); if (is_numeric($trade_id)) { query_getTradeByTradeID($mysqli, $trade, $trade_id); if ($trade["user_id"] == $_SESSION["user_id"]) { $popup_message = 'A trade offer will be sent to you shortly to complete the withdrawal process. Your security code is: <b>'; $popup_message .= $trade["trade_code"]; $popup_message .= '</b>, which can also be found in your profile.'; } } } } } } } } } $api_key = file_get_contents("{$root}/../api_key.txt"); $open_id_validate = 0;
$newItem->item_information = $item_info; array_push($itemsList, $newItem); } query_getUserByUserID_noToken($mysqli, $user_data, $user_id); if (count($itemsList) > 0) { $itemsList_messageData = array('subscribedTopic' => "newUserItems", 'toSpecificUser' => $user_id, 'itemsList' => $itemsList, 'user_data' => $user_data); $context = new ZMQContext(); $socket = $context->getSocket(ZMQ::SOCKET_PUSH, 'my pusher'); $socket->connect("tcp://localhost:5555"); $socket->send(json_encode($itemsList_messageData)); } echo "itemspushed"; } else { if ($updated_trade["trade_type"] == "t") { query_getTradeItems($mysqli, $trade_items, $_POST["trade_id"]); query_getTradeByTradeID($mysqli, $trade, $_POST["trade_id"]); foreach ($trade_items as $item) { query_setItemWithdrawn($mysqli, $item["item_id"], 1); } $items_count = count($trade_items); query_getBotBySteamID($mysqli, $from_bot, $_POST["user_steam_id"]); query_getBotItemCountByBotID($mysqli, $bot_item_count, $from_bot["bot_id"]); $total_item_count = $bot_item_count - $items_count; query_updateBotItemCount($mysqli, $from_bot["bot_id"], $total_item_count); $multi_trade = null; if ($trade["multi_trade_id"] != -1) { query_getMultiTradeByMultiTradeID($mysqli, $multi_trade, $trade["multi_trade_id"]); } foreach ($asset_ids as $asset_id) { query_getItemInformationByClassID($mysqli, $item_info, $bot_inventory->{$asset_id}->classid); $db_item_id = query_depositItem($mysqli, $item_info["item_information_id"], $user_id, $asset_id, $bot["bot_id"]);