{include file='ebcms@common/header' /} {php} $default_attr = \ebcms\Config::get('content.attr'); $where = []; if(input('channel_id')){ $where['channel_id'] = input('channel_id'); } if(input('q')){ $where['title|keywords|description'] = ['like','%'.trim(input('q')).'%']; } if(input('?status') && input('status')!=''){ $where['status'] = input('status'); } $order = []; if(input('order') && input('sort')){ $order[input('order')] = (input('sort')=='desc')?'desc':'asc'; }else{ $order['sort'] = 'desc'; } $order['id'] = 'desc'; $data = \app\content\model\Content::where($where) -> order($order) -> paginate(10, false, [ 'query' => input('get.') ]); {/php}
{if condition="input('channel_id')"} {php} $channel = \app\content\model\Channel::get(input('channel_id')); {/php}

### {$channel.title}

{else/}

### 内容管理

{/if}

{php} $channels = \app\content\model\Channel::where(['type' => ['eq','channel']]) -> order('sort desc,id asc') -> select(); {/php}

ID | 排序 | 操作 | 样式 | 状态 | 标题 | 推荐属性 | 聚合标签 | 浏览量 | 创建时间
--- | --- | --- | --- | --- | --- | --- | --- | --- | ---
{foreach name='data' item='vo'}
{$vo.id} |  | {if condition="check_auth('delete')"} {/if} {if condition="check_auth('edit')"} {/if} | {if condition="check_auth('style')"} {/if} | {if condition="check_auth('status')"} {switch name='vo.status'} {case value='99'} {/case} {case value='1'} {/case} {default/} {/switch} {/if} | {neq name='vo.thumb' value=''} {/neq} {$vo.title} | {foreach name='vo.attr' item='v'} {$v.attr} {/foreach} | {foreach name='vo.tag' item='v'} {$v.tag} {/foreach} | {$vo.click} | {$vo.create_time|date='Y-m-d H:i:s',###}
{/foreach}
选择 |

{$data -> render()}
{include file='ebcms@common/footer' /}