RM_FANAT
Fanat_FCB, Shuni sinab koringchi

  1. <?php
  2.  
  3. $req = mysql_query("SELECT * FROM `forum` WHERE `type` = 't' AND `close` != '1' ORDER BY `time` DESC LIMIT 3");
  4. if (mysql_num_rows($req)) {
  5. for ($i = 0; $res = mysql_fetch_assoc($req); ++$i) {
  6. $q3 = mysql_query("select `id`, `refid`, `text` from `forum` where type='r' and id='" . $res['refid'] . "' LIMIT 1");
  7. $razd = mysql_fetch_assoc($q3);
  8. $q4 = mysql_query("select `id`, `refid`, `text` from `forum` where type='f' and id='" . $razd['refid'] . "' LIMIT 1");
  9. $frm = mysql_fetch_assoc($q4);
  10. $nikuser = mysql_query("SELECT `from`, `time` FROM `forum` WHERE `type` = 'm' AND `close` != '1' AND `refid` = '" . $res['id'] . "'ORDER BY `time` DESC");
  11. $colmes1 = mysql_num_rows($nikuser);
  12. $cpg = ceil($colmes1 / $kmess);
  13. $nam = mysql_fetch_assoc($nikuser);
  14. echo $i % 2 ? '<div class="list2">' : '<div class="list1">';
  15. // Значки
  16. $icons = array(
  17. ($res['vip'] ? functions::image('pt.gif') : ''),
  18. ($res['realid'] ? functions::image('rate.gif') : ''),
  19. ($res['edit'] ? functions::image('tz.gif') : '')
  20. );
  21. echo functions::display_menu($icons, '');
  22. 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>';
  23. /* echo '<p><small><i class="far fa-user fa-fw" style="font-size:12px;"></i> ' . $nam['from'] . '
  24.       <i class="far fa-clock fa-fw" style="font-size:12px;"></i> ' . date("d.m.y / H:i", $nam['time']) . '</small></p>'; */
  25. if ($cpg > 1)
  26. echo 'Mavzu: <a href="/forum/index.php?id=' . $res['id'] . '&clip&page=' . $cpg . '">>></a>';
  27.  
  28. echo '</div>';
  29. }
  30. } else {
  31. echo '<div class="menu"><p>' . $lng['list_empty'] . 'ghj</p></div>';
  32. }
  33.  
  34. ?>