개발자 인생/그누보드5

get_list

잘나가는개발자 2018. 7. 20. 10:37
728x90
반응형
SMALL

get_list


array get_list($write_row, $board, $skin_url, $subject_len=40)

게시물 정보($write_row)를 출력하기 위하여 $list로 가공된 정보를 복사 및 가공


경로

lib/common.lib.php


인수

array $write_row

게시글 정보 배열로 입력


array $board

게시판 정보 배열로 입력


string $skin_url

게시판 스킨 URL


int $subject_len

게시글 제목 절삭 길이


예제

// 예제

$board = sql_fetch("select * from {$g5['board_table']} where bo_table = 'notice'");
$row = sql_fetch("select * from {$g5['write_prefix']}notice where wr_id = 1 ");

var_dump($row);

/*
array(39) {
  ["wr_id"]=>
  string(1) "1"
  ["wr_num"]=>
  string(2) "-1"
  ["wr_reply"]=>
  string(0) ""
  ["wr_parent"]=>
  string(1) "1"
  ["wr_is_comment"]=>
  string(1) "0"
  ["wr_comment"]=>
  string(1) "0"
  ["wr_comment_reply"]=>
  string(0) ""
  ["ca_name"]=>
  string(0) ""
  ["wr_option"]=>
  string(0) ""
  ["wr_subject"]=>
  string(12) "공지사항"
  ["wr_content"]=>
  string(12) "공지사항"
  ["wr_link1"]=>
  string(0) ""
  ["wr_link2"]=>
  string(0) ""
  ["wr_link1_hit"]=>
  string(1) "0"
  ["wr_link2_hit"]=>
  string(1) "0"
  ["wr_hit"]=>
  string(1) "4"
  ["wr_good"]=>
  string(1) "0"
  ["wr_nogood"]=>
  string(1) "0"
  ["mb_id"]=>
  string(13) "administrator"
  ["wr_password"]=>
  string(41) "*4ACFE3202A5FF5CF467898FC58AAB1D615029441"
  ["wr_name"]=>
  string(15) "최고관리자"
  ["wr_email"]=>
  string(16) "admin@domain.com"
  ["wr_homepage"]=>
  string(0) ""
  ["wr_datetime"]=>
  string(19) "2018-07-18 23:49:31"
  ["wr_file"]=>
  string(1) "2"
  ["wr_last"]=>
  string(19) "2018-07-18 23:49:31"
  ["wr_ip"]=>
  string(14) "218.238.166.78"
  ["wr_facebook_user"]=>
  string(0) ""
  ["wr_twitter_user"]=>
  string(0) ""
  ["wr_1"]=>
  string(0) ""
  ["wr_2"]=>
  string(0) ""
  ["wr_3"]=>
  string(0) ""
  ["wr_4"]=>
  string(0) ""
  ["wr_5"]=>
  string(0) ""
  ["wr_6"]=>
  string(0) ""
  ["wr_7"]=>
  string(0) ""
  ["wr_8"]=>
  string(0) ""
  ["wr_9"]=>
  string(0) ""
  ["wr_10"]=>
  string(0) ""
}
*/


$row = get_list($row);
var_dump($row);


/*
array(61) {
  ["wr_id"]=>
  string(1) "1"
  ["wr_num"]=>
  string(2) "-1"
  ["wr_reply"]=>
  string(0) ""
  ["wr_parent"]=>
  string(1) "1"
  ["wr_is_comment"]=>
  string(1) "0"
  ["wr_comment"]=>
  string(1) "0"
  ["wr_comment_reply"]=>
  string(0) ""
  ["ca_name"]=>
  string(0) ""
  ["wr_option"]=>
  string(0) ""
  ["wr_subject"]=>
  string(12) "공지사항"
  ["wr_content"]=>
  string(12) "공지사항"
  ["wr_link1"]=>
  string(0) ""
  ["wr_link2"]=>
  string(0) ""
  ["wr_link1_hit"]=>
  string(1) "0"
  ["wr_link2_hit"]=>
  string(1) "0"
  ["wr_hit"]=>
  string(1) "4"
  ["wr_good"]=>
  string(1) "0"
  ["wr_nogood"]=>
  string(1) "0"
  ["mb_id"]=>
  string(13) "administrator"
  ["wr_password"]=>
  string(41) "*4ACFE3202A5FF5CF467898FC58AAB1D615029441"
  ["wr_name"]=>
  string(15) "최고관리자"
  ["wr_email"]=>
  string(16) "admin@domain.com"
  ["wr_homepage"]=>
  string(0) ""
  ["wr_datetime"]=>
  string(19) "2018-07-18 23:49:31"
  ["wr_file"]=>
  string(1) "2"
  ["wr_last"]=>
  string(19) "2018-07-18 23:49:31"
  ["wr_ip"]=>
  string(14) "218.238.166.78"
  ["wr_facebook_user"]=>
  string(0) ""
  ["wr_twitter_user"]=>
  string(0) ""
  ["wr_1"]=>
  string(0) ""
  ["wr_2"]=>
  string(0) ""
  ["wr_3"]=>
  string(0) ""
  ["wr_4"]=>
  string(0) ""
  ["wr_5"]=>
  string(0) ""
  ["wr_6"]=>
  string(0) ""
  ["wr_7"]=>
  string(0) ""
  ["wr_8"]=>
  string(0) ""
  ["wr_9"]=>
  string(0) ""
  ["wr_10"]=>
  string(0) ""
  
  // 추가 가공 영역
  
  ["is_notice"]=>
  bool(false)
  ["subject"]=>
  string(12) "공지사항"
  ["comment_cnt"]=>
  string(0) ""
  ["datetime"]=>
  string(10) "2018-07-18"
  ["datetime2"]=>
  string(5) "07-18"
  ["last"]=>
  string(10) "2018-07-18"
  ["last2"]=>
  string(5) "07-18"
  ["name"]=>
  string(46) "최고관리자"
  ["reply"]=>
  int(0)
  ["icon_reply"]=>
  string(0) ""
  ["icon_link"]=>
  string(0) ""
  ["ca_name_href"]=>
  string(61) "http://sample.withstep.co.kr/bbs/board.php?bo_table=&sca="
  ["href"]=>
  string(64) "http://sample.withstep.co.kr/bbs/board.php?bo_table=&wr_id=1"
  ["comment_href"]=>
  string(64) "http://sample.withstep.co.kr/bbs/board.php?bo_table=&wr_id=1"
  ["icon_new"]=>
  string(0) ""
  ["icon_hot"]=>
  string(0) ""
  ["icon_secret"]=>
  string(0) ""
  ["link"]=>
  array(2) {
    [1]=>
    NULL
    [2]=>
    NULL
  }
  ["link_href"]=>
  array(2) {
    [1]=>
    string(72) "http://sample.withstep.co.kr/bbs/link.php?bo_table=&wr_id=1&no=1"
    [2]=>
    string(72) "http://sample.withstep.co.kr/bbs/link.php?bo_table=&wr_id=1&no=2"
  }
  ["link_hit"]=>
  array(2) {
    [1]=>
    int(0)
    [2]=>
    int(0)
  }
  ["file"]=>
  array(1) {
    ["count"]=>
    string(1) "2"
  }
  ["icon_file"]=>
  string(49) "첨부파일"
}
*/



728x90
반응형
LIST

'개발자 인생 > 그누보드5' 카테고리의 다른 글

search_font  (0) 2018.07.25
get_view  (0) 2018.07.22
get_dirsize  (0) 2018.07.19
get_file  (0) 2018.07.18
get_filesize  (0) 2018.07.18