usercheck php,check_user.php

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;

}

}

?>

序号姓名账号头像性别家庭地址email是否审核是否停用添加时间操作

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 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

原始数据

按行查看

历史

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值