<?php
$pname = 'Payeer Лотерея';
$pkey = 'Payeer Лотерея';
$pdesc = 'Payeer Лотерея';
include('inc/top.php');
if(USER_LOGGED) { header ("Location: /play"); exit; }
?>
<!-- Контент -->
<div class="gamehall_wrapper">
				<div class="index_gamehall_wrapper">
				<div class="content">
<div class="tournament_wrapper">
	<div class="title_h1">Онлайн лотерея</div>
	<p class="tournament_date"> Делай ставки и выигрывай!</p>
	<div class="tournament_prize_wrapper">
		<p class="tournament_prize" style="
    font-weight: 700;
    color: #c33a29;
">Выиграно:</p>
		<p class="tournament_sum" style="
    font-weight: 700;
    color: #c33a29;
"><?php $win = mysqli_fetch_assoc(mysqli_query($connect_db, "SELECT SUM(win) as `c` FROM t_games")); if (empty($win['c'])) { echo 0; } else { echo $win['c']; } ?>&nbsp;₽</p>
	</div>
		<div class="tournament_preview " style="background: url('http://limedeposit.ru/files/s/tournaments/avgust/pbd/bg27c2.jpg') 0 0 no-repeat;">
		<div class="tournament_preview_left">
							<a id="js_participate_tournament" class="button yellow big" href="/register">Участвовать!</a><br>
									</div>
		<div class="tournament_preview_right">
			<ul>
				<li>
					<span class="tournament_param_text">
						Игроков
					</span>
					<span class="tournament_param_number"><?php $allu = mysqli_num_rows(mysqli_query($connect_db, "SELECT uid FROM `t_users`")); echo $allu; ?></span>
				</li>
				<li>
					<span class="tournament_param_text">
						Сыграно игр
					</span>
					<span class="tournament_param_number"><?php $allg = mysqli_num_rows(mysqli_query($connect_db, "SELECT id FROM `t_games`")); echo $allg; ?></span>
				</li>
				<li>
					<span class="tournament_param_text">
						Работаем
						
					</span>
					<span class="tournament_param_number" style="
    font-size: 20px;
"><?php echo round((time()-$work)/86400); ?> дн.</span>
				</li>
				<li>
					<img src="files/default/img/tournaments/default/pbd/cups.png" alt="">
				</li>
			</ul>
		</div>
	</div>

	<div class="title_h2">
					Последний победитель:
			</div>

	<div class="tournament_content">
		<table class="table tournament_winners_table">
			<thead>
				<tr>
					<th>Последний победитель</th>
					<th>Выиграно</th>
					<th id="js_column_prize_name">Доход рефералу</th>
				</tr>
			</thead>
			<tbody>
			<tr>
				<?php $winl = mysqli_fetch_assoc(mysqli_query($connect_db, "SELECT id,win,t_games.dt,log FROM `t_games` INNER JOIN t_users ON t_games.usr = t_users.uid ORDER BY id DESC LIMIT 1")); ?>
			<td><?php echo $winl['log']; ?></td>
			<td><?php echo $winl['win']; ?></td>
			<td><?php echo $winl['win']*0.05; ?> руб</td>
			</tr>
</tbody>
		</table>
	</div>
	<div class="tab_wrapper">
		<input class="tab_wrapper_input" type="radio" name="tabs" checked="checked" id="tab_1"><label for="tab_1">Что мы предлогаем?</label>
		<div class="tab_content">
			<p style="line-height: 20.8px; color: #2f2f2f;
    font-size: 18px;"><span style="line-height: 20.8px;">1. Автоматические выплаты на Payeer.&nbsp;</span></p>

<p style="line-height: 20.8px; color: #2f2f2f;
    font-size: 18px;"><span style="line-height: 20.8px;">2. Розыгрыш джек-пота:&nbsp;<strong>Каждые 10 игр</strong></span><br>
</p>

<p style="line-height: 20.8px; color: #2f2f2f;
    font-size: 18px;"><span style="line-height: 20.8px;">3. Реферальная программа, приглашайте и зарабатывайте.</span></p>

<p style="line-height: 20.8px; color: #2f2f2f;
    font-size: 18px;"><span style="line-height: 20.8px;">4. Новая игра каждые <?php echo $timemin; ?> минут.</span></p>	

<p style="line-height: 20.8px; color: #2f2f2f;
    font-size: 18px;"><span style="line-height: 20.8px;">5. Простой и понятный интерфейс, а так же бесплатная регистрация.</span></p>	

<div class="col-xs-12" style="
      padding-top: 75px;
">
<div class="col-md-3 col-sm-12" style="padding: 0 10px;margin-top: 10px;">
<center>
<font style="font-family: 'BebasBold';line-height: 1.4; font-size: 17px; color: #900114;">
Делаете ставку
</font>
<br />
<i class="fa fa-gavel" style="margin-right: 10px;font-size: 90px;color: #900114;"></i>
</center>
</div>
<div class="col-md-1 col-sm-12" style="padding: 0 10px;margin-top: 10px;">
<center>
<i class="fa fa-arrow-right" style="margin-right: 10px;font-size: 41px;color: #b35a65; padding-top: 39px;"></i>
</center>
</div>
<div class="col-md-4 col-sm-12" style="padding: 0 10px">
<center>
<font style="font-family: 'BebasBold';line-height: 1.4; font-size: 17px; color: #900114;">
Ожидаете окончания таймера
</font>
<br />
<i class="fa fa-clock-o" style="margin-right: 10px;font-size: 105px;color: #900114;"></i>
</center>
</div>
<div class="col-md-1 col-sm-12" style="padding: 0 10px;margin-top: 10px;">
<center>
<i class="fa fa-arrow-right" style="margin-right: 10px;font-size: 41px;color: #b35a65; padding-top: 39px;"></i>
</center>
</div>
<div class="col-md-3 col-sm-12" style="padding: 0 10px;margin-top: 10px;">
<center>
<font style="font-family: 'BebasBold';line-height: 1.4; font-size: 17px; color: #900114;">
Выигрываете!
</font>
<br />
<i class="fa fa-dollar" style="margin-right: 10px;font-size: 90px;color: #900114;"></i>
</center>
</div>
</div>
	</div>
	
	
	</div><br><br><br>
			<a id="js_participate_tournament" class="button yellow big" href="/register" style="
    margin-top: 50px;
">Участвовать!</a>
	</div>
	</div>
	
</div></div>
<!-- /Контент -->
<?php include('inc/bottom.php'); ?>