<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가

// Choice Comment
$sql = " select * from $write_table where wr_parent = '$wr_id' and wr_is_comment = 1 and wr_5 like '%<choice>%' order by wr_good ";
$result = sql_query($sql);

?>
<section id="bo_vcc">
	<h2 class="cmt-choice-head"><i class="fa fa-check"></i> <?php echo $amina['cmt_choice_txt']; ?>된 댓글</h2>
	<?php for ($i=0; $row=sql_fetch_array($result); $i++) { $row = amina_cmt_list($row, $stx, $cmt_photo_size, 'choice');	?>
    <article id="cc_<?php echo $row['comment_id'];?>">
		<div class="cmt-choice">
		<?php
			$cmt_nophoto = '';
			if($row['mb_photo']) { 
				echo '<div class="'.$cmt_css_head.'cmt-photo">'.$row['mb_photo'].'</div>'."\n";
			} else {
				$cmt_nophoto = ' '.$cmt_css_head.'cmt-nophoto';
			}
		?>
			<div class="<?php echo $cmt_css_head; ?>cmt-content<?php echo $cmt_nophoto; ?>">
				<div class="cmt-head">
					<div class="cmt-btn">
						<a href="#c_<?php echo $row['comment_id']; ?>" title="원본 댓글보기"><i class="fa fa-arrows fa-lg"></i></a>
						<?php if ($row['sns']) { ?>
							<a class="fbox" href="#cmt_sns<?php echo $row['comment_id']; ?>" title="Share SNS"><i class="fa fa-share-square fa-lg"></i></a>
						<?php } ?>
					</div>
					<div class="cmt-mb no-wrap">
						<span class="cmt-name"><?php echo $row['cool_txt']; ?> <?php echo $row['level_icon']; ?> <?php echo $row['name']; ?></span>
						<span class="cmt-date">
							<i class="fa fa-clock-o"></i>
							<time datetime="<?php echo $row['datetime']; ?>"><?php echo $row['datetime']; ?></time>
							<?php echo $row['ip']; ?>
						</span>
					</div>
					<div class="clear"></div>
				</div>
				<div class="cmt-content">
					<?php if($row['mobile']) echo '<i class="fa fa-tablet fa-lg"></i> '; ?>
					<?php if($row['blind_msg']) { ?>
						<p><i class="fa fa-eye-slash fa-lg"></i> <b><?php echo $row['blind_msg']; ?></b>
						<?php if($row['unlock_link']) { ?> &nbsp; <a href="<?php echo $row['unlock_link']; ?>"><i class="fa fa-unlock"></i> 해제하기</a><?php } ?>
						</p>
					<?php } ?>
					<?php echo $row['content']; ?>
					<?php if(!$row['blind_msg'] && $is_lucky && (int)$row['wr_10'] > 0) echo str_replace("[point]", $row['wr_10'], $lucky_msg); ?>
					<div class="clear"></div>
				</div>
				<?php if($row['good_link']) { ?>
					<a href="javascript:amina_good('<?php echo $row['good_link']; ?>','cmt_good<?php echo $row['comment_id']; ?>');"  title="<?php echo $amina['cmt_good_txt']; ?>"> <span class="good-btn right margin8" id="cmt_good<?php echo $row['comment_id']; ?>"><?php echo $row['wr_good']; ?></span></a>
					<?php if($row['is_best']){?> <span class="tack-red-r right margin86"><i class="fa fa-thumbs-up"></i> 베플</span><?php } ?>
				<?php } ?>
				<div class="clear"></div>
			</div>
		</div>
	</article>
	<?php } //End for ?>
</section>