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

<link rel='stylesheet' type='text/css' href='<?=$board_skin_path?>/board_style.css'>

<table width="<?=$width?>" align=center cellpadding=0 cellspacing=0><tr><td align=center>

<!-- 링크 버튼 -->
<? 
ob_start(); 
?>
<table width='100%' cellpadding=0 cellspacing=0>
<tr height=35>
    <td width=75%>
        <? if ($search_href) { echo "<a href=\"$search_href\"><img src='$board_skin_path/img/search_list.gif' border='0' align='absmiddle'></a> "; } ?>
        <? echo "<a href=\"$list_href\"><img src='$board_skin_path/img/list.gif' border='0' align='absmiddle'></a> "; ?>

        <? if ($write_href) { echo "<a href=\"$write_href\"><img src='$board_skin_path/img/write.gif' border='0' align='absmiddle'></a> "; } ?>
        <? if ($reply_href) { echo "<a href=\"$reply_href\"><img src='$board_skin_path/img/reply.gif' border='0' align='absmiddle'></a> "; } ?>

        <? if ($update_href) { echo "<a href=\"$update_href\"><img src='$board_skin_path/img/modify.gif' border='0' align='absmiddle'></a> "; } ?>
        <? if ($delete_href) { echo "<a href=\"$delete_href\"><img src='$board_skin_path/img/delete.gif' border='0' align='absmiddle'></a> "; } ?>

        <? if ($good_href) { echo "<a href=\"$good_href\" target='hiddenframe'><img src='$board_skin_path/img/good.gif' border='0' align='absmiddle'></a> "; } ?>
        <? if ($nogood_href) { echo "<a href=\"$nogood_href\" target='hiddenframe'><img src='$board_skin_path/img/nogood.gif' border='0' align='absmiddle'></a> "; } ?>

        <? if ($scrap_href) { echo "<a href=\"javascript:;\" onclick=\"win_scrap('./scrap_popin.php?bo_table=$bo_table&wr_id=$wr_id');\"><img src='$board_skin_path/img/scrap.gif' border='0' align='absmiddle'></a> "; } ?>

        <? if ($copy_href) { echo "<a href=\"$copy_href\"><img src='$board_skin_path/img/copy.gif' border='0' align='absmiddle'></a> "; } ?>
        <? if ($move_href) { echo "<a href=\"$move_href\"><img src='$board_skin_path/img/move.gif' border='0' align='absmiddle'></a> "; } ?>
    </td>
    <td width=25% align=right>
        <? if ($prev_href) { echo "<a href=\"$prev_href\" title=\"$prev_wr_subject\"><img src='$board_skin_path/img/prev.gif' border='0' align='absmiddle'></a>&nbsp;"; } ?>
        <? if ($next_href) { echo "<a href=\"$next_href\" title=\"$next_wr_subject\"><img src='$board_skin_path/img/next.gif' border='0' align='absmiddle'></a>&nbsp;"; } ?>
    </td>
</tr>
</table>
<?
$link_buttons = ob_get_contents();
ob_end_flush();
?>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td height="30">
<img src="<?=$board_skin_path?>/img/btn_arry.gif" width="11" height="11" align="absmiddle">&nbsp;<span class=V_T>홈페이지 기본정보</span> (<a href="<?=$g4[admin_path];?>/website_form.php?wr_subject=<?=$view[wr_subject];?>&wr_link1=<?=$view[wr_link1];?>&wr_6=<?=$view[wr_6];?>&wr_7=<?=$view[wr_7];?>&wr_8=<?=$view[wr_8];?>" target="_blank">등록하기</a>)</td>
	</tr>

	<tr>
		<td style="padding:0 40px;">
			<table bgcolor="#e0e0e0" width="100%" border="0" cellspacing="1" cellpadding="5">
				<tr>
					<td bgcolor="#F7F7F7" width="20%" height="20"><span class=V_L>회사 명</span></td>
					<td bgcolor="#FFFFFF" width="30%"><?=$view[wr_1]?></td>
					<td bgcolor="#F7F7F7" width="20%"><span class=V_L>등록자 명</span></td>
					<td bgcolor="#FFFFFF" width="30%"><?=$view[name]?></td>
				</tr>
				<tr>
					<td bgcolor="#F7F7F7" width="20%" height="20"><span class=V_L>전화번호</span></td>
					<td bgcolor="#FFFFFF" width="30%"><?=$view[wr_2]?></td>
					<td bgcolor="#F7F7F7" width="20%"><span class=V_L>E-mail</span></td>
					<td bgcolor="#FFFFFF" width="30%"><a href="mailto:<?=$view[wr_email]?>"><?=$view[wr_email]?></a></td>
				</tr>
				<tr>
					<td bgcolor="#F7F7F7" width="20%" height="20"><span class=V_L>부서/직책</span></td>
					<td bgcolor="#FFFFFF" width="30%"><?=$view[wr_3]?></td>
					<td bgcolor="#F7F7F7" width="20%"><span class=V_L>주소</span></td>
					<td bgcolor="#FFFFFF" width="30%"><?=$write[wr_4]?></td>
				</tr>
				<tr>
					<td bgcolor="#F7F7F7" width="20%" height="20"><span class=V_L>대표전화번호</span></td>
					<td bgcolor="#FFFFFF" width="30%"><?=$view[wr_5]?></td>
					<td bgcolor="#F7F7F7" width="20%"><span class=V_L>홈페이지</span></td>
					<td bgcolor="#FFFFFF" width="30%">
