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

//링크 & 첨부
$attach_list = '';
if(!$is_admin && $view['blind']) {
	;
} else	{
	//글주소(프린트)
	if($board['is_print']) {
		$attach_list .= '<li>문서주소 - '.$lurl."\n";
	}

	//링크
	for ($i=1; $i <= G4_LINK_COUNT; $i++) {
		if ($view['link'][$i]) {
			$link = cut_str($view['link'][$i], 70);
			$attach_list .= '<li>관련링크 - <a href="'.$view['link_href'][$i].'" target="_blank">'.$link.' <span class="cnt">['.$view['link_hit'][$i].']</span></a></li>'."\n";
		}
	}			

	//첨부
	for ($i=0; $i < count($view['file']); $i++) {
		if ($view['file'][$i]['source'] && !$view['file'][$i]['view']) {
			$attach_list .= "<li>첨부파일 - <a href=\"javascript:file_download('{$view['file'][$i]['href']}', '{$view['file'][$i]['source']}');\" title=\"{$view['file'][$i]['content']}\">{$view['file'][$i]['source']} ({$view['file'][$i]['size']}) <span class=\"cnt\">[{$view['file'][$i]['download']}]</span></a></li>\n";
		} 
	}
}

?>
<div style="height:10px; border-top:4px solid #333;"></div>
<div class="view_head">
	<h2>본문</h2>
	<div class="subject">
		<header>
			<h1 class="v_subject"><?php echo $view['subject']; ?></h1>
		</header>
		<section id="bo_v_info">
		<ul>
		<?php
			if(!$set['hide_view_name']) echo '<li class="name">'.$view['icon_level'].' '.$view['name'].'</li>'."\n";
			echo '<li>조회 <span class="cnt">'.$view['wr_hit'].'</span></li>'."\n";
			if(!$set['hide_view_cate'] && $view['ca_name']) echo '<li>'.$view['ca_name'].'</li>'."\n";
			echo '<li class="last"><span class="cnt">'.date("Y.m.d H:i", strtotime($view['wr_datetime'])).'</span></li>'."\n";
		?>
		</ul>
		<div class="clear"></div>
		</section>
	</div>
	<div class="clear"></div>
</div>
<div class="clear"></div>
<?php 
	if($attach_list) { //첨부 ?>
		<section id="bo_v_file">
			<ul class="attach">
				<?php echo $attach_list; ?>
			</ul>
		</section>
<?php } ?>

<article id="bo_v_atc">
	<?php
		echo $view['attach_skin'];
		echo $view['related_skin'];
		echo $view['poll_up'];

		echo '<div class="viewContents">'."\n";
			echo $view['blind']; //Blind Message
			echo $view['content'];
			echo '<div class="clear"></div>'."\n";
		echo '</div>'."\n";

		echo $view['poll_down'];

		echo $view['star_skin'];

		echo $daum_view;

		echo $view['good_skin'];

		echo $view['sign_skin'];

		if($view['tag']) echo '<div class="view_tag"><img src="'.AMINA_URL.'/img/icon_tag.gif" alt="" /> '.$view['tag'].'</div>';
	?>
</article>