當前位置: 首頁>>代碼示例>>PHP>>正文


PHP task::getCurrentBid方法代碼示例

本文整理匯總了PHP中task::getCurrentBid方法的典型用法代碼示例。如果您正苦於以下問題:PHP task::getCurrentBid方法的具體用法?PHP task::getCurrentBid怎麽用?PHP task::getCurrentBid使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在task的用法示例。


在下文中一共展示了task::getCurrentBid方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: task

    //echo "post not set\n";
}
$task = new task();
$error = $task->getFromDB($intaskid);
if ($error == NULL) {
    //Convert task to usable array
    $taskout = array();
    $taskout['TaskID'] = $task->taskid;
    $taskout['Lister'] = $task->userid;
    $taskout['Title'] = $task->title;
    $taskout['Description'] = $task->description;
    $taskout['Location'] = $task->location;
    $taskout['Category'] = $task->category;
    $taskout['Tags'] = $task->tags;
    $taskout['NumImages'] = $task->numimg;
    $taskout['CurrentBid'] = $task->getCurrentBid();
    $taskout['EndDateTime'] = $task->enddatetime;
    $taskout['HighestBidderID'] = $task->winnerid;
    if ($taskout['HighestBidderID'] != null) {
        $winner = new user();
        $winner->getFromDB($taskout['HighestBidderID']);
        $taskout['HighestBidderUsername'] = $winner->username;
    }
    //Get user info
    $lister = new user();
    if ($lister->getFromDB($task->userid) == null) {
        $taskout['ListerUsername'] = $lister->username;
        $taskout['ListerAvatarURL'] = $lister->getAvatarURL();
        //$taskout['ListerAvatarURL']=$lister->DEBUGgetAvatarURL();
        $rating = $lister->getListerRating();
        $taskout['ListerRating'] = $rating['rating'];
開發者ID:sammyr2011,項目名稱:Task_Master,代碼行數:31,代碼來源:view_task_android.php

示例2: header

        $_SESSION['msg_bidnegative'] = "Bid Cannot Be Negative";
    }
    if (isset($biderror['bidself'])) {
        $_SESSION['msg_bidself'] = "Can't bid on own task";
    }
    if (isset($biderror['login'])) {
        $_SESSION['msg_needlogin'] = "Log in to bid";
    }
    //redirect to prevent form resubmission on refresh
    header("Location: /ViewTask.php?id=" . $intaskid);
    die;
}
//AJAX for getting the current bid
if (isset($_GET['getCurrentBid'])) {
    echo 'Current bid: $<b>';
    echo $task->getCurrentBid();
    echo '.00';
    if (isset($_SESSION['userid']) && $task->getBidLeaderID() == $_SESSION['userid']) {
        echo ' (You)';
    }
    echo '</b>';
    die;
}
//show alert if task is not active
if (count($error) == 0 && $task->active == 0) {
    if (isset($_SESSION['userid']) && $task->winnerid == $_SESSION['userid']) {
        $_SESSION['msg_taskover_won'] = "Task ended, you won!";
    } else {
        $_SESSION['msg_taskover'] = "Task ended";
    }
}
開發者ID:sammyr2011,項目名稱:Task_Master,代碼行數:31,代碼來源:ViewTask.php


注:本文中的task::getCurrentBid方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。