<!-- common -->
<div id="loginModal" class="modal fade" role="dialog">
    <div class="modal-dialog">
        <!-- Modal content-->
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title">Sign In</h4>
            </div>
            <div class="modal-body">
                <div class="alert alert-warning">
                    <p>Your session has expired, please use the form below to sign back in!</p>
                </div>
                <div id="loginError" class='alert alert-danger'>The Username of Password entered is incorrect.
                </div>

                <div class="form-group">
                    <label for="username">Username</label>
                    <input type="text" name="username" value="" id="username" class="form-control"
                        placeholder="Username" />
                </div>
                <div class="form-group">
                    <label for="password">Password:</label>
                    <input type="password" name="password" value="" id="password" class="form-control"
                        placeholder="Password" />
                </div>
            </div>
            <div class="modal-footer">
                <a id="ajaxLoginbtn" class="btn btn-primary">Sign In</a>
            </div>
        </div>
    </div>
</div>

<!-- grace content list -->
<div class="modal fade cm-submenuchange-modal" tabindex="-1" role="dialog" aria-labelledby="cm-submenuchange-modal"
    aria-hidden="true">
    <div class="modal-dialog" role="document">
        <div class="modal-content modal-lg">
            <div class="modal-header">
                <h5 class="modal-title" id="exampleModalLabel">컨텐츠 서브메뉴 변경</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <form class="row">
                    <div class="form-group col-md-10">
                        <label class="col-form-label col-md-2">서브메뉴:</label>
                        <select class="btn btn-default col-md-4 cm-subchg-category-select">
                            <option value="">서브메뉴</option>
                            <?php foreach ($lifeCategories as $category) {echo '<option value="' . $category->idx . '">' . $category->category_name . '</option>';}?>
                        </select>
                        <label class="col-form-label col-md-2">에디터:</label>
                        <select class="btn btn-default col-md-4 cm-subchg-editor-select">
                            <option value="">에디터</option>
                            <?php foreach ($graceEditors as $editor) {echo '<option value="' . $editor->editorId . '">' . $editor->editorName . '</option>';}?>
                        </select>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">닫기</button>
                <button type="button" class="btn btn-primary cm-submenuchange-save">저장</button>
            </div>
        </div>
    </div>
</div>

<!-- grace category -->
<div class="modal fade cm-submenu-modal" tabindex="-1" role="dialog" aria-labelledby="cm-submenu-modal"
    aria-hidden="true">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="exampleModalLabel">서브메뉴 추가</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <form>
                    <input type="hidden" name="id" class="cm-submenu-cateogryid">
                    <div class="form-group">
                        <label class="col-form-label">카테고리명:</label>
                        <input type="text" class="form-control cm-submenu-categoryname">
                    </div>
                    <div class="form-group">
                        <label class="col-form-label">출력순서:</label>
                        <input type="number" class="form-control cm-submenu-dporder">
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">닫기</button>
                <button type="button" class="btn btn-primary cm-submenu-save">저장</button>
            </div>
        </div>
    </div>
</div>

