Fanat_FCB, Shuni sinab koringchi
Kod · PHP67 qator
<?php
$req = mysql_query("SELECT * FROM `forum` WHERE `type` = 't' AND `close` != '1' ORDER BY `time` DESC LIMIT 3");
if (mysql_num_rows($req)) {
for ($i = 0; $res = mysql_fetch_assoc($req); ++$i) {
$q3 = mysql_query("select `id`, `refid`, `text` from `forum` where type='r' and id='" . $res['refid'] . "' LIMIT 1");
$razd = mysql_fetch_assoc($q3);
$q4 = mysql_query("select `id`, `refid`, `text` from `forum` where type='f' and id='" . $razd['refid'] . "' LIMIT 1");
$frm = mysql_fetch_assoc($q4);
$nikuser = mysql_query("SELECT `from`, `time` FROM `forum` WHERE `type` = 'm' AND `close` != '1' AND `refid` = '" . $res['id'] . "'ORDER BY `time` DESC");
$colmes1 = mysql_num_rows($nikuser);
$cpg = ceil($colmes1 / $kmess);
$nam = mysql_fetch_assoc($nikuser);
echo $i % 2 ? '<div class="list2">' : '<div class="list1">';
// Значки
$icons = array(
($res['vip'] ? functions::image('pt.gif') : ''),
($res['realid'] ? functions::image('rate.gif') : ''),
($res['edit'] ? functions::image('tz.gif') : '')
);
echo functions::display_menu($icons, '');
echo '<a href="/forum/index.php?id=' . $res['id'] . '">' . $res['text'] . '</a> (' . $colmes1 . ') <b>' . $nam['from'] . '</b> <a href="forum/index.php?id=' . $res['id'] . (!$set_forum['upfp'] && $set_forum['postclip'] ? '&clip' : '') . ($set_forum['upfp'] ? '' : '&page=' . $cpg) . '#down">>></a>';
/* echo '<p><small><i class="far fa-user fa-fw" style="font-size:12px;"></i> ' . $nam['from'] . '
<i class="far fa-clock fa-fw" style="font-size:12px;"></i> ' . date("d.m.y / H:i", $nam['time']) . '</small></p>'; */
if ($cpg > 1)
echo 'Mavzu: <a href="/forum/index.php?id=' . $res['id'] . '&clip&page=' . $cpg . '">>></a>';
echo '</div>';
}
} else {
echo '<div class="menu"><p>' . $lng['list_empty'] . 'ghj</p></div>';
}
?>