<?

session_start();

///header( 'Content-type: text/html; charset=windows-1251' );

define( 'ROOT', 'http://'.$_SERVER['HTTP_HOST'] );
define( 'ROOT_DIR', $_SERVER['DOCUMENT_ROOT'] );

if ( isset( $_SESSION['iduser'] ) ) exit();

include_once ROOT_DIR . '/engine/config.php';

$caphaType = $config_site["capthaType"];
$recapha_n1 = $config_site["recapthaPublicKey"];
?>

<script src='https://www.google.com/recaptcha/api.js'></script>
<script type="text/javascript">
$(document).ready(function() {
    $('.js_titleRemove').remove();
});

$('.box_val').tipTip({defaultPosition:'right'});

function send_restore_pass() {
    var temp_click = $('#resore_pass').attr('onclick');
    $('#resore_pass').attr('onclick', '');
    $.post('ajax.php?func=resore_pass', {
        email: $('#email').val(),
        capcha: $('#capcha').val(),
		'g-recaptcha-response': $('#g-recaptcha-response').val()
    }, function(data) {
        if (data == 1) {
            $('#q_box').html('<div class="alert alert-success2 alert-dismissible" role="alert"><i class="fa fa-flag-checkered" aria-hidden="true"></i> Новый пароль успешно выслан на указаный <b>e-mail</b>.</div>');
        } else {
            $('body').Qnotify({text:data, sound:'error'});
            $('#resore_pass').attr('onclick', temp_click);
        }
    });
    return false;
}


</script>

<div style="margin-left: -10px; margin-bottom: 0px;">
	<a href="/login" class="content_bar_buttom" ><span style="font-size: 13px;" class="glyphicon glyphicon-user"></span> АВТОРИЗАЦИЯ</a>
	<a href="/registration" class="content_bar_buttom" ><span style="font-size: 13px;" class="glyphicon glyphicon-plus"></span> РЕГИСТРАЦИЯ</a>	
	<a href="/recovery" class="content_bar_buttom1_act" ><i class="fa fa-refresh" aria-hidden="true"></i> ВОССТАНОВЛЕНИЕ</a>	
</div>

<div class="content_bar content_bar_margin">

	<article class="postBox">
		<br><h2><a>Восстановление доступа</a></h2><br>
		<div class="textPreview" style="margin-top: -20px;">
			<p class="">
				Забыли пароль? Не переживайте, такое иногда бывает, это исправимо, заполните форму ниже, и мы вышлем на ваш email новый пароль.
			</p>
		</div>
	</article>
	
	<div class="container-fix container " id="q_box">
	  
		<div style="margin-left: 100px;">
			<div class="form-group row">
			  <label for="inputEmail3" class="col-sm-2 col-form-label">Email</label>
			  <div class="col-sm-10 input-group">
				<span class="input-group-addon" id="basic-addon1" style=""><i class="fa fa-envelope-o fa-fw"></i></span>
				<input type="email" value="<?=$mamoryEmail?>" class="form-control" id="email" placeholder="Email" style="width: 250px; border-radius: 0 0.25rem 0.25rem 0;">
			  </div>
			</div>
			
			<div class="form-group  row">
				<div class="offset-sm-2 col-sm-10 input-group">
				  <!--div class="input-group-addon" style="width: 50px;"><?=$letter?></div>
				  <input type="text" class="form-control" id="capcha" placeholder="...код" class="input-fix" style="width: 50px; border-radius: 0 0.25rem 0.25rem 0"-->
				  <div class="g-recaptcha g-recaptcha-fix" data-sitekey="<?=$recapha_n1?>"></div>
				</div>
			</div>
			<div class="form-group row">
			  <div class="offset-sm-2 col-sm-10">
				<button type="submit" class="btn btn-primary" onclick="send_restore_pass(); return false;" id="vxod">Восстановить</button>
				
				
				
			  </div>
			</div>
		</div>
		
	</div>


</div>




<div id="bot_panel"><div class="preloader"></div><a href="#" onclick="restore_pass();return false;" id="recovery_pass" class="recovery_pass" onmouseover="titlehtml.title('', 'Восстановить пароль', 'recovery_pass', 7)"></a></div>








