diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..69d631f --- /dev/null +++ b/.gitignore @@ -0,0 +1,23 @@ +################################################################################ +#gitignore +################################################################################ +/.gradle/ +/.idea/ +/build/ +/gradle/ +/logs/ +/out/ +/target/ +/src/main/generated/ +/src/test/generated_tests/ +/.settings/ +/.factorypath +/.project +/.classpath + +/documents/erd/.metadata/ +/documents/kbjin-0819.txt +/src/main/webapp/wenMedia/extend/js/env.js.txt +/src/main.7z + +/files/ diff --git a/.springBeans b/.springBeans new file mode 100644 index 0000000..26b3f8f --- /dev/null +++ b/.springBeans @@ -0,0 +1,16 @@ + + + 1 + + + + + + + java:com.ns.mobile.website.LanEduWebsiteApplication + + + + + + diff --git a/ddl/create_ddl.sql b/ddl/create_ddl.sql new file mode 100644 index 0000000..cf0e701 --- /dev/null +++ b/ddl/create_ddl.sql @@ -0,0 +1,328 @@ +CREATE TABLE phonessayo.file_upload ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `original_file_name` varchar(255) NOT NULL, + `file_extension` varchar(255) NOT NULL, + `save_file_name` varchar(255) NOT NULL, + `local_path` varchar(255) NOT NULL, + `reg_uid` bigint(20) DEFAULT NULL, + `reg_dt` datetime(6) DEFAULT sysdate(), + `udt_uid` bigint(20) DEFAULT NULL, + `udt_dt` datetime(6) DEFAULT sysdate(), + `del_uid` bigint(20) DEFAULT NULL, + `del_dt` datetime(6) DEFAULT NULL, + `del_yn` bit(1) DEFAULT b'0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE phonessayo.phone ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `title` varchar(255) NOT NULL, + `title_en` varchar(255) NOT NULL, + `sub_title` varchar(255) DEFAULT NULL, + `producer` varchar(255) DEFAULT NULL, + `phone_type` varchar(10) DEFAULT NULL, + `title_img` varchar(255) DEFAULT NULL, + `md_pick` bit(1) DEFAULT b'1', + `hot` bit(1) DEFAULT b'1', + `kt` bit(1) DEFAULT b'1', + `skt` bit(1) DEFAULT b'1', + `lgu` bit(1) DEFAULT b'1', + `reg_uid` bigint(20) DEFAULT 0, + `udt_uid` bigint(20) DEFAULT 0, + `del_uid` bigint(20) DEFAULT 0, + `reg_dt` datetime(6) DEFAULT sysdate(), + `udt_dt` datetime(6) DEFAULT NULL, + `del_dt` datetime(6) DEFAULT NULL, + `del_yn` bit(1) DEFAULT b'0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4; + + +CREATE TABLE phonessayo.phone_color ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `phone_id` bigint(20) NOT NULL, + `sort` int(11) NOT NULL, + `color` varchar(255) NOT NULL, + `color_kr` varchar(255) NOT NULL, + `color_en` varchar(255) NOT NULL, + `front_img` varchar(255) DEFAULT '', + `side_img` varchar(255) DEFAULT '', + `back_img` varchar(255) DEFAULT '', + `reg_uid` bigint(20) DEFAULT 0, + `udt_uid` bigint(20) DEFAULT 0, + `del_uid` bigint(20) DEFAULT 0, + `reg_dt` datetime(6) DEFAULT sysdate(), + `udt_dt` datetime(6) DEFAULT NULL, + `del_dt` datetime(6) DEFAULT NULL, + `del_yn` bit(1) DEFAULT b'0', + PRIMARY KEY (`id`), + KEY `phone_id` (`phone_id`) +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4; + + +CREATE TABLE phonessayo.phone_detail ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `phone_id` bigint(20) NOT NULL, + `detail_pc_img` varchar(255) DEFAULT NULL, + `detail_mobile_img` varchar(255) DEFAULT NULL, + `reg_uid` bigint(20) DEFAULT 0, + `udt_uid` bigint(20) DEFAULT 0, + `del_uid` bigint(20) DEFAULT 0, + `reg_dt` datetime(6) DEFAULT sysdate(), + `udt_dt` datetime(6) DEFAULT NULL, + `del_dt` datetime(6) DEFAULT NULL, + `del_yn` bit(1) DEFAULT b'0', + PRIMARY KEY (`id`), + KEY `phone_id` (`phone_id`), + CONSTRAINT `phone_detail_ibfk_1` FOREIGN KEY (`phone_id`) REFERENCES `phone` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4; + + +CREATE TABLE phonessayo.phone_price ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `phone_id` bigint(20) NOT NULL, + `storage` bigint(20) NOT NULL, + `release_price` bigint(20) NOT NULL, + `yogum` bigint(20) NOT NULL, + `dc_yogum` bigint(20) NOT NULL, + `dc_danmal` bigint(20) NOT NULL, + `reg_uid` bigint(20) DEFAULT 0, + `udt_uid` bigint(20) DEFAULT 0, + `del_uid` bigint(20) DEFAULT 0, + `reg_dt` datetime(6) DEFAULT sysdate(), + `udt_dt` datetime(6) DEFAULT NULL, + `del_dt` datetime(6) DEFAULT NULL, + `del_yn` bit(1) DEFAULT b'0', + PRIMARY KEY (`id`), + KEY `phone_id` (`phone_id`) +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4; + +CREATE TABLE phonessayo.sell_user ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `opening_date` datetime(6) DEFAULT NULL, + `account` varchar(100) DEFAULT NULL, + `news_agency` varchar(100) DEFAULT NULL, + `name` varchar(100) DEFAULT NULL, + `social_security_number` varchar(100) DEFAULT NULL, + `phone_number` varchar(100) DEFAULT NULL, + `customer_type` varchar(100) DEFAULT NULL, + `legal_representative_name` varchar(100) DEFAULT NULL, + `legal_representative_phone_number` varchar(100) DEFAULT NULL, + `installment_month` int(6) DEFAULT NULL, + `pet_name` varchar(100) DEFAULT NULL, + `serial_number` varchar(100) DEFAULT NULL, + `subscription` varchar(100) DEFAULT NULL, + `file_id` bigint(20) DEFAULT NULL, + `reg_uid` bigint(20) DEFAULT NULL, + `reg_dt` datetime(6) DEFAULT sysdate(), + `udt_uid` bigint(20) DEFAULT NULL, + `udt_dt` datetime(6) DEFAULT sysdate(), + `del_uid` bigint(20) DEFAULT NULL, + `del_dt` datetime(6) DEFAULT NULL, + `del_yn` bit(1) DEFAULT b'0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE phonessayo.user ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `phone` varchar(255) NOT NULL, + `name` varchar(255) NOT NULL, + `password` varchar(255) NOT NULL, + `email` varchar(255) NOT NULL, + `pwd_update_dt` datetime(6) DEFAULT NULL, + `phone2` varchar(255) DEFAULT NULL, + `last_login_dt` datetime(6) DEFAULT NULL, + `login_fail_count` int(11) DEFAULT 0, + `reg_uid` bigint(20) DEFAULT NULL, + `reg_dt` datetime(6) DEFAULT sysdate(), + `udt_uid` bigint(20) DEFAULT NULL, + `udt_dt` datetime(6) DEFAULT sysdate(), + `del_uid` bigint(20) DEFAULT NULL, + `del_dt` datetime(6) DEFAULT NULL, + `del_yn` bit(1) DEFAULT b'0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4; + +INSERT INTO phonessayo.phone (title,title_en,sub_title,producer,phone_type,title_img,md_pick,hot,kt,skt,lgu,reg_uid,udt_uid,del_uid,reg_dt,udt_dt,del_dt,del_yn) VALUES + ('갤럭시 S22 사전예약','s22','회원님께 드리는 혜택','samsung','p','http://luckyphone.kr/all-pdData/thumb/s22_thumb.png',1,1,1,1,1,0,0,0,'2022-05-29 18:26:31.0',NULL,NULL,0), + ('갤럭시 Z플립3','zfold3','회원님께 드리는 혜택','samsung','p','http://luckyphone.kr/all-pdData/thumb/zflip3_thumb.png',1,1,1,1,1,0,0,0,'2022-05-29 18:26:31.0',NULL,NULL,0), + ('갤럭시 Z폴드3','zflip3','회원님께 드리는 혜택','samsung','p','http://luckyphone.kr/all-pdData/thumb/zfold3_thumb.png',1,1,1,1,1,0,0,0,'2022-05-29 18:35:02.0',NULL,NULL,0), + ('아이폰13 PRO Max','iphone13pro_max','회원님께 드리는 혜택','apple','p','http://luckyphone.kr/all-pdData/thumb/iphone13_max_thumb.png',1,1,1,1,1,0,0,0,'2022-05-29 18:35:02.0',NULL,NULL,0), + ('아이폰13 PRO','iphone13_pro','회원님께 드리는 혜택','apple','p','http://luckyphone.kr/all-pdData/thumb/iphone13_thumb.png',1,1,1,1,1,0,0,0,'2022-05-29 18:35:02.0',NULL,NULL,0), + ('아이폰13','iphone_mini','회원님께 드리는 혜택','apple','p','http://luckyphone.kr/all-pdData/thumb/iphone_mini_pink.png',1,1,1,1,1,0,0,0,'2022-05-29 18:35:02.0',NULL,NULL,0), + ('아이폰13 mini','iphone_mini','회원님께 드리는 혜택','apple','p','http://luckyphone.kr/all-pdData/thumb/iphone_mini_pink.png',1,1,1,1,1,0,0,0,'2022-05-29 18:35:02.0',NULL,NULL,0), + ('갤럭시 노트20 5G','samsung-note205g','성능만큼 강력한 아름다움','samsung','p','http://luckyphone.kr/all-pdData/thumb/samsung-note205g-gwp-grey-1.png',1,1,1,1,1,0,0,0,'2022-05-29 18:35:02.0',NULL,NULL,0), + ('갤럭시 Z 플립','galaxy_z_flip','스마트폰의 새로운 가능성','samsung','p','http://luckyphone.kr/all-pdData/thumb/1.galaxy_z_flip_main.png',1,1,1,1,1,0,0,0,'2022-05-29 18:43:27.0',NULL,NULL,0), + ('갤럭시 S20 5G','galaxy_s20','스마트폰의 카메라의 새로운 기','samsung','p','http://luckyphone.kr/all-pdData/thumb/1.galaxy_s20_main.png',0,1,1,1,1,0,0,0,'2022-05-29 18:43:27.0',NULL,NULL,0); +INSERT INTO phonessayo.phone (title,title_en,sub_title,producer,phone_type,title_img,md_pick,hot,kt,skt,lgu,reg_uid,udt_uid,del_uid,reg_dt,udt_dt,del_dt,del_yn) VALUES + ('갤럭시 S20+ 5G','galaxy_s20_plus','스마트폰의 새로운 가능성','samsung','p','http://luckyphone.kr/all-pdData/thumb/1.galaxy_s20_plus_main.png',1,0,1,1,1,0,0,0,'2022-05-29 18:46:28.0',NULL,NULL,0), + ('갤럭시 S20 울트라 5G','galaxy_s20_ultra','사진의 미래를 바꿀 스마트폰','samsung','p','http://luckyphone.kr/all-pdData/thumb/1.galaxy_s20_ultra_main.png',0,1,1,1,1,0,0,0,'2022-05-29 18:46:28.0',NULL,NULL,0), + ('갤럭시 S10','galaxy_s10','새로운 시대의 스마트폰','samsung','p','http://luckyphone.kr/all-pdData/thumb/1.galaxy_s10_main.png',1,1,1,1,1,0,0,0,'2022-05-29 18:46:28.0',NULL,NULL,0), + ('갤럭시 S10+','galaxy_s10_plus','새로운 시대의 스마트폰','samsung','p','http://luckyphone.kr/all-pdData/thumb/1.galaxy_s10_main.png',1,0,1,1,1,0,0,0,'2022-05-29 18:46:28.0',NULL,NULL,0), + ('갤럭시 S10e','galaxy_s10e','새로운 시대의 스마트폰','samsung','p','http://luckyphone.kr/all-pdData/thumb/1.galaxy_s10e_main.png',0,1,1,1,1,0,0,0,'2022-05-29 18:46:28.0',NULL,NULL,0), + ('갤럭시 S10 5G','galaxy_s10','스마트폰의 새로운 가능성','samsung','p','http://luckyphone.kr/all-pdData/thumb/1.galaxy_s10_5g_main.png',1,1,1,1,1,0,0,0,'2022-05-29 18:46:28.0',NULL,NULL,0), + ('갤럭시 노트10 5G','galaxy_s10_5g','5G로 만나는 새로운 세계','samsung','p','http://luckyphone.kr/all-pdData/thumb/1.galaxy_s10_5g_main.png',1,1,1,1,1,0,0,0,'2022-05-29 18:46:28.0',NULL,NULL,0), + ('갤럭시 노트10+ 5G','galaxy_note10','새로운 혁신','samsung','p','http://luckyphone.kr/all-pdData/thumb/1.galaxy_note10_main.png',0,1,1,1,1,0,0,0,'2022-05-29 18:46:28.0',NULL,NULL,0), + ('아이폰11','iPhone11','Just the right amount of everything','apple','p','http://luckyphone.kr/all-pdData/thumb/1.iPhone_11_main.png',1,0,1,1,1,0,0,0,'2022-05-29 18:55:10.0',NULL,NULL,0), + ('아이폰11 Pro','iPhone11pro','Just the right amount of everything','apple','p','http://luckyphone.kr/all-pdData/thumb/1.iPhone_11_pro_main.png',1,1,1,1,1,0,0,0,'2022-05-29 18:55:10.0',NULL,NULL,0); +INSERT INTO phonessayo.phone (title,title_en,sub_title,producer,phone_type,title_img,md_pick,hot,kt,skt,lgu,reg_uid,udt_uid,del_uid,reg_dt,udt_dt,del_dt,del_yn) VALUES + ('갤럭시 A50','galaxy_A50','트렌드와 기능을 모두 갖춘','samsung','s','http://luckyphone.kr/all-pdData/thumb/1.galaxy_A50_main.png',1,1,1,1,1,0,0,0,'2022-05-29 19:18:21.0',NULL,NULL,0), + ('갤럭시 A40','galaxy_A40','놀라운 가성비의 갤럭시','samsung','s','http://luckyphone.kr/all-pdData/thumb/1.galaxy_A40_main.png',1,0,0,1,0,0,0,0,'2022-05-29 19:20:46.0',NULL,NULL,0), + ('갤럭시 A90 5G','galaxy_A90_5G','최초의 5G','samsung','s','http://luckyphone.kr/all-pdData/thumb/1.galaxy_A90_5G_main.png',0,0,1,1,1,0,0,0,'2022-05-29 19:20:46.0',NULL,NULL,0); + + + + + +INSERT INTO phonessayo.phone_color (phone_id,sort,color,color_kr,color_en,front_img,side_img,back_img,reg_uid,udt_uid,del_uid,reg_dt,udt_dt,del_dt,del_yn) VALUES + (11,1,'#54a0ff','클라우드 블루','cloudblue','http://luckyphone.kr/all-pdData/slider/galaxy_s20_cloudblue_detail1.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_s20_cloudblue_detail2.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_s20_cloudblue_detail3.jpg',0,0,0,'2022-05-30 01:03:30.0',NULL,NULL,0), + (11,2,'#576574','코스믹 그레이','gray','http://luckyphone.kr/all-pdData/slider/galaxy_s20_gray_detail1.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_s20_gray_detail2.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_s20_gray_detail3.jpg',0,0,0,'2022-05-30 01:11:44.0',NULL,NULL,0), + (11,3,'#c8d6e5','클라우드 화이트','white','http://luckyphone.kr/all-pdData/slider/galaxy_s20_white_detail1.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_s20_white_detail2.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_s20_white_detail3.jpg',0,0,0,'2022-05-30 01:11:44.0',NULL,NULL,0), + (1,1,'#000000','블랙','black','http://luckyphone.kr/all-pdData/slider/s22_01.jpg','http://luckyphone.kr/all-pdData/slider/s22_02.jpg','http://luckyphone.kr/all-pdData/slider/s22_03.jpg',0,0,0,'2022-05-30 03:27:28.0',NULL,NULL,0), + (2,1,'#211e16','팬텀블랙','black','http://luckyphone.kr/all-pdData/slider/zflip3_black01.jpg','http://luckyphone.kr/all-pdData/slider/zflip3_black02.jpg','http://luckyphone.kr/all-pdData/slider/zflip3_black03.jpg',0,0,0,'2022-05-30 03:29:35.0',NULL,NULL,0), + (2,2,'#e3deca','크림','cream','http://luckyphone.kr/all-pdData/slider/zflip3_cream01.jpg','http://luckyphone.kr/all-pdData/slider/zflip3_cream02.jpg','http://luckyphone.kr/all-pdData/slider/zflip3_cream03.jpg',0,0,0,'2022-05-30 03:29:35.0',NULL,NULL,0), + (2,3,'#303d3c','그린','green','http://luckyphone.kr/all-pdData/slider/zflip3_green01.jpg','http://luckyphone.kr/all-pdData/slider/zflip3_green02.jpg','http://luckyphone.kr/all-pdData/slider/zflip3_green03.jpg',0,0,0,'2022-05-30 03:29:35.0',NULL,NULL,0), + (2,4,'#bfb1d2','라벤더','laven','http://luckyphone.kr/all-pdData/slider/zflip3_laven01.jpg','http://luckyphone.kr/all-pdData/slider/zflip3_laven02.jpg','http://luckyphone.kr/all-pdData/slider/zflip3_laven03.jpg',0,0,0,'2022-05-30 03:29:35.0',NULL,NULL,0), + (3,1,'#211e16','팬텀블랙','black','http://luckyphone.kr/all-pdData/slider/zfold3_black01.jpg','http://luckyphone.kr/all-pdData/slider/zfold3_black02.jpg','http://luckyphone.kr/all-pdData/slider/zfold3_black03.jpg',0,0,0,'2022-05-30 03:33:18.0',NULL,NULL,0), + (3,2,'#223631','팬텀그린','green','http://luckyphone.kr/all-pdData/slider/zfold3_green01.jpg','http://luckyphone.kr/all-pdData/slider/zfold3_green02.jpg','http://luckyphone.kr/all-pdData/slider/zfold3_green03.jpg',0,0,0,'2022-05-30 03:33:18.0',NULL,NULL,0); +INSERT INTO phonessayo.phone_color (phone_id,sort,color,color_kr,color_en,front_img,side_img,back_img,reg_uid,udt_uid,del_uid,reg_dt,udt_dt,del_dt,del_yn) VALUES + (3,3,'#cac5c2','팬텀실버','silver','http://luckyphone.kr/all-pdData/slider/zfold3_silver01.jpg','http://luckyphone.kr/all-pdData/slider/zfold3_silver02.jpg','http://luckyphone.kr/all-pdData/slider/zfold3_silver03.jpg',0,0,0,'2022-05-30 03:33:18.0',NULL,NULL,0), + (4,1,'#F1F2ED','실버','silver','http://luckyphone.kr/all-pdData/slider/iphone13pro_max_silver1.jpg','http://luckyphone.kr/all-pdData/slider/iphone13pro_max_silver2.jpg','http://luckyphone.kr/all-pdData/slider/iphone13pro_max_silver3.jpg',0,0,0,'2022-05-30 03:37:14.0',NULL,NULL,0), + (4,2,'#FAE7CF','골드','gold','http://luckyphone.kr/all-pdData/slider/iphone13pro_max_gold1.jpg','http://luckyphone.kr/all-pdData/slider/iphone13pro_max_gold2.jpg','http://luckyphone.kr/all-pdData/slider/iphone13pro_max_gold3.jpg',0,0,0,'2022-05-30 03:37:14.0',NULL,NULL,0), + (4,3,'#54524F','그레이','gray','http://luckyphone.kr/all-pdData/slider/iphone13pro_max_gray1.jpg','http://luckyphone.kr/all-pdData/slider/iphone13pro_max_gray2.jpg','http://luckyphone.kr/all-pdData/slider/iphone13pro_max_gray3.jpg',0,0,0,'2022-05-30 03:37:14.0',NULL,NULL,0), + (4,4,'#A7C1D9','블루','blue','http://luckyphone.kr/all-pdData/slider/iphone13pro_max_blue1.jpg','http://luckyphone.kr/all-pdData/slider/iphone13pro_max_blue2.jpg','http://luckyphone.kr/all-pdData/slider/iphone13pro_max_blue3.jpg',0,0,0,'2022-05-30 03:37:14.0',NULL,NULL,0), + (5,1,'#A7C1D9','시에라 블루','blue','http://luckyphone.kr/all-pdData/slider/iphone13_pro_blue1.jpg','http://luckyphone.kr/all-pdData/slider/iphone13_pro_blue2.jpg','http://luckyphone.kr/all-pdData/slider/iphone13_pro_blue3.jpg',0,0,0,'2022-05-30 03:54:14.0',NULL,NULL,0), + (5,2,'#F1F2ED','실버','silver','http://luckyphone.kr/all-pdData/slider/iphone13_pro_silver1.jpg','http://luckyphone.kr/all-pdData/slider/iphone13_pro_silver2.jpg','http://luckyphone.kr/all-pdData/slider/iphone13_pro_silver3.jpg',0,0,0,'2022-05-30 03:54:15.0',NULL,NULL,0), + (5,3,'#FAE7CF','골드','gold','http://luckyphone.kr/all-pdData/slider/iphone13_pro_gold1.jpg','http://luckyphone.kr/all-pdData/slider/iphone13_pro_gold2.jpg','http://luckyphone.kr/all-pdData/slider/iphone13_pro_gold3.jpg',0,0,0,'2022-05-30 03:54:15.0',NULL,NULL,0), + (5,4,'#54524F','그래파이트','gray','http://luckyphone.kr/all-pdData/slider/iphone13_pro_gray1.jpg','http://luckyphone.kr/all-pdData/slider/iphone13_pro_gray2.jpg','http://luckyphone.kr/all-pdData/slider/iphone13_pro_gray3.jpg',0,0,0,'2022-05-30 03:54:15.0',NULL,NULL,0), + (6,1,'#FBE2DD','핑크','pink','http://luckyphone.kr/all-pdData/slider/iphone_mini_pink.jpg','http://luckyphone.kr/all-pdData/slider/iphone_mini_pink2.jpg','http://luckyphone.kr/all-pdData/slider/iphone_mini_pink3.jpg',0,0,0,'2022-05-30 03:58:16.0',NULL,NULL,0); +INSERT INTO phonessayo.phone_color (phone_id,sort,color,color_kr,color_en,front_img,side_img,back_img,reg_uid,udt_uid,del_uid,reg_dt,udt_dt,del_dt,del_yn) VALUES + (6,2,'#C72332','레드','red','http://luckyphone.kr/all-pdData/slider/iphone_mini_red.jpg','http://luckyphone.kr/all-pdData/slider/iphone_mini_red2.jpg','http://luckyphone.kr/all-pdData/slider/iphone_mini_red3.jpg',0,0,0,'2022-05-30 03:58:16.0',NULL,NULL,0), + (6,3,'#447792','블루','blue','http://luckyphone.kr/all-pdData/slider/iphone_mini_blue.jpg','http://luckyphone.kr/all-pdData/slider/iphone_mini_blue2.jpg','http://luckyphone.kr/all-pdData/slider/iphone_mini_blue3.jpg',0,0,0,'2022-05-30 03:58:16.0',NULL,NULL,0), + (6,4,'#42474D','미드라이트','midnight','http://luckyphone.kr/all-pdData/slider/iphone_mini_midnight.jpg','http://luckyphone.kr/all-pdData/slider/iphone_mini_midnight2.jpg','http://luckyphone.kr/all-pdData/slider/iphone_mini_midnight3.jpg',0,0,0,'2022-05-30 03:58:16.0',NULL,NULL,0), + (6,5,'#fcefe5','스타라이트','starlight','http://luckyphone.kr/all-pdData/slider/iphone_mini_starlight.jpg','http://luckyphone.kr/all-pdData/slider/iphone_mini_starlight2.jpg','http://luckyphone.kr/all-pdData/slider/iphone_mini_starlight3.jpg',0,0,0,'2022-05-30 03:58:16.0',NULL,NULL,0), + (7,1,'#FBE2DD','핑크','pink','http://luckyphone.kr/all-pdData/slider/iphone_mini_pink.jpg','http://luckyphone.kr/all-pdData/slider/iphone_mini_pink2.jpg','http://luckyphone.kr/all-pdData/slider/iphone_mini_pink3.jpg',0,0,0,'2022-05-30 03:58:16.0',NULL,NULL,0), + (7,2,'#C72332','레드','red','http://luckyphone.kr/all-pdData/slider/iphone_mini_red.jpg','http://luckyphone.kr/all-pdData/slider/iphone_mini_red2.jpg','http://luckyphone.kr/all-pdData/slider/iphone_mini_red3.jpg',0,0,0,'2022-05-30 03:58:16.0',NULL,NULL,0), + (7,3,'#447792','블루','blue','http://luckyphone.kr/all-pdData/slider/iphone_mini_blue.jpg','http://luckyphone.kr/all-pdData/slider/iphone_mini_blue2.jpg','http://luckyphone.kr/all-pdData/slider/iphone_mini_blue3.jpg',0,0,0,'2022-05-30 03:58:16.0',NULL,NULL,0), + (7,4,'#42474D','미드라이트','midnight','http://luckyphone.kr/all-pdData/slider/iphone_mini_midnight.jpg','http://luckyphone.kr/all-pdData/slider/iphone_mini_midnight2.jpg','http://luckyphone.kr/all-pdData/slider/iphone_mini_midnight3.jpg',0,0,0,'2022-05-30 03:58:16.0',NULL,NULL,0), + (7,5,'#fcefe5','스타라이트','starlight','http://luckyphone.kr/all-pdData/slider/iphone_mini_starlight.jpg','http://luckyphone.kr/all-pdData/slider/iphone_mini_starlight2.jpg','http://luckyphone.kr/all-pdData/slider/iphone_mini_starlight3.jpg',0,0,0,'2022-05-30 03:58:16.0',NULL,NULL,0), + (8,1,'#545454','미스틱 그레이','gray','http://luckyphone.kr/all-pdData/slider/samsung-note205g-gwp-grey-1.jpg','http://luckyphone.kr/all-pdData/slider/samsung-note205g-grey-5.jpg','http://luckyphone.kr/all-pdData/slider/samsung-note205g-grey-2.jpg',0,0,0,'2022-05-30 04:03:10.0',NULL,NULL,0); +INSERT INTO phonessayo.phone_color (phone_id,sort,color,color_kr,color_en,front_img,side_img,back_img,reg_uid,udt_uid,del_uid,reg_dt,udt_dt,del_dt,del_yn) VALUES + (8,2,'#af7e75','미스틱 브론즈','bronze','http://luckyphone.kr/all-pdData/slider/samsung-note205g-gwp-grey-1.jpg','http://luckyphone.kr/all-pdData/slider/bronze3.jpg','http://luckyphone.kr/all-pdData/slider/bronze2.jpg',0,0,0,'2022-05-30 04:03:10.0',NULL,NULL,0), + (8,3,'#2a51d4','블루','blue','http://luckyphone.kr/all-pdData/slider/gallaxy_note20_blue1.jpg','http://luckyphone.kr/all-pdData/slider/gallaxy_note20_blue2.jpg','http://luckyphone.kr/all-pdData/slider/gallaxy_note20_blue3.jpg',0,0,0,'2022-05-30 04:03:10.0',NULL,NULL,0), + (8,4,'#e9bbc8','핑크','pink','http://luckyphone.kr/all-pdData/slider/gallaxy_note20_pink1.jpg','http://luckyphone.kr/all-pdData/slider/gallaxy_note20_pink2.jpg','http://luckyphone.kr/all-pdData/slider/gallaxy_note20_pink3.jpg',0,0,0,'2022-05-30 04:03:10.0',NULL,NULL,0), + (8,5,'#df1614','레드','red','http://luckyphone.kr/all-pdData/slider/gallaxy_note20_red1.jpg','http://luckyphone.kr/all-pdData/slider/gallaxy_note20_red2.jpg','http://luckyphone.kr/all-pdData/slider/gallaxy_note20_red3.jpg',0,0,0,'2022-05-30 04:03:10.0',NULL,NULL,0), + (10,1,'#010206','미러블랙','black','http://luckyphone.kr/all-pdData/slider/galaxy_z_flip_black_detail1.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_z_flip_black_detail2.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_z_flip_black_detail3.jpg',0,0,0,'2022-05-30 04:05:57.0',NULL,NULL,0), + (10,2,'#f368e0','미러퍼플','pupple','http://luckyphone.kr/all-pdData/slider/galaxy_z_flip_pupple_detail1.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_z_flip_pupple_detail2.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_z_flip_pupple_detail3.jpg',0,0,0,'2022-05-30 04:05:57.0',NULL,NULL,0), + (12,1,'#5352ed','아우라 블루','aurablue','http://luckyphone.kr/all-pdData/slider/galaxy_s20_plus_aurablue_detail1_skt.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_s20_plus_aurablue_detail2_skt.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_s20_plus_aurablue_detail3_skt.jpg',0,0,0,'2022-05-30 04:05:57.0',NULL,NULL,0), + (12,2,'#e84118','아우라 레드','aurared','http://luckyphone.kr/all-pdData/slider/galaxy_s20_plus_aurared_detail1_kt.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_s20_plus_aurared_detail2_kt.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_s20_plus_aurared_detail3_kt.jpg',0,0,0,'2022-05-30 04:05:57.0',NULL,NULL,0), + (12,3,'#00a8ff','클라우드 블루','cloudblue','http://luckyphone.kr/all-pdData/slider/galaxy_s20_plus_cloudblue_detail1.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_s20_plus_cloudblue_detail2.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_s20_plus_cloudblue_detail3.jpg',0,0,0,'2022-05-30 04:05:57.0',NULL,NULL,0), + (12,4,'#718093','그레이','gray','http://luckyphone.kr/all-pdData/slider/galaxy_s20_plus_gray_detail1.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_s20_plus_gray_detail2.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_s20_plus_gray_detail3.jpg',0,0,0,'2022-05-30 04:05:57.0',NULL,NULL,0); +INSERT INTO phonessayo.phone_color (phone_id,sort,color,color_kr,color_en,front_img,side_img,back_img,reg_uid,udt_uid,del_uid,reg_dt,udt_dt,del_dt,del_yn) VALUES + (12,5,'#dcdde1','화이트','white','http://luckyphone.kr/all-pdData/slider/galaxy_s20_plus_white_detail1.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_s20_plus_white_detail2.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_s20_plus_white_detail3.jpg',0,0,0,'2022-05-30 04:05:57.0',NULL,NULL,0), + (13,1,'#353b48','울트라 블랙','black','http://luckyphone.kr/all-pdData/slider/galaxy_s20_ultra_black_detail1.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_s20_ultra_black_detail2.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_s20_ultra_black_detail3.jpg',0,0,0,'2022-05-30 04:09:12.0',NULL,NULL,0), + (14,1,'#2f3640','프리즘 블랙','black','http://luckyphone.kr/all-pdData/slider/galaxy_s10_prism_black_detail1_QbIbYN6.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_s10_prism_black_detail2_0jfwjZ0.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_s10_prism_black_detail3_XrLWAnu.jpg',0,0,0,'2022-05-30 04:11:11.0',NULL,NULL,0), + (14,2,'#2ecc71','프리즘 그린','green','http://luckyphone.kr/all-pdData/slider/galaxy_s10_prism_green_detail1_MgHISpk.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_s10_prism_green_detail2_jaA9jk7.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_s10_prism_green_detail3_FdK5oVv.jpg',0,0,0,'2022-05-30 04:11:11.0',NULL,NULL,0), + (14,3,'#bdc3c7','프리즘 화이트','white','http://luckyphone.kr/all-pdData/slider/galaxy_s10_prism_white_detail1_avEYjJs.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_s10_prism_white_detail2_ein66W6.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_s10_prism_white_detail3_u12HqX1.jpg',0,0,0,'2022-05-30 04:11:11.0',NULL,NULL,0), + (15,1,'#2c3e50','세라믹 블랙','black','http://luckyphone.kr/all-pdData/slider/galaxy_s10plus_ceramic_black_detail1_PFgpvk0.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_s10plus_ceramic_black_detail2_a99p2Nk.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_s10plus_ceramic_black_detail3_1s41xb8.jpg',0,0,0,'2022-05-30 04:12:36.0',NULL,NULL,0), + (15,2,'#bdc3c7','세라믹 화이트','white','http://luckyphone.kr/all-pdData/slider/galaxy_s10plus_ceramic_white_detail1_s3UrXdL.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_s10plus_ceramic_white_detail2_kPM0sLX.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_s10plus_ceramic_white_detail3_KpRUi1K.jpg',0,0,0,'2022-05-30 04:12:36.0',NULL,NULL,0), + (16,1,'#2c3e50','프리즘 블랙','black','http://luckyphone.kr/all-pdData/slider/galaxy_s10e_prism_black_detail1_oePsLs3.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_s10e_prism_black_detail2_KZw3lnL.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_s10e_prism_black_detail3_e5RHgCr.jpg',0,0,0,'2022-05-30 04:14:19.0',NULL,NULL,0), + (16,2,'#b2bec3','프리즘 화이트','white','http://luckyphone.kr/all-pdData/slider/galaxy_s10e_prism_white_detail1_RfB01kN.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_s10e_prism_white_detail2_PhLmAPa.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_s10e_prism_white_detail3_PrxJhFr.jpg',0,0,0,'2022-05-30 04:14:19.0',NULL,NULL,0), + (16,3,'#fdcb6e','프리즘 엘로우','yellow','http://luckyphone.kr/all-pdData/slider/galaxy_s10e_yellow_detail1_06F9UcX.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_s10e_yellow_detail2_HpsSgT6.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_s10e_yellow_detail3_kGBncUc.jpg',0,0,0,'2022-05-30 04:14:19.0',NULL,NULL,0); +INSERT INTO phonessayo.phone_color (phone_id,sort,color,color_kr,color_en,front_img,side_img,back_img,reg_uid,udt_uid,del_uid,reg_dt,udt_dt,del_dt,del_yn) VALUES + (17,1,'#222f3e','블랙','black','http://luckyphone.kr/all-pdData/slider/galaxy_s10_5g_black_detail1.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_s10_5g_black_detail2.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_s10_5g_black_detail3.jpg',0,0,0,'2022-05-30 04:16:07.0',NULL,NULL,0), + (17,2,'#feca57','골드','gold','http://luckyphone.kr/all-pdData/slider/galaxy_s10_5g_gold_detail1.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_s10_5g_gold_detail2.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_s10_5g_gold_detail3.jpg',0,0,0,'2022-05-30 04:16:07.0',NULL,NULL,0), + (17,3,'#c8d6e5','실버','sliver','http://luckyphone.kr/all-pdData/slider/galaxy_s10_5g_silver_detail1.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_s10_5g_silver_detail2.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_s10_5g_silver_detail3.jpg',0,0,0,'2022-05-30 04:16:07.0',NULL,NULL,0), + (18,1,'#222f3e','블랙','black','http://luckyphone.kr/all-pdData/slider/galaxy_s10_5g_black_detail1.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_s10_5g_black_detail2.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_s10_5g_black_detail3.jpg',0,0,0,'2022-05-30 04:16:07.0',NULL,NULL,0), + (18,2,'#feca57','골드','gold','http://luckyphone.kr/all-pdData/slider/galaxy_s10_5g_gold_detail1.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_s10_5g_gold_detail2.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_s10_5g_gold_detail3.jpg',0,0,0,'2022-05-30 04:16:07.0',NULL,NULL,0), + (18,3,'#c8d6e5','실버','sliver','http://luckyphone.kr/all-pdData/slider/galaxy_s10_5g_silver_detail1.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_s10_5g_silver_detail2.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_s10_5g_silver_detail3.jpg',0,0,0,'2022-05-30 04:16:07.0',NULL,NULL,0), + (19,1,'#1e3799','블루','blue','http://luckyphone.kr/all-pdData/slider/galaxy_note10_blue_detail1_for_SKT.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_note10_blue_detail2_for_SKT.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_note10_blue_detail3_for_SKT.jpg',0,0,0,'2022-05-30 04:18:36.0',NULL,NULL,0), + (19,2,'#CAD3C8','글로우','glow','http://luckyphone.kr/all-pdData/slider/galaxy_note10_glow_detail2_1yaQnCj.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_note10_glow_detail3_R8yyMmD.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_note10_white_detail1_hWwfCbf.jpg',0,0,0,'2022-05-30 04:18:36.0',NULL,NULL,0), + (19,3,'#dcdde1','화이트','white','http://luckyphone.kr/all-pdData/slider/galaxy_note10_white_detail1_hWwfCbf.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_note10_white_detail2_D0L9eIr.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_note10_white_detail3_dB5K9sb.jpg',0,0,0,'2022-05-30 04:18:36.0',NULL,NULL,0), + (20,1,'#2f3640','블랙','black','http://luckyphone.kr/all-pdData/slider/iPhone11_black_detail1.jpg','http://luckyphone.kr/all-pdData/slider/iPhone11_black_detail2.jpg','http://luckyphone.kr/all-pdData/slider/iPhone11_black_detail3.jpg',0,0,0,'2022-05-30 04:21:49.0',NULL,NULL,0); +INSERT INTO phonessayo.phone_color (phone_id,sort,color,color_kr,color_en,front_img,side_img,back_img,reg_uid,udt_uid,del_uid,reg_dt,udt_dt,del_dt,del_yn) VALUES + (20,2,'#78e08f','그린','green','http://luckyphone.kr/all-pdData/slider/iPhone11_green_detail1.jpg','http://luckyphone.kr/all-pdData/slider/iPhone11_green_detail2.jpg','http://luckyphone.kr/all-pdData/slider/iPhone11_green_detail3.jpg',0,0,0,'2022-05-30 04:21:49.0',NULL,NULL,0), + (20,3,'#5f27cd','퍼플','pupple','http://luckyphone.kr/all-pdData/slider/iPhone11_purple_detail1.jpg','http://luckyphone.kr/all-pdData/slider/iPhone11_purple_detail2.jpg','http://luckyphone.kr/all-pdData/slider/iPhone11_purple_detail3.jpg',0,0,0,'2022-05-30 04:21:49.0',NULL,NULL,0), + (20,4,'#e84118','레드','red','http://luckyphone.kr/all-pdData/slider/iPhone11_red_detail1.jpg','http://luckyphone.kr/all-pdData/slider/iPhone11_red_detail2.jpg','http://luckyphone.kr/all-pdData/slider/iPhone11_red_detail3.jpg',0,0,0,'2022-05-30 04:21:49.0',NULL,NULL,0), + (20,5,'#dcdde1','화이트','white','http://luckyphone.kr/all-pdData/slider/iPhone11_white_detail1.jpg','http://luckyphone.kr/all-pdData/slider/iPhone11_white_detail2.jpg','http://luckyphone.kr/all-pdData/slider/iPhone11_white_detail3.jpg',0,0,0,'2022-05-30 04:21:49.0',NULL,NULL,0), + (20,6,'#fbc531','엘로우','yellow','http://luckyphone.kr/all-pdData/slider/iPhone11_yellow_detail1.jpg','http://luckyphone.kr/all-pdData/slider/iPhone11_yellow_detail2.jpg','http://luckyphone.kr/all-pdData/slider/iPhone11_yellow_detail3.jpg',0,0,0,'2022-05-30 04:21:49.0',NULL,NULL,0), + (21,1,'#fbc531','골드','gold','http://luckyphone.kr/all-pdData/slider/iPhone11pro_gold_detail1.jpg','http://luckyphone.kr/all-pdData/slider/iPhone11pro_gold_detail2.jpg','http://luckyphone.kr/all-pdData/slider/iPhone11pro_gold_detail3.jpg',0,0,0,'2022-05-30 04:24:00.0',NULL,NULL,0), + (21,2,'#dcdde1','그레이','gray','http://luckyphone.kr/all-pdData/slider/iPhone11pro_gray_detail1.jpg','http://luckyphone.kr/all-pdData/slider/iPhone11pro_gray_detail2.jpg','http://luckyphone.kr/all-pdData/slider/iPhone11pro_gray_detail3.jpg',0,0,0,'2022-05-30 04:24:00.0',NULL,NULL,0), + (21,3,'#60a3bc','그린','green','http://luckyphone.kr/all-pdData/slider/iPhone11pro_green_detail1.jpg','http://luckyphone.kr/all-pdData/slider/iPhone11pro_green_detail2.jpg','http://luckyphone.kr/all-pdData/slider/iPhone11pro_green_detail3.jpg',0,0,0,'2022-05-30 04:24:00.0',NULL,NULL,0), + (21,4,'#c8d6e5','실버','sliver','http://luckyphone.kr/all-pdData/slider/iPhone11pro_silver_detail1.jpg','http://luckyphone.kr/all-pdData/slider/iPhone11pro_silver_detail2.jpg','http://luckyphone.kr/all-pdData/slider/iPhone11pro_silver_detail3.jpg',0,0,0,'2022-05-30 04:24:00.0',NULL,NULL,0), + (22,1,'#222','블랙','black','http://luckyphone.kr/all-pdData/slider/galaxy_A50_black_detail1.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_A50_black_detail2.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_A50_black_detail3.jpg',0,0,0,'2022-05-30 04:25:49.0',NULL,NULL,0); +INSERT INTO phonessayo.phone_color (phone_id,sort,color,color_kr,color_en,front_img,side_img,back_img,reg_uid,udt_uid,del_uid,reg_dt,udt_dt,del_dt,del_yn) VALUES + (22,2,'#ff6b6b','코랄','coral','http://luckyphone.kr/all-pdData/slider/galaxy_A50_coral_detail1.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_A50_coral_detail2.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_A50_coral_detail3.jpg',0,0,0,'2022-05-30 04:25:49.0',NULL,NULL,0), + (22,3,'#c8d6e5','화이트','white','http://luckyphone.kr/all-pdData/slider/galaxy_A50_white_detail1.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_A50_white_detail2.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_A50_white_detail3.jpg',0,0,0,'2022-05-30 04:25:49.0',NULL,NULL,0), + (23,1,'#222f3e','블랙','black','http://luckyphone.kr/all-pdData/slider/galaxy_A40_black_detail1.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_A40_black_detail2.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_A40_black_detail3.jpg',0,0,0,'2022-05-30 04:28:43.0',NULL,NULL,0), + (23,2,'#54a0ff','블루','blue','http://luckyphone.kr/all-pdData/slider/galaxy_A40_blue_detail1.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_A40_blue_detail2.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_A40_blue_detail3.jpg',0,0,0,'2022-05-30 04:28:43.0',NULL,NULL,0), + (23,3,'#c8d6e5','화이트','white','http://luckyphone.kr/all-pdData/slider/galaxy_A40_white_detail1.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_A40_white_detail2.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_A40_white_detail3.jpg',0,0,0,'2022-05-30 04:28:43.0',NULL,NULL,0), + (24,1,'#222f3e','블랙','black','http://luckyphone.kr/all-pdData/slider/galaxy_A90_5G_black_detail1.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_A90_5G_black_detail2.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_A90_5G_black_detail3.jpg',0,0,0,'2022-05-30 04:28:43.0',NULL,NULL,0), + (24,2,'#c8d6e5','화이트','white','http://luckyphone.kr/all-pdData/slider/galaxy_A90_5G_white_detail1.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_A90_5G_white_detail2.jpg','http://luckyphone.kr/all-pdData/slider/galaxy_A90_5G_white_detail3.jpg',0,0,0,'2022-05-30 04:28:43.0',NULL,NULL,0); + +INSERT INTO phonessayo.phone_detail (phone_id,detail_pc_img,detail_mobile_img,reg_uid,udt_uid,del_uid,reg_dt,udt_dt,del_dt,del_yn) VALUES + (1,'','',0,0,0,'2022-05-29 22:47:28.0',NULL,NULL,0), + (2,'','',0,0,0,'2022-05-29 22:47:28.0',NULL,NULL,0), + (3,'','',0,0,0,'2022-05-29 22:47:28.0',NULL,NULL,0), + (4,'','',0,0,0,'2022-05-29 22:47:28.0',NULL,NULL,0), + (5,'','',0,0,0,'2022-05-29 22:47:28.0',NULL,NULL,0), + (6,'','',0,0,0,'2022-05-29 22:47:28.0',NULL,NULL,0), + (7,'','',0,0,0,'2022-05-29 22:47:28.0',NULL,NULL,0), + (8,'','',0,0,0,'2022-05-29 22:47:28.0',NULL,NULL,0), + (10,'http://luckyphone.kr/all-pdData/a_pcDetail/spec_galaxy_a_flip.jpg','http://luckyphone.kr/all-pdData/b_mDetail/spec_mobil_galaxy_a_flip.jpg',0,0,0,'2022-05-29 22:47:28.0',NULL,NULL,0), + (11,'http://luckyphone.kr/all-pdData/a_pcDetail/s20_pd-detail1.jpg','http://luckyphone.kr/all-pdData/b_mDetail/s20_pd-detail2.jpg',0,0,0,'2022-05-29 22:47:28.0',NULL,NULL,0); +INSERT INTO phonessayo.phone_detail (phone_id,detail_pc_img,detail_mobile_img,reg_uid,udt_uid,del_uid,reg_dt,udt_dt,del_dt,del_yn) VALUES + (12,'http://luckyphone.kr/all-pdData/a_pcDetail/spec_pc_galaxy_S20_plus.jpg','http://luckyphone.kr/all-pdData/b_mDetail/spec_mobile_galaxy_S20_plus.jpg',0,0,0,'2022-05-29 22:47:28.0',NULL,NULL,0), + (13,'http://luckyphone.kr/all-pdData/a_pcDetail/1.galaxy_pc_s20_ultra.jpg','http://luckyphone.kr/all-pdData/b_mDetail/1.galaxy_mobile_s20_ultra.jpg',0,0,0,'2022-05-29 22:47:28.0',NULL,NULL,0), + (14,'http://luckyphone.kr/all-pdData/a_pcDetail/galaxy_s10_prism_pc.jpg','http://luckyphone.kr/all-pdData/b_mDetail/galaxy_s10_prism_mobile.jpg',0,0,0,'2022-05-29 22:47:28.0',NULL,NULL,0), + (15,'http://luckyphone.kr/all-pdData/a_pcDetail/1.galaxy_s10_pc.jpg','http://luckyphone.kr/all-pdData/b_mDetail/1.galaxy_s10_mobile.jpg',0,0,0,'2022-05-29 22:47:28.0',NULL,NULL,0), + (16,'http://luckyphone.kr/all-pdData/b_mDetail/1.galaxy_s10e_pc.jpg','http://luckyphone.kr/all-pdData/a_pcDetail/1.galaxy_s10e_mobile.jpg',0,0,0,'2022-05-29 22:47:28.0',NULL,NULL,0), + (17,'http://luckyphone.kr/all-pdData/a_pcDetail/1.galaxy_s10_5g_pc.jpg','http://luckyphone.kr/all-pdData/b_mDetail/1.galaxy_s10_5g_mobile.jpg',0,0,0,'2022-05-29 22:47:28.0',NULL,NULL,0), + (18,'http://luckyphone.kr/all-pdData/a_pcDetail/1.galaxy_s10_5g_pc.jpg','http://luckyphone.kr/all-pdData/b_mDetail/1.galaxy_s10_5g_mobile.jpg',0,0,0,'2022-05-29 22:47:28.0',NULL,NULL,0), + (19,'http://luckyphone.kr/all-pdData/a_pcDetail/1.galaxy_note10_5g_pc.jpg','http://luckyphone.kr/all-pdData/b_mDetail/1.galaxy_note10_5g_mobile.jpg',0,0,0,'2022-05-29 22:47:28.0',NULL,NULL,0), + (20,'http://luckyphone.kr/all-pdData/a_pcDetail/iPhone_11_pc_detail.jpg','http://luckyphone.kr/all-pdData/a_pcDetail/iPhone_11_pc_detail.jpg',0,0,0,'2022-05-29 22:47:28.0',NULL,NULL,0), + (21,'http://luckyphone.kr/all-pdData/a_pcDetail/iphone_11_Pro_pc.jpg','http://luckyphone.kr/all-pdData/b_mDetail/iphone_11_Pro_mobile.jpg',0,0,0,'2022-05-29 22:47:28.0',NULL,NULL,0); +INSERT INTO phonessayo.phone_detail (phone_id,detail_pc_img,detail_mobile_img,reg_uid,udt_uid,del_uid,reg_dt,udt_dt,del_dt,del_yn) VALUES + (22,'http://luckyphone.kr/all-pdData/a_pcDetail/galaxy_A50_pc.jpg','http://luckyphone.kr/all-pdData/b_mDetail/galaxy_A50_mobile.jpg',0,0,0,'2022-05-29 22:47:28.0',NULL,NULL,0), + (23,'http://luckyphone.kr/all-pdData/a_pcDetail/galaxy_A40_pc.jpg','http://luckyphone.kr/all-pdData/b_mDetail/galaxy_A40_mobile.jpg',0,0,0,'2022-05-29 22:47:28.0',NULL,NULL,0), + (24,'http://luckyphone.kr/all-pdData/a_pcDetail/galaxy_A90_5G_pc.jpg','http://luckyphone.kr/all-pdData/b_mDetail/galaxy_A90_5G_mobile.jpg',0,0,0,'2022-05-29 22:47:28.0',NULL,NULL,0); + +INSERT INTO phonessayo.phone_price (phone_id,storage,release_price,yogum,dc_yogum,dc_danmal,reg_uid,udt_uid,del_uid,reg_dt,udt_dt,del_dt,del_yn) VALUES + (1,128,1199000,89000,480000,360000,0,0,0,'2022-05-30 04:57:51.0',NULL,NULL,0), + (1,256,1300000,89000,480000,360000,0,0,0,'2022-05-30 04:57:51.0',NULL,NULL,0), + (2,256,1254000,89000,534600,480000,0,0,0,'2022-05-30 04:57:51.0',NULL,NULL,0), + (3,256,1998700,89000,480000,360000,0,0,0,'2022-05-30 04:57:51.0',NULL,NULL,0), + (4,256,1474000,89000,360000,360000,0,0,0,'2022-05-30 04:57:51.0',NULL,NULL,0), + (5,256,1342000,89000,360000,360000,0,0,0,'2022-05-30 04:57:51.0',NULL,NULL,0), + (6,256,1078000,89000,360000,360000,0,0,0,'2022-05-30 04:57:51.0',NULL,NULL,0), + (7,256,946000,89000,360000,360000,0,0,0,'2022-05-30 04:57:51.0',NULL,NULL,0), + (8,256,1100000,89000,360000,360000,0,0,0,'2022-05-30 04:57:51.0',NULL,NULL,0), + (10,128,999900,89000,600000,210000,0,0,0,'2022-05-30 04:57:51.0',NULL,NULL,0); +INSERT INTO phonessayo.phone_price (phone_id,storage,release_price,yogum,dc_yogum,dc_danmal,reg_uid,udt_uid,del_uid,reg_dt,udt_dt,del_dt,del_yn) VALUES + (10,256,1496000,89000,600000,210000,0,0,0,'2022-05-30 04:57:51.0',NULL,NULL,0), + (11,128,1248500,89000,780000,480000,0,0,0,'2022-05-30 04:57:51.0',NULL,NULL,0), + (12,256,1353000,89000,780000,215000,0,0,0,'2022-05-30 04:57:51.0',NULL,NULL,0), + (13,256,1595000,89000,780000,480000,0,0,0,'2022-05-30 04:57:51.0',NULL,NULL,0), + (14,256,899800,89000,600000,452000,0,0,0,'2022-05-30 04:57:51.0',NULL,NULL,0), + (14,512,998800,89000,600000,452000,0,0,0,'2022-05-30 04:57:51.0',NULL,NULL,0), + (15,512,1196800,89000,600000,552000,0,0,0,'2022-05-30 04:57:51.0',NULL,NULL,0), + (16,128,899800,89000,600000,452000,0,0,0,'2022-05-30 04:57:51.0',NULL,NULL,0), + (17,256,998800,89000,780000,450000,0,0,0,'2022-05-30 04:57:51.0',NULL,NULL,0), + (17,512,1031800,89000,780000,450000,0,0,0,'2022-05-30 04:57:51.0',NULL,NULL,0); +INSERT INTO phonessayo.phone_price (phone_id,storage,release_price,yogum,dc_yogum,dc_danmal,reg_uid,udt_uid,del_uid,reg_dt,udt_dt,del_dt,del_yn) VALUES + (18,256,1248500,89000,780000,215000,0,0,0,'2022-05-30 04:57:51.0',NULL,NULL,0), + (19,256,1397000,89000,780000,215000,0,0,0,'2022-05-30 04:57:51.0',NULL,NULL,0), + (19,512,1496000,89000,780000,215000,0,0,0,'2022-05-30 04:57:51.0',NULL,NULL,0), + (20,64,990000,89000,600000,121000,0,0,0,'2022-05-30 04:57:51.0',NULL,NULL,0), + (20,128,1056000,89000,600000,121000,0,0,0,'2022-05-30 04:57:51.0',NULL,NULL,0), + (20,256,1188000,89000,600000,121000,0,0,0,'2022-05-30 04:57:51.0',NULL,NULL,0), + (21,64,1375000,89000,600000,121000,0,0,0,'2022-05-30 04:57:51.0',NULL,NULL,0), + (21,256,1375000,89000,600000,121000,0,0,0,'2022-05-30 04:57:51.0',NULL,NULL,0), + (21,512,1375000,89000,600000,121000,0,0,0,'2022-05-30 04:57:51.0',NULL,NULL,0), + (22,64,429000,89000,600000,153000,0,0,0,'2022-05-30 04:57:51.0',NULL,NULL,0); +INSERT INTO phonessayo.phone_price (phone_id,storage,release_price,yogum,dc_yogum,dc_danmal,reg_uid,udt_uid,del_uid,reg_dt,udt_dt,del_dt,del_yn) VALUES + (23,64,399300,89000,120000,153000,0,0,0,'2022-05-30 04:57:51.0',NULL,NULL,0), + (24,128,699600,89000,780000,500000,0,0,0,'2022-05-30 04:57:51.0',NULL,NULL,0); + + INSERT INTO phonessayo.`user` (phone,name,password,email,pwd_update_dt,phone2,last_login_dt,login_fail_count,reg_uid,reg_dt,udt_uid,udt_dt,del_uid,del_dt,del_yn) VALUES + ('01084068282','한강욱','1','zxcxz2002@naver.com',NULL,NULL,NULL,0,NULL,'2022-05-27 13:15:00.0',NULL,'2022-05-27 13:15:00.0',NULL,NULL,0); \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..0aad16b --- /dev/null +++ b/pom.xml @@ -0,0 +1,430 @@ + + + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 2.4.3 + + + com.ns.mobile + nsmobile-website + 0.0.1-SNAPSHOT + war + nsmovile-website + nsmobile project for Spring Boot + + 1.8 + ${basedir}/src/main/webapp/WEB-INF/lib + + + + org.springframework.boot + spring-boot-starter-data-jdbc + + + org.springframework.boot + spring-boot-starter-data-jpa + + + + org.springframework.boot + spring-boot-starter-data-rest + + + org.springframework.boot + spring-boot-starter-integration + + + + org.springframework.boot + spring-boot-starter-jdbc + + + org.springframework.boot + spring-boot-starter-mail + + + + org.springframework.boot + spring-boot-starter-security + + + + com.github.ulisesbocchio + jasypt-spring-boot-starter + 3.0.3 + + + + + + org.springframework.boot + spring-boot-starter-web + + + + + org.springframework.integration + spring-integration-http + + + + org.springframework.integration + spring-integration-jdbc + + + + org.springframework.integration + spring-integration-jpa + + + + org.springframework.integration + spring-integration-mail + + + + org.springframework.integration + spring-integration-security + + + + org.thymeleaf.extras + thymeleaf-extras-springsecurity5 + + + + + org.mariadb.jdbc + mariadb-java-client + 2.7.3 + + + + + + + org.springframework.boot + spring-boot-devtools + runtime + true + + + org.springframework.boot + spring-boot-configuration-processor + true + + + org.projectlombok + lombok + true + + + org.springframework.boot + spring-boot-starter-tomcat + provided + + + org.springframework.boot + spring-boot-starter-test + test + + + org.springframework.security + spring-security-test + test + + + + + ch.simas.qlrm + qlrm + 1.7.1 + + + + + org.jsoup + jsoup + 1.13.1 + + + + + org.springframework.boot + spring-boot-starter-validation + 2.4.5 + + + + + com.auth0 + java-jwt + 3.15.0 + + + + + org.springframework.boot + spring-boot-configuration-processor + 2.4.5 + + + + + com.github.mervick + aes-everywhere-java + 1.2.7 + + + + + org.apache.httpcomponents + httpclient + 4.5.13 + + + + + org.mybatis.spring.boot + mybatis-spring-boot-starter + 2.2.0 + + + + + com.konghq + unirest-java + 3.11.09 + + + + + javax.servlet + jstl + 1.2 + + + taglibs + standard + 1.1.2 + + + + + org.springframework.security + spring-security-taglibs + 5.5.0 + + + + + org.springframework.security + spring-security-taglibs + 5.5.0 + + + + + com.icert.comm + secu + 1.0.0 + system + ${project.basedir}/src/main/webapp/WEB-INF/lib/ICERTSecu_JDK18.jar + + + + + org.bgee.log4jdbc-log4j2 + log4jdbc-log4j2-jdbc4.1 + 1.16 + + + com.vaadin.external.google + android-json + 0.0.20131108.vaadin1 + compile + + + + + org.springframework.boot + spring-boot-starter-mail + + + + + + junit + junit + 4.13.2 + test + + + + org.springframework.boot + spring-boot-starter-test + test + + + org.junit.vintage + junit-vintage-engine + + + + + + + + javax.servlet + jstl + + + + + + + + com.captcha + botdetect + 4.0.beta3.2 + system + ${webapp.lib}/botdetect-4.0.beta3.2.jar + + + + + + com.captcha + botdetect-jsf20 + 4.0.beta3.2 + system + ${webapp.lib}/botdetect-jsf20-4.0.beta3.2.jar + + + + com.captcha + botdetect-jsp20 + 4.0.beta3.2 + system + ${webapp.lib}/botdetect-jsp20-4.0.beta3.2.jar + + + + com.captcha + botdetect-servlet + 4.0.beta3.2 + system + ${webapp.lib}/botdetect-servlet-4.0.beta3.2.jar + + + + + + commons-codec + commons-codec + 1.3 + system + ${webapp.lib}/commons-codec-1.3.jar + + + + commons-lang + commons-lang + 2.4 + system + ${webapp.lib}/commons-lang-2.4.jar + + + + kr.co.smartro + xpg_pay + 0.0.0.02 + system + ${webapp.lib}/xpg_pay-0.0.0.02.jar + + + + + + org.projectlombok + lombok + 1.18.20 + + + + org.apache.poi + poi-ooxml + 5.0.0 + + + + + com.navercorp.lucy + lucy-xss-servlet + 2.0.0 + + + org.springframework.boot + spring-boot-test + + + + + + + nsmobile + + + org.springframework.boot + spring-boot-maven-plugin + + + + org.projectlombok + lombok + + + + + + + + diff --git a/src/main/java/com/ns/mobile/website/LanEduWebsiteApplication.java b/src/main/java/com/ns/mobile/website/LanEduWebsiteApplication.java new file mode 100644 index 0000000..aaae09e --- /dev/null +++ b/src/main/java/com/ns/mobile/website/LanEduWebsiteApplication.java @@ -0,0 +1,19 @@ +package com.ns.mobile.website; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.EnableAspectJAutoProxy; +import org.springframework.retry.annotation.EnableRetry; + + +//@EnableScheduling +@EnableRetry +@EnableAspectJAutoProxy +@SpringBootApplication +public class LanEduWebsiteApplication { + + public static void main(String[] args) { + SpringApplication.run(LanEduWebsiteApplication.class, args); + } + +} diff --git a/src/main/java/com/ns/mobile/website/biz/component/SSLContextHelper.java b/src/main/java/com/ns/mobile/website/biz/component/SSLContextHelper.java new file mode 100644 index 0000000..f894bf4 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/biz/component/SSLContextHelper.java @@ -0,0 +1,84 @@ +package com.ns.mobile.website.biz.component; + +import javax.net.ssl.*; +import java.io.InputStream; +import java.security.KeyStore; +import java.security.SecureRandom; +import java.security.cert.CertificateException; + +public class SSLContextHelper { + + private static final String KEY_STORE_TYPE="JKS"; + private static final String CLASS_NAME=SSLContextHelper.class.getName(); + private static final String TRANSPORT_SECURITY_PROTOCOL="TLS"; + + public static void enable(){ + String keystoreType = "JKS"; + InputStream keystoreLocation = null; + char [] keystorePassword = null; + char [] keyPassword = null; + + + try { + KeyStore keystore = KeyStore.getInstance(keystoreType); + keystore.load(keystoreLocation, keystorePassword); + KeyManagerFactory kmfactory = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm()); + kmfactory.init(keystore, keyPassword); + InputStream truststoreLocation = null; + char [] truststorePassword = null; + String truststoreType = KEY_STORE_TYPE; + + KeyStore truststore = KeyStore.getInstance(truststoreType); + truststore.load(truststoreLocation, truststorePassword); + TrustManagerFactory tmfactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); + + KeyManager [] keymanagers = kmfactory.getKeyManagers(); + TrustManager [] trustmanagers = tmfactory.getTrustManagers(); + + SSLContext sslContext = SSLContext.getInstance(TRANSPORT_SECURITY_PROTOCOL); + sslContext.init(keymanagers, trustmanagers, new SecureRandom()); + SSLContext.setDefault(sslContext); + } catch (Exception e) { + e.printStackTrace(); + } + } + + public static void disable() { + try { + SSLContext sslc = SSLContext.getInstance("TLS"); + TrustManager[] trustManagerArray = { (TrustManager) new NullX509TrustManager() }; + sslc.init(null, trustManagerArray, null); + HttpsURLConnection.setDefaultSSLSocketFactory(sslc.getSocketFactory()); + HttpsURLConnection.setDefaultHostnameVerifier(new NullHostnameVerifier()); + } catch(Exception e) { + e.printStackTrace(); + } + } + + private static class NullX509TrustManager implements X509TrustManager { + @Override + public void checkClientTrusted(java.security.cert.X509Certificate[] arg0, String arg1) + throws CertificateException { + // TODO Auto-generated method stub + + } + @Override + public void checkServerTrusted(java.security.cert.X509Certificate[] arg0, String arg1) + throws CertificateException { + // TODO Auto-generated method stub + + } + @Override + public java.security.cert.X509Certificate[] getAcceptedIssuers() { + // TODO Auto-generated method stub + return null; + } + + } + + private static class NullHostnameVerifier implements HostnameVerifier { + public boolean verify(String hostname, SSLSession session) { + return true; + } + } +} diff --git a/src/main/java/com/ns/mobile/website/biz/component/TimeConvertComponent.java b/src/main/java/com/ns/mobile/website/biz/component/TimeConvertComponent.java new file mode 100644 index 0000000..edeb3ce --- /dev/null +++ b/src/main/java/com/ns/mobile/website/biz/component/TimeConvertComponent.java @@ -0,0 +1,278 @@ +package com.ns.mobile.website.biz.component; + +import java.text.DateFormat; +import java.text.DecimalFormat; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Calendar; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.TimeZone; +import java.util.regex.Pattern; + +import org.springframework.http.ResponseEntity; + +import com.ns.mobile.website.biz.component.model.TimeConvertObj; + +public class TimeConvertComponent { + + public static void main(String[] args) { + +/* DateFormat format1 = new SimpleDateFormat ( "yyyy-MM-dd HH:mm:ss"); + Calendar cal = Calendar.getInstance(); + cal.setTime(new Date()); + Date time1 = cal.getTime(); + cal.add(Calendar.DATE, 7); + Date time2 = cal.getTime(); + + TimeConvertObj time = TimeConvertComponent.setTimeForm(time1, time2); + + //System.out.println(getTimestampToDayWeek(time.getUnixStartTime())); + + long a = subTime(time.getUnixEndTime(), time.getUnixStartTime()); + + System.out.println(a);*/ + + int val = 10; + + int tot = 13; + + double rate = (double)((double)val/(double)tot) * 100; + + DecimalFormat form = new DecimalFormat("0.##"); + + System.out.println(Math.round(rate)); + + } + + public static long subTime(long endTimestamp, long startTimeStamp) { + + long diffSec = (endTimestamp * 1000L - startTimeStamp * 1000L) / 1000; + long diffDays = diffSec / (60); //분 + + + return diffDays; + } + + public static long getRestTime(long timestamp) { + + SimpleDateFormat f = new SimpleDateFormat("HH:mm:ss"); + Date now = new Date(); + Date start = new java.util.Date(timestamp*1000L); + long diff = start.getTime() - now.getTime(); + long minute = diff / 60000; + + return minute; + } + + public static Map reSettingDate(long startDate, long endDate, int repeatType) { + if(repeatType == 0) return null; + + Map rtnDateMap = null; + Calendar now = Calendar.getInstance(); + Calendar end = Calendar.getInstance(); + end.setTime(new java.util.Date(endDate * 1000L)); + + if(end.getTimeInMillis() < now.getTimeInMillis()) { + Calendar start = Calendar.getInstance(); + start.setTime(new java.util.Date(startDate * 1000L)); + + int diff = 1; + if(repeatType == 1) diff = 7; + + start.add(Calendar.DATE, diff); + end.add(Calendar.DATE, diff); + + long resultStartDate = start.getTimeInMillis() / 1000L; + long resultEndDate = end.getTimeInMillis() / 1000L; + + rtnDateMap = new HashMap<>(); + rtnDateMap.put("start", resultStartDate); + rtnDateMap.put("end", resultEndDate); + } + + return rtnDateMap; + } + + public static String getTimestampToDate(long timestamp){ + Date date = new java.util.Date(timestamp*1000L); + SimpleDateFormat sdf = new java.text.SimpleDateFormat("MM월dd일"); + sdf.setTimeZone(java.util.TimeZone.getTimeZone("GMT+9")); + String formattedDate = sdf.format(date); + return formattedDate; + } + + public static String getTimestampToFullDate(long timestamp){ + Date date = new java.util.Date(timestamp*1000L); + SimpleDateFormat sdf = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + sdf.setTimeZone(java.util.TimeZone.getTimeZone("GMT+9")); + String formattedDate = sdf.format(date); + return formattedDate; + } + + public static String getTimestampToDateKor(long timestamp){ + Date date = new java.util.Date(timestamp*1000L); + SimpleDateFormat sdf = new java.text.SimpleDateFormat("HH시mm분ss초"); + sdf.setTimeZone(java.util.TimeZone.getTimeZone("GMT+9")); + String formattedDate = sdf.format(date); + return formattedDate; + } + + public static String getTimestampToDayWeek(long timestamp){ + Date date = new java.util.Date(timestamp*1000L); + SimpleDateFormat sdf = new java.text.SimpleDateFormat("E"); + sdf.setTimeZone(java.util.TimeZone.getTimeZone("GMT+9")); + String formattedDate = sdf.format(date); + return formattedDate; + } + + public static String getTimestampToTime12(long timestamp){ + Date date = new java.util.Date(timestamp*1000L); + SimpleDateFormat sdf = new java.text.SimpleDateFormat("aa hh:mm"); + sdf.setTimeZone(java.util.TimeZone.getTimeZone("GMT+9")); + String formattedDate = sdf.format(date); + return formattedDate; + } + + public static String getTimestampToTime12Kor(long timestamp){ + Date date = new java.util.Date(timestamp*1000L); + SimpleDateFormat sdf = new java.text.SimpleDateFormat("a hh:mm", Locale.KOREA); + sdf.setTimeZone(java.util.TimeZone.getTimeZone("GMT+9")); + String formattedDate = sdf.format(date); + return formattedDate; + } + + public static String getTimestampToTime24(long timestamp){ + Date date = new java.util.Date(timestamp*1000L); + SimpleDateFormat sdf = new java.text.SimpleDateFormat("HH:mm"); + sdf.setTimeZone(java.util.TimeZone.getTimeZone("GMT+9")); + String formattedDate = sdf.format(date); + return formattedDate; + } + + public static String getTimestampToMonthDay(long timestamp){ + Date date = new java.util.Date(timestamp*1000L); + SimpleDateFormat sdf = new java.text.SimpleDateFormat("MM월dd일"); + sdf.setTimeZone(java.util.TimeZone.getTimeZone("GMT+9")); + String formattedDate = sdf.format(date); + return formattedDate; + } + + public static boolean checkStr(String str, int type) { + //type 1 영어 2 숫자 + boolean returnVal = false; + + return returnVal; + } + + public static TimeConvertObj setTimeForm(Date startTime, Date endTime) { + + TimeConvertObj timeForm = null; + + SimpleDateFormat sqlFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + + Calendar start = Calendar.getInstance(); + Calendar end = Calendar.getInstance(); + + start.setTime(startTime); + + //start.add(Calendar.HOUR); + + end.setTime(endTime); + + //end.add(Calendar.HOUR, -9); + + long startUnixForm = start.getTimeInMillis() / 1000L; + String startSqlForm = sqlFormat.format(start.getTime()); + + long endUnixForm = end.getTimeInMillis() / 1000L; + String endSqlForm = sqlFormat.format(end.getTime()); + + + timeForm = TimeConvertObj.builder() + .sqlStartTime(startSqlForm) + .sqlEndTime(endSqlForm) + .unixStartTime(startUnixForm) + .unixEndTime(endUnixForm) + .build(); + + return timeForm; + } + + public static TimeConvertObj setTimeForm(Date endTime) { + + TimeConvertObj timeForm = null; + + SimpleDateFormat sqlFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + + Calendar end = Calendar.getInstance(); + + //start.add(Calendar.HOUR); + + end.setTime(endTime); + + //end.add(Calendar.HOUR, -9); + + long endUnixForm = end.getTimeInMillis() / 1000L; + String endSqlForm = sqlFormat.format(end.getTime()); + + timeForm = TimeConvertObj.builder() + .sqlEndTime(endSqlForm) + .unixEndTime(endUnixForm) + .build(); + + return timeForm; + } + public static TimeConvertObj getTimeForm(Date startTime, Date endTime) { + return getTimeForm(startTime, endTime, null); + } + + public static TimeConvertObj getTimeForm(Date startTime, Date endTime, Date repeatTime) { + + TimeConvertObj timeForm = null; + + SimpleDateFormat sqlFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + + Calendar start = Calendar.getInstance(); + Calendar end = Calendar.getInstance(); + Calendar repeatEndDate = Calendar.getInstance(); + + start.setTime(startTime); + + //start.add(Calendar.HOUR, 9); + + end.setTime(endTime); + + //end.add(Calendar.HOUR, 9); + if(repeatTime == null) { + repeatEndDate.add(Calendar.MONTH, 6); + }else { + repeatEndDate.setTime(repeatTime); + } + + long startUnixForm = start.getTimeInMillis() / 1000L; + String startSqlForm = sqlFormat.format(start.getTime()); + + long endUnixForm = end.getTimeInMillis() / 1000L; + String endSqlForm = sqlFormat.format(end.getTime()); + + long repeatEndDateUnixForm = repeatEndDate.getTimeInMillis() / 1000L; + String repeatEndDateForm = sqlFormat.format(repeatEndDate.getTime()); + + timeForm = TimeConvertObj.builder() + .sqlStartTime(startSqlForm) + .sqlEndTime(endSqlForm) + .unixStartTime(startUnixForm) + .unixEndTime(endUnixForm) + .sqlRepeatEndDate(repeatEndDateForm) + .unixRepeatEndDate(repeatEndDateUnixForm) + .build(); + + return timeForm; + } + +} diff --git a/src/main/java/com/ns/mobile/website/biz/component/model/ReqCommon.java b/src/main/java/com/ns/mobile/website/biz/component/model/ReqCommon.java new file mode 100644 index 0000000..2496629 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/biz/component/model/ReqCommon.java @@ -0,0 +1,9 @@ +package com.ns.mobile.website.biz.component.model; + +import java.util.Map; + +public interface ReqCommon { + + Map getParameter(); + +} diff --git a/src/main/java/com/ns/mobile/website/biz/component/model/ReqOrgRegister.java b/src/main/java/com/ns/mobile/website/biz/component/model/ReqOrgRegister.java new file mode 100644 index 0000000..455ea3b --- /dev/null +++ b/src/main/java/com/ns/mobile/website/biz/component/model/ReqOrgRegister.java @@ -0,0 +1,34 @@ +package com.ns.mobile.website.biz.component.model; + + +import lombok.Builder; +import lombok.Data; +import lombok.ToString; + +import java.util.HashMap; +import java.util.Map; + +@ToString +@Builder +@Data +public class ReqOrgRegister implements ReqCommon { + + String bizId; //biz_id string 필수 조직 정보 ID + String ip; //Ip string 옵션 조직 생성 이후, 별도 정보 업데이트 가능, 복수로 설정 가능 + String name; // name string 필수 조직 이름 + String upperBizId; // upper_biz_id string 필수 하위 조직 생성 시, upper_biz_id (상휘 조직) 정보가 반드시 포함 됨. 상위 조직 정보가 없는 경우, 생성되지 않음 + + + @Override + public Map getParameter() { + + Map parameter = new HashMap<>(); + parameter.put("biz_id", bizId); + parameter.put("name", name); + if (upperBizId != null) { + parameter.put("upper_biz_id" , upperBizId); + } + + return parameter; + } +} diff --git a/src/main/java/com/ns/mobile/website/biz/component/model/TimeConvertObj.java b/src/main/java/com/ns/mobile/website/biz/component/model/TimeConvertObj.java new file mode 100644 index 0000000..5a01376 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/biz/component/model/TimeConvertObj.java @@ -0,0 +1,31 @@ +package com.ns.mobile.website.biz.component.model; + +import lombok.Builder; +import lombok.Data; +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; + +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementWrapper; +import javax.xml.bind.annotation.XmlRootElement; +import java.util.Date; +import java.util.List; + +@Data +@ToString +@Getter +@Setter +@Builder +@XmlRootElement(name = "root") +public class TimeConvertObj { + + private String sqlStartTime; + private String sqlEndTime; + private long unixStartTime; + private long unixEndTime; + + private String sqlRepeatEndDate; + private long unixRepeatEndDate; + +} diff --git a/src/main/java/com/ns/mobile/website/biz/dto/BaseDto.java b/src/main/java/com/ns/mobile/website/biz/dto/BaseDto.java new file mode 100644 index 0000000..3900a6f --- /dev/null +++ b/src/main/java/com/ns/mobile/website/biz/dto/BaseDto.java @@ -0,0 +1,83 @@ +package com.ns.mobile.website.biz.dto; + +import com.ns.mobile.website.biz.entity.BaseEntity; +import com.ns.mobile.website.common.util.DateUtils; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; +import org.springframework.data.annotation.CreatedDate; +import org.springframework.data.annotation.LastModifiedDate; + +import java.time.LocalDateTime; + +@SuperBuilder +@Data +@AllArgsConstructor +@NoArgsConstructor +public abstract class BaseDto { + + protected String sqlSelectType; + protected String sqlUpdateType; + + @CreatedDate + private LocalDateTime regDt; + + @LastModifiedDate + private LocalDateTime udtDt; + + private LocalDateTime delDt; + + private long regUid; + private String regName; + private long udtUid; + private String udtName; + private long delUid; + private String delName; + private boolean delYn; + + public void base(BaseEntity base) { + this.regDt = base.getRegDt(); + this.regUid = base.getRegUid(); + this.udtDt = base.getUdtDt(); + this.udtUid = base.getUdtUid(); + this.delDt = base.getDelDt(); + this.delUid = base.getUdtUid(); + this.delYn = base.isDelYn(); + } + + public String getRegDtText() { + return DateUtils.toDateString(regDt); + } + + public String getRegDtTimeText() { + return DateUtils.toDateString(regDt, DateUtils.FORMAT_DEFAULT); + } + + public String getUdtDtText() { + return DateUtils.toDateString(udtDt); + } + + public String getUdtDtTimeText() { + return DateUtils.toDateString(udtDt, DateUtils.FORMAT_DEFAULT); + } + + public String getDelDtKorText() { + if(delDt!= null) { + return DateUtils.toDateString(delDt, DateUtils.FORMAT_YYYYMMDD_KOR); + } + else { + return DateUtils.toDateString(LocalDateTime.now(), DateUtils.FORMAT_YYYYMMDD_KOR); + } + } + + public String getDelDtNextWeekText() { + if(delDt!= null) { + return DateUtils.toDateString(delDt.plusDays(7), DateUtils.FORMAT_YYYYMMDD_KOR); + } + else { + return DateUtils.toDateString(LocalDateTime.now(), DateUtils.FORMAT_YYYYMMDD_KOR); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/ns/mobile/website/biz/dto/FileUploadDto.java b/src/main/java/com/ns/mobile/website/biz/dto/FileUploadDto.java new file mode 100644 index 0000000..f26caf3 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/biz/dto/FileUploadDto.java @@ -0,0 +1,39 @@ +package com.ns.mobile.website.biz.dto; + +import com.ns.mobile.website.biz.entity.FileUpload; +import com.ns.mobile.website.biz.entity.Phone; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; + +@EqualsAndHashCode(callSuper = true) +@SuperBuilder +@Data +@AllArgsConstructor +@NoArgsConstructor +public class FileUploadDto extends BaseDto{ + + long id; + String saveFileName; + String originalFileName; + String fileExtension; + String localPath; + + public static FileUploadDto of(FileUpload fileUpload) { + + FileUploadDto fileUploadDto = FileUploadDto.builder() + .id(fileUpload.getId()) + .saveFileName(fileUpload.getSaveFileName()) + .originalFileName(fileUpload.getOriginalFileName()) + .fileExtension(fileUpload.getFileExtension()) + .localPath(fileUpload.getLocalPath()) + .build(); + fileUploadDto.base(fileUpload); + + return fileUploadDto; + } + +} diff --git a/src/main/java/com/ns/mobile/website/biz/dto/PhoneColorDto.java b/src/main/java/com/ns/mobile/website/biz/dto/PhoneColorDto.java new file mode 100644 index 0000000..47468c7 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/biz/dto/PhoneColorDto.java @@ -0,0 +1,43 @@ +package com.ns.mobile.website.biz.dto; + +import com.ns.mobile.website.biz.entity.PhoneColor; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; + +@EqualsAndHashCode(callSuper = true) +@SuperBuilder +@Data +@AllArgsConstructor +@NoArgsConstructor +public class PhoneColorDto extends BaseDto{ + long id; + long phoneId; + int sort; + String color; + String colorKr; + String colorEn; + String frontImg; + String sideImg; + String backImg; + + public static PhoneColorDto of(PhoneColor phoneColor) { + + PhoneColorDto phoneColorDto = PhoneColorDto.builder() + .id(phoneColor.getId()) + .phoneId(phoneColor.getPhoneId()) + .color(phoneColor.getColor()) + .colorKr(phoneColor.getColorKr()) + .colorEn(phoneColor.getColorEn()) + .frontImg(phoneColor.getFrontImg()) + .sideImg(phoneColor.getSideImg()) + .backImg(phoneColor.getBackImg()) + .build(); + phoneColorDto.base(phoneColor); + + return phoneColorDto; + } +} diff --git a/src/main/java/com/ns/mobile/website/biz/dto/PhoneDetailDto.java b/src/main/java/com/ns/mobile/website/biz/dto/PhoneDetailDto.java new file mode 100644 index 0000000..8c1b88a --- /dev/null +++ b/src/main/java/com/ns/mobile/website/biz/dto/PhoneDetailDto.java @@ -0,0 +1,41 @@ +package com.ns.mobile.website.biz.dto; + +import java.util.List; + +import com.ns.mobile.website.biz.entity.PhoneDetail; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; + +@EqualsAndHashCode(callSuper = true) +@SuperBuilder +@Data +@AllArgsConstructor +@NoArgsConstructor +public class PhoneDetailDto extends BaseDto{ + long id; + PhoneDto phoneDto; + List phoneColorDtoList; + List phonePriceDtoList; + long phoneId; + String detailPcImg; + String detailMobileImg; + + + public static PhoneDetailDto of(PhoneDetail phoneDetail) { + + PhoneDetailDto phoneDetailDto = PhoneDetailDto.builder() + .id(phoneDetail.getId()) + .phoneId(phoneDetail.getPhoneId()) + .detailPcImg(phoneDetail.getDetailPcImg()) + .detailMobileImg(phoneDetail.getDetailMobileImg()) + .build(); + + phoneDetailDto.base(phoneDetail); + + return phoneDetailDto; + } +} diff --git a/src/main/java/com/ns/mobile/website/biz/dto/PhoneDto.java b/src/main/java/com/ns/mobile/website/biz/dto/PhoneDto.java new file mode 100644 index 0000000..c951d38 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/biz/dto/PhoneDto.java @@ -0,0 +1,52 @@ +package com.ns.mobile.website.biz.dto; + +import com.ns.mobile.website.biz.entity.Phone; +import com.ns.mobile.website.common.util.NumberUtils; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; + +@EqualsAndHashCode(callSuper = true) +@SuperBuilder +@Data +@AllArgsConstructor +@NoArgsConstructor +public class PhoneDto extends BaseDto{ + long id; + String title; + String titleEn; + String subTitle; + String producer; + String phoneType; + String titleImg; + boolean mdPick; + boolean hot; + boolean kt; + boolean skt; + boolean lgu; + PhonePriceDto phonePriceDto; + + public static PhoneDto of(Phone phone) { + + PhoneDto phoneDto = PhoneDto.builder() + .id(phone.getId()) + .title(phone.getTitle()) + .titleEn(phone.getTitleEn()) + .subTitle(phone.getSubTitle()) + .producer(phone.getProducer()) + .phoneType(phone.getPhoneType()) + .titleImg(phone.getTitleImg()) + .mdPick(phone.isMdPick()) + .hot(phone.isHot()) + .kt(phone.isKt()) + .skt(phone.isSkt()) + .lgu(phone.isLgu()) + .build(); + phoneDto.base(phone); + + return phoneDto; + } +} diff --git a/src/main/java/com/ns/mobile/website/biz/dto/PhonePriceDto.java b/src/main/java/com/ns/mobile/website/biz/dto/PhonePriceDto.java new file mode 100644 index 0000000..19bc34f --- /dev/null +++ b/src/main/java/com/ns/mobile/website/biz/dto/PhonePriceDto.java @@ -0,0 +1,54 @@ +package com.ns.mobile.website.biz.dto; + +import com.ns.mobile.website.biz.entity.PhonePrice; +import com.ns.mobile.website.common.util.NumberUtils; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; + +@EqualsAndHashCode(callSuper = true) +@SuperBuilder +@Data +@AllArgsConstructor +@NoArgsConstructor +public class PhonePriceDto extends BaseDto{ + long id; + long phoneId; + int storage; + long releasePrice; + long yogum; + long dcYogum; + long dcDanmal; + + public String getReleasePriceTerminalAndCommunicationToComma() { + return NumberUtils.toComma((releasePrice/24)+(66750)); + } + public String getReleasePriceTerminalToComma() { + return NumberUtils.toComma(releasePrice/24); + } + public String getReleasePriceToComma() { + return NumberUtils.toComma(releasePrice); + } + public String getStorageString() { + return Integer.toString(storage) + "GB"; + } + + public static PhonePriceDto of(PhonePrice phonePrice) { + + PhonePriceDto phonePriceDto = PhonePriceDto.builder() + .id(phonePrice.getId()) + .phoneId(phonePrice.getPhoneId()) + .storage(phonePrice.getStorage()) + .releasePrice(phonePrice.getReleasePrice()) + .yogum(phonePrice.getYogum()) + .dcYogum(phonePrice.getDcYogum()) + .dcDanmal(phonePrice.getDcDanmal()) + .build(); + phonePriceDto.base(phonePrice); + + return phonePriceDto; + } +} diff --git a/src/main/java/com/ns/mobile/website/biz/dto/SellUserDto.java b/src/main/java/com/ns/mobile/website/biz/dto/SellUserDto.java new file mode 100644 index 0000000..e9dc744 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/biz/dto/SellUserDto.java @@ -0,0 +1,76 @@ +package com.ns.mobile.website.biz.dto; + +import java.time.LocalDateTime; + +import com.ns.mobile.website.biz.entity.Phone; +import com.ns.mobile.website.biz.entity.SellUser; +import com.ns.mobile.website.common.util.DateUtils; +import com.ns.mobile.website.common.util.NumberUtils; +import com.ns.mobile.website.common.util.PhoneUtils; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; + +@EqualsAndHashCode(callSuper = true) +@SuperBuilder +@Data +@AllArgsConstructor +@NoArgsConstructor +public class SellUserDto extends BaseDto{ + + long id; + LocalDateTime openingDate; + String account; + String newsAgency; + String name; + String socialSecurityNumber; + String phoneNumber; + String customerType; + String legalRepresentativeName; + String legalRepresentativePhoneNumber; + int installmentMonth; + String petName; + String serialNumber; + String subscription; + long fileId; + + public static SellUserDto of(SellUser sellUser) { + + SellUserDto sellUserDto = SellUserDto.builder() + .id(sellUser.getId()) + .openingDate(sellUser.getOpeningDate()) + .account(sellUser.getAccount()) + .newsAgency(sellUser.getNewsAgency()) + .name(sellUser.getName()) + .socialSecurityNumber(sellUser.getSocialSecurityNumber()) + .phoneNumber(sellUser.getPhoneNumber()) + .customerType(sellUser.getCustomerType()) + .legalRepresentativeName(sellUser.getLegalRepresentativeName()) + .legalRepresentativePhoneNumber(sellUser.getLegalRepresentativePhoneNumber()) + .installmentMonth(sellUser.getInstallmentMonth()) + .petName(sellUser.getPetName()) + .serialNumber(sellUser.getSerialNumber()) + .subscription(sellUser.getSubscription()) + .fileId(sellUser.getFileId()) + .build(); + + sellUserDto.base(sellUser); + + return sellUserDto; + } + + public String getOpeningDateKor() { + return DateUtils.toDateString(openingDate, DateUtils.FORMAT_YYYYMMDD_KOR); + } + + public String getPhoneNumberText() { + return PhoneUtils.toString(phoneNumber); + } + + public String getLegalRepresentativePhoneNumberText() { + return PhoneUtils.toString(legalRepresentativePhoneNumber); + } +} diff --git a/src/main/java/com/ns/mobile/website/biz/entity/BaseEntity.java b/src/main/java/com/ns/mobile/website/biz/entity/BaseEntity.java new file mode 100644 index 0000000..0c24a6a --- /dev/null +++ b/src/main/java/com/ns/mobile/website/biz/entity/BaseEntity.java @@ -0,0 +1,46 @@ +package com.ns.mobile.website.biz.entity; + +import lombok.*; +import lombok.experimental.SuperBuilder; +import org.hibernate.annotations.CreationTimestamp; +import org.hibernate.annotations.UpdateTimestamp; + +import javax.persistence.*; +import java.time.LocalDateTime; + + +@Data +@SuperBuilder +@MappedSuperclass +@NoArgsConstructor +@AllArgsConstructor +public abstract class BaseEntity { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private long id; + + @CreationTimestamp + @Column + private LocalDateTime regDt; + + @UpdateTimestamp + @Column + private LocalDateTime udtDt; + + @Column + private LocalDateTime delDt; + + @Column + private long regUid; + + @Column + private long udtUid; + + @Column + private long delUid; + + @Column + private boolean delYn; + +} diff --git a/src/main/java/com/ns/mobile/website/biz/entity/FileUpload.java b/src/main/java/com/ns/mobile/website/biz/entity/FileUpload.java new file mode 100644 index 0000000..d39b00b --- /dev/null +++ b/src/main/java/com/ns/mobile/website/biz/entity/FileUpload.java @@ -0,0 +1,23 @@ +package com.ns.mobile.website.biz.entity; + +import javax.persistence.Entity; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; + +@Data +@Entity +@SuperBuilder +@NoArgsConstructor +@AllArgsConstructor +public class FileUpload extends BaseEntity { + + long id; + String saveFileName; + String originalFileName; + String fileExtension; + String localPath; + +} diff --git a/src/main/java/com/ns/mobile/website/biz/entity/Phone.java b/src/main/java/com/ns/mobile/website/biz/entity/Phone.java new file mode 100644 index 0000000..ae18185 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/biz/entity/Phone.java @@ -0,0 +1,29 @@ +package com.ns.mobile.website.biz.entity; + +import javax.persistence.Entity; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; + +@Data +@Entity +@SuperBuilder +@NoArgsConstructor +@AllArgsConstructor +public class Phone extends BaseEntity{ + long id; + String title; + String titleEn; + String subTitle; + String producer; + String phoneType; + String titleImg; + boolean mdPick; + boolean hot; + boolean kt; + boolean skt; + boolean lgu; + +} diff --git a/src/main/java/com/ns/mobile/website/biz/entity/PhoneColor.java b/src/main/java/com/ns/mobile/website/biz/entity/PhoneColor.java new file mode 100644 index 0000000..699c6a3 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/biz/entity/PhoneColor.java @@ -0,0 +1,26 @@ +package com.ns.mobile.website.biz.entity; + +import javax.persistence.Entity; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; + +@Data +@Entity +@SuperBuilder +@NoArgsConstructor +@AllArgsConstructor +public class PhoneColor extends BaseEntity{ + long id; + long phoneId; + int sort; + String color; + String colorKr; + String colorEn; + String frontImg; + String sideImg; + String backImg; + +} diff --git a/src/main/java/com/ns/mobile/website/biz/entity/PhoneDetail.java b/src/main/java/com/ns/mobile/website/biz/entity/PhoneDetail.java new file mode 100644 index 0000000..fd93745 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/biz/entity/PhoneDetail.java @@ -0,0 +1,21 @@ +package com.ns.mobile.website.biz.entity; + +import javax.persistence.Entity; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; + +@Data +@Entity +@SuperBuilder +@NoArgsConstructor +@AllArgsConstructor +public class PhoneDetail extends BaseEntity{ + long id; + long phoneId; + String detailPcImg; + String detailMobileImg; + +} diff --git a/src/main/java/com/ns/mobile/website/biz/entity/PhonePrice.java b/src/main/java/com/ns/mobile/website/biz/entity/PhonePrice.java new file mode 100644 index 0000000..3012a23 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/biz/entity/PhonePrice.java @@ -0,0 +1,23 @@ +package com.ns.mobile.website.biz.entity; + +import javax.persistence.Entity; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; + +@Data +@Entity +@SuperBuilder +@NoArgsConstructor +@AllArgsConstructor +public class PhonePrice extends BaseEntity{ + long id; + long phoneId; + int storage; + long releasePrice; + long yogum; + long dcYogum; + long dcDanmal; +} diff --git a/src/main/java/com/ns/mobile/website/biz/entity/SellUser.java b/src/main/java/com/ns/mobile/website/biz/entity/SellUser.java new file mode 100644 index 0000000..6f6a4e3 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/biz/entity/SellUser.java @@ -0,0 +1,34 @@ +package com.ns.mobile.website.biz.entity; + +import java.time.LocalDateTime; + +import javax.persistence.Entity; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; + +@Data +@Entity +@SuperBuilder +@NoArgsConstructor +@AllArgsConstructor +public class SellUser extends BaseEntity{ + long id; + LocalDateTime openingDate; + String account; + String newsAgency; + String name; + String socialSecurityNumber; + String phoneNumber; + String customerType; + String legalRepresentativeName; + String legalRepresentativePhoneNumber; + int installmentMonth; + String petName; + String serialNumber; + String subscription; + long fileId; + +} diff --git a/src/main/java/com/ns/mobile/website/biz/exception/BizApiException.java b/src/main/java/com/ns/mobile/website/biz/exception/BizApiException.java new file mode 100644 index 0000000..95567f6 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/biz/exception/BizApiException.java @@ -0,0 +1,8 @@ +package com.ns.mobile.website.biz.exception; + +public class BizApiException extends CommonException { + + public BizApiException(String message) { + super(message); + } +} diff --git a/src/main/java/com/ns/mobile/website/biz/exception/BizException.java b/src/main/java/com/ns/mobile/website/biz/exception/BizException.java new file mode 100644 index 0000000..75e4588 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/biz/exception/BizException.java @@ -0,0 +1,8 @@ +package com.ns.mobile.website.biz.exception; + +public class BizException extends CommonException { + + public BizException(String message) { + super(message); + } +} diff --git a/src/main/java/com/ns/mobile/website/biz/exception/CommonException.java b/src/main/java/com/ns/mobile/website/biz/exception/CommonException.java new file mode 100644 index 0000000..8fc1a5e --- /dev/null +++ b/src/main/java/com/ns/mobile/website/biz/exception/CommonException.java @@ -0,0 +1,31 @@ +package com.ns.mobile.website.biz.exception; + +public class CommonException extends RuntimeException { + + public static final String MSG_NOT_FOUND_PAGE = "페이지 정보가 존재하지 않습니다."; + public static final String MSG_NOT_LOGIN = "로그인 후 이용해 주세요."; + public static final String MSG_NOT_CONTENTS = "요청하신 내용이 존재하지 않습니다."; + public static final String MSG_MISS_INPUT_PARAMETER = "입력정보가 정확하지 않습니다."; + + public static final String MSG_DB_COMMON_ERROR = "데이터 처리중 문제가 발생하였습니다."; + + public static final String MSG_BBS_INVALID_BOARD_TYPE = "게시판 정보가 정확하지 않습니다."; + + public static final String MSG_NOT_SELECTED_CAFE = "조직이 선택되지 않았습니다. 조직 선택 후 이용해 주세요."; + + public static final String MSG_TEMPORARY_ERROR = "일시적인 오류가 발생했습니다. 잠시 후 다시 이용해 주세요."; + + public static final String MSG_NOT_AUTH_ERROR = "이용 권한이 없습니다."; + + public static final String MSG_DUBPLICATE_LOGIN = "동일한 사용자 계정으로 중복 로그인되어 자동 로그아웃 처리 되었습니다."; + + public static final String MSG_KT_UNAUTHORIZED_ERROR = "토큰생성 중 일시적인 오류가 발생했습니다. 잠시 후 다시 이용해 주세요."; + + public CommonException() { + super(MSG_NOT_LOGIN); + } + + public CommonException(String message) { + super(message); + } +} diff --git a/src/main/java/com/ns/mobile/website/biz/exception/DuplicateLoginException.java b/src/main/java/com/ns/mobile/website/biz/exception/DuplicateLoginException.java new file mode 100644 index 0000000..d1f34e8 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/biz/exception/DuplicateLoginException.java @@ -0,0 +1,15 @@ +package com.ns.mobile.website.biz.exception; + +public class DuplicateLoginException extends CommonException { + + private static final long serialVersionUID = -1609054675554685549L; + + public DuplicateLoginException() { + super(MSG_NOT_LOGIN); + } + + public DuplicateLoginException(String message) { + super(message); + } + +} diff --git a/src/main/java/com/ns/mobile/website/biz/exception/LoginFailException.java b/src/main/java/com/ns/mobile/website/biz/exception/LoginFailException.java new file mode 100644 index 0000000..c780ee0 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/biz/exception/LoginFailException.java @@ -0,0 +1,27 @@ + +package com.ns.mobile.website.biz.exception; + +import org.springframework.security.core.AuthenticationException; + +/** + * 로그인 실패 관련 예외 + */ +public class LoginFailException extends AuthenticationException { + + private static final long serialVersionUID = -4359790706288929704L; + + private LoginFailMessage loginFailMessage; + + public LoginFailException(LoginFailMessage loginFailMessage) { + super(loginFailMessage.getMessage()); + this.loginFailMessage = loginFailMessage; + } + + public LoginFailMessage getLoginFailMessage() { + return loginFailMessage; + } + + public void setLoginFailMessage(LoginFailMessage loginFailMessage) { + this.loginFailMessage = loginFailMessage; + } +} diff --git a/src/main/java/com/ns/mobile/website/biz/exception/LoginFailMessage.java b/src/main/java/com/ns/mobile/website/biz/exception/LoginFailMessage.java new file mode 100644 index 0000000..551476b --- /dev/null +++ b/src/main/java/com/ns/mobile/website/biz/exception/LoginFailMessage.java @@ -0,0 +1,21 @@ +package com.ns.mobile.website.biz.exception; + +/** + * 로그인 실패 관련 메세지 + */ +public enum LoginFailMessage { + + USER_NOT_FOUND("아이디 또는 비밀번호가 정확하지 않습니다."), + USER_USING_STOP("이용이 중지된 회원입니다."); + + private final String message; + + LoginFailMessage(String message) { + this.message = message; + } + + public String getMessage() { + return message; + } + +} diff --git a/src/main/java/com/ns/mobile/website/biz/exception/NoExistsBizException.java b/src/main/java/com/ns/mobile/website/biz/exception/NoExistsBizException.java new file mode 100644 index 0000000..e9b5ae3 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/biz/exception/NoExistsBizException.java @@ -0,0 +1,13 @@ +package com.ns.mobile.website.biz.exception; + + +public class NoExistsBizException extends CommonException { + + public NoExistsBizException() { + super(); + } + + public NoExistsBizException(String message) { + super(message); + } +} diff --git a/src/main/java/com/ns/mobile/website/biz/exception/NotAuthException.java b/src/main/java/com/ns/mobile/website/biz/exception/NotAuthException.java new file mode 100644 index 0000000..099c185 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/biz/exception/NotAuthException.java @@ -0,0 +1,15 @@ +package com.ns.mobile.website.biz.exception; + +public class NotAuthException extends BizException { + + private static final long serialVersionUID = 6890799958690708246L; + + public NotAuthException() { + super(MSG_NOT_AUTH_ERROR); + } + + public NotAuthException(String message) { + super(message); + } + +} diff --git a/src/main/java/com/ns/mobile/website/biz/exception/NotLoginException.java b/src/main/java/com/ns/mobile/website/biz/exception/NotLoginException.java new file mode 100644 index 0000000..feaf01d --- /dev/null +++ b/src/main/java/com/ns/mobile/website/biz/exception/NotLoginException.java @@ -0,0 +1,15 @@ +package com.ns.mobile.website.biz.exception; + +public class NotLoginException extends CommonException { + + private static final long serialVersionUID = -1609054675554685549L; + + public NotLoginException() { + super(MSG_NOT_LOGIN); + } + + public NotLoginException(String message) { + super(message); + } + +} diff --git a/src/main/java/com/ns/mobile/website/biz/exception/NotSelectedCafeException.java b/src/main/java/com/ns/mobile/website/biz/exception/NotSelectedCafeException.java new file mode 100644 index 0000000..f2a4e28 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/biz/exception/NotSelectedCafeException.java @@ -0,0 +1,15 @@ +package com.ns.mobile.website.biz.exception; + +public class NotSelectedCafeException extends CommonException { + + private static final long serialVersionUID = -1609054675554685549L; + + public NotSelectedCafeException() { + super(MSG_NOT_LOGIN); + } + + public NotSelectedCafeException(String message) { + super(message); + } + +} diff --git a/src/main/java/com/ns/mobile/website/biz/model/ResponseData.java b/src/main/java/com/ns/mobile/website/biz/model/ResponseData.java new file mode 100644 index 0000000..af75ed7 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/biz/model/ResponseData.java @@ -0,0 +1,53 @@ +package com.ns.mobile.website.biz.model; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; + +@AllArgsConstructor +@NoArgsConstructor +@SuperBuilder +@Data +public class ResponseData { + + private ResponseDataHeader header; + private Object body; + + public static ResponseData fail(String message) { + return fail(message, null); + } + + public static ResponseData fail(String message, Object body) { + return ResponseData.builder() + .header(ResponseDataHeader.builder().result(false).message(message).build()) + .body(body) + .build(); + } + + public static ResponseData fail(String errCode, String message, Object body) { + return ResponseData.builder() + .header(ResponseDataHeader.builder().result(false).errCode(errCode).message(message).build()) + .body(body) + .build(); + } + + public static ResponseData success() { + return success(null); + } + + public static ResponseData success(Object body) { + return ResponseData.builder() + .header(ResponseDataHeader.builder().result(true).message("").build()) + .body(body) + .build(); + } + + public static ResponseData success(String errCode, String message, Object body) { + return ResponseData.builder() + .header(ResponseDataHeader.builder().result(true).errCode(errCode).message(message).build()) + .body(body) + .build(); + } +} diff --git a/src/main/java/com/ns/mobile/website/biz/model/ResponseDataHeader.java b/src/main/java/com/ns/mobile/website/biz/model/ResponseDataHeader.java new file mode 100644 index 0000000..365923f --- /dev/null +++ b/src/main/java/com/ns/mobile/website/biz/model/ResponseDataHeader.java @@ -0,0 +1,19 @@ +package com.ns.mobile.website.biz.model; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; + +@Data +@SuperBuilder +@AllArgsConstructor +@NoArgsConstructor +public class ResponseDataHeader { + + private boolean result; + private String errCode; + private String message; + +} \ No newline at end of file diff --git a/src/main/java/com/ns/mobile/website/biz/model/ResponseResult.java b/src/main/java/com/ns/mobile/website/biz/model/ResponseResult.java new file mode 100644 index 0000000..4dfcc02 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/biz/model/ResponseResult.java @@ -0,0 +1,42 @@ +package com.ns.mobile.website.biz.model; + +import org.springframework.http.ResponseEntity; +import com.ns.mobile.website.biz.dto.BaseDto; + +public class ResponseResult { + + public static ResponseEntity result(ServiceResult result) { + + if (result.isResult()) { + return success(null); + } + + //return ResponseEntity.badRequest().body(ResponseData.fail(result.getMessage())); + return ResponseEntity.ok().body(ResponseData.fail(result.getMessage())); + } + + public static ResponseEntity success() { + return success(null); + } + + public static ResponseEntity success(Object body) { + return ResponseEntity.ok().body(ResponseData.success(body)); + } + + public static ResponseEntity success(String errCode, String message, Object data){ + return ResponseEntity.ok().body(ResponseData.success(errCode, message, data)); + } + + public static ResponseEntity fail(String message){ + return ResponseEntity.ok().body(ResponseData.fail(message)); + } + + public static ResponseEntity fail(String errCode, String message){ + return ResponseEntity.ok().body(ResponseData.fail(errCode, message, null)); + } + + public static ResponseEntity fail(String errCode, String message, Object data){ + return ResponseEntity.ok().body(ResponseData.fail(errCode, message, data)); + } + +} \ No newline at end of file diff --git a/src/main/java/com/ns/mobile/website/biz/model/SearchData.java b/src/main/java/com/ns/mobile/website/biz/model/SearchData.java new file mode 100644 index 0000000..ed0f670 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/biz/model/SearchData.java @@ -0,0 +1,16 @@ +package com.ns.mobile.website.biz.model; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; + +@Data +@SuperBuilder +@NoArgsConstructor +@AllArgsConstructor +public class SearchData { + String type; + String text; + +} diff --git a/src/main/java/com/ns/mobile/website/biz/model/ServiceResult.java b/src/main/java/com/ns/mobile/website/biz/model/ServiceResult.java new file mode 100644 index 0000000..dda6860 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/biz/model/ServiceResult.java @@ -0,0 +1,67 @@ +package com.ns.mobile.website.biz.model; + +import com.ns.mobile.website.biz.dto.BaseDto; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; + +import java.util.List; + +@AllArgsConstructor +@SuperBuilder +@Data +public class ServiceResult { + + private boolean result; + private String message; + private T detail; + private List list; + + public ServiceResult() { + this.result = true; + this.message = ""; + } + + public ServiceResult(boolean result, String message) { + this.result = result; + this.message = message; + } + + public ServiceResult(T detail) { + this.result = true; + this.message = ""; + this.detail = detail; + this.list = null; + } + + public ServiceResult(List list) { + this.result = true; + this.message = ""; + this.detail = null; + this.list = list; + } + + public boolean isFail() { + return !result; + } + + public static ServiceResult success() { + return new ServiceResult<>(); + } + + public static ServiceResult success(S obj) { + return new ServiceResult<>(obj); + } + + public static ServiceResult success(List objList) { + return new ServiceResult<>(objList); + } + + public static ServiceResult fail(String message) { + return new ServiceResult<>(false, message); + } + +} \ No newline at end of file diff --git a/src/main/java/com/ns/mobile/website/biz/model/UploadFileModel.java b/src/main/java/com/ns/mobile/website/biz/model/UploadFileModel.java new file mode 100644 index 0000000..62f6851 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/biz/model/UploadFileModel.java @@ -0,0 +1,43 @@ +package com.ns.mobile.website.biz.model; + +import com.ns.mobile.website.biz.entity.FileUpload; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + + +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class UploadFileModel { + + long id; + long length; + String originalFileName; + String fileExtension; + String saveFileName; + String uploadUrl; + String localPath; + String uuid; + + boolean result; + String message; + + public static UploadFileModel fail(String message) { + return UploadFileModel.builder().result(false).message(message).build(); + } + + public static FileUpload of(UploadFileModel uploadFileModel) { + + return FileUpload.builder() + .originalFileName(uploadFileModel.getOriginalFileName()) + .fileExtension(uploadFileModel.getFileExtension()) + .saveFileName(uploadFileModel.getSaveFileName()) + .localPath(uploadFileModel.getLocalPath()) + .build(); + } + +} diff --git a/src/main/java/com/ns/mobile/website/biz/properties/FileUrlProperties.java b/src/main/java/com/ns/mobile/website/biz/properties/FileUrlProperties.java new file mode 100644 index 0000000..6b7a500 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/biz/properties/FileUrlProperties.java @@ -0,0 +1,16 @@ +package com.ns.mobile.website.biz.properties; + +import lombok.Data; +import lombok.ToString; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.stereotype.Component; + +@Component +@ConfigurationProperties("file-url") +@ToString +@Data +public class FileUrlProperties { + private String baseUploadLocation; + private String uploadPath; + private String cmsUploadLocation; +} diff --git a/src/main/java/com/ns/mobile/website/biz/repository/FileUploadRepository.java b/src/main/java/com/ns/mobile/website/biz/repository/FileUploadRepository.java new file mode 100644 index 0000000..797362a --- /dev/null +++ b/src/main/java/com/ns/mobile/website/biz/repository/FileUploadRepository.java @@ -0,0 +1,23 @@ +package com.ns.mobile.website.biz.repository; + +import java.util.List; +import java.util.Optional; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Modifying; +import org.springframework.data.jpa.repository.Query; +import org.springframework.stereotype.Repository; +import org.springframework.transaction.annotation.Transactional; + +import com.ns.mobile.website.biz.dto.FileUploadDto; +import com.ns.mobile.website.biz.entity.FileUpload; + +@Repository +public interface FileUploadRepository extends JpaRepository { + Optional> findByDelYn(boolean delYn); + List findByDelYnOrderByIdDesc(boolean delYn); + @Transactional + @Modifying + @Query(value = "UPDATE file_upload SET del_yn = 1 WHERE id = :id", nativeQuery = true) + int updateDelYn(Long id); +} diff --git a/src/main/java/com/ns/mobile/website/biz/repository/PhoneColorRepository.java b/src/main/java/com/ns/mobile/website/biz/repository/PhoneColorRepository.java new file mode 100644 index 0000000..7b1ed59 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/biz/repository/PhoneColorRepository.java @@ -0,0 +1,14 @@ +package com.ns.mobile.website.biz.repository; + +import java.util.List; +import java.util.Optional; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +import com.ns.mobile.website.biz.entity.PhoneColor; + +@Repository +public interface PhoneColorRepository extends JpaRepository { + Optional> findByPhoneIdAndDelYnOrderBySort(long phoneId, boolean delYn); +} diff --git a/src/main/java/com/ns/mobile/website/biz/repository/PhoneDetailRepository.java b/src/main/java/com/ns/mobile/website/biz/repository/PhoneDetailRepository.java new file mode 100644 index 0000000..e563f38 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/biz/repository/PhoneDetailRepository.java @@ -0,0 +1,13 @@ +package com.ns.mobile.website.biz.repository; + +import java.util.Optional; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +import com.ns.mobile.website.biz.entity.PhoneDetail; + +@Repository +public interface PhoneDetailRepository extends JpaRepository { + Optional findByPhoneIdAndDelYn(long phoneId, boolean delYn); +} diff --git a/src/main/java/com/ns/mobile/website/biz/repository/PhonePriceRepository.java b/src/main/java/com/ns/mobile/website/biz/repository/PhonePriceRepository.java new file mode 100644 index 0000000..cd96432 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/biz/repository/PhonePriceRepository.java @@ -0,0 +1,15 @@ +package com.ns.mobile.website.biz.repository; + +import java.util.List; +import java.util.Optional; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +import com.ns.mobile.website.biz.entity.PhonePrice; + +@Repository +public interface PhonePriceRepository extends JpaRepository { + Optional> findByPhoneIdAndDelYn(long phoneId, boolean delYn); + Optional findTop1ByPhoneIdAndDelYnOrderByReleasePrice(long phoneId, boolean delYn); +} diff --git a/src/main/java/com/ns/mobile/website/biz/repository/PhoneRepository.java b/src/main/java/com/ns/mobile/website/biz/repository/PhoneRepository.java new file mode 100644 index 0000000..5537c57 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/biz/repository/PhoneRepository.java @@ -0,0 +1,16 @@ +package com.ns.mobile.website.biz.repository; + +import java.util.List; +import java.util.Optional; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +import com.ns.mobile.website.biz.entity.Phone; + +@Repository +public interface PhoneRepository extends JpaRepository { + Optional findByIdAndDelYn(long id, boolean delYn); + Optional> findByDelYn(boolean delYn); + Optional> findByProducerAndDelYn(String producer, boolean delYn); +} diff --git a/src/main/java/com/ns/mobile/website/biz/repository/SellUserRepository.java b/src/main/java/com/ns/mobile/website/biz/repository/SellUserRepository.java new file mode 100644 index 0000000..fc7adc8 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/biz/repository/SellUserRepository.java @@ -0,0 +1,40 @@ +package com.ns.mobile.website.biz.repository; + +import java.util.List; +import java.util.Optional; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Modifying; +import org.springframework.data.jpa.repository.Query; +import org.springframework.stereotype.Repository; +import org.springframework.transaction.annotation.Transactional; + +import com.ns.mobile.website.biz.entity.SellUser; + +@Repository +public interface SellUserRepository extends JpaRepository { + Optional> findByDelYn(boolean delYn); + Optional> findByAccountContainsAndDelYn(String account, boolean delYn); + Optional> findByNewsAgencyContainsAndDelYn(String newsAgency, boolean delYn); + Optional> findByNameContainsAndDelYn(String name, boolean delYn); + Optional> findByPhoneNumberContainsAndDelYn(String phoneNumber, boolean delYn); + Optional> findByCustomerTypeContainsAndDelYn(String customerType, boolean delYn); + Optional> findByPetNameContainsAndDelYn(String petName, boolean delYn); + Optional> findBySerialNumberContainsAndDelYn(String serialNumber, boolean delYn); + + @Query(value = "select * from sell_user " + + "where (account like concat('%',:account,'%') " + + "or news_agency like concat('%',:newsAgency,'%') " + + "or name like concat('%',:name,'%') " + + "or phone_number like concat('%',:phoneNumber,'%') " + + "or customer_type like concat('%',:customerType,'%') " + + "or pet_name like concat('%',:petName,'%') " + + "or serial_number like concat('%',:serialNumber,'%')) " + + "and del_yn = :delYn", nativeQuery = true) + Optional> findByAccountContainsOrNewsAgencyContainsOrNameContainsOrPhoneNumberContainsOrCustomerTypeContainsOrPetNameContainsOrSerialNumberContainsAndDelYn(String account, String newsAgency, String name, String phoneNumber, String customerType, String petName, String serialNumber, boolean delYn); + + @Transactional + @Modifying + @Query(value = "UPDATE sell_user SET del_yn = 1 WHERE file_id = :id", nativeQuery = true) + int updateDelYn(Long id); +} diff --git a/src/main/java/com/ns/mobile/website/biz/service/FileService.java b/src/main/java/com/ns/mobile/website/biz/service/FileService.java new file mode 100644 index 0000000..8056a7f --- /dev/null +++ b/src/main/java/com/ns/mobile/website/biz/service/FileService.java @@ -0,0 +1,105 @@ +package com.ns.mobile.website.biz.service; + +import java.io.File; +import java.io.FileOutputStream; + +import org.springframework.stereotype.Service; +import org.springframework.util.FileCopyUtils; +import org.springframework.web.multipart.MultipartFile; + +import com.ns.mobile.website.biz.entity.FileUpload; +import com.ns.mobile.website.biz.model.UploadFileModel; +import com.ns.mobile.website.biz.properties.FileUrlProperties; +import com.ns.mobile.website.common.util.DateUtils; +import com.ns.mobile.website.common.util.FileUtils; +import com.ns.mobile.website.common.util.StringUtils; + +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; + +@RequiredArgsConstructor +@Slf4j +@Service +public class FileService { + + private final FileUrlProperties fileUrlProperties; + + public UploadFileModel upload(MultipartFile file) { + + if (file == null) { + return UploadFileModel.fail("파일 정보가 존재하지 않습니다."); + } + + UploadFileModel uploadFileModel = null; + + try { + uploadFileModel = this._upload(file); + if (uploadFileModel == null || uploadFileModel.getSaveFileName().isEmpty()) { + return UploadFileModel.fail("파일 정보가 존재하지 않습니다."); + } + + } catch (Exception e) { + return UploadFileModel.fail(e.getMessage()); + } + + String uuid = StringUtils.getUuid(); + uploadFileModel.setUuid(uuid); + + FileUpload hireUploadFile = UploadFileModel.of(uploadFileModel); + + uploadFileModel.setResult(true); + uploadFileModel.setId(hireUploadFile.getId()); + + return uploadFileModel; + } + + private String getSaveLocalPath(String baseUploadLocation, String saveFilename) { + String currentYear = DateUtils.getCurrentYear(); + String currentMonth = DateUtils.getCurrentMonth(); + + return String.format("%s/%s/%s/%s", baseUploadLocation, currentYear, currentMonth, saveFilename); + } + + private String getUploadPath(String uploadPath, String saveFilename) { + String currentYear = DateUtils.getCurrentYear(); + String currentMonth = DateUtils.getCurrentMonth(); + + return String.format("%s/%s/%s/%s", uploadPath, currentYear, currentMonth, saveFilename); + } + + private UploadFileModel _upload(MultipartFile multipartFile) { + + try { + FileUtils.createUploadPath(fileUrlProperties.getBaseUploadLocation()); + + long length = multipartFile.getSize(); + String originalFilename = multipartFile.getOriginalFilename(); + String fileExtension = FileUtils.getFileExtension(originalFilename).toLowerCase(); + String saveFilename = String.format("%s.%s", StringUtils.getUuid(), fileExtension); + String localPath = getSaveLocalPath(fileUrlProperties.getBaseUploadLocation(), saveFilename); + String uploadUrl = getUploadPath(fileUrlProperties.getUploadPath(), saveFilename); + + File file = new File(localPath); + FileCopyUtils.copy(multipartFile.getInputStream(), new FileOutputStream(file)); + + file.setExecutable(true, false); + file.setReadable(true, false); + file.setWritable(true, false); + + return UploadFileModel.builder() + .length(length) + .originalFileName(originalFilename) + .fileExtension(fileExtension) + .saveFileName(saveFilename) + .uploadUrl(uploadUrl) + .localPath(localPath) + .build(); + + } catch (Exception e) { + log.error("error", e); + } + + return null; + } + +} diff --git a/src/main/java/com/ns/mobile/website/biz/service/PhoneService.java b/src/main/java/com/ns/mobile/website/biz/service/PhoneService.java new file mode 100644 index 0000000..5d5250c --- /dev/null +++ b/src/main/java/com/ns/mobile/website/biz/service/PhoneService.java @@ -0,0 +1,13 @@ +package com.ns.mobile.website.biz.service; + +import java.util.List; + +import com.ns.mobile.website.biz.dto.PhoneDetailDto; +import com.ns.mobile.website.biz.dto.PhoneDto; +import com.ns.mobile.website.biz.entity.Phone; + +public interface PhoneService { + List selectList(Phone parameter); + + PhoneDetailDto select(Phone parameter); +} diff --git a/src/main/java/com/ns/mobile/website/biz/service/SellService.java b/src/main/java/com/ns/mobile/website/biz/service/SellService.java new file mode 100644 index 0000000..f7cfbf4 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/biz/service/SellService.java @@ -0,0 +1,16 @@ +package com.ns.mobile.website.biz.service; + +import java.util.List; + +import com.ns.mobile.website.biz.dto.FileUploadDto; +import com.ns.mobile.website.biz.dto.SellUserDto; +import com.ns.mobile.website.biz.entity.FileUpload; +import com.ns.mobile.website.biz.entity.SellUser; +import com.ns.mobile.website.biz.model.SearchData; + +public interface SellService { + List selectList(SearchData parameter); + List selectAddList(SearchData parameter); + boolean saveList(FileUpload fileUpload, List list); + boolean delFileUpload(FileUpload fileUpload); +} diff --git a/src/main/java/com/ns/mobile/website/biz/service/impl/PhoneServiceImpl.java b/src/main/java/com/ns/mobile/website/biz/service/impl/PhoneServiceImpl.java new file mode 100644 index 0000000..42d7c11 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/biz/service/impl/PhoneServiceImpl.java @@ -0,0 +1,80 @@ +package com.ns.mobile.website.biz.service.impl; + +import java.util.ArrayList; +import java.util.List; + +import org.springframework.stereotype.Service; + +import com.ns.mobile.website.biz.dto.PhoneColorDto; +import com.ns.mobile.website.biz.dto.PhoneDetailDto; +import com.ns.mobile.website.biz.dto.PhoneDto; +import com.ns.mobile.website.biz.dto.PhonePriceDto; +import com.ns.mobile.website.biz.entity.Phone; +import com.ns.mobile.website.biz.entity.PhoneColor; +import com.ns.mobile.website.biz.entity.PhoneDetail; +import com.ns.mobile.website.biz.entity.PhonePrice; +import com.ns.mobile.website.biz.exception.BizException; +import com.ns.mobile.website.biz.repository.PhoneColorRepository; +import com.ns.mobile.website.biz.repository.PhoneDetailRepository; +import com.ns.mobile.website.biz.repository.PhonePriceRepository; +import com.ns.mobile.website.biz.repository.PhoneRepository; +import com.ns.mobile.website.biz.service.PhoneService; + +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import util.SU; + +@Slf4j +@RequiredArgsConstructor +@Service +public class PhoneServiceImpl implements PhoneService{ + + private final PhoneRepository phoneRepository; + private final PhoneDetailRepository phoneDetailRepository; + private final PhoneColorRepository phoneColorRepository; + private final PhonePriceRepository phonePriceRepository; + @Override + public List selectList(Phone parameter) { + List phoneList = null; + if(SU.emt(parameter.getProducer())) { + phoneList = phoneRepository.findByDelYn(false).orElseThrow(()-> new BizException("")); + }else { + phoneList = phoneRepository.findByProducerAndDelYn(parameter.getProducer(),false).orElseThrow(()-> new BizException("")); + } + List resultList = new ArrayList(); + for(Phone e : phoneList) { + PhoneDto temp = PhoneDto.of(e); + temp.setPhonePriceDto(PhonePriceDto.of(phonePriceRepository.findTop1ByPhoneIdAndDelYnOrderByReleasePrice(e.getId(), false).orElseThrow(()-> new BizException("")))); + resultList.add(temp); + } + return resultList; + } + + @Override + public PhoneDetailDto select(Phone parameter) { + Phone phone = phoneRepository.findByIdAndDelYn(parameter.getId(), false).orElseThrow(()-> new BizException("")); + PhoneDto phoneDto = PhoneDto.of(phone); + + List phonePriceList = phonePriceRepository.findByPhoneIdAndDelYn(phone.getId(), false).orElseThrow(()-> new BizException("")); + List phonPriceDtoList = new ArrayList(); + for(PhonePrice e : phonePriceList) { + phonPriceDtoList.add(PhonePriceDto.of(e)); + } + + List phoneColorList = phoneColorRepository.findByPhoneIdAndDelYnOrderBySort(phone.getId(), false).orElseThrow(()-> new BizException("")); + List phonColorDtoList = new ArrayList(); + for(PhoneColor e : phoneColorList) { + phonColorDtoList.add(PhoneColorDto.of(e)); + } + + PhoneDetail phoneDetail = phoneDetailRepository.findByPhoneIdAndDelYn(phone.getId(), false).orElseThrow(()-> new BizException("")); + PhoneDetailDto result = PhoneDetailDto.of(phoneDetail); + + result.setPhoneDto(phoneDto); + result.setPhonePriceDtoList(phonPriceDtoList); + result.setPhoneColorDtoList(phonColorDtoList); + + return result; + } + +} diff --git a/src/main/java/com/ns/mobile/website/biz/service/impl/SellServiceImpl.java b/src/main/java/com/ns/mobile/website/biz/service/impl/SellServiceImpl.java new file mode 100644 index 0000000..3670004 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/biz/service/impl/SellServiceImpl.java @@ -0,0 +1,97 @@ +package com.ns.mobile.website.biz.service.impl; + +import java.util.ArrayList; +import java.util.List; + +import javax.transaction.Transactional; + +import org.springframework.data.domain.Sort; +import org.springframework.stereotype.Service; + +import com.ns.mobile.website.biz.dto.FileUploadDto; +import com.ns.mobile.website.biz.dto.SellUserDto; +import com.ns.mobile.website.biz.entity.FileUpload; +import com.ns.mobile.website.biz.entity.SellUser; +import com.ns.mobile.website.biz.exception.BizApiException; +import com.ns.mobile.website.biz.model.SearchData; +import com.ns.mobile.website.biz.repository.FileUploadRepository; +import com.ns.mobile.website.biz.repository.SellUserRepository; +import com.ns.mobile.website.biz.service.SellService; + +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import util.SU; + +@Slf4j +@RequiredArgsConstructor +@Service +public class SellServiceImpl implements SellService{ + + private final SellUserRepository sellUserRepository; + private final FileUploadRepository fileUploadRepository; + @Override + public List selectList(SearchData parameter) { + List sellUserList; + if(SU.eq("account",parameter.getType())) { + sellUserList = sellUserRepository.findByAccountContainsAndDelYn(parameter.getText(), false).orElseThrow(() -> new BizApiException("없는 거래처명입니다.")); + }else if(SU.eq("newsAgency",parameter.getType())){ + sellUserList = sellUserRepository.findByNewsAgencyContainsAndDelYn(parameter.getText(), false).orElseThrow(() -> new BizApiException("없는 통신사명입니다")); + }else if(SU.eq("name",parameter.getType())){ + sellUserList = sellUserRepository.findByNameContainsAndDelYn(parameter.getText(), false).orElseThrow(() -> new BizApiException("없는 명의자 입니다")); + }else if(SU.eq("phoneNumber",parameter.getType())){ + sellUserList = sellUserRepository.findByPhoneNumberContainsAndDelYn(parameter.getText(), false).orElseThrow(() -> new BizApiException("없는 개통번호입니다")); + }else if(SU.eq("customerType",parameter.getType())){ + sellUserList = sellUserRepository.findByCustomerTypeContainsAndDelYn(parameter.getText(), false).orElseThrow(() -> new BizApiException("없는 고객종류입니다")); + }else if(SU.eq("petName",parameter.getType())){ + sellUserList = sellUserRepository.findByPetNameContainsAndDelYn(parameter.getText(), false).orElseThrow(() -> new BizApiException("없는 펫네임입니다")); + }else if(SU.eq("serialNumber",parameter.getType())){ + sellUserList = sellUserRepository.findBySerialNumberContainsAndDelYn(parameter.getText(), false).orElseThrow(() -> new BizApiException("없는 시리얼번호입니다")); + }else { + sellUserList = sellUserRepository.findByAccountContainsOrNewsAgencyContainsOrNameContainsOrPhoneNumberContainsOrCustomerTypeContainsOrPetNameContainsOrSerialNumberContainsAndDelYn(parameter.getText(),parameter.getText(),parameter.getText(),parameter.getText(),parameter.getText(),parameter.getText(),parameter.getText(), false).orElseThrow(() -> new BizApiException("없는 시리얼번호입니다")); + } + + List resultList = new ArrayList(); + for(SellUser e : sellUserList) { + SellUserDto temp = SellUserDto.of(e); + resultList.add(temp); + } + return resultList; + } + + @Override + public List selectAddList(SearchData parameter) { + List resultList = fileUploadRepository.findByDelYnOrderByIdDesc(false); + + return resultList; + } + + @Transactional + @Override + public boolean saveList(FileUpload fileUpload, List list) { + try { + fileUpload = fileUploadRepository.saveAndFlush(fileUpload); + for(SellUser e : list) { + e.setFileId(fileUpload.getId()); + } + sellUserRepository.saveAll(list); + }catch(Exception e) { + log.error(e.getMessage()); + return false; + } + return true; + } + + @Override + public boolean delFileUpload(FileUpload fileUpload) { + try { + fileUploadRepository.updateDelYn(fileUpload.getId()); + sellUserRepository.updateDelYn(fileUpload.getId()); + }catch(Exception e) { + log.error(e.getMessage()); + return false; + } + return true; + } + + +} diff --git a/src/main/java/com/ns/mobile/website/common/AuthError.java b/src/main/java/com/ns/mobile/website/common/AuthError.java new file mode 100644 index 0000000..5275606 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/common/AuthError.java @@ -0,0 +1,7 @@ +package com.ns.mobile.website.common; + +public class AuthError { + public static final String INVALID_USERNAME_OR_PASSWORD = "INVALID_USERNAME_OR_PASSWORD"; + public static final String INVALID_SECRET_KEY = "INVALID_SECRET_KEY"; + +} diff --git a/src/main/java/com/ns/mobile/website/common/Res.java b/src/main/java/com/ns/mobile/website/common/Res.java new file mode 100644 index 0000000..af15a03 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/common/Res.java @@ -0,0 +1,23 @@ +package com.ns.mobile.website.common; + +public class Res { + + public static final String URL_LOGIN_FAIL = "/home/user/login?error=true"; + + public static final String URL_LOGIN_PAGE = "/home/user/login"; + public static final String URL_HOME = "/home"; + + public static final String URL_CAFE_LIST = "/home/user/orgs"; + + /** + * 비밀번호 실패 카운트 LIMIT + */ + public static final int PASSWORD_RETRY_LIMIT_COUNT = 5; + + public static final String TIME_STAMP = "timestamp"; + + public static final String SITE_TYPE_B2B = "b"; + public static final String SITE_TYPE_B2C = "c"; + +} + diff --git a/src/main/java/com/ns/mobile/website/common/aop/ServiceCallLogger.java b/src/main/java/com/ns/mobile/website/common/aop/ServiceCallLogger.java new file mode 100644 index 0000000..fb420f5 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/common/aop/ServiceCallLogger.java @@ -0,0 +1,40 @@ +package com.ns.mobile.website.common.aop; + +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.aspectj.lang.ProceedingJoinPoint; +import org.aspectj.lang.annotation.Around; +import org.aspectj.lang.annotation.Aspect; +import org.springframework.stereotype.Component; + +@RequiredArgsConstructor +@Slf4j +@Aspect +@Component +public class ServiceCallLogger { + + @Around("execution(* com.ns.mobile.website.biz.service..*.*Service*.*(..))") + public Object log(ProceedingJoinPoint proceedingJoinPoint) throws Throwable { + + ProceedingJoinPoint joinPoint = proceedingJoinPoint; + + System.out.println(""); + System.out.println("[=========================================]"); + System.out.println("[START-SERVICE]"); + System.out.println(joinPoint.getSignature().getDeclaringTypeName() + "." + joinPoint.getSignature().getName() + "()"); + if (joinPoint.getArgs() != null) { + for(Object obj : joinPoint.getArgs()) { + System.out.println(obj); + } + } + + Object result = joinPoint.proceed(); + + System.out.println(joinPoint.getSignature().getDeclaringTypeName() + "." + joinPoint.getSignature().getName() + "()"); + System.out.println("[END__-SERVICE]"); + System.out.println("[=========================================]"); + System.out.println(""); + + return result; + } +} diff --git a/src/main/java/com/ns/mobile/website/common/aop/TestClass.java b/src/main/java/com/ns/mobile/website/common/aop/TestClass.java new file mode 100644 index 0000000..f219aa8 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/common/aop/TestClass.java @@ -0,0 +1,4 @@ +package com.ns.mobile.website.common.aop; + +public class TestClass { +} diff --git a/src/main/java/com/ns/mobile/website/common/util/AnnotationUtils.java b/src/main/java/com/ns/mobile/website/common/util/AnnotationUtils.java new file mode 100644 index 0000000..707a755 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/common/util/AnnotationUtils.java @@ -0,0 +1,28 @@ +package com.ns.mobile.website.common.util; + +import com.ns.mobile.website.web.auth.PublicAccess; + +import java.lang.annotation.Annotation; +import java.lang.reflect.Method; + +public class AnnotationUtils { + + public static boolean existGuestAccess(Method method) { + + if (method != null) { + Annotation[] annotations = method.getAnnotations(); + + if (annotations != null) { + for (Annotation annotation : annotations) { + if (annotation instanceof PublicAccess) { + return true; + } + } + } + } + + return false; + } + + +} diff --git a/src/main/java/com/ns/mobile/website/common/util/DateUtils.java b/src/main/java/com/ns/mobile/website/common/util/DateUtils.java new file mode 100644 index 0000000..1678691 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/common/util/DateUtils.java @@ -0,0 +1,335 @@ +package com.ns.mobile.website.common.util; + +import lombok.extern.slf4j.Slf4j; +import org.springframework.format.annotation.DateTimeFormat; + +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.Period; +import java.time.format.DateTimeFormatter; +import java.time.temporal.ChronoUnit; +import java.util.Calendar; +import java.util.Date; +import java.util.Locale; + +@Slf4j +public class DateUtils { + + public static final String FORMAT_DEFAULT = "yyyy.MM.dd HH:mm"; + public static final String FORMAT_YYYYMMDDHHMMSSMMM = "yyyy.MM.dd HH:mm:ss.SSS"; + public static final String FORMAT_YYYYMMDDHHMMSS = "yyyy.MM.dd HH:mm:ss"; + public static final String FORMAT_YYYYMMDD = "yyyy-MM-dd"; + public static final String FORMAT_YYYYMMDD_KOR = "yyyy년 MM월 dd일"; + public static final String FORMAT_YYYYMMDD_DOT = "yyyy.MM.dd"; + public static final String FORMAT_YYYYMMDD_TRIM = "yyyyMMdd"; + public static final String FORMAT_HHMMSS_TRIM = "HHmmss"; + public static final String FORMAT_MD = "M/d"; + public static final String FORMAT_DD = "dd"; + public static final String FORMAT_HH = "HH"; + public static final String FORMAT_YYMMDDHHMMSS = "yyMMddHHmmss"; + private static final String[] WEEK_KOR_NAME = {"일", "월", "화", "수", "목", "금", "토"}; + + public static String toDateString(Date value) { + return toDateString(value, FORMAT_DEFAULT); + } + + public static String toDateString(Date value, String formatText) { + return toDateString(value, formatText, Locale.KOREA); + } + + public static String toDateString(Date value, String formatText, Locale locale) { + if (value != null) { + return (new SimpleDateFormat(formatText, locale)).format(value); + } + return StringUtils.Empty; + } + + public static String toDateString(LocalDateTime value) { + return toDateString(value, FORMAT_YYYYMMDD_DOT); + } + + public static String toDateStringDefault(LocalDateTime value) { + return toDateString(value, FORMAT_YYYYMMDD); + } + public static String toDateStringDateTrim(LocalDateTime value) { + return toDateString(value, FORMAT_HHMMSS_TRIM); + } + public static String toDateStringTimeTrim(LocalDateTime value) { + return toDateString(value, FORMAT_HHMMSS_TRIM); + } + public static String toDateString(LocalDateTime value, String format) { + if (value != null) { + DateTimeFormatter formatter = DateTimeFormatter.ofPattern(format); + return value.format(formatter); + } + return ""; + } + public static String toDateString(LocalDate value, String format) { + if (value != null) { + DateTimeFormatter formatter = DateTimeFormatter.ofPattern(format); + return value.format(formatter); + } + return ""; + } + + + + public static String getCurrentDate() { + return getCurrentDate(FORMAT_DEFAULT); + } + + public static String getCurrentDate(String format) { + return toDateString(Calendar.getInstance().getTime(), format); + } + + public static String getCurrentMillisecond() { + return getCurrentDate(FORMAT_YYYYMMDDHHMMSSMMM); + } + + public static Date toDate(String dateString) { + + if (StringUtils.isNotEmpty(dateString)) { + if (dateString.length() == 10 && dateString.contains("-")) { + try { + Date date = (new SimpleDateFormat(FORMAT_YYYYMMDD)).parse(dateString); + return date; + } catch (ParseException e) { + } + } else if (dateString.length() == 8) { + try { + Date date = (new SimpleDateFormat(FORMAT_YYYYMMDD_TRIM)).parse(dateString); + return date; + } catch (ParseException e) { + } + } + } + + return null; + } + + public static LocalDate localDate(String dateString) { + + if (StringUtils.isNotEmpty(dateString)) { + if (dateString.length() == 10 && dateString.contains("-")) { + try { + DateTimeFormatter formatter = DateTimeFormatter.ofPattern(FORMAT_YYYYMMDD); + return LocalDate.parse(dateString, formatter); + } catch (Exception ignored) { + } + } else if (dateString.length() == 8) { + try { + DateTimeFormatter formatter = DateTimeFormatter.ofPattern(FORMAT_YYYYMMDD_TRIM); + return LocalDate.parse(dateString, formatter); + } catch (Exception ignored) { + } + } + } + + return null; + } + + public static LocalDateTime localDateTime(String dateString) { + + if (StringUtils.isNotEmpty(dateString)) { + try { + DateTimeFormatter formatter = DateTimeFormatter.ofPattern(FORMAT_YYMMDDHHMMSS); + return LocalDateTime.parse(dateString, formatter); + } catch (Exception ignored) { + } + } + + return null; + } + + public static Date now() { + return Calendar.getInstance().getTime(); + } + + public static long nowTime() { + return Calendar.getInstance().getTimeInMillis(); + } + + /** + * 자정바로전 시간인데, 이름이.. 음... + * + * @param date + * @return + */ + public static Date getDateMidnight(Date date) { + + Calendar cal = Calendar.getInstance(); + cal.setTime(date); + + Calendar cal2 = Calendar.getInstance(); + cal2.set(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH), cal.get(Calendar.DATE), 23, 59, 59); + cal2.set(Calendar.MILLISECOND, 999); + + return cal2.getTime(); + } + + public static Date GET_START_DATE() { + Calendar cal = Calendar.getInstance(); + cal.set(1, 1, 0, 0, 0, 0); + return cal.getTime(); + } + + public static Date GET_END_DATE() { + Calendar cal = Calendar.getInstance(); + cal.set(9999, 11, 31, 23, 59, 59); + return cal.getTime(); + } + + /** + * 날짜 리턴 by 날짜문자열 + 시간 + 분 + * + * @param date + * @param hour + * @param minute + * @return + */ + public static Date dateByDateAndHourAndMinute(String date, int hour, int minute) { + + int numbers[] = NumberUtils.dateNumberByString(date); + + int year = numbers[0]; + int month = numbers[1]; + int day = numbers[2]; + + Calendar cal = Calendar.getInstance(); + cal.set(year, month - 1, day, hour, minute, 0); + return cal.getTime(); + } + + public static int[] getDate() { + + Calendar calendar = Calendar.getInstance(); + + int year = calendar.get(Calendar.YEAR); + int month = calendar.get(Calendar.MONTH) + 1; + int day = calendar.get(Calendar.DATE); + + int result[] = {year, month, day}; + + return result; + } + + /** + * 날짜값이 startDt가 endDt보다 크거나같은지 여부 + */ + public static boolean dayEqualOrGreaterThan(Date startDt, Date endDt) { + long times = endDt.getTime() - startDt.getTime(); + long days = times / (24 * 60 * 60 * 1000); + return days <= 0; + } + + /** + * 날짜값이 startDt가 endDt보다 작거나같은지 여부 + */ + public static boolean dayEqualOrLessThan(Date startDt, Date endDt) { + long times = endDt.getTime() - startDt.getTime(); + long days = times / (24 * 60 * 60 * 1000); + return days >= 0; + } + + /** + * 날짜값이 startDt가 endDt보다 작은지 여부 + */ + public static boolean dayLessThan(Date startDt, Date endDt) { + long times = endDt.getTime() - startDt.getTime(); + long days = times / (24 * 60 * 60 * 1000); + return days > 0; + } + + /** + * 날짜값이 startDt가 endDt와 같은지 여부 + */ + public static boolean dayEqual(Date startDt, Date endDt) { + long times = endDt.getTime() - startDt.getTime(); + long days = times / (24 * 60 * 60 * 1000); + return days == 0; + } + /** + * 날짜값의 차이 값 반환 + */ + public static long dayBetween(LocalDateTime startDt, LocalDateTime endDt) { + return ChronoUnit.DAYS.between(startDt.toLocalDate(), endDt.toLocalDate()); + } + public static long minutesBetween(LocalDateTime startDt, LocalDateTime endDt) { + return ChronoUnit.MINUTES.between(startDt, endDt); + } + + /** + * 현재날짜에 year를 더하고 day를 더함. + */ + public static Date addYearAndDay(Date date, int year, int day) { + Calendar calendar = Calendar.getInstance(); + calendar.setTime(date); + if (year != 0) { + calendar.add(Calendar.YEAR, year); + } + calendar.add(Calendar.DATE, day); + return calendar.getTime(); + } + + public static Date getYesterday() { + return addDay(now(), -1); + } + public static Date getNextThreeDay() { + return addDay(now(), 3); + } + + /** + * 현재날짜에 day를 더함. + */ + public static Date addDay(Date date, int day) { + Calendar calendar = Calendar.getInstance(); + calendar.setTime(date); + calendar.add(Calendar.DATE, day); + return calendar.getTime(); + } + + public static String getCurrentYear() { + Calendar calendar = Calendar.getInstance(); + return String.format("%d", calendar.get(Calendar.YEAR)); + } + + public static String getCurrentMonth() { + Calendar calendar = Calendar.getInstance(); + return String.format("%02d", calendar.get(Calendar.MONTH) + 1); + } + + /** + * checkDt 값이 startDt와 endDt사이에 있는지 확인 + */ + public static boolean checkInDate(Date startDt, Date endDt, Date checkDt) { + return startDt.after(checkDt) && endDt.before(checkDt); + } + + public static boolean checkInDate(Date startDt, Date endDt) { + return checkInDate(startDt, endDt, DateUtils.now()); + } + + public static int getDayGap(Date dt1, Date dt2) { + long diff = dt2.getTime() - dt1.getTime(); + return (int) diff / (24 * 60 * 60 * 1000); + } + + /** + * 요일 리턴 + */ + public static String getWeekName(Date dt) { + Calendar calendar = Calendar.getInstance(); + calendar.setTime(dt); + return WEEK_KOR_NAME[calendar.get(Calendar.DAY_OF_WEEK) - 1]; + } + + static DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyyMMddHHmmss"); + + public static String getTimeStamp() { + return LocalDateTime.now().format(dateTimeFormatter); + } + + +} diff --git a/src/main/java/com/ns/mobile/website/common/util/EncryptUtils.java b/src/main/java/com/ns/mobile/website/common/util/EncryptUtils.java new file mode 100644 index 0000000..4ae1a0a --- /dev/null +++ b/src/main/java/com/ns/mobile/website/common/util/EncryptUtils.java @@ -0,0 +1,115 @@ +package com.ns.mobile.website.common.util; + +import com.github.mervick.aes_everywhere.Aes256; +import lombok.extern.slf4j.Slf4j; + +import java.nio.charset.StandardCharsets; +import java.util.Base64; + +/** + * Created by PARK on 2018-09-01. + */ +@Slf4j +public class EncryptUtils { + + + private static final String Empty = ""; + + public static String encrypt(String input, String PASS_PHRASE) { + + String encrypted = Empty; + try { + encrypted = Aes256.encrypt(input, PASS_PHRASE); + } catch (Exception e) { + e.printStackTrace(); + } + + System.out.println(encrypted); + + String base64Encoding = Base64.getEncoder().withoutPadding().encodeToString(encrypted.getBytes(StandardCharsets.UTF_8)); + + System.out.println(base64Encoding); + + return base64Encoding; + } + + public static String decrypt(String encrypted, String PASS_PHRASE) { + + log.info("encrypted:{}", encrypted); + + String decrypted = Empty; + try { + byte[] bytesBase64Decoding = Base64.getDecoder().decode(encrypted); + String base64Decoding = new String(bytesBase64Decoding); + + log.info("base64Decoding:{}", base64Decoding); + + decrypted = Aes256.decrypt(base64Decoding, PASS_PHRASE); + } catch (Exception e) { + e.printStackTrace(); + System.out.println(e.getMessage()); + log.info(e.getMessage()); + } + + log.info("decrypted:{}", decrypted); + + return decrypted; + } + + + public static void main(String[] args) { + + /* + GlassInput glassInput = new GlassInput("A001", "900000", "000002", "007", "5"); + + System.out.println(glassInput.toString()); + + String encryptedName = EncryptUtils.encrypt(glassInput.toString()); + String decryptedName = EncryptUtils.decrypt(encryptedName); + + System.out.println(encryptedName); + System.out.println(decryptedName); + */ + } + + + public static void __main(String[] args) throws Exception { + + String text = "TEXT"; + String pass = "innosysit-iorder"; + + byte[] text_bytes = text.getBytes("UTF-8"); + byte[] pass_bytes = pass.getBytes("UTF-8"); + + // strings encryption + String encrypted = Aes256.encrypt(text, pass); + System.out.println(encrypted); + + String base64Encoding = Base64.getEncoder().withoutPadding().encodeToString(encrypted.getBytes(StandardCharsets.UTF_8)); + System.out.println(base64Encoding); + + // bytes encryption + byte[] encrypted_bytes = Aes256.encrypt(text_bytes, pass_bytes); + System.out.println(encrypted_bytes); + + // strings decryption + String decrypted = Aes256.decrypt(encrypted, pass); + System.out.println(decrypted); + + byte[] base64DecodingByte = Base64.getDecoder().decode(base64Encoding); + String base64Decoding = new String(base64DecodingByte); + + System.out.println(base64Decoding); + + System.out.println(Aes256.decrypt(base64Decoding, pass)); + + + // bytes decryption + byte[] decrypted_bytes = Aes256.decrypt(encrypted_bytes, pass_bytes); + System.out.println(decrypted_bytes); + + + } + + +} diff --git a/src/main/java/com/ns/mobile/website/common/util/ExcelUtil.java b/src/main/java/com/ns/mobile/website/common/util/ExcelUtil.java new file mode 100644 index 0000000..7b0507f --- /dev/null +++ b/src/main/java/com/ns/mobile/website/common/util/ExcelUtil.java @@ -0,0 +1,225 @@ +package com.ns.mobile.website.common.util; + +import java.io.File; +import java.io.IOException; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.ZoneId; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpServletResponse; + +import org.apache.poi.ss.usermodel.Cell; +import org.apache.poi.ss.usermodel.CellType; +import org.apache.poi.ss.usermodel.DateUtil; +import org.apache.poi.ss.usermodel.Row; +import org.apache.poi.ss.usermodel.Sheet; +import org.apache.poi.ss.usermodel.Workbook; +import org.apache.poi.ss.usermodel.WorkbookFactory; +import org.apache.poi.xssf.streaming.SXSSFWorkbook; +import org.apache.poi.xssf.usermodel.XSSFWorkbookType; + +import com.ns.mobile.website.biz.entity.SellUser; +import com.ns.mobile.website.biz.repository.FileUploadRepository; + +import lombok.extern.slf4j.Slf4j; + +@Slf4j +public class ExcelUtil { + + // HttpServletResponse 경우 + public void createExcelToResponse(Map>> dataMap, HttpServletResponse response) { + Workbook workbook = new SXSSFWorkbook(); // 성능 개선 버전 + + try { + for (String key : dataMap.keySet()) { + log.debug("Sheet Name : {}", key); + Sheet sheet = workbook.createSheet(key); + + createExcel(sheet, dataMap.get(key)); + } + // 컨텐츠 타입 + response.setContentType("application/vnd.ms-excel"); + + workbook.write(response.getOutputStream()); + workbook.close(); + } catch (IOException e) { + log.error(e.toString()); + } + } + + // 엑셀 생성 + private void createExcel(Sheet sheet, List> dataList) { + + // 데이터를 한개씩 조회해서 한개의 행으로 만든다. + for(int rowIndex=0; rowIndex data = dataList.get(rowIndex); + + // row 생성 + Row row = sheet.createRow(rowIndex); + for(int cellIndex=0; cellIndex excelToAccountList(String filePath) { + Map account = new HashMap(); + File file = new File(filePath); + try { + Workbook workbook = WorkbookFactory.create(file); + Sheet sheet = workbook.getSheetAt(4); + + Iterator rowItr = sheet.iterator(); + while(rowItr.hasNext()) { + Row row = rowItr.next(); + if(row.getRowNum() < 1) { + continue; + } + Iterator cellItr = row.cellIterator(); + String key = ""; + String value = ""; + while(cellItr.hasNext()) { + Cell cell = cellItr.next(); + int index = cell.getColumnIndex(); + switch(index) { + case 2: + key = cell.getStringCellValue(); + break; + case 3: + value = cell.getStringCellValue(); + } + } + account.put(key, value); + } + } catch (Exception e) { + String message = "[엑셀파일 로드 - Account] 처리 중 DB오류가 발생하였습니다."; + log.error(message + " >> ", e); + } + return account; + } + + public static List excelToSellList(String filePath, Map account) { + + //String localFilename = "/Users/parkkyutae/Downloads/회원목록_20201102140936.xlsx"; + File file = new File(filePath); + boolean stop = false; + List sellUserList = new ArrayList(); + try { + Workbook workbook = WorkbookFactory.create(file); + Sheet sheet = workbook.getSheetAt(2); + + Iterator rowItr = sheet.iterator(); + + while(rowItr.hasNext()) { + SellUser sellUser = new SellUser(); + Row row = rowItr.next(); + if(row.getRowNum() < 2) { + continue; + } + + Iterator cellItr = row.cellIterator(); + while(cellItr.hasNext()) { + Cell cell = cellItr.next(); + int index = cell.getColumnIndex(); + switch(index) { + case 5: + if(cell.getDateCellValue() == null) { + stop = true; + break; + } + sellUser.setOpeningDate((LocalDateTime)cell.getDateCellValue().toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime()); + break; + case 6: + sellUser.setAccount((String) getCellValue(cell)); + break; + case 7: + sellUser.setNewsAgency(account.get(sellUser.getAccount())); + break; + case 8: + sellUser.setName((String) getCellValue(cell)); + break; + case 9: + if(cell.getCellType() == CellType.NUMERIC) + sellUser.setSocialSecurityNumber(String.format("%06d",(int)cell.getNumericCellValue())); + else + sellUser.setSocialSecurityNumber((String) cell.getStringCellValue()); + break; + case 10: + if(cell.getCellType() == CellType.NUMERIC) + sellUser.setPhoneNumber(String.format("%011d",(int)cell.getNumericCellValue())); + else + sellUser.setPhoneNumber(((String) cell.getStringCellValue()).replace("-", "")); + break; + case 11: + if(cell.getCellType() == CellType.NUMERIC) + sellUser.setCustomerType(String.format("%d",(int)cell.getNumericCellValue())); + else + sellUser.setCustomerType((String) cell.getStringCellValue()); + break; + case 12: + sellUser.setLegalRepresentativeName((String) cell.getStringCellValue()); + break; + case 13: + if(cell.getCellType() == CellType.NUMERIC) + sellUser.setLegalRepresentativePhoneNumber(String.format("%011d",(int)cell.getNumericCellValue())); + else + sellUser.setLegalRepresentativePhoneNumber(((String) cell.getStringCellValue()).replace("-", "")); + break; + case 14: + sellUser.setInstallmentMonth(((Double)cell.getNumericCellValue()).intValue()); + break; + case 15: + sellUser.setPetName((String) cell.getStringCellValue()); + break; + case 16: + if(cell.getCellType() == CellType.NUMERIC) + sellUser.setSerialNumber(String.format("%d",(int)cell.getNumericCellValue())); + else + sellUser.setSerialNumber((String) cell.getStringCellValue()); + break; + case 17: + sellUser.setSubscription((String) cell.getStringCellValue()); + break; + } + } + if(stop) + break; + sellUserList.add(sellUser); + } + + } catch (Exception e) { + String message = "[엑셀파일 로드 - Data ] 처리 중 DB오류가 발생하였습니다."; + log.error(message + " >> ", e); + } + + return sellUserList; + } + + private static Object getCellValue(Cell cell) { + switch(cell.getCellType()) { + case STRING: + return cell.getStringCellValue(); + case BOOLEAN: + return cell.getBooleanCellValue(); + case NUMERIC: + return cell.getNumericCellValue(); + case FORMULA: + return cell.getCellFormula(); + case BLANK: + return ""; + default: + return ""; + } + } + +} diff --git a/src/main/java/com/ns/mobile/website/common/util/ExtraCertUtils.java b/src/main/java/com/ns/mobile/website/common/util/ExtraCertUtils.java new file mode 100644 index 0000000..67cd826 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/common/util/ExtraCertUtils.java @@ -0,0 +1,377 @@ +package com.ns.mobile.website.common.util; + +import com.ns.mobile.website.web.auth.CertSessionUtils; +import com.ns.mobile.website.web.auth.PublicAccess; +import com.ns.mobile.website.web.controller.BaseController; +import com.ns.mobile.website.web.controller.extra.ResultCert; +import com.ns.mobile.website.web.properties.LaneduProperties; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; +import java.util.Date; +import java.util.Locale; +import java.util.Random; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +@Slf4j +public class ExtraCertUtils { + + private static String getNow() { + + return LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")); + } + + private static String getSeqNumber() { + + LocalDateTime now = LocalDateTime.now(); + int seq = (new Random()).nextInt(10000) + 1; + + return String.format("%s%05d" + , now.format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")) + , seq); + } + + public static String getTrCertData(String actionType, LaneduProperties laneduProperties) { + + //tr_cert 데이터 변수 선언 --------------------------------------------------------------- + String tr_cert = ""; + String cpId = "KBZM1052"; // 회원사ID + + String urlCode = "002001"; // URL코드 + + urlCode = "004001"; // - localhost - 회원가입 + urlCode = "005001"; // - localhost:8080 - 회원가입 + + urlCode = laneduProperties.getPhoneUrlCode(); + + System.out.println("#######################"); + System.out.println("#######################"); + System.out.println("#######################"); + System.out.println(urlCode); + + + String certNum = getSeqNumber(); // 요청번호 ( 본인인증 요청시 중복되지 않게 생성해야함. (예-시퀀스번호) ) + String date = getNow(); // 요청일시 + String certMet = "M"; // 본인인증방법 + String name = ""; // 성명 + String phoneNo = ""; // 휴대폰번호 + String phoneCorp = ""; // 이동통신사 + String birthDay = ""; // 생년월일 + String gender = ""; // 성별 + String nation = ""; // 내외국인 구분 + String plusInfo = ""; // 추가DATA정보 + String extendVar = "0000000000000000"; // 확장변수 + //End-tr_cert 데이터 변수 선언 --------------------------------------------------------------- + + plusInfo = actionType; + + + String tr_add = "N"; // IFrame사용여부 + + + //01. 한국모바일인증(주) 암호화 모듈 선언 + com.icert.comm.secu.IcertSecuManager seed = new com.icert.comm.secu.IcertSecuManager(); + + //02. 1차 암호화 (tr_cert 데이터변수 조합 후 암호화) + String enc_tr_cert = ""; + tr_cert = cpId +"/"+ urlCode +"/"+ certNum +"/"+ date +"/"+ certMet +"/"+ birthDay +"/"+ gender +"/"+ name +"/"+ phoneNo +"/"+ phoneCorp +"/"+ nation +"/"+ plusInfo +"/"+ extendVar; + enc_tr_cert = seed.getEnc(tr_cert, ""); + + //03. 1차 암호화 데이터에 대한 위변조 검증값 생성 (HMAC) + String hmacMsg = ""; + hmacMsg = seed.getMsg(enc_tr_cert); + + //04. 2차 암호화 (1차 암호화 데이터, HMAC 데이터, extendVar 조합 후 암호화) + tr_cert = seed.getEnc(enc_tr_cert + "/" + hmacMsg + "/" + extendVar, ""); + + + return tr_cert; + } + + private static Boolean paramChk(String patn, String param) { + Pattern pattern = Pattern.compile(patn); + Matcher matcher = pattern.matcher(param); + return matcher.matches(); + } + + private static ResultCert getTrCertData(String rec_cert, String k_certNum, String clientIp) { + + // 파라미터 유효성 검증 + if( rec_cert.length() == 0 || k_certNum.length() == 0 ){ + return ResultCert.fail("[오류] 결과값 비정상"); + } + + // 변수선언 -------------------------------------------------------------------------------------------------------- + //String rec_cert = ""; // 결과수신DATA + + //String k_certNum = ""; // 파라미터로 수신한 요청번호 + String certNum = ""; // 요청번호 + String date = ""; // 요청일시 + String CI = ""; // 연계정보(CI) + String DI = ""; // 중복가입확인정보(DI) + String phoneNo = ""; // 휴대폰번호 + String phoneCorp = ""; // 이동통신사 + String birthDay = ""; // 생년월일 + String gender = ""; // 성별 + String nation = ""; // 내국인 + String name = ""; // 성명 + String M_name = ""; // 미성년자 성명 + String M_birthDay = ""; // 미성년자 생년월일 + String M_Gender = ""; // 미성년자 성별 + String M_nation = ""; // 미성년자 내외국인 + String result = ""; // 결과값 + + String certMet = ""; // 인증방법 + String ip = ""; // ip주소 + String plusInfo = ""; + + String encPara = ""; + String encMsg1 = ""; + String encMsg2 = ""; + String msgChk = ""; + //----------------------------------------------------------------------------------------------------------------- + + + + + //01. 암호화 모듈 (jar) Loading + com.icert.comm.secu.IcertSecuManager seed = new com.icert.comm.secu.IcertSecuManager(); + + //02. 1차 복호화 + //수신된 certNum를 이용하여 복호화 + rec_cert = seed.getDec(rec_cert, k_certNum); + + //03. 1차 파싱 + int inf1 = rec_cert.indexOf("/",0); + int inf2 = rec_cert.indexOf("/",inf1+1); + + encPara = rec_cert.substring(0,inf1); //암호화된 통합 파라미터 + encMsg1 = rec_cert.substring(inf1+1,inf2); //암호화된 통합 파라미터의 Hash값 + + //04. 위변조 검증 + encMsg2 = seed.getMsg(encPara); + + if(encMsg2.equals(encMsg1)){ + msgChk="Y"; + } + + if(msgChk.equals("N")){ + //alert("비정상적인 접근입니다.!!<%=msgChk%>"); + return ResultCert.fail("비정상적인 접근입니다."); + } + + + //05. 2차 복호화 + rec_cert = seed.getDec(encPara, k_certNum); + + System.out.println("##########################################"); + System.out.println(rec_cert); + + //06. 2차 파싱 + int info1 = rec_cert.indexOf("/",0); + int info2 = rec_cert.indexOf("/",info1+1); + int info3 = rec_cert.indexOf("/",info2+1); + int info4 = rec_cert.indexOf("/",info3+1); + int info5 = rec_cert.indexOf("/",info4+1); + int info6 = rec_cert.indexOf("/",info5+1); + int info7 = rec_cert.indexOf("/",info6+1); + int info8 = rec_cert.indexOf("/",info7+1); + int info9 = rec_cert.indexOf("/",info8+1); + int info10 = rec_cert.indexOf("/",info9+1); + int info11 = rec_cert.indexOf("/",info10+1); + int info12 = rec_cert.indexOf("/",info11+1); + int info13 = rec_cert.indexOf("/",info12+1); + int info14 = rec_cert.indexOf("/",info13+1); + int info15 = rec_cert.indexOf("/",info14+1); + int info16 = rec_cert.indexOf("/",info15+1); + int info17 = rec_cert.indexOf("/",info16+1); + int info18 = rec_cert.indexOf("/",info17+1); + + certNum = rec_cert.substring(0,info1); + date = rec_cert.substring(info1+1,info2); + CI = rec_cert.substring(info2+1,info3); + phoneNo = rec_cert.substring(info3+1,info4); + phoneCorp = rec_cert.substring(info4+1,info5); + birthDay = rec_cert.substring(info5+1,info6); + gender = rec_cert.substring(info6+1,info7); + nation = rec_cert.substring(info7+1,info8); + name = rec_cert.substring(info8+1,info9); + result = rec_cert.substring(info9+1,info10); + certMet = rec_cert.substring(info10+1,info11); + ip = rec_cert.substring(info11+1,info12); + M_name = rec_cert.substring(info12+1,info13); + M_birthDay = rec_cert.substring(info13+1,info14); + M_Gender = rec_cert.substring(info14+1,info15); + M_nation = rec_cert.substring(info15+1,info16); + plusInfo = rec_cert.substring(info16+1,info17); + DI = rec_cert.substring(info17+1,info18); + + //07. CI, DI 복호화 + CI = seed.getDec(CI, k_certNum); + DI = seed.getDec(DI, k_certNum); + + + // 파라미터 유효성 검증 -------------------------------------------- + boolean b = true; + String regex = ""; + + if( certNum.length() == 0 || certNum.length() > 40){ + return ResultCert.fail("[오류] 요청번호 비정상"); + } + + regex = "[0-9]*"; + if( date.length() != 14 || !paramChk(regex, date) ){ + return ResultCert.fail("[오류] 요청일시 비정상"); + } + + regex = "[A-Z]*"; + if( certMet.length() != 1 || !paramChk(regex, certMet) ){ + return ResultCert.fail("[오류] 본인인증방법 비정상"); + } + + + regex = "[0-9]*"; + if( (phoneNo.length() != 10 && phoneNo.length() != 11) || !paramChk(regex, phoneNo) ){ + return ResultCert.fail("[오류] 휴대폰번호 비정상"); + } + + regex = "[A-Z]*"; + if( phoneCorp.length() != 3 || !paramChk(regex, phoneCorp) ){ + return ResultCert.fail("[오류] 이동통신사 비정상"); + } + + regex = "[0-9]*"; + if( birthDay.length() != 8 || !paramChk(regex, birthDay) ){ + return ResultCert.fail("[오류] 생년월일 비정상"); + } + + regex = "[0-9]*"; + if( gender.length() != 1 || !paramChk(regex, gender) ){ + return ResultCert.fail("[오류] 성별 비정상"); + } + + regex = "[0-9]*"; + if( nation.length() != 1 || !paramChk(regex, nation) ){ + return ResultCert.fail("[오류] 내/외국인 비정상"); + } + + regex = "[\\sA-Za-z가-�R.,-]*"; + if( name.length() > 60 || !paramChk(regex, name) ){ + return ResultCert.fail("[오류] 성명 비정상"); + } + + regex = "[A-Z]*"; + if( result.length() != 1 || !paramChk(regex, result) ){ + return ResultCert.fail("[오류] 결과값 비정상"); + } + + regex = "[\\sA-Za-z가-?.,-]*"; + if( M_name.length() != 0 ){ + if( M_name.length() > 60 || !paramChk(regex, M_name) ){ + return ResultCert.fail("[오류] 미성년자 성명 비정상"); + } + } + + regex = "[0-9]*"; + if( M_birthDay.length() != 0 ){ + if( M_birthDay.length() != 8 || !paramChk(regex, M_birthDay) ){ + return ResultCert.fail("[오류] 미성년자 생년월일 비정상"); + } + } + + regex = "[0-9]*"; + if( M_Gender.length() != 0 ){ + if( M_Gender.length() != 1 || !paramChk(regex, M_Gender) ){ + return ResultCert.fail("[오류] 미성년자 성별 비정상"); + } + } + + regex = "[0-9]*"; + if( M_nation.length() != 0 ){ + if( M_nation.length() != 1 || !paramChk(regex, M_nation) ){ + return ResultCert.fail("[오류] 미성년자 내/외국인 비정상"); + } + } + // End 파라미터 유효성 검증 -------------------------------------------- + + + // Start - 수신내역 유효성 검증(사설망의 사설 IP로 인해 미사용, 공용망의 경우 확인 후 사용) *********************/ + // 1. date 값 검증 + SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMddHHmmss", Locale.KOREAN); // 현재 서버 시각 구하기 + String strCurrentTime = formatter.format(new Date()); + + + try { + Date toDate = formatter.parse(strCurrentTime); + Date fromDate = formatter.parse(date); + long timediff = toDate.getTime()-fromDate.getTime(); + + if ( timediff < -30*60*1000 || 30*60*100 < timediff ){ + //return ResultCert.fail("[오류] 비정상적인 접근입니다. (요청시간경과)"); + } + + } catch (ParseException e) { + //e.printStackTrace(); + return ResultCert.fail("[오류] 비정상적인 접근입니다. (요청시간경과)-2"); + } + + // 2. ip 값 검증 + String client_ip = clientIp;//request.getHeader("HTTP_X_FORWARDED_FOR"); // 사용자IP 구하기 + /* + if ( client_ip != null ){ + if( client_ip.indexOf(",") != -1 ) + client_ip = client_ip.substring(0,client_ip.indexOf(",")); + } + if ( client_ip==null || client_ip.length()==0 ){ + client_ip = request.getRemoteAddr(); + } + */ + + /* + // 전화하니까 IP체크 하지 않아도 된다네 ㅡㅡ;; + if( !client_ip.equals(ip) ){ + return ResultCert.fail("[오류] 비정상적인 접근입니다. (IP불일치)"); + } + */ + + + ResultCert rValue = ResultCert.success(); + rValue.setCertNum(certNum); + rValue.setDate(date); + rValue.setCI(CI); + rValue.setPhoneNo(phoneNo); + rValue.setPhoneCorp(phoneCorp); + rValue.setBirthDay(birthDay); + rValue.setGender(gender); + rValue.setNation(nation); + rValue.setName(name); + rValue.setResult(result); + rValue.setCertMet(certMet); + rValue.setIp(ip); + rValue.setM_name(M_name); + rValue.setM_birthDay(M_birthDay); + rValue.setM_Gender(M_Gender); + rValue.setM_nation(M_nation); + rValue.setPlusInfo(plusInfo); + rValue.setDI(DI); + + rValue.setSuccess(true); + + return rValue; + } + + + +} diff --git a/src/main/java/com/ns/mobile/website/common/util/FileUtils.java b/src/main/java/com/ns/mobile/website/common/util/FileUtils.java new file mode 100644 index 0000000..5bbe6c5 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/common/util/FileUtils.java @@ -0,0 +1,82 @@ +package com.ns.mobile.website.common.util; + + +import lombok.extern.slf4j.Slf4j; + +import java.io.File; +import java.io.IOException; + + +@Slf4j +public final class FileUtils { + + /* + public static String getMimeType(File file) { + String mimeType = null; + try { + Tika tika = new Tika(); + mimeType = tika.detect(file); + } catch (Exception e) { + } + return mimeType; + } + */ + + + public static String getFileExtension(String fullName) { + if (fullName != null) { + String fileName = (new File(fullName)).getName(); + int dotIndex = fileName.lastIndexOf(46); + return dotIndex == -1 ? "" : fileName.substring(dotIndex + 1); + } + return ""; + } + + + public static String getUploadPath(String baseUploadPath) { + + baseUploadPath = String.format("%s%s/", baseUploadPath, DateUtils.getCurrentDate(DateUtils.FORMAT_YYYYMMDD_TRIM)); + + File uploadDir = new File(baseUploadPath); + if (!uploadDir.isDirectory()) { + uploadDir.mkdirs(); + } + + return baseUploadPath; + } + + public static void createUploadPath(String baseUploadPath) { + + String currentYear = DateUtils.getCurrentYear(); + String currentMonth = DateUtils.getCurrentMonth(); + + String[] dirs = { + String.format("%s/%s/", baseUploadPath, currentYear), + String.format("%s/%s/%s/", baseUploadPath, currentYear, currentMonth) + }; + + for (String dir : dirs) { + File file = new File(dir); + if (!file.isDirectory()) { + file.mkdirs(); + try { + Runtime.getRuntime().exec("chmod 755 " + dir); + } catch (IOException e) { + log.info(e.getMessage()); + } + } + } + + } + + +} + + + + + + + + + diff --git a/src/main/java/com/ns/mobile/website/common/util/InterceptorUtils.java b/src/main/java/com/ns/mobile/website/common/util/InterceptorUtils.java new file mode 100644 index 0000000..ef6c51b --- /dev/null +++ b/src/main/java/com/ns/mobile/website/common/util/InterceptorUtils.java @@ -0,0 +1,66 @@ +package com.ns.mobile.website.common.util; + + +import lombok.extern.slf4j.Slf4j; +import org.springframework.web.method.HandlerMethod; + +import javax.servlet.http.HttpServletRequest; +import java.lang.reflect.Method; +import java.util.Enumeration; + +/** + * Created by PARK on 2018-09-01. + */ +@Slf4j +public class InterceptorUtils { + + public static final String REQ_ATTR_TIMESTAMP = "timestamp"; + public static final String REQ_ATTR_IS_MOBILE_BROWSER = "isMobileBrowser"; + public static final String REQ_ATTR_USER_AGENT = "userAgent"; + + public static void headerLog(HttpServletRequest request) { + + StringBuilder sb = new StringBuilder(); + + sb.append(StringUtils.CRLF).append(StringUtils.LINE_BAR) + .append(StringUtils.CRLF).append("#### [HTTP INFO__] ##############") + .append(StringUtils.CRLF).append(String.format(StringUtils.FORMAT_LOG, "requestURI", request.getRequestURI())) + .append(StringUtils.CRLF).append(String.format(StringUtils.FORMAT_LOG, "queryString", request.getQueryString())) + .append(StringUtils.CRLF).append(String.format(StringUtils.FORMAT_LOG, "method", request.getMethod())) + .append(StringUtils.CRLF).append("#### [HTTP HEADER] ##############"); + + Enumeration headerNames = request.getHeaderNames(); + if (headerNames != null) { + while (headerNames.hasMoreElements()) { + String name = (String) headerNames.nextElement(); + String value = request.getHeader(name); + sb.append(StringUtils.CRLF).append(String.format(StringUtils.FORMAT_LOG, name, value)); + } + } + sb.append(StringUtils.CRLF).append(StringUtils.LINE_BAR); + + log.info(sb.toString()); + } + + public static void writeValiables(HttpServletRequest r) { + r.setAttribute(REQ_ATTR_TIMESTAMP, DateUtils.getTimeStamp()); + //r.setAttribute(Res.SERVER_URL, SiteUtils.getServerUrl(r)); + r.setAttribute(InterceptorUtils.REQ_ATTR_IS_MOBILE_BROWSER, RequestUtils.isMobileBrowser(r)); + } + + public static Method getExecuteMethod(Object handler) { + + Method executeMethod = null; + + if (handler instanceof HandlerMethod) { + HandlerMethod handlerMethod = (HandlerMethod) handler; + executeMethod = handlerMethod.getMethod(); + } + + if (executeMethod == null) { + log.info("getExecuteMethod() ERROR => NULL"); + } + + return executeMethod; + } +} diff --git a/src/main/java/com/ns/mobile/website/common/util/MaskingUtils.java b/src/main/java/com/ns/mobile/website/common/util/MaskingUtils.java new file mode 100644 index 0000000..a57d597 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/common/util/MaskingUtils.java @@ -0,0 +1,79 @@ +package com.ns.mobile.website.common.util; + + +import java.util.Arrays; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import javax.servlet.http.HttpServletRequest; + +import util.SU; + +public class MaskingUtils { + + public static boolean isDeveloper() { + String userName= System.getProperty("user.name"); + return "kyutaepark".equals(userName) || "YOO".equals(userName); + } + + public static String name(String str) { + String originStr = str; + String regex = "(^[가-힣]+)$"; + + if(SU.isEmpty(originStr)) { + return originStr; + } + + Matcher matcher = Pattern.compile(regex).matcher(originStr); + + if (matcher.find()) { + int length = originStr.length(); + + return originStr.substring(0, length - 1) + "*"; + } + return originStr; + + + + } + + public static String email(String str) { + String originStr = str; + String regex = "^([a-zA-Z0-9._-]+)+@([a-zA-Z0-9._-]+)+\\.([a-zA-Z0-9._-]+)$"; + + if(SU.isEmpty(originStr)) { + return originStr; + } + + Matcher matcher = Pattern.compile(regex).matcher(originStr); + + if (matcher.find()) { + String target = matcher.group(1); + int length = target.length(); + if (length > 3) { + char[] c = new char[3]; + Arrays.fill(c, '*'); + return originStr.replace(target, target.substring(0, length - 3) + String.valueOf(c)); + } + + } + return originStr; + } + + public static String addrDetail(String str) { + String originStr = str; + + if(SU.isEmpty(originStr)) { + return originStr; + } + int length = originStr.length(); + + char[] c = new char[length]; + Arrays.fill(c, '*'); + +// return originStr.replace(originStr, originStr.substring(0, length) + String.valueOf(c)); + return originStr.replace(originStr, String.valueOf(c)); + } +} + + diff --git a/src/main/java/com/ns/mobile/website/common/util/NumberUtils.java b/src/main/java/com/ns/mobile/website/common/util/NumberUtils.java new file mode 100644 index 0000000..2870c2c --- /dev/null +++ b/src/main/java/com/ns/mobile/website/common/util/NumberUtils.java @@ -0,0 +1,131 @@ +package com.ns.mobile.website.common.util; + +import java.text.DecimalFormat; + +public class NumberUtils { + + public static boolean isNumber(String str) { + if (StringUtils.isEmpty(str)) { + return false; + } else { + char[] chars = str.toCharArray(); + int sz = chars.length; + boolean hasExp = false; + boolean hasDecPoint = false; + boolean allowSigns = false; + boolean foundDigit = false; + int start = chars[0] == 45 ? 1 : 0; + int i; + if (sz > start + 1 && chars[start] == 48) { + if (chars[start + 1] == 120 || chars[start + 1] == 88) { + i = start + 2; + if (i == sz) { + return false; + } + + while (i < chars.length) { + if ((chars[i] < 48 || chars[i] > 57) && (chars[i] < 97 || chars[i] > 102) && (chars[i] < 65 || chars[i] > 70)) { + return false; + } + + ++i; + } + + return true; + } + + if (Character.isDigit(chars[start + 1])) { + for (i = start + 1; i < chars.length; ++i) { + if (chars[i] < 48 || chars[i] > 55) { + return false; + } + } + + return true; + } + } + + --sz; + + for (i = start; i < sz || i < sz + 1 && allowSigns && !foundDigit; ++i) { + if (chars[i] >= 48 && chars[i] <= 57) { + foundDigit = true; + allowSigns = false; + } else if (chars[i] == 46) { + if (hasDecPoint || hasExp) { + return false; + } + + hasDecPoint = true; + } else if (chars[i] != 101 && chars[i] != 69) { + if (chars[i] != 43 && chars[i] != 45) { + return false; + } + + if (!allowSigns) { + return false; + } + + allowSigns = false; + foundDigit = false; + } else { + if (hasExp) { + return false; + } + + if (!foundDigit) { + return false; + } + + hasExp = true; + allowSigns = true; + } + } + + return i < chars.length ? (chars[i] >= 48 && chars[i] <= 57 ? true : (chars[i] != 101 && chars[i] != 69 ? (chars[i] == 46 ? (!hasDecPoint && !hasExp ? foundDigit : false) : (!allowSigns && (chars[i] == 100 || chars[i] == 68 || chars[i] == 102 || chars[i] == 70) ? foundDigit : (chars[i] != 108 && chars[i] != 76 ? false : foundDigit && !hasExp && !hasDecPoint))) : false)) : !allowSigns && foundDigit; + } + } + + public static double toDoubleNumber(String value) { + try { + return Double.parseDouble(value); + } catch (Exception e) { + } + return 0; + } + + public static int toNumber(String value) { + try { + return Integer.parseInt(value); + } catch (Exception e) { + } + return 0; + } + + public static long toLong(String value) { + try { + return Long.parseLong(value); + } catch (Exception e) { + } + return 0; + } + + public static int[] dateNumberByString(String value) { + + int number[] = {0, 0, 0}; + + if (StringUtils.isNotEmpty(value)) { + String arr[] = value.split("-"); + number[0] = (arr.length > 0) ? toNumber(arr[0]) : 0; + number[1] = (arr.length > 1) ? toNumber(arr[1]) : 0; + number[2] = (arr.length > 2) ? toNumber(arr[2]) : 0; + } + + return number; + } + + public static String toComma(long value) { + return (new DecimalFormat("###,###,###,##0")).format(value); + } + +} diff --git a/src/main/java/com/ns/mobile/website/common/util/PagerUtils.java b/src/main/java/com/ns/mobile/website/common/util/PagerUtils.java new file mode 100644 index 0000000..9523a9e --- /dev/null +++ b/src/main/java/com/ns/mobile/website/common/util/PagerUtils.java @@ -0,0 +1,597 @@ +package com.ns.mobile.website.common.util; + + +import lombok.Data; +import org.springframework.stereotype.Component; + + +import java.util.HashMap; + +@Data +@Component +public class PagerUtils { + + final static String IMG_FIRST = "/images/cms/btn_pprev.gif"; + final static String ALT_FIRST = "처음"; + final static String IMG_PREVIOUS = "/images/cms/btn_prev.gif"; + final static String ALT_PREVIOUS = "이전"; + final static String IMG_NEXT = "/images/cms/btn_next.gif"; + final static String ALT_NEXT = "다음"; + final static String IMG_LAST = "/images/cms/btn_nnext.gif"; + final static String ALT_LAST = "마지막"; + + public static final int DEFAULT_PAGE_SIZE = 20; + final public static int DEFAULT_PAGE_BLOCK = 10; + + private boolean isPrevPage; //이전페이지 존재여부 + private boolean isNextPage; //다음페이지 존재여부 + private int nowPage; //현재페이지 + private int rowTotal; //총 게시물수 + private int blockList; //한페이지에 표시될 리스트수 + private int blockPage; //한 블럭에 표시될 페이지수 + private int blockSize; + private int totalPage; //전체페이지수 + private int startPage; //시작페이지 + private int endPage; //마지막 페이지 + private int startRow; //데이타베이스의 쿼리에서 사용할 시작값 + private int endRow; //데이타베이스의 쿼리에서 사용할 종료값 + private int startNum; //리스트 표기시 처음 시작 숫자 + + /* + * 페이지를 계산하는 생성자 + * nowPage : 현재페이지 + * rowTotal : 총게시물수 + * blockList : 한페이지에 디스플레이될 게시물수 + * blockPage: 한 블럭에 표시될 페이지수 + */ + /*public PagerUtils(int nowPage, int rowTotal, int blockList) { + initialize(nowPage, rowTotal, blockList, PagerUtils.DEFAULT_PAGE_BLOCK); + }*/ + + public PagerUtils() { + initialize(0, 0, 0, PagerUtils.DEFAULT_PAGE_BLOCK); + } + + public PagerUtils(int nowPage, int rowTotal, int blockList, int blockPage) { + initialize(nowPage, rowTotal, blockList, blockPage); + } + + public PagerUtils(int pageIndex, int pageSize, int totalCount) { + initialize(pageIndex, totalCount, pageSize, PagerUtils.DEFAULT_PAGE_BLOCK); + } + + + public PagerUtils(int page, int totalCount) { + initialize(page, totalCount, PagerUtils.DEFAULT_PAGE_SIZE, PagerUtils.DEFAULT_PAGE_BLOCK); + } + + + + /* + public PagerUtils(SearchParameter searchParameter, int rowTotal) { + initialize(searchParameter.getPage(), rowTotal, searchParameter.getSize(), PagerUtils.DEFAULT_PAGE_BLOCK); + } + */ + + /** + * 페이징 정보 설정 + */ + public void reset(int pageIndex, int pageSize, int totalCount) { + initialize(pageIndex, totalCount, pageSize, PagerUtils.DEFAULT_PAGE_BLOCK); + } + + + private void initialize(int nowPage, int rowTotal, int blockList, int blockPage) { + + //super(); + + this.nowPage = nowPage; + this.rowTotal = rowTotal; + this.blockList = blockList; + this.blockPage = blockPage; + + // 각종 플래그를 초기화 + isPrevPage = false; + isNextPage = false; + + // 입력된 전체 열의 수를 통해 전체 페이지 수를 계산한다 + this.totalPage = (int) Math.ceil((double) rowTotal / (double) blockList); + + // 현재 페이지가 전체 페이지수보다 클경우 전체 페이지수로 강제로 조정한다 + if (nowPage > this.totalPage) nowPage = this.totalPage; + + //상기와 같을경우 totalPage가 0이고 nowPage가 1일경우 에러발생 + if (nowPage < 1) nowPage = 1; + + // DB입력을 위한 시작과 종료값을 구한다 + this.startRow = (nowPage - 1) * blockList; + this.endRow = this.startRow + blockList - 1; + + // 시작페이지와 종료페이지의 값을 구한다 + this.startPage = ((nowPage - 1) / blockPage) * blockPage + 1; + this.endPage = this.startPage + blockPage - 1; + + //리스트의 최상의 숫자를 구한다. + this.startNum = rowTotal - (blockList * (nowPage - 1));//리스트될 경우 최상위 숫자 + + + // 마지막 페이지값이 전체 페이지값보다 클 경우 강제 조정 + if (this.endPage > this.totalPage) { + this.endPage = totalPage; + } + + // 시작 페이지가 1보다 클 경우 이전 페이징이 가능한것으로 간주한다 + if (this.startPage > 1) { + this.isPrevPage = true; + } + + // 종료페이지가 전체페이지보다 작을경우 다음 페이징이 가능한것으로 간주한다 + if (this.endPage < this.totalPage) { + this.isNextPage = true; + } + + // 기타 값을 저장한다 + this.nowPage = nowPage; + this.rowTotal = rowTotal; + this.blockList = blockList; + this.blockPage = blockPage; + } + + public void Debug() { + System.out.println("input : nowPage :" + this.nowPage + " / rowTotal : " + this.rowTotal + " / blockList : " + this.blockList + " / blockPage : " + this.blockPage + " / totalPage : " + this.totalPage); + System.out.println("Total Page : " + this.totalPage + " / Start Page : " + this.startPage + " / End Page : " + this.endPage); + System.out.println("Total Row : " + this.rowTotal + " / Start Row : " + this.startRow + " / End Row : " + this.endRow); + } + + public HashMap getParams() { + + HashMap params = new HashMap(); + params.put("isPrevPage", new Boolean(isPrevPage).toString()); + params.put("isNextPage", new Boolean(isNextPage).toString()); + + params.put("nowPage", Integer.toString(nowPage)); + params.put("rowTotal", Integer.toString(rowTotal)); + params.put("blockList", Integer.toString(blockList)); + params.put("blockPage", Integer.toString(blockPage)); + params.put("blockSize", Integer.toString(blockSize)); + params.put("totalPage", Integer.toString(totalPage)); + params.put("startPage", Integer.toString(startPage)); + params.put("endPage", Integer.toString(endPage)); + params.put("startRow", Integer.toString(startRow)); + params.put("endRow", Integer.toString(endRow)); + params.put("startNum", Integer.toString(startNum)); + return params; + } + + public String printPage() { + return printPage(""); + } + + + public String printPage(String parameter) { + + StringBuffer sb = new StringBuffer(); + + sb.append("
    "); + + sb.append(String.format("
  • %s
  • ", 1, parameter, IMG_FIRST, ALT_FIRST)); + + if (isPrevPage) { + sb.append(String.format("
  • %s
  • ", nowPage - 1, parameter, IMG_PREVIOUS, ALT_PREVIOUS)); + } else { + sb.append(String.format("
  • %s
  • ", IMG_PREVIOUS, ALT_PREVIOUS)); + } + + for (int i = startPage; i <= endPage; i++) { + if (i > startPage) { + sb.append(" "); + } + + if (nowPage == i) { + sb.append(String.format("
  • %d
  • ", i)); + } else { + sb.append(String.format("
  • %d
  • ", i, parameter, i)); + } + } + + if (isNextPage) { + sb.append(String.format("
  • %s
  • ", endPage + 1, parameter, IMG_NEXT, ALT_NEXT)); + } else { + sb.append(String.format("
  • %s
  • ", IMG_NEXT, ALT_NEXT)); + } + + sb.append(String.format("
  • %s
  • ", totalPage, parameter, IMG_LAST, ALT_LAST)); + + sb.append("
"); + + return sb.toString(); + } + + public String printPage2(String parameter) { + + StringBuffer sb = new StringBuffer(); + + sb.append("
"); + + sb.append(String.format("%s", 1, parameter, IMG_FIRST, ALT_FIRST)); + + if (isPrevPage) { + sb.append(String.format("%s", nowPage - 1, parameter, IMG_PREVIOUS, ALT_PREVIOUS)); + } else { + sb.append(String.format("%s", IMG_PREVIOUS, ALT_PREVIOUS)); + } + + for (int i = startPage; i <= endPage; i++) { + if (i > startPage) { + sb.append(" "); + } + + if (nowPage == i) { + sb.append(String.format("%d", i)); + } else { + sb.append(String.format("%d", i, parameter, i)); + } + } + + if (isNextPage) { + sb.append(String.format("%s", endPage + 1, parameter, IMG_NEXT, ALT_NEXT)); + } else { + sb.append(String.format("%s", IMG_NEXT, ALT_NEXT)); + } + + sb.append(String.format("%s", totalPage, parameter, IMG_LAST, ALT_LAST)); + + sb.append("
"); + + return sb.toString(); + } + + /* +
+ + 1 + 2 + 3 + 4 + 5 + +
+ */ + + public String printPage3(String parameter) { + + if (rowTotal < 1) { + return StringUtils.Empty; + } + + StringBuffer sb = new StringBuffer(); + + sb.append("
"); + + sb.append(String.format("", 1, parameter)); + + if (isPrevPage) { + sb.append(String.format("", nowPage - 1, parameter)); + } else { + sb.append(String.format("")); + } + + for (int i = startPage; i <= endPage; i++) { + if (i > startPage) { + sb.append(" "); + } + + if (nowPage == i) { + sb.append(String.format("%d", i)); + } else { + sb.append(String.format("%d", i, parameter, i)); + } + } + + if (isNextPage) { + sb.append(String.format("", endPage + 1, parameter)); + } else { + sb.append(String.format("")); + } + + sb.append(String.format("", totalPage, parameter)); + + sb.append("
"); + + return sb.toString(); + } + + + /* +
+
    +
  • + +
  • 1
  • +
  • 2
  • +
  • 3
  • +
  • 4
  • +
  • 5
  • +
  • 6
  • +
  • 7
  • +
  • 8
  • +
  • 9
  • +
  • 10
  • + +
  • +
+
+ + + */ + public String printPage4(String parameter) { + + if (rowTotal < 1) { + return StringUtils.Empty; + } + + StringBuffer sb = new StringBuffer(); + + sb.append("
"); + sb.append("\r\n"); + sb.append("
    "); + + sb.append(String.format("
  • ", 1, parameter)); + sb.append("\r\n"); + + if (isPrevPage) { + sb.append(String.format("", nowPage - 1, parameter)); + } else { + sb.append(String.format("")); + } + sb.append("\r\n"); + + for (int i = startPage; i <= endPage; i++) { + if (i > startPage) { + sb.append(" "); + } + + if (nowPage == i) { + sb.append(String.format("
  • %d
  • ", i)); + } else { + sb.append(String.format("
  • %d
  • ", i, parameter, i)); + } + sb.append("\r\n"); + } + + if (isNextPage) { + sb.append(String.format("", endPage + 1, parameter)); + } else { + sb.append(String.format("")); + } + sb.append("\r\n"); + + sb.append(String.format("
  • ", totalPage, parameter)); + sb.append("\r\n"); + + sb.append("
"); + sb.append("\r\n"); + sb.append("
"); + + return sb.toString(); + } + + /* + + + */ + + + public static int getFrontTotalPage(int pageSize, int totalCount) { + + //int startPage = 1; + int endPage = (totalCount + (pageSize - 1)) / pageSize; + if (endPage < 1) { + endPage = 1; + } + + return endPage; + } + + + public static String printFrontPager(int pageIndex, int pageSize, int totalCount) { + + StringBuffer sb = new StringBuffer(); + + int startPage = 1; + int endPage = (totalCount + (pageSize - 1)) / pageSize; + if (endPage < 1) { + endPage = 1; + } + + sb.append("
"); + sb.append(""); + + for (int i = startPage; i <= endPage; i++) { + if (pageIndex == i) { + sb.append(String.format("%d", i, i)); + } else { + sb.append(String.format("%d", i, i)); + } + } + + sb.append(""); + sb.append("
"); + + return sb.toString(); + } + + /* + +
+ 처음페이지 + 이전페이지 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 다음페이지 + 마지막페이지 +
+ */ + + + static final String CMS_FIRST = "처음페이지"; + static final String CMS_PREVIOUS = "이전페이지"; + static final String CMS_NEXT = "다음페이지"; + static final String CMS_LAST = "마지막페이지"; + + + public String printCmsPager(String parameter) { + + if (rowTotal < 1) { + return StringUtils.Empty; + } + + StringBuffer sb = new StringBuffer(); + + sb.append("
"); + sb.append(String.format("" + CMS_FIRST + "", 1, parameter)); + sb.append(StringUtils.CRLF); + + if (isPrevPage) { + sb.append(String.format("" + CMS_PREVIOUS + "", nowPage - 1, parameter)); + } else { + sb.append(String.format("" + CMS_PREVIOUS + "")); + } + sb.append(StringUtils.CRLF); + + for (int i = startPage; i <= endPage; i++) { + if (i > startPage) { + sb.append(" "); + } + if (nowPage == i) { + sb.append(String.format("%d", i)); + } else { + sb.append(String.format("%d", i, parameter, i)); + } + sb.append(StringUtils.CRLF); + } + + if (isNextPage) { + sb.append(String.format("" + CMS_NEXT + "", endPage + 1, parameter)); + } else { + sb.append(String.format("" + CMS_NEXT + "")); + } + sb.append(StringUtils.CRLF); + + sb.append(String.format("" + CMS_LAST + "", totalPage, parameter)); + sb.append(StringUtils.CRLF); + + sb.append("
"); + + return sb.toString(); + } + + + /** + * 2021.03.21 + */ + public String printFrontPager(String parameter) { + + if (rowTotal < 1) { + return StringUtils.Empty; + } + + StringBuffer sb = new StringBuffer(); + + sb.append("
"); + sb.append(String.format("처음으로", 1, parameter)); + sb.append(StringUtils.CRLF); + + if (isPrevPage) { + sb.append(String.format("이전", nowPage - 1, parameter)); + } else { + sb.append(String.format("이전")); + } + sb.append(StringUtils.CRLF); + + for (int i = startPage; i <= endPage; i++) { + if (i > startPage) { + sb.append(" "); + } + if (nowPage == i) { + sb.append(String.format("%d", i)); + } else { + sb.append(String.format("%d", i, parameter, i)); + } + sb.append(StringUtils.CRLF); + } + + if (isNextPage) { + sb.append(String.format("다음", endPage + 1, parameter)); + } else { + sb.append(String.format("다음")); + } + sb.append(StringUtils.CRLF); + + sb.append(String.format("마지막으로", totalPage, parameter)); + sb.append(StringUtils.CRLF); + + sb.append("
"); + + return sb.toString(); + } + + + + public String printHtml() { + + if (rowTotal < 1) { + return StringUtils.Empty; + } + + StringBuffer sb = new StringBuffer(); + + sb.append("
    "); + + if (isPrevPage) { + sb.append(String.format("
  • ", (startPage - 1))); + } else { + sb.append("
  • "); + } + + for (int i = startPage; i <= endPage; i++) { + if (i > startPage) { + sb.append(" "); + } + + if (nowPage == i) { + sb.append(String.format("
  • %d
  • ", i)); + } else { + sb.append(String.format("
  • %d
  • ", i, i)); + } + } + + if (isNextPage) { + sb.append(String.format("
  • ", endPage + 1)); + } else { + sb.append("
  • "); + } + + sb.append("
"); + + return sb.toString(); + } + + +} diff --git a/src/main/java/com/ns/mobile/website/common/util/PasswordUtils.java b/src/main/java/com/ns/mobile/website/common/util/PasswordUtils.java new file mode 100644 index 0000000..8f8490c --- /dev/null +++ b/src/main/java/com/ns/mobile/website/common/util/PasswordUtils.java @@ -0,0 +1,21 @@ +package com.ns.mobile.website.common.util; + +import lombok.experimental.UtilityClass; +import org.springframework.security.crypto.bcrypt.BCrypt; + +@UtilityClass +public class PasswordUtils { + + public static String hashPassword(String plainText){ + return BCrypt.hashpw(plainText, BCrypt.gensalt()); + } + + public static boolean equals(String plainText, String hashed) { + if (plainText == null || hashed == null) { + return false; + } + return BCrypt.checkpw(plainText, hashed); + } + + +} diff --git a/src/main/java/com/ns/mobile/website/common/util/PhoneUtils.java b/src/main/java/com/ns/mobile/website/common/util/PhoneUtils.java new file mode 100644 index 0000000..433e3ea --- /dev/null +++ b/src/main/java/com/ns/mobile/website/common/util/PhoneUtils.java @@ -0,0 +1,23 @@ +package com.ns.mobile.website.common.util; + + +public class PhoneUtils { + + + public static String toString(String value) { + + if (value == null) { + return ""; + } + if (value.length() == 8) { + return value.replaceFirst("^([0-9]{4})([0-9]{4})$", "$1-$2"); + } else if (value.length() == 12) { + return value.replaceFirst("(^[0-9]{4})([0-9]{4})([0-9]{4})$", "$1-$2-$3"); + } + return value.replaceFirst("(^02|[0-9]{3})([0-9]{3,4})([0-9]{4})$", "$1-$2-$3"); + } + + +} + + diff --git a/src/main/java/com/ns/mobile/website/common/util/RSASecureUtils.java b/src/main/java/com/ns/mobile/website/common/util/RSASecureUtils.java new file mode 100644 index 0000000..1062c47 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/common/util/RSASecureUtils.java @@ -0,0 +1,99 @@ +package com.ns.mobile.website.common.util; +import lombok.experimental.UtilityClass; + +import javax.crypto.Cipher; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpSession; +import java.security.*; +import java.security.spec.RSAPublicKeySpec; + +@UtilityClass +public class RSASecureUtils { + + public final static String RSA_WEB_KEY = "_RSA_WEB_Key_"; // RSA session key 이름 + private final static String RSA_INSTANCE = "RSA"; //인스턴스 형식(RSA/ECB/PKCS1Padding) + + public static void removePrivateKey(HttpSession session){ + session.removeAttribute(RSA_WEB_KEY); + } + + /** + * rsa 공개키, 개인키 생성 + * + * @param request + */ + public static void initRsa(HttpServletRequest request) { + HttpSession session = request.getSession(); + if(session.getAttribute(RSA_WEB_KEY) != null && + request.getAttribute("RSAModulus") !=null && + request.getAttribute("RSAExponent") !=null + ){ + return; + } + + KeyPairGenerator generator; + try { + generator = KeyPairGenerator.getInstance(RSA_INSTANCE); + generator.initialize(1024); + + KeyPair keyPair = generator.genKeyPair(); + KeyFactory keyFactory = KeyFactory.getInstance(RSA_INSTANCE); + PublicKey publicKey = keyPair.getPublic(); + PrivateKey privateKey = keyPair.getPrivate(); + + removePrivateKey(session); + session.setAttribute(RSA_WEB_KEY, privateKey); // session에 RSA 개인키를 세션에 저장 + + RSAPublicKeySpec publicSpec = (RSAPublicKeySpec) keyFactory.getKeySpec(publicKey, RSAPublicKeySpec.class); + String publicKeyModulus = publicSpec.getModulus().toString(16); + String publicKeyExponent = publicSpec.getPublicExponent().toString(16); + + request.setAttribute("RSAModulus", publicKeyModulus); // rsa modulus 를 request 에 추가 + request.setAttribute("RSAExponent", publicKeyExponent); // rsa exponent 를 request 에 추가 + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + /** + * 복호화 + * + * @param privateKey + * @param securedValue + * @return + * @throws Exception + */ + public static String decryptRsa(PrivateKey privateKey, String securedValue) throws Exception{ + Cipher cipher = Cipher.getInstance(RSA_INSTANCE); + byte[] encryptedBytes = hexToByteArray(securedValue); + cipher.init(Cipher.DECRYPT_MODE, privateKey); + byte[] decryptedBytes = cipher.doFinal(encryptedBytes); + return new String(decryptedBytes, "utf-8"); // 문자 인코딩 주의. + } + + /** + * 16진 문자열을 byte 배열로 변환한다. + * + * @param hex + * @return + */ + public static byte[] hexToByteArray(String hex) { + if (hex == null || hex.length() % 2 != 0) { return new byte[] {}; } + + byte[] bytes = new byte[hex.length() / 2]; + for (int i = 0; i < hex.length(); i += 2) { + byte value = (byte) Integer.parseInt(hex.substring(i, i + 2), 16); + bytes[(int) Math.floor(i / 2)] = value; + } + return bytes; + } + +} + + + + + + + diff --git a/src/main/java/com/ns/mobile/website/common/util/RequestUtils.java b/src/main/java/com/ns/mobile/website/common/util/RequestUtils.java new file mode 100644 index 0000000..f48be45 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/common/util/RequestUtils.java @@ -0,0 +1,134 @@ +package com.ns.mobile.website.common.util; + +import lombok.extern.slf4j.Slf4j; + +import javax.servlet.http.HttpServletRequest; +import java.net.MalformedURLException; +import java.net.URL; + +@Slf4j +public class RequestUtils { + + public static String getServerUrl(HttpServletRequest request) { + + if (request.getServerPort() == 80 || request.getServerPort() == 443) { + return request.getScheme() + "://" + getHost(request); + } else { + return request.getScheme() + "://" + getHost(request) + ":" + request.getServerPort(); + } + } + + public static String getUri(HttpServletRequest request) { + return request.getRequestURI(); + } + + public static String getHost(HttpServletRequest request) { + + String host = StringUtils.Empty; + try { + URL url = new URL(request.getRequestURL().toString()); + host = url.getHost(); + } catch (MalformedURLException e) { + } + return host; + } + + public static String getUserAgent(HttpServletRequest request) { + return request.getHeader("User-Agent").toString(); + } + + public static boolean isMobileDevice(HttpServletRequest request) { + String userAgent = RequestUtils.getUserAgent(request); + return (userAgent.contains("iPhone") || userAgent.contains("iPad") || userAgent.contains("Android")); + } + + public static String getClientIP(HttpServletRequest request) { + + String ip = request.getHeader("X-FORWARDED-FOR"); + + if (ip == null || ip.length() == 0) { + ip = request.getHeader("Proxy-Client-IP"); + } + + if (ip == null || ip.length() == 0) { + ip = request.getHeader("WL-Proxy-Client-IP"); // 웹로직 + } + + if (ip == null || ip.length() == 0) { + ip = request.getRemoteAddr(); + } + + return ip; + } + + public static boolean isPcBrowser(HttpServletRequest request) { + return !isMobileBrowser(request); + } + + public static boolean isMobileBrowser(HttpServletRequest request) { + + String ua = request.getHeader("User-Agent").toLowerCase(); + + if (ua.matches(".*(android|avantgo|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|pad)|iris|kindle|lge |maemo|midp|mmp|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|symbian|treo|up\\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino).*") + || ua.substring(0, 4).matches("1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|e\\-|e\\/|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(di|rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|xda(\\-|2|g)|yas\\-|your|zeto|zte\\-")) { + return true; + } + + return false; + } + + private static final String URL_API = "/api/"; + + /** + * api경로인지 여부 + */ + public static boolean isApiCall(HttpServletRequest request) { + return request.getRequestURI().contains(URL_API); + } + + public static String getString(HttpServletRequest request, String name) { + if (request.getParameter(name) == null) { + return StringUtils.Empty; + } + return request.getParameter(name); + } + + public static boolean getBoolByAttr(HttpServletRequest request, String name) { + try { + if (request.getAttribute(name) != null) { + return (boolean) request.getAttribute(name); + } + } catch (Exception e) { + log.info(e.getMessage()); + } + return false; + } + + public static String getStringByAttr(HttpServletRequest request, String name) { + try { + if (request.getAttribute(name) != null) { + return (String) request.getAttribute(name); + } + } catch (Exception e) { + log.info(e.getMessage()); + } + return ""; + } + + public static int getInteger(HttpServletRequest request, String name) { + String value = request.getParameter(name); + if (value != null) { + return NumberUtils.toNumber(value); + } + return 0; + } + + public static long getLong(HttpServletRequest request, String name) { + String value = request.getParameter(name); + if (value != null) { + return NumberUtils.toLong(value); + } + return 0L; + } + +} diff --git a/src/main/java/com/ns/mobile/website/common/util/ResponseUtils.java b/src/main/java/com/ns/mobile/website/common/util/ResponseUtils.java new file mode 100644 index 0000000..ada7610 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/common/util/ResponseUtils.java @@ -0,0 +1,195 @@ +package com.ns.mobile.website.common.util; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.ns.mobile.website.biz.exception.BizException; +import lombok.extern.slf4j.Slf4j; +import org.springframework.http.ContentDisposition; +import org.springframework.util.FileCopyUtils; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.*; +import java.net.URLConnection; +import java.nio.charset.StandardCharsets; + +@Slf4j +public class ResponseUtils { + + private static final String HTML_TITLE = "TITLE"; + private static final String JS_ALERT = "alert(\"%s\");"; + private static final String JS_LOCATION = "location.href = \"%s\";"; + private static final String JS_HISTORY_BACK = "history.back();"; + + public static void responseHtml(HttpServletResponse response, String script) { + responseHtml(response, script, ""); + } + + public static void responseHtml(HttpServletResponse response, String script, String body) { + try { + response.setCharacterEncoding("utf-8"); + response.setContentType("text/html;charset=utf-8"); + + PrintWriter printWriter = response.getWriter(); + + String title = "LANEDU"; + + printWriter.write(""); + printWriter.write(""); + printWriter.write(" "); + printWriter.write(" " + title + ""); + printWriter.write(" "); + printWriter.write(" "); + printWriter.write(" "); + printWriter.write(" "); + printWriter.write(" "); + printWriter.write(" "); + printWriter.write(" " + body + ""); + printWriter.write(""); + printWriter.close(); + + } catch (IOException e) { + log.error("[IOException] error: {}", e.getMessage()); + + } catch (Exception e) { + log.error("[Exception] error: {}", e.getMessage()); + } + } + + public static void htmlAlert(HttpServletResponse response, String msg) { + String script = String.format(JS_ALERT, msg); + responseHtml(response, script); + } + + public static void htmlLocation(HttpServletResponse response, String url) { + String script = String.format(JS_LOCATION, url); + responseHtml(response, script); + } + + public static void htmlAlertAndHistoryBack(HttpServletResponse response, String msg) { + String script = String.format(JS_ALERT, msg) + JS_HISTORY_BACK; + responseHtml(response, script); + } + + public static void htmlAlertAndLocation(HttpServletRequest request, HttpServletResponse response, String msg, String url) { + if (RequestUtils.isApiCall(request)) { + responseJson(response, false, "", msg); + } else { + String script = String.format(JS_ALERT, msg) + String.format(JS_LOCATION, url); + responseHtml(response, script); + } + } + + public static void htmlAlertAndLocation(HttpServletRequest request, HttpServletResponse response, String resultCode, String msg, String url) { + if (RequestUtils.isApiCall(request)) { + responseJson(response, false, resultCode, msg); + } else { + String script = String.format(JS_ALERT, msg) + String.format(JS_LOCATION, url); + responseHtml(response, script); + } + } + + public static void htmlAlertAndKakaoClose(HttpServletResponse response, String msg, String osType) { + String script = String.format(JS_ALERT, msg); + if ("IOS".equals(osType)) { + script += "window.location.href = 'kakaoweb://closeBrowser';"; + } else if ("ANDROID".equals(osType)) { + script += "window.location.href = 'kakaotalk://inappbrowser/close';"; + } + + responseHtml(response, script); + } + + public static void responseJsonFailMessage(HttpServletResponse response, String resultCode, String message) { + responseJson(response, false, resultCode, message); + } + + static class JsonResult { + boolean result; + String resultCode; + String message; + + public JsonResult(String resultCode, String message) { + this.result = false; + this.resultCode = resultCode; + this.message = message; + } + } + + private static void responseJson(HttpServletResponse response, boolean result, String resultCode, String message) { + try { + response.setCharacterEncoding("utf-8"); + response.setContentType("application/json;charset=utf-8"); + + StringBuilder sb = new StringBuilder(); + sb.append(String.format("{\"header\": {\"result\": %s, \"message\": \"%s\", \"errCode\": \"%s\"}, \"body\": null}", (result ? "true" : "false"), message, "")); + + PrintWriter printWriter = response.getWriter(); + printWriter.write(sb.toString()); + printWriter.close(); + + } catch (JsonProcessingException e) { + log.error("[JsonProcessingException] error: {}", e.getMessage()); + + } catch (IOException e) { + log.error("[IOException] error: {}", e.getMessage()); + + } catch (Exception e) { + log.error("[Exception] error: {}", e.getMessage()); + } + } + + private static void responseJson(HttpServletResponse response, String json) { + try { + response.setCharacterEncoding("utf-8"); + response.setContentType("application/json;charset=utf-8"); + + PrintWriter printWriter = response.getWriter(); + printWriter.write(json); + printWriter.close(); + + } catch (IOException e) { + log.error("[IOException] error: {}", e.getMessage()); + + } catch (Exception e) { + log.error("[Exception] error: {}", e.getMessage()); + } + } + + public static void fileDownload(HttpServletResponse response, String filePath, String originalFilename) throws BizException { + + File file = new File(filePath); + if (!file.exists()) { + throw new BizException(" 요청하신 파일이 존재하지 않습니다. "); + } + + String mimeType = URLConnection.guessContentTypeFromName(file.getName()); + if (mimeType == null) { + log.error("mimetype is not detectable, will take default"); + mimeType = "application/octet-stream"; + } + response.setContentType(mimeType); + + ContentDisposition contentDisposition = ContentDisposition.builder("attachment").filename(originalFilename, StandardCharsets.UTF_8).build(); + response.setHeader("Content-Disposition", contentDisposition.toString()); + //response.setHeader("Content-Disposition", String.format("inline; filename=\"" + saveFilename + "\"")); + response.setHeader("Access-Control-Allow-Origin", "*"); + response.setContentLength((int) file.length()); + + try { + FileInputStream fileInputStream = new FileInputStream(file); + InputStream inputStream = new BufferedInputStream(fileInputStream); + FileCopyUtils.copy(inputStream, response.getOutputStream()); + inputStream.close(); + + } catch (FileNotFoundException e) { + log.error("[FileNotFoundException] error: {}", e.getMessage()); + throw new BizException(" 요청하신 파일이 존재하지 않습니다. "); + + } catch (IOException e) { + log.error("[IOException] error: {}", e.getMessage()); + throw new BizException(" IO처리중 문제가 발생하였습니다. "); + } + + } + +} diff --git a/src/main/java/com/ns/mobile/website/common/util/StringUtils.java b/src/main/java/com/ns/mobile/website/common/util/StringUtils.java new file mode 100644 index 0000000..1aef822 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/common/util/StringUtils.java @@ -0,0 +1,211 @@ +package com.ns.mobile.website.common.util; + + +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.UUID; + +public class StringUtils { + + public static final String NULL = null; + public static final String Empty = ""; + public static final String CRLF = "\r\n"; + public static final String TAB = "\t"; + public static final String LINE_BAR = "##############################################"; + public static final String LINE_BAR3 = CRLF + LINE_BAR + CRLF + LINE_BAR + CRLF + LINE_BAR; + + + public static final String FORMAT_LOG = "%-30s\t: %s"; + + public static final String STR_APPLICATION_JSON = "application/json"; + + public static boolean emt(Object obj) { + return isEmpty(obj); + } + + public static boolean isEmpty(Object obj) { + return org.springframework.util.StringUtils.isEmpty(obj); + } + + public static boolean isEmpty(String obj) { + return org.springframework.util.StringUtils.isEmpty(obj); + } + + public static boolean nemt(Object obj) { + return isNotEmpty(obj); + } + + public static boolean isNotEmpty(Object obj) { + return !isEmpty(obj); + } + + public static boolean isNotEmpty(String obj) { + return !isEmpty(obj); + } + + public static Object getTimeStamp() { + SimpleDateFormat dayTime = new SimpleDateFormat("yyyyMMddHHmmssSSS"); + return dayTime.format(new Date(System.currentTimeMillis())); + } + + public static boolean equals(String val1, String val2) { + return val1 != null && val2 != null && val1.equals(val2); + } + + public static boolean eq(String val1, String val2) { + return equals(val1, val2); + } + + public static boolean neq(String val1, String val2) { + return !eq(val1, val2); + } + + public static boolean notEquals(String val1, String val2) { + return !equals(val1, val2); + } + + + public static String getUuid() { + return UUID.randomUUID().toString().replaceAll("-", "").toLowerCase(); + } + + public static String getUuid(int length) { + return UUID.randomUUID().toString().replaceAll("-", "").toLowerCase().substring(0, length); + } + + public static String getString(String value) { + return getString(value, StringUtils.Empty); + } + + public static String getString(String value, String emptyValue) { + if (StringUtils.isEmpty(value)) { + return emptyValue; + } + return value; + } + + public static boolean andNotEmpty(String... args) { + if (args != null) { + for (int i = 0; i < args.length; i++) { + if (isEmpty(args[i])) { + return false; + } + } + return true; + } + return false; + } + + public static boolean orEmpty(String... args) { + + for (String x : args) { + if (isEmpty(x)) { + return true; + } + } + return false; + } + + public static boolean orNotEmpty(String... args) { + + for (String x : args) { + if (isNotEmpty(x)) { + return true; + } + } + return false; + } + + public static boolean orEquals(String value, String... args) { + + for (int i = 0; i < args.length; i++) { + if (StringUtils.equals(value, args[i])) { + return true; + } + } + + return false; + } + + public static boolean orContains(String value, String... args) { + + for (int i = 0; i < args.length; i++) { + if (value.contains(args[i])) { + return true; + } + } + + return false; + } + + public static String left(String s, int len) { + + if (isNotEmpty(s)) { + if (s.length() >= len ) { + return s.substring(0, len); + } + return s; + } + + return StringUtils.Empty; + } + + public static String leftPad(String s, int n) { + return String.format("%1$" + n + "s", s).replace(' ', '0'); + } + + + /** + * 한글2, 영문1 + * + * @param str + * @return + */ + public static int getKorLength(String str) { + + if (StringUtils.isEmpty(str)) { + return 0; + } + + int length = str.trim().getBytes().length; + try { + String eucKrName = new String(str.trim().getBytes("UTF-8"), "EUC-KR"); + length = eucKrName.length(); + } catch (Exception e) { + } + + return length; + } + + public static final String getComleteWordByJongsung(String name, String firstValue, String secondValue) { + char lastName = name.charAt(name.length() - 1); + // 한글의 제일 처음과 끝의 범위밖일 경우는 오류 + if (lastName < 0xAC00 || lastName > 0xD7A3) { + return ""; + } + String seletedValue = (lastName - 0xAC00) % 28 > 0 ? firstValue : secondValue; + return seletedValue; + } + + public static String formatReplaceAlls(String value, String... args) { + if (args != null) { + for(int i = 0; i < args.length; i+=2) { + args[i] = "\\{" + args[i] + "\\}"; + } + } + return replaceAlls(value, args); + } + + public static String replaceAlls(String value, String... args) { + if (args != null) { + for(int i = 0; i < args.length; i+=2) { + value = value.replaceAll(args[i], args[i+1]); + } + } + return value; + } + + +} + + diff --git a/src/main/java/com/ns/mobile/website/common/util/ZapUtil.java b/src/main/java/com/ns/mobile/website/common/util/ZapUtil.java new file mode 100644 index 0000000..af8bfb8 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/common/util/ZapUtil.java @@ -0,0 +1,180 @@ +package com.ns.mobile.website.common.util; + + +import lombok.extern.slf4j.Slf4j; + +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; +import java.text.SimpleDateFormat; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; +import java.util.Date; + + +@Slf4j +public final class ZapUtil { + + public static LocalDateTime convDateTime(String dateStr) { + return convDateTime(dateStr,0); + } + + public static LocalDateTime convDateTime(String dateStr, int addDays) { + + LocalDateTime date = LocalDateTime.now().plusDays(addDays); + if(dateStr==null) return date; + if(dateStr.length()<8) return date; + + try{ + String inDate = dateReFormat(dateStr); + System.out.println("...... dateStr : "+dateStr +" >> "+inDate); + + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); + + // 문자열 -> Date + date = LocalDateTime.parse(inDate, formatter); + System.out.println("...... res : " + date); // 2021-06-19T21:05:07 + } + catch(Exception e) { + e.printStackTrace(); + } + return date; + } + + public static String dateReFormat(String bfDate) { + + String dt2 = bfDate.replace("오후", "PM"); + +// String dt3 = dt2.replaceAll("[./-:]"," "); + String dt3 = dt2.replace("."," "); + dt3 = dt3.replace("/"," "); + dt3 = dt3.replace("-"," "); + dt3 = dt3.replace(":"," "); + + int tt[] = { 2021,8,1, 0,0,0 }; + String pp[] = dt3.split(" "); + + for(int i=0, j=0;i "+i+":"+pp[i]+">"+val+" , j:"+j); + + if(val<0) continue; + tt[j++] = val; + } + + ZapUtil.fileLog("test.log", tt[0]+","+tt[1]+","+tt[2]+","+tt[3]+","+tt[4]+","+tt[5]); + if(dt2.indexOf("PM")>=0) tt[3] += 12; + + String newDate = tt[0]+"-"+convStr2(tt[1])+"-"+convStr2(tt[2]) + + " "+convStr2(tt[3])+":"+convStr2(tt[4])+":"+convStr2(tt[5]); + + return newDate; + } + + // ------------------------------------------------------------------------------ + public static int convInt(String str){ + try{ + int nn = Integer.parseInt(str); + return nn; + } + catch (Exception e) {} + return -1; + } + public static String convStr2(int val){ + if(val<10) return "0"+val; + return ""+val; + } + + public static int atoi(String str) { + try{ + return Integer.parseInt(str); + } + catch(Exception e) {} + return 0; + } + + // -------------------------------------------------------------------------- + public static boolean isInsideDay(LocalDateTime regDatetime, int days) { + + LocalDateTime passDate = regDatetime.plusDays(days); + LocalDateTime today = LocalDateTime.now(); + + boolean res = today.isBefore(passDate); + +// fileLog("######## isInsideDay.regDate "+regDatetime); +// fileLog("######## isInsideDay.passDate "+passDate); +// fileLog("######## isInsideDay.today "+today + " -------> "+res); + return res; + } + // =========================================================================== + public static String LogText(int logType, Object clsObj, String dateForm, String msg) { + + String timeStr = ""; + String cname = ""; + String msgHdr = ""; + String logMsg = ""; + try { + if(dateForm!=null) { + SimpleDateFormat format = new SimpleDateFormat(dateForm); + timeStr = "["+format.format(new Date())+"] "; + } + if(clsObj!=null) { + cname= clsObj.getClass().getName(); + cname = "["+cname.substring(cname.lastIndexOf(".")+1)+"] "; + } + if(logType==0) msgHdr = ">>> "; + if(logType==1) msgHdr = ".. "; + if(logType==2) msgHdr = "-- "; + + logMsg = timeStr + cname + msgHdr + msg; + } + catch (Exception e) { + e.printStackTrace(); + } + return logMsg; + } + + public static void fileLog(boolean stdOut, String fname, String msg) { + + String logMsg = LogText(-1, null, "MM-dd HH:mm:ss", msg) + "\n"; + try { + File file = new File(fname); + FileWriter fw = new FileWriter(file, true); + fw.write(logMsg); + fw.close(); + } catch (Exception e) { + // e.printStackTrace(); + } + + if(stdOut) System.out.print("...... "+logMsg); + } + + public static void fileLog(String fname, String msg) { + if(fname==null) { + System.out.print("....... "+msg); + return; + } + fileLog(true, "/NAS/LANEDU/log/"+fname, msg); + } + + public static void fileLog(String msg) { + fileLog(true, "api_test.log", msg); + } + + public static void fileLog(Object clsObj, String msg) { + String cname= clsObj.getClass().getName(); + fileLog(true, cname+".log", msg); + } + + +} + + + + + + + + + diff --git a/src/main/java/com/ns/mobile/website/config/CaptchaConfiguration.java b/src/main/java/com/ns/mobile/website/config/CaptchaConfiguration.java new file mode 100644 index 0000000..155a300 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/config/CaptchaConfiguration.java @@ -0,0 +1,18 @@ +package com.ns.mobile.website.config; + +import com.captcha.botdetect.web.servlet.CaptchaServlet; +import org.springframework.boot.web.servlet.ServletRegistrationBean; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +@Configuration +public class CaptchaConfiguration { + + @Bean + public ServletRegistrationBean captchaServletRegistration() { + ServletRegistrationBean srb = new ServletRegistrationBean(); + srb.setServlet(new CaptchaServlet()); + srb.addUrlMappings("/botdetectcaptcha"); + return srb; + } +} diff --git a/src/main/java/com/ns/mobile/website/config/HttpSessionConfiguration.java b/src/main/java/com/ns/mobile/website/config/HttpSessionConfiguration.java new file mode 100644 index 0000000..b730b33 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/config/HttpSessionConfiguration.java @@ -0,0 +1,63 @@ +package com.ns.mobile.website.config; + +import javax.servlet.http.HttpSessionAttributeListener; +import javax.servlet.http.HttpSessionBindingEvent; +import javax.servlet.http.HttpSessionEvent; +import javax.servlet.http.HttpSessionListener; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +import lombok.extern.slf4j.Slf4j; + +@Slf4j +@Configuration +public class HttpSessionConfiguration { + + @Bean + public HttpSessionListener httpSessionListener() { + + + return new HttpSessionListener() { + @Override + public void sessionCreated(HttpSessionEvent sessionEvent) { + log.info("세션 생성, Session ID: {}", sessionEvent.getSession().getId()); + } + + @Override + public void sessionDestroyed(HttpSessionEvent sessionEvent) { + log.info("세션 소멸, Session ID: {}", sessionEvent.getSession().getId()); + + } + }; + } + + @Bean + public HttpSessionAttributeListener httpSessionAttributeListener() { + return new HttpSessionAttributeListener() { + @Override + public void attributeAdded(HttpSessionBindingEvent se) { + // This method will be automatically called when session attribute added + log.info("Attribute Added following information"); + log.info("Attribute Name:" + se.getName()); + log.info("Attribute Value:" + se.getName()); + } + + @Override + public void attributeRemoved(HttpSessionBindingEvent se) { + // This method will be automatically called when session attribute removed + log.info("attributeRemoved"); + } + + @Override + public void attributeReplaced(HttpSessionBindingEvent se) { + // This method will be automatically called when session attribute replace + log.info("Attribute Replaced following information"); + log.info("Attribute Name:" + se.getName()); + log.info("Attribute Old Value:" + se.getValue()); + } + }; + } + +} + diff --git a/src/main/java/com/ns/mobile/website/config/JasyptConfig.java b/src/main/java/com/ns/mobile/website/config/JasyptConfig.java new file mode 100644 index 0000000..930f566 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/config/JasyptConfig.java @@ -0,0 +1,33 @@ +package com.ns.mobile.website.config; + +import org.jasypt.encryption.StringEncryptor; +import org.jasypt.encryption.pbe.PooledPBEStringEncryptor; +import org.jasypt.encryption.pbe.config.SimpleStringPBEConfig; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +import com.ns.mobile.website.web.properties.LaneduProperties; + +import lombok.RequiredArgsConstructor; + +@Configuration +@RequiredArgsConstructor +public class JasyptConfig { + + private final LaneduProperties laneduProperties; + + @Bean(name = "jasyptStringEncryptor") + public StringEncryptor stringEncryptor() { + PooledPBEStringEncryptor encryptor = new PooledPBEStringEncryptor(); + SimpleStringPBEConfig config = new SimpleStringPBEConfig(); + config.setPassword(laneduProperties.getJasyptConfigPassword()); // 암호화할 때 사용하는 키 + config.setAlgorithm("PBEWithMD5AndDES"); // 암호화 알고리즘 + config.setKeyObtentionIterations("1000"); // 반복할 해싱 회수 + config.setPoolSize("1"); // 인스턴스 pool + config.setProviderName("SunJCE"); + config.setSaltGeneratorClassName("org.jasypt.salt.RandomSaltGenerator"); // salt 생성 클래스 + config.setStringOutputType("base64"); //인코딩 방식 + encryptor.setConfig(config); + return encryptor; + } +} diff --git a/src/main/java/com/ns/mobile/website/config/SecurityConfiguration.java b/src/main/java/com/ns/mobile/website/config/SecurityConfiguration.java new file mode 100644 index 0000000..cfe3d94 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/config/SecurityConfiguration.java @@ -0,0 +1,59 @@ +package com.ns.mobile.website.config; + +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.security.config.annotation.web.builders.HttpSecurity; +import org.springframework.security.config.annotation.web.builders.WebSecurity; +import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; +import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; +import org.springframework.security.crypto.password.PasswordEncoder; +import org.springframework.security.web.util.matcher.AntPathRequestMatcher; + +@Slf4j +@Configuration +@RequiredArgsConstructor +@EnableWebSecurity +public class SecurityConfiguration extends WebSecurityConfigurerAdapter { + + @Bean + public PasswordEncoder getPasswordEncoder() { + return new BCryptPasswordEncoder(); + } + + @Override + public void configure(WebSecurity web) throws Exception { + + web.ignoring().antMatchers("/favicon.ico" + , "/apple-touch-icon.png" + , "/res/**"); + + super.configure(web); + } + + @Override + protected void configure(HttpSecurity http) throws Exception { + + http.csrf().disable(); + http.headers().frameOptions().sameOrigin(); + + http.authorizeRequests() + .antMatchers("/", "/**") + .permitAll(); + + /* + http.logout() + .logoutRequestMatcher(new AntPathRequestMatcher("/home/user/logout")) + .logoutSuccessUrl("/") + .invalidateHttpSession(true); + */ + + http.exceptionHandling() + .accessDeniedPage("/common/denied"); + + super.configure(http); + } + +} diff --git a/src/main/java/com/ns/mobile/website/config/ServletInitializer.java b/src/main/java/com/ns/mobile/website/config/ServletInitializer.java new file mode 100644 index 0000000..545afd7 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/config/ServletInitializer.java @@ -0,0 +1,15 @@ +package com.ns.mobile.website.config; + +import org.springframework.boot.builder.SpringApplicationBuilder; +import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; + +import com.ns.mobile.website.LanEduWebsiteApplication; + +public class ServletInitializer extends SpringBootServletInitializer { + + @Override + protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { + return application.sources(LanEduWebsiteApplication.class); + } + +} diff --git a/src/main/java/com/ns/mobile/website/config/WebMvcConfiguration.java b/src/main/java/com/ns/mobile/website/config/WebMvcConfiguration.java new file mode 100644 index 0000000..7c80858 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/config/WebMvcConfiguration.java @@ -0,0 +1,67 @@ +package com.ns.mobile.website.config; + + +import com.ns.mobile.website.web.interceptor.FrontInterceptor; +import com.ns.mobile.website.biz.properties.FileUrlProperties; +import com.navercorp.lucy.security.xss.servletfilter.XssEscapeServletFilter; +import org.springframework.boot.web.servlet.FilterRegistrationBean; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.config.annotation.InterceptorRegistry; +import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +@Configuration +public class WebMvcConfiguration implements WebMvcConfigurer { + + private final FileUrlProperties fileUrlProperties; + + public WebMvcConfiguration(FileUrlProperties fileUrlProperties) { + this.fileUrlProperties = fileUrlProperties; + } + + //Lucy Xss filter + + @Bean + public FilterRegistrationBean getFilterRegistrationBean() { + FilterRegistrationBean filterRegistration = new FilterRegistrationBean<>(); + filterRegistration.setFilter(new XssEscapeServletFilter()); + filterRegistration.setOrder(1); + filterRegistration.addUrlPatterns("/*"); + return filterRegistration; + } + + + @Bean + FrontInterceptor getFrontInterceptor() { + return new FrontInterceptor(); + } + + @Override + public void addInterceptors(InterceptorRegistry registry) { + registry.addInterceptor(getFrontInterceptor()) + .addPathPatterns("/**") + .excludePathPatterns("/res/**") + .excludePathPatterns("/cms/**") + .excludePathPatterns("/wenMedia/**") + .excludePathPatterns("/files/**") + .excludePathPatterns("/favicon.ico") + ; + } + + @Override + public void addResourceHandlers(ResourceHandlerRegistry registry) { + + registry.addResourceHandler("/files/**") + .addResourceLocations("file:" + fileUrlProperties.getBaseUploadLocation() + "/"); + + //.addResourceLocations("file:/Users/parkkyutae/Documents/sources/github/innosysit/innosysit-clean-website/files/") + registry.addResourceHandler("/cms/files/**") + .addResourceLocations("file:" + fileUrlProperties.getCmsUploadLocation() + "/") + .setCachePeriod(60 * 60 * 24 * 365); + + + } + + +} diff --git a/src/main/java/com/ns/mobile/website/web/auth/CertSessionUtils.java b/src/main/java/com/ns/mobile/website/web/auth/CertSessionUtils.java new file mode 100644 index 0000000..c9ac1e5 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/web/auth/CertSessionUtils.java @@ -0,0 +1,49 @@ +package com.ns.mobile.website.web.auth; + + +import com.ns.mobile.website.common.util.StringUtils; +import com.ns.mobile.website.web.controller.extra.ResultCert; +import lombok.experimental.UtilityClass; +import org.apache.catalina.manager.util.SessionUtils; + +import javax.servlet.http.HttpSession; + + +@UtilityClass +public class CertSessionUtils { + + + private final static String CERT_VALUE = "cert_value"; + + + public static boolean isCert(HttpSession session) { + + if (session != null && session.getAttribute(CERT_VALUE) != null) { + ResultCert resultCert = (ResultCert)session.getAttribute(CERT_VALUE); + return resultCert.isSuccess(); + } + + return false; + } + + public static void setCert(HttpSession session, ResultCert resultCert) { + session.setAttribute(CERT_VALUE, resultCert); + } + + public static String getCertPhone(HttpSession session) { + if (session != null && session.getAttribute(CERT_VALUE) != null) { + ResultCert resultCert = (ResultCert)session.getAttribute(CERT_VALUE); + return resultCert.getPhoneNo(); + } + return StringUtils.Empty; + } + + public static String getCertName(HttpSession session) { + if (session != null && session.getAttribute(CERT_VALUE) != null) { + ResultCert resultCert = (ResultCert)session.getAttribute(CERT_VALUE); + return resultCert.getName(); + } + return StringUtils.Empty; + } + +} diff --git a/src/main/java/com/ns/mobile/website/web/auth/EmailSessionUtils.java b/src/main/java/com/ns/mobile/website/web/auth/EmailSessionUtils.java new file mode 100644 index 0000000..f6aca24 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/web/auth/EmailSessionUtils.java @@ -0,0 +1,27 @@ +package com.ns.mobile.website.web.auth; + + +import com.ns.mobile.website.common.util.StringUtils; +import com.ns.mobile.website.web.controller.extra.ResultCert; +import lombok.experimental.UtilityClass; + +import javax.servlet.http.HttpSession; + + +@UtilityClass +public class EmailSessionUtils { + + private final static String EMAIL_VALUE = "email_value"; + + public static void set(HttpSession session, String value) { + session.setAttribute(EMAIL_VALUE, value); + } + + public static String get(HttpSession session) { + + if (session != null && session.getAttribute(EMAIL_VALUE) != null) { + return (String)session.getAttribute(EMAIL_VALUE); + } + return StringUtils.Empty; + } +} diff --git a/src/main/java/com/ns/mobile/website/web/auth/PublicAccess.java b/src/main/java/com/ns/mobile/website/web/auth/PublicAccess.java new file mode 100644 index 0000000..edeacfd --- /dev/null +++ b/src/main/java/com/ns/mobile/website/web/auth/PublicAccess.java @@ -0,0 +1,12 @@ +package com.ns.mobile.website.web.auth; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Target({ElementType.METHOD}) +@Retention(RetentionPolicy.RUNTIME) +public @interface PublicAccess { + +} diff --git a/src/main/java/com/ns/mobile/website/web/auth/PwdCheckSessionUtils.java b/src/main/java/com/ns/mobile/website/web/auth/PwdCheckSessionUtils.java new file mode 100644 index 0000000..74ba8c1 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/web/auth/PwdCheckSessionUtils.java @@ -0,0 +1,33 @@ +package com.ns.mobile.website.web.auth; + + +import com.ns.mobile.website.common.util.StringUtils; +import lombok.experimental.UtilityClass; + +import javax.servlet.http.HttpSession; + + +@UtilityClass +public class PwdCheckSessionUtils { + + private final static String PASSWORD_CHECK = "PASSWORD_CHECK"; + + public static void set(HttpSession session) { + session.setAttribute(PASSWORD_CHECK, "Y"); + } + + public static void clear(HttpSession session) { + session.removeAttribute(PASSWORD_CHECK); + } + + public static boolean isOK(HttpSession session) { + if (session != null && session.getAttribute(PASSWORD_CHECK) != null) { + return "Y".equals(session.getAttribute(PASSWORD_CHECK)); + } + return false; + } + + public static boolean isFail(HttpSession session) { + return !isOK(session); + } +} diff --git a/src/main/java/com/ns/mobile/website/web/controller/BaseController.java b/src/main/java/com/ns/mobile/website/web/controller/BaseController.java new file mode 100644 index 0000000..a46862f --- /dev/null +++ b/src/main/java/com/ns/mobile/website/web/controller/BaseController.java @@ -0,0 +1,12 @@ +package com.ns.mobile.website.web.controller; + +import org.springframework.stereotype.Controller; + +import lombok.extern.slf4j.Slf4j; + +@Slf4j +@Controller +public class BaseController { + + +} diff --git a/src/main/java/com/ns/mobile/website/web/controller/ErrorController.java b/src/main/java/com/ns/mobile/website/web/controller/ErrorController.java new file mode 100644 index 0000000..9d932dc --- /dev/null +++ b/src/main/java/com/ns/mobile/website/web/controller/ErrorController.java @@ -0,0 +1,36 @@ +package com.ns.mobile.website.web.controller; + +import com.ns.mobile.website.web.auth.PublicAccess; +import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; + +@RequiredArgsConstructor +@Controller +public class ErrorController implements org.springframework.boot.web.servlet.error.ErrorController { + + @PublicAccess + @Override + @RequestMapping("/error") + public String getErrorPath() { + return "common/error"; + } + +} + + + + + + + + + + + + + + + + + diff --git a/src/main/java/com/ns/mobile/website/web/controller/IndexController.java b/src/main/java/com/ns/mobile/website/web/controller/IndexController.java new file mode 100644 index 0000000..aaeb35c --- /dev/null +++ b/src/main/java/com/ns/mobile/website/web/controller/IndexController.java @@ -0,0 +1,41 @@ +package com.ns.mobile.website.web.controller; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpSession; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; + +import com.ns.mobile.website.web.auth.PublicAccess; + +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; + +@Slf4j +@RequiredArgsConstructor +@Controller +public class IndexController extends BaseController { + + @PublicAccess + @GetMapping(value = {"/", "/index"}) + String index(HttpServletRequest request, HttpSession session) { + + return "redirect:/home"; + } + + @PublicAccess + @GetMapping(value = {"/{siteId}.home", "/{siteId}.page"}) + String bizIndex(@PathVariable String siteId) { + + return "redirect:/" + siteId + "/home"; + } + + @PublicAccess + @GetMapping(value = {"/policy", "/{siteId}/policy"}) + String policy(@PathVariable(required = false) String siteId) { + + return "common/policy"; + } + +} diff --git a/src/main/java/com/ns/mobile/website/web/controller/api/RequestError.java b/src/main/java/com/ns/mobile/website/web/controller/api/RequestError.java new file mode 100644 index 0000000..6a6de26 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/web/controller/api/RequestError.java @@ -0,0 +1,47 @@ +package com.ns.mobile.website.web.controller.api; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; +import org.springframework.validation.FieldError; +import org.springframework.validation.ObjectError; + +import java.util.ArrayList; +import java.util.List; + +@NoArgsConstructor +@AllArgsConstructor +@SuperBuilder +@Data +public class RequestError { + + private String field; + private String message; + + public static RequestError of(ObjectError e) { + + RequestError requestError = new RequestError(); + requestError.setMessage(e.getDefaultMessage()); + requestError.setField(((FieldError) e).getField()); + + return requestError; + } + + + public static List of(List errors) { + + List requestErrors = new ArrayList<>(); + + if (errors != null) { + for (ObjectError error : errors) { + requestErrors.add(RequestError.of(error)); + } + } + + return requestErrors; + } + + +} diff --git a/src/main/java/com/ns/mobile/website/web/controller/extra/ExtraCertController.java b/src/main/java/com/ns/mobile/website/web/controller/extra/ExtraCertController.java new file mode 100644 index 0000000..8af9012 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/web/controller/extra/ExtraCertController.java @@ -0,0 +1,472 @@ +package com.ns.mobile.website.web.controller.extra; + +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; +import java.util.Date; +import java.util.Locale; +import java.util.Random; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; + +import com.ns.mobile.website.common.util.RequestUtils; +import com.ns.mobile.website.web.auth.CertSessionUtils; +import com.ns.mobile.website.web.auth.PublicAccess; +import com.ns.mobile.website.web.controller.BaseController; +import com.ns.mobile.website.web.properties.LaneduProperties; + +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; + +@Slf4j +@RequiredArgsConstructor +@Controller +public class ExtraCertController extends BaseController { + + private final LaneduProperties laneduProperties; + + private String getNow() { + + return LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")); + } + + private String getSeqNumber() { + LocalDateTime now = LocalDateTime.now(); + int seq = (new Random()).nextInt(10000) + 1; + + return String.format("%s%05d" + , now.format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")) + , seq); + } + + private String getTrCertData(String actionType) { + + //tr_cert 데이터 변수 선언 --------------------------------------------------------------- + String tr_cert = ""; + String cpId = "KBZM1052"; // 회원사ID + + String urlCode = "002001"; // URL코드 + + urlCode = "004001"; // - localhost - 회원가입 + urlCode = "005001"; // - localhost:8080 - 회원가입 + + urlCode = laneduProperties.getPhoneUrlCode(); + + System.out.println("#######################"); + System.out.println("#######################"); + System.out.println("#######################"); + System.out.println(urlCode); + + + String certNum = getSeqNumber(); // 요청번호 ( 본인인증 요청시 중복되지 않게 생성해야함. (예-시퀀스번호) ) + String date = getNow(); // 요청일시 + String certMet = "M"; // 본인인증방법 + String name = ""; // 성명 + String phoneNo = ""; // 휴대폰번호 + String phoneCorp = ""; // 이동통신사 + String birthDay = ""; // 생년월일 + String gender = ""; // 성별 + String nation = ""; // 내외국인 구분 + String plusInfo = ""; // 추가DATA정보 + String extendVar = "0000000000000000"; // 확장변수 + //End-tr_cert 데이터 변수 선언 --------------------------------------------------------------- + + plusInfo = actionType; + + + String tr_add = "N"; // IFrame사용여부 + + + //01. 한국모바일인증(주) 암호화 모듈 선언 + com.icert.comm.secu.IcertSecuManager seed = new com.icert.comm.secu.IcertSecuManager(); + + //02. 1차 암호화 (tr_cert 데이터변수 조합 후 암호화) + String enc_tr_cert = ""; + tr_cert = cpId + "/" + urlCode + "/" + certNum + "/" + date + "/" + certMet + "/" + birthDay + "/" + gender + "/" + name + "/" + phoneNo + "/" + phoneCorp + "/" + nation + "/" + plusInfo + "/" + extendVar; + enc_tr_cert = seed.getEnc(tr_cert, ""); + + //03. 1차 암호화 데이터에 대한 위변조 검증값 생성 (HMAC) + String hmacMsg = ""; + hmacMsg = seed.getMsg(enc_tr_cert); + + //04. 2차 암호화 (1차 암호화 데이터, HMAC 데이터, extendVar 조합 후 암호화) + tr_cert = seed.getEnc(enc_tr_cert + "/" + hmacMsg + "/" + extendVar, ""); + + + return tr_cert; + } + + @PublicAccess + @GetMapping(value = {"/extra/cert"}) + public String cert(Model model, HttpServletRequest request) { + + String actionType = RequestUtils.getString(request, "actionType"); + + String trCertData = getTrCertData(actionType); + String trUrl = laneduProperties.getBaseSiteUrl() + "/extra/cert/result"; // 본인인증서비스 결과수신 POPUP URL + + model.addAttribute("tr_cert", trCertData); + model.addAttribute("tr_url", trUrl); + model.addAttribute("tr_add", "N"); + + return "extra/cert"; + } + + private Boolean paramChk(String patn, String param) { + Pattern pattern = Pattern.compile(patn); + Matcher matcher = pattern.matcher(param); + return matcher.matches(); + } + + private ResultCert getTrCertData(String rec_cert, String k_certNum, String clientIp) { + + // 파라미터 유효성 검증 + if (rec_cert.length() == 0 || k_certNum.length() == 0) { + return ResultCert.fail("[오류] 결과값 비정상"); + } + + // 변수선언 -------------------------------------------------------------------------------------------------------- + //String rec_cert = ""; // 결과수신DATA + + //String k_certNum = ""; // 파라미터로 수신한 요청번호 + String certNum = ""; // 요청번호 + String date = ""; // 요청일시 + String CI = ""; // 연계정보(CI) + String DI = ""; // 중복가입확인정보(DI) + String phoneNo = ""; // 휴대폰번호 + String phoneCorp = ""; // 이동통신사 + String birthDay = ""; // 생년월일 + String gender = ""; // 성별 + String nation = ""; // 내국인 + String name = ""; // 성명 + String M_name = ""; // 미성년자 성명 + String M_birthDay = ""; // 미성년자 생년월일 + String M_Gender = ""; // 미성년자 성별 + String M_nation = ""; // 미성년자 내외국인 + String result = ""; // 결과값 + + String certMet = ""; // 인증방법 + String ip = ""; // ip주소 + String plusInfo = ""; + + String encPara = ""; + String encMsg1 = ""; + String encMsg2 = ""; + String msgChk = ""; + //----------------------------------------------------------------------------------------------------------------- + + + //01. 암호화 모듈 (jar) Loading + com.icert.comm.secu.IcertSecuManager seed = new com.icert.comm.secu.IcertSecuManager(); + + //02. 1차 복호화 + //수신된 certNum를 이용하여 복호화 + rec_cert = seed.getDec(rec_cert, k_certNum); + + //03. 1차 파싱 + int inf1 = rec_cert.indexOf("/", 0); + int inf2 = rec_cert.indexOf("/", inf1 + 1); + + encPara = rec_cert.substring(0, inf1); //암호화된 통합 파라미터 + encMsg1 = rec_cert.substring(inf1 + 1, inf2); //암호화된 통합 파라미터의 Hash값 + + //04. 위변조 검증 + encMsg2 = seed.getMsg(encPara); + + if (encMsg2.equals(encMsg1)) { + msgChk = "Y"; + } + + if (msgChk.equals("N")) { + //alert("비정상적인 접근입니다.!!<%=msgChk%>"); + return ResultCert.fail("비정상적인 접근입니다."); + } + + + //05. 2차 복호화 + rec_cert = seed.getDec(encPara, k_certNum); + + System.out.println("##########################################"); + System.out.println(rec_cert); + + //06. 2차 파싱 + int info1 = rec_cert.indexOf("/", 0); + int info2 = rec_cert.indexOf("/", info1 + 1); + int info3 = rec_cert.indexOf("/", info2 + 1); + int info4 = rec_cert.indexOf("/", info3 + 1); + int info5 = rec_cert.indexOf("/", info4 + 1); + int info6 = rec_cert.indexOf("/", info5 + 1); + int info7 = rec_cert.indexOf("/", info6 + 1); + int info8 = rec_cert.indexOf("/", info7 + 1); + int info9 = rec_cert.indexOf("/", info8 + 1); + int info10 = rec_cert.indexOf("/", info9 + 1); + int info11 = rec_cert.indexOf("/", info10 + 1); + int info12 = rec_cert.indexOf("/", info11 + 1); + int info13 = rec_cert.indexOf("/", info12 + 1); + int info14 = rec_cert.indexOf("/", info13 + 1); + int info15 = rec_cert.indexOf("/", info14 + 1); + int info16 = rec_cert.indexOf("/", info15 + 1); + int info17 = rec_cert.indexOf("/", info16 + 1); + int info18 = rec_cert.indexOf("/", info17 + 1); + + certNum = rec_cert.substring(0, info1); + date = rec_cert.substring(info1 + 1, info2); + CI = rec_cert.substring(info2 + 1, info3); + phoneNo = rec_cert.substring(info3 + 1, info4); + phoneCorp = rec_cert.substring(info4 + 1, info5); + birthDay = rec_cert.substring(info5 + 1, info6); + gender = rec_cert.substring(info6 + 1, info7); + nation = rec_cert.substring(info7 + 1, info8); + name = rec_cert.substring(info8 + 1, info9); + result = rec_cert.substring(info9 + 1, info10); + certMet = rec_cert.substring(info10 + 1, info11); + ip = rec_cert.substring(info11 + 1, info12); + M_name = rec_cert.substring(info12 + 1, info13); + M_birthDay = rec_cert.substring(info13 + 1, info14); + M_Gender = rec_cert.substring(info14 + 1, info15); + M_nation = rec_cert.substring(info15 + 1, info16); + plusInfo = rec_cert.substring(info16 + 1, info17); + DI = rec_cert.substring(info17 + 1, info18); + + //07. CI, DI 복호화 + CI = seed.getDec(CI, k_certNum); + DI = seed.getDec(DI, k_certNum); + + + // 파라미터 유효성 검증 -------------------------------------------- + boolean b = true; + String regex = ""; + + if (certNum.length() == 0 || certNum.length() > 40) { + return ResultCert.fail("[오류] 요청번호 비정상"); + } + + regex = "[0-9]*"; + if (date.length() != 14 || !paramChk(regex, date)) { + return ResultCert.fail("[오류] 요청일시 비정상"); + } + + regex = "[A-Z]*"; + if (certMet.length() != 1 || !paramChk(regex, certMet)) { + return ResultCert.fail("[오류] 본인인증방법 비정상"); + } + + + regex = "[0-9]*"; + if ((phoneNo.length() != 10 && phoneNo.length() != 11) || !paramChk(regex, phoneNo)) { + return ResultCert.fail("[오류] 휴대폰번호 비정상"); + } + + regex = "[A-Z]*"; + if (phoneCorp.length() != 3 || !paramChk(regex, phoneCorp)) { + return ResultCert.fail("[오류] 이동통신사 비정상"); + } + + regex = "[0-9]*"; + if (birthDay.length() != 8 || !paramChk(regex, birthDay)) { + return ResultCert.fail("[오류] 생년월일 비정상"); + } + + regex = "[0-9]*"; + if (gender.length() != 1 || !paramChk(regex, gender)) { + return ResultCert.fail("[오류] 성별 비정상"); + } + + regex = "[0-9]*"; + if (nation.length() != 1 || !paramChk(regex, nation)) { + return ResultCert.fail("[오류] 내/외국인 비정상"); + } + + regex = "[\\sA-Za-z가-�R.,-]*"; + if (name.length() > 60 || !paramChk(regex, name)) { + return ResultCert.fail("[오류] 성명 비정상"); + } + + regex = "[A-Z]*"; + if (result.length() != 1 || !paramChk(regex, result)) { + return ResultCert.fail("[오류] 결과값 비정상"); + } + + regex = "[\\sA-Za-z가-?.,-]*"; + if (M_name.length() != 0) { + if (M_name.length() > 60 || !paramChk(regex, M_name)) { + return ResultCert.fail("[오류] 미성년자 성명 비정상"); + } + } + + regex = "[0-9]*"; + if (M_birthDay.length() != 0) { + if (M_birthDay.length() != 8 || !paramChk(regex, M_birthDay)) { + return ResultCert.fail("[오류] 미성년자 생년월일 비정상"); + } + } + + regex = "[0-9]*"; + if (M_Gender.length() != 0) { + if (M_Gender.length() != 1 || !paramChk(regex, M_Gender)) { + return ResultCert.fail("[오류] 미성년자 성별 비정상"); + } + } + + regex = "[0-9]*"; + if (M_nation.length() != 0) { + if (M_nation.length() != 1 || !paramChk(regex, M_nation)) { + return ResultCert.fail("[오류] 미성년자 내/외국인 비정상"); + } + } + // End 파라미터 유효성 검증 -------------------------------------------- + + + // Start - 수신내역 유효성 검증(사설망의 사설 IP로 인해 미사용, 공용망의 경우 확인 후 사용) *********************/ + // 1. date 값 검증 + SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMddHHmmss", Locale.KOREAN); // 현재 서버 시각 구하기 + String strCurrentTime = formatter.format(new Date()); + + + try { + Date toDate = formatter.parse(strCurrentTime); + Date fromDate = formatter.parse(date); + long timediff = toDate.getTime() - fromDate.getTime(); + + if (timediff < -30 * 60 * 1000 || 30 * 60 * 100 < timediff) { + //return ResultCert.fail("[오류] 비정상적인 접근입니다. (요청시간경과)"); + } + + } catch (ParseException e) { + //e.printStackTrace(); + return ResultCert.fail("[오류] 비정상적인 접근입니다. (요청시간경과)-2"); + } + + // 2. ip 값 검증 + String client_ip = clientIp;//request.getHeader("HTTP_X_FORWARDED_FOR"); // 사용자IP 구하기 + /* + if ( client_ip != null ){ + if( client_ip.indexOf(",") != -1 ) + client_ip = client_ip.substring(0,client_ip.indexOf(",")); + } + if ( client_ip==null || client_ip.length()==0 ){ + client_ip = request.getRemoteAddr(); + } + */ + + /* + // 전화하니까 IP체크 하지 않아도 된다네 ㅡㅡ;; + if( !client_ip.equals(ip) ){ + return ResultCert.fail("[오류] 비정상적인 접근입니다. (IP불일치)"); + } + */ + + + ResultCert rValue = ResultCert.success(); + rValue.setCertNum(certNum); + rValue.setDate(date); + rValue.setCI(CI); + rValue.setPhoneNo(phoneNo); + rValue.setPhoneCorp(phoneCorp); + rValue.setBirthDay(birthDay); + rValue.setGender(gender); + rValue.setNation(nation); + rValue.setName(name); + rValue.setResult(result); + rValue.setCertMet(certMet); + rValue.setIp(ip); + rValue.setM_name(M_name); + rValue.setM_birthDay(M_birthDay); + rValue.setM_Gender(M_Gender); + rValue.setM_nation(M_nation); + rValue.setPlusInfo(plusInfo); + rValue.setDI(DI); + + rValue.setSuccess(true); + + return rValue; + } + + //http://lanedu.aircode.kr/extra/cert/result + //http://localhost:8081/extra/cert/result + @PublicAccess + @RequestMapping("/extra/cert/result") + public String certResult(Model model, HttpServletRequest request, HttpServletResponse response, HttpSession session) { + + String rec_cert = ""; // 결과값(암호화) + String certNum = ""; // certNum + + rec_cert = RequestUtils.getString(request, "rec_cert").trim(); + certNum = RequestUtils.getString(request, "certNum").trim(); + + ResultCert resultCert = null; + try { + resultCert = getTrCertData(rec_cert, certNum, RequestUtils.getClientIP(request)); + } catch (Exception e) { + log.info(e.getMessage()); + resultCert = ResultCert.fail(e.getMessage()); + } + + //02-2033-8565 + /* + resultCert.setSuccess(true); + resultCert.setPhoneNo("01096128903"); + resultCert.setBirthDay("19760820"); + resultCert.setName("박규태"); + */ + + if ("FIND_UID".equals(resultCert.getPlusInfo())) { + + //인증한 핸드폰에 대한 정보가 존재하는지 확인 후 처리 +// if (!userService.existPhone(resultCert.getPhoneNo())) { +// resultCert = ResultCert.fail("가입된 전화번호가 아닙니다."); +// model.addAttribute("resultCert", resultCert); +// return "extra/cert_result"; +// } + + } + + CertSessionUtils.setCert(session, resultCert); + + //ResultCert( + // success=true, + // errorMessage=null, + // encMsg1=null, + // encMsg2=null, + // certNum=2021070110295605344, + // date=20210701102956, + // CI=oKnuCufcXakGshtAl37Fxnl8UrbQuPFlC6UoJMhqZo/f2MzZcdOKeTdNyluNqiUxRsj27/E4QobkAIyxtz+ASw==, + // DI=MC0GCCqGSIb3DQIJAyEAas6UAn1woyuHzcEY7MVDMCQcR0aO8cXjfpEnCjDpCDE=, + // phoneNo=01096128901, + // phoneCorp=LGT, + // birthDay=19760820, + // nation=0, + // gender=0, + // name=박규태, + // result=Y, + // certMet=M, + // ip=61.74.252.104, + // M_name=, + // M_birthDay=, + // M_Gender=, + // M_nation=, + // plusInfo=, + // rec_cert=null + // ) + + System.out.println("##################################"); + System.out.println(resultCert.toString()); + + + model.addAttribute("resultCert", resultCert); + + return "extra/cert_result"; + } + + +} diff --git a/src/main/java/com/ns/mobile/website/web/controller/extra/ResultCert.java b/src/main/java/com/ns/mobile/website/web/controller/extra/ResultCert.java new file mode 100644 index 0000000..3acf147 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/web/controller/extra/ResultCert.java @@ -0,0 +1,62 @@ +package com.ns.mobile.website.web.controller.extra; + +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; +import lombok.extern.slf4j.Slf4j; + +import java.io.Serializable; + +@Slf4j +@Data +@SuperBuilder +public class ResultCert implements Serializable { + + private static final long serialVersionUID = -3895896097653379454L; + + private boolean success; + private String errorMessage; + + String encMsg1;//위,변조여부1 + String encMsg2;//위,변조여부2 + String certNum;//요청번호 + String date;//요청일시 + String CI;//연계정보(CI) + String DI;//중복가입확인정보(DI) + String phoneNo;//휴대폰번호 + String phoneCorp;//이동통신사 + String birthDay;//생년월일 + String nation;//내국인 + String gender;//성별 + + String name;//성명 + String result;//결과값 + String certMet;//인증방법 + String ip;//ip주소 + String M_name;//미성년자 성명 + String M_birthDay;//미성년자 생년월일 + String M_Gender;//미성년자 성별 + String M_nation;//미성년자 내외국인 + String plusInfo;//추가DATA정보 + String rec_cert; + + public static ResultCert fail(String errorMessage) { + return ResultCert.builder() + .success(false) + .errorMessage(errorMessage) + .build(); + } + + public static ResultCert success() { + return ResultCert.builder() + .success(true) + .build(); + } + + + public boolean isFail() { + return !success; + } + +} diff --git a/src/main/java/com/ns/mobile/website/web/controller/home/HomeController.java b/src/main/java/com/ns/mobile/website/web/controller/home/HomeController.java new file mode 100644 index 0000000..ce3eea7 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/web/controller/home/HomeController.java @@ -0,0 +1,82 @@ +package com.ns.mobile.website.web.controller.home; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpSession; + +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; + +import com.ns.mobile.website.biz.service.PhoneService; +import com.ns.mobile.website.web.auth.PublicAccess; +import com.ns.mobile.website.web.controller.BaseController; +import com.ns.mobile.website.web.properties.LaneduProperties; + +import lombok.RequiredArgsConstructor; + +@RequiredArgsConstructor +@Controller +public class HomeController extends BaseController { + + private final LaneduProperties laneduProperties; + + @PublicAccess + @RequestMapping(value = {"{siteId}/home"}) + String home(Model model, HttpServletRequest request, HttpSession session + , @PathVariable(required = false) String siteId) { + + model.addAttribute("version", laneduProperties.getVersion()); + model.addAttribute("siteId",siteId); + + return "home/index"; + } + + @PublicAccess + @RequestMapping(value = {"{siteId}/home/phone/detail/{phoneId}"}) + String detail(Model model, HttpServletRequest request, HttpSession session, @PathVariable(required = false) String siteId + , @PathVariable(required = true) String phoneId) { + + model.addAttribute("phoneId", phoneId); + model.addAttribute("siteId",siteId); + return "home/detail"; + } + + @PublicAccess + @RequestMapping(value = {"/home/sell/list"}) + String sellUser(Model model, HttpServletRequest request, HttpSession session) { + + + return "home/sell/list"; + } + + @PublicAccess + @RequestMapping(value = {"/home/sell/add"}) + String sellUserAdd(Model model, HttpServletRequest request, HttpSession session) { + + + return "home/sell/add"; + } + + + +} + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/com/ns/mobile/website/web/controller/home/api/ApiHomeController.java b/src/main/java/com/ns/mobile/website/web/controller/home/api/ApiHomeController.java new file mode 100644 index 0000000..4a29d3e --- /dev/null +++ b/src/main/java/com/ns/mobile/website/web/controller/home/api/ApiHomeController.java @@ -0,0 +1,99 @@ +package com.ns.mobile.website.web.controller.home.api; + +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpSession; + +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.multipart.MultipartFile; + +import com.ns.mobile.website.biz.dto.FileUploadDto; +import com.ns.mobile.website.biz.dto.PhoneDetailDto; +import com.ns.mobile.website.biz.dto.PhoneDto; +import com.ns.mobile.website.biz.dto.SellUserDto; +import com.ns.mobile.website.biz.entity.FileUpload; +import com.ns.mobile.website.biz.entity.Phone; +import com.ns.mobile.website.biz.entity.SellUser; +import com.ns.mobile.website.biz.model.ResponseData; +import com.ns.mobile.website.biz.model.ResponseResult; +import com.ns.mobile.website.biz.model.SearchData; +import com.ns.mobile.website.biz.model.UploadFileModel; +import com.ns.mobile.website.biz.service.FileService; +import com.ns.mobile.website.biz.service.PhoneService; +import com.ns.mobile.website.biz.service.SellService; +import com.ns.mobile.website.common.util.ExcelUtil; +import com.ns.mobile.website.web.auth.PublicAccess; +import com.ns.mobile.website.web.controller.BaseController; + +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; + +@Slf4j +@RequiredArgsConstructor +@RestController +public class ApiHomeController extends BaseController { + + private final PhoneService phoneService; + private final SellService sellService; + private final FileService fileService; + + @PublicAccess + @PostMapping("/api/phone/list.api") + public ResponseEntity list(@RequestBody Phone parameter,HttpServletRequest request, HttpSession session){ + List result = phoneService.selectList(parameter); + return ResponseResult.success(result); + } + + @PublicAccess + @PostMapping("/api/phone/detail.api") + public ResponseEntity detail(@RequestBody Phone parameter,HttpServletRequest request, HttpSession session){ + PhoneDetailDto result = phoneService.select(parameter); + return ResponseResult.success(result); + } + + @PublicAccess + @PostMapping("/api/sell/list.api") + public ResponseEntity sellList(@RequestBody SearchData parameter,HttpServletRequest request, HttpSession session){ + List result = sellService.selectList(parameter); + return ResponseResult.success(result); + } + + @PublicAccess + @PostMapping("/api/sell/add/list.api") + public ResponseEntity addList(@RequestBody SearchData parameter,HttpServletRequest request, HttpSession session){ + List result = sellService.selectAddList(parameter); + return ResponseResult.success(result); + } + @PublicAccess + @PostMapping("/api/sell/del/upload.api") + public ResponseData delFileUpload(@RequestBody FileUpload parameter,HttpServletRequest request, HttpSession session){ + if(!sellService.delFileUpload(parameter)) { + return ResponseData.fail("실패"); + } + return ResponseData.success(); + } + + @ResponseBody + @PublicAccess + @PostMapping(value = {"/api/sell/add.api"}) + public ResponseData apiAttachExcelFile(MultipartFile attachFile) { + + UploadFileModel uploadFile = fileService.upload(attachFile); + if (!uploadFile.isResult()) { + return ResponseData.fail(uploadFile.getMessage()); + } + Map account = ExcelUtil.excelToAccountList(uploadFile.getLocalPath()); + List excelDataList = ExcelUtil.excelToSellList(uploadFile.getLocalPath(), account); + FileUpload fileUpload = UploadFileModel.of(uploadFile); + if(!sellService.saveList(fileUpload, excelDataList)) { + return ResponseData.fail("실패"); + } + return ResponseData.success(excelDataList); + } +} diff --git a/src/main/java/com/ns/mobile/website/web/controller/home/api/ApiUserController.java b/src/main/java/com/ns/mobile/website/web/controller/home/api/ApiUserController.java new file mode 100644 index 0000000..2f01f38 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/web/controller/home/api/ApiUserController.java @@ -0,0 +1,55 @@ +package com.ns.mobile.website.web.controller.home.api; + +import org.springframework.web.bind.annotation.RestController; + +import com.ns.mobile.website.web.controller.BaseController; + +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; + +@Slf4j +@RequiredArgsConstructor +@RestController +public class ApiUserController extends BaseController { + +// @PublicAccess +// @PostMapping("/api/home/user/join.api") +// public ResponseEntity join(@RequestBody @Valid UserJoinInput parameter, Errors errors, HttpServletRequest request, HttpSession session) { +// +// if (errors.hasErrors()) { +// for (ObjectError error : errors.getAllErrors()) { +// return ResponseResult.fail(error.getDefaultMessage()); +// } +// } +// +// String certPhone = CertSessionUtils.getCertPhone(session); +// if (certPhone == null || certPhone.length() < 1) { +// return ResponseResult.fail("휴대폰 인증 정보가 존재하지 않습니다."); +// } +// +// parameter.setPhone(certPhone); +// +// try { +// String password = parameter.getPassword(); +// PrivateKey privateKey = (PrivateKey) session.getAttribute(RSASecureUtils.RSA_WEB_KEY); +// parameter.setPassword(RSASecureUtils.decryptRsa(privateKey, password)); +// } catch (Exception e) { +// return ResponseResult.fail("데이터(비밀번호) 처리중 문제가 발생하였습니다."); +// } +// +// //site_type 설정 +// parameter.setSiteType(SiteUtils.getSiteType(request)); +// //site_id는 사이트에서 가입되지 않기떄문에 가입시 올라오지 않음 +// +// try { +// ServiceResult result = userService.join(parameter); +// return ResponseResult.result(result); +// } catch (Exception e) { +// if (e.getMessage().contains("ConstraintViolationException")) { +// return ResponseResult.fail("이미 가입된 아이디 입니다."); +// } +// return ResponseResult.fail("데이터 처리중 문제가 발생하였습니다."); +// } +// } + +} diff --git a/src/main/java/com/ns/mobile/website/web/filter/CookieAttributeFilter.java b/src/main/java/com/ns/mobile/website/web/filter/CookieAttributeFilter.java new file mode 100644 index 0000000..db118f5 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/web/filter/CookieAttributeFilter.java @@ -0,0 +1,46 @@ +package com.ns.mobile.website.web.filter; + +import org.springframework.http.HttpHeaders; +import org.springframework.integration.json.JsonPathUtils; + +import javax.servlet.*; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.Collection; + +public class CookieAttributeFilter implements Filter { + + @Override + public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { + + //System.out.println("!FILTER!"); + + HttpServletResponse httpServletResponse = (HttpServletResponse) response; + chain.doFilter(request, response); + addSameSite(httpServletResponse, "None"); + + } + + @Override + public void init(FilterConfig filterConfig) throws ServletException { + + } + + @Override + public void destroy() { + + } + + private void addSameSite(HttpServletResponse response, String sameSite) { + Collection headers = response.getHeaders(HttpHeaders.SET_COOKIE); + boolean firstHeader = true; + for (String header : headers) { + if (firstHeader) { + response.setHeader(HttpHeaders.SET_COOKIE, String.format("%s; Secure; %s", header, "SameSite=" + sameSite)); + firstHeader = false; + continue; + } + response.addHeader(HttpHeaders.SET_COOKIE, String.format("%s; Secure; %s", header, "SameSite=" + sameSite)); + } + } +} diff --git a/src/main/java/com/ns/mobile/website/web/handler/SiteExceptionHandler.java b/src/main/java/com/ns/mobile/website/web/handler/SiteExceptionHandler.java new file mode 100644 index 0000000..4bcdfb7 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/web/handler/SiteExceptionHandler.java @@ -0,0 +1,118 @@ +package com.ns.mobile.website.web.handler; + + +import com.ns.mobile.website.biz.exception.*; +import com.ns.mobile.website.biz.model.ResponseResult; +import com.ns.mobile.website.common.Res; +import com.ns.mobile.website.common.util.RequestUtils; +import com.ns.mobile.website.common.util.ResponseUtils; +import lombok.SneakyThrows; +import lombok.extern.slf4j.Slf4j; +import org.springframework.http.ResponseEntity; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.ExceptionHandler; +import org.springframework.web.bind.annotation.RestControllerAdvice; +import util.SU; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +@Slf4j +@RestControllerAdvice +public class SiteExceptionHandler { + + @SneakyThrows + @ExceptionHandler(value = {BizException.class}) + public void bizExcetpionHandler(CommonException exception, Model model, HttpServletRequest request, HttpServletResponse response) { + + log.info(exception.getMessage()); + model.addAttribute("exception", exception); + + if (RequestUtils.isApiCall(request)) { + ResponseUtils.responseJsonFailMessage(response, "", exception.getMessage()); + } + + ResponseUtils.htmlAlertAndHistoryBack(response, exception.getMessage()); + } + + @SneakyThrows + @ExceptionHandler(value = {NoExistsBizException.class}) + public void notExistsBizExceptionHandler(CommonException exception, Model model, HttpServletRequest request, HttpServletResponse response) { + + String message = exception.getMessage(); + if (SU.isEmpty(message)) { + message = "존재하지 않는 회사입니다."; + } + + log.info(exception.getMessage()); + model.addAttribute("exception", exception); + + if (RequestUtils.isApiCall(request)) { + ResponseUtils.responseJsonFailMessage(response, "", message); + } + + ResponseUtils.htmlAlertAndLocation(request, response, message, "/home"); + } + + @SneakyThrows + @ExceptionHandler(value = {BizApiException.class}) + public ResponseEntity apiExcetpionHandler(BizApiException exception, HttpServletRequest request, HttpServletResponse response) { + + log.info(exception.getMessage()); + + return ResponseResult.fail(exception.getMessage()); + } + + @SneakyThrows + @ExceptionHandler(value = {NotLoginException.class}) + public void notLoginExcetpionHandler(NotLoginException exception, HttpServletRequest request, HttpServletResponse response) { + + if (RequestUtils.isApiCall(request)) { + ResponseUtils.responseJsonFailMessage(response, "CMD_GOTO_LOGIN", NotLoginException.MSG_NOT_LOGIN); + } + + ResponseUtils.htmlAlertAndLocation(request, response, NotLoginException.MSG_NOT_LOGIN, Res.URL_LOGIN_PAGE); + } + + @SneakyThrows + @ExceptionHandler(value = {NotSelectedCafeException.class}) + public void notSelectedCafeExcetpionHandler(NotSelectedCafeException exception, HttpServletRequest request, HttpServletResponse response) { + + if (RequestUtils.isApiCall(request)) { + ResponseUtils.responseJsonFailMessage(response, "", NotSelectedCafeException.MSG_NOT_SELECTED_CAFE); + } + + ResponseUtils.htmlAlertAndLocation(request, response, NotSelectedCafeException.MSG_NOT_SELECTED_CAFE, Res.URL_HOME); + } + + @SneakyThrows + @ExceptionHandler(value = {DuplicateLoginException.class}) + public void duplicateLoginExceptionHandler(DuplicateLoginException exception, HttpServletRequest request, HttpServletResponse response) { + + if (RequestUtils.isApiCall(request)) { + ResponseUtils.responseJsonFailMessage(response, "", NotSelectedCafeException.MSG_DUBPLICATE_LOGIN); + } + + ResponseUtils.htmlAlertAndLocation(request, response, NotSelectedCafeException.MSG_DUBPLICATE_LOGIN, Res.URL_HOME); + } + +} + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/com/ns/mobile/website/web/interceptor/FrontInterceptor.java b/src/main/java/com/ns/mobile/website/web/interceptor/FrontInterceptor.java new file mode 100644 index 0000000..7191302 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/web/interceptor/FrontInterceptor.java @@ -0,0 +1,73 @@ +package com.ns.mobile.website.web.interceptor; + +import java.lang.reflect.Method; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.core.env.Environment; +import org.springframework.web.servlet.HandlerInterceptor; + +import com.ns.mobile.website.biz.exception.DuplicateLoginException; +import com.ns.mobile.website.biz.exception.NotLoginException; +import com.ns.mobile.website.common.util.AnnotationUtils; +import com.ns.mobile.website.common.util.DateUtils; +import com.ns.mobile.website.common.util.InterceptorUtils; +import com.ns.mobile.website.common.util.RequestUtils; + +import lombok.extern.slf4j.Slf4j; + + +@Slf4j +public class FrontInterceptor implements HandlerInterceptor { + + @Autowired + private Environment environment; + + private String currentProfile() { + String[] profiles = environment.getActiveProfiles(); + if (profiles.length == 0) { + profiles = environment.getDefaultProfiles(); + } + return profiles[0]; + } + + private void initAttr(HttpServletRequest request) { + request.setAttribute("activeProfile", currentProfile()); + request.setAttribute("timestamp", DateUtils.getTimeStamp()); + } + + private boolean checkLogin(HttpServletRequest request, HttpServletResponse response, Object handler) { + + String url = RequestUtils.getUri(request); + if (url.contains("/res/front/") || url.contains("/error")) { + return true; + } + + Method executeMethod = InterceptorUtils.getExecuteMethod(handler); + if (executeMethod == null) { + return false; + } + + boolean existGuestAccess = AnnotationUtils.existGuestAccess(executeMethod); + if (existGuestAccess) { + return true; + } + + return false; + } + + + @Override + public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { + initAttr(request); + + if (!checkLogin(request, response, handler)) { + throw new NotLoginException(); + } + + return true; + } + +} diff --git a/src/main/java/com/ns/mobile/website/web/properties/LaneduProperties.java b/src/main/java/com/ns/mobile/website/web/properties/LaneduProperties.java new file mode 100644 index 0000000..5f77b11 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/web/properties/LaneduProperties.java @@ -0,0 +1,62 @@ +package com.ns.mobile.website.web.properties; + +import lombok.Data; +import lombok.ToString; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.stereotype.Component; + +import java.util.List; + +@Component +@ConfigurationProperties("lanedu") +@ToString +@Data +public class LaneduProperties { + + private String encryptPassPhrase; + private String jasyptConfigPassword; + + private String baseSiteUrl; + private String baseB2bSiteUrl; + + private String phoneUrlCode; + private String version; + private String superpassword; + private String uploadFileExtension; + + private String ktapiServerUrl; + private String ktapiPortalBizid; + private String ktapiSecretKey; + private String ktapiServiceIp; + private String ktapiServiceDomain; + + private String wenApiUrl; + private String wenTransUrl; + private String wenPlayerUrl; + private String wenOpenapiUrl; + + private String quickLinkUrl; + private String b2bQuickLinkUrl; + private String vodLinkUrl; + private String vodReturnLinkUrl; + + private String smsServerUrl; + private String smsClientId; + private String smsServiceKey; + private String smsTelNum; + + private String mid; + private String mid2; + private String merchantKey; + private String smartroUrl; + private String returnSmartroUrl; + private String smartroBillUrl; + private String smartroCancelUrl; + private String billReturnSmartroUrl; + private String stopSmartroUrl; + private String sspMallId; + + private String smartroJsUrl; + private String smartroMjsUrl; + private List authPhones; +} diff --git a/src/main/java/com/ns/mobile/website/web/schedule/Scheduler.java b/src/main/java/com/ns/mobile/website/web/schedule/Scheduler.java new file mode 100644 index 0000000..14f5a50 --- /dev/null +++ b/src/main/java/com/ns/mobile/website/web/schedule/Scheduler.java @@ -0,0 +1,53 @@ +package com.ns.mobile.website.web.schedule; + + +import org.springframework.stereotype.Component; + +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; + +@Slf4j +@RequiredArgsConstructor +@Component +public class Scheduler { + + + //@Scheduled(cron = "0 0 0 * * ?") /** 매일 자정에 실행 **/ + //@Scheduled(cron = "0 * * * * ?") /** 매분 실행 **/ + //@Scheduled(cron = "0 0 4 * * *") + //@Scheduled(fixedDelay = 1000 * 60) + public void checkMail() { + + /* + log.info(StringUtils.LINE_BAR3); + log.info(LocalDateTime.now().toString()); + + List mailScheduleList = mailService.getSendList(); + if (mailScheduleList != null) { + for (MailSchedule x : mailScheduleList) { + ServiceResult result = mailComponent.sendMail(x.getFromEmail(), x.getFromUserName(), x.getToEmail(), x.getToUserName(), x.getTitle(), x.getContents()); + boolean result2 = mailService.setResult(x.getId(), result.isResult(), result.getMessage()); + } + } + */ + + } + + +} + + + + + + + + + + + + + + + + diff --git a/src/main/java/util/SU.java b/src/main/java/util/SU.java new file mode 100644 index 0000000..e1b6335 --- /dev/null +++ b/src/main/java/util/SU.java @@ -0,0 +1,9 @@ +package util; + +import com.ns.mobile.website.common.util.StringUtils; + +public class SU extends StringUtils { + +} + + diff --git a/src/main/resources/application-aircodeaws.yml b/src/main/resources/application-aircodeaws.yml new file mode 100644 index 0000000..1b6f6b4 --- /dev/null +++ b/src/main/resources/application-aircodeaws.yml @@ -0,0 +1,75 @@ +spring: + datasource: + driver-class-name: org.mariadb.jdbc.Driver + url: jdbc:mariadb://127.0.0.1:3306/phonessayo?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Seoul + username: kuhan + password: gnfkqhsh11 + + jasypt: + encryptor: + bean: jasyptStringEncryptor + + devtools: + livereload: + enabled: true + restart: + enabled: false + mail: + host: smtp.mailplug.co.kr + port: 465 + username: 'test@aircode.com' + password: '@aircode1234' + properties: + mail: + smtp: + starttls: + enable: true + auth: + true + socketFactory: + class: 'javax.net.ssl.SSLSocketFactory' + +logging: + file: + name: ./logs/spring.log + +file-url: + upload-path: /files + base-upload-location: /NAS/LANEDU/files + cms-upload-location: /NAS/LANEDU/files + +lanedu: + jasypt-config-password: aircode + encrypt-pass-phrase: aircode-lanedu + base-site-url: http://localhost:8080 + base-b2b-site-url: http://meets.localhost:8080 + phone-url-code: "005001" + ktapi-server-url: https://dev.api.kteduon.co.kr + ktapi-portal-bizid: kt_on_portal + ktapi-secret-key: 7bdb56a020dcf1661e47d00e89b7c71b9309c76746c4edccb01d06929524731d + ktapi-service-ip: 203.227.22.192 + ktapi-service-domain: "on" + wen-api-url: http://211.184.184.64:40801 + wen-trans-url: http://211.184.184.64:40801 + wen-player-url: http://211.184.184.64:40801 + wen-openapi-url: http://lanedu.aircode.kr + quick-link-url: http://localhost:8080/home/quick/quick-meeting + b2b-quick-link-url: http://meets.localhost:8080/home/vod/meeting + vod-link-url: http://localhost:8080/home/vod/meeting + vod-return-link-url: /home/vod/meeting/end + sms-server-url: https://api.apistore.co.kr/ppurio/2 + sms-client-id: aircode + sms-service-key: "MTQ4MjctMTYyNDQzNjc0MTcyNS04NDQzYWVkZS03YjlhLTRkYTctODNhZS1kZTdiOWExZGE3YjU=" + sms-tel-num: "15882918" + mid: "t_eduon01m" + mid2: "t_eduon02m" + merchant-key: "0/4GFsSd7ERVRGX9WHOzJ96GyeMTwvIaKSWUCKmN3fDklNRGw3CualCFoMPZaS99YiFGOuwtzTkrLo4bR4V+Ow==" + smartro-url: "https://tapproval.smartropay.co.kr/payment/approval/urlCallApproval.do" + smartro-bill-url: "https://tapproval.smartropay.co.kr/payment/approval/ssbbill.do" + smartro-cancel-url: "https://tapproval.smartropay.co.kr/payment/approval/cancel.do" + return-smartro-url: "http://localhost:8080/pay/phone?userId=" + stop-smartro-url: "http://localhost:8080/pay/stop" + bill-return-smartro-url: "http://localhost:8080/pay/bill?userId=" + ssp-mall-id: "SMTSSPAY0p" + smartro-js-url: "https://tpay.smartropay.co.kr/asset/js/SmartroPAY-1.0.min.js" + smartro-mjs-url: "https://tmpay.smartropay.co.kr/asset/js/SmartroPAY-1.0.min.js" \ No newline at end of file diff --git a/src/main/resources/application-local.yml b/src/main/resources/application-local.yml new file mode 100644 index 0000000..33adb85 --- /dev/null +++ b/src/main/resources/application-local.yml @@ -0,0 +1,75 @@ +spring: + datasource: + driver-class-name: org.mariadb.jdbc.Driver + url: jdbc:mariadb://119.70.122.80:13306/phonessayo?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Seoul + username: kuhan + password: Gnfkqhsh1! + + jasypt: + encryptor: + bean: jasyptStringEncryptor + + devtools: + livereload: + enabled: true + restart: + enabled: false + mail: + host: smtp.mailplug.co.kr + port: 465 + username: 'test@aircode.com' + password: '@aircode1234' + properties: + mail: + smtp: + starttls: + enable: true + auth: + true + socketFactory: + class: 'javax.net.ssl.SSLSocketFactory' + +logging: + file: + name: ./logs/spring.log + +file-url: + upload-path: /files + base-upload-location: /NAS/LANEDU/files + cms-upload-location: /NAS/LANEDU/files + +lanedu: + jasypt-config-password: aircode + encrypt-pass-phrase: aircode-lanedu + base-site-url: http://localhost:8080 + base-b2b-site-url: http://meets.localhost:8080 + phone-url-code: "005001" + ktapi-server-url: https://dev.api.kteduon.co.kr + ktapi-portal-bizid: kt_on_portal + ktapi-secret-key: 7bdb56a020dcf1661e47d00e89b7c71b9309c76746c4edccb01d06929524731d + ktapi-service-ip: 203.227.22.192 + ktapi-service-domain: "on" + wen-api-url: http://211.184.184.64:40801 + wen-trans-url: http://211.184.184.64:40801 + wen-player-url: http://211.184.184.64:40801 + wen-openapi-url: http://lanedu.aircode.kr + quick-link-url: http://localhost:8080/home/quick/quick-meeting + b2b-quick-link-url: http://meets.localhost:8080/home/vod/meeting + vod-link-url: http://localhost:8080/home/vod/meeting + vod-return-link-url: /home/vod/meeting/end + sms-server-url: https://api.apistore.co.kr/ppurio/2 + sms-client-id: aircode + sms-service-key: "MTQ4MjctMTYyNDQzNjc0MTcyNS04NDQzYWVkZS03YjlhLTRkYTctODNhZS1kZTdiOWExZGE3YjU=" + sms-tel-num: "15882918" + mid: "t_eduon01m" + mid2: "t_eduon02m" + merchant-key: "0/4GFsSd7ERVRGX9WHOzJ96GyeMTwvIaKSWUCKmN3fDklNRGw3CualCFoMPZaS99YiFGOuwtzTkrLo4bR4V+Ow==" + smartro-url: "https://tapproval.smartropay.co.kr/payment/approval/urlCallApproval.do" + smartro-bill-url: "https://tapproval.smartropay.co.kr/payment/approval/ssbbill.do" + smartro-cancel-url: "https://tapproval.smartropay.co.kr/payment/approval/cancel.do" + return-smartro-url: "http://localhost:8080/pay/phone?userId=" + stop-smartro-url: "http://localhost:8080/pay/stop" + bill-return-smartro-url: "http://localhost:8080/pay/bill?userId=" + ssp-mall-id: "SMTSSPAY0p" + smartro-js-url: "https://tpay.smartropay.co.kr/asset/js/SmartroPAY-1.0.min.js" + smartro-mjs-url: "https://tmpay.smartropay.co.kr/asset/js/SmartroPAY-1.0.min.js" \ No newline at end of file diff --git a/src/main/resources/application-prod.yml b/src/main/resources/application-prod.yml new file mode 100644 index 0000000..fa51b5e --- /dev/null +++ b/src/main/resources/application-prod.yml @@ -0,0 +1,67 @@ +spring: + datasource: + driver-class-name: org.mariadb.jdbc.Driver + url: jdbc:mariadb://10.220.204.165:3306/lanedu?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Seoul + username: ENC(3E6VhQhWVlety97QZ8IEsA==) + password: ENC(LUi5hvjnTzsdln8jSCFzapzOTGqBewQ/) + + jasypt: + encryptor: + bean: jasyptStringEncryptor + + mail: + host: mail.kteduon.co.kr + port: 25 + username: ontactedu@kteduon.co.kr + password: lanedu2021 + properties: + mail: + smtp: + starttls: + enable: false + auth: + false +logging: + file: + name: /tc_log/spring.log + +file-url: + upload-path: /files + base-upload-location: /NAS/LANEDU/files + cms-upload-location: /NAS/LANEDU/files + +lanedu: + jasypt-config-password: aircode + encrypt-pass-phrase: aircode-lanedu + base-site-url: https://www.kteduon.co.kr + base-b2b-site-url: https://meets.kteduon.co.kr + phone-url-code: "009001" #"006001" -> https://kteduon.co.kr + ktapi-server-url: https://api.eduon.kteduon.co.kr + ktapi-portal-bizid: kt_on_portal + ktapi-secret-key: 8fefe692f690a3173176ecdff4318225afaeb97fdd6f60c866ed823d59221665 + ktapi-service-ip: 147.6.1.54 + ktapi-service-domain: "on" + wen-api-url: https://weand-media.ontactedu.co.kr + wen-trans-url: https://weand-trans.ontactedu.co.kr + wen-player-url: https://weand-stream.ontactedu.co.kr + wen-openapi-url: https://www.kteduon.co.kr + quick-link-url: https://www.kteduon.co.kr/home/quick/quick-meeting + b2b-quick-link-url: https://meets.kteduon.co.kr/home/vod/meeting + vod-link-url: https://www.kteduon.co.kr/home/vod/meeting + vod-return-link-url: /home/vod/meeting/end + sms-server-url: https://api.apistore.co.kr/ppurio/2 + sms-client-id: aircode + sms-service-key: "MTQ4MjctMTYyNDQzNjc0MTcyNS04NDQzYWVkZS03YjlhLTRkYTctODNhZS1kZTdiOWExZGE3YjU=" + sms-tel-num: "15882918" + mid: "t_eduon01m" + mid2: "t_eduon02m" + merchant-key: "0/4GFsSd7ERVRGX9WHOzJ96GyeMTwvIaKSWUCKmN3fDklNRGw3CualCFoMPZaS99YiFGOuwtzTkrLo4bR4V+Ow==" + smartroUrl: "https://tapproval.smartropay.co.kr/payment/approval/urlCallApproval.do" + smartro-bill-url: "https://tapproval.smartropay.co.kr/payment/approval/ssbbill.do" + smartro-cancel-url: "https://tapproval.smartropay.co.kr/payment/approval/cancel.do" + return-smartro-url: "https://www.kteduon.co.kr/pay/phone?userId=" + stop-smartro-url: "https://www.kteduon.co.kr/pay/stop" + bill-return-smartro-url: "https://www.kteduon.co.kr/pay/bill?userId=" + ssp-mall-id: "SMTSSPAY0p" + smartro-js-url: "https://pay.smartropay.co.kr/asset/js/SmartroPAY-1.0.min.js" + smartro-mjs-url: "https://mpay.smartropay.co.kr/asset/js/SmartroPAY-1.0.min.js" \ No newline at end of file diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml new file mode 100644 index 0000000..4881821 --- /dev/null +++ b/src/main/resources/application.yml @@ -0,0 +1,47 @@ +spring: + profiles: + active: local + # active: aircodeaws + # active: prod + # active: local + + jpa: + hibernate: + ddl-auto: none + generate-ddl: false + show-sql: true + properties: + hibernate: + format-sql: true + + session: + jdbc: + initialize-schema: always + + mvc: + view: + prefix: /WEB-INF/view/ + suffix: .jsp + + servlet: + multipart: + max-file-size: 1GB + max-request-size: 1GB + +mybatis: + mapper-locations: mybatis/**/*.xml + configuration: + map-underscore-to-camel-case: true + log-impl: org.apache.ibatis.logging.stdout.StdOutImpl +logging: + level: + root: info + + +lanedu: + version: "2022.05.27.001" + superpassword: aircode + upload-file-extension: ".pdf, .doc, .docx, .xls, .xlsx, .ppt, .pptx, .jpg, .jpeg, .png, .gif, .avi, .flv, .mpg, .mpeg, .mkv, .mov, .mp3, .mp4, .wav, .wma, .hwp" + authPhones: 01072276360,01073002291 + + \ No newline at end of file diff --git a/src/main/resources/lucy-xss-servlet-filter-rule.xml b/src/main/resources/lucy-xss-servlet-filter-rule.xml new file mode 100644 index 0000000..0791f58 --- /dev/null +++ b/src/main/resources/lucy-xss-servlet-filter-rule.xml @@ -0,0 +1,73 @@ + + + + + + xssPreventerDefender + com.navercorp.lucy.security.xss.servletfilter.defender.XssPreventerDefender + + + + + xssSaxFilterDefender + com.navercorp.lucy.security.xss.servletfilter.defender.XssSaxFilterDefender + + lucy-xss-sax.xml + false + + + + + + xssFilterDefender + com.navercorp.lucy.security.xss.servletfilter.defender.XssFilterDefender + + lucy-xss.xml + false + + + + + + + xssPreventerDefender + + + + + + + + + + + + + + + + /disableUrl1.do + + + + + /url1.do + + + + + + + + + /url2.do + + + + xssSaxFilterDefender + + + + + \ No newline at end of file diff --git a/src/main/resources/lucy-xss-superset-sax.xml b/src/main/resources/lucy-xss-superset-sax.xml new file mode 100644 index 0000000..79f1214 --- /dev/null +++ b/src/main/resources/lucy-xss-superset-sax.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/static/favicon.ico b/src/main/resources/static/favicon.ico new file mode 100644 index 0000000..8f6bc02 Binary files /dev/null and b/src/main/resources/static/favicon.ico differ diff --git a/src/main/resources/static/res/doc/adminhost-guide.pdf b/src/main/resources/static/res/doc/adminhost-guide.pdf new file mode 100644 index 0000000..6b13d54 Binary files /dev/null and b/src/main/resources/static/res/doc/adminhost-guide.pdf differ diff --git a/src/main/resources/static/res/doc/phone.xlsx b/src/main/resources/static/res/doc/phone.xlsx new file mode 100644 index 0000000..e27490c Binary files /dev/null and b/src/main/resources/static/res/doc/phone.xlsx differ diff --git a/src/main/resources/static/res/doc/user-guide.pdf b/src/main/resources/static/res/doc/user-guide.pdf new file mode 100644 index 0000000..7eba05f Binary files /dev/null and b/src/main/resources/static/res/doc/user-guide.pdf differ diff --git a/src/main/resources/static/res/doc/user.xlsx b/src/main/resources/static/res/doc/user.xlsx new file mode 100644 index 0000000..66de8c7 Binary files /dev/null and b/src/main/resources/static/res/doc/user.xlsx differ diff --git a/src/main/resources/static/res/front/home/_feWorksheet.min.css b/src/main/resources/static/res/front/home/_feWorksheet.min.css new file mode 100644 index 0000000..06fd62e --- /dev/null +++ b/src/main/resources/static/res/front/home/_feWorksheet.min.css @@ -0,0 +1,7 @@ +@charset "utf-8"; +/* + feWorksheet(Style) + Include: normalize.css v2.1.3 | MIT License | git.io/normalize + Version: 1.2 +*/ +article, aside, details, figcaption, figure, footer, header, hgroup, main, nav, section, summary{display: block}audio, canvas, video{display: inline-block}audio:not([controls]){display: none;height: 0;}[hidden], template{display: none}html{font-family: sans-serif;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;}body{margin: 0}a{background: transparent;text-decoration: none;}a:focus{outline: thin dotted}a:active, a:hover{outline: 0}h1{font-size: 2em;margin: 0.67em 0;}abbr[title]{border-bottom: 1px dotted}b, strong{font-weight: bold}dfn{font-style: italic}hr{-moz-box-sizing: content-box;box-sizing: content-box;height: 0;}mark{background: #ff0;color: #000;}code, kbd, pre, samp{font-family: monospace, serif;font-size: 1em;}pre{white-space: pre-wrap}q{quotes: "\201C" "\201D" "\2018" "\2019"}small{font-size: 80%}sub, sup{font-size: 75%;line-height: 0;position: relative;vertical-align: baseline;}sup{top: -0.5em}sub{bottom: -0.25em}img{border: 0}svg:not(:root){overflow: hidden}figure{margin: 0}fieldset{border: 1px solid #c0c0c0;margin: 0 2px;padding: 0.35em 0.625em 0.75em;}legend{border: 0;padding: 0;}button, input, select, textarea{font-family: inherit;font-size: 100%;margin: 0;}button, input{line-height: normal}button, select{text-transform: none}button, html input[type="button"],input[type="reset"], input[type="submit"]{-webkit-appearance: button;cursor: pointer;}button[disabled], html input[disabled]{cursor: default}input[type="checkbox"], input[type="radio"]{box-sizing: border-box;padding: 0;}input[type="search"]{-webkit-appearance: textfield;-moz-box-sizing: content-box;-webkit-box-sizing: content-box;box-sizing: content-box;}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance: none}button::-moz-focus-inner, input::-moz-focus-inner{border: 0;padding: 0;}textarea{overflow: auto;vertical-align: top;}table{border-collapse: collapse;border-spacing: 0;}section:not([class]) tr [data-task="0"],tfoot tr:nth-child(1) th,footer thead th:nth-child(2),footer tfoot td:nth-child(2){color: #b90b0b;background-color: #feeeee;}section:not([class]) tr [data-task="1"],tfoot tr:nth-child(2) th,footer thead th:nth-child(3),footer tfoot td:nth-child(3){color: #5f8b33;background-color: #eaf5e1;}section:not([class]) tr [data-task="2"],tfoot tr:nth-child(3) th,footer thead th:nth-child(4),footer tfoot td:nth-child(4){color: #f2ac1a;background-color: #fffbe5;}section:not([class]) tr [data-task="3"],tfoot tr:nth-child(4) th,footer thead th:nth-child(5),footer tfoot td:nth-child(5){color: #23485a;background-color: #eef7fc;}section:not([class]) tr [data-task="4"],tfoot tr:nth-child(5) th,footer thead th:nth-child(6),footer tfoot td:nth-child(6){color: #892997;background-color: #f4eefc;}.delayBefore{color: #5f8b33}.delayAfter{color: #b90b0b}.delayToday{color: #23485a}.delayError{color: #f2ac1a}nav + h2,footer b, tfoot b,footer h2, footer caption{display: block;overflow: hidden;position: absolute;left: 0;top: 0;width: 1px;height: 1px;text-indent: -1px;}body{min-width: 1000px;margin: 100px auto 0;padding-bottom: 50px;color: #777;border-bottom: 20px solid #333;font: .75em/1 "helveticaneue-light", "helvetica neue light", "helvetica neue", helvetica, arial, sans-serif;}section, footer, header{width: 95%;margin: auto;}h1, h2, h3{color: #333;font-weight: normal;letter-spacing: -1px;}h1{position: relative;margin-bottom: 50px;padding: 50px 0 25px;border: 4px double #eee;border-width: 4px 0 1px;font: italic 2.3em "droid serif", georgia, times, serif;}h1 em{font-size: 1.5em}h1 em::before, h1 em::after{content: "\""}h2{letter-spacing: 1px}nav h2{width: 95%;height: 30px;margin: 0 auto;padding: 0;font-size: 1.2em;line-height: 30px;}nav h2::after{content: ": "}.noticeWrap h2{position: absolute;top: 0;right: 0;bottom: 0;left: 0;margin: auto auto auto 10px;width: 150px;height: 150px;border-radius: 150px;color: #fff;font-size: 2em;text-align: center;line-height: 150px;letter-spacing: 3px;background-color: #666;animation: bgChange 5s linear 2s;-webkit-animation: bgChange 5s linear 2s;}.noticeWrap h2::before{content: "*"}@keyframes bgChange {0% { color: #fff;background-color: #ccc;} 10%{color: #b90b0b;background-color: #feeeee;} 20%{color: #5f8b33;background-color: #eaf5e1;} 30%{color: #f2ac1a;background-color: #fffbe5;} 40%{color: #23485a;background-color: #eef7fc;} 50%{color: #892997;background-color: #f4eefc;} 60%{color: #23485a;background-color: #eef7fc;} 70%{color: #f2ac1a;background-color: #fffbe5;} 80%{color: #5f8b33;background-color: #eaf5e1;} 90%{color: #b90b0b;background-color: #feeeee;} 100%{color: #fff;background-color: #ccc;}}@-webkit-keyframes bgChange {0% { color: #fff;background-color: #ccc;} 10%{color: #b90b0b;background-color: #feeeee;} 20%{color: #5f8b33;background-color: #eaf5e1;} 30%{color: #f2ac1a;background-color: #fffbe5;} 40%{color: #23485a;background-color: #eef7fc;} 50%{color: #892997;background-color: #f4eefc;} 60%{color: #23485a;background-color: #eef7fc;} 70%{color: #f2ac1a;background-color: #fffbe5;} 80%{color: #5f8b33;background-color: #eaf5e1;} 90%{color: #b90b0b;background-color: #feeeee;} 100%{color: #fff;background-color: #ccc;}}.filterWrap h2{margin: 0 0 10px;font-size: 1.8em;text-align: center;}section:not([class]) h2{color: #eee;margin: 0;border-bottom: 2px solid;font: italic 3em "droid serif", georgia, times, serif;text-align: right;opacity: .7;}h3{margin: 50px 0 0 0;font-size: 1.8em;}h3:before{counter-increment: menu;content: "Menu" counter(menu) ": ";font-size: .8em;letter-spacing: 0px;}a{color: #205589;text-decoration: none;}a:hover, a:focus{text-decoration: underline}i{margin-right: 3px;font-style: normal;}b{font-weight: normal}::selection{background: #f2ebff}nav{overflow: hidden;position: absolute;top: 50px;left: 0;width: 100%;min-width: 1000px;}nav ul{overflow: hidden;width: 95%;margin: -30px auto 0;padding: 0 0 10px;border-bottom: 5px solid #333;list-style: none;}nav li, nav a{float: left}nav a{position: relative;height: 30px;margin: 0 10px;color: #333;font-size: 1.2em;font-weight: bold;text-decoration: none;line-height: 30px;transition: .3s ease-out;}nav a:hover{color: #b90b0b;transition: .3s;}nav li:not(:first-child) a::before{content: "";display: block;position: absolute;top: 10px;left: -10px;width: 1px;height: 10px;background-color: #aaa;}nav li:first-child a{margin-left: 90px}section{counter-reset: menu;margin-top: 50px;padding: 25px 0;}.noticeWrap{position: relative;min-height: 100px;margin-bottom: 25px;padding: 50px 0;border-bottom: 1px dashed #eee;}.noticeWrap ul{margin: 0 10px 0 160px;line-height: 1.5;}table{width: 100%;border: 1px solid #e0e0e0;border-bottom-width: 2px;font-size: .95em;}caption{margin: -10px 0 5px;padding-bottom: 5px;border-bottom: 1px dashed #ccc;font-size: 1em;text-align: right;}caption:before{content: "Target path : "}thead th{color: #666;padding: 15px 5px;border: 1px solid #e0e0e0;border-bottom-width: 2px;font-weight: normal;background: #f3f3f3;}tbody tr:nth-child(2n) td,tbody tr:nth-child(2n) th{background-color: #f8f8f8}tbody th, tbody td{padding: 10px 5px;border: 1px solid #e0e0e0;font-weight: normal;background: #fcfcfc;transition: .3s ease-out;}tbody tr:hover td{color: #000;background-color: #f3f9ff;transition: .3s;}tbody td:last-child{text-align: center}tfoot{border-top: 3px double #ccc}tfoot th, tfoot td{color: #333;padding: 5px;border: 1px solid #e0e0e0;font-weight: normal;background: #fcfcfc;}tfoot th{padding: 3px 10px;text-align: right;background-color: #eee;}th:first-child{width: 6%}.dueDate{width: 7%}.dueDate, td:first-child{text-align: center}footer{margin-top: -10px;margin-bottom: 25px;padding: 0 10px;}footer table{text-align: center}footer th, footer td{border-width: 3px;border-color: #fff;}footer th:first-child{width: auto}footer thead th{letter-spacing: 1px;font-size: 1.3em;background-color: #fff !important;}footer thead th:first-child,footer tbody th:first-child{text-align: right;border-left-width: 1px;}footer tbody tr:last-child th,footer tbody tr:last-child td{border-bottom-width: 15px}footer tfoot th, footer tfoot td{padding: 10px;font-size: 1.5em;}footer tfoot th:first-child{color: #666;background-color: #f3f3f3;}.filterWrap{margin-top: 0;border-top: 1px dashed #eee;border-bottom: 1px dashed #ccc;background-color: #fcfcfc;}.filterWrap fieldset{border: none;margin: 0;padding: 0 10px;overflow: hidden;text-align: center;}.filterWrap legend{display: none}.filterWrap label{display: inline-block;margin-right: 10px;padding: 5px 0;font-size: 1.2em;}.filterWrap input{margin-right: 5px}.filterWrap b::after{content: ":"}.filterWrap i{margin-left: 5px}.people{text-align:center} \ No newline at end of file diff --git a/src/main/resources/static/res/front/home/_feWorksheet.min.js b/src/main/resources/static/res/front/home/_feWorksheet.min.js new file mode 100644 index 0000000..f115748 --- /dev/null +++ b/src/main/resources/static/res/front/home/_feWorksheet.min.js @@ -0,0 +1,6 @@ +/* + feWorksheet(Javascript) + Include: jQuery v2.1.0 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license + Version: 1.2 +*/ +!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k="".trim,l={},m=a.document,n="2.1.0",o=function(a,b){return new o.fn.init(a,b)},p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};o.fn=o.prototype={jquery:n,constructor:o,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=o.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return o.each(this,a,b)},map:function(a){return this.pushStack(o.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},o.extend=o.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||o.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(o.isPlainObject(d)||(e=o.isArray(d)))?(e?(e=!1,f=c&&o.isArray(c)?c:[]):f=c&&o.isPlainObject(c)?c:{},g[b]=o.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},o.extend({expando:"jQuery"+(n+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===o.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return a-parseFloat(a)>=0},isPlainObject:function(a){if("object"!==o.type(a)||a.nodeType||o.isWindow(a))return!1;try{if(a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(b){return!1}return!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=o.trim(a),a&&(1===a.indexOf("use strict")?(b=m.createElement("script"),b.text=a,m.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":k.call(a)},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?o.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),o.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||o.guid++,f):void 0},now:Date.now,support:l}),o.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=o.type(a);return"function"===c||o.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s="sizzle"+-new Date,t=a.document,u=0,v=0,w=eb(),x=eb(),y=eb(),z=function(a,b){return a===b&&(j=!0),0},A="undefined",B=1<<31,C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=D.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",M=L.replace("w","w#"),N="\\["+K+"*("+L+")"+K+"*(?:([*^$|!~]?=)"+K+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+M+")|)|)"+K+"*\\]",O=":("+L+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+N.replace(3,8)+")*)|.*)\\)|)",P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(O),U=new RegExp("^"+M+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L.replace("w","w*")+")"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=/'|\\/g,ab=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),bb=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{G.apply(D=H.call(t.childNodes),t.childNodes),D[t.childNodes.length].nodeType}catch(cb){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function db(a,b,d,e){var f,g,h,i,j,m,p,q,u,v;if((b?b.ownerDocument||b:t)!==l&&k(b),b=b||l,d=d||[],!a||"string"!=typeof a)return d;if(1!==(i=b.nodeType)&&9!==i)return[];if(n&&!e){if(f=Z.exec(a))if(h=f[1]){if(9===i){if(g=b.getElementById(h),!g||!g.parentNode)return d;if(g.id===h)return d.push(g),d}else if(b.ownerDocument&&(g=b.ownerDocument.getElementById(h))&&r(b,g)&&g.id===h)return d.push(g),d}else{if(f[2])return G.apply(d,b.getElementsByTagName(a)),d;if((h=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(h)),d}if(c.qsa&&(!o||!o.test(a))){if(q=p=s,u=b,v=9===i&&a,1===i&&"object"!==b.nodeName.toLowerCase()){m=ob(a),(p=b.getAttribute("id"))?q=p.replace(_,"\\$&"):b.setAttribute("id",q),q="[id='"+q+"'] ",j=m.length;while(j--)m[j]=q+pb(m[j]);u=$.test(a)&&mb(b.parentNode)||b,v=m.join(",")}if(v)try{return G.apply(d,u.querySelectorAll(v)),d}catch(w){}finally{p||b.removeAttribute("id")}}}return xb(a.replace(P,"$1"),b,d,e)}function eb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function fb(a){return a[s]=!0,a}function gb(a){var b=l.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function hb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function ib(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||B)-(~a.sourceIndex||B);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function jb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function kb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function lb(a){return fb(function(b){return b=+b,fb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function mb(a){return a&&typeof a.getElementsByTagName!==A&&a}c=db.support={},f=db.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},k=db.setDocument=function(a){var b,e=a?a.ownerDocument||a:t,g=e.defaultView;return e!==l&&9===e.nodeType&&e.documentElement?(l=e,m=e.documentElement,n=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){k()},!1):g.attachEvent&&g.attachEvent("onunload",function(){k()})),c.attributes=gb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=gb(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(e.getElementsByClassName)&&gb(function(a){return a.innerHTML="
",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=gb(function(a){return m.appendChild(a).id=s,!e.getElementsByName||!e.getElementsByName(s).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==A&&n){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){var c=typeof a.getAttributeNode!==A&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==A?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==A&&n?b.getElementsByClassName(a):void 0},p=[],o=[],(c.qsa=Y.test(e.querySelectorAll))&&(gb(function(a){a.innerHTML="",a.querySelectorAll("[t^='']").length&&o.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||o.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll(":checked").length||o.push(":checked")}),gb(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&o.push("name"+K+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||o.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),o.push(",.*:")})),(c.matchesSelector=Y.test(q=m.webkitMatchesSelector||m.mozMatchesSelector||m.oMatchesSelector||m.msMatchesSelector))&&gb(function(a){c.disconnectedMatch=q.call(a,"div"),q.call(a,"[s!='']:x"),p.push("!=",O)}),o=o.length&&new RegExp(o.join("|")),p=p.length&&new RegExp(p.join("|")),b=Y.test(m.compareDocumentPosition),r=b||Y.test(m.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},z=b?function(a,b){if(a===b)return j=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===t&&r(t,a)?-1:b===e||b.ownerDocument===t&&r(t,b)?1:i?I.call(i,a)-I.call(i,b):0:4&d?-1:1)}:function(a,b){if(a===b)return j=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],k=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:i?I.call(i,a)-I.call(i,b):0;if(f===g)return ib(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)k.unshift(c);while(h[d]===k[d])d++;return d?ib(h[d],k[d]):h[d]===t?-1:k[d]===t?1:0},e):l},db.matches=function(a,b){return db(a,null,null,b)},db.matchesSelector=function(a,b){if((a.ownerDocument||a)!==l&&k(a),b=b.replace(S,"='$1']"),!(!c.matchesSelector||!n||p&&p.test(b)||o&&o.test(b)))try{var d=q.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return db(b,l,null,[a]).length>0},db.contains=function(a,b){return(a.ownerDocument||a)!==l&&k(a),r(a,b)},db.attr=function(a,b){(a.ownerDocument||a)!==l&&k(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!n):void 0;return void 0!==f?f:c.attributes||!n?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},db.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},db.uniqueSort=function(a){var b,d=[],e=0,f=0;if(j=!c.detectDuplicates,i=!c.sortStable&&a.slice(0),a.sort(z),j){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return i=null,a},e=db.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=db.selectors={cacheLength:50,createPseudo:fb,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ab,bb),a[3]=(a[4]||a[5]||"").replace(ab,bb),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||db.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&db.error(a[0]),a},PSEUDO:function(a){var b,c=!a[5]&&a[2];return V.CHILD.test(a[0])?null:(a[3]&&void 0!==a[4]?a[2]=a[4]:c&&T.test(c)&&(b=ob(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ab,bb).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=w[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&w(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==A&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=db.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),t=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&t){k=q[s]||(q[s]={}),j=k[a]||[],n=j[0]===u&&j[1],m=j[0]===u&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[u,n,m];break}}else if(t&&(j=(b[s]||(b[s]={}))[a])&&j[0]===u)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(t&&((l[s]||(l[s]={}))[a]=[u,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||db.error("unsupported pseudo: "+a);return e[s]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?fb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:fb(function(a){var b=[],c=[],d=g(a.replace(P,"$1"));return d[s]?fb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:fb(function(a){return function(b){return db(a,b).length>0}}),contains:fb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:fb(function(a){return U.test(a||"")||db.error("unsupported lang: "+a),a=a.replace(ab,bb).toLowerCase(),function(b){var c;do if(c=n?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===m},focus:function(a){return a===l.activeElement&&(!l.hasFocus||l.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:lb(function(){return[0]}),last:lb(function(a,b){return[b-1]}),eq:lb(function(a,b,c){return[0>c?c+b:c]}),even:lb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:lb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:lb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:lb(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function qb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=v++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[u,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[s]||(b[s]={}),(h=i[d])&&h[0]===u&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function rb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function sb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function tb(a,b,c,d,e,f){return d&&!d[s]&&(d=tb(d)),e&&!e[s]&&(e=tb(e,f)),fb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||wb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:sb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=sb(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?I.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=sb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ub(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],i=g||d.relative[" "],j=g?1:0,k=qb(function(a){return a===b},i,!0),l=qb(function(a){return I.call(b,a)>-1},i,!0),m=[function(a,c,d){return!g&&(d||c!==h)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>j;j++)if(c=d.relative[a[j].type])m=[qb(rb(m),c)];else{if(c=d.filter[a[j].type].apply(null,a[j].matches),c[s]){for(e=++j;f>e;e++)if(d.relative[a[e].type])break;return tb(j>1&&rb(m),j>1&&pb(a.slice(0,j-1).concat({value:" "===a[j-2].type?"*":""})).replace(P,"$1"),c,e>j&&ub(a.slice(j,e)),f>e&&ub(a=a.slice(e)),f>e&&pb(a))}m.push(c)}return rb(m)}function vb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,i,j,k){var m,n,o,p=0,q="0",r=f&&[],s=[],t=h,v=f||e&&d.find.TAG("*",k),w=u+=null==t?1:Math.random()||.1,x=v.length;for(k&&(h=g!==l&&g);q!==x&&null!=(m=v[q]);q++){if(e&&m){n=0;while(o=a[n++])if(o(m,g,i)){j.push(m);break}k&&(u=w)}c&&((m=!o&&m)&&p--,f&&r.push(m))}if(p+=q,c&&q!==p){n=0;while(o=b[n++])o(r,s,g,i);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=E.call(j));s=sb(s)}G.apply(j,s),k&&!f&&s.length>0&&p+b.length>1&&db.uniqueSort(j)}return k&&(u=w,h=t),r};return c?fb(f):f}g=db.compile=function(a,b){var c,d=[],e=[],f=y[a+" "];if(!f){b||(b=ob(a)),c=b.length;while(c--)f=ub(b[c]),f[s]?d.push(f):e.push(f);f=y(a,vb(e,d))}return f};function wb(a,b,c){for(var d=0,e=b.length;e>d;d++)db(a,b[d],c);return c}function xb(a,b,e,f){var h,i,j,k,l,m=ob(a);if(!f&&1===m.length){if(i=m[0]=m[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&c.getById&&9===b.nodeType&&n&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(ab,bb),b)||[])[0],!b)return e;a=a.slice(i.shift().value.length)}h=V.needsContext.test(a)?0:i.length;while(h--){if(j=i[h],d.relative[k=j.type])break;if((l=d.find[k])&&(f=l(j.matches[0].replace(ab,bb),$.test(i[0].type)&&mb(b.parentNode)||b))){if(i.splice(h,1),a=f.length&&pb(i),!a)return G.apply(e,f),e;break}}}return g(a,m)(f,b,!n,e,$.test(a)&&mb(b.parentNode)||b),e}return c.sortStable=s.split("").sort(z).join("")===s,c.detectDuplicates=!!j,k(),c.sortDetached=gb(function(a){return 1&a.compareDocumentPosition(l.createElement("div"))}),gb(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||hb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&gb(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||hb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),gb(function(a){return null==a.getAttribute("disabled")})||hb(J,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),db}(a);o.find=t,o.expr=t.selectors,o.expr[":"]=o.expr.pseudos,o.unique=t.uniqueSort,o.text=t.getText,o.isXMLDoc=t.isXML,o.contains=t.contains;var u=o.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(o.isFunction(b))return o.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return o.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return o.filter(b,a,c);b=o.filter(b,a)}return o.grep(a,function(a){return g.call(b,a)>=0!==c})}o.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?o.find.matchesSelector(d,a)?[d]:[]:o.find.matches(a,o.grep(b,function(a){return 1===a.nodeType}))},o.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(o(a).filter(function(){for(b=0;c>b;b++)if(o.contains(e[b],this))return!0}));for(b=0;c>b;b++)o.find(a,e[b],d);return d=this.pushStack(c>1?o.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?o(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=o.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof o?b[0]:b,o.merge(this,o.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:m,!0)),v.test(c[1])&&o.isPlainObject(b))for(c in b)o.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=m.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=m,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):o.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(o):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),o.makeArray(a,this))};A.prototype=o.fn,y=o(m);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};o.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&o(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),o.fn.extend({has:function(a){var b=o(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(o.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?o(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&o.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?o.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(o(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(o.unique(o.merge(this.get(),o(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}o.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return o.dir(a,"parentNode")},parentsUntil:function(a,b,c){return o.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return o.dir(a,"nextSibling")},prevAll:function(a){return o.dir(a,"previousSibling")},nextUntil:function(a,b,c){return o.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return o.dir(a,"previousSibling",c)},siblings:function(a){return o.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return o.sibling(a.firstChild)},contents:function(a){return a.contentDocument||o.merge([],a.childNodes)}},function(a,b){o.fn[a]=function(c,d){var e=o.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=o.filter(d,e)),this.length>1&&(C[a]||o.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return o.each(a.match(E)||[],function(a,c){b[c]=!0}),b}o.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):o.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){o.each(b,function(b,c){var d=o.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&o.each(arguments,function(a,b){var c;while((c=o.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?o.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},o.extend({Deferred:function(a){var b=[["resolve","done",o.Callbacks("once memory"),"resolved"],["reject","fail",o.Callbacks("once memory"),"rejected"],["notify","progress",o.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return o.Deferred(function(c){o.each(b,function(b,f){var g=o.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&o.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?o.extend(a,d):d}},e={};return d.pipe=d.then,o.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&o.isFunction(a.promise)?e:0,g=1===f?a:o.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&o.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;o.fn.ready=function(a){return o.ready.promise().done(a),this},o.extend({isReady:!1,readyWait:1,holdReady:function(a){a?o.readyWait++:o.ready(!0)},ready:function(a){(a===!0?--o.readyWait:o.isReady)||(o.isReady=!0,a!==!0&&--o.readyWait>0||(H.resolveWith(m,[o]),o.fn.trigger&&o(m).trigger("ready").off("ready")))}});function I(){m.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),o.ready()}o.ready.promise=function(b){return H||(H=o.Deferred(),"complete"===m.readyState?setTimeout(o.ready):(m.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},o.ready.promise();var J=o.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===o.type(c)){e=!0;for(h in c)o.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,o.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(o(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};o.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=o.expando+Math.random()}K.uid=1,K.accepts=o.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,o.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(o.isEmptyObject(f))o.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,o.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{o.isArray(b)?d=b.concat(b.map(o.camelCase)):(e=o.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!o.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?o.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}o.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b)},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),o.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)d=g[c].name,0===d.indexOf("data-")&&(d=o.camelCase(d.slice(5)),P(f,d,e[d]));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=o.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),o.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||o.isArray(c)?d=L.access(a,b,o.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=o.queue(a,b),d=c.length,e=c.shift(),f=o._queueHooks(a,b),g=function(){o.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:o.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),o.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length",l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";l.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return m.activeElement}catch(a){}}o.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=o.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof o!==U&&o.event.triggered!==b.type?o.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],n=q=h[1],p=(h[2]||"").split(".").sort(),n&&(l=o.event.special[n]||{},n=(e?l.delegateType:l.bindType)||n,l=o.event.special[n]||{},k=o.extend({type:n,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&o.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[n])||(m=i[n]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(n,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),o.event.global[n]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],n=q=h[1],p=(h[2]||"").split(".").sort(),n){l=o.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=i[n]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||o.removeEvent(a,n,r.handle),delete i[n])}else for(n in i)o.event.remove(a,n+b[j],c,d,!0);o.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,p=[d||m],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||m,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+o.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[o.expando]?b:new o.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:o.makeArray(c,[b]),n=o.event.special[q]||{},e||!n.trigger||n.trigger.apply(d,c)!==!1)){if(!e&&!n.noBubble&&!o.isWindow(d)){for(i=n.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||m)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:n.bindType||q,l=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),l&&l.apply(g,c),l=k&&g[k],l&&l.apply&&o.acceptData(g)&&(b.result=l.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||n._default&&n._default.apply(p.pop(),c)!==!1||!o.acceptData(d)||k&&o.isFunction(d[q])&&!o.isWindow(d)&&(h=d[k],h&&(d[k]=null),o.event.triggered=q,d[q](),o.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=o.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=o.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=o.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((o.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?o(e,this).index(i)>=0:o.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h]*)\/>/gi,bb=/<([\w:]+)/,cb=/<|&#?\w+;/,db=/<(?:script|style|link)/i,eb=/checked\s*(?:[^=]|=\s*.checked.)/i,fb=/^$|\/(?:java|ecma)script/i,gb=/^true\/(.*)/,hb=/^\s*\s*$/g,ib={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};ib.optgroup=ib.option,ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead,ib.th=ib.td;function jb(a,b){return o.nodeName(a,"table")&&o.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function kb(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function lb(a){var b=gb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function mb(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function nb(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)o.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=o.extend({},h),M.set(b,i))}}function ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&o.nodeName(a,b)?o.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}o.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=o.contains(a.ownerDocument,a);if(!(l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||o.isXMLDoc(a)))for(g=ob(h),f=ob(a),d=0,e=f.length;e>d;d++)pb(f[d],g[d]);if(b)if(c)for(f=f||ob(a),g=g||ob(h),d=0,e=f.length;e>d;d++)nb(f[d],g[d]);else nb(a,h);return g=ob(h,"script"),g.length>0&&mb(g,!i&&ob(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,n=a.length;n>m;m++)if(e=a[m],e||0===e)if("object"===o.type(e))o.merge(l,e.nodeType?[e]:e);else if(cb.test(e)){f=f||k.appendChild(b.createElement("div")),g=(bb.exec(e)||["",""])[1].toLowerCase(),h=ib[g]||ib._default,f.innerHTML=h[1]+e.replace(ab,"<$1>")+h[2],j=h[0];while(j--)f=f.lastChild;o.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===o.inArray(e,d))&&(i=o.contains(e.ownerDocument,e),f=ob(k.appendChild(e),"script"),i&&mb(f),c)){j=0;while(e=f[j++])fb.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f,g,h=o.event.special,i=0;void 0!==(c=a[i]);i++){if(o.acceptData(c)&&(f=c[L.expando],f&&(b=L.cache[f]))){if(d=Object.keys(b.events||{}),d.length)for(g=0;void 0!==(e=d[g]);g++)h[e]?o.event.remove(c,e):o.removeEvent(c,e,b.handle);L.cache[f]&&delete L.cache[f]}delete M.cache[c[M.expando]]}}}),o.fn.extend({text:function(a){return J(this,function(a){return void 0===a?o.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?o.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||o.cleanData(ob(c)),c.parentNode&&(b&&o.contains(c.ownerDocument,c)&&mb(ob(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(o.cleanData(ob(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return o.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!db.test(a)&&!ib[(bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ab,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(o.cleanData(ob(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,o.cleanData(ob(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,k=this.length,m=this,n=k-1,p=a[0],q=o.isFunction(p);if(q||k>1&&"string"==typeof p&&!l.checkClone&&eb.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(k&&(c=o.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=o.map(ob(c,"script"),kb),g=f.length;k>j;j++)h=c,j!==n&&(h=o.clone(h,!0,!0),g&&o.merge(f,ob(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,o.map(f,lb),j=0;g>j;j++)h=f[j],fb.test(h.type||"")&&!L.access(h,"globalEval")&&o.contains(i,h)&&(h.src?o._evalUrl&&o._evalUrl(h.src):o.globalEval(h.textContent.replace(hb,"")))}return this}}),o.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){o.fn[a]=function(a){for(var c,d=[],e=o(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),o(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qb,rb={};function sb(b,c){var d=o(c.createElement(b)).appendTo(c.body),e=a.getDefaultComputedStyle?a.getDefaultComputedStyle(d[0]).display:o.css(d[0],"display");return d.detach(),e}function tb(a){var b=m,c=rb[a];return c||(c=sb(a,b),"none"!==c&&c||(qb=(qb||o(" + + + + + + +
+ + +
+ + +
+ + + + +
+ + +
+ + +
+ + + +
+ +
    +
  • +
  • +
  • +
+
+ +
+ + + + + + + + diff --git a/src/main/resources/static/res/front/lib/se/css/smart_editor2.css b/src/main/resources/static/res/front/lib/se/css/smart_editor2.css new file mode 100644 index 0000000..1b389d5 --- /dev/null +++ b/src/main/resources/static/res/front/lib/se/css/smart_editor2.css @@ -0,0 +1,336 @@ +@charset "UTF-8"; +/* NHN Web Standardization Team (http://html.nhndesign.com/) HHJ 090226 */ +/* COMMON */ +body, #smart_editor2, #smart_editor2 p, #smart_editor2 h1, #smart_editor2 h2, #smart_editor2 h3, #smart_editor2 h4, #smart_editor2 h5, #smart_editor2 h6, #smart_editor2 ul, #smart_editor2 ol, #smart_editor2 li, #smart_editor2 dl, #smart_editor2 dt, #smart_editor2 dd, #smart_editor2 table, #smart_editor2 th, #smart_editor2 td, #smart_editor2 form, #smart_editor2 fieldset, #smart_editor2 legend, #smart_editor2 input, #smart_editor2 textarea, #smart_editor2 button, #smart_editor2 select { margin: 0; padding: 0; } + +#smart_editor2, #smart_editor2 h1, #smart_editor2 h2, #smart_editor2 h3, #smart_editor2 h4, #smart_editor2 h5, #smart_editor2 h6, #smart_editor2 input, #smart_editor2 textarea, #smart_editor2 select, #smart_editor2 table, #smart_editor2 button { font-family: '돋움',Dotum,Helvetica,sans-serif; font-size: 12px; color: #666; } + +#smart_editor2 span, #smart_editor2 em { font-size: 12px; } + +#smart_editor2 em, #smart_editor2 address { font-style: normal; } + +#smart_editor2 img, #smart_editor2 fieldset { border: 0; } + +#smart_editor2 hr { display: none; } + +#smart_editor2 ol, #smart_editor2 ul { list-style: none; } + +#smart_editor2 button { border: 0; background: none; font-size: 11px; vertical-align: top; cursor: pointer; } + +#smart_editor2 button span, #smart_editor2 button em { visibility: hidden; overflow: hidden; position: absolute; top: 0; font-size: 0; line-height: 0; } + +#smart_editor2 legend, #smart_editor2 .blind { visibility: hidden; overflow: hidden; position: absolute; width: 0; height: 0; font-size: 0; line-height: 0; } + +#smart_editor2 .input_ty1 { height: 14px; margin: 0; padding: 4px 2px 0 4px; border: 1px solid #c7c7c7; font-size: 11px; color: #666; } + +#smart_editor2 a:link, #smart_editor2 a:visited, #smart_editor2 a:active, #smart_editor2 a:focus { color: #666; text-decoration: none; } + +#smart_editor2 a:hover { color: #666; text-decoration: underline; } + +/* LAYOUT */ +#smart_editor2 .se2_header { margin: 10px 0 29px 0; } + +#smart_editor2 .se2_bi { float: left; width: 93px; height: 20px; margin: 0; padding: 0; background: url("../img/ko_KR/btn_set.png?130306") -343px -358px no-repeat; font-size: 0; line-height: 0; text-indent: -10000px; vertical-align: middle; } + +#smart_editor2 .se2_allhelp { display: inline-block; width: 18px; height: 18px; padding: 0; background: url("../img/ko_KR/btn_set.png?130306") -437px -358px no-repeat; font-size: 0; line-height: 0; text-indent: -10000px; vertical-align: middle; } + +#smart_editor2 #smart_editor2_content { border: 1px solid #b5b5b5; } + +#smart_editor2 .se2_tool { overflow: visible; position: relative; z-index: 25; } + +/* EDITINGAREA */ +#smart_editor2 .se2_input_area { position: relative; z-index: 22; height: 400px; margin: 0; padding: 0; *zoom: 1; } + +#smart_editor2 .se2_input_wysiwyg, #smart_editor2 .se2_input_syntax { display: block; overflow: auto; width: 100%; height: 100%; margin: 0; *margin: -1px 0 0 0; border: 0; } + +/* EDITINGMODE */ +#smart_editor2 .se2_conversion_mode { position: relative; height: 15px; padding-top: 1px; border-top: 1px solid #b5b5b5; background: url("../img/icon_set.gif") 0 -896px repeat-x; } + +#smart_editor2 .se2_inputarea_controller { display: block; clear: both; position: relative; width: 100%; height: 15px; text-align: center; cursor: n-resize; } + +#smart_editor2 .se2_inputarea_controller span, #smart_editor2 .controller_on span { background: url("../img/ico_extend.png") no-repeat; } + +#smart_editor2 .se2_inputarea_controller span { position: static; display: inline-block; visibility: visible; overflow: hidden; height: 15px; padding-left: 11px; background-position: 0 2px; color: #888; font-size: 11px; letter-spacing: -1px; line-height: 16px; white-space: nowrap; } + +* + html #smart_editor2 .se2_inputarea_controller span { line-height: 14px; } + +#smart_editor2 .controller_on span { background-position: 0 -21px; color: #249c04; } + +#smart_editor2 .ly_controller { display: block; position: absolute; bottom: 2px; left: 50%; width: 287px; margin-left: -148px; padding: 8px 0 7px 9px; border: 1px solid #827f7c; background: #fffdef; } + +#smart_editor2 .ly_controller p { color: #666; font-size: 11px; letter-spacing: -1px; line-height: 11px; } + +#smart_editor2 .ly_controller .bt_clse, #smart_editor2 .ly_controller .ic_arr { position: absolute; background: url("../img/ico_extend.png") no-repeat; } + +#smart_editor2 .ly_controller .bt_clse { top: 5px; right: 4px; width: 14px; height: 15px; background-position: 1px -43px; } + +#smart_editor2 .ly_controller .ic_arr { top: 25px; left: 50%; width: 10px; height: 6px; margin-left: -5px; background-position: 0 -65px; } + +#smart_editor2 .se2_converter { float: left; position: absolute; top: -1px; right: 3px; z-index: 20; } + +#smart_editor2 .se2_converter li { float: left; } + +#smart_editor2 .se2_converter .se2_to_editor { width: 59px; height: 15px; background: url("../img/ko_KR/btn_set.png?130306") 0 -85px no-repeat; vertical-align: top; } + +#smart_editor2 .se2_converter .se2_to_html { width: 59px; height: 15px; background: url("../img/ko_KR/btn_set.png?130306") -59px -70px no-repeat; vertical-align: top; } + +#smart_editor2 .se2_converter .se2_to_text { width: 60px; height: 15px; background: url("../img/ko_KR/btn_set.png?130306") -417px -466px no-repeat; vertical-align: top; } + +#smart_editor2 .se2_converter .active .se2_to_editor { width: 59px; height: 15px; background: url("../img/ko_KR/btn_set.png?130306") 0 -70px no-repeat; vertical-align: top; } + +#smart_editor2 .se2_converter .active .se2_to_html { width: 59px; height: 15px; background: url("../img/ko_KR/btn_set.png?130306") -59px -85px no-repeat; vertical-align: top; } + +#smart_editor2 .se2_converter .active .se2_to_text { width: 60px; height: 15px; background: url("../img/ko_KR/btn_set.png?130306") -417px -481px no-repeat; vertical-align: top; } + +/* EDITINGAREA_HTMLSRC */ +#smart_editor2 .off .ico_btn, #smart_editor2 .off .se2_more, #smart_editor2 .off .se2_more2, #smart_editor2 .off .se2_font_family, #smart_editor2 .off .se2_font_size, #smart_editor2 .off .se2_bold, #smart_editor2 .off .se2_underline, #smart_editor2 .off .se2_italic, #smart_editor2 .off .se2_tdel, #smart_editor2 .off .se2_fcolor, #smart_editor2 .off .se2_fcolor_more, #smart_editor2 .off .se2_bgcolor, #smart_editor2 .off .se2_bgcolor_more, #smart_editor2 .off .se2_left, #smart_editor2 .off .se2_center, #smart_editor2 .off .se2_right, #smart_editor2 .off .se2_justify, #smart_editor2 .off .se2_ol, #smart_editor2 .off .se2_ul, #smart_editor2 .off .se2_indent, #smart_editor2 .off .se2_outdent, #smart_editor2 .off .se2_lineheight, #smart_editor2 .off .se2_del_style, #smart_editor2 .off .se2_blockquote, #smart_editor2 .off .se2_summary, #smart_editor2 .off .se2_footnote, #smart_editor2 .off .se2_url, #smart_editor2 .off .se2_emoticon, #smart_editor2 .off .se2_character, #smart_editor2 .off .se2_table, #smart_editor2 .off .se2_find, #smart_editor2 .off .se2_spelling, #smart_editor2 .off .se2_sup, #smart_editor2 .off .se2_sub, #smart_editor2 .off .se2_text_tool_more, #smart_editor2 .off .se2_new, #smart_editor2 .off .selected_color, #smart_editor2 .off .se2_lineSticker { -ms-filter: alpha(opacity=50); opacity: .5; cursor: default; filter: alpha(opacity=50); } + +/* LAYER */ +#smart_editor2 .se2_text_tool .se2_layer { display: none; float: left; position: absolute; top: 20px; left: 0; z-index: 50; margin: 0; padding: 0; border: 1px solid #bcbbbb; background: #fafafa; } + +#smart_editor2 .se2_text_tool li.active { z-index: 50; } + +#smart_editor2 .se2_text_tool .active .se2_layer { display: block; } + +#smart_editor2 .se2_text_tool .active li .se2_layer { display: none; } + +#smart_editor2 .se2_text_tool .active .active .se2_layer { display: block; } + +#smart_editor2 .se2_text_tool .se2_layer .se2_in_layer { float: left; margin: 0; padding: 0; border: 1px solid #fff; background: #fafafa; } + +/* TEXT_TOOLBAR */ +#smart_editor2 .se2_text_tool { position: relative; clear: both; z-index: 30; padding: 4px 0 4px 3px; background: #f4f4f4 url("../img/bg_text_tool.gif") 0 0 repeat-x; border-bottom: 1px solid #b5b5b5; *zoom: 1; } + +#smart_editor2 .se2_text_tool:after { content: ""; display: block; clear: both; } + +#smart_editor2 .se2_text_tool ul { float: left; display: inline; margin-right: 3px; padding-left: 1px; white-space: nowrap; } + +#smart_editor2 .se2_text_tool li { _display: inline; float: left; position: relative; z-index: 30; } + +#smart_editor2 .se2_text_tool button, #smart_editor2 .se2_multy .se2_icon { width: 21px; height: 21px; background: url("../img/ko_KR/text_tool_set.png?140317") no-repeat; vertical-align: top; } + +#smart_editor2 .se2_text_tool .se2_font_type { position: relative; } + +#smart_editor2 .se2_text_tool .se2_font_type li { margin-left: 3px; } + +#smart_editor2 .se2_text_tool .se2_font_type button { text-align: left; } + +#smart_editor2 .se2_text_tool .se2_font_type button.se2_font_family span, #smart_editor2 .se2_text_tool .se2_font_type button.se2_font_size span { display: inline-block; visibility: visible; position: static; width: 52px; height: 20px; padding: 0 0 0 6px; font-size: 12px; line-height: 20px; *line-height: 22px; color: #333; *zoom: 1; } + +#smart_editor2 .se2_text_tool .se2_multy { position: absolute; top: 0; right: 0; padding-left: 0; margin-right: 0; white-space: nowrap; border-left: 1px solid #e0dedf; } + +#smart_editor2 .se2_text_tool .se2_multy .se2_mn { float: left; white-space: nowrap; } + +#smart_editor2 .se2_text_tool .se2_multy button { background-image: none; width: 47px; } + +#smart_editor2 .se2_text_tool .se2_multy .se2_icon { display: inline-block; visibility: visible; overflow: visible; position: static; width: 16px; height: 29px; margin: -1px 2px 0 -1px; background-position: 0 -132px; line-height: 30px; vertical-align: top; } + +#smart_editor2 .se2_text_tool .se2_multy button, #smart_editor2 .se2_text_tool .se2_multy button span { height: 29px; line-height: 29px; } + +#smart_editor2 .se2_text_tool .se2_map .se2_icon { background-position: -29px -132px; } + +#smart_editor2 .se2_text_tool button span.se2_mntxt { display: inline-block; visibility: visible; overflow: visible; _overflow-y: hidden; position: relative; *margin-right: -1px; width: auto; height: 29px; font-weight: normal; font-size: 11px; line-height: 30px; *line-height: 29px; _line-height: 30px; color: #444; letter-spacing: -1px; vertical-align: top; } + +#smart_editor2 .se2_text_tool .se2_multy .se2_photo { margin-right: 1px; } + +#smart_editor2 .se2_text_tool .se2_multy .hover .ico_btn { background: #e8e8e8; } + +#smart_editor2 .se2_text_tool .se2_multy .se2_mn.hover { background: #e0dedf; } + +/* TEXT_TOOLBAR : ROUNDING */ +#smart_editor2 ul li.first_child button span.tool_bg, #smart_editor2 ul li.last_child button span.tool_bg, #smart_editor2 ul li.single_child button span.tool_bg { visibility: visible; height: 21px; } + +#smart_editor2 ul li.first_child button span.tool_bg { left: -1px; width: 3px; background: url("../img/bg_button_left.gif?20121228") no-repeat; } + +#smart_editor2 ul li.last_child button span.tool_bg { right: 0px; _right: -1px; width: 2px; background: url("../img/bg_button_right.gif") no-repeat; } + +#smart_editor2 ul li.single_child { padding-right: 1px; } + +#smart_editor2 ul li.single_child button span.tool_bg { left: 0; background: url("../img/bg_button.gif?20121228") no-repeat; width: 22px; } + +#smart_editor2 div.se2_text_tool ul li.hover button span.tool_bg { background-position: 0 -21px; } + +#smart_editor2 div.se2_text_tool ul li.active button span.tool_bg, #smart_editor2 div.se2_text_tool ul li.active li.active button span.tool_bg { background-position: 0 -42px; } + +#smart_editor2 div.se2_text_tool ul li.active li button span.tool_bg { background-position: 0 0; } + +/* TEXT_TOOLBAR : SUB_MENU */ +#smart_editor2 .se2_sub_text_tool { display: none; position: absolute; top: 20px; left: 0; z-index: 40; width: auto; height: 29px; padding: 0 4px 0 0; border: 1px solid #b5b5b5; border-top: 1px solid #9a9a9a; background: #f4f4f4; } + +#smart_editor2 .active .se2_sub_text_tool { display: block; } + +#smart_editor2 .se2_sub_text_tool ul { float: left; height: 25px; margin: 0; padding: 4px 0 0 4px; } + +/* TEXT_TOOLBAR : SUB_MENU_SIZE */ +#smart_editor2 .se2_sub_step1 { width: 88px; } + +#smart_editor2 .se2_sub_step2 { width: 199px; } + +#smart_editor2 .se2_sub_step2_1 { width: 178px; } + +/* TEXT_TOOLBAR : BUTTON */ +#smart_editor2 .se2_text_tool .se2_font_family { width: 70px; height: 21px; background-position: 0 -10px; } + +#smart_editor2 .se2_text_tool .hover .se2_font_family { background-position: 0 -72px; } + +#smart_editor2 .se2_text_tool .active .se2_font_family { background-position: 0 -103px; } + +#smart_editor2 .se2_text_tool .se2_font_size { width: 45px; height: 21px; background-position: -70px -10px; } + +#smart_editor2 .se2_text_tool .hover .se2_font_size { background-position: -70px -72px; } + +#smart_editor2 .se2_text_tool .active .se2_font_size { background-position: -70px -103px; } + +#smart_editor2 .se2_text_tool .se2_bold { background-position: -115px -10px; } + +#smart_editor2 .se2_text_tool .hover .se2_bold { background-position: -115px -72px; } + +#smart_editor2 .se2_text_tool .active .se2_bold { background-position: -115px -103px; } + +#smart_editor2 .se2_text_tool .se2_underline { background-position: -136px -10px; } + +#smart_editor2 .se2_text_tool .hover .se2_underline { background-position: -136px -72px; } + +#smart_editor2 .se2_text_tool .active .se2_underline { background-position: -136px -103px; } + +#smart_editor2 .se2_text_tool .se2_italic { background-position: -157px -10px; } + +#smart_editor2 .se2_text_tool .hover .se2_italic { background-position: -157px -72px; } + +#smart_editor2 .se2_text_tool .active .se2_italic { background-position: -157px -103px; } + +#smart_editor2 .se2_text_tool .se2_tdel { background-position: -178px -10px; } + +#smart_editor2 .se2_text_tool .hover .se2_tdel { background-position: -178px -72px; } + +#smart_editor2 .se2_text_tool .active .se2_tdel { background-position: -178px -103px; } + +#smart_editor2 .se2_text_tool .se2_fcolor { position: relative; background-position: -199px -10px; } + +#smart_editor2 .se2_text_tool .hover .se2_fcolor { background-position: -199px -72px; } + +#smart_editor2 .se2_text_tool .active .se2_fcolor { background-position: -199px -103px; } + +#smart_editor2 .se2_text_tool .se2_fcolor_more { background-position: -220px -10px; width: 10px; } + +#smart_editor2 .se2_text_tool .hover .se2_fcolor_more { background-position: -220px -72px; } + +#smart_editor2 .se2_text_tool .active .se2_fcolor_more { background-position: -220px -103px; } + +#smart_editor2 .se2_text_tool .selected_color { position: absolute; top: 14px; left: 5px; width: 11px; height: 3px; font-size: 0; } + +#smart_editor2 .se2_text_tool .se2_ol, #smart_editor2 .se2_text_tool .active .se2_sub_text_tool .se2_ol { background-position: -345px -10px; } + +#smart_editor2 .se2_text_tool .se2_ul, #smart_editor2 .se2_text_tool .active .se2_sub_text_tool .se2_ul { background-position: -366px -10px; } + +#smart_editor2 .se2_text_tool .hover .se2_ol, #smart_editor2 .se2_text_tool .active .se2_sub_text_tool .hover .se2_ol { background-position: -345px -72px; } + +#smart_editor2 .se2_text_tool .hover .se2_ul, #smart_editor2 .se2_text_tool .active .se2_sub_text_tool .hover .se2_ul { background-position: -366px -72px; } + +#smart_editor2 .se2_text_tool .active .se2_ol, #smart_editor2 .se2_text_tool .active .active .se2_ol { background-position: -345px -103px; } + +#smart_editor2 .se2_text_tool .active .se2_ul, #smart_editor2 .se2_text_tool .active .active .se2_ul { background-position: -366px -103px; } + +#smart_editor2 .se2_text_tool .se2_indent, #smart_editor2 .se2_text_tool .active .se2_sub_text_tool .se2_indent { background-position: -408px -10px; } + +#smart_editor2 .se2_text_tool .se2_outdent, #smart_editor2 .se2_text_tool .active .se2_sub_text_tool .se2_outdent { background-position: -387px -10px; } + +#smart_editor2 .se2_text_tool .hover .se2_indent, #smart_editor2 .se2_text_tool .active .se2_sub_text_tool .hover .se2_indent { background-position: -408px -72px; } + +#smart_editor2 .se2_text_tool .hover .se2_outdent, #smart_editor2 .se2_text_tool .active .se2_sub_text_tool .hover .se2_outdent { background-position: -387px -72px; } + +#smart_editor2 .se2_text_tool .active .se2_indent, #smart_editor2 .se2_text_tool .active .active .se2_indent { background-position: -408px -103px; } + +#smart_editor2 .se2_text_tool .active .se2_outdent, #smart_editor2 .se2_text_tool .active .active .se2_outdent { background-position: -387px -103px; } + +#smart_editor2 .se2_text_tool .se2_lineheight { background-position: -429px -10px; } + +#smart_editor2 .se2_text_tool .hover .se2_lineheight { background-position: -429px -72px; } + +#smart_editor2 .se2_text_tool .active .se2_lineheight { background-position: -429px -103px; } + +#smart_editor2 .se2_text_tool .se2_url { background-position: -513px -10px; } + +#smart_editor2 .se2_text_tool .hover .se2_url { background-position: -513px -72px; } + +#smart_editor2 .se2_text_tool .active .se2_url { background-position: -513px -103px; } + +#smart_editor2 .se2_text_tool .se2_bgcolor { position: relative; background-position: -230px -10px; } + +#smart_editor2 .se2_text_tool .hover .se2_bgcolor { background-position: -230px -72px; } + +#smart_editor2 .se2_text_tool .active .se2_bgcolor { background-position: -230px -103px; } + +#smart_editor2 .se2_text_tool .se2_bgcolor_more { background-position: -251px -10px; width: 10px; } + +#smart_editor2 .se2_text_tool .hover .se2_bgcolor_more { background-position: -251px -72px; } + +#smart_editor2 .se2_text_tool .active .se2_bgcolor_more { background-position: -251px -103px; } + +#smart_editor2 .se2_text_tool .se2_left { background-position: -261px -10px; } + +#smart_editor2 .se2_text_tool .hover .se2_left { background-position: -261px -72px; } + +#smart_editor2 .se2_text_tool .active .se2_left { background-position: -261px -103px; } + +#smart_editor2 .se2_text_tool .se2_center { background-position: -282px -10px; } + +#smart_editor2 .se2_text_tool .hover .se2_center { background-position: -282px -72px; } + +#smart_editor2 .se2_text_tool .active .se2_center { background-position: -282px -103px; } + +#smart_editor2 .se2_text_tool .se2_right { background-position: -303px -10px; } + +#smart_editor2 .se2_text_tool .hover .se2_right { background-position: -303px -72px; } + +#smart_editor2 .se2_text_tool .active .se2_right { background-position: -303px -103px; } + +#smart_editor2 .se2_text_tool .se2_justify { background-position: -324px -10px; } + +#smart_editor2 .se2_text_tool .hover .se2_justify { background-position: -324px -72px; } + +#smart_editor2 .se2_text_tool .active .se2_justify { background-position: -324px -103px; } + +#smart_editor2 .se2_text_tool .se2_blockquote { background-position: -471px -10px; } + +#smart_editor2 .se2_text_tool .hover .se2_blockquote { background-position: -471px -72px; } + +#smart_editor2 .se2_text_tool .active .se2_blockquote { background-position: -471px -103px; } + +#smart_editor2 .se2_text_tool .se2_character { background-position: -555px -10px; } + +#smart_editor2 .se2_text_tool .hover .se2_character { background-position: -555px -72px; } + +#smart_editor2 .se2_text_tool .active .se2_character { background-position: -555px -103px; } + +#smart_editor2 .se2_text_tool .se2_table { background-position: -576px -10px; } + +#smart_editor2 .se2_text_tool .hover .se2_table { background-position: -576px -72px; } + +#smart_editor2 .se2_text_tool .active .se2_table { background-position: -576px -103px; } + +#smart_editor2 .se2_text_tool .se2_find { background-position: -597px -10px; } + +#smart_editor2 .se2_text_tool .hover .se2_find { background-position: -597px -72px; } + +#smart_editor2 .se2_text_tool .active .se2_find { background-position: -597px -103px; } + +#smart_editor2 .se2_text_tool .se2_sup { background-position: -660px -10px; } + +#smart_editor2 .se2_text_tool .hover .se2_sup { background-position: -660px -72px; } + +#smart_editor2 .se2_text_tool .active .se2_sup { background-position: -660px -103px; } + +#smart_editor2 .se2_text_tool .se2_sub { background-position: -681px -10px; } + +#smart_editor2 .se2_text_tool .hover .se2_sub { background-position: -681px -72px; } + +#smart_editor2 .se2_text_tool .active .se2_sub { background-position: -681px -103px; } + +#smart_editor2 .se2_text_tool .se2_text_tool_more { background-position: 0 -41px; width: 13px; } + +#smart_editor2 .se2_text_tool .se2_text_tool_more span.tool_bg { background: none; } + +#smart_editor2 .se2_text_tool .hover .se2_text_tool_more { background-position: -13px -41px; } + +#smart_editor2 .se2_text_tool .active .se2_text_tool_more { background-position: -26px -41px; } diff --git a/src/main/resources/static/res/front/lib/se/css/smart_editor2_in.css b/src/main/resources/static/res/front/lib/se/css/smart_editor2_in.css new file mode 100644 index 0000000..a75f249 --- /dev/null +++ b/src/main/resources/static/res/front/lib/se/css/smart_editor2_in.css @@ -0,0 +1,37 @@ +@charset "UTF-8"; +/* NHN Web Standardization Team (http://html.nhndesign.com/) HHJ 090226 */ +/* COMMON */ +body, .se2_inputarea { margin: 0; padding: 0; font-family: '돋움',Dotum,Helvetica,Sans-serif; font-size: 12px; line-height: 1.5; + font-size: 13px; + line-height: 21px; +} + +/* body,.se2_inputarea,.se2_inputarea th,.se2_inputarea td{margin:0;padding:0;font-family:'돋움',Dotum,Helvetica,Sans-serif;font-size:12px;line-height:1.5;color:#666} */ +.se2_inputarea p, .se2_inputarea br { margin: 0; padding: 0; } + +.se2_inputarea { margin: 15px; word-wrap: break-word; *word-wrap: normal; *word-break: break-all; } + +.se2_inputarea_890 { width: 741px; margin: 20px 0 10px 64px; } + +.se2_inputarea_698 { width: 548px; margin: 20px 0 10px 64px; } + +/* TEXT_TOOLBAR : QUOTE */ +.se2_quote1 { margin: 0 0 30px 20px; padding: 0 8px; border-left: 2px solid #ccc; color: #888; } + +.se2_quote2 { margin: 0 0 30px 13px; padding: 0 8px 0 16px; background: url("../img/bg_quote2.gif") 0 3px no-repeat; color: #888; } + +.se2_quote3 { margin: 0 0 30px; padding: 12px 10px 11px; border: 1px dashed #ccc; color: #888; } + +.se2_quote4 { margin: 0 0 30px; padding: 12px 10px 11px; border: 1px dashed #66b246; color: #888; } + +.se2_quote5 { margin: 0 0 30px; padding: 12px 10px 11px; border: 1px dashed #ccc; background: #fafafa; color: #888; } + +.se2_quote6 { margin: 0 0 30px; padding: 12px 10px 11px; border: 1px solid #e5e5e5; color: #888; } + +.se2_quote7 { margin: 0 0 30px; padding: 12px 10px 11px; border: 1px solid #66b246; color: #888; } + +.se2_quote8 { margin: 0 0 30px; padding: 12px 10px 11px; border: 1px solid #e5e5e5; background: #fafafa; color: #888; } + +.se2_quote9 { margin: 0 0 30px; padding: 12px 10px 11px; border: 2px solid #e5e5e5; color: #888; } + +.se2_quote10 { margin: 0 0 30px; padding: 12px 10px 11px; border: 2px solid #e5e5e5; background: #fafafa; color: #888; } diff --git a/src/main/resources/static/res/front/lib/se/css/smart_editor2_items.css b/src/main/resources/static/res/front/lib/se/css/smart_editor2_items.css new file mode 100644 index 0000000..acabb25 --- /dev/null +++ b/src/main/resources/static/res/front/lib/se/css/smart_editor2_items.css @@ -0,0 +1,894 @@ +@charset "UTF-8"; +/* NHN Web Standardization Team (http://html.nhndesign.com/) HHJ 090226 */ +/* TEXT_TOOLBAR : FONTNAME */ +#smart_editor2 .se2_tool .se2_l_font_fam { width: 202px; margin: 0; padding: 0; } + +#smart_editor2 .se2_tool .se2_l_font_fam li { display: block; width: 202px; height: 21px; margin: 0; padding: 0; color: #333; cursor: pointer; } + +#smart_editor2 .se2_l_font_fam .hover, #smart_editor2 .se2_l_font_fam .active { background: #ebebeb; } + +#smart_editor2 .se2_l_font_fam button { width: 200px; height: 21px; margin: 0; padding: 2px 0 2px 0px; background: none; text-align: left; } + +#smart_editor2 .se2_l_font_fam button span { display: block; visibility: visible; overflow: visible; position: relative; top: auto; left: auto; width: auto; height: auto; margin: 0 0 0 4px; padding: 0; font-size: 12px; line-height: normal; color: #333; } + +#smart_editor2 .se2_l_font_fam button span span { display: inline; visibility: visible; overflow: visible; width: auto; height: auto; margin: 0 0 0 4px; font-family: Verdana; font-size: 12px; line-height: 14px; color: #888; } + +#smart_editor2 .se2_l_font_fam button span em { visibility: visible; overflow: auto; position: static; width: auto; height: auto; margin-right: -4px; font-size: 12px; color: #888; } + +#smart_editor2 .se2_l_font_fam .se2_division { width: 162px; height: 2px !important; margin: 1px 0 1px 0px; border: 0; background: url("../img/bg_line1.gif") 0 0 repeat-x; font-size: 0; cursor: default; } + +/* TEXT_TOOLBAR : FONTSIZE */ +#smart_editor2 .se2_tool .se2_l_font_size { width: 302px; margin: 0; padding: 0; } + +#smart_editor2 .se2_tool .se2_l_font_size li { width: 302px; margin: 0; padding: 0; color: #333; cursor: pointer; } + +#smart_editor2 .se2_l_font_size .hover, #smart_editor2 .se2_l_font_size .active { background: #ebebeb; } + +#smart_editor2 .se2_l_font_size button { width: 300px; margin: 0; padding: 2px 0 1px 0px; *padding: 4px 0 1px 0px; background: none; text-align: left; } + +#smart_editor2 .se2_l_font_size button span { display: block; visibility: visible; overflow: visible; position: relative; top: auto; left: auto; width: auto; height: auto; margin: 0 0 0 4px; padding: 0; line-height: normal; color: #373737; letter-spacing: 0px; } + +#smart_editor2 .se2_l_font_size button span span { display: inline; margin: 0 0 0 5px; padding: 0; } + +#smart_editor2 .se2_l_font_size span em { visibility: visible; overflow: auto; position: static; width: auto; height: auto; color: #888; } + +/* TEXT_TOOLBAR : FONTCOLOR */ +#smart_editor2 .se2_palette { float: left; position: relative; width: 225px; margin: 0; padding: 11px 0 10px 0; } + +#smart_editor2 .se2_palette .se2_pick_color { _display: inline; float: left; clear: both; width: 205px; margin: 0 0 0 11px; padding: 0; } + +#smart_editor2 .se2_palette .se2_pick_color li { float: left; width: 12px; height: 12px; margin: 0; padding: 0; } + +#smart_editor2 .se2_palette .se2_pick_color li button { width: 11px; height: 11px; border: 0; } + +#smart_editor2 .se2_palette .se2_pick_color li button span { display: block; visibility: visible; overflow: visible; position: absolute; top: 1px; left: 1px; width: 11px; height: 11px; } + +#smart_editor2 .se2_palette .se2_pick_color li button span span { visibility: hidden; overflow: hidden; position: absolute; top: 0; left: 0; width: 0; height: 0; } + +#smart_editor2 .se2_palette .se2_pick_color .hover button, #smart_editor2 .se2_palette .se2_pick_color .active button { width: 11px; height: 11px; border: 1px solid #666; } + +#smart_editor2 .se2_palette .se2_pick_color .hover span, #smart_editor2 .se2_palette .se2_pick_color .active span { width: 7px; height: 7px; border: 1px solid #fff; } + +#smart_editor2 .se2_palette .se2_view_more { _display: inline; float: left; width: 46px; height: 23px; margin: 1px 0 0 1px; background: url("../img/ko_KR/btn_set.png?130306") 0 -47px no-repeat; } + +#smart_editor2 .se2_palette .se2_view_more2 { _display: inline; float: left; width: 46px; height: 23px; margin: 1px 0 0 1px; background: url("../img/ko_KR/btn_set.png?130306") 0 -24px no-repeat; } + +#smart_editor2 .se2_palette h4 { _display: inline; float: left; width: 203px; margin: 9px 0 0 11px; padding: 10px 0 4px 0; background: url("../img/bg_line1.gif") repeat-x; font-weight: normal; font-size: 12px; line-height: 14px; color: #333; letter-spacing: -1px; } + +#smart_editor2 .se2_palette2 { float: left; _float: none; width: 214px; margin: 9px 0 0 0; padding: 11px 0 0 11px; background: url("../img/bg_line1.gif") repeat-x; } + +#smart_editor2 .se2_palette2 .se2_color_set { float: left; } + +#smart_editor2 .se2_palette2 .se2_selected_color { _display: inline; float: left; width: 83px; height: 18px; margin: 0; border: 1px solid #c7c7c7; background: #fff; } + +#smart_editor2 .se2_palette2 .se2_selected_color span { _display: inline; float: left; width: 79px; height: 14px; margin: 2px; } + +#smart_editor2 .se2_palette2 .input_ty1 { _display: inline; float: left; width: 67px; height: 16px; margin: 0 3px 0 3px; padding: 2px 2px 0 4px; font-family: tahoma; font-size: 11px; } + +#smart_editor2 .se2_palette2 button.se2_btn_insert { float: left; width: 35px; height: 21px; margin-left: 2px; padding: 0; background: url("../img/ko_KR/btn_set.png?130306") -80px 0 no-repeat; } + +#smart_editor2 .se2_gradation1 { float: left; _float: none; width: 201px; height: 128px; margin: 4px 0 0 0; border: 1px solid #c7c7c7; cursor: crosshair; } + +#smart_editor2 .se2_gradation2 { float: left; _float: none; width: 201px; height: 10px; margin: 4px 0 1px 0; border: 1px solid #c7c7c7; cursor: crosshair; } + +/* TEXT_TOOLBAR : BGCOLOR */ +#smart_editor2 .se2_palette_bgcolor { width: 225px; margin: 11px 0 0; padding: 0; } + +#smart_editor2 .se2_palette_bgcolor .se2_background { width: 205px; margin: 0 11px 0 11px; } + +#smart_editor2 .se2_palette_bgcolor .se2_background li { width: 68px; height: 20px; } + +#smart_editor2 .se2_palette_bgcolor .se2_background button { width: 67px; height: 19px; border: 0; } + +#smart_editor2 .se2_palette_bgcolor .se2_background span { left: 0; display: block; visibility: visible; overflow: visible; width: 65px; height: 17px; padding: 0; } + +#smart_editor2 .se2_palette_bgcolor .se2_background span span { display: block; visibility: visible; overflow: visible; width: 64px; height: 16px; padding: 3px 0 0 3px; font-size: 11px; line-height: 14px; text-align: left; } + +#smart_editor2 .se2_palette_bgcolor .se2_background .hover span { width: 65px; height: 17px; border: 1px solid #666; } + +#smart_editor2 .se2_palette_bgcolor .se2_background .hover span span { width: 62px; height: 14px; padding: 1px 0 0 1px; border: 1px solid #fff; } + +/* TEXT_TOOLBAR : LINEHEIGHT */ +#smart_editor2 .se2_l_line_height { width: 107px; margin: 0; padding: 0; } + +#smart_editor2 .se2_l_line_height li { width: 107px; margin: 0; padding: 0; border-top: 0; border-bottom: 0; color: #333; cursor: pointer; } + +#smart_editor2 .se2_l_line_height .hover { background: #ebebeb; } + +#smart_editor2 .se2_l_line_height button { width: 105px; height: 19px; margin: 0; padding: 3px 0 2px 0px; background: none; text-align: left; } + +#smart_editor2 .se2_l_line_height button span { visibility: visible; overflow: visible; position: relative; width: auto; height: auto; margin: 0; padding: 0 0 0 15px; font-size: 12px; line-height: normal; color: #373737; } + +#smart_editor2 .se2_l_line_height li button.active span { background: url("../img/icon_set.gif") 5px -30px no-repeat; } + +#smart_editor2 .se2_l_line_height_user { clear: both; width: 83px; margin: 5px 0 0 12px; padding: 10px 0 0 0; _padding: 11px 0 0 0; background: url("../img/bg_line1.gif") repeat-x; } + +#smart_editor2 .se2_l_line_height_user h3 { margin: 0 0 4px 0; _margin: 0 0 2px -1px; padding: 0; line-height: 14px; color: #000; letter-spacing: -1px; } + +#smart_editor2 .se2_l_line_height_user .bx_input { display: block; position: relative; width: 83px; } + +#smart_editor2 .se2_l_line_height_user .btn_up { position: absolute; top: 2px; *top: 3px; left: 68px; width: 13px; height: 8px; background: url("../img/ko_KR/btn_set.png?130306") -86px -54px no-repeat; } + +#smart_editor2 .se2_l_line_height_user .btn_down { position: absolute; top: 10px; *top: 11px; left: 68px; width: 13px; height: 8px; background: url("../img/ko_KR/btn_set.png?130306") -86px -62px no-repeat; } + +#smart_editor2 .se2_l_line_height_user .btn_area { margin: 5px 0 10px 0; } + +#smart_editor2 .se2_tool .btn_area .se2_btn_apply3 { width: 41px; height: 24px; background: url("../img/ko_KR/btn_set.png?130306") no-repeat; } + +#smart_editor2 .se2_tool .btn_area .se2_btn_cancel3 { width: 39px; height: 24px; margin-left: 3px; background: url("../img/ko_KR/btn_set.png?130306") -41px 0 no-repeat; } + +/* TEXT_TOOLBAR : QUOTE */ +#smart_editor2 .se2_quote { width: 425px; height: 56px; } + +#smart_editor2 .se2_quote ul { _display: inline; float: left; margin: 11px 0 0 9px; padding: 0; } + +#smart_editor2 .se2_quote li { _display: inline; float: left; margin: 0 0 0 2px; padding: 0; } + +#smart_editor2 .se2_quote button { width: 34px; height: 34px; margin: 0; padding: 0; background: url("../img/ko_KR/btn_set.png?130306") no-repeat; cursor: pointer; } + +#smart_editor2 .se2_quote button span { left: 0; display: block; visibility: visible; overflow: visible; width: 32px; height: 32px; margin: 0; padding: 0; border: 1px solid #c7c7c7; } + +#smart_editor2 .se2_quote button span span { visibility: hidden; overflow: hidden; position: absolute; top: 0; left: 0; width: 0; height: 0; margin: 0; padding: 0; } + +#smart_editor2 .se2_quote .se2_quote1 { background-position: 1px -375px; } + +#smart_editor2 .se2_quote .se2_quote2 { background-position: -32px -375px; } + +#smart_editor2 .se2_quote .se2_quote3 { background-position: -65px -375px; } + +#smart_editor2 .se2_quote .se2_quote4 { background-position: -98px -375px; } + +#smart_editor2 .se2_quote .se2_quote5 { background-position: -131px -375px; } + +#smart_editor2 .se2_quote .se2_quote6 { background-position: -164px -375px; } + +#smart_editor2 .se2_quote .se2_quote7 { background-position: -197px -375px; } + +#smart_editor2 .se2_quote .se2_quote8 { background-position: -230px -375px; } + +#smart_editor2 .se2_quote .se2_quote9 { background-position: -263px -375px; } + +#smart_editor2 .se2_quote .se2_quote10 { background-position: -296px -375px; } + +#smart_editor2 .se2_quote .hover button span, #smart_editor2 .se2_quote .active button span { width: 30px; height: 30px; margin: 0; padding: 0; border: 2px solid #44b525; } + +#smart_editor2 .se2_quote .hover button span span, #smart_editor2 .se2_quote .active button span span { visibility: hidden; overflow: hidden; position: absolute; top: 0; left: 0; width: 0; height: 0; margin: 0; padding: 0; } + +#smart_editor2 .se2_quote .se2_cancel2 { float: left; width: 40px; height: 35px; margin: 11px 0 0 5px; background: url("../img/ko_KR/btn_set.png?130306") -46px -24px no-repeat; } + +#smart_editor2 .se2_quote .se2_cancel2 span { visibility: hidden; overflow: hidden; position: absolute; top: 0; left: 0; width: 0; height: 0; margin: 0; padding: 0; } + +/* TEXT_TOOLBAR : HYPERLINK */ +#smart_editor2 .se2_url2 { width: 281px; padding: 11px 11px 6px 11px; color: #666; } + +#smart_editor2 .se2_url2 .input_ty1 { display: block; width: 185px; height: 16px; margin: 0 5px 5px 0; *margin: -1px 5px 5px 0; padding: 5px 2px 0 4px; } + +#smart_editor2 .se2_url2 .se2_url_new { width: 15px; height: 15px; margin: -1px 3px 1px -1px; *margin: -2px 3px 2px -1px; vertical-align: middle; } + +#smart_editor2 .se2_url2 label { font-size: 11px; line-height: 14px; vertical-align: middle; } + +#smart_editor2 .se2_url2 .se2_apply { position: absolute; top: 13px; right: 51px; width: 41px; height: 24px; margin: -1px 3px 1px 0; background: url("../img/ko_KR/btn_set.png?130306") no-repeat; } + +#smart_editor2 .se2_url2 .se2_cancel { position: absolute; top: 13px; right: 9px; width: 39px; height: 24px; margin: -1px 3px 1px 0; background: url("../img/ko_KR/btn_set.png?130306") -41px 0 no-repeat; } + +/* TEXT_TOOLBAR : SCHARACTER */ +#smart_editor2 .se2_bx_character { width: 469px; height: 272px; margin: 0; padding: 0; background: url("../img/ko_KR/bx_set_110302.gif") 9px -1230px no-repeat; } + +#smart_editor2 .se2_bx_character .se2_char_tab { _display: inline; float: left; position: relative; width: 443px; margin: 11px 10px 200px 11px; padding: 0 0 0 1px; } + +#smart_editor2 .se2_bx_character .se2_char_tab li { position: static; margin: 0 0 0 -1px; padding: 0; } + +#smart_editor2 .se2_bx_character .se2_char1 { width: 76px; height: 26px; background: url("../img/ko_KR/btn_set.png?130306") 0 -204px no-repeat; } + +#smart_editor2 .se2_bx_character .se2_char2 { width: 86px; height: 26px; background: url("../img/ko_KR/btn_set.png?130306") -75px -204px no-repeat; } + +#smart_editor2 .se2_bx_character .se2_char3 { width: 68px; height: 26px; background: url("../img/ko_KR/btn_set.png?130306") -160px -204px no-repeat; } + +#smart_editor2 .se2_bx_character .se2_char4 { width: 55px; height: 26px; background: url("../img/ko_KR/btn_set.png?130306") -227px -204px no-repeat; } + +#smart_editor2 .se2_bx_character .se2_char5 { width: 97px; height: 26px; background: url("../img/ko_KR/btn_set.png?130306") -281px -204px no-repeat; } + +#smart_editor2 .se2_bx_character .se2_char6 { width: 66px; height: 26px; background: url("../img/ko_KR/btn_set.png?130306") -377px -204px no-repeat; } + +#smart_editor2 .se2_bx_character .active .se2_char1 { width: 76px; height: 26px; background: url("../img/ko_KR/btn_set.png?130306") 0 -230px no-repeat; } + +#smart_editor2 .se2_bx_character .active .se2_char2 { width: 86px; height: 26px; background: url("../img/ko_KR/btn_set.png?130306") -75px -230px no-repeat; } + +#smart_editor2 .se2_bx_character .active .se2_char3 { width: 68px; height: 26px; background: url("../img/ko_KR/btn_set.png?130306") -160px -230px no-repeat; } + +#smart_editor2 .se2_bx_character .active .se2_char4 { width: 55px; height: 26px; background: url("../img/ko_KR/btn_set.png?130306") -227px -230px no-repeat; } + +#smart_editor2 .se2_bx_character .active .se2_char5 { width: 97px; height: 26px; background: url("../img/ko_KR/btn_set.png?130306") -281px -230px no-repeat; } + +#smart_editor2 .se2_bx_character .active .se2_char6 { width: 66px; height: 26px; background: url("../img/ko_KR/btn_set.png?130306") -377px -230px no-repeat; } + +#smart_editor2 .se2_bx_character .se2_s_character { display: none; position: absolute; top: 26px; left: 0; width: 448px; height: 194px; margin: 0; padding: 0; } + +#smart_editor2 .se2_bx_character .active .se2_s_character { display: block; } + +#smart_editor2 .se2_bx_character .se2_s_character ul { float: left; width: 422px; height: 172px; margin: 0; padding: 9px 0 0 11px; } + +#smart_editor2 .se2_bx_character .se2_s_character li { _display: inline; float: left; position: relative; width: 20px; height: 18px; margin: 0 0 1px 1px; background: #fff; } + +#smart_editor2 .se2_bx_character .se2_s_character button { width: 20px; height: 18px; margin: 0; padding: 2px; background: none; } + +#smart_editor2 .se2_bx_character .se2_s_character .hover, #smart_editor2 .se2_bx_character .se2_s_character .active { background: url("../img/ko_KR/btn_set.png?130306") -446px -274px no-repeat; } + +#smart_editor2 .se2_bx_character .se2_s_character button span { left: 0; display: block; visibility: visible; overflow: visible; width: 14px; height: 16px; margin: 3px 0 0 3px; border: 0; background: none; font-size: 12px; line-height: normal; } + +#smart_editor2 .se2_apply_character { clear: both; position: relative; padding: 0 0 0 11px; } + +#smart_editor2 .se2_apply_character label { margin: 0 3px 0 0; font-size: 12px; color: #666; letter-spacing: -1px; } + +#smart_editor2 .se2_apply_character .input_ty1 { width: 283px; height: 17px; margin: -1px 5px 1px 0; padding: 4px 0 0 5px; font-size: 12px; color: #666; letter-spacing: 0; vertical-align: middle; } + +#smart_editor2 .se2_apply_character .se2_confirm { width: 41px; height: 24px; margin-right: 3px; background: url("../img/ko_KR/btn_set.png?130306") no-repeat; vertical-align: middle; } + +#smart_editor2 .se2_apply_character .se2_cancel { width: 39px; height: 24px; background: url("../img/ko_KR/btn_set.png?130306") -41px 0 no-repeat; vertical-align: middle; } + +/* TEXT_TOOLBAR : TABLECREATOR */ +#smart_editor2 .se2_table_set { position: relative; width: 166px; margin: 3px 11px 0 11px; padding: 8px 0 0 0; } + +#smart_editor2 .se2_table_set .se2_cell_num { float: left; width: 73px; } + +#smart_editor2 .se2_table_set .se2_cell_num dt { float: left; clear: both; width: 17px; height: 23px; margin: 0; padding: 0; } + +#smart_editor2 .se2_table_set .se2_cell_num dt label { display: block; margin: 5px 0 0 0; font-size: 11px; color: #666; } + +#smart_editor2 .se2_table_set .se2_cell_num dd { float: left; position: relative; width: 54px; height: 23px; margin: 0; padding: 0; } + +#smart_editor2 .se2_table_set .se2_cell_num .input_ty2 { display: block; width: 32px; height: 16px; *margin: -1px 0 0 0; padding: 2px 19px 0 0px; border: 1px solid #c7c7c7; font-family: tahoma,verdana,times New Roman; font-size: 11px; color: #666; text-align: right; } + +#smart_editor2 .se2_table_set .se2_cell_num .input_ty2::-ms-clear { display: none; } + +#smart_editor2 .se2_table_set .se2_pre_table { float: right; width: 91px; height: 43px; background: #c7c7c7; border-spacing: 1px; } + +#smart_editor2 .se2_table_set .se2_pre_table tr { background: #fff; } + +#smart_editor2 .se2_table_set .se2_pre_table td { font-size: 0; line-height: 0; } + +#smart_editor2 .se2_table_set .se2_add { position: absolute; top: 2px; right: 3px; width: 13px; height: 8px; background: url("../img/ko_KR/btn_set.png?130306") -86px -54px no-repeat; } + +#smart_editor2 .se2_table_set .se2_del { position: absolute; top: 10px; right: 3px; width: 13px; height: 8px; background: url("../img/ko_KR/btn_set.png?130306") -86px -62px no-repeat; } + +/* TEXT_TOOLBAR : TABLEEDITOR */ +#smart_editor2 .se2_table_set .se2_t_proper1 { float: left; width: 166px; margin: 7px 0 0 0; padding: 10px 0 5px; background: url("../img/bg_line1.gif") repeat-x; } + +#smart_editor2 .se2_table_set .se2_t_proper1 dt { width: 166px; margin: 0 0 6px 0; } + +#smart_editor2 .se2_table_set .se2_t_proper1 dd { width: 166px; } + +#smart_editor2 .se2_table_set .se2_t_proper1 dt input { width: 15px; height: 15px; margin: -1px 3px 1px 0; _margin: -2px 3px 2px 0; vertical-align: middle; } + +#smart_editor2 .se2_table_set .se2_t_proper1 dt label { font-weight: bold; font-size: 11px; color: #666; letter-spacing: -1px; vertical-align: middle; } + +#smart_editor2 .se2_table_set .se2_t_proper1_1 { float: left; position: relative; z-index: 59; width: 166px; margin: 1px 0 0 0; } + +#smart_editor2 .se2_table_set .se2_t_proper1_2 { z-index: 54; margin: 0; } + +#smart_editor2 .se2_table_set .se2_t_proper1_3 { z-index: 53; margin: 0; } + +#smart_editor2 .se2_table_set .se2_t_proper1_4 { z-index: 52; margin: 0; } + +#smart_editor2 .se2_table_set .se2_t_proper1_1 dt { _display: inline; float: left; clear: both; width: 66px; height: 22px; margin: 1px 0 0 18px; } + +#smart_editor2 .se2_table_set .se2_t_proper1_1 dt label { display: block; margin: 4px 0 0 0; font-weight: normal; font-size: 11px; color: #666; letter-spacing: -1px; } + +#smart_editor2 .se2_table_set .se2_t_proper1_1 dd { float: left; position: relative; width: 82px; height: 23px; } + +#smart_editor2 .se2_table_set .se2_t_proper1_1 .input_ty1 { width: 72px; height: 16px; *margin: -1px 0 0 0; padding: 2px 2px 0 6px; font-family: tahoma,verdana,times New Roman; font-size: 11px; color: #666; } + +#smart_editor2 .se2_table_set .se2_t_proper1_1 .input_ty3 { float: left; width: 49px; height: 16px; margin: 0 3px 0 0; padding: 2px 4px 0 4px; border: 1px solid #c7c7c7; font-family: tahoma,verdana,times New Roman; font-size: 11px; color: #666; } + +#smart_editor2 .se2_table_set .se2_t_proper1_1 .se2_add { top: 2px; right: 2px; } + +#smart_editor2 .se2_table_set .se2_t_proper1_1 .se2_del { top: 10px; right: 2px; } + +#smart_editor2 .se2_table_set .se2_t_proper1_1 .se2_color_set .input_ty1 { _display: inline; float: left; width: 67px; height: 16px; margin: 0 3px 0 3px; padding: 2px 2px 0 4px; font-family: tahoma,verdana,times New Roman; font-size: 11px; } + +#smart_editor2 .se2_select_ty1 { position: relative; width: 80px; height: 18px; border: 1px solid #c7c7c7; background: #fff; font-size: 11px; line-height: 14px; text-align: left; } + +#smart_editor2 .se2_select_ty1 span { float: left; width: 54px; height: 18px; margin: 0 0 0 5px; font-size: 11px; line-height: 14px; color: #666; } + +#smart_editor2 .se2_select_ty1 .se2_b_style0 { position: relative; top: 3px; left: -3px; white-space: nowrap; } + +#smart_editor2 .se2_select_ty1 .se2_b_style1 { height: 15px; margin: 3px 0 0 4px; font-size: 11px; line-height: 14px; color: #666; letter-spacing: -1px; } + +#smart_editor2 .se2_select_ty1 .se2_b_style2 { background: url("../img/bg_set.gif") 0 -50px repeat-x; } + +#smart_editor2 .se2_select_ty1 .se2_b_style3 { background: url("../img/bg_set.gif") 0 -68px repeat-x; } + +#smart_editor2 .se2_select_ty1 .se2_b_style4 { background: url("../img/bg_set.gif") 0 -85px repeat-x; } + +#smart_editor2 .se2_select_ty1 .se2_b_style5 { background: url("../img/bg_set.gif") 0 -103px repeat-x; } + +#smart_editor2 .se2_select_ty1 .se2_b_style6 { background: url("../img/bg_set.gif") 0 -121px repeat-x; } + +#smart_editor2 .se2_select_ty1 .se2_b_style7 { background: url("../img/bg_set.gif") 0 -139px repeat-x; } + +#smart_editor2 .se2_select_ty1 .se2_view_more { position: absolute; top: 1px; right: 1px; width: 13px; height: 16px; background: url("../img/ko_KR/btn_set.png?130306") -112px -54px no-repeat; } + +#smart_editor2 .se2_select_ty1 .se2_view_more2 { position: absolute; top: 1px; right: 1px; width: 13px; height: 16px; background: url("../img/ko_KR/btn_set.png?130306") -99px -54px no-repeat; } + +/* TEXT_TOOLBAR : TABLEEDITOR > BORDER */ +#smart_editor2 .se2_table_set .se2_b_t_b1 { border-top: 1px solid #b1b1b1; } + +#smart_editor2 .se2_layer_b_style { position: absolute; top: 20px; right: 0px; width: 80px; padding-bottom: 1px; border: 1px solid #c7c7c7; border-top: 1px solid #a8a8a8; background: #fff; } + +#smart_editor2 .se2_layer_b_style ul { width: 80px; margin: 0; padding: 1px 0 0 0; } + +#smart_editor2 .se2_layer_b_style li { width: 80px; height: 18px; margin: 0; padding: 0; } + +#smart_editor2 .se2_layer_b_style .hover, #smart_editor2 .se2_layer_b_style .active { background: #ebebeb; } + +#smart_editor2 .se2_layer_b_style button { width: 80px; height: 18px; background: none; } + +#smart_editor2 .se2_layer_b_style button span { left: 0; display: block; visibility: visible; overflow: visible; width: 71px; height: 18px; margin: 0 0 0 5px; font-size: 11px; line-height: 15px; text-align: left; } + +#smart_editor2 .se2_layer_b_style button span span { visibility: hidden; overflow: hidden; position: absolute; top: 0; left: 0; width: 0; height: 0; } + +#smart_editor2 .se2_layer_b_style .se2_b_style1 span { margin: 3px 0 0 4px; font-size: 11px; line-height: 14px; color: #666; letter-spacing: -1px; } + +#smart_editor2 .se2_layer_b_style .se2_b_style2 span { background: url("../img/bg_set.gif") 0 -50px repeat-x; } + +#smart_editor2 .se2_layer_b_style .se2_b_style3 span { background: url("../img/bg_set.gif") 0 -68px repeat-x; } + +#smart_editor2 .se2_layer_b_style .se2_b_style4 span { background: url("../img/bg_set.gif") 0 -86px repeat-x; } + +#smart_editor2 .se2_layer_b_style .se2_b_style5 span { background: url("../img/bg_set.gif") 0 -103px repeat-x; } + +#smart_editor2 .se2_layer_b_style .se2_b_style6 span { background: url("../img/bg_set.gif") 0 -121px repeat-x; } + +#smart_editor2 .se2_layer_b_style .se2_b_style7 span { background: url("../img/bg_set.gif") 0 -139px repeat-x; } + +/* TEXT_TOOLBAR : TABLEEDITOR > COLOR */ +#smart_editor2 .se2_pre_color { float: left; width: 18px; height: 18px; border: 1px solid #c7c7c7; } + +#smart_editor2 .se2_pre_color button { float: left; width: 14px; height: 14px; margin: 2px 0 0 2px; padding: 0; } + +#smart_editor2 .se2_pre_color button span { overflow: hidden; position: absolute; top: -10000px; left: -10000px; z-index: -100; width: 0; height: 0; } + +/* TEXT_TOOLBAR : TABLEEDITOR > DIMMED */ +#smart_editor2 .se2_table_set .se2_t_dim1 { clear: both; position: absolute; top: 71px; left: 16px; z-index: 60; width: 157px; height: 118px; background: #fafafa; opacity: 0.5; filter: alpha(opacity=50); } + +#smart_editor2 .se2_table_set .se2_t_dim2 { position: absolute; top: 116px; left: 16px; z-index: 55; width: 157px; height: 45px; background: #fafafa; opacity: 0.5; filter: alpha(opacity=50); } + +#smart_editor2 .se2_table_set .se2_t_dim3 { clear: both; position: absolute; top: 192px; left: 16px; z-index: 51; width: 157px; height: 39px; background: #fafafa; opacity: 0.5; filter: alpha(opacity=50); } + +/* TEXT_TOOLBAR : TABLEEDITOR > STYLE PREVIEW */ +#smart_editor2 .se2_table_set .se2_t_proper2 { float: left; position: relative; z-index: 50; width: 166px; margin: 2px 0 0 0; } + +#smart_editor2 .se2_table_set .se2_t_proper2 dt { float: left; width: 84px; height: 33px; margin: 4px 0 0 0; } + +#smart_editor2 .se2_table_set .se2_t_proper2 dt input { width: 15px; height: 15px; margin: -1px 3px 1px 0; _margin: -2px 3px 2px 0; vertical-align: middle; } + +#smart_editor2 .se2_table_set .se2_t_proper2 dt label { font-weight: bold; font-size: 11px; color: #666; letter-spacing: -1px; vertical-align: middle; } + +#smart_editor2 .se2_table_set .se2_t_proper2 dd { float: left; width: 66px; height: 33px; } + +#smart_editor2 .se2_select_ty2 { position: relative; width: 65px; height: 31px; border: 1px solid #c7c7c7; background: #fff; font-size: 11px; line-height: 14px; text-align: left; } + +#smart_editor2 .se2_select_ty2 span { float: left; width: 45px; height: 25px; margin: 3px 0 0 3px; background: url("../img/ko_KR/btn_set.png?130306") repeat-x; } + +#smart_editor2 .se2_select_ty2 .se2_t_style1 { background-position: 0 -410px; } + +#smart_editor2 .se2_select_ty2 .se2_t_style2 { background-position: -46px -410px; } + +#smart_editor2 .se2_select_ty2 .se2_t_style3 { background-position: -92px -410px; } + +#smart_editor2 .se2_select_ty2 .se2_t_style4 { background-position: -138px -410px; } + +#smart_editor2 .se2_select_ty2 .se2_t_style5 { background-position: -184px -410px; } + +#smart_editor2 .se2_select_ty2 .se2_t_style6 { background-position: -230px -410px; } + +#smart_editor2 .se2_select_ty2 .se2_t_style7 { background-position: -276px -410px; } + +#smart_editor2 .se2_select_ty2 .se2_t_style8 { background-position: -322px -410px; } + +#smart_editor2 .se2_select_ty2 .se2_t_style9 { background-position: 0 -436px; } + +#smart_editor2 .se2_select_ty2 .se2_t_style10 { background-position: -46px -436px; } + +#smart_editor2 .se2_select_ty2 .se2_t_style11 { background-position: -92px -436px; } + +#smart_editor2 .se2_select_ty2 .se2_t_style12 { background-position: -138px -436px; } + +#smart_editor2 .se2_select_ty2 .se2_t_style13 { background-position: -184px -436px; } + +#smart_editor2 .se2_select_ty2 .se2_t_style14 { background-position: -230px -436px; } + +#smart_editor2 .se2_select_ty2 .se2_t_style15 { background-position: -276px -436px; } + +#smart_editor2 .se2_select_ty2 .se2_t_style16 { background-position: -322px -436px; } + +#smart_editor2 .se2_select_ty2 .se2_view_more { position: absolute; top: 1px; right: 1px; _right: 0px; width: 13px !important; height: 29px !important; background: url("../img/ko_KR/btn_set.png?130306") -353px -48px no-repeat !important; } + +#smart_editor2 .se2_select_ty2 .se2_view_more2 { position: absolute; top: 1px; right: 1px; _right: 0px; width: 13px !important; height: 29px !important; background: url("../img/ko_KR/btn_set.png?130306") -340px -48px no-repeat !important; } + +#smart_editor2 .se2_select_ty2 .se2_view_more span { display: none; } + +/* TEXT_TOOLBAR : TABLEEDITOR > STYLE */ +#smart_editor2 .se2_layer_t_style { position: absolute; top: 33px; right: 15px; width: 208px; border: 1px solid #c7c7c7; border-top: 1px solid #a8a8a8; background: #fff; } + +#smart_editor2 .se2_layer_t_style ul { width: 204px; height: 126px; margin: 1px 2px; padding: 1px 0 0 0; background: #fff; } + +#smart_editor2 .se2_layer_t_style li { _display: inline; float: left; width: 45px; height: 25px; margin: 1px; padding: 1px; border: 1px solid #fff; } + +#smart_editor2 .se2_layer_t_style .hover, #smart_editor2 .se2_layer_t_style .active { border: 1px solid #666; background: #fff; } + +#smart_editor2 .se2_layer_t_style button { width: 45px; height: 25px; background: url("../img/ko_KR/btn_set.png?130306") repeat-x !important; } + +#smart_editor2 .se2_layer_t_style .se2_t_style1 { background-position: 0 -410px !important; } + +#smart_editor2 .se2_layer_t_style .se2_t_style2 { background-position: -46px -410px !important; } + +#smart_editor2 .se2_layer_t_style .se2_t_style3 { background-position: -92px -410px !important; } + +#smart_editor2 .se2_layer_t_style .se2_t_style4 { background-position: -138px -410px !important; } + +#smart_editor2 .se2_layer_t_style .se2_t_style5 { background-position: -184px -410px !important; } + +#smart_editor2 .se2_layer_t_style .se2_t_style6 { background-position: -230px -410px !important; } + +#smart_editor2 .se2_layer_t_style .se2_t_style7 { background-position: -276px -410px !important; } + +#smart_editor2 .se2_layer_t_style .se2_t_style8 { background-position: -322px -410px !important; } + +#smart_editor2 .se2_layer_t_style .se2_t_style9 { background-position: 0 -436px !important; } + +#smart_editor2 .se2_layer_t_style .se2_t_style10 { background-position: -46px -436px !important; } + +#smart_editor2 .se2_layer_t_style .se2_t_style11 { background-position: -92px -436px !important; } + +#smart_editor2 .se2_layer_t_style .se2_t_style12 { background-position: -138px -436px !important; } + +#smart_editor2 .se2_layer_t_style .se2_t_style13 { background-position: -184px -436px !important; } + +#smart_editor2 .se2_layer_t_style .se2_t_style14 { background-position: -230px -436px !important; } + +#smart_editor2 .se2_layer_t_style .se2_t_style15 { background-position: -276px -436px !important; } + +#smart_editor2 .se2_layer_t_style .se2_t_style16 { background-position: -322px -436px !important; } + +#smart_editor2 .se2_table_set .se2_btn_area { float: left; width: 166px; margin: 6px 0 0 0; padding: 12px 0 8px 0; background: url("../img/bg_line1.gif") repeat-x; text-align: center; } + +#smart_editor2 .se2_table_set button.se2_apply { width: 41px; height: 24px; margin-right: 3px; background: url("../img/ko_KR/btn_set.png?130306") no-repeat; } + +#smart_editor2 .se2_table_set button.se2_cancel { width: 39px; height: 24px; background: url("../img/ko_KR/btn_set.png?130306") -41px 0 no-repeat; } + +#smart_editor2 .se2_table_set .se2_rd { width: 14px; height: 14px; vertical-align: middle; } + +#smart_editor2 .se2_table_set .se2_celltit { font-size: 11px; font-size: 11px; color: #666; letter-spacing: -1px; } + +#smart_editor2 .se2_table_set dt label.se2_celltit { display: inline; } + +/* TEXT_TOOLBAR : FINDREPLACE */ +#smart_editor2 .se2_bx_find_revise { position: relative; width: 255px; margin: 0; padding: 0; } + +#smart_editor2 .se2_bx_find_revise .se2_close { position: absolute; top: 5px; right: 8px; width: 20px; height: 20px; background: url("../img/ko_KR/btn_set.png?130306") -151px -1px no-repeat; } + +#smart_editor2 .se2_bx_find_revise h3 { margin: 0; padding: 10px 0 13px 10px; background: url("../img/bg_find_h3.gif") 0 -1px repeat-x; font-size: 12px; line-height: 14px; letter-spacing: -1px; } + +#smart_editor2 .se2_bx_find_revise ul { position: relative; margin: 8px 0 0 0; padding: 0 0 0 12px; } + +#smart_editor2 .se2_bx_find_revise ul li { _display: inline; float: left; position: static; margin: 0 0 0 -1px; padding: 0; } + +#smart_editor2 .se2_bx_find_revise .se2_tabfind { width: 117px; height: 26px; background: url("../img/ko_KR/btn_set.png?130306") 0 -100px no-repeat; } + +#smart_editor2 .se2_bx_find_revise .se2_tabrevise { width: 117px; height: 26px; background: url("../img/ko_KR/btn_set.png?130306") -116px -100px no-repeat; } + +#smart_editor2 .se2_bx_find_revise .active .se2_tabfind { width: 117px; height: 26px; background: url("../img/ko_KR/btn_set.png?130306") 0 -126px no-repeat; } + +#smart_editor2 .se2_bx_find_revise .active .se2_tabrevise { width: 117px; height: 26px; background: url("../img/ko_KR/btn_set.png?130306") -116px -126px no-repeat; } + +#smart_editor2 .se2_bx_find_revise .se2_in_bx_find dl { _display: inline; float: left; width: 223px; margin: 0 0 0 9px; padding: 7px 0 13px 14px; background: url("../img/ko_KR/bx_set_110302.gif") -289px -1518px no-repeat; } + +#smart_editor2 .se2_bx_find_revise .se2_in_bx_revise dl { _display: inline; float: left; width: 223px; margin: 0 0 0 9px; padding: 7px 0 13px 14px; background: url("../img/ko_KR/bx_set_110302.gif") -289px -1619px no-repeat; } + +#smart_editor2 .se2_bx_find_revise dt { _display: inline; float: left; clear: both; width: 47px; margin: 1px 0 2px 0; } + +#smart_editor2 .se2_bx_find_revise dd { float: left; margin: 0 0 2px 0; } + +#smart_editor2 .se2_bx_find_revise label { float: left; padding: 5px 0 0 0; font-size: 11px; color: #666; letter-spacing: -2px; } + +#smart_editor2 .se2_bx_find_revise input { float: left; width: 155px; height: 12px; margin: 1px 0 0 0; padding: 3px 2px 3px 4px; font-size: 12px; color: #666; } + +#smart_editor2 .se2_bx_find_revise .se2_find_btns { float: left; clear: both; width: 255px; padding: 8px 0 10px 0; text-align: center; } + +#smart_editor2 .se2_bx_find_revise .se2_find_next { width: 65px; height: 24px; margin: 0 3px 0 0; background: url("../img/ko_KR/btn_set.png?130306") -180px -48px no-repeat; } + +#smart_editor2 .se2_bx_find_revise .se2_find_next2 { width: 61px; height: 24px; margin: 0 3px 0 0; background: url("../img/ko_KR/btn_set.png?130306") -180px -24px no-repeat; } + +#smart_editor2 .se2_bx_find_revise .se2_revise1 { width: 54px; height: 24px; margin: 0 3px 0 0; background: url("../img/ko_KR/btn_set.png?130306") -245px -48px no-repeat; } + +#smart_editor2 .se2_bx_find_revise .se2_revise2 { width: 70px; height: 24px; margin: 0 3px 0 0; background: url("../img/ko_KR/btn_set.png?130306") -245px -24px no-repeat; } + +#smart_editor2 .se2_bx_find_revise .se2_cancel { width: 39px; height: 24px; background: url("../img/ko_KR/btn_set.png?130306") -41px 0 no-repeat; } + +/* TEXT_TOOLBAR : QUICKEDITOR_TABLE */ +#smart_editor2 .se2_qmax { position: absolute; width: 18px; height: 18px; background: url("../img/ko_KR/btn_set.png?130306") -339px -169px no-repeat; } + +#smart_editor2 .se2_qeditor { position: absolute; top: 0; left: 0; width: 183px; margin: 0; padding: 0; border: 1px solid #c7c7c7; border-right: 1px solid #ababab; border-bottom: 1px solid #ababab; background: #fafafa; } + +#smart_editor2 .se2_qeditor label, #smart_editor2 .se2_qeditor span, #smart_editor2 .se2_qeditor dt { font-size: 11px; color: #666; letter-spacing: -1px; } + +#smart_editor2 .se2_qbar { position: relative; width: 183px; height: 11px; background: url("../img/ko_KR/bx_set_110302.gif") 0 -731px no-repeat; } + +#smart_editor2 .se2_qbar .se2_qmini { position: absolute; top: -1px; right: 0; *right: -1px; _right: -3px; width: 18px; height: 14px; background: url("../img/ko_KR/btn_set.png?130306") -315px -170px no-repeat; } + +#smart_editor2 .se2_qbar .se2_qmini button { width: 20px; height: 14px; margin-top: -1px; } + +#smart_editor2 .se2_qeditor .se2_qbody0 { float: left; border: 1px solid #fefefe; } + +#smart_editor2 .se2_qeditor .se2_qbody { position: relative; z-index: 90; width: 174px; padding: 4px 0 0 7px; } + +#smart_editor2 .se2_qeditor .se2_qe1 { overflow: hidden; width: 174px; } + +#smart_editor2 .se2_qeditor .se2_qe1 dt { float: left; width: 22px; height: 18px; padding: 4px 0 0 0; } + +#smart_editor2 .se2_qeditor .se2_qe1 dd { float: left; width: 65px; height: 22px; } + +#smart_editor2 .se2_qeditor .se2_addrow { width: 28px; height: 19px; background: url("../img/ko_KR/btn_set.png?130306") no-repeat -385px -49px; } + +#smart_editor2 .se2_qeditor .se2_addcol { width: 29px; height: 19px; background: url("../img/ko_KR/btn_set.png?130306") no-repeat -413px -49px; } + +#smart_editor2 .se2_qeditor .se2_seprow { width: 28px; height: 19px; background: url("../img/ko_KR/btn_set.png?130306") no-repeat -385px -68px; } + +#smart_editor2 .se2_qeditor .se2_sepcol { width: 29px; height: 19px; background: url("../img/ko_KR/btn_set.png?130306") no-repeat -413px -68px; } + +#smart_editor2 .se2_qeditor .se2_delrow { width: 28px; height: 19px; background: url("../img/ko_KR/btn_set.png?130306") no-repeat -385px -106px; } + +#smart_editor2 .se2_qeditor .se2_delcol { width: 29px; height: 19px; background: url("../img/ko_KR/btn_set.png?130306") no-repeat -413px -106px; } + +#smart_editor2 .se2_qeditor .se2_merrow { width: 57px; height: 19px; background: url("../img/ko_KR/btn_set.png?130306") no-repeat -385px -125px; } + +#smart_editor2 .se2_qeditor .se2_mercol { width: 57px; height: 19px; background: url("../img/ko_KR/btn_set.png?130306") no-repeat -413px -125px; } + +#smart_editor2 .se2_qeditor .se2_seprow_off { width: 28px; height: 19px; background: url("../img/ko_KR/btn_set.png?130306") no-repeat -385px -87px; } + +#smart_editor2 .se2_qeditor .se2_sepcol_off { width: 29px; height: 19px; background: url("../img/ko_KR/btn_set.png?130306") no-repeat -413px -87px; } + +#smart_editor2 .se2_qeditor .se2_merrow_off { width: 57px; height: 19px; background: url("../img/ko_KR/btn_set.png?130306") no-repeat -385px -144px; } + +#smart_editor2 .se2_qeditor .se2_mercol_off { width: 57px; height: 19px; background: url("../img/ko_KR/btn_set.png?130306") no-repeat -413px -144px; } + +/* TEXT_TOOLBAR : QUICKEDITOR_TABLE > CELL_BACKGROUND */ +#smart_editor2 .se2_qeditor .se2_qe2 { _display: inline; float: left; position: relative; z-index: 100; width: 165px; margin: 2px 0 0 1px; padding: 7px 0 0 0; background: url("../img/bg_line1.gif") repeat-x; zoom: 1; } + +#smart_editor2 .se2_qeditor .se2_qe2_1 dt { float: left; width: 62px; padding: 3px 0 0 0; } + +#smart_editor2 .se2_qeditor .se2_qe2_1 dt input { width: 15px; height: 15px; margin: -1px 1px 1px -1px; vertical-align: middle; } + +#smart_editor2 .se2_qeditor .se2_qe2_1 dd { float: left; position: relative; zoom: 1; } + +#smart_editor2 .se2_qeditor .se2_qe2_3 { padding: 7px 0 6px 0; } + +/* My글양식 없을때 */ +#smart_editor2 .se2_qeditor .se2_qe2_2 { position: relative; _position: absolute; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 dt { float: left; width: 50px; padding: 3px 0 0 13px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 dt input { width: 15px; height: 15px; margin: -1px 2px 1px -1px; vertical-align: middle; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 dd { float: left; } + +/* TEXT_TOOLBAR : QUICKEDITOR_TABLE > STYLE */ +#smart_editor2 .se2_table_set .se2_qbody .se2_t_proper2 { float: left; *float: none; position: static; width: 166px; margin: 5px 0 0 1px; } + +#smart_editor2 .se2_qeditor .se2_qe3 dt { float: left; width: 62px; padding: 0; } + +#smart_editor2 .se2_qeditor .se2_qe3 dt label { font-weight: normal; } + +#smart_editor2 .se2_qeditor .se2_qe3 dt input { width: 15px; height: 15px; margin: -1px 1px 1px -1px; vertical-align: middle; } + +#smart_editor2 .se2_qeditor .se2_qe3 dd .se2_qe3_table { position: relative; } + +/* TEXT_TOOLBAR : QUICKEDITOR_TABLE > CELL_BACKGROUND PREWVIEW */ +#smart_editor2 .se2_qeditor .se2_pre_color { float: left; width: 18px; height: 18px; border: 1px solid #c7c7c7; } + +#smart_editor2 .se2_qeditor .se2_pre_color button { float: left; width: 14px; height: 14px; margin: 2px 0 0 2px; padding: 0; } + +#smart_editor2 .se2_qeditor .se2_pre_color button span { overflow: hidden; position: absolute; top: -10000px; left: -10000px; z-index: -100; width: 0; height: 0; } + +/* TEXT_TOOLBAR : QUICKEDITOR_TABLE > CELL_BACKGROUND LAYER */ +#smart_editor2 .se2_qeditor .se2_layer { float: left; clear: both; position: absolute; top: 20px; left: 0; margin: 0; padding: 0; border: 1px solid #c7c7c7; border-top: 1px solid #9a9a9a; background: #fafafa; } + +#smart_editor2 .se2_qeditor .se2_layer .se2_in_layer { float: left; margin: 0; padding: 0; border: 1px solid #fff; background: #fafafa; } + +#smart_editor2 .se2_qeditor .se2_layer button { vertical-align: top; } + +#smart_editor2 .se2_qeditor .se2_layer .se2_pick_color li { position: relative; } + +/* TEXT_TOOLBAR : QUICKEDITOR_TABLE > CELL_BACKGROUND IMAGE */ +#smart_editor2 .se2_qeditor .se2_pre_bgimg { float: left; width: 14px; height: 14px; padding: 2px; border: 1px solid #c7c7c7; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 button { width: 16px; height: 16px; background: url("../img/ko_KR/btn_set.png?130306") 0 -261px no-repeat; } + +/* TEXT_TOOLBAR : QUICKEDITOR_TABLE > CELL_BACKGROUND IMAGE LAYER */ +#smart_editor2 .se2_cellimg_set { _display: inline; float: left; width: 136px; margin: 4px 3px 0 4px; padding-bottom: 4px; } + +#smart_editor2 .se2_cellimg_set li { _display: inline; float: left; width: 16px; height: 16px; margin: 0 1px 1px 0; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg0 { background-position: -255px -278px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg1 { background-position: 0 -261px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg2 { background-position: -17px -261px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg3 { background-position: -34px -261px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg4 { background-position: -51px -261px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg5 { background-position: -68px -261px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg6 { background-position: -85px -261px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg7 { background-position: -102px -261px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg8 { background-position: -119px -261px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg9 { background-position: -136px -261px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg10 { background-position: -153px -261px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg11 { background-position: -170px -261px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg12 { background-position: -187px -261px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg13 { background-position: -204px -261px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg14 { background-position: -221px -261px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg15 { background-position: -238px -261px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg16 { background-position: -255px -261px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg17 { background-position: 0 -278px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg18 { background-position: -17px -278px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg19 { background-position: -34px -278px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg20 { background-position: -51px -278px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg21 { background-position: -68px -278px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg22 { background-position: -85px -278px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg23 { background-position: -102px -278px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg24 { background-position: -119px -278px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg25 { background-position: -136px -278px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg26 { background-position: -153px -278px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg27 { background-position: -170px -278px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg28 { background-position: -187px -278px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg29 { background-position: -204px -278px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg30 { background-position: -221px -278px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg31 { background-position: -238px -278px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg button { width: 14px; height: 14px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg1 { background-position: -1px -262px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg2 { background-position: -18px -262px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg3 { background-position: -35px -262px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg4 { background-position: -52px -262px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg5 { background-position: -69px -262px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg6 { background-position: -86px -262px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg7 { background-position: -103px -262px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg8 { background-position: -120px -262px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg9 { background-position: -137px -262px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg10 { background-position: -154px -262px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg11 { background-position: -171px -262px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg12 { background-position: -188px -262px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg13 { background-position: -205px -262px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg14 { background-position: -222px -262px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg15 { background-position: -239px -262px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg16 { background-position: -256px -262px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg17 { background-position: -1px -279px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg18 { background-position: -18px -279px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg19 { background-position: -35px -279px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg20 { background-position: -52px -279px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg21 { background-position: -69px -279px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg22 { background-position: -86px -279px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg23 { background-position: -103px -279px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg24 { background-position: -120px -279px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg25 { background-position: -137px -279px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg26 { background-position: -154px -279px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg27 { background-position: -171px -279px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg28 { background-position: -188px -279px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg29 { background-position: -205px -279px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg30 { background-position: -222px -279px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg31 { background-position: -239px -279px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg32 { background-position: -256px -279px; } + +/* TEXT_TOOLBAR : QUICKEDITOR_TABLE > MY REVIEW */ +#smart_editor2 .se2_btn_area { _display: inline; float: left; clear: both; width: 166px; margin: 5px 0 0 1px; padding: 7px 0 6px 0; background: url("../img/bg_line1.gif") repeat-x; text-align: center; } + +#smart_editor2 .se2_btn_area .se2_btn_save { width: 97px; height: 21px; background: url("../img/ko_KR/btn_set.png?130306") -369px -163px no-repeat; } + +/* TEXT_TOOLBAR : QUICKEDITOR_IMAGE */ +#smart_editor2 .se2_qe10 { width: 166px; margin: 0; *margin: -2px 0 0 0; } + +#smart_editor2 .se2_qe10 label { margin: 0 1px 0 0; vertical-align: middle; } + +#smart_editor2 .se2_qe10 .se2_sheight { margin-left: 4px; } + +#smart_editor2 .se2_qe10 .input_ty1 { width: 30px; height: 13px; margin: 0 0 1px 1px; padding: 3px 4px 0 1px; font-size: 11px; letter-spacing: 0; text-align: right; vertical-align: middle; } + +#smart_editor2 .se2_qe10 .se2_sreset { width: 41px; height: 19px; margin-left: 3px; background: url("../img/ko_KR/btn_set.png?130306") -401px -184px no-repeat; vertical-align: middle; } + +#smart_editor2 .se2_qe10_1 { margin-top: 4px; padding: 10px 0 3px; background: url("../img/bg_line1.gif") repeat-x; } + +#smart_editor2 .se2_qe10_1 input { width: 15px; height: 15px; margin: -1px 3px 1px -1px; vertical-align: middle; } + +#smart_editor2 .se2_qe11 { float: left; width: 166px; margin: 4px 0 0 0; padding: 7px 0 2px 0; background: url("../img/bg_line1.gif") repeat-x; } + +#smart_editor2 .se2_qe11_1 { float: left; width: 99px; } + +#smart_editor2 .se2_qe11_1 dt { float: left; width: 56px; height: 15px; padding: 5px 0 0 0; } + +#smart_editor2 .se2_qe11_1 dd { float: left; position: relative; width: 38px; height: 20px; } + +#smart_editor2 .se2_qe11_1 .input_ty1 { display: block; width: 29px; height: 15px; margin: 0; *margin: -1px 0 1px 0; padding: 3px 1px 0 5px; font-size: 11px; letter-spacing: 0; text-align: left; } + +#smart_editor2 .se2_qe11_1 .se2_add { position: absolute; top: 2px; right: 3px; width: 13px; height: 8px; background: url("../img/ko_KR/btn_set.png?130306") -86px -54px no-repeat; } + +#smart_editor2 .se2_qe11_1 .se2_del { position: absolute; top: 10px; right: 3px; width: 13px; height: 8px; background: url("../img/ko_KR/btn_set.png?130306") -86px -62px no-repeat; } + +#smart_editor2 .se2_qe11_2 { float: left; width: 67px; } + +#smart_editor2 .se2_qe11_2 dt { float: left; width: 47px; margin: 5px 0 0 0; } + +#smart_editor2 .se2_qe11_2 dd { float: left; position: relative; width: 20px; } + +#smart_editor2 .se2_qe12 { float: left; width: 166px; margin: 3px 0 0 0; padding: 7px 0 0 0; background: url("../img/bg_line1.gif") repeat-x; } + +#smart_editor2 .se2_qe12 dt { float: left; margin: 5px 4px 0 0; } + +#smart_editor2 .se2_qe12 dd { float: left; padding: 0 0 6px 0; } + +#smart_editor2 .se2_qe12 .se2_align0 { float: left; width: 19px; height: 21px; background: url("../img/ko_KR/btn_set.png?130306") -276px -121px no-repeat; } + +#smart_editor2 .se2_qe12 .se2_align1 { float: left; width: 19px; height: 21px; background: url("../img/ko_KR/btn_set.png?130306") -295px -121px no-repeat; } + +#smart_editor2 .se2_qe12 .se2_align2 { float: left; width: 20px; height: 21px; background: url("../img/ko_KR/btn_set.png?130306") -314px -121px no-repeat; } + +#smart_editor2 .se2_qe13 { position: relative; z-index: 10; zoom: 1; } + +#smart_editor2 .se2_qe13 dt { float: left; width: 62px; padding: 3px 0 0; } + +#smart_editor2 .se2_qe13 dt input { width: 15px; height: 15px; margin: -1px 1px 1px -1px; vertical-align: middle; zoom: 1; } + +#smart_editor2 .se2_qe13 dt .se2_qdim2 { width: 32px; } + +#smart_editor2 .se2_qe13 dd .se2_select_ty1 { width: 38px; } + +#smart_editor2 .se2_qe13 dd .se2_select_ty1 span { width: 15px; } + +#smart_editor2 .se2_qe13 dd .input_ty1 { width: 20px; } + +#smart_editor2 .se2_qe13 dd .se2_palette2 .input_ty1 { width: 67px; } + +#smart_editor2 .se2_qe13 .se2_add { *top: 3px; } + +#smart_editor2 .se2_qe13 .se2_del { *top: 11px; } + +#smart_editor2 .se2_qe13 .se2_layer_b_style { right: -2px; _right: 0; } + +#smart_editor2 .se2_qe13 .se2_layer_b_style li span { width: auto; margin: 0 4px 0 5px; padding-top: 2px; } + +#smart_editor2 .se2_qe13 dd { _display: inline; float: left; position: relative; width: 29px; margin-right: 5px; _margin-right: 3px; zoom: 1; } + +#smart_editor2 .se2_qe13 dd .se2_palette h4 { margin-top: 9px; font-family: dotum; font-size: 12px; } + +#smart_editor2 .se2_qe13 dd.dd_type { width: 38px; } + +#smart_editor2 .se2_qe13 dd.dd_type2 { width: 37px; margin-right: 3px; } + +#smart_editor2 .se2_qe13 dd.dd_type2 .input_ty1 { width: 29px; } + +#smart_editor2 .se2_qe13 dd.dd_type2 button { right: 2px; _right: 1px; } + +#smart_editor2 .se2_qe13 dd.dd_type3 { width: 20px; margin: 0; } + +#smart_editor2 .se2_qe13_v1 { _display: inline; float: left; margin: 2px 0 1px; } + +#smart_editor2 .se2_qe13_v1 dt { padding: 4px 0 0 1px; } + +#smart_editor2 .se2_qe13_v2 { _display: inline; float: left; position: relative; z-index: 100; width: 165px; margin: 4px 0 0 1px; zoom: 1; } + +#smart_editor2 .se2_qe13_v2 dd { width: 18px; margin: 0; } + +#smart_editor2 .se2_qeditor .se2_qdim1 { clear: both; position: absolute; top: 25px; left: 115px; width: 60px; height: 23px; background: #fafafa; opacity: 0.5; filter: alpha(opacity=50); } + +#smart_editor2 .se2_qeditor .se2_qdim2 { clear: both; position: absolute; top: 55px; left: 24px; z-index: 110; width: 70px; height: 22px; background: #fafafa; opacity: 0.5; filter: alpha(opacity=50); } + +#smart_editor2 .se2_qeditor .se2_qdim3 { clear: both; position: absolute; top: 55px; left: 118px; z-index: 110; width: 56px; height: 22px; background: #fafafa; opacity: 0.5; filter: alpha(opacity=50); } + +#smart_editor2 .se2_qeditor .se2_qdim4 { clear: both; position: absolute; top: 81px; left: 23px; z-index: 35; width: 116px; height: 35px; background: #fafafa; opacity: 0.5; filter: alpha(opacity=50); } + +#smart_editor2 .se2_qeditor .se2_qdim5 { clear: both; position: absolute; top: 31px; left: 106px; width: 68px; height: 26px; background: #fafafa; opacity: 0.5; filter: alpha(opacity=50); } + +#smart_editor2 .se2_qeditor .se2_qdim6c { clear: both; position: absolute; top: 25px; left: 28px; width: 29px; height: 23px; background: #fafafa; opacity: 0.5; filter: alpha(opacity=50); } + +#smart_editor2 .se2_qeditor .se2_qdim6r { clear: both; position: absolute; top: 25px; left: 57px; width: 29px; height: 23px; background: #fafafa; opacity: 0.5; filter: alpha(opacity=50); } + +#smart_editor2 .se2_highedit { float: right; width: 56px; height: 21px; margin: -27px 8px 0 0; background: url("../img/ko_KR/btn_set.png?130306") -329px -142px no-repeat; } + +#smart_editor2 .se2_qeditor .se2_qdim7 { clear: both; position: absolute; top: 55px; left: 24px; z-index: 110; width: 150px; height: 48px; background: #fafafa; opacity: 0.5; filter: alpha(opacity=50); } + +#smart_editor2 .se2_qeditor .se2_qdim8 { clear: both; position: absolute; top: 105px; left: 24px; z-index: 110; width: 150px; height: 37px; background: #fafafa; opacity: 0.5; filter: alpha(opacity=50); } + +#smart_editor2 .se2_qeditor .se2_qdim9 { clear: both; position: absolute; top: 55px; left: 111px; z-index: 110; width: 65px; height: 24px; background: #fafafa; opacity: 0.5; filter: alpha(opacity=50); } + +#smart_editor2 .se2_qeditor .se2_qdim10 { clear: both; position: absolute; top: 55px; left: 100px; z-index: 110; width: 77px; height: 24px; background: #fafafa; opacity: 0.5; filter: alpha(opacity=50); } + +#smart_editor2 .se2_qeditor .se2_qdim11 { clear: both; position: absolute; top: 55px; left: 65px; z-index: 110; width: 115px; height: 24px; background: #fafafa; opacity: 0.5; filter: alpha(opacity=50); } + +/* HELP : ACCESSIBILITY */ +#smart_editor2 .se2_accessibility { z-index: 90; } + +#smart_editor2 .se2_accessibility .se2_in_layer { width: 568px; padding: 0 10px; background: #fafafa; border: 1px solid #bcbbbb; } + +#smart_editor2 .se2_accessibility h3 { margin: 0 -10px; padding: 6px 0 12px 0; background: url("../img/bg_find_h3.gif") repeat-x; font-size: 12px; line-height: 14px; letter-spacing: -1px; } + +#smart_editor2 .se2_accessibility h3 strong { display: inline-block; padding: 4px 0 3px 11px; color: #333; letter-spacing: 0; } + +#smart_editor2 .se2_accessibility .se2_close { position: absolute; top: 10px; right: 12px; width: 13px; height: 12px; background: url("../img/ko_KR/btn_set.png?130306") -155px -5px no-repeat; } + +#smart_editor2 .se2_accessibility .box_help { padding: 0 2px; margin-top: 8px; background: url("../img/bg_help.gif") 0 100% no-repeat; } + +#smart_editor2 .se2_accessibility .box_help div { overflow: hidden; padding: 20px 21px 24px; border-top: 1px solid #d0d0d0; color: #333; } + +#smart_editor2 .se2_accessibility .box_help strong { display: block; margin-bottom: 2px; } + +#smart_editor2 .se2_accessibility .box_help p { margin-bottom: 28px; line-height: 1.5; } + +#smart_editor2 .se2_accessibility .box_help ul { width: 150%; margin-top: 10px; } + +#smart_editor2 .se2_accessibility .box_help li { position: relative; float: left; width: 252px; padding: 5px 0 5px 9px; margin-right: 40px; background: url("../img/ko_KR/btn_set.png?130306") -475px -51px no-repeat; border-right: 1px solid #f0f0f0; *zoom: 1; line-height: 1; } + +#smart_editor2 .se2_accessibility .box_help li span { position: absolute; top: 4px; left: 138px; line-height: 1.2; } + +#smart_editor2 .se2_accessibility .se2_btns { padding: 9px 0 10px; text-align: center; } + +#smart_editor2 .se2_accessibility .se2_btns .se2_close2 { width: 39px; height: 24px; background: url("../img/ko_KR/btn_set.png?130306") -235px -120px no-repeat; } diff --git a/src/main/resources/static/res/front/lib/se/css/smart_editor2_out.css b/src/main/resources/static/res/front/lib/se/css/smart_editor2_out.css new file mode 100644 index 0000000..b01e34b --- /dev/null +++ b/src/main/resources/static/res/front/lib/se/css/smart_editor2_out.css @@ -0,0 +1,20 @@ +@charset "UTF-8"; +/* NHN Web Standardization Team (http://html.nhndesign.com/) HHJ 090226 */ +/* COMMON */ +.se2_outputarea, .se2_outputarea th, .se2_outputarea td { margin: 0; padding: 0; color: #666; font-size: 12px; font-family: '돋움',Dotum,'굴림',Gulim,Helvetica,Sans-serif; line-height: 1.5; } + +.se2_outputarea p { margin: 0; padding: 0; } + +.se2_outputarea a:hover { text-decoration: underline; } + +.se2_outputarea a:link { color: #0000ff; } + +.se2_outputarea ul { margin: 0 0 0 40px; padding: 0; } + +.se2_outputarea ul li { margin: 0; list-style-type: disc; padding: 0; } + +.se2_outputarea ul ul li { list-style-type: circle; } + +.se2_outputarea ul ul ul li { list-style-type: square; } + +.se2_outputarea img, .se2_outputarea fieldset { border: 0; } diff --git a/src/main/resources/static/res/front/lib/se/img/bg_b1.png b/src/main/resources/static/res/front/lib/se/img/bg_b1.png new file mode 100644 index 0000000..8bd0c06 Binary files /dev/null and b/src/main/resources/static/res/front/lib/se/img/bg_b1.png differ diff --git a/src/main/resources/static/res/front/lib/se/img/bg_button.gif b/src/main/resources/static/res/front/lib/se/img/bg_button.gif new file mode 100644 index 0000000..1619320 Binary files /dev/null and b/src/main/resources/static/res/front/lib/se/img/bg_button.gif differ diff --git a/src/main/resources/static/res/front/lib/se/img/bg_button_left.gif b/src/main/resources/static/res/front/lib/se/img/bg_button_left.gif new file mode 100644 index 0000000..7b86ffd Binary files /dev/null and b/src/main/resources/static/res/front/lib/se/img/bg_button_left.gif differ diff --git a/src/main/resources/static/res/front/lib/se/img/bg_button_right.gif b/src/main/resources/static/res/front/lib/se/img/bg_button_right.gif new file mode 100644 index 0000000..0ac699c Binary files /dev/null and b/src/main/resources/static/res/front/lib/se/img/bg_button_right.gif differ diff --git a/src/main/resources/static/res/front/lib/se/img/bg_find_h3.gif b/src/main/resources/static/res/front/lib/se/img/bg_find_h3.gif new file mode 100644 index 0000000..06627d9 Binary files /dev/null and b/src/main/resources/static/res/front/lib/se/img/bg_find_h3.gif differ diff --git a/src/main/resources/static/res/front/lib/se/img/bg_help.gif b/src/main/resources/static/res/front/lib/se/img/bg_help.gif new file mode 100644 index 0000000..f2aae94 Binary files /dev/null and b/src/main/resources/static/res/front/lib/se/img/bg_help.gif differ diff --git a/src/main/resources/static/res/front/lib/se/img/bg_icon_tool.gif b/src/main/resources/static/res/front/lib/se/img/bg_icon_tool.gif new file mode 100644 index 0000000..ef680eb Binary files /dev/null and b/src/main/resources/static/res/front/lib/se/img/bg_icon_tool.gif differ diff --git a/src/main/resources/static/res/front/lib/se/img/bg_line1.gif b/src/main/resources/static/res/front/lib/se/img/bg_line1.gif new file mode 100644 index 0000000..8c506a4 Binary files /dev/null and b/src/main/resources/static/res/front/lib/se/img/bg_line1.gif differ diff --git a/src/main/resources/static/res/front/lib/se/img/bg_quote2.gif b/src/main/resources/static/res/front/lib/se/img/bg_quote2.gif new file mode 100644 index 0000000..eb8cd04 Binary files /dev/null and b/src/main/resources/static/res/front/lib/se/img/bg_quote2.gif differ diff --git a/src/main/resources/static/res/front/lib/se/img/bg_set.gif b/src/main/resources/static/res/front/lib/se/img/bg_set.gif new file mode 100644 index 0000000..14d0973 Binary files /dev/null and b/src/main/resources/static/res/front/lib/se/img/bg_set.gif differ diff --git a/src/main/resources/static/res/front/lib/se/img/bg_text_tool.gif b/src/main/resources/static/res/front/lib/se/img/bg_text_tool.gif new file mode 100644 index 0000000..60d61de Binary files /dev/null and b/src/main/resources/static/res/front/lib/se/img/bg_text_tool.gif differ diff --git a/src/main/resources/static/res/front/lib/se/img/bg_tool2.gif b/src/main/resources/static/res/front/lib/se/img/bg_tool2.gif new file mode 100644 index 0000000..f96aafb Binary files /dev/null and b/src/main/resources/static/res/front/lib/se/img/bg_tool2.gif differ diff --git a/src/main/resources/static/res/front/lib/se/img/editor_guideline_698.gif b/src/main/resources/static/res/front/lib/se/img/editor_guideline_698.gif new file mode 100644 index 0000000..9635089 Binary files /dev/null and b/src/main/resources/static/res/front/lib/se/img/editor_guideline_698.gif differ diff --git a/src/main/resources/static/res/front/lib/se/img/editor_guideline_890.gif b/src/main/resources/static/res/front/lib/se/img/editor_guideline_890.gif new file mode 100644 index 0000000..5a241e1 Binary files /dev/null and b/src/main/resources/static/res/front/lib/se/img/editor_guideline_890.gif differ diff --git a/src/main/resources/static/res/front/lib/se/img/ico_extend.png b/src/main/resources/static/res/front/lib/se/img/ico_extend.png new file mode 100644 index 0000000..1aa88ff Binary files /dev/null and b/src/main/resources/static/res/front/lib/se/img/ico_extend.png differ diff --git a/src/main/resources/static/res/front/lib/se/img/icon_set.gif b/src/main/resources/static/res/front/lib/se/img/icon_set.gif new file mode 100644 index 0000000..842d394 Binary files /dev/null and b/src/main/resources/static/res/front/lib/se/img/icon_set.gif differ diff --git a/src/main/resources/static/res/front/lib/se/img/ko_KR/btn_set.png b/src/main/resources/static/res/front/lib/se/img/ko_KR/btn_set.png new file mode 100644 index 0000000..f8935d1 Binary files /dev/null and b/src/main/resources/static/res/front/lib/se/img/ko_KR/btn_set.png differ diff --git a/src/main/resources/static/res/front/lib/se/img/ko_KR/bx_set_110302.gif b/src/main/resources/static/res/front/lib/se/img/ko_KR/bx_set_110302.gif new file mode 100644 index 0000000..86662e9 Binary files /dev/null and b/src/main/resources/static/res/front/lib/se/img/ko_KR/bx_set_110302.gif differ diff --git a/src/main/resources/static/res/front/lib/se/img/ko_KR/text_tool_set.png b/src/main/resources/static/res/front/lib/se/img/ko_KR/text_tool_set.png new file mode 100644 index 0000000..c1e5be3 Binary files /dev/null and b/src/main/resources/static/res/front/lib/se/img/ko_KR/text_tool_set.png differ diff --git a/src/main/resources/static/res/front/lib/se/img/photoQuickPopup/bg_drag_image.png b/src/main/resources/static/res/front/lib/se/img/photoQuickPopup/bg_drag_image.png new file mode 100644 index 0000000..0a68013 Binary files /dev/null and b/src/main/resources/static/res/front/lib/se/img/photoQuickPopup/bg_drag_image.png differ diff --git a/src/main/resources/static/res/front/lib/se/img/photoQuickPopup/btn_cancel.png b/src/main/resources/static/res/front/lib/se/img/photoQuickPopup/btn_cancel.png new file mode 100644 index 0000000..a39adf8 Binary files /dev/null and b/src/main/resources/static/res/front/lib/se/img/photoQuickPopup/btn_cancel.png differ diff --git a/src/main/resources/static/res/front/lib/se/img/photoQuickPopup/btn_confirm.png b/src/main/resources/static/res/front/lib/se/img/photoQuickPopup/btn_confirm.png new file mode 100644 index 0000000..4b7ed66 Binary files /dev/null and b/src/main/resources/static/res/front/lib/se/img/photoQuickPopup/btn_confirm.png differ diff --git a/src/main/resources/static/res/front/lib/se/img/photoQuickPopup/btn_confirm2.png b/src/main/resources/static/res/front/lib/se/img/photoQuickPopup/btn_confirm2.png new file mode 100644 index 0000000..7d1accf Binary files /dev/null and b/src/main/resources/static/res/front/lib/se/img/photoQuickPopup/btn_confirm2.png differ diff --git a/src/main/resources/static/res/front/lib/se/img/photoQuickPopup/btn_del.png b/src/main/resources/static/res/front/lib/se/img/photoQuickPopup/btn_del.png new file mode 100644 index 0000000..9bbf595 Binary files /dev/null and b/src/main/resources/static/res/front/lib/se/img/photoQuickPopup/btn_del.png differ diff --git a/src/main/resources/static/res/front/lib/se/img/photoQuickPopup/btn_find.png b/src/main/resources/static/res/front/lib/se/img/photoQuickPopup/btn_find.png new file mode 100644 index 0000000..054a411 Binary files /dev/null and b/src/main/resources/static/res/front/lib/se/img/photoQuickPopup/btn_find.png differ diff --git a/src/main/resources/static/res/front/lib/se/img/text_tool_set2.png b/src/main/resources/static/res/front/lib/se/img/text_tool_set2.png new file mode 100644 index 0000000..889a333 Binary files /dev/null and b/src/main/resources/static/res/front/lib/se/img/text_tool_set2.png differ diff --git a/src/main/resources/static/res/front/lib/se/js/HuskyEZCreator.js b/src/main/resources/static/res/front/lib/se/js/HuskyEZCreator.js new file mode 100644 index 0000000..76ce164 --- /dev/null +++ b/src/main/resources/static/res/front/lib/se/js/HuskyEZCreator.js @@ -0,0 +1,134 @@ +if(typeof window.nhn=='undefined') window.nhn = {}; +if (!nhn.husky) nhn.husky = {}; + +/** + * @fileOverview This file contains application creation helper function, which would load up an HTML(Skin) file and then execute a specified create function. + * @name HuskyEZCreator.js + */ +nhn.husky.EZCreator = new (function(){ + this.nBlockerCount = 0; + + this.createInIFrame = function(htOptions){ + if(arguments.length == 1){ + var oAppRef = htOptions.oAppRef; + var elPlaceHolder = htOptions.elPlaceHolder; + var sSkinURI = htOptions.sSkinURI; + var fCreator = htOptions.fCreator; + var fOnAppLoad = htOptions.fOnAppLoad; + var bUseBlocker = htOptions.bUseBlocker; + var htParams = htOptions.htParams || null; + }else{ + // for backward compatibility only + var oAppRef = arguments[0]; + var elPlaceHolder = arguments[1]; + var sSkinURI = arguments[2]; + var fCreator = arguments[3]; + var fOnAppLoad = arguments[4]; + var bUseBlocker = arguments[5]; + var htParams = arguments[6]; + } + + if(bUseBlocker) nhn.husky.EZCreator.showBlocker(); + + var attachEvent = function(elNode, sEvent, fHandler){ + if(elNode.addEventListener){ + elNode.addEventListener(sEvent, fHandler, false); + }else{ + elNode.attachEvent("on"+sEvent, fHandler); + } + } + + if(!elPlaceHolder){ + alert("Placeholder is required!"); + return; + } + + if(typeof(elPlaceHolder) != "object") + elPlaceHolder = document.getElementById(elPlaceHolder); + + var elIFrame, nEditorWidth, nEditorHeight; + + + try{ + elIFrame = document.createElement("