[ Index ]

PHP Cross Reference of osCMax 2.0.4

title

Body

[close]

/templates/fallback/content/ -> allprods.tpl.php (source)

   1  <table width="100%" border="0" cellspacing="2" cellpadding="1">
   2    <tr>
   3      <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
   4          <tr> 
   5            <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
   6                <tr> 
   7                  <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
   8                  <td align="right"></td>
   9                </tr>
  10              </table></td>
  11          </tr>
  12          <tr> 
  13            <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  14          </tr>
  15          <tr> 
  16            <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
  17                <?php    
  18               $languages_query = tep_db_query("select languages_id, name, code, image, directory from " . TABLE_LANGUAGES . " order by sort_order");
  19               while ($languages = tep_db_fetch_array($languages_query)) {
  20                  $languages_array[] = array('id'            => $languages['languages_id'],
  21                                             'name'        => $languages['name'],
  22                                              'code'        => $languages['code'],
  23                                              'image'        => $languages['image'],
  24                                             'directory'    => $languages['directory']);
  25               }
  26                 for ($i=0; $i<sizeof($languages_array); $i++) {             
  27                   $this_language_id = $languages_array[$i]['id'];
  28                  $this_language_name = $languages_array[$i]['name'];
  29                  $this_language_code = $languages_array[$i]['code'];
  30                  $this_language_image = $languages_array[$i]['image'];
  31                  $this_language_directory = $languages_array[$i]['directory'];
  32                  echo " <tr>\n";
  33                   $products_query = tep_db_query("SELECT p.products_id, pd.products_name FROM " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd WHERE p.products_id = pd.products_id AND p.products_status = 1 AND pd.language_id = $this_language_id ORDER BY pd.products_name");
  34                  $products_array = array();
  35                  while($products = tep_db_fetch_array($products_query)) {
  36                     $products_array[] = array('id'   => $products['products_id'],
  37                                                  'name' => $products['products_name']);
  38                  }
  39                  for ($j=0; $j<NR_COLUMNS; $j++) {
  40                      echo "   <td class=main valign=\"top\">\n";
  41                      for ($k=$j; $k<sizeof($products_array); $k+=NR_COLUMNS) {
  42                          $this_products_id   = $products_array[$k]['id'];
  43                          $this_products_name = $products_array[$k]['name'];
  44                          echo "     <a href=\"" . tep_href_link(FILENAME_PRODUCT_INFO, 'name=' .str_replace("/", "&#47;", rawurlencode($this_products_name)). '&products_id=' . $this_products_id . (($this_language_code == DEFAULT_LANGUAGE) ? '' : ('&language=' . $this_language_code)), 'NONSSL', false) . "\">" . $this_products_name . "</a><br>\n";
  45                      }
  46                      echo "   </td>\n";
  47                  }
  48                  echo " </tr>\n";
  49              }
  50  ?>
  51              </table></td>
  52          </tr>
  53        </table>
  54    
  55        
  56        
  57      </td>
  58    </tr>
  59  </table>


Generated: Fri Jan 1 13:43:16 2010 Cross-referenced by PHPXref 0.7