<?php
if (!empty($tpl['comment_arr']))
{
	foreach ($tpl['comment_arr'] as $v)
	{
		?>
		<div class="listing-comment">
			<div class="listing-comment-info row">
				<div class="listing-comment-data">
					<?php
					if (!empty($v['rating']) && $tpl['option_arr']['o_comment_and_rating'] == 'Show')
					{
						?><div class="listing-comment-rating"><span class="listing-comment-stars"><span class="listing-comment-stars-inner listing-comment-stars-<?php echo (int) $v['rating']; ?>"></span></span></div><?php
					}
					?>
					<div class="listing-comment-title"><?php echo pjSanitize::html($v['title']); ?></div>
				</div>
				<div class="listing-comment-meta">
					<div class="listing-comment-time"><?php echo pjUtil::formatDate(date('Y-m-d', strtotime($v['created'])), 'Y-m-d', $tpl['option_arr']['o_date_format']); ?> <?php echo pjUtil::formatTime(date('H:i:s', strtotime($v['created'])), 'H:i:s', $tpl['option_arr']['o_time_format']); ?></div>
					<div class="listing-comment-author"><?php __('front_label_by'); ?> <?php echo $v['name'];?></div>
				</div>
			</div>
			<div class="listing-comment-content"><?php
			$comment = stripslashes(nl2br(htmlspecialchars($v['comment'])));
			echo pjUtil::convertLinks($comment);
			?></div>
		</div>
		<?php
	}
} else {
	?><div class="listing-section-inner"><?php
	pjUtil::frontNotice(__('front_label_notice', true), __('front_label_no_comment', true));
	?></div><?php
}
?>