View file user/notification/inc/comm.php

File size: 2.8Kb
<?
# Новый пост в теме сообщества
if ($type == 'comm_forum_komm') {
	$topic = mysql_fetch_assoc(mysql_query("SELECT * FROM `comm_forum` WHERE `id` = '$post[id_object]' AND `type` = 'topic'"));
	if (@$topic['id']):
		$comm = mysql_fetch_assoc(mysql_query("SELECT * FROM `comm` WHERE `id` = '$topic[id_comm]'"));
		if (@$comm['id']):
		$cat = mysql_fetch_assoc(mysql_query("SELECT * FROM `comm_forum` WHERE `id` = '$topic[id_cat]' AND `type` = 'cat'"));
		echo status($avtor['id']).group($avtor['id'])." <a href='/info.php?id=$avtor[id]'>$avtor[nick]</a> ".medal($avtor['id']).online($avtor['id']) 
		. ($topic['id_user'] == $user['id'] ? " оставил".(!$avtor['pol'] ? 'а' : null)." комментарий в Вашей теме " : " ответил".(!$avtor['pol'] ? 'а' : null)." на Ваш комментарий в теме ")
		. "<a href='/comm/?act=forum&id=$comm[id]&cat_show=$cat[id]&topic_show=$topic[id]'>".htmlspecialchars($topic['name'])."</a> в сообществе <a href='/comm/?act=comm&id=$comm[id]'>".htmlspecialchars($comm['name'])."</a>.";
		echo " $s1 ".vremja($post['time'])." $s2";
		else:
			echo 'Сообщество уже удалено =( ' . $s1 . vremja($post['time']) . $s2;
		endif;
	else:
		echo " Топик удален =(  $s1 ".vremja($post['time'])." $s2";
	endif;
}
# Новый комментарий к файлу сообщества
if ($type == 'comm_files_komm') {
	$file = mysql_fetch_array(mysql_query("SELECT * FROM `comm_files` WHERE `id` = '$post[id_object]' AND `type` = 'file'"));
	if (@$file['id']):
		$comm = mysql_fetch_assoc(mysql_query("SELECT * FROM `comm` WHERE `id` = '$file[id_comm]'"));
		if (@$comm['id']):
		echo status($avtor['id']).group($avtor['id'])." <a href='/info.php?id=$avtor[id]'>$avtor[nick]</a> ".medal($avtor['id']).online($avtor['id']) 
		. ($file['id_user'] == $user['id'] ? " оставил".(!$avtor['pol'] ? 'а' : null)." комментарий к Вашему файлу " : " ответил".(!$avtor['pol'] ? 'а' : null)." на Ваш комментарий к файлу ")
		. "<a href='/comm/?act=files&id=$comm[id]&file=$file[id]'>".(is_file(H.'style/themes/'.$set['set_them'].'/loads/14/'.$file['ras'].'.png') ? "<img src='/style/themes/$set[set_them]/loads/14/$file[ras].png' alt='$file[ras]' />" : "<img src='/style/themes/$set[set_them]/loads/14/file.png' alt='file' />")." ".htmlspecialchars($file['name']).".".htmlspecialchars($file['ras'])."</a> в сообществе <a href='/comm/?act=comm&id=$comm[id]'>".htmlspecialchars($comm['name'])."</a>.";
		echo " $s1 ".vremja($post['time'])." $s2";
		else:
			echo 'Сообщество уже удалено =( ' . $s1 . vremja($post['time']) . $s2;
		endif;
	else:
		echo " Файл удален =(  $s1 ".vremja($post['time'])." $s2";
	endif;
}

?>