<?php
mt_srand();
$index = mt_rand(1, 9999);
?>
<div id="pjWrapper">
	<div class="container-fluid pjYpContainer">
		<?php include_once ROOT_PATH . PJ_TEMPLATE_PATH . 'default/elements/header.php';?>
		
		<div class="pjYpBody">
			<div class="panel panel-default pjYpAccess">
				<header class="panel-heading">
					<p class="panel-title pjYpAccessTitle"><?php __('label_forgot_password');?></p><!-- /.panel-title pjYpAccessTitle -->
				</header><!-- /.panel-heading -->

				<div class="panel-body">
					<form id="frmYpForgot_<?php echo $index;?>" action="<?php echo $_SERVER['SCRIPT_NAME']; ?>" method="get" class="pjYpAccessForm" 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" />
					
						<p><?php __('label_forgot_text');?></p>

						<?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">
							<label for=""><?php __('label_email'); ?>: </label>
							<input type="email" name="email" class="form-control required email" data-msg-required="<?php __('label_email_required');?>" data-msg-email="<?php __('label_email_invalid');?>" />

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

						<div class="pjYpFormActions">
							<button type="submit" class="btn btn-default pjYpBtn pjYpBtnPrimary"><?php __('button_send'); ?></button>
											
							<a href="<?php echo $_SERVER['PHP_SELF']; ?>?controller=pjListings&amp;action=pjActionAccount" class="btn btn-link pjYpBtn pjYpBtnLink"><?php __('label_back');?></a>
						</div><!-- /.pjYpFormActions -->
					</form><!-- /.pjYpAccessForm -->
				</div><!-- /.panel-body -->
			</div><!-- /.panel panel-default pjYpAccess -->
		</div><!-- /.row pjYpBody -->
	</div><!-- /.container-fluid pjYpContainer -->
</div><!-- /#pjWrapper -->