<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
include_once("./_common.php");
include_once("$g4[path]/lib/latest.lib.php");

//아래 부분 테이블명

$my_table1 = '03_1';
$my_table2 = '03_2';
$my_table3 = '03_3';
$my_table4 = '03_4';
$my_table5 = '03_5';

// 게시판 이름 구하기
// 오누리 빌더 1.3 포함
$sql1 = "select bo_subject from $g4[board_table] where bo_table='$my_table1'";
$sql2 = "select bo_subject from $g4[board_table] where bo_table='$my_table2'";
$sql3 = "select bo_subject from $g4[board_table] where bo_table='$my_table3'";
$sql4 = "select bo_subject from $g4[board_table] where bo_table='$my_table4'";
$sql5 = "select bo_subject from $g4[board_table] where bo_table='$my_table5'";
$bo_name_sql1 = sql_query($sql1);
$bo_name1 = sql_fetch_array($bo_name_sql1);
$bo_name_sql2 = sql_query($sql2);
$bo_name2 = sql_fetch_array($bo_name_sql2);
$bo_name_sql3 = sql_query($sql3);
$bo_name3 = sql_fetch_array($bo_name_sql3);
$bo_name_sql4 = sql_query($sql4);
$bo_name4 = sql_fetch_array($bo_name_sql4);
$bo_name_sql5 = sql_query($sql5);
$bo_name5 = sql_fetch_array($bo_name_sql5);

$tap_width = "462"; // 텝 넓이
?>

<SCRIPT type="text/javascript">
<!--
	old_debate='1';

	function showLayer_tap(objid){
		document.getElementById("debate"+old_debate).style.display="none";
		document.getElementById("debate"+old_debate+"#1").style.display="";
		document.getElementById("debate"+objid+"#1").style.display="none";
		document.getElementById("debate"+objid).style.display="";
		document.getElementById("debate_content"+old_debate).style.display="none";
		document.getElementById("debate_content"+objid).style.display="";
		old_debate=objid;
	}
