当前位置: 首页>>代码示例>>PHP>>正文


PHP Api::viewBidHistory方法代码示例

本文整理汇总了PHP中Api::viewBidHistory方法的典型用法代码示例。如果您正苦于以下问题:PHP Api::viewBidHistory方法的具体用法?PHP Api::viewBidHistory怎么用?PHP Api::viewBidHistory使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Api的用法示例。


在下文中一共展示了Api::viewBidHistory方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1:

            $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>
开发者ID:resahT,项目名称:Group,代码行数:31,代码来源:viewbook.php

示例2: array

}
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">
开发者ID:resahT,项目名称:Group,代码行数:31,代码来源:viewhouse.php


注:本文中的Api::viewBidHistory方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。