e7b08e3d55e2af3f39050cb2dbffff3e.php 5.5 KB

123456789101112131415161718192021
  1. <?php /*a:3:{s:73:"D:\project\gyx\gaoyixia\application\operate\view\forum_comment\index.html";i:1699858976;s:56:"D:\project\gyx\gaoyixia\application\admin\view\main.html";i:1699858976;s:80:"D:\project\gyx\gaoyixia\application\operate\view\forum_comment\index_search.html";i:1699858976;}*/ ?>
  2. <div class="layui-card layui-bg-gray"><?php if(!(empty($title) || (($title instanceof \think\Collection || $title instanceof \think\Paginator ) && $title->isEmpty()))): ?><div class="layui-card-header layui-anim layui-anim-fadein notselect"><span class="layui-icon layui-icon-next font-s10 color-desc margin-right-5"></span><?php echo htmlentities((isset($title) && ($title !== '')?$title:'')); ?><div class="pull-right"><button data-action='<?php echo url("remove"); ?>' data-confirm="确定要删除吗?" data-csrf="<?php echo systoken('remove'); ?>" data-rule="id#{key}" class='layui-btn layui-btn-sm layui-btn-primary'>批量删除</button><a href="javascript:history.go(-1);" data-title="返 回" class='layui-btn layui-btn-sm layui-btn-primary'>返 回</a></div></div><?php endif; ?><div class="layui-card-body layui-anim layui-anim-upbit"><div class="think-box-shadow"><fieldset><legend>条件搜索</legend><form class="layui-form layui-form-pane form-search" action="<?php echo request()->url(); ?>" onsubmit="return false" method="get" autocomplete="off"><div class="layui-form-item layui-inline"><label class="layui-form-label">ID</label><div class="layui-input-inline"><input name="id" maxlength="60" value='<?php echo htmlentities((app('request')->get('id') ?: "")); ?>' placeholder="请输入ID" class="layui-input"></div></div><div class="layui-form-item layui-inline"><label class="layui-form-label">用户名</label><div class="layui-input-inline"><input name="name" value="<?php echo htmlentities((app('request')->get('name') ?: '')); ?>" placeholder="用户名" class="layui-input"></div></div><div class="layui-form-item layui-inline"><label class="layui-form-label">内容</label><div class="layui-input-inline"><input name="content" value="<?php echo htmlentities((app('request')->get('content') ?: '')); ?>" placeholder="请输入内容" class="layui-input"></div></div><div class="layui-form-item layui-inline"><button class="layui-btn layui-btn-primary"><i class="layui-icon">&#xe615;</i> 搜 索</button></div></form><script>form.render()</script></fieldset><table class="layui-table margin-top-20" lay-skin="line"><thead><tr><th class='list-table-check-td think-checkbox'><input data-auto-none data-check-target='.list-check-box' type='checkbox'></th><th class='text-left nowrap' >ID</th><th class='text-left nowrap' >用户</th><th class='text-left ' style="width: 60%">评论内容</th><th class='text-left nowrap' >时间</th><th class="text-left nowrap">操作</th></tr></thead><tbody><?php foreach($list as $key=>$vo): ?><tr><td class='list-table-check-td think-checkbox'><input class="list-check-box" value='<?php echo htmlentities($vo['id']); ?>' type='checkbox'></td><td class='text-left '><?php echo htmlentities((isset($vo['id']) && ($vo['id'] !== '')?$vo['id']:'')); ?></td><td class='text-left nowrap'><img data-tips-image style="width:50px;height:50px" src="<?php echo htmlentities((isset($vo['headimg']) && ($vo['headimg'] !== '')?$vo['headimg']:'')); ?>" class="margin-right-5 text-top"><div class="inline-block"> 用户ID:<?php echo htmlentities((isset($vo['user_id']) && ($vo['user_id'] !== '')?$vo['user_id']:'--')); ?><br> 用户昵称:<?php echo htmlentities((isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:'后台回复')); ?></div></td><td class='text-left '><?php echo htmlentities((isset($vo['content']) && ($vo['content'] !== '')?$vo['content']:'')); ?></td><td class='text-left nowrap'><?php echo htmlentities((isset($vo['create_at']) && ($vo['create_at'] !== '')?$vo['create_at']:'')); ?></td><td class='text-left' style="width: 20%"><?php if(isset($vo['is_top']) and $vo['is_top'] == 1): ?><a class="layui-btn layui-btn-xs" data-action="<?php echo url('stick'); ?>" data-value="id#<?php echo htmlentities($vo['id']); ?>;is_top#0">取消置顶</a><?php else: ?><a class="layui-btn layui-btn-xs layui-btn-warm" data-action="<?php echo url('stick'); ?>" data-value="id#<?php echo htmlentities($vo['id']); ?>;is_top#1">置 顶</a><?php endif; ?><a data-title="回 复" class="layui-btn layui-btn-xs" data-modal='<?php echo url("reply"); ?>?id=<?php echo htmlentities($vo['id']); ?>'>回 复</a><span class="layui-btn layui-btn-xs layui-btn-danger" onclick="btn_confirm('删除','del','<?php echo htmlentities($vo['id']); ?>');">删 除</span></td></tr><?php endforeach; ?></tbody></table><?php if(empty($list) || (($list instanceof \think\Collection || $list instanceof \think\Paginator ) && $list->isEmpty())): ?><span class="notdata">没有记录哦</span><?php else: ?><?php echo (isset($pagehtml) && ($pagehtml !== '')?$pagehtml:''); ?><?php endif; ?></div><script> function btn_confirm(msg,fun,id) {
  3. layer.confirm('请确定是否'+msg, {btn: ['确定', '取消'], title: "提示"}, function () {
  4. var url = "/operate/forum_comment/"+fun;
  5. layer.closeAll();
  6. $.ajax({
  7. type: "post",
  8. url: url,
  9. data: {id:id},
  10. dataType: "json",
  11. async: false,
  12. success: function (data) {
  13. layer.msg(data.info);
  14. setTimeout(function () {
  15. window.location.reload();
  16. },1000)
  17. }
  18. });
  19. });
  20. }
  21. </script></div></div>