$errors[] = 'Cannot purchase item because you are not logged in.'; } } else { $result = $api->getCurrentUserInfo(); if ($result['result'] == 'SUCCESS') { $newBidAmount = $_REQUEST['newBidAmount']; $bUserid = $result['data']['bUserid']; $addBidResponse = $api->addBid($bookId, $bUserid, $newBidAmount); } else { $errors[] = 'Unable to add bid because you are not logged in.'; } } } else { //nothing to do here } $bidResponse = $api->viewBidHistory(2, $bookId); $maxBidResponse = $api->getMaxBidAmount($bookId); $maxBidAmount = $maxBidResponse['result'] == 'SUCCESS' ? $maxBidResponse['data']['maxBidAmount'] : 0; $book = $response['data']; $askingPrice = $response['data']['askingPrice']; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <?php include 'htmlhead.php'; ?> </head> <body>
} if (strtoupper($_SERVER['REQUEST_METHOD']) == 'POST') { $result = $api->getCurrentUserInfo(); if ($result['result'] == 'SUCCESS') { $newBidAmount = $_REQUEST['newBidAmount']; $bUserid = $result['data']['bUserid']; $response = $api->addBid($houseId, $bUserid, $newBidAmount); } else { $errors[] = 'Unable to add bid because you are not logged in.'; } } else { //nothing to do here } $houses = array(); $response = $api->getItem($houseId, 'house'); $bidResponse = $api->viewBidHistory(2, $houseId); $maxBidResponse = $api->getMaxBidAmount($houseId); $maxBidAmount = $maxBidResponse['data']['maxBidAmount']; $house = $response['data']; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <?php include 'htmlhead.php'; ?> </head> <body> <div id ="topContentWrap">