최근갤러리 추출부분...도와주세요~ 정보
최근갤러리 추출부분...도와주세요~본문
오류가 나는곳의 주소를 알려주시면 더 빠르고 정확하게 답변 받을 수 있습니다.
오류 주소 : http://navstudio.cafe24.com/kiyoung/
위의 오류주소 클릭하시면
메인부분에 나오는 '사업개요'부분에 3개의 최근게시물이 추출되게 해놓았는데...
제가 원하는 그림은 새로운 갤러리를 업데이트 했을때 그 최신게시물들이 추출되어야 하는데...
지금 똑같은 내용이 3개가 추출이 되서...
어떻게 바꿔야 하는지...도와주세요~
소스는 아래와 같습니다.
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<table width=100% cellpadding=0 cellspacing=0 style="table-layout: fixed;">
<tr>
<td align=center>
<table width=98% border=0>
<tr>
<?
for ($i=0; $i<count($list); $i++)
{
if ($i > 0)
echo '<td width=20> </td>';
$title = get_text($list[$i][wr_subject]);
$content = cut_str(get_text($list[$i][wr_content]), 80);
$img = "$g4[path]/data/file/$bo_table/".urlencode($list[$i][file][0][file]);
if (!file_exists($img) || !$list[$i][file][0][file])
$img = "$latest_skin_path/img/no_image.gif";
$href = "$g4[bbs_path]/board.php?bo_table=$bo_table";
echo <<<HEREDOC
<td valign='top' align='center'>
<table width='100%' border='0' cellpadding='0' cellspacing='0' align='center'>
<tr>
<td align='center' height='70' style='padding:0 8 0 0;'><a href='$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}'><img src='{$img}' width='83' height='70' border='0' align='absmiddle' title='$title'></a></td>
<td width='1'><img src="./img/bar1_dot.gif"></td>
<td width='110' align='center' height='70'><a href='$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}'><img src='{$img}' width='83' height='70' border='0' align='absmiddle' title='$title'></a></td>
<td width="1"><img src="./img/bar1_dot.gif"></td>
<td align='center' height='70' style='padding:0 0 0 5;'><a href='$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}'><img src='{$img}' width='83' height='70' border='0' align='absmiddle' title='$title'></a></td>
</tr>
</table>
</td>
HEREDOC;
}
?>
</tr></table>
<? if (count($list) == 0) { ?><tr><td colspan=4 align=center height=50><font color=#6A6A6A>게시물이 없습니다.</a></td></tr><? } ?>
</tr>
</td>
</table>
오류 주소 : http://navstudio.cafe24.com/kiyoung/
위의 오류주소 클릭하시면
메인부분에 나오는 '사업개요'부분에 3개의 최근게시물이 추출되게 해놓았는데...
제가 원하는 그림은 새로운 갤러리를 업데이트 했을때 그 최신게시물들이 추출되어야 하는데...
지금 똑같은 내용이 3개가 추출이 되서...
어떻게 바꿔야 하는지...도와주세요~
소스는 아래와 같습니다.
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<table width=100% cellpadding=0 cellspacing=0 style="table-layout: fixed;">
<tr>
<td align=center>
<table width=98% border=0>
<tr>
<?
for ($i=0; $i<count($list); $i++)
{
if ($i > 0)
echo '<td width=20> </td>';
$title = get_text($list[$i][wr_subject]);
$content = cut_str(get_text($list[$i][wr_content]), 80);
$img = "$g4[path]/data/file/$bo_table/".urlencode($list[$i][file][0][file]);
if (!file_exists($img) || !$list[$i][file][0][file])
$img = "$latest_skin_path/img/no_image.gif";
$href = "$g4[bbs_path]/board.php?bo_table=$bo_table";
echo <<<HEREDOC
<td valign='top' align='center'>
<table width='100%' border='0' cellpadding='0' cellspacing='0' align='center'>
<tr>
<td align='center' height='70' style='padding:0 8 0 0;'><a href='$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}'><img src='{$img}' width='83' height='70' border='0' align='absmiddle' title='$title'></a></td>
<td width='1'><img src="./img/bar1_dot.gif"></td>
<td width='110' align='center' height='70'><a href='$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}'><img src='{$img}' width='83' height='70' border='0' align='absmiddle' title='$title'></a></td>
<td width="1"><img src="./img/bar1_dot.gif"></td>
<td align='center' height='70' style='padding:0 0 0 5;'><a href='$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}'><img src='{$img}' width='83' height='70' border='0' align='absmiddle' title='$title'></a></td>
</tr>
</table>
</td>
HEREDOC;
}
?>
</tr></table>
<? if (count($list) == 0) { ?><tr><td colspan=4 align=center height=50><font color=#6A6A6A>게시물이 없습니다.</a></td></tr><? } ?>
</tr>
</td>
</table>
댓글 전체

latest()를 호출해서 나온 출력이 아닌 거 같습니다.
해결할수 있는 방법이 없는건가요?

index.php 내용(latest 호출 부분)은 어떤가요?
다른 프로그래머분이 도움을 주셔서 해결했습니다~
index.php 의 호출부분이 1로 되있어서 출력이 똑같은걸로 나왔던거 같습니다~
<?=latest("gallery", gallery, 1, 2);?>를 <?=latest("gallery", gallery,3, 2);?>
으로 수정하니 출력이 되더군요~ㅎㅎ
그누보드사이트 정말 좋네요...
처음 php를 접하는 저에게 큰 도움을 얻는것 같네요^^
참 친절하시고 좋은분들도 많구요~
index.php 의 호출부분이 1로 되있어서 출력이 똑같은걸로 나왔던거 같습니다~
<?=latest("gallery", gallery, 1, 2);?>를 <?=latest("gallery", gallery,3, 2);?>
으로 수정하니 출력이 되더군요~ㅎㅎ
그누보드사이트 정말 좋네요...
처음 php를 접하는 저에게 큰 도움을 얻는것 같네요^^
참 친절하시고 좋은분들도 많구요~