<?php

/**
 * @package     JohnCMS
 * @link        http://johncms.com
 * @copyright   Copyright (C) 2008-2011 JohnCMS Community
 * @license     LICENSE.txt (see attached file)
 * @version     VERSION.txt (see attached file)
 * @author      http://johncms.com/about
 */

defined('_IN_JOHNCMS') or die('Error: restricted access');

// Рекламный блок сайта

if (isset($_GET['err']) || $headmod !="mainpage" || ($headmod == 'mainpage' &&$act)) { echo '<div class="phdr"><b>Reklama</b></div>'; }

if (isset($_GET['err']) || $headmod!="mainpage" || ($headmod == 'mainpage' &&$act)) { echo '<div class="daviuz">Kodli reklam uchun joy! </div>';}


if (!empty($cms_ads[2])) {
echo '<div class="daviuz">' . $cms_ads[2] . '</div>';
}


// Hisoblagich //
echo '<div class="phdr"><b>Navigatsiya</b></div>';
echo '<div class="menu"><a href="/index.php ">» Bosh Sahifa</a></div>';
echo '<div class="menu">» daviuz98@gmail.com </div>';
echo '<div class="menu"><a href="http://tg.me/davlat_amirov">» Telegram Kanalimiz! </a></div>';


echo '<div class="phdr"><b>Statistika</b></div>';

$users = mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `lastdate` > '" . (time() - 300) . "'"), 0); 
$guests = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_sessions` WHERE `lastdate` > '" . (time() - 300) . "'"), 0); 
$total = $users + $guests;

echo '<div class="menu"><center>Hozir saytda : ' .$total. '<br/>Foydalanuvchi : ' .$users. '<br/>Mehmon : ' .$guests. '</div><hr>';
// Счетчики каталогов
functions::display_counters();

// Рекламный блок сайта
if (!empty($cms_ads[3])) {
    echo '<br />' . $cms_ads[3];
}

/*
----------------------------------------------------------------
ВНИМАНИЕ!!!
Данный копирайт нельзя убирать в течение 90 дней с момента установки скриптов
-----------------------------------------------------------------
ATTENTION!!!
The copyright could not be removed within 90 days of installation script
-----------------------------------------------------------------
*/
echo '<div><small>&copy; <a href="http://johncms.com">JohnCMS</a></small></div>' .
    '</div></body></html>';
