require_once 'includes/utilities.php'; require_once 'includes/coal_login_constants.php'; //require_secure(); //session_start(); //require_login(); ?> <!doctype html> <html lang="en"> <?php require_once 'includes/main_head.php'; ?> <body> <section class="wrapper"> <div class="user_information_area"><?php show_user_info(); ?> </div> <div class="float"> <h1>Annual Coal Consumption by Country</h1> <h3>Total annual coal consumption by country from 1980 to 2008 (available as Quadrillion Btu). Downloaded from the Energy Information Administration (EIA)'s International Energy Statistics portal</h3> <h4>Please enter two countries to see the coal consumption of those countries over the course of 29 years!!</h4> <?php display_form('POST', TARGET_PAGE); ?> </div> <div class="float">
function show_my_blogs($table, $id) { global $connection; $query = "SELECT * "; $query .= "FROM {$table} "; $query .= "WHERE subject_id = {$id} "; $query .= "ORDER BY update_time DESC"; $blogs_set = mysqli_query($connection, $query); $output = "<div class=\"container\"><div class=\"row\">"; $output .= "<div class=\"col-md-8\">"; $output .= "<h1 class=\"page-header\">My Blogs <small>Welcome"; $output .= ".</small></h1>"; while ($blogs = mysqli_fetch_assoc($blogs_set)) { $user = show_user_info("users", $blogs["subject_id"]); $output .= "<h2><a href=\"user_view_blog.php?user_id="; $output .= urlencode($blogs["subject_id"]); $output .= "&blog_id="; $output .= urlencode($blogs["id"]); $output .= "\">"; $output .= $blogs["title"]; $output .= "</a></h2><br /> <p><span class=\"glyphicon glyphicon-time\"></span> Posted on "; $output .= $blogs["update_time"]; $output .= "</p><hr><br/><p>"; $output .= nl2br($blogs["content"]); $output .= "</p><a class=\"btn btn-primary\" href=\"user_view_blog.php?user_id="; $output .= urlencode($blogs["subject_id"]); $output .= "&blog_id="; $output .= urlencode($blogs["id"]); $output .= "\">"; $output .= "Read More <span class=\"glyphicon glyphicon-chevron-right\"></span></a> <hr>"; } // $output .= "<li>hello</li>"; $output .= "</div></div></div>"; mysqli_free_result($blogs_set); return $output; }