table_manage.inc.php

来自「六和投注系统」· PHP 代码 · 共 53 行

PHP
53
字号
<?php


function manage_result( $super_agent, $date_num, $start_time, $end_time )
{
    global $conn;
    $sqla = mysql_query( "select * from all_agent where super_agent='{$super_agent}'", $conn );
    $ncount = 0;
    $mcount = 0;
    $ucount = 0;
    $agcount = 0;
    $alcount = 0;
    while ( $rs = mysql_fetch_array( $sqla ) )
    {
        $agent = $rs['user_account'];
        $super_agent = $rs['super_agent'];
        $sp = sup_all( $agent, $date_num, $start_time, $end_time );
        $cns = split( ",", $sp );
        $notes = $cns[0];
        $moneys = $cns[1];
        $user_win = $cns[2];
        $agent_win = $cns[3];
        $all_agent_win = $cns[4];
        $ncount += $notes;
        $mcount += $moneys;
        $ucount += $user_win;
        $agcount += $agent_win;
        $alcount += $all_agent_win;
        $all_agent_profit = profits( $agent, 2 );
        $super_agent_profit = profits( $super_agent, 3 );
        $profits = $super_agent_profit - $all_agent_profit;
        $super_agent_cut = sup_cut( $super_agent, $agent, $date_num, $start_time, $end_time );
        $super_agent_cuts += $super_agent_cut;
        if ( $notes != 0 )
        {
            $agent_wins += round( $agent_win, 2 );
            $all_agent_wins += round( $all_agent_win, 2 );
            $all_money = round( $all_agent_win + $super_agent_cut, 2 );
            $all_moneys += $all_money;
            $all_result = round( $user_win * $profits * 0.01 - $super_agent_cut, 2 );
            $all_results += $all_result;
            $super_win = round( $all_agent_win - $all_result, 2 );
            $super_wins += $super_win;
        }
    }
    $rv = $ncount.",".$mcount.",".$ucount.",".$agent_wins.",".$all_agent_wins.",".$super_wins;
    return $rv;
}

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

⌨️ 快捷键说明

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