<?
$cnt = 0;
for ($i=1; $i<=$g4[link_count]; $i++) {
    if ($view[link][$i]) {
        $cnt++;
        $link = cut_str($view[link][$i], 70);
        echo <<<HEREDOC
        <a href="{$view[link_href][$i]}" target="_blank">{$link}</a>
HEREDOC;
    }
}
?>
					</td>
				</tr>
			</table>
		</td>
	</tr>
	<tr><td height="20"></td></tr>
	<tr>
		<td height="30"><img src="<?=$board_skin_path?>/img/btn_arry.gif" width="11" height="11" align="absmiddle">&nbsp;<span class=V_T>홈페이지 내용입력</span></td>
	</tr>

	<tr>
		<td style="padding:0 40px;">
			<table bgcolor="#e0e0e0" width="100%" border="0" cellspacing="1" cellpadding="5">
				<tr>
					<td bgcolor="#F7F7F7" width="20%" height="20"><span class=V_L>홈페이지 명</span>＊</span></td>
					<td bgcolor="#FFFFFF" width="80%"><?=$view[subject]?></td>
				</tr>
			</table>
		</td>
	</tr>
	<tr><td height="5"></td></tr>

	<tr>
		<td style="padding:0 40px;">
			<table bgcolor="#e0e0e0" width="100%" border="0" cellspacing="1" cellpadding="5">
				<tr>
					<td bgcolor="#F7F7F7" width="20%" height="20"><span class=V_L>홈페이지 설명</span>＊</span></td>
					<td bgcolor="#FFFFFF" width="80%"><?=$view[wr_6]?></td>
				</tr>
			</table>
		</td>
	</tr>
	<tr><td height="5"></td></tr>


	<tr>
		<td style="padding:0 40px;">
			<table bgcolor="#e0e0e0" width="100%" border="0" cellspacing="1" cellpadding="5">
				<tr>
					<td bgcolor="#F7F7F7" width="20%" height="20"><span class=V_L>키워드</span>＊</span></td>
					<td bgcolor="#FFFFFF" width="80%"><?=$view[wr_8]?></td>
				</tr>
			</table>
		</td>
	</tr>
	<tr><td height="5"></td></tr>

	<tr>
		<td style="padding:0 40px;">
			<table bgcolor="#e0e0e0" width="100%" border="0" cellspacing="1" cellpadding="5">
				<tr>
					<td bgcolor="#F7F7F7" width="20%" height="20"><span class=V_L>분류</span>＊</span></td>
					<td bgcolor="#FFFFFF" width="80%"><?=$view[wr_7]?></td>
				</tr>
			</table>
		</td>
	</tr>
	<tr><td height="5"></td></tr>
	<tr>
		<td style='padding:0 40px;'>
			<table bgcolor="#e0e0e0" width="100%" border="0" cellspacing="1" cellpadding="5">
				<tr>
					<td bgcolor="#FFFFFF" width="100%" height="150" valign="top" style='word-break:break-all;'>
        <? 
        // 파일 출력
        for ($i=0; $i<=count($view[file]); $i++) {
            if ($view[file][$i][view]) 
                echo $view[file][$i][view] . "<p>";
        }
        ?>

        <span class="V_content"><?=$view[content];?></span>
        <?//echo $view[rich_content]; // {이미지:0} 과 같은 코드를 사용할 경우?>
        <!-- 테러 태그 방지용 --></xml></xmp><a href=""></a><a href=''></a>
					</td>
				</tr>
			</table>

		</td>
	</tr>
	<tr><td height="5"></td></tr>
	<tr>
		<td style="padding:0 40px;">
			<table bgcolor="#e0e0e0" width="100%" border="0" cellspacing="1" cellpadding="5">
				<tr>
					<td bgcolor="#F7F7F7" width="20%" height="30">
						<span class=V_L>첨부파일</span>
					</td>
					<td bgcolor="#FFFFFF" width="80%">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<?
// 가변 파일
$cnt = 0;
for ($i=0; $i<count($view[file]); $i++) {
    if ($view[file][$i][source] && !$view[file][$i][view]) {
        $cnt++;
        echo <<<HEREDOC
	<tr>
		<td>
			<a href="javascript:file_download('{$view[file][$i][href]}', '{$view[file][$i][source]}');" title='{$view[file][$i][content]}'><span class=V_file>{$view[file][$i][source]}</span> <span class=V_fileinfo>({$view[file][$i][size]}), Down : {$view[file][$i][download]}, {$view[file][$i][datetime]}</span></a>
		</td>
	</tr>
HEREDOC;
    }
}
?>
</table>
					</td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td width="100%" height="10"></td>
	</tr>
</table>

<?=$link_buttons?>

</td></tr></table>


<script language="JavaScript">
function file_download(link, file) {
    <? if ($board[bo_download_point] < 0) { ?>if (confirm("'"+file+"' 파일을 다운로드 하시면 포인트가 차감(<?=number_format($board[bo_download_point])?>점)됩니다.\n\n포인트는 게시물당 한번만 차감되며 다음에 다시 다운로드 하셔도 중복하여 차감하지 않습니다.\n\n그래도 다운로드 하시겠습니까?"))<?}?>
    document.location.href=link;
}
</script>

<script language="JavaScript" src="<?="$g4[path]/js/board.js"?>"></script>
<script language="JavaScript">
window.onload=function() {
    resizeBoardImage(<?=(int)$board[bo_image_width]?>);
    drawFont();
}
</script>
<!-- 게시글 보기 끝 -->
