3줄 간격으로 도트를 넣고 싶은데요 테이블이 깨집니다 좀 알려주세요 > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

3줄 간격으로 도트를 넣고 싶은데요 테이블이 깨집니다 좀 알려주세요 정보

3줄 간격으로 도트를 넣고 싶은데요 테이블이 깨집니다 좀 알려주세요

본문

알려주신데로 4일째 계속하구 있는데요
계속해서 테이블이 깨지고 있네요..
면목 없지만 다시 좀 알려주세요

<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>

<table width=100% cellpadding=0 cellspacing=0 border=0>

<? for ($i=0; $i<count($list); $i++) { ?>
<tr>
    <td align=center>
        <table width=99% cellpadding=0 cellspacing=0 border=0>
<colgroup>
<colgroup width='70'>
        <tr>
            <td height=24 style='padding-top:3px;padding-left:5px;'> <img src='<?=$latest_skin_path?>/img/latest_icon.gif' align=absmiddle>&nbsp;
<?
    $style = "font-family:돋움; font-size:9pt; color:#252525;";
    if ($list[$i][icon_new])
    $style = " style='font-family:돋움; font-size:9pt; color:#252525;' ";
$subject = "<span $style>".cut_str($list[$i][subject],85)."</span>"; //제목 글자수 자르기

echo $list[$i][icon_reply] . " ";
        echo "<a href='{$list[$i][href]}' title='{$list[$i][subject]}'><font style='font-family:돋움; font-size:9pt; color:#252525;'>{$subject}</font></a>";

if ($list[$i][comment_cnt])
            //echo " <span class=mw_basic_list_comment_count>{$list[$i][comment_cnt]}</span>";
            //echo " <a href=\"{$list[$i][comment_href]}\" class=mw_basic_list_comment_count>{$list[$i][comment_cnt]}</a>";
            echo " <a href=\"{$list[$i][comment_href]}\" class=mw_basic_list_comment_count><font style='font-family:돋움; font-size:9pt; background-color:#e8e8e8; color:#202e96; '>(+{$list[$i][wr_comment]})</font></a>";

echo " " . $list[$i][icon_new];
if ($list[$i][icon_file])
echo "<img src='{$latest_skin_path}/img/icon_file.png' />";

if ($list[$i][icon_link])
echo "<img src='{$latest_skin_path}/img/icon_link.png' />";

if ($list[$i][icon_hot])
echo "<img src='{$latest_skin_path}/img/icon_hot.png' />";
        ?>
</td>
<td align='right' style='padding-top:3px;padding-right:3px;'><span style='font-size:9pt; color:#313131;'><?=$list[$i][datetime2]?></span></td></tr>
        <tr><td height=1 colspan=2 background='<?=$latest_skin_path?>/img/dot.gif'></td></tr>
        </table></td>
</tr>
<? } ?>

<? if (count($list) == 0) { ?><tr><td align=center height=100><font color=#6A6A6A>게시물이 없습니다.</a></td></tr><? } ?>
<td colspan='1' bgcolor='#f8f8f8'>
</table>
  • 복사

댓글 전체

if 문이 아예안보이는데요 ??

3줄 간격으로 도트를 넣으시려면 if 문으로 for 문안에 제어를 하셔야 합니다

위소스에서 for 로 반복하는 구간중

필요한 부분에 if($i % 3 ==0){
 "도트"
}
와 같이 if 문으로 제어를 하셔야 한단 얘기입니다.

위 소스에서는 if 문으로 도트를 나오게하는 부분이 없네요
항상 관심 깊게 봐주시는 넓은 마인드님

그리고 ohora (오호라) 님 감사합니다.

오호라님이 알려주신데로 적용을 하니 잘 적용이 되고 있네요...

정말 감사 드리구요 즐거운 주말 보내세요...
혹시 첫번째 글 전에 나오는 라인을 출력하지 않으려면 어떻게 해야한는지 글 보시면
좀 알려주세요 다른건 적용이 잘 됩니다.

<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>


<table width=100% cellpadding=0 cellspacing=0 border=0>

<? for ($i=0; $i<count($list); $i++) { ?>
<tr>
    <td align=center>
        <table width=99% cellpadding=0 cellspacing=0 border=0>
<colgroup>

<?php
if($i%3 == 0){
?>
  <tr><td height=1 colspan=2  background='<?=$latest_skin_path?>/img/dot.gif'></td></tr>
<?php } ?>

<colgroup width='70'>
        <tr>
            <td height=25 style='padding-top:3px;padding-left:-20px;'> <img src='<?=$latest_skin_path?>/img/latest_icon.gif' align=absmiddle>&nbsp;
<?
    $style = "font-family:돋움; font-size:9pt; color:#252525;";
    if ($list[$i][icon_new])
    $style = " style='font-family:돋움; font-size:9pt; color:#252525;' ";
$subject = "<span $style>".cut_str($list[$i][subject],85)."</span>"; //제목 글자수 자르기

echo $list[$i][icon_reply] . " ";
        echo "<a href='{$list[$i][href]}' title='{$list[$i][subject]}'><font style='font-family:돋움; font-size:9pt; color:#252525;'>{$subject}</font></a>";

if ($list[$i][comment_cnt])
            //echo " <span class=mw_basic_list_comment_count>{$list[$i][comment_cnt]}</span>";
            //echo " <a href=\"{$list[$i][comment_href]}\" class=mw_basic_list_comment_count>{$list[$i][comment_cnt]}</a>";
            echo " <a href=\"{$list[$i][comment_href]}\" class=mw_basic_list_comment_count><font style='font-family:돋움; font-size:9pt; background-color:#e8e8e8; color:#202e96; '>(+{$list[$i][wr_comment]})</font></a>";

echo " " . $list[$i][icon_new];
if ($list[$i][icon_file])
echo "<img src='{$latest_skin_path}/img/icon_file.png' />";

if ($list[$i][icon_link])
echo "<img src='{$latest_skin_path}/img/icon_link.png' />";

if ($list[$i][icon_hot])
echo "<img src='{$latest_skin_path}/img/icon_hot.png' />";
        ?>
</td>
<td align='right' style='padding-top:3px;padding-right:3px;'><span style='font-size:9pt; color:#313131;'><?=$list[$i][datetime2]?></span></td></tr>
       
        </table></td>
</tr>
<? } ?>

<? if (count($list) == 0) { ?><tr><td align=center height=100><font color=#6A6A6A>게시물이 없습니다.</a></td></tr><? } ?>
<td colspan='1' bgcolor='#f8f8f8'>
</table>
넓은마인드님 알려주신데로 하니 딱 적용이 됩니다..;;

채택도 못해 드렸는데 이렇게 답변 주셔서 정말 감사합니다.

이렇게 답변 주셔서 말끔하게 마무리 할 수 있었습니다.

다시 한번 감사드리며 주말 잘 보내세요.. 감사합니다.
© SIRSOFT
현재 페이지 제일 처음으로