{php $CATEGORY = cache_read('category-'.$mid.'.php');} {php $child = get_maincat(0, $mid, 1);}

#### 工业品 | {loop $child $i $c} {if in_array($c[catid], array(5,7,8,9,10,12))}
{set_style($c[catname], $c[style])} | {if $c[child]}{php $sub = get_maincat($c[catid], $mid, 1);} {loop $sub $j $s}{if $j < 5} {set_style($s[catname], $s[style])} {/if} {/loop} {/if}
{if $c[child]}{php $sub = get_maincat($c[catid], $CATEGORY, 2);} {loop $sub $k $s}{if $k < 12} {set_style($s[catname], $s[style])} {/if} {/loop} {/if} {/if} {/loop}

#### 消费品 | {loop $child $i $c} {if in_array($c[catid], array(20,6,11,13,15,17))}
{set_style($c[catname], $c[style])} | {if $c[child]}{php $sub = get_maincat($c[catid], $mid, 1);} {loop $sub $j $s}{if $j < 5} {set_style($s[catname], $s[style])} {/if} {/loop} {/if}
{if $c[child]}{php $sub = get_maincat($c[catid], $CATEGORY, 2);} {loop $sub $k $s}{if $k < 12} {set_style($s[catname], $s[style])} {/if} {/loop} {/if} {/if} {/loop}

#### 原材料 | {loop $child $i $c} {if in_array($c[catid], array(1,2,3,14,16,18))}
{set_style($c[catname], $c[style])} | {if $c[child]}{php $sub = get_maincat($c[catid], $mid, 1);} {loop $sub $j $s}{if $j < 5} {set_style($s[catname], $s[style])} {/if} {/loop} {/if}
{if $c[child]}{php $sub = get_maincat($c[catid], $CATEGORY, 2);} {loop $sub $k $s}{if $k < 12} {set_style($s[catname], $s[style])} {/if} {/loop} {/if} {/if} {/loop}

#### 商业服务 | {loop $child $i $c} {if in_array($c[catid], array(27,30,34,37,24,21))}
{set_style($c[catname], $c[style])} | {if $c[child]}{php $sub = get_maincat($c[catid], $mid, 1);} {loop $sub $j $s}{if $j < 5} {set_style($s[catname], $s[style])} {/if} {/loop} {/if}
{if $c[child]}{php $sub = get_maincat($c[catid], $CATEGORY, 2);} {loop $sub $k $s}{if $k < 12} {set_style($s[catname], $s[style])} {/if} {/loop} {/if} {/if} {/loop}