<?
$this->load->helper('cookie');
$comment_sns_id 		= get_cookie('crossmap_comment_sns_id');

if($result_code == '0000') {
    echo '0000|||||';
    $row_count = count($arr_comment);
    if($row_count > 0) {
        foreach($arr_comment as $val) {
            $comment_reg_date 	=  $val['reg_date'];
            $comment_reg_date 	=  substr($comment_reg_date, 0, 16);
			$comment 			=  $val['comment'];
			$comment_status 	=  $val['comment_status'];
			$comment_del_date 	=  $val['del_date'];
			$is_best 	        =  $val['is_best'];
			$comment_txt = $comment;
            if($comment_status!='1') {
                $comment_txt = '<div style="color:#bcbcbc;"><img src="/img/web/icon_info.gif"> '.$comment.'</div><div class="r_date" style="margin-top:5px;color:#bcbcbc;">'.$comment_del_date.'</div>';
            }

            if($is_best=='Y')   $comment_txt = ''.$comment_txt;

?>

			<ul class="box_wrap">
				<li class="img_reply2"><img src="/img/mobile/img_reply1.gif"></li>
				<li class="img_reply3">
					<div class="r_info">
						<a href="javascript:view_user_comment('<?=$val['write_id']?>', '<?=$val['write_name']?>')"><span class="beachblue"><?=$val['write_name']?></span></a><span class="r_date"><?=$comment_reg_date?> <span style="color:#e1e2e2;padding-left:10px;">

					</div>
					<?=$comment_txt?>
				</li>
				<li class="img_reply4" style="float:right;position: relative;">
					<div class="com_cont_info" style="float:right">
						<span class="fr"><a href="javascript:change_toggle('user_comment_reply_info<?=$val['idx']?>')"><img src="/img/mobile/pop_info.png"></a></span>
						<ul class="info_comment2" id="user_comment_reply_info<?=$val['idx']?>" style="display:none;width:80px;">
							<?
							if($comment_status=='1') {
								if($val['write_id'] == $comment_sns_id) {?>
									<li><a href="javascript:user_reply_comment_del('<?=$val['idx']?>', '<?=$val['p_idx']?>');">삭제하기</a></li>
								<?	} else {?>
									<li><a href="javascript:comment_spam('<?=$val['idx']?>', '<?=$val['write_name']?>');">신고하기</a></li>
								<?	}
							}
							?>
							<li style="border-top:1px solid #ededed"><a href="javascript:copy_user_comment_url('<?=$val['p_idx']?>')">링크복사</a></li>

						</ul>
					</div>
				</li>
				<div class="icons">
					<span class="thumbup"><a href="javascript:user_comment_like_select(1, '<?=$val['idx']?>')"><img src="/img/web/img_thumbup.jpg"></a><span id="comment_like1_<?=$val['idx']?>"><?=number_format($val['like_count'])?></span></span>
					<span class="thumbdown"><a href="javascript:user_comment_like_select(2, '<?=$val['idx']?>')"><img src="/img/web/img_thumbdown.jpg"></a><span id="comment_like2_<?=$val['idx']?>"><?=number_format($val['bad_count'])?></span></span>
				</div>
			</ul>






<?

        }
    }

    echo '|||||'.$total_count.'|||||'.$more_list;

} else {
    echo $result_code.'|||||댓글가져오기를 실패했습니다.';

}
?>
