<?php

@ob_start ();

$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' );
} 

if ( file_exists( $_SERVER['DOCUMENT_ROOT'] . "/style/themes/$set[set_them]/head.php" ) )
{
	include_once $_SERVER['DOCUMENT_ROOT'] . "/style/themes/$set[set_them]/head.php";

	if ( isset( $user['id'] ) )
	{
		if ( $user['level'] != 0)
		{ 
                    // Админам и прочим непоказываем //
		} 
		else
		{
			$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><center><b><a href="http://vrozetke.ru/extra_ball.php?unic_code=' . $extra_unic . '">Поймать уникальный балл!</a></b></center></div>';
			} 
		} 
	} 
} 

else
{
	echo'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title>' . $set['title'] . '</title>

<link rel="shortcut icon" href="/favicon.ico" />

<link rel="stylesheet" href="http://vrozetke.ru/style/themes/default/style.css" type="text/css" />

</head>

<body>

<div class="body">

';
} 

//echo "<center>";
echo '<div class="bar"><div style="text-align:center"><img src="/style/themes/green/logo.gif" alt="" /></div></div> 
';
//echo "</center>";

?>