불필요파일삭제

This commit is contained in:
KNKIM 2021-11-12 15:41:14 +09:00
parent 169258fbb4
commit c564adb49e
8 changed files with 0 additions and 1518 deletions

View File

@ -1,83 +0,0 @@
<%
/**
* <pre>
* @Class Name : getSampleInfo.jsp
*
* @Description : RESTful API 호출 샘플
*
*
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
*
* </pre>
*
* @ ------------ -------- ---------------------------
* @ 수정일 수정자 수정내용
* @ ------------ -------- ---------------------------
* @ 2021. 6. 15. KNKIM 최초 생성
*
*
* @author 이씨플라자 * DIGITALSHIP KNKIM
* @since 2021. 6. 15.
* @version 1.0
*
*/
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
<c:set var="pageTitle">QRCode 회원정보</c:set>
<!DOCTYPE html>
<html>
<head>
<title>${pageTitle}</title>
<!-- W2UI -->
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/js/w2ui/w2ui-nlib.css" />
<script type="text/javascript" src="${pageContext.request.contextPath}/js/w2ui/w2ui-1.5.min.js"></script>
</head>
<body>
<!-- javascript warning tag -->
<noscript class="noScriptTitle"><spring:message code="common.noScriptTitle.msg" /></noscript>
<form:form commandName="reqInfo"
action="${pageContext.request.contextPath}/sample/barcode/getMemberQRCode.do" method="post"
target="_blank"
onSubmit="fncAuthorInsert(document.forms[0]); return false;">
<div id="grid" style="width: 100%; height: 250px;"></div>
</form:form>
<script type="text/javaScript" language="javascript">
$(function () {
$('#grid').w2grid({
name: 'grid',
header: 'List of Names',
columns: [
{ field: 'fname', text: '이름', size: '30%' },
{ field: 'lname', text: '성명', size: '30%' },
{ field: 'email', text: '이메일', size: '40%' },
{ field: 'sdate', text: '시작일자', size: '120px' }
],
records: [
{ recid: 1, fname: "Peter", lname: "Jeremia", email: 'peter@mail.com', sdate: '2/1/2010' },
{ recid: 2, fname: "Bruce", lname: "Wilkerson", email: 'bruce@mail.com', sdate: '6/1/2010' },
{ recid: 3, fname: "John", lname: "McAlister", email: 'john@mail.com', sdate: '1/16/2010' },
{ recid: 4, fname: "Ravi", lname: "Zacharies", email: 'ravi@mail.com', sdate: '3/13/2007' },
{ recid: 5, fname: "William", lname: "Dembski", email: 'will@mail.com', sdate: '9/30/2011' },
{ recid: 6, fname: "David", lname: "Peterson", email: 'david@mail.com', sdate: '4/5/2010' }
]
});
});
</script>
</body>
</html>

View File

