Jump to content

RayWilk

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

RayWilk's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi Joel24 thank you for trying to help, no support from phpprobid on older products, if any one could assist me in solving this problem, that would be greatly appreciated, RayWilk
  2. Hi Joel24, I hope this is correct. ....................................................... <? ################################################################# ## PHP Pro Bid v6.00 ## ##-------------------------------------------------------------## ## class_template.php ## ##-------------------------------------------------------------## ################################################################# class template { ## constructor, set the home directory for the templates function template($path) { $this->path = $path; } ## change template path if needed function change_path($path) { $this->path = $path; } ## assign variables that will be used in the template used. function set($name, $value) { $this->vars[$name] = $value; } ## process the template file function process($file) { @extract($this->vars); ob_start(); include($this->path . $file); $contents = ob_get_contents(); ob_end_clean(); return $contents; } /** * This function will create a table with the specified number of columns which will contain in each box * a field from the $variables_array array * */ function generate_table ($variables_array, $columns, $cellpadding = 0, $cellspacing = 0, $table_width = null, $table_class = null, $box_class = null, $box_width = null) { (string) $display_output = null; $table_class = ($table_class) ? 'class="' . $table_class . '"' : ''; $box_class = ($box_class) ? 'class="' . $box_class . '"' : ''; $nb_variables = count($variables_array); $rows = ceil($nb_variables / $columns); if ($table_width) { $table_width = 'width="' . $table_width . '"'; } $box_width = ($box_width) ? 'width="' . $box_width . '"' : 'width="' . (100 / $columns) . '%"'; $column_start = 0; $display_output = '<table cellpadding="' . $cellpadding . '" cellspacing="' . $cellspacing . '" border="0" ' . $table_width . ' ' . $table_class . '> '; for ($i=0; $i<$rows; $i++) { $display_output .= '<tr> '; $column_end = (($column_start + $columns) < $nb_variables) ? ($column_start + $columns) : $nb_variables; for ($j=$column_start; $j<$column_end; $j++) { $display_output .= '<td ' . $box_width . ' ' . $box_class . ' valign="top">' . $variables_array[$j] . '</td> '; } $column_start = $column_end; $display_output .= '</tr> '; } $display_output .= '</table>'; return $display_output; } } ?>
  3. I dont know if this helps, but on many of the php pages I have had to add script in red or a SQL Error message A Mysql error has occurred while running the script: DESC LIMIT , 20 & DESC LIMIT , 10 ... $where_query = " WHERE a.active=1 AND a.approved=1 AND a.deleted=0 AND a.creation_in_progress=0"; $start = (int) $start; $order_field = (in_array($_REQUEST['order_field'], $auction_ordering)) ? $_REQUEST['order_field'] : 'a.end_time'; $order_type = (in_array($_REQUEST['order_type'], $order_types)) ? $_REQUEST['order_type'] : 'ASC';
  4. Hello Joel24 here is the categories.php does that help? <? ################################################################# ## PHP Pro Bid v6.10 ## ##-------------------------------------------------------------## ## categories.php ## ##-------------------------------------------------------------## ################################################################# session_start(); define ('IN_SITE', 1); include_once ('includes/global.php'); include_once ('includes/class_formchecker.php'); include_once ('includes/class_custom_field.php'); $parent_id = intval($_REQUEST['parent_id']); $is_category = $db->count_rows('categories', "WHERE category_id='" . $parent_id . "'"); $parent_id = ($is_category) ? $parent_id : 0; $_REQUEST['parent_id'] = $parent_id; $user_id = intval($_REQUEST['user_id']); $protected_page = protected_page(0, $parent_id); if ($protected_page['private_category'] && !category_logged_in($parent_id)) { header_redirect('protected_page.php?redirect_url=categories&category_id=' . $parent_id); } else { include_once ('global_header.php'); $template->set('parent_id', $parent_id); define('IS_CATEGORIES', 1); $main_category_id = $db->main_category($parent_id); $category_details = $db->get_sql_row("SELECT image_path, minimum_age FROM " . DB_PREFIX . "categories WHERE category_id='" . $main_category_id . "'"); $category_logo = $category_details['image_path']; $category_logo = (!empty($category_logo)) ? '<img src="' . $category_logo . '" border="0">' : ''; $template->set('category_logo', $category_logo); $categories_header_menu = category_navigator($parent_id, true, true, 'categories.php'); $template->set('categories_header_menu', $categories_header_menu); if ($_REQUEST['option'] == 'agree_adult') { $session->set('adult_category', 1); } if ($category_details['minimum_age'] > 0 && !$session->value('adult_category')) { $template->set('minimum_age', $category_details['minimum_age']); $template_output .= $template->process('adult_category_warning.tpl.php'); } else { $src_details = array_merge($_GET, $_POST); $src_details = $db->rem_special_chars_array($src_details); /** * featured items, recently listed and ending soon code */ if ($layout['catfeat_nb']) { (array) $item_details = null; $where_query = " WHERE a.active=1 AND a.approved=1 AND a.closed=0 AND a.deleted=0 AND a.list_in!='store' AND a.catfeat='1'"; $where_query = browse_filter_query($src_details, $where_query); $template->set('featured_columns', min((floor($db->count_rows('auctions a', $select_condition)/$layout['catfeat_nb']) + 1), ceil($layout['catfeat_max']/$layout['catfeat_nb']))); $item_details = $db->random_rows('auctions a', 'a.auction_id, a.name, a.start_price, a.max_bid, a.currency, a.end_time', $where_query, $layout['catfeat_max']); $template->set('item_details', $item_details); } /** * shop in stores code snippet */ if ($parent_id) { $where_query = " WHERE a.active=1 AND a.approved=1 AND a.closed=0 AND a.deleted=0 AND a.list_in!='auction' AND a.owner_id=us.user_id AND us.active='1' AND us.shop_active='1' AND us.shop_name!=''"; $where_query = browse_filter_query($src_details, $where_query); $sql_select_stores = $db->query("SELECT us.user_id, us.shop_name FROM " . DB_PREFIX . "users us, " . DB_PREFIX . "auctions a " . $where_query . " GROUP BY us.user_id"); $is_shop_stores = $db->num_rows($sql_select_stores); $template->set('is_shop_stores', $is_shop_stores); if ($is_shop_stores) { (string) $shop_stores_content = null; while ($store_details = $db->fetch_array($sql_select_stores)) { $background = ($counter++%2) ? 'c1' : 'c2'; $shop_stores_content .= '<tr> '. ' <td width="100%" class="contentfont"> ยป <a href="shop.php?user_id=' . $store_details['user_id'] . '&parent_id=' . $parent_id . '">' . $store_details['shop_name'] . '</a></td> '. '</tr> '; } $template->set('shop_stores_content', $shop_stores_content); } } $categories_header .= $template->process('categories_header.tpl.php'); $categories_footer = $template->process('categories_footer.tpl.php'); /** * below we have the variables that need to be declared in each separate browse page */ $page_url = 'categories'; $where_query = " WHERE a.active=1 AND a.approved=1 AND a.deleted=0 AND a.creation_in_progress=0"; $start = (int) $start; $order_field = (in_array($_REQUEST['order_field'], $auction_ordering)) ? $_REQUEST['order_field'] : 'a.end_time'; $order_type = (in_array($_REQUEST['order_type'], $order_types)) ? $_REQUEST['order_type'] : 'ASC'; $template->set('categories_header', $categories_header); $template->set('categories_footer', $categories_footer); include_once('includes/page_browse_auctions.php'); } include_once ('global_footer.php'); echo $template_output; } ?>
  5. Hello Joel24, thank you for your reply, much appreciated, my knowledge is limited, so ... how are you echoing the images? "we'll need to see the code to help" I am happy to supply any code you want, just tell me what php or other you wish to look at, one observation I just made is: I just set up a 'Store' on the site and the logo/image uploaded and is showing/displayed perfectly (go to the STORES page to see) so images/photos are displayed when the code is correct please tell me what you wish to see, or have access to
  6. Hello on my site, uploaded photos are not showing, only "No Image Available" on the Sell & Wanted Ads pages is a upload a photo option to display a photo with the Ad, I have listed a couple of Sell and Wanted Ads, yet no photos are showing, only the "No Image Available" I looked in: /public_html /uplimg and yes the photos/images have been uploaded to the server, if you look at the Home page http://numberthree.netne.net/index.php you will see the "No Image Available" your help appreciated
×
×
  • 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.