이소스좀 보아주세요. > 그누3질답

그누3질답

이소스좀 보아주세요. 정보

그누보드 이소스좀 보아주세요.

본문

아래의 소스는 스킨자료실에 올려져있는 최신글소스입니다.
위는 이 소스가 적용된 홈의 결과물입니다.
도상훈님 말씀하신 것을 내맘대로 쑤셔넣었는데 그래도 돌아갑니다.

고수님들께서 문법이 맞는지 한번 봐주세요.
특히 그림화일이 있는 경우와 없는 경우가 바뀌는 것 같습니다.
그래도 이렇게 해야만 돌아가더군요...

-------------- 아래 ---------------
<?
$image_height = 75; // 높이
$image_width  = 100; // 너비
?>

<table width=100% cellpadding=0 cellspacing=0 border=0>
<? for ($i=0; $i<count($list); $i++) { ?>
<? if ($i==0) { ?>
  <tr>
      <td>
<? if (!file_exists($list[$i][file_image1])) { ?>
        <table cellpadding=1 cellspacing=3 border=0>
            <tr>
              <td width="80%" 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>&nbsp;<span style='font-size:11'><?=$list[$i][date]?></span> <span style='font-size:8pt;'><?=$list[$i][commentcnt]?></span> <?=$list[$i][icon_new]?><div align="justify" style="margin-right:1; margin-left:1;"><?=cut_str($list[$i][

wr_content],270,"…");?></div></td>
          </tr>
        </table>
        <table width=100% cellpadding=0 cellspacing=0 border=0>
          <tr>
              <td width="100%" height="1" background='./<?=$latest_skin?>/line_width.gif'></td>
          </tr>
        </table>
<? }else{ ?>
        <table cellpadding=1 cellspacing=3 border=0>
          <tr>
              <td width="200" height="50" valign="middle" ><p><img src='<?=$list[$i][file_image1]?>' width='<?=$image_width?>' height='<?=$image_height?>' border=0 align=left></p></td>
              <td width="80%" 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>&nbsp;<span style='font-size:11'><?=$list[$i][date]?></span> <span style='font-size:8pt;'><?=$list[$i][commentcnt]?></span> <?=$list[$i][icon_new]?><div align="justify" style="margin-right:1; margin-left:1;"><?=cut_str($list[$i][

wr_content],185,"…");?></div></td>
          </tr>
        </table>
        <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 if ($i==1) { ?>
 
  <tr>
      <td>
<? if (!file_exists($list[$i][file_image1])) { ?>
        <table cellpadding=1 cellspacing=3 border=0>
            <tr>
              <td width="80%" 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>&nbsp;<span style='font-size:11'><?=$list[$i][date]?></span> <span style='font-size:8pt;'><?=$list[$i][commentcnt]?></span> <?=$list[$i][icon_new]?><div align="justify" style="margin-right:1; margin-left:1;"><?=cut_str($list[$i][

wr_content],270,"…");?></div></td>
          </tr>
        </table>
        <table width=100% cellpadding=0 cellspacing=0 border=0>
          <tr>
            <td width="100%" height="1" background='./<?=$latest_skin?>/line_width.gif'></td>
          </tr>
        </table>
<? }else{ ?>
      <table cellpadding=1 cellspacing=3 border=0>
          <tr>
            <td width="200" height="50" valign="middle" ><p><img src='<?=$list[$i][file_image1]?>' width='<?=$image_width?>' height='<?=$image_height?>' border=0 align=left></p></td>
            <td width="80%" 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>&nbsp;<span style='font-size:11'><?=$list[$i][date]?></span> <span style='font-size:8pt;'><?=$list[$i][commentcnt]?></span> <?=$list[$i][icon_new]?><div align="justify" style="margin-right:1; margin-left:1;"><?=cut_str($list[$i][

wr_content],185,"…");?></div></td>
          </tr>
      </table>
        <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%">
        <table>
            <tr>
              <td height="20" width="260" valign="middle">&nbsp; <img src='<?=$latest_skin?>/icon_li.gif'>&nbsp;&nbsp;  <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>
              <td>
<span style='font-size:11'><?=$list[$i][date]?></span>
              </td>
            </tr>
        </table>
        <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>
  • 복사

댓글 전체

© SIRSOFT
현재 페이지 제일 처음으로