<?php 

$Mem1 = new txtcc(ONGPHP.'/mode/');
$shezhi = $Mem1 -> g('shezhi');	

$where11 = array(
    'type'=>1,
     "uid" => $_SESSION['uid'], 
    'atime >='=> strtotime(date('Y-m-d')),
    'atime <='=> strtotime(date('Y-m-d',strtotime('+1 day')))
    //'iskaijiang' =>1
) ;

$huobi = $D -> setbiao('huobilog')->zhicha('jine') -> where( $where11 ) -> select();

if(is_array($huobi)){
    
    foreach($huobi as $key=>$value){
    
    
        $sum = array_sum($value);
    
    }
    
}else{
    
    $sum = 0;
    
}


$user = $D ->setbiao('user')->where( array("uid"=>$_SESSION['uid']))-> find();

$tiaojian = array(
    'tuid' => $_SESSION['uid'],
) ;

$order = '  ';

$huiyuan = $D -> setbiao('user') -> where( $tiaojian )  -> select();

if($huiyuan){

    $tudi[1] = count($huiyuan);

}else{

    $tudi[1] = 0;
}

$tiaojian = array(
    'tuid1' => $_SESSION['uid'],
) ;

$huiyuan = $D -> setbiao('user') -> where( $tiaojian )  -> select();
if($huiyuan){

    $tudi[2] = count($huiyuan);

}else{

    $tudi[2] = 0;
}

$tiaojian = array(
    'tuid2' => $_SESSION['uid'],
) ;

$huiyuan = $D -> setbiao('user') -> where( $tiaojian )  -> select();

if($huiyuan){

    $tudi[3] = count($huiyuan);

}else{

    $tudi[3] = 0;
}
$tiaojian = array(
    'tuid3' => $_SESSION['uid'],
) ;

$huiyuan = $D -> setbiao('user') -> where( $tiaojian )  -> select();

if($huiyuan){

    $tudi[4] = count($huiyuan);

}else{

    $tudi[4] = 0;
}
$tiaojian = array(
    'tuid4' => $_SESSION['uid'],
) ;

$huiyuan = $D -> setbiao('user') -> where( $tiaojian )  -> select();

if($huiyuan){

    $tudi[5] = count($huiyuan);

}else{

    $tudi[5] = 0;
}
$tiaojian = array(
    'tuid5' => $_SESSION['uid'],
) ;
$huiyuan = $D -> setbiao('user') -> where( $tiaojian )  -> select();

if($huiyuan){

    $tudi[6] = count($huiyuan);

}else{

    $tudi[6] = 0;
}
?>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
        <meta name="apple-mobile-web-app-capable" content="yes" /><!-- 删除苹果默认的工具栏和菜单栏 -->
        <meta name="apple-mobile-web-app-status-bar-style" content="black" /><!-- 设置苹果工具栏颜色 -->
        <meta name="format-detection" content="telephone=no, email=no" /><!-- 忽略页面中的数字识别为电话，忽略email识别 -->
        <!-- 启用360浏览器的极速模式(webkit) -->
        <meta name="renderer" content="webkit">
        <!-- 避免IE使用兼容模式 -->
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <!-- 针对手持设备优化，主要是针对一些老的不识别viewport的浏览器，比如黑莓 -->
        <meta name="HandheldFriendly" content="true">
        <!-- 微软的老式浏览器 -->
        <meta name="MobileOptimized" content="320">
        <!-- uc强制竖屏 -->
        <meta name="screen-orientation" content="portrait">
        <!-- QQ强制竖屏 -->
        <meta name="x5-orientation" content="portrait">
        <!-- UC强制全屏 -->
        <meta name="full-screen" content="yes">
        <!-- QQ强制全屏 -->
        <meta name="x5-fullscreen" content="true">
        <!-- UC应用模式 -->
        <meta name="browsermode" content="application">
        <!-- QQ应用模式 -->
        <meta name="x5-page-mode" content="app">
        <!-- windows phone 点击无高光 -->
        <meta name="msapplication-tap-highlight" content="no">
        <!-- 适应移动端end -->   
        <title>我的团.队</title>
        <link rel="stylesheet" type="text/css" href="/Public/Home/css/crazyFruit/global.css">
        <link rel="stylesheet" type="text/css" href="/Public/Home/css/crazyFruit/my_team.css">
        <script type="text/javascript" src="/Public/Home/js/crazyFruit/jquery-1.11.1.min.js"></script>
