// reset var $box = new vamTemplate(); $box_content = ''; $flag = ''; $box->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/'); require_once DIR_FS_INC . 'vam_db_query.inc.php'; require_once DIR_FS_INC . 'vam_db_fetch_array.inc.php'; $random_select = "select a.articles_last_modified, a.articles_image, a.articles_id, ad.articles_name, ad.articles_description, a.articles_page_url, ad.articles_url from " . TABLE_ARTICLES . " a, " . TABLE_ARTICLES_DESCRIPTION . " ad\r\nwhere a.articles_status = '1' and a.articles_id = ad.articles_id and a.marked = '1' and ad.language_id = '" . (int) $_SESSION['languages_id'] . "'"; $random_select .= " order by 1 desc limit 6"; // + ad.articles_image if (!CacheCheck()) { $box->caching = 0; $review_query = vam_db_query($random_select); while ($ra = vam_db_fetch_array($review_query)) { $ra['articles_description'] = strip_tags($ra['articles_description']); $rowarticle[] = $ra; } //$box->assign('image_path',DIR_WS_THUMBNAIL_IMAGES); $box->assign('articles_path', 'article_info.php?articles_id='); $box->assign_by_ref('articles', $rowarticle); $box->assign('language', $_SESSION['language']); $box_admin = $box->fetch(CURRENT_TEMPLATE . '/boxes/box_good_to_know.html'); } else { $box->caching = 1; $box->cache_lifetime = CACHE_LIFETIME; $box->cache_modified_check = CACHE_CHECK; $cache_id = $_SESSION['language'] . '123' . $_SESSION['customers_status']['customers_status_name']; $box_specials = $box->fetch(CURRENT_TEMPLATE . '/boxes/box_good_to_know.html', $cache_id); } $vamTemplate->assign('box_GOOD_TO_KNOW', $box_admin);
<?php /* ----------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------*/ $box = new vamTemplate(); $box->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/'); if (isset($_GET['manufacturers_id'])) { $manufacturers_id = (int) $_GET['manufacturers_id']; $sql = "SELECT DISTINCT ps.specifications_id as id, ps.specification as name, '' as checked FROM " . TABLE_PRODUCTS . " p \n\t\tINNER JOIN " . TABLE_PRODUCTS_SPECIFICATIONS . " ps ON ps.products_id = p.products_id \n\t\tINNER JOIN " . TABLE_SPECIFICATION_DESCRIPTION . " sd ON sd.specifications_id = ps.specifications_id\n\t\t\tAND sd.specification_name = 'Серии'\t\n\t\tWHERE p.manufacturers_id = " . $manufacturers_id . " ORDER BY 2"; $query = vamDBquery($sql); $series = array(); if (vam_db_num_rows($query, true) > 0) { $i = -1; while ($row = vam_db_fetch_array($query, true)) { $i++; $series[$i] = $row; if (isset($_GET['s' . $row['id']][$i])) { $series[$i]['checked'] = 'checked = "checked"'; } } $box->assign_by_ref('series', $series); $box->assign('manufacturers_id', $manufacturers_id); $box->assign('language', $_SESSION['language']); $box_infobox = $box->fetch(CURRENT_TEMPLATE . '/boxes/box_series_filter.html'); $vamTemplate->assign('box_SERIES_FILTERS', $box_infobox); } }