특정 게시물에 여분필드($four09)일때 최근 갤러리스킨으로 출력하는법(급) > 그누4 질문답변

그누4 질문답변

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

특정 게시물에 여분필드($four09)일때 최근 갤러리스킨으로 출력하는법(급) 정보

특정 게시물에 여분필드($four09)일때 최근 갤러리스킨으로 출력하는법(급)

본문

오류가 나는곳의 주소를 알려주시면 더 빠르고 정확하게 답변 받을 수 있습니다.

오류 주소 : http://www.suwanjigu.co.kr/bbs/board.php?bo_table=boon1
                (3번째 게시물에 보시면 "급매"라는 아이콘이 있습니다.)

자동차 매물 스킨을 이용합니다.
글등록 write.skin.php에 $four09의 체크박스가 있습니다. 이걸 체크하면 list.list.php(글목록)에
 급매라는 아이콘이 뜹니다.

이것만 최근갤러리 스킨으로 뽑아낼 수 있을까요??



사용중인 메인 최근갤러리 소스 latest.skin.php
==============================================================

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


//전체 파일 불러오기 예{select * from g4_board_file where bo_table = '4_5' and wr_id in (8136, 8135) order by bf_no}
// 위의 예와 같은 형식을 얻기 위해 id 값을 생성한다.
$wr_id_in = "";
for ($i=0; $i<count($list); $i++){
if($i) $wr_id_in .= ", ";
$wr_id_in .= $list[$i]['wr_id'];
}

// 파일 쿼리문
$file_sql = " select * from $g4[board_file_table] where bo_table = '$bo_table' and wr_id in ($wr_id_in) order by bf_no ";
$file_result = sql_query($file_sql);
// 배열생성
$i = 0;
while ($row = sql_fetch_array($file_result))
{
$g4_file[$i] = $row;
$i++;
}
// $list배열에 파일 끼워넣기
for ($i=0; $i<count($list); $i++){
// 게시물별 파일게수 카운팅
$list[$i][file]['count'] = 0;
// 게시물에 속하는 파일 찾기
for ($f=0; $f<count($g4_file); $f++){
// 게시물 id 와 파일 id 비교
if($list[$i]['wr_id'] == $g4_file[$f]['wr_id']){
$no = $g4_file[$f][bf_no];
      $list[$i]['file'][$no]['href'] = "./download.php?bo_table=$bo_table&wr_id=$wr_id&no=$no" . $qstr;
        $list[$i]['file'][$no]['download'] = $g4_file[$f][bf_download];
        $list[$i]['file'][$no]['path'] = "$g4[path]/data/file/$bo_table";
        $list[$i]['file'][$no]['size'] = get_filesize($g4_file[$f][bf_filesize]);
        $list[$i]['file'][$no]['datetime'] = $g4_file[$f][bf_datetime];
        $list[$i]['file'][$no]['source'] = $g4_file[$f][bf_source];
        $list[$i]['file'][$no]['bf_content'] = $g4_file[$f][bf_content];
        $list[$i]['file'][$no]['content'] = get_text($g4_file[$f][bf_content]);
        $list[$i]['file'][$no]['view'] = view_file_link($g4_file[$f][bf_file], $g4_file[$f][bf_width], $g4_file[$f][bf_height], $list[$i][file][$no][content]);
        $list[$i]['file'][$no]['file'] = $g4_file[$f][bf_file];
        $list[$i]['file'][$no]['image_width'] = $g4_file[$f][bf_width] ? $g4_file[$f][bf_width] : 640;
        $list[$i]['file'][$no]['image_height'] = $g4_file[$f][bf_height] ? $g4_file[$f][bf_height] : 480;
        $list[$i]['file'][$no]['image_type'] = $g4_file[$f][bf_type];
        $list[$i]['file']['count']++;
}
}
}

// 이미지 보이기 전체 보이기는 0
$all_view = 1;
// 미리보기 이미지크기
$img_w = 135;
$img_h = 101;
// 넓이로 맞췄을때 높이의 중간지점에서 80%로 복구시킨다.
$Percent = 80;
?>
<style type="text/css">
<!--
.style4 {font-size: 13px}
.style5 {
color: #FF0000;
font-weight: bold;
}
-->
</style>


<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
    <td width=7 height=7><img src="<?=$latest_skin_path?>/img/bg_tl.gif" width=7></td>
    <td background="<?=$latest_skin_path?>/img/bg_t.gif"></td>
    <td width=6><img src="<?=$latest_skin_path?>/img/bg_tr.gif" width=6></td>
</tr>
<tr>
    <td background="<?=$latest_skin_path?>/img/bg_ml.gif"></td>
    <td>


<div style="padding:5px; background-color:#efefef;">
<strong><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><?=$board[bo_subject]?></a></strong>
</div>

