

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>Дальнобойщики - {!TITLE!}</title>

	<!-- Global stylesheets -->
	<link href="https://fonts.googleapis.com/css?family=Roboto:400,300,100,500,700,900" rel="stylesheet" type="text/css">
	<link href="/assets/css/icons/icomoon/styles.css" rel="stylesheet" type="text/css">
	<link href="/assets/css/bootstrap.css" rel="stylesheet" type="text/css">
	<link href="/assets/css/core.css" rel="stylesheet" type="text/css">
	<link href="/assets/css/components.css" rel="stylesheet" type="text/css">
	<link href="/assets/css/colors.css" rel="stylesheet" type="text/css">
	<!-- /global stylesheets -->

	<!-- Core JS files -->
	<script type="text/javascript" src="/assets/js/plugins/loaders/pace.min.js"></script>
	<script type="text/javascript" src="/assets/js/core/libraries/jquery.min.js"></script>
	<script type="text/javascript" src="/assets/js/core/libraries/bootstrap.min.js"></script>
	<script type="text/javascript" src="/assets/js/plugins/loaders/blockui.min.js"></script>
	<!-- /core JS files -->


	<!-- Theme JS files -->
	<script type="text/javascript" src="assets/js/core/app.js"></script>
	<!-- /theme JS files -->

</head>

<body class="login-container">
<!-- ========== Left Sidebar Start ========== -->

            <?
$user_id = $_SESSION["user_id"];
$db->Query("SELECT COUNT(*) FROM db_users_a WHERE referer_id = '$user_id'");
$refs = $db->FetchRow(); // Считаем рефералов 1 уровня
$db->Query("SELECT COUNT(*) FROM db_users_a WHERE referer_id2 = '$user_id'");
$refs2 = $db->FetchRow(); // Считаем рефералов 2 уровня
$db->Query("SELECT COUNT(*) FROM db_users_a WHERE referer_id3 = '$user_id'");
$refs3 = $db->FetchRow(); // Считаем рефералов 3 уровня

$db->query("SELECT ident, time_add, user_id FROM db_serfing_view WHERE user_id = '$user_id' AND time_add + INTERVAL 24*60*60 SECOND > NOW()");

$visits = array();

while ($row_view = $db->FetchArray())

{

$visits[$row_view['ident']] = $row_view;

#$visits[] = $row_view;

}

#var_dump($visits[0]['user_id']);

#$ident = $visits[0]['ident'];

$db->Query("SELECT * FROM db_serfing WHERE `money` >= `price` AND `status` = '2' ORDER BY high DESC, time_add DESC");

if ($db->NumRows())

{

#$data = $db->FetchRow();

#echo $data;

$i = 0;

while ($row = $db->FetchArray())

{

if (isset($visits[$row['id']])) continue;

$i++;

#echo $row['id']."<br/>";

}

#echo $i;

}else $ass = false;

if (isset($ass) == false) {

$text = $i;

}else{

$text = "0";

}
?>
	<!-- Main navbar -->
	<div class="navbar navbar-inverse">
		<div class="navbar-header">
			<a class="navbar-brand" href="/"><img src="assets/images/logo_light.png" alt=""></a>

			<ul class="nav navbar-nav visible-xs-block">
				<li><a data-toggle="collapse" data-target="#navbar-mobile"><i class="icon-tree5"></i></a></li>
				<li><a class="sidebar-mobile-main-toggle"><i class="icon-paragraph-justify3"></i></a></li>
			</ul>
		</div>

		<div class="navbar-collapse collapse" id="navbar-mobile">
			<ul class="nav navbar-nav">
				<li><a class="sidebar-control sidebar-main-toggle hidden-xs"><i class="icon-paragraph-justify3"></i></a></li>
<li>
<a href="/">
<i class="icon-home"></i>
<span>Главная</span>
</a>
</li>
<li>
<a href="/news">
<i class="icon-clipboard3"></i>
<span>Новости</span>
</a>
</li>
<li>
<a href="/about">
<i class="icon-file-text"></i>
<span>О проекте</span>
</a>
</li>
<li>
<a href="/stat">
<i class="icon-stats-dots"></i>
<span>Статистика</span>
</a>
</li>
<li>
<a href="/helpme">
<i class="icon-file-eye"></i>
<span>Помощь</span>
</a>
</li>
		

				
			</ul>
		</div>
	</div>
	<!-- /main navbar -->



	


					
