function filter_expired_auctions_success() { $temp = null; if (isset($_SESSION['userId'])) { $temp = $_SESSION['userId']; } $_SESSION['userId'] = 74; $result = retrieve_seller_auctions(); $result = filter_expired_auctions($result); echo "<pre>"; print_r($result); echo "</pre>"; // assert($result[3]['auctionId'] == 5); assert($result); foreach ($result as $auction) { assert(!($auction['auctionId'] == 5)); } if ($temp) { $_SESSION['userId'] = $temp; } }
?> <?php echo $_SESSION['street'] . "<br>"; ?> <?php echo $_SESSION['zip'] . " " . $_SESSION['city'] . "<br/>"; ?> <strong>Email</strong>: <?php echo " " . $_SESSION['email'] . "</p>"; ?> <?php $auction_set = filter_expired_auctions($auction_set_unfiltered); if ($auction_set) { $outputTableHeader = "<a name=\"bids\"><h3>My Recent Bids</h3></a>\n <table class=\"table table-striped\">\n <col width=\"20%\">\n <col width=\"60%\">\n <col width=\"20%\">\n <tr>\n <th>Item Name</th>\n <th>Description</th>\n <th>Status</th>\n </tr>"; echo $outputTableHeader; foreach ($auction_set as $auction) { $imageName = htmlentities($auction['imageName']); $title = htmlentities($auction['title']); $description = htmlentities($auction['description']); $winning_price = htmlentities($auction['winning_price']); // echo $auction['winner_id'] . "<br/>"; if ($_SESSION['userId'] == $auction['winner_id']) { $is_this_buyer = "<br><div id=\"this-you\">This is you!</div>"; } else { $is_this_buyer = "\n <br><div id=\"this-not-you\">Your bid is not the winning bid!</div>"; } $link = "auction.php?auctionId=" . urlencode(htmlentities($auction['auctionId']));