<?php
/*
 osCommRes, Services Oline 
http://www.oscommres.com 
Copyright (c) 2005 osCommRes 

Freeway eCommerce 
http://www.zac-ware.com/freeway 
Copyright (c) 2007 ZacWare 

Released under the GNU General Public License 
*/

// Check to ensure this file is included in Freeway!
defined('_FEXEC') or die();
// check for link categoris to determine if there is anything to display
  $link_categories_query = tep_db_query("select lc.link_categories_id, lcd.link_categories_name from " . TABLE_LINK_CATEGORIES . " lc, " . TABLE_LINK_CATEGORIES_DESCRIPTION . " lcd where lc.link_categories_id = lcd.link_categories_id and lc.link_categories_status = '1' and lcd.language_id = '" . (int)$languages_id . "' order by lcd.link_categories_name");
  $number_of_categories = tep_db_num_rows($link_categories_query);

  if ($number_of_categories > 0) {
?>
          <tr>
            <td>
<?php
	if(!defined('BOX_HEADING_LINKS'))define('BOX_HEADING_LINKS', 'Links');
    $info_box_contents = array();
    $info_box_contents[] = array('text'  =>  BOX_HEADING_LINKS );
    //new infoBoxHeading($info_box_contents, false, false, tep_href_link(FILENAME_LINKS));
	 new infoBoxHeading($info_box_contents, true, true);
    $informationString = '';
    while($row = tep_db_fetch_array($link_categories_query)) {
      $lPath_new = 'lPath=' . $row['link_categories_id'];
      $informationString .= '<a href="' . tep_href_link(FILENAME_LINKS, $lPath_new) . '">' . $row['link_categories_name'] . '</a><br>';
    }
    $info_box_contents = array();
   	$info_box_contents[] = array('align' => 'left',
                                 'text'  => $informationString
                                );
    new infoBox($info_box_contents);
    $info_box_contents = array();
	$info_box_contents[] = array('align' => 'left',
	                             'text'  => tep_draw_separator('pixel_trans.gif', '100%', '1')
	                              );
	 new infoboxFooter($info_box_contents, true, true);

?>
            </td>
          </tr>
<?
  }
?>
