<?php define('EmpireCMSAdmin','1'); require("../../../class/connect.php"); require("../../../class/db_sql.php"); require("../../../class/functions.php"); require '../../../data/language/gb/pub/fun.php';//语言包 分页必须加上这个php $link=db_connect(); $empire=new mysqlquery(); $editor=2; //验证用户 $lur=is_login(); $logininid=$lur['userid']; $loginin=$lur['username']; $loginrnd=$lur['rnd']; $loginlevel=$lur['groupid']; $loginadminstyleid=$lur['adminstyleid']; //ehash $ecms_hashur=hReturnEcmsHashStrAll();
$data = $_POST; if(!$data){ $data = $_GET; } //查询状态 $status = intval($data['status']); if($status){ $where = " and status = '".$status."'"; $search .= "&status=".$status; } //查询用户名、用户IP、登录ID $type = intval($data['type']); $tag = $data['tag']; if($type=='1'){ $where_type .= " and username = '".$tag."'";//用户名 $search .= '&type='.$type.'&tag='.$tag; }else if($type=='2'){ $where_type .= " and userid = '".$tag."'";//用户UID $search .= '&type='.$type.'&tag='.$tag; }else if($type=='3'){ $where_type .= " and loginip = '".$tag."'";//登录iP $search .= '&type='.$type.'&tag='.$tag; }else if($type=='4'){ $where_type .= " and username like '%".$tag."%'";//用户名模糊查询 $search .= '&type='.$type.'&tag='.$tag; } //时间查询 $start_time = $data['start_time']; $end_time = $data['end_time']; if($start_time){ $search .= '&start_time='.$start_time.'&end_time='.$end_time.''; } if($start_time && $end_time){ if($end_time < $start_time){ printerror2('请选择正确的时间区间!'); } }else{ $start_time=date("Y-m-d", strtotime("-360 day")); //$start_time=date('Y-m-d',(time()-((date('w')==0?7:date('w'))-1)*24*3600)); $end_time=date("Y-m-d", strtotime("+1 day")); } $days=ceil((strtotime($end_time)-strtotime($start_time))/60/60/24); if($days >= 366){ printerror2('查询时间不能大于一年!'); } $allstime = strtotime($start_time.' 00:00:00'); $alletime = strtotime($end_time.' 23:59:59'); $page=(int)$_GET['page']; $page=RepPIntvar($page); $start=0; $line=20;//每页显示条数 $page_line=20;//每页显示链接数 $offset=$page*$line;//总偏移量 $query="select * from {$dbtbpre}member_log where logintime between '$allstime' and '$alletime' ".$where." ".$where_type." ORDER BY id DESC limit $offset,$line"; $sql=$empire->query($query); $num=$empire->gettotal("select count(*) as total from {$dbtbpre}member_log where logintime between '$allstime' and '$alletime' ".$where." ".$where_type." ");//取得总条数 $returnpage=page2($num,$line,$page_line,$start,$page,$search);
?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title></title> <link href="../../adminstyle/<?=$loginadminstyleid?>/adminstyle.css" rel="stylesheet" type="text/css"> <script type="text/javascript" src="http://mixed.9hou.com/e/extend/skin/dist/lib/jquery/jquery.js"></script> <script type="text/javascript" src="/skin/default/js/My97DatePicker/WdatePicker.js"></script> <link href="http://mixed.9hou.com/e/extend/skin/select/searchableSelect.css" rel="stylesheet" type="text/css"> <script src="http://mixed.9hou.com/e/extend/skin/select/jquery.searchableSelect.js"></script> <script> $(function(){//搜索JS排序,searchableSelect.css、①jquery.js、②jquery.searchableSelect.js(JQ库必须放第一,不要改css和js的名字,切记!!!) $('#status').searchableSelect(); $('#type').searchableSelect(); }); </script> </head> <script> function CheckAll(form) { for (var i=0;i<form.elements.length;i++) { var e = form.elements[i]; if (e.name != 'chkall') e.checked = form.chkall.checked; } } </script> <body> <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1"> <tr> <td>位置:<a href="index.php<?=$ecms_hashur[whehref]?>">会员登陆详情</a></td> </tr> </table> <form name="addplayerform" method="get"> <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder"> <tr> <td bgcolor="#FFFFFF"> 起始时间: <input name="start_time" id="start_time" type="text" class="Wdate" size="20" onClick="WdatePicker({skin:'default',dateFmt:'yyyy-MM-dd'})" value="<?=$start_time?>" onChange="return verifyDate(this.value);" onBlur="return verifyDate(this.value);" /> </td> <td bgcolor="#FFFFFF"> 终止时间: <input name="end_time" id="end_time" type="text" class="Wdate" size="20" onClick="WdatePicker({skin:'default',dateFmt:'yyyy-MM-dd'})" value="<?=$end_time?>" onchange="return verifyDate(this.value);" onBlur="return verifyDate(this.value);" /> </td> <td bgcolor="#FFFFFF"> 登录类型: <select name="status" id="status"> <option value="0" <?=$status == '0' ? 'selected="selected"' : '' ?> >0-请选择</option> <option value="1" <?=$status == '1' ? 'selected="selected"' : '' ?> >1-登录成功</option> <option value="2" <?=$status == '2' ? 'selected="selected"' : '' ?> >2-退出网站</option> <option value="3" <?=$status == '3' ? 'selected="selected"' : '' ?> >3-首次注册登陆成功</option> <option value="4" <?=$status == '4' ? 'selected="selected"' : '' ?> >4-账号密码错误</option> <option value="5" <?=$status == '5' ? 'selected="selected"' : '' ?> >5-账号不存在</option> <option value="6" <?=$status == '6' ? 'selected="selected"' : '' ?> >6-账号未通过审核</option> <option value="7" <?=$status == '7' ? 'selected="selected"' : '' ?> >7-账号或密码为空</option> </select> </td> <td bgcolor="#FFFFFF"> 搜索类型: <select name="type" id="type"> <option value="0" <?=$type == '0' ? 'selected="selected"' : '' ?> >0-请选择</option> <option value="1" <?=$type == '1' ? 'selected="selected"' : '' ?> >1-用户名</option> <option value="2" <?=$type == '2' ? 'selected="selected"' : '' ?> >2-用户UID</option> <option value="3" <?=$type == '3' ? 'selected="selected"' : '' ?> >3-登陆IP</option> <option value="4" <?=$type == '4' ? 'selected="selected"' : '' ?> >4-模糊用户名</option> </select> </td> <td bgcolor="#FFFFFF"><input name="tag" type="text" id="tag" value="<?php echo $tag?>"></td> <td bgcolor="#FFFFFF"><input type="submit" name="Submit" value="搜索"></td> </tr> </table> </form> <form name="form2" method="post" action="doaction.php" onsubmit="return confirm('确定要操作吗');"> <?=$ecms_hashur['form']?> <input type="hidden" name="enews" value="delinfo" /> <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder"> <tr class="header"> <td width="4%" align="center"><input type=checkbox name=chkall value=on onClick=CheckAll(this.form)></td> <td width="7%"><div align="center">ID</div></td> <td align="center"><div align="center">用户ID</div></td> <td align="center"><div align="center">用户名</div></td> <td align="center"><div align="center">登陆状态</div></td> <td align="center"><div align="center">登陆时间</div></td> <td align="center"><div align="center">登陆IP</div></td> </tr> <?php while($r=$empire->fetch($sql)) { switch($r[status]) { case 1: $status='登录成功'; break; case 2: $status='退出网站'; break; case 3: $status='首次注册登陆成功'; break; case 4: $status='账号密码错误'; break; case 5: $status='账号不存在'; break; case 6: $status='账号未通过审核'; break; case 7: $status='账号或密码为空'; break; default: $status='未知状态'; break; } ?> <tr bgcolor="#FFFFFF" onMouseOut="this.style.backgroundColor='#ffffff'" onMouseOver="this.style.backgroundColor='#C3EFFF'"> <td align="center"><input type=checkbox name=ids[] value="<?=$r['id']?>"></td> <td align="center"><?=$r[id]?></td> <td align="center"><a href="?type=2&tag=<?=$r['userid']?>"><?=$r['userid']?></a></td> <td align="center"><a href="?type=1&tag=<?=$r['username']?>"><?=$r['username']?></a></td> <td align="center"><a href="?status=<?=$r['status']?>"><?=$status?></a></td> <td align="center"><?=date("Y-m-d H:i:s",$r['logintime'])?></td> <td align="center"><a href="?type=3&tag=<?=$r['loginip']?>"><?=$r['loginip']?></a></td> </tr> <?php }?> <tr bgcolor="#FFFFFF"> <td height="25" colspan="7"> <input type="submit" name="Submit" value="删除选中" /> <?=$returnpage?> </td> </tr> </table> </form> </body> </html> <? db_close(); $empire=null; ?>
|