@ -1,207 +0,0 @@
<%
/**
* <pre>
* @Class Name : insertQnAForm.jsp
*
* @Description : 묻고답하기 등록화면을 표출한다.
*
*
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
*
* </pre>
*
* @ ------------ -------- ---------------------------
* @ 수정일 수정자 수정내용
* @ ------------ -------- ---------------------------
* @ 2021. 7. 13. KNKIM 최초 생성
*
*
* @author 이씨플라자 * DIGITALSHIP KNKIM
* @since 2021. 7. 13.
* @version 1.0
*
*/
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
<c:set var="pageTitle">묻고답하기 - 등록</c:set>
<!DOCTYPE html>
<html>
<head>
<title>${pageTitle}</title>
<!-- File Upload : 시작 -->
<link rel="stylesheet" href="${pageContext.request.contextPath}/js/fileupload/dropzone.css" />
<link rel="stylesheet" href="${pageContext.request.contextPath}/js/fileupload/style.css" />
<script src="${pageContext.request.contextPath}/js/fileupload/dropzone.js"></script>
<!-- File Upload : 종료 -->
<script type="text/javaScript">
var myDropzone = null; <% // 파일드롭다운 객체 %>
var fileList = new Array(); <% // 업로드된 파일 정보 %>
var IN_PROC = false; <% // 현재 상태가 업로드처리중에 있는지 여부 %>
$(document).ready(function() {
// 파일업로드 객체 생성
myDropzone = new Dropzone("form#myDropzone", { url: "${pageContext.request.contextPath}/fileupload/uploadFilesAjax.do?subPathKey=fileupload.bbs.qna.subpath"});
// 각 파일별 업로드 성공시 호출됨 (1th called)
myDropzone.on("success", function(file, responseText) {
var jobj = JSON.parse(responseText);
console.log("file upload success : responseText = " + responseText);
console.log("fileUpDone count : " + fileList.length);
var idx = fileList.length;
fileList[idx] = {
"orignlFileNm" : jobj[0].orignlFileNm,
"streFileNm" : jobj[0].streFileNm,
"fileMg" : jobj[0].fileMg,
};
console.log("success : " + file.name + " -> " + "data > " + jobj[0].streFileNm);
//alert("file : status " + file.status);
});
// 각 파일별 업로드 처리 완료 시 호출됨 (2th called)
myDropzone.on("complete", function(file) {
console.log("개별 파일 처리 완료 > file = " + JSON.stringify(file));
});
// 모든 업로드 처리 완료 시 호출됨
myDropzone.on("queuecomplete", function() {
var targetCnt = this.getAcceptedFiles().length;
var uploadCnt = fileList.length;
if(uploadCnt > 0) {
$("#fileList").val(JSON.stringify(JSON.stringify(fileList)));
}
if(IN_PROC) {
if(targetCnt > 0 && targetCnt != uploadCnt) {
alert("총 " + targetCnt + "건의 첨부파일 중 " + uploadCnt + "건이 정상적으로 업로드 되었습니다. 게시물 등록을 계속 진행합니다.");
}
fn_insertSubmit();
}
});
});
// 목록으로 이동
function fn_list() {
$('#articleForm').removeAttr('onsubmit');
$("#articleForm").attr("action", "${pageContext.request.contextPath}/board/listQnAs.do");
$("#articleForm").submit();
}
// 등록 처리
function fn_insert() {
if(!validEmail($("#email").val())) {
alert("이메일 형식에 맞지 않습니다. 다시 확인하여 주시기 바랍니다.");
$("#email").focus();
return false;
}
$("#articleForm").attr("action", "${pageContext.request.contextPath}/board/insertQnA.do");
if(!confirm("저장하시겠습니까?")) return false;
IN_PROC = true;
// 파일 업로드 처리
if(myDropzone.getAcceptedFiles().length > 0) {
myDropzone.processQueue();
return false;
}
return true;
}
//등록 처리
function fn_insertSubmit() {
$('#articleForm').removeAttr('onsubmit');
$("#articleForm").attr("action", "${pageContext.request.contextPath}/board/insertQnA.do");
$("#articleForm").submit();
}
</script>
</head>
<body>
<h1>${pageTitle }</h1>
메시지 : <span style="color:red;">${message }</span>
<br />
<form name="articleForm" id="articleForm"
action="${pageContext.request.contextPath}/board/insertQnA.do"
method="post"
onsubmit="return fn_insert();">
<!-- HIDDEN 영역 : 시작 -->
<input type="text" name="pageIndex" id="pageIndex" title="페이지번호" value="${pageIndex}" readonly />
<input type="text" name="pageSize" id="pageSize" title="목록에 보여줄 글 개수" value="${pageSize}" readonly />
<input type="text" name="searchKeyword" id="searchKeyword" title="검색어" value="${searchKeyword}" readonly />
<input type="text" name="fileList" id="fileList" title="업로드파일목록" value="" readonly />
&nbsp;<br/>
&nbsp;<br/>
<table class="table_content" style="width:100% !important;">
<tr>
<th>제목</th>
<td><input type="text" name="title" id="title" title="제목" value="${title}" size="100" maxlength="200" required /></td>
</tr>
<tr>
<th>작성자</th>
<td><input type="text" name="regUserName" id="regUserName" title="작성자" value="${regUserName}" size="100" maxlength="200" required /></td>
</tr>
<tr>
<th>비밀번호</th>
<td><input type="text" name="articlePassword" id="articlePassword" title="비밀번호" value="${articlePassword}" size="100" maxlength="200" required /><br/>
* 비밀번호 : SHA-256 암호화 처리 후, DB에 저장되며, 웹 화면에 표출될 때는 Aria로 AuthKey를 Salt값으로 하여 재암호화처리하고 BASE64로 다시한번 인코딩하여 표출함
</td>
</tr>
<tr>
<th>이메일</th>
<td><input type="email" name="email" id="email" title="이메일" value="${email}" size="100" maxlength="200" required /></td>
</tr>
<tr>
<th>질문내용</th>
<td><textarea name="contentQeust" id="contentQeust" cols="80" rows="10" required >${contentQeust}</textarea></td>
</tr>
</table>
<br/>
<input type="button" name="btnCancel" id="btnCancel" title="취소버튼" class="float" value="취소"
onclick="fn_list()" />
<input type="submit" name="btnSave" id="btnSave" title="저장버튼" class="float" value="저장" />
</form>
&nbsp;<br/>
&nbsp;<br/>
&nbsp;<br/>
<div id="dropzone">
<form id="myDropzone" name="myDropzone"
action="${pageContext.request.contextPath}/fileupload/uploadFile.do"
class="dropzone needsclick" >
<div class="dz-message needsclick">
<button type="button" class="dz-button">Drop files here or click to select files.</button><br />
<span class="note needsclick">이곳에 파일을 끌어다 놓거나, 클릭하여 올릴 파일을 선택하세요.</span>
</div>
</form>
</div>
</body>
</html>

View File

