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

// 최신글 추출
function main_top($skin_dir="")
{
    global $g4, $gr_id, $bo_table, $config, $member, $is_admin, $s_menu, $stx;

    if ($skin_dir)
        $main_skin_path = "$g4[path]/skin/main/main_top/$skin_dir";
    else
        $main_skin_path = "$g4[path]/skin/main/main_top/basic";
			
	ob_start();
    include "$main_skin_path/main_top.skin.php";
    $content = ob_get_contents();
    ob_end_clean();

    return $content;
}

function main_middle($skin_dir="")
{
    global $g4, $gr_id, $bo_table, $config, $member, $is_admin, $s_menu, $stx;

    if ($skin_dir)
        $main_skin_path = "$g4[path]/skin/main/main_middle/$skin_dir";
    else
        $main_skin_path = "$g4[path]/skin/main/main_middle/basic";
			
	ob_start();
    include "$main_skin_path/main_middle.skin.php";
    $content = ob_get_contents();
    ob_end_clean();

    return $content;
} 
function main_bottom($skin_dir="")
{
    global $g4, $gr_id, $bo_table, $config, $member, $is_admin, $s_menu, $stx;

    if ($skin_dir)
        $main_skin_path = "$g4[path]/skin/main/main_bottom/$skin_dir";
    else
        $main_skin_path = "$g4[path]/skin/main/main_bottom/basic";
			
	ob_start();
    include "$main_skin_path/main_bottom.skin.php";
    $content = ob_get_contents();
    ob_end_clean();

    return $content;
}

// 최신글 추출
function sub_top($skin_dir="")
{
    global $g4, $gr_id, $bo_table, $config, $member, $is_admin, $s_menu, $stx;

	if ($skin_dir)
        $sub_skin_path = "$g4[path]/skin/sub/sub_top/$skin_dir";
    else
        $sub_skin_path = "$g4[path]/skin/sub/sub_top/basic";
			
	ob_start();
    include "$sub_skin_path/sub_top.skin.php";
    $content = ob_get_contents();
    ob_end_clean();

    return $content;
}

function sub_middle($skin_dir="")
{
    global $g4, $gr_id, $bo_table, $config, $member, $is_admin, $s_menu, $stx;

    if ($skin_dir)
        $sub_skin_path = "$g4[path]/skin/sub/sub_middle/$skin_dir";
    else
        $sub_skin_path = "$g4[path]/skin/sub/sub_middle/basic";
			
	ob_start();
    include "$sub_skin_path/sub_middle.skin.php";
    $content = ob_get_contents();
    ob_end_clean();

    return $content;
} 

function sub_bottom($skin_dir="")
{
    global $g4, $gr_id, $bo_table, $config, $member, $is_admin, $s_menu, $stx;

    if ($skin_dir)
        $sub_skin_path = "$g4[path]/skin/sub/sub_bottom/$skin_dir";
    else
        $sub_skin_path = "$g4[path]/skin/sub/sub_bottom/basic";
			
	ob_start();
    include "$sub_skin_path/sub_bottom.skin.php";
    $content = ob_get_contents();
    ob_end_clean();

    return $content;
} 
?>