/web kết quả xổ số ketqua.net/Code/lich-su-game.php
https://gitlab.com/phamngsinh/baitaplon_sinhvien · PHP · 100 lines · 97 code · 3 blank · 0 comment · 13 complexity · a9bba1be7e405c55545bb33084994017 MD5 · raw file
- <? include ('class.php');?>
- <title>Lịch sử danh sách những người đã đặt lệnh chơi - <?=title?></title>
- <div class="box_sms" style="padding-top:6px">
- <h2 class="title_nomal clearfix"><span class="fl"><strong class="ic_mb">Lịch sử danh sách những người đã đặt lệnh chơi</strong></span>
- </h2>
- <table border="0" cellpadding="0" cellspacing="1" width="100%">
- <tbody>
- <tr>
- <td class="row1 loto-box-header">STT</td>
- <td class="row1 loto-box-header">Thành viên </td>
- <td class="row1 loto-box-header">Ngày</td>
- <td class="row1 loto-box-header">Hình thức</td>
- <td class="row1 loto-box-header">Đánh con</td>
- <td class="row1 loto-box-header">Đánh bằng</td>
- <td class="row1 loto-box-header">Tiền cọc</td>
- <td class="row1 loto-box-header">Kết quả </td>
- <td class="row1 loto-box-header">Kiếm được</td>
- </tr>
- <?
- $sql = mysql_query("select date_format(time,'%d-%m-%Y') as ngay,time,couples,xeng,type,port,idmember from ".predict." order by time desc");
- if(mysql_num_rows($sql)>0){
- $i=0; $demkq=0;
- while($rs=mysql_fetch_assoc($sql)){
- $sotrung = Couples($rs['time']);
- $capso = explode(',',$rs['couples']);
- $datcuoc = explode(',',$rs['xeng']);
- $xhcap = array_count_values($sotrung);
- $sotrung = array_unique($sotrung);
- $j=-1;
- foreach($capso as $cap){
- $i++; $j++; $demkq++;
- switch($rs['type']){
- case 1:
- if($cap==$sotrung[1]&&count($sotrung)>1){
- $ketqua = '<font color="#ff0000">Win</font>';
- $kiemduoc = number_format($datcuoc[$j]*70,0,',','.').' xeng';
- }elseif($cap!=$sotrung[1]&&count($sotrung)>1){
- $ketqua = 'Lose';
- $kiemduoc = '0 xeng';
- }else{
- $ketqua = '--';
- $kiemduoc = '0 xeng';
- }break;
- case 2:
- if(array_search($cap,$sotrung)!=''&&count($sotrung)>1){
- $ketqua = '<font color="#ff0000">Win</font>';
- $kiemduoc = number_format($datcuoc[$j]*4*$xhcap[$cap],0,',','.').' xeng';
- }elseif(array_search($cap,$sotrung)==''&&count($sotrung)>1){
- $ketqua = 'Lose';
- $kiemduoc = '0 xeng';
- }else{
- $ketqua = '--';
- $kiemduoc = '0 xeng';
- }break;
- case 3:
- if(count($sotrung)>1){
- $loxien = explode('-',$cap);
- $mangcaptrung = array_intersect($sotrung,$loxien);
- if(count($mangcaptrung)==count($loxien)){
- $ketqua = '<font color="#ff0000">Win</font>';
- $so_cap_trung = count($mangcaptrung);
- if($so_cap_trung==2) $kiemduoc = number_format($datcuoc[$j]*10,0,',','.').' xeng';
- if($so_cap_trung==3) $kiemduoc = number_format($datcuoc[$j]*40,0,',','.').' xeng';
- if($so_cap_trung==4) $kiemduoc = number_format($datcuoc[$j]*80,0,',','.').' xeng';
- if($so_cap_trung==5) $kiemduoc = number_format($datcuoc[$j]*120,0,',','.').' xeng';
- }else{
- $ketqua = 'Lose';
- $kiemduoc = '0 xeng';
- }
- }else{
- $ketqua = '--';
- $kiemduoc = '0 xeng';
- }
- break;
- }
- ?>
- <tr>
- <td <? echo $i%2==0?'class="row1"':'class="row2"';?>><?=$i?></td>
- <td <? echo $i%2==0?'class="row1"':'class="row2"';?>><?=UserMember($rs['idmember'])?></td>
- <td <? echo $i%2==0?'class="row1"':'class="row2"';?>><?=$rs['ngay']?></td>
- <td <? echo $i%2==0?'class="row1"':'class="row2"';?>><? if($rs['type']==1) echo 'Đặc biệt'; if($rs['type']==2) echo 'Loto'; if($rs['type']==3) echo 'Lô xiên';?></td>
- <td <? echo $i%2==0?'class="row1"':'class="row2"';?>><?=$cap?></td>
- <td <? echo $i%2==0?'class="row1"':'class="row2"';?>><?=$rs['port']?></td>
- <td <? echo $i%2==0?'class="row1"':'class="row2"';?>><?=number_format($datcuoc[$j],0,',','.')?></td>
- <td <? echo $i%2==0?'class="row1"':'class="row2"';?>>
- <?=$ketqua?> </td>
- <td <? echo $i%2==0?'class="row1"':'class="row2"';?>>
- <?=$kiemduoc?> </td>
- </tr>
- <? }
- if($demkq==100) break;
- }
- }mysql_free_result($sql);?>
- </tbody>
- </table>
- <div class="clear"></div>
- </div>