if (!defined('_GNUBOARD_')) exit; // banner_latest(세로출력row 가로출력 col , 중앙[c] 왼쪽[l] 오른쪽[r] 하단[b] 그룹[g] 랜덤[d] , limit ); // 주의사항 : d 랜덤 일때는 무조건 limit 1 로 만듬 function banner_latest($skin="row", $loca="l" ,$limit="100") { global $config, $g5; $upload_dir = "/data/banner/"; if($loca) $sql_search = " and bn_location = '$loca'"; $order_by = ""; if($loca=="d"){ // 랜덤 이면 무조건 한개만 출력 $order_by = "order by rand() desc"; $limit = 1; }else{ $order_by = "order by bn_seq asc"; } $time = G5_TIME_YMDHIS; $sql = "select * from g4_topschool_banner where bn_start_date < '$time' and bn_end_date > '$time' and bn_openchk = '1' $sql_search $order_by limit $limit"; $result = sql_query($sql); if ($result) { $i = 0; while($rs = sql_fetch_array($result)) { $file = ""; $target = ""; if($rs[bn_target]) $target = "target='_blank'"; if($rs[bn_file_type] == 13){ $file = ""; }else{ $file = "