{if('{servers}' == '0')}
	<div class="r_block">
		<div class="r_block_head">
			<span class="glyphicon glyphicon-plus"></span> Покупка услуг
		</div> 
		<div class="r_block_c">
			<center>Услуг не найдено</center>
		</div>
	</div>
</div>
{else}
	{if('{discount}' != '0')}
	<div class="mt-10 bs-callout bs-callout-success transition_h_2">
		<h4>Внимание! Действует скидка!</h4>
		На все услуги действует скидка в размере {discount}%
	</div><br>
	{/if}
	<div class="r_block">
		<div class="r_block_head">
			<span class="glyphicon glyphicon-plus"></span> Покупка услуг
		</div> 
		<div class="r_block_c" id="buy_service_area">
			<script>
			function local_change_serv() {
				var server = $('#store_server option:selected').val();
				get_services(server);
				get_server_store(server);
			}
			function local_change_service() {
				var service = $('#store_services option:selected').val();
				get_tarifs(service);
			}
			function local_change_type() {
				var type = $('#store_type option:selected').val();
				change_store_bind_type(type);
			}
			</script>
			<div class="input-group mb-10">
				<span class="input-group-btn">
					<div class="btn btn-default shop1">Выберите сервер:</div>
				</span>
				<select class="form-control" id="store_server" onchange="local_change_serv();">
					{servers}
				</select>
			</div>
			<div class="input-group mb-10">
				<span class="input-group-btn">
					<div class="btn btn-default shop1">Выберите услугу:</div>
				</span>
				<select class="form-control" id="store_services" onchange="local_change_service();"></select>
			</div>
			<div class="input-group mb-10">
				<span class="input-group-btn">
					<div class="btn btn-default shop1">Выберите тариф:</div>
				</span>
				<select class="form-control" id="store_tarifs"></select>
			</div>
			<div class="input-group mb-10">
				<span class="input-group-btn">
					<div class="btn btn-default shop1">Выберите тип привязки:</div>
				</span>
				<select class="form-control" id="store_type" onchange="local_change_type();">
					<option value="0">Выберите способ привязки</option>
					<option value="1">Ник + пароль</option>
					<option value="2">STEAM ID</option>
					<option value="3">STEAM ID + пароль</option>
				</select>
			</div>

			<input type="text" class="form-control mt-10 disp-n" maxlength="32" id="player_nick" placeholder="Введите свой ник" value="{nick}">
			<input type="text" class="form-control mt-10 disp-n" maxlength="32" id="player_steam_id" placeholder="Введите свой STEAM ID" value="{steam_id}">
			<input type="text" class="form-control mt-10 disp-n" maxlength="32" id="player_pass" placeholder="Придумайте пароль">

			{if(is_auth())}
			<div class="mt-10"><input id="store_checbox" data-status="2" type="checkbox" onclick="on_buying();"> Я ознакомлен с <a target="_blank" href="../pages/rules">правилами</a> сервера и согласен с ними</div>

			<div id="buy_result" class="mt-10"></div>
			<div id="button">
				<button id="store_buy_btn" class="btn btn-default shopbut mt-10 disabled">Купить</button>
				<button id="store_answer_btn" class="btn btn-default btn-big mt-10 disp-n">Нет</button>
			</div>
			{else}
			<div class="bs-callout bs-callout-error mt-10">
				<p>Авторизуйтесь, чтобы приобрести услугу</p>
			</div>
			{/if}
		</div>
	</div>
	<div class="r_block ">
		<div class="r_block_head">
			<span class="glyphicon glyphicon-th"></span> Сервер
		</div> 
		<div class="r_block_c">
			<div id="store_server_info"></div>
		</div>
	</div>
	<div class="r_block">
		<div class="r_block_head">
			<span class="glyphicon glyphicon-align-left"></span> Информация о услуге
		</div> 
		<div class="r_block_c">
			<div id="store_service_info" class="with_code"></div>
			<div class="clearfix"></div>
		</div>
	</div>
	<script> local_change_serv(); </script>
</div>
{/if}
<div class="left_block">
	{include file="/home/right_col.tpl"}
</div>

