value('user_id')) { $template->set('member_id', $session->value('user_id')); } # END PRIVATE MESSAGING v6.11 $template->set('auction_id', intval($_REQUEST['auction_id'])); # START ADDITIONAL ITEM INFORMATION SELECT BOX v6.11 $item_details = $db->get_sql_row("SELECT a.*, ai.title FROM " . DB_PREFIX . "auctions a LEFT JOIN " . DB_PREFIX . "additional_information ai ON a.additional_options = ai.id WHERE a.auction_id='" . intval($_REQUEST['auction_id']) . "'"); # END ADDITIONAL ITEM INFORMATION SELECT BOX v6.11 # START AUCTION RELISTED NOTIFICATION v6.11 if ($item_details['closed']==1 && $item_details['active']==1) { $relistedcheck = $db->get_sql_number("SELECT * FROM " . DB_PREFIX . "auctions WHERE name LIKE '%".$db->rem_special_chars($item_details['name'])."%' AND active=1 AND closed=0 AND owner_id='".$item_details['owner_id']."'"); if ($relistedcheck) { $relisteddata = $db->get_sql_field("SELECT auction_id FROM " . DB_PREFIX . "auctions WHERE name LIKE '%".$db->rem_special_chars($item_details['name'])."%' AND active=1 AND closed=0 AND owner_id='".$item_details['owner_id']."' LIMIT 1","auction_id"); $template->set('relisteddata', $relisteddata); } } # END AUCTION RELISTED NOTIFICATION v6.11 $template->set('item_details', $item_details); # START PRODUCT REVIEWS MOD v6.11 if ($setts['p_rev_enabled']) { $product = $db->rem_special_chars(trim($item_details['name']))."-".$item_details['auction_id']; $review_check = $db->get_sql_number("SELECT product_id FROM " . DB_PREFIX . "product_reviews WHERE product_status='1' AND product_name='".$product."'"); if ($review_check) { $template->set('review_check', $review_check); $total_score = $db->get_sql_row("SELECT SUM(product_rating) as total FROM " . DB_PREFIX . "product_reviews WHERE product_status='1' AND product_name='".$product."'"); $total_reviews = $db->count_rows('product_reviews', "WHERE product_status='1' AND product_name='".$product."'"); $review_score = $total_score['total'] / $total_reviews; $template->set('review_score', $review_score); } if ($setts['p_rev_multi_enabled']) { $can_review = 1; $template->set('can_review', $can_review); } if (!$review_check) { $can_review = 1; $template->set('can_review', $can_review); } if (!$setts['p_rev_multi_enabled']) { $prior_check = $db->get_sql_number("SELECT product_id FROM " . DB_PREFIX . "product_reviews WHERE product_name='".$product."' AND product_reviewer='".$session->value('user_id')."'"); if (!$prior_check) { $can_review = 1; $template->set('can_review', $can_review); } } } # END PRODUCT REVIEWS MOD v6.11 require ('global_header.php'); # START FORCE LOGIN X VIEWS MOD v6.11 if ($setts['force_login'] && $session->value('membersarea') != 'Active') { $cookiename = $setts['force_cookie']; if(isset($_COOKIE[$cookiename])) { $cookieval = $_COOKIE[$cookiename]; $cookieval = $cookieval + 1; $expire = time() + 30*24*3600; $cookvalue = time() + (TIME_OFFSET * 3600); setcookie($cookiename, $cookieval, $expire); } else { $expire = time() + 30*24*3600; $cokval = 1; setcookie($cookiename, $cokval, $expire); } if ($session->value('membersarea') != 'Active' && $cookieval > $setts['force_views']) { header_redirect('login.php?redirect=auction_details.php?auction_id=' . $_REQUEST['auction_id']); } } # END FORCE LOGIN X VIEWS MOD v6.11 (array) $user_details = null; # START PRIVATE MESSAGING v6.11 if ($_REQUEST['posted'] == "success" && $_REQUEST['comments'] && $setts['pmsg_auct'] && $setts['pmsg_enable']) { $msg = new messaging(); $msg->setts = &$setts; $msg->new_topic(0, $session->value('user_id'), $item_details['owner_id'], 0, 'Private Message', $db->rem_special_chars($_REQUEST['comments']), 0); header_redirect('auction_details.php?auction_id=' . intval($_REQUEST['auction_id']) . ''); } # END PRIVATE MESSAGING v6.11 $start_time_id = 1; $end_time_id = 2; $item = new item(); $item->setts = &$setts; $item->layout = &$layout; $reputation = new reputation(); $reputation->setts = &$setts; $page_handle = 'auction'; $addl_query = ($session->value('adminarea')!="Active") ? " AND active=1 AND approved=1" : ''; $protected_page = protected_page($item_details['owner_id'], $item_details['category_id']); if ( ($protected_page['private_store'] && !store_logged_in($item_details['owner_id']) && $item_details['list_in'] != 'auction') || ($protected_page['private_category'] && !category_logged_in($item_details['category_id'])) ) { header_redirect('protected_page.php?redirect_url=auction_details&auction_id=' . $item_details['auction_id'] . '&user_id=' . $item_details['owner_id'] . '&category_id=' . $item_details['category_id']); } else { $main_category_id = $db->main_category($item_details['category_id']); $category_details = $db->get_sql_row("SELECT minimum_age FROM " . DB_PREFIX . "categories WHERE category_id='" . $main_category_id . "'"); # START RECENTLY VIEWED v6.11 if($layout['nb_recently_visited']){ setcookie('recently_visited['.$_REQUEST['auction_id'].']', $_REQUEST['auction_id'], time() + 86400); } # END RECENTLY VIEWED v6.11 if ($_REQUEST['option'] == 'agree_adult') { $session->set('adult_category', 1); } $can_view = false; $adult_cat = false; if ($item_details['auction_id']) { if (($session->value('adminarea')=="Active") || ($item_details['active'] ==1 && $item_details['approved'] == 1) || ($session->value('user_id') == $item_details['owner_id'])) { $can_view = true; $adult_cat = false; } if ($session->value('adminarea')!="Active" && $category_details['minimum_age'] > 0 && !$session->value('adult_category')) { $can_view = false; $adult_cat = true; } } # START RELATED ITEMS v6.11 $related_it=unserialize($setts["related_items"]); if ($related_it[0]!='0'){ $related = NULL; foreach(explode(" ",$item_details['name'])as $value){ ##$related .="A.name LIKE '%".$value."%' or "; $related .="MATCH A.name AGAINST ('%".$value."%' IN BOOLEAN MODE) or "; } # START RELATED ITEMS - YOUTUBE FIX $sql = $db->query("SELECT A.name, A.max_bid ,A.start_price, A.currency, A.auction_id as tumas, A.end_time ,A.closed, A.active, AM.* FROM " . DB_PREFIX . "auctions A LEFT JOIN " . DB_PREFIX . "auction_media AM ON AM.auction_id = A.auction_id WHERE A.closed=0 AND AM.media_type=1 AND (".substr($related,0,-3).") GROUP BY A.auction_id LIMIT ".$related_it[2]); # END RELATED ITEMS - YOUTUBE FIX $num = $related_it[0]; $width = 100/$num; $cnt = 0; $items = ""; while ($related_item = $db->fetch_array($sql)) { if (($related_item["tumas"]!=$item_details['auction_id']) && ($related_item["closed"]!=1)){ if ($cnt == $num){ $items .=""; $cnt = 0; } $price = (($related_item['max_bid'] > 0 )?$fees->display_amount($related_item['max_bid'], $related_item['currency']):$fees->display_amount($related_item['start_price'], $related_item['currency'])); $items.='
'.$related_item['name'].'
'.$related_item['name'].'

'.MSG_CURRENT_BID.': '.$price.'
'.MSG_TIME_LEFT.': '.time_left($related_item['end_time']).'
'; $cnt++; } } if (!preg_match("/auction_print.php/i", $_SERVER["PHP_SELF"])) { (($cnt!=0)? $template->set('related_items', header1(MSG_RELATED_ITEMS). $items."

"):""); } } # END RELATED ITEMS v6.11 if ($can_view) { # START AUCTION ENDING REMINDER v6.11 if ($setts["auction_alerts"]==1){ $alert=$db->rem_special_chars_array($_POST); $alert_details = explode("|",$alert["alert"]); $alert_box = '"; $template->set('alert_box', $alert_box); if(isset($_POST["set_alarm"])){ $sql_delete_alert = $db->query("DELETE FROM " . DB_PREFIX . "auction_alerts WHERE auction_id=".$alert['auction_id']." AND user_id=".$session->value('user_id')); if ($alert["alert"]!="SELECT") $sql_insert_alert = $db->query("INSERT INTO " . DB_PREFIX . "auction_alerts (auction_id, user_id, alert, auction_time, title) VALUES (".$alert['auction_id'].",".$session->value('user_id').",".$alert_details[0].",".$item_details['end_time'].",'".$alert_details[1]."')"); } } # END AUCTION ENDING REMINDER v6.11 $blocked_user = blocked_user($session->value('user_id'), $item_details['owner_id']); $template->set('blocked_user', $blocked_user); $user_details = $db->get_sql_row("SELECT * FROM " . DB_PREFIX . "users WHERE user_id=" . $item_details['owner_id']); # START NO PAY BEFORE INVOICE v6.11 if ($user_details['default_invoice_first']) { $template->set('default_invoice_first', $user_details['default_invoice_first']); } if ($user_details['default_invoice_first_text']) { $template->set('default_invoice_first_text', $user_details['default_invoice_first_text']); } # END NO PAY BEFORE INVOICE v6.11 $block_reason_msg = null; if ($blocked_user) { // $msg_changes_saved = block_reason($session->value('user_id'), $item_details['owner_id'], 'message'); $msg_changes_saved = '

