<? if (!defined("_GNUBOARD_")) exit; ?>
<style type="text/css">
.grplist		{ padding:12px; color:#FF8080; font-weight:bold; font-size:14px; font-family:나눔고딕; }

.brdlist		{ color:#6A829E; padding:4px 4px 4px 30px; height:20px; cursor:pointer; }
.brdlist:hover	{ background:#DEE8F3; color:#6A829E; }

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

<?
//-- 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" align="middle"> <?=$rdgrplist[gr_subject]?></div>
	<div class="line"></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>
		<div class="line"></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; ?>