Example #1
0
<div class="container active">

<div id="wall">
<?php 
$post = get_post($_GET['p']);
$login = get_login($post['iduser']);
echo "<div class='post' id=" . $post['id'] . ">";
$date2 = $post['timedate'];
$date2 = date('Y-m-d', strtotime($date2));
echo "<span class='heure'>" . $date2 . "</span>";
echo "<span class='texte'>" . $post['content'] . "</span>";
echo "<img src='" . $post['link'] . "'/>";
echo "<img class='pp' src='upload/profilpictures/" . get_pp($login) . "'/>";
echo "<a href='profile?login="******"'><span class='login'>" . $login . "</span></a>";
//echo "<span class='heure'> report content(" . $post['report'] .") </span>";
echo "<span class='like'>" . get_nblike($post['id']) . " likes - <span class='opencomments'>";
echo get_nb_comments($post['id']) . " comments </span></span>";
$comments = get_comments($post['id']);
echo "<div class='comments active'>";
foreach ($comments as $com) {
    $date = $com['timedate'];
    $date = date('d/m/Y', strtotime($date));
    echo "<div class='com'>";
    $user = get_login($com['idusercible']);
    echo "<div class='userinfos'><img class='pp' src='upload/profilpictures/" . get_pp($user) . "'/>";
    echo "<a href='profile?login="******"'><span class='login'> Par " . $user . " le " . $date . "</span></a> </div>";
    echo "<div class='texte'>" . $com['content'] . "</div>";
    echo "</div>";
}
if (isset($_SESSION['login'])) {
    ?>
Example #2
0
echo get_pp($user);
?>
 "/>
    </div>
      <h2> <?php 
echo $user;
?>
</h2>
    </div>
  </div>

    <?php 
$posts = get_userpost($user);
foreach ($posts as $post) {
    $login = get_login($post['iduser']);
    echo "<div class='post user'>";
    $date = new DateTime("now");
    $date2 = $post['timedate'];
    $date2 = date('Y-m-d', strtotime($date2));
    echo "<a href='post.php?p=" . $post['id'] . "'> <img src='" . $post['link'] . "'/></a>";
    //echo "<span class='heure'> report content(" . $post['report'] .") </span>";
    echo "<span class='delete'><a href='model/posts.php?supp=" . $post['id'] . "'> Supp </a> </span>";
    echo "<span class='like'>" . get_nblike($post['id']) . " Likes </span>";
    echo "<span class='like'>" . get_nb_comments($post['id']) . " comments </span></span>";
    echo "</div>";
}
?>
</div>

<?php 
include 'view/footer.php';