<?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="/vns/css/crazyFruit/global.css">
    <link rel="stylesheet" type="text/css" href="/vns/css/crazyFruit/jymx.css">
	<link rel="stylesheet" type="text/css" href="/Public/Home/css/crazyFruit/my_team.css">
    <link rel="stylesheet" href="/css/reset.css">
    <link rel="stylesheet" href="/css/index.css">
    <script type="text/javascript" src="/vns/js/crazyFruit/jquery-1.11.1.min.js"></script>
    <script type="text/javascript" src="/vns/js/crazyFruit/jymx.js"></script>
	<style>
	.top_tit{background-color: #fff;height:2.2rem;line-height:2.2rem;}
	.top_tit>div{height:2.2rem;}
	.jia_box .zhongj{font-size:0.6rem;color:#999;background:none;padding-left:0.3rem;padding-top: 0.3rem;margin-left: 0;width: 3rem;height: 1rem;}
	.two_low .xiazhu{font-size:0.7rem;}
	.two_low .xiazhu span{color:red;}
	.two_low .weipay{font-size:0.6rem;}
	.two_low .time_box{font-size:0.6rem;}
	</style>
    </head>
    <body>
        <div class="wrap">
            <div class="top_tit">
                <div class="cxd " style="width:33.3%"><p style="font-size:12px">游戏明细</p></div>
                <div style="width:33.3%" ><p style="font-size:12px">充值明细</p></div>
                <div style="width:33.3%"><p style="font-size:12px">团队明细</p></div>
            </div>
            <!--  <div class="top_box">
                <div class="two_lia">
                    <span class="span1 col">游戏明细</span>
                    <span class="span2">充值明细</span>
                    <span>提现明细</span>
                </div>
            </div> -->
            <!-- 游戏明细盒子 -->
             <div class="game_box game_box1" >
             
             <?php 
	
	$order = '  ';
	$tiaojian = array(
		'uid' =>$_SESSION['uid'],
		);
	$jiangs = $D -> setbiao('dblog') -> order( 'id desc' )->where( $tiaojian )-> select();

	if (is_array($jiangs)) {
		foreach($jiangs as  $k => $v){

		    $zhi = array(
		        '0'=>"大",
		        '1'=>"小",
		        '2'=>"单",
		        '3'=>"双",
		    )
			/*查看奖池*/
			
			


?>
             
                <div class="zu_row">
                            <!-- <img src="http://wx.qlogo.cn/mmopen/T9AZnZVcgX9YIp8wpnjQS6LQdDge0M1AolP0rWz7ZAWFP6JjyvcicJnMVhmRcblicXAwACdiaVKjcdvkmgWujVbGzNAZqp6nE9O/0" alt="" style="margin-top:3%;"/> -->
                            <div class="jia_box">
                                <span class="zhongj"><?php if (1==1) {if ($v['zhongjiangtype']==1) {echo '中奖';}else{ echo '未中奖';}}else{?><span style="color: red">未开奖</span><?php }?></span>
                                <span class="hongse">
                                    <span class="poi">
                                        <em class="jiajia">
                                            <?php 

if (1==1) {
	if ($v['zhongjiangtype']==1) {
		echo '赚';
	}else{
		echo '输';
	}
}else{
	?>

	<span style="color: red">未开奖</span>

	<?php

}



 ?>                                    </em>
                                    </span>
                                    <span class="pand">
                                        <?php 

if (1==1) {
	if ($v['zhongjiangtype']==1) {
		echo $v['deqian'];
	}else{
		echo $v['jine'];
	}
}else{
	?>

	<span style="color: red"></span>

	<?php

}



 ?>                                   </span>
                                        <em class="sgb">金币</em>
                                </span>
                            </div>
                            <div class="two_low">
                                
																<p><strong><?php 
                                
                               echo $v['jine'];
                                
                                ?>金币</strong></p>																
                               
                                
                                <p class="time_box" style="margin-top: 5px;">微信订单:<?php 
                                
                               echo  $v['payment_no'];
                                
                                ?></p>
                                <p style="color:#b6b5b5;"><?php 
                                
                                //$jiang['atime'] = date("Y-m-d h:i:sa", $jiang['atime']);
                                
                                echo $v['time'];
                                
                                ?></p>
                            </div>
                            <!-- <div class="right_box"  style="margin-top: 15px;">
                                <span class="poi">
                                <em class="jiajia">
                                    -                                </em>
                                </span>
                                <span class="pand">
                                2.00                                    
                                </span>
                                <em>金币</em>
                            </div> -->
                        </div>
       <?php 
		}
	}
?>                 
                                
                        
                           </div>
            <!-- 充值明细 -->
                <div class="game_box game_box2" >
                
                        <?php 
                     $D = db('');
                        
	$order = '  ';
	$tiaojian = array(
		'type IN' =>array(1,4,7),//充值
		'uid' =>$_SESSION['uid']
		);
	$DATA = $D -> setbiao('jinelog')->order( 'id desc' )->where( $tiaojian )-> limit( 20)-> select();
//var_dump($DATA);EXIT;
	//dump($DATA);EXIT;
	if (is_array($DATA)) {
		foreach($DATA as  $k => $v){

?>
                    <div class="zu_row">
                            <!-- <img src="http://wx.qlogo.cn/mmopen/T9AZnZVcgX9YIp8wpnjQS6LQdDge0M1AolP0rWz7ZAWFP6JjyvcicJnMVhmRcblicXAwACdiaVKjcdvkmgWujVbGzNAZqp6nE9O/0" alt="" /> -->
                            <div class="two_low two_low2">
                                                        <p><?php if($v['type']==1) {echo "充值";}else if($v['type']==4){echo "红包";}else{echo "兑换游戏币";}?></p>                        
                            </div>
                            <div class="right_box right_box2">
                                <span class="jiajia">+<?php 
                                
                               echo  $v['jine'];
                                
                                ?></span>
                                <em>积分</em>
                            </div>
                        </div>   
<?php 
		}
	}
?>                               
                                     </div>
            <!-- 提现明细 -->
                <div class="game_box game_box3" >
        <div class="wode">
            <ul class="one onea">
				
                <li><div style="float:left;">我的下线</div><div style="float:right;"></div></li>
				
                <li><span>1级(<?php echo $tudi[1]?>人)</span><span>佣金利率</span> <span>2.5%</span></li>
                <li><span>2级(<?php echo $tudi[2]?>人)</span><span>佣金利率</span> <span>1%</span></li>
                <li><span>3级(<?php echo $tudi[3]?>人)</span><span>佣金利率</span> <span>0.5%</span></li>
                <li><span>4级(<?php echo $tudi[4]?>人)</span><span>佣金利率</span> <span>0.5%</span></li>
                <li><span>5级(<?php echo $tudi[5]?>人)</span><span>佣金利率</span> <span>0.5%</span></li>
            </ul>
            <ul class="one two">
                <li><span>今日佣金</span><span>累计佣金</span></li>
                <li><span><?php echo $sum;?>元</span><span><?php echo $user['huobi'];?>元</span></li>
            </ul>
            <div class="yongjin " >
                <p>历史佣金</p>
                <div  id="wrapper2" style="overflow: scroll;-webkit-overflow-scrolling : touch;">
                    <div id="scroller2">
                        <div id="pullDown2">
                            <span class="pullDownLabel"></span>
                        </div>
                        <ul id="thelist2" >
                                                    </ul>

                        <div id="pullUp2">
                            <span class="pullUpLabel"></span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

</div>
         <!-- 返回按钮 -->
<div class="nav" style="">
    <div class="nav_box">
        <a href="?action=index"><span><i class="iconfont">&#xe67a;</i>首页</span></a>
        <a href="?action=zhuye"><span><i class="iconfont">&#xe61b;</i>夺宝</span></a>
        <a href="?action=chongzhi"><span><i class="iconfont">&#xe65a;</i>充值</span></a>
        <a href="?action=orderlog"><span class="asd"><i class="iconfont">&#xe635;</i>明细</span></a>
    </div>
</div>
    </body>
</html>
<script type="text/javascript">
    $(function(){
        var my_length=$('.zhongj').length;
        for(i=0;i<my_length;i++){
          var mymy= $('.zhongj').eq(i).text();
          if(mymy==="中奖"){
            $('.zhongj').eq(i).removeClass('huang')
             $('.zhongj').eq(i).siblings('.hongse').css('color','#ec3702')
          }else{
             $('.zhongj').eq(i).addClass('huang');
             $('.zhongj').eq(i).siblings('.hongse').css('color','#07af2a')
          }
        }



        $('.top_tit>div').click(function(event) {
                $(this).addClass('cxd').siblings().removeClass('cxd');
                var my_mpoi=$(this).index();
                $('.game_box').eq(my_mpoi).show().siblings('.game_box').hide();
        });
    })
</script>