[제나플러스] 배너 랜덤 출력시 활성화 된것만 출력하기 > 팁앤테크

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

팁앤테크

[제나플러스] 배너 랜덤 출력시 활성화 된것만 출력하기

페이지 정보

profile_image
작성자 제로
댓글 1건 조회 59,751회 작성일 07-12-27 17:47

본문

extend/developer.lib.php

//배너관련
function r_latest_banner($skin_dir="", $bo_table, $rows=10, $subject_len=40, $options="")
{
    global $g4;

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

    $list = array();

    $sql = " select * from $g4[board_table] where bo_table = '$bo_table'";
    $board = sql_fetch($sql);

    $tmp_write_table = $g4['write_prefix'] . $bo_table; // 게시판 테이블 전체이름
    //$sql = " select * from $tmp_write_table where wr_is_comment = 0 order by rand() desc limit 0, $rows ";
    $sql = " select * from $tmp_write_table where wr_4='1' order by rand() desc 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;
}

댓글목록

profile_image

포인트님의 댓글

포인트 작성일

오 이것도 필요했는데.. 감사합니다~~

Total 829건 32 페이지
  • RSS
팁앤테크 목록
번호 제목 글쓴이 조회 날짜
54 제로 54967 01-17
53 제로 74555 01-14
52 제로 86726 01-12
51 제로 56958 01-03
열람중 제로 59752 12-27
49 hongx2 85990 12-25
48 제로 91741 12-06
47 월드컵 110906 12-03
46 제로 51742 11-21
45 제로 49673 11-21
44 제로 102927 11-17
43 창호지 110935 11-14
42 제로 60090 11-10
41 디란도 116194 11-09
40 디란도 111706 11-08
39 제로 59983 11-07
38 백작 115374 11-03
37 제로 99301 11-01
36 제로 125346 11-01
35 제로 101065 11-01
34 제로 93477 11-01
33 미믹스 115568 10-26
32 디란도 108538 10-26
31 귀여운현호 145140 10-24
30 귀여운현호 115732 10-24

검색


사이트 정보

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

접속자집계

오늘
334,976
어제
547,766
최대
552,140
전체
18,359,687
Copyright (c) 株式会社YHPLUS. All rights reserved.