//-->
</SCRIPT>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td align="center">
		<table width="<?=$tap_width?>" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td width="93">
				<table cellSpacing=0 cellPadding=0 border=0>
					<tr>
						<td id=debate1><table cellSpacing=0 cellPadding=0 border=0 width=93 height=23 background="<?=$g4[path]?>/img/tap_img/nl_2.gif" style="cursor:pointer;" onclick=location.href="<?=$g4[path]?>/bbs/board.php?bo_table=<?=$my_table1?>"><tr><td align="center" width="91" class="small"><span style="color:#f0761c; font-weight:bold; vertical-align:-3px;"><?=$bo_name1[bo_subject]?></span></td><td width="2"></td></tr></table></TD>
						<td id=debate1#1 style="DISPLAY: none;"><table cellSpacing=0 cellPadding=0 border=0 width=93 height=23 background="<?=$g4[path]?>/img/tap_img/nl.gif" style="cursor:pointer;" onclick=location.href="javascript:showLayer_tap('1')"><tr><td align="center" width="91" class="small"><span style="vertical-align:-3px;"><?=$bo_name1[bo_subject]?></span></td><td width="2"></td></tr></table></td>
					</tr></table>
				</td>
				<td width="92">
				<table cellSpacing=0 cellPadding=0 border=0>
					<tr>
						<td id=debate2 style="DISPLAY: none;"><table cellSpacing=0 cellPadding=0 border=0 width=92 height=23 background="<?=$g4[path]?>/img/tap_img/nm_2.gif" style="cursor:pointer;" onclick=location.href="<?=$g4[path]?>/bbs/board.php?bo_table=<?=$my_table2?>"><tr><td align="center" width="90" class="small"><span style="color:#f0761c; font-weight:bold; vertical-align:-3px;"><?=$bo_name2[bo_subject]?></span></td><td width="2"></td></tr></table></TD>
						<td id=debate2#1><table cellSpacing=0 cellPadding=0 border=0 width=92 height=23 background="<?=$g4[path]?>/img/tap_img/nm.gif" style="cursor:pointer;" onclick=location.href="javascript:showLayer_tap('2')"><tr><td align="center" width="90" class="small"><span style="vertical-align:-3px;"><?=$bo_name2[bo_subject]?></span></td><td width="2"></td></tr></table></td>
					</tr></table>
				</td>
				<td width="92">
				<table cellSpacing=0 cellPadding=0 border=0>
					<tr>
						<td id=debate3 style="DISPLAY: none;"><table cellSpacing=0 cellPadding=0 border=0 width=92 height=23 background="<?=$g4[path]?>/img/tap_img/nm_2.gif" style="cursor:pointer;" onclick=location.href="<?=$g4[path]?>/bbs/board.php?bo_table=<?=$my_table3?>"><tr><td align="center" width="90" class="small"><span style="color:#f0761c; font-weight:bold; vertical-align:-3px;"><?=$bo_name3[bo_subject]?></span></td><td width="2"></td></tr></table></TD>
						<td id=debate3#1><table cellSpacing=0 cellPadding=0 border=0 width=92 height=23 background="<?=$g4[path]?>/img/tap_img/nm.gif" style="cursor:pointer;" onclick=location.href="javascript:showLayer_tap('3')"><tr><td align="center" width="90" class="small"><span style="vertical-align:-3px;"><?=$bo_name3[bo_subject]?></span></td><td width="2"></td></tr></table></td>
					</tr></table>
				</td>
				<td width="92">
				<table cellSpacing=0 cellPadding=0 border=0>
					<tr>
						<td id=debate4 style="DISPLAY: none;"><table cellSpacing=0 cellPadding=0 border=0 width=92 height=23 background="<?=$g4[path]?>/img/tap_img/nm_2.gif" style="cursor:pointer;" onclick=location.href="<?=$g4[path]?>/bbs/board.php?bo_table=<?=$my_table4?>"><tr><td align="center" width="90" class="small"><span style="color:#f0761c; font-weight:bold; vertical-align:-3px;"><?=$bo_name4[bo_subject]?></span></td><td width="2"></td></tr></table></TD>
						<td id=debate4#1><table cellSpacing=0 cellPadding=0 border=0 width=92 height=23 background="<?=$g4[path]?>/img/tap_img/nm.gif" style="cursor:pointer;" onclick=location.href="javascript:showLayer_tap('4')"><tr><td align="center" width="90" class="small"><span style="vertical-align:-3px;"><?=$bo_name4[bo_subject]?></span></td><td width="2"></td></tr></table></td>
					</tr></table>
				</td>
				<td width="93">
				<table cellSpacing=0 cellPadding=0 border=0>
					<tr>
						<td id=debate5 style="DISPLAY: none;"><table cellSpacing=0 cellPadding=0 border=0 width=93 height=23 background="<?=$g4[path]?>/img/tap_img/nr_2.gif" style="cursor:pointer;" onclick=location.href="<?=$g4[path]?>/bbs/board.php?bo_table=<?=$my_table5?>"><tr><td align="center" width="91" class="small"><span style="color:#f0761c; font-weight:bold; vertical-align:-3px;"><?=$bo_name5[bo_subject]?></span></td><td width="2"></td></tr></table></TD>
						<td id=debate5#1><table cellSpacing=0 cellPadding=0 border=0 width=93 height=23 background="<?=$g4[path]?>/img/tap_img/nr.gif" style="cursor:pointer;" onclick=location.href="javascript:showLayer_tap('5')"><tr><td align="center" width="91" class="small"><span style="vertical-align:-3px;"><?=$bo_name5[bo_subject]?></span></td><td width="2"></td></tr></table></td>
					</tr></table>
				</td>
			</tr>
		</table>
		</td>
	</tr>
	<tr>
		<td align="center">
		<table width="<?=$tap_width?>" height="120" border="0" cellspacing="0" cellpadding="0">
		<colgroup width='1'>
		<colgroup>
		<colgroup width='1'>
			<tr> 
				<td bgcolor="#d8d8d8"></td>
				<td valign='top'>
				<DIV id=debate_content1><?=latest('tab',$my_table1, "5", "42");	?></div>
				<DIV id=debate_content2 style="DISPLAY: none;"><?=latest('tab',$my_table2, "5", "42");	?></div>
				<DIV id=debate_content3 style="DISPLAY: none;"><?=latest('tab',$my_table3, "5", "42");	?></div>
				<DIV id=debate_content4 style="DISPLAY: none;"><?=latest('tab',$my_table4, "5", "42");	?></div>
				<DIV id=debate_content5 style="DISPLAY: none;"><?=latest('tab',$my_table5, "5", "42");	?></div>
				</td>
				<td bgcolor="#d8d8d8"></td>
			</tr>
			<tr height='1'><td bgcolor="#d8d8d8"></td><td></td><td bgcolor="#d8d8d8"></td></tr>
		</table>
		</td>
	</tr>
	<tr>
		<td align="center">
		<table width="<?=$tap_width?>" border="0" cellspacing="0" cellpadding="0">
		<colgroup width='2'>
		<colgroup>
		<colgroup width='2'>
			<tr height='3'>
				<td><img src='<?=$g4[path]?>/img/tap_img/left_bottom.gif'></td>
				<td width="100%" background='<?=$g4[path]?>/img/tap_img/center_bottom.gif'></td>
				<td><img src='<?=$g4[path]?>/img/tap_img/right_bottom.gif'></td>
			</tr>
		</table>
		</td>
	</tr>
</table>
