<?php
/*
* @ServerMon v1.1
* @Developed by Maksa988
* @www.Server-Mon.ru
* @Copyright (C) 2014
*/
 if(!defined('SMON'))
	die('Hacking attempt!');
?>
<div id="content">
	<div class="breadcrumb"><i class="fa fa-angle-right"></i> <?=$navbarName?></div>
	<div class="page">
		<form class="form-horizontal" role="form" method="POST" action="" style="width: 400px;">
		  <div class="form-group">
			<label class="col-sm-2 control-label"></label>
			<div class="col-sm-7">
				Заказ услуг для сайта <b>#<?=$license['license_id']?></b> (<i><?=$license['license_domain']?></i>)
			</div>
		  </div>
		  <div id="monthBlock" class="form-group">
			<label class="col-sm-2 control-label"></label>
			<div class="col-sm-7">
				<select id="month" class="form-control" name="month" onChange="updateForm()" style="width: 300px;">
				  <option disabled selected>Выберите срок оплаты</option>
				  <option value="1">1 месяц</option>
				  <option value="3">3 месяца</option>
				  <option value="6">6 месяцев</option>
				  <option value="12">1 год</option>
				</select>
			</div>
		  </div>
		  <div class="form-group">
			<label class="col-sm-4 control-label">Сумма:</label>
			<div class="col-sm-5">
			  <input id="price" class="form-control" type="price" placeholder="0 руб." name="" disabled style="width: 300px;">
			</div>
		  </div>
		  <input type="hidden" name="store_license" value="true">
		  <input type="hidden" name="price" value="">
		  <div class="form-group">
			<div class="col-sm-offset-2 col-sm-7 btn-group">
			  <button type="submit" class="btn btn-default">Купить</button>
			</div>
		  </div>
		</form>
	</div>
	<div class="blocks">
		<div class="block">
			<div class="block-header"><i class="fa fa-th"></i> Навигация</div>
			<div class="block-body">
			<ul class="block-nav">
				<li><a href="#">Проверка лицензии</a></li>
				<li><a href="#">Партнеры</a></li>
				<li><a href="#">ServerMon Web API</a></li>
			</ul>
			</div>
		</div>
	</div>
	<div class="clear"></div>
</div>

		
<script>
	function updateForm() {
		var price = '<?=$price?>';
		
		var month = $("#month option:selected").val();
		if(month == 1){
			var price = price;
		}
		if(month == 3){
			var price = price*3;
		}
		if(month == 6){
			var price = price*6;
		}
		if(month == 12){
			var price = price*12;
		}
		
		$('#price').val(price + ' руб.');
	}
</script>