{include file='ebcms@common/header' /} {php} $where = []; if(input('q')){ $where['nickname|contact|content|reply'] = ['like','%'.trim(input('q')).'%']; } if(input('?status') && input('status')!=''){ $where['status'] = input('status'); } if(input('?reply') && input('reply')!=''){ $where['reply'] = [input('reply')?'neq':'eq','']; } if(input('?recommend') && input('recommend')!=''){ $where['recommend'] = [input('recommend')?'neq':'eq','']; } $data = \app\guestbook\model\Guestbook::where($where) -> order('id desc') -> paginate(10,false,['query'=>input('get.')]); {/php}

### 留言管理

id | 内容
--- | ---
{foreach name='data' item='vo'}
{$vo.id} | ##### {$vo.nickname} {$vo.content} 联系方式：{$vo.contact} 留言时间：{$vo.create_time | date='Y-m-d H:i:s',###} IP：{$vo.ip} {if condition="check_auth('status')"} {switch name="vo.status" } {case value="99"} {/case} {case value="1"} {/case} {default /} {/switch} {/if} {if condition="check_auth('edit')"} 编辑 {/if} {if condition="check_auth('recommend')"} {eq name='vo.recommend' value='1'} {else/} {/eq} {/if} {if condition="check_auth('delete')"} {/if} {if condition="check_auth('reply')"} 回复 {/if} {if condition="$vo['reply']"} {$vo.reply} 回复时间：{$vo.update_time | date='Y-m-d H:i:s',###} {/if}
{/foreach}
选择 |

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