code_one
  1. <?php
  2.  
  3. defined('_IN_JOHNCMS') or die('Error: restricted access');
  4.  
  5. // reklama
  6. if (!empty($cms_ads[2])) {
  7. echo '<div class="phdr"><b>Tafsiya etamiz</b></div>';
  8. echo $cms_ads[2];
  9. }
  10.  
  11. // frazy
  12. $frazy = mysql_fetch_array(mysql_query('SELECT * FROM `frazy` WHERE `moder`=1 ORDER BY RAND() LIMIT 1'));
  13. echo '<div class="menu"><b>Bilasizmi?!</b><br/>' . $frazy['text'] . '</div>';
  14.  
  15. // online
  16. $on1 = mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `lastdate` > '" . (time() - 300) . "'"), 0);
  17. $on2 = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_sessions` WHERE `lastdate` > '" . (time() - 300) . "'"), 0);
  18. $on3 = ($on1 + $on2);
  19. echo '<div class="fmenu">';
  20. if ($on3 < 5){
  21. echo '<img src="'.$home.'/images/spotti/12.png" alt="#" style="width: 50px; height: 60px; float: left;"/>';
  22. }
  23. if ($on3 < 10){
  24. if ($on3 > 4){
  25. echo '<img src="'.$home.'/images/spotti/07.png" alt="#" style="width: 50px; height: 60px; float: left;"/>';
  26. }}
  27. if ($on3 < 20){
  28. if ($on3 > 9){
  29. echo '<img src="'.$home.'/images/spotti/06.png" alt="#" style="width: 50px; height: 60px; float: left;"/>';
  30. }}
  31. if ($on3 > 19){
  32. echo '<img src="'.$home.'/images/spotti/01.png" alt="#" style="width: 50px; height: 60px; float: left;"/>';
  33. }
  34. echo '<div class="info" style="min-height: 52px; margin-left: 54px;">&raquo; Hozir saytdagilar '.$on3.'<br/>';
  35. echo '&raquo; Foydalanuvchilar '.$on1.'<br/>&raquo; Mehmonlar '.$on2.'</div></div>';
  36.  
  37. // copy
  38. echo '<div class="footer" style="text-align: center;">&copy; <a href="/"><b>SHOVVOZLAR.COM</b></a> 2015<br/>Shovvozlar Bilan Birga !!!</div>';
  39.  
  40. // hisoblash
  41. $page_size = ob_get_length();
  42. $hisoblagichend = microtime(true);
  43. $tezlik = $hisoblagichend - $hisoblagich;
  44. echo '<div class="menu"><table cellspacing="0" cellpadding="0" width="100%"><tr><td><small><b>' .
  45. // 'Sahifa hajmi: '.round($page_size / 1024, 2).' kb.<br/>' .
  46. 'Tezlik: '.round($tezlik,3).' sekund</b></small></td><td style="float: right;">';
  47. functions::display_counters();
  48. echo '</td></tr></table></div>';
  49.  
  50. // reklama
  51. if (!empty($cms_ads[3])) {
  52. echo $cms_ads[3];
  53. }
  54.  
  55. echo '</body></html>';
mana shu kodni tugirlab berizlar xuddi uzforni paski paneliga uxshatib