g

최신글 소스에 가격을 뽑아 오고 싶은데요...

아래 제가 물은 질문에 도우미님께서 도움을 주셨는데요..제가 아무것도 모르는 초보라서 다시한번 ....질문드릴꼐요..
상품등록 게시판에서 가격을 뽑아 올려고 하거든요(기존 최신글 스킨에서)

==========================================
도우미님 답변에서....

 latest.skin.php 불필요한 코드는 제외 하였습니다. ^ ^

<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<? for ($i=0; $i<count($list); $i++) { ?>
<div style='word-break:break-all;height:20px;padding:0 0 0 5px;'>
<?
echo "{$list[$i][wr_4]}";
?>
</div>
<? } ?>
================================================================

이렇게 답변을 주셨는데요......

좀 길지만 제가 최근 게시물 뽑아올때 쓸소스 전체를 넣겠습니다...

==============================================================
<?
$g4_path = ".";
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
include_once("$g4_path/_common.php");
list($height, $row_cnt) = explode(",", $options);
$all_cnt = 0;


?>
<link rel='stylesheet' type='text/css' href='./mall_style.css'>
<script src='../mall/html.js'></script>

<!-- <?=$board[bo_subject]?> (<?=$board[bo_table]?>) 최신글 -->
<table width='100%' cellpadding='0' cellspacing='0' border='0' align='left'>
<form name=fmallbuy method=post action="javascript:fmallbuy_submit(document.fmallbuy)" enctype="multipart/form-data">
<input type=hidden name="bo_table"  value="<?=$bo_table?>">
<input type=hidden name="wr_id"      value="<?=$wr_id?>">
<input type=hidden name="mo_name"    value="<?=$mo_name?>">
<input type=hidden name="mo_hp"      value="<?=$mo_hp?>">
<input type=hidden name="mo_address" value="<?=$mo_address?>">
<input type=hidden name="se_id"      value="<?=$bo_mall[mb_id]?>">
<input type=hidden name="mo_cash"    value="<?=$mo_cash?>">
<input type=hidden name="mo_point"  value="<?=$mo_point?>">
<input type=hidden name="mo_cnt"    value="<?=$mo_cnt?>">
<input type=hidden name="mo_msg"    value="<?=$mo_msg?>">
<tr><td align='center'>

<table width='100%' border='0' cellspacing='0' cellpadding='0' align='left'>
<tr>
    <td width='226'>&nbsp;<strong><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><font color=#000000><?=$board[bo_subject]?></font></a></strong></td>
    <td width='49'><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><img src='<?=$latest_skin_path?>/img/more.gif' border=0></a></td>
  </tr>
  <tr>
  <td colspan=2 height=2 bgcolor='#b5a789'></td>
  </tr>
</table>

</td></tr>

<tr><td align='center'>

<table width='95%'>


  <? for ($k=0; $k<$row_cnt; $k++ ) { ?>
<tr>
<?
for ($i=0; $i<count($list)/$row_cnt; $i++)
{
 
if ($i > 0)
        echo '<td width=20>&nbsp;</td>';

    $title = get_text($list[$all_cnt][wr_subject]);
    $content = cut_str(get_text($list[$all_cnt][wr_content]), 80);
    $img = "$g4[path]/data/file/$bo_table/".urlencode($list[$all_cnt][file][0][file]);
    if (!file_exists($img) || !$list[$all_cnt][file][0][file])
        $img = "$latest_skin_path/img/no_image.gif";
    $href = "$g4[bbs_path]/board.php?bo_table=$bo_table";
   
    echo <<<HEREDOC
    <td width='<?=$subject_len?>' valign='top' align='center'>
        <table width='<?=$subject_len?>' border='0' cellpadding='0' cellspacing='0' align='center'>
<tr>
            <td width='<?=$subject_len?>' height='5' align='center'></td>
</tr>

        <tr>
            <td width='<?=$subject_len?>' height='<?=$height?>' align='center'>
<div style='width:<?=$subject_len?>px;height:<?=$height?>px;border:1px solid #CCCCCC;padding:3px' align='center'>
<a href='$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id={$list[$all_cnt][wr_id]}'><img src='{$img}' width='$subject_len' height='$height' border='0' align='absmiddle' title='$title'></a>
</div>

      <td width=32></td><td width=5><img src='./img/bgline.gif'></td><td width=5></td>
    </td>
        </tr>

<tr>
            <td width='<?=$subject_len?>' height='5' align='center'></td>
</tr>

<tr>
            <td width='<?=$subject_len?>' height='20' align='center'><a href='$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id={$list[$all_cnt][wr_id]}'>{$list[$all_cnt][subject]}</a></td>
</tr>
<tr>

<td>



//이곳에 가격을 뽑아 오고 싶습니다....===========




</td>
</tr>
</table>
    </td>
HEREDOC;
$all_cnt++;
   
}
?>
</tr>
<? } ?>

<? if (count($list) == 0) { ?>
<tr><td colspan=2 align='center' height=25>게시물이 없습니다.</td></tr>
<? } ?>
</table>
</td></tr>
</form>
</table>

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

하단부  //이곳에 가격을 뽑아 오고 싶습니다....===========표시에 가격을 뽑아 오고 싶습니다... 도우미님 코드를 그대로 넣어서 출력 했을때는 가격이 정확히 나옵니다...
근데..제가 이리저리 해봐도...위 최신글 소스와 합치니 가격은 않나옵니다...
제발좀 도와주세요 ...어느부분에 어떻게 넣어야 하는지요..
|

댓글 2개

감사합니다..해결&#46124;습니다..
댓글을 작성하시려면 로그인이 필요합니다. 로그인

그누4 질문답변

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

+
제목 글쓴이 날짜 조회
19년 전 조회 1,536
19년 전 조회 1,509
19년 전 조회 1,562
19년 전 조회 1,522
19년 전 조회 1,564
19년 전 조회 1,529
19년 전 조회 1,513
19년 전 조회 1,583
19년 전 조회 1,759
19년 전 조회 1,516
19년 전 조회 1,514
19년 전 조회 1,661
19년 전 조회 1,417
19년 전 조회 1,632
19년 전 조회 1,927
19년 전 조회 8,340
19년 전 조회 1,915
19년 전 조회 1,656
19년 전 조회 1,676
19년 전 조회 1,662
🐛 버그신고