// 총 개수 가져오기
$sql = "select count(bn_id) as cnt from `$g4[board_new_table]` where $where_clause";
$temp = sql_fetch($sql);
$total = $temp[cnt];
// 페이지 나누기 설정
$max_page = ceil($total / $cut);
if($page > $max_page) $page = $max_page;
$start_page = ceil($page/10)*10 - 9;
$end_page = ceil($page/10)*10;
if($end_page > $max_page) $end_page = $max_page;
if($start_page > 10) $prev_page = $start_page - 1;
if($max_page > $end_page) $next_page = $end_page + 1;
// 페이징
$urlbase = $_SERVER[PHP_SELF] . "?page=";
// $urlbase = $_SERVER[PHP_SELF] . "?mb_id=$mb_id&page=";
for($i=$start_page; $i<=$end_page; $i++) {
if($paging) $paging .= " ";
if($i==$page) $paging .= "<b>";
elseif($option=="author") $paging .= "<a href='$urlbase$i'>";
else $paging .= "<a href='$urlbase$i'>";
$paging .= "[$i]";
if($i==$page) $paging .= "</b>";
else $paging .= "</a>";
}
if($prev_page) $paging = "<a href=\"$urlbase$prev_page\">[Prev]</a> " . $paging;
if($next_page) $paging .= " <a href=\"$urlbase$next_page\">[Next]</a> ";
페이징 코드가 지금 이렇게 돼어있는데요
[1][2][3][4][5]
이렇게 페이징이 돼어있는데요
1번이 이렇게
[1][2][3][4][5][Next]
234번 눌렀을때 양쪽
[Prev][1][2][3][4][5][Next]
5번눌렀을때
[Prev][1][2][3][4][5]
이렇게 적용할려면 어딜수정해야돼나요 ㅠㅠㅠ
$sql = "select count(bn_id) as cnt from `$g4[board_new_table]` where $where_clause";
$temp = sql_fetch($sql);
$total = $temp[cnt];
// 페이지 나누기 설정
$max_page = ceil($total / $cut);
if($page > $max_page) $page = $max_page;
$start_page = ceil($page/10)*10 - 9;
$end_page = ceil($page/10)*10;
if($end_page > $max_page) $end_page = $max_page;
if($start_page > 10) $prev_page = $start_page - 1;
if($max_page > $end_page) $next_page = $end_page + 1;
// 페이징
$urlbase = $_SERVER[PHP_SELF] . "?page=";
// $urlbase = $_SERVER[PHP_SELF] . "?mb_id=$mb_id&page=";
for($i=$start_page; $i<=$end_page; $i++) {
if($paging) $paging .= " ";
if($i==$page) $paging .= "<b>";
elseif($option=="author") $paging .= "<a href='$urlbase$i'>";
else $paging .= "<a href='$urlbase$i'>";
$paging .= "[$i]";
if($i==$page) $paging .= "</b>";
else $paging .= "</a>";
}
if($prev_page) $paging = "<a href=\"$urlbase$prev_page\">[Prev]</a> " . $paging;
if($next_page) $paging .= " <a href=\"$urlbase$next_page\">[Next]</a> ";
페이징 코드가 지금 이렇게 돼어있는데요
[1][2][3][4][5]
이렇게 페이징이 돼어있는데요
1번이 이렇게
[1][2][3][4][5][Next]
234번 눌렀을때 양쪽
[Prev][1][2][3][4][5][Next]
5번눌렀을때
[Prev][1][2][3][4][5]
이렇게 적용할려면 어딜수정해야돼나요 ㅠㅠㅠ
게시글 목록
| 번호 | 제목 |
|---|---|
| 284508 | |
| 284499 | |
| 284492 | |
| 284490 | |
| 284484 | |
| 284481 | |
| 284478 | |
| 284476 | |
| 284474 | |
| 284472 | |
| 284470 | |
| 284458 | |
| 284457 | |
| 284454 | |
| 284453 | |
| 284447 | |
| 284446 | |
| 284444 | |
| 284441 | |
| 284440 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기