최근게시물 여분필드 표시.. > 그누4 질문답변

그누4 질문답변

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

최근게시물 여분필드 표시.. 정보

최근게시물 여분필드 표시..

본문

최근게시물에서 여분필드를 뽑이오는데
잘 않되 여쭙니다.

아래 소스에서

".number_format($list[$i][wr_2])." 는 잘 표시되는데
".number_format($list[$i][wr_8])." 는 표시가 않되네요.....

홈페이지는 www.100y.kr입니다.
메인페이지 "실 17평"은 wr_2 구요 바로옆 "0"은 wr_8입니다.

초짜가 하루를 소비하고 고수님께 도움을 청합니다.....부디~~~


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

$cols  = 5; //  이미지 가로갯수 //  이미지 세로 갯수는 메인에서 지정(총 이미지 수)
$image_h  = 10; // 이미지 상하 간격

$col_width = (int)(99 / $cols);

$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb';

?>

<table width="750" border=0 align="center" cellpadding=0 cellspacing=0>
  <tr>
    <td width="5" height="5"><img src="<?=$latest_skin_path?>/img/box01_tl.gif" width="5" height="5"></td>
    <td background="<?=$latest_skin_path?>/img/box01_top.gif"></td>
    <td width="5" height="5"><img src="<?=$latest_skin_path?>/img/box01_tr.gif" width="5" height="5"></td>
  </tr>
  <tr>
    <td background="<?=$latest_skin_path?>/img/box01_left.gif"></td>
    <td valign="top" ><table width="100%" border="0" cellspacing="0" cellpadding="0" >
        <tr>
          <td valign="top" style="padding-bottom:5px"><table width="100%" height="22" border="0" cellpadding="0" cellspacing="0" >
              <tr>
                <td><img src="<?=$latest_skin_path?>/img/box_bullet12.gif" width="9" height="9" align="absmiddle">
                  <strong><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><?=$board[bo_subject]?></a></strong></td>
                <td width="47" align="right"><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><img src="<?=$latest_skin_path?>/img/box01_more.gif" width="47" height="13" border="0"></a></td>
              </tr>
            </table></td>
        </tr>
<tr><td height=1 bgcolor=#dddddd></td></tr>
<tr><td height='7'></td></tr>
        <tr>
          <td valign="top">
 
 
<!-- 제품리스트시작 -->
<table width="180" border="0" align="center" cellspacing="0" cellpadding="0">

<tr>
<td align='center'>
<table width="100%" align="center" border="0" cellspacing="0" cellpadding="0">
  <tr>

