<?php

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

$kp = $k_p;
$kn = $k_n;

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