Line 150: You bet ".money_alter($steaks+$scraps)."(".money_alter($st eaks)." effective)
should be: You bet ".money_alter($steaks+$scraps)."(".money_alter($steaks)." effective)
this should work, i think:
<?php
include('func_file.php');
if($_SERVER['HTTP_REFERER'] == $referer)
{
page_access($_SERVER['PHP_SELF']);
echo "<p_title>Bookies</p_title><hr width = '800px'>";
if($_SESSION['myid'] == '1' || $_SESSION['myid'] == '2') {
echo "><span class = 'loader:bookies.php?action=panel' id = 'linkage'>Manage games</span><hr width = '800px'>";
}
echo "[<span class = 'loader:bookies.php?action=cat&cat_id=1' id = 'linkage'>Football</span>]
[<span class = 'loader:bookies.php?action=cat&cat_id=2' id = 'linkage'>Hockey</span>]
[<span class = 'loader:bookies.php?action=cat&cat_id=3' id = 'linkage'>Baseball</span>]
[<span class = 'loader:bookies.php?action=cat&cat_id=4' id = 'linkage'>Soccer</span>]
[<span class = 'loader:bookies.php?action=cat&cat_id=5' id = 'linkage'>Boxing</span>]
[<span class = 'loader:bookies.php?action=cat&cat_id=6' id = 'linkage'>Cricket</span>]
[<span class = 'loader:bookies.php?action=cat&cat_id=7' id = 'linkage'>Basketball</span>]
[<span class = 'loader:bookies.php?action=cat&cat_id=8' id = 'linkage'>All</span>]
[<span class = 'loader:bookies.php?action=mybets' id = 'linkage'>Your bets</span>]<hr width = '800px'>";
$_GET['action'] = preg_replace('/[^a-z]/', '', $_GET['action']);
if(!$_GET['action']) {
$_GET['action'] = 'cat';
$_GET['cat_id'] = 8;
}
if(in_array($_GET['action'], array('panel','cat','bet','mybets'))) {
echo "<table width = '800px' class = 'display-stripes'>
<tr>
<td align = 'center'>";
switch($_GET['action']) {
case 'panel' : b_panel(); break;
case 'cat' : view_cat(); break;
case 'bet' : place_bet(); break;
case 'mybets' : view_bets(); break;
}
echo "</td></tr></table>
<hr width = '800px'>
><span class = 'loader:casino.php' id = 'linkage'>Casino</span>
<hr width = '800px'>";
}
}
function b_panel() {
global $user;
if($_SESSION['myid'] == '1' || $_SESSION['myid'] == '2') {
echo "<p_title>Bookies panel</p_title><hr>";
if($_GET['type']=='add') {
$_POST['team1'] = preg_replace('/[^a-zA-Z0-9]/', '', $_POST['team1']);
$_POST['team2'] = preg_replace('/[^a-zA-Z0-9]/', '', $_POST['team2']);
$_POST['gtype'] = preg_replace('/[^0-9]/', '', $_POST['gtype']);
if(!in_array($_POST['gtype'], array(1,2,3,4,5,6,7))) {
$_POST['gtype'] = 1;
}
$_POST['t1oddsmax'] = preg_replace('/[^0-9]/', '', $_POST['t1oddsmax']);
$_POST['t1oddsmin'] = preg_replace('/[^0-9]/', '', $_POST['t1oddsmin']);
$_POST['t2oddsmax'] = preg_replace('/[^0-9]/', '', $_POST['t2oddsmax']);
$_POST['t2oddsmin'] = preg_replace('/[^0-9]/', '', $_POST['t2oddsmin']);
$_POST['gmonth'] = preg_replace('/[^a-zA-Z]/', '', $_POST['gmonth']);
$_POST['gday'] = preg_replace('/[^0-9]/', '', $_POST['gday']);
$_POST['gyear'] = preg_replace('/[^0-9]/', '', $_POST['gyear']);
$_POST['ghrs'] = preg_replace('/[^0-9]/', '', $_POST['ghrs']);
$_POST['gmins'] = preg_replace('/[^0-9]/', '', $_POST['gmins']);
if($_POST['team1']!='' && $_POST['team2']!='' &&
$_POST['t1oddsmax'] && $_POST['t1oddsmin'] && $_POST['t2oddsmax'] && $_POST['t2oddsmin'] &&
$_POST['gmonth'] && $_POST['gday'] && $_POST['gyear']) {
$title = $_POST['team1']." VS ".$_POST['team2'];
$odds1 = $_POST['t1oddsmax'].":".$_POST['t1oddsmin'];
$odds2 = $_POST['t2oddsmax'].":".$_POST['t2oddsmin'];
$ending=strtotime($_POST['gday']." ".$_POST['gmonth']." ".$_POST['gyear']." ".$_POST['ghrs']." hours ".$_POST['gmins']." minutes");
$cat_name = array('Football','Hockey','Baseball','Soccer','Box ing','Cricket','Basketball','All');
if(!$_GET['step']) {
echo "Are you sure you wish to add the <b>".$cat_name[$_POST['gtype']-1]."</b> game(<b>".$title."</b>)
with the following:
Team one: <b>".$_POST['team1']."[".$odds1."]</b> - Team two: <b>".$_POST['team2']."[".$odds2."]</b>
End date: ".date('F j Y', $ending)." - ".date('g:i:s a', $ending)."
<form name = 'add-g' id = 'add-g'>";
foreach($_POST AS $key => $val) {
echo "<input type = 'hidden' name = '".$key."' id = '".$key."' value = '".$val."'>";
}
echo "<button class = 'submit:add-g:bookies.php?action=panel&type=add&step=1' id = 'linkage'>Confirm</button></form>";
}
else
{
$odds = $odds1."-".$odds2;
$sql = "INSERT INTO `bookie_games`
VALUES('NULL',
'".mysql_real_escape_string($title)."',
'".mysql_real_escape_string($_POST['gtype'])."',
'".mysql_real_escape_string($odds)."',
'".mysql_real_escape_string($ending)."')";
mysql_query($sql);
echo "You added the game successfully!";
}
}
else
{
echo warn("Error adding the game!");
}
}
else
{
if($_GET['type']=='results') {
$_GET['id'] = preg_replace('/[^0-9]/', '', $_GET['id']);
$_POST['score1'] = preg_replace('/[^0-9]/', '', $_POST['score1']);
$_POST['score2'] = preg_replace('/[^0-9]/', '', $_POST['score2']);
if($_GET['id'] && $_POST['score1'] && $_POST['score2']) {
$sql = "SELECT *
FROM `bookie_games`
WHERE `bg_id` = '".mysql_real_escape_string($_GET['id'])."'
AND `bg_time` <= '".mysql_real_escape_string(time())."'";
$sql = mysql_query($sql);
if(mysql_num_rows($sql)) {
$tg = mysql_fetch_array($sql);
$odds = explode("-", $tg['bg_odds']);
$teamn = explode(" VS ", $tg['bg_title']);
$cat_name = array('Football','Hockey','Baseball','Soccer','Box ing','Cricket','Basketball','All');
$oddsone = explode(":", $odds[0]);
$oddsmax[1] = $oddsone[0];
$oddsmin[1] = $oddsone[1];
$oddstwo = explode(":", $odds[1]);
$oddsmax[2] = $oddstwo[0];
$oddsmin[2] = $oddstwo[1];
if($_POST['score1'] > $_POST['score2']) {
$winner = 1;
$scoring = "The score was <b>".$_POST['score1']." - ".$_POST['score2']."</b> to <b>".$teamn[$winner-1]."</b>";
}
else
{
if($_POST['score2'] > $_POST['score1']) {
$winner = 2;
$scoring = "The score was <b>".$_POST['score1']." - ".$_POST['score2']."</b> to <b>".$teamn[$winner-1]."</b>";
}
else
{
$winner = 0;
$scoring = "The score was <b>".$_POST['score1']." - ".$_POST['score2']."</b>";
}
}
$sql = "SELECT *
FROM `bookie_bets`
WHERE `bb_game` = '".mysql_real_escape_string($_GET['id'])."'";
$sql = mysql_query($sql);
if(mysql_num_rows($sql)) {
while($gp = mysql_fetch_array($sql)) {
if($gp['bb_team'] == $winner) {
//they won
$times = floor($gp['bb_bet']/$oddsmin[$gp['bb_team']]);
$steaks = $times*$oddsmin[$gp['bb_team']];
$scraps = $gp['bb_bet']-$steaks;
$prize = ($times*$oddsmax[$gp['bb_team']]) + $scraps;
$msg = $teamn[$gp['bb_team']-1]." won the ".$cat_name[$gp['bb_team']-1]." game you bet on.
".$scoring."
You bet ".money_alter($steaks+$scraps)."(".money_alter($steaks)." effective)
with the odds of [".$oddsmax[$gp['bb_team']].":".$oddsmin[$gp['bb_team']]."].
You have won ".money_alter($prize)."!";
in_event($gp['bb_user'], $msg);
credit_money($gp['bb_user'], $prize);
}
else
{
//they lost
$times = floor($gp['bb_bet']/$oddsmin[$gp['bb_team']]);
$steaks = $times*$oddsmin[$gp['bb_team']];
$scraps = $gp['bb_bet']-$steaks;
$prize = ($times*$oddsmax[$gp['bb_team']]) + $scraps;
if($winner == '0') { $wintype = 'drawn'; } else { $wintype = 'lost'; }
$msg = $teamn[$gp['bb_team']-1]." ".$wintype." the ".$cat_name[$gp['bb_team']-1]." game you bet on.
".$scoring."
You bet ".money_alter($gp['bb_bet'])."(".money_alter($steaks)." effective)
with the odds of [".$oddsmax[$gp['bb_team']].":".$oddsmin[$gp['bb_team']]."].
You have lost ".money_alter($steaks);
if($scraps) {
$msg.=" and your ".money_alter($scraps)." was returned!";
credit_money($gp['bb_user'], $scraps);
}
in_event($gp['bb_user'], $msg);
}
}
}
$sql = "DELETE FROM `bookie_games`
WHERE `bg_id` = '".mysql_real_escape_string($tg['bg_id'])."'";
mysql_query($sql);
$sql = "DELETE FROM `bookie_bets`
WHERE `bb_game` = '".mysql_real_escape_string($tg['bg_id'])."'";
mysql_query($sql);
echo "Game <b>\"".$tg['bg_title']."\"</b> ended successfully!";
}
else
{
echo warn("Error ending the game!");
}
}
else
{
echo warn("Error ending the game!");
}
}
else
{
echo "<b>Add a game:</b><hr width = '650px'>";
echo "<form name = 'addg' id = 'addg'>
<table width = '650px' class = 'display-stripes' bgcolor = '#b8b8b8'>
<tr>
<td align = 'right' width = '45%' bgcolor = '#b8b8b8'>
<b>Game teams:</b>
</td>
<td bgcolor = '#b8b8b8'>
</td>
<td align = 'left' width = '45%' bgcolor = '#b8b8b8'>
<input type = 'text' style = 'width: 90px;' name = 'team1' id = 'team1'>
<b>VS</b> <input type = 'text' style = 'width: 90px;' name = 'team2' id = 'team2'>
</td>
</tr>
<tr>
<td align = 'right' width = '45%' bgcolor = '#b8b8b8'>
<b>Game type:</b>
</td>
<td bgcolor = '#b8b8b8'>
</td>
<td align = 'left' width = '45%' bgcolor = '#b8b8b8'>
<select name = 'gtype' id = 'gtype'>
<option value = '1'>
Football
</option>
<option value = '2'>
Hockey
</option>
<option value = '3'>
Baseball
</option>
<option value = '4'>
Soccer
</option>
<option value = '5'>
Boxing
</option>
<option value = '6'>
Cricket
</option>
<option value = '7'>
Basketball
</option>
</select>
</td>
</tr>
<tr>
<td align = 'right' width = '45%' bgcolor = '#b8b8b8'>
<b>Team one odds:</b>
</td>
<td bgcolor = '#b8b8b8'>
</td>
<td align = 'left' width = '45%' bgcolor = '#b8b8b8'>
<select name = 't1oddsmax' id = 't1oddsmax'>";
for($i = 1; $i <=99; $i++) {
echo "<option value = '".$i."'>
".$i."
</option>";
}
echo "</select><b>:</b><select name = 't1oddsmin' id = 't1oddsmin'>";
for($i = 1; $i <=99; $i++) {
echo "<option value = '".$i."'>
".$i."
</option>";
}
echo "</select>
</td>
</tr>
<tr>
<td align = 'right' width = '45%' bgcolor = '#b8b8b8'>
<b>Team two odds:</b>
</td>
<td bgcolor = '#b8b8b8'>
</td>
<td align = 'left' width = '45%' bgcolor = '#b8b8b8'>
<select name = 't2oddsmax' id = 't2oddsmax'>";
for($i = 1; $i <=99; $i++) {
echo "<option value = '".$i."'>
".$i."
</option>";
}
echo "</select><b>:</b><select name = 't2oddsmin' id = 't2oddsmin'>";
for($i = 1; $i <=99; $i++) {
echo "<option value = '".$i."'>
".$i."
</option>";
}
echo "</select>
</td>
</tr>
<tr>
<td align = 'right' width = '45%' bgcolor = '#b8b8b8' valign = 'top'>
<b>Date betting ends:</b>
</td>
<td bgcolor = '#b8b8b8'>
</td>
<td align = 'left' width = '45%' bgcolor = '#b8b8b8'>";
$year = date('o');
$day = date('d');
$month = date('F');
$months = array('january','february','march','april','may',' june',
'july','august','september','october','november',' december');
echo "<table><tr><td align = 'left' style = 'background: #E3E3E3;'><i>Date:</i> <select name = 'gmonth' id = 'gmonth'>";
for($i = 0; $i < count($months); $i++) {
$selected = '';
if(ucfirst($months[$i]) == $month) { $selected = ' SELECTED'; }
echo "<option value = '".$months[$i]."'".$selected.">
".ucfirst($months[$i])."
</option>";
}
echo "</select><b>/</b><select name = 'gday' id = 'gday'>";
for($i = 1; $i <=31; $i++) {
$selected = '';
if($i == $day) { $selected = ' SELECTED'; }
echo "<option value = '".$i."'".$selected.">
".$i."
</option>";
}
echo "</select><b>/</b><select name = 'gyear' id = 'gyear'>";
for($i = $year; $i <=$year+1; $i++) {
echo "<option value = '".$i."'".$selected.">
".$i."
</option>";
}
echo "</select>
<i>Time:</i> <select name = 'ghrs' id = 'ghrs'>";
for($i = 0; $i <=24; $i++) {
echo "<option value = '".$i."'>";
if($i < 10) {
echo "0";
}
echo $i."
</option>";
}
echo "</select><b>:</b><select name = 'gmins' id = 'gmins'>";
for($i = 0; $i <=59; $i++) {
echo "<option value = '".$i."'>";
if($i < 10) {
echo "0";
}
echo $i."
</option>";
}
echo "</select></td></tr></table>
</td>
</tr>
<tr>
<td align = 'center' bgcolor = '#b8b8b8' colspan = '3'>
<button class = 'submit:addg:bookies.php?action=panel&type=add' id = 'linkage'>Add game</button>
</td>
</tr>
</table>
</form>";
echo "<hr width = '650px'><b>End a game:</b><hr width = '650px'>";
echo "<table width = '650px' class = 'display-stripes' bgcolor = '#b8b8b8'>
<tr>
<th>
<b>Game title</b>
</th>
<th>
<b>Date ended</b>
</th>
<th>
<b>Post results</b>
</th>
</tr>";
$sql = "SELECT *
FROM `bookie_games`
WHERE `bg_time` <= '".mysql_real_escape_string(time())."'";
$sql = mysql_query($sql);
if(!mysql_num_rows($sql)) {
echo "<tr><td align = 'center' colspan = '3'><b>No games to show</b></td></tr>";
}
else
{
$num = 0;
while($eg = mysql_fetch_array($sql)) {
$teams = explode(" VS ", $eg['bg_title']);
echo "<tr bgcolor = '".stripe($num)."' valign = 'top'>
<td align = 'left'>
".$eg['bg_title']."
</td>
<td align = 'left'>
".date('F j Y', $eg['bg_time'])."".date('g:i:s a', $eg['bg_time'])."
</td>
<td align = 'right'>
<form name = 'score-".$num."' id = 'score-".$num."'>
<i>".$teams[0]." score:</i> <input type = 'text' style = 'width: 25px;' name = 'score1' id = 'score1'>
<i>".$teams[1]." score:</i> <input type = 'text' style = 'width: 25px;' name = 'score2' id = 'score2'>
<button class = 'submit:score-".$num.":bookies.php?action=panel&type=results&id= ".$eg['bg_id']."' id = 'linkage'>Confirm</button>
</form>
</td>
</tr>";
$num++;
}
}
echo "</table>";
echo "<hr width = '650px'><b>Games ending soon(12hrs or less):</b><hr width = '650px'>";
echo "<table width = '650px' class = 'display-stripes' bgcolor = '#b8b8b8'>
<tr>
<th>
<b>Game title</b>
</th>
<th>
<b>Date ending</b>
</th>
</tr>";
$time_soon = time()+43200;
$sql = "SELECT *
FROM `bookie_games`
WHERE `bg_time` <= '".mysql_real_escape_string($time_soon)."'
AND `bg_time` > '".mysql_real_escape_string(time())."'";
$sql = mysql_query($sql);
if(!mysql_num_rows($sql)) {
echo "<tr><td align = 'center' colspan = '2'><b>No games to show</b></td></tr>";
}
else
{
$num = 0;
while($eg = mysql_fetch_array($sql)) {
echo "<tr bgcolor = '".stripe($num)."'>
<td align = 'left'>
".$eg['bg_title']."
</td>
<td align = 'left'>
".date('F j Y', $eg['bg_time'])." - ".date('g:i:s a', $eg['bg_time'])."
</td>
</tr>";
}
}
echo "</table>";
}
}
}
else
{
echo "You really should not be here!";
}
}
function view_cat() {
global $user;
$_GET['cat_id'] = preg_replace('/[^0-9]/', '', $_GET['cat_id']);
if(!in_array($_GET['cat_id'], array(1,2,3,4,5,6,7,8))) {
echo warn("Invalid cat ID!");
}
else
{
$cat_name = array('Football','Hockey','Baseball','Soccer','Box ing','Cricket','Basketball','All');
echo "<p_title>".ucfirst($cat_name[$_GET['cat_id']-1])." games</p_title><hr>";
echo "<table width = '650px' class = 'display-stripes' bgcolor = '#b8b8b8'>
<tr>
<th colspan = '2'>
<b>Game title</b>
</th>
<th style = 'text-align: center;'>
<b>Date ending</b>
</th>
<th style = 'text-align: right;'>
<b>Place bet(s)</b>
</th>
</tr>";
$sql = "SELECT *
FROM `bookie_games`
WHERE `bg_time` > '".mysql_real_escape_string(time())."'";
if($_GET['cat_id'] < 8) {
$sql.="AND `bg_type` = '".mysql_real_escape_string($_GET['cat_id'])."'";
}
$sql.="ORDER BY `bg_time` ASC";
$sql = mysql_query($sql);
if(!mysql_num_rows($sql)) {
echo "<tr><td align = 'center' colspan = '4'><b>No ".ucfirst($cat_name[$_GET['cat_id']-1])." games to show</b></td></tr>";
}
else
{
$num = 0;
while($eg = mysql_fetch_array($sql)) {
echo "<tr>
<td align = 'center' colspan = '4'>
<form name = 'bet-".$num."' id = 'bet-".$num."'>
<table width = '100%' cellspacing = '0'>
<tr bgcolor = '".stripe($num)."' valign = 'top'>
<td align = 'left' width = '50px'>
<img src = 'images/css/casino/game-".$eg['bg_type'].".png'>
</td>
<td align = 'left'>";
$title_odds = explode(" VS ", $eg['bg_title']);
$odds = explode("-", $eg['bg_odds']);
echo "<b>".$title_odds[0]."[".$odds[0]."]</b> VS <b>".$title_odds[1]."[".$odds[1]."]</b>
".ucfirst($cat_name[$eg['bg_type']-1])."
</td>
<td align = 'center'>
".date('F j Y', $eg['bg_time'])."".date('g:i:s a', $eg['bg_time'])."
</td>
<td align = 'right'>
<i>Team to win:</i><select name = 'team'>
<option value = '1'>
".ucfirst($title_odds[0])."
</option>
<option value = '2'>
".ucfirst($title_odds[1])."
</option>
</select>
<i>Bet:</i><input type = 'text' style = 'width: 50px;' value = '0' name = 'bet' id = 'bet'>
</td>
</tr>
<tr bgcolor = '#000000' height = '30px'>
<td colspan = '4' align = 'center'>
<button class = 'submit:bet-".$num.":bookies.php?action=bet&id=".$eg['bg_id']."' id = 'linkage'>Place bet</button>
</td>
</tr>
<tr>
<td colspan = '4' height = '5px'>
</td>
</tr>
</table>
</form>
</td>
</tr>";
$num++;
}
}
echo "</table>";
}
}
function place_bet() {
global $user;
echo "<p_title>Place bet</p_title><hr>";
$_GET['id'] = preg_replace('/[^0-9]/', '', $_GET['id']);
$_POST['bet'] = preg_replace('/[^0-9]/', '', $_POST['bet']);
$_POST['team'] = preg_replace('/[^0-9]/', '', $_POST['team']);
if($_GET['id'] && $_POST['bet'] && $_POST['team']) {
$sql = "SELECT *
FROM `bookie_games`
WHERE `bg_id` = '".mysql_real_escape_string($_GET['id'])."'
AND `bg_time` > '".mysql_real_escape_string(time())."'";
$sql = mysql_query($sql);
if(mysql_num_rows($sql)) {
if($user['usr_money'] >= $_POST['bet']) {
$bg = mysql_fetch_array($sql);
$teamname = explode(" VS ", $bg['bg_title']);
$teamname = $teamname[$_POST['team']-1];
$oddsmin = explode("-", $bg['bg_odds']);
$odds = $oddsmin[$_POST['team']-1];
$oddsmin = explode(":", $oddsmin[$_POST['team']-1]);
$oddsmin = $oddsmin[1];
$betting = floor($_POST['bet']/$oddsmin);
$betting*=$oddsmin;
if(!$_GET['step']) {
echo "You are betting <b>".money_alter($_POST['bet'])."</b>(".money_alter($betting)." effective) on team <b>".$teamname."</b>
to win with the odds of [".$odds."].
Are you sure you wish to place this bet?
<form name = 'bet-c' id = 'bet-c'>
<input type = 'hidden' name = 'bet' id = 'bet' value = '".$_POST['bet']."'>
<input type = 'hidden' name = 'team' id = 'team' value = '".$_POST['team']."'>
<button class = 'submit:bet-c:bookies.php?action=bet&id=".$_GET['id']."&step=1' id = 'linkage'>Confirm bet</button>
</form>";
}
else
{
$sql = "INSERT INTO `bookie_bets`
VALUES('NULL',
'".mysql_real_escape_string($_SESSION['myid'])."',
'".mysql_real_escape_string($_GET['id'])."',
'".mysql_real_escape_string($_POST['team'])."',
'".mysql_real_escape_string($_POST['bet'])."')";
mysql_query($sql);
echo min_money($_POST['bet']);
echo "Your bet has been placed for a total of <b>".money_alter($_POST['bet'])."</b>.
You can view your bets from the top of this page.
You will receive an event with the results shortly after the game has ended.";
}
}
else
{
echo warn("You dont have enough money to make this bet!");
}
}
else
{
echo warn("This game does not exist!");
}
}
else
{
echo warn("This game does not exist!");
}
}
function view_bets() {
global $user;
echo "<p_title>Your bets</p_title><hr>";
echo "<table width = '100%' class = 'display-stripes'>
<tr>
<th colspan = '2'>
Team betting on/Type
</th>
<th>
Odds
</th>
<th>
Ending date
</th>
<th>
Total bet
</th>
</tr>";
$sql = "SELECT bb.*,bg.*
FROM `bookie_bets` bb
LEFT JOIN `bookie_games` bg
ON bb.bb_game = bg.bg_id
WHERE bb.bb_user = '".mysql_real_escape_string($_SESSION['myid'])."'";
$sql = mysql_query($sql);
if(mysql_num_rows($sql)) {
$num = 0;
$cat_name = array('Football','Hockey','Baseball','Soccer','Box ing','Cricket','Basketball','All');
while($mb = mysql_fetch_array($sql)) {
$teamname = explode(" VS ", $mb['bg_title']);
$teamname = $teamname[$mb['bb_team']-1];
$oddsmin = explode("-", $mb['bg_odds']);
$odds = $oddsmin[$mb['bb_team']-1];
$oddsmin = explode(":", $oddsmin[$mb['bb_team']-1]);
$oddsmin = $oddsmin[1];
$betting = floor($mb['bb_bet']/$oddsmin);
$betting*=$oddsmin;
echo "<tr bgcolor = '".stripe($num)."' valign = 'top'>
<td width = '50px'>
<img src = 'images/css/casino/game-".$mb['bg_type'].".png'>
</td>
<td>
".$teamname." - ".ucfirst($cat_name[$mb['bg_type']-1])."
</td>
<td>
[".$odds."]
</td>
<td>
".date('F j Y', $mb['bg_time'])."".date('g:i:s a', $mb['bg_time'])."
</td>
<td>
".money_alter($mb['bb_bet'])."(".money_alter($betting)." effective)
</td>
</tr>";
$num++;
}
}
else
{
echo "<tr><td colspan = '5'>You have no bets at this time.</td></tr>";
}
echo "</table>";
}
?>