<?php

/*
  $Id: product_listing_col.php,v 1.1.1.1 2004/03/04 23:41:11 ccwjr Exp $
*/
//declare variables and initialize
// added for CDS CDpath support
$params = isset($_SESSION['CDpath']) ? '&CDpath=' . $_SESSION['CDpath'] : '';
$row = 0;
$column = 0;
$listing_split = new splitPageResults_rspv($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')) {
    ?>
<!--product-listin-col -->
<?php 
}
$list_box_contents = array();
if ($listing_split->number_of_rows > 0) {
    $listing_query = tep_db_query($listing_split->sql_query);
    $row = 0;
    $column = 0;
    $no_of_listings = tep_db_num_rows($listing_query);
    while ($_listing = tep_db_fetch_array($listing_query)) {
        $listing[] = $_listing;
    }
    echo '<div class="product-listing-module-container">';
    for ($x = 0; $x < $no_of_listings; $x++) {
        $product_contents = array();
        for ($col = 0, $n = sizeof($column_list); $col < $n; $col++) {
            $lc_align = '';
            $lc_text = '';
// EOF: Lango Added for template MOD
?>
  <tr>
    <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
      <?php 
// BOF: Lango Added for template MOD
if (MAIN_TABLE_BORDER == 'yes') {
    table_image_border_top(false, false, $header_text);
}
// EOF: Lango Added for template MOD
?>
      <td width="100%" valign="top" align="center"><table border="0" width="100%" cellspacing="0" cellpadding="0">
        <!-- wishlist content //start -->
        <?php 
$wishlist_sql = "select * from " . TABLE_WISHLIST . " where customers_id = '" . $_SESSION['customer_id'] . "' and products_id > 0 order by products_name";
$wishlist_split = new splitPageResults_rspv($wishlist_sql, MAX_DISPLAY_WISHLIST_PRODUCTS);
$wishlist_query = tep_db_query($wishlist_split->sql_query);
$info_box_contents = array();
if (tep_db_num_rows($wishlist_query)) {
    $product_ids = '';
    while ($wishlist = tep_db_fetch_array($wishlist_query)) {
        $product_ids .= $wishlist['products_id'] . ',';
    }
    $product_ids = substr($product_ids, 0, -1);
    $products_query = tep_db_query("select pd.products_id, pd.products_name, pd.products_description, p.products_image, p.products_price, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where pd.products_id in (" . $product_ids . ") and p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' order by products_name");
    if ($wishlist_split->number_of_rows > 0 && (PREV_NEXT_BAR_LOCATION == '1' || PREV_NEXT_BAR_LOCATION == '3')) {
        ?>
      <div class="product-listing-module-pagination margin-bottom">
        <div class="pull-left large-margin-bottom page-results"><?php 
        echo $wishlist_split->display_count(TEXT_DISPLAY_NUMBER_OF_WISHLIST);
        ?>