Файл: user/wall/mini_form.php
Строк: 22
<?php
/*
* Стена
* 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 = get_user($posts['id_user']);
echo "<table class = ''><tr><td class = 'icon14'>";
avatar($anks['id'], '20');
echo "</td><td class = 'null'>";
echo "<div class = 'right'><font color = 'grey'><small>" . vremja($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 output_text($posts['msg']);
echo "</td></tr></table>";
}