- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
- 94
- 95
- 96
- 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."%'>   </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='';
1024-- 16.06.2015 17:14 # 0
guest 16.06.2015 17:20 # +1
да, мой тигр