Warning: array_sum() [function.array-sum]: The argument should be an array in D:\phpStudy\WWW\web\admin\cwgl\hccw.php on line 166
如下蓝色字体,各位大版主版帮忙。麻烦了。谢谢!<?php
include_once("../common/login_check.php");
check_quanxian("cwgl");
?>
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8" />
<TITLE>财务核查</TITLE>
<link rel="stylesheet" href="Images/CssAdmin.css">
<style type="text/css">
<STYLE>
BODY {
SCROLLBAR-FACE-COLOR: rgb(255,204,0);
 SCROLLBAR-3DLIGHT-COLOR: rgb(255,207,116);
 SCROLLBAR-DARKSHADOW-COLOR: rgb(255,227,163);
 SCROLLBAR-BASE-COLOR: rgb(255,217,93)
}
.STYLE2 {font-size: 12px}
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
td{font:13px/120% "宋体";padding:3px;}
a{ color:#F37605; text-decoration: none;}
.t-title{background:url(../images/06.gif);height:24px;}
.t-tilte td{font-weight:800;}
</STYLE>
</HEAD><body>
<script language="JavaScript" src="../../js/calendar.js"></script>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#CCCCCC">
  <tr>
    <td height="24" nowrap background="../images/06.gif"><font ><span class="STYLE2">财务核查</span></font></td>
  </tr>
  <tr>
    <td height="24" align="center" nowrap bgcolor="#FFFFFF">
 <table width="100%">
     <form name="form1" method="GET" action="hccw.php" >
      <tr>
        <td width="176">日期:
          <input name="date" type="text" id="date" value="<?=@$_GET['date']?>" onClick="new Calendar(2008,2020).show(this);" size="15" maxlength="10" readonly="readonly" /></td>
        <td width="254">会员名称:
          <input name="username" type="text" id="username" value="<?=@$_GET['username']?>" size="20" maxlength="20"/></td>
        <td width="409"><input name="find" type="submit" id="find" value="查找"/></td>
        <td width="104" align="center"><a href="../hygl/check_user.php?action=1&username=<?=$_GET["username"]?>">核查会员</a></td>
        <td width="154" align="center"><a href="../hygl/lsyhxx.php?action=1&username=<?=$_GET['username']?>">历史银行卡信息</a></td>
      </tr>
</form>
    </table></td>
  </tr>
</table>
<br><table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#CCCCCC">
  <tr>
    <td height="24" nowrap bgcolor="#FFFFFF">
    
<table width="100%" border="1" bgcolor="#FFFFFF" bordercolor="#96B697" cellspacing="0" cellpadding="0" style="border-collapse: collapse; color: #225d9c;" id=editProduct   idth="100%" >
      <tr bgcolor="efe" class="t-title" align="center">
        <td width="10%" height="24" ><strong>编号</strong></td>
        <td width="10%" ><strong>类型</strong></td>
        <td width="35%" ><strong>订单号</strong></td>
        <td width="10%" ><strong>汇款银行</strong></td>
        <td width="20%"><strong>操作金额</strong></td>
        <td width="15%" ><strong>提交时间</strong></td>
        </tr>
<?php
if(isset($_GET['username'])){
include_once("../../include/mysqli.php");
$arr = array();
$arr_m = array();
$arr_m[1] = 0;
$arr_m[2] = 0;
$arr_m[3] = 0;
$sql = "select m.m_value,m.m_order,m.status,m.m_make_time,m.about,m.m_id,m.assets,m.balance from k_money m left join k_user u on m.uid=u.uid where u.username='".$_GET['username']."' and m.`status`not in(0,2) and `type`=1"; //所有该会员的存款取款记录
if(isset($_GET['date'])) $sql .= " and m.m_make_time like ('".$_GET['date']."%')";
$query = $mysqli->query($sql);
while($row = $query->fetch_array()){
$time = strtotime($row['m_make_time']);
if($row['m_value'] > 0){ //存款
if($row["status"]==0){
$arr[$time]['type'] = '<span style="color:#006600;">存款失败</span>';
  }else if($row["status"]==1){
    $arr[$time]['type'] = '<span style="color:#006600;">在线存款</span>';
  }else if($row["status"]==3){
    $arr[$time]['type'] = '<span style="color:#006600;">公司入款</span>';
  }else if($row["status"]==4){
  $arr[$time]['type'] = '<span style="color:#006600;">优惠彩金</span>';
  }else if($row["status"]==5){
$arr[$time]['type'] = '<span style="color:#006600;">提款失败</span>';
  }else if($row["status"]==6){
$arr[$time]['type'] = '<span style="color:#006600;">系统返水</span>';
  }else if($row["status"]==7){
$arr[$time]['type'] = '<span style="color:#006600;">结算错误</span>';
  }else if($row["status"]==8){
$arr[$time]['type'] = '<span style="color:#006600;">技术测试</span>';
  }
//$arr[$time]['type'] = '<span style="color:#006600;">存款</span>';
$arr[$time]['money'] = $row['m_value'];
$arr_m[1] += $row['m_value'];
}else{
$arr[$time]['type'] = '<span style="color:#FF0000;">在线取款</span>';
$arr[$time]['money'] = abs($row['m_value']);
$arr_m[2] += abs($row['m_value']);
}
$arr[$time]['time']  = $row['m_make_time'];
$arr[$time]['lsh']  = $row['m_order'];
$arr[$time]['uid']  = $row['uid'];
$arr[$time]['about']  = $row['about'];
$arr[$time]['assets']  = $row['assets'];
$arr[$time]['balance']  = $row['balance'];
$arr[$time]['url']  = '../cwgl/tixian_show.php?id='.$row['m_id'];
}
$sql = "select m.money,m.lsh,m.adddate,m.id,m.assets,m.balance,m.bank from huikuan m left join k_user u on m.uid=u.uid where u.username='".$_GET['username']."' and m.`status`=1"; //所有该会员的存款取款记录
if(isset($_GET['date'])) $sql .= " and m.adddate like ('".$_GET['date']."%')";
$query = $mysqli->query($sql);
while($row = $query->fetch_array()){
$time = strtotime($row['adddate']);
$arr[$time]['type'] = '<span style="color:#FF9900;">公司汇款</span>';
$arr[$time]['money'] = $row['money'];
$arr_m[3] += $row['money'];
$arr[$time]['time']  = $row['adddate'];
$arr[$time]['lsh']  = $row['lsh'];
$arr[$time]['bank']  = $row['bank'];
$arr[$time]['assets']  = $row['assets'];
$arr[$time]['balance']  = $row['balance'];
$arr[$time]['url']  = '../cwgl/hk_look.php?id='.$row['id'];
}
krsort($arr);
$i = 1;
foreach($arr as $k=>$v){
?>
      <tr align="center" onMouseOver="this.style.backgroundColor='#EBEBEB'" onMouseOut="this.style.backgroundColor='#ffffff'" >
        <td  height="35" align="center" ><?=$i++?></td>
        <td><?=$v["type"]?></td>
        <td><a href="<?=$v["url"]?>"><?=$v["lsh"]?></a><?php
if($v["about"]) echo '<br/>'.'<span style="color:#FF0000;">'.$v["about"].'</span>';
?></td>
        <td><?=$v["bank"]?></td>
        <td>
          <table width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td width="33%" style="color:#999999;"><?=$v["assets"]?></td>
              <td width="34%" align="center" style="color:#225d9c;"><?=$v["money"]?></td>
              <td width="33%" align="right" style="color:#999999;"><?=$v["balance"]?></td>
            </tr>
          </table>          </td>
        <td><?=get_bj_time($v["time"])?></td>
        </tr>
      <?
}
}
      ?>
    </table></td>
  </tr>
  <tr>
    <td>总金额:<span style="color:#0000FF"><?=array_sum($arr_m)?></span>,存款:<span style="color:#006600;"><?=$arr_m[1]?></span>,取款:<span style="color:#FF0000;"><?=$arr_m[2]?></span>,汇款:<span style="color:#CC9900;"><?=$arr_m[3]?></span></td>
  </tr>
</table>
</body>
</html>