<?php
require '../assets/config-data.php';
$kodek = mysqli_real_escape_string($data, $_GET['codekelu']);

$snot = "SELECT * FROM keluhan_member WHERE kode_keluhan = '$kodek' AND sender_keluhan != '' AND baca_keluhan = '0'";
$qnot = mysqli_query($data, $snot);
if(mysqli_num_rows($qnot) > 0) {
    $cmsg = "SELECT COUNT(*) as totalmsg FROM keluhan_member WHERE kode_keluhan = '$kodek' AND sender_keluhan != '' AND baca_keluhan = '0'";
    $qqmsg = mysqli_query($data, $cmsg);
    $fmsg = mysqli_fetch_assoc($qqmsg);
    echo '<span class="badge badge-danger blinks">'.$fmsg['totalmsg'].'</span>';
}
?>