예제 #1
0
$stmt = $dbh->prepare("SELECT * FROM auctions WHERE UNIX_TIMESTAMP(end) > UNIX_TIMESTAMP(NOW()) ORDER BY end ASC");
$stmt->execute();
while ($row = $stmt->fetch()) {
    // ..and for each one, display a form with the work image, a link to workview,php, the work tombstone,
    // the amount of time left in the auction, and basic auction data (curent bid, minimum bid if nobody
    // has bid yet, buy-it-now price); includes text input for bid amount and button(s) for placing
    // a bid / buying outright, if applicable.  Buttons are handled in (document).ready() above.
    echo "<form>\n";
    echo "<input type=\"hidden\" name=\"aid\" value=\"" . $row['id'] . "\"/>";
    echo "<input type=\"hidden\" name=\"seller\" value=\"" . $row['uid'] . "\"/>";
    echo "<input type=\"hidden\" name=\"work\" value=\"" . $row['wid'] . "\"/> ";
    echo "<div style=\"background-color:lightgray;width:100%;height:200px;padding:8px;\">\n";
    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";
    }
예제 #2
0
파일: 151.php 프로젝트: rudiedirkx/Games
}
//-->
</script>
</head>

<body>
<table border="0" width="100%" height="100%">
<tr>
	<td height="15" colspan="<?php 
echo count($arrTowers);
?>
"><a href="?reset=1">reset</a> | moves: <?php 
echo $iMoves;
?>
 | time: <?php 
echo secondsToString(empty($arrFinished) ? $iPlaytime : $arrFinished['playtime']);
echo !empty($arrFinished) ? ' | <b>FINISHED: <input type="text" id="savename" size="12" /> <input type="button" value="Save" onclick="document.location=\'?save=\'+document.getElementById(\'savename\').value;" /></b>' : '';
?>
</td>
</tr>
<tr valign="top">
<?php 
foreach ($arrTowers as $k => $arrTower) {
    echo '<th height="40" width="' . round(100 / count($arrTowers)) . '%">Tower ' . $k . '</th>';
}
?>
</tr>
<tr valign="middle">
<?php 
foreach ($arrTowers as $k => $arrTower) {
    echo '<td class="tower" id="tower_' . $k . '" onclick="CT(\'' . $k . '\');" width="' . round(100 / count($arrTowers)) . '%" align="center">';