$content.='<table id="bets_st_table">';
$content.='<tr>';
$content.='<th>BET ID</th>';
$content.='<th>PLAYER</th>';
$content.='<th>TIME</th>';
$content.='<th>BET</th>';
$content.='<th>MULTIPLIER</th>';
$content.='<th>TARGET</th>';
$content.='<th>ROLL</th>';
$content.='<th>PROFIT</th>';
$content.='</tr>';
$suda=0;
while ($my_bet=mysql_fetch_array($my_bets)) {
$content.=($suda==0)?'<tr>':'<tr class="suda">';
$username=mysql_fetch_array(mysql_query("SELECT `alias` FROM `players` WHERE `id`=$my_bet[player] LIMIT 1"));
$chance['under']=floor((1/($my_bet['multiplier']/100)*((100-$settings['house_edge'])/100))*100)/100;
$chance['over']=100-$chance['under'];
$target=($my_bet['under_over']==0)?'<'.sprintf("%.2f",$chance['under']):'>'.sprintf("%.2f",$chance['over']);
$profit=-$my_bet['bet_amount'];
$profit_class='lose';
$plusko=($my_bet['bet_amount']==0)?'-':'';
if ($my_bet['win_lose']==1) {
$profit+=$my_bet['bet_amount']*$my_bet['multiplier'];
$profit_class='win';
$plusko='+';
}
$content.='<td class="betId first">'.$my_bet['id'].'</td>';
$content.='<td>'.$username['alias'].'</td>';
$content.='<td>'.date('H:i:s',strtotime($my_bet['time'])).'</td>';
$content.='<td>'.sprintf("%.8f",$my_bet['bet_amount']).'</td>';
$content.='<td>'.sprintf("%.2f",$my_bet['multiplier']).'</td>';
$content.='<td>'.$target.'</td>';
$content.='<td>'.sprintf("%.2f",$my_bet['result']).'</td>';
$content.='<td class="'.$profit_class.' right last">'.$plusko.sprintf("%.8f",floor($profit*100000000)/100000000).'</td>';
$content.='</tr>';
$suda=($suda==0)?1:0;
}
$content.='</table>';
}
break;
case 'all_bets':
$all_bets=mysql_query("SELECT * FROM `bets` WHERE `bet_amount`!=0 ORDER BY `time` DESC LIMIT 30");
if (mysql_num_rows($all_bets)==0) $content.='<br><br><br><i>No one has bet yet.</i>';
else {
this is for a dice game, of course its just a fraction of its content.
---------------------------------------------------------------------------------------------
$content.='<th>Bet</th>';
$content.='<th>Result</th>';
$content.='<th>Return</th>';
$content.='<th>Time</th>';
$content.='</tr>';
$query=mysql_query("SELECT * FROM `spins` ORDER BY `time` DESC LIMIT 30");
$sl=false;
while ($row=mysql_fetch_array($query)) {
if (mysql_num_rows(mysql_query("SELECT `alias` FROM `players` WHERE `id`=$row[player] LIMIT 1"))!=0) {
$player_inf_=mysql_fetch_array(mysql_query("SELECT `alias` FROM `players` WHERE `id`=$row[player] LIMIT 1"));
$row['player']=$player_inf_['alias'];
}
else $row['player']='-';
$class=($sl==true)?' class="odd"':'';
$content.='<tr'.$class.'>';
$content.='<td>'.$row['id'].'</td>';
$content.='<td>'.$row['player'].'</td>';
$content.='<td><b>'.rtrim(rtrim(sprintf("%0.12f",$row['wager']),'0'),'.').'</b> '.$settings['currency_sign'].'</td>';
$content.='<td><b>'.rtrim(rtrim(sprintf("%0.12f",$row['multiplier']),'0'),'.').'</b>x</td>';
$content.='<td><b>'.rtrim(rtrim(sprintf("%0.12f",($row['wager']*$row['multiplier'])),'0'),'.').'</b> '.$settings['currency_sign'].'</td>';
$content.='<td>'.$row['time'].' CET</td>';
$content.='</tr>';
if ($sl==false) $sl=true; else $sl=false;
}
$content.='</table>';
break;
case 'leaderbord':
$content.='<table id="stats-table">';
$content.='<tr>';
$content.='<th>ID</th>';
$content.='<th>Alias</th>';
$content.='<th>Bet</th>';
$content.='<th>Result</th>';
$content.='<th>Return</th>';
$content.='<th>Time</th>';
$content.='</tr>';
$query=mysql_query("SELECT *,(`wager`*`multiplier`) AS `return` FROM `spins` ORDER BY `return` DESC LIMIT 30");
$sl=false;
while ($row=mysql_fetch_array($query)) {
if (mysql_num_rows(mysql_query("SELECT `alias` FROM `players` WHERE `id`=$row[player] LIMIT 1"))!=0) {
$player_inf_=mysql_fetch_array(mysql_query("SELECT `alias` FROM `players` WHERE `id`=$row[player] LIMIT 1"));
$row['player']=$player_inf_['alias'];
}
else $row['player']='-';
$class=($sl==true)?' class="odd"':'';
$content.='<tr'.$class.'>';
$content.='<td>'.$row['id'].'</td>';
$content.='<td>'.$row['player'].'</td>';
$content.='<td><b>'.$row['wager'].'</b> '.$settings['currency_sign'].'</td>';
$content.='<td><b>'.$row['multiplier'].'</b>x</td>';
$content.='<td><b>'.rtrim(rtrim(sprintf("%0.12f",($row['wager']*$row['multiplier'])),'0'),'.').'</b> '.$settings['currency_sign'].'</td>';
$content.='<td>'.$row['time'].' CET</td>';
$content.='</tr>';
if ($sl==false) $sl=true; else $sl=false;
}
$content.='</table>';
break;
case 'news':
$query=mysql_query("SELECT * FROM `news` ORDER BY `time` DESC");
while ($row=mysql_fetch_array($query)) {
$content.='<div class="news_single">';
$content.=str_replace('
','<i>',str_replace('','</i>',str_replace('
','<br>',str_replace('[/B]','</b>',str_replace('
','<b>',$row['content']))))).'<br><span class="news_single_time">'.$row['time'].'</span>';
$content.='</div>';
}
$content.=' <br>';
break;
case 'fair':
$unique=$_GET['_unique'];
$player=mysql_num_rows(mysql_query("SELECT `id` FROM `players` WHERE `hash`='".prot($unique)."' LIMIT 1"));
if ($player!=0) $player=mysql_fetch_array(mysql_query("SELECT `id`,`server_seed`,`client_seed`,`old_server_seed`,`old_client_seed` FROM `players` WHERE `hash`='".prot($unique)."' LIMIT 1"));
else exit();
$content.='<div id="fair_nice">';
$content.='<span class="seed_hash">Server seed hash: <b>'.hash('sha256',$player['server_seed']).'</b></span>';
$content.='<br><span class="seed_hash">Client seed: <b>'.$player['client_seed'].'</b></span>';
$content.='<br><a href="#" onclick="javascript:randomize();return false;" class="randomize">Set client seed for next spin</a><br>';
$content.='<br><span class="seed_hash">Old server seed: <b>'.$player['old_server_seed'].'</b></span>';
$content.='<br><span class="seed_hash">Old client seed: <b>'.$player['old_client_seed'].'</b></span><br>';
$content.='<br><span class="seed_hash">Formula: <b>((<i>client_seed</i> * 9) Mod 16) + 1</b> = final order in server seed</span><br><br>';
$content.='<br><span class="seed_hash"><b>Served seed values:</b></span>';
$content.='<br><span class="seed_hash">0 = 1.25x</span>';
$content.='<br><span class="seed_hash">1 = 0.25x</span>';
$content.='<br><span class="seed_hash">2 = 2x</span>';
$content.='<br><span class="seed_hash">3 = 0x</span>';
$content.='<br><span class="seed_hash">4 = 2x</span>';
$content.='<br><span class="seed_hash">5 = 0.25x</span>';
$content.='<br><span class="seed_hash">6 = 2x</span>';
this one is for a Wheel game.
BOTH for BITCOINS GAMBLING.
Selling both for 2 bitcoins
http://imgur.com/lre90JQ
http://imgur.com/XNuoKxp
demo : www.wheelofsatoshi.com
Pm or Post, i usually reply very quickly.