"; #Green Star Image Path $star1=""; #Blue Star Image Path $star2=""; #Red Star Image Path $star3=""; ?> "; $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'; } if($league=='MLB') { $rteamqry=mysqli_query($link,"select alias_teamname from mlb_teams where team_id='$roadteamid' "); list($rteam)=mysqli_fetch_array($rteamqry); $hteamqry=mysqli_query($link,"select alias_teamname from mlb_teams where team_id='$hometeamid' "); list($hteam)=mysqli_fetch_array($hteamqry); } else { $rteam=$roadteam; $hteam=$hometeam; } $select=$date.','.$time.','.$league.','.$roadgameno.','.$homegameno; $selval=explode(",",$select); $gdate=$selval[0]; $gtime=$selval[1]; $league=$selval[2]; $gameno1=$selval[3]; $gameno2=$selval[4]; $val=$league; include "game_times.php"; if($league=='NFL' || $league=='NCAAF' || $league=='NBA' || $league=='NHL') { $curr_month=date('m'); if($curr_month>='08') $cur_year=date('Y'); else $cur_year=date('Y')-1; $next_year=$cur_year+1; } else { $cur_year=date('Y'); } if($league=='NFL') { $start_month='09' ;$end_month='02'; $end_date=$next_year.'-'.$end_month; $start_date=$cur_year.'-'.$start_month; $dateclause="( left(date,7) between '$start_date' and '$end_date' )"; } elseif($league=='NCAAF') { $start_month='08' ;$end_month='02'; $end_date=$next_year.'-'.$end_month; $start_date=$cur_year.'-'.$start_month; $dateclause="( left(date,7) between '$start_date' and '$end_date' )"; } elseif($league=='NBA') { $start_month='10' ;$end_month='06'; $end_date=$next_year.'-'.$end_month; $start_date=$cur_year.'-'.$start_month; $dateclause="( left(date,7) between '$start_date' and '$end_date' )"; } elseif($league=='NHL') { $start_month='09' ;$end_month='06'; $end_date=$next_year.'-'.$end_month; $start_date=$cur_year.'-'.$start_month; $dateclause="( left(date,7) between '$start_date' and '$end_date' )"; } elseif($league=='CFL') { $start_month='06' ;$end_month='11'; $end_date=$cur_year.'-'.$end_month; $start_date=$cur_year.'-'.$start_month; $dateclause="( left(date,7) between '$start_date' and '$end_date' )"; } elseif($league=='MLB') { $start_month='03' ;$end_month='10'; $end_date=$cur_year.'-'.$end_month; $start_date=$cur_year.'-'.$start_month; $dateclause="( left(date,7) between '$start_date' and '$end_date' )"; } else { } $gleague=$val; //echo "aaaaaaaaaa==========$gleague"; switch($gleague) { case'MLB': $forval='(RF)'; $againstval='(RA)'; break; case'NHL': $forval='(GF)'; $againstval='(GA)'; break; case'NBA': $forval='(PF)'; $againstval='(PA)'; break; case'NFL': $forval='(PF)'; $againstval='(PA)'; break; case'NCAAF': $forval='(PF)'; $againstval='(PA)'; break; case'CFB': $forval='(PF)'; $againstval='(PA)'; break; case'CFL': $forval='(PF)'; $againstval='(PA)'; break; } //echo "select league_no from ats_league1 where league_name='$gleague' "; $leagueqry=mysqli_query($link,"select league_no from ats_league1 where league_name='$gleague' "); list($lno)=mysqli_fetch_array($leagueqry); /// pitcher_last3_game pitcher_last5_game pitcher_last7_game pitcher_last10_game pitcher_last15_game //echo "select league_name, game_status, game_date, game_time,game_no1,game_no2,game_total,team1, team2 , pitcher1 , pitcher1_hand , pitcher2 , pitcher2_hand , team1_spread , team2_spread , team1_ML , team2_ML , last_game , current_game , next_game , last3_game , last5_game, last7_game, last10_game, last15_game ,pitcher_last3_game , pitcher_last5_game , pitcher_last7_game , pitcher_last10_game , pitcher_last15_game , goals_last3 , goals_last5 , goals_last7 ,goals_last10 , goals_last15, road_situations, home_situations from ats_quick_stats where league_name='$gleague' and game_date='$gdate' and game_no1='$gameno1' and game_no2='$gameno2'
"; $selqry=mysqli_query($link,"select league_name, game_status, game_date, game_time,game_no1,game_no2,game_total,team1, team2 , pitcher1 , pitcher1_hand , pitcher2 , pitcher2_hand , team1_spread , team2_spread , team1_ML , team2_ML , last_game , current_game , next_game , last3_game , last5_game, last7_game, last10_game, last15_game ,pitcher_last3_game , pitcher_last5_game , pitcher_last7_game , pitcher_last10_game , pitcher_last15_game , goals_last3 , goals_last5 , goals_last7 ,goals_last10 , goals_last15, road_situations, home_situations from ats_quick_stats where league_name='$gleague' and game_date='$gdate' and game_no1='$gameno1' and game_no2='$gameno2' "); list ($league,$game_status,$game_date ,$game_time ,$game_no1 ,$game_no2 ,$game_total ,$team1 ,$team2 ,$pitcher1 ,$pitcher1_hand ,$pitcher2 ,$pitcher2_hand ,$team1_spread ,$team2_spread ,$team1_ML ,$team2_ML ,$last_game ,$current_game ,$next_game ,$last3_game ,$last5_game , $last7_game ,$last10_game ,$last15_game ,$pitcher_last3_game , $pitcher_last5_game , $pitcher_last7_game , $pitcher_last10_game , $pitcher_last15_game ,$goals_last3 ,$goals_last5 , $goals_last7 ,$goals_last10 ,$goals_last15 ,$road_situations ,$home_situations )=mysqli_fetch_array($selqry); //echo "road_situations=$road_situations
"; //echo "home_situations=$home_situations
"; $gametiming=explode(":",$game_time); $gamehrs=$gametiming[0]; if($gamehrs>12) { $gamehr=$gamehrs-12; $ampm=' PM '; } elseif($gamehrs==12) { $gamehr=$gamehrs; $ampm=' PM '; } else { $gamehr=$gamehrs; $ampm=' AM '; } $gametimedisp=$gamehr.':'.$gametiming[1].$ampm; $lastgame=explode("~",$last_game); $road_lastgame=$lastgame[0]; $home_lastgame=$lastgame[1]; $currentgame=explode("~",$current_game); $road_currentgame=$currentgame[0]; $home_currentgame=$currentgame[1]; $nextgame=explode("~",$next_game); $road_nextgame=$nextgame[0]; $home_nextgame=$nextgame[1]; $last3game=explode("~",$last3_game); $road_last3game=$last3game[0]; $home_last3game=$last3game[1]; $last5game=explode("~",$last5_game); $road_last5game=$last5game[0]; $home_last5game=$last5game[1]; $last7game=explode("~",$last7_game); $road_last7game=$last7game[0]; $home_last7game=$last7game[1]; $last10game=explode("~",$last10_game); $road_last10game=$last10game[0]; $home_last10game=$last10game[1]; $last15game=explode("~",$last15_game); $road_last15game=$last15game[0]; $home_last15game=$last15game[1]; ##################### $pitcherlast3game=explode("^",$pitcher_last3_game); $road_pitcherlast3game=$pitcherlast3game[0]; $home_pitcherlast3game=$pitcherlast3game[1]; $Rlast3pitgame=explode("~",$road_pitcherlast3game); $roadWL_last3pitgame=$Rlast3pitgame[0]; $roadRUNS_last3pitgame=$Rlast3pitgame[1]; $Hlast3pitgame=explode("~",$home_pitcherlast3game); $homeWL_last3pitgame=$Hlast3pitgame[0]; $homeRUNS_last3pitgame=$Hlast3pitgame[1]; ########## $pitcherlast5game=explode("^",$pitcher_last5_game); $road_pitcherlast5game=$pitcherlast5game[0]; $home_pitcherlast5game=$pitcherlast5game[1]; $Rlast5pitgame=explode("~",$road_pitcherlast5game); $roadWL_last5pitgame=$Rlast5pitgame[0]; $roadRUNS_last5pitgame=$Rlast5pitgame[1]; $Hlast5pitgame=explode("~",$home_pitcherlast5game); $homeWL_last5pitgame=$Hlast5pitgame[0]; $homeRUNS_last5pitgame=$Hlast5pitgame[1]; ########## $pitcherlast7game=explode("^",$pitcher_last7_game); $road_pitcherlast7game=$pitcherlast7game[0]; $home_pitcherlast7game=$pitcherlast7game[1]; $Rlast7pitgame=explode("~",$road_pitcherlast7game); $roadWL_last7pitgame=$Rlast7pitgame[0]; $roadRUNS_last7pitgame=$Rlast7pitgame[1]; $Hlast7pitgame=explode("~",$home_pitcherlast7game); $homeWL_last7pitgame=$Hlast7pitgame[0]; $homeRUNS_last7pitgame=$Hlast7pitgame[1]; ########## $pitcherlast10game=explode("^",$pitcher_last10_game); $road_pitcherlast10game=$pitcherlast10game[0]; $home_pitcherlast10game=$pitcherlast10game[1]; $Rlast10pitgame=explode("~",$road_pitcherlast10game); $roadWL_last10pitgame=$Rlast10pitgame[0]; $roadRUNS_last10pitgame=$Rlast10pitgame[1]; $Hlast10pitgame=explode("~",$home_pitcherlast10game); $homeWL_last10pitgame=$Hlast10pitgame[0]; $homeRUNS_last10pitgame=$Hlast10pitgame[1]; ########## $pitcherlast15game=explode("^",$pitcher_last15_game); $road_pitcherlast15game=$pitcherlast15game[0]; $home_pitcherlast15game=$pitcherlast15game[1]; $Rlast15pitgame=explode("~",$road_pitcherlast15game); $roadWL_last15pitgame=$Rlast15pitgame[0]; $roadRUNS_last15pitgame=$Rlast15pitgame[1]; $Hlast15pitgame=explode("~",$home_pitcherlast15game); $homeWL_last15pitgame=$Hlast15pitgame[0]; $homeRUNS_last15pitgame=$Hlast15pitgame[1]; $goalslast3=explode("~",$goals_last3); $road_goalslast3=$goalslast3[0]; $home_goalslast3=$goalslast3[1]; $goalslast5=explode("~",$goals_last5); $road_goalslast5=$goalslast5[0]; $home_goalslast5=$goalslast5[1]; $goalslast7=explode("~",$goals_last7); $road_goalslast7=$goalslast7[0]; $home_goalslast7=$goalslast7[1]; $goalslast10=explode("~",$goals_last10); $road_goalslast10=$goalslast10[0]; $home_goalslast10=$goalslast10[1]; $goalslast15=explode("~",$goals_last15); $road_goalslast15=$goalslast15[0]; $home_goalslast15=$goalslast15[1]; /***********************************************************************************/ $roadfav_dogqry=mysqli_query($link,"select homefav_off_avg, homefav_def_avg,homefav_WLT,roadfav_off_avg, roadfav_def_avg , roadfav_WLT , homedog_off_avg, homedog_def_avg, homedog_WLT ,roaddog_off_avg , roaddog_def_avg , roaddog_WLT from ats_fastfacts where team_id='$roadteamid' and league_name='$gleague' "); list($homefav_off_avg, $homefav_def_avg,$homefav_WLT,$roadfav_off_avg, $roadfav_def_avg , $roadfav_WLT , $homedog_off_avg, $homedog_def_avg, $homedog_WLT ,$roaddog_off_avg , $roaddog_def_avg , $roaddog_WLT) =mysqli_fetch_array($roadfav_dogqry); #--winlost $homefav_WinLoss=explode("-",$homefav_WLT); $hfav_WL=$homefav_WinLoss[0].' Win -'.$homefav_WinLoss[1].' Lost'; $hfav_avg=$forval.$homefav_off_avg.' - '.$againstval.$homefav_def_avg; $homedog_WinLoss=explode("-",$homedog_WLT); $hdog_WL=$homedog_WinLoss[0].' Win -'.$homedog_WinLoss[1].' Lost'; $hdog_avg=$forval.$homedog_off_avg.' - '.$againstval.$homedog_def_avg; $roadfav_WinLoss=explode("-",$roadfav_WLT); $rfav_WL=$roadfav_WinLoss[0].' Win -'.$roadfav_WinLoss[1].' Lost'; $rfav_avg=$forval.$roadfav_off_avg.' - '.$againstval.$roadfav_def_avg; $roaddog_WinLoss=explode("-",$roaddog_WLT); $rdog_WL=$roaddog_WinLoss[0].' Win -'.$roaddog_WinLoss[1].' Lost'; $rdog_avg=$forval.$roaddog_off_avg.' - '.$againstval.$roaddog_def_avg; $homefav_dogqry=mysqli_query($link,"select homefav_off_avg, homefav_def_avg,homefav_WLT,roadfav_off_avg, roadfav_def_avg , roadfav_WLT , homedog_off_avg, homedog_def_avg, homedog_WLT ,roaddog_off_avg , roaddog_def_avg , roaddog_WLT from ats_fastfacts where team_id='$hometeamid' and league_name='$gleague'"); list($homefav_off_avg1, $homefav_def_avg1,$homefav_WLT1,$roadfav_off_avg1, $roadfav_def_avg1, $roadfav_WLT1 , $homedog_off_avg1, $homedog_def_avg1, $homedog_WLT1 ,$roaddog_off_avg1 , $roaddog_def_avg1 , $roaddog_WLT1) =mysqli_fetch_array($homefav_dogqry); #--winlost $homefav_WinLoss1=explode("-",$homefav_WLT1); $hfav_WL1=$homefav_WinLoss1[0].' Win -'.$homefav_WinLoss1[1].' Lost'; $hfav_avg1=$forval.$homefav_off_avg1.' - '.$againstval.$homefav_def_avg1; $homedog_WinLoss1=explode("-",$homedog_WLT1); $hdog_WL1=$homedog_WinLoss1[0].' Win -'.$homedog_WinLoss1[1].' Lost'; $hdog_avg1=$forval.$homedog_off_avg1.' - '.$againstval.$homedog_def_avg1; $roadfav_WinLoss1=explode("-",$roadfav_WLT1); $rfav_WL1=$roadfav_WinLoss1[0].' Win -'.$roadfav_WinLoss1[1].' Lost'; $rfav_avg1=$forval.$roadfav_off_avg1.' - '.$againstval.$roadfav_def_avg1; $roaddog_WinLoss1=explode("-",$roaddog_WLT1); $rdog_WL1=$roaddog_WinLoss1[0].' Win -'.$roaddog_WinLoss1[1].' Lost'; $rdog_avg1=$forval.$roaddog_off_avg1.' - '.$againstval.$roaddog_def_avg1; /***********************************************************************************/ $todaysdate=date('Y-m-d'); $league=$gleague; if($league=='MLB') { $datatable='mlb_data1'; $away_winlost=mysqli_query($link,"select * from $datatable where (road='$roadteamid' or home='$roadteamid') and $dateclause and date < '$todaysdate' order by date desc limit 10"); } elseif($league=='NHL' || $league=='NBA') { $datatable=strtolower($league).'_data1'; $away_winlost=mysqli_query($link,"select * from $datatable where (road_id='$roadteamid' or home_id='$roadteamid') and $dateclause and date< '$todaysdate' order by date desc limit 10"); } else { $datatable=strtolower($league).'_data1'; $away_winlost=mysqli_query($link,"select * from $datatable where (road_id='$roadteamid' or home_id='$roadteamid') and $dateclause and date< '$todaysdate' order by date asc"); } while($winloss1=mysqli_fetch_array($away_winlost)) { $score1=$winloss1['roadscore']; $score2=$winloss1['homescore']; if($league=='NHL') { $line=$winloss1['totalML']; }else { $line=$winloss1['line']; } $date=$winloss1['date']; $total=$winloss1['total']; if($league=='MLB') { $away=$winloss1['roadteam']; $home=$winloss1['hometeam']; $away_id=$winloss1['road']; $home_id=$winloss1['home']; } else { $away_id=$winloss1['road_id']; $home_id=$winloss1['home_id']; $away=$winloss1['road']; $home=$winloss1['home']; } if($league=='NCAAF') { $fldname='team_name'; } else { $fldname='team_lastname'; } //echo "select $fldname from $table where team_id='$away_id'
"; $roadteamqry1=mysqli_query($link,"select $fldname from $table where team_id='$away_id'"); list($awayshort1)=mysqli_fetch_array($roadteamqry1); $hometeamqry1=mysqli_query($link,"select $fldname from $table where team_id='$home_id'"); list($homeshort1)=mysqli_fetch_array($hometeamqry1); if($away_id==$roadteamid) { $awayrec[]=$date.': '.$awayshort1.' ( '. $line.' ) '. $score1.' at '.$homeshort1.' ( '.$total.' ) '.$score2; } else { $awayrec[]=$date.': '.$homeshort1.' ( '.$line.' ) '.$score2.' vs '.$awayshort1.' ( '.$total.' ) '.$score1; } //$rec[]=$date.'~'.$away.'~'.$away_id.'~'.$home.'~'.$home_id.'~'.$line.'~'.$total.'~'.$score1.'~'.$score2; //$awayrec[]=$date.'~'.$homeshort1.'~'.$line.'~'.$score1.'~'.$awayshort1.'~'.$total.'~'.$score2; } if($league=='MLB') { $datatable='mlb_data1'; $home_winlost=mysqli_query($link,"select * from $datatable where (road='$hometeamid' or home='$hometeamid') and $dateclause and date < '$todaysdate'order by date desc limit 10"); } elseif($league=='NHL' || $league=='NBA') { $datatable=strtolower($league).'_data1'; //echo "select date,roadscore,road_id,homescore,home_id from $datatable where (road_id='$roadteamid' or home_id='$roadteamid') and $dateclause
"; $home_winlost=mysqli_query($link,"select * from $datatable where (road_id='$hometeamid' or home_id='$hometeamid') and $dateclause and date< '$todaysdate' order by date desc limit 10"); } else { $datatable=strtolower($league).'_data1'; //echo "select date,roadscore,road_id,homescore,home_id from $datatable where (road_id='$roadteamid' or home_id='$roadteamid') and $dateclause
"; $home_winlost=mysqli_query($link,"select * from $datatable where (road_id='$hometeamid' or home_id='$hometeamid') and $dateclause and date< '$todaysdate' order by date asc"); } while($winloss2=mysqli_fetch_array($home_winlost)) { $score1=$winloss2['roadscore']; $score2=$winloss2['homescore']; if($league=='NHL') { $line=$winloss2['FLML']; }else { $line=$winloss2['line']; } $date=$winloss2['date']; $total=$winloss2['total']; if($league=='MLB') { $away=$winloss2['roadteam']; $home=$winloss2['hometeam']; $away_id=$winloss2['road']; $home_id=$winloss2['home']; } else { $away_id=$winloss2['road_id']; $home_id=$winloss2['home_id']; $away=$winloss2['road']; $home=$winloss2['home']; } if($league=='NCAAF') { $fldname='team_name'; } else { $fldname='team_lastname'; } $roadteamqry=mysqli_query($link,"select $fldname from $table where team_id='$away_id'"); list($awayshort)=mysqli_fetch_array($roadteamqry); $hometeamqry=mysqli_query($link,"select $fldname from $table where team_id='$home_id'"); list($homeshort)=mysqli_fetch_array($hometeamqry); if($home_id==$hometeamid) { $homerec[]=$date.': '.$homeshort.' ( '.$line.' ) '.$score2.' vs '.$awayshort.' ( '.$total.' ) '.$score1; } else { $homerec[]=$date.': '.$awayshort.' ( '.$line.' ) '.$score1.' at '.$homeshort.' ( '.$total.' ) '.$score2; } //$rec[]=$date.'~'.$away.'~'.$away_id.'~'.$home.'~'.$home_id.'~'.$line.'~'.$total.'~'.$score1.'~'.$score2; //$homerec[]=$date.'~'.$homeshort.'~'.$line.'~'.$score1.'~'.$awayshort.'~'.$total.'~'.$score2; } // print_r ($rec); //$awayrec=mysqli_query($link,"select * from $teamtable"); switch($gleague) { case 'NBA': $showmsg='Points'; break; case 'NHL': $showmsg='Goals'; break; case 'MLB': $showmsg='Runs'; break; case 'NFL': $showmsg='Points'; break; case 'NCAAF': $showmsg='Points'; break; } if($rteam=='Texas A&M') { $rteam='Texas A^M'; } if($hteam=='Texas A&M') { $hteam='Texas A^M'; } $name3=$gleague.','.$rteam.','.$hteam.','.$name2; $league=$gleague; ?>
ATS Quick Stats :-

