0
나는 내 프로젝트를위한 알림 시스템을 구축하고 있는데, 내가 원하는 것은 사용자가 알림 링크 (예 : [3])를 클릭하면 3 개가 있음을 의미합니다. 읽지 않은 알림, 내가 원하는 것은 사용자가 클릭하여 알림 테이블을 업데이트하고 볼 필드를 1로 설정하여 알림 링크가 [0]이 될 것이고 이것이 아약스 요청 또는 기타를 통해 얻을 수 있음을 알 때입니다. 방법 도움이 될 수 있습니다 사람이 내 프로젝트를 마무리 많은 사촌의 m를 감사하고 여기에 z를 내 코드 :-) 시간이 실행될 경우Codeigniter 쿼리 (업데이트) 데이터베이스 onclick
<?php if (isset($this->session->userdata['messagecount'])): ?>
<?php if (empty($this->session->userdata['messagecount'])){echo "<button class='btn'></button>";}else{
$count=$this->session->userdata['messagecount'];
echo "<button class='btn btn-info dropdown-toggle notify-btn' data-toggle='dropdown' onclick='updateNotifications()'href='#'>".$count."</button>";
}?>
<?php endif; ?>
<ul class="dropdown-menu">
<div class="notify-wrapper">
<div class="scroll">
<div class="scroll-body">
<ul class="notification-list">
<?php if (isset($this->session->userdata['notification'])): ?>
<?php if (empty($this->session->userdata['notification'])){echo "No Notifications";}else{
$notification=$this->session->userdata['notification'];
echo $notification;
}?>
<?php endif; ?>
</ul>
</div>
</div>
</div>
</ul>
<?php }else{?>
<?php }?>
</li>