' . MSG_VERIFIED_BIDDER_ASK_QUESTION_ERROR . '

'; } if ($user_details['is_vacation']) { $block_reason_msg .= '

' . MSG_VACATION_MODE_DESCRIPTION . '

'; } $template->set('block_reason_msg', $block_reason_msg); $template->set('auction_id', intval($_REQUEST['auction_id']));## PHP Pro Bid v6.00 add click if ($_SERVER['REMOTE_ADDR'] != $item_details['seller_ip']) { $sql_add_click = $db->query("UPDATE " . DB_PREFIX . "auctions SET nb_clicks=nb_clicks+1 WHERE auction_id=" . $item_details['auction_id']); } $custom_fld = new custom_field(); $msg = new messaging(); $msg->setts = &$setts; /** * if we have a user logged in, we mark as read any questions/answers he has received */ if ($session->value('user_id')) { $msg->mark_read($session->value('user_id'), 0, $item_details['auction_id'], 1); //<-- needs mysql optimization! } $blocked_user = blocked_user($session->value('user_id'), $item_details['owner_id'], 'message'); if (in_array($_REQUEST['option'], array('post_question', 'post_answer')) || in_array($_REQUEST['operation'], array('post_question', 'post_answer'))) { if ($blocked_user) { $msg_changes_saved = block_reason($session->value('user_id'), $item_details['owner_id'], 'message'); } else if (empty($_REQUEST['message_content']) && !empty($_REQUEST['option'])) { $msg_changes_saved = '

' . MSG_MESSAGE_EMPTY . '

'; } else { if ($_REQUEST['option'] == 'post_question') { $msg->new_topic($item_details['auction_id'], $session->value('user_id'), $item_details['owner_id'], 1, '', $_REQUEST['message_content'], $_REQUEST['message_handle']); header_redirect('auction_details.php?auction_id=' . $item_details['auction_id'] . '&operation=post_question'); } else if ($_REQUEST['option'] == 'post_answer') { $msg->reply(intval($_REQUEST['question_id']), $session->value('user_id'), '', $_REQUEST['message_content']); header_redirect('auction_details.php?auction_id=' . $item_details['auction_id'] . '&operation=post_answer'); } if ($_REQUEST['operation'] == 'post_question') { $msg_changes_saved = '

' . MSG_QUESTION_POSTED_SUCCESSFULLY . '

'; } else if ($_REQUEST['operation'] == 'post_answer') { $msg_changes_saved = '

' . MSG_ANSWER_POSTED_SUCCESSFULLY . '