@ -1,253 +0,0 @@
<%
/**
* <pre>
* @Class Name : listFAQs.jsp
*
* @Description : FAQ 목록 화면
*
*
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
*
* </pre>
*
* @ ------------ -------- ---------------------------
* @ 수정일 수정자 수정내용
* @ ------------ -------- ---------------------------
* @ 2021. 8. 3. KNKIM 최초 생성
*
*
* @author 이씨플라자 * DIGITALSHIP KNKIM
* @since 2021. 8. 3.
* @version 1.0
*
*/
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
<c:set var="pageTitle">FAQ</c:set>
<!DOCTYPE html>
<html lang="ko">
<head>
<title>${pageTitle}</title>
<!-- GRID -->
<link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/js/jsgrid/nlib-jsgrid.css" />
<link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/js/jsgrid/nlib-jsgrid-theme.css" />
<script src="${pageContext.request.contextPath}/js/jsgrid/nlib-jsgrid.js"></script>
<script type="text/javaScript" language="javascript">
$( document ).ready(function() {
//=======================================================
// 그리드 생성 환경설정
//=======================================================
$("#jsGrid").jsGrid({
pageSize : $("#pageSize").val(),
scrollOffset:0,
controller: {
loadData: function (filter) { // 그리드에 데이터를 가져올 때 실팽되는 함수
var data = $.Deferred();
//======================================
// 요청 정보 구성 : 시작 (각 요청에 맞게 조정)
//======================================
var reqUrl = "${pageContext.request.contextPath}/board/listFAQsAjax.do";
var faqType = document.articleForm.faqType.value;
var searchKeyword = document.articleForm.searchKeyword.value;
var pageIndex = ( filter && filter.pageIndex ? filter.pageIndex : $("#pageIndex").val());
var pageSize = ( filter && filter.pageSize ? filter.pageSize : $("#pageSize").val());
$("#pageIndex").val(pageIndex);
var inputData = {
"searchKeyword" : searchKeyword
, "pageIndex" : pageIndex
, "pageSize": pageSize
, "faqType": faqType};
//--------------------------------------
// 요청 처리
//--------------------------------------
$.ajax({
type: "post",
contentType: "application/json; charset=utf-8",
url: reqUrl,
dataType: "json",
data: JSON.stringify(inputData),
}).done(function(response){
<%
// 그리드 데이터 예시 :
// (1) 페이징 클라이언트에서 수행하는 경우(pageloading = false) : [{ "articleNo": 1, "articleType": "01" }, { "articleNo": 2, "articleType": "02" }]
// (2) 페이징 서버에서 수행하는 경우(pageloading = true) : {data: [{...}], itemsCount: 255}
%>
data.resolve(JSON.parse(response));
});
return data.promise();
} // loadData
},
rowClick: function(args) { // 행 클릭 시, 실행되는 이벤트 함수
// 클릭된 행의 자료 객체
var getData = args.item;
// 추출할 컬럼의 데이터 가져오기
var articleNo = getData["articleNo"];
var selectedRow = $("#jsGrid").find('table tr.jsgrid-selected-row');
// 상세 내용 보기
fn_viewDetail(articleNo, selectedRow);
},
//======================================
// 그리드 컬럼 정의 (각 요청에 맞게 조정)
//======================================
fields: [
{ title:"구분", name: "articleGubun" , type: "text", width: 100, align: "center"},
{ title:"유형", name: "faqType" , type: "text", width: 100, align: "center"},
{ title:"제목", name: "title" , type: "text", width: 200, align: "left" }
]
});
// 페이지 크기 변경시 재조회
$("#pageSize").on("change", function(e) {
fn_searchArticle($("#pageSize").val(), 1);
});
// 유형 변경시 재조회
$("#faqType").on("change", function(e) {
fn_searchArticle($("#pageSize").val(), 1);
});
// 검색 버튼 클릭
$("#btnSearch").on("click", function(e) {
fn_searchArticle($("#pageSize").val(), 1);
});
//초기 자료 조회
fn_searchArticle();
}); // document ready
// 선택한 게시글 상세 보기로 이동
function fn_viewDetail(articleNo, selectedRow) {
var $selectedRow = $(selectedRow);
var reqUrl = "${pageContext.request.contextPath}/board/selectFAQAjax.do";
var searchKeyword = document.articleForm.searchKeyword.value;
var pageIndex = $("#pageIndex").val();
var pageSize = $("#pageSize").val();
var faqType = document.articleForm.faqType.value;
var inputData = {
"searchKeyword" : searchKeyword
, "pageIndex" : pageIndex
, "pageSize": pageSize
, "faqType": faqType};
//--------------------------------------
// 요청 처리
//--------------------------------------
$.ajax({
type: "post",
contentType: "application/json; charset=utf-8",
url: reqUrl,
dataType: "json",
data: JSON.stringify(inputData),
}).done(function(response){
var jsonObj = JSON.parse(response);
$("#jsGrid").find('table tr.answer').remove();
//alert("DDDDDDDD remove = " + $("#jsGrid")[0].scrollHeight);
$selectedRow.after("<tr class='answer'><td colspan='3'>" + jsonObj.content
+ "<br/>" + jsonObj.content
+ "<br/>" + jsonObj.content
+ "<br/>" + jsonObj.content
+ "<br/>" + jsonObj.content
+ "</td></tr>");
//alert("DDDDDDDD add = " + $("#jsGrid")[0].scrollHeight);
//$("#jsGrid").find('table.jsgrid-table.jsgrid-grid-body').height($("#jsGrid").find('table.jsgrid-table')[0].scrollHeight + 100);
});
$("#jsGrid").closest('.ui-jqgrid-bdiv').width($("#jsGrid").closest('.ui-jqgrid-bdiv').width() + 1);
}
// 게시글 작성으로 이동
function fn_newArticle() {
$("#articleNo").val("");
$("#articleForm").attr("action", "${pageContext.request.contextPath}/board/insertFAQForm.do");
$("#articleForm").submit();
}
// 그리드 데이터 조회 호출
function fn_searchArticle(pageSize, pageIndex) {
$("#jsGrid").jsGrid("search"
, {'pageSize' : (pageSize ? pageSize : fn_getIntValue("pageSize", ${pageSize}) ),
'pageIndex' : (pageIndex ? pageIndex : fn_getIntValue("pageIndex", 1))
}
);
}
function fn_changeFaqType(selectedFaqType) {
$('#faqType').val(selectedFaqType).trigger('change');
}
</script>
</head>
<body>
<h1>${pageTitle }</h1>
메시지 : ${message}
&nbsp;<br/>
<form name="articleForm" id="articleForm"
action="${pageContext.request.contextPath}/board/listFAQs.do"
method="post">
<!-- 검색조건 -->
<select name="pageSize" id="pageSize" title="목록에 보여줄 글 개수">
<c:forEach var="pageSizeItem" items="${pageSizeCodes}" varStatus="status">
<option value="<c:out value="${pageSizeItem.code }" />" <c:if test="${pageSizeItem.code == pageSize }">selected</c:if> ><c:out value="${pageSizeItem.name }" /></option>
</c:forEach>
</select>
<select name="faqType" id="faqType" title="공지사항 유형">
<option value="">유형</option>
<c:forEach var="faqTypeItem" items="${faqTypeCodes}" varStatus="status">
<option value="<c:out value="${faqTypeItem.code }" />" <c:if test="${faqTypeItem.code == faqType }">selected</c:if> ><c:out value="${faqTypeItem.name }" /></option>
</c:forEach>
</select>
<input type="text" name="pageIndex" id="pageIndex" title="페이지번호" value="${pageIndex }" size="5" maxlength="5" />
<input type="text" name="searchKeyword" id="searchKeyword" title="검색어" value="${searchKeyword }" size="35" maxlength="50" />
<input type="button" name="btnSearch" id="btnSearch" title="검색버튼" value="검색" />
<br/>
<a href="javascript:void(0)" onclick="fn_changeFaqType('')" <c:if test="${'' == faqType }"> class="selected" </c:if> >전체</a>
<c:forEach var="faqTypeItem" items="${faqTypeCodes}" varStatus="status">
<a href="javascript:void(0)" onclick="fn_changeFaqType('<c:out value="${faqTypeItem.code }" />')" <c:if test="${faqTypeItem.code == faqType }"> class="selected" </c:if> ><c:out value="${faqTypeItem.name }" /></a>
</c:forEach>
<div id="jsGrid" name="jsGrid" style="height: 100%"></div>
<input type="text" name="articleNo" id="articleNo" value="" title="선택글번호" readonly />
</form>
</body>
</html>

View File

