테스트 사이트 - 개발 중인 베타 버전입니다

자신의 쓴 글 게시글 수를 구하고 싶어요.. 도와주세요 채택완료

툥이 9년 전 조회 3,719

게시판에서 자신이 쓴 글의 갯수를 불러오고 싶은데 어떻게 해야할까요..?

댓글을 작성하려면 로그인이 필요합니다.

답변 1개

채택된 답변
+20 포인트

/bbs/보드.php 가잇어요

거기서 리스트.php 를 불러오는데요

 

자신이 쓴글이라면  /bbs/로그체그에서 세션을 아이디값을 저장하거든요

 

리스트.php 에서

커리를 돌리느데요

거기다가 if 문을 하나 추가해서 게시물의 아이디값과  세션아이디값을

비교해서 변수에 카운트를 넣고  그걸  뿌려주면되요 skin/board/게시물쓰는 스킨

 

board.php

   include_once (G5_BBS_PATH.'/list.php');

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

list.php

 

if ($sca || $stx) {     $sql = " select distinct wr_parent from {$write_table} where {$sql_search} {$sql_order} limit {$from_record}, $page_rows "; } else {     $sql = " select * from {$write_table} where wr_is_comment = 0 ";     if(!empty($notice_array))         $sql .= " and wr_id not in (".implode(', ', $notice_array).") ";     $sql .= " {$sql_order} limit {$from_record}, $page_rows "; }

// 페이지의 공지개수가 목록수 보다 작을 때만 실행 if($page_rows > 0) {     $result = sql_query($sql);

 

//여기서 카운트 변수를 설정

$ca_u_chl=0;

//여기서 카운트 변수를 설정

    $k = 0;

    while ($row = sql_fetch_array($result))     {

//여기서 카운트 변수값 증가

if($ss_mb_id==$row[http://ruwa64-086.fmcity.com/WebMysql/sql.php?db=cjlove_wc50&table=g5_write_id3_01&token=780f2778c85dd1b7e3989c4f05b38f09&sql_query=SELECT+%2A+FROM+%60g5_write_id3_01%60+ORDER+BY+%60g5_write_id3_01%60.%60mb_id%60+ASC">mb_id]){$ca_u_chl++;}

//여기서 카운트 변수값 증가          // 검색일 경우 wr_id만 얻었으므로 다시 한행을 얻는다         if ($sca || $stx)             $row = sql_fetch(" select * from {$write_table} where wr_id = '{$row['wr_parent']}' ");

        $list[$i] = get_list($row, $board, $board_skin_url, G5_IS_MOBILE ? $board['bo_mobile_subject_len'] : $board['bo_subject_len']);         if (strstr($sfl, 'subject')) {             $list[$i]['subject'] = search_font($stx, $list[$i]['subject']);         }         $list[$i]['is_notice'] = false;         $list_num = $total_count - ($page - 1) * $list_page_rows - $notice_count;         $list[$i]['num'] = $list_num - $k;

        $i++;         $k++;     } }

 

 

//자기가 쓴글 ㅎㅎ

//echo $ca_u_chl;

//자기가 쓴글 ㅎㅎ

 

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

 skin/board/basic/list.skin.php

       

       
            Total             페이지

내글        

 

 

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

login_check.php

        set_session('ss_mb_id', $mb['mb_id']);

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

 

 

 

하다 안되면 쪽지 주세요 ㅎㅎ

 

 

 

 

 

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인