{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['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::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} | {$vo.click} | {$vo.create_time|date='Y-m-d H:i:s',###}
{/foreach}
选择 |

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