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

include_once("./_common.php");

//$bo_table= "report";
function select_gr_list($skin_dir="",$gr_id, $rows=10)
{
global $config;
    global $g4;

    if ($skin_dir)
        $latest_skin_path = "$g4[path]/include/htmlgroup/$skin_dir";
   


$list = array();

//$sql = " select bo_table, bo_subject from $g4[board_table] where gr_id='$gr_id'  order by bo_table desc limit 0, $rows  ";
//$sql = " select bo_subject, bo_table from $g4[board_table] where (bo_list_level <= $member[mb_level]) and (gr_id = '$row[gr_id]') and bo_use_search = '1' order by bo_order_search"; 

//제외보드설정
//$sql = " select bo_table, bo_subject from $g4[board_table] where gr_id='$gr_id'  and bo_table not in ('html1_2', 'html1_3') and bo_use_search = '1' order by bo_order_search"; 

$sql = " select bo_table, bo_subject from $g4[board_table] where gr_id='$gr_id'  and bo_use_search = '1' order by bo_order_search"; 

$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++) {

	$sql2 = " select gr_subject from $g4[group_table] where gr_id='$gr_id'  ";
	$result2=sql_query($sql2);
	for ($j=0; $row2=sql_fetch_array($result2); $j++) {
	$gr_subject=$row2[gr_subject];
	}

	$gr_id=$row[gr_id];
	$list[$i]= $row;
	$list[$i][bo_table]=$row[bo_table];
	$list[$i][bo_subject]=$row[bo_subject];
	
    
}
	
    include "$latest_skin_path/latest_gr.skin.php";
    
}
?>
