[제나플러스] 최신글 함수를 최대한 줄여 봤습니다.. > 팁앤테크

본문 바로가기
사이트 내 전체검색

팁앤테크

[제나플러스] 최신글 함수를 최대한 줄여 봤습니다..

페이지 정보

본문

<?
/**
 * ZENAPLUS
 *
 * Copyright (c) 2006-05-18 Park Gwan Su <www.zeronara.net>
 * e-mail : [email protected]
 * You are free: to Remix - to adapt the work
 * Attribution : You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).
 * Share Alike : If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one.
 * Nothing in this license impairs or restricts the author's moral rights.
**/

if (!defined('_GNUBOARD_')) exit;

//배열 생성
$g4_board = array();

//zlatest
function zn_latest($skin_dir="", $bo_table, $rows=10, $subject_len="", $brch="", $options="")
{
    global $g4;

    global $g4_board;

    if ($skin_dir)
        $latest_skin_path = "$g4[path]/skin/latest/$skin_dir";
    else
        $latest_skin_path = "$g4[path]/skin/latest/basic";

    $list = array();
        if(!$g4_board or !$g4_board["$bo_table"]){
    //$sql = " select * from $g4[board_table] where bo_table = '$bo_table'";
    $sql_select = "bo_table, bo_subject, bo_notice, bo_category_list, bo_new, bo_hot";
    $sql = " select $sql_select from $g4[board_table] where bo_table = '$bo_table'";
    $g4_board["$bo_table"] = sql_fetch($sql);
    }

    $board = $g4_board["$bo_table"];

    $tmp_write_table = $g4['write_prefix'] . $bo_table; // 게시판 테이블 전체이름
    if ($brch == "H")
        $brch = "wr_hit asc";
    else if ($brch == "C")
        $brch ="wr_comment asc";
    else if ($brch == "R")
        $brch = "rand()";
    else if ($brch == "G")
        $brch = "wr_good asc";
    else if ($brch == "N")
        $brch = "wr_nogood asc";
    else if ($brch == "B")
        $brch = "wr_num asc";
    else
        $brch = "wr_num asc";

    //$sql = " select * from $tmp_write_table where wr_is_comment = 0 order by wr_id desc limit 0, $rows ";
    // 위의 코드 보다 속도가 빠름
    $sql_select = "wr_id, wr_subject, wr_option, wr_content, wr_comment, wr_parent, wr_datetime, wr_name, wr_reply, wr_link1, wr_link2, ca_name, wr_hit, wr_good, wr_nogood";
    $sql = " select $sql_select from $tmp_write_table where wr_is_comment = 0 order by $brch, wr_reply limit 0, $rows ";
    //explain($sql);
    $result = sql_query($sql);
    for ($i=0; $row = sql_fetch_array($result); $i++)
        $list[$i] = get_list($row, $board, $latest_skin_path, $subject_len);

    ob_start();
    include "$latest_skin_path/latest.skin.php";
    $content = ob_get_contents();
    ob_end_clean();

    return $content;
}
?>
추천0

댓글목록

등록된 댓글이 없습니다.

Total 825건 22 페이지
  • RSS
팁앤테크 목록
번호 제목 글쓴이 조회 추천 날짜
300 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13474 0 02-16
299 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13468 1 01-27
298 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13440 0 11-26
297 페르쏘나쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 13436 0 05-06
296 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13421 0 11-21
295 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13414 0 12-14
294 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13413 0 08-25
293 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13397 0 11-12
292 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13393 0 02-25
291 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13390 0 04-27
290 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13378 0 09-19
289 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13377 1 05-06
288 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13364 0 04-16
287 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13362 0 06-16
286 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13353 0 12-17
285 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13335 0 09-30
284 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13334 0 05-07
283 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13330 0 05-15
282 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13329 0 10-18
281 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13310 0 12-10
280 연후아빠쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13297 0 05-29
279 귀여운현호쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13278 0 10-24
278 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13272 0 05-02
열람중 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13271 0 09-06
276 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13270 0 03-04

검색

회원로그인

회원가입

사이트 정보

株式会社YHPLUS / 대표 : ZERO
〒140-0011 東京都品川区東大井2-5-9-203
050-5539-7787
오픈카카오톡 (YHPLUS) :
https://open.kakao.com/o/slfDj15d

접속자집계

오늘
4,986
어제
7,420
최대
8,233
전체
1,521,111
Copyright (c) 株式会社YHPLUS. All rights reserved.