[G5.4] bbs/move.php 체크박스가 안보일때 > 기술자료 | 해피정닷컴

[G5.4] bbs/move.php 체크박스가 안보일때 > 기술자료

본문 바로가기

사이트 내 전체검색

[G5.4] bbs/move.php 체크박스가 안보일때 > 기술자료

그누보드 [G5.4] bbs/move.php 체크박스가 안보일때

페이지 정보


본문

그누보드 기본 css가 아닌 다른 stylesheet 가 추가되는 프로젝트를 진행중 게시글이동 ( / bbs / move.php ) 페이지에 체크박스가 보이지 않는 현상을 경험하였습니다.

다양하게 찾다보니 특정 stylesheet 에서  input checkbox 와 radio 를 display:none 으로 선언을 했더군요.
그런 경우 아래의 소스를 참고해서 본인에 맞게 수정해서 사용하시면 체크박스가 짠 하고 보일수 있습니다.

요기 체크박스 보이자고 다른 페이지에 영향을 주면 안되니까요.
자칫하면 빈대잡으려다가 초가삼간 태울수 있으니 말입니다


아래 소스는 그누보드 5.4.1.8 기준입니다

<?php
include_once('./_common.php');

if ($sw == 'move')
    $act = '이동';
else if ($sw == 'copy')
    $act = '복사';
else
    alert('sw 값이 제대로 넘어오지 않았습니다.');

// 게시판 관리자 이상 복사, 이동 가능
if ($is_admin != 'board' && $is_admin != 'group' && $is_admin != 'super')
    alert_close("게시판 관리자 이상 접근이 가능합니다.");

$g5['title'] = '게시물 ' . $act;
include_once(G5_PATH.'/head.sub.php');

$wr_id_list = '';
if ($wr_id)
    $wr_id_list = $wr_id;
else {
    $comma = '';
    for ($i=0; $i<count($_POST['chk_wr_id']); $i++) {
        $wr_id_list .= $comma . $_POST['chk_wr_id'][$i];
        $comma = ',';
    }
}

//$sql = " select * from {$g5['board_table']} a, {$g5['group_table']} b where a.gr_id = b.gr_id and bo_table <> '{$bo_table}' ";
// 원본 게시판을 선택 할 수 있도록 함.
$sql = " select * from {$g5['board_table']} a, {$g5['group_table']} b where a.gr_id = b.gr_id ";
if ($is_admin == 'group')
    $sql .= " and b.gr_admin = '{$member['mb_id']}' ";
else if ($is_admin == 'board')
    $sql .= " and a.bo_admin = '{$member['mb_id']}' ";
$sql .= " order by a.gr_id, a.bo_order, a.bo_table ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
{
    $list[$i] = $row;
}
?>