<? for ($i=0; $i<count($list); $i++) {
$wr_9 = ($list[$i][wr_9]);

  if ($i>0 && $i%$cols==0) { echo "</tr><tr><td colspan='$cols' height='$image_h'></td></tr><tr>"; }
?>

<td width="<?=$col_width?>%" align="center" valign='top'>

<?
$image = $list[$i][file][0][file]; //원본
$img=$data_path. "/".$image;  //썸네일이 없을경우 원본출력
$thumb = $thumb_path. "/". $list[$i][wr_id];
            if($wr_9=="on") $wr_9 = "<a href='{$list[$i]['href']}'><img src='{$board_skin_path}/img/icon_on.gif' border='0' width='47' height='16' align='absmiddle'>";
else if($wr_9 == "off") $wr_9 = "<a href='{$list[$i]['href']}'><img src='{$board_skin_path}/img/icon_off.gif' border='0' width='47' height='16' align='absmiddle'>";

  if ( file_exists($thumb) )
$img = $thumb;
 
$style = "font-family:돋움; font-size:9pt; color:#636363;";
if ($list[$i][icon_new])
$style = "style='font-family:돋움; font-size:9pt; color:#006F00;' ";
$subject = "<span $style>".$list[$i]['subject']."</span>"; //제목 글자수 자르기

$bg = "";  //새글?
if ($list[$i][icon_new])
$bg="la_top_2.gif";
else
$bg="la_top_1.gif";

echo $list[$i][icon_reply] . " ";
              echo "<table width='145'>";
              echo "<tr><td>";
echo "<table width='140' cellpadding='0' cellspacing='0' border='0'>";
echo " <tr><td valign='top' align='center'><table cellpadding='1' cellspacing='1' bgcolor='#CCCCCC'><tr><td bgcolor='white'><a href='{$list[$i]['href']}'><img src='$img' width='140' height='103' border='0'></a></td></tr></table></td></tr>";
echo "    <tr><td height='5'></td></tr>";

echo "    <tr><td height='20' align='left'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>{$list[$i][ca_name]}</b>{$list[$i]['icon_new']}&nbsp;";
if ($list[$i][is_notice])
              echo "<img src=\"$board_skin_path/img/icon5.gif\" width=32 height=14>";
echo "</td></tr>";


echo "    <tr><td  height='18' align='left' valign='top'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='{$list[$i]['href']}'>실 ".number_format($list[$i][wr_2])."평 ".number_format($list[$i][wr_8])."</td></tr>";


echo "    <tr ><td  height='18' align='left' valign='top'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='{$list[$i]['href']}'><img src='http://100y.kr/img/bu_01.gif' width='24' height='14' align='absmiddle' border=0> ".number_format($list[$i][wr_4])." 만원</td></tr>";
              echo "    <tr ><td  height='18' align='left' valign='top'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='{$list[$i]['href']}'><img src='http://100y.kr/img/bu_02.gif' width='24' height='14' align='absmiddle' border=0><font color='red'> ".number_format($list[$i][wr_10])." 만원</font></td></tr>";
echo " </table>";
    echo "</td></tr></table>";
?>


</td>
<? } ?>

<?
$cnt = ($i%$cols);
for ($k=$cnt; $k<$cols && $cnt; $k++) {
echo "<td width=$col_width%>&nbsp;</td>";
}
?>

  <? if (count($list) == 0) { echo "<td height=80 align=center>상품이 등록 준비중입니다.</td>"; } ?>
  </tr>
</table></td>
</tr>
</table>
<!-- 제품리스트끝 -->
 
  </td>
               

</td>
        </tr>
      </table></td>
    <td background="<?=$latest_skin_path?>/img/box01_right.gif"></td>
  </tr>
  <tr>
    <td width="5" height="5"><img src="<?=$latest_skin_path?>/img/box01_bl.gif" width="5" height="5"></td>
    <td background="<?=$latest_skin_path?>/img/box01_bottom.gif"></td>
    <td width="5" height="5"><img src="<?=$latest_skin_path?>/img/box01_br.gif" width="5" height="5"></td>
  </tr>
  <tr><td height=10></td></tr>
</table>


<script language="javascript">
function popupImage(imageURL){
imageHandle=open("","popupForImage","toolbar=no,location=no,status=no,manubar=no,scrollbars=no,resizable=no,width=100,height=100,top=0,left=0");
  imageHandle.document.write("<title>  </title>");
  imageHandle.document.write("<style>");
  imageHandle.document.write("*{margin:0;padding:0;border:0;}");
  imageHandle.document.write("</style>");
  imageHandle.document.write("<img src=\""+imageURL+"\" onload=\"window.resizeTo(this.width+6,this.height+55);\" onclick=\"self.close();\" style=\"cursor:hand;\" title=\"클릭하면 닫힙니다.\">");
}
</script>

댓글 전체

wr_8의 값이 저장이 제대로 됐는지 DB를 먼저 살펴봐야 할듯합니다.
우선 wr_8의 number_format()을 빼고 문자열로 출력해보는것도 좋겠네요. 그렇게 해도 아무것도 안나온다면 저장루틴을 살펴봐야게지요..
문자열로 출력하면 나오는데 number_format()하면 '0'이 찍힌다는건 우선은 wr_8의 첫번째 문자가 숫자가 아닌 문자일 겁니다. 저장하실때 값을 숫자로 잘 입력되는지 확인해보셔야겠네요. ^^
전체 66,554 |RSS
그누4 질문답변 내용 검색

회원로그인

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