代码拉取完成,页面将自动刷新
同步操作将从 baobeihuaidan/ecshop大商创商城 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
<?php
//源码由旺旺:ecshop2012所有 未经允许禁止倒卖 一经发现停止任何服务
define('IN_ECS', true);
require dirname(__FILE__) . '/includes/init.php';
if ((DEBUG_MODE & 2) != 2) {
$smarty->caching = true;
}
require ROOT_PATH . '/includes/lib_area.php';
clear_cache_files();
if (!empty($_GET['id'])) {
$cat_id = intval($_GET['id']);
}
else if (!empty($_GET['category'])) {
$cat_id = intval($_GET['category']);
}
else {
ecs_header("Location: ./\n");
exit();
}
$page = (!empty($_REQUEST['page']) && (0 < intval($_REQUEST['page'])) ? intval($_REQUEST['page']) : 1);
get_request_filter();
$cache_id = sprintf('%X', crc32($cat_id . '-' . $page . '-' . $_CFG['lang']));
if (!$smarty->is_cached('article_cat.dwt', $cache_id)) {
assign_template('a', array($cat_id));
$position = assign_ur_here($cat_id);
$smarty->assign('helps', get_shop_help());
$smarty->assign('page_title', $position['title']);
$smarty->assign('ur_here', $position['ur_here']);
if (!defined('THEME_EXTENSION')) {
$categories_pro = get_category_tree_leve_one();
$smarty->assign('categories_pro', $categories_pro);
}
$smarty->assign('sys_categories', article_categories_tree(0, 2));
$smarty->assign('custom_categories', article_categories_tree(0, 1));
$cat_list = get_cat_list($cat_id);
$child_count = count($cat_list[0]['child_list']);
if ($child_count == 0) {
$cat_list = get_cat_list($cat_list[0]['parent_id']);
$child_count = count($cat_list[0]['child_list']);
}
$smarty->assign('cat_list', $cat_list);
$smarty->assign('child_count', $child_count);
$smarty->assign('best_goods', get_recommend_goods('best'));
$smarty->assign('new_goods', get_recommend_goods('new'));
$smarty->assign('hot_goods', get_recommend_goods('hot'));
$smarty->assign('promotion_goods', get_promote_goods());
$smarty->assign('promotion_info', get_promotion_info());
$meta = $db->getRow('SELECT keywords, cat_name ,cat_desc,cat_type FROM ' . $ecs->table('article_cat') . ' WHERE cat_id = \'' . $cat_id . '\'');
if (($meta === false) || empty($meta)) {
ecs_header("Location: ./\n");
exit();
}
$smarty->assign('cat_info', $meta);
$smarty->assign('keywords', htmlspecialchars($meta['keywords']));
$smarty->assign('description', htmlspecialchars($meta['cat_desc']));
$smarty->assign('cat_name', $meta['cat_name']);
$size = (isset($_CFG['article_page_size']) && (0 < intval($_CFG['article_page_size'])) ? intval($_CFG['article_page_size']) : 20);
$count = get_article_count($cat_id);
$pages = (0 < $count ? ceil($count / $size) : 1);
if ($pages < $page) {
$page = $pages;
}
$pager['search']['id'] = $cat_id;
$keywords = '';
$goon_keywords = '';
if (isset($_REQUEST['keywords'])) {
$keywords = addslashes(htmlspecialchars(urldecode(trim($_REQUEST['keywords']))));
$pager['search']['keywords'] = $keywords;
$search_url = substr(strrchr($_POST['cur_url'], '/'), 1);
$smarty->assign('search_value', stripslashes(stripslashes($keywords)));
$smarty->assign('search_url', $search_url);
$count = get_article_count($cat_id, $keywords);
$pages = (0 < $count ? ceil($count / $size) : 1);
if ($pages < $page) {
$page = $pages;
}
$goon_keywords = urlencode($_REQUEST['keywords']);
}
$smarty->assign('artciles_list', get_cat_articles($cat_id, $page, $size, $keywords));
$smarty->assign('cat_id', $cat_id);
assign_pager('article_cat', $cat_id, $count, $size, '', '', $page, $goon_keywords);
assign_dynamic('article_cat');
}
$smarty->assign('feed_url', $_CFG['rewrite'] == 1 ? 'feed-typearticle_cat' . $cat_id . '.xml' : 'feed.php?type=article_cat' . $cat_id);
$smarty->display('article_cat.dwt', $cache_id);
?>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。