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

📄 all_class.inc.php

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


function all_result( $all_agent, $date_num, $cut_sign, $down_type, $start_time, $end_time )
{
    global $conn;
    $rsa = 0;
    $acut = 0;
    $sqla = mysql_query( "select * from agent where all_agent='{$all_agent}' ", $conn );
    $agent_num = mysql_num_rows( $sqla );
    while ( $rs = mysql_fetch_array( $sqla ) )
    {
        $agent = $rs['user_account'];
        $rsa += all_class( $agent, $date_num, $cut_sign, $down_type, $start_time, $end_time );
        $acut += all_cutss( $cut_sign, $agent, $all_agent, $date_num, $start_time, $end_time );
    }
    $rv = $rsa.",".$acut;
    return $rv;
}

function all_class( $agent, $date_num, $cut_sign, $down_type, $start_time, $end_time )
{
    global $conn;
    if ( $down_type != "all" )
    {
        $sq = " and sign='{$down_type}'";
    }
    else
    {
        $sq = "";
    }
    if ( $date_num == "no" )
    {
        $sq = " and open_date>='{$start_time}' and open_date<='{$end_time}' and agent='{$agent}'";
    }
    else
    {
        $sq = " and drop_date='{$date_num}' and agent='{$agent}'";
    }
    $sqlad = mysql_query( "select * from drop_bill where cut_sign='{$cut_sign}'  {$sq} ", $conn );
    $cutct = 0;
    $cutd = 0;
    while ( $rsc = mysql_fetch_array( $sqlad ) )
    {
        $wind = 0;
        $cuts = $rsc['drop_money'] * $rsc['drop_cut'] * 0.01;
        $cutd += count_cuts( $rsc['cut_sign'], $rsc['drop_cut'], $rsc['drop_money'], $agent );
        $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;
    }
    $agent_profit = profits( $agent, 1 );
    $agent_money = $wins + $cutd;
    $agent_result = $wins * $agent_profit * 0.01 - $cutd;
    $all_agent_result = $wins - $agent_result;
    return $all_agent_result;
}

function all_cutss( $cut_sign, $agent, $all_agent, $dates, $start_time, $end_time )
{
    global $conn;
    if ( $date_num == "no" )
    {
        $sq = " and open_date>='{$start_time}' and open_date<='{$end_time}'";
    }
    else
    {
        $sq = " and drop_date='{$dates}'";
    }
    $cuta = 0;
    $sqlts = mysql_query( "select * from drop_bill where cut_sign='{$cut_sign}' and agent='{$agent}' {$sq}", $conn );
    while ( $rs = mysql_fetch_array( $sqlts ) )
    {
        $signs = $rs['cut_sign'];
        $drop_plate = $rs['drop_plate'];
        $sqlall = mysql_query( "select * from agent_cut where user_account='{$all_agent}' and sign='{$signs}' and cut_plate='{$drop_plate}'", $conn );
        $sqlagt = mysql_query( "select * from agent_cut where user_account='{$agent}' and sign='{$signs}' and cut_plate='{$drop_plate}'", $conn );
        if ( mysql_num_rows( $sqlall ) != 0 && mysql_num_rows( $sqlagt ) != 0 )
        {
            $cutse = mysql_result( $sqlall, 0, "cut_num" ) - mysql_result( $sqlagt, 0, "cut_num" );
            $cuta += $rs['drop_money'] * $cutse * 0.01;
        }
        else
        {
            $cuta = 0;
        }
    }
    return $cuta;
}

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

⌨️ 快捷键说明

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