Advertisement
Guest User

Untitled

a guest
Dec 15th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.84 KB | None | 0 0
  1. <div id="messages-container">
  2.     <?php foreach ($list_user_activity as $activity) : ?>
  3.  
  4.         <div class="card" id="activity_<?= $activity['id'] ?>">
  5.             <div class="card-header d-flex align-items-center bg-lighten">
  6.                 <div class="avatar-badge avatar-sm mr-3">
  7.                     <img src="<?= PATH_AVATAR . $activity['author_avatar'] ?>" alt="">
  8.  
  9.                     <?= App::showStatusConnected($activity['author_last_action'], TRUE) ?>
  10.                 </div>
  11.                 <div>
  12.                     <h5 class="card-title">
  13.                         <a href="/profil/<?= $activity['author_id'] ?>/<?= $activity['author_username'] ?>"><?= $activity['author_username'] ?></a>
  14.                     </h5>
  15.                     <span class="text-muted font-size-sm"><?= App::convertUnixToDate($activity['created_at']) ?></span>
  16.  
  17.  
  18.  
  19.                 </div>
  20.  
  21.                 <?php if (CurrentUser::isConnected()) : ?>
  22.                     <?php if ($activity['user_id'] == CurrentUser::getId() or $activity['profile_id'] == CurrentUser::getId()) : ?>
  23.  
  24.                         <div class="dropdown ml-auto">
  25.                             <button class="btn btn-link btn-block btn-icon" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="ya ya-menu"></i></button>
  26.                             <div class="dropdown-menu dropdown-menu-right">
  27.  
  28.  
  29.                                 <?php if ($activity['author_id'] == CurrentUser::getId()) : ?>
  30.                                     <a class="dropdown-item" href="/profil/<?= $user->id ?>/<?= $user->username ?>/activity/edit/<?= $activity['id'] ?>">Modifier</a>
  31.                                     <button class="delete dropdown-item" id='del_<?= $activity['id'] ?>'>Supprimer</button>
  32.                                     <?php if ($activity['profile_id'] == CurrentUser::getId()) : ?> <div class="dropdown-divider"></div><?php endif; ?>
  33.  
  34.                                 <?php endif; ?>
  35.  
  36.                                 <?php if ($activity['profile_id'] == CurrentUser::getId()) : ?>
  37.                                     <a class="dropdown-item" href="/profil/<?= $user->id ?>/<?= $user->username ?>/activity/unfeatured/<?= $activity['id'] ?>">Ne plus mettre en vedette</a>
  38.                                     <a class="dropdown-item" href="/profil/<?= $user->id ?>/<?= $user->username ?>/activity/featured/<?= $activity['id'] ?>">Mettre en vedette</a>
  39.                                 <?php endif; ?>
  40.  
  41.                             </div>
  42.                         </div>
  43.                     <?php endif; ?>
  44.  
  45.                 <?php endif; ?>
  46.             </div>
  47.             <div class="card-body">
  48.                 <p class="card-text">
  49.                     <?= nl2br($activity['message']) ?>
  50.                 </p>
  51.             </div>
  52.             <div class="card-footer d-flex">
  53.                 <span style="font-weight:600;">
  54.                     <span class="" id="class-expire-<?= $activity['id'] ?>">
  55.                         Expire dans: <span id="expire-<?= $activity['id'] ?>">
  56.                         </span>
  57.                     </span>
  58.                 </span>
  59.                 <?php if ($activity['featured'] == 1) : ?>
  60.                     <span class=" badge badge-pill badge-warning">En vedette</span>
  61.                 <?php endif; ?>
  62.  
  63.                 <div class="ml-auto">
  64.  
  65.                     <a href="/profil/<?= $user->id ?>/<?= $user->username ?>/activity/comments/<?= $activity['id'] ?>"><button class="btn btn-default btn-icon btn-xs"><i class="ya ya-comment"></i> (0)</button></a>
  66.  
  67.                     <script>
  68.                         countdown_message(<?= $activity['id'] ?>, "<?= App::convertUnixToEnglishDate($activity['expire_at']) ?>");
  69.                     </script>
  70.  
  71.                 </div>
  72.             </div>
  73.         </div>
  74.     <?php endforeach; ?>
  75. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement