<?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="frmVrLogin_<?php echo $index; ?>" action="<?php echo PJ_INSTALL_URL;?>index.php?controller=pjAdmin&amp;action=pjActionLogin" method="post" target="_blank" data-toggle="validator" role="form" class="pjVrFormAccess" name="frmPLLogin">
					<input type="hidden" name="login_user" value="1" />
					<?php
					if (isset($_GET['iframe']))
					{
						?><input type="hidden" name="iframe" value="" /><?php
					}
					?>
					<header class="pjVrFormHead">
						<h2><?php __('front_login_title'); ?></h2>
						<p><?php __('front_login_note'); ?></p>
					</header><!-- /.pjVrFormHead -->

					<div class="form-group">
						<input type="text" name="login_email" id="login_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="form-group">
						<input type="password" name="login_password" id="login_password" placeholder="<?php __('front_login_password'); ?>" data-msg-required="<?php echo $front_sys['log_pass'];?>" value="<?php echo isset($_GET['login_password']) ? htmlspecialchars(stripslashes($_GET['login_password'])) : NULL; ?>" class="form-control required" autocomplete="off" />
						
						<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_login_submit'); ?></button>
						<a class="" href="<?php echo $_SERVER['PHP_SELF']; ?>?controller=pjListings&amp;action=pjActionForgot"><?php __('front_forgot_password');?></a>
					</div><!-- /.text-center pjVrFormAccessActions -->
				</form><!-- /.pjVrFormAccess -->
			</div><!-- /.col-lg-6 col-md-6 col-sm-6 col-xs-12 -->

			<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
				<form id="frmVrRegister_<?php echo $index;?>" action="<?php echo $_SERVER['SCRIPT_NAME']; ?>" method="get" class="pjVrFormAccess" data-toggle="validator" role="form" name="frmPLRegister">
					<input type="hidden" name="controller" value="pjListings" />
					<input type="hidden" name="action" value="pjActionAdd" />
					<input type="hidden" name="listing_register" value="1" />
					<?php
					if (isset($_GET['iframe']))
					{
						?><input type="hidden" name="iframe" value="" /><?php
					}
					?>
										
					<header class="pjVrFormHead">
						<h2><?php __('front_register_title'); ?></h2>
						<p><?php __('front_register_title_slogan'); ?></p>
					</header><!-- /.pjVrFormHead -->

					<?php
					if (isset($_GET['err']))
					{
						$status = __('status', true);
						switch ($_GET['err'])
						{
							case 9999:
								?><p class="text-success"><?php echo $status[9999]; ?></p><?php
								break;
							case 9998:
								?><p class="text-success"><?php echo $status[9998]; ?></p><?php
								break;
							default:
								?><p class="text-danger"><?php echo @$status[$_GET['err']]; ?></p><?php
						}
					}
					?>
					<div class="form-group">
						<input type="text" name="name" id="name" placeholder="<?php __('front_register_name'); ?>" value="<?php echo isset($_GET['name']) ? htmlspecialchars(stripslashes($_GET['name'])) : NULL; ?>" class="form-control required" data-msg-required="<?php echo $front_sys['reg_name']?>"/>
						<div class="help-block with-errors"><ul class="list-unstyled"></ul></div>
					</div><!-- /.form-group -->
					
					<div class="form-group">
						<input type="text" name="register_email" id="register_email" placeholder="<?php __('front_register_email'); ?>" value="<?php echo isset($_GET['register_email']) ? htmlspecialchars(stripslashes($_GET['register_email'])) : NULL; ?>" class="form-control required email"  data-msg-required="<?php echo $front_sys['reg_email']?>"  data-msg-email="<?php echo $front_sys['reg_email_inv']?>"/>
						<div class="help-block with-errors"><ul class="list-unstyled"></ul></div>
					</div><!-- /.form-group -->

					<div class="form-group">
						<input type="password" name="register_password" id="register_password" placeholder="<?php __('front_register_password'); ?>" value="<?php echo isset($_GET['register_password']) ? htmlspecialchars(stripslashes($_GET['register_password'])) : NULL; ?>" class="form-control required" autocomplete="off" data-msg-required="<?php echo $front_sys['reg_pass']?>"/>

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

					<div class="form-group">
						<input type="password" name="register_password_repeat" id="register_password_repeat" placeholder="<?php __('front_register_password_repeat'); ?>" value="<?php echo isset($_GET['register_password_repeat']) ? htmlspecialchars(stripslashes($_GET['register_password_repeat'])) : NULL; ?>" class="form-control required" autocomplete="off"  data-msg-required="<?php echo $front_sys['reg_repeat']?>" data-msg-equalTo="<?php echo $front_sys['reg_pass_diff']?>"/>

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

					<div class="form-group pjVrFormCaptcha">
						<div class="row">
							<div class="col-lg-3 col-md-4 col-sm-4 col-xs-5">
								<input type="text" name="verification" id="verification" placeholder="<?php __('front_booking_captcha'); ?>" class="form-control required" maxlength="6" autocomplete="off" data-msg-required="<?php echo $front_sys['bf_verify']?>" data-msg-remote="<?php __('front_booking_status_ARRAY_4')?>"/>
							</div><!-- /.col-lg-3 col-md-4 col-sm-4 col-xs-5 -->
						
							<div class="col-lg-3 col-md-3 col-sm-4 col-xs-5">
								<img class="img-responsive" id="pjVrCaptchaImage" src="<?php echo PJ_INSTALL_FOLDER; ?>index.php?controller=pjFront&amp;action=pjActionCaptcha&amp;rand=<?php echo rand(1, 999999); ?>" alt="CAPTCHA" style="vertical-align: middle; cursor: pointer;" />
							</div><!-- /.col-lg-3 col-md-3 col-sm-4 col-xs-5 -->
						</div><!-- /.row -->
						<div class="help-block with-errors"><ul class="list-unstyled"></ul></div>
					</div><!-- /.form-group pjVrFormCaptcha -->

					<div class="text-center pjVrFormAccessActions">
						<button type="submit" class="btn btn-default btn-block pjVrBtn pjVrBtnPrimary"><?php __('front_register_submit'); ?></button>
					</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';?>