@ -1,236 +0,0 @@
<%
/**
* <pre>
* @Class Name : listNotices.jsp
*
* @Description : 공지사항 목록을 조회한다.
*
*
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
*
* </pre>
*
* @ ------------ -------- ---------------------------
* @ 수정일 수정자 수정내용
* @ ------------ -------- ---------------------------
* @ 2021. 6. 15. KNKIM 최초 생성
*
*
* @author 이씨플라자 * DIGITALSHIP KNKIM
* @since 2021. 6. 15.
* @version 1.0
*
*/
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
<c:set var="pageTitle">공지사항</c:set>
<!DOCTYPE html>
<html lang="ko">
<head>
<title>${pageTitle}</title>
<!-- GRID -->
<link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/js/jsgrid/nlib-jsgrid.css" />
<link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/js/jsgrid/nlib-jsgrid-theme.css" />
<script src="${pageContext.request.contextPath}/js/jsgrid/nlib-jsgrid.js"></script>
<script type="text/javaScript" language="javascript">
$(function() {
alert("ok");
});
$( document ).ready(function() {
var MyDateField = function(config) {
jsGrid.Field.call(this, config);
};
MyDateField.prototype = new jsGrid.Field({
sorter: function(date1, date2) {
return new Date(date1) - new Date(date2);
},
itemTemplate: function(value) {
return new Date(value).toDateString();
},
insertTemplate: function(value) {
return this._insertPicker = $("<input>").datepicker({ defaultDate: new Date() });
},
editTemplate: function(value) {
return this._editPicker = $("<input>").datepicker().datepicker("setDate", new Date(value));
},
insertValue: function() {
return this._insertPicker.datepicker("getDate").toISOString();
},
editValue: function() {
return this._editPicker.datepicker("getDate").toISOString();
}
});
jsGrid.fields.myDateField = MyDateField;
//=======================================================
// 그리드 생성 환경설정
//=======================================================
$("#jsGrid").jsGrid({
pageSize : $("#pageSize").val(),
controller: {
loadData: function (filter) { // 그리드에 데이터를 가져올 때 실팽되는 함수
var data = $.Deferred();
//======================================
// 요청 정보 구성 : 시작 (각 요청에 맞게 조정)
//======================================
var reqUrl = "${pageContext.request.contextPath}/board/listNoticesAjax.do";
var articleType = document.articleForm.articleType.value;
var searchKeyword = document.articleForm.searchKeyword.value;
var pageIndex = ( filter && filter.pageIndex ? filter.pageIndex : $("#pageIndex").val());
var pageSize = ( filter && filter.pageSize ? filter.pageSize : $("#pageSize").val());
$("#pageIndex").val(pageIndex);
var inputData = {
"searchKeyword" : searchKeyword
, "pageIndex" : pageIndex
, "pageSize": pageSize
, "articleType": articleType};
//--------------------------------------
// 요청 처리
//--------------------------------------
$.ajax({
type: "post",
contentType: "application/json; charset=utf-8",
url: reqUrl,
dataType: "json",
data: JSON.stringify(inputData),
}).done(function(response){
<%
// 그리드 데이터 예시 :
// (1) 페이징 클라이언트에서 수행하는 경우(pageloading = false) : [{ "articleNo": 1, "articleType": "01" }, { "articleNo": 2, "articleType": "02" }]
// (2) 페이징 서버에서 수행하는 경우(pageloading = true) : {data: [{...}], itemsCount: 255}
%>
data.resolve(JSON.parse(response));
});
return data.promise();
} // loadData
},
rowClick: function(args) { // 행 클릭 시, 실행되는 이벤트 함수
// 클릭된 행의 자료 객체
var getData = args.item;
// 추출할 컬럼의 데이터 가져오기
var articleNo = getData["articleNo"];
// 상세 내용 보기
fn_viewDetail(articleNo);
},
//======================================
// 그리드 컬럼 정의 (각 요청에 맞게 조정)
//======================================
fields: [
{ title:"상시공지", name: "noticeTop", type: "text", width: 50, align: "center"},
{ title:"번호", name: "articleNo" , type: "number", width: 50, align: "center"},
{ title:"유형", name: "articleType" , type: "text", width: 100, align: "center"},
{ title:"제목", name: "title" , type: "text", width: 200, align: "left" },
{ title:"작성자", name: "regUserName", type: "text", width: 50, align: "center" },
{ title:"등록일", name: "regDate" , type: "text", width: 100, align: "center"},
{ title:"최근", name: "new" , type: "text", width: 100, align: "center"}
]
});
// 페이지 크기 변경시 재조회
$("#pageSize").on("change", function(e) {
fn_searchArticle($("#pageSize").val(), 1);
});
// 검색 버튼 클릭
$("#btnSearch").on("click", function(e) {
fn_searchArticle($("#pageSize").val(), 1);
});
//초기 자료 조회
fn_searchArticle();
}); // document ready
// 선택한 게시글 상세 보기로 이동
function fn_viewDetail(articleNo) {
$("#articleNo").val(articleNo);
$("#articleForm").attr("action", "${pageContext.request.contextPath}/board/selectNotice.do");
$("#articleForm").submit();
}
// 게시글 작성으로 이동
function fn_newArticle() {
$("#articleNo").val("");
$("#articleForm").attr("action", "${pageContext.request.contextPath}/board/insertNoticeForm.do");
$("#articleForm").submit();
}
// 그리드 데이터 조회 호출
function fn_searchArticle(pageSize, pageIndex) {
$("#jsGrid").jsGrid("search"
, {'pageSize' : (pageSize ? pageSize : fn_getIntValue("pageSize", ${pageSize}) ),
'pageIndex' : (pageIndex ? pageIndex : fn_getIntValue("pageIndex", 1))
}
);
}
</script>
</head>
<body>
<h1>${pageTitle }</h1>
메시지 : ${message}
&nbsp;<br/>
<form name="articleForm" id="articleForm"
action="${pageContext.request.contextPath}/board/listNotices.do"
method="post">
<!-- 검색조건 -->
<select name="pageSize" id="pageSize" title="목록에 보여줄 글 개수">
<c:forEach var="pageSizeItem" items="${pageSizeCodes}" varStatus="status">
<option value="<c:out value="${pageSizeItem.code }" />" <c:if test="${pageSizeItem.code == pageSize }">selected</c:if> ><c:out value="${pageSizeItem.name }" /></option>
</c:forEach>
</select>
<select name="articleType" id="articleType" title="공지사항 유형">
<option value="">유형</option>
<c:forEach var="articleTypeItem" items="${articleTypeCodes}" varStatus="status">
<option value="<c:out value="${articleTypeItem.code }" />" <c:if test="${articleTypeItem.code == articleType }">selected</c:if> ><c:out value="${articleTypeItem.name }" /></option>
</c:forEach>
</select>
<input type="text" name="pageIndex" id="pageIndex" title="페이지번호" value="${pageIndex }" size="5" maxlength="5" />
<input type="text" name="searchKeyword" id="searchKeyword" title="검색어" value="${searchKeyword }" size="35" maxlength="50" />
<input type="button" name="btnSearch" id="btnSearch" title="검색버튼" value="검색" />
<div id="jsGrid" name="jsGrid" style="height: 100%"></div>
<input type="text" name="articleNo" id="articleNo" value="" title="선택글번호" readonly />
</form>
</body>
</html>

