<?
$set['meta_keywords']=(isset($set['meta_keywords']))?$set['meta_keywords']:null;
$set['meta_description']=(isset($set['meta_description']))?$set['meta_description']:null;

// Ключевые слова
if ($set['meta_keywords']!=NULL)
{ 
	function meta_keywords($str)
	{
		global $set;
		return str_replace('</head>', '<meta name="keywords" content="'.$set['meta_keywords'].'" />'."\n</head>", $str);
	}
	ob_start('meta_keywords');
}

// Описание мета
if ($set['meta_description']!=NULL)
{
	function meta_description($str)
	{
		global $set;
		return str_replace('</head>', '<meta name="description" content="'.$set['meta_description'].'" />'."\n</head>", $str);
	}
	ob_start('meta_description');
}

include_once H.'reg_users/inc/inc.php';
if (file_exists(H."style/themes/$set[set_them]/head.php"))
include_once H."style/themes/$set[set_them]/head.php";
else
{
	$set['web'] = false;
	//header("Content-type: application/vnd.wap.xhtml+xml");
	//header("Content-type: application/xhtml+xml");
	header("Content-type: text/html");
	echo '<?xml version="1.0" encoding="utf-8"?>';
	?><!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
	<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru">
	<head>
	<title><?=$set['title']?></title>
	<link rel="shortcut icon" href="/favicon.ico" />
	<link rel="stylesheet" href="/style/themes/<?=$set['set_them']?>/style.css" type="text/css" />
	<link rel="alternate" title="Новости RSS" href="/news/rss.php" type="application/rss+xml" />
	</head>
	<body>
	<div class="body">
	<?
}

// Уведомления 
if (isset($_SESSION['message']))
{
	echo '<div class="msg">' . $_SESSION['message'] . '</div>'; 
	$_SESSION['message'] = NULL;
}

// Вывод ошибок
if (isset($_SESSION['err']))
{
	echo '<div class="msg">' . $_SESSION['err'] . '</div>';
	$_SESSION['err'] = NULL;
}

/* 
* Поднять крышку
*/

if (!isset($fortuna))$fortuna = 1;

if (isset($user['id']) && $fortuna == 1)
{
	$rand = rand(1,500);
	$key = rand(1111111111,9999999999);
	
	if ($rand == 10 or $rand == 20 or $rand == 30 or $rand == 40 or $rand == 50 or $rand == 60 or $rand == 70 or $rand == 80 or $rand == 90 or $rand == 100)
	{
		$_SESSION['s_code'] = $key;
		$_SESSION['s_rand'] = $rand;
		$_SESSION['s_str'] = $_SERVER['PHP_SELF'];
		echo '<div class="nav2"><img src="/plugins/games/caps/img/fav.gif" /> <a href="/plugins/games/caps/random.php?key=' . $key . '">Поднять крышку</a></div>';
	}
}




if ( isset( $user['id'] ) ) { $extra_n = rand( 1, 100 );
if ($extra_n == 100 or $extra_n == 50 or $extra_n == 1)
{ @session_start();
$extra_unic = rand( 1111111111, 9999999999 );
$_SESSION['unic_code'] = $extra_unic;
$_SESSION['is_str'] = $_SERVER['PHP_SELF'];
echo'<div class="nav2"><center><a href="/Ohota/patron.php?unic_code=' . $extra_unic . '"><img src="/Ohota/img/patron.png" > Забрать патроны</a></center></div>';}}



////////////////////сердце любви
if (isset( $user['id'] ) ) { 
$extra_n = rand( 1, 100 );
if ($extra_n == 100 or $extra_n == 50 or $extra_n == 1)
{ 
@session_start();
$extra_unic = rand( 1111111111, 9999999999 );
$_SESSION['unic_code'] = $extra_unic;
$_SESSION['is_str'] = $_SERVER['PHP_SELF'];
echo'<center><a href="/My_LOVE/ser1.php?unic_code=' . $extra_unic . '"> <img src="/My_LOVE/icon/ser1.png"></a></center>';
}
$extra_n = rand( 1, 100 );
if ($extra_n == 100 or $extra_n == 50 or $extra_n == 1)
{
@session_start();
$extra_unic = rand( 1111111111, 9999999999 );
$_SESSION['unic_code'] = $extra_unic;
$_SESSION['is_str'] = $_SERVER['PHP_SELF'];
echo'<center><a href="/My_LOVE/ser2.php?unic_code=' . $extra_unic . '"> <img src="/My_LOVE/icon/ser2.png"></a></center>';
}
$extra_n = rand( 1, 100 );
if ($extra_n == 100 or $extra_n == 50 or $extra_n == 1)
{
@session_start();
$extra_unic = rand( 1111111111, 9999999999 );
$_SESSION['unic_code'] = $extra_unic;
$_SESSION['is_str'] = $_SERVER['PHP_SELF'];
echo'<center><a href="/My_LOVE/ser3.php?unic_code=' . $extra_unic . '"> <img src="/My_LOVE/icon/ser3.png"></a></center>';
}
$extra_n = rand( 1, 100 );
if ($extra_n == 100 or $extra_n == 50 or $extra_n == 1)
{
@session_start();
$extra_unic = rand( 1111111111, 9999999999 );
$_SESSION['unic_code'] = $extra_unic;
$_SESSION['is_str'] = $_SERVER['PHP_SELF'];
echo'<center><a href="/My_LOVE/ser4.php?unic_code=' . $extra_unic . '"> <img src="/My_LOVE/icon/ser4.png"></a></center>';
}
$extra_n = rand( 1, 100 );
if ($extra_n == 100 or $extra_n == 50 or $extra_n == 1)
{
@session_start();
$extra_unic = rand( 1111111111, 9999999999 );
$_SESSION['unic_code'] = $extra_unic;
$_SESSION['is_str'] = $_SERVER['PHP_SELF'];
echo'<center><a href="/My_LOVE/ser5.php?unic_code=' . $extra_unic . '"> <img src="/My_LOVE/icon/ser5.png"></a></center>';
}
$extra_n = rand( 1, 100 );
if ($extra_n == 100 or $extra_n == 50 or $extra_n == 1)
{
@session_start();
$extra_unic = rand( 1111111111, 9999999999 );
$_SESSION['unic_code'] = $extra_unic;
$_SESSION['is_str'] = $_SERVER['PHP_SELF'];
echo'<center><a href="/My_LOVE/ser6.php?unic_code=' . $extra_unic . '"> <img src="/My_LOVE/icon/ser6.png"></a></center>';
}
}
//////////////////конец сердце любви



?>
<link rel="stylesheet" href="/style/system.css" type="text/css" />
