Koenig, Там во втором случае где
if($row['read'] == 2){
$arg = array ('text' => '<a href="index.php?do=history&id=' . $res['id'] . '">',
'mail' =>''
);
}
echo functions::display_user($res, $arg) . '<div class="nn"><input type="checkbox" name="delch[]" value="' . $row['id_kont'] . '"/></div>'; не там стоит закрывающая скобка при правильном расположении результат тот же.