0byt3m1n1 - D7net
0byt3m1n1 - D7net
Path:
/
home
/
s13cf5ef
/
www
/
ropadefutbolbarata
/
includes
/
modules
/
[
Home
]
Name File: product_listing.php
< back
<?php /* $Id: product_listing.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ ?> <?php echo tep_draw_title_top();?> <?php echo $breadcrumb->trail(' » ')?> <?php echo tep_draw_title_bottom();?> <?php echo tep_draw3_top();?> <?php $listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_SEARCH_RESULTS, 'p.products_id'); if ( ($listing_split->number_of_rows > 0) && ( (PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3') ) ) { ?> <?php echo tep_draw_result1_top(); ?> <div class="cl_both result_top_padd ofh"> <div class="fl_left result_left"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></div> <div class="fl_right result_right"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></div> </div> <?php echo tep_draw_result1_bottom(); ?> <?php } $info_box_contents = array(); $list_box_contents = array(); $my_row = 0; $my_col = 0; $col_items = (MAX_DISPLAY_SEARCH_RESULTS_PER_ROW - 1); $col_width = (int)(100 / ($col_items + 1)).'%'; for ($col=0, $n=sizeof($column_list); $col<$n; $col++) { switch ($column_list[$col]) { case 'PRODUCT_LIST_MODEL': $lc_text = TABLE_HEADING_MODEL; $lc_align = ''; break; case 'PRODUCT_LIST_NAME': $lc_text = TABLE_HEADING_PRODUCTS; $lc_align = ''; break; case 'PRODUCT_LIST_MANUFACTURER': $lc_text = TABLE_HEADING_MANUFACTURER; $lc_align = ''; break; case 'PRODUCT_LIST_PRICE': $lc_text = TABLE_HEADING_PRICE; $lc_align = 'right'; break; case 'PRODUCT_LIST_QUANTITY': $lc_text = TABLE_HEADING_QUANTITY; $lc_align = 'right'; break; case 'PRODUCT_LIST_WEIGHT': $lc_text = TABLE_HEADING_WEIGHT; $lc_align = 'right'; break; case 'PRODUCT_LIST_IMAGE': $lc_text = TABLE_HEADING_IMAGE; $lc_align = 'center'; break; case 'PRODUCT_LIST_BUY_NOW': $lc_text = TABLE_HEADING_BUY_NOW; $lc_align = 'center'; break; } if ( ($column_list[$col] != 'PRODUCT_LIST_BUY_NOW') && ($column_list[$col] != 'PRODUCT_LIST_IMAGE') ) { $lc_text = tep_create_sort_heading($HTTP_GET_VARS['sort'], $col+1, $lc_text); } $list_box_contents[0][] = array('align' => $lc_align, 'params' => 'class="productListing-heading"', 'text' => ' ' . $lc_text . ' '); } if ($listing_split->number_of_rows > 0) { $rows = 0; $listing_query = tep_db_query($listing_split->sql_query); while ($listing = tep_db_fetch_array($listing_query)) { $rows++; if (($rows/2) == floor($rows/2)) { $list_box_contents[] = array('params' => 'class="productListing-even"'); } else { $list_box_contents[] = array('params' => 'class="productListing-odd"'); } $cur_row = sizeof($list_box_contents) - 1; for ($col=0, $n=sizeof($column_list); $col<$n; $col++) { $lc_align = ''; switch ($column_list[$col]) { case 'PRODUCT_LIST_MODEL': $lc_align = ''; $p_model = '<tr> <td><b><font>'.TABLE_HEADING_MODEL.' :</font></b></td> <td align="right"><font>' . $listing['products_model'] . '</font></td> </tr>'; break; case 'PRODUCT_LIST_NAME': $lc_align = ''; if (isset($HTTP_GET_VARS['manufacturers_id'])) { $p_name = $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a>'; } else { $p_name = $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a>'; } break; case 'PRODUCT_LIST_MANUFACTURER': $lc_align = ''; $p_manufact = '<tr> <td><b><font>'.TABLE_HEADING_MANUFACTURER.' :</font></b></td> <td align="right"><font><a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing['manufacturers_id']) . '">' . $listing['manufacturers_name'] . '</a></font></td> </tr>'; break; case 'PRODUCT_LIST_PRICE': $lc_align = 'right'; if (tep_not_null($listing['specials_new_products_price'])) { $p_price = $lc_text = '<s>' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</s> '; } else { $p_price = $lc_text = ''; } break; case 'PRODUCT_LIST_QUANTITY': $lc_align = 'right'; $p_qty = '<tr> <td><b><font>'.TABLE_HEADING_QUANTITY.' :</font></b></td> <td align="right"><font>' . $listing['products_quantity'] . '</font></td> </tr>'; break; case 'PRODUCT_LIST_WEIGHT': $lc_align = 'right'; $p_weight = '<tr> <td> </td> <td align="right"> </td> </tr>'; break; case 'PRODUCT_LIST_IMAGE': $lc_align = 'center'; if (isset($HTTP_GET_VARS['manufacturers_id'])) { $p_pic = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>'; } else { $p_pic = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>'; } break; case 'PRODUCT_LIST_BUY_NOW': $lc_align = 'center'; $p_button = $lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now1.gif', IMAGE_BUTTON_BUY_NOW) . '</a>'; break; } $product_query = tep_db_query("select products_description, products_id from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$listing['products_id'] . "' and language_id = '" . (int)$languages_id . "'"); $product = tep_db_fetch_array($product_query); $p_desc = substr(strip_tags($product['products_description']), 0, MAX_DESCR_1).'...<br>'; if (PRODUCT_LIST_MODEL != 0 || PRODUCT_LIST_MANUFACTURER != 0 || PRODUCT_LIST_QUANTITY != 0 || PRODUCT_LIST_WEIGHT != 0) { $p_listing = '<table cellpadding="0" cellspacing="0" border="0" class="listing">'.$p_model.''.$p_manufact.'' . ''.$p_qty.'' . ''.$p_weight.'</table>'; } $p_id = $product['products_id']; /* $list_box_contents[$cur_row][] = array('align' => $lc_align, 'params' => '', 'text' => $lc_text); */ } $p_details = '<a class="bg_button2" onMouseOut="this.id=\'bg_button2\';" onMouseOver="this.id=\'bg_button2-act\';" href="' . tep_href_link('product_info.php?products_id='.$p_id) . '">'.tep_image_button('button_details.gif', '', ' class="btn1"').'</a>'; $p_details_text = '<a class="bg_button2" onMouseOut="this.id=\'bg_button2\';" onMouseOver="this.id=\'bg_button2-act\';" href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">'.tep_draw_list_act_top().DETAILS .tep_draw_list_act_bottom().'</a>'; $p_buy_now = '<a class="bg_button22" onMouseOut="this.id=\'bg_button22\';" onMouseOver="this.id=\'bg_button22-act\';" href="'.tep_href_link("products_new.php","action=buy_now&products_id=".$p_id).'">'.tep_image_button('button_add_to_cart1.gif', '', ' class="btn1"').'</a>'; $p_buy_now_text = '<a class="bg_button22" onMouseOut="this.id=\'bg_button22\';" onMouseOver="this.id=\'bg_button22-act\';" href="'.tep_href_link("products_new.php","action=buy_now&products_id=".$p_id).'">'.tep_draw_list_top().ADD_TO_CART .tep_draw_list_bottom().'</a>'; $info_box_contents[$my_row][$my_col] = array('align' => 'center', 'params' => ' style="width:'.$col_width.'"', 'text' => ''.tep_draw_prod2_top().' <table cellpadding="0" cellspacing="0" border="0" class="wrapper_box"> <tr><td class="pic2_padd">'.tep_draw_prod_pic_top().''.$p_pic.''.tep_draw_prod_pic_bottom().'</td></tr> <tr><td class="name name2_padd">'.$p_name.'</td></tr> <tr><td class="desc desc2_padd">'.$p_desc.'</td></tr> <tr><td class="listing2_padd">'.$p_listing.'</td></tr> </table> '.tep_draw_prod2_bottom().''); $my_col ++; if ($my_col > $col_items) { $my_col = 0; $my_row ++; } } new contentBox($info_box_contents); // new productListingBox($list_box_contents); } else { ?> <?php echo tep_draw1_top(); ?> <?php echo TEXT_NO_PRODUCTS ?> <?php echo tep_draw1_bottom();?> <?php } ?> <?php if ( ($listing_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3')) ) { ?> <?php echo tep_draw_result2_top(); ?> <div class="cl_both result_bottom_padd ofh"> <div class="fl_left result_left"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></div> <div class="fl_right result_right"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></div> </div> <?php echo tep_draw_result2_bottom(); ?> <?php } ?> <?php echo tep_draw3_bottom();?>
©
2018. | Recode by D7net