'; } } } # START FAVORITE SELLERS WITH NEWSLETTER v6.11 if ($session->value('user_id')) { $is_favorite_seller = $db->count_rows('favourite_sellers', "WHERE seller_id='" . $item_details['owner_id'] . "' AND user_id='" . $session->value('user_id') . "'"); if ($_REQUEST['option'] == 'favorites') { if (!$is_favorite_seller) { $time_now = time() + (TIME_OFFSET * 3600); $email = $db->get_sql_field("SELECT email FROM " . DB_PREFIX . "users WHERE user_id='".$session->value('user_id')."'","email"); $db->query("INSERT INTO " . DB_PREFIX . "favourite_sellers (seller_id, user_id, date, email) VALUES ('" . $item_details['owner_id'] . "', '" . $session->value('user_id') . "', '".$time_now."', '".$email."')"); $is_favorite_seller = 1; $msg_changes_saved = '

Seller has been added to your favorites list.

'; } else { $db->query("DELETE FROM " . DB_PREFIX . "favourite_sellers WHERE seller_id='" . $item_details['owner_id'] . "' AND user_id='" . $session->value('user_id') . "'"); $is_favorite_seller = 0; $msg_changes_saved = '

Seller has been removed from your favorites list.

'; } } $favorite_seller_link = '' . ((!$is_favorite_seller) ? MSG_ADD_TO_FAVORITE_SELLERS : MSG_REMOVE_FROM_FAVORITE_SELLERS) . ''; $template->set('favorite_seller_link', $favorite_seller_link); } # END FAVORITE SELLERS WITH NEWSLETTER v6.11 ## PHP Pro Bid v6.00 item watch procedure if ($_REQUEST['option'] == 'item_watch') { if ($session->value('user_id')) { # START WATCHLIST ITEMS ENDING REMINDER v6.11 $item_watch = $item->item_watch_add($item_details['auction_id'], $session->value('user_id'), $item_details['owner_id'], $item_details['end_time']); # END WATCHLIST ITEMS ENDING REMINDER v6.11 $msg_changes_saved = '

' . $item_watch . '

'; } else { $msg_changes_saved = '

' . MSG_LOGIN_FOR_ITEM_WATCH . '

'; } } # START USER WISH LIST v6.11 if ($_REQUEST['option'] == 'wish_list' && $setts['enable_wish_list']) { if ($session->value('user_id')) { $wish_list = $item->wish_list_add($item_details['auction_id'], $session->value('user_id'), $item_details['owner_id']); $msg_changes_saved = '

' . $wish_list . '

'; } else { $msg_changes_saved = '

' . MSG_LOGIN_FOR_WISH_LIST . '

'; } } if ($_REQUEST['option'] == 'wish_list_remove' && $setts['enable_wish_list']) { if ($session->value('user_id')) { $wish_list_delete = $item->wish_list_delete($item_details['auction_id'], $session->value('user_id'), $item_details['owner_id']); $msg_changes_saved = '

' . $wish_list_delete . '

'; } else { $msg_changes_saved = '

' . MSG_LOGIN_FOR_WISH_LIST . '

'; } } # END USER WISH LIST # START WATCH ITEM NOTIFICATION & REMOVAL MOD v6.11 if ($_REQUEST['option'] == 'item_watch_remove' && $session->value('user_id')) { $remove = $db->query("DELETE FROM " . DB_PREFIX . "auction_watch WHERE user_id='".$session->value('user_id')."' AND auction_id='".$item_details['auction_id']."'"); } if ($session->value('user_id')) { $watch_list = $db->get_sql_number("SELECT id FROM " . DB_PREFIX . "auction_watch WHERE user_id='".$session->value('user_id')."' AND auction_id='".$item_details['auction_id']."'"); $template->set('watch_list', $watch_list); } # END WATCH ITEM NOTIFICATION & REMOVAL MOD v6.11 ## PHP Pro Bid v6.00 send auction to a friend procedure if ($_REQUEST['option'] == 'auction_friend') { $form_submitted = 0; if (isset($_REQUEST['form_auction_friend'])) { define ('FRMCHK_AUCTION_FRIEND', 1); (int) $item_post = 1; $af_details = $_REQUEST; $frmchk_details = $af_details; include('includes/procedure_frmchk_auction_friend.php'); if ($fv->is_error()) { $template->set('display_formcheck_errors', '' . $fv->display_errors() . ''); } else { $auction_friend_output = $item->auction_friend($item_details, $session->value('user_id'), $af_details['friend_name'], $af_details['friend_email'], $_REQUEST['comments'], $af_details['name'], $af_details['email']); $msg_changes_saved = '

