최근게시물 글 순서 (넘버 출력방법 문의드립니다.)

최근게시물 글 순서 (넘버 출력방법 문의드립니다.)

QA

최근게시물 글 순서 (넘버 출력방법 문의드립니다.)

본문


 
 
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
include_once(G5_LIB_PATH.'/thumbnail.lib.php');
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style3.css">', 0);
$thumb_set[0]['width'] = 225;
$thumb_set[0]['height'] = 180;
$thumb_set[1]['width'] = 225;
$thumb_set[1]['height'] = 117;
$result = array();
$result_big = '';
for ($i=0; $i<count($list); $i++) {
    $result[$i]['content_class'] = 'content';
    $result[$i]['href'] = $list[$i]['href'];
    $result[$i]['subject'] = $list[$i]['subject'];
    $result[$i]['wr_num'] = $list[$i]['wr_num'];
    if($list[$i]['comment_cnt']) $result[$i]['subject'] .= $list[$i]['comment_cnt'];
    $result[$i]['name'] = $list[$i]['name'];
    $thumb = get_list_thumbnail($bo_table, $list[$i]['wr_id'], $thumb_set[1]['width'], $thumb_set[1]['height']);
    if($thumb['src']) {
        if(!$result_big) {
            $thumb = get_list_thumbnail($bo_table, $list[$i]['wr_id'], $thumb_set[0]['width'], $thumb_set[0]['height']);
            $result_big = $result[$i];
            $result_big['img'] = '<img src="'.$thumb['src'].'" class="thumb_1">';
            $result_big['content'] = '<dd class="caption">'.cut_str($list[$i]['wr_content'],126).'</dd>';
            unset($result[$i]);
        } else {
            $result[$i]['img'] = '<img src="'.$thumb['src'].'" class="thumb_2">';
        } 
    } else {
        $result[$i]['content_class'] .= ' only_text';
        $result[$i]['content'] = '<dd class="caption">'.cut_str(strip_tags($list[$i]['wr_content']),114).'</dd>';
    }
}
?> 
 
 
        <dd class="writer"><?php echo $value['name']; ?></dd>
         <dd class=""><?php echo $value['wr_num']; ?></dd> 
 

 

 

위 방법으로 해서 최근게시물의 글을 출력시키는데.

 

글 넘버가 음수로 표기 됩니다.

음수 표기 없애는 방법이 따로 있을까요??

 

아니면  

 

다른 방법으로 글 넘버출력 하는 방법이 있을까요?? 

이 질문에 댓글 쓰기 :

답변 2

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

회원로그인

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