setts = &$setts; $item->layout = &$layout; $page_handle = 'auction'; $item_details = $db->get_sql_row("SELECT * FROM " . DB_PREFIX . "auctions WHERE auction_id='" . $_REQUEST['auction_id'] . "'"); if ($item->count_contents($item_details)) { if ($_REQUEST['option'] == 'retract_bid' && $session->value('user_id') == $item_details['owner_id']) { $retract_output = $item->retract_bid($_REQUEST['bidder_id'], $_REQUEST['auction_id']); $template->set('msg_changes_saved', '

' . $retract_output['display'] . '

'); } $template->set('bid_history_header', header5(MSG_VIEW_BID_HISTORY)); $template->set('item_details', $item_details); //$template->set('fees', $fees); $template->set('session', $session); $template->set('item', $item); $sql_select_history = $db->query("SELECT b.*, u.user_id, u.username FROM " . DB_PREFIX . "bids b LEFT JOIN " . DB_PREFIX . "users u ON u.user_id=b.bidder_id WHERE b.auction_id='".$_REQUEST['auction_id']."' ORDER BY b.bid_out ASC, b.bid_id DESC"); (string) $bid_history_content = null; $remaining_quantity = $item_details['quantity']; while ($bid_details = $db->fetch_array($sql_select_history)) { $background = ($counter++%2) ? 'c1' : 'c2'; $background .= (!$bid_details['bid_out']) ? ' bold_item hl_item' : ''; $bid_history_content .= ' '. ' '. (($item_details['hidden_bidding']) ? MSG_BIDDER_ID_HIDDEN : $bid_details['username'] . user_pics($bid_details['user_id'])) /*add feedback*/ . (($bid_details['rp_winner'] && !$bid_details['bid_out']) ? '[ ' . MSG_RP_WINNER . ' ]' : '') . ' '. ' ' . $fees->display_amount($bid_details['bid_amount'], $item_details['currency']) . ''. (($session->value('adminarea')=='Active') ? '' . $fees->display_amount($bid_details['bid_proxy'], $item_details['currency']) . '' : ''). ' ' . show_date($bid_details['bid_date']) . ''; if ($item_details['quantity']>1) { $bid_history_content .= '' . $bid_details['quantity']; if (!$bid_details['bid_out']) { $bid_history_content .= ($remaining_quantity >= $bid_details['quantity']) ? ' (' . $bid_details['quantity'] . ')' : ' (' . $remaining_quantity . ')'; $remaining_quantity -= $bid_details['quantity']; } else { $bid_history_content .= ' (0)'; } $bid_history_content .= ' '; } if ($item_details['owner_id']==$session->value('user_id') && $setts['enable_bid_retraction']) { if ($item_details['closed']==0 && $item_details['deleted']==0) { $bid_history_content .= ' '. ' [ ' . MSG_RETRACT_BID . ' ]'; } else { $bid_history_content .= '' . MSG_REMOVAL_IMPOSSIBLE . ''; } } $bid_history_content .= ' '; $template->set('bid_history_content', $bid_history_content); } $template_output .= $template->process('bid_history.tpl.php'); } else { $template->set('message_header', header5(MSG_VIEW_BID_HISTORY)); $template->set('message_content', '

' . MSG_AUCTION_DETAILS_ERROR_CONTENT . '

'); $template_output .= $template->process('single_message.tpl.php'); } include_once ('global_footer.php'); echo $template_output; ?>