<style>
/* 기본테이블 */
.g5_tbl_wrap table {width:100%;border-collapse:collapse;border-spacing:0 5px;background:#fff;border-top:1px solid #ececec;border-bottom:1px solid #ececec} 
.g5_tbl_wrap caption {padding:10px 0;font-weight:bold;text-align:left}
.g5_tbl_head01 {margin:0 0 10px}
.g5_tbl_head01 caption {padding:0;font-size:0;line-height:0;overflow:hidden}
.g5_tbl_head01 thead th {padding:10px;font-weight:normal;text-align:center;border-bottom:1px solid #ececec;}
.g5_tbl_head01 thead th input {vertical-align:top} /* middle 로 하면 게시판 읽기에서 목록 사용시 체크박스 라인 깨짐 */
.g5_tbl_head01 tfoot th, .tbl_head01 tfoot td {padding:10px 0;border-top:1px solid #c1d1d5;border-bottom:1px solid #c1d1d5;background:#d7e0e2;text-align:center}
.g5_tbl_head01 tbody th {padding:8px 0;border-bottom:1px solid #e8e8e8}
.g5_tbl_head01 td {color:#666;padding:10px 10px;border-top:1px solid #ecf0f1;border-bottom:1px solid #ecf0f1;line-height:1.4em;word-break:break-all}
.g5_tbl_head01 tbody tr:hover td {background:#fafafa}
.g5_tbl_head01 a:hover {text-decoration:none}

.chk_box input[type=text],input[type=password], textarea {    
-webkit-transition:all 0.30s ease-in-out;    
-moz-transition:all 0.30s ease-in-out;    
-ms-transition:all 0.30s ease-in-out;    
-o-transition:all 0.30s ease-in-out;    
outline:none;
}

.selec_chk {position:absolute;top:0;left:0;width:0;height:0;opacity:0;outline:0;z-index:-1;overflow:hidden}
.chk_box {position:relative;width:15px;}
.chk_box input[type="checkbox"] {display:block;}
.chk_box input[type="checkbox"] + label {position:relative;color:#676e70;}
.chk_box input[type="checkbox"] + label:hover {color:#2172f8;}
.chk_box input[type="checkbox"] + label span {float:left;width:15px;height:15px;display:block;background:#fff;border:1px solid #d0d4df;border-radius:3px;}
.chk_box input[type="checkbox"]:checked + label {color:#000;}
.chk_box input[type="checkbox"]:checked + label span {background:url(./img/chk.png) no-repeat 50% 50% #3a8afd;border-color:#1471f6;border-radius:3px;}
</style>


<div id="copymove" class="new_win">
    <h1 id="win_title"><?php echo $g5['title']; ?></h1>
    <form name="fboardmoveall" method="post" action="./move_update.php" onsubmit="return fboardmoveall_submit(this);">
    <input type="hidden" name="sw" value="<?php echo $sw ?>">
    <input type="hidden" name="bo_table" value="<?php echo $bo_table; ?>">
    <input type="hidden" name="wr_id_list" value="<?php echo $wr_id_list; ?>">
    <input type="hidden" name="sfl" value="<?php echo $sfl; ?>">
    <input type="hidden" name="stx" value="<?php echo $stx; ?>">
    <input type="hidden" name="spt" value="<?php echo $spt; ?>">
    <input type="hidden" name="sst" value="<?php echo $sst; ?>">
    <input type="hidden" name="sod" value="<?php echo $sod; ?>">
    <input type="hidden" name="page" value="<?php echo $page; ?>">
    <input type="hidden" name="act" value="<?php echo $act; ?>">
    <input type="hidden" name="url" value="<?php echo get_text(clean_xss_tags($_SERVER['HTTP_REFERER'])); ?>">

    <div class="g5_tbl_head01 g5_tbl_wrap">
        <table>
        <caption><?php echo $act; ?>할 게시판을 한개 이상 선택하여 주십시오.</caption>
        <thead>
        <tr>
            <th scope="col" class="chk_box">
                <label for="chkall" class="sound_only">현재 페이지 게시판 전체</label>
                <input type="checkbox" id="chkall" onclick="if (this.checked) all_checked(true); else all_checked(false);">
            </th>
            <th scope="col">게시판</th>
        </tr>
        </thead>
        <tbody>

        <?php for ($i=0; $i<count($list); $i++) {
            $atc_mark = '';
            $atc_bg = '';
            if ($list[$i]['bo_table'] == $bo_table) { // 게시물이 현재 속해 있는 게시판이라면
                $atc_mark = '<span class="copymove_current">현재<span class="sound_only">게시판</span></span>';
                $atc_bg = 'copymove_currentbg';
            }
        ?>
        <tr class="<?php echo $atc_bg; ?>">
            <td class="chk_box">
                <label for="chk<?php echo $i ?>" class="sound_only"><?php echo $list[$i]['bo_table']; ?></label>
                <input type="checkbox" value="<?php echo $list[$i]['bo_table']; ?>" id="chk<?php echo $i; ?>" name="chk_bo_table[]">
            </td>
            <td>
                <label for="chk<?php echo $i ?>">
                    <?php
                    echo $list[$i]['gr_subject'] . ' &gt; ';
                    $save_gr_subject = $list[$i]['gr_subject'];
                    ?>
                    <?php echo $list[$i]['bo_subject']; ?> (<?php echo $list[$i]['bo_table']; ?>)
                    <?php echo $atc_mark; ?>
                </label>
            </td>
        </tr>
        <?php } ?>
        </tbody>
        </table>
    </div>

    <div class="win_btn">
        <input type="submit" value="<?php echo $act; ?>" id="btn_submit" class="btn_submit">
    </div>
    </form>

</div>

<script>
$(function() {
    $(".win_btn").append("<button type=\"button\" class=\"btn_cancel btn_close\">창닫기</button>");

    $(".win_btn button").click(function() {
        window.close();
    });
});

function all_checked(sw) {
    var f = document.fboardmoveall;

    for (var i=0; i<f.length; i++) {
        if (f.elements[i].name == "chk_bo_table[]")
            f.elements[i].checked = sw;
    }
}

function fboardmoveall_submit(f)
{
    var check = false;

    if (typeof(f.elements['chk_bo_table[]']) == 'undefined')
        ;
    else {
        if (typeof(f.elements['chk_bo_table[]'].length) == 'undefined') {
            if (f.elements['chk_bo_table[]'].checked)
                check = true;
        } else {
            for (i=0; i<f.elements['chk_bo_table[]'].length; i++) {
                if (f.elements['chk_bo_table[]'][i].checked) {
                    check = true;
                    break;
                }
            }
        }
    }

    if (!check) {
        alert('게시물을 '+f.act.value+'할 게시판을 한개 이상 선택해 주십시오.');
        return false;
    }

    document.getElementById('btn_submit').disabled = true;

    f.action = './move_update.php';
    return true;
}
</script>

<?php
run_event('move_html_footer');
include_once(G5_PATH.'/tail.sub.php');
?>
 

댓글목록

등록된 댓글이 없습니다.


Total 2,633건 1 페이지
  • RSS
기술자료 목록
2633
MySQL   180  2024-03-29 14:14 ~ 2024-03-29 14:14  
2632
그누보드   502  2024-02-23 18:40 ~ 2024-02-24 06:13  
2631
JavaScript   510  2024-02-16 18:50 ~ 2024-02-16 20:37  
2630
Java   405  2024-02-06 16:49  
2629
PHP   609  2024-02-06 16:42  
2628
호스팅   573  2024-01-29 12:54  
2627
PHP   695  2024-01-26 11:04 ~ 2024-01-26 11:13  
2626
MySQL   928  2024-01-08 17:37 ~ 2024-03-14 16:00  
2625
SQL   857  2024-01-08 12:36  
2624
영카트   1078  2024-01-04 14:57  
2623
일반   1863  2023-12-15 18:33  
2622
Android   1540  2023-11-30 18:48 ~ 2023-11-30 19:41  
2621
전자결제   2672  2023-11-23 19:53  
2620
PHP   1945  2023-11-20 10:56 ~ 2023-11-20 11:14  
2619
Linux   1792  2023-11-09 19:55  
2618
그누보드   1846  2023-11-06 20:38  
2617
Linux   1809  2023-11-01 21:41 ~ 2023-11-02 10:30  
2616
영카트   1912  2023-10-07 23:31  
2615
SNS   2884  2023-09-24 17:56  
2614
ClassicASP   2591  2023-09-14 08:38  

검색

해피정닷컴 정보

회사소개 회사연혁 협력사 오시는길 서비스 이용약관 개인정보 처리방침

회사명: 해피정닷컴   대표: 정창용   전화: 070-7600-3500   팩스: 042-670-8272
주소: 서울센터 (08393) 서울시 구로구 디지털로32가길 16 파트너스타워2차 1206-280호
        대전센터 (34368) 대전시 대덕구 대화로 160 대전산업용재유통단지 지원1동 205호
개인정보보호책임자: 정창용   사업자번호: 119-05-36414
통신판매업신고: 2014-서울구로-0074 [사업자등록확인]  
Copyright 2001~2024 해피정닷컴. All Rights Reserved.