// buy from server shop
        if (ServerShopFuncs::BuyShop(getVar('shopid', 'int', 'post'), getVar('qty', 'int', 'post'))) {
            ForwardTo(getLastPage(), 0);
            exit;
        }
    }
}
// sell to server shop
if (strtolower($config['action']) == 'sell') {
    CSRF::ValidateToken();
    // inventory is locked
    if ($config['user']->isLocked()) {
        $_SESSION['error'][] = 'Your inventory is currently locked.<br />Please close your in game inventory and try again.';
    } else {
        // sell to server shop
        if (ServerShopFuncs::SellShop(getVar('shopid', 'int', 'post'), getVar('qty', 'int', 'post'))) {
            ForwardTo(getLastPage(), 0);
            exit;
        }
    }
}
if ($config['action'] == 'cancel') {
    CSRF::ValidateToken();
    // inventory is locked
    if ($config['user']->isLocked()) {
        $_SESSION['error'][] = 'Your inventory is currently locked.<br />Please close your in game inventory and try again.';
    } else {
        // cancel server shop
        if (ServerShopFuncs::CancelShop(getVar('shopid', 'int', 'post'))) {
            $_SESSION['success'][] = 'Server Shop canceled!';
            ForwardTo(getLastPage(), 0);