<!-- 최신글 시작 { -->
<?php
# 그룹 기준
$gr_where_sql = "a.bo_device <> 'mobile' ";
$gr_where_sql .= "and a.bo_list_level <= '{$member['mb_level']}' "; # 회원레벨에 따른 출력제한
// $gr_where_sql .= "and a.bo_order != '0' "; # 게시판 출력순서 0 제외
$gr_where_sql .= "and a.bo_use_search != '0' "; # 검색 미사용 제외
$gr_where_sql .= "and b.gr_id not in ('admin','03','05') "; # 그룹 제외 '05', '06'...
$gr_where_sql .= "and a.bo_table not in ('notice') "; # 테이블 제외 'notice', 'tbname'
$gr_order .= " b.gr_order, "; # 그룹 출력순서에 따른 정렬 우선
$sql = " select bo_table from `{$g5['board_table']}` a left join `{$g5['group_table']}` b on (a.gr_id=b.gr_id) where $gr_where_sql order by $gr_order a.bo_order ";
// 테이블 기준
/*
$tb_where_sql = "bo_device <> 'mobile' ";
$tb_where_sql .= "and bo_list_level <= '{$member['mb_level']}' "; # 회원레벨에 따른 출력제한
$tb_where_sql .= "and bo_order != '0' "; # 게시판 출력순서 0 출력 제외
$tb_where_sql .= "and bo_table not in ('notice') "; # 제외 테이블 'notice', 'tbname'
$sql = " select bo_table, bo_subject from {$g5[board_table]} where $tb_where_sql order by bo_order ";
*/
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++) {
if ($i%2==1) $lt_style = "margin-left:20px";
else $lt_style = "";
?>
<div style="float:left;<?php echo $lt_style ?>">
<?php
// 이 함수가 바로 최신글을 추출하는 역할을 합니다.
// 사용방법 : latest(스킨, 게시판아이디, 출력라인, 글자수);
echo latest("basic", $row['bo_table'], 5, 25);
?>
</div>
<?php
}
?>
<!-- } 최신글 끝 -->
소스 그대로 index.php 최신글 영역에 붙여넣기 (기존 내용 대신)
1. 그룹기준 해당 조건 처리 출력 기본
2. 테이블 기준 출력 사용시 그룹처리 영역 주석 테이블 기준 영역 활성
3. 주석 설명 참고 각 조건별 활성 및 주석, 조건 변경.추가
<?php
# 그룹 기준
$gr_where_sql = "a.bo_device <> 'mobile' ";
$gr_where_sql .= "and a.bo_list_level <= '{$member['mb_level']}' "; # 회원레벨에 따른 출력제한
// $gr_where_sql .= "and a.bo_order != '0' "; # 게시판 출력순서 0 제외
$gr_where_sql .= "and a.bo_use_search != '0' "; # 검색 미사용 제외
$gr_where_sql .= "and b.gr_id not in ('admin','03','05') "; # 그룹 제외 '05', '06'...
$gr_where_sql .= "and a.bo_table not in ('notice') "; # 테이블 제외 'notice', 'tbname'
$gr_order .= " b.gr_order, "; # 그룹 출력순서에 따른 정렬 우선
$sql = " select bo_table from `{$g5['board_table']}` a left join `{$g5['group_table']}` b on (a.gr_id=b.gr_id) where $gr_where_sql order by $gr_order a.bo_order ";
// 테이블 기준
/*
$tb_where_sql = "bo_device <> 'mobile' ";
$tb_where_sql .= "and bo_list_level <= '{$member['mb_level']}' "; # 회원레벨에 따른 출력제한
$tb_where_sql .= "and bo_order != '0' "; # 게시판 출력순서 0 출력 제외
$tb_where_sql .= "and bo_table not in ('notice') "; # 제외 테이블 'notice', 'tbname'
$sql = " select bo_table, bo_subject from {$g5[board_table]} where $tb_where_sql order by bo_order ";
*/
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++) {
if ($i%2==1) $lt_style = "margin-left:20px";
else $lt_style = "";
?>
<div style="float:left;<?php echo $lt_style ?>">
<?php
// 이 함수가 바로 최신글을 추출하는 역할을 합니다.
// 사용방법 : latest(스킨, 게시판아이디, 출력라인, 글자수);
echo latest("basic", $row['bo_table'], 5, 25);
?>
</div>
<?php
}
?>
<!-- } 최신글 끝 -->
소스 그대로 index.php 최신글 영역에 붙여넣기 (기존 내용 대신)
1. 그룹기준 해당 조건 처리 출력 기본
2. 테이블 기준 출력 사용시 그룹처리 영역 주석 테이블 기준 영역 활성
3. 주석 설명 참고 각 조건별 활성 및 주석, 조건 변경.추가
댓글 8개
게시글 목록
| 번호 | 제목 |
|---|---|
| 1084 | |
| 1083 | |
| 1080 | |
| 1074 | |
| 1068 | |
| 1064 | |
| 1056 | |
| 1048 | |
| 1037 | |
| 1029 | |
| 1025 | |
| 1022 | |
| 1019 | |
| 1014 | |
| 1013 | |
| 1012 | |
| 1003 | |
| 1002 | |
| 997 | |
| 992 | |
| 986 | |
| 982 | |
| 973 | |
| 962 | |
| 952 | |
| 950 | |
| 947 | |
| 945 | |
| 942 | |
| 938 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기