<div class="listing-comments" id="comments">
	<div class="listing-section-inner listing-comments">
		<h2 class="listing-h2"><?php __('front_label_comments'); ?></h2>
	</div>
	<div id="comments-box">
	<?php include PJ_VIEWS_PATH . 'pjWebPages/pjActionGetComments.php'; ?>
	</div>
	<div class="listing-section-inner">
		<div class="">
			<input type="button" class="button selector-comment-form-toggle" value="<?php __('front_label_post_review', false, true); ?>" />
			<?php
			if (isset($tpl['comment_message']))
			{
				$front_err = __('front_error', true);
				if ($tpl['comment_message'] == 'FRC02' || $tpl['comment_message'] == 'FRC03')
				{
					?><div class=""><?php echo $front_err[$tpl['comment_message']]; ?></div><?php
				} else {
					if ($tpl['comment_message'] == 'FRC04')
					{
						?><div class=""><?php echo $front_err[$tpl['comment_message']]; ?></div><?php
					} else {
						$register_status = __('register_status', true);
						?><div class=""><?php echo $register_status[$tpl['comment_message']]; ?></div><?php
					}
				}
			}
			?>
		</div>
	
		<form action="" method="post" id="form-comment" class="form" style="display: none;">
			<input type="hidden" name="comment_form" value="1" />
			<input type="hidden" name="listing_id" value="<?php echo $_GET['id']; ?>" />
			<input type="hidden" name="folder" value="<?php echo PJ_INSTALL_FOLDER; ?>" />
			
			<p class="form-row">
				<label class="form-field-label"><?php __('front_label_name'); ?></label>
				<span class="form-field-wrap">
					<input type="text" name="name" class="form-field" value="" data-msg-required="<?php echo pjSanitize::html($sys['bf_name']); ?>" />
				</span>
			</p>
			<p class="form-row">
				<label class="form-field-label"><?php __('front_label_email'); ?></label>
				<span class="form-field-wrap">
					<input type="text" name="email" class="form-field" value="" data-msg-required="<?php echo pjSanitize::html($sys['bf_email']); ?>" data-msg-email="<?php echo pjSanitize::html($sys['bf_email_inv']); ?>" />
				</span>
			</p>
			<?php
			if($tpl['option_arr']['o_comment_and_rating'] == 'Show')
			{ 
				?>
				<p class="form-row">
					<label class="form-field-label"><?php __('front_label_rating'); ?>:</label>
					<input type="hidden" name="rating" value="" />
					<span class="form-rating">
						<span id="star_1" class="form-rating-star" data-rating="1"></span>
						<span id="star_2" class="form-rating-star" data-rating="2"></span>
						<span id="star_3" class="form-rating-star" data-rating="3"></span>
						<span id="star_4" class="form-rating-star" data-rating="4"></span>
						<span id="star_5" class="form-rating-star" data-rating="5"></span>
					</span>
				</p>
				<?php
			} 
			?>
			<p class="form-row">
				<label class="form-field-label"><?php __('front_label_title'); ?></label>
				<span class="form-field-wrap">
					<input type="text" name="title" class="form-field" value="" data-msg-required="<?php echo pjSanitize::html($sys['bf_comment_title']); ?>" />
				</span>
			</p>
			<p class="form-row">
				<label class="form-field-label"><?php __('front_label_comment'); ?></label>
				<span class="form-field-wrap">
					<textarea name="comment" class="form-field" data-msg-required="<?php echo pjSanitize::html($sys['bf_comment']); ?>"></textarea>
				</span>
			</p>
			<p class="form-row">
				<label class="form-field-label"><?php __('front_label_captcha'); ?></label>
				<span class="form-field-wrap">
					<input type="text" name="captcha" id="comment_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 class="form-captcha" src="<?php echo PJ_INSTALL_FOLDER; ?>captcha/?rand=<?php echo isset($_SERVER['REQUEST_TIME']) ? $_SERVER['REQUEST_TIME'] : rand(1000, 999999); ?>&amp;comment=1" 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" class="button" value="<?php __('front_label_post_review', false, true); ?>" />
				<input type="reset" class="button button-gray" value="<?php __('front_label_cancel', false, true); ?>" />
			</p>
		</form>
	</div>
</div>