특정게시판의 최신글로 이동하는 스크립트파일
==================================================================
본문中....
<a href="new.php?bo_table=test">[test 게시판의 최신글로 이동]</a>
본문中....
==================================================================
[new.php]
<?
include_once("./_common.php");
// 파라메터 체크
if ( !$bo_table ) exit;
// 테이블 최신글 번호
$tmp_write_table = $g4['write_prefix'] . $bo_table;
$last_wr_id = sql_fetch("select wr_id from ".$tmp_write_table." where wr_is_comment = 0 order by wr_num limit 0, 1");
// 이동
goto_url($g4['bbs_path']."/board.php?bo_table=".$bo_table."&wr_id=".$last_wr_id['wr_id']);
?>
==================================================================
본문中....
<a href="new.php?bo_table=test">[test 게시판의 최신글로 이동]</a>
본문中....
==================================================================
[new.php]
<?
include_once("./_common.php");
// 파라메터 체크
if ( !$bo_table ) exit;
// 테이블 최신글 번호
$tmp_write_table = $g4['write_prefix'] . $bo_table;
$last_wr_id = sql_fetch("select wr_id from ".$tmp_write_table." where wr_is_comment = 0 order by wr_num limit 0, 1");
// 이동
goto_url($g4['bbs_path']."/board.php?bo_table=".$bo_table."&wr_id=".$last_wr_id['wr_id']);
?>
댓글 7개
게시글 목록
| 번호 | 제목 |
|---|---|
| 34706 | |
| 34693 | |
| 34563 | |
| 34536 | |
| 34521 | |
| 34480 | |
| 34479 | |
| 34466 | |
| 34437 | |
| 34436 | |
| 34435 | |
| 34406 | |
| 34398 | |
| 34387 | |
| 34382 | |
| 34375 | |
| 34364 | |
| 34336 | |
| 34294 | |
| 34293 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기