本文整理汇总了PHP中vamTemplate::is_cached方法的典型用法代码示例。如果您正苦于以下问题:PHP vamTemplate::is_cached方法的具体用法?PHP vamTemplate::is_cached怎么用?PHP vamTemplate::is_cached使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vamTemplate
的用法示例。
在下文中一共展示了vamTemplate::is_cached方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Slider
require_once DIR_WS_INCLUDES . 'external/slider/Slider.class.inc.php';
$s = new Slider();
$simages = $s->grepIMGfromHTML($s1['slider_config']);
if ($_GET['dbg'] == 1) {
print_r($simages);
}
// set cache ID
if (!CacheCheck()) {
$cache = false;
$box->caching = 0;
} else {
$cache = true;
$box->caching = 1;
$box->cache_lifetime = CACHE_LIFETIME;
$box->cache_modified_check = CACHE_CHECK;
$cache_id = $_SESSION['language'] . $_SESSION['customers_status']['customers_status_id'] . $current_category_id;
}
if (!$box->is_cached(CURRENT_TEMPLATE . '/boxes/box_slider_category.html', $cache_id) || !$cache) {
$box->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/');
}
if (count($simages[0]) > 0) {
$box->assign('SLIDERS', $simages[0]);
$box->assign('DELAY', $s1['slider_delay']);
}
// set cache ID
if (!$cache) {
$box_mainslider = $box->fetch(CURRENT_TEMPLATE . '/boxes/box_slider_category.html');
} else {
$box_mainslider = $box->fetch(CURRENT_TEMPLATE . '/boxes/box_slider_category.html', $cache_id);
}
$vamTemplate->assign('box_SLIDER_CATEGORY', $box_mainslider);
示例2: vamTemplate
---------------------------------------------------------------------------------------*/
$box = new vamTemplate();
$content_string = '';
$box->assign('language', $_SESSION['language']);
// set cache ID
if (!CacheCheck()) {
$cache = false;
$box->caching = 0;
} else {
$cache = true;
$box->caching = 1;
$box->cache_lifetime = CACHE_LIFETIME;
$box->cache_modified_check = CACHE_CHECK;
$cache_id = $_SESSION['language'] . $_SESSION['customers_status']['customers_status_id'];
}
if (!$box->is_cached(CURRENT_TEMPLATE . '/boxes/box_information.html', $cache_id) || !$cache) {
$box->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/');
if (GROUP_CHECK == 'true') {
$group_check = "and group_ids LIKE '%c_" . $_SESSION['customers_status']['customers_status_id'] . "_group%'";
}
$content_query = "SELECT\r\n\t \t\t\t\t\tcontent_id,\r\n\t \t\t\t\t\tcategories_id,\r\n\t \t\t\t\t\tparent_id,\r\n\t \t\t\t\t\tcontent_title,\r\n\t \t\t\t\t\tcontent_url,\r\n\t \t\t\t\t\tcontent_group\r\n\t \t\t\t\t\tFROM " . TABLE_CONTENT_MANAGER . "\r\n\t \t\t\t\t\tWHERE languages_id='" . (int) $_SESSION['languages_id'] . "'\r\n\t \t\t\t\t\tand file_flag=0 " . $group_check . " and content_status=1 order by sort_order";
$content_query = vamDBquery($content_query);
while ($content_data = vam_db_fetch_array($content_query, true)) {
$SEF_parameter = '';
if (SEARCH_ENGINE_FRIENDLY_URLS == 'true') {
$SEF_parameter = '&product=' . vam_cleanName($content_data['content_title']);
}
if ($content_data['content_url'] != '') {
$link = '<li class="menu"><a class="menu" href="' . $content_data['content_url'] . '">';
} else {
$link = '<li class="menu"><a class="menu" href="' . vam_href_link(FILENAME_CONTENT, 'coID=' . $content_data['content_group'] . $SEF_parameter) . '">';
示例3: array
require_once DIR_FS_INC . 'vam_get_vpe_name.inc.php';
$breadcrumb->add(NAVBAR_TITLE_PRODUCTS_NEW, vam_href_link(FILENAME_PRODUCTS_NEW));
require DIR_WS_INCLUDES . 'header.php';
$rebuild = false;
// set cache ID
if (!CacheCheck()) {
$cache = false;
$vamTemplate->caching = 0;
} else {
$cache = true;
$vamTemplate->caching = 1;
$vamTemplate->cache_lifetime = CACHE_LIFETIME;
$vamTemplate->cache_modified_check = CACHE_CHECK;
$cache_id = $_SESSION['language'] . $_SESSION['customers_status']['customers_status_id'] . $_SESSION['currency'] . $_GET['page'];
}
if (!$vamTemplate->is_cached(CURRENT_TEMPLATE . '/module/new_products_overview.html', $cache_id) || !$cache) {
$vamTemplate->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/');
$rebuild = true;
$products_new_array = array();
$fsk_lock = '';
if ($_SESSION['customers_status']['customers_fsk18_display'] == '0') {
$fsk_lock = ' and p.products_fsk18!=1';
}
if (GROUP_CHECK == 'true') {
$group_check = " and p.group_permission_" . $_SESSION['customers_status']['customers_status_id'] . "=1 ";
}
/*
if (MAX_DISPLAY_NEW_PRODUCTS_DAYS != '0') {
$date_new_products = date("Y.m.d", mktime(1, 1, 1, date(m), date(d) - MAX_DISPLAY_NEW_PRODUCTS_DAYS, date(Y)));
$days = " and p.products_date_added > '" . $date_new_products . "' ";
}
示例4: SUBSTR
$box_content = '';
$box->assign('language', $_SESSION['language']);
// set cache ID
if (!CacheCheck()) {
$cache = false;
$box->caching = 0;
} else {
$cache = true;
$box->caching = 1;
$box->cache_lifetime = CACHE_LIFETIME;
$box->cache_modified_check = CACHE_CHECK;
$cache_id = $_SESSION['language'] . (int) $_GET['manufacturers_id'];
}
$manufacturers_query = "select distinct m.manufacturers_id, m.manufacturers_name, SUBSTR(m.manufacturers_name, 1, 1) as letter \n\t\tfrom " . TABLE_MANUFACTURERS . " as m, " . TABLE_PRODUCTS . " as p \n\t\twhere m.manufacturers_id=p.manufacturers_id order by m.manufacturers_name";
$manufacturers_query = vamDBquery($manufacturers_query);
if (!$box->is_cached(CURRENT_TEMPLATE . '/boxes/box_manufacturers.html', $cache_id) || !$cache) {
$box->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/');
// include needed funtions
require_once DIR_FS_INC . 'vam_hide_session_id.inc.php';
require_once DIR_FS_INC . 'vam_draw_form.inc.php';
require_once DIR_FS_INC . 'vam_draw_pull_down_menu.inc.php';
if (vam_db_num_rows($manufacturers_query, true) <= MAX_DISPLAY_MANUFACTURERS_IN_A_LIST) {
// Display a list
$part = (int) (vam_db_num_rows($manufacturers_query, true) / 3) + 1;
$i = 0;
//$letter = '';
$manufacturers_list = '<table class="brands"><tr><td valign="top" width="200">';
while ($manufacturers = vam_db_fetch_array($manufacturers_query, true)) {
$i++;
$manufacturers_name = utf8_strlen($manufacturers['manufacturers_name']) > MAX_DISPLAY_MANUFACTURER_NAME_LEN ? utf8_substr($manufacturers['manufacturers_name'], 0, MAX_DISPLAY_MANUFACTURER_NAME_LEN) . '..' : $manufacturers['manufacturers_name'];
if (isset($_GET['manufacturers_id']) && $_GET['manufacturers_id'] == $manufacturers['manufacturers_id']) {
示例5: vamDBquery
$box->assign('language', $_SESSION['language']);
// set cache ID
if (!CacheCheck()) {
$cache = false;
$box->caching = 0;
} else {
$cache = true;
$box->caching = 1;
$box->cache_lifetime = CACHE_LIFETIME;
$box->cache_modified_check = CACHE_CHECK;
$cache_id = $_SESSION['language'] . $_SESSION['customers_status']['customers_status_id'];
}
$authors_query = "select authors_id, authors_name from " . TABLE_AUTHORS . " order by authors_name";
$authors_query = vamDBquery($authors_query);
$number_of_author_rows = vam_db_num_rows($authors_query, true);
if (!$box->is_cached(CURRENT_TEMPLATE . '/boxes/box_authors.html', $cache_id) || !$cache) {
$box->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/');
if (vam_db_num_rows($authors_query, true) > 0) {
if ($number_of_author_rows <= MAX_DISPLAY_AUTHORS_IN_A_LIST) {
// Display a list
$authors_list = '';
while ($authors = vam_db_fetch_array($authors_query, true)) {
$SEF_parameter_author = '';
if (SEARCH_ENGINE_FRIENDLY_URLS == 'true') {
$SEF_parameter_author = '&author=' . vam_cleanName($authors['authors_name']);
}
$authors_name = utf8_strlen($authors['authors_name']) > MAX_DISPLAY_AUTHOR_NAME_LEN ? utf8_substr($authors['authors_name'], 0, MAX_DISPLAY_AUTHOR_NAME_LEN) . '..' : $authors['authors_name'];
if (isset($_GET['authors_id']) && $_GET['authors_id'] == $authors['authors_id']) {
$authors_name = '<b>' . $authors_name . '</b>';
}
$authors_list .= '<a href="' . vam_href_link(FILENAME_ARTICLES, 'authors_id=' . $authors['authors_id'] . $SEF_parameter_author) . '">' . $authors_name . '</a><br>';
示例6: vamTemplate
---------------------------------------------------------------------------------------*/
$box = new vamTemplate();
$content_string = '';
$box->assign('language', $_SESSION['language']);
// set cache ID
if (!CacheCheck()) {
$cache = false;
$box->caching = 0;
} else {
$cache = true;
$box->caching = 1;
$box->cache_lifetime = CACHE_LIFETIME;
$box->cache_modified_check = CACHE_CHECK;
$cache_id = $_SESSION['language'] . $_SESSION['customers_status']['customers_status_id'];
}
if (!$box->is_cached(CURRENT_TEMPLATE . '/boxes/box_content.html', $cache_id) || !$cache) {
$box->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/');
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_url,\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=1 " . $group_check . " and content_status=1 order by sort_order";
$content_query = vamDBquery($content_query);
while ($content_data = vam_db_fetch_array($content_query, true)) {
$SEF_parameter = '';
if (SEARCH_ENGINE_FRIENDLY_URLS == 'true') {
$SEF_parameter = '&content=' . vam_cleanName($content_data['content_title']);
}
if ($content_data['content_url'] != '') {
$link = '<li><a href="' . $content_data['content_url'] . '" target="_blank">';
} else {
$link = '<li><a href="' . vam_href_link(FILENAME_CONTENT, 'coID=' . $content_data['content_group'] . $SEF_parameter) . '">';
示例7:
$simages = $s->grepIMGfromHTML($s1['slider_config']);
if ($_GET['dbg'] == 1) {
echo $q;
print_r($simages);
print_r($s1);
}
// set cache ID
if (!CacheCheck()) {
$cache = false;
$box->caching = 0;
} else {
$cache = true;
$box->caching = 1;
$box->cache_lifetime = CACHE_LIFETIME;
$box->cache_modified_check = CACHE_CHECK;
$cache_id = $_SESSION['language'] . $_SESSION['customers_status']['customers_status_id'] . $current_category_id;
}
if (!$box->is_cached(CURRENT_TEMPLATE . '/boxes/box_mainslider.html', $cache_id) || !$cache) {
$box->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/');
}
if (count($simages[0]) > 0) {
$box->assign('SLIDERS', $simages[0]);
$box->assign('DELAY', $s1['slider_delay']);
}
// set cache ID
if (!$cache) {
$box_mainslider = $box->fetch(CURRENT_TEMPLATE . '/boxes/box_mainslider.html');
} else {
$box_mainslider = $box->fetch(CURRENT_TEMPLATE . '/boxes/box_mainslider.html', $cache_id);
}
$vamTemplate->assign('box_MAINSLIDER', $box_mainslider);
示例8: strlen
if ($d == 0) {
$d = strlen($cPath);
}
$current_top = substr($cPath, 0, $d);
// set cache ID
if (!CacheCheck()) {
$cache = false;
$box->caching = 0;
} else {
$cache = true;
$box->caching = 1;
$box->cache_lifetime = CACHE_LIFETIME;
$box->cache_modified_check = CACHE_CHECK;
$cache_id = $_SESSION['language'] . $_SESSION['customers_status']['customers_status_id'] . $current_top;
}
if (!$box->is_cached(CURRENT_TEMPLATE . '/boxes/box_top_categories.html', $cache_id) || !$cache) {
// include needed functions
require_once DIR_FS_CATALOG . 'templates/' . CURRENT_TEMPLATE . '/source/inc/vam_show_category.inc.php';
require_once DIR_FS_INC . 'vam_has_category_subcategories.inc.php';
if ($cPath) {
/* категории верхнего уровня */
$categories_query = "SELECT c.categories_id,\n cd.categories_name\n FROM " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd\n WHERE c.categories_status = '1'\n\t\t\t\t\t\tand c.parent_id = '0'\n\t\t\t\t\t\tand c.categories_id = cd.categories_id\n\t\t\t\t\t\tand cd.language_id='" . (int) $_SESSION['languages_id'] . "'\n\t\t\t\t\t\tORDER BY sort_order, cd.categories_name";
$categories_query = vamDBquery($categories_query);
while ($categories = vam_db_fetch_array($categories_query, true)) {
$cats[$categories['categories_id']] = array('id' => $categories['categories_id'], 'name' => $categories['categories_name'], 'image' => $categories['categories_image'], 'parent' => $categories['parent_id'], 'level' => 0, 'path' => $categories['categories_id'], 'next_id' => false);
}
$categories_string = vam_show_top_category($cats, $current_top);
// вывод первого уровня категорий
$box->assign('BOX_CONTENT', $categories_string);
}
}