View File

@ -1,192 +0,0 @@
<%
/**
* <pre>
* @Class Name : listQnAs.jsp
*
* @Description : 묻고답하기 목록을 조회한다.
*
*
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
*
* </pre>
*
* @ ------------ -------- ---------------------------
* @ 수정일 수정자 수정내용
* @ ------------ -------- ---------------------------
* @ 2021. 7. 13. KNKIM 최초 생성
*
*
* @author 이씨플라자 * DIGITALSHIP KNKIM
* @since 2021. 7. 13.
* @version 1.0
*
*/
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
<c:set var="pageTitle">묻고답하기</c:set>
<!DOCTYPE html>
<html lang="ko">
<head>
<title>${pageTitle}</title>
<!-- GRID -->
<link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/js/jsgrid/nlib-jsgrid.css" />
<link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/js/jsgrid/nlib-jsgrid-theme.css" />
<script src="${pageContext.request.contextPath}/js/jsgrid/nlib-jsgrid.js"></script>
<script type="text/javaScript" language="javascript">
$( document ).ready(function() {
//=======================================================
// 그리드 생성 환경설정
//=======================================================
$("#jsGrid").jsGrid({
pageSize : $("#pageSize").val(),
controller: {
loadData: function (filter) { // 그리드에 데이터를 가져올 때 실팽되는 함수
var data = $.Deferred();
//======================================
// 요청 정보 구성 : 시작 (각 요청에 맞게 조정)
//======================================
var reqUrl = "${pageContext.request.contextPath}/board/listQnAsAjax.do";
var searchKeyword = document.articleForm.searchKeyword.value;
var pageIndex = ( filter && filter.pageIndex ? filter.pageIndex : $("#pageIndex").val());
var pageSize = ( filter && filter.pageSize ? filter.pageSize : $("#pageSize").val());
$("#pageIndex").val(pageIndex);
var inputData = {
"searchKeyword" : searchKeyword
, "pageIndex" : pageIndex
, "pageSize": pageSize};
//--------------------------------------
// 요청 처리
//--------------------------------------
$.ajax({
type: "post",
contentType: "application/json; charset=utf-8",
url: reqUrl,
dataType: "json",
data: JSON.stringify(inputData),
}).done(function(response){
<%
// 그리드 데이터 예시 :
// (1) 페이징 클라이언트에서 수행하는 경우(pageloading = false) : [{ "articleNo": 1, "articleType": "01" }, { "articleNo": 2, "articleType": "02" }]
// (2) 페이징 서버에서 수행하는 경우(pageloading = true) : {data: [{...}], itemsCount: 255}
%>
data.resolve(JSON.parse(response));
});
return data.promise();
} // loadData
},
rowClick: function(args) { // 행 클릭 시, 실행되는 이벤트 함수
// 클릭된 행의 자료 객체
var getData = args.item;
// 추출할 컬럼의 데이터 가져오기
var articleNo = getData["articleNo"];
// 상세 내용 보기
fn_viewDetail(articleNo);
},
//======================================
// 그리드 컬럼 정의 (각 요청에 맞게 조정)
//======================================
fields: [
{ title:"번호", name: "articleNo" , type: "number" , width: 50, align: "center"},
{ title:"제목", name: "title", type: "text" , width: 200, align: "left" },
{ title:"작성자", name: "writerName", type: "number", width: 50, align: "center" },
{ title:"등록일", name: "regDate", type: "text", width: 100, align: "center"},
{ title:"상태", name: "replyStatus", type: "text", width: 80, align: "center" }
]
});
// 페이지 크기 변경시 재조회
$("#pageSize").on("change", function(e) {
fn_searchArticle($("#pageSize").val(), 1);
});
// 검색 버튼 클릭
$("#btnSearch").on("click", function(e) {
fn_searchArticle($("#pageSize").val(), 1);
});
//초기 자료 조회
fn_searchArticle();
}); // document ready
// 선택한 게시글 상세 보기로 이동
function fn_viewDetail(articleNo) {
$("#articleNo").val(articleNo);
$("#articleForm").attr("action", "${pageContext.request.contextPath}/board/selectQnA.do");
$("#articleForm").submit();
}
// 게시글 작성으로 이동
function fn_newArticle() {
$("#articleNo").val("");
$("#articleForm").attr("action", "${pageContext.request.contextPath}/board/insertQnAForm.do");
$("#articleForm").submit();
}
// 그리드 데이터 조회 호출
function fn_searchArticle(pageSize, pageIndex) {
$("#jsGrid").jsGrid("search"
, {'pageSize' : (pageSize ? pageSize : fn_getIntValue("pageSize", ${pageSize}) ),
'pageIndex' : (pageIndex ? pageIndex : fn_getIntValue("pageIndex", 1))
}
);
}
</script>
</head>
<body>
<h1>${pageTitle }</h1>
메시지 : ${message}
&nbsp;<br/>
<form name="articleForm" id="articleForm"
action="${pageContext.request.contextPath}/board/listQnAs.do"
method="post">
<!-- 검색조건 -->
<select name="pageSize" id="pageSize" title="목록에 보여줄 글 개수">
<c:forEach var="pageSizeItem" items="${pageSizeCodes}" varStatus="status">
<option value="<c:out value="${pageSizeItem.code }" />" <c:if test="${pageSizeItem.code == pageSize }">selected</c:if> ><c:out value="${pageSizeItem.name }" /></option>
</c:forEach>
</select>
<input type="text" name="pageIndex" id="pageIndex" title="페이지번호" value="${pageIndex }" size="5" maxlength="5" />
<input type="text" name="searchKeyword" id="searchKeyword" title="검색어" value="${searchKeyword }" size="35" maxlength="50" />
<input type="button" name="btnSearch" id="btnSearch" title="검색버튼" value="검색" />
<div id="jsGrid" name="jsGrid" style="height: 100%"></div>
<button type="button" name="btnNew" id="btnNew" class="float" title="글쓰기버튼"
onclick="fn_newArticle()">글쓰기</button>
<input type="text" name="articleNo" id="articleNo" value="" title="선택글번호" readonly />
</form>
</body>
</html>

