{include="style"} {include="edit"}

{php $ctype = []; $i = 0; $allconfig = M('sysconfig')->findAll(); $newconfig = []; foreach($allconfig as $vs){ $newconfig[$vs['typeid']][] = $vs; } function bubbleSort($arr) { $n = count($arr); for ($i = 0; $i < $n - 1; $i++) { for ($j = 0; $j < $n - $i - 1; $j++) { if ($arr[$j]['orders'] < $arr[$j + 1]['orders']) { // 交换元素 $temp = $arr[$j]; $arr[$j] = $arr[$j + 1]; $arr[$j + 1] = $temp; } } } return $arr; } foreach($newconfig as $kk=>$vv){ //冒泡排序 $newconfig[$kk] = bubbleSort($vv); } /} {loop table="ctype" orderby="id asc" isopen="1" as="v"} {if(checkAction('Sys/ctype/type/'.$v['action']))}
- {fun JZLANG($v['title'])}
{php $ctype[]=$v; $i++; /} {/if} {/loop} {if($admin['gid']==1)}
- {fun JZLANG('自定义配置')}
{/if}

{foreach $ctype as $s}
{foreach $newconfig[$s['id']] as $v} {if($v['type']==1)}
{fun JZLANG($v['title'])}
{if($v['tip'])} {/if} {if($admin['gid']==1)}
{!--$webconf['{$v['field']}']--}
{if($v['sys']!=1)}
{/if} {/if}
{else if($v['type']==2)}
{$v['title']}
{if($v['tip'])} {/if} {if($admin['gid']==1)}
{!--$webconf['{$v['field']}']--}
{if($v['sys']!=1)}
{/if} {/if}
{else if($v['type']==3)}
{$v['title']} {if($v['tip'])} {/if} {if($admin['gid']==1)} {!--$webconf['{$v['field']}']--} {/if}
{$v['data']}
{if($v['sys']!=1 && $admin['gid']==1)}
{/if}
{else if($v['type']==4)} {php $edit = require(APP_PATH.APP_HOME.'/'.HOME_VIEW.'/'.Tpl_template.'/common/uediter.php'); echo $edit; /} {if($admin['gid']==1)}
{!--$webconf['{$v['field']}']--}
{if($v['sys']!=1)}
{/if} {/if} {else if($v['type']==5)}
{$v['title']}
{if($v['tip'])} {/if} {if($admin['gid']==1)}
{!--$webconf['{$v['field']}']--}
{if($v['sys']!=1)}
{/if} {/if}
{else if($v['type']==6)}
{$v['title']}
{if($v['tip'])} {/if} {if($admin['gid']==1)}
{!--$webconf['{$v['field']}']--}
{if($v['sys']!=1)}
{/if} {/if}
{else if($v['type']==7)}
{$v['title']}
{if($v['tip'])} {/if} {if($admin['gid']==1)}
{!--$webconf['{$v['field']}']--}
{if($v['sys']!=1)}
{/if} {/if}
{else if($v['type']==8)}
{$v['title']} {$v['tip']} {if($admin['gid']==1)} {!--$webconf['{$v['field']}']--} {/if}
{$v['data']}
{if($v['sys']!=1 && $admin['gid']==1)}
{/if}
{/if} {/foreach} {if($s['sys']!=1 && $admin['gid']==1)}
{/if}
{/foreach}
{if($admin['gid']==1)}
{fun JZLANG('自定义配置')}
{fun JZLANG('新增配置')}
{fun JZLANG('配置栏目')}
{fun JZLANG('自定义配置栏')}
{/if}