'Upcoming conferences', 'cfp' => 'Calling for papers', ); $announcements = ''; } else { $announcements = ''; } require_once './Gateway/NewsFileSystemGateway.php'; $NewsGateway = new NewsFileSystemGateway(); $RecentNews = $NewsGateway->getArticlesForCategories(array( "frontpage" ), 4); ob_start(); require_once './View/HomepageNewsView.php'; $RecentNewsView = new HomepageNewsView($RecentNews); echo $RecentNewsView->render(); $news = ob_get_clean(); // Wrap announcements and features in a content element $content = "
$news
"; $intro = <<

PHP is a popular general-purpose scripting language that is especially suited to web development.

Fast, flexible and pragmatic, PHP powers everything from your blog to the largest social networking site in the world.

Download PHP

EOF; if(!empty($RELEASES[5])) { $releases = array_chunk($RELEASES[5], 2, $preserve_keys = TRUE); foreach ($releases as $row) { $intro .= "
"; foreach ($row as $version => $release) { $intro .= " "; } $intro .="
"; } } $intro .= <<
EOF; // Write out common header site_header("Hypertext Preprocessor", array( 'current' => 'home', 'onload' => 'boldEvents();', 'headtags' => array( '', '' ), 'link' => array( array( "rel" => "search", "type" => "application/opensearchdescription+xml", "href" => $MYSITE . "phpnetimprovedsearch.src", "title" => "Add PHP.net search" ), array( "rel" => "alternate", "type" => "application/atom+xml", "href" => $MYSITE . "releases.atom", "title" => "PHP Release feed" ), ), 'css' => array('home.css'), 'intro' => $intro ) ); // Print body of home page. print $content; ob_start(); print_view('homepage/sidebar.php', array( 'announcements' => $announcements )); $sidebar = ob_get_clean(); // Print the common footer. site_footer( array( "atom" => "/feed.atom", // Add a link to the feed at the bottom 'elephpants' => true, 'spanning-content' => $thanksTo, 'sidebar' => $sidebar ) );