Файл: user/wall/mini_form.php
Строк: 22
<?php
/* Мод "Стена"
* Версия v0.0.1
* Дата последнего редактирования 21.11.2014
* Двиг DCMS Special
* Модифицировал densnet
* Файл mini_form.php
* Описание: выводит мини комментарии после записи на стене
*/
$walls = mysql_fetch_array(mysql_query("SELECT * FROM `wall` WHERE `id` = '$post[id]';"));
$k_posts = mysql_result(mysql_query("SELECT COUNT(*) FROM `wall_comments` WHERE `id_wall` = '$post[id]'"), 0);
$k_pages = k_page($k_posts, $set['p_str']);
$pages = page($k_pages);
$starts = $set['p_str'] * $pages - $set['p_str'];
if (IS_WEB) {
$qs = mysql_query("SELECT * FROM `wall_comments` WHERE `id_wall` = '$post[id]' ORDER BY `time` ASC LIMIT 5");
} else {
$qs = mysql_query("SELECT * FROM `wall_comments` WHERE `id_wall` = '$post[id]' ORDER BY `time` ASC LIMIT 3");
}
while ($posts = mysql_fetch_assoc($qs)) {
$anks = user::get_user($posts['id_user']);
echo "<br /><table class = ''><tr><td class = 'icon14'>";
avatar($anks['id'], '30');
echo "</td><td class = 'null'>";
echo "<div style = 'float:right;'><font color = 'grey'><small>" . date::time($posts['time']) . "</small></font></div>";
echo "<a href = '/info.php?id=$anks[id]'><b>";
echo text::gradient("$anks[nick]", "$anks[ncolor]", "$anks[ncolor2]");
echo "</b></a><br />";
echo text::toOutput($posts['msg']);
echo "</td></tr></table>";
}