//session_start();
//echo 'Under Construction
';
//print_r($_SERVER);
//69.232.46.239
error_reporting(E_ALL & ~E_DEPRECATED & ~E_NOTICE);
function parse_path() {
$path = array();
if (isset($_SERVER['REQUEST_URI'])) {
$request_path = explode('?', $_SERVER['REQUEST_URI']);
$path['base'] = rtrim(dirname($_SERVER['SCRIPT_NAME']), '\/');
$path['call_utf8'] = substr(urldecode($request_path[0]), strlen($path['base']) + 1);
$path['call'] = utf8_decode($path['call_utf8']);
if ($path['call'] == basename($_SERVER['PHP_SELF'])) {
$path['call'] = '';
}
$path['call_parts'] = explode('/', $path['call']);
$path['query_utf8'] = urldecode($request_path[1]);
$path['query'] = utf8_decode(urldecode($request_path[1]));
$vars = explode('&', $path['query']);
foreach ($vars as $var) {
$t = explode('=', $var);
$path['query_vars'][$t[0]] = $t[1];
}
}
return $path;
}
$path_info = parse_path();
if ($_GET['goToDesktop'] == 1)
{
$_SESSION['desktop'] = 1;
}
if ($_GET['goToMobile'] == 1)
{
$_SESSION['desktop'] = 0;
}
require_once '_mobile_detect.php';
$detect = new Mobile_Detect;
// then in your auto-mobile-detect, check for the variable first
if ($_SESSION['desktop'] != 1)
{
// check for mobile and redirect
//if ( $detect->isMobile() && $_SERVER['REMOTE_ADDR']="24.90.137.214") {
if ( $detect->isMobile() && (strtolower($path_info['call_parts'][0]) <> "coach" && strtolower($path_info['call_parts'][0]) <> "admin")) {
echo '';
exit;
}
}
switch(strtolower($path_info['call_parts'][0])) {
case 'images': include '/images/logos/noimage.jpg';
break;
case 'schedule': $ThirdNavSched = ' class="active" '; include '_schedule.php';
break;
case 'results': $ThirdNavResul = ' class="active" '; include '_results.php';
break;
case 'scores': $ThirdNavResul = ' class="active" '; include '_results.php';
break;
case 'playoffs': $ThirdNavPlayo = ' class="active" '; include '_playoffs.php';
break;
case 'playoffstest': $ThirdNavPlayo = ' class="active" '; include '_playoffs_test.php';
break;
case 'playoffsrules': $ThirdNavPlayo = ' class="active" '; include '_playoffs_rules.php';
break;
case 'standings': $ThirdNavStand = ' class="active" '; include '_standings.php';
break;
case 'playoffstandings': include '_standings_playoffs.php';
break;
case 'teams': $ThirdNavTeams = ' class="active" '; include '_teams.php';
break;
case 'rosters': $ThirdNavRoste = ' class="active" '; include '_rosters.php';
break;
case 'leaguephotos': $ThirdNavPhoto = ' class="active" '; include '_league_photos.php';
break;
case 'admin': include '_admin.php';
break;
case 'coach': include '_coach.php';
break;
case 'coach': include '_coach.php';
break;
case 'schooladmin': include '_school.php';
break;
case 'schooladmin': include '_school.php';
break;
case 'allowip': include '_add_ip.php';
break;
case 'school': include '_school_page.php';
break;
case 'rules': include '_rules.php';
break;
case 'banner': $ThirdNavBanne = ' class="active" '; include '_banners.php';
break;
case 'banner2': include '_banners2.php';
break;
case 'uc': include '_under_construction.php';
break;
case 'admin': include '_admin.php';
break;
case 'test': include '_home_test.php';
break;
case 'functions': include '_display_functions.php';
break;
case 'archive': include '_archive.php';
break;
case 'leagueHome': include '_league_home.php';
break;
case 'watchchampionships': include '_watch_championship.php';
break;
case 'watchchampionship': include '_watch_championship.php';
break;
default:
include '_home.php';
}
/*
switch(strtolower($path_info['call_parts'][0])) {
case 'images': include '/images/logos/noimage.jpg';
break;
case 'Schedule': $ThirdNavSched = ' class="active" '; include '_schedule.php';
break;
case 'Results': $ThirdNavResul = ' class="active" '; include '_results.php';
break;
case 'Scores': $ThirdNavResul = ' class="active" '; include '_results.php';
break;
case 'Playoffs': $ThirdNavPlayo = ' class="active" '; include '_playoffs.php';
break;
case 'PlayoffsTest': $ThirdNavPlayo = ' class="active" '; include '_playoffs_test.php';
break;
case 'PlayoffsRules': $ThirdNavPlayo = ' class="active" '; include '_playoffs_rules.php';
break;
case 'Standings': $ThirdNavStand = ' class="active" '; include '_standings.php';
break;
case 'PlayoffStandings': include '_standings_playoffs.php';
break;
case 'Teams': $ThirdNavTeams = ' class="active" '; include '_teams.php';
break;
case 'Rosters': $ThirdNavRoste = ' class="active" '; include '_rosters.php';
break;
case 'LeaguePhotos': $ThirdNavPhoto = ' class="active" '; include '_league_photos.php';
break;
case 'Admin': include '_admin.php';
break;
case 'Coach': include '_coach.php';
break;
case 'coach': include '_coach.php';
break;
case 'SchoolAdmin': include '_school.php';
break;
case 'schooladmin': include '_school.php';
break;
case 'AllowIP': include '_add_ip.php';
break;
case 'School': include '_school_page.php';
break;
case 'Rules': include '_rules.php';
break;
case 'Banner': $ThirdNavBanne = ' class="active" '; include '_banners.php';
break;
case 'Banner2': include '_banners2.php';
break;
case 'UC': include '_under_construction.php';
break;
case 'admin': include '_admin.php';
break;
case 'Test': include '_home_test.php';
break;
case 'Functions': include '_display_functions.php';
break;
case 'Archive': include '_archive.php';
break;
case 'LeagueHome': include '_league_home.php';
break;
case 'WatchChampionships': include '_watch_championship.php';
break;
default:
include '_home.php';
}
*/
//echo ''.print_r($path_info, true).'
';
?>