<?php 

$group = mysql_fetch_assoc(mysql_query("SELECT t.*, u.level, ru.nick, ru.date_last, g.name
                                            FROM `groups_comments` AS t
                                            LEFT JOIN groups_users AS u ON u.id_user = t.id_user
                                            RIGHT JOIN groups AS g ON g.uid = t.id_group
                                            JOIN user AS ru ON t.id_user = ru.id
                                            WHERE t.uid = '" . $post['id_object'] . "'
                                            LIMIT 1"));

$group_type = array(
		'topic' => array('link' => 'topic.php', 'get' => 'topic', 'name' => 'теме'), 
		'video' => array('link' => 'videos.php', 'get' => 'video', 'name' => 'видео'), 
		'photo' => array('link' => 'albums.php', 'get' => 'photo', 'name' => 'фотографии'),
);

if ($group['uid']) {
  ?>
  <?= $avtor['avatar'] . $avtor['icon'] . $avtor['link'] . $avtor['medal'] . $avtor['online']?> <?= __('ответил') . ($avtor['pol'] == 1 ? "" : "а") . __(' вам из группы ')?> <a href="/groups/group.php?uid=<?= $group['id_group']?>"><?= text($group['name'])?></a> в комментариях к 
  <a href="/groups/<?= $group_type[$group['type']]['link']?>?uid=<?= $group['id_group']?>&amp;<?= $group_type[$group['type']]['get']?>=<?= $group['id_object']?>"><?= $group_type[$group['type']]['name']?></a> 
  <?  
}