Jump to content

djddc

Members
  • Posts

    17
  • Joined

  • Last visited

    Never

Everything posted by djddc

  1. Hi again , I've managed to track the error down to this line : $similar_item_media = $item->auction_media_fields(intval($_REQUEST['auction_id']), $session->value('auction_id')); Could someone tell me what I should change ?
  2. hi people , i have this problem in my script : * The query you are trying to run is invalid * Mysql Error Output: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 3 * SQL Query: INSERT INTO probid_auction_media (auction_id, media_type, media_url, `order`) VALUES (100051, 1, 'uplimg/img_1000341037872_24623246jpg.jpg',) SQL-query: SELECT * FROM `probid_auction_media` LIMIT 0, 30 ; Rijen: 9 media_id media_url auction_id media_type upload_in_progress wanted_ad_id embedded_code reverse_id profile_id order 11 uplimg/img_1000301701877s345x243jpg.jpg 100035 1 0 0 0 0 0 3 uplimg/img_10001931030Roijpg.jpg 100019 1 0 0 0 0 2 4 uplimg/img_1000192gif.gif 100019 1 0 0 0 0 0 5 uplimg/img_10001945gif.gif 100019 1 0 0 0 0 1 6 uplimg/img_100021796b8fcd00ad5cf17737df1231fc47ecj... 100021 1 0 0 0 0 0 7 uplimg/img_1000211077169374044954gif.gif 100021 1 0 0 0 0 1 8 uplimg/img_100021full6287570jpg.jpg 100021 1 0 0 0 0 2 9 uplimg/img_1000301701877s345x243jpg.jpg 100030 1 0 0 0 0 0 10 uplimg/img_1000341037872_24623246jpg.jpg 100034 1 0 0 0 0 0
  3. ok thanks , thats what i was looking for !
  4. Hi all , I need some help with this line of code : define('DEFAULT_DB_LANGUAGE', 'english'); Where it says 'english' is refered to the folder ROOT >> language >> english. If say I have a folder named spanish but don't want to change the line manually each time, what could i put in the place of 'english' ? include_once( $fileExtension."language/".$session->value( "site_lang" )."/global.lang.php" ); is an example of a line of code i use that automatically selects the right file based on chosen language. could some one give me a hand with this ? thanx guys
  5. Hi , I get this error : Parse error: syntax error, unexpected $end in sell_item.php on line 1024
  6. Hi all could anyone give this piece of code a look for me ? i can't spot the problem It's quit some code though est. 900 lines. session_start(); define ('IN_SITE', 1); (array) $user_details = null; if ($session->value('user_id')) { $user_details = $db->get_sql_row("SELECT * FROM " . DB_PREFIX . "users WHERE user_id=" . $session->value('user_id')); } if ($session->value('membersarea')!='Active') { if ($session->value('user_id')) /* user inactive - redirect to account management page */ { header_redirect('members_area.php?page=account&section_management'); } else { header_redirect('login.php?redirect=sell_item'); } } else if (!$session->value('is_seller')) { header_redirect('members_area.php?page=selling'); } /* else if ($setts['enable_seller_verification'] && $setts['seller_verification_mandatory'] && !$user_details['seller_verified']) { header_redirect('fee_payment.php?do=seller_verification'); } */ else { require ('global_header.php'); (string) $sale_step = $_POST['current_step']; $start_time_id = 1; $end_time_id = 2; $item = new item(); $item->setts = &$setts; $item->layout = &$layout; $template->set('item', $item); /** * We create a temporary row in the items table for every ad that is made. If the ad is placed, this temporary row * will become the final ad row. */ if ($_REQUEST['option'] == 'sell_similar') { $_POST = null; } $item_id = null; if (!$_POST['item_id'] && !$session->is_set('refresh_id')) { //$session->set('auction_id', $item->create_temporary_item($session->value('user_id'))); $item_id = $item->create_temporary_item($session->value('user_id')); } if ($session->value('user_id')) { $shop = new shop(); $shop->setts = &$setts; $shop->user_id = $session->value('user_id'); } $setup_fee = new fees(); $setup_fee->setts = &$setts; /** * We will establish the sale_step variable depending on * form_next_step/form_previous_step and the current_step * values, and depending on the ad type and other settings as well */ $current_step_post = $_REQUEST['current_step']; if ($setts['enable_seller_verification'] && $setts['seller_verification_mandatory'] && !$user_details['seller_verified']) { $current_step_post = null; } else if ($setts['enable_store_only_mode'] && !$user_details['shop_active'] && $current_step_post != 'verification_checked') { $current_step_post = null; } switch ($current_step_post) { case 'preview': if ($_POST['form_next_step'] || $_POST['form_save_draft']) { $sale_step = 'finish'; } else { $sale_step = 'shipping'; } break; case 'shipping': if ($_POST['form_next_step']) { $sale_step = 'preview'; } else { $sale_step = 'media'; } break; case 'media': if ($_POST['form_next_step']) { $sale_step = 'shipping'; } else if ($_POST['box_submit'] == 1) { $sale_step = 'media'; } else { $sale_step = 'settings'; } break; case 'settings': if ($_POST['form_next_step']) { $sale_step = 'media'; } else if ($_POST['box_submit'] == 1) { $sale_step = 'settings'; } else { $sale_step = 'details'; } break; case 'details': if ($_POST['form_next_step']) { $sale_step = 'settings'; } else if ($_POST['box_submit'] == 1) { $sale_step = 'details'; } else { $shop_status = $shop->shop_status($user_details, true); if ($user_details['shop_active'] && $shop_status['remaining_items'] > 0) { if ($setts['enable_store_only_mode']) { $sale_step = 'details'; } else { $sale_step = 'list_in'; } } else { $sale_step = 'details'; } } break; case 'addl_category': $sale_step = 'details'; break; case 'main_category': if ($setts['enable_addl_category']) { $sale_step = 'addl_category'; } else { $sale_step = 'details'; } break; case 'list_in': if ($_POST['form_next_step']) { $sale_step = 'details'; } else { $sale_step = ''; } break; default: /** * v6.02 -> all checks will be done here. * first step will be either: * - seller verification splash page * -> on this page, we only have a next step button if verification is not mandatory. * Otherwise there will only be a "Get Verified" button * - store only mode splash page * -> here we will not get a next step, just a "Enable Store" button */ $shop_status = $shop->shop_status($user_details, true); if ($setts['enable_seller_verification'] && !$user_details['seller_verified'] && $current_step_post != 'verification_checked') { $sale_step = 'splash_page_seller_verification'; } else if ($setts['enable_store_only_mode'] && (!$user_details['shop_active'] || $shop_status['remaining_items'] <= 0)) { $sale_step = 'splash_page_store_only_mode'; $template->set('shop_status', $shop_status); } else if ($user_details['shop_active'] && $shop_status['remaining_items'] > 0) { if ($setts['enable_store_only_mode']) { $sale_step = 'details'; } else { $sale_step = 'list_in'; } } else { $sale_step = 'details'; } } $custom_fld = new custom_field(); $item_details = $_POST; if ($item_id) { $item_details['item_id'] = $item_id; } $session->set('auction_id', $item_details['item_id']); if ($setts['enable_store_only_mode']) { $item_details['start_price'] = $item_details['buyout_price']; } /** * add sell similar procedure here -> will start with the details step */ if ($_REQUEST['option'] == 'sell_similar') { $similar_item_details = $db->get_sql_row("SELECT * FROM " . DB_PREFIX ."auctions WHERE auction_id='" . $_REQUEST['auction_id'] . "'"); if ($similar_item_details['owner_id'] == $session->value('user_id')) { $shop_status = $shop->shop_status($user_details, true); $sale_step = 'details'; $item_details = $item->edit_set_checkboxes($similar_item_details); $item_details['list_in'] = ($shop_status['remaining_items'] <=0 && $similar_item_details['list_in'] != 'auction') ? 'auction' : $item_details['list_in']; $custom_fld->save_edit_vars(intval($_REQUEST['auction_id']), 'auction');## import auction media $similar_item_media = $item->auction_media_fields(intval($_REQUEST['auction_id']), $session->value('auction_id')); //$item_details['ad_image'] = $similar_item_media['ad_image']; //$item_details['ad_video'] = $similar_item_media['ad_video']; $item_details['ad_dd'] = $similar_item_media['ad_dd']; if ($item_id) { $item_details['item_id'] = $item_id; } } } else if ($_REQUEST['option'] == 'new_item') /* prefilled fields */ { $item_details['name'] = $user_details['default_name']; $item_details['description'] = $user_details['default_description']; $item_details['duration'] = $user_details['default_duration']; $item_details['hidden_bidding'] = $user_details['default_hidden_bidding']; $item_details['enable_swap'] = $user_details['default_enable_swap']; $item_details['shipping_method'] = $user_details['default_shipping_method']; $item_details['shipping_int'] = $user_details['default_shipping_int']; $item_details['postage_amount'] = $user_details['default_postage_amount']; $item_details['insurance_amount'] = $user_details['default_insurance_amount']; $item_details['type_service'] = $user_details['default_type_service']; $item_details['shipping_details'] = $user_details['default_shipping_details']; $item_details['payment_methods'] = $user_details['default_payment_methods']; $item_details['currency'] = $user_details['default_currency']; $item_details['direct_payment'] = $user_details['default_direct_payment']; $item_details['is_auto_relist'] = $user_details['default_auto_relist']; $item_details['auto_relist_bids'] = $user_details['default_auto_relist_bids']; $item_details['auto_relist_nb'] = $user_details['default_auto_relist_nb']; } $item_details['auction_id'] = $session->value('auction_id'); if (!$item_details['currency']) { $item_details['currency'] = ($_POST['currency']) ? $_POST['currency'] : $setts['currency']; } $item_details['addl_category_id'] = ($_POST['form_next_step'] == MSG_SKIP_THIS_STEP) ? 0 : $item_details['addl_category_id']; $item_details['quantity'] = $item->set_quantity($item_details['quantity']); $item_details['auto_relist_nb'] = ($item_details['auto_relist_nb']>1) ? $item_details['auto_relist_nb'] : 1; $item_details['country'] = (!empty($item_details['country'])) ? $item_details['country'] : $user_details['country']; $item_details['state'] = (!empty($item_details['state'])) ? $item_details['state'] : $user_details['state']; $item_details['zip_code'] = (!empty($item_details['zip_code'])) ? $item_details['zip_code'] : $user_details['zip_code']; $custom_fld->save_vars($item_details); $page_handle = 'auction'; if ($_POST['current_step'] == 'settings') { $item_details['start_time'] = ($item_details['start_time_type'] == 'now') ? CURRENT_TIME : get_box_timestamp($item_details, $start_time_id); $item_details['end_time'] = ($item_details['end_time_type'] == 'duration') ? ($item_details['start_time'] + $item_details['duration'] * 86400) : get_box_timestamp($item_details, $end_time_id); /** * We will need to save the custom fields here so they can be used in the preview page. * If the item wont be saved, the custom fields will be deleted together with the * temporary item. */ $custom_fld->update_page_data($session->value('auction_id'), $page_handle, $item_details); if ($item_details['auction_type'] == 'first_bidder') { $item_details['fb_decrement_interval'] = $item->convert_fb_decrement($item_details, 'STN'); } } else { $fb_interval = $item->convert_fb_decrement($item_details, 'NTS'); $item_details['fb_hours'] = $fb_interval['fb_hours']; $item_details['fb_minutes'] = $fb_interval['fb_minutes']; $item_details['fb_seconds'] = $fb_interval['fb_seconds']; } $item_details['name'] = $db->rem_special_chars($item_details['name']); $item_details['description'] = $db->rem_special_chars((($_POST['description_main']) ? $_POST['description_main'] : $item_details['description'])); $item_details['state'] = $db->rem_special_chars($item_details['state']); $item_details['zip_code'] = $db->rem_special_chars($item_details['zip_code']); $item_details['shipping_details'] = $db->rem_special_chars($item_details['shipping_details']); $item_details['direct_payment'] = (count($_POST['payment_gateway'])) ? $db->implode_array($_POST['payment_gateway']) : $item_details['direct_payment']; $item_details['payment_methods'] = (count($_POST['payment_option'])) ? $db->implode_array($_POST['payment_option']) : $item_details['payment_methods']; $hidden_custom_fields = $custom_fld->output_hidden_form_fields(); $template->set('hidden_custom_fields', $hidden_custom_fields); if ($auction_edit == 1) { if (empty($_POST['file_upload_type'])) { $template->set('media_upload_fields', $item->upload_manager($item_details)); } else if (is_numeric($_POST['file_upload_id'])) /* means we remove a file / media url */ { $media_upload = $item->media_removal($item_details, $item_details['file_upload_type'], $item_details['file_upload_id']); $media_upload_fields = $media_upload['display_output']; $item_details['ad_image'] = $media_upload['post_details']['ad_image']; $item_details['ad_video'] = $media_upload['post_details']['ad_video']; $item_details['ad_dd'] = $media_upload['post_details']['ad_dd']; $template->set('media_upload_fields', $media_upload_fields); } } else /* means we have a file upload */ { $media_upload = $item->media_upload($item_details, $item_details['file_upload_type'], $_FILES); $media_upload_fields = $media_upload['display_output']; $item_details['ad_image'] = $media_upload['post_details']['ad_image']; $item_details['ad_video'] = $media_upload['post_details']['ad_video']; $item_details['ad_dd'] = $media_upload['post_details']['ad_dd']; $template->set('media_upload_fields', $media_upload_fields); } } $template->set('item_details', $item_details); if (isset($_POST['form_next_step'])) /* formchecker code snippet */ { define ('FRMCHK_ITEM', 1); (int) $item_post = 1; $frmchk_details = $item_details; include('procedure_frmchk_item.php'); if ($fv->is_error()) { $template->set('display_formcheck_errors', $fv->display_errors()); $sale_step = $_POST['current_step']; } } (int) $ad_steps = 6; (int) $ad_steps = 7; if ($setts['enable_addl_category']) { $ad_steps ++; } // voucher settings if (!empty($item_details['voucher_value'])) { $voucher_details = $item->check_voucher($item_details['voucher_value'], 'setup'); if ($sale_step != 'finish') { $template->set('check_voucher_message', $voucher_details['display']); } else { ## voucher is deducted $item->check_voucher($item_details['voucher_value'], 'setup', true); } } $template->set('ad_steps', $ad_steps); $header_menu_cell_width = number_format((100 / $ad_steps), 2, '.', '') . '%'; $template->set('header_menu_cell_width', $header_menu_cell_width); $template->set('sale_step', $sale_step); $template->set('session_user_id', $session->value('user_id')); if ($sale_step == 'main_category' || $sale_step == 'addl_category') { (string) $categories_initialize_msg = null; $sell_item_header_menu = $template->process('sell_item_header_menu.tpl.php'); $template->set('sell_item_header_menu', $sell_item_header_menu); $sql_select_categories = $db->query("SELECT category_id, parent_id FROM " . DB_PREFIX . "categories ORDER BY category_id ASC"); while ($cat_details = $db->fetch_array($sql_select_categories)) { $categories_initialize_msg .= "c[" . $cat_details['category_id'] . "] = new Array(); \n"; } (int) $counter_a = 0; (int) $counter_b = 0; (string) $display_message = null; $sql_select_subcategories = $db->query ("SELECT category_id, is_subcat, parent_id FROM " . DB_PREFIX . "categories WHERE parent_id!=0 ORDER BY parent_id ASC, order_id ASC, name ASC"); while ($subcat_details = $db->fetch_array($sql_select_subcategories)) { $parent[$counter_a] = $subcat_details['parent_id']; if ($parent[$counter_a]!=$parent[$counter_a - 1]) { $counter_b = 0; } else { $counter_b++; } $counter_a++; $display_message = $db->add_special_chars($category_lang[$subcat_details['category_id']]); $display_message = str_replace("'", "`", $display_message); $categories_initialize_msg .= "x(" . $subcat_details['parent_id'] . ", " . $counter_b . ", '" . $display_message . " " . $subcat_details['is_subcat'] . "', '" . $subcat_details['category_id'] . "'); \n"; } $template->set('categories_initialize_msg', $categories_initialize_msg); (string) $categories_subquery = null; if ($user_details['shop_active'] && ($_POST['list_in']=='store' || $_POST['list_in']=='both') && !empty($user_details['shop_categories'])) { $shop_categories = last_char($user_details['shop_categories']); $categories_subquery = " AND category_id IN (" . $shop_categories . ") "; } if ($_REQUEST['list_in'] == 'store') { $categories_subquery .= " AND (user_id=0 OR user_id=" . intval($session->value('user_id')) . ") "; } else { $categories_subquery .= " AND user_id=0 "; } $sql_select_main_categories = $db->query("SELECT category_id, is_subcat FROM " . DB_PREFIX ."categories WHERE parent_id=0 " . $categories_subquery . " ORDER BY order_id ASC, name ASC"); $main_categories_select = '<select class="contentfont" id="selector_0" onchange="populate(0)" size="10" name="selector_0" style="width: 100%; "> '; while ($cat_details = $db->fetch_array($sql_select_main_categories)) { $main_categories_select .= '<option value="' . $cat_details['category_id'] . '">' . $category_lang[$cat_details['category_id']]. ' ' . $cat_details['is_subcat'] . '</option>'; } $main_categories_select .= '</select>'; $template->set('main_categories_select', $main_categories_select); } if ($sale_step == 'finish') /* auction submission page */ { $template->set('sell_item_header', header7(strtoupper(MSG_FINISH))); $sell_item_header_menu = $template->process('sell_item_header_menu.tpl.php'); $template->set('sell_item_header_menu', $sell_item_header_menu); $template->set('current_step', 'finish');## add setup fee procedure here. $setup_fee = new fees(); $setup_fee->setts = &$setts; $shop_status = $shop->shop_status($user_details, true); $show_list_similar = true; if ($session->value('refresh_id') == $item_details['item_id']) { $template->set('sell_item_finish_content', '<p align="center" class="contentfont">' . MSG_DOUBLE_POST_ERROR . '</p>'); } else if (in_array($item_details['list_in'], array('store', 'both')) && $shop_status['remaining_items'] <= 0) { $template->set('sell_item_finish_content', '<p align="center">' . MSG_NO_MORE_STORE_ITEMS_LIST . '</p>'); $show_list_similar = false; } else { if (isset($_POST['form_save_draft'])) { $template->set('sell_item_finish_content', '<table class="errormessage" align="center"><tr><td align="center"> '. MSG_DRAFT_SAVED_SUCCESS_DESC . '</td></tr></table>'); // first the insert procedure $refresh_id = $item->insert($item_details, $session->value('user_id'), 'auction', true); } else { $setup_result = $setup_fee->setup($user_details, $item_details, $voucher_details); $template->set('sell_item_finish_content', $setup_result['display']); // first the insert procedure $refresh_id = $item->insert($item_details, $session->value('user_id')); $mail_input_id = $refresh_id; $fees_mail = $setup_result['amount']; include('language/' . $setts['site_lang'] . '/mails/new_item_seller_confirmation.php'); include('language/' . $setts['site_lang'] . '/mails/new_item_fav_store_confirmation.php'); } $session->unregister('auction_id'); $session->set('refresh_id', $refresh_id); } $template->set('show_list_similar', $show_list_similar); $sell_item_page_content = $template->process('sell_item_finish.tpl.php'); $template->set('sell_item_page_content', $sell_item_page_content); // if there are fees to be paid, then call the setup fee } else if ($sale_step == 'preview') /* auction preview page - preview/fees/terms display */ { $template->set('sell_item_header', header7(strtoupper(MSG_PREVIEW))); $sell_item_header_menu = $template->process('sell_item_header_menu.tpl.php'); $template->set('sell_item_header_menu', $sell_item_header_menu); $template->set('current_step', 'preview'); $template->set('buyout_only', $item->buyout_only($item_details)); $template->set('user_details', $user_details); $template->set('main_category_display', category_navigator($item_details['category_id'], false, true, null, null, GMSG_NONE_CAT)); $template->set('addl_category_display', category_navigator($item_details['addl_category_id'], false, true, null, null, GMSG_NONE_CAT)); $template->set('ad_display', 'preview'); /* if ad_display = preview, then some table fields will be disabled */ $template->set('show_buyout', show_buyout($item_details)); $tax = new tax(); $seller_country = $tax->display_countries($user_details['country']); $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'])); $auction_tax = $tax->auction_tax($session->value('user_id'), $setts['enable_tax']); $template->set('apply_tax_message', $auction_tax['display']); $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, $session->value('auction_id'), $db->main_category($item_details['category_id'])); $template->set('custom_sections_table', $custom_sections_table); $ad_image_thumbnails = $item->item_media_thumbnails($item_details, 1); $template->set('ad_image_thumbnails', $ad_image_thumbnails); $ad_video_thumbnails = $item->item_media_thumbnails($item_details, 2, false); $template->set('ad_video_thumbnails', $ad_video_thumbnails); $ad_dd_thumbnails = $item->item_media_thumbnails($item_details, 3, false); $template->set('ad_dd_thumbnails', $ad_dd_thumbnails); $video_play_file = (!empty($_REQUEST['video_name'])) ? $_REQUEST['video_name'] : $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); if (!empty($item_details['direct_payment'])) { $dp_methods = $item->select_direct_payment($item_details['direct_payment'], $session->value('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); } if (force_payment_enabled($session->value('user_id'), $item_details)) { $template->set('item_watch_text', MSG_BUYOUT_FORCE_PAYMENT_ALERT); } //$template->set('fees', $fees); $template->change_path('themes/' . $setts['default_theme'] . '/templates/'); $auction_details_page = $template->process('auction_details.tpl.php'); $template->set('auction_details_page', $auction_details_page); $template->change_path('templates/'); $auction_fees = $setup_fee->auction_setup_fees($item_details, $user_details, $voucher_details); $template->set('auction_fees_box', $auction_fees['display']); $user_payment_mode = $fees->user_payment_mode($session->value('user_id')); $user_future_balance = $auction_fees['amount'] + $user_details['balance']; if ($user_future_balance > $user_details['max_credit'] && $user_payment_mode == 2) { $auction_fees_suspension_warning = '<tr> '. ' <td colspan="3"><div class="errormessage" align="center">' . MSG_FEES_ACCOUNT_SUSPENSION_WARNING . '</td>'. '</tr>'; $template->set('auction_fees_suspension_warning', $auction_fees_suspension_warning); } $template->set('auction_terms_box', terms_box('auction_setup', '')); $sell_item_page_content = $template->process('sell_item_preview.tpl.php'); $template->set('sell_item_page_content', $sell_item_page_content); } else if ($sale_step == 'shipping') /* shipping and payment page */ { $template->set('sell_item_header', header7(strtoupper(MSG_SHIPPING_PAYMENT))); $sell_item_header_menu = $template->process('sell_item_header_menu.tpl.php'); $template->set('sell_item_header_menu', $sell_item_header_menu); $template->set('current_step', 'shipping'); $template->set('shipping_methods_drop_down', $item->shipping_methods_drop_down('type_service', $item_details['type_service'])); $direct_payments = $item->select_direct_payment($item_details['direct_payment'], $session->value('user_id')); $direct_payment_table = $template->generate_table($direct_payments, 4, 1, 1, '75%'); $template->set('direct_payment_table', $direct_payment_table); $offline_payments = $item->select_offline_payment($item_details['payment_methods']); $offline_payment_table = $template->generate_table($offline_payments, 4, 1, 1, '75%'); $template->set('offline_payment_table', $offline_payment_table); $template->set('user_details', $user_details); $sell_item_page_content = $template->process('sell_item_shipping.tpl.php'); $template->set('sell_item_page_content', $sell_item_page_content); } else if ($sale_step == 'media') /* shipping and payment page */ { $template->set('sell_item_header', header7(strtoupper("MEDIA"))); $sell_item_header_menu = $template->process('sell_item_header_menu.tpl.php'); $template->set('sell_item_header_menu', $sell_item_header_menu); $template->set('current_step', 'media'); // START PICTURES $free_pics = $db->get_sql_row("SELECT free_images, picture_fee FROM probid_fees WHERE 1"); $list_pics=mysql_query("SELECT media_url, `order`, `media_type` FROM `probid_auction_media` WHERE auction_id='".$item_details["auction_id"]."' AND media_type=1 ORDER BY `order`"); //SELECT media_url, `order`, `media_type` FROM `probid_auction_media` WHERE auction_id='100066' AND media_type=1 ORDER BY `order` while ($pics=mysql_fetch_array($list_pics)){ $images[$pics["order"]]=$pics["media_url"]; } $template->set('list_pics', $images); $template->set('free_pics', $free_pics); // START video $free_vids = $db->get_sql_row("SELECT free_media, video_fee FROM probid_fees WHERE 1"); $list_vids=mysql_query("SELECT media_url, `order`, `media_type` FROM `probid_auction_media` WHERE auction_id='".$item_details["auction_id"]."' AND media_type=2 ORDER BY `order`"); while ($vids=mysql_fetch_array($list_vids)){ $videos[$vids["order"]]=$vids["media_url"]; } $template->set('list_vids', $videos); $template->set('free_vids', $free_vids); $sell_item_page_content = $template->process('sell_item_media.tpl.php'); $template->set('sell_item_page_content', $sell_item_page_content); } else if ($sale_step == 'settings') /* settings page */ { $template->set('sell_item_header', header7(strtoupper(MSG_ITEM_SETTINGS))); $sell_item_header_menu = $template->process('sell_item_header_menu.tpl.php'); $template->set('sell_item_header_menu', $sell_item_header_menu); $template->set('current_step', 'settings'); $selected_currency = ($item_details['currency']) ? $item_details['currency'] : $setts['currency']; $template->set('currency_drop_down', $item->currency_drop_down('currency', $selected_currency, 'ad_create_form')); $tax = new tax(); $can_add_tax = $tax->can_add_tax($session->value('user_id'), $setts['enable_tax']); $template->set('can_add_tax', $can_add_tax['can_add_tax']); $template->set('duration_drop_down', $item->durations_drop_down('duration', $item_details['duration'])); $buyout_fee = $setup_fee->display_fee('buyout_fee', $user_details, $item_details['category_id'], $item_details['list_in'], $voucher_details); if ($setts["free_icon"]==1 || $buyout_fee['amount']) { $buyout_fee_expl_message = (($setts["free_icon"]==1 && $buyout_fee['amount']==0)?'(<b class="redfont">+FREE</b>)':'(<b>+' . $fees->display_amount($buyout_fee['amount'], $setts['currency'], true) . '</b>)'); $template->set('buyout_fee_expl_message', $buyout_fee_expl_message); } $makeoffer_fee = $setup_fee->display_fee('makeoffer_fee', $user_details, $item_details['category_id'], $item_details['list_in'], $voucher_details); if ($setts["free_icon"]==1 || $makeoffer_fee['amount']) { $makeoffer_fee_expl_message = (($setts["free_icon"]==1 && $makeoffer_fee['amount']==0)?'(<b class="redfont">+FREE</b>)':'(<b>+' . $fees->display_amount($makeoffer_fee['amount'], $setts['currency'], true) . '</b>)'); $template->set('makeoffer_fee_expl_message', $makeoffer_fee_expl_message); } $rp_fee = $setup_fee->display_fee('rp_fee', $user_details, $item_details['category_id'], $item_details['list_in'], $voucher_details); if ($setts["free_icon"]==1 || $rp_fee['amount']) { $rp_fee_expl_message = (($setts["free_icon"]==1 && $rp_fee['amount']==0)?'(<b class="redfont">+FREE</b>)':'(<b>+' . $fees->display_amount($rp_fee['amount'], $setts['currency'], true) . '</b>)'); $template->set('rp_fee_expl_message', $rp_fee_expl_message); } $hpfeat_fee = $setup_fee->display_fee('hpfeat_fee', $user_details, $item_details['category_id'], $item_details['list_in'], $voucher_details); if ($setts["free_icon"]==1 || $hpfeat_fee['amount']) { $hpfeat_fee_expl_message = (($setts["free_icon"]==1 && $hpfeat_fee['amount']==0)?'(<b class="redfont">+FREE</b>)':'(<b>+' . $fees->display_amount($hpfeat_fee['amount'], $setts['currency'], true) . '</b>)'); $template->set('hpfeat_fee_expl_message', $hpfeat_fee_expl_message); } $catfeat_fee = $setup_fee->display_fee('catfeat_fee', $user_details, $item_details['category_id'], $item_details['list_in'], $voucher_details); if ($setts["free_icon"]==1 || $catfeat_fee['amount']) { $catfeat_fee_expl_message = (($setts["free_icon"]==1 && $catfeat_fee['amount']==0)?'(<b class="redfont">+FREE</b>)':'(<b>+' . $fees->display_amount($catfeat_fee['amount'], $setts['currency'], true) . '</b>)'); $template->set('catfeat_fee_expl_message', $catfeat_fee_expl_message); } $hl_fee = $setup_fee->display_fee('hlitem_fee', $user_details, $item_details['category_id'], $item_details['list_in'], $voucher_details); if ($setts["free_icon"]==1 || $hl_fee['amount']) { $hl_fee_expl_message = (($setts["free_icon"]==1 && $hl_fee['amount']==0)?'(<b class="redfont">+FREE</b>)':'(<b>+' . $fees->display_amount($hl_fee['amount'], $setts['currency'], true) . '</b>)'); $template->set('hl_fee_expl_message', $hl_fee_expl_message); } $bold_fee = $setup_fee->display_fee('bolditem_fee', $user_details, $item_details['category_id'], $item_details['list_in'], $voucher_details); if ($setts["free_icon"]==1 || $bold_fee['amount']) { $bold_fee_expl_message =(($setts["free_icon"]==1 && $bold_fee['amount']==0)?'(<b class="redfont">+FREE</b>)':'(<b>+' . $fees->display_amount($bold_fee['amount'], $setts['currency'], true) . '</b>)'); $template->set('bold_fee_expl_message', $bold_fee_expl_message); } $custom_start_fee = $setup_fee->display_fee('custom_start_fee', $user_details, $item_details['category_id'], $item_details['list_in'], $voucher_details); if ($setts["free_icon"]==1 || $custom_start_fee['amount']) { $custom_start_fee_expl_message = (($setts["free_icon"]==1 && $custom_start_fee['amount']==0)?'(<b class="redfont">+FREE</b>)':'(<b>+' . $fees->display_amount($custom_start_fee['amount'], $setts['currency'], true) . '</b>)'); $template->set('custom_start_fee_expl_message', $custom_start_fee_expl_message); } $start_date_box = date_form_field($item_details['start_time'], $start_time_id, 'ad_create_form'); $template->set('start_date_box', $start_date_box); $end_date_box = date_form_field($item_details['end_time'], $end_time_id, 'ad_create_form'); $template->set('end_date_box', $end_date_box); $custom_fld->new_table = false; $custom_fld->field_colspan = 2; $custom_sections_table = $custom_fld->display_sections($item_details, $page_handle, false, 0, $db->main_category($item_details['category_id'])); $template->set('custom_sections_table', $custom_sections_table); if ($setts["free_icon"]==1 || $picture_fee['amount']) { $picture_fee_expl_message = (($setts["free_icon"]==1 && $picture_fee['amount']==0)?'(<b class="redfont">+FREE</b>)':'(<b>+' . $fees->display_amount($picture_fee['amount'], $setts['currency'], true) . '</b>)'); if ($picture_fee['amount']) { $picture_fee_expl_message = '(<b>+' . $fees->display_amount($picture_fee['amount'], $setts['currency'], true) . '</b>)'; $template->set('picture_fee_expl_message', $picture_fee_expl_message); } /* start digital media code */ $dd_fee = $setup_fee->display_fee('dd_fee', $user_details, $item_details['category_id'], $item_details['list_in'], $voucher_details); if ($dd_fee['amount']) { $dd_fee_expl_message = '(<b>+' . $fees->display_amount($dd_fee['amount'], $setts['currency'], true) . '</b>)'; $template->set('dd_fee_expl_message', $dd_fee_expl_message); } $dd_upload_manager = $item->upload_manager($item_details, 3, 'ad_create_form', true, false, true, $dd_fee_expl_message); $template->set('dd_upload_manager', $dd_upload_manager); /* end digital media code */ $item->show_free_images = true; $image_upload_manager = $item->upload_manager($item_details, 1, 'ad_create_form', true, false, true, $picture_fee_expl_message); $template->set('image_upload_manager', $image_upload_manager); $video_fee = $setup_fee->display_fee('video_fee', $user_details, $item_details['category_id'], $item_details['list_in'], $voucher_details); if ($setts["free_icon"]==1 || $video_fee['amount']) { $video_fee_expl_message = (($setts["free_icon"]==1 && $video_fee['amount']==0)?'(<b class="redfont">+FREE</b>)':'(<b>+' . $fees->display_amount($video_fee['amount'], $setts['currency'], true) . '</b>)'); $template->set('video_fee_expl_message', $video_fee_expl_message); } $video_upload_manager = $item->upload_manager($item_details, 2, 'ad_create_form', true, false, true, $video_fee_expl_message); $template->set('video_upload_manager', $video_upload_manager); $template->set('country_dropdown', $tax->countries_dropdown('country', $item_details['country'], 'ad_create_form', 'setup')); $template->set('state_box', $tax->states_box('state', $item_details['state'], $item_details['country'])); $sell_item_page_content = $template->process('sell_item_settings.tpl.php'); $template->set('sell_item_page_content', $sell_item_page_content); } else if ($sale_step == 'details') /* details page */ { $category_fee = $setup_fee->display_fee('second_cat_fee', $user_details, $item_details['category_id'], $item_details['list_in'], $voucher_details); if ($category_fee['amount']) { $choose_category_expl_message .= '(<b>' . $fees->display_amount($category_fee['amount'], $setts['currency'], true) . '</b>)'; } $template->set('choose_category_expl_message', $choose_category_expl_message); $template->set('sell_item_header', header7(strtoupper(MSG_ITEM_DETAILS))); $sell_item_header_menu = $template->process('sell_item_header_menu.tpl.php'); $template->set('sell_item_header_menu', $sell_item_header_menu); $template->set('current_step', 'details'); $item_description_editor = "<script> \n" . " var oEdit1 = new InnovaEditor(\"oEdit1\"); \n" . " oEdit1.width=\"100%\";//You can also use %, for example: oEdit1.width=\"100%\" \n" . " oEdit1.height=300; \n" . " oEdit1.REPLACE(\"description_main\");//Specify the id of the textarea here \n" . "</script>"; $template->set('item_description_editor', $item_description_editor); $template->set('setup_voucher_box', voucher_form('setup', $item_details['voucher_value'], false)); $template->set('main_category_display', category_navigator($item_details['category_id'], false, true, null, null, GMSG_NONE_CAT)); $template->set('addl_category_display', category_navigator($item_details['addl_category_id'], false, true, null, null, GMSG_NONE_CAT)); $sell_item_page_content = $template->process('sell_item_details.tpl.php'); $template->set('sell_item_page_content', $sell_item_page_content); } else if ($sale_step == 'main_category') /* choose a main category for your item */ { $template->set('sell_item_header', header7(strtoupper(MSG_SELECT_MAIN_CAT))); $template->set('choose_category_title', MSG_MAIN_CATEGORY); $template->set('current_step', 'main_category'); $template->set('category_id_type', 'category_id'); $choose_category_expl_message = '<table width="100%" border="0" cellspacing="2" cellpadding="3" align="center" class="border"> ' . '<tr> ' . ' <td class="contentfont">' . MSG_SUBMIT_ITEM_MAIN_CAT . '</td> ' . '</tr></table><br>'; $template->set('choose_category_expl_message', $choose_category_expl_message); $sell_item_page_content = $template->process('sell_item_choose_category.tpl.php'); $template->set('sell_item_page_content', $sell_item_page_content); } else if ($sale_step == 'addl_category') /* choose an additional category for your item */ { $template->set('sell_item_header', header7(strtoupper(MSG_SELECT_ADDL_CAT))); $template->set('choose_category_title', MSG_ADDL_CATEGORY); $template->set('current_step', 'addl_category'); $template->set('category_id_type', 'addl_category_id'); $choose_category_expl_message = '<table width="100%" border="0" cellspacing="2" cellpadding="3" align="center" class="border"> ' . '<tr><td class="contentfont">' . MSG_SUBMIT_ITEM_ADDL_CAT_A . '</td></tr> '; $category_fee = $setup_fee->display_fee('second_cat_fee', $user_details, $item_details['category_id'], $item_details['list_in'], $voucher_details); if ($category_fee['amount']) { $choose_category_expl_message .= '<tr><td>' . MSG_A_FEE_OF . ' <b>' . $fees->display_amount($category_fee['amount'], $setts['currency'], true) . '</b> ' . MSG_WILL_BE_APPLIED . '</td></tr>'; } $choose_category_expl_message .= '</table><br>'; $template->set('choose_category_expl_message', $choose_category_expl_message); $sell_item_page_content = $template->process('sell_item_choose_category.tpl.php'); $template->set('sell_item_page_content', $sell_item_page_content); } else if ($sale_step == 'splash_page_seller_verification') { $template->set('sell_item_header', header7(strtoupper(MSG_SELLER_VERIFICATION))); $template->set('current_step', ''); $sell_item_page_content = $template->process('splash_page_seller_verification.tpl.php'); $template->set('sell_item_page_content', $sell_item_page_content); } else if ($sale_step == 'splash_page_store_only_mode') { $template->set('sell_item_header', header7(strtoupper(MSG_STORE_ONLY_MODE_WARNING))); $template->set('current_step', ''); $sell_item_page_content = $template->process('splash_page_store_only_mode.tpl.php'); $template->set('sell_item_page_content', $sell_item_page_content); } else /* this will be the first step (but only if stores are enabled) */ { $template->set('sell_item_header', header7(strtoupper(MSG_CHOOSE_WHERE_TO_LIST))); $template->set('current_step', 'list_in'); $sell_item_page_content = $template->process('sell_item_list_in.tpl.php'); $template->set('sell_item_page_content', $sell_item_page_content); } $template_output .= $template->process('sell_item.tpl.php'); include_once ('global_footer.php'); echo $template_output; ?> Thanks for helping guys
  7. Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/bendemic/public_html/includes/page_browse_auctions.php on line 91 I don't see the problem , could anyone help point possible cause ? $browse_auctions_content .= '<tr class="contentfont ' . $background . '"> '. ' <td align="center"><input type="checkbox" name="auction_id[]" value="' . $item_details['auction_id'] . '"></td> '. (($thumbnails[16]=='1')?" <td class='contentfont' nowrap='nowrap' align='center'> <a href='".$auction_link."'><img src='thumbnail.php?pic=" . $auction_image . "&w=".$thumbnails[0]."&sq=".$thumbnails[2]."&b=".$thumbnails[1]."' border='0' alt='".$item_details['name']."' /></a></td>":"<td align='center'><a href='".$auction_link."'>#".$item_details['auction_id']."</a></td>") ' <td><a href="' . $auction_link . '">' . $item_details['name'] . '</a> ' . item_pics($item_details) . '</td> '. //' <td align="center">' . $fees->display_amount($item_details['start_price'], $item_details['currency']) . '</td> '. //' <td align="center">' . $fees->display_amount($item_details['max_bid'], $item_details['currency']) . '</td> '. ' <td align="center">' . $item_details['nb_bids'] . '</td> '. ' <td align="center">' . $fees->display_amount($current_price, $item_details['currency']) . '</td> '. ' <td align="center">' . time_left($item_details['end_time']) . '</td> '. '</tr> '; } }
  8. solved , i'll wrap the code next time , sorry.
  9. $sql_update_categories = $db->query("UPDATE " . DB_PREFIX . $table_name . " SET name='" . $db->rem_special_chars($_POST['name'][$key]) . "', " . (($table_name == 'categories') ? "minimum_age='" . intval($_POST['minimum_age'][$key]) . "', order_id=" . $order_id . ", custom_skin='" . $_POST['default_theme'][$key] . "', parent_id='".(($_POST["cat".$key]!="")?$_POST["cat".$key]:$_POST['parent_id'])."' WHERE category_id=" . $value); I get an parse error but i can't seem to spot it .... anyone pls ?
  10. could you guys ggive me an example of how it could be based on the given script ? or should i put some other code up aswell for you guys to determine that ?
  11. did this thread get moved ? i really thought this is a mysql mather not php , but hey you guys probably know better .
  12. Hi, this is the php : <? session_start(); define ('IN_ADMIN', 1); include_once ('../includes/global.php'); if ($session->value('adminarea')!='Active') { header_redirect('login.php'); } else { include_once ('header.php'); $msg_changes_saved = '<p align="center" class="contentfont">' . AMSG_CHANGES_SAVED . '</p>'; if (isset($_POST['savesettsok'])) { $uploaddir = '../scroller/'; for ($i=0;$i<count($_FILES['userfile']);$i++) { $uploadfile = $uploaddir . basename($_FILES['userfile']['name'][$i]); if (move_uploaded_file($_FILES['userfile']['tmp_name'][$i], $uploadfile)) { mysql_query("INSERT INTO D3_boxes_scroller (uid, picture) VALUES (".$_REQUEST["qid"].",'".$_FILES['userfile']['name'][$i]."')")or die(mysql_error()); } } for ($i=0;$i<count($_POST['theorder']);$i++) { $updateQuestion[$i] = mysql_query(" UPDATE D3_boxes_scroller SET theorder=".$_POST['theorder'][$i].", link='".$_POST['link'][$i]."' WHERE id='".$_POST['id'][$i]."'") or die(mysql_error()); } if (count($_POST['delete'])>0) { for ($i=0;$i<count($_POST['delete']);$i++) { $deleteQuestion[$i] = mysql_query("DELETE FROM D3_boxes_scroller WHERE id='".$_POST['delete'][$i]."'"); } } } $getad = $db->query("SELECT * FROM D3_boxes_scroller WHERE uid =".$qid." order by theorder"); $t=0; while ($row = $db->fetch_array($getad)) { $background = ($counter++%2) ? 'c1' : 'c2'; $item_durations_page_content .="<input type=\"hidden\" name=\"id[]\" value=\"".$row["id"]."\"><tr class=\"".$background."\"> <td width=\"100px\"><img src=\"../thumbnail.php?pic=scroller/".$row["picture"]."&w=100&sq=Y\" name=\"caption[]\"/><br /></td><td><input style=\"width:99%\" name=\"link[]\" type=\"text\" id=\"link[]\" value=\"".$row['link']."\" size=\"50\" /></td><td align=\"center\"><input style=\"width:99%\" name=\"theorder[]\" type=\"text\" id=\"theorder[]\" value=\"".$row['theorder']."\" size=\"50\" /></td><td align=\"center\"><input type=\"checkbox\" name=\"delete[]\" id=\"delete[".$row['id']."]\" value=\"".$row['id']."\"></td></tr>"; } $template->set('item_durations_page_content', $item_durations_page_content); $template_output .= $template->process('D3_add_banners.tpl.php'); include_once ('footer.php'); echo $template_output; } ?>
  13. Hi all, was hopeing someone knwos how to help me get past this. * MySQL server version : MySQL 5.0.89-community * the raw MySQL statement : A Mysql error has occurred while running the script: * The query you are trying to run is invalid * Mysql Error Output: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order by theorder' at line 1 * SQL Query: SELECT * FROM D3_boxes_scroller WHERE uid = order by theorder -- phpMyAdmin SQL Dump -- version 3.2.4 -- http://www.phpmyadmin.net -- -- Machine: localhost -- Genereertijd: 08 Mar 2010 om 07:09 -- Serverversie: 5.0.89 -- PHP-Versie: 5.2.9 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; -- -- Database: `bendemic_DB` -- -- -------------------------------------------------------- -- -- Tabelstructuur voor tabel `D3_boxes_scroller` -- CREATE TABLE IF NOT EXISTS `D3_boxes_scroller` ( `id` int(11) NOT NULL auto_increment, `uid` int(11) NOT NULL default '0', `picture` varchar(255) default NULL, `show` tinyint(2) default '0', `theorder` int(20) NOT NULL default '0', `link` varchar(200) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ; -- -- Gegevens worden uitgevoerd voor tabel `D3_boxes_scroller` -- INSERT INTO `D3_boxes_scroller` (`id`, `uid`, `picture`, `show`, `theorder`, `link`) VALUES (1, 0, NULL, 0, 0, ''), (2, 0, NULL, 0, 1, ''), (3, 0, NULL, 0, 0, ''), (4, 0, NULL, 0, 1, '');
  14. problem solved.
  15. ok guys, thanks for your input I managed to solve the include_once problem. Now I just have this error left : A Mysql error has occurred while running the script: * The query you are trying to run is invalid * Mysql Error Output: Unknown column 'exceeded_balance_email' in 'where clause' * SQL Query: SELECT user_id FROM probid_users WHERE active=1 AND balance>max_credit AND payment_mode=2 AND exceeded_balance_email=0 Which has probably to do with something in the DB, right ? I am fairly new to php and mysql but i do have enough knowledge to work my way around, sometimes with some help like from you fellow members. I tried using search in myphpadmin for exceeded_balance_email in the DB i'm using but it didn't turn up any results
  16. Hi Garethp thanks for your reply, Should I find the // in the init.php ?
  17. Hi all, I have this problem with my coding, could anyone perhaps tell me whats going wrong? This is the error : Warning: include_once(language//global.lang.php) [function.include-once]: failed to open stream: No such file or directory in /home/bendemic/public_html/includes/init.php on line 36 Warning: include_once() [function.include]: Failed opening 'language//global.lang.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/bendemic/public_html/includes/init.php on line 36 Warning: include_once(language//category.lang.php) [function.include-once]: failed to open stream: No such file or directory in /home/bendemic/public_html/includes/init.php on line 37 Warning: include_once() [function.include]: Failed opening 'language//category.lang.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/bendemic/public_html/includes/init.php on line 37 Warning: include_once(language//site.lang.php) [function.include-once]: failed to open stream: No such file or directory in /home/bendemic/public_html/includes/init.php on line 41 Warning: include_once() [function.include]: Failed opening 'language//site.lang.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/bendemic/public_html/includes/init.php on line 41 Warning: include_once(language//categories_array.php) [function.include-once]: failed to open stream: No such file or directory in /home/bendemic/public_html/includes/init.php on line 47 Warning: include_once() [function.include]: Failed opening 'language//categories_array.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/bendemic/public_html/includes/init.php on line 47 A Mysql error has occurred while running the script: * The query you are trying to run is invalid * Mysql Error Output: Unknown column 'exceeded_balance_email' in 'where clause' * SQL Query: SELECT user_id FROM probid_users WHERE active=1 AND balance>max_credit AND payment_mode=2 AND exceeded_balance_email=0
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.