Example #1
0
<?php

$b = new Blog();
$u = new User();
$all = true;
$self = false;
if (isset($_GET['follow']) && $_GET['follow'] == true) {
    $blogs = $b->blogFromFollower($_COOKIE['username']);
    $all = false;
} else {
    $blogs = $b->all();
}
$follows = $u->follower($_COOKIE['username']);
?>
<div class="row">
    <div class="col-md-8">
        <h1 class="page-header">
            Twitts 
            <!-- <a href="http://localhost/Zipdrug/blog/follower"><small>Only Followers</small></a> -->
        </h1>
        <?php 
if ($all == false) {
    ?>
            <a href="http://localhost/Zipdrug/user/home"><span> Back to all</span></a>
        <?php 
} else {
    ?>
        <a href="http://localhost/Zipdrug/user/home?follow=true"><span> Click to Show only from follower</span></a>
        <?php 
}
foreach ($blogs as $blog) {