<?php

$q = $db->super_query("SELECT COUNT(read) as read FROM `notification` WHERE `id_kont` = '$user[id]'");
$k_p = $q['read'];
$q = $db->super_query("SELECT COUNT(*) as count FROM `notification` WHERE `id_kont` = '$user[id]' AND `time` > '" . (time() - 86400) . "'");
$k_n = $q['count'];
$q = $db->super_query("SELECT COUNT(read) as read FROM `notifications` WHERE `id_kont` = '$user[id]'");
$k_p1 = $q['read'];
$q = $db->super_query("SELECT COUNT(*) as count FROM `notifications` WHERE `id_kont` = '$user[id]' AND `time` > '" . (time() - 86400) . "'");
$k_n1 = $q['count'];

$kp = $k_p + $kp1;
$kn = $k_n + $kn1;

if ($kn == 0) {
    $kn = NULL;
} else {
    $kn = " +$kn";
}
echo "$kp$kn";
