ForwardTo(getLastPage(), 2); exit; } echo $config['error']; exit; } if ($config['action'] == 'cancel') { CSRF::ValidateToken(); // inventory is locked if ($config['user']->isLocked()) { echo '<center><h2>Your inventory is currently locked.<br />Please close your in game inventory and try again.</h2><br /><a href="' . getLastPage() . '">Back to last page</a></center>'; ForwardTo(getLastPage(), 4); exit; } // cancel auction if (AuctionFuncs::CancelAuction(getVar('auctionid', 'int', 'post'))) { echo '<center><h2>Auction canceled!</h2><br /><a href="' . getLastPage() . '">Back to last page</a></center>'; ForwardTo(getLastPage(), 2); exit; } echo $config['error']; exit; } // render page (ajax/json) function RenderPage_auctions_ajax() { global $config, $html; //file_put_contents('ajax_get.txt',print_r($_GET,TRUE)); header('Content-Type: text/plain'); // list auctions $auctions = QueryAuctions::QueryCurrent();
ForwardTo('./', 0); exit; } // need to change temp pass if ($config['user']->isTempPass()) { ForwardTo('./?page=changepass', 0); exit; } // locked inventory if ($config['user']->isLocked()) { $_SESSION['error'][] = 'Your inventory is currently locked.<br />Please close your in game inventory and try again.'; } else { // fixed price if ($config['action'] == 'fixedprice') { CSRF::ValidateToken(); if (AuctionFuncs::SellFixed(getVar('id', 'int', 'post'), getVar('qty', 'int', 'post'), getVar('priceFixed', 'double', 'post'), getVar('desc', 'string', 'post'))) { $_SESSION['success'][] = 'Auction created successfully!'; ForwardTo(getLastPage(), 0); exit; } } else { // auction if ($config['action'] == 'auction') { //TODO: echo 'Sorry, this feature isn\'t ready yet'; exit; } else { // server shop if ($config['action'] == 'servershop') { CSRF::ValidateToken(); if (ServerShopFuncs::CreateShop(getVar('id', 'int', 'post'), getVar('qty', 'int', 'post'), getVar('priceBuy', 'double', 'post'), getVar('priceSell', 'double', 'post'))) {