📄 yxlist.php
字号:
<?
require("../include/data.php");
$selsql="select * from tbusers where uid_str='".$_GET['uid']."'";
$result=mysql_db_query($dbname,$selsql);
$rownum=mysql_num_rows($result);
if($rownum<=0)
{
?>
<script>
top.location.href="../index.php"
</script>
<?
}
$row=mysql_fetch_array($result);
if($_GET['part_id']=="")
{
$part_id=$row['part_id'];
}
else
{
$part_id=$_GET['part_id'];
}
$super_id=$row['super'];
mysql_free_result($result);
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>游戏厅</title>
<link rel="stylesheet" href="oa.css">
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
}
#table {
text-align:center;
background-color: #FFFFFF;
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
color: #0000FF;
}
-->
</style>
<link href="../OA.CSS" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {font-weight: bold}
-->
</style>
<script language="javascript">
function checkform()
{
if(document.frm.user_acc.value=="")
{
alert("请输入帐号!");
document.frm.user_acc.focus();
return false;
}
if(document.frm.user_pwd.value=="")
{
alert("请输入密码!");
document.frm.user_pwd.focus();
return false;
}
return true;
}
function del(id,uid,date_s,date_e,part_id)
{
if(confirm("确认要删除吗?"))
{
document.location.href="yxdel.php?id="+id+"&uid="+uid+"&date_s="+date_s+"&date_e="+date_e+"&part_id="+part_id;
}
}
//代码说明(lulu163.com):form1为表单名,memberId为复选框,selectbutton为全选按钮
function selectAll()
{
var k=document.form1.memberId.length;
if(k==null){ //如果只有一个CheckBox则k=null
var temp=document.form1.memberId;
temp.checked=true;
}
for (var i=0;i<k;i++) {
var temp=document.form1.memberId[i];
temp.checked=true;
}
}
function selectNoAll()
{
var k=document.form1.memberId.length;
if(k==null){ //如果只有一个CheckBox则k=null
var temp=document.form1.memberId;
temp.checked=false;
}
for (var i=0;i<k;i++) {
var temp=document.form1.memberId[i];
temp.checked=false;
}
}
function GetCheckBox(){
var k=document.form1.memberId.length;
var arrayticket="";
var i=0;
if(k==null){ //如果只有一个CheckBox则k=null
if(document.form1.memberId.checked==true){
arrayticket=document.form1.memberId.value;
}
}else{
for(i=0;i<k;i++){ //否则有多个同名的CheckBox
if(document.form1.memberId[i].checked==true){
if(arrayticket!="")arrayticket=arrayticket+","; //用,分隔機票號碼
arrayticket=arrayticket+document.form1.memberId[i].value;
}
}
}
return arrayticket;
}
function DelSel(super_id,uid,date_s,date_e,part_id)
{
var ss=GetCheckBox();
if(ss==""){
alert("请选择要删除的信息,可以多选!");
return;
}
else
{
var del_flag=window.confirm("删除后将无法恢复!\n 确定要删除吗?");
if(del_flag)
{
//选是提交表单
document.location.href="yxdel.php?super_id="+super_id+"&id="+ss+"&uid="+uid+"&date_s="+date_s+"&date_e="+date_e+"&part_id="+part_id;
}
}
}
function ShowSel(super_id,uid,date_s,date_e,part_id)
{
var ss=GetCheckBox();
if(ss==""){
alert("请选择要显示的信息,可以多选!");
return;
}
else
{
//选是提交表单
document.location.href="yxlist.php?showsel=yes&super_id="+super_id+"&id="+ss+"&uid="+uid+"&date_s="+date_s+"&date_e="+date_e+"&part_id="+part_id;
}
}
function openScript(url, width, height){
var Win = window.open(url,"openScript",'width=' + width + ',height=' + height + ',left=150,top=150,resizable=0,scrollbars=no,menubar=no,status=no' );
}
</script>
</head>
<body>
<form name="form1" method="post" action="">
<table width="100%" border="0" cellspacing="0" bgcolor="#4e5960">
<tr>
<td height="20" align="left"><font color="#FFFFFF">--> 游戏列表 当前日期: <?=date("Y-m-d");?> <? if($_GET['date_s']<>"" and $_GET['date_e']<>"") { ?>查询日期段:<?=$_GET['date_s']?>至<?=$_GET['date_e']?></font> <? } ?><font color="#FFFFFF">[</font><? if($super_id=="1") { ?><a href="javascript:print();"><font color="#FFFFFF">打印</font></a><? } ?>
<a href="#" onClick="selectAll()" style="cursor:hand;"><font color="#FFFFFF">全部选中</font></a> <a href="javascript:DelSel('<?=$super_id;?>','<?=$_GET['uid'];?>','<?=$_GET['date_s'];?>','<?=$_GET['date_e'];?>','<?=$_GET['part_id'];?>')"><font color="#FFFFFF">删除选中</font></a> <a href="javascript:ShowSel('<?=$super_id;?>','<?=$_GET['uid'];?>','<?=$_GET['date_s'];?>','<?=$_GET['date_e'];?>','<?=$_GET['part_id'];?>')"><font color="#FFFFFF">显示选中</font></A> <a href="yxlist.php?uid=<?=$_GET['uid'];?>&date_s=<?=$_GET['date_s'];?>&date_e=<?=$_GET['date_e'];?>&part_id=<?=$_GET['part_id'];?>"><font color="#FFFFFF">显示全部</font></A> <a href="#" onClick="selectNoAll()" style="cursor:hand;"><font color="#FFFFFF">取消选中</font></a></font> <a href="javascript:this.location.reload();" style="cursor:hand;"><font color="#FFFFFF">刷新</font></a><font color="#FFFFFF">]</font></td>
</tr>
</table>
<?
$super=$_POST['supper'];
if($_GET['date_s']<>"" and $_GET['date_e']<>"")
{
$begdate=$_GET['date_s']." 00:00:00";
$endate=$_GET['date_e']." 23:59:59";
}
else
{
if($super==0)
{
$begdate=date("Y-m-d 00:00:00",strtotime("-1 day"));
$endate=date("Y-m-d 23:59:59",strtotime("-1 day"));
}
else
{
$begdate=$_POST['date_s']." 00:00:00";
$endate=$_POST['date_e']." 23:59:59";
}
}
//echo $begdate." ".$endate;
$Z1="";
function checkid($list,$id)
{
for($m=0;$m<count($list);$m++)
{
if($list[$m]==$id)
{
return 1;
}
}
}
$curdate="";
$lastdate="";
$uid=$_GET['uid'];
$selsql="select * from tblr where rec_date>='$begdate' and rec_date<='$endate' and game_id=3 and part_id=".$part_id." order by jq_id";
$result=mysql_db_query($dbname,$selsql);
?>
<table width="100%" border="0" cellpadding="0" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#999999" id="table">
<tr bgcolor="#CCCCCC">
<td width="9%">编号 </td>
<td width="8%">选择</td>
<td width="55%">组名</td>
<td width="12%">利润</td>
<td width="16%">日期</td>
</tr></table>
<?
while($row=mysql_fetch_array($result))
{
$curdate=substr($row['rec_date'],0,10);
if($_GET['showsel']<>"")
{
$idlist=split(',',$_GET['id']);
$is=checkid($idlist,$row['id']);
}
if($_GET['showsel']<>"")
{
if($is==1)
{
if((($curdate<>$lastdate) and ($lastdate<>"")))
{
?>
<table width="100%" bgcolor="#99CCCC">
<tr><td></td></tr>
</table>
<?
}
if($ii % 2==0)
{
?>
<table width="100%" border="0" cellpadding="0" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#999999" id="table">
<tr bgcolor="#B2CCE5">
<td width="9%" align="center"><?=$row['jq_id'];?></td>
<td width="8%" align="center"><input type="checkbox" name="memberId" value="<?=$row['id'];?>"></td>
<td width="55%" align="center"><?=$row['z_id'];?></td>
<td width="12%" align="center"><?=$row['lr'];?></td>
<td width="16%" align="center"><?=$row['rec_date'];?></td>
</tr></table>
<?
}
else
{
?>
<table width="100%" border="0" cellpadding="0" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#B2CCE5" id="table">
<tr bgcolor="#CCCCCC">
<td width="9%" align="center"><?=$row['jq_id'];?></td>
<td width="8%" align="center"><input type="checkbox" name="memberId" value="<?=$row['id'];?>"></td>
<td width="55%" align="center"><?=$row['z_id'];?></td>
<td width="12%" align="center"><?=$row['lr'];?></td>
<td width="16%" align="center"><?=$row['rec_date'];?></td>
</tr></table>
<?
}
}
}
else
{
if((($curdate<>$lastdate) and ($lastdate<>"")))
{
?>
<table width="100%" bgcolor="#99CCCC">
<tr><td></td></tr>
</table>
<?
}
if($ii % 2==0)
{
?>
<table width="100%" border="0" cellpadding="0" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#B2CCE5" id="table">
<tr bgcolor="#CCCCCC">
<td width="9%" align="center" bgcolor="#B2CCE5"><?=$row['jq_id'];?></td>
<td width="8%" align="center" bgcolor="#B2CCE5"><input type="checkbox" name="memberId" value="<?=$row['id'];?>"></td>
<td width="55%" align="center" bgcolor="#B2CCE5"><?=$row['z_id'];?></td>
<td width="12%" align="center" bgcolor="#B2CCE5"><?=$row['lr'];?></td>
<td width="16%" align="center" bgcolor="#B2CCE5"><?=$row['rec_date'];?></td>
</tr></table>
<?
}
else
{
?>
<table width="100%" border="0" cellpadding="0" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#B2CCE5" id="table">
<tr bgcolor="#CCCCCC">
<td width="9%" align="center"><?=$row['jq_id'];?></td>
<td width="8%" align="center"><input type="checkbox" name="memberId" value="<?=$row['id'];?>"></td>
<td width="55%" align="center"><?=$row['z_id'];?></td>
<td width="12%" align="center"><?=$row['lr'];?></td>
<td width="16%" align="center"><?=$row['rec_date'];?></td>
</tr></table>
<?
}
}
if($_GET['showsel']<>"")
{
if($is==1)
{
$Z1=$Z1+$row['lr'];
}
}
else
{
$Z1=$Z1+$row['lr'];
}
$ii++;
$lastdate=$curdate;
}
if(mysql_num_rows($result)<=0)
{
?>
<tr bgcolor="#CCCCCC">
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<?
}
mysql_free_result($result);
?>
<table width="100%" border="0" cellpadding="0" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#999999" id="table">
<tr bgcolor="#CCCCCC">
<td>合计:</td>
<td colspan="3" align="center"><?=$Z1;?>
</td>
</tr>
</table></form>
</body>
<?
mysql_close();
?>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -