}
 $sql_query = tep_db_query("SELECT lp.library_id, lf.files_name, lfde.files_descriptive_name, fi.icon_small, lf.files_name \r\n                                             from " . TABLE_LIBRARY_FILES . " lf, \r\n                                                    " . TABLE_LIBRARY_FILES_DESCRIPTION . " lfde, \r\n                                                    " . TABLE_LIBRARY_PRODUCTS . " lp, \r\n                                                    " . TABLE_FILE_ICONS . " fi \r\n                                           WHERE lfde.language_id = '" . $languages_id . "' \r\n                                             and lp.library_id = lf.files_id \r\n                                             and lf.files_id = lfde.files_id \r\n                                             and lf.files_icon = fi.icon_id \r\n                                             and lf.files_status = '1' \r\n                                             and lp.products_id ='" . $current_products_id . "'\r\n                                           ORDER BY lfde.files_descriptive_name");
 $num_files_related = tep_db_num_rows($sql_query);
 if ($num_files_related > 0) {
     $info_box_contents = array();
     $info_box_contents[] = array('text' => TEXT_RELATED_FILES);
     new contentBoxHeading($info_box_contents);
     $info_box_contents = array();
     $info_box_contents[0][] = array('align' => 'center', 'params' => 'class="productListing-heading"', 'text' => TEXT_DOWNLOAD_FILE);
     $info_box_contents[0][] = array('params' => 'class="productListing-heading"', 'text' => TEXT_MORE_INFO);
     $info_box_contents[0][] = array('align' => 'center', 'params' => 'class="productListing-heading"', 'text' => TEXT_FILE_NAME);
     require_once DIR_WS_CLASSES . FILENAME_DOWNLOAD;
     $download = new download();
     $n = 0;
     while ($listing_array = tep_db_fetch_array($sql_query)) {
         $download->process($listing_array['library_id'], $_SESSION['customer_id']);
         $download_criteria = $download->file_content;
         if ($n / 2 == floor($n / 2)) {
             $info_box_contents[] = array('params' => 'class="productListing-odd"');
         } else {
             $info_box_contents[] = array('params' => 'class="productListing-even"');
         }
         $cur_row = sizeof($info_box_contents) - 1;
         $info_box_contents[$cur_row][] = array('params' => 'class="productListing-data"', 'text' => $download_criteria);
         $info_box_contents[$cur_row][] = array('params' => 'class="productListing-data"', 'text' => '<a href="' . tep_href_link(FILENAME_FILE_DETAIL, 'file_id=' . $listing_array['library_id']) . '">' . $listing_array['files_descriptive_name'] . '</a>');
         $info_box_contents[$cur_row][] = array('params' => 'class="productListing-data"', 'text' => '<a href="' . tep_href_link(FILENAME_FILE_DETAIL, 'file_id=' . $listing_array['library_id']) . '">' . tep_image('images/file_icons/' . $listing_array['icon_small']) . '</a> <a href="' . tep_href_link(FILENAME_FILE_DETAIL, 'file_id=' . $listing_array['library_id']) . '">' . $listing_array['files_name'] . '</a>');
         $n++;
     }
     new contentBox($info_box_contents, true, true);
     if (TEMPLATE_INCLUDE_CONTENT_FOOTER == 'true') {
         $info_box_contents = array();