메인 최신글 내가 쓴 글만 출력

메인 최신글 내가 쓴 글만 출력

QA

메인 최신글 내가 쓴 글만 출력

본문

목록게시판에서는 어찌어찌 해결했는데,

메인 최신글에서는

회원이 로그인 했을때 본인의 내역만 볼 수 있게 안되나요? ㅜ 

아래와 같이 하니 모든 회원 목록이 출력되네요. 

너무 초보라 어렵네요. 흑

 

g5/theme/basic/skin/latest/blue/latest.skin.php

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

// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css">', 0);
?>


<div class="lat">
    <h2 class="lat_title"><a href="<?php echo get_pretty_url($bo_table); ?>"><?php echo $bo_subject ?></a></h2>
    <ul>
    <?php for ($i=0; $i<count($list); $i++) {  
        if ($list[$i]['wr_1'] == $member['mb_id']);
        $date01 = date("Y.m.d", strtotime($list[$i]['wr_2']));
    ?>
        <li class="basic_li">            
            <div class="lt_info">
                <table>
                    <thead>
                        <tr>
                            <th class="th_title" scope="col">회원 ID</th>
                            <th class="th_title" scope="col">날짜</th>
                            <th class="th_title" scope="col">store1</th>
                            <th class="th_title" scope="col">store2</th>
                            <th class="th_title" scope="col">store3</th>
                            <th class="th_title" scope="col">store4</th>
                            <th class="th_title th_total" scope="col">총매출</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td class="td_id"><?php echo $list[$i]['wr_1'] ?></td>
                            <td class="td_date"><?php echo $date01 ?></td>
                            <td class="td_bookstore"><?php echo $list[$i]['wr_3'] ?>원</td>
                            <td class="td_bookstore"><?php echo $list[$i]['wr_4'] ?>원</td>
                            <td class="td_bookstore"><?php echo $list[$i]['wr_5'] ?>원</td>
                            <td class="td_bookstore"><?php echo $list[$i]['wr_6'] ?>원</td>
                            <td class="td_total"><?php echo $list[$i]['wr_7'] ?>원</td>
                        </tr>
                    </tbody>
                </table>     
            </div>
        </li>
    <?php }  ?>
    <?php if (count($list) == 0) { //게시물이 없을 때  ?>
    <li class="empty_li">게시물이 없습니다.</li>
    <?php }  ?>
    </ul>
    <a href="<?php echo get_pretty_url($bo_table); ?>" class="lt_more"><span class="sound_only"><?php echo $bo_subject ?></span>더보기</a>

</div>

이 질문에 댓글 쓰기 :

답변 3

 if ($list[$i]['wr_1'] == $member['mb_id']); 

 

wr_1이 mb_id 값이 들어가있는거임? 

mb_id에 보통들어가있는데 그거 제대로 비교하시고 

if()

{

이사이에 뽑아올 게시물 넣으세요
}

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

회원로그인

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