$row['id'], 'p_id' => $row['p_id'], 'title' => $row['title'], 'nav_title' => $row['nav_title'], 'keywords' => $row['keywords'], 'description' => $row['description'], ); } switch (true) { // Home Page case ($page == 'index.shtml'): $template = 'template/home.tpl'; $content['content'] = $row['content']; break; default: // 120x90 Article Nav Link Units //$tmp['120x90-article-nav'] = file_get_contents('google/120x90_article_nav.tpl'); $content['content'] = (orphan($content['p_id'])) ? $row['content'] : wrap($row['content'],''); break; } } // Main Category ID if ($content['p_id'] == -1) $main_id = 0; else $main_id = ($content['p_id'] == 0) ? $content['id'] : mainID($content['p_id']); // Sources used in the Ad Server $zones['source'] = getSource($main_id); $content['navigation'] = left_nav($main_id); // Copyright date $content['copyright-date'] = date('Y',time()); // 728x90 Leaderboard $content['728x90-leaderboard'] = return_template($zones,'advertisement/zones/728x90_leaderboard.tpl'); // 728x90 Leaderboard bottom $content['728x90-leaderboard_bottom'] = return_template($zones,'advertisement/zones/728x90_bottom_ad.tpl'); // 300x250 Right Box $content['300x250-right-box'] = return_template($zones,'advertisement/zones/300x250_right_box.tpl'); // 300x250 Right Lower $content['300x250-right-lower'] = return_template($zones,'advertisement/zones/300x250_right_lower.tpl'); // 160x600 Right $content['160x600-right'] = return_template($zones,'advertisement/zones/160x600_right.tpl'); // 160x90 Left Nav $content['160x90-left-nav'] = file_get_contents('google/160x90_nav_left.tpl'); // merge data and template and return to $html for output $html = return_template($content,$template); // Output HTML page echo $html; exit(); ?>