최근게시물을 그림처럼 하였는데
게시물 출력에 에러가 납니다.
게시물을 3개 출력하려는데
2개밖에 출력안합니다.
(하나는 이미지 내용포함
하나는 리스트)
리스트 출력을 2개로 하려는데..
어느부분을 수정하면 됩니까?
아래는 latest.skin.php 소스입니다.
___________________________________________________________________________________
<?
$image_height = 70; // 높이
$image_width = 60; // 너비
?>
<table width=100% cellpadding=0 cellspacing=0 border=0 style="margin-top:5;">
<? for ($i=0; $i<count($list); $i++) { ?>
<? if ($i==0) { ?>
<tr>
<td>
<? if (!file_exists($list[$i][file_image1])) { ?>
<table cellpadding=0 cellspacing=0 border=0>
<tr>
<td valign="top">
<table cellpadding=1 cellspacing=3 border=0>
<tr>
<td style="padding-left:3">
<a href='<?="./?doc=bbs/board.php&bo_table=$bo_table&wr_id={$list[$i][wr_id]}"?>'><span class=subject><b><?=cut_str($list[$i][subject],50,"...");?></b></span></a> <span style='font-size:11'></span> <span style='font-size:8pt;'><?=$list[$i][commentcnt]?></span> <?=$list[$i][icon_new]?>
</td>
</tr>
<tr>
<td>
<div align="justify" style="margin-right:1; margin-left:1;"><a href='<?="./?doc=bbs/board.php&bo_table=$bo_table&wr_id={$list[$i][wr_id]}"?>'><?=cut_str($list[$i][wr_content],150,"…");?></a></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table width=100% cellpadding=0 cellspacing=0 border=0>
<tr>
<td width="100%" height="1"></td>
</tr>
</table>
<? }else{ ?>
<table cellpadding=0 cellspacing=0 border=0>
<tr>
<td valign="middle" ><p><img src='<?=$list[$i][file_image1]?>' width='<?=$image_width?>' height='<?=$image_height?>' style='border-color:#A5A5A5;' border=0 align=left></p></td>
<td valign="top">
<table cellpadding=1 cellspacing=3 border=0>
<tr>
<td style="padding-left:3">
<a href='<?="./?doc=bbs/board.php&bo_table=$bo_table&wr_id={$list[$i][wr_id]}"?>'><span class=subject><b><?=cut_str($list[$i][subject],50,"...");?></b></span></a> <span style='font-size:11'></span> <span style='font-size:8pt;'><?=$list[$i][commentcnt]?></span> <?=$list[$i][icon_new]?>
</td>
</tr>
<tr>
<td>
<div align="justify" style="margin-right:1; margin-left:1;"><a href='<?="./?doc=bbs/board.php&bo_table=$bo_table&wr_id={$list[$i][wr_id]}"?>'><?=cut_str($list[$i][wr_content],100,"…");?>more</a></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table width=100% cellpadding=0 cellspacing=0 border=0>
<tr>
<td width="100%" height="1"></td>
</tr>
</table>
</td>
</tr>
<?} ?>
<? } else if ($i==1) { ?>
<tr>
<td>
<? if (!file_exists($list[$i][file_image1])) { ?>
<table cellpadding=0 cellspacing=0 border=0>
<tr>
<td valign="top">
<table cellpadding=1 cellspacing=3 border=0>
<tr>
<td style="padding-left:3"> <span class=subject><img src='<?=$latest_skin?>/icon_li.gif' border="0">
<a href='<?="./?doc=bbs/board.php&bo_table=$bo_table&wr_id={$list[$i][wr_id]}"?>'><?=cut_str($list[$i][subject],50,"...");?> </a>
</span> <span style='font-size:11'></span> <span style='font-size:8pt;'><?=$list[$i][commentcnt]?></span> <?=$list[$i][icon_new]?>
</td>
</tr>
<tr>
<td><div align="justify" style="margin-right:1; margin-left:1;"></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table width=100% cellpadding=0 cellspacing=0 border=0>
<tr>
<td width="100%" height="1"></td>
</tr>
</table>
<table width=100% cellpadding=0 cellspacing=0 border=0>
<tr>
<td width="100%" height="1"></td>
</tr>
</table>
</td>
</tr>
<?} ?>
<!--일반게시물-->
<? } else { ?>
<tr> </tr>
<? } ?>
<? } ?>
<? if (count($list) == 0) { echo "<tr><td colspan=3 align=center height=25>자료가 없습니다.</td></tr>"; } ?>
<tr> </tr>
</table>
_________________________________________________________________________________________
감사합니다!
게시물 출력에 에러가 납니다.
게시물을 3개 출력하려는데
2개밖에 출력안합니다.
(하나는 이미지 내용포함
하나는 리스트)
리스트 출력을 2개로 하려는데..
어느부분을 수정하면 됩니까?
아래는 latest.skin.php 소스입니다.
___________________________________________________________________________________
<?
$image_height = 70; // 높이
$image_width = 60; // 너비
?>
<table width=100% cellpadding=0 cellspacing=0 border=0 style="margin-top:5;">
<? for ($i=0; $i<count($list); $i++) { ?>
<? if ($i==0) { ?>
<tr>
<td>
<? if (!file_exists($list[$i][file_image1])) { ?>
<table cellpadding=0 cellspacing=0 border=0>
<tr>
<td valign="top">
<table cellpadding=1 cellspacing=3 border=0>
<tr>
<td style="padding-left:3">
<a href='<?="./?doc=bbs/board.php&bo_table=$bo_table&wr_id={$list[$i][wr_id]}"?>'><span class=subject><b><?=cut_str($list[$i][subject],50,"...");?></b></span></a> <span style='font-size:11'></span> <span style='font-size:8pt;'><?=$list[$i][commentcnt]?></span> <?=$list[$i][icon_new]?>
</td>
</tr>
<tr>
<td>
<div align="justify" style="margin-right:1; margin-left:1;"><a href='<?="./?doc=bbs/board.php&bo_table=$bo_table&wr_id={$list[$i][wr_id]}"?>'><?=cut_str($list[$i][wr_content],150,"…");?></a></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table width=100% cellpadding=0 cellspacing=0 border=0>
<tr>
<td width="100%" height="1"></td>
</tr>
</table>
<? }else{ ?>
<table cellpadding=0 cellspacing=0 border=0>
<tr>
<td valign="middle" ><p><img src='<?=$list[$i][file_image1]?>' width='<?=$image_width?>' height='<?=$image_height?>' style='border-color:#A5A5A5;' border=0 align=left></p></td>
<td valign="top">
<table cellpadding=1 cellspacing=3 border=0>
<tr>
<td style="padding-left:3">
<a href='<?="./?doc=bbs/board.php&bo_table=$bo_table&wr_id={$list[$i][wr_id]}"?>'><span class=subject><b><?=cut_str($list[$i][subject],50,"...");?></b></span></a> <span style='font-size:11'></span> <span style='font-size:8pt;'><?=$list[$i][commentcnt]?></span> <?=$list[$i][icon_new]?>
</td>
</tr>
<tr>
<td>
<div align="justify" style="margin-right:1; margin-left:1;"><a href='<?="./?doc=bbs/board.php&bo_table=$bo_table&wr_id={$list[$i][wr_id]}"?>'><?=cut_str($list[$i][wr_content],100,"…");?>more</a></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table width=100% cellpadding=0 cellspacing=0 border=0>
<tr>
<td width="100%" height="1"></td>
</tr>
</table>
</td>
</tr>
<?} ?>
<? } else if ($i==1) { ?>
<tr>
<td>
<? if (!file_exists($list[$i][file_image1])) { ?>
<table cellpadding=0 cellspacing=0 border=0>
<tr>
<td valign="top">
<table cellpadding=1 cellspacing=3 border=0>
<tr>
<td style="padding-left:3"> <span class=subject><img src='<?=$latest_skin?>/icon_li.gif' border="0">
<a href='<?="./?doc=bbs/board.php&bo_table=$bo_table&wr_id={$list[$i][wr_id]}"?>'><?=cut_str($list[$i][subject],50,"...");?> </a>
</span> <span style='font-size:11'></span> <span style='font-size:8pt;'><?=$list[$i][commentcnt]?></span> <?=$list[$i][icon_new]?>
</td>
</tr>
<tr>
<td><div align="justify" style="margin-right:1; margin-left:1;"></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table width=100% cellpadding=0 cellspacing=0 border=0>
<tr>
<td width="100%" height="1"></td>
</tr>
</table>
<table width=100% cellpadding=0 cellspacing=0 border=0>
<tr>
<td width="100%" height="1"></td>
</tr>
</table>
</td>
</tr>
<?} ?>
<!--일반게시물-->
<? } else { ?>
<tr> </tr>
<? } ?>
<? } ?>
<? if (count($list) == 0) { echo "<tr><td colspan=3 align=center height=25>자료가 없습니다.</td></tr>"; } ?>
<tr> </tr>
</table>
_________________________________________________________________________________________
감사합니다!
첨부파일
댓글을 작성하시려면 로그인이 필요합니다.
댓글 3개
제홈에 와보시면 글제목과 내용표시는 2개까지이고 나머지는 리스트제목만 표시되도록 되어었고 위 팁도 마찬가지입니다.
아니면 님의 질문을 제가 오해 했나요?
$image_height = 60; // 높이
$image_width = 80; // 너비
?>
<table width=98% cellpadding=0 cellspacing=0 border=0>
<? for ($i=0; $i<count($list); $i++) { ?>
<? if ($i==0 || $i == 1) { ?>
<tr>
<td>
<? if (!file_exists($list[$i][file_image1])) { ?>
<table cellpadding=1 cellspacing=3 border=0>
<tr>
<td width="100%" height="30" valign="top"> <a href='<?="./?doc=bbs/gnuboard.php&bo_table=$bo_table&wr_id={$list[$i][wr_id]}"?>'><span class=subject><b><?=cut_str($list[$i][subject],50,"...");?></b></span></a><span style='font-size:10'> [<?=substr($list[$i][date],3,5)?>]</span> <span style='font-size:8pt;'><?=$list[$i][commentcnt]?></span> <?=$list[$i][icon_new]?><div align="justify" style="margin-right:1; margin-left:1;">
<?
//$news_cont=nl2br(stripslashes(cut_str($list[$i][wr_content], 100, '…' )));
$news_cont = stripslashes($list[$i][wr_content]);
$news_cont = ereg_replace("\n","",$news_cont);
$news_cont = cut_str($news_cont, 150, '…' );
echo $news_cont;
?>
</div></td>
</tr>
</table>
<? }else{ ?>
<?
$image_height = 60; // 높이
$image_width = 80; // 너비
?>
<table width=98% cellpadding=0 cellspacing=0 border=0>
<? for ($i=0; $i<count($list); $i++) { ?>
<? if ($i==0 || $i == 1) { ?>
<tr>
<td>
<? if (!file_exists($list[$i][file_image1])) { ?>
<table cellpadding=1 cellspacing=3 border=0>
<tr>
<td width="100%" height="30" valign="top"> <a href='<?="./?doc=bbs/gnuboard.php&bo_table=$bo_table&wr_id={$list[$i][wr_id]}"?>'><span class=subject><b><?=cut_str($list[$i][subject],50,"...");?></b></span></a><span style='font-size:10'> [<?=substr($list[$i][date],3,5)?>]</span> <span style='font-size:8pt;'><?=$list[$i][commentcnt]?></span> <?=$list[$i][icon_new]?><div align="justify" style="margin-right:1; margin-left:1;">
<?
//$news_cont=nl2br(stripslashes(cut_str($list[$i][wr_content], 100, '…' )));
$news_cont = stripslashes($list[$i][wr_content]);
$news_cont = ereg_replace("\n","",$news_cont);
$news_cont = cut_str($news_cont, 150, '…' );
echo $news_cont;
?>
</div></td>
</tr>
</table>
<? }else{ ?>
<table cellpadding=1 cellspacing=3 border=0>
<tr>
<td width="90" valign="middle"><p><img src='<?=$list[$i][file_image1]?>' width='<?=$image_width?>' height='<?=$image_height?>' border=0 align=left></p></td>
<td width="*" valign="top"> <a href='<?="./?doc=bbs/gnuboard.php&bo_table=$bo_table&wr_id={$list[$i][wr_id]}"?>'><span class=subject><b><?=cut_str($list[$i][subject],50,"...");?></b></span></a><span style='font-size:10'> [<?=substr($list[$i][date],3,5)?>]</span> <span style='font-size:8pt;'><?=$list[$i][commentcnt]?></span> <?=$list[$i][icon_new]?><div align="justify" style="margin-right:1; margin-left:1;">
<?
//$news_cont=nl2br(stripslashes(cut_str($list[$i][wr_content], 100, '…' )));
$news_cont = stripslashes($list[$i][wr_content]);
$news_cont = ereg_replace("[ ]+", " ", $news_cont);
$news_cont = ereg_replace("\n","",$news_cont);
$news_cont = cut_str($news_cont, 120, '…' );
echo $news_cont;
?></div></td>
</tr>
</table>
</td>
</tr>
<?} ?>
<tr>
<td width="100%" height="1" colspan="2">
<table width=100% cellpadding=0 cellspacing=0 border=0>
<tr>
<td width="100%" height="1" background='./<?=$latest_skin?>/line_width.gif'></td>
</tr>
</table>
</td>
</tr>
<!--일반게시물-->
<? } else { ?>
<tr>
<td height="20" colspan=2 width="100%" valign="middle"><span style='font-size:10'> [<?=substr($list[$i][date],3,5)?>]</span> <a href='<?="./?doc=bbs/gnuboard.php&bo_table=$bo_table&wr_id={$list[$i][wr_id]}"?>'><?=$list[$i][subject]?></a> <span style='font-size:8pt;'><?=$list[$i][commentcnt]?></span> <?=$list[$i][icon_new]?></td>
</tr>
<tr>
<td width="100%" height="1" colspan="2">
<table width=100% cellpadding=0 cellspacing=0 border=0>
<tr>
<td width="100%" height="1" background='./<?=$latest_skin?>/line_width.gif'></td>
</tr>
</table>
</td>
</tr>
<? } ?>
<? } ?>
<? if (count($list) == 0) { echo "<tr><td colspan=3 align=center height=25>자료가 없습니다.</td></tr>"; } ?>
<tr>
<td width="100%" height="5" colspan="2"></td>
</tr>
</table>