Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php appHeader(1, $page); ?>
- <div id="appCapsule">
- <?php
- $notify = DB("SELECT * FROM users_notification WHERE uid = '$user_id' ORDER BY created_at DESC");
- $created_at = '';
- $yesterday = date('Y-m-d', strtotime("-1 day", strtotime(date('Y-m-d'))));
- while($data_notify = $notify->fetch_assoc()) {
- $tgl_db=date('Y-m-d',strtotime($data_notify['created_at']));
- if($created_at!=$tgl_db){
- if(date('Y-m-d')==$tgl_db){
- $waktu='Hari ini';
- }else if($yesterday==$tgl_db){
- $waktu='Kemarin';
- } else {
- $waktu=str_replace(substr(format_date('id', $created_at), -5), '', format_date('id', $created_at));
- }
- $created_at=$tgl_db;
- ?>
- <div class="section pt-2 pb-1">
- <div class="text-secondary" style="font-weight: bold"><?= $waktu; ?></div>
- </div>
- <?php } ?>
- <div class="notification-item">
- <div class="icon-box bg-primary avatar">
- <ion-icon role="img" class="icon hw-icon hw ni-wallet-out md hydrated" aria-label="albums outline"></ion-icon>
- </div>
- <div class="content">
- <div class="notification-divider">
- <?= $data_notify['created_at'];?>
- </div>
- <div class="bubble">
- <?= $data_notify['notification'];?>
- </div>
- </div>
- </div>
- <?php } ?>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment