$imagesliders_string = '';
require_once DIR_FS_INC . 'xtc_get_categories_name.inc.php';
require_once DIR_FS_INC . 'xtc_get_products_name.inc.php';
$box_smarty->assign('language', $_SESSION['language']);
// set cache ID
if (!CacheCheck()) {
    $cache = false;
    $box_smarty->caching = 0;
} else {
    $cache = true;
    $box_smarty->caching = 1;
    $box_smarty->cache_lifetime = CACHE_LIFETIME;
    $box_smarty->cache_modified_check = CACHE_CHECK;
    $cache_id = $_SESSION['language'] . $_SESSION['customers_status']['customers_status_id'];
}
if (!$box_smarty->is_cached(CURRENT_TEMPLATE . '/boxes/box_imagesliders.html', $cache_id) || !$cache) {
    $box_smarty->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/');
    $imagesliders_query = "SELECT DISTINCT\r\n\t\t\t\t\t\t i.imagesliders_id,\r\n                         ii.imagesliders_title,\r\n\t\t\t\t\t\t ii.imagesliders_alt,\r\n                         ii.imagesliders_url,\r\n\t\t\t\t\t\t ii.imagesliders_url_target,\r\n\t\t\t\t\t\t ii.imagesliders_url_typ,\r\n                         ii.imagesliders_description,\r\n                         ii.imagesliders_image,\r\n\t\t\t\t\t\t i.imagesliders_categories\r\n \t\t\t\t\t  FROM " . TABLE_IMAGESLIDERS . " i, " . TABLE_IMAGESLIDERS_INFO . " ii\r\n                      WHERE languages_id='" . (int) $_SESSION['languages_id'] . "'\r\n\t\t\t\t\t  AND i.imagesliders_id = ii.imagesliders_id\r\n\t\t\t\t\t  AND ii.imagesliders_image != ''\r\n\t\t\t\t\t  AND i.status = '0'\r\n                      ORDER BY i.sorting, i.imagesliders_id ASC";
    $imagesliders_query = xtDBquery($imagesliders_query);
    $imagesliders_array = array();
    while ($imagesliders_data = xtc_db_fetch_array($imagesliders_query, true)) {
        // BOF - Fishnet Services - Nicolas Gemsjaeger
        // Erweiterung: categories
        $allowed = false;
        unset($imagesliders_categories);
        $imagesliders_categories = explode(",", $imagesliders_data["imagesliders_categories"]);
        $categories_array = !empty($cPath) ? $cPath : (basename(set_php_self()) == "index.php" ? "0" : "-1");
        if (strrpos($categories_array, "_") === false) {
            $categories_array = substr($categories_array, strrpos($categories_array, "_"));
        } else {
            $categories_array = substr($categories_array, strrpos($categories_array, "_") + 1);
$box_content = '';
$manufacturer = array();
$rebuild = false;
$box_smarty->assign('language', $_SESSION['language']);
// set cache ID
if (!CacheCheck()) {
    $cache = false;
    $box_smarty->caching = 0;
} else {
    $cache = true;
    $box_smarty->caching = 1;
    $box_smarty->cache_lifetime = CACHE_LIFETIME;
    $box_smarty->cache_modified_check = CACHE_CHECK;
    $cache_id = $_SESSION['language'] . $product->data['products_id'];
}
if (!$box_smarty->is_cached(CURRENT_TEMPLATE . '/boxes/box_manufacturers_info.html', $cache_id) || !$cache) {
    $box_smarty->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/');
    $rebuild = true;
    $manufacturer_query = xtDBquery("select\n                                            m.manufacturers_id,\n                                            m.manufacturers_name,\n                                            m.manufacturers_image,\n                                            mi.manufacturers_url\n                                       FROM " . TABLE_MANUFACTURERS . " m\n                                  LEFT JOIN " . TABLE_MANUFACTURERS_INFO . " mi\n                                         ON (m.manufacturers_id = mi.manufacturers_id\n                                        AND mi.languages_id = '" . (int) $_SESSION['languages_id'] . "'),\n                                            " . TABLE_PRODUCTS . " p\n                                       WHERE p.products_id = '" . $product->data['products_id'] . "'\n                                         AND p.manufacturers_id = m.manufacturers_id");
    if (xtc_db_num_rows($manufacturer_query, true)) {
        $manufacturer = xtc_db_fetch_array($manufacturer_query, true);
        $image = 'aaa';
        if (xtc_not_null($manufacturer['manufacturers_image'])) {
            $image = DIR_WS_IMAGES . $manufacturer['manufacturers_image'];
            // BOF - Tomcraft - 2009-10-30 - noimage.gif is displayed, when no image is defined
            if (!file_exists($image)) {
                $image = DIR_WS_IMAGES . 'manufacturers/noimage.gif';
            }
            // EOF - Tomcraft - 2009-10-30 - noimage.gif is displayed, when no image is defined
        }
        $box_smarty->assign('IMAGE', $image);
$box_smarty = new smarty();
$content_string = '';
//$rebuild = false; //DokuMan - 2010-02-28 - fix Smarty cache error on unlink
$box_smarty->assign('language', $_SESSION['language']);
// set cache ID
if (!CacheCheck()) {
    $cache = false;
    $box_smarty->caching = 0;
} else {
    $cache = true;
    $box_smarty->caching = 1;
    $box_smarty->cache_lifetime = CACHE_LIFETIME;
    $box_smarty->cache_modified_check = CACHE_CHECK;
    $cache_id = $_SESSION['language'] . $_SESSION['customers_status']['customers_status_id'];
}
if (!$box_smarty->is_cached(CURRENT_TEMPLATE . '/boxes/box_information.html', $cache_id) || !$cache) {
    $box_smarty->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/');
    //$rebuild = true; //DokuMan - 2010-02-28 - fix Smarty cache error on unlink
    if (GROUP_CHECK == 'true') {
        $group_check = "and group_ids LIKE '%c_" . $_SESSION['customers_status']['customers_status_id'] . "_group%'";
    }
    $content_query = "SELECT\n\t \t\t\t\t\tcontent_id,\n\t \t\t\t\t\tcategories_id,\n\t \t\t\t\t\tparent_id,\n\t \t\t\t\t\tcontent_title,\n\t \t\t\t\t\tcontent_group\n\t \t\t\t\t\tFROM " . TABLE_CONTENT_MANAGER . "\n\t \t\t\t\t\tWHERE languages_id='" . (int) $_SESSION['languages_id'] . "'\n\t \t\t\t\t\tand file_flag=0 " . $group_check . " and content_status=1 order by sort_order";
    $content_query = xtDBquery($content_query);
    $content_string = '<ul class="list-unstyled">';
    while ($content_data = xtc_db_fetch_array($content_query, true)) {
        $SEF_parameter = '';
        if (SEARCH_ENGINE_FRIENDLY_URLS == 'true') {
            $SEF_parameter = '&product=' . xtc_cleanName($content_data['content_title']);
        }
        $content_string .= '<li><a href="' . xtc_href_link(FILENAME_CONTENT, 'coID=' . $content_data['content_group'] . $SEF_parameter) . '">' . $content_data['content_title'] . '</a></li>';
    }
$box_smarty = new smarty();
$box_content = '';
//$rebuild = false; //DokuMan - 2010-02-28 - fix Smarty cache error on unlink
$box_smarty->assign('language', $_SESSION['language']);
// set cache ID
if (!CacheCheck()) {
    $cache = false;
    $box_smarty->caching = 0;
} else {
    $cache = true;
    $box_smarty->caching = 1;
    $box_smarty->cache_lifetime = CACHE_LIFETIME;
    $box_smarty->cache_modified_check = CACHE_CHECK;
    $cache_id = $_SESSION['language'] . $current_category_id;
}
if (!$box_smarty->is_cached(CURRENT_TEMPLATE . '/boxes/box_best_sellers.html', $cache_id) || !$cache) {
    $box_smarty->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/');
    //$rebuild = true; //DokuMan - 2010-02-28 - fix Smarty cache error on unlink
    // include needed functions
    require_once DIR_FS_INC . 'xtc_row_number_format.inc.php';
    //fsk18 lock
    $fsk_lock = '';
    if ($_SESSION['customers_status']['customers_fsk18_display'] == '0') {
        $fsk_lock = ' and p.products_fsk18!=1';
    }
    $group_check = '';
    //DokuMan - 2010-02-28 - set undefined variable group_check
    if (GROUP_CHECK == 'true') {
        $group_check = " and p.group_permission_" . $_SESSION['customers_status']['customers_status_id'] . "=1 ";
    }
    //BOF - DokuMan - 2010-07-12 - fix Smarty cache error on unlink
   -----------------------------------------------------------------------------------------
   Released under the GNU General Public License
   ---------------------------------------------------------------------------------------*/
$box_smarty = new smarty();
$box_content = '';
$box_smarty->assign('language', $_SESSION['language']);
// set cache ID
if (!CacheCheck()) {
    $cache = false;
    $box_smarty->caching = 0;
} else {
    $cache = true;
    $box_smarty->caching = 1;
    $box_smarty->cache_lifetime = CACHE_LIFETIME;
    $box_smarty->cache_modified_check = CACHE_CHECK;
    $cache_id = $_SESSION['language'] . (isset($_GET['manufacturers_id']) ? (int) $_GET['manufacturers_id'] : 0);
}
if (!$box_smarty->is_cached(CURRENT_TEMPLATE . '/boxes/box_content_templatebox1.html', $cache_id) || !$cache) {
    $box_smarty->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/');
    $content_manager_qry = xtDBquery("SELECT content_title, content_heading, content_text FROM " . TABLE_CONTENT_MANAGER . " WHERE content_group = '12' AND languages_id = '" . $_SESSION["languages_id"] . "'");
    $content_manager_ary = xtc_db_fetch_array($content_manager_qry);
    $box_smarty->assign('BOX_TITLE', !empty($content_manager_ary["content_heading"]) ? $content_manager_ary["content_heading"] : $content_manager_ary["content_title"]);
    $box_smarty->assign('BOX_CONTENT', $content_manager_ary["content_text"]);
}
// set cache ID
if (!$cache) {
    $box_content_templatebox1 = $box_smarty->fetch(CURRENT_TEMPLATE . '/boxes/box_content_templatebox1.html');
} else {
    $box_content_templatebox1 = $box_smarty->fetch(CURRENT_TEMPLATE . '/boxes/box_content_templatebox1.html', $cache_id);
}
$smarty->assign('box_CONTENT_TEMPLATEBOX1', $box_content_templatebox1);
//$rebuild = false; //DokuMan - 2010-02-28 - fix Smarty cache error on unlink
$box_smarty->assign('language', $_SESSION['language']);
// set cache ID
if (!CacheCheck()) {
    $cache = false;
    $box_smarty->caching = 0;
    $cache_id = null;
    //DokuMan - 2010-02-26 - Undefined variable: cache_id
} else {
    $cache = true;
    $box_smarty->caching = 1;
    $box_smarty->cache_lifetime = CACHE_LIFETIME;
    $box_smarty->cache_modified_check = CACHE_CHECK;
    $cache_id = $_SESSION['language'] . $_SESSION['customers_status']['customers_status_id'] . '-' . $cPath;
}
if (!$box_smarty->is_cached(CURRENT_TEMPLATE . '/boxes/box_categories.html', $cache_id) || !$cache) {
    //BOF - GTB - 2010-08-03 - Security Fix - Base
    $box_smarty->assign('tpl_path', DIR_WS_BASE . 'templates/' . CURRENT_TEMPLATE . '/');
    //$box_smarty->assign('tpl_path', 'templates/'.CURRENT_TEMPLATE.'/');
    //EOF - GTB - 2010-08-03 - Security Fix - Base
    //$rebuild=true; //DokuMan - 2010-02-28 - fix Smarty cache error on unlink
    // include needed functions
    require_once DIR_FS_CATALOG . 'templates/' . CURRENT_TEMPLATE . '/source/inc/xtc_show_category.inc.php';
    require_once DIR_FS_INC . 'xtc_has_category_subcategories.inc.php';
    require_once DIR_FS_INC . 'xtc_count_products_in_category.inc.php';
    $categories_string = '';
    $group_check = '';
    //DokuMan - 2010-02-28 - set undefined variable group_check
    if (GROUP_CHECK == 'true') {
        $group_check = "and c.group_permission_" . $_SESSION['customers_status']['customers_status_id'] . "=1 ";
    }
   (c) 2002-2003 osCommerce www.oscommerce.com 
   (c) 2003	 nextcommerce www.nextcommerce.org

   Released under the GNU General Public License 
   ---------------------------------------------------------------------------------------*/
$box_smarty = new smarty();
$box_content = '';
$rebuild = false;
$box_smarty->assign('language', $_SESSION['language']);
// set cache ID
if (!CacheCheck()) {
    $cache = false;
    $box_smarty->caching = 0;
} else {
    $cache = true;
    $box_smarty->caching = 1;
    $box_smarty->cache_lifetime = CACHE_LIFETIME;
    $box_smarty->cache_modified_check = CACHE_CHECK;
    $cache_id = $_SESSION['language'];
}
if (!$box_smarty->is_cached(CURRENT_TEMPLATE . '/boxes/box_newsletter.html', $cache_id) || !$cache) {
    $box_smarty->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/');
    $rebuild = true;
    $box_smarty->assign('FORM_ACTION', xtc_draw_form('sign_in', xtc_href_link(FILENAME_NEWSLETTER, '', 'SSL')));
    // web28 - 2010-09-21 - change NONSSL -> SSL
    $box_smarty->assign('FIELD_EMAIL', xtc_draw_input_field('email', '', 'maxlength="50" style="width:170px;"'));
    $box_smarty->assign('BUTTON', xtc_image_submit('button_login_newsletter.gif', IMAGE_BUTTON_LOGIN_NEWSLETTER));
    $box_smarty->assign('FORM_END', '</form>');
}
$box_newsletter = $box_smarty->fetch(CURRENT_TEMPLATE . '/boxes/box_newsletter.html', $cache_id);
$smarty->assign('box_NEWSLETTER', $box_newsletter);