</head>
<body>
<div id="slideBox2" class="slideBox">

        <!--<div class="bd">
            <ul>
                    <li>
                        <img src="<?php echo $shezhi['bodybeijing'];?>" />
                    </li>
<!--                     <li>
                        <img src="/Public/Home/images/super_augur/ewm2.jpg"/>
                    </li> 
            </ul>
        </div>

    </div>
<style type="text/css">-->
<!--
.layer_bg{width: 100%;height: 100%;background:rgba(0,0,0,0.8);position:fixed;left:0;top:0;cursor: pointer;}
/*banner图粗粉代码*/
.slideBox{z-index: 3;opacity:1;}
.slideBox{ position:fixed; overflow:hidden; margin:0 auto;  width:80%;/* 设置焦点图最大宽度 */ left:50%;top: 2rem;margin-left: -40%;}
.slideBox .bd{ position:relative; z-index:0; }

.slideBox .bd li{ position:relative; text-align:center;  }
.slideBox .bd li img{ vertical-align:top; width:100%;/* 图片宽度100%，达到自适应效果 */}
/*
-->
</style>
<script type="text/javascript"> 
$(function(){ 
	$('.layer_bg').show();
	$('.layer_bg,#slideBox2 img').click(function(event) {
                 $('#slideBox2').css('opacity','0');
                 $('#slideBox2').css('top','-50rem');
                 
                 $(".layer_bg").fadeOut('400');
        });
	$('.layer_bg').on('touchmove', function(event) {
             event.preventDefault();
         });
})
</script>
<div class="layer_bg"></div>

    <div class="wrap">
       <!--  <div class="top_tit">
            <div class="cxd">我的家族</div>
            <div>佣金明细</div>
            <div><a href="/User/myqrCode.html" style="display:block;width:100%;height:100%;color:#333;">点我赚钱</a></div>
        </div> -->
        <!-- 我的团.队 -->
        <div class="big_box">
            <div class="wdxx">
                <div class="zi">我的团.队</div>
                <div class="ul_box">
                    <ul>
                        <li>
                            <p>一级人员</p>
                            <p class="yiji"><?php echo $tudi[1]?></p>
                        </li>
                        <li>
                            <p>二级人员</p>
                            <p class="yiji"><?php echo $tudi[2]?></p>
                        </li>
                        <li>
                            <p>三级人员</p>
                            <p class="yiji"><?php echo $tudi[3]?></p>
                        </li>
						<li>
                            <p>四级人员</p>
                            <p class="yiji"><?php echo $tudi[4]?></p>
                        </li>
						<li>
                            <p>五级人员</p>
                            <p class="yiji"><?php echo $tudi[5]?></p>
                        </li>
						<li>
                            <p>六级人员</p>
                            <p class="yiji"><?php echo "暂无"?></p>
                        </li>
                    </ul>
                </div>
            </div>
             <div class="wdxx wdxxx">
                <div class="zi">积.分</div>
                <div class="ul_box ul_box1">
                    <ul>
                        <li>
                            <p>今日积.分</p>
                            <p class="yiji">
                            <?php echo $sum;?>                            </p>
                        </li>
                        <li>
                            <p>总积.分</p>
                            <p class="yiji">
                            <?php echo $user['huobi'];?>                            </p>
                        </li>
                    </ul>
                </div>
            </div>
             <!-- 返回 -->
            <div class="back_box">
                <a href="?action=index">返回</a>
            </div>
        </div>
        <!-- 佣金明细 -->
        <div class="big_box big_box2">
                         <!-- 返回 -->
            <div class="back_box">
                <a href="?action=index">返回</a>
            </div>
        </div>
        <!-- 点我赚钱 -->
       <!--  <div class="big_box big_box3">
            <div class="djht">点击更换图片</div>
            <p class="casb">长按图片，选择保存图片</p>
            <div class="img_box">
                <img src="/Public/Home/images/crazyFruit/loi.png"  alt="" />
            </div>
        </div> -->
    </div>
</body>
</html>
<script type="text/javascript">
    $(function(){
        $('.top_tit>div').click(function(event) {
             $(this).addClass('cxd').siblings().removeClass('cxd');
             var my_index=$(this).index();
             $('.big_box').eq(my_index).show().siblings('.big_box').hide();
        });
        var my_height=$('body').height();
        if(my_height<=480){
            $('.img_box').css('height','21rem')
        }
    })
</script>