<div class="modal fade cm-editdp-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
    aria-hidden="true">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">

            <div class="modal-body">


                <!-- Nav tabs -->
                <ul class="nav nav-tabs" role="tablist">
                    <li role="presentation" class="active"><a href=".cm-set-content-dptime" aria-controls="home"
                            role="tab" data-toggle="tab">예약관리</a></li>
                    <li role="presentation"><a href=".cm-set-content-display" aria-controls="profile" role="tab"
                            data-toggle="tab" data-name="grace">송출관리</a></li>
                    <li role="presentation"><a href=".cm-reg-content-grace" aria-controls="profile" role="tab"
                            data-toggle="tab">은혜충전 등록</a></li>
                </ul>

                <!-- Tab panes -->
                <div class="tab-content cm-tab-content">
                    <div role="tabpanel" class="tab-pane active cm-set-content-dptime">
                        <form action="/adm/support/upload" method="post" enctype="multipart/form-data">
                            <div class="form-group">
                                <label class="col-form-label">컨텐츠:</label>
                                <input type="text" class="form-control cm-set-dptime-content-title" readonly>
                            </div>  
                            <div class="form-group">
                                <label class="col-form-label">예약시간:</label>
                                <input type="text" class="form-control cm-set-dptime">
                            </div>                            
                        </form>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-secondary" data-dismiss="modal">닫기</button>
                            <button type="button" class="btn btn-primary">저장</button>
                        </div>
                    </div>
                    <div role="tabpanel" class="tab-pane cm-set-content-display">
                        <form action="/adm/content/upload" method="post" enctype="multipart/form-data">
                            <div class="form-group row">
                                <label class="checkbox-inline">
                                    <input type="radio" value="home" class="cm-set-content-dp-part"
                                        name="dp_part" checked> 홈
                                </label>
                                <label class="checkbox-inline">
                                    <input type="radio" value="submenu-top" class="cm-set-content-dp-part"
                                        name="dp_part" checked> 서브메뉴 상단
                                </label>
                                <label class="checkbox-inline">
                                    <input type="radio" value="editor-home-top" class="cm-set-content-dp-part"
                                        name="dp_part"> 에디터 홈상단
                                </label>
                            </div>
                            <div class="form-group row cm-config-display cm-config-add">
                                <div style="margin-left:15px">
                                    <i class="glyphicon glyphicon-edit cm-saved-config-dp-edit-icon"></i>
                                    <select class="btn btn-default cm-saved-config-dp-edit-btn">
                                        <option value="">선택</option>
                                        <option value="edit">수정</option>
                                        <option value="delete">삭제</option>
                                    </select>
                                    <input type="number" class="form-control cm-set-content-order">
                                </div>
                                <div class="col-md-3">
                                    <input type="text" class="form-control cm-set-content-title-head" placeholder="말머리">
                                </div>
                                <div class="col-md-6" style="padding:0">
                                    <input type="text" class="form-control cm-set-content-title" placeholder="제목">
                                </div>
                            </div>
                            <div class="form-group">
                                <div><img src="" class="cm-uploaded-img"></div>
                                <input type="file" name="userfile" class="cm-upload-file">
                            </div>
                        </form>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-secondary" data-dismiss="modal">닫기</button>
                            <button type="button" class="btn btn-primary">저장</button>
                        </div>
                    </div>
                    <div role="tabpanel" class="tab-pane cm-reg-content-grace">
                        <div class="modal-footer">
                            <button type="button" class="btn btn-secondary" data-dismiss="modal">닫기</button>
                            <button type="button" class="btn btn-primary">저장</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<div class="modal fade cm-displayhome-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
    aria-hidden="true">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="exampleModalLabel">홈페이지 구성요소 관리</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <form>
                    <div class="form-group">
                        <label class="col-form-label">표시 제목:</label>
                        <input type="text" class="form-control cm-submenu-categoryname">
                    </div>
                    <div class="form-group">
                        <label class="col-form-label">이미지:</label>
                        <input type="text" class="form-control cm-submenu-dporder">
                    </div>
                    <div class="form-group">
                        <label class="col-form-label">컨텐츠 검색:</label>
                        <input type="button" class="btn btn-info">
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">닫기</button>
                <button type="button" class="btn btn-primary">저장</button>
            </div>
        </div>
    </div>
</div>

<div class="modal fade cm-displaysection-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
    aria-hidden="true">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="exampleModalLabel">홈페이지 구성요소 관리</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <form>
                    <div class="form-group">
                        <label class="col-form-label">표시 제목:</label>
                        <input type="text" class="form-control cm-submenu-categoryname">
                    </div>
                    <div class="form-group">
                        <label class="col-form-label">이미지:</label>
                        <input type="text" class="form-control cm-submenu-dporder">
                    </div>
                    <div class="form-group">
                        <label class="col-form-label">컨텐츠 검색:</label>
                        <input type="button" class="btn btn-info">
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">닫기</button>
                <button type="button" class="btn btn-primary">저장</button>
            </div>
        </div>
    </div>
</div>







