<!DOCTYPE html>
<html lang="ja">
    <head>
        <title>会議室予約(滋賀PJ)</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="icon" href="favicon.ico">
        <script src="https://code.jquery.com/jquery-3.7.1.min.js" integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous"></script>
        <link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
        <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@event-calendar/build@3.4.0/event-calendar.min.css">
        <script src="https://cdn.jsdelivr.net/npm/@event-calendar/build@3.4.0/event-calendar.min.js"></script>
        <script src="https://cdn.jsdelivr.net/npm/dayjs@1.11.9/dayjs.min.js"></script>
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.css">
        <script src="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.js"></script>
        <link href="https://use.fontawesome.com/releases/v6.2.0/css/all.css" rel="stylesheet">
        <link rel="stylesheet" href="meeting.css" type="text/css">
    </head>
    <body class="w3-khaki" oncontextmenu="return false;">
        <div class="w3-row w3-rest">
            <div class="btnLeft">
                <h2 id="title">会議室予約(滋賀PJ)</h2>
                <button id="reloadbtn" style="font-size:24px;margin-top:23px;">
                    <i class="fa fa-refresh"></i>
                </button>
            </div>
            <div class="btnRight">
                <button id="multi">
                    一括登録 <i class="fa-solid fa-arrow-up-right-from-square"></i>
                </button>
                <button id="mentenance">
                    <i class="fa-solid fa-screwdriver-wrench"></i>
                </button>
            </div>
        </div>
        <div class="w3-row">
            <div id="calendarCol" class="w3-col">
                <div id="calendarArea" class="w3-card w3-sand">
                    <div id="calendar"></div>
                    <div id="btnArea">
                        <button class="w3-btn w3-white w3-border w3-round-large" id="prev" type="button">前の月</button>
                        <button class="w3-btn w3-white w3-border w3-round-large" id="thisMonth" type="button">今月</button>
                        <button class="w3-btn w3-white w3-border w3-round-large" id="next" type="button">次の月</button>
                    </div>
                </div>
            </div>
            <div class="w3-rest">
                <div id="eventArea" class="w3-card w3-sand">
                    <div id="ec" class="col"></div>
                </div>
            </div>
        </div>
        <dialog id="dialog">
            <form id="form" method="dialog">
                <div>
                    <div class="btnLeft">
                        <h2>【予約登録】</h2>
                    </div>
                    <div class="btnRight">
                        <button id="cancel" type="reset" class="w3-btn w3-grey w3-border w3-round-large">
                            <i class="fa fa-close"></i>
                        </button>
                    </div>
                </div>
                <h3 id="room-name"></h3>
                <h3 id="date"></h3>
                <div class="row">
                    <label for="start">Start:</label>
                    <button type="button" id="stm30btn" class="w3-button w3-tiny w3-grey w3-border w3-border-grey w3-round-large w3-hover-red w3-padding-small">-30</button>
                    <button type="button" id="stm5btn" class="w3-button w3-tiny w3-grey w3-border w3-border-grey w3-round-large w3-hover-red w3-padding-small">-5</button>
                    <input type="time" id="start" name="start-time" step="300">
                    <button type="button" id="stp5btn" class="w3-button w3-tiny w3-grey w3-border w3-border-grey w3-round-large w3-hover-blue w3-padding-small">+5</button>
                    <button type="button" id="stp30btn" class="w3-button w3-tiny w3-grey w3-border w3-border-grey w3-round-large w3-hover-blue w3-padding-small">+30</button>
                </div>
                <div class="row">
                    <label for="end">End:</label>
                    <button type="button" id="etm30btn" class="w3-button w3-tiny w3-grey w3-border w3-border-grey w3-round-large w3-hover-red w3-padding-small">-30</button>
                    <button type="button" id="etm5btn" class="w3-button w3-tiny w3-grey w3-border w3-border-grey w3-round-large w3-hover-red w3-padding-small">-5</button>
                    <input type="time" id="end" name="end-time" step="300">
                    <button type="button" id="etp5btn" class="w3-button w3-tiny w3-grey w3-border w3-border-grey w3-round-large w3-hover-blue w3-padding-small">+5</button>
                    <button type="button" id="etp30btn" class="w3-button w3-tiny w3-grey w3-border w3-border-grey w3-round-large w3-hover-blue w3-padding-small">+30</button>
                </div>
                <div class="row">
                    <label for="color">Color:</label>
                    <input type="color" id="color" name="favcolor" value="#ff0000">
                </div>
                <div class="row">
                    <label for="comment">Comment:</label>
                    <textarea id="comment" name="comment"></textarea>
                </div>
                <div>
                    <div class="btnLeft">
                        <button id="delete" type="submit" class="w3-btn w3-red w3-border w3-round-large" disabled>削除</button>
                    </div>
                    <div class="btnRight">
                        <button id="confirm" type="submit" class="w3-btn w3-blue w3-border w3-round-large">登録</button>
                    </div>
                </div>
            </form>
        </dialog>
        <script id="script" type="text/javascript" src="meeting.js" data-param1='<?php echo json_encode($resources)?>' data-param2='<?php echo json_encode($events)?>'></script>
    </body>
</html>