View File

@ -1,197 +0,0 @@
<%
/**
* <pre>
* @Class Name : selectNotice.jsp
*
* @Description : 공지사항 상세내용을 조회한다.
*
*
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
*
* </pre>
*
* @ ------------ -------- ---------------------------
* @ 수정일 수정자 수정내용
* @ ------------ -------- ---------------------------
* @ 2021. 7. 22. KNKIM 최초 생성
*
*
* @author 이씨플라자 * DIGITALSHIP KNKIM
* @since 2021. 7. 22.
* @version 1.0
*
*/
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
<c:set var="pageTitle">공지사항 - 상세조회</c:set>
<!DOCTYPE html>
<html lang="ko">
<head>
<title>${pageTitle}</title>
<script type="text/javaScript" language="javascript">
$(function() {
alert("ok");
});
// 이전글/다음글 상세 보기로 이동
function fn_view_detail(articleNo) {
$("#articleNo").val(articleNo);
$("#articleForm").attr("action", "${pageContext.request.contextPath}/board/selectNotice.do");
$("#articleForm").submit();
}
// 목록으로 이동
function fn_list() {
$("#articleForm").attr("action", "${pageContext.request.contextPath}/board/listNotices.do");
$("#articleForm").submit();
}
// 수정 화면 이동
function fn_updateForm(passwd) {
if(passwd == null || passwd == "") {
alert("수정을 위한 게시물의 비밀번호를 입력하여 주시기 바랍니다.");
return;
}
$("#articlePassword").val(passwd);
$("#articleForm").attr("action", "${pageContext.request.contextPath}/board/updateNoticeForm.do");
$("#articleForm").submit();
}
// 수정위한 비밀번호 확인
function fn_updatePassword() {
fn_promptPassword("수정을 위한 글 비밀번호를 입력하여 주시기 바랍니다.", "111", "fn_updateForm")
}
// 삭제위한 비밀번호 확인
function fn_deletePassword() {
fn_promptPassword("삭제를 위한 글 비밀번호를 입력하여 주시기 바랍니다.", "111", "fn_delete")
}
// 삭제 처리
function fn_delete(passwd) {
if(passwd == null || passwd == "") {
alert("삭제를 위한 게시물의 비밀번호를 입력하여 주시기 바랍니다.");
return;
}
$("#articlePassword").val(passwd);
$("#articleForm").attr("action", "${pageContext.request.contextPath}/board/deleteNotice.do");
$("#articleForm").submit();
}
// 파일 다운로드
function fn_downloadFile(fid, fname) {
if(fid == null || fid.trim().length < 1) {
alert("파일정보를 확인해 주시기 바랍니다.[1]");
return;
}
if(fname == null || fname.trim().length < 1) {
alert("파일정보를 확인해 주시기 바랍니다.[2]");
return;
}
$("#fid").val(fid);
$("#fname").val(fname);
$("#downloadFileForm").submit();
}
</script>
</head>
<body>
<h1>${pageTitle }</h1>
메시지 : <span style="color:red;">${message }</span>
<br />
<form name="articleForm" id="articleForm"
action="${pageContext.request.contextPath}/board/listNotices.do"
method="post">
<!-- HIDDEN 영역 : 시작 -->
<input type="text" name="pageIndex" id="pageIndex" title="페이지번호" value="${pageIndex}" readonly />
<input type="text" name="pageSize" id="pageSize" title="목록에 보여줄 글개수" value="${pageSize}" readonly />
<input type="text" name="searchKeyword" id="searchKeyword" title="검색어" value="${searchKeyword}" readonly />
<input type="text" name="articleNo" id="articleNo" title="선택글번호" value="${articleNo}" readonly />
<input type="text" name="articleType" id="articleType" title="유형" value="${articleType}" readonly />
<!-- HIDDEN 영역 : 종료 -->
<table class="table_content" style="width:100% !important; margin-top: 20px;">
<tr>
<th>유형</th>
<td>${article.articleTypeName }</td>
<th>작성일</th>
<td>${article.regDate }</td>
</tr>
<tr>
<th rowspan="1">제목</th>
<td colspan="3">${article.title}</td>
</tr>
<tr>
<th rowspan="1">질문내용</th>
<td colspan="3">${article.contentNotice}</td>
</tr>
<tr>
<td colspan="4">
<%
// 파일정보 : 저장파일ID=원파일명
%>
<c:set var="contentNoticeFileList" value="${fn:split(article.contentNoticeFile,';')}" />
<c:forEach var="contentNoticeFileItem" items="${contentNoticeFileList }">
<c:set var="fInfo" value="${fn:split(contentNoticeFileItem,'=')}" />
<a href="javascript:void(0);" onclick="fn_downloadFile('${fInfo[0]}', '${fInfo[1]}')">${fInfo[1]}</a><br/>
</c:forEach>
</td>
</tr>
</table>
<br/>
<table class="table_content" style="width:100% !important;">
<tr>
<th>이전글</th>
<td>${preArticle.articleTypeName }</td>
<td><a href="javascript:void(0)" onclick="fn_view_detail('${preArticle.articleNo }')">${preArticle.title }</a></td>
<th>작성일 : ${preArticle.regDate }</th>
</tr>
<tr>
<th>다음글</th>
<td>${nextArticle.articleTypeName }</td>
<td><a href="javascript:void(0)" onclick="fn_view_detail('${nextArticle.articleNo }')">${nextArticle.title }</a></td>
<th>작성일 : ${nextArticle.regDate }</th>
</tr>
</table>
<!-- 관련 작업 버튼 -->
<button type="button" name="btnList" id="btnList" class="float"
onclick="fn_list()">목록</button>
</form>
<br />
<!-- 첨부파일 다운로드용 폼 -->
<form name="downloadFileForm" id="downloadFileForm"
action="${pageContext.request.contextPath}/fileupload/downloadFiles.do"
method="post">
<input type="text" name="subPathKey" id="subPathKey" value="fileupload.bbs.qna.subpath" readonly />
<input type="text" name="fid" id="fid" value="" readonly />
<input type="text" name="fname" id="fname" value="" readonly />
</form>
</body>
</html>

