0 ) header( "Location: ".$_POST["feedArticleUrl"] ); include_once('includes/page_gen.php'); $pagegen = new page_gen(); $pagegen->round_to = 7; $pagegen->start(); if( strpos( $_SERVER["REQUEST_URI"], "?" ) ) { $uri = substr( $_SERVER["REQUEST_URI"], 0, strpos( $_SERVER["REQUEST_URI"], "?" ) ); } else { $uri = $_SERVER["REQUEST_URI"]; } $uri = strip_tags( $uri ); $url = explode( "/", $uri ); $tmp = explode( ".", $_SERVER["SERVER_NAME"] ); $url[0] = $tmp[0]; require_once( "includes/init.php" ); require_once( "includes/functions.php" ); require_once( "includes/classes.php" ); ob_start( "fatal_error_handler" ); //create user object $user = new User(); require_once( "includes/classes/Template.php" ); require_once( "sections/misc/modules/Page.php" ); require_once( "gd/misc/modules/PageRev.php" ); //magic numbers for ad calls $mnLeaderBoard = "93222624"; $mnRectangle = "93222625"; $mnSkyscraper = "93222663"; // variable to use for meta tags $myVars["pageType"] = $url[1]; $myVars["url"] = $url; switch ( $myVars["pageType"] ) { case "articles": $myVars["pageType"] = $url[2]; break; default: break; } //check if game is a BFG, if so load different MN's $u = new Url(); $cu = $u->curPageUrl(); // find skuId from url if (!$skuId = $u->getPart($cu, "")) $skuId = 0; // find skuId from gametitle and platform if ( $skuId == 0 ) $skuId = getSkuId( $cu ); if( $skuId > 0 ) { $sql = "SELECT a.skuId, c.urlPlatform FROM gameSkus a JOIN gameTitles b ON a.titleId = b.titleId AND a.topGameRank > 0 JOIN platforms c ON a.platformId = c.platformid WHERE a.skuId = $skuId"; $result = $myVars["db"]->query( $sql ); while ( $row = $result->fetch_array() ) { //$myVars["rectangle"] = str_replace("[mn]","93301806",$myVars["rectangle"]); //$myVars["leaderBoard"] = str_replace("[mn]","93301805",$myVars["leaderBoard"]); //$myVars["skyscraper"] = str_replace("[mn]","93301808",$myVars["skyscraper"]); //check if there is a 215x35 promo for BFG game pages $sql = "SELECT body from promoModule WHERE UPPER(section) = 'BFG'"; $result = $myVars["db"]->query( $sql ); while ( $row = $result->fetch_array() ) { $myVars["bfgpromo"] = $row["body"]; } } } //$mnLeaderBoard = "testing"; getMagicNumbers($url); //site wide clutterbuster $sql = "SELECT description FROM homepage WHERE LOWER(shortPlatform) = 'sitewideclutterbuster' LIMIT 0,1"; $result = $myVars["db"]->query( $sql ); while ( $row = $result->fetch_array() ) { $myVars["rectangle"] = ""; $myVars["leaderBoard"] = "\n"; $myVars["skyscraper"] = ""; } if ( $url[0] == "biz" && $url[1] == "industry" ) { //old biz url redirect $bizId = $_GET["id"]; if (!$bizId > 0) { header( "Location: http://www.gamedaily.com/news/biz/" ); exit(); } if ( $url[2] == "news" ) { $sql = "SELECT newsIdName as titleIdName,newsId as itemId FROM news WHERE bizId = $bizId"; $redirectType = "news"; } else { $sql = "SELECT featureIdName as titleIdName,featureId as itemId FROM features WHERE bizId = $bizId"; $redirectType = "features"; } $result = $myVars["db"]->query($sql); while( $row = $result->fetch_array( MYSQL_ASSOC ) ) { $redirectParams = array ( "
" => "articles", "" => "", "" => "", "" => $redirectType, "" => $row["titleIdName"], "" => "", "" => $row["itemId"] ); $redirect = new Url; $redirect->query = "biz=1"; $loc = $redirect->getUrl( $redirectParams ); header( "Location: " . $loc ); exit(); } } if( $url[0] == "biz" ) { $myVars["prop18"] = "Total GameDaily News"; $myVars["omnitureSection"] = "Biz Home"; header( "Location: http://www.gamedaily.com/news/biz/" ); exit(); } if( $_GET["biz"] == 1) $myVars["prop18"] = "Total GameDaily News"; //set enhanced url variable based on environment $myVars["enhancedCSSUrl"] = "http://o.aolcdn.com/gd-media/css/"; if( $url[0] == "dev" || $url[0] == "qa" ) $myVars["enhancedCSSUrl"] = "/admin/media/css/"; //set prop2 value for Omniture $myVars["omnitureSection"] = ""; switch( $url[1] ) { case "games": $myVars["omnitureSection"] = "Games"; $myVars["articleSection"] = "games"; if ($url[3]) { $myVars["prop17"] = $url[3]; $myVars["prop16"] = $url[2]; $myVars["pageType"] = $url[4]; if ($url[4] && $url[4] != "game-main") { $end = "hub.php"; if ($url[7] > 0 || $url[5] <> "list") $end = "item.php"; $myVars["pageType"] = $url[4] . '-item'; $require = "gd/games/product/".$url[4]."/".$end; $myVars["articleTitleId"] = $url[5]; switch( $url[4] ) { case "game-downloads": $myVars["omnitureSection"] = "Downloads"; $myVars["prop19"] = "Total GameDaily Downloads"; break; case "game-videos": $myVars["omnitureSection"] = "Videos"; //$require = "gd/games/product/".$url[4]."/".$end; break; case "game-news": $myVars["omnitureSection"] = "News"; $myVars["prop18"] = "Total GameDaily News"; if( $_GET["biz"] == 1) $myVars["omnitureSection"] = "Biz News"; if($end == "item.php") $require = "gd/articles/article.php"; break; case "game-reviews": $myVars["omnitureSection"] = "Reviews"; //direct old review links to new review page if($url[5] == "list" && $url[7] == 0 ) $end = "item.php"; if($end == "item.php") $require = "gd/articles/article.php"; break; case "game-previews": $myVars["omnitureSection"] = "Previews"; if($end == "item.php") $require = "gd/articles/article.php"; break; case "game-features": $myVars["omnitureSection"] = "Features"; if( $_GET["biz"] == 1) $myVars["omnitureSection"] = "Biz Features"; if($end == "item.php") $require = "gd/articles/article.php"; break; case "game-images": $myVars["omnitureSection"] = "Images"; break; case "game-cheats": $myVars["omnitureSection"] = "Cheats"; if($end == "item.php") $require = "gd/articles/article.php"; break; } require( $require ); } else { //require( "sections/games/product/product.php" ); require( "gd/games/product/product.php" ); } } else { require( "sections/games/hub.php" ); } break; case "center": require( "sections/games/product/game-title.php" ); break; case "downloads": $myVars["omnitureSection"] = "Downloads"; $myVars["prop19"] = "Total GameDaily Downloads"; require( "sections/downloads/hub.php" ); break; case "videos": $myVars["omnitureSection"] = "Videos"; require( "sections/videos/hub.php" ); break; case "game-images": $myVars["omnitureSection"] = "Images"; require( "sections/galleries/hub.php" ); break; case "cheats": $myVars["omnitureSection"] = "Cheats"; require( "sections/cheats/hub.php" ); break; case "reviews": $myVars["omnitureSection"] = "Reviews"; require( "sections/reviews/hub.php" ); break; case "previews": $myVars["omnitureSection"] = "Previews"; require( "sections/previews/hub.php" ); break; case "features": $myVars["omnitureSection"] = "Features"; require( "sections/features/hub.php" ); break; case "galleries": $myVars["omnitureSection"] = "Features"; require( "sections/galleries/hub.php" ); break; case "news": $myVars["omnitureSection"] = "News"; $myVars["prop18"] = "Total GameDaily News"; if ( $url[2] == 'hub.php' || $_SERVER['QUERY_STRING'] != '' ) { require( "sections/news/hub.php" ); } else { if ( $url[2] == 'newsletter.php' ) { require( "sections/news/newsletter.php" ); } elseif( $url[2] == "biz" || $url[0] == "biz" ) { require( "sections/news/biz.php" ); } else { $myVars["omnitureSection"] = "Biz Home"; require( "sections/news/main.php" ); } } break; case "articles": if( $url[2] == "galleries" ) { $myVars["omnitureSection"] = "Features-Galleries"; //require( "sections/articles/gallery.php" ); $myVars["articleSection"] = "galleries"; require("gd/articles/gallery.php"); } else { if( $_GET["biz"] == 1) $myVars["prop18"] = "Total GameDaily News"; if( $url[3] == "poll" ) { $myVars["omnitureSection"] = "Biz Poll"; require( "sections/articles/poll.php" ); } elseif( $url[3] == "chart" ) { $myVars["omnitureSection"] = "Biz Chart"; require( "sections/articles/chart.php" ); } else { if( $url[2] == "news" ) { $myVars["omnitureSection"] = "News"; } if( $url[2] == "features" ) { $myVars["omnitureSection"] = "Features"; } if( $_GET["biz"] == 1) $myVars["omnitureSection"] = "Biz " . $myVars["omnitureSection"]; $myVars["articleSection"] = strtolower($myVars["omnitureSection"]); $myVars["articleTitleId"] = $url[3]; require( "gd/articles/article.php" ); //require( "sections/articles/item.php" ); } } break; case "tags": require( "sections/tags/hub.php" ); break; case "guide": $myVars["omnitureSection"] = "Guides-".$url[2]; $myVars["guide"] = $url[2]; if ( $url[5] > 0 ) { require( "sections/guide/item.php" ); } else { require( "sections/guide/hub.php" ); } break; case "search": $myVars["omnitureSection"] = "Search"; require( "sections/search/search.php" ); break; case "about": require( "sections/about/about.php" ); break; case "pc": case "xbox-360": case "playstation-3": case "wii": case "playstation-2": case "psp": case "ds": case "game-boy-advance": case "mobile": $myVars["omnitureSection"] = "Consoles"; $myVars["prop17"] = $url[1]; require( "gd/home/console.php" ); break; default: //homepage clutterbuster $sql = "SELECT description FROM homepage WHERE LOWER(shortPlatform) = 'homepageclutterbuster' LIMIT 0,1"; $result = $myVars["db"]->query( $sql ); while ( $row = $result->fetch_array() ) { $myVars["rectangle"] = ""; $myVars["leaderBoard"] = "\n"; $myVars["skyscraper"] = ""; } $myVars["omnitureSection"] = "Home"; $mnLeaderBoard = "93222620"; $mnRectangle = "93222622"; require( "gd/home/home.php" ); break; } $myVars["db"]->close(); //MyDb::getMysqli()->close(); $pagegen->stop(); print('"); ob_end_flush(); ?>