Released under the GNU General Public License 
   ---------------------------------------------------------------------------------------*/
$box = new vamTemplate();
$box->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/');
$box_content = '';
$manufacturer_query = vamDBquery("select m.manufacturers_id, m.manufacturers_name, m.manufacturers_image, mi.manufacturers_url from " . TABLE_MANUFACTURERS . " m left join " . TABLE_MANUFACTURERS_INFO . " mi on (m.manufacturers_id = mi.manufacturers_id and mi.languages_id = '" . (int) $_SESSION['languages_id'] . "'), " . TABLE_PRODUCTS . " p  where p.products_id = '" . $product->data['products_id'] . "' and p.manufacturers_id = m.manufacturers_id");
if (vam_db_num_rows($manufacturer_query, true)) {
    $manufacturer = vam_db_fetch_array($manufacturer_query, true);
    $image = '';
    if (vam_not_null($manufacturer['manufacturers_image'])) {
        $image = DIR_WS_IMAGES . $manufacturer['manufacturers_image'];
    }
    $box->assign('IMAGE', $image);
    $box->assign('NAME', $manufacturer['manufacturers_name']);
    if ($manufacturer['manufacturers_url'] != '') {
        $box->assign('URL', '<a href="' . vam_href_link(FILENAME_REDIRECT, 'action=manufacturer&' . vam_manufacturer_link($manufacturer['manufacturers_id'], $manufacturer['manufacturers_name'])) . '" onclick="window.open(this.href); return false;">' . sprintf(BOX_MANUFACTURER_INFO_HOMEPAGE, $manufacturer['manufacturers_name']) . '</a>');
    }
    $box->assign('LINK_MORE', '<a href="' . vam_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturer['manufacturers_id']) . '">' . BOX_MANUFACTURER_INFO_OTHER_PRODUCTS . '</a>');
}
$box->assign('language', $_SESSION['language']);
// set cache ID
if (!CacheCheck()) {
    $box->caching = 0;
    $box_manufacturers_info = $box->fetch(CURRENT_TEMPLATE . '/boxes/box_manufacturers_info.html');
} else {
    $box->caching = 1;
    $box->cache_lifetime = CACHE_LIFETIME;
    $box->cache_modified_check = CACHE_CHECK;
    $cache_id = $_SESSION['language'] . $product->data['products_id'];
    $box_manufacturers_info = $box->fetch(CURRENT_TEMPLATE . '/boxes/box_manufacturers_info.html', $cache_id);
}
                $breadcrumb->add($categories['categories_name'], vam_href_link(FILENAME_DEFAULT, vam_category_link($cPath_array[$i], $categories['categories_name'])));
            } else {
                if ($product->isProduct()) {
                    $breadcrumb->add($categories['categories_name'], vam_href_link(FILENAME_DEFAULT, vam_category_link($cPath_array[$i], $categories['categories_name'])));
                } else {
                    $breadcrumb->add($categories['categories_name']);
                }
            }
        } else {
            break;
        }
    }
} elseif (vam_not_null($_GET['manufacturers_id'])) {
    $manufacturers_query = vamDBquery("select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int) $_GET['manufacturers_id'] . "'");
    $manufacturers = vam_db_fetch_array($manufacturers_query, true);
    $breadcrumb->add($manufacturers['manufacturers_name'], vam_href_link(FILENAME_DEFAULT, vam_manufacturer_link((int) $_GET['manufacturers_id'], $manufacturers['manufacturers_name'])));
}
// add the products model/name to the breadcrumb trail
if ($product->isProduct()) {
    $breadcrumb->add($product->getBreadcrumbName());
}
// initialize the message stack for output messages
require DIR_WS_CLASSES . 'message_stack.php';
$messageStack = new messageStack();
// set which precautions should be checked
define('WARN_INSTALL_EXISTENCE', 'true');
define('WARN_CONFIG_WRITEABLE', 'false');
define('WARN_SESSION_DIRECTORY_NOT_WRITEABLE', 'true');
define('WARN_SESSION_AUTO_START', 'true');
define('WARN_DOWNLOAD_DIRECTORY_NOT_READABLE', 'true');
if (isset($_SESSION['customer_id'])) {