<div class="modal fade cm-register-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
    aria-hidden="true">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="exampleModalLabel">홈페이지 구성요소 관리</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">

                <table class="table table-bordered">
                    <tbody>
                        <tr>
                            <th class="fw500">기능</th>
                            <td class="tl">
                                <input type="radio" name="life_type" value="1" checked=""> 일반라이프&nbsp;&nbsp;
                                <input type="radio" name="life_type" value="2"> 포토라이프&nbsp;&nbsp;
                                <input type="radio" name="life_type" value="3"> 동영상라이프&nbsp;&nbsp;
                                <input type="radio" name="life_type" value="4"> 영상링크라이프&nbsp;&nbsp;
                            </td>
                        </tr>
                        <tr>
                            <th class="fw500">카테고리</th>
                            <td class="tl">
                                <select name="category1" id="category1" onchange="change_category(1, this.value)"
                                    class="type01">
                                    <option value="">선택</option>
                                    <option value="5">말씀과 묵상</option>
                                    <option value="8">감동</option>
                                    <option value="10">지식</option>
                                    <option value="11">오피니언</option>
                                    <option value="17">책</option>
                                    <option value="22">크맵TV</option>
                                    <option value="24">자료실</option>
                                    <option value="26">기도공감</option>
                                    <option value="28">은혜충전</option>
                                    <option value="29">라이프</option>
                                    <option value="30">말씀엽서</option>
                                    <option value="31">크맵북스</option>
                                    <option value="32">데일리QT</option>
                                    <option value="33">영어묵상</option>
                                    <option value="34">지식충전</option>
                                    <option value="35">grace-category</option>
                                    <option value="36">crossmaptv-category</option>
                                    <option value="37">알쓸신학</option>
                                    <option value="38">찬양</option>
                                    <option value="39">소셜</option>
                                    <option value="40">말씀/QT</option>
                                    <option value="41">TV방송</option>
                                    <option value="46">grace</option>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <th class="fw500">채널</th>
                            <td class="tl">
                                <select name="category2" id="category2" onchange="change_category(2, this.value)"
                                    class="type01">
                                    <option value="">선택</option>
                                    <option value="3">말씀엽서</option>
                                    <option value="4">찬양콘티나눔</option>
                                    <option value="5">맘 울리는 이야기</option>
                                    <option value="6">운율이 있는 묵상</option>
                                    <option value="7">영어 한 컷</option>
                                    <option value="8">성경지식인</option>
                                    <option value="9">열방을 위한 기도</option>
                                    <option value="18">기도&amp;STORY</option>
                                    <option value="21">해외통신</option>
                                    <option value="25">그림 묵상</option>
                                    <option value="26">책 읽는 크리스천</option>
                                    <option value="27">묵상의 바다</option>
                                    <option value="42">말씀영상</option>
                                    <option value="43">찬양영상</option>
                                    <option value="44">간증</option>
                                    <option value="45">토크쇼</option>
                                    <option value="46">순교자의 소리</option>
                                    <option value="47">Open door</option>
                                    <option value="48">데일리 QT</option>
                                    <option value="49">기도24365</option>
                                    <option value="50">모퉁이돌 선교회</option>
                                    <option value="52">C포스트</option>
                                    <option value="51">자료실</option>
                                    <option value="53">신앙과 아이</option>
                                    <option value="54">말씀엽서채널</option>
                                    <option value="55">도서채널</option>
                                    <option value="56">데일리QT채널</option>
                                    <option value="57">영어묵상채널</option>
                                    <option value="58">Q&amp;A채널</option>
                                    <option value="59">찬양채널</option>
                                    <option value="60">소셜채널</option>
                                    <option value="61">말씀QT채널</option>
                                    <option value="62">TV방송채널</option>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <th class="fw500">에디터</th>
                            <td class="tl">
                                <select name="category3" id="category3" class="type01">
                                    <option value="">선택</option>
                                    <option value="1">오여정</option>
                                    <option value="2">숨은진주</option>
                                    <option value="3">하늘소</option>
                                    <option value="5">주님찬양해</option>
                                    <option value="6">하늘시인</option>
                                    <option value="7">노네임드</option>
                                    <option value="8">Lizzy</option>
                                    <option value="9">최성윤</option>
                                    <option value="10">바울과야고보</option>
                                    <option value="21">아침을 여는 기도</option>
                                    <option value="24">해외통신</option>
                                    <option value="43">하니</option>
                                    <option value="44">책벌레</option>
                                    <option value="46">은혜</option>
                                    <option value="49">하늘바보</option>
                                    <option value="50">탕자 아버지</option>
                                    <option value="60">말씀영상</option>
                                    <option value="61">찬양영상</option>
                                    <option value="62">간증</option>
                                    <option value="63">토크쇼</option>
                                    <option value="64">사랑이</option>
                                    <option value="65">은혜의 한줄</option>
                                    <option value="66">겨울</option>
                                    <option value="67">은혜의 감동</option>
                                    <option value="68">좋은 하루</option>
                                    <option value="69">주님 사랑</option>
                                    <option value="70">순교자의 소리</option>
                                    <option value="71">오픈도어선교회</option>
                                    <option value="72">콰이엇타임</option>
                                    <option value="73">기도24365</option>
                                    <option value="74">모퉁이돌</option>
                                    <option value="76">자료실지기</option>
                                    <option value="77">오피니언</option>
                                    <option value="79">알쓸신학</option>
                                    <option value="80">제이어스</option>
                                    <option value="81">MARKERS WORSHIP</option>
                                    <option value="82">CCM Factory 찬양공방</option>
                                    <option value="83">양치기 소년</option>
                                    <option value="84">worthking</option>
                                    <option value="85">말씀의검</option>
                                    <option value="86">C채널설교</option>
                                    <option value="87">말씀노트</option>
                                    <option value="88">말씀충전</option>
                                    <option value="89">크리스천투데이</option>
                                    <option value="90">CTS기독교TV</option>
                                    <option value="91">극동방송</option>
                                </select>

                            </td>
                        </tr>
                        <tr>
                            <th class="fw500">말머리</th>
                            <td class="tl">
                                <input type="text" name="head_title" id="head_title" class="type02" value="">
                            </td>
                        </tr>
                        <tr>
                            <th class="fw500">제목</th>
                            <td class="tl">
                                <input type="text" name="title" id="title" value="">
                            </td>
                        </tr>
                        <tr>
                            <th class="fw500">부제목</th>
                            <td class="tl">
                                <input type="text" name="sub_title" id="sub_title" value="">
                            </td>
                        </tr>
                        <tr>
                            <th class="fw500">메인이미지</th>
                            <td class="tl">

                                <input type="file" name="main_img" id="main_img" class="input00" size="100">

                                <input type="hidden" name="org_main_img" id="org_main_img" value="">

                            </td>
                        </tr>
                        <tr>
                            <th class="fw500">태그</th>
                            <td class="tl">
                                <input type="text" name="tag" id="tag" class="type01" value=""> 최대 5개까지 입력 가능(,로
                                구분해주세요.)
                            </td>
                        </tr>
                        <tr>
                            <th class="fw500">원본주소</th>
                            <td class="tl">
                                기사의 원본 주소를 입력하면 기사 클릭시 기사원본의 주소로 이동합니다.<br>
                                <input type="text" name="org_url" id="org_url" class="input00" value="">
                            </td>
                        </tr>
                        <tr>
                            <th class="fw500">youtube 주소</th>
                            <td class="tl">
                                https://youtu.be/<input type="text" name="video_url" id="video_url" class="input00"
                                    value="" style="width:200px"> (키만 넣어주세요.)
                            </td>
                        </tr>
                        <tr>
                            <th class="fw500">본문</th>
                            <td>
                                <!-- <textarea id="content" name="content"></textarea> -->
                                <textarea name="content" id="ir1" style="width:100%; height:500px;"></textarea>
                            </td>
                        </tr>
                        <tr>
                            <th class="fw500">조회수</th>
                            <td class="tl">
                                <input type="text" name="hit_count" id="hit_count" class="type03" value="0"> (관리자가 임의적으로
                                조회수를 설정할 수 있습니다.)
                            </td>
                        </tr>
                        <tr>
                            <th class="fw500">좋아요수</th>
                            <td class="tl">
                                <input type="text" name="like_count" id="like_count" class="type03" value="0"> (관리자가
                                임의적으로 좋아요수를 설정할 수 있으나 조회수 이상이 될 수는 없습니다)
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">닫기</button>
                <button type="button" class="btn btn-primary">저장</button>
            </div>
        </div>
    </div>
</div>