@@ 3-29 (lines=27) @@ | ||
1 | ||
2 | ||
3 | <?php if(empty($comments)){ ?> |
|
4 | <li class='no-data'><div class='text-center'><span class='text-muted'>There is no comments!</span></div></li> |
|
5 | ||
6 | <?php } else{ |
|
7 | foreach($comments as $comment){?> |
|
8 | ||
9 | <li id="<?= "comment-" . Encryption::encryptId($comment["id"]); ?>" class="left clearfix"> |
|
10 | <span class="chat-img pull-left"> |
|
11 | <img src="<?= PUBLIC_ROOT . "img/profile_pictures/" . $comment["profile_picture"]; ?>" alt="User Picture" class="img-circle profile-pic-sm"> |
|
12 | </span> |
|
13 | ||
14 | <div class="chat-body clearfix"> |
|
15 | <div class="header"> |
|
16 | <strong class="primary-font"><?= $comment["user_name"]; ?></strong> |
|
17 | <small class="text-muted"><i class="fa fa-clock-o fa-fw"></i><?= $this->timestamp($comment["date"]) ?></small> |
|
18 | <?php if(Session::getUserId() === (int) $comment["user_id"] || Session::getUserRole() === "admin"){ ?> |
|
19 | <span class="pull-right btn-group btn-group-xs"> |
|
20 | <a class="btn btn-default edit"><i class="fa fa-pencil"></i></a> |
|
21 | <a class="btn btn-danger delete"><i class="fa fa-times"></i></a> |
|
22 | </span> |
|
23 | <?php }?> |
|
24 | </div> |
|
25 | <p><?= $this->autoLinks($this->encodeHTMLWithBR($comment["content"])); ?></p> |
|
26 | </div> |
|
27 | </li> |
|
28 | <?php } |
|
29 | }?> |
|
30 |
@@ 2-26 (lines=25) @@ | ||
1 | ||
2 | <?php if(empty($newsfeed)){ ?> |
|
3 | <li class='no-data text-center'><span class='text-muted'>There is no news feed!!</span></li> |
|
4 | ||
5 | <?php } else{ |
|
6 | foreach($newsfeed as $feed){?> |
|
7 | <li id="<?= "feed-" . Encryption::encryptId($feed["id"]);?>" class="left clearfix"> |
|
8 | <span class="chat-img pull-left"> |
|
9 | <img src="<?= PUBLIC_ROOT . "img/profile_pictures/" . $feed["profile_picture"]; ?>" alt="User Picture" class="img-circle profile-pic-sm"> |
|
10 | </span> |
|
11 | <div class="chat-body clearfix"> |
|
12 | <div class="header"> |
|
13 | <strong class="primary-font"><?= $feed["user_name"]; ?></strong> |
|
14 | <small class="text-muted"><i class="fa fa-clock-o fa-fw"></i> <?= $this->timestamp($feed["date"]);?> </small> |
|
15 | <?php if(Session::getUserId() === (int) $feed["user_id"] || Session::getUserRole() === "admin"){?> |
|
16 | <span class="pull-right btn-group btn-group-xs"> |
|
17 | <a class="btn btn-default edit"><i class="fa fa-pencil"></i></a> |
|
18 | <a class="btn btn-danger delete"><i class="fa fa-times"></i></a> |
|
19 | </span> |
|
20 | <?php }?> |
|
21 | </div> |
|
22 | <p> <?= $this->autoLinks($this->encodeHTMLWithBR($feed["content"])); ?></p> |
|
23 | </div> |
|
24 | </li> |
|
25 | <?php } |
|
26 | }?> |
|
27 | ||
28 | ||
29 |