Beispiel #1
0
		$query->bindParam( 3, $bidAmt );
		$query->execute( );
		echo( "You have placed an absentee bid of " . $CURRENCY_SYMBOL . $bidAmt . ".");	
		exit;
	}
	*/
// Series of sanity checks: did the user enter a positive integer as his/her bid?
if (!is_numeric($bidAmt) || $bidAmt < 1) {
    echo $bidAmt . " isn't an acceptable bid.  Please bid only positive integers.";
    // Is the auction still active?  And is the user bidding an acceptable minimum?  (Current high bid + 5 FCG)
} elseif (isAuctionStillActiveFixedEnd($auctionId) && $bidAmt < getHighBidAmountForAuction($auctionId) + 5) {
    echo "Please bid at least " . $CURRENCY_SYMBOL . (getHighBidAmountForAuction($auctionId) + 5) . ".";
    echo "<p/><button id=\"dismiss\" class=\"ui-widget ui-button ui-state-default ui-corner-all ui-button-text-only\" style=\"width:100px;height:40px;\" onClick=\"window.parent.Shadowbox.close( );\">Okay</button>";
    // Is the attempted bid less than the minimum bid for the auction?
} elseif (isAuctionStillActiveFixedEnd($auctionId) && $bidAmt < getMinimumBidForAuction($auctionId)) {
    echo "Sorry, but the minimum bid for this auction is " . getMinimumBidForAuction($auctionId) . ".";
    echo "<p/><button id=\"dismiss\" class=\"ui-widget ui-button ui-state-default ui-corner-all ui-button-text-only\" style=\"width:100px;height:40px;\" onClick=\"window.parent.Shadowbox.close( );\">Okay</button>";
    // Does the user have enough money to place this bid?  If so, place it.
} elseif (isAuctionStillActiveFixedEnd($auctionId) && $bidAmt <= getPoints($uuid)) {
    placeBidFixedEnd($auctionId, $uuid, $bidAmt, $gameinstance);
    echo "You have bid " . $CURRENCY_SYMBOL . $bidAmt . " on this work.";
    echo "<p/><button id=\"dismiss\" class=\"ui-widget ui-button ui-state-default ui-corner-all ui-button-text-only\" style=\"width:100px;height:40px;\" onClick=\"window.parent.Shadowbox.close( );\">Okay</button>";
    // Logically, this should come first so we don't call the function 3 times in a row for other checks... FIXME
} elseif (!isAuctionStillActiveFixedEnd($auctionId)) {
    echo "The auction has already ended!";
    echo "<p/><button id=\"dismiss\" class=\"ui-widget ui-button ui-state-default ui-corner-all ui-button-text-only\" style=\"width:100px;height:40px;\" onClick=\"window.parent.Shadowbox.close( );\">Okay</button>";
} else {
    // Almost certainly due to a lack of points -- "place bid" button disappears when the auction ends.
    // Still, we should be a little more nuanced with the error state here.
    echo "You don't have " . $CURRENCY_SYMBOL . $bidAmt . "!";
    echo "<p/><button id=\"dismiss\" class=\"ui-widget ui-button ui-state-default ui-corner-all ui-button-text-only\" style=\"width:100px;height:40px;\" onClick=\"window.parent.Shadowbox.close( );\">Okay</button>";
Beispiel #2
0
    echo "<div style=\"float:left;display:inline;\"><a rel=\"shadowbox\" href=\"workview.php?wid=" . $row['wid'] . "\"><img src=\"img.php?img=" . $row['wid'] . "\" style=\"height:150px;\"/></a>\n";
    echo "</div><div style=\"float:left;display:inline;width:80%;padding:10px;\">";
    echo "<span style=\"font-size:1.5em;\">" . getTombstoneOrBlank($row['wid'], true) . "</span><br/>";
    echo "Offered by " . getUsername($row['uid']) . " (ends in <b>" . secondsToString(strtotime($row['end']) - strtotime('-0 seconds')) . "</b>, on " . $row['end'] . ")<p/>Current high bid: " . getHighBidderForAuction($row['id']);
    echo " (" . $CURRENCY_SYMBOL . getHighBidAmountForAuction($row['id']);
    if (getReserve($row['id'] > 0)) {
        echo ", reserve" . (didAuctionMeetReserve($row['id']) > 0 ? " met" : " not met");
    }
    echo ")<p/>\n";
    echo "<input type=\"text\" name=\"amount\" size=\"5\"/>\n";
    echo "<button type=\"submit\" style=\"\" class=\"buyClassified\" name=\"" . $row['id'] . "\" id=\"#buy" . $row['wid'] . "\">Place Bid";
    if (getMinimumBidForAuction($row['id']) > getHighBidAmountForAuction($row['id'])) {
        echo " (Minimum bid: " . $CURRENCY_SYMBOL . getMinimumBidForAuction($row['id']) . ")";
    }
    echo "</button>\n";
    if (getAuctionBIN($row['id']) > 0 && getHighBidAmountForAuction($row['id']) <= getMinimumBidForAuction($row['id'])) {
        echo "<input type=\"hidden\" name=\"amountOutright\" value=\"" . getAuctionBIN($row['id']) . "\"/>\n";
        echo "<button class=\"buyBIN\" name=\"" . $row['id'] . "\" id=\"#bin" . $row['wid'] . "\">Buy outright for " . $CURRENCY_SYMBOL . getAuctionBIN($row['id']) . "</button>\n";
    }
    echo "</div></div><p/>\n";
    echo "</form>\n";
}
?>
<p/>
	</div>
</div>
</div>
<!-- Hidden divs used for jQuery UI modal dialogs -->
<div id="dialog-confirm" title="Place bid?">
	<p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span></p>
</div>