usercheck php,check_user.php 清疚 2023-01-15 10:24 29阅读 0赞 include\_once 'conn.php'; $user=$\_GET\['user'\]; $name=$\_GET\['name'\]; $agree=$\_GET\['agree'\]; ?> 用户注册信息列表 ## 已有注册信息列表 ## $sql="select \* from yonghuzhuce where 1=1"; $query=mysql\_query($sql); $rowscount=mysql\_num\_rows($query); ?> 共<?php echo $rowscount;?>条记录 批量停用 账号: 姓名: 是否审核: 所有 是 否 $sql="select \* from yonghuzhuce where 1=1"; if ($user!="")\{ $sql=$sql." and zhanghao like '%$user%'"; \} if ($name!="")\{ $sql=$sql." and xingming like '%$name%'"; \} if ($agree!="")\{ $sql=$sql." and issh like '$agree'"; \} $sql=$sql." order by id desc"; $query=mysql\_query($sql); $rowscount=mysql\_num\_rows($query); if($rowscount==0) \{ ?> 抱歉,您的查询结果为空 \} else \{ $pagelarge=10;//每页行数; $pagecurrent=$\_GET\["pagecurrent"\]; if($rowscount%$pagelarge==0) \{ $pagecount=$rowscount/$pagelarge; \} else \{ $pagecount=intval($rowscount/$pagelarge)+1; \} if($pagecurrent=="" || $pagecurrent<=0) \{ $pagecurrent=1; \} if($pagecurrent>$pagecount) \{ $pagecurrent=$pagecount; \} $sum=$pagecurrent\*$pagelarge; if($pagecurrent==$pagecount) \{ if($rowscount%$pagelarge==0) \{ $sum=$pagecurrent\*$pagelarge; \} else \{ $sum=$pagecurrent\*$pagelarge-$pagelarge+$rowscount%$pagelarge; \} \} ?> <table> <tbody> <tr> <th></th> <th>序号</th> <th>姓名</th> <th>账号</th> <th>头像</th> <th>性别</th> <th>家庭地址</th> <th>email</th> <th>是否审核</th> <th>是否停用</th> <th>添加时间</th> <th>操作</th> </tr> </tbody> </table> for($i=$pagecurrent\*$pagelarge-$pagelarge;$i \{ ?> <?php echo $i+1;?><?php echo mysql\_result($query,$i,xingming);?><?php echo mysql\_result($query,$i,zhanghao);?> ![<?php%20echo%20mysql\_result(%24query,%24i,zhaopian);?>][php_20echo_20mysql_result_24query_24i_zhaopian]<?php echo mysql\_result($query,$i,xingbie);?><?php echo mysql\_result($query,$i,diqu);?><?php echo mysql\_result($query,$i,Email);?><?php echo mysql\_result($query,$i,issh);?><?php echo mysql\_result($query,$i,undo);?><?php echo date('Y/m/d',strtotime(mysql\_result($query,$i,addtime)));?> οnclick="return confirm('确定审核?')"<?php \}?>> 审核 οnclick="return confirm('真的要停用?')"<?php \}?>> <?php if(mysql\_result($query,$i,undo) == '否')\{?>停用<?php \}else\{?>启用<?php \}?> 修改 \} \} ?> if($rowscount > 10) \{ ?> 首页 上一页 下一页 尾页 第<?php echo $pagecurrent;?>页 共<?php echo $pagecount;?>页 共<?php echo $rowscount;?>条 //全选操作 function checkall() \{ var checkall = document.getElementById("checkall"); var checkedall = checkall.checked; var sel\_btn = document.getElementsByClassName("sel\_btn"); if(checkedall) \{ //全选 for(var i = 0; i < sel\_btn.length; i++) \{ //设置复选框的选中状态 sel\_btn\[i\].checked = true; \} \} else \{ //取消全选 for(var i = 0; i < sel\_btn.length; i++) \{ sel\_btn\[i\].checked = false; \} \} \} function undoSelected()\{ //获取选中数据的id var select\_boxes = $(".sel\_btn"); var ids = new Array(); for(var i = 0; i < select\_boxes.length; i++)\{ if(select\_boxes\[i\].checked)\{ ids.push($(select\_boxes\[i\]).attr('data-id')); \} \} //将选中的id发送到php处理文件中实现删除 $.ajax(\{ url: "undo\_all.php", type: "post", data: \{ table: "yonghuzhuce", ids: ids \}, success: function(res)\{ if(res.code == 0)\{//没有选择任何数据 swal(\{ title: "警告!", text: "请选择停用的用户!", icon: "warning", \}); return false; \} if(res.code == 1)\{//后台返回code状态1表示执行成功 if(res.n ==0)\{ swal(\{ title: "失败!", text: "用户本身已停用", icon: "error", showConfirmButton: true \}).then ((isConfirm) => \{//执行成功后的回调 history.go(0); \}) \}else\{ swal(\{ title: "成功!", text: "成功停用"+res.n+"个用户,"+"失败停用"+res.m+"个用户", icon: "success", showConfirmButton: true \}).then ((isConfirm) => \{//执行成功后的回调 history.go(0); \}) \} \} \} \}) \} 一键复制 编辑 Web IDE 原始数据 按行查看 历史 [php_20echo_20mysql_result_24query_24i_zhaopian]:
相关 usercheck php,check_user.php include\_once 'conn.php'; $user=$\_GET\['user'\]; $name=$\_GET\['name'\]; $agree=$\_G 清疚/ 2023年01月15日 10:24/ 0 赞/ 30 阅读
还没有评论,来说两句吧...