sboard/list.jsp > SPRING1

본문 바로가기
사이트 내 전체검색

SPRING1

sboard/list.jsp

페이지 정보

profile_image
작성자 관리자
댓글 0건 조회 125회 작성일 24-08-01 10:02

본문

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>


<%@ include file="/WEB-INF/views/include/header.jsp" %>


<script>

var result = "${msg}";


if(result == "register"){

alert("작성 완료!");

}else if(result == "delete"){

alert("삭제 완료!");

}else if(result == "modify"){

alert("수정 완료!");

}

</script>

<script>

function change(ppn){

location.href="list?page=1&perPageNum="+ppn+"&searchType=${cri.searchType}&keyword=${cri.keyword}";

}

</script>


<center>


<h3>LIST PAGE</h3>


<table border=0 width=700>

<tr>

<td>

Total : ${pageMaker.totalCount }

<select name="perPageNum" onchange="change(this.value)">

<option value="1" <c:if test="${pageMaker.cri.perPageNum == 1}">selected</c:if>>1개</option>

<option value="2" <c:if test="${pageMaker.cri.perPageNum == 2}">selected</c:if>>2개</option>

<option value="4" <c:if test="${pageMaker.cri.perPageNum == 4}">selected</c:if>>4개</option>

<option value="5" <c:if test="${pageMaker.cri.perPageNum == 5}">selected</c:if>>5개</option>

<option value="10" <c:if test="${pageMaker.cri.perPageNum == 10}">selected</c:if>>10개</option>

</select>

</td>

<td align=right>

<!-- search 시작 -->

<form method="get">

<input type="hidden" name="perPageNum" value="${pageMaker.cri.perPageNum}">

<select name="searchType">

<option value="n" ${cri.searchType == null?'selected':''}>---</option>

<option value="t" ${cri.searchType eq 't'?'selected':''}>Title</option>

<option value="c" ${cri.searchType eq 'c'?'selected':''}>Content</option>

<option value="w" ${cri.searchType eq 'w'?'selected':''}>Writer</option>

<option value="tc" ${cri.searchType eq 'tc'?'selected':''}>Title OR Content</option>

<option value="cw" ${cri.searchType eq 'cw'?'selected':''}>Content OR Writer</option>

<option value="tcw" ${cri.searchType eq 'tcw'?'selected':''}>Title OR Content OR Writer</option>

</select>

<input type="text" name='keyword' id="keywordInput" value='${cri.keyword }'>

<input type="submit" value="Search">

</form>

<!-- search 끝 -->

</td>

</tr>

<tr><td height=5 colspan=2></td></tr>

</table>

<table border=1 width=700>

<tr>

<th style="width:30px">NO</th>

<th>TITLE</th>

<th style="width:76px">WRITER</th>

<th style="width:160px">REGDATE</th>

<th style="width:40px">CNT</th>

</tr>

<c:set var="number" value="${pageMaker.totalCount - (pageMaker.cri.page - 1) * pageMaker.cri.perPageNum }" />

<c:forEach var="boardVO" items="${list}">

<tr>

<td align=center>${number }</td>

<td>

<a href="read${pageMaker.makeSearch(pageMaker.cri.page)}&bno=${boardVO.bno }">${boardVO.title }</a>

<c:if test="${boardVO.replycount > 0 }">

<span style="color:red">[${boardVO.replycount }]</span>

</c:if>

</td>

<td align=center>${boardVO.writer }</td>

<!-- <td>${boardVO.regdate }</td>  -->

<td align=center><fmt:formatDate pattern="yyyy-MM-dd HH:mm:ss" value="${boardVO.regdate }"/></td>

<td align=center>${boardVO.viewcnt }</td>

</tr>

<c:set var="number" value="${number - 1 }"/> 

</c:forEach>

</table>

<br>

<table border=0 width=700>

<tr>

<td align=right><a href="register${pageMaker.makeSearch(pageMaker.cri.page)}">[글쓰기]</a></td>

</tr>

</table>


<!-- 페이징 추가 -->

<table border=1>

<tr>

<c:if test="${pageMaker.prev}">

<td><a href="list${pageMaker.makeSearch(pageMaker.startPage - 1)}">&laquo;</a></td>

</c:if>


<c:forEach var="idx" begin="${pageMaker.startPage }" end="${pageMaker.endPage }">

<td>

<c:if test="${pageMaker.cri.page == idx}"><b></c:if>

<a href="list${pageMaker.makeSearch(idx)}">${idx}</a>

<c:if test="${pageMaker.cri.page == idx}"></b></c:if>

</td>

</c:forEach>


<c:if test="${pageMaker.next && pageMaker.endPage > 0}">

<td><a href="list${pageMaker.makeSearch(pageMaker.endPage +1)}">&raquo;</a></td>

</c:if>

</tr>

</table>


</center>


<%@ include file="/WEB-INF/views/include/footer.jsp" %>

댓글목록

등록된 댓글이 없습니다.

회원로그인

회원가입

사이트 정보

공지사항
자유게시판
질문답변
1:1문의

 

별명 : 터푸가위
주소 : 부산시 동래구 명장로20번길 90
대표 : 박규태
메일 : dancepkt@******.com

접속자집계

오늘
229
어제
210
최대
10,760
전체
268,231
Copyright © dancePKT . All rights reserved.