rendered paste body<?phpsession_start();/** * @author Bob Sacamano * @copyright 2008 *///file: index_guest.php//index page that shows for unregistered/unlogged usersrequire_once "generic/doctype.php";require_once "classes/newscontroller.php";require_once "configuration/config.php";/* Always process dynamic data FIRST. Not within the HTML document.*/$newscontroller = new NewsController(null, $link);$numpostings = 10; //set for guests$latestnews = $newscontroller->getLatestPostings($numpostings);$output = "<div id='newsWrapper'>";foreach($latestNews as $post) { $output .= " <h1>" . $post['title'] . "</h1> <p>" . $post['content'] . "</p> ";} $output .= "</div>";?><html> <head> <link rel='stylesheet' type='text/css' href='css/master.css' /> </head> <body id='index'> <?php require_once "includes/header.php"; require_once "includes/menu.php"; ?> <!-- OUTPUT NEWS --> <?php echo $output; ?> </body></html><?php/*function wrapNews($danews){ $newspost = new Newspost(null, $link); $tempcomment = new Comment(null, $link); while( $newspost = array_pop($danews) ) { //top of newsbox div require_once "includes/topnbox.php"; //content echo "<h2 class='newspost'>" . htmlentities($newspost->title) . "</h2>"; echo "<h3 class='newspost'>Posted on: " . htmlentities($newspost->postdate) . " <span class='postcreator'>Posted by: " . htmlentities($newspost->username) . " </span></h3>"; echo "<h3 class='newspost'>Category: " . htmlentities($newspost->category) . "</h3>"; if( $newspost->edited ) { echo "<h4 class='newspost'>Edited on: " . htmlentities($newspost->editdate) . "Edited by: " . htmlentities($newspost->editorname) . "</h4>"; } echo "<p class='newspost'>" . htmlentities($newspost->content) . "</p>"; //here if i want to change the page to display them, I have to do something when they click the link echo "<h3 class='comments'>" . htmlentities($newspost->numcomments) . " Comments</h3>"; //deal with comments if clicked if( ) { while( $tempcomment = array_pop($newspost->comments)) { //top of comment box require_once "includes/topcommentbox.php"; //comment content echo "<h2 class='comments'>" . htmlentities($tempcomment->username) . "<span class='comments'>" . htmlentities($tempcomment->postdate) . "</span></h4>"; echo "<h2 class='comments'>" . htmlentities($tempcomment->heading) . "</h4>"; if( $tempcomment->edited ) { echo "<h3 class='comments'>Edited on: " . htmlentities($tempcomment->editdate) . "</h3>"; } echo "<p class='comments>" . htmlentities($tempcomment->content) . "</p>"; //bot of comment box require_once "includes/botcommentbox.php"; } } //bottom of newsbox div require_once "includes/botnbox.php"; }}*/?>