$league_qry=mysqli_query($link,"select league_no from ats_league1 where league_name='$league'");
list($lno)=mysqli_fetch_array($league_qry);
#--taking current date
include "game_times.php";
//$startdate=$enddate='2005-10-14';
#taking pitchers name if MLB
if($league=='MLB')
{
$roadpitcher=$name1[7];
$roadpithand=$name1[8];
$homepitcher=$name1[9];
$homepithand=$name1[10];
$roadgameno=$name1[11];
$homegameno=$name1[12];
}
else
{
$roadgameno=$name1[7];
$homegameno=$name1[8];
}
$league1=strtolower($league);
$table=$league1.'_teams';
if($league=='CFL')
{
$baseimgpath='../atsdb2/'.$league1.'/'.$league1.'_db3_images/';
$img1=$baseimgpath.$roadteam.'.gif';
$img2=$baseimgpath.$hometeam.'.gif';
if($roadteam=='')
$img1='dummy1.jpg';
if($hometeam=='')
$img2='dummy1.jpg';
}
elseif($league=='NFL')
{
$baseimgpath='../atsdb2/'.$league1.'/'.$league1.'_images/';
$img1=$baseimgpath.$roadteam.'.gif';
$img2=$baseimgpath.$hometeam.'.gif';
if($roadteam=='')
$img1='dummy1.jpg';
if($hometeam=='')
$img2='dummy1.jpg';
}
else
{
$baseimgpath='../atsdb2/'.$league1.'/'.$league1.'_images/';
$img1=$baseimgpath.$roadteam1.'.gif';
$img2=$baseimgpath.$hometeam1.'.gif';
if($roadteam1=='')
$img1='dummy1.jpg';
if($hometeam1=='')
$img2='dummy1.jpg';
}
/*----------------Collecting The team Name for Numbers Report Link---------------------*/
#------HOME TEAM
if($league=='MLB')
{
$hqry=mysqli_query($link,"select team_id,alias_teamname from mlb_teams where team_name='$hometeam'");
while($hrow=mysqli_fetch_array($hqry))
{
$home_team=$hrow['alias_teamname'];
$home_teamid=$hrow['team_id'];
}
$hteam=$home_team;
}
elseif($table=='nfl_teams')
{
$hqry=mysqli_query($link,"select team_id,team_name from $table where team_name='$hometeam'");
while($hrow=mysqli_fetch_array($hqry))
{
$home_team=$hrow['team_name'];
$home_teamid=$hrow['team_id'];
}
$hteam=$home_team;
}
else
{
$hqry=mysqli_query($link,"select team_id,team_name from $table where team_name='$hometeam'");
while($hrow=mysqli_fetch_array($hqry))
{
$home_team=$hrow['team_name'];
$home_teamid=$hrow['team_id'];
}
$hteam=$home_team;
}
#-------ROAD TEAM
if($league=='MLB')
{
$rqry=mysqli_query($link,"select team_id,alias_teamname from mlb_teams where team_name='$roadteam'");
while($rrow=mysqli_fetch_array($rqry))
{
$road_team=$rrow['alias_teamname'];
$road_teamid=$rrow['team_id'];
}
$rteam=$road_team;
}
elseif($table=='nfl_teams')
{
$rqry=mysqli_query($link,"select team_id,team_name from $table where team_name='$roadteam'");
while($rrow=mysqli_fetch_array($rqry))
{
$road_team=$rrow['team_name'];
$road_teamid=$rrow['team_id'];
}
$rteam=$road_team;
}
else
{
$rqry=mysqli_query($link,"select team_id,team_name from $table where team_name='$roadteam'");
while($rrow=mysqli_fetch_array($rqry))
{
$road_team=$rrow['team_name'];
$road_teamid=$rrow['team_id'];
}
$rteam=$road_team;
}
/*----------------Collecting The team Name for Numbers Report Link---------------------*/
?>
ATS Matchups :- |
The ATS stats betting matchups section is based on betting trends against the spread for each team off a certain situation. In fact, the ATS Matchups section is where you will find team trends and system trends. Normally a "team trend" is when one team is in a specific situation and a "system trend" is when ANY sports team was in the same situation. The sports betting term "ATS" stands for "Against the Spread" and each record you see in this area are based on point spread result from the description query in the left column. Furthermore, the ATS stats Matchups on this page are based when a team is a either a Home Favorite, Home Underdog, Road Favorite or Road Underdog and they are coming off a past game that had different situational outcomes. Every sports gambling stat on these pages are based that a team is coming off a win, lost, tie and many other various circumstances.
|
$road_side="";
$home_side="";
$over_disp="";
$linetotal_qry=mysqli_query($link,"select * from new_asp_schedule where game_date = '$date' and league_no='$lno' and game_no1='$roadgameno' and game_no2='$homegameno'");
while($row=mysqli_fetch_array($linetotal_qry))
{
$team1_spread=$row['team1_spread'];
$team2_spread=$row['team2_spread'];
$team1_ML=$row['team1_ML'];
$team2_ML=$row['team2_ML'];
$game_total=$row['game_total'];
if($lno=='5' || $lno=='7')
{
$road_side=$team1_ML;
$home_side=$team2_ML;
$over_disp=$game_total;
}
else
{
$road_side=$team1_spread;
$home_side=$team2_spread;
$over_disp=$game_total;
}
}
?>
O/U:
Pitcher : ()}?>
|
Vs.
Date: Time: |
O/U:
Pitcher :()}?>
|
Star System : 35% or lower = 60%-79%= 80%-100%= |
You Are Here ATS MATCHUPS REPORT |
#-----collecting team trends for road team
//echo "select * from v5random_queries where league_no='$lno' and game_date='$date' and game_number='$roadgameno' and (team_a='$roadteamid') and message not like 'When ANY%' ";
$random_qry=mysqli_query($link,"select * from v5random_queries where league_no='$lno' and game_date='$date' and game_number='$roadgameno' and (team_a='$roadteamid') and message not like 'When ANY%' ");
$ran_num=mysqli_num_rows($random_qry);
if($pacific_time>='05:45:00' and (!$ran_num))
{
?>
Due to the late line release on this game, the system will update this page at 3:00pm EST. |
}
if(!$ran_num)
{
?>
Random Team Trends |
Random Team Trends Not Found |
}
ELSE
{
?>
20 Team Trends |
}else{?>
20 Team Trends |
}?>
|
ATS | }?>
SU |
O/U |
Description |
Win-Loss-Push | }?>
Win-Loss-Push |
Over-Under-Push |
Click on description to see Predictions on next game |
Click on records | }?>
Click on records |
Click on records |
while($random_row1=mysqli_fetch_array($random_qry))
{
$ran_statsid1=$random_row1['random_id'];
$ran_message1=$random_row1['message'];
if(preg_match('/~/',$ran_message1))
{
$ran_message1=preg_replace('/~/','-',$ran_message1);
}
$ran_ats_count1=$random_row1['ats_count'];
$ran_su_count1=$random_row1['su_count'];
$ran_ou_count1=$random_row1['over_under'];
#-----Check if the sum of w-l-t records is less than 3 then show it on userside
$ran_sucounter=explode("-",$ran_su_count1);
$ran_sucountwin=$ran_sucounter[0];
$ran_sucountlost=$ran_sucounter[1];
$ran_sucounttie=$ran_sucounter[2];
//$ran_sutotal_wlt=$ran_sucountwin+$ran_sucountlost+$ran_sucounttie;
$ran_sutotal_wlt=$ran_sucountwin+$ran_sucountlost;
#-----------#
$ran_atscounter=explode("-",$ran_ats_count1);
$ran_atscountwin=$ran_atscounter[0];
$ran_atscountlost=$ran_atscounter[1];
$ran_atscounttie=$ran_atscounter[2];
//$ran_atstotal_wlt=$ran_atscountwin+$ran_atscountlost+$ran_atscounttie;
$ran_atstotal_wlt=$ran_atscountwin+$ran_atscountlost;
//echo "ran_atstotal_wlt=$ran_atstotal_wlt ";
#-----------#
$ran_oucounter=explode("-",$ran_ou_count1);
$ran_oucountwin=$ran_oucounter[0];
$ran_oucountlost=$ran_oucounter[1];
$ran_oucounttie=$ran_oucounter[2];
//$ran_outotal_wlt=$ran_oucountwin+$ran_oucountlost+$ran_oucounttie;
$ran_outotal_wlt=$ran_oucountwin+$ran_oucountlost;
#-----------#
$ran_over_under1=$random_row1['over_under'];
$ran_su_per1=$random_row1['su_percentage'];
$ran_su_per1=trim($ran_su_per1);
$ran_ats_per1=$random_row1['ats_percentage'];
$ran_ats_per1=trim($ran_ats_per1);
$ran_ou_per1=$random_row1['ou_percentage'];
$ran_ou_per1=trim($ran_ou_per1);
#--su per/star
if(($ran_sutotal_wlt>='10') && ($ran_su_per1>"0.00" && $ran_su_per1<= "35.00"))
{$ran_su_star=$star3; }
elseif(($ran_sutotal_wlt>='10') && ($ran_su_per1>="60.00" && $ran_su_per1<= "79.00"))
{$ran_su_star=$star1; }
elseif(($ran_sutotal_wlt>='10') && ($ran_su_per1>="80.00" && $ran_su_per1<= "100.00"))
{$ran_su_star=$star2; }
else{$ran_su_star="";}
#--ats per/star
//echo "ran_ats_per1=$ran_ats_per1 ";
if(($ran_atstotal_wlt>='10') && ($ran_ats_per1> "0.00" && $ran_ats_per1<= "35.00"))
{$ran_ats_star=$star3; }
elseif(($ran_atstotal_wlt>='10') && ($ran_ats_per1>="60.00" && $ran_ats_per1<= "79.00"))
{$ran_ats_star=$star1; }
elseif(($ran_atstotal_wlt>='10') && ($ran_ats_per1>="80.00" && $ran_ats_per1<= "100.00") )
{$ran_ats_star=$star2; }
else{$ran_ats_star=""; }
#--ou per/star
if(($ran_outotal_wlt>='10') && ($ran_ou_per1> "0.00" && $ran_ou_per1<= "35.00"))
{$ran_ou_star=$star3; }
elseif(($ran_outotal_wlt>='10') && ($ran_ou_per1>="60.00" && $ran_ou_per1<= "79.00"))
{$ran_ou_star=$star1; }
elseif(($ran_outotal_wlt>='10') && ($ran_ou_per1>="80.00" && $ran_ou_per1<= "100.00"))
{$ran_ou_star=$star2; }
else{$ran_ou_star=""; }
//echo "ran_ats_star=$ran_ats_star ";
#-----Check if the sum of w-l-t records is less than 3 then dont show it on userside
if($ran_sutotal_wlt >=3)
{
?>
|
#-----Check if the sum of w-l-t records is less than 10 then dont show stars on userside
if($league!='MLB')
{
?>
|
}#end if($league!='MLB')
?>
|
|
}#if($ran_sutotal_wlt >=3)
}#end while
?>
}#end if r_roadnum
?>
#------colllecting team trends for home team
$random_qry=mysqli_query($link,"select * from v5random_queries where league_no='$lno' and game_date='$date' and game_number='$homegameno' and (team_a='$hometeamid') and message not like 'When ANY%'");
$ran_num=mysqli_num_rows($random_qry);
if(!$ran_num)
{
?>
Random Team Trends |
Team Trends Not Found |
}
ELSE
{
?>
20 Team Trends |
}else{?>
20 Team Trends |
}?>
|
ATS | }?>
SU |
O/U |
Description |
Win-Loss-Push | }?>
Win-Loss-Push |
Over-Under-Push |
Click on description to see Predictions on next game |
Click on records | }?>
Click on records |
Click on records |
while($random_row1=mysqli_fetch_array($random_qry))
{
$ran_statsid1=$random_row1['random_id'];
$ran_message1=$random_row1['message'];
if(preg_match('/~/',$ran_message1))
{
$ran_message1=preg_replace('/~/','-',$ran_message1);
}
$ran_ats_count1=$random_row1['ats_count'];
$ran_su_count1=$random_row1['su_count'];
$ran_ou_count1=$random_row1['over_under'];
#-----Check if the sum of w-l-t records is less than 3 then show it on userside
$ran_sucounter=explode("-",$ran_su_count1);
$ran_sucountwin=$ran_sucounter[0];
$ran_sucountlost=$ran_sucounter[1];
$ran_sucounttie=$ran_sucounter[2];
//$ran_sutotal_wlt=$ran_sucountwin+$ran_sucountlost+$ran_sucounttie;
$ran_sutotal_wlt=$ran_sucountwin+$ran_sucountlost;
#----------#
$ran_atscounter=explode("-",$ran_ats_count1);
$ran_atscountwin=$ran_atscounter[0];
$ran_atscountlost=$ran_atscounter[1];
$ran_atscounttie=$ran_atscounter[2];
//$ran_atstotal_wlt=$ran_atscountwin+$ran_atscountlost+$ran_atscounttie;
$ran_atstotal_wlt=$ran_atscountwin+$ran_atscountlost;
#-----------#
$ran_oucounter=explode("-",$ran_ou_count1);
$ran_oucountwin=$ran_oucounter[0];
$ran_oucountlost=$ran_oucounter[1];
$ran_oucounttie=$ran_oucounter[2];
//$ran_outotal_wlt=$ran_oucountwin+$ran_oucountlost+$ran_oucounttie;
$ran_outotal_wlt=$ran_oucountwin+$ran_oucountlost;
#----------#
$ran_over_under1=$random_row1['over_under'];
$ran_su_per1=$random_row1['su_percentage'];
$ran_su_per1=trim($ran_su_per1);
$ran_ats_per1=$random_row1['ats_percentage'];
$ran_ats_per1=trim($ran_ats_per1);
$ran_ou_per1=$random_row1['ou_percentage'];
$ran_ou_per1=trim($ran_ou_per1);
#--su per/star
if(($ran_sutotal_wlt>='10') && ($ran_su_per1>"0.00" && $ran_su_per1<= "35.00"))
{$ran_su_star=$star3; }
elseif(($ran_sutotal_wlt>='10') && ($ran_su_per1>="60.00" && $ran_su_per1<= "79.00"))
{$ran_su_star=$star1; }
elseif(($ran_sutotal_wlt>='10') && ($ran_su_per1>="80.00" && $ran_su_per1<= "100.00"))
{$ran_su_star=$star2; }
else{$ran_su_star="";}
#--ats per/star
if(($ran_atstotal_wlt>='10') && ($ran_ats_per1> "0.00" && $ran_ats_per1<= "35.00"))
{$ran_ats_star=$star3; }
elseif(($ran_atstotal_wlt>='10') && ($ran_ats_per1>="60.00" && $ran_ats_per1<= "79.00"))
{$ran_ats_star=$star1; }
elseif(($ran_atstotal_wlt>='10') && ($ran_ats_per1>="80.00" && $ran_ats_per1<= "100.00") )
{$ran_ats_star=$star2; }
else{$ran_ats_star=""; }
#--ou per/star
if(($ran_outotal_wlt>='10') && ($ran_ou_per1> "0.00" && $ran_ou_per1<= "35.00"))
{$ran_ou_star=$star3; }
elseif(($ran_outotal_wlt>='10') && ($ran_ou_per1>="60.00" && $ran_ou_per1<= "79.00"))
{$ran_ou_star=$star1; }
elseif(($ran_outotal_wlt>='10') && ($ran_ou_per1>="80.00" && $ran_ou_per1<= "100.00"))
{$ran_ou_star=$star2; }
else{$ran_ou_star=""; }
#-----Check if the sum of w-l-t records is less than 3 then dont show it on userside
if($ran_sutotal_wlt >=3)
{
?>
|
#-----Check if the sum of w-l-t records is less than 10 then dont show stars on userside
if($league!='MLB')
{
?>
|
}#end if($league!='MLB')
?>
|
|
}#if($ran_sutotal_wlt >=3)
}#end while
?>
}#end if r_roadnum
?>
mysqli_close($link);
if($pst=="true")
{
}
elseif($pstpicks=="true")
{
}
else
{
require "Templates/footer.inc.php";
}
?> |