최신글 출력형태 변경 정보
최신글 출력형태 변경본문
순위를 추출하는 최신글에서
1등
2등
.
.
.
500등
이렇게 밑으로 500등까지 출력이 되는 소스를
1등 101등 201등 301등
. . . .
. . . .
100등 200등 300등 400등
이런씩으로 100등씩 한줄에 보이고 다음줄로 넘어가서 보이게 할려면 어떻게 해야 할까요?
회원님들의 도움을 부탁 드립니다.
아래는 latest.php입니다.
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<?
for ($i=0; $i<count($list); $i++) {
$j = $i + 1;
$href = "{$list[$i][href]}";
$subject = "<span $href>".cut_str($list[$i][subject],100)."</span>";
$wr_content ="<span $style>".cut_str(strip_tags($list[$i][wr_content]),$la_content)."</span>";
$btn="btn_".($i+1).".png";
$ca="{$list[$i][bo_subject]}";
$good="{$list[$i][wr_good]}";
if ($good>0) {
$good2="<img src= $g4[path]/h2/good.gif> <font color=#ff6600 class=h2wr_good>$good</font>";
}else{
$good2=" ";
}
// 출력
echo <<<HEREDOC
<table width=328 border="0" cellspacing="4" cellpadding="0">
<tr><td>
<table border="0" cellspacing="0" cellpadding="0">
<tr><td height=3><a href='{$href}' onfocus='this.blur()' class=h2subject>{$j}.[$ca] $subject $good2 </td></tr>
<tr><td height=3 class=h2wr_good></td></tr>
<tr><td height=10></td></tr>
</table>
</td></tr></table>
HEREDOC;
}
?><? if (count($list) == 0) { ?>
<div style="height:25px;" align="center"> 게시물이 없습니다.</div>
<? } ?>
댓글 전체
$i."등<br>";
$col = $i%100;
if(!$col) { /// if($col == "0") { 뭐가 맞는지 몰겠네요 ^^
echo "</td><td>";
}
그냥 생각나서요.. 정확한지 몰겠습니다. 테스트 해보시죠...
감사합니다.

if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<table><tr><td> <---------------------------------------추가
<?
for ($i=0; $i<count($list); $i++) {
if ($i!=0&&$i%100==0){ echo "</td><td>"; } <-------------추가
$j = $i + 1;
.
.
.
.
.
?>
</td></tr></table> <---------------------------------------추가
<? if (count($list) == 0) { ?>
<div style="height:25px;" align="center"> 게시물이 없습니다.</div>
<? } ?>
지금 밖이라 바로 적용은 못해보는데요
들어가서 적용해 보도록 하겠습니다.
너무 감사드립니다.^^
공부를 열심해 해야겠습니다.
규정상 한분만 채택해야 하는것이 아쉽네요.
다들 고맙습니다.
좋은 하루 되세요.