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

// Best Comment
$sql = " select * from $write_table where wr_parent = '$wr_id' and wr_is_comment = 1 and wr_good >= '{$amina['cmt_best']}' and wr_5 not like '%<choice>%' order by wr_good desc";
$result = sql_query($sql);

?>
<section id="bo_vbc">
	<h2 class="cmt-best-head"><i class="fa fa-thumbs-up"></i> 베스트 <?php echo $amina['cmt_good_txt']; ?></h2>
	<?php for ($i=0; $row=sql_fetch_array($result); $i++) { $row = amina_cmt_list($row, $stx, $cmt_photo_size, 'best'); ?>
    <article id="bc_<?php echo $row['comment_id']; ?>">
		<div class="cmt-best">
		<?php 
			$cmt_nophoto = '';
			if($row['mb_photo']) { 
				echo '<div class="'.$cmt_css_head.'cmt-photo">'.$row['mb_photo'].'</div>'."\n";
			} else {
				$cmt_nophoto = ' 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['choice_link']) { ?>
					<a href="javascript:amina_choice('<?php echo $row['choice_link']; ?>','cmt_<?php echo $wr_id; ?>');">
						<span id="cmt_choice<?php echo $row['comment_id']; ?>" class="tack-green left margin8"><i class="fa fa-check"></i> <?php echo $amina['cmt_choice_txt']; ?>하기</span>
					</a>
				<?php } ?>
				<?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>
				<? } ?>
				<div class="clear"></div>
			</div>
		</div>
	</article>
	<?php } //End for ?>
</section>