The ATS Database Quick Stats area is basically the Coles Note version of the entire site on one page. In fact, you will find part of the head to head matchups, ATS Matchups, Super Stats and team trends on the ATS Quick stats page. Also, it will give you a statistical scoring average on teams past 3, 5, 10 and 15 games. In addition, it provides sports bettors the current situation of each team such as they are coming off a 5 game winning or losing streak, scored 30 or more points in their last game, Allowed 21 or less points against on defense in their last game etc...


Navigation : Head To Head | ATS Matchups | Team Trends | Super Stats | Quick Stats | Smart Stats | Raymondreport| SOS

You Are Here ATS QUICK STATS

Matches for
"; } ?>
   Vs. 

 
Line :
O/U :
Last game:
Current game: vs. at
Next Game:
Home Favorite:
Home Underdog:
Road Favorite:
Road Underdog:
's L3 game:
's L5 game:
's L7 game:
's L10 game:
's L15 game:
Last 3 game:
Last 5 game:
Last 7 game:
Last 10 game:
Last 15 game:
Games
Game No # $aa $awayrec[$a]
Situations
"; } ?>
   Vs. 

 
Line :
O/U :
Last game:
Current game: vs. at
Next Game:
Home Favorite:
Home Underdog:
Road Favorite:
Road Underdog:
's L3 game:
's L5 game:
's L7 game:
's L10 game:
's L15 game:
Last 3 game:
Last 5 game:
Last 7 game:
Last 10 game:
Last 15 game:
Games
Game No # $bb $homerec[$b]
Situations