1. PHP / Говнокод #18340

    +143

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    37. 37
    38. 38
    39. 39
    40. 40
    41. 41
    42. 42
    43. 43
    44. 44
    45. 45
    46. 46
    47. 47
    48. 48
    49. 49
    50. 50
    51. 51
    52. 52
    53. 53
    54. 54
    55. 55
    56. 56
    57. 57
    58. 58
    59. 59
    60. 60
    61. 61
    62. 62
    63. 63
    64. 64
    65. 65
    66. 66
    67. 67
    68. 68
    69. 69
    70. 70
    71. 71
    72. 72
    73. 73
    74. 74
    75. 75
    76. 76
    77. 77
    78. 78
    79. 79
    80. 80
    81. 81
    82. 82
    83. 83
    84. 84
    85. 85
    86. 86
    87. 87
    88. 88
    89. 89
    90. 90
    91. 91
    92. 92
    93. 93
    94. 94
    95. 95
    96. 96
    97. 97
    //выбираем игру для которой будем выводить таблицу
    		$query="SELECT * FROM a_stavki WHERE igra='$igra0' AND datigr='$datigr0'";
    		$db->setQuery($query);
    		$results0 = $db->loadObjectList();
    		if($userstavka1=="1"){$nam_1=$procent;}
    		if($userstavka1=="2"){$nam_2=$procent;}
    		if($userstavka1=="Х"){$nam_X=$procent;}
    		if($userstavka1=="ТБ"){$nam_TB=$procent;}
    		if($userstavka1=="ТМ"){$nam_TM=$procent;}
    		if($userstavka1=="ТБ2,5"){$nam_TB25=$procent;}
    		if($userstavka1=="ТМ2,5"){$nam_TM25=$procent;}
    		if($userstavka1=="ТБ3,5"){$nam_TB35=$procent;}
    		if($userstavka1=="ТМ3,5"){$nam_TM35=$procent;}
    		if($userstavka1=="ТБ4,5"){$nam_TB45=$procent;}
    		if($userstavka1=="ТМ4,5"){$nam_TM45=$procent;}
    		if($userstavka1=="ТБ5,5"){$nam_TB55=$procent;}
    		if($userstavka1=="ТМ5,5"){$nam_TM55=$procent;}
    		if($userstavka1=="ТБ150,5"){$nam_TB1505=$procent;}
    		if($userstavka1=="ТМ150,5"){$nam_TM1505=$procent;}
    		if($userstavka1=="ТБ160,5"){$nam_TB1605=$procent;}
    		if($userstavka1=="ТМ160,5"){$nam_TM1605=$procent;}
    		if($userstavka1=="1x"){$nam_1x=$procent;}
    		if($userstavka1=="x2"){$nam_x2=$procent;}
    		$stavok=0;
    		 foreach ($results0 as $note0) 
    		 {//бежим циклом по таблице выбирая все ставки конкретной игры
    		 $datigr1=$note0->datigr;
    		 $userstavka1=$note0->userstavka;
    		$query="SELECT *,COUNT('$userstavka1') AS OrderTotal FROM a_stavki WHERE userstavka='$userstavka1' AND igra='$igra0' AND datigr='$datigr0'";
    		$db->setQuery($query);
    		$results = $db->loadObjectList();
    		if($results){
    		 foreach ($results as $note) 
    		 {
    		 $stavok=$note->OrderTotal;
    		 }
    		}
    		 $stavok=($stavok/$allstav)*100;
    		 //$stavok=substr($stavok,0,2);
    		 $procent="<div class='grafcss0'><p class='grafcss' style='width:".$stavok."%'> &nbsp </p></div>";
    		if($nam_1!=''){$rez.="<tr><td>1</td><td>".$nam_1."</td></tr>";}
    		if($nam_2!=''){$rez.="<tr><td>2</td><td>".$nam_2."</td></tr>";}
    		if($nam_X!=''){$rez.="<tr><td>Х</td><td>".$nam_X."</td></tr>";}
    		if($nam_TB!=''){$rez.="<tr><td>ТБ</td><td>".$nam_TB."</td></tr>";}
    		if($nam_TM!=''){$rez.="<tr><td>ТМ</td><td>".$nam_TM."</td></tr>";}
    		if($nam_TB25!=''){$rez.="<tr><td>ТБ2,5</td><td>".$nam_TB25."</td></tr>";}
    		if($nam_TM25!=''){$rez.="<tr><td>ТМ2,5</td><td>".$nam_TM25."</td></tr>";}
    		if($nam_TB35!=''){$rez.="<tr><td>ТБ3,5</td><td>".$nam_TB35."</td></tr>";}
    		if($nam_TM35!=''){$rez.="<tr><td>ТМ3,5</td><td>".$nam_TM35."</td></tr>";}
    		if($nam_TB45!=''){$rez.="<tr><td>ТБ4,5</td><td>".$nam_TB45."</td></tr>";}
    		if($nam_TM45!=''){$rez.="<tr><td>ТМ4,5</td><td>".$nam_TM45."</td></tr>";}
    		if($nam_TB55!=''){$rez.="<tr><td>ТБ5,5</td><td>".$nam_TB55."</td></tr>";}
    		if($nam_TM55!=''){$rez.="<tr><td>ТМ5,5</td><td>".$nam_TM55."</td></tr>";}
    		if($nam_TB1505!=''){$rez.="<tr><td>ТБ150,5</td><td>".$nam_TB1505."</td></tr>";}
    		if($nam_TM1505!=''){$rez.="<tr><td>ТМ150,5</td><td>".$nam_TM1505."</td></tr>";}
    		if($nam_TB1605!=''){$rez.="<tr><td>ТБ160,5</td><td>".$nam_TB1605."</td></tr>";}
    		if($nam_TM1605!=''){$rez.="<tr><td>ТМ160,5</td><td>".$nam_TM1605."</td></tr>";}
    		if($nam_1x!=''){$rez.="<tr><td>1x</td><td>".$nam_1x."</td></tr>";}
    		if($nam_x2!=''){$rez.="<tr><td>x2</td><td>".$nam_x2."</td></tr>";}
    		}//-------end $results0
    
    		$rez="<tr><td style='width:100px;'>ставка</td><td>поставило в %</td></tr>";
    		if($nam_1!=''){$rez.="<tr><td>1</td><td>".$nam_1."</td></tr>";}
    		if($nam_2!=''){$rez.="<tr><td>2</td><td>".$nam_2."</td></tr>";}
    		if($nam_X!=''){$rez.="<tr><td>Х</td><td>".$nam_X."</td></tr>";}
    		if($nam_TB!=''){$rez.="<tr><td>ТБ</td><td>".$nam_TB."</td></tr>";}
    		if($nam_TM!=''){$rez.="<tr><td>ТМ</td><td>".$nam_TM."</td></tr>";}
    		if($nam_TB25!=''){$rez.="<tr><td>ТБ2,5</td><td>".$nam_TB25."</td></tr>";}
    		if($nam_TM25!=''){$rez.="<tr><td>ТМ2,5</td><td>".$nam_TM25."</td></tr>";}
    		if($nam_TB35!=''){$rez.="<tr><td>ТБ3,5</td><td>".$nam_TB35."</td></tr>";}
    		if($nam_TM35!=''){$rez.="<tr><td>ТМ3,5</td><td>".$nam_TM35."</td></tr>";}
    		if($nam_TB45!=''){$rez.="<tr><td>ТБ4,5</td><td>".$nam_TB45."</td></tr>";}
    		if($nam_TM45!=''){$rez.="<tr><td>ТМ4,5</td><td>".$nam_TM45."</td></tr>";}
    		if($nam_TB55!=''){$rez.="<tr><td>ТБ5,5</td><td>".$nam_TB55."</td></tr>";}
    		if($nam_TM55!=''){$rez.="<tr><td>ТМ5,5</td><td>".$nam_TM55."</td></tr>";}
    		if($nam_TB1505!=''){$rez.="<tr><td>ТБ150,5</td><td>".$nam_TB1505."</td></tr>";}
    		if($nam_TM1505!=''){$rez.="<tr><td>ТМ150,5</td><td>".$nam_TM1505."</td></tr>";}
    		if($nam_TB1605!=''){$rez.="<tr><td>ТБ160,5</td><td>".$nam_TB1605."</td></tr>";}
    		if($nam_TM1605!=''){$rez.="<tr><td>ТМ160,5</td><td>".$nam_TM1605."</td></tr>";}
    		if($nam_1x!=''){$rez.="<tr><td>1x</td><td>".$nam_1x."</td></tr>";}
    		if($nam_x2!=''){$rez.="<tr><td>x2</td><td>".$nam_x2."</td></tr>";}
    		$nam_1='';
    		$nam_2='';
    		$nam_X='';
    		$nam_TB='';
    		$nam_TM='';
    		$nam_TB25='';
    		$nam_TM25='';
    		$nam_TB35='';
    		$nam_TM35='';
    		$nam_TB45='';
    		$nam_TM45='';
    		$nam_TB55='';
    		$nam_TM55='';
    		$nam_TB1505='';
    		$nam_TM1505='';
    		$nam_TB1605='';

    Фрилансер и джумла....Вот так мне повезло....

    Запостил: loikmaksim, 15 Июня 2015

    Комментарии (2) RSS

    Добавить комментарий