$template->assign_block_vars('alreadyoverrow_bid', array('AUCTION_OFFER_TITLE' => $auction_mybids[$i]['auction_offer_title'], 'U_AUCTION_OFFER_TITLE' => append_sid("auction_offer_view.php?" . POST_AUCTION_OFFER_URL . "=" . $auction_mybids[$i]['PK_auction_offer_id']), 'AUCTION_OFFER_PRICE_LAST' => $auction_mybids[$i]['auction_offer_last_bid_price'] > 0 ? $auction_mybids[$i]['auction_offer_last_bid_price'] . " " . $auction_config_data['currency'] : $lang['auction_no_bid'], 'AUCTION_OFFER_ROOM_TITLE' => $auction_mybids[$i]['auction_room_title'], 'U_AUCTION_OFFER_ROOM_TITLE' => append_sid("auction_room.php?" . POST_AUCTION_ROOM_URL . "=" . $auction_mybids[$i]['FK_auction_offer_room_id']), 'AUCTION_OFFER_PRICE_MYBID' => $auction_mybids[$i]['FK_auction_offer_last_bid_user_id'] != $userdata['user_id'] ? "<span class=\"genmed\"><span style=\"color:#" . $theme['fontcolor2'] . "'\">" . $lang['auction_offer_outbid'] . "</font></span>" : "<span class=\"genmed\"><span style=\"color:#" . $theme['fontcolor2'] . "\">" . $lang['auction_offer_you_have_highest'] . "</font></span>", 'AUCTION_OFFER_TIME_START' => create_date($board_config['default_dateformat'], $auction_mybids[$i]['auction_offer_time_start'], $board_config['board_timezone']), 'AUCTION_OFFER_TIME_STOP' => create_date($board_config['default_dateformat'], $auction_mybids[$i]['auction_offer_time_stop'], $board_config['board_timezone']))); // } } else { $template->assign_block_vars('activerow_bid', array('AUCTION_OFFER_TITLE' => $auction_mybids[$i]['auction_offer_title'], 'U_AUCTION_OFFER_TITLE' => append_sid("auction_offer_view.php?" . POST_AUCTION_OFFER_URL . "=" . $auction_mybids[$i]['PK_auction_offer_id']), 'AUCTION_OFFER_ROOM_TITLE' => $auction_mybids[$i]['auction_room_title'], 'U_AUCTION_OFFER_ROOM_TITLE' => append_sid("auction_room.php?" . POST_AUCTION_ROOM_URL . "=" . $auction_mybids[$i]['FK_auction_offer_room_id']), 'AUCTION_OFFER_PRICE_LAST' => $auction_mybids[$i]['auction_offer_last_bid_price'] > 0 ? $auction_mybids[$i]['auction_offer_last_bid_price'] . " " . $auction_config_data['currency'] : $lang['auction_no_bid'], 'AUCTION_OFFER_PRICE_MYBID' => $auction_mybids[$i]['FK_auction_offer_last_bid_user_id'] != $userdata['user_id'] ? "<span class=\"genmed\"><span style=\"color:#" . $theme['fontcolor2'] . "'\">" . $lang['auction_offer_outbid'] . "</font></span>" : "<span class=\"genmed\"><span style=\"color:#" . $theme['fontcolor2'] . "\">" . $lang['auction_offer_you_have_highest'] . "</font></span>", 'AUCTION_OFFER_TIME_START' => create_date($board_config['default_dateformat'], $auction_mybids[$i]['auction_offer_time_start'], $board_config['board_timezone']), 'AUCTION_OFFER_TIME_STOP' => create_date($board_config['default_dateformat'], $auction_mybids[$i]['auction_offer_time_stop'], $board_config['board_timezone']))); } } $template->assign_vars(array('TOTAL_POSTS' => sprintf($l_total_post_s, $total_posts), 'TOTAL_USERS' => sprintf($l_total_user_s, $total_users), 'NEWEST_USER' => sprintf($lang['Newest_user'], '<a href="' . append_sid("profile.{$phpEx}?mode=viewprofile&" . POST_USERS_URL . "={$newest_uid}") . '">', $newest_user, '</a>'), 'L_ONLINE_EXPLAIN' => $lang['Online_explain'], 'L_AUCTION_OFFER_PAID' => $lang['auction_offer_paid_status'], 'L_AUCTION_OFFER_STATUS_ACTIV' => $lang['auction_offer_status_active'], 'L_AUCTION_OFFER_STATUS_NOT_STARTED_YET' => $lang['auction_offer_status_not_started_yet'], 'L_AUCTION_OFFER_STATUS_ALREADY_OVER' => $lang['auction_offer_status_already_over'], 'L_AUCTION_MYBIDS' => $lang['auction_mybids'], 'L_MYOFFERS' => $lang['auction_myoffers'], 'L_AUCTION_ROOM' => $lang['auction_room_short'], 'L_AUCTION_OFFER_TITLE' => $lang['auction_offer_title'], 'L_AUCTION_OFFER_START' => $lang['auction_offer_time_start'], 'L_AUCTION_OFFER_STOP' => $lang['auction_offer_time_stop'], 'L_AUCTION_OFFER_STATUS' => $lang['auction_offer_time_status'], 'L_AUCTION_OFFER_PRICE_LAST' => $lang['auction_offer_last_price'], 'L_AUCTION_OFFER_PRICE_MYBID' => $lang['auction_offer_price_mybid'], 'L_AUCTION_OFFER_DIRECT_SELL_PRICE' => $lang['auction_offer_direct_sell_price'], 'L_AUCTION_OFFER_SELLER' => $lang['auction_search_seller'], 'L_DIRECT_BOUGHTS' => $lang['auction_offer_direct_boughts'])); $template->pparse('body'); include $phpbb_root_path . 'auction/auction_footer.' . $phpEx; include $phpbb_root_path . 'includes/page_tail.' . $phpEx; break; case 'watchlist': $page_title = $lang['auction_myauction_watchlist']; include './includes/page_header.php'; include $phpbb_root_path . 'auction/auction_header.' . $phpEx; includeMyAuctionHeader('MY_WATCHLIST'); $sql = "SELECT w.*,\r\n o.*,\r\n r.auction_room_title\r\n FROM ((" . AUCTION_WATCHLIST_TABLE . " w\r\n LEFT JOIN " . AUCTION_OFFER_TABLE . " o ON w.FK_auction_offer_id = o.PK_auction_offer_id)\r\n LEFT JOIN " . AUCTION_ROOM_TABLE . " r ON o.fk_auction_offer_room_id = r.pk_auction_room_id)\r\n WHERE FK_auction_user_id =" . $userdata['user_id'] . ""; if (!($result = $db->sql_query($sql))) { message_die(GENERAL_ERROR, 'Could not your auction-offers', '', __LINE__, __FILE__, $sql); } $total_offers = 0; while ($row = $db->sql_fetchrow($result)) { $auction_mywatchlist[] = $row; $total_offers++; } $template->set_filenames(array('body' => 'auction_myauction_watchlist.tpl')); for ($i = 0; $i < $total_offers; $i++) { if ($auction_mywatchlist[$i]['auction_offer_time_start'] > time()) { $template->assign_block_vars('notstartedrow', array('AUCTION_OFFER_TITLE' => $auction_mywatchlist[$i]['auction_offer_title'], 'U_AUCTION_OFFER_TITLE' => append_sid("auction_offer_view.php?" . POST_AUCTION_OFFER_URL . "=" . $auction_mywatchlist[$i]['PK_auction_offer_id']), 'AUCTION_OFFER_TIME_START' => create_date($board_config['default_dateformat'], $auction_mywatchlist[$i]['auction_offer_time_start'], $board_config['board_timezone']), 'AUCTION_OFFER_TIME_STOP' => create_date($board_config['default_dateformat'], $auction_mywatchlist[$i]['auction_offer_time_stop'], $board_config['board_timezone']), 'AUCTION_OFFER_ADDED_TO_WATCHLIST_TIME' => create_date($board_config['default_dateformat'], $auction_mywatchlist[$i]['auction_watchlist_time'], $board_config['board_timezone']), 'AUCTION_OFFER_PRICE_LAST' => $auction_mywatchlist[$i]['auction_offer_last_bid_price'] > $auction_mywatchlist[$i]['auction_offer_price_start'] ? $auction_mywatchlist[$i]['auction_offer_last_bid_price'] . " " . $auction_config_data['currency'] : $auction_mywatchlist[$i]['auction_offer_price_start'] . " " . $auction_config_data['currency'], 'AUCTION_OFFER_DELETE_FROM_WATCHLIST_IMAGE' => $phpbb_root_path . $images['icon_auction_delete'], 'AUCTION_OFFER_ROOM_TITLE' => $auction_mywatchlist[$i]['auction_room_title'], 'U_AUCTION_OFFER_ROOM_TITLE' => append_sid("auction_room.php?" . POST_AUCTION_ROOM_URL . "=" . $auction_mywatchlist[$i]['fk_auction_offer_room_id']), 'U_AUCTION_OFFER_DELETE_FROM_WATCHLIST_IMAGE' => append_sid("auction_my_auctions.php?mode=delete_from_watchlist&" . POST_AUCTION_OFFER_URL . "=" . $auction_mywatchlist[$i]['PK_auction_offer_id'] . ""), 'L_AUCTION_OFFER_DELETE_FROM_WATCHLIST_IMAGE' => $lang['auction_offer_watchlist_delete_from'])); } elseif ($auction_mywatchlist[$i]['auction_offer_time_stop'] < time() or $auction_myoffers[$i]['auction_offer_state'] == 2) { $template->assign_block_vars('alreadyoverrow', array('AUCTION_OFFER_TITLE' => $auction_mywatchlist[$i]['auction_offer_title'], 'U_AUCTION_OFFER_TITLE' => append_sid("auction_offer_view.php?" . POST_AUCTION_OFFER_URL . "=" . $auction_mywatchlist[$i]['PK_auction_offer_id']), 'AUCTION_OFFER_TIME_START' => create_date($board_config['default_dateformat'], $auction_mywatchlist[$i]['auction_offer_time_start'], $board_config['board_timezone']), 'AUCTION_OFFER_TIME_STOP' => create_date($board_config['default_dateformat'], $auction_mywatchlist[$i]['auction_offer_time_stop'], $board_config['board_timezone']), 'AUCTION_OFFER_PRICE_LAST' => $auction_mywatchlist[$i]['auction_offer_last_bid_price'] > $auction_mywatchlist[$i]['auction_offer_price_start'] ? $auction_mywatchlist[$i]['auction_offer_last_bid_price'] . " " . $auction_config_data['currency'] : $auction_mywatchlist[$i]['auction_offer_price_start'] . " " . $auction_config_data['currency'], 'AUCTION_OFFER_ADDED_TO_WATCHLIST_TIME' => create_date($board_config['default_dateformat'], $auction_mywatchlist[$i]['auction_watchlist_time'], $board_config['board_timezone']), 'AUCTION_OFFER_DELETE_FROM_WATCHLIST_IMAGE' => $phpbb_root_path . $images['icon_auction_delete'], 'AUCTION_OFFER_ROOM_TITLE' => $auction_mywatchlist[$i]['auction_room_title'], 'U_AUCTION_OFFER_ROOM_TITLE' => append_sid("auction_room.php?" . POST_AUCTION_ROOM_URL . "=" . $auction_mywatchlist[$i]['fk_auction_offer_room_id']), 'U_AUCTION_OFFER_DELETE_FROM_WATCHLIST_IMAGE' => append_sid("auction_my_auctions.php?mode=delete_from_watchlist&" . POST_AUCTION_OFFER_URL . "=" . $auction_mywatchlist[$i]['PK_auction_offer_id'] . ""), 'L_AUCTION_OFFER_DELETE_FROM_WATCHLIST_IMAGE' => $lang['auction_offer_watchlist_delete_from']));
includeAuctionSpecialBlock(); includeAuctionDropDownRoomBlock(); includeLastBidsBlock(); includeNewestOffersBlock(); // END Include-Blocks // Mode setting if (isset($HTTP_POST_VARS['mode']) || isset($HTTP_GET_VARS['mode'])) { $mode = isset($HTTP_POST_VARS['mode']) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode']; $mode = htmlspecialchars($mode); } else { $mode = ""; } $page_title = $lang['auction_my_account']; include './includes/page_header.php'; include $phpbb_root_path . 'auction/auction_header.' . $phpEx; includeMyAuctionHeader('MY_ACCOUNT'); $template->set_filenames(array('body' => 'auction_my_account.tpl')); if (!empty($mode)) { switch ($mode) { case 'transaction': case 'view': $sql = "SELECT acc.*,\r\n ao.auction_offer_title\r\n FROM " . AUCTION_ACCOUNT_TABLE . " acc\r\n LEFT JOIN " . AUCTION_OFFER_TABLE . " ao on acc.fk_auction_offer_id=ao.pk_auction_offer_id\r\n WHERE fk_auction_account_creditor_id=2 AND\r\n fk_auction_account_debitor_id =" . $userdata['user_id'] . " AND\r\n auction_account_action='" . ACTION_INITIAL . "'"; if (!($result = $db->sql_query($sql))) { message_die(GENERAL_ERROR, 'Could not grab account information', '', __LINE__, __FILE__, $sql); } // if $total_action = 0; while ($row = $db->sql_fetchrow($result)) { $action_rowset[] = $row; $total_action++; }
if ($auction_user_seller_ratings[$i]['auction_rating_icon'] == "1.gif") { $rating_image = $images['icon_rating1']; } if ($auction_user_seller_ratings[$i]['auction_rating_icon'] == "2.gif") { $rating_image = $images['icon_rating2']; } if ($auction_user_seller_ratings[$i]['auction_rating_icon'] == "3.gif") { $rating_image = $images['icon_rating3']; } if ($auction_user_seller_ratings[$i]['auction_rating_icon'] == "4.gif") { $rating_image = $images['icon_rating4']; } $template->assign_block_vars('sellerratingrow', array('AUCTION_USER_SELLER_RATING_ICON' => $rating_image, 'AUCTION_USER_SELLER_RATING_TEXT' => $auction_user_seller_ratings[$i]['auction_offer_seller_rating_text'], 'AUCTION_USER_SELLER_RATING_TITLE' => $auction_user_seller_ratings[$i]['auction_rating_title'], 'AUCTION_USER_SELLER_RATING_FROM' => $auction_user_seller_ratings[$i]['username'], 'AUCTION_USER_SELLER_RATING_TIME' => create_date($board_config['default_dateformat'], $auction_user_seller_ratings[$i]['auction_user_seller_rating_time'], $board_config['board_timezone']), 'AUCTION_OFFER_DELETED' => $auction_user_seller_ratings[$i]['PK_auction_offer_id'] ? "" : $lang['auction_offer_deleted'], 'AUCTION_USER_SELLER_RATING_FOR' => $auction_user_seller_ratings[$i]['PK_auction_offer_id'] ? $lang['auction_user_rating_view_offer'] : "", 'U_AUCTION_USER_SELLER_RATING_FOR' => $auction_user_seller_ratings[$i]['PK_auction_offer_id'] ? append_sid("auction_offer_view.{$phpEx}?" . POST_AUCTION_OFFER_URL . "=" . $auction_user_seller_ratings[$i]['FK_auction_offer_id']) : "")); } $page_title = $lang['auction_my_ratings']; include './includes/page_header.php'; include $phpbb_root_path . 'auction/auction_header.' . $phpEx; if ($userdata['user_id'] == $user_id) { includeMyAuctionHeader('MY_RATING'); } $template->pparse('body'); include $phpbb_root_path . 'auction/auction_footer.' . $phpEx; include $phpbb_root_path . 'includes/page_tail.' . $phpEx; break; // view // view default: message_die(GENERAL_MESSAGE, $lang['No_mode']); break; } }
includeAuctionSpecialBlock(); includeAuctionDropDownRoomBlock(); includeLastBidsBlock(); includeNewestOffersBlock(); // END Include-Blocks // Mode setting if (isset($HTTP_POST_VARS['mode']) || isset($HTTP_GET_VARS['mode'])) { $mode = isset($HTTP_POST_VARS['mode']) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode']; $mode = htmlspecialchars($mode); } else { $mode = ""; } $page_title = $lang['auction_myauction_auctions']; include './includes/page_header.php'; include $phpbb_root_path . 'auction/auction_header.' . $phpEx; includeMyAuctionHeader('MY_STORE'); $template->set_filenames(array('body' => 'auction_my_user_store.tpl')); if (!empty($mode)) { switch ($mode) { case 'open': $sql = "INSERT INTO " . AUCTION_USER_STORE_TABLE . " (fk_user_id)\r\n VALUES (" . $userdata['user_id'] . ")"; if (!($result = $db->sql_query($sql))) { message_die(GENERAL_ERROR, 'Could not add user store', '', __LINE__, __FILE__, $sql); } // if $template->assign_block_vars('store_opened', array('L_STORE_OPENED' => $lang['store_opened'])); break; case 'update': $store_name = $HTTP_POST_VARS['store_name']; $store_description = $HTTP_POST_VARS['store_description']; $store_header = $HTTP_POST_VARS['store_header'];