최신이미지에서 이미지 배열에 관한 질문입니다. > 그누3질답

그누3질답

최신이미지에서 이미지 배열에 관한 질문입니다. 정보

그누보드 최신이미지에서 이미지 배열에 관한 질문입니다.

본문

아래 latest.skin.php 소스로 출력하면
가로로 4개의 이미지가 나오죠...
▒    ▒    ▒    ▒  --> 이렇게요..
근데 이렇게 할 수는 없나요?
▒    ▒    ▒    ▒
▒    ▒    ▒    ▒  ---> 이렇게요... 그러니까 최신이미지가 총 8개죠, 위에 네개 밑에 네개 이런식으로요..

인클루드로 불러올시 <?=latest('syd',main5_g, 8, 28);?> 이렇게 하니까 가로로 8개가 좌악 나와서
테이블이 다 깨지는 군요....
그냥 html에서 <br> 하면 다음줄로 넘어가는데 php에서 어떻게 하면
▒    ▒
▒    ▒
▒    ▒ ----> 이런식 등등으로 응용할수 있는지 알려주시면 더욱 감사하겠습니다...

아래소스는 최신이미지 latest.skin.php 소스입니다...
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
<table width="100%" cellpadding=0 cellspacing=0  bgcolor=#999999 align="center">
    <tr>
        <td bordercolorlight="white" bgcolor="white">
            <p></p>
            <table width=100% cellpadding=0 cellspacing=0 bgcolor=#FFFFFF>
                <tr>
                    <td height=1 background='<?=$latest_skin?>/image/line.gif'></td>
                </tr>
            </table>

<table width=100% align=center cellpadding="0" cellspacing="0">
                <tr>
                    <td width=3><img src='<?=$latest_skin?>/latest_01.gif' width=4 height=25></td>
                    <td height=22 style="font-family:돋움; font-size:12px; color:rgb(98,100,105);" background='<?=$latest_skin?>/latest_center.gif'>&nbsp;<b><?=$bo_subject?></b>  </td>
                    <td align=right background='<?=$latest_skin?>/latest_center.gif'><a href='./?doc=bbs/gnuboard.php&bo_table=<?=$bo_table?>'><img src='<?=$latest_skin?>/icon_more.gif' border=0 width=43 height=11 align=absmiddle></a>&nbsp;</td>
                    <td width=3><img src='<?=$latest_skin?>/latest_02.gif' width=4 height=25></td>
                </tr>
</table>
            <table width=100% cellpadding=0 cellspacing=0 bgcolor=#FFFFFF>
                <tr height=22 align=left>
                    <?
//리스트 출력부분입니다.
$file = "./data/file/$bo_table/";

for ($k=1; $k<=$cfg[file_count]; $k++) {
if (@preg_match($cfg[image_extension], $row[wr_file1])) {
        $list[$i][file_image1] = $file . $row[wr_file1];
    }
}
?>
<? for ($i=0; $i<count($list); $i++) { ?>
                    <td align=left>

                        <table width=100% cellpadding=0 cellspacing=0 border=0>
                            <tr>
                                <td width="2" background='<?=$latest_skin?>/image/gallery_left.gif' height="100"></td>
                                <td align=center valign=top height="100" style="line-height:15px; margin-top:0; margin-bottom:0;">

                                    <p>
</p>
                                    <table border="0" cellpadding="0" cellspacing="0" width="117">
                                        <tr>
                                            <td width="117" background=<?=$latest_skin?>/bg.gif" height="95" align="center">                                               
                                                <p><a href='<?="./?doc=$cfg[bbs_dir]/gnuboard.php&bo_table=$bo_table&wr_id={$list[$i][wr_id]}"?>'><img src='<?=$list[$i][file_image1]?>' width="105" height="80" border="0"></a></p>
                                            </td>
                                        </tr>
                                    </table>


                                </td>
<td width=7 background='<?=$latest_skin?>/image/gallery_right.gif' height="100"></td>
                            </tr>
                            <tr>
                                <td width="2" height=7 background='<?=$latest_skin?>/image/gallery_bl.gif'></td>
                                <td background='<?=$latest_skin?>/image/gallery_bm.gif' width="943"></td>
                                <td width=7 height=7 background='<?=$latest_skin?>/image/gallery_br.gif'></td>
                            </tr>
                        </table>


                    </td>
<? } ?>
<? if (count($list) == 0) { echo "<tr><td colspan=3 align=center height=50>자료가 없습니다.</td></tr>"; } ?><?
// 풋더부분이죠
?>
                </tr>
            </table>


        </td>
    </tr>
</table>
  • 복사

댓글 전체

앗~~ 감사합니다....칠쟁이님...........^^
게으른 자는 동냥도 못한다고 했는데 제가 그짝인가 봅니다....
훌륭한 그누보드를 응용조차 하지 못하니 말입니다......
한마디로 줘도 못먹으니...................^^ 어쩌겠습니다.... 이렇게 다른 동냥으로나마 때워야지요.....^^
칠쟁이님 동냥 감사합니다..........^^

ps: 요사이 뭔 작업 하고 있으면 얼마나 좋겠습니까........ 0,.o;;.....
<?

$mod = 3;  // 요기서 한행당 몇개씩 정하시고 <?=latest('syd',main5_g, 8, 28);?> 불러 주세요

$image_width  = 50; // 이미지 폭

$image_height = 40; // 이미지 높이

?>



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

<tr>

<? for ($i=0; $i<count($list); $i++) { ?>

    <?

    if (!file_exists($list[$i][file_image1])) { $list[$i][file_image1] = "$latest_skin/noimage.gif"; }

    if ($i>0 && $i%$mod==0) { echo "</tr><tr>"; }

    ?>

        <td valign=top align=center>

            <table cellpadding=4>

            <tr>

                <td><a href='<?=$list[$i][href]?>'><img src='<?=$list[$i][file_image1]?>' width='<?=$image_width?>' height='<?=$image_height?>' border=1 alt='<?=$list[$i][wr_subject]?>' style='border-color:#555555;'></a></td>

            </tr>

            <tr>

                <td align=center><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><?=$list[$i][commentcnt]?>&nbsp;<?=$list[$i][icon_new]?></td>

            </tr>

            </table>

        </td>

<? } ?>



<?

// td(열)의 나머지 갯수를 구한후 빈 td(열)을 출력한다.

$nam = ($i%$mod);

for ($k=$nam; $k<$mod && $nam; $k++) {

    echo "<td>&nbsp;</td>";

}

?>



<? if (count($list) == 0) { echo "<td colspan=$mod align=center>게시물이 없습니다.</td>"; } ?>

</tr>

</table>
==============================>
요것으로 응용 하세요^^
요사이 뭔 작업 하시나 본데요..하하
© SIRSOFT
현재 페이지 제일 처음으로