Merge branch '매인베너수정'

This commit is contained in:
hehihoho3@gmail.com 2025-02-24 16:21:39 +09:00
commit b055b0b710
10 changed files with 2873 additions and 0 deletions

View File

@ -0,0 +1,29 @@
package itn.com.uss.ion.bnr.sub.service;
import java.util.List;
import java.util.Map;
import itn.com.uss.ion.pwm.service.MainzoneVO;
import itn.com.uss.ion.pwm.service.PopupManageVO;
import itn.com.uss.ion.pwm.service.PopupzoneVO;
import itn.com.uss.ion.pwm.service.SocialVO;
import itn.com.uss.ion.pwm.service.SortVO;
/**
* 개요
* - 팝업창에 대한 Service Interface를 정의한다.
*
* 상세내용
* - 팝업창에 대한 등록, 수정, 삭제, 조회, 반영확인 기능을 제공한다.
* - 팝업창의 조회기능은 목록조회, 상세조회, 팝업사용자 보기로 구분된다.
* @author 이창원
* @version 1.0
* @created 05-8-2009 오후 2:19:58
*/
public interface SubMainZoneManageService {
public List<?> selectSubMainzoneList(MainzoneVO mainzoneVO) throws Exception;
public int selectSubMainzoneCount(MainzoneVO mainzoneVO) throws Exception;
}

View File

@ -0,0 +1,286 @@
package itn.com.uss.ion.bnr.sub.service.impl;
import java.util.List;
import org.springframework.stereotype.Repository;
import egovframework.rte.psl.dataaccess.util.EgovMap;
import itn.com.cmm.service.impl.EgovComAbstractDAO;
import itn.com.uss.ion.pwm.service.MainzoneVO;
import itn.com.uss.ion.pwm.service.PopupManageVO;
import itn.com.uss.ion.pwm.service.PopupzoneVO;
import itn.com.uss.ion.pwm.service.SocialVO;
import itn.com.uss.ion.pwm.service.SortVO;
/**
* 개요
* - 팝업창에 대한 DAO를 정의한다.
*
* 상세내용
* - 팝업창에 대한 등록, 수정, 삭제, 조회, 반영확인 기능을 제공한다.
* - 팝업창의 조회기능은 목록조회, 상세조회로, 사용자화면 보기로 구분된다.
* @author 이창원
* @version 1.0
* @created 05-8-2009 오후 2:21:04
*/
@Repository("subMainZoneManageDAO")
public class SubMainZoneManageDAO extends EgovComAbstractDAO {
/**
* 메인이미지 목록을 조회한다.
* @return 목록
* @exception Exception
*/
public List<?> selectSubMainzoneList(MainzoneVO mainzoneVO ) throws Exception{
return list("subMainzoneManage.selectSubMainzoneList", mainzoneVO);
}
public int selectSubMainzoneCount(MainzoneVO mainzoneVO) throws Exception{
return (int)select("subMainzoneManage.selectSubMainzoneCount", mainzoneVO);
}
//
// public SubMainZoneManageDAO(){}
//
// /**
// * 등록된 팝업창정보를 삭제한다.
// * @param popupManage - 팝업창 model
// * @return boolean - 반영성공 여부
// *
// * @param popupManage
// */
// public void deletePopup(PopupManageVO popupManageVO) throws Exception {
// delete("PopupManage.deletePopupManage", popupManageVO);
// }
//
// /**
// * 팝업창정보를 신규로 등록한다.
// * @param popupManage - 팝업창 model
// * @return boolean - 반영성공 여부
// *
// * @param popupManage
// */
// public void insertPopup(PopupManageVO popupManageVO) throws Exception {
// insert("PopupManage.insertPopupManage", popupManageVO);
// }
//
// /**
// * 등록된 팝업창정보를 수정한다.
// * @param popupManage - 팝업창 model
// * @return boolean - 반영성공 여부
// *
// * @param popupManage
// */
// public void updatePopup(PopupManageVO popupManageVO) throws Exception {
// update("PopupManage.updatePopupManage", popupManageVO);
// }
//
// /**
// * 팝업창을 사용자 화면에서 볼수 있는 정보들을 조회한다.
// * @param popupManageVO - 팝업창 Vo
// * @return popupManageVO - 팝업창 Vo
// *
// * @param popupManageVO
// */
// public PopupManageVO selectPopup(PopupManageVO popupManageVO) throws Exception {
// return (PopupManageVO)select("PopupManage.selectPopupManageDetail", popupManageVO);
// }
//
// /**
// * 팝업창를 관리하기 위해 등록된 팝업창목록을 조회한다.
// * @param popupManageVO - 팝업창 Vo
// * @return List - 팝업창 목록
// *
// * @param popupManageVO
// */
// public List<?> selectPopupList(PopupManageVO popupManageVO) throws Exception {
// return list("PopupManage.selectPopupManage", popupManageVO);
// }
//
// /**
// * 팝업창를 관리하기 위해 등록된 팝업창목록 총갯수를 조회한다.
// * @param popupManageVO - 팝업창 Vo
// * @return List - 팝업창 목록
// *
// * @param popupManageVO
// */
// public int selectPopupListCount(PopupManageVO popupManageVO) throws Exception {
// return (Integer)select("PopupManage.selectPopupManageCnt", popupManageVO);
// }
//
// /**
// * 팝업창를 사용하기 위해 등록된 팝업창목록을 조회한다.
// * @param popupManageVO - 팝업창 Vo
// * @return List - 팝업창 목록
// *
// * @param popupManageVO
// */
// public List<?> selectPopupMainList(PopupManageVO popupManageVO) throws Exception {
// return list("PopupManage.selectPopupManageMain", popupManageVO);
// }
//
// /**
// * 메인알림창 목록을 조회한다.
// * @return 목록
// * @exception Exception
// */
// public List<?> selectPopupzoneList(PopupzoneVO popupzoneVo) throws Exception{
// return list("PopupzoneManage.selectPopupzoneList", popupzoneVo);
// }
//
// /**
// * 메인배너 순번정보를 가져온다.
// * @param mode - 0:등록 1:수정
// * @return 순번정보
// * @exception Exception
// */
// @SuppressWarnings("unchecked")
// public List<EgovMap> getSortList() throws Exception{
// return (List<EgovMap>) list("PopupzoneManage.getSortList",null);
// }
//
// public PopupzoneVO selectPopupzoneVO(String pozId) throws Exception {
// return (PopupzoneVO)select("PopupzoneManage.selectPopupzoneVO", pozId);
// }
//
// /**
// * 메인배너 변경할때 나머지 배너들 순서 변경
// * @param 입력된 sort번호
// * @return 등록 결과
// * @exception Exception
// */
// public void updateSortUp(SortVO sortVO) throws Exception{
// update("PopupzoneManage.updateSortUp", sortVO);
// }
//
// public void updateSortDown(SortVO sortVO) throws Exception {
// update("PopupzoneManage.updateSortDown", sortVO);
// }
//
// public void updatePopupzone(PopupzoneVO popupzoneVO) throws Exception {
// update("PopupzoneManage.updatePopupzone", popupzoneVO);
// }
//
// /**
// * 메인알림창을 삭제한다.
// * @param pozId - 삭제할 메인알림창 번호
// * @return void형
// * @exception Exception
// */
// public void deletePopupzone(String pozId) throws Exception {
// delete("PopupzoneManage.deletePopupzone", pozId);
// }
//
// public int getMaxSort() throws Exception{
// return (Integer)select("PopupzoneManage.getMaxSort") ;
// }
//
// /**
// * 메인배너의 새로운seq를 가지고온다.
// * @return seq
// * @exception Exception
// */
// public int selectNextSeq() throws Exception{
// return (Integer)select("PopupzoneManage.selectNextSeq");
// }
//
// public void insertPopupzone(PopupzoneVO popupzoneVO) throws Exception{
// insert("PopupzoneManage.insertPopupzone", popupzoneVO);
// }
//
// public void resetSort(PopupzoneVO popupzoneVO) throws Exception{
// update("PopupzoneManage.resetSort", popupzoneVO);
// }
//
// /**
// * 메인이미지 목록을 조회한다.
// * @return 목록
// * @exception Exception
// */
// public List<?> selectMainzoneList(MainzoneVO mainzoneVO ) throws Exception{
// return list("MainzoneManage.selectMainzoneList", mainzoneVO);
// }
//
// public int getMainMaxSort() throws Exception{
// return (Integer)select("MainzoneManage.getMainMaxSort");
// }
//
// public void insertMainzone(MainzoneVO mainzoneVO) throws Exception{
// insert("MainzoneManage.insertMainzone", mainzoneVO);
// }
//
// public void resetMainSort(MainzoneVO mainzoneVO) throws Exception{
// insert("MainzoneManage.resetMainSort", mainzoneVO);
// }
//
// public void updateMainSortUp(SortVO sortVO) throws Exception{
// update("MainzoneManage.updateMainSortUp", sortVO);
// }
//
// public MainzoneVO selectMainzoneVO(String mazId) throws Exception{
// return (MainzoneVO)select("MainzoneManage.selectMainzoneVO", mazId);
// }
//
// @SuppressWarnings("unchecked")
// public List<EgovMap> getMainSortList() throws Exception{
// return (List<EgovMap>) list("MainzoneManage.getMainSortList",null);
// }
//
// public void deleteMainzone(String mazId) throws Exception{
// delete("MainzoneManage.deleteMainzone", mazId);
// }
//
// public void updateMainSortDown(SortVO sortVO) throws Exception{
// update("MainzoneManage.updateMainSortDown", sortVO);
// }
//
// public void updateMainzone(MainzoneVO mainzoneVO) throws Exception{
// update("MainzoneManage.updateMainzone", mainzoneVO);
// }
//
// @SuppressWarnings("unchecked")
// public List<MainzoneVO> selectMainzoneListRolling() throws Exception{
// return (List<MainzoneVO>) list("MainzoneManage.selectMainzoneListRolling");
// }
//
// public int selectPopupzoneListTotCnt(PopupzoneVO popupzoneVo) throws Exception {
// return (int)select("PopupzoneManage.selectPopupzoneListTotCnt", popupzoneVo);
// }
//
// public int selectMainzoneCount(MainzoneVO mainzoneVO) throws Exception{
// return (int)select("MainzoneManage.selectMainzoneCount", mainzoneVO);
// }
//
// public void resetVOSort(PopupzoneVO popupzoneVO) throws Exception{
// update("PopupzoneManage.resetVOSort", popupzoneVO);
// }
//
// public void resetMainVOSort(MainzoneVO mainzoneVO) throws Exception{
// update("MainzoneManage.resetMainVOSort", mainzoneVO);
// }
//
// @SuppressWarnings("unchecked")
// public List<SocialVO> selectSocialList(SocialVO socialVO) throws Exception{
// return (List<SocialVO>) list("SocialManage.selectSocialList",socialVO);
// }
//
// public SocialVO selectSocialVO(String socialId) throws Exception{
// return (SocialVO)select("SocialManage.selectSocialVO", socialId);
// }
//
// public void updateSocial(SocialVO socialVO) throws Exception{
// update("SocialManage.updateSocial", socialVO);
// }
//
// public void resetSocialSort(SocialVO socialVO) throws Exception{
// update("SocialManage.resetSocialSort", socialVO);
// }
//
// public void insertSocial(SocialVO socialVO) throws Exception{
// insert("SocialManage.insertSocial", socialVO);
// }
//
// public void deleteSocial(String id) throws Exception{
// delete("SocialManage.deleteSocial", id);
// }
}

