제나빌더 잘쓰고 있어요..감사합니다. > 질문답변

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

질문답변

서버정보나 계정정보는 보안유지를 위해 관리자쪽지나 메일로 발송해 주시거나 제작의뢰 게시판을 이용해 주시면 감사하겠습니다..

제나빌더 잘쓰고 있어요..감사합니다.

페이지 정보

본문

질문
제나보드에 최신글보기 있죠?
여러 그룹게시판에서 뽑아오는거잖아요...
근데 특정한 (z6) 그룹만 안나오게 하고 싶은데 어떻게 하나요?
 
소스는 아래와 같습니다.
<?
include_once("./_common.php");
$g4[title] = "최근 게시물";
include_once("./_head.php");
$sql_common = " from $g4[board_new_table] a, $g4[board_table] b, $g4[group_table] c
               where a.bo_table = b.bo_table and b.gr_id = c.gr_id and b.bo_use_search = '1' ";
if ($gr_id)
    $sql_common .= " and b.gr_id = '$gr_id' ";
if ($view == "w")
    $sql_common .= " and a.wr_id = a.wr_parent ";
else if ($view == "c")
    $sql_common .= " and a.wr_id <> a.wr_parent ";
if ($mb_id)
    $sql_common .= " and a.mb_id = '$mb_id' ";
$sql_order = " order by a.bn_id desc ";
$sql = " select count(*) as cnt $sql_common ";
$row = sql_fetch($sql);
$total_count = $row[cnt];
$rows = $config[cf_new_rows];
$total_page  = ceil($total_count / $rows);  // 전체 페이지 계산
if (!$page) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$group_select = "<select name=gr_id id=gr_id onchange='select_change();'><option value=''>전체그룹";
//$sql = " select gr_id, gr_subject from $g4[group_table] order by gr_id ";
// 제외그룹설정 root님
// html , banner , guest 라는 그룹은 제외시킴
$sql = " select * from $g4[group_table] where gr_id not in ('guest') order by gr_1";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
{
    $group_select .= "<option value='$row[gr_id]'>$row[gr_subject]";
}
$group_select .= "</select>";

$list = array();
$sql = " select a.*, b.bo_subject, c.gr_subject, c.gr_id
          $sql_common
          $sql_order
          limit $from_record, $rows ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
{
    $tmp_write_table = $g4[write_prefix] . $row[bo_table];
    if ($row[wr_id] == $row[wr_parent]) // 원글
    {
        $comment = "";
        $comment_link = "";
        $row2 = sql_fetch(" select * from $tmp_write_table where wr_id = '$row[wr_id]' ");
        $list[$i] = $row2;
        $name = get_sideview($row2[mb_id], cut_str($row2[wr_name], $config[cf_cut_name]), $row2[wr_email], $row2[wr_homepage]);
        // 당일인 경우 시간으로 표시함
        $datetime = substr($row2[wr_datetime],0,10);
        $datetime2 = $row2[wr_datetime];
        if ($datetime == $g4[time_ymd])
            $datetime2 = substr($datetime2,11,5);
        else
            $datetime2 = substr($datetime2,5,5);
    }
    else // 코멘트
    {
        $comment = "[코] ";
        $comment_link = "#c_{$row[wr_id]}";
        $row2 = sql_fetch(" select * from $tmp_write_table where wr_id = '$row[wr_parent]' ");
        $row3 = sql_fetch(" select mb_id, wr_name, wr_email, wr_homepage, wr_datetime from $tmp_write_table where wr_id = '$row[wr_id]' ");
        $list[$i] = $row2;
        $list[$i][mb_id] = $row3[mb_id];
        $list[$i][wr_name] = $row3[wr_name];
        $list[$i][wr_email] = $row3[wr_email];
        $list[$i][wr_homepage] = $row3[wr_homepage];
        $name = get_sideview($row3[mb_id], cut_str($row3[wr_name], $config[cf_cut_name]), $row3[wr_email], $row3[wr_homepage]);
        // 당일인 경우 시간으로 표시함
        $datetime = substr($row3[wr_datetime],0,10);
        $datetime2 = $row3[wr_datetime];
        if ($datetime == $g4[time_ymd])
            $datetime2 = substr($datetime2,11,5);
        else
            $datetime2 = substr($datetime2,5,5);
    }
    $list[$i][gr_id] = $row[gr_id];
    $list[$i][bo_table] = $row[bo_table];
    $list[$i][name] = $name;
    $list[$i][comment] = $comment;
    $list[$i][href] = "./board.php?bo_table=$row[bo_table]&wr_id=$row2[wr_id]{$comment_link}";
    $list[$i][datetime] = $datetime;
    $list[$i][datetime2] = $datetime2;
    $list[$i][gr_subject] = $row[gr_subject];
    $list[$i][bo_subject] = $row[bo_subject];
    $list[$i][wr_subject] = $row2[wr_subject];
}
$write_pages = get_paging($config[cf_write_pages], $page, $total_page, "?gr_id=$gr_id&view=$view&mb_id=$mb_id&page=");
$new_skin_path = "$g4[path]/skin/new/$config[cf_new_skin]";
echo "<script language=\"javascript\" src=\"$g4[path]/js/sideview.js\"></script>\n";
include_once("$new_skin_path/new.skin.php");
include_once("./_tail.php");
?>
-----------------------
어디서 뭘 추가해야 되나요?
추천0

댓글목록

profile_image

연후아빠님의 댓글

연후아빠쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 작성일

// html , banner , guest 라는 그룹은 제외시킴
$sql = " select * from $g4[group_table] where gr_id not in ('guest','z6') order by gr_1";

이런식으로 해보세요^^

profile_image
profile_image

연후아빠님의 댓글의 댓글

연후아빠쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 작성일

이게 맞는데~!이상하네요..모든 소스에서 저는 이걸 사용합니다~!

mainmenu.php / new.php / speedmap.php등
다른 소스를 참고해 보세요..

Total 1,640건 21 페이지
  • RSS
질문답변 목록
번호 제목 글쓴이 조회 추천 날짜
1140 디란도쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 64 0 07-30
1139 라울쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 5366 0 07-30
1138 메빅맨쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 9826 0 07-31
1137 메빅맨쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 9855 0 07-31
1136 메빅맨쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 9204 0 08-01
1135 디란도쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 34 0 08-01
1134 포리쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 28 0 08-01
1133 메빅맨쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 7358 0 08-02
1132 메빅맨쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 6294 0 08-03
1131 메빅맨쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 15840 0 08-03
1130
메인배너 댓글1
기쁨의 아침쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 7153 0 08-03
1129 메빅맨쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 8169 0 08-03
1128 메빅맨쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 25 0 08-04
1127 그로이쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 20 0 08-05
1126 디란도쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 7737 0 08-05
1125 디란도쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 9834 0 08-05
1124 디란도쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 7012 0 08-06
1123 미니쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 9409 0 08-07
1122 디란도쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 40 0 08-16
1121 디란도쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 5892 0 08-17
1120 쎄엠쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 14978 0 08-19
1119
메뉴에서 댓글2
jhy6563쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 7360 0 08-20
1118 쎄엠쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 10410 0 08-21
1117 휴먼쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 9039 0 08-23
1116 ebakery쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 6674 0 08-23

검색

회원로그인

회원가입

사이트 정보

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

접속자집계

오늘
6,657
어제
7,784
최대
8,233
전체
1,538,518
Copyright (c) 株式会社YHPLUS. All rights reserved.