<?php

/*
* @package BANANA WARS
* @copyright: (c) 2017 G.P. aka Mvcshka (mvcshka@yandex.ru)
* @license: GNU General Public License version 2; see LICENSE.txt
* @files: /page/enter.php
*
*/

if(!isset($_SESSION['id']))
{
	Header("Location: /");
	exit;
}

?>


<!-- OPEN CENTER -->
<tr>
    <td align="left" valign="top">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td width="284" align="left" valign="top">
                        <?php require('theme/users_block.php');?>
                    </td><!-- MENU USER -->
                    <td align="left" valign="top">
                    <?php require('theme/menu.php'); ?>
                    <div style="height:15px"></div>
                    <table width="672" cellspacing="0" cellpadding="0" style="padding-left:10px;padding-right:10px;">
                        <tbody>
                            <tr></tr>
                            <tr>
                                <td align="left" valign="top">
                                    <div style="background:url('/images/title.jpg') no-repeat center;text-align:center"><span style="background-color:#F0E8D5;padding-right:15px;padding-left:15px;font-size:18px">Пополнить бустеры</span></div>
                                    <br />
                                    <!-- Описание контента -->


<div class="text">
	<div align="center" style="color:#6a5e49;">
	<i>Вы можете пополнить свой баланс удобным для Вас способом.</i></div>
	
	<div class="not mar5" align="center"><div class="inline">+<b class="green-dark">10</b>% при каждом пополнении</div><br>
<table border="0" cellspacing="6" width="100%" cellpadding="0" style="margin-top:10px">
    <tbody>
        <tr valign="top">
            
        </tr>
        <tr valign="top"></tr>
    </tbody>
</table>

	<div class="mar5" align="center">
	<form action="" method="post" id="fillForm" onsubmit="return false;">
		<select style="width:150px; padding:5px;" name="payment" onchange="fill_up()">
			<option value="1">Payeer</option>
			
		</select>

		<img src="/images/icons/gold.png"/>
		<input style="border:1px solid #A4A4A4;width: 150px;padding: 5px;" type="text" name="cash" maxlength="7" size="5" placeholder="Сумма" onkeyup="fill_up()"/>
		
		<div class="cash"></div><br>
		<button class="button_big" onclick="process('fillForm','/process/fill.php','fillForm .button','error','fill')">Пополнить</button>
	</form>
<div id="error" class="error"></div>
	</div>

	<?php

	$q = $mysql->prepare("SELECT * FROM db_enter WHERE Status = ? AND UserId = ?");
	$q->execute(array('1', $_SESSION['id']));
	if($q->rowCount() == 0) {

	?>

<table border="0" width="100%" bgcolor="#aab9b4" cellpadding="0" cellspacing="1">
		<tbody>
			<tr><br>
				<td bgcolor="#f6f1e4" style="padding:4">
					<table border="0" cellpadding="4" cellspacing="0" width="100%">
						<tbody>
							<tr>
								<td valign="middle" width="31px"><img src="/images/icons/help.gif" width="31px" height="31px" align="left" style="margin-right:5"></td>
								<td> Вы ещё не пополняли баланс! </td>
							</tr>
						</tbody>
					</table>
				</td>
			</tr>
		</tbody>
		</table>

	<?php } else {
		echo '
					
					</div>';
		while($w = $q->fetch())
		{
			echo '
							
						</div>';
		}
	}
	?>		
	</div>



                                </td>
                            </tr>
                        </tbody>
                    </table>                                
                    </td><!-- CONTENT USER -->
                </tr>
            </tbody>
        </table>
    </td>
</tr>
<!-- CLOSE CENTER -->