View File

@ -1,217 +0,0 @@
<%
/**
* <pre>
* @Class Name : selectQnA.jsp
*
* @Description : 묻고답하기 상세내용을 조회한다.
*
*
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
*
* </pre>
*
* @ ------------ -------- ---------------------------
* @ 수정일 수정자 수정내용
* @ ------------ -------- ---------------------------
* @ 2021. 7. 22. KNKIM 최초 생성
*
*
* @author 이씨플라자 * DIGITALSHIP KNKIM
* @since 2021. 7. 22.
* @version 1.0
*
*/
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
<c:set var="pageTitle">묻고답하기 - 상세조회</c:set>
<!DOCTYPE html>
<html lang="ko">
<head>
<title>${pageTitle}</title>
<script type="text/javaScript" language="javascript">
// 이전글/다음글 상세 보기로 이동
function fn_view_detail(articleNo) {
$("#articleNo").val(articleNo);
$("#articleForm").attr("action", "${pageContext.request.contextPath}/board/selectQnA.do");
$("#articleForm").submit();
}
// 목록으로 이동
function fn_list() {
$("#articleForm").attr("action", "${pageContext.request.contextPath}/board/listQnAs.do");
$("#articleForm").submit();
}
// 수정 화면 이동
function fn_updateForm(passwd) {
if(passwd == null || passwd == "") {
alert("수정을 위한 게시물의 비밀번호를 입력하여 주시기 바랍니다.");
return;
}
$("#articlePassword").val(passwd);
$("#articleForm").attr("action", "${pageContext.request.contextPath}/board/updateQnAForm.do");
$("#articleForm").submit();
}
// 수정위한 비밀번호 확인
function fn_updatePassword() {
fn_promptPassword("수정을 위한 글 비밀번호를 입력하여 주시기 바랍니다.", "111", "fn_updateForm")
}
// 삭제위한 비밀번호 확인
function fn_deletePassword() {
fn_promptPassword("삭제를 위한 글 비밀번호를 입력하여 주시기 바랍니다.", "111", "fn_delete")
}
// 삭제 처리
function fn_delete(passwd) {
if(passwd == null || passwd == "") {
alert("삭제를 위한 게시물의 비밀번호를 입력하여 주시기 바랍니다.");
return;
}
$("#articlePassword").val(passwd);
$("#articleForm").attr("action", "${pageContext.request.contextPath}/board/deleteQnA.do");
$("#articleForm").submit();
}
// 파일 다운로드
function fn_downloadFile(fid, fname) {
if(fid == null || fid.trim().length < 1) {
alert("파일정보를 확인해 주시기 바랍니다.[1]");
return;
}
if(fname == null || fname.trim().length < 1) {
alert("파일정보를 확인해 주시기 바랍니다.[2]");
return;
}
$("#fid").val(fid);
$("#fname").val(fname);
$("#downloadFileForm").submit();
}
</script>
</head>
<body>
<h1>${pageTitle }</h1>
메시지 : <span style="color:red;">${message }</span>
<br />
<form name="articleForm" id="articleForm"
action="${pageContext.request.contextPath}/board/listQnAs.do"
method="post">
<!-- HIDDEN 영역 : 시작 -->
<input type="text" name="pageIndex" id="pageIndex" title="페이지번호" value="${pageIndex}" readonly />
<input type="text" name="pageSize" id="pageSize" title="목록에 보여줄 글개수" value="${pageSize}" readonly />
<input type="text" name="searchKeyword" id="searchKeyword" title="검색어" value="${searchKeyword}" readonly />
<input type="text" name="articleNo" id="articleNo" title="선택글번호" value="${articleNo}" readonly />
<input type="text" name="articleType" id="articleType" title="유형" value="${articleType}" readonly />
<input type="text" name="articlePassword" id="articlePassword" title="글비밀번호" value="${articlePassword}" readonly />
<!-- HIDDEN 영역 : 종료 -->
<table class="table_content" style="width:100% !important; margin-top: 20px;">
<tr>
<th>유형</th>
<td>${article.articleTypeName }</td>
<th>작성자 : ${article.regUserName }</th>
<th>작성일 : ${article.regDate }</th>
<th>상태 : ${article.repStatus }</th>
</tr>
<tr>
<th rowspan="2">질문내용</th>
<td colspan="4">${article.contentQeust}</td>
</tr>
<tr>
<td colspan="4">
<%
// 파일정보 : 저장파일ID=원파일명
%>
<c:set var="contentQeustFileList" value="${fn:split(article.contentQeustFile,';')}" />
<c:forEach var="contentQuestFileItem" items="${contentQeustFileList }">
<c:set var="fInfo" value="${fn:split(contentQuestFileItem,'=')}" />
<a href="javascript:void(0);" onclick="fn_downloadFile('${fInfo[0]}', '${fInfo[1]}')">${fInfo[1]}</a><br/>
</c:forEach>
</td>
</tr>
<tr>
<th rowspan="2">답변내용</th>
<td colspan="4">${article.contentReply}</td>
</tr>
<tr>
<td colspan="4">
<%
// 파일정보 : 저장파일ID=원파일명
%>
<c:set var="contentReplyFileList" value="${fn:split(article.contentReplyFile,';')}" />
<c:forEach var="contentReplyFileItem" items="${contentReplyFileList }">
<c:set var="fInfo" value="${fn:split(contentReplyFileItem,'=')}" />
<a href="javascript:void(0);" onclick="fn_downloadFile('${fInfo[0]}', '${fInfo[1]}')">${fInfo[1]}</a><br/>
</c:forEach>
</td>
</tr>
</table>
<br/>
<table class="table_content" style="width:100% !important;">
<tr>
<th>이전글</th>
<td>${preArticle.articleTypeName }</td>
<td><a href="javascript:void(0)" onclick="fn_view_detail('${preArticle.articleNo }')">${preArticle.title }</a></td>
<th>작성자 : ${preArticle.regUserName }</th>
<th>작성일 : ${preArticle.regDate }</th>
<th>상태 : ${preArticle.repStatus }</th>
</tr>
<tr>
<th>다음글</th>
<td>${nextArticle.articleTypeName }</td>
<td><a href="javascript:void(0)" onclick="fn_view_detail('${nextArticle.articleNo }')">${nextArticle.title }</a></td>
<th>작성자 : ${nextArticle.regUserName }</th>
<th>작성일 : ${nextArticle.regDate }</th>
<th>상태 : ${nextArticle.repStatus }</th>
</tr>
</table>
<!-- 관련 작업 버튼 -->
<button type="button" name="btnList" id="btnList" class="float"
onclick="fn_list()">목록</button>
<button type="button" name="btnUpdate" id="btnUpdate" class="float"
onclick="fn_updatePassword()">수정</button>
<button type="button" name="btnDelete" id="btnDelete" class="float"
onclick="fn_deletePassword()">삭제</button>
</form>
<br />
<!-- 첨부파일 다운로드용 폼 -->
<form name="downloadFileForm" id="downloadFileForm"
action="${pageContext.request.contextPath}/fileupload/downloadFiles.do"
method="post">
<input type="text" name="subPathKey" id="subPathKey" value="fileupload.bbs.qna.subpath" readonly />
<input type="text" name="fid" id="fid" value="" readonly />
<input type="text" name="fname" id="fname" value="" readonly />
</form>
</body>
</html>

