<? 
if (!defined('_GNUBOARD_')) exit; 

// 게시판 목록 가져 오기 
function groupmenu( $skin_dir="", $gr_id, $order_key='bo_order_search') { 

    global $g4; 

    if ($skin_dir) 
        $latest_skin_path = "$g4[path]/skin/menu/$skin_dir"; 
    else 
        $latest_skin_path = "$g4[path]/skin/menu/basic"; 

    $list = array(); 

    $sql= "select bo_table, SUBSTRING_INDEX( bo_subject,';',1) bo_subject from {$g4['board_table']} 
where gr_id='$gr_id' order by $order_key ASC"; 

    $result = sql_query($sql); 
    for ($i=0; $row = sql_fetch_array($result); $i++) 
        $list[$i] = $row; 

    ob_start(); 
    include "$latest_skin_path/menu.skin.php"; 
    $content = ob_get_contents(); 
    ob_end_clean(); 

    return $content; 
} 
?> 