<h1><?php __('front_menu_register'); ?></h1>

<div class="page-outer page-contact">
	<div class="page-inner">
		<?php
		if ($tpl['option_arr']['o_allow_add_package'] == 'Yes')
		{
			$FORM = @$_SESSION[$controller->defaultFormRegister];
			
			if (isset($_GET['err']) && !empty($_GET['err']))
			{
				$titles = __('error_titles', true);
				$bodies = __('error_bodies', true);
				pjUtil::frontNotice(@$titles[$_GET['err']], @$bodies[$_GET['err']]);
			}
			$sys = __('front_sys', true);
			?>
			
			<p class="page-text"><?php __('front_register_info'); ?></p>
		
			<form action="<?php echo $URL; ?>register/" method="post" class="form" id="form-register">
				<input type="hidden" name="send_register" value="1" />
				<p class="form-row">
					<label class="form-field-label" for="email"><?php __('front_label_email'); ?></label>
					<span class="form-field-wrap">
						<input type="text" name="email" id="email" class="form-field" value="<?php echo pjSanitize::html(@$FORM['email']); ?>" data-msg-required="<?php echo pjSanitize::html($sys['bf_email']); ?>" data-msg-email="<?php echo pjSanitize::html($sys['bf_email_inv']); ?>" />
					</span>
				</p>
				<p class="form-row">
					<label class="form-field-label" for="password"><?php __('front_label_password'); ?></label>
					<span class="form-field-wrap">
						<input type="password" name="password" id="password" autocomplete="off" class="form-field" data-msg-required="<?php echo pjSanitize::html($sys['bf_password']); ?>" />
					</span>
				</p>
				<p class="form-row">
					<label class="form-field-label" for="retype_password"><?php __('front_label_retype_password'); ?></label>
					<span class="form-field-wrap">
						<input type="password" name="retype_password" id="retype_password" autocomplete="off" class="form-field" data-msg-required="<?php echo pjSanitize::html($sys['bf_retype_password']); ?>" data-msg-equalTo="<?php echo pjSanitize::html($sys['bf_not_match_password']); ?>" />
					</span>
				</p>
				<p class="form-row">
					<label class="form-field-label" for="name"><?php __('front_label_name'); ?></label>
					<span class="form-field-wrap">
						<input type="text" name="name" id="name" class="form-field" value="<?php echo pjSanitize::html(@$FORM['name']); ?>" data-msg-required="<?php echo pjSanitize::html($sys['bf_name']); ?>" />
					</span>
				</p>
				<p class="form-row">
					<label class="form-field-label" for="captcha"><?php __('front_label_captcha'); ?></label>
					<span class="form-field-wrap">
						<input type="text" name="captcha" id="captcha" class="form-field form-field-captcha" maxlength="6" autocomplete="off" data-msg-required="<?php echo pjSanitize::html($sys['bf_captcha']); ?>" data-msg-remote="<?php echo pjSanitize::html($sys['bf_captcha_inc']); ?>" data-msg-minlength="<?php echo pjSanitize::html($sys['bf_captcha_min']); ?>" data-msg-maxlength="<?php echo pjSanitize::html($sys['bf_captcha_max']); ?>" />
						<img src="<?php echo PJ_INSTALL_FOLDER; ?>captcha/?rand=<?php echo rand(1000, 999999); ?>" alt="Captcha" class="form-captcha" title="<?php __('front_label_reload', false, true); ?>" />
					</span>
				</p>
				<p class="form-row">
					<label class="form-field-label form-field-label-empty">&nbsp;</label>
					<input type="submit" value="<?php __('front_button_register', false, true); ?>" class="button" />
				</p>
			</form>
			<?php
		} else {
			$titles = __('error_titles', true);
			$bodies = __('error_bodies', true);
			pjUtil::frontNotice(@$titles['WL01'], @$bodies['WL01']);
		}
		?>
	</div>
</div>