<?php $this->load->view('templates/mypage/mypage-header')?>
    <div class="contents">

        <div class="mypage_left" style="min-height: 900px;">
            <h3 class="left_title"><a href="">마이페이지</a></h3>
            <h3><a href="javascript:commonLayerOpen('passwd_check_layer')">프로필 수정</a></h3>
            <h3><a href="/mypage/bookmark">북마크함</a></h3>
            <h3><a href="/mypage/qna" class="current">1:1 문의</a></h3>
            <h3 style="text-align:center;"><a href="javascript:user_comment('<?php echo getSessionUser()->userName?>', '홍길동');" display="blank"><button
                        type="button" class="btn btn-default br20"
                        style="width: 120px;padding: 5px;font-size: 14px;"><img
                            src="<?php echo THEME_FOLDER; ?>/img/img_pen.gif"> 내댓글보기</button></a></h3>
            <h3 style="text-align:center;"><a href="javascript:change_toggle('delivery_layer')" display="blank"><button
                        type="button" class="btn btn-default br20"
                        style="width: 120px;padding: 5px;font-size: 14px;"><img
                            src="<?php echo THEME_FOLDER; ?>/img/img_box.gif"> 배달함</button></a></h3>
        </div>

        <div class="contents">
            <div class="mypage_right">
                <div class="mypage_right_top">
                    <h2 class="mypage_title">1:1 문의</h2>
                </div>
                <div style="margin:10px 0;overflow:hidden">
                    <span><a href="/mypage/qna_add" class="fr btn btn-default_bb">글쓰기</a></span>
                </div>
                <form name="input_form" id="input_form" method="post">
                    <div>
                        <table class="table board">
                            <thead>
                                <tr>
                                    <th class="mypage_tbl_box10"><input name="allcheck" id="allcheck" type="checkbox">
                                    </th>
                                    <th class="mypage_tbl_box10">번호</th>
                                    <th class="mypage_tbl_box60" style="text-align:center">제목</th>
                                    <th class="mypage_tbl_box10" style="text-align:left">글쓴이 </th>
                                    <th class="mypage_tbl_box20">날짜 </th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td colspan="5" align="center">등록된 문의가 없습니다.</td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <ul class="pagenumber2"></ul>
                    <div class="fr btns" style="margin-top: 0px">
                        <span><a href="/mypage/qna_add" class="fr btn btn-default_bb">글쓰기</a></span>
                    </div>
                    <div class="slct_box" style="width: 500px; margin: 0 auto; border-bottom:0;">
                        <span class="slct">
                            <select id="search_type" name="search_type">
                                <option value="total">제목+본문</option>
                            </select>
                        </span>
                        <span class="srch">
                            <span><input name="search_keyword" id="search_keyword" placeholder="내용검색" type="text"
                                    value=""><a href="javascript:search_list()"><img
                                        src="<?php echo THEME_FOLDER; ?>/img/mypage_serch_icon.gif"
                                        alt="검색하기"></a></span>
                        </span>
                    </div>
                </form>
            </div>
        </div>



        <script>
        // 검색
        function search_list() {
            if ($("#search_keyword").val() == '') {
                alert("검색할 내용을 입력해주세요.");
                return false;
            }
            $("#input_form").attr("action", "/mypage/qna");
            $("#input_form").submit();
        }


        // 복수 삭제
        function qna_arr_del() {
            if ($("input:checkbox[name='is_del[]']").is(":checked") == false) {
                alert("삭제할 내용이 없습니다.");
                return false;
            }
            if (confirm("1:1문의가 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
                $("#input_form").attr("action", "/mypage/qna_arr_del_proc");
                $("#input_form").submit();
            } else { //취소
                return;
            }
        }

        // checkbox all checked/unchecked
        $(function() {
            $("#allcheck").click(function() {
                if ($("#allcheck").prop("checked")) {
                    $("input:checkbox[name='is_del[]']").prop('checked', true); // 전체선택하기
                } else {
                    $("input:checkbox[name='is_del[]']").prop("checked", false);
                }
            })
        })
        </script>
    </div>
    <iframe id="kmc_mobile_auth" src="/comm/kmc_mobile_auth"
        style="width:0px;height:0px;position:absolute; top:0; left:-9999px;"></iframe>


    <!--	<div class="gototop"><a href=""><img src="<?php echo THEME_FOLDER; ?>/img/gototop.gif"></a></div>-->
    <?php $this->load->view('templates/mypage/mypage-footer')?>
