<?
$k_p = mysqli_num_rows(mysqli_query($dbi, "SELECT * FROM `diary`"));
$k_n = mysqli_num_rows(mysqli_query($dbi, "SELECT * FROM `diary` WHERE `time` > '".(time()-86400)."'"));
if ($k_n==0)$k_n=NULL;
else $k_n="/<span class='spagr'>+$k_n</span>";
echo $k_p.$k_n;
?>