1 Star 0 Fork 7

growlang/HongYuDSC

forked from 王东祥/HongYuDSC 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
catalog.php 1.09 KB
一键复制 编辑 原始数据 按行查看 历史
鸿宇科技 提交于 2018-03-02 02:43 . Initial commit
<?php
//zend by QQ:1527200768 鸿宇科技 禁止倒卖 一经发现停止任何服务
function calculate_goods_num($cat_list, $cat_id)
{
$goods_num = 0;
foreach ($cat_list as $cat) {
if (($cat['parent_id'] == $cat_id) && !empty($cat['goods_num'])) {
$goods_num += $cat['goods_num'];
}
}
return $goods_num;
}
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';
if (!$smarty->is_cached('catalog.dwt')) {
$cat_list = cat_list(0, 0, false);
foreach ($cat_list as $key => $val) {
if ($val['is_show'] == 0) {
unset($cat_list[$key]);
}
}
assign_template();
assign_dynamic('catalog');
$position = assign_ur_here(0, $_LANG['catalog']);
$smarty->assign('page_title', $position['title']);
$smarty->assign('ur_here', $position['ur_here']);
$smarty->assign('helps', get_shop_help());
$smarty->assign('cat_list', $cat_list);
$smarty->assign('brand_list', get_brands());
$smarty->assign('promotion_info', get_promotion_info());
}
$smarty->display('catalog.dwt');
?>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/growlang/HongYuDSC.git
[email protected]:growlang/HongYuDSC.git
growlang
HongYuDSC
HongYuDSC
master

搜索帮助