View File

@ -0,0 +1,60 @@
package itn.com.uss.ion.bnr.sub.service.impl;
import java.math.BigDecimal;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl;
import egovframework.rte.fdl.idgnr.EgovIdGnrService;
import egovframework.rte.psl.dataaccess.util.EgovMap;
import itn.com.uss.ion.bnr.sub.service.SubMainZoneManageService;
import itn.com.uss.ion.pwm.service.MainzoneVO;
import itn.com.uss.ion.pwm.service.PopupManageVO;
import itn.com.uss.ion.pwm.service.PopupzoneVO;
import itn.com.uss.ion.pwm.service.SocialVO;
import itn.com.uss.ion.pwm.service.SortVO;
import itn.com.uss.ion.pwm.service.impl.PopupManageDAO;
import itn.com.uss.ion.pwm.service.impl.PopupzoneManageDAO;
/**
* 개요
* - 팝업창에 대한 ServiceImpl을 정의한다.
*
* 상세내용
* - 팝업창에 대한 등록, 수정, 삭제, 조회, 반영확인 기능을 제공한다.
* - 팝업창의 조회기능은 목록조회, 상세조회로, 사용자화면 보기로 구분된다.
* @author 이창원
* @version 1.0
* @created 05-8-2009 오후 2:19:58
*/
@Service("subMainZoneManageService")
public class SubMainZoneManageServiceImpl extends EgovAbstractServiceImpl implements SubMainZoneManageService {
@Resource(name = "subMainZoneManageDAO")
public SubMainZoneManageDAO dao;
/** PopupzoneManageDAO */
@Resource(name="popupzoneManageDAO")
private PopupzoneManageDAO popupzoneManageDAO;
@Resource(name = "egovPopupManageIdGnrService")
private EgovIdGnrService idgenService;
@Override
public List<?> selectSubMainzoneList(MainzoneVO mainzoneVO) throws Exception {
return dao.selectSubMainzoneList(mainzoneVO);
}
@Override
public int selectSubMainzoneCount(MainzoneVO mainzoneVO) throws Exception {
return dao.selectSubMainzoneCount(mainzoneVO);
}
}

File diff suppressed because it is too large Load Diff

View File

@ -2002,6 +2002,24 @@
<property name="fillChar" value="0" />
</bean>
<!-- 알림이미지 ID Generation Strategy Config -->
<bean name="egovSubMainZoneIdGnrService"
class="egovframework.rte.fdl.idgnr.impl.EgovTableIdGnrServiceImpl"
destroy-method="destroy">
<property name="dataSource" ref="dataSource" />
<property name="strategy" ref="subMainZoneStrategy" />
<property name="blockSize" value="10"/>
<property name="table" value="IDS"/>
<property name="tableName" value="MAZ_S_ID"/>
</bean>
<!-- 메인상단 이미지 ID Generation Strategy Config -->
<bean name="subMainZoneStrategy"
class="egovframework.rte.fdl.idgnr.impl.strategy.EgovIdGnrStrategyImpl">
<property name="prefix" value="MAZS_" />
<property name="cipers" value="12" />
<property name="fillChar" value="0" />
</bean>
<!-- 컨텐츠 관리 ID Generation Strategy Config -->
<bean name="egovCntManageIdGnrService"

View File

@ -4,4 +4,5 @@
<sqlMapConfig>
<sqlMap resource="egovframework/sqlmap/com/uss/ion/bnr/EgovBanner_SQL_Mysql.xml"/><!-- 배너 추가 -->
<sqlMap resource="egovframework/sqlmap/let/uss/ion/bnr/SubMainZoneManage_SQL_Mysql.xml"/><!-- 서브팝업관리 -->
</sqlMapConfig>

View File

