⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 table_agent.inc.php

📁 六和投注系统
💻 PHP
字号:
<?php


function agent_table( $agent, $date_num, $start_time, $end_time )
{
    global $conn;
    $profit = profits( $agent, 1 );
    $sqluser = mysql_query( "select * from member where deleted='0' and m='0' and agent='{$agent}' order by id desc", $conn );
    if ( $date_num == "no" )
    {
        $sq = " and open_date>='{$start_time}' and open_date<='{$end_time}'";
    }
    else
    {
        $sq = " and drop_date='{$date_num}'";
    }
    while ( $rs = mysql_fetch_array( $sqluser ) )
    {
        $user_account = $rs['user_account'];
        $sqlbnum = mysql_query( "select * from drop_bill where user_name='{$user_account}' {$sq}", $conn );
        $bnum = mysql_num_rows( $sqlbnum );
        $bnum_count += $bnum;
        $sqlmoney = mysql_query( "select sum(drop_money) from drop_bill where user_name='{$user_account}' {$sq}", $conn );
        $mnum = mysql_fetch_array( $sqlmoney );
        $money = $mnum[0];
        $money_count += $money;
        if ( 1 < $money )
        {
            $sqlad = mysql_query( "select * from drop_bill where user_name='{$user_account}' {$sq}", $conn );
            $count_cut = 0;
            $wins = 0;
            $moneys = 0;
            $cutct = 0;
            while ( $rsc = mysql_fetch_array( $sqlad ) )
            {
                $cuts = 0;
                $wind = 0;
                $cuts = $rsc['drop_money'] * $rsc['drop_cut'] * 0.01;
                $count_cut += $cuts;
                $cutd = count_cut( $rsc['cut_sign'], $rsc['drop_cut'], $rsc['drop_money'], $agent, $rsc['drop_plate'] );
                $datem = $rsc['drop_date'];
                $sqlp = mysql_query( "select * from results where dates='{$datem}'", $conn );
                $deleted = mysql_result( $sqlp, 0, "deleted" );
                if ( $deleted == 0 )
                {
                    $wind = win_unit( $rsc['num_sign'], $rsc['drop_content'], $rsc['drop_type'], $rsc['drop_money'], $rsc['drop_rate'], $rsc['drop_details'], $rsc['drop_date'], $cuts );
                }
                $wins += $wind;
                $cutct += $cutd;
            }
            $moneys = $wins + $cutct;
            $wincs += $wins;
            $count_cuts += $count_cut;
            $cut_counts += $cutct;
            $all_agent = $rs['all_agent'];
            $all_profit = profits( $all_agent, 2 );
            $wmoney = $wins + $cutct;
            $aprofit = $wins * $profit * 0.01 - $cutct;
            $aprofits += $aprofit;
            $all_count = $wins - $aprofit;
            $all_counts += $all_count;
        }
        $wmoney_count += $wmoney;
        $all_agent_win += $wins;
    }
    if ( $bnum_count == "" )
    {
        $bnum_count = 0;
    }
    if ( $money_count == "" )
    {
        $money_count = 0;
    }
    if ( $wincs == "" )
    {
        $wincs = 0;
    }
    if ( $aprofits == "" )
    {
        $aprofits = 0;
    }
    if ( $all_counts == "" )
    {
        $all_counts = 0;
    }
    $rv = $bnum_count.",".$money_count.",".$wincs.",".$aprofits.",".$all_counts;
    return $rv;
}

include( "../inc/win_unit.php" );
include( "../inc/profit.inc.php" );
echo "  \r\n\r\n\r\n\r\n";
?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -