set_filenames(array( 'body' => 'index_body.tpl' )); if(!$userdata['session_logged_in']) { $template->assign_block_vars('registerbanner', array()); } //global variables for the index-page $template->assign_vars(array( 'L_NEW_PRODUCTS' => $lang['New_products'], 'L_HOT_PRODUCTS' => $lang['Hot_products'], 'USERLANG' => isset($userdata['user_lang']) ? strtolower($userdata['user_lang']) : (isset($_COOKIE['intrafin_lang']) ? strtolower($_COOKIE['intrafin_lang']) : 'ENG'), )); //display the new products -- hot products has a separate table for extra info (and ALL hot products must always be present in Omnivers!) // $products = $productmanager->GetProducts(isset($navat['category_omnivers']) ? $navcat['category_omnivers'] : '', 'RAND', 0, 5, '', 'product_firststock >= "' . date("Y-m-d", time() - 14*24*60*60) . '"'); $products = $productmanager->GetProducts('', '', '', '', '', '', '', '', 'RAND', 0, 5, 'product_firststock >= "' . date("Y-m-d", time() - 14*24*60*60) . '"'); for ($i = 0; $i < sizeof($products); $i++) { //we start a new row every 2 products: if ($i % 5 == 0) $template->assign_block_vars('new_row', array()); $template->assign_block_vars('new_row.new_col', array( 'WIDTH' => '20%', 'ARTIKELNUMMER' => substr($products[$i]['product_artikelnummer'], 3), 'NAME' => htmlspecialchars($products[$i]['product_naam'], ENT_QUOTES), 'ALT_PRODUCT' => htmlspecialchars($products[$i]['product_naam'], ENT_QUOTES), 'TITLE_PRODUCT' => htmlspecialchars($products[$i]['product_naam'], ENT_QUOTES), 'U_PRODUCT' => $src_root_path . 'product/' . $products[$i]['product_artikelcode'], )); $productmanager->ShowProductImage($products[$i], "100", "new_row.new_col"); $productmanager->ShowLanguageList($products[$i], "new_row.new_col"); $shoppinglevel = $productmanager->AllowShopping(); if ($shoppinglevel != 'none') { $productmanager->GenerateProductShoppingTools($products[$i], "new_row.new_col"); $productmanager->ShowProductStock($products[$i], "new_row.new_col"); } } //display the hot products -- hot products has a separate table for extra info (and ALL hot products must always be present in Omnivers!) $products = $productmanager->DisplayHotProducts(); for ($i = 0; $i < sizeof($products); $i++) { //we start a new row every 2 products: if ($i % 5 == 0) $template->assign_block_vars('hot_row', array()); $template->assign_block_vars('hot_row.hot_col', array( 'WIDTH' => '20%', 'ARTIKELNUMMER' => substr($products[$i]['product_artikelnummer'], 3), 'NAME' => $products[$i]['hot_name'] != '' ? $products[$i]['hot_name'] : htmlspecialchars($products[$i]['product_naam'], ENT_QUOTES), 'ALT_PRODUCT' => $products[$i]['hot_name'] != '' ? $products[$i]['hot_name'] : htmlspecialchars($products[$i]['product_naam'], ENT_QUOTES), 'TITLE_PRODUCT' => $products[$i]['hot_name'] != '' ? $products[$i]['hot_name'] : htmlspecialchars($products[$i]['product_naam'], ENT_QUOTES), 'U_PRODUCT' => $src_root_path . 'product/' . $products[$i]['product_artikelcode'], )); if($products[$i]['hot_description'] != '') { $template->assign_block_vars('hot_row.hot_col.description', array( 'DESC' => $products[$i]['hot_description'] )); } $productmanager->ShowProductImage($products[$i], "100", "hot_row.hot_col"); $productmanager->ShowLanguageList($products[$i], "hot_row.hot_col"); $shoppinglevel = $productmanager->AllowShopping(); if ($shoppinglevel != 'none') { $productmanager->GenerateProductShoppingTools($products[$i], "hot_row.hot_col"); $productmanager->ShowProductStock($products[$i], "hot_row.hot_col"); } } $template->pparse('body'); include($site_root_path . 'includes/footer.php'); ?>