갤러리 가로 이미지 수를 2개로 고정하고 싶습니다.

갤러리 가로 이미지 수를 2개로 고정하고 싶습니다.

QA

갤러리 가로 이미지 수를 2개로 고정하고 싶습니다.

본문


<table width="100%" cellpadding="0" cellspacing="0">
    <tr>
        <td colspan=<?=$colspan?> class="bbs_line2"></td>
    </tr>
    <tr> 
    <? 
    for ($i=0; $i<count($list); $i++) { 
        if ($i && $i%$mod==0)
            echo "</tr><tr>";
        $style = "";
        $subject = "<span $style>{$list[$i][subject]}</span>";
        $comment_cnt = "";
        if ($list[$i][comment_cnt]) 
           $comment_cnt = " <a href=\"{$list[$i][comment_href]}\"><span style='font-size:10px;'><font face='Tahoma' color='#EE5A00'>{$list[$i][comment_cnt]}</span></a>";
        $list[$i][name] = preg_replace("/<img /", "<img style='display:none;' ", $list[$i][name]);
        $list[$i][name] = preg_replace("/> <span/", "><span", $list[$i][name]);
        $list[$i][name] = preg_replace("/class='member'/", "", $list[$i][name]);
        echo "<td width='{$td_width}%' valign=top style='word-break:break-all; padding:8px 0 0 0;'>";
        echo "<table align=center>";
        echo "<tr><td height=15></td></tr>";
        echo "<tr><td align=center><div style='float:left; border:1px solid #ccc; background:#fff; padding:0px; font-size:0; line-height:0;'><a href='{$list[$i][href]}'>".makeThumbs($g4[path]."/data/file/$bo_table", $list[$i][file][0][file], $board[bo_3], $board[bo_4], cut_str($list[$i][subject],20))."</a></div></td></tr>";
        echo "<tr><td align=center class=lh height=26>";
        if ($is_category) echo "<a href='{$list[$i][ca_name_href]}'>[{$list[$i][ca_name]}]</a> ";
        echo "<a href='{$list[$i][href]}'>$subject</a><span class='comment'>{$comment_cnt}</span>";
        echo " " . $list[$i][icon_new];
        //echo " " . $list[$i][icon_file];
        //echo " " . $list[$i][icon_link];
        //echo " " . $list[$i][icon_hot];
        //echo " " . $list[$i][icon_secret];
        echo "</td></tr>";
  //echo "<tr><td align=center style='font-size:11px; color:#888;'>Date.".$list[$i][datetime2]."  <span style='font-size:9px;color:#CCCCCC;'>|</span>  Hit.".$list[$i][wr_hit]."</td></tr>";        
        if ($is_checkbox) echo "<tr><td align=center><input type=checkbox name=chk_wr_id[] value='{$list[$i][wr_id]}'></td></tr>";
        echo "</table></td>\n";
    }
    // 나머지 td
    $cnt = $i%$mod;
    if ($cnt)
        for ($i=$cnt; $i<$mod; $i++)
            echo "<td width='{$td_width}%'> </td>";
    ?>
    </tr>
    <? if (count($list) == 0) { echo "<tr><td colspan='$mod' height=400 align=center>게시물이 없습니다.</td></tr>"; } ?>
 <tr><td colspan='<?=$mod?>' height="25"></td></tr>
    <tr><td colspan=<?=$mod?> class='bbs_line'>
    </table>

 

if문으로 게시판의 설정된 가로 이미지수에의해 테이블이 만들어지는 if문인것 같은데

게시판 설정이 가로이미지수가 2개로 고정을 시키고 싶습니다. 어떻게 수정해야 할까요??

고수님들의 도움 요청합니다.

이 질문에 댓글 쓰기 :

답변 2

답변을 작성하시기 전에 로그인 해주세요.
전체 129,672 | RSS
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1402호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT