[초보]원하는 그룹 id 별로 최신글 자동으로 추출하기 정보
[초보]원하는 그룹 id 별로 최신글 자동으로 추출하기본문
<?
include_once("./_common.php");
include_once("$g4[path]/lib/latest.lib.php");
$g4[title] = "";
include_once("./_head.php");
$list_mod = 2; // 한라인에 몇개씩 출력할것인지?
?>
<table width="100%" cellpadding=0 cellspacing=0><tr>
<?
// 최신글
$sql = " select bo_table, bo_subject from $g4[board_table] where gr_id = '그룹아이디' order by bo_table "; //그룹 id 설정
$result = sql_query($sql);
for ($i=0; $row=mysql_fetch_array($result); $i++) {
// tr 바꾸기
if (($i > 0) && ($i % $list_mod == 0))
echo "</tr><tr>";
echo "
<td width=50% valign=top>
<table width=98% cellpadding=0 cellspacing=0 align=center>
<tr>
<td colspan=2>";
// 이 함수가 바로 최신글을 추출하는 역할을 합니다.
// 사용방법
// latest(스킨, 게시판아이디, 출력라인, 글자수);
// 스킨은 입력하지 않을 경우 운영자 > 환경설정의 최신글 스킨경로를 기본 스킨으로 합니다.
echo latest("basic", $row[bo_table], 5, 50);
echo "</td></tr></table></td>";
}
if ($i > 0 && ($i % $list_mod == 1))
echo "<td width=50% valign=top> </td>";
?>
</td></tr></table>
<?
include_once("./_tail.php");
?>
include_once("./_common.php");
include_once("$g4[path]/lib/latest.lib.php");
$g4[title] = "";
include_once("./_head.php");
$list_mod = 2; // 한라인에 몇개씩 출력할것인지?
?>
<table width="100%" cellpadding=0 cellspacing=0><tr>
<?
// 최신글
$sql = " select bo_table, bo_subject from $g4[board_table] where gr_id = '그룹아이디' order by bo_table "; //그룹 id 설정
$result = sql_query($sql);
for ($i=0; $row=mysql_fetch_array($result); $i++) {
// tr 바꾸기
if (($i > 0) && ($i % $list_mod == 0))
echo "</tr><tr>";
echo "
<td width=50% valign=top>
<table width=98% cellpadding=0 cellspacing=0 align=center>
<tr>
<td colspan=2>";
// 이 함수가 바로 최신글을 추출하는 역할을 합니다.
// 사용방법
// latest(스킨, 게시판아이디, 출력라인, 글자수);
// 스킨은 입력하지 않을 경우 운영자 > 환경설정의 최신글 스킨경로를 기본 스킨으로 합니다.
echo latest("basic", $row[bo_table], 5, 50);
echo "</td></tr></table></td>";
}
if ($i > 0 && ($i % $list_mod == 1))
echo "<td width=50% valign=top> </td>";
?>
</td></tr></table>
<?
include_once("./_tail.php");
?>
추천
0
0
댓글 5개
중복자료면 코멘트 남겨 주세요. 삭제하겠습니다.
맨위에 gr_id 를 한번 써주고..
$g4[title] = ""; 이곳에 해당 그룹 id 의 그룹 제목을 자동으로 뽑아왔으면 싶은데.. 혹시 아시면 한수 가르침을...
맨위에 gr_id 를 한번 써주고..
$g4[title] = ""; 이곳에 해당 그룹 id 의 그룹 제목을 자동으로 뽑아왔으면 싶은데.. 혹시 아시면 한수 가르침을...
휴일에도 열심이시네요 ㅎ
감사하게 쓰겠습니다
감사하게 쓰겠습니다
[초보]원하는 그룹 id 별로 최신글 자동으로 추출하기
<? include_once(\"./_common.php\"); include_once(\"$g4[path]/lib/latest.lib.php\"); $g4[title] = \"\"; include_once(\"./_head.php\"); $list_mod = 2; // 한라인에 몇개씩 출력할것인지? ?> <table width=\"100%\" cellpadding=0 cells…
<? include_once(\"./_common.php\"); include_once(\"$g4[path]/lib/latest.lib.php\"); $g4[title] = \"\"; include_once(\"./_head.php\"); $list_mod = 2; // 한라인에 몇개씩 출력할것인지? ?> <table width=\"100%\" cellpadding=0 cells…
좋은 정보 감사합니다~~!
감사합니다.