热卖推荐
品牌:
浏览历史
温馨提示

确定取消
温馨提示

关闭
您尚未登录

用户登陆

立即注册
忘记密码?
($cat_id) { static $res = NULL; if ($res === NULL) { $data = read_static_cache('cat_parent_grade'); if ($data === false) { $sql = "SELECT parent_id, cat_id, grade ". " FROM " . $GLOBALS['yp']->table('category'); $res = $GLOBALS['db']->getAll($sql); write_static_cache('cat_parent_grade', $res); } else { $res = $data; } } if (!$res) { return 0; } $parent_arr = array(); $grade_arr = array(); foreach ($res as $val) { $parent_arr[$val['cat_id']] = $val['parent_id']; $grade_arr[$val['cat_id']] = $val['grade']; } while ($parent_arr[$cat_id] >0 && $grade_arr[$cat_id] == 0) { $cat_id = $parent_arr[$cat_id]; } return $grade_arr[$cat_id]; } /* 代码增加_start By demo.coolhong.com 今天优品 多商户系统 QQ 120-029-121 */ //make_html(); /* 代码增加_end By demo.coolhong.com 今天优品 多商户系统 QQ 120-029-121 */ ?>