function dload() {
    ////////////////////////////////////////////////////////////
    // Статистика загрузок                                    //
    ////////////////////////////////////////////////////////////
    global $realtime, $rights;
    $total = mysql_result(mysql_query("SELECT COUNT(*) FROM `down_files` WHERE `type` = '2'"), 0);
    $old = $realtime - (3 * 24 * 3600);
    $new = mysql_result(mysql_query("SELECT COUNT(*) FROM `down_files` WHERE `type` = '2' AND `time` > '$old'"), 0);
    if ($new > 0)
        $total .= '&nbsp;/&nbsp;<span class="red"><a href="/download/?act=new_files">+' . $new . '</a></span>';
    if ($rights == 4 || $rights >= 6) {
    	$mod = mysql_result(mysql_query("SELECT COUNT(*) FROM `down_files` WHERE `type` = '3'"), 0);
    	if ($mod > 0)
        	$total .= '&nbsp;/&nbsp;<span class="red"><a href="/download/?act=mod_files">м. ' . $mod . '</a></span>';
    }
    return $total;
}