<? if (!defined("_GNUBOARD_")) exit; ?>
<style type="text/css">
div.board_title	{ border-top:1px solid #747474; font:bold 14px '맑은 고딕'; margin:20px 0 5px 0; text-align:center; padding:15px 0 10px 0; }
.grplist		{ border-top:1px solid #979797; padding:12px; color:#5AAA6C; font-weight:bold; font-size:14px; font-family:나눔고딕; }
.brdlist		{ color:#4A4A4A; padding:4px 4px 4px 30px; height:20px; cursor:pointer; border-top:1px solid #E7E7E7; }
.brdlist:hover	{ background:#828282; color:#ffffff; }

.crrtbrd		{ background:#828282; color:#fff; height:20px; }
.noboard		{ padding:10px; line-height:150%; font-family:나눔고딕; }
.board_btn		{ margin:20px 0 20px 0; text-align:center; }
</style>

<? echo print_r2($sub_menu[300100]); ?>
<div class="board_title">게시판 관리</div>
<?
//-- 2012. 02. 08 ziumsoft 게시판 전체 목록 불러오기
$resgrplist		= sql_query("select gr_id, gr_subject from g4_group");
while($rdgrplist = mysql_fetch_array($resgrplist)) : ?>
	<div class='grplist'><img src="<?=$g4[path]?>/adm/img/icon_folder.png" valign="middle"> <?=$rdgrplist[gr_subject]?></div>
<?	//-- 그룹별 게시판 읽기
	$resbrdlist		= sql_query("select bo_table, gr_id, bo_subject from g4_board where gr_id='$rdgrplist[gr_id]'");
	while($rdbrdlist = mysql_fetch_array($resbrdlist)) :
		if($rdbrdlist[bo_table] == $bo_table) { $crrtbrd = "crrtbrd"; } else { $crrtbrd = ""; } ?>
		<div class='<?=$crrtbrd?> brdlist' onclick="zm_gourl('<?=$g4[path]?>/adm/board_form.php?bo_table=<?=$rdbrdlist[bo_table]?>&w=u');"><?=$rdbrdlist[bo_table]?>
		</div>
<?	endwhile;
endwhile;

if(!mysql_num_rows($resgrplist)) :
?>
<div class="noboard">
	생성 된 게시판이 없습니다.<br>게시판 그룹관리에서 1개 이상의 그룹을 만드신 후에 게시판을 생성 할 수 있습니다.
	<div class="board_btn">
		<input type="button" value="그룹관리" onclick="zm_gourl('boardgroup_list.php');">
		<input type="button" value="게시판 생성" onclick="zm_gourl('board_form.php');">
	</div>
</div>
<? endif; ?>