그누보드 스킨 list 출력
본문
그누보드 스킨
www/board/new_gallery/list.skin.php 에서
skin 디자인만 가져와서 list를 출력하려고 하는데요
<?php
include_once('./_common.php');
if (G5_IS_MOBILE) {
include_once(G5_MSHOP_PATH.'../index.php');
return;
}
define("_INDEX_", TRUE);
include_once(G5_SHOP_PATH.'/shop.head.php');
?>
<?php
$row = sql_fetch(" select * from reservation where cp_idx= '$cp_idx' ");
?>
<div class="advance">
<div class="container">
<div class="gallery-list">
<ul class="row">
<?php
for ($i=0; $i<count($row); $i++) {
?>
<div class="thumb"><img src="/data/main/<?php echo $row[$i]['main_img'] ?>" alt=""></div>
<div class="tit"><?php echo $row[$i]['title'] ?></div>
<div class="info">
</div>
</a>
</li>
</ul>
</div>
</div>
<?php } ?>
</div>
<?php
include_once(G5_SHOP_PATH.'/shop.tail.php');
?>
이미지랑 제목정도만 출력해보려고 했는데
출력이 안됩니다..
기존 그누보드 스킨 list.php 소스는 sql문이나 query 문이 없더라구요
다른곳에 include 되있는건지 못 찾고 있습니다.
도와주세요 ㅠㅠ
!-->답변 4
<?php
include_once('./_common.php');
if (G5_IS_MOBILE) {
include_once(G5_MSHOP_PATH.'../index.php');
return;
}
define("_INDEX_", TRUE);
include_once(G5_SHOP_PATH.'/shop.head.php');
?>
<?php
$result = sql_query(" select * from reservation where cp_idx= '$cp_idx' ");
?>
<div class="advance">
<div class="container">
<div class="gallery-list">
<ul class="row">
<?php
for ($i=0; $row = sql_fetch_array($result); $i++) {
?>
<div class="thumb"><img src="/data/main/<?php echo $row['main_img'] ?>" alt=""></div>
<div class="tit"><?php echo $row['title'] ?></div>
<div class="info">
</div>
</a>
</li>
</ul>
</div>
</div>
<?php } ?>
</div>
<?php
include_once(G5_SHOP_PATH.'/shop.tail.php');
?>
위 처럼 변경해주시면 됩니다.
!-->sql문은 /bbs/list.php 에 있으니 거길 참고해보시면 될거 같습니다.
데이터 필드가
main_img, title 로 되어 있나 확인바랍니다.
루프는 위와 같습니다.
lib/common.php에
// 게시물 정보($write_row)를 출력하기 위하여 $list로 가공된 정보를 복사 및 가공
function get_list() 함수를 참고하세요.
사용법은
bbs/list.php에
$list[$i] = get_list($row, $board, $board_skin_url, G5_IS_MOBILE ? $board['bo_mobile_subject_len'] : $board['bo_subject_len']);
이런 부분 참고 하시면 됩니다.
답변을 작성하시기 전에 로그인 해주세요.