<table width=100% border=0 cellpadding=0 cellspacing=0 <?=$options?>>
<tr>
   
       
        <? for ($i=0; $i<count($list); $i++) { ?>
<td width="20%" align=center valign=top>
        <table width=95% border=0 cellpadding=0 cellspacing=0>
        <tr><td height="10"></td></tr>
        <tr>
        <td width="100%" align="center">
            <?
//$list[$i]['file'] = get_file($board['bo_table'], $list[$i]['wr_id']);
for($j=0; $j<$list[$i]['file']['count']; $j++){
if($list[$i][file][$j][image_type]){
// 이미지 출력시 가로세로 사이지를 확인하여 틀에 공백이 않보이게 사이즈를 조절한다.
$size_w = $img_w/($list[$i][file][$j][image_width]/150);
$size_h = $list[$i][file][$j][image_height]/150*$size_w;
if($img_h < $size_h){
  $size[$i] = "width=$img_w";
// 높이의 경우 벗어난 사이즈에서 $Percent만큼 복구 시킨다.
$position_top = ($img_h-$size_h)/2+($Percent*($size_h-$img_h)/200);
$position_left = 0;
}else{
  $size[$i] = "height=$img_h";
$size_h = $img_h/($list[$i][file][$j][image_height]/150);
$size_w = $list[$i][file][$j][image_width]/150*$size_h;
$position_top = 0;
$position_left = ($img_w-$size_w)/2;
}
?>
    <table width="<?=$img_w+6?>" border="0" cellpadding="2" cellspacing="1" bgcolor="#CCCCCC">
  <tr>
    <td align="center" valign="middle" bgcolor="#FFFFFF"><nobr style='display:block; overflow:hidden; width:<?=$img_w?>px; height:<?=$img_h?>px; vertical-align:middle;'><img src="<?=$list[$i][file][$j][path]."/".urlencode($list[$i][file][$j][file])?>" <?=$size[$i]?> border="0" style="cursor:pointer; position:relative; top:<?=$position_top?>; left:<?=$position_left?>",<?=$list[$i][file][$j][image_width]?>, <?=$list[$i][file][$j][image_height]?> /></nobr></td>
  </tr>
</table>
<?
if($all_view)
break;
}
}
?>
        </td>
        </tr>
        <tr>
            <td height=30 align="center"><div align="center">
              <table width="140" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td height="20"><div align="center"><strong>
                    <?
                echo $list[$i]['icon_reply'] . " ";
                echo "<a href='{$list[$i]['href']}'>";
                echo $list[$i]['subject'];
                echo "</a>";

                if ($list[$i]['comment_cnt'])
                    echo " <a href=\"{$list[$i]['comment_href']}\"><span style='font-size:10px; color:#FF6600;'>{$list[$i]['comment_cnt']}</span></a>";

                // if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
                // if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }

                //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'];
                ?>
                  </strong></div></td>
                </tr>
                <tr>
                  <td height="20"><div align="center" class="style4 ">해당층 :
                      <span class="style4">
                      <strong><?
                echo $list[$i]['icon_reply'] . " ";
                echo "<a href='{$list[$i]['href']}'>";
                echo $list[$i]['wr_link1'];
                echo "</a>";
                // if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
                // if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }

                //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'];
                ?>층</strong></span></div></td>
                </tr>
                <tr>
                  <td height="20"><div align="center" class="style4">전용면적 :
                        <strong><?
                echo $list[$i]['icon_reply'] . " ";
                echo "<a href='{$list[$i]['href']}'>";
                echo $list[$i]['wr_12'];
                echo "</a>";
                // if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
                // if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }

                //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'];
                ?>㎡</strong>
                  </div></td>
                </tr>
                <tr>
                  <td height="20"><div align="center"><span class="style4"><span class="style5">매매가 :</span>                   
  <strong><font color="#FF0000"><?
                echo $list[$i]['icon_reply'] . " ";
                echo "<a href='{$list[$i]['href']}'>";
                echo $list[$i]['wr_5'];
                echo "</a>";

                // if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
                // if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }

                //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'];
                ?></font>만원</strong></span></div></td>
                </tr>
              </table>
              <strong><br />
              <br />
              </strong></div></td>
        </tr>
        </table>
    </td>
        <?
if(($i+1)%5 == 0)
echo  " </tr><tr>";
}

if(!count($list)){
?>
        <td align=center valign=top>
        <table width=95% border=0 cellpadding=0 cellspacing=0>
        <tr>
            <td height=50 align="center" >
                등록되어진 게시물이 없습니다.           
            </td>
        </tr>
        </table>
        </td>
        <? } ?>
   

</tr>

</table>


    </td>
    <td background="<?=$latest_skin_path?>/img/bg_mr.gif"></td>
</tr>
<tr>
    <td height=7><img src="<?=$latest_skin_path?>/img/bg_bl.gif" width=7></td>
    <td background="<?=$latest_skin_path?>/img/bg_b.gif"></td>
    <td><img src="<?=$latest_skin_path?>/img/bg_br.gif" width=6></td>
</tr>
</table>

==========================================================================

댓글 전체

전체 66,554 |RSS
그누4 질문답변 내용 검색

회원로그인

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