function MARKET_GetVendors() { global $catid, $MARKET; InitMarket(); if (isNumber($catid)) { print '+OK ' . $MARKET->GetVendorsJSON($catid); } else { print '-ERR'; } }
function MARKET_BasketAdd() { global $id, $MARKET; InitMarket(); if (isNumber($id) && $MARKET->BASKET->AddItemById($id)) { print '+OK'; } else { print '-ERR'; } }
/** * Gate - Wiki engine and web-interface for WebTester Server * * WebTester client page generation script * * Copyright (c) 2008-2009 Sergey I. Sharybin <*****@*****.**> * * This program can be distributed under the terms of the GNU GPL. * See the file COPYING. */ if ($PHP_SELF != '') { print 'HACKERS?'; die; } global $MARKET, $ipc, $action; InitMarket(); /* Some optimization stuff */ $serv_ipc_procs = '#basket_add#'; if ($ipc != '') { $n = count($serv_ipc_procs); if (strpos($serv_ipc_procs, $ipc) > 0) { /* Execute IPC command */ ipc_exec($ipc); die; } } if ($action == 'drop') { global $id; if (isNumber($id)) { $MARKET->BASKET->DropById($id); }