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

// 자신만의 코드를 넣어주세요.
   $cn  = 4;  //대분류 한줄내림


   $group_table  = "g4_group";
   $mct          = " where gr_10  = '' "; //미사용 - 값이 존재
   
   $o_desc       = "gr_9";  // 정렬순서
   $g_sql        = " select gr_id,gr_subject from $group_table {$mct} order by $o_desc,gr_id   ";
   $g_result     = sql_query($g_sql);
   $g_count      = mysql_num_rows($g_result);


?>
<? if ($admin_href) { ?>
<table width="100%" cellspacing="0" cellpadding="0">
<tr height="25">
    <td width="50%"</td></form>
    <td align="right" style="font:normal 11px tahoma; color:#BABABA;">
     <a href="<?=$admin_href?>"><img src="<?=$board_skin_path?>/img/btn_admin.gif" title="관리자" width="63" height="22" border="0" align="absmiddle"></a></td>
</tr>
<tr><td height=5></td></tr>
</table>
<?}?>

<table border="0" cellspacing="0" cellpadding="0" width="95%" align="center">
  <tr>
    <td width='10' height='10'><img src='<?=$board_skin_path?>/img/m_neto1.gif' width='10' height='10' border='0'></td>
    <td background='<?=$board_skin_path?>/img/m_neto2.gif' height='10'>    </td>
    <td><img src='<?=$board_skin_path?>/img/m_neto3.gif' width='10' height='10' border='0'></td>
  </tr>
  <tr>
    <td background='<?=$board_skin_path?>/img/m_neto4.gif' width="10"></td>
    <td align='center' valign='top' bgcolor='#FFFFFF'>
    <!------내용출력------>
    <table border="0" cellspacing="0" cellpadding="0" width="100%" align="center">
      <tr><td height="30"></td></tr>
      <tr><td align="center"  valign='top' >
      <table border="0" cellspacing="0" cellpadding="0" width="100%" align="center">
      <tr>
      <?
      $t=1;
      while ($g_row = sql_fetch_array($g_result)){
        
        //하위그릅출력
        $board_table  = "g4_board ";
        $s_mct        = " where gr_id  = '$g_row[gr_id]' ";
        //$o_desc       = "bo_5";  // 정렬순서
        $s_sql        = " select bo_subject,bo_table from $board_table {$s_mct} order by bo_table,bo_subject   ";
        $s_result     = sql_query($s_sql);
        $s_count      = mysql_num_rows($s_result);
        
        $gr_subject   = "<span style='font-family:Tahoma;font-size:11pt;color:#faf5f7;'>".$g_row[gr_subject]."</span>";
        
        
        ?>
       <td align="center" valign='top' >       
       <table border="0" cellspacing="0" cellpadding="0" width="100%" align="center">
       <tr><td align="center"  valign='top' >
	       <table border="0" cellspacing="0" cellpadding="0" width="147" align="center">
		   <tr><td align="center" background="<?=$board_skin_path?>/img/sitemap_title.gif" width="147" height="49"><b><?=$gr_subject?></b></td></tr>
		   </table>	   
	   </td></tr>
       <tr><td height="10" ></td></tr>
       <tr><td align="center" valign='top' >
       <!--------------테이블 출력--------->
           <table border="0" cellspacing="0" cellpadding="0" width="120" valign='top' >          
       <?for($i=0;$s_row = sql_fetch_array($s_result);$i){
         
         ?>
         <tr><td><a href="<?=$g4[bbs_path]?>/board.php?bo_table=<?=$s_row[bo_table]?>"><?=$s_row[bo_subject]?></a></td></tr>
         <tr><td height="5"></td></tr>
         <?
         } 
       ?>
       <tr><td height="5" ></td></tr>
       </table>   
       <!------------//테이블 출력--------->
       </td></tr>
       </table>              
       </td>      
      <?
      //가로 출력아래
      if( $t%$cn==0) {
        echo "</tr><tr><td  align=center height=15></tr><tr>";
        }
         
         $t++;
      }

      ?> 
      </tr></table>     
     <? if (count($g_count) == 0) { echo "사이트맵 준비중입니다."; } ?>
	   </td></tr>
	   <tr><td height="30"></td></tr>
	  </table> 
    <!------내용출력------>
  </td>
    <td background='<?=$board_skin_path?>/img/m_neto5.gif' width="10"></td>
  </tr>
  <tr>
    <td height='10'><img src='<?=$board_skin_path?>/img/m_neto6.gif' width='10' height='10' border='0'></td>
    <td background='<?=$board_skin_path?>/img/m_neto7.gif'></td>
    <td><img src='<?=$board_skin_path?>/img/m_neto8.gif' width='10' height='10' border='0'></td>
  </tr>
</table>

