<p id="control_panel"> You are logged in! <a href="/simple_blog/inc/update.inc.php?action=logout">Log out</a>. </p> <?php } ?> <div id="entries"> <?php // If the full display flag is set, show the entry if ($fulldisp == 1) { // Get the url if was not passed $url = isset($url) ? $url : $e['url']; if (isset($_SESSION['loggedin']) && $_SESSION['loggedin'] == 1) { $admin = adminLinks($page, $url); } else { $admin = array('edit' => NULL, 'delete' => NULL); } $imagee = FormatImages($e['image'], $e['title']); if ($page == 'blog') { // Load the comment object include_once 'inc/comments.inc.php'; $comments = new Comments(); $comment_disp = $comments->showComments($e['id']); $comments_form = $comments->showCommentForm($e['id']); //Generate a post to twitter link; $twitter = postToTwitter($e['title']); } else { $comments_form = NULL; $twitter = NULL;
<?php include_once 'views/header.php'; ?> <!-- <h1 class="col-md-8 col-md-offset-2 page-header"> Posts </h1> --> <div id="posts" class="col-md-8 col-md-offset-2"> <?php //If the full display flag is set, show the post if ($fulldisp == 1) { // Get the URL if one wasn't passed $url = isset($url) ? $url : $p['url']; // Build the admin links $admin = isset($_SESSION['loggedin']) && $_SESSION['loggedin'] == 1 ? adminLinks($page, $url) : array('edit' => NULL, 'delete' => NULL); // Format the image if one exists $img = formatImage($p['image'], $p['title']); if ($page == 'thread') { // Load the comment object include_once 'inc/comments.inc.php'; $comments = new Comments(); $comment_disp = $comments->showComments($p['postID']); $comment_form = $_SESSION['username'] ? $comments->showCommentForm($p['postID'], $_SESSION['username']) : NULL; } else { $comment_form = NULL; } ?> <article> <h1 class="page-header"><small><?php echo $p['title'];