View File

@ -1,133 +0,0 @@
<%
/**
* <pre>
* @Class Name : updateQnAForm.jsp
*
* @Description : 묻고답하기 수정화면을 표출한다.
*
*
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
*
* </pre>
*
* @ ------------ -------- ---------------------------
* @ 수정일 수정자 수정내용
* @ ------------ -------- ---------------------------
* @ 2021. 7. 23. KNKIM 최초 생성
*
*
* @author 이씨플라자 * DIGITALSHIP KNKIM
* @since 2021. 7. 23.
* @version 1.0
*
*/
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
<c:set var="pageTitle">묻고답하기 - 수정</c:set>
<!DOCTYPE html>
<html>
<head>
<title>${pageTitle}</title>
<script type="text/javaScript">
//선택한 게시글 상세 보기로 이동
function fn_viewDetail(articleNo) {
$('#articleForm').removeAttr('onsubmit');
$("#articleNo").val(articleNo);
$("#articleForm").attr("action", "${pageContext.request.contextPath}/board/selectQnA.do");
$("#articleForm").submit();
}
// 선택한 게시글 상세 보기로 이동
function fn_list() {
$("#articleForm").attr("action", "${pageContext.request.contextPath}/board/listQnAs.do");
$("#articleForm").submit();
}
// 수정 처리
function fn_update() {
if(!validEmail($("#email").val())) {
alert("이메일 형식에 맞지 않습니다. 다시 확인하여 주시기 바랍니다.");
$("#email").focus();
return false;
}
$("#articleForm").attr("action", "${pageContext.request.contextPath}/board/updateQnA.do");
if(!confirm("저장하시겠습니까?")) return false;
return true;
}
</script>
</head>
<body>
<h1>${pageTitle }</h1>
메시지 : <span style="color:red;">${message }</span>
<br />
<form name="articleForm" id="articleForm"
action="${pageContext.request.contextPath}/board/updateQnA.do"
method="post"
onsubmit="return fn_update();">
<!-- HIDDEN 영역 : 시작 -->
<input type="text" name="pageIndex" id="pageIndex" title="페이지번호" value="${pageIndex}" readonly />
<input type="text" name="pageSize" id="pageSize" title="목록에 보여줄 글 개수" value="${pageSize}" readonly />
<input type="text" name="searchKeyword" id="searchKeyword" title="검색어" value="${searchKeyword}" readonly />
<input type="text" name="articleNo" id="articleNo" title="선택글번호" value="${articleNo}" readonly />
&nbsp;<br/>
&nbsp;<br/>
<table class="table_content" style="width:100% !important;">
<tr>
<th>제목</th>
<td><input type="text" name="title" id="title" title="제목" value="${article.title}" size="100" maxlength="200" required /></td>
</tr>
<tr>
<th>작성자</th>
<td><input type="text" name="regUserName" id="regUserName" title="작성자" value="${article.regUserName}" size="100" maxlength="200" required /></td>
</tr>
<tr>
<th>이메일</th>
<td><input type="email" name="email" id="email" title="이메일" value="${article.email}" size="100" maxlength="200" required /></td>
</tr>
<tr>
<th>기존비밀번호</th>
<td><input type="text" name="encArticlePassword" id="encArticlePassword" title="제목" value="${encArticlePassword}" size="100" maxlength="200" /></td>
</tr>
<tr>
<th>비밀번호<br/>(변경시 입력)</th>
<td><input type="text" name="articlePassword" id="articlePassword" title="비밀번호" value="" size="100" maxlength="200" /><br/>
</td>
</tr>
<tr>
<th>질문내용</th>
<td><textarea name="contentQeust" id="contentQeust" cols="80" rows="10">${article.contentQeust}</textarea></td>
</tr>
</table>
<br/>
<input type="button" name="btnCancel" id="btnCancel" title="취소버튼" class="float" value="취소"
onclick="fn_viewDetail('${articleNo}')" />
<input type="submit" name="btnSave" id="btnSave" title="저장버튼" class="float" value="저장" />
</form>
</body>
</html>