/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

  1. <? include ('class.php');?>
  2. <title>Lịch sử danh sách những người đã đặt lệnh chơi - <?=title?></title>
  3. <div class="box_sms" style="padding-top:6px">
  4. <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>
  5. </h2>
  6. <table border="0" cellpadding="0" cellspacing="1" width="100%">
  7. <tbody>
  8. <tr>
  9. <td class="row1 loto-box-header">STT</td>
  10. <td class="row1 loto-box-header">Thành viên </td>
  11. <td class="row1 loto-box-header">Ngày</td>
  12. <td class="row1 loto-box-header">Hình thức</td>
  13. <td class="row1 loto-box-header">Đánh con</td>
  14. <td class="row1 loto-box-header">Đánh bằng</td>
  15. <td class="row1 loto-box-header">Tiền cọc</td>
  16. <td class="row1 loto-box-header">Kết quả </td>
  17. <td class="row1 loto-box-header">Kiếm được</td>
  18. </tr>
  19. <?
  20. $sql = mysql_query("select date_format(time,'%d-%m-%Y') as ngay,time,couples,xeng,type,port,idmember from ".predict." order by time desc");
  21. if(mysql_num_rows($sql)>0){
  22. $i=0; $demkq=0;
  23. while($rs=mysql_fetch_assoc($sql)){
  24. $sotrung = Couples($rs['time']);
  25. $capso = explode(',',$rs['couples']);
  26. $datcuoc = explode(',',$rs['xeng']);
  27. $xhcap = array_count_values($sotrung);
  28. $sotrung = array_unique($sotrung);
  29. $j=-1;
  30. foreach($capso as $cap){
  31. $i++; $j++; $demkq++;
  32. switch($rs['type']){
  33. case 1:
  34. if($cap==$sotrung[1]&&count($sotrung)>1){
  35. $ketqua = '<font color="#ff0000">Win</font>';
  36. $kiemduoc = number_format($datcuoc[$j]*70,0,',','.').' xeng';
  37. }elseif($cap!=$sotrung[1]&&count($sotrung)>1){
  38. $ketqua = 'Lose';
  39. $kiemduoc = '0 xeng';
  40. }else{
  41. $ketqua = '--';
  42. $kiemduoc = '0 xeng';
  43. }break;
  44. case 2:
  45. if(array_search($cap,$sotrung)!=''&&count($sotrung)>1){
  46. $ketqua = '<font color="#ff0000">Win</font>';
  47. $kiemduoc = number_format($datcuoc[$j]*4*$xhcap[$cap],0,',','.').' xeng';
  48. }elseif(array_search($cap,$sotrung)==''&&count($sotrung)>1){
  49. $ketqua = 'Lose';
  50. $kiemduoc = '0 xeng';
  51. }else{
  52. $ketqua = '--';
  53. $kiemduoc = '0 xeng';
  54. }break;
  55. case 3:
  56. if(count($sotrung)>1){
  57. $loxien = explode('-',$cap);
  58. $mangcaptrung = array_intersect($sotrung,$loxien);
  59. if(count($mangcaptrung)==count($loxien)){
  60. $ketqua = '<font color="#ff0000">Win</font>';
  61. $so_cap_trung = count($mangcaptrung);
  62. if($so_cap_trung==2) $kiemduoc = number_format($datcuoc[$j]*10,0,',','.').' xeng';
  63. if($so_cap_trung==3) $kiemduoc = number_format($datcuoc[$j]*40,0,',','.').' xeng';
  64. if($so_cap_trung==4) $kiemduoc = number_format($datcuoc[$j]*80,0,',','.').' xeng';
  65. if($so_cap_trung==5) $kiemduoc = number_format($datcuoc[$j]*120,0,',','.').' xeng';
  66. }else{
  67. $ketqua = 'Lose';
  68. $kiemduoc = '0 xeng';
  69. }
  70. }else{
  71. $ketqua = '--';
  72. $kiemduoc = '0 xeng';
  73. }
  74. break;
  75. }
  76. ?>
  77. <tr>
  78. <td <? echo $i%2==0?'class="row1"':'class="row2"';?>><?=$i?></td>
  79. <td <? echo $i%2==0?'class="row1"':'class="row2"';?>><?=UserMember($rs['idmember'])?></td>
  80. <td <? echo $i%2==0?'class="row1"':'class="row2"';?>><?=$rs['ngay']?></td>
  81. <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>
  82. <td <? echo $i%2==0?'class="row1"':'class="row2"';?>><?=$cap?></td>
  83. <td <? echo $i%2==0?'class="row1"':'class="row2"';?>><?=$rs['port']?></td>
  84. <td <? echo $i%2==0?'class="row1"':'class="row2"';?>><?=number_format($datcuoc[$j],0,',','.')?></td>
  85. <td <? echo $i%2==0?'class="row1"':'class="row2"';?>>
  86. <?=$ketqua?> </td>
  87. <td <? echo $i%2==0?'class="row1"':'class="row2"';?>>
  88. <?=$kiemduoc?> </td>
  89. </tr>
  90. <? }
  91. if($demkq==100) break;
  92. }
  93. }mysql_free_result($sql);?>
  94. </tbody>
  95. </table>
  96. <div class="clear"></div>
  97. </div>