<?php
mt_srand();
$index = mt_rand(1, 9999);
include_once dirname(__FILE__) . '/elements/urlLanguage.php';

$front_sys = str_replace(array('"', "'"), array('\"', "\'"), __('front_sys', true, true));
?>

<div id="pjWrapperVacationRental">
	<?php
	include_once dirname(__FILE__) . '/elements/menu.php';
	?>
	<div class="container-fluid pjVrContainer">
		<div class="row">
			<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
				<form id="frmVrForgot_<?php echo $index;?>" action="<?php echo $_SERVER['SCRIPT_NAME']; ?>" method="get" class="pjVrFormAccess" data-toggle="validator" role="form">
					<input type="hidden" name="controller" value="pjListings" />
					<input type="hidden" name="action" value="pjActionForgot" />
					<input type="hidden" name="forgot_password" value="1" />
					<?php
					if (isset($_GET['iframe']))
					{
						?><input type="hidden" name="iframe" value="" /><?php
					}
					?>
					<header class="pjVrFormHead">
						<h2><?php __('front_forgot_password_title'); ?></h2>
						<p><?php __('front_forgot_password_note'); ?></p>
					</header><!-- /.pjVrFormHead -->

					<?php
					if(isset($_GET['err']))
					{
						$forgot_error = __('forgot_error', true);
						if($_GET['err'] != '9999')
						{
							?><div class="alert alert-danger" role="alert"><?php echo $forgot_error[$_GET['err']]?></div><?php
						}else{
							?><div class="alert alert-success" role="alert"><?php echo $forgot_error[$_GET['err']]?></div><?php
						}
					} 
					?>
					<div class="form-group">
						<input type="text" name="email" id="email" placeholder="<?php __('front_login_email'); ?>" data-msg-required="<?php echo $front_sys['log_email'];?>" data-msg-email="<?php echo $front_sys['log_email_inv'];?>" value="<?php echo isset($_GET['login_email']) ? htmlspecialchars(stripslashes($_GET['login_username'])) : NULL; ?>" class="form-control required email" />

						<div class="help-block with-errors"><ul class="list-unstyled"></ul></div>
					</div><!-- /.form-group -->

					<div class="text-center pjVrFormAccessActions">
						<button type="submit" class="btn btn-default btn-block pjVrBtn pjVrBtnPrimary"><?php __('front_btn_send'); ?></button>
						<a class="" href="<?php echo $_SERVER['PHP_SELF']; ?>?controller=pjListings&amp;action=pjActionAdd"><?php __('front_forgot_login');?></a>
					</div><!-- /.text-center pjVrFormAccessActions -->
				</form><!-- /.pjVrFormAccess -->
			</div><!-- /.col-lg-6 col-md-6 col-sm-6 col-xs-12 -->

		</div><!-- /.row -->
	</div><!-- /.container-fluid pjVrContainer -->	
	
</div><!-- /#pjWrapper -->
	
<?php include_once dirname(__FILE__) . '/elements/loadjs.php';?>