本文整理汇总了PHP中vamTemplate::assign_by_ref方法的典型用法代码示例。如果您正苦于以下问题:PHP vamTemplate::assign_by_ref方法的具体用法?PHP vamTemplate::assign_by_ref怎么用?PHP vamTemplate::assign_by_ref使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vamTemplate
的用法示例。
在下文中一共展示了vamTemplate::assign_by_ref方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: vamTemplate
// 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);
示例2: vamTemplate
<?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);
}
}