<?php
/*
  $Id: geta_themes.php,v 1.2 2006/07/16 05:09:34 ryu Exp $

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2003 osCommerce

  Released under the GNU General Public License
  
  modified for Koshoten.net2
  http://www.koshoten.net/
*/
?>
<!-- getaThemesBox -->
<?php
  if ((KN_CFG_GETA_ENABLED == 'true') && (KN_CFG_GETA_THEMES_ENABLED == 'true')) {
    $box_geta_themes_query = tep_db_query("select geta_themes_id, geta_themes_title from " . TABLE_GETA_THEMES . " order by date_added desc limit " . KN_CFG_GETA_THEMES_MAX);
    if (tep_db_num_rows($box_geta_themes_query)) {
      $cssid = 'getaThemesBox';
      $infobox_header = KN_CFG_GETA_THEMES_TITLE;
      $infobox_footer = '<a href="' . tep_href_link(FILENAME_GETA_THEMES) . '">' . BOX_MORE_GETA_THEMES . '</a>';

      $box_geta_themes_list = "<ul>\n";
      while($box_geta_themes = tep_db_fetch_array($box_geta_themes_query)) {
        if (mb_strlen($box_geta_themes['geta_themes_title']) > 12) {
          $box_geta_themes_title = mb_substr(@strip_tags($box_geta_themes['geta_themes_title']), 0, 10) . ' ... ';
        } else {
          $box_geta_themes_title = @strip_tags($box_geta_themes['geta_themes_title']);
        }

        $box_geta_themes_list .= '<li><a href="' . tep_href_link(FILENAME_GETA_THEMES, 'gtID=' . $box_geta_themes['geta_themes_id']) . '">' . $box_geta_themes_title . "</a></li>\n";
      }
      $box_geta_themes_list .= "</ul>\n";
      
      $infobox_contents = array();
      $infobox_contents[] = array('text' => $box_geta_themes_list);

      new infoBox($cssid, $infobox_contents, $infobox_header, $infobox_footer);
    }
  }
?>
<!-- /getaThemesBox -->