@ -0,0 +1,132 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<!--
수정일 수정자 수정내용
=========== ======== =================================================
2011.10.06 이기하 보안 취약점 점검사항 반영 $->#변경
-->
<sqlMap namespace="UnityLink">
<typeAlias alias="egovMap" type="egovframework.rte.psl.dataaccess.util.EgovMap"/>
<typeAlias alias="comDefaultVO" type="itn.com.cmm.ComDefaultVO"/>
<typeAlias alias="PopupManageVO" type="itn.com.uss.ion.pwm.service.PopupManageVO" />
<typeAlias alias="popupzoneVO" type="itn.com.uss.ion.pwm.service.PopupzoneVO"/>
<typeAlias alias="mainzoneVO" type="itn.com.uss.ion.pwm.service.MainzoneVO"/>
<typeAlias alias="socialVO" type="itn.com.uss.ion.pwm.service.SocialVO"/>
<typeAlias alias="sortVO" type="itn.com.uss.ion.pwm.service.SortVO"/>
<!-- ::ResultMap 선언 -->
<resultMap id="PopupManageVOs" class="itn.com.uss.ion.pwm.service.PopupManageVO">
<result property="popupId" column="POPUP_ID" columnIndex="1"/>
<result property="popupTitleNm" column="POPUP_SJ_NM" columnIndex="2"/>
<result property="fileUrl" column="FILE_URL" columnIndex="3"/>
<result property="popupHlc" column="POPUP_VRTICL_LC" columnIndex="4"/>
<result property="popupWlc" column="POPUP_WIDTH_LC" columnIndex="5"/>
<result property="popupHSize" column="POPUP_VRTICL_SIZE" columnIndex="6"/>
<result property="popupWSize" column="POPUP_WIDTH_SIZE" columnIndex="7"/>
<result property="ntceBgnde" column="NTCE_BGNDE" columnIndex="8"/>
<result property="ntceEndde" column="NTCE_ENDDE" columnIndex="9"/>
<result property="stopVewAt" column="STOPVEW_SETUP_AT" columnIndex="10"/>
<result property="ntceAt" column="NTCE_AT" columnIndex="11"/>
<result property="frstRegisterPnttm" column="FRST_REGIST_PNTTM" columnIndex="12"/>
<result property="frstRegisterId" column="FRST_REGISTER_ID" columnIndex="13"/>
<result property="lastUpdusrPnttm" column="LAST_UPDT_PNTTM" columnIndex="14"/>
<result property="lastUpdusrId" column="LAST_UPDUSR_ID" columnIndex="15"/>
<result property="popupType" column="POPUP_TYPE" columnIndex="16"/>
<result property="scrollType" column="SCROLL_TYPE" columnIndex="17"/>
<result property="nttCn" column="NTT_CN" columnIndex="18"/>
<result property="sortNum" column="SORT_NUM" columnIndex="19"/>
</resultMap>
<!-- 매인이미지 관리자 리스트 -->
<select id="subMainzoneManage.selectSubMainzoneList" parameterClass="mainzoneVO" resultClass="egovMap">
/* subMainzoneManage.selectSubMainzoneList */
<![CDATA[
SELECT
MAZ_ID,
CONCAT("/UPLOADROOT/POPUPZONE/",UPFILE ) AS IMG,
CONTENT AS IMG_ALT,
MLINK,
ISTARGET,
CASE WHEN
DATE(SUBDATE(NOW(), INTERVAL 7 DAY)) < DATE(REGDT)
THEN 'Y'
ELSE 'N'
END AS NEW_FLAG,
DATE_FORMAT(REGDT, '%Y-%m-%d') REGDT,
MAINZONE_IMAGE,
MAINZONE_IMAGE_FILE ,
SORT,
MAZ_NM,
USE_YN,
(SELECT USER_NM FROM LETTNEMPLYRINFO WHERE ESNTL_ID = REGISTER_ID) REGISTER_ID ,
DEVICETYPE,
STR_TO_DATE(NTCE_BGNDE,'%Y%m%d') AS ntceBgnde,
STR_TO_DATE(NTCE_ENDDE,'%Y%m%d') AS ntceEndde
FROM SUB_MAINZONE MB
WHERE 1=1
]]>
<isEqual property="useYn" compareValue="Y">
AND USE_YN = 'Y'
</isEqual>
<isNotEmpty property="searchKeyword">
<isEqual property="searchCondition" compareValue="">
AND ( MAZ_NM LIKE CONCAT ('%', #searchKeyword#,'%')
OR CONTENT LIKE CONCAT ('%', #searchKeyword#,'%')
)
</isEqual>
<isEqual property="searchCondition" compareValue="1">
AND MAZ_NM LIKE CONCAT ('%', #searchKeyword#,'%')
</isEqual>
<isEqual property="searchCondition" compareValue="2">
AND CONTENT LIKE CONCAT ('%', #searchKeyword#,'%')
</isEqual>
</isNotEmpty>
<isNotEmpty property="searchConditionSite">
AND SITE_ID = #searchConditionSite#
</isNotEmpty>
<isNotEmpty property="deviceType">
<isEqual property="deviceType" compareValue="P">
AND ( DEVICETYPE IS NULL OR DEVICETYPE = #deviceType# )
</isEqual>
<isEqual property="deviceType" compareValue="M">
AND DEVICETYPE = #deviceType#
</isEqual>
</isNotEmpty>
ORDER BY SORT
LIMIT #recordCountPerPage# OFFSET #firstIndex#
</select>
<select id="subMainzoneManage.selectSubMainzoneCount" resultClass="int">
/* subMainzoneManage.selectSubMainzoneCount */
SELECT
COUNT(*) totcnt
FROM SUB_MAINZONE
WHERE 1=1
<isNotEmpty property="searchKeyword">
<isEqual property="searchCondition" compareValue="">
AND ( MAZ_NM LIKE CONCAT ('%', #searchKeyword#,'%')
OR CONTENT LIKE CONCAT ('%', #searchKeyword#,'%')
)
</isEqual>
<isEqual property="searchCondition" compareValue="1">
AND MAZ_NM LIKE CONCAT ('%', #searchKeyword#,'%')
</isEqual>
<isEqual property="searchCondition" compareValue="2">
AND CONTENT LIKE CONCAT ('%', #searchKeyword#,'%')
</isEqual>
</isNotEmpty>
<isNotEmpty property="searchConditionSite">
AND SITE_ID = #searchConditionSite#
</isNotEmpty>
</select>
</sqlMap>

View File

@ -0,0 +1,438 @@
<%--
Class Name : EgovPopupList.jsp
Description : 팝업창관리 목록 페이지
Modification Information
수정일 수정자 수정내용
------- -------- ---------------------------
2009.09.16 장동한 최초 생성
author : 공통서비스 개발팀 장동한
since : 2009.09.16
Copyright (C) 2009 by MOPAS All right reserved.
--%>
<%@ page 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="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html>
<html lang="ko">
<head>
<title>팝업창관리 관리</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="<c:url value='/js/EgovCalPopup.js' />"></script>
<script type="text/javascript" src="<c:url value='/js/EgovMultiFile.js'/>"></script>
<script type="text/javaScript" language="javascript">
$( document ).ready(function(){
makeDate('ntceBgndeYYYMMDD');
makeDate('ntceEnddeYYYMMDD');
});
function makeDate(id){
let today = new Date();
let formattedDate = today.toISOString().split('T')[0]; // YYYY-MM-DD 형식
$("#"+id).val(formattedDate);
}
/* pagination 페이지 링크 function */
function goList(){
document.searchForm.submit();
}
/* 등록시 값 확인 */
function fn_checkForm() {
frm = document.writeForm;
if(frm.mazNm.value=="") {
alert("비주얼명을 입력해 주십시오");
frm.mazNm.focus();
return false;
}
if(frm.content.value=="") {
alert("대체텍스트를 입력해 주십시오");
frm.content.focus();
return false;
}
if(frm.sort.value=="") {
alert("노출순서를 입력해 주십시오");
frm.sort.focus();
return false;
}else{
var regexp = /^[0-9]*$/
if( !regexp.test(frm.sort.value) ) {
alert("노출순서에는 숫자만 입력하세요");
frm.sort.focus();
return false;
}
}
return true;
}
/* 글 등록 function */
function fn_mainzone_insert() {
frm = document.writeForm;
frm.action = "<c:url value='/uss/ion/pwm/mainzoneInsert.do'/>";
if(fn_checkForm())
frm.submit();
}
/* 배너 삭제 function */
function fn_mainzone_delete() {
var msg;
msg = "해당 메인이미지를 삭제하시겠습니까?";
if (confirm(msg)) {
frm = document.writeForm;
frm.del.value = frm.mazId.value ;
frm.action = "<c:url value='/uss/ion/pwm/mainzoneListDelete.do'/>";
frm.submit();
}
}
function validate(method_parm) {
frm = document.writeForm;
if(frm.mazNm.value=="") {
alert("비주얼명을 입력해 주십시오");
frm.mazNm.focus();
return false;
}
if(frm.content.value=="") {
alert("대체텍스트를 입력해 주십시오");
frm.content.focus();
return false;
}
if(frm.sort.value=="") {
alert("노출순서를 입력해 주십시오");
frm.sort.focus();
return false;
}else{
var regexp = /^[0-9]*$/
if( !regexp.test(frm.sort.value) ) {
alert("노출순서에는 숫자만 입력하세요");
frm.sort.focus();
return false;
}
}
var ntceBgndeYYYMMDD = document.getElementById('ntceBgndeYYYMMDD').value;
var ntceEnddeYYYMMDD = document.getElementById('ntceEnddeYYYMMDD').value;
console.log("ntceBgndeYYYMMDD ::: "+ntceBgndeYYYMMDD);
console.log("ntceEnddeYYYMMDD ::: "+ntceEnddeYYYMMDD);
if(ntceBgndeYYYMMDD ==""){
alert("게시기간 시작일을 입력해 주세요.");
return false;
}else if(ntceEnddeYYYMMDD == ""){
alert("게시기간 종료일을 입력해 주세요.");
return false;
}else{
var iChkBeginDe = Number( ntceBgndeYYYMMDD.replaceAll("-","") );
var iChkEndDe = Number( ntceEnddeYYYMMDD.replaceAll("-","") );
if(iChkBeginDe > iChkEndDe || iChkEndDe < iChkBeginDe ){
alert("게시시작일자는 게시종료일자 보다 클수 없고,\n게시종료일자는 게시시작일자 보다 작을수 없습니다. ");
return;
}
frm.ntceBgnde.value = ntceBgndeYYYMMDD.replaceAll('-','') + fn_egov_SelectBoxValue('ntceBgndeHH') + fn_egov_SelectBoxValue('ntceBgndeMM');
frm.ntceEndde.value = ntceEnddeYYYMMDD.replaceAll('-','') + fn_egov_SelectBoxValue('ntceEnddeHH') + fn_egov_SelectBoxValue('ntceEnddeMM');
}
var msg = "메인 배너를 등록하시겠습니까?";
if(!confirm(msg)){
return false;
}
goSave(method_parm);
}
function fn_egov_downFile(atchFileId, fileSn){
window.open("<c:url value='/cmm/fms/FileDown.do?atchFileId="+atchFileId+"&fileSn="+fileSn+"'/>");
}
/* ********************************************************
* SELECT BOX VALUE FUNCTION
******************************************************** */
function fn_egov_SelectBoxValue(sbName)
{
var FValue = "";
for(var i=0; i < document.getElementById(sbName).length; i++)
{
if(document.getElementById(sbName).options[i].selected == true){
FValue=document.getElementById(sbName).options[i].value;
}
}
return FValue;
}
</script>
<style>
.date_format{width:91px !important;}
.del_file_btn{border: none;background-color: transparent;background-image: url(/direct/img/upload_delect_img.png);background-repeat: no-repeat;background-position: center center;vertical-align: middle;margin-top: -4px;margin-right: 15px;}
.file_size{color: #0388d2;font-weight: bold;}
.uploaded_obj{width: 100%;}
</style>
</head>
<body>
<form:form commandName="mainzoneVO" name="writeForm" enctype="multipart/form-data" method="post">
<input type="hidden" name="deviceType" id="deviceType" value="P"/>
<input type="hidden" name="selectedId" />
<form:input path="mazId" type="hidden" />
<form:input path="del" type="hidden" />
<form:input path="upfile" type="hidden" />
<form:input path="mainzoneImageFile" type="hidden" />
<form:hidden path="ntceBgnde" />
<form:hidden path="ntceEndde" />
<input type="hidden" name="beSort" value="${mainzoneVO.beSort}" />
<!-- 드래그앤 드롭 파라미터 -->
<input type="hidden" name="menuName" value="mainzone" />
<input type="hidden" name="fmsId" value="${mainzoneVO.mazId}" />
<input type="hidden" name="limitcount" value="1" /><!-- 최대 업로드 파일갯수 -->
<div class="contWrap">
<div class="pageTitle">
<div class="pageIcon"><img src="/pb/img/pageTitIcon4.png" alt=""></div>
<h2 class="titType1 c_222222 fwBold">메인비주얼 등록/수정</h2>
<p class="tType6 c_999999">사이트별로 사용자 메인 상단에 적용되는 비주얼 이미지를 등록, 수정, 삭제할 수 있습니다.</p>
</div>
<div class="pageNav">
<img src="/pb/img/common/homeIcon.png" alt="홈이미지">&ensp;>&ensp;<p class="topDepth">비주얼관리</p>&ensp;>&ensp;<p class="subDepth">메인비주얼관리</p>
</div>
<div class="pageCont">
<div class="tableWrap">
<p class="right fwMd"><span class="tType4 c_e40000 fwBold">*</span>는 필수입력 항목입니다.</p>
<table class="tbType2">
<colgroup>
<col style="width: 15%">
<col style="width: 85%">
</colgroup>
<tbody>
<%-- <tr>
<th class="td_title1"><span class="star_t"></span>메인화면에 보이는 메인 이미지</th>
<td colspan="3" class="td_txt_exist">
<c:if test="${mainzoneVO.mazId == null}">
등록된 메인 이미지가 없습니다.
</c:if>
<c:if test="${mainzoneVO.mazId != null}">
<img alt="${mainzoneVO.content}" onerror="this.src='/images/no_img.jpg'" src='<c:url value='/cmm/fms/getImage.do'/>?atchFileId=<c:out value="${mainzoneVO.mainzoneImageFile}"/>' width="196" height="237" />
</c:if>
</td>
</tr> --%>
<c:if test="${siteId eq 'super'}">
<tr>
<th><span class="reqArea">사이트</span></th>
<td>
<select name="siteId" id="siteId" title="권한">
<c:forEach var="resultList" items="${siteManageList}" varStatus="status">
<option value="<c:out value="${resultList.siteId}"/>"
<c:if test="${mainzoneVO.siteId eq resultList.siteId}"> selected='selected' </c:if>>
<c:out value="${resultList.siteNm}"/>
</option>
</c:forEach>
</select>
</td>
</tr>
</c:if>
<tr>
<th><span>원본이미지</span></th>
<td>
<c:if test="${mainzoneVO.mazId == ''}">
<div class="imgBox"></div>
</c:if>
<c:if test="${mainzoneVO.mazId != ''}">
<img alt="${mainzoneVO.content}" onerror="this.src='/pb/img/noImg.png'" src='<c:url value='/cmm/fms/getImage.do'/>?atchFileId=<c:out value="${mainzoneVO.mainzoneImageFile}"/>' style="max-width:300px;padding: 10px;" />
<%-- <img alt="${mainzoneVO.content}" onerror="this.src='/images/no_img.jpg'" src='<c:url value='/cmm/fms/getImage.do'/>?atchFileId=<c:out value="${mainzoneVO.mainzoneImageFile}"/>' style="max-width:600px;" /> --%>
</c:if>
</td>
</tr>
<!-- <tr> -->
<!-- <th class="td_title1"><span class="star_t">*</span>기기종류</th> -->
<!-- <td colspan="3"> -->
<!-- <input type="radio" name="deviceType" id="deviceType" value="P" style="margin-left: 13px; margin-right: 5px;" -->
<!-- checked="checked" -->
<%-- ${mainzoneVO.deviceType eq 'P' or mainzoneVO.deviceType eq '' ? 'checked="checked"' : ''} --%>
<!-- >PC -->
<!-- <input type="radio" name="deviceType" id="deviceType" value="M" style="margin-left: 13px; margin-right: 5px;" -->
<%-- ${mainzoneVO.deviceType eq 'M' ? 'checked="checked"' : ''} --%>
<!-- >모바일 -->
<!-- </td> -->
<!-- </tr> -->
<tr>
<th><span class="reqArea">비주얼명</span></th>
<td>
<form:input path="mazNm" maxlength="30" />
</td>
</tr>
<tr>
<th><span class="reqArea">대체텍스트</span></th>
<td>
<form:input path="content" maxlength="500" />
</td>
</tr>
<tr>
<th><span class="reqArea">사용여부</span></th>
<td>
<input type="radio" name="useYn" id="useY" value="Y" style="margin-left: 13px; margin-right: 5px;" ${mainzoneVO.useYn eq 'Y' or mainzoneVO.useYn eq '' ? 'checked="checked"' : ''} /><label for="">사용</label>
<input type="radio" name="useYn" id="useN" value="N" style="margin-left: 13px; margin-right: 5px;" ${mainzoneVO.useYn eq 'N' ? 'checked="checked"' : ''} /><label for="">미사용</label>
</td>
</tr>
<tr>
<th><span class="reqArea">노출순서</span></th>
<td colspan="3">
<form:input path="sort" maxlength="10" onkeyup="this.value=this.value.replace(/[^-\.0-9]/g,'')"/>
</td>
</tr>
<tr>
<th><span class="reqArea">게시기간</span></th>
<td>
<input type="hidden" name="cal_url" id="cal_url" value="<c:url value='/sym/cmm/EgovNormalCalPopup.do'/>" >
<input type="text" class="date_format" name="ntceBgndeYYYMMDD" id="ntceBgndeYYYMMDD" size="10" maxlength="10" class="readOnlyClass" value="<c:out value="${fn:substring(mainzoneVO.ntceBgnde, 0, 4)}"/>-<c:out value="${fn:substring(mainzoneVO.ntceBgnde, 4, 6)}"/>-<c:out value="${fn:substring(mainzoneVO.ntceBgnde, 6, 8)}"/>" readonly>
<a href="#" onClick="javascript:fn_egov_NormalCalendar(document.forms.mainzoneVO, document.forms.mainzoneVO.ntceBgndeYYYMMDD);">
<input type="button" class="calBtn">
<%-- <img src="<c:url value='/images/egovframework/com/cmm/icon/bu_icon_carlendar.gif' />" align="middle" style="border:0px" alt="달력창팝업버튼이미지"> --%>
</a>
<form:select path="ntceBgndeHH" class="date_format">
<form:options items="${ntceBgndeHH}" itemValue="code" itemLabel="codeNm"/>
</form:select>시
<form:select path="ntceBgndeMM" class="date_format">
<form:options items="${ntceBgndeMM}" itemValue="code" itemLabel="codeNm"/>
</form:select>분
&nbsp&nbsp~&nbsp&nbsp
<input type="text" class="date_format" name="ntceEnddeYYYMMDD" id="ntceEnddeYYYMMDD" size="10" maxlength="10" class="readOnlyClass" value="<c:out value="${fn:substring(mainzoneVO.ntceEndde, 0, 4)}"/>-<c:out value="${fn:substring(mainzoneVO.ntceEndde, 4, 6)}"/>-<c:out value="${fn:substring(mainzoneVO.ntceEndde, 6, 8)}"/>" readonly>
<a href="#" onClick="javascript:fn_egov_NormalCalendar(document.forms.mainzoneVO, document.forms.mainzoneVO.ntceEnddeYYYMMDD);">
<input type="button" class="calBtn">
<%-- <img src="<c:url value='/images/egovframework/com/cmm/icon/bu_icon_carlendar.gif' />" align="middle" style="border:0px" alt="달력창팝업버튼이미지"> --%>
</a>
<form:select path="ntceEnddeHH" class="date_format">
<form:options items="${ntceEnddeHH}" itemValue="code" itemLabel="codeNm"/>
</form:select>시
<form:select path="ntceEnddeMM" class="date_format">
<form:options items="${ntceEnddeMM}" itemValue="code" itemLabel="codeNm"/>
</form:select>분
</td>
</tr>
<tr>
<th><span>링크주소</span></th>
<td colspan="3">
<form:input path="mlink" maxlength="200" />
</td>
</tr>
<tr>
<th><span class="reqArea">파일 첨부</span></th>
<td class="upload_area">
<div class="file_upload_box no_img_box fileWrap">
<table>
<colgroup>
<col style="width: 60%">
<col style="width: 10%">
<col style="width: 20%">
<col style="width: 10%">
</colgroup>
<thead>
<tr>
<th>파일명</th>
<th>크기</th>
<th>등록일시</th>
<th>삭제</th>
</tr>
</thead>
</table>
</div>
<div class="fileWrap fileAfter file_list_div asset_no_use_pro_table" style="display:none">
<table>
<colgroup>
<col style="width: 60%">
<col style="width: 10%">
<col style="width: 20%">
<col style="width: 10%">
</colgroup>
<thead>
<tr>
<th>파일명</th>
<th>크기</th>
<th>등록일시</th>
<th>삭제</th>
</tr>
</thead>
<tbody id="tbody_fiielist">
<c:forEach var="fileList" items="${fileList}" varStatus="status">
<tr class="item_${fileList.atchFileId}_${fileList.fileSn} uploaded_obj">
<td class="file_name">
<a href="javascript:fn_egov_downFile('${fileList.atchFileId}','${fileList.fileSn}')">
<img src="/direct/img/upload_hwp_img.png" alt="" />
<span class="file_name_text">${fileList.orignlFileNm}</span>
</a>
</td>
<td><span class="file_size_text" value="${fileList.fileMg}"></span></td>
<td>${fileList.creatDt}</td>
<td>
<input type="button" class="delBtn" onclick="delAtchFile('${fileList.atchFileId}', '${fileList.fileSn}'); return false;">
</td>
<input type="hidden" name="fileSize" class="item_file_size" value="${fileList.fileMg}" >
</tr>
</c:forEach>
</tbody>
</table>
</div>
<div class="fileInfo file_list_div">
<ul class="inline">
<li>
<p><span class="c_456ded fwBold totalfileCount">0</span>개 <span class="c_456ded fwBold totalfileSize">0MB</span></p>
</li>
<li>
<p>최대 <span class="c_e40000 fwBold limitcount_li"></span>개 <span class="c_e40000 fwBold upload_number">50MB</span>제한</p>
</li>
</ul>
</div>
<div class="uploadBtm">
<input type="file" id="file_temp" name="file_temp" class="uploadFile">
<!-- <span class="uploadTtype4">메인비주얼 이미지 크기는 </span><span class="uploadTtype4" style="color: red;">1920 X 843 </span>입니다.</p> -->
</div>
</td>
</tr>
<c:if test="${!empty mainzoneVO.mazId}">
<tr>
<th><span class="reqArea">최종수정일</span></th>
<td>
${mainzoneVO.moddt}
</td>
</tr>
<tr>
<th><span class="reqArea">작성자</span></th>
<td>
${mainzoneVO.registerId}
</td>
</tr>
</c:if>
</tbody>
</table>
</div>
<div class="btnWrap right">
<input type="button" class="btnType1 bg_888888" value="목 록" onclick="goList(); return false;" >
<input type="button" class="btnType1" value="저 장" onclick="validate('mainzone_I'); return false;">
</div>
</div>
</div>
</form:form>
<form name="searchForm" id="searchForm" method="get" action="<c:url value='/uss/ion/pwm/mainzoneList.do'/>" ></form>
</body>
</html>

View File

@ -0,0 +1,260 @@
<%--
Class Name : EgovPopupList.jsp
Description : 팝업창관리 목록 페이지
Modification Information
수정일 수정자 수정내용
------- -------- ---------------------------
2009.09.16 장동한 최초 생성
author : 공통서비스 개발팀 장동한
since : 2009.09.16
Copyright (C) 2009 by MOPAS All right reserved.
--%>
<%@ page 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="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
response.setHeader("Cache-Control","no-store");
response.setHeader("Pragma","no-cache");
response.setDateHeader("Expires",0);
if (request.getProtocol().equals("HTTP/1.1")) response.setHeader("Cache-Control", "no-cache");
%>
<c:set var="ImgUrl" value="${pageContext.request.contextPath}/images/egovframework/com/cmm/" />
<c:set var="CssUrl" value="${pageContext.request.contextPath}/css/egovframework/com/" />
<c:set var="JsUrl" value="${pageContext.request.contextPath}/js/egovframework/com/uss/ion/pwm/"/>
<!DOCTYPE html>
<html lang="ko">
<head>
<title>메인이미지 관리</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<script type="text/javaScript" language="javascript">
$(document).ready(function(){
$(".img_cont").click(function(e){
clickEvent = true;
});
$(".check").click(function(e){
e.stopPropagation();
});
});
/* 메인창 수정 화면*/
function fn_mainzone_view(id, pageType){
document.modiForm.selectedId.value = id;
document.modiForm.pageType.value = "Modify";
document.modiForm.action = "<c:url value='/uss/ion/bnr/subMainzoneModify.do'/>";
document.modiForm.submit();
}
/* 메인창 등록화면*/
function fn_mainzone_insert_view(){
document.modiForm.pageType.value = "Insert";
// document.modiForm.action = "<c:url value='/uss/ion/pwm/mainzoneModify.do'/>";
document.modiForm.action = "<c:url value='/uss/ion/bnr/subMainzoneInsert.do'/>";
document.modiForm.submit();
}
function doDep3(event){
event.preventDefault();
}
function linkPage(pageNo){
<c:if test="${!empty loginId}">
if(""!= document.listForm.searchKeyword.value){
updateRecentSearch();//최근검색어 등록
}
</c:if>
var listForm = document.listForm ;
listForm.pageIndex.value = pageNo ;
listForm.searchCondition.value = $('#searchCondition').val();
listForm.submit();
}
function fnCheckAll() {
var checkField = document.listForm.del;
if(document.listForm.checkAll.checked) {
if(checkField) {
if(checkField.length > 1) {
for(var i=0; i < checkField.length; i++) {
checkField[i].checked = true;
}
} else {
checkField.checked = true;
}
}
} else {
if(checkField) {
if(checkField.length > 1) {
for(var j=0; j < checkField.length; j++) {
checkField[j].checked = false;
}
} else {
checkField.checked = false;
}
}
}
}
/* 체크된 메인배너 목록 삭제 */
function fn_mainzone_contest_delete(){
if($("input[name=del]:checked").length == 0){
alert("선택된 항목이 없습니다.");
return;
}
if (confirm("해당 메인이미지 삭제하시겠습니까?")){
frm = document.listForm;
frm.action = "<c:url value='/uss/ion/pwm/mainzoneListDelete.do' />";
frm.submit();
}
}
/* 테마별 색상맞추기 */
$(window).load(function() {
$('table.bbs01_list td.subject a').hover(
function () {
$(this).css("color","#d10000");
},
function () {
$(this).css("color","#333333");
}
);
});
</script>
</head>
<body>
<form name="listForm" action="<c:url value='/uss/ion/pwm/mainzoneList.do'/>" method="post">
<input name="pageIndex" type="hidden" value="<c:out value='${mainzoneVO.pageIndex}'/>"/>
<input type="hidden" name="selectedId" />
<input type="hidden" name="pageType" />
<div class="contWrap">
<div class="pageTitle">
<div class="pageIcon"><img src="/pb/img/pageTitIcon4.png" alt=""></div>
<h2 class="titType1 c_222222 fwBold">서브메인비주얼관리</h2>
<p class="tType6 c_999999">사이트별로 사용자 메인 상단에 적용되는 (하단)비주얼 이미지를 등록, 수정, 삭제할 수 있습니다.</p>
</div>
<div class="pageCont">
<div class="listSerch">
<c:if test="${siteId eq 'super'}">
<select name="searchConditionSite" id="searchConditionSite" title="사이트검색">
<option value="" <c:if test="${empty userSearchVO.searchConditionSite }">selected="selected"</c:if> >전체 사이트</option>
<c:forEach var="result" items="${siteManageList}" varStatus="status">
<option value="${result.siteId}" <c:if test="${result.siteId eq mainzoneVO.searchConditionSite }">selected="selected"</c:if> >${result.siteNm}</option>
</c:forEach>
</select>
</c:if>
<select name="searchCondition" id="searchCondition" class="select" title="검색조건선택">
<option value=''>전체</option>
<option value='1' <c:if test="${mainzoneVO.searchCondition == '1'}">selected</c:if>>제목</option>
<option value='2' <c:if test="${mainzoneVO.searchCondition == '2'}">selected</c:if>>대체텍스트</option>
</select>
<input id="searchKeyword" name="searchKeyword" class="recentSearch" type="text" value="<c:out value='${mainzoneVO.searchKeyword}'/>" size="40" title="검색" maxlength="100"/>
<input type="button" class="btnType1" value="검색" onclick="linkPage(1); return false;">
</div>
<div class="listTop">
<p class="tType5">총 <span class="tType4 c_456ded fwBold"><fmt:formatNumber value="${paginationInfo.totalRecordCount}" pattern="#,###" /></span>건</p>
<div class="rightWrap">
<input type="button" class="printBtn" >
<select name="pageUnit" id="pageUnit" class="select" title="검색조건선택" onchange="linkPage(1);">
<option value='8' <c:if test="${mainzoneVO.pageUnit == '8' or searchVO.pageUnit == ''}">selected</c:if>>8개씩 보기</option>
<option value='16' <c:if test="${mainzoneVO.pageUnit == '16'}">selected</c:if>>16개씩 보기</option>
<option value='24' <c:if test="${mainzoneVO.pageUnit == '24'}">selected</c:if>>24개씩 보기</option>
</select>
</div>
</div>
<div class="galleryListWrap">
<ul class="inline">
<c:forEach var="result" items="${mainzoneList}" varStatus="status">
<li onclick="javascript:fn_mainzone_view('${result.mazId}'); return false;">
<div class="check"><input type="checkbox" name="del" id="check_box${status.index}" value="${result.mazId}"></div>
<%-- <div class="img_cont_check"><input type="checkbox" name="del" id="img_cont_check_box${status.index}" class="img_cont_check_box" value="${result.mazId}"><label for="img_cont_check_box${status.index}"></label></div> --%>
<ul class="listCategory">
<c:if test="${siteId eq 'super'}">
<c:forEach var="siteManageList" items="${siteManageList}" varStatus="status">
<c:if test="${result.siteId eq siteManageList.siteId}">
<li>
<c:out value="${siteManageList.siteNm}"/>
</li>
</c:if>
</c:forEach>
</c:if>
<li class="useCg">
<c:if test="${result.useYn eq 'Y'}">
사용
</c:if>
<c:if test="${result.useYn ne 'Y'}">
미사용
</c:if>
</li>
</ul>
<div class="imgBox"><img onerror="this.src='/pb/img/noImg.png'" src="<c:url value='/cmm/fms/getImage.do'/>?atchFileId=<c:out value="${result.mainzoneImageFile}"/>" alt=""></div>
<%-- <div class="imgBox"><img onerror="this.src='/pb/img/noImg.png'" src="<c:url value='/cmm/fms/getImage.do'/>?atchFileId=<c:out value="${result.mainzoneImageFile}"/>" alt=""></div> --%>
<div class="listInfo">
<h3>${result.mazNm}</h3>
<table>
<tr>
<td colspan="2">작성자 : ${result.registerId}</td>
</tr>
<tr>
<td>노출순서 : ${result.sort}</td>
<td class="right">${result.ntceBgnde} ~ ${result.ntceEndde}</td>
</tr>
</table>
</div>
</li>
</c:forEach>
</ul>
<c:if test="${empty mainzoneList}">
<div class="board1_btn">
<ul style="text-align: center;"><spring:message code="common.nodata.msg" /></ul>
</div>
</c:if>
</div>
<div class="btnWrap">
<input type="button" class="btnType2" value="삭제" onclick="fn_mainzone_contest_delete(); return false;">
<input type="button" class="btnType1" value="등록" onclick="fn_mainzone_insert_view(); return false;">
</div>
<!-- 페이지 네비게이션 시작 -->
<c:if test="${!empty mainzoneList}">
<div class="page">
<ul class="inline">
<ui:pagination paginationInfo = "${paginationInfo}" type="image" jsFunction="linkPage" />
</ul>
</div>
</c:if>
<!-- //페이지 네비게이션 끝 -->
</div>
</div>
</form>
<form name="subForm" method="get" action="<c:url value='/uss/ion/pwm/detailPopup.do'/>">
<input name="popupId" type="hidden" value="" />
<input name="pageIndex" type="hidden" value="<c:out value='${mainzoneVO.pageIndex}'/>"/>
<input name="cmd" type="hidden" value="<c:out value=''/>"/>
</form>
<form name="modiForm" method="get" action="<c:url value='/uss/ion/pwm/mainzoneModify.do'/>" >
<input name="selectedId" type="hidden" />
<input name="pageType" type="hidden" />
</form>
<form name="searchForm" method="get" action="<c:url value='/uss/ion/pwm/mainzoneList.do'/>">
<input name="pageIndex" type="hidden" value="1" />
<input name="searchCondition" type="hidden" />
<input name="searchKeyword" type="hidden" />
<input name="searchConditionSite" type="hidden" />
</form>
</body>
</html>

View File

@ -0,0 +1,472 @@
<%--
Class Name : EgovPopupList.jsp
Description : 팝업창관리 목록 페이지
Modification Information
수정일 수정자 수정내용
------- -------- ---------------------------
2009.09.16 장동한 최초 생성
author : 공통서비스 개발팀 장동한
since : 2009.09.16
Copyright (C) 2009 by MOPAS All right reserved.
--%>
<%@ page 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="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
response.setHeader("Cache-Control","no-store");
response.setHeader("Pragma","no-cache");
response.setDateHeader("Expires",0);
if (request.getProtocol().equals("HTTP/1.1")) response.setHeader("Cache-Control", "no-cache");
%>
<c:set var="ImgUrl" value="${pageContext.request.contextPath}/images/egovframework/com/cmm/" />
<c:set var="CssUrl" value="${pageContext.request.contextPath}/css/egovframework/com/" />
<c:set var="JsUrl" value="${pageContext.request.contextPath}/js/egovframework/com/uss/ion/pwm/"/>
<!DOCTYPE html>
<html lang="ko">
<head>
<title>팝업창관리 관리</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="<c:url value='/js/EgovCalPopup.js' />"></script>
<script type="text/javascript" src="<c:url value='/js/EgovMultiFile.js'/>"></script>
<script type="text/javaScript" language="javascript">
$( document ).ready(function(){
makeDate('ntceBgndeYYYMMDD');
makeDate('ntceEnddeYYYMMDD');
});
function makeDate(id){
let today = new Date();
let formattedDate = today.toISOString().split('T')[0]; // YYYY-MM-DD 형식
$("#"+id).val(formattedDate);
}
/* pagination 페이지 링크 function */
function goList(){
document.searchForm.submit();
}
/* 등록시 값 확인 */
function fn_checkForm() {
frm = document.writeForm;
if(frm.mazNm.value=="") {
alert("비주얼명을 입력해 주십시오");
frm.mazNm.focus();
return false;
}
if(frm.content.value=="") {
alert("대체텍스트를 입력해 주십시오");
frm.content.focus();
return false;
}
if(frm.sort.value=="") {
alert("노출순서를 입력해 주십시오");
frm.sort.focus();
return false;
}else{
var regexp = /^[0-9]*$/
if( !regexp.test(frm.sort.value) ) {
alert("노출순서에는 숫자만 입력하세요");
frm.sort.focus();
return false;
}
}
return true;
}
/* 글 등록 function */
function fn_mainzone_insert() {
frm = document.writeForm;
frm.action = "<c:url value='/uss/ion/pwm/mainzoneInsert.do'/>";
if(fn_checkForm())
frm.submit();
}
/* 배너 삭제 function */
function fn_mainzone_delete() {
var msg;
msg = "해당 메인이미지를 삭제하시겠습니까?";
if (confirm(msg)) {
frm = document.writeForm;
frm.del.value = frm.mazId.value ;
frm.action = "<c:url value='/uss/ion/pwm/mainzoneListDelete.do'/>";
frm.submit();
}
}
function validate(method_parm) {
frm = document.writeForm;
if(frm.mazNm.value=="") {
alert("비주얼명을 입력해 주십시오");
frm.mazNm.focus();
return false;
}
if(frm.content.value=="") {
alert("대체텍스트를 입력해 주십시오");
frm.content.focus();
return false;
}
if(frm.sort.value=="") {
alert("노출순서를 입력해 주십시오");
frm.sort.focus();
return false;
}else{
var regexp = /^[0-9]*$/
if( !regexp.test(frm.sort.value) ) {
alert("노출순서에는 숫자만 입력하세요");
frm.sort.focus();
return false;
}
}
var ntceBgndeYYYMMDD = document.getElementById('ntceBgndeYYYMMDD').value;
var ntceEnddeYYYMMDD = document.getElementById('ntceEnddeYYYMMDD').value;
console.log("ntceBgndeYYYMMDD ::: "+ntceBgndeYYYMMDD);
console.log("ntceEnddeYYYMMDD ::: "+ntceEnddeYYYMMDD);
if(ntceBgndeYYYMMDD ==""){
alert("게시기간 시작일을 입력해 주세요.");
return false;
}else if(ntceEnddeYYYMMDD == ""){
alert("게시기간 종료일을 입력해 주세요.");
return false;
}else{
var iChkBeginDe = Number( ntceBgndeYYYMMDD.replaceAll("-","") );
var iChkEndDe = Number( ntceEnddeYYYMMDD.replaceAll("-","") );
if(iChkBeginDe > iChkEndDe || iChkEndDe < iChkBeginDe ){
alert("게시시작일자는 게시종료일자 보다 클수 없고,\n게시종료일자는 게시시작일자 보다 작을수 없습니다. ");
return;
}
frm.ntceBgnde.value = ntceBgndeYYYMMDD.replaceAll('-','') + fn_egov_SelectBoxValue('ntceBgndeHH') + fn_egov_SelectBoxValue('ntceBgndeMM');
frm.ntceEndde.value = ntceEnddeYYYMMDD.replaceAll('-','') + fn_egov_SelectBoxValue('ntceEnddeHH') + fn_egov_SelectBoxValue('ntceEnddeMM');
}
var msg = "메인 배너를 등록하시겠습니까?";
if(method_parm == "mainzone_U"){
msg ="메인 배너를 수정하시겠습니까?";
}
if(!confirm(msg)){
return false;
}
goSave(method_parm);
}
function fn_egov_downFile(atchFileId, fileSn){
window.open("<c:url value='/cmm/fms/FileDown.do?atchFileId="+atchFileId+"&fileSn="+fileSn+"'/>");
}
/* ********************************************************
* SELECT BOX VALUE FUNCTION
******************************************************** */
function fn_egov_SelectBoxValue(sbName)
{
var FValue = "";
for(var i=0; i < document.getElementById(sbName).length; i++)
{
if(document.getElementById(sbName).options[i].selected == true){
FValue=document.getElementById(sbName).options[i].value;
}
}
return FValue;
}
</script>
<style>
.date_format{width:91px !important;}
.del_file_btn{border: none;background-color: transparent;background-image: url(/direct/img/upload_delect_img.png);background-repeat: no-repeat;background-position: center center;vertical-align: middle;margin-top: -4px;margin-right: 15px;}
.file_size{color: #0388d2;font-weight: bold;}
.uploaded_obj{width: 100%;}
</style>
</head>
<body>
<form:form commandName="mainzoneVO" name="writeForm" enctype="multipart/form-data" method="post">
<input type="hidden" name="deviceType" id="deviceType" value="P"/>
<input type="hidden" name="selectedId" />
<form:input path="mazId" type="hidden" />
<form:input path="del" type="hidden" />
<form:input path="upfile" type="hidden" />
<form:input path="mainzoneImageFile" type="hidden" />
<form:hidden path="ntceBgnde" />
<form:hidden path="ntceEndde" />
<input type="hidden" name="beSort" value="${mainzoneVO.beSort}" />
<!-- 드래그앤 드롭 파라미터 -->
<input type="hidden" name="menuName" value="mainzone" />
<input type="hidden" name="fmsId" value="${mainzoneVO.mazId}" />
<input type="hidden" name="limitcount" value="1" /><!-- 최대 업로드 파일갯수 -->
<div class="contWrap">
<div class="pageTitle">
<div class="pageIcon"><img src="/pb/img/pageTitIcon4.png" alt=""></div>
<h2 class="titType1 c_222222 fwBold">메인비주얼 등록/수정</h2>
<p class="tType6 c_999999">사이트별로 사용자 메인 상단에 적용되는 비주얼 이미지를 등록, 수정, 삭제할 수 있습니다.</p>
</div>
<div class="pageNav">
<img src="/pb/img/common/homeIcon.png" alt="홈이미지">&ensp;>&ensp;<p class="topDepth">비주얼관리</p>&ensp;>&ensp;<p class="subDepth">메인비주얼관리</p>
</div>
<div class="pageCont">
<div class="tableWrap">
<p class="right fwMd"><span class="tType4 c_e40000 fwBold">*</span>는 필수입력 항목입니다.</p>
<table class="tbType2">
<colgroup>
<col style="width: 15%">
<col style="width: 85%">
</colgroup>
<tbody>
<%-- <tr>
<th class="td_title1"><span class="star_t"></span>메인화면에 보이는 메인 이미지</th>
<td colspan="3" class="td_txt_exist">
<c:if test="${mainzoneVO.mazId == null}">
등록된 메인 이미지가 없습니다.
</c:if>
<c:if test="${mainzoneVO.mazId != null}">
<img alt="${mainzoneVO.content}" onerror="this.src='/images/no_img.jpg'" src='<c:url value='/cmm/fms/getImage.do'/>?atchFileId=<c:out value="${mainzoneVO.mainzoneImageFile}"/>' width="196" height="237" />
</c:if>
</td>
</tr> --%>
<c:if test="${siteId eq 'super'}">
<tr>
<th><span class="reqArea">사이트</span></th>
<td>
<select name="siteId" id="siteId" title="권한">
<c:forEach var="resultList" items="${siteManageList}" varStatus="status">
<option value="<c:out value="${resultList.siteId}"/>"
<c:if test="${mainzoneVO.siteId eq resultList.siteId}"> selected='selected' </c:if>>
<c:out value="${resultList.siteNm}"/>
</option>
</c:forEach>
</select>
</td>
</tr>
</c:if>
<tr>
<th><span>원본이미지</span></th>
<td>
<c:if test="${mainzoneVO.mazId == ''}">
<div class="imgBox"></div>
</c:if>
<c:if test="${mainzoneVO.mazId != ''}">
<img alt="${mainzoneVO.content}" onerror="this.src='/pb/img/noImg.png'" src='<c:url value='/cmm/fms/getImage.do'/>?atchFileId=<c:out value="${mainzoneVO.mainzoneImageFile}"/>' style="max-width:300px;padding: 10px;" />
<%-- <img alt="${mainzoneVO.content}" onerror="this.src='/images/no_img.jpg'" src='<c:url value='/cmm/fms/getImage.do'/>?atchFileId=<c:out value="${mainzoneVO.mainzoneImageFile}"/>' style="max-width:600px;" /> --%>
</c:if>
</td>
</tr>
<!-- <tr> -->
<!-- <th class="td_title1"><span class="star_t">*</span>기기종류</th> -->
<!-- <td colspan="3"> -->
<!-- <input type="radio" name="deviceType" id="deviceType" value="P" style="margin-left: 13px; margin-right: 5px;" -->
<!-- checked="checked" -->
<%-- ${mainzoneVO.deviceType eq 'P' or mainzoneVO.deviceType eq '' ? 'checked="checked"' : ''} --%>
<!-- >PC -->
<!-- <input type="radio" name="deviceType" id="deviceType" value="M" style="margin-left: 13px; margin-right: 5px;" -->
<%-- ${mainzoneVO.deviceType eq 'M' ? 'checked="checked"' : ''} --%>
<!-- >모바일 -->
<!-- </td> -->
<!-- </tr> -->
<tr>
<th><span class="reqArea">비주얼명</span></th>
<td>
<form:input path="mazNm" maxlength="30" />
</td>
</tr>
<tr>
<th><span class="reqArea">대체텍스트</span></th>
<td>
<form:input path="content" maxlength="500" />
</td>
</tr>
<tr>
<th><span class="reqArea">사용여부</span></th>
<td>
<input type="radio" name="useYn" id="useY" value="Y" style="margin-left: 13px; margin-right: 5px;" ${mainzoneVO.useYn eq 'Y' or mainzoneVO.useYn eq '' ? 'checked="checked"' : ''} /><label for="">사용</label>
<input type="radio" name="useYn" id="useN" value="N" style="margin-left: 13px; margin-right: 5px;" ${mainzoneVO.useYn eq 'N' ? 'checked="checked"' : ''} /><label for="">미사용</label>
</td>
</tr>
<tr>
<th><span class="reqArea">노출순서</span></th>
<td colspan="3">
<form:input path="sort" maxlength="10" onkeyup="this.value=this.value.replace(/[^-\.0-9]/g,'')"/>
</td>
</tr>
<tr>
<th><span class="reqArea">게시기간</span></th>
<td>
<input type="hidden" name="cal_url" id="cal_url" value="<c:url value='/sym/cmm/EgovNormalCalPopup.do'/>" >
<input type="text" class="date_format" name="ntceBgndeYYYMMDD" id="ntceBgndeYYYMMDD" size="10" maxlength="10" class="readOnlyClass" value="<c:out value="${fn:substring(mainzoneVO.ntceBgnde, 0, 4)}"/>-<c:out value="${fn:substring(mainzoneVO.ntceBgnde, 4, 6)}"/>-<c:out value="${fn:substring(mainzoneVO.ntceBgnde, 6, 8)}"/>" readonly>
<a href="#" onClick="javascript:fn_egov_NormalCalendar(document.forms.mainzoneVO, document.forms.mainzoneVO.ntceBgndeYYYMMDD);">
<input type="button" class="calBtn">
<%-- <img src="<c:url value='/images/egovframework/com/cmm/icon/bu_icon_carlendar.gif' />" align="middle" style="border:0px" alt="달력창팝업버튼이미지"> --%>
</a>
<form:select path="ntceBgndeHH" class="date_format">
<form:options items="${ntceBgndeHH}" itemValue="code" itemLabel="codeNm"/>
</form:select>시
<form:select path="ntceBgndeMM" class="date_format">
<form:options items="${ntceBgndeMM}" itemValue="code" itemLabel="codeNm"/>
</form:select>분
&nbsp&nbsp~&nbsp&nbsp
<input type="text" class="date_format" name="ntceEnddeYYYMMDD" id="ntceEnddeYYYMMDD" size="10" maxlength="10" class="readOnlyClass" value="<c:out value="${fn:substring(mainzoneVO.ntceEndde, 0, 4)}"/>-<c:out value="${fn:substring(mainzoneVO.ntceEndde, 4, 6)}"/>-<c:out value="${fn:substring(mainzoneVO.ntceEndde, 6, 8)}"/>" readonly>
<a href="#" onClick="javascript:fn_egov_NormalCalendar(document.forms.mainzoneVO, document.forms.mainzoneVO.ntceEnddeYYYMMDD);">
<input type="button" class="calBtn">
<%-- <img src="<c:url value='/images/egovframework/com/cmm/icon/bu_icon_carlendar.gif' />" align="middle" style="border:0px" alt="달력창팝업버튼이미지"> --%>
</a>
<form:select path="ntceEnddeHH" class="date_format">
<form:options items="${ntceEnddeHH}" itemValue="code" itemLabel="codeNm"/>
</form:select>시
<form:select path="ntceEnddeMM" class="date_format">
<form:options items="${ntceEnddeMM}" itemValue="code" itemLabel="codeNm"/>
</form:select>분
</td>
</tr>
<tr>
<th><span>링크주소</span></th>
<td colspan="3">
<form:input path="mlink" maxlength="200" />
</td>
</tr>
<tr>
<th><span class="reqArea">파일 첨부</span></th>
<td class="upload_area">
<div class="file_upload_box no_img_box fileWrap">
<table>
<colgroup>
<col style="width: 60%">
<col style="width: 10%">
<col style="width: 20%">
<col style="width: 10%">
</colgroup>
<thead>
<tr>
<th>파일명</th>
<th>크기</th>
<th>등록일시</th>
<th>삭제</th>
</tr>
</thead>
</table>
</div>
<div class="fileWrap fileAfter file_list_div asset_no_use_pro_table" style="display:none">
<table>
<colgroup>
<col style="width: 60%">
<col style="width: 10%">
<col style="width: 20%">
<col style="width: 10%">
</colgroup>
<thead>
<tr>
<th>파일명</th>
<th>크기</th>
<th>등록일시</th>
<th>삭제</th>
</tr>
</thead>
<tbody id="tbody_fiielist">
<c:forEach var="fileList" items="${fileList}" varStatus="status">
<tr class="item_${fileList.atchFileId}_${fileList.fileSn} uploaded_obj">
<td class="file_name">
<a href="javascript:fn_egov_downFile('${fileList.atchFileId}','${fileList.fileSn}')">
<img src="/direct/img/upload_hwp_img.png" alt="" />
<span class="file_name_text">${fileList.orignlFileNm}</span>
</a>
</td>
<td><span class="file_size_text" value="${fileList.fileMg}"></span></td>
<td>${fileList.creatDt}</td>
<td>
<input type="button" class="delBtn" onclick="delAtchFile('${fileList.atchFileId}', '${fileList.fileSn}'); return false;">
</td>
<input type="hidden" name="fileSize" class="item_file_size" value="${fileList.fileMg}" >
</tr>
</c:forEach>
</tbody>
</table>
</div>
<div class="fileInfo file_list_div">
<ul class="inline">
<li>
<p><span class="c_456ded fwBold totalfileCount">0</span>개 <span class="c_456ded fwBold totalfileSize">0MB</span></p>
</li>
<li>
<p>최대 <span class="c_e40000 fwBold limitcount_li"></span>개 <span class="c_e40000 fwBold upload_number">50MB</span>제한</p>
</li>
</ul>
</div>
<div class="uploadBtm">
<input type="file" id="file_temp" name="file_temp" class="uploadFile">
<!-- <span class="uploadTtype4">메인비주얼 이미지 크기는 </span><span class="uploadTtype4" style="color: red;">1920 X 843 </span>입니다.</p> -->
</div>
</td>
</tr>
<%-- <tr>
<th class="td_title1"><span class="star_t">*</span>첨부 파일</th>
<td colspan="3" class="td_txt_exist">
<c:import url="/cmm/fms/selectFileInfsForUpdate.do" charEncoding="utf-8">
<c:param name="param_atchFileId" value="${mainzoneVO.mainzoneImageFile }" />
<c:param name="img_view" value="N" />
<c:param name="img_view_w" value="200" />
<c:param name="img_view_h" value="200" />
<c:param name="updateFlag" value="N" />
<c:param name="img_change_view" value="Y" />
</c:import>
</td>
</tr> --%>
<c:if test="${!empty mainzoneVO.mazId}">
<tr>
<th><span class="reqArea">최종수정일</span></th>
<td>
${mainzoneVO.moddt}
</td>
</tr>
<tr>
<th><span class="reqArea">작성자</span></th>
<td>
${mainzoneVO.registerId}
</td>
</tr>
</c:if>
</tbody>
</table>
</div>
<div class="btnWrap right">
<input type="button" class="btnType1 bg_888888" value="목 록" onclick="goList(); return false;" >
<c:if test="${!empty mainzoneVO.mazId }">
<input type="button" class="btnType1 bg_ed4545" value="삭 제" onclick="fn_mainzone_delete(); return false;" >
<input type="button" class="btnType1" value="수 정" onclick="validate('mainzone_U'); return false;">
</c:if>
<c:if test="${empty mainzoneVO.mazId }">
<input type="button" class="btnType1" value="저 장" onclick="validate('mainzone_I'); return false;">
</c:if>
</div>
</div>
</div>
</form:form>
<form name="searchForm" id="searchForm" method="get" action="<c:url value='/uss/ion/pwm/mainzoneList.do'/>" ></form>
</body>
</html>