Fanat_FCB
  1. Operator_N1, <?php
  2.  
  3. /*
  4. -----------------------------------------------------------------
  5. Maqolalar
  6. -----------------------------------------------------------------
  7. */
  8. $kmess = '15';
  9. echo '<div class="phdr"><img src="/menu.png" alt="*" width="37px" height="37px"/><b> Yangi maqolalar</b></div>';
  10. $bolm_sql = mysql_query("SELECT `id`, `name`, `dir`, `description` FROM `library_cats` WHERE `parent`=0 ORDER BY `pos` DESC");
  11. $sql = mysql_result(mysql_query('SELECT COUNT(*) FROM `library_texts` WHERE `premod`=1'), 0);
  12. $page = $page >= ceil($sql / $kmess) ? ceil($sql / $kmess) : $page;
  13. $start = $page == 1 ? 0 : ($page - 1) * $kmess;
  14. $bolm = mysql_fetch_assoc($bolm_sql);
  15.  
  16. $req_lib = mysql_query("SELECT * FROM `library_texts` WHERE `premod`='1' ORDER BY `time` DESC LIMIT 15 ");
  17. if ($sql) {
  18. $i = 0;
  19. while ($lib = mysql_fetch_assoc($req_lib)) {
  20. echo'<div class="menu">';
  21.  
  22. if (file_exists((ROOTPATH . 'files/library/images/big/' . $lib['id'] . '.png'))){
  23.  
  24. $img_style = 'width: 60px; height: 35px; float: left; clear: both; margin: 10px';
  25. echo '<a href="' . $set['homeurl'] . '/library/index.php?id=' . $lib['id'] . '">';
  26. }else{
  27. $img_style = 'width: 60px; height: 35px; float: left; clear: both; margin: 10px';
  28. }
  29. echo '<img src="/images/kamentariya.png" alt="icon" width="16" height="16"/></a> <a href="' . $set['homeurl'] . '/library/index.php?id=' . $lib['id'] . '"> ' . $lib['name'] . '</a><div class="" style="float:right;"> O\'qildi: <span class="time"> [' . $lib['count_views'] . ']</span> </div>';
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39. echo '</div>';
  40. }
  41. }
  42.  
  43.  
  44. ?>