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

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

팁앤테크

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

페이지 정보

profile_image
작성자 제로
댓글 1건 조회 58,497회 작성일 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 제로 53778 01-17
53 제로 73030 01-14
52 제로 85392 01-12
51 제로 56005 01-03
열람중 제로 58498 12-27
49 hongx2 84583 12-25
48 제로 90136 12-06
47 월드컵 108336 12-03
46 제로 50837 11-21
45 제로 48708 11-21
44 제로 101482 11-17
43 창호지 109351 11-14
42 제로 58758 11-10
41 디란도 114728 11-09
40 디란도 110324 11-08
39 제로 58547 11-07
38 백작 114022 11-03
37 제로 97957 11-01
36 제로 122655 11-01
35 제로 99884 11-01
34 제로 91980 11-01
33 미믹스 114147 10-26
32 디란도 106644 10-26
31 귀여운현호 141505 10-24
30 귀여운현호 114097 10-24

검색


사이트 정보

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

접속자집계

오늘
25,697
어제
37,399
최대
552,140
전체
16,169,351
Copyright (c) 株式会社YHPLUS. All rights reserved.