' . $auction_friend_output . '

'; $form_submitted = 1; } } if (!$form_submitted) { if (!$item_post && $session->value('user_id')) { $af_details = $db->get_sql_row("SELECT name, email FROM " . DB_PREFIX . "users WHERE user_id='" . $session->value('user_id') . "'"); } $post_details = ($item_post) ? $_GET : $af_details; $template->set('post_details', $post_details); $session->set('pin_value', md5(rand(2,99999999))); $generated_pin = generate_pin($session->value('pin_value')); $pin_image_output = show_pin_image($session->value('pin_value'), $generated_pin); $template->set('pin_image_output', $pin_image_output); $template->set('generated_pin', $generated_pin); $auction_friend_form = $template->process('auction_friend.tpl.php'); $template->set('auction_friend_form', $auction_friend_form); } } if ($_REQUEST['do'] == 'delete_topic' && $session->value('adminarea') == 'Active') /* delete public question - admin area feature only */ { $db->query("DELETE FROM " . DB_PREFIX . "messaging WHERE topic_id='" . intval($_REQUEST['topic_id']) . "'"); $msg_changes_saved = '

' . MSG_TOPIC_DELETED . '

'; } # START USER WISH LIST v6.11 if ($setts['enable_wish_list']) { $is_wish_list = $db->count_rows('wish_list', "WHERE user_id='" . $session->value('user_id') . "' AND auction_id='" . $item_details['auction_id'] . "'"); $template->set('is_wish_list', $is_wish_list); } # END USER WISH LIST v6.11 $template->set('msg_changes_saved', $msg_changes_saved); $item_details['quantity'] = $item->set_quantity($item_details['quantity']); $custom_fld->save_edit_vars($item_details['owner_id'], $page_handle); $media_details = $item->get_media_values(intval($_REQUEST['auction_id'])); $item_details['ad_image'] = $media_details['ad_image']; $item_details['ad_video'] = $media_details['ad_video']; $item_details['ad_dd'] = $media_details['ad_dd']; # START MUSIC SAMPLES v6.11 $item_details['ad_s'] = $media_details['ad_s']; # END MUSIC SAMPLES v6.11 $template->set('item_details', $item_details); $template->set('buyout_only', $item->buyout_only($item_details)); $template->set('user_details', $user_details); //$template->set('fees', $fees); $template->set('session', $session); $template->set('item', $item); $template->set('item_can_bid', $item->can_bid($session->value('user_id'), $item_details)); $template->set('main_category_display', category_navigator($item_details['category_id'], true, false, 'categories.php')); $template->set('addl_category_display', category_navigator($item_details['addl_category_id'], true, false, 'categories.php')); $template->set('direct_payment_box', $item->direct_payment_box($item_details, $session->value('user_id'))); $template->set('ad_display', 'live'); /* if ad_display = preview, then some table fields will be disabled */ $template->set('show_buyout', show_buyout($item_details)); $template->set('your_bid', $item->your_bid($item_details['auction_id'], $session->value('user_id'))); # START AUCTION ENDING REMINDER v6.11 $template->set('your_alert', $item->your_alert($item_details['auction_id'], $session->value('user_id'))); # END AUCTION ENDING REMINDER v6.11 $tax = new tax(); # START ITEM LOCATION SELLER LOCATION FLAGS MOD v6.11 $seller_country = $tax->display_countries($user_details['country'], true); $template->set('seller_country', $seller_country); $template->set('auction_location', $item->item_location($item_details)); $template->set('auction_country', $tax->display_countries($item_details['country'], true)); # END ITEM LOCATION SELLER LOCATION FLAGS MOD v6.11 $swap_offer_link = ($item_details['enable_swap'] && $session->value('user_id') != $item_details['owner_id']) ? '[ ' . MSG_MAKE_SWAP_OFFER . ' ]' : ''; $template->set('swap_offer_link', $swap_offer_link); $item->show_hidden_bid = ($item_details['owner_id'] == $session->value('user_id') || $session->value('adminarea') == 'Active' || $item_details['closed'] == 1) ? true : false; $template->set('high_bidders_content', $item->show_high_bid($item_details, 'high_bid')); $template->set('winners_content', $item->show_high_bid($item_details, 'winner')); # START - Winners Count $template->set('winners_count', $db->count_rows('winners', "WHERE auction_id=" . $item_details['auction_id'] . " ")); # END - Winners Count $winners_message_board = $item->winners_message_board_link($item_details, $session->value('user_id')); $template->set('winners_message_board', $winners_message_board); $item_watch_text = null; if ($user_details['show_watch_list']) { $item_watch_text = $item->item_watch_text($item_details['auction_id']); } $template->set('item_watch_text', $item_watch_text); $reputation_table_small = $reputation->rep_table_small($item_details['owner_id'], $item_details['auction_id']); $template->set('reputation_table_small', $reputation_table_small); $auction_tax = $tax->auction_tax($user_details['user_id'], $setts['enable_tax'], $session->value('user_id')); $template->set('auction_tax', $auction_tax); $custom_fld->new_table = ($setts['default_theme'] == 'ultra') ? true : false; $custom_fld->field_colspan = 1; $custom_sections_table = $custom_fld->display_sections($item_details, $page_handle, true, $item_details['auction_id'], $item_details['category_id']); $template->set('custom_sections_table', $custom_sections_table); $ad_image_thumbnails = $item->item_media_thumbnails($item_details, 1, true, false, $setts['thumb_display_type']); $full_size_images_link = $item->full_size_images($item_details); $template->set('ad_image_thumbnails', $ad_image_thumbnails . '
' . $full_size_images_link); $ad_video_thumbnails = $item->item_media_thumbnails($item_details, 2); $template->set('ad_video_thumbnails', $ad_video_thumbnails); $ad_dd_thumbnails = $item->item_media_thumbnails($item_details, 3); $template->set('ad_dd_thumbnails', $ad_dd_thumbnails); # START MUSIC SAMPLES v6.11 $ad_s_thumbnails = $item->item_media_thumbnails($item_details, 4); $template->set('ad_s_thumbnails', $ad_s_thumbnails); # END MUSIC SAMPLES v6.11 $video_play_file = (!empty($_REQUEST['video_name'])) ? $_REQUEST['video_name'] : $db->add_special_chars($item_details['ad_video'][0]); $ad_video_main_box = $item->video_box($video_play_file); $template->set('ad_video_main_box', $ad_video_main_box);## PHP Pro Bid v6.00 auction questions if ($setts['enable_asq']) { $public_messages = $msg->public_messages($item_details['auction_id']); (string) $public_questions_content = null; while ($msg_details = $db->fetch_array($public_messages)) { # START PUBLIC QUESTION PARAGRAPH RENDERING v6.11 $public_questions_content .= ' '. ' '. ' '. ' '. ' '. ' '. '
' . MSG_QUESTION . '
'. ' ' . nl2br($msg_details['question_content']) . ''. ' '. ' '. ' '. ' '. ' '. ' '. ' '. '
' . MSG_ANSWER . '
'. ' ' . ((!empty($msg_details['answer_content'])) ? nl2br($msg_details['answer_content']) : '-') . ' '. ''; # END PUBLIC QUESTION PARAGRAPH RENDERING v6.11 if ($session->value('adminarea') == 'Active') { $public_questions_content .= ' '. ' '. ' '. ' [ ' . MSG_DELETE_TOPIC . ' ] '. ''; } else if ($session->value('user_id') == $item_details['owner_id']) { $public_questions_content .= ' '. ' '. '
'. ' '. ' '. '
'. ''; } $public_questions_content .= ' '. ' '. ' '. ''; } $template->set('public_questions_content', $public_questions_content); } if (!empty($item_details['direct_payment'])) { $dp_methods = $item->select_direct_payment($item_details['direct_payment'], $user_details['user_id'], true); $direct_payment_methods_display = $template->generate_table($dp_methods, 2, 3, 3, null, '', ''); $template->set('direct_payment_methods_display', $direct_payment_methods_display); } if (!empty($item_details['payment_methods'])) { $offline_payments = $item->select_offline_payment($item_details['payment_methods'], true); $offline_payment_methods_display = $template->generate_table($offline_payments, 4, 3, 3, null, '', ''); $template->set('offline_payment_methods_display', $offline_payment_methods_display); } /* BEGIN -> shipping calculator box code snippet */ $sc_disabled = 'disabled'; $sc_quantity = intval($_REQUEST['sc_quantity']); $sc_quantity = ($sc_quantity > $item_details['quantity']) ? $item_details['quantity'] : (($sc_quantity < 1) ? 1 : $sc_quantity); $template->set('sc_quantity', $sc_quantity); $tax->selected_cid = shipping_locations($item_details['owner_id']); $sc_country = intval($_REQUEST['sc_country']); $sc_state = intval($_REQUEST['sc_state']); $template->set('country_dropdown', $tax->countries_dropdown('sc_country', $sc_country, 'shipping_calculator_form', 'shipping_calculator', true, MSG_SELECT_COUNTRY)); if ($tax->is_states($sc_country)) { $template->set('state_dropdown', $tax->states_box('sc_state',$sc_state, $sc_country, 'shipping_calculator_form')); if ($sc_state) { $sc_disabled = ''; } } else if ($sc_country) { $sc_disabled = ''; } $sc_postage_value = null; if (isset($_REQUEST['form_calculate_postage'])) { $sc_quantity = intval($_REQUEST['sc_quantity']); $sc_quantity = ($sc_quantity > 0) ? $sc_quantity : 1; $calc_postage = calculate_postage(null, $item_details['owner_id'], $item_details['auction_id'], null, $sc_country, $sc_state, $sc_quantity); $sc_postage_value = $calc_postage['postage']; } $template->set('sc_postage_value', $sc_postage_value); $template->set('sc_disabled', $sc_disabled); $shipping_calculator_box = $template->process('shipping_calculator_box.tpl.php'); $template->set('shipping_calculator_box', '
' . $shipping_calculator_box . '
'); /* END -> shipping calculator box code snippet */ if ($setts['enable_other_items_adp']) { $select_condition = "WHERE a.active=1 AND a.closed=0 AND a.creation_in_progress=0 AND a.deleted=0 AND a.list_in!='store' AND a.owner_id=" . $item_details['owner_id'] . " AND a.auction_id!=" . $item_details['auction_id']; //$template->set('db', $db);## PHP Pro Bid v6.00 the design is handled in the mainpage.tpl.php file to allow liberty on skins design # START OTHER ITEMS FROM SELLER REDESIGN ULTRA v6.11 # START ACCEPTED PAYMENT GATEWAY ICONS v6.11 # START BUY OUT DISCOUNTS v6.11 $other_items = $db->random_rows('auctions a', 'a.auction_id, a.name, a.description, a.category_id, a.start_price, a.buyout_price, a.max_bid, a.currency, a.end_time, a.discount_start_date, a.discount_end_date, a.discount, a.direct_payment, a.shipping_method', $select_condition, $setts['other_items_nb'] && $layout['hpfeat_nb'] ); # END OTHER ITEMS FROM SELLER REDESIGN ULTRA v6.11 # END ACCEPTED PAYMENT GATEWAY ICONS v6.11 # END BUY OUT DISCOUNTS v6.11 $template->set('other_items', $other_items); } ## add the search details back link if the auction was accessed through the search page. (string) $search_url = null; if ($_REQUEST['auction_search'] == 1) { $additional_vars = set_filter_link($_GET, array('auction_id' => ''), 'address'); $search_url = 'auction_search.php?auction_page=1' . $additional_vars; $template->set('search_url', $search_url); } $template->change_path('themes/' . $setts['default_theme'] . '/templates/'); $template_output .= $template->process('auction_details.tpl.php'); $template->change_path('templates/'); } else if ($adult_cat) { $template->set('categories_header_menu', $item_details['name']); $template->set('minimum_age', $category_details['minimum_age']); $template->set('auction_id', $item_details['auction_id']); $template_output .= $template->process('adult_category_warning.tpl.php'); } else { $template->set('message_header', header5(MSG_AUCTION_DETAILS_ERROR_TITLE)); $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; } ?>