board_jsp

팡태(❁´◡`❁)·2022년 3월 15일
0

java

목록 보기
35/36

----------------------------updatebatch.jsp--------------

<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<head th:replace="~{/board/header :: headerFragment}"></head>

<body>
    <div style="padding:20px">
        <h3>글수정</h3>
        <hr />
        <form th:action="@{/board/updatebatch}" method="post">
            <input type="hidden" name="no" th:value="${board.no}" />
            제목 : <input type="text" name="title" th:value="${board.title}" /><br />
            내용 : <input type="text" name="content" th:value="${board.content}" /><br />
            작성자 : <input type="text" name="writer" th:value="${board.writer}" /><br />
            <input type="submit" value="글수정" />
            <a th:href="@{/board/selectlist}">글목록</a>
        </form>

        <div th:replace="~{/board/footer :: footerFragment}"></div>
    </body>
    </html>

-------------------------selectfind.jsp-------------------

<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<head th:replace="~{/board/header :: headerFragment}"></head>

<body>
    <div style="padding:20px">
        <h3>게시판</h3>
        <hr />
        
        <h3>1. 일치</h3>
        <form th:action="@{/board/selectfind}" method="get">
            <select name="type">
                <option value="title">제목</option>
                <option value="writer">작성자</option>
                <option value="hit">조회수</option>
            </select>
            <input type="text" name="text" placeholder="검색어" />
            <input type="submit" value="검색" />
        </form>

        <h3>2. 조회수 이상 미만</h3>
        <form th:action="@{/board/selectfind}" method="get">
            <select name="type1">
                <option value="1">이상</option>
                <option value="2">미만</option>
            </select>
            <input type="text" name="hit" placeholder="검색어" />
            <input type="submit" value="검색" />
        </form>

        <hr />
        <table class="table table-sm">
            <tr>
                <th>번호</th>
                <th>제목</th>
                <th>작성자</th>
                <th>조회수</th>
                <th>등록일</th>
            </tr>
            <tr th:each="tmp, idx: ${list}">
                <td th:text="${tmp.no}"></td> 
                <td th:text="${tmp.title}"></td> 
                <td th:text="${tmp.writer}"></td> 
                <td th:text="${tmp.hit}"></td> 
                <td th:text="${tmp.regdate}"></td>
            </tr>
        </table>
        <div th:replace="~{/board/footer :: footerFragment}"></div>
    </body>
    </html>

------------------insert.jsp------------------------------

<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>글쓰기</title>
    <link rel="stylesheet" type="text/css"
        th:href="@{/css/bootstrap.css}" />
    <script type="text/javascript"
        th:src="@{/js/bootstrap.min.js}"></script>
</head>

<body>
    <div style="padding:20px">
        <h3>글쓰기</h3>
        <hr />
        <form th:action="@{/board/insert}" method="post">
            제목: <input type="text" name="title"/><br />
            작성자: <input type="text" name="writer"/><br />
            내용: <input type="textarea" name="content"/><br />

            <button type="submit" class="btn btn-primary">글쓰기</button>
        </form>
    </div>
</body>
</html>

------------------selectlist.jsp--------------------------

<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<head th:replace="~{/board/header :: headerFragment}"></head>

<body>
    <div style="padding:20px">
        <h3>게시판</h3>
        <hr />
        <a th:href="@{/board/insert}">글쓰기</a>

        <form th:action="@{/board/action}" method="post">
            <input type="submit" name="btn" value="1개 삭제" />
            <input type="submit" name="btn" value="1개 수정" />
            <table class="table table-sm">
                <tr>
                    <th>radio</th>
                    <th>번호</th>
                    <th>제목</th>
                    <th>작성자</th>
                    <th>조회수</th>
                    <th>등록일</th>
                </tr>
                <tr th:each="tmp, idx: ${list}">
                    <td><input type="radio" name="rad" th:value="${tmp.no}" /></td>
                    <td th:text="${tmp.no}"></td> 
                    <td th:text="${tmp.title}"></td> 
                    <td th:text="${tmp.writer}"></td> 
                    <td th:text="${tmp.hit}"></td> 
                    <td th:text="${tmp.regdate}"></td>
                </tr>
            </table>
        </form>
        <div th:replace="~{/board/footer :: footerFragment}"></div>
    </body>
    </html>

0개의 댓글