Compare commits

..
295 Commits
Author SHA1 Message Date
thisgun ab7ba78fd2 Merge branch 'master' of github.com:gnuboard/g5 2021-01-08 15:54:28 +09:00
thisgun 18bc64ab0a Merge branch 'master' of github.com:gnuboard/g5 2021-01-06 14:24:51 +09:00
thisgun 24268f70b8 Merge branch 'master' of github.com:gnuboard/g5 2021-01-06 10:43:21 +09:00
thisgun 3eb07bdfa0 Merge branch 'master' of github.com:gnuboard/g5 2021-01-05 20:34:02 +09:00
lupin_latte e6764f4a7c Merge branch 'master' of github.com:gnuboard/g5 2021-01-05 16:04:40 +09:00
thisgun 5d37a15fb6 Merge branch 'master' of github.com:gnuboard/g5 2021-01-04 20:16:57 +09:00
thisgun 681499f8dd Merge branch 'master' of github.com:gnuboard/g5 2021-01-04 20:01:06 +09:00
thisgun 51355dffc5 Merge branch 'master' of github.com:gnuboard/g5 2021-01-04 20:00:42 +09:00
thisgun 389267bb65 버전 5.4.4 수정 2021-01-04 20:00:42 +09:00
thisgun 239b5d7a2c 매우중요 필수패치!!! 다음 우편번호 서비스 가이드에 따른 타URL 파라미터 붙이는 코드 삭제 2021-01-04 20:00:23 +09:00
thisgun de9ba8db5b Merge branch 'master' of github.com:gnuboard/g5 2020-11-24 14:30:06 +09:00
thisgun e9439c87d1 Merge branch 'master' of github.com:gnuboard/g5 2020-10-28 15:18:28 +09:00
thisgun 1971be3186 Merge branch 'master' of github.com:gnuboard/g5 2020-10-07 10:52:40 +09:00
thisgun 5353f75284 Merge branch 'master' of github.com:gnuboard/g5 2020-08-13 11:11:16 +09:00
thisgun 84dd9f0766 Merge branch 'master' of github.com:gnuboard/g5 2020-06-11 12:24:58 +09:00
thisgun a16926a4de Merge branch 'master' of github.com:gnuboard/g5 2020-06-05 11:21:29 +09:00
thisgun c875121931 Merge branch 'master' of github.com:gnuboard/g5 2020-05-08 16:02:40 +09:00
thisgun 6cc2bfdd50 Merge branch 'master' of github.com:gnuboard/g5 2020-04-13 16:18:49 +09:00
thisgun ff4ac1d626 Merge branch 'master' of github.com:gnuboard/g5 2020-03-13 11:27:57 +09:00
thisgun fff7e074ff Merge branch 'master' of github.com:gnuboard/g5 2020-03-03 18:48:19 +09:00
thisgun 8dd2fe58e6 Merge branch 'master' of github.com:gnuboard/g5 2020-03-03 12:01:16 +09:00
thisgun 1600f63dee Merge branch 'master' of github.com:gnuboard/g5 2020-02-18 15:24:01 +09:00
thisgun da29b6d0bb Merge branch 'master' of github.com:gnuboard/g5 2020-02-07 18:19:36 +09:00
thisgun cc5eb6e520 Merge branch 'master' of github.com:gnuboard/g5 2020-02-04 11:24:30 +09:00
thisgun 726863de44 Merge branch 'master' of github.com:gnuboard/g5 2020-01-31 16:03:22 +09:00
thisgun f2a1af5f46 Merge branch 'master' of github.com:gnuboard/g5 2020-01-07 16:34:04 +09:00
thisgun 4b0969d244 Merge branch 'master' of github.com:gnuboard/g5 2019-12-27 16:05:56 +09:00
thisgun b5152b62e8 Merge branch 'master' of github.com:gnuboard/g5 2019-12-23 10:12:10 +09:00
thisgun 7ccf17b479 Merge branch 'master' of github.com:gnuboard/g5 2019-12-09 14:59:18 +09:00
thisgun 312fc5daf3 Merge branch 'master' of github.com:gnuboard/g5 2019-12-02 17:01:34 +09:00
thisgun e3ed8a1af3 Merge branch 'master' of github.com:gnuboard/g5 2019-12-02 11:11:03 +09:00
thisgun f230dc3522 Merge branch 'master' of github.com:gnuboard/g5 2019-10-31 12:18:19 +09:00
thisgun 58878593dc Merge branch 'master' of github.com:gnuboard/g5 2019-09-16 16:04:23 +09:00
thisgun 863f6011ac Merge branch 'master' of github.com:gnuboard/g5 2019-08-12 10:37:25 +09:00
thisgun cee88a0f6f Merge branch 'master' of github.com:gnuboard/g5 2019-07-15 18:40:40 +09:00
thisgun 27b1a5d8f8 Merge branch 'master' of github.com:gnuboard/g5 2019-06-18 17:57:28 +09:00
thisgun 7d494115b3 Merge branch 'master' of github.com:gnuboard/g5 2019-06-14 09:44:03 +09:00
thisgun 0954beced9 Merge branch 'master' of github.com:gnuboard/g5 2019-05-30 11:01:48 +09:00
thisgun 2534921446 Merge branch 'master' of github.com:gnuboard/g5 2019-05-29 14:41:19 +09:00
thisgun 831219e2c2 Merge branch 'master' of github.com:gnuboard/g5 2019-03-19 11:45:30 +09:00
thisgun ae729f1525 Merge branch 'master' of github.com:gnuboard/g5 2019-03-04 13:59:42 +09:00
thisgun 4d4064c40d Merge branch 'master' of github.com:gnuboard/g5 2019-02-14 10:32:18 +09:00
thisgun e8abeb47e8 Merge branch 'master' of github.com:gnuboard/g5 2019-01-28 11:18:46 +09:00
thisgun 5fdd38e1ce Merge branch 'master' of github.com:gnuboard/g5 2019-01-07 14:48:37 +09:00
thisgun 82cdd90edc Merge branch 'master' of github.com:gnuboard/g5 2018-12-28 11:11:07 +09:00
thisgun 54b1356ab1 Merge branch 'master' of github.com:gnuboard/g5 2018-12-18 12:29:17 +09:00
thisgun 7ae3d6b00d Merge branch 'master' of github.com:gnuboard/g5 2018-12-17 18:49:03 +09:00
thisgun da963964a9 Merge branch 'master' of github.com:gnuboard/g5 2018-12-11 17:22:45 +09:00
thisgun 7e7d73d394 Merge branch 'master' of github.com:gnuboard/g5 2018-11-26 15:24:07 +09:00
thisgun 2549172969 Merge branch 'master' of github.com:gnuboard/g5 2018-11-21 15:59:33 +09:00
thisgun 3fb9c2c15f Merge branch 'master' of github.com:gnuboard/g5 2018-10-30 16:03:27 +09:00
thisgun 0329cc9f9c Merge branch 'master' of github.com:gnuboard/g5 2018-10-26 11:55:51 +09:00
thisgun a77a6ffafa Merge branch 'master' of github.com:gnuboard/g5 2018-10-18 18:45:11 +09:00
thisgun 15b2e73e73 Merge branch 'master' of github.com:gnuboard/g5 2018-10-17 19:41:16 +09:00
thisgun 0e00f05014 Merge branch 'master' of github.com:gnuboard/g5 2018-10-17 18:42:24 +09:00
thisgun b2858b65ee Merge branch 'master' of github.com:gnuboard/g5 2018-10-08 12:00:38 +09:00
thisgun a82f61ae2a Merge branch 'master' of github.com:gnuboard/g5 2018-09-17 10:34:00 +09:00
thisgun 5be739934b Merge branch 'master' of github.com:gnuboard/g5 2018-08-24 09:35:49 +09:00
thisgun 02d816154b Merge branch 'master' of github.com:gnuboard/g5 2018-07-03 16:02:20 +09:00
thisgun 0bae2cf182 Merge branch 'master' of github.com:gnuboard/g5 2018-06-05 11:42:10 +09:00
thisgun a196c91ed5 Merge branch 'master' of github.com:gnuboard/g5 2018-06-05 09:39:56 +09:00
thisgun c24f37421b Merge branch 'master' of github.com:gnuboard/g5 2018-05-23 14:09:13 +09:00
thisgun 74a8e668e5 Merge branch 'master' of github.com:gnuboard/g5 2018-04-23 10:45:56 +09:00
thisgun f6a8b1bacf Merge branch 'master' of github.com:gnuboard/g5 2018-04-20 16:01:37 +09:00
thisgun 8958f138f4 Merge branch 'master' of github.com:gnuboard/g5 2018-04-20 14:27:21 +09:00
thisgun af8494e18f Merge branch 'master' of github.com:gnuboard/g5 2018-04-04 12:13:10 +09:00
thisgun b0fd1e7486 Merge branch 'master' of github.com:gnuboard/g5 2018-03-30 19:15:40 +09:00
thisgun bf8efdf2ab Merge branch 'master' of github.com:gnuboard/g5 2018-03-26 09:52:13 +09:00
thisgun 632ca4c79a Merge branch 'master' of github.com:gnuboard/g5 2018-03-20 15:58:37 +09:00
thisgun ea9825be61 Merge branch 'master' of github.com:gnuboard/g5 2018-03-19 14:31:06 +09:00
thisgun fbe2021a38 Merge branch 'master' of github.com:gnuboard/g5 2017-12-27 18:16:32 +09:00
thisgun 5ba5836ecb Merge branch 'master' of github.com:gnuboard/g5 2017-12-27 09:59:37 +09:00
thisgun a90a38f096 Merge branch 'master' of github.com:gnuboard/g5 2017-12-20 12:05:17 +09:00
thisgun bc68c4bc70 Merge branch 'master' of github.com:gnuboard/g5 2017-12-07 11:18:09 +09:00
thisgun 7d8e2e4fdd Merge branch 'master' of github.com:gnuboard/g5 2017-11-07 10:11:55 +09:00
thisgun f9dd7644cc Merge branch 'master' of github.com:gnuboard/g5 2017-10-11 09:06:51 +09:00
thisgun 28d079e83f 5.2.9.3 버전 수정 2017-09-11 11:00:14 +09:00
thisgun 54401165e8 5.2.9.2 버전 정보 수정 2017-08-16 10:52:49 +09:00
thisgun b99efb8fc8 1:1 문의 및 내용관리 상단 하단 경로 수정 2017-08-16 10:43:24 +09:00
thisgun ad102421cb Stored XSS 취약점 수정 (17-557) 2017-08-16 10:43:21 +09:00
thisgun 9be00683d9 433 포트번호 처리 수정 2017-08-16 10:43:18 +09:00
thisgun e76f36a1be 최고관리자 정보수정 문제 ( 17-00465 취약점 관련 ) 2017-08-16 10:43:15 +09:00
thisgun 70b62a6c6a 패스워드 찾기 https url 처리 2017-08-16 10:43:12 +09:00
thisgun 61b3fe4ebd 쪽지 보낼때 차감 포인트도 표시하기 2017-08-16 10:43:08 +09:00
thisgun 30a93dbef7 아이코드 충전하기 버튼 링크 태그 수정 2017-08-16 10:43:05 +09:00
thisgun b6956bd6fd 모바일 댓글 https 미처리 수정 2017-08-16 10:43:03 +09:00
thisgun 7a4b7e23c5 include path 체크함수 수정 2017-08-16 10:42:47 +09:00
thisgun b34a7610f5 인스톨시 필터링 단어 수정 2017-08-16 10:42:40 +09:00
thisgun 0d19b01229 5.2.9 버전 변경 2017-07-03 19:58:40 +09:00
thisgun 2b2d558c87 게시판 본문의 url 자동 링크 소스 수정 2017-07-03 19:41:44 +09:00
thisgun 94f25f73fa 그누보드 글 수정 XSS 취약점 수정 ( 17-454 ) 2017-07-03 19:41:38 +09:00
thisgun 5bd16c0e77 kcaptcha https 적용이 안되는 오류 수정 2017-07-03 19:41:33 +09:00
thisgun 7bb40dd882 코멘트 폼 및 게시판 패스워드 action url에 https 처리 2017-07-03 19:41:26 +09:00
thisgun bb99c050b6 게시판 글쓰기시 버튼도 토큰 적용되도록 수정 2017-07-03 19:41:20 +09:00
thisgun 31cdf10011 스마트에디터 2.9.0 버전으로 수정 2017-07-03 19:41:13 +09:00
thisgun 02c29c137c cheditor js 업로드 수정 2017-07-03 19:41:09 +09:00
thisgun e9afe3fdae 1:1 문의 페이징 오류 수정 2017-07-03 19:41:05 +09:00
thisgun ce9517885b 그누보드 AND 검색을 이용한 취약점 수정 (17-455) 2017-07-03 19:40:57 +09:00
thisgun 6a41d655de 게시판에서 특수문자 일부 입력시 캐쉬 파일 생성 오류 수정 2017-07-03 19:40:50 +09:00
thisgun c2a4a39ea0 에디터 이미지 업로드 부분 정규식 수정 2017-06-14 11:22:05 +09:00
thisgun b8759e4acd 5.2.8 버젼변경 2017-06-14 10:35:04 +09:00
thisgun e6a3df6f08 그누보드 파일 삭제 취약점 17-282 수정 2017-06-14 10:32:43 +09:00
thisgun 617dfbf0e2 그누보드 원격 취약점 17-259 수정 2017-06-14 10:32:35 +09:00
thisgun e4c9bf5ba4 g5_path 함수 수정 2017-06-14 10:32:29 +09:00
thisgun 910091b6c6 모바일 크롬 브라우저에서 캡챠 조회수 버그 수정 2017-06-14 10:32:23 +09:00
thisgun 92b8ce3a89 게시판 검색시 필드 소문자로 변경 2017-06-14 10:32:13 +09:00
thisgun 8a276fc073 install 파일에 utf-8 헤더 추가 2017-06-14 10:32:08 +09:00
thisgun baa2e890ba 기타 오류 수정 2017-06-14 10:32:04 +09:00
thisgun a9f4aee93f 메뉴 추가 대상에서 게시판일 경우 게시판 그룹 표시하기 #73 2017-06-14 10:31:59 +09:00
thisgun 144926774d 이메일 복화화 문자열이 깨지는 현상 수정 2017-06-14 10:31:53 +09:00
thisgun 435da08a02 5.2.7 버전변경 2017-03-20 17:45:21 +09:00
thisgun 945c060b67 썸네일 파일 수정 2017-03-20 17:45:17 +09:00
thisgun 83fd4bf68a cheditor 소스 수정 2017-03-20 17:45:09 +09:00
thisgun f11c4531e9 원격코드 실행 취약점(17-00160) 수정 2017-03-20 17:45:05 +09:00
thisgun f36c24e5d0 오타 수정 (왕대인님 제보) 2017-03-20 17:45:00 +09:00
thisgun 23a91b346d LFI to RCE 취약점 수정 2017-03-20 17:44:56 +09:00
thisgun 8eb465d26f 5.2.6 버전변경 2017-01-18 19:59:42 +09:00
thisgun 6ff06d4609 글쓰기시 page 중복 소스 삭제 2017-01-18 19:58:35 +09:00
thisgun c817b1edb7 PHPMailer 5.2.22 버전 적용 2017-01-18 19:58:31 +09:00
thisgun f7c6a52f6d cheditor5 추가 2017-01-18 19:58:20 +09:00
thisgun 3e343bdf66 5.2.5 버전변경 2017-01-09 14:33:20 +09:00
thisgun e131563c8f XSS 취약점(16-1008) 수정 2017-01-09 14:30:47 +09:00
thisgun 0094cc9afe 스마트에디터 업로드 방식 수정 2017-01-09 14:30:39 +09:00
thisgun 5fde923aa0 PHPMailer 5.2.19 버전 적용 2017-01-09 14:30:33 +09:00
chicpro 1e3a4f2657 KCP 본인확인 모바일 관련 수정 2016-12-21 09:56:32 +09:00
chicpro 0693fde962 5.2.4 버전변경 2016-11-22 11:34:16 +09:00
chicpro 7fb5f92200 <?php 수정 2016-11-22 10:47:31 +09:00
chicpro 50c8207fed 컬럼 정렬 함수에 sca 변수 추가 (sir ko님 제안) 2016-10-20 09:30:42 +09:00
chicpro 6dbfa73461 5.2.3 버전변경 2016-10-19 10:26:05 +09:00
chicpro 76ecc6efe8 XSS 취약점(16-781) 수정 2016-10-17 16:57:04 +09:00
chicpro f4b0737178 개인정보처리방침 명칭 변경 2016-10-17 14:48:00 +09:00
chicpro e99c7a81db 게시글 CSRF 취약점(16-749 16-750) 수정 2016-10-17 14:47:45 +09:00
chicpro ce0a6dc3af js css 버전 상수 추가 2016-10-17 14:47:30 +09:00
chicpro f3e428ea1e 모바이 FAQ 하단 내용 출력 오류 수정 2016-09-21 11:41:04 +09:00
chicpro 9b422b38c5 5.2.2 버전변경 2016-09-20 09:59:04 +09:00
chicpro f6056b2d37 오픈 리다이렉트 취약점(16-603) 수정 2016-09-06 14:47:35 +09:00
chicpro a560fc353c htmlpurifier 4.8 업데이트 2016-08-29 13:48:02 +09:00
chicpro e2c67e854f 5.2.1 버전변경 2016-08-22 09:56:47 +09:00
thisgun 3e7617e825 스마트에디터 2.8.2.3 보안패치 #63 2016-08-17 14:37:23 +09:00
chicpro 4515f11169 토큰 초기화 코드 추가 2016-08-10 10:02:04 +09:00
chicpro ec32f64bc4 댓글 수정 CSRF 취약점 수정 2016-08-10 10:01:49 +09:00
chicpro 15bd8b9632 파일경로 필터링 코드 추가 2016-08-10 10:01:35 +09:00
chicpro ef013e0827 wr_id_list 필터링 코드 추가 2016-08-10 09:56:03 +09:00
chicpro b3773217e9 5.2.0 버전변경 2016-07-25 10:44:58 +09:00
chicpro 70f6d92e87 XSS 취약점 수정 16-480 2016-07-21 10:25:46 +09:00
chicpro 042695af55 5.1.19 버전변경 2016-07-05 11:01:48 +09:00
chicpro 85f9523b30 댓글 삭제 토큰 코드 수정 2016-06-28 13:33:28 +09:00
chicpro 8c1d6266af 게시글 댓글 삭제 때 토큰 체크 추가 2016-06-24 17:22:29 +09:00
chicpro 30009dba6f 커맨드 인젝션 취약점(16-418 419) 수정 2016-06-24 17:22:14 +09:00
chicpro 24e7e8823e 가입축하 메일의 메일인증코드 수정 2016-05-24 17:46:02 +09:00
chicpro 42fb4b71a6 5.1.18 버전변경 2016-05-17 10:05:35 +09:00
chicpro f0134b610b 누락된 필드 추가 2016-05-17 10:05:06 +09:00
chicpro c2cf34392a 1:1문의 등록 오류 수정 2016-05-17 10:04:53 +09:00
chicpro 20dc859436 5.1.17 버전변경 2016-05-16 15:21:55 +09:00
chicpro f5ec4d60c0 기본환경설정 NHN KCP 사명변경 2016-05-13 12:03:02 +09:00
chicpro de00b4e9d3 1:1문의 파일업로드 분류 체크 추가 2016-05-04 13:36:31 +09:00
chicpro 8c67945c64 파일 업로드 개수 코드 수정 2016-05-04 13:36:20 +09:00
chicpro e5889df761 게시글 카테고리 체크 수정 2016-05-03 17:33:53 +09:00
chicpro 624e3d74a6 파일 업로드 개수 체크 추가 2016-05-03 17:33:37 +09:00
chicpro 30815f71e0 폼메일에서의 이메일주소 노출 수정 2016-05-03 14:16:38 +09:00
chicpro 949a73b468 1:1문의 이메일 체크 수정 2016-05-03 14:16:23 +09:00
chicpro 24d57cdd4b 스크랩 게시글 체크 추가 2016-05-03 14:16:09 +09:00
chicpro 191f3d2f97 1:1문의 삭제 오류 수정 2016-05-03 14:15:55 +09:00
chicpro 4973714e2f 이메일인증 프로세스 개선 2016-05-03 14:15:40 +09:00
chicpro 70bfeefb3b 댓글 등록 오류 수정 2016-04-28 09:49:14 +09:00
chicpro e8b83f3a33 비밀글 등록 버그 수정 2016-04-27 10:44:37 +09:00
chicpro c6bdc172ee 5.1.16 버전변경 2016-04-20 11:08:39 +09:00
sora90224 c3cf74f0c5 관리자 부가서비스 kcp 로고 변경 2016-04-20 11:07:58 +09:00
chicpro 52db203ecd 필터링 특수문자 추가 2016-04-20 11:07:23 +09:00
chicpro 6e05353f31 sst 변수 필터링 특수문자 추가 2016-04-20 11:07:12 +09:00
chicpro 7f6a9a090a 5.1.15 버전변경 2016-03-21 09:50:06 +09:00
sora90224 1825830c3d 모바일 쪽지함 이름겹침수정 2016-03-09 15:03:14 +09:00
chicpro 3047e09f88 5.1.14 버전변경 2016-03-07 10:41:33 +09:00
chicpro 990af076af 커맨드 인젝션 취약점(16-164, 16-165) 수정 2016-02-29 15:14:15 +09:00
chicpro b1f0342921 5.1.13 버전변경 2016-02-22 09:48:17 +09:00
chicpro 63f9e4c8df SIR 도메인 변경 2016-02-19 11:22:17 +09:00
chicpro 6b43e67c40 비밀 댓글 노출 취약점(16-067) 수정 2016-02-11 11:01:04 +09:00
chicpro 9a870506ab Reflected XSS 취약점(16-036) 수정 2016-02-11 11:00:30 +09:00
chicpro 008ae978dd XSS 취약점(16-060) 수정 2016-02-11 10:58:45 +09:00
chicpro 20b1d8c7e5 XSS 취약점(16-059) 수정 2016-02-11 10:58:31 +09:00
thisgun 1e011ba56d 스마트 에디터 2.8.2 에 추가된 파일 적용 2016-02-04 17:31:09 +09:00
thisgun a73e48c3e2 스마트에디터 2.8.2 적용 및 에디터 업로드 보안 수정 2016-02-04 17:30:53 +09:00
chicpro e9fd9f03fd g5_admin_url 코드 수정 2016-02-03 10:42:50 +09:00
chicpro 4913da0a1d g5_admin_url 변수 설정 코드 변경 2016-02-01 11:56:15 +09:00
chicpro 18ef4b0767 메일인증 기능 수정 2016-02-01 11:55:57 +09:00
chicpro d0e368fe2a sca 필터링 코드 수정 2016-01-21 16:00:54 +09:00
chicpro 5185f0c12a 5.1.12 버전변경 2016-01-20 10:03:25 +09:00
chicpro f5f4925d4e sca 필터링 코드 추가 2016-01-12 11:08:58 +09:00
chicpro bd3fd20630 게시글 등록 메일 이미지 출력 오류 수정 2016-01-07 10:55:25 +09:00
chicpro 6797c85480 5.1.11 버전변경 2016-01-05 09:44:47 +09:00
chicpro 2c9ff2bb52 모바일 그룹 정렬 필드 수정 2015-12-23 16:43:20 +09:00
chicpro cc2b5c246d PHPMailer 5.2.14 버전 적용 2015-12-22 15:27:18 +09:00
chicpro c337bfdf88 5.1.10 버전변경 2015-12-21 11:00:46 +09:00
chicpro cb5603008a 분류 사용할 때 분류선택 여부 체크 추가 2015-12-14 11:08:39 +09:00
chicpro 9d147b5e6c 태그 오류 수정 2015-12-10 16:33:15 +09:00
chicpro aabc82ee6c 5.1.9 버전변경 2015-12-07 11:24:10 +09:00
chicpro 40aff270cd 캡챠 폰트 변경 2015-12-07 11:22:39 +09:00
thisgun 851a21a3c1 엑셀 라이브러리 php7 버젼에서 난 오류 수정 2015-11-30 17:33:38 +09:00
chicpro d5b7dd165d new.php XSS 취약점 수정 2015-11-27 14:25:01 +09:00
chicpro beb7a86f2a 토큰 오류 알림 후 이동 url 지정 2015-11-27 14:24:48 +09:00
chicpro a6327afac4 5.1.8 버전변경 2015-11-25 09:55:20 +09:00
chicpro 30305d78dc 1:1문의 SMS 발신번호 사전등록제 관련 코드 수정 2015-11-25 09:48:17 +09:00
chicpro bb1fd4d3ab 관리자 CSRF 취약점 수정 2015-11-24 16:12:22 +09:00
chicpro a75e00f9e0 모바일 게시판 제목 적용되도록 수정 2015-11-19 15:50:27 +09:00
chicpro ad67fca323 파일면 변경으로인한 중복 파일 삭제 2015-11-17 16:39:16 +09:00
chicpro 614dce643c 캡챠 오류 수정 및 파일명 변경 2015-11-17 16:37:30 +09:00
chicpro c0cd45cc18 캡챠이미지 경로 오류수정 2015-11-17 09:07:12 +09:00
chicpro f3e7dbbb43 5.1.7 버전 변경 2015-11-16 16:45:37 +09:00
chicpro 5247359e39 오타 수정 2015-11-16 16:39:09 +09:00
chicpro 4ed4938cf1 캡챠 및 회원가입 값체크 개선 2015-11-16 16:36:04 +09:00
chicpro 158d9040d2 접속자 Browscap 적용 기능 개선 2015-11-13 11:23:14 +09:00
sora90224 aebfc70b10 불필요한 소스 삭제 2015-11-12 09:38:41 +09:00
chicpro 69ca119b10 업로드 파일명 코드 변경 2015-11-11 11:41:46 +09:00
chicpro be15f890c9 5.1.6 버전변경 2015-11-09 09:31:58 +09:00
chicpro bc71241846 php7 대응 코드 수정 2015-11-04 17:11:52 +09:00
chicpro 4bcce2696c sql_set_charset 함수 코드 수정 2015-11-04 10:20:42 +09:00
chicpro 7083bb0899 관리자 접속자 기능 개선 2015-11-03 15:35:31 +09:00
chicpro c7b1d0ee96 5.1.5 버전 변경 2015-11-02 09:54:40 +09:00
chicpro ba52e4ab6f 회원가입 개인정보취급방침 안내 수정 2015-10-29 09:59:29 +09:00
chicpro e47156ede6 게시판 복사 중 따옴표로 인한 오류 수정 2015-10-28 14:17:07 +09:00
chicpro 36ef8e6447 5.1.4 버전변경 2015-10-26 10:08:02 +09:00
chicpro eb154efa24 누락된 닫음태그 추가 2015-10-20 12:02:20 +09:00
chicpro 9bf15fdf32 htmlpurifier 4.7 버전 적용 2015-10-20 11:28:40 +09:00
chicpro 353a0d9409 XSS취약점관련 object 태그 허용설정 변경 2015-10-20 11:28:26 +09:00
chicpro 0535b6d26a post 값 필터링 코드 위치 변경 2015-10-20 11:26:30 +09:00
chicpro 1fe4684537 MySQLi 지원 추가 및 SMS5 수정 2015-10-16 10:12:06 +09:00
chicpro 0803de998b 반응형 대비 캡챠 코드 수정 2015-10-06 09:49:15 +09:00
chicpro 273983c87c 따옴표 관련 오류 수정 2015-10-02 17:57:46 +09:00
chicpro 94cc7639a9 XSS 취약점 수정 및 LMS 모듈 추가 2015-10-01 13:46:46 +09:00
chicpro 84009dc16c 관리자 글현황 추가 및 기타 오류 수정 2015-08-28 11:42:25 +09:00
chicpro 82c12f6d98 투표 결과 테마스킨 적용 오류 수정 2015-08-04 09:05:41 +09:00
chicpro 6beff3a333 그누보드 5.1.0 테마 지원버전 2015-08-03 15:44:15 +09:00
chicpro d49200c99e XSS 취약점 및 기타 오류 수정 2015-07-27 14:08:23 +09:00
sungkyuchun faed6ac09a empty_mb_name checks mb_id, not mb_name
empty_mb_name is a function checking name from user input form. But it
was not checked by empty_mb_name function. So I fix it.
2015-07-21 09:48:45 +09:00
chicpro 9256a5618b 버전변경 2015-07-20 11:52:21 +09:00
chicpro a52858fc6d XSS 취약점, 새 우편번호, 기타 오류 수정 2015-07-20 11:40:09 +09:00
iz4blue 2ccc407397 이미지 width 계산 이후 빠진 attributes 추가 2015-07-14 14:10:00 +09:00
chicpro d5bd57cdfa 그누보드 5.0.40 수정내역 적용 및 XSS 취약점 수정 2015-07-13 13:43:46 +09:00
chicpro 3bbbe96319 XSS 및 Blind SQL Injection 취약점 수정 2015-07-07 13:50:38 +09:00
chicpro 78169b372c Merge branch 'merge-patch' 2015-07-03 17:08:55 +09:00
chicpro a79a926221 Merge https://github.com/iz4blue/gnuboard5 into merge-patch 2015-07-03 17:08:21 +09:00
chicpro f72ea8774e Merge branch 'master' into merge-patch 2015-07-03 17:05:45 +09:00
iz4admin 3c9b72d17a PHP short_open_tag=0 에러 방지 2015-07-03 16:53:04 +09:00
chicpro 8821583e8f 그누보드 5.0.38 수정내역 적용 및 CSRF 취약점 수정 2015-06-29 10:36:44 +09:00
chicpro 6e90622328 그누보드 5.0.37 수정내역 적용 및 XSS 취약점 수정 2015-06-23 11:12:23 +09:00
chicpro d5aca5ab93 그누보드 5.0.36 수정 내역 및 XSS 취약점 수정 2015-06-11 09:54:48 +09:00
chicpro 7110ccc12f 그누보드 5.0.35 수정내역 적용 2015-06-01 09:38:12 +09:00
chicpro 330e656544 그누보드5.0.34 수정내역 적용 2015-05-19 13:59:00 +09:00
chicpro 18fc8ec6d1 오타 및 회원가입폼 스타일 수정 2015-05-14 09:14:37 +09:00
chicpro 01a31bb18f Magic Hash 관련 비밀번호 체크 코드 수정 2015-05-13 17:10:08 +09:00
chicpro 2705b9312c 그누보드5.0.33 수정내역 적용 2015-05-13 11:57:04 +09:00
chicpro 9fd14cfc17 그누보드 5.0.32 수정내역 적용 2015-04-09 09:16:36 +09:00
chicpro a6a2183c7d 그누보드 5.0.31 수정내역 적용 2015-03-10 13:47:21 +09:00
Mabin 4b9369599c RSS 헤더 오류 수정 (phpxml -> xml) 2015-03-04 16:05:18 +09:00
chicpro b477c2e720 XSS 취약점 패치 및 5.0.30버전 수정내역 적용 2015-02-09 09:57:32 +09:00
chicpro 7ef2029a31 그누보드 5.0.29 수정내역 적용 2015-02-02 13:35:15 +09:00
chicpro 1cd8d590b2 mb_tel 필드를 이용한 xss 취약점 수정 2015-01-14 09:13:22 +09:00
chicpro 82a55c96a5 관리자 부가서비스 페이지 추가 2015-01-12 15:00:04 +09:00
chicpro 489c859d3e 그누보드 5.0.26 수정내역 적용 2015-01-05 10:18:00 +09:00
chicpro d5db75a4c9 입력금지 메일 도메인 체크 코드 수정 2014-12-18 10:11:16 +09:00
chicpro db2ef39126 사용하지 않는 파일 삭제 2014-12-17 10:15:35 +09:00
chicpro 87adbf0f8d 그누보드 5.0.25 보안패치 및 수정내역 적용 2014-12-17 10:14:29 +09:00
chicpro 244b8ae819 보안패치 및 그누보드 5.0.24 수정내역 적용 2014-12-08 11:23:01 +09:00
chicpro 7ea9d2e1d2 그누보드 5.0.23 수정 내역 적용 2014-12-02 10:16:35 +09:00
chicpro 7dc293a147 그누보드 5.0.22 보안패치 적용 2014-11-07 09:26:16 +09:00
chicpro 097903d0ce 그누보드 5.0.21 보안패치 및 기타 오류 수정 2014-10-28 13:17:24 +09:00
chicpro 37b0fa5788 SQL Injection 및 관리자가 게시글 수정때 정보 반영되도록 수정 2014-10-24 11:02:39 +09:00
chicpro ad78efcdaa 회원 홈페이지를 이용한 SQL Injection 오류 수정 2014-10-23 09:25:33 +09:00
chicpro 352deb6133 보안패치 및 그누보드 5.0.20 수정사항 적용 2014-10-22 13:16:44 +09:00
chicpro 1355c7ef57 그누보드 5.0.19 수정사항 적용 2014-10-13 15:13:08 +09:00
chicpro 3fa9aec9f2 그누보드 5.0.18 수정사항 적용 2014-09-29 15:56:30 +09:00
chicpro 4c083b6471 기능개선 및 라이센스 기타오류 수정 2014-09-16 10:33:19 +09:00
chicpro 916cd86330 다음주소 API 기본코드로 변경 및 불필요한 파일 삭제 2014-08-22 15:21:23 +09:00
chicpro 5a37e8243d 다음주소API 관련 스크립트 코드 및 기타 코드 수정 2014-08-20 16:55:18 +09:00
chicpro e891791f86 불필요한 파일 삭제 2014-08-19 14:55:42 +09:00
chicpro 59468d1312 다음 주소 API 적용 및 기타 수정 2014-08-19 14:52:47 +09:00
chicpro 43fae4ed50 불필요한 파일 삭제 2014-08-19 14:47:55 +09:00
chicpro fdc93c1c2d 5.0.13 버전 패치 적용 2014-08-11 15:01:27 +09:00
chicpro 79d7a690f4 XSS 및 SQL Injection 보안 취약점 수정 2014-07-31 17:01:06 +09:00
chicpro 0742c5f81b 댓글 wr_name 이용한 XSS 보안 취약점 수정 2014-07-30 18:05:52 +09:00
chicpro d5e6a07dda xss 대응 코드 추가 2014-07-29 16:33:19 +09:00
chicpro e84a1c8c98 그누보드 5.0.9 패치 적용 2014-07-28 11:41:12 +09:00
chicpro 2579323ddf sql injection 보안패치 및 스마트에디터2 추가 2014-07-18 17:10:25 +09:00
chicpro 2658dde159 카카오톡 링크기능 추가 및 기타 버그 수정 2014-07-15 16:59:54 +09:00
chicpro d9b8d31225 gitignore 충돌수정 2014-07-09 10:02:56 +09:00
chicpro 4d8500be02 네이버 신디케이션 적용 및 기타 오류 수정 2014-07-09 10:01:21 +09:00
chicpro 288da7f9e1 전역배열변수 보안 오류 수정 2014-07-01 11:08:19 +09:00
chicpro 41aac91146 보고된 버그 수정 2014-06-27 10:12:06 +09:00
chicpro a949c32b4c 기능개선 및 오류 수정 2014-06-20 13:37:58 +09:00
chicpro dc06aed164 FAQ 검색기능 수정 및 이전 프로그램 오류 수정 2014-06-16 10:24:15 +09:00
chicpro 6518b22854 1:1문의 XSS 취약점 수정 2014-06-11 15:30:55 +09:00
chicpro c8a69b054e sns 사용 때 게시글 보기 로딩 속도 개선 2014-06-10 16:10:17 +09:00
chicpro cd50ef5d48 Subtree Merging 설정 2014-06-09 14:57:31 +09:00
chicpro 7983affa68 그누보드5 정식버전 2014-06-09 14:48:44 +09:00
chicpro 0243dabe20 first commit 2014-06-09 14:00:04 +09:00
1039 changed files with 1374 additions and 101693 deletions

No files matched your search

-6
View File
@@ -6,14 +6,8 @@ sirgle/
test.php test.php
*.key *.key
*.sh *.sh
log
g5_tree
cheditor5.*/ cheditor5.*/
ckeditor*/ ckeditor*/
log/ log/
g5_tree/ g5_tree/
.vscode/
naver*.html naver*.html
initests01/
SIRsoft000/
config.php
File renamed without changes.
+1 -9
View File
@@ -1,10 +1,2 @@
<?php <?php
include_once('./common.php'); include_once('./common.php');
// 커뮤니티 사용여부
if(defined('G5_COMMUNITY_USE') && G5_COMMUNITY_USE === false) {
if (!defined('G5_USE_SHOP') || !G5_USE_SHOP)
die('<p>쇼핑몰 설치 후 이용해 주십시오.</p>');
define('_SHOP_', true);
}
+1 -2
View File
@@ -111,7 +111,6 @@ function imageview(id, w, h)
<div id="tnb"> <div id="tnb">
<ul> <ul>
<li class="tnb_li"><a href="<?php echo G5_SHOP_URL ?>/" class="tnb_shop" target="_blank" title="쇼핑몰 바로가기">쇼핑몰 바로가기</a></li>
<li class="tnb_li"><a href="<?php echo G5_URL ?>/" class="tnb_community" target="_blank" title="커뮤니티 바로가기">커뮤니티 바로가기</a></li> <li class="tnb_li"><a href="<?php echo G5_URL ?>/" class="tnb_community" target="_blank" title="커뮤니티 바로가기">커뮤니티 바로가기</a></li>
<li class="tnb_li"><a href="<?php echo G5_ADMIN_URL ?>/service.php" class="tnb_service">부가서비스</a></li> <li class="tnb_li"><a href="<?php echo G5_ADMIN_URL ?>/service.php" class="tnb_service">부가서비스</a></li>
<li class="tnb_li"><button type="button" class="tnb_mb_btn">관리자<span class="./img/btn_gnb.png">메뉴열기</span></button> <li class="tnb_li"><button type="button" class="tnb_mb_btn">관리자<span class="./img/btn_gnb.png">메뉴열기</span></button>
@@ -131,7 +130,7 @@ function imageview(id, w, h)
foreach($amenu as $key=>$value) { foreach($amenu as $key=>$value) {
$href1 = $href2 = ''; $href1 = $href2 = '';
if (isset($menu['menu'.$key][0][2]) && $menu['menu'.$key][0][2]) { if ($menu['menu'.$key][0][2]) {
$href1 = '<a href="'.$menu['menu'.$key][0][2].'" class="gnb_1da">'; $href1 = '<a href="'.$menu['menu'.$key][0][2].'" class="gnb_1da">';
$href2 = '</a>'; $href2 = '</a>';
} else { } else {
+16 -21
View File
@@ -387,7 +387,7 @@ function get_sanitize_input($s, $is_html=false){
return $s; return $s;
} }
function check_log_folder($log_path, $is_delete=true){ function check_log_folder($log_path){
if( is_writable($log_path) ){ if( is_writable($log_path) ){
@@ -411,26 +411,21 @@ function check_log_folder($log_path, $is_delete=true){
} }
} }
if( $is_delete ) { // txt 파일과 log 파일을 조회하여 30일이 지난 파일은 삭제합니다.
try { $txt_files = glob($log_path.'/*.txt');
// txt 파일과 log 파일을 조회하여 30일이 지난 파일은 삭제합니다. $log_files = glob($log_path.'/*.log');
$txt_files = glob($log_path.'/*.txt');
$log_files = glob($log_path.'/*.log'); $del_files = array_merge($txt_files, $log_files);
$del_files = array_merge($txt_files, $log_files);
if( $del_files && is_array($del_files) ){ if( $del_files && is_array($del_files) ){
foreach ($del_files as $del_file) { foreach ($del_files as $del_file) {
$filetime = filemtime($del_file); $filetime = filemtime($del_file);
// 30일이 지난 파일을 삭제 // 30일이 지난 파일을 삭제
if($filetime && $filetime < (G5_SERVER_TIME - 2592000)) { if($filetime && $filetime < (G5_SERVER_TIME - 2592000)) {
@unlink($del_file); @unlink($del_file);
} }
} }
} }
} catch(Exception $e) {
}
}
} }
// POST로 넘어온 토큰과 세션에 저장된 토큰 비교 // POST로 넘어온 토큰과 세션에 저장된 토큰 비교
@@ -559,7 +554,7 @@ if (get_session('ss_mb_key') !== $admin_key) {
include_once(G5_LIB_PATH.'/mailer.lib.php'); include_once(G5_LIB_PATH.'/mailer.lib.php');
// 메일 알림 // 메일 알림
mailer($member['mb_nick'], $member['mb_email'], $member['mb_email'], 'XSS 공격 알림', $_SERVER['REMOTE_ADDR'].' 아이피로 XSS 공격이 있었습니다.<br><br>관리자 권한을 탈취하려는 접근이므로 주의하시기 바랍니다.<br><br>해당 아이피는 차단하시고 의심되는 게시물이 있는지 확인하시기 바랍니다.'.G5_URL, 0); mailer($member['mb_nick'], $member['mb_email'], $member['mb_email'], 'XSS 공격 알림', $_SERVER['REMOTE_ADDR'].' 아이피로 XSS 공격이 있었습니다.\n\n관리자 권한을 탈취하려는 접근이므로 주의하시기 바랍니다.\n\n해당 아이피는 차단하시고 의심되는 게시물이 있는지 확인하시기 바랍니다.\n\n'.G5_URL, 0);
alert_close('정상적으로 로그인하여 접근하시기 바랍니다.'); alert_close('정상적으로 로그인하여 접근하시기 바랍니다.');
} }
-21
View File
@@ -1,21 +0,0 @@
<?php
if (!defined('G5_USE_SHOP') || !G5_USE_SHOP) return;
$menu['menu400'] = array (
array('400000', '쇼핑몰관리', G5_ADMIN_URL.'/shop_admin/', 'shop_config'),
array('400010', '쇼핑몰현황', G5_ADMIN_URL.'/shop_admin/', 'shop_index'),
array('400100', '쇼핑몰설정', G5_ADMIN_URL.'/shop_admin/configform.php', 'scf_config'),
array('400400', '주문내역', G5_ADMIN_URL.'/shop_admin/orderlist.php', 'scf_order', 1),
array('400440', '개인결제관리', G5_ADMIN_URL.'/shop_admin/personalpaylist.php', 'scf_personalpay', 1),
array('400200', '분류관리', G5_ADMIN_URL.'/shop_admin/categorylist.php', 'scf_cate'),
array('400300', '상품관리', G5_ADMIN_URL.'/shop_admin/itemlist.php', 'scf_item'),
array('400660', '상품문의', G5_ADMIN_URL.'/shop_admin/itemqalist.php', 'scf_item_qna'),
array('400650', '사용후기', G5_ADMIN_URL.'/shop_admin/itemuselist.php', 'scf_ps'),
array('400620', '상품재고관리', G5_ADMIN_URL.'/shop_admin/itemstocklist.php', 'scf_item_stock'),
array('400610', '상품유형관리', G5_ADMIN_URL.'/shop_admin/itemtypelist.php', 'scf_item_type'),
array('400500', '상품옵션재고관리', G5_ADMIN_URL.'/shop_admin/optionstocklist.php', 'scf_item_option'),
array('400800', '쿠폰관리', G5_ADMIN_URL.'/shop_admin/couponlist.php', 'scf_coupon'),
array('400810', '쿠폰존관리', G5_ADMIN_URL.'/shop_admin/couponzonelist.php', 'scf_coupon_zone'),
array('400750', '추가배송비관리', G5_ADMIN_URL.'/shop_admin/sendcostlist.php', 'scf_sendcost', 1),
array('400410', '미완료주문', G5_ADMIN_URL.'/shop_admin/inorderlist.php', 'scf_inorder', 1),
);
-15
View File
@@ -1,15 +0,0 @@
<?php
if (!defined('G5_USE_SHOP') || !G5_USE_SHOP) return;
$menu['menu500'] = array (
array('500000', '쇼핑몰현황/기타', G5_ADMIN_URL.'/shop_admin/itemsellrank.php', 'shop_stats'),
array('500110', '매출현황', G5_ADMIN_URL.'/shop_admin/sale1.php', 'sst_order_stats'),
array('500100', '상품판매순위', G5_ADMIN_URL.'/shop_admin/itemsellrank.php', 'sst_rank'),
array('500120', '주문내역출력', G5_ADMIN_URL.'/shop_admin/orderprint.php', 'sst_print_order', 1),
array('500400', '재입고SMS알림', G5_ADMIN_URL.'/shop_admin/itemstocksms.php', 'sst_stock_sms', 1),
array('500300', '이벤트관리', G5_ADMIN_URL.'/shop_admin/itemevent.php', 'scf_event'),
array('500310', '이벤트일괄처리', G5_ADMIN_URL.'/shop_admin/itemeventlist.php', 'scf_event_mng'),
array('500500', '배너관리', G5_ADMIN_URL.'/shop_admin/bannerlist.php', 'scf_banner', 1),
array('500140', '보관함현황', G5_ADMIN_URL.'/shop_admin/wishlist.php', 'sst_wish'),
array('500210', '가격비교사이트', G5_ADMIN_URL.'/shop_admin/price.php', 'sst_compare', 1)
);
+4 -4
View File
@@ -21,9 +21,9 @@ if (!$gr_subject) alert('그룹 제목을 입력하세요.');
$posts = array(); $posts = array();
$check_keys = array( $check_keys = array(
'gr_subject'=>'', 'gr_subject',
'gr_device'=>'', 'gr_device',
'gr_admin'=>'', 'gr_admin'
); );
for($i=1;$i<=10;$i++){ for($i=1;$i<=10;$i++){
@@ -31,7 +31,7 @@ for($i=1;$i<=10;$i++){
$check_keys['gr_'.$i] = isset($_POST['gr_'.$i]) ? $_POST['gr_'.$i] : ''; $check_keys['gr_'.$i] = isset($_POST['gr_'.$i]) ? $_POST['gr_'.$i] : '';
} }
foreach( $check_keys as $key=>$value ){ foreach( $check_keys as $key ){
if( $key === 'gr_subject' ){ if( $key === 'gr_subject' ){
$posts[$key] = isset($_POST[$key]) ? strip_tags(clean_xss_attributes($_POST[$key])) : ''; $posts[$key] = isset($_POST[$key]) ? strip_tags(clean_xss_attributes($_POST[$key])) : '';
} else { } else {
+70 -70
View File
@@ -339,14 +339,14 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
<th scope="row"><label for="cf_admin_email">관리자 메일 주소<strong class="sound_only">필수</strong></label></th> <th scope="row"><label for="cf_admin_email">관리자 메일 주소<strong class="sound_only">필수</strong></label></th>
<td colspan="3"> <td colspan="3">
<?php echo help('관리자가 보내고 받는 용도로 사용하는 메일 주소를 입력합니다. (회원가입, 인증메일, 테스트, 회원메일발송 등에서 사용)') ?> <?php echo help('관리자가 보내고 받는 용도로 사용하는 메일 주소를 입력합니다. (회원가입, 인증메일, 테스트, 회원메일발송 등에서 사용)') ?>
<input type="text" name="cf_admin_email" value="<?php echo get_sanitize_input($config['cf_admin_email']); ?>" id="cf_admin_email" required class="required email frm_input" size="40"> <input type="text" name="cf_admin_email" value="<?php echo $config['cf_admin_email'] ?>" id="cf_admin_email" required class="required email frm_input" size="40">
</td> </td>
</tr> </tr>
<tr> <tr>
<th scope="row"><label for="cf_admin_email_name">관리자 메일 발송이름<strong class="sound_only">필수</strong></label></th> <th scope="row"><label for="cf_admin_email_name">관리자 메일 발송이름<strong class="sound_only">필수</strong></label></th>
<td colspan="3"> <td colspan="3">
<?php echo help('관리자가 보내고 받는 용도로 사용하는 메일의 발송이름을 입력합니다. (회원가입, 인증메일, 테스트, 회원메일발송 등에서 사용)') ?> <?php echo help('관리자가 보내고 받는 용도로 사용하는 메일의 발송이름을 입력합니다. (회원가입, 인증메일, 테스트, 회원메일발송 등에서 사용)') ?>
<input type="text" name="cf_admin_email_name" value="<?php echo get_sanitize_input($config['cf_admin_email_name']); ?>" id="cf_admin_email_name" required class="required frm_input" size="40"> <input type="text" name="cf_admin_email_name" value="<?php echo $config['cf_admin_email_name'] ?>" id="cf_admin_email_name" required class="required frm_input" size="40">
</td> </td>
</tr> </tr>
<tr> <tr>
@@ -357,79 +357,79 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
<th scope="row"><label for="cf_login_point">로그인시 포인트<strong class="sound_only">필수</strong></label></th> <th scope="row"><label for="cf_login_point">로그인시 포인트<strong class="sound_only">필수</strong></label></th>
<td> <td>
<?php echo help('회원이 로그인시 하루에 한번만 적립') ?> <?php echo help('회원이 로그인시 하루에 한번만 적립') ?>
<input type="text" name="cf_login_point" value="<?php echo (int) $config['cf_login_point'] ?>" id="cf_login_point" required class="required frm_input" size="5"> 점 <input type="text" name="cf_login_point" value="<?php echo $config['cf_login_point'] ?>" id="cf_login_point" required class="required frm_input" size="5"> 점
</td> </td>
<th scope="row"><label for="cf_memo_send_point">쪽지보낼시 차감 포인트<strong class="sound_only">필수</strong></label></th> <th scope="row"><label for="cf_memo_send_point">쪽지보낼시 차감 포인트<strong class="sound_only">필수</strong></label></th>
<td> <td>
<?php echo help('양수로 입력하십시오. 0점은 쪽지 보낼시 포인트를 차감하지 않습니다.') ?> <?php echo help('양수로 입력하십시오. 0점은 쪽지 보낼시 포인트를 차감하지 않습니다.') ?>
<input type="text" name="cf_memo_send_point" value="<?php echo (int) $config['cf_memo_send_point']; ?>" id="cf_memo_send_point" required class="required frm_input" size="5"> 점 <input type="text" name="cf_memo_send_point" value="<?php echo $config['cf_memo_send_point'] ?>" id="cf_memo_send_point" required class="required frm_input" size="5"> 점
</td> </td>
</tr> </tr>
<tr> <tr>
<th scope="row"><label for="cf_cut_name">이름(닉네임) 표시</label></th> <th scope="row"><label for="cf_cut_name">이름(닉네임) 표시</label></th>
<td colspan="3"> <td colspan="3">
<input type="text" name="cf_cut_name" value="<?php echo (int) $config['cf_cut_name'] ?>" id="cf_cut_name" class="frm_input" size="5"> 자리만 표시 <input type="text" name="cf_cut_name" value="<?php echo $config['cf_cut_name'] ?>" id="cf_cut_name" class="frm_input" size="5"> 자리만 표시
</td> </td>
</tr> </tr>
<tr> <tr>
<th scope="row"><label for="cf_nick_modify">닉네임 수정</label></th> <th scope="row"><label for="cf_nick_modify">닉네임 수정</label></th>
<td>수정하면 <input type="text" name="cf_nick_modify" value="<?php echo (int) $config['cf_nick_modify'] ?>" id="cf_nick_modify" class="frm_input" size="3"> 일 동안 바꿀 수 없음</td> <td>수정하면 <input type="text" name="cf_nick_modify" value="<?php echo $config['cf_nick_modify'] ?>" id="cf_nick_modify" class="frm_input" size="3"> 일 동안 바꿀 수 없음</td>
<th scope="row"><label for="cf_open_modify">정보공개 수정</label></th> <th scope="row"><label for="cf_open_modify">정보공개 수정</label></th>
<td>수정하면 <input type="text" name="cf_open_modify" value="<?php echo (int) $config['cf_open_modify'] ?>" id="cf_open_modify" class="frm_input" size="3"> 일 동안 바꿀 수 없음</td> <td>수정하면 <input type="text" name="cf_open_modify" value="<?php echo $config['cf_open_modify'] ?>" id="cf_open_modify" class="frm_input" size="3"> 일 동안 바꿀 수 없음</td>
</tr> </tr>
<tr> <tr>
<th scope="row"><label for="cf_new_del">최근게시물 삭제</label></th> <th scope="row"><label for="cf_new_del">최근게시물 삭제</label></th>
<td> <td>
<?php echo help('설정일이 지난 최근게시물 자동 삭제') ?> <?php echo help('설정일이 지난 최근게시물 자동 삭제') ?>
<input type="text" name="cf_new_del" value="<?php echo (int) $config['cf_new_del'] ?>" id="cf_new_del" class="frm_input" size="5"> 일 <input type="text" name="cf_new_del" value="<?php echo $config['cf_new_del'] ?>" id="cf_new_del" class="frm_input" size="5"> 일
</td> </td>
<th scope="row"><label for="cf_memo_del">쪽지 삭제</label></th> <th scope="row"><label for="cf_memo_del">쪽지 삭제</label></th>
<td> <td>
<?php echo help('설정일이 지난 쪽지 자동 삭제') ?> <?php echo help('설정일이 지난 쪽지 자동 삭제') ?>
<input type="text" name="cf_memo_del" value="<?php echo (int) $config['cf_memo_del'] ?>" id="cf_memo_del" class="frm_input" size="5"> 일 <input type="text" name="cf_memo_del" value="<?php echo $config['cf_memo_del'] ?>" id="cf_memo_del" class="frm_input" size="5"> 일
</td> </td>
</tr> </tr>
<tr> <tr>
<th scope="row"><label for="cf_visit_del">접속자로그 삭제</label></th> <th scope="row"><label for="cf_visit_del">접속자로그 삭제</label></th>
<td> <td>
<?php echo help('설정일이 지난 접속자 로그 자동 삭제') ?> <?php echo help('설정일이 지난 접속자 로그 자동 삭제') ?>
<input type="text" name="cf_visit_del" value="<?php echo (int) $config['cf_visit_del'] ?>" id="cf_visit_del" class="frm_input" size="5"> 일 <input type="text" name="cf_visit_del" value="<?php echo $config['cf_visit_del'] ?>" id="cf_visit_del" class="frm_input" size="5"> 일
</td> </td>
<th scope="row"><label for="cf_popular_del">인기검색어 삭제</label></th> <th scope="row"><label for="cf_popular_del">인기검색어 삭제</label></th>
<td> <td>
<?php echo help('설정일이 지난 인기검색어 자동 삭제') ?> <?php echo help('설정일이 지난 인기검색어 자동 삭제') ?>
<input type="text" name="cf_popular_del" value="<?php echo (int) $config['cf_popular_del'] ?>" id="cf_popular_del" class="frm_input" size="5"> 일 <input type="text" name="cf_popular_del" value="<?php echo $config['cf_popular_del'] ?>" id="cf_popular_del" class="frm_input" size="5"> 일
</td> </td>
</tr> </tr>
<tr> <tr>
<th scope="row"><label for="cf_login_minutes">현재 접속자</label></th> <th scope="row"><label for="cf_login_minutes">현재 접속자</label></th>
<td> <td>
<?php echo help('설정값 이내의 접속자를 현재 접속자로 인정') ?> <?php echo help('설정값 이내의 접속자를 현재 접속자로 인정') ?>
<input type="text" name="cf_login_minutes" value="<?php echo (int) $config['cf_login_minutes'] ?>" id="cf_login_minutes" class="frm_input" size="3"> 분 <input type="text" name="cf_login_minutes" value="<?php echo $config['cf_login_minutes'] ?>" id="cf_login_minutes" class="frm_input" size="3"> 분
</td> </td>
<th scope="row"><label for="cf_new_rows">최근게시물 라인수</label></th> <th scope="row"><label for="cf_new_rows">최근게시물 라인수</label></th>
<td> <td>
<?php echo help('목록 한페이지당 라인수') ?> <?php echo help('목록 한페이지당 라인수') ?>
<input type="text" name="cf_new_rows" value="<?php echo (int) $config['cf_new_rows'] ?>" id="cf_new_rows" class="frm_input" size="3"> 라인 <input type="text" name="cf_new_rows" value="<?php echo $config['cf_new_rows'] ?>" id="cf_new_rows" class="frm_input" size="3"> 라인
</td> </td>
</tr> </tr>
<tr> <tr>
<th scope="row"><label for="cf_page_rows">한페이지당 라인수</label></th> <th scope="row"><label for="cf_page_rows">한페이지당 라인수</label></th>
<td> <td>
<?php echo help('목록(리스트) 한페이지당 라인수') ?> <?php echo help('목록(리스트) 한페이지당 라인수') ?>
<input type="text" name="cf_page_rows" value="<?php echo (int) $config['cf_page_rows'] ?>" id="cf_page_rows" class="frm_input" size="3"> 라인 <input type="text" name="cf_page_rows" value="<?php echo $config['cf_page_rows'] ?>" id="cf_page_rows" class="frm_input" size="3"> 라인
</td> </td>
<th scope="row"><label for="cf_mobile_page_rows">모바일 한페이지당 라인수</label></th> <th scope="row"><label for="cf_mobile_page_rows">모바일 한페이지당 라인수</label></th>
<td> <td>
<?php echo help('모바일 목록 한페이지당 라인수') ?> <?php echo help('모바일 목록 한페이지당 라인수') ?>
<input type="text" name="cf_mobile_page_rows" value="<?php echo (int) $config['cf_mobile_page_rows'] ?>" id="cf_mobile_page_rows" class="frm_input" size="3"> 라인 <input type="text" name="cf_mobile_page_rows" value="<?php echo $config['cf_mobile_page_rows'] ?>" id="cf_mobile_page_rows" class="frm_input" size="3"> 라인
</td> </td>
</tr> </tr>
<tr> <tr>
<th scope="row"><label for="cf_write_pages">페이지 표시 수<strong class="sound_only">필수</strong></label></th> <th scope="row"><label for="cf_write_pages">페이지 표시 수<strong class="sound_only">필수</strong></label></th>
<td><input type="text" name="cf_write_pages" value="<?php echo (int) $config['cf_write_pages'] ?>" id="cf_write_pages" required class="required numeric frm_input" size="3"> 페이지씩 표시</td> <td><input type="text" name="cf_write_pages" value="<?php echo $config['cf_write_pages'] ?>" id="cf_write_pages" required class="required numeric frm_input" size="3"> 페이지씩 표시</td>
<th scope="row"><label for="cf_mobile_pages">모바일 페이지 표시 수<strong class="sound_only">필수</strong></label></th> <th scope="row"><label for="cf_mobile_pages">모바일 페이지 표시 수<strong class="sound_only">필수</strong></label></th>
<td><input type="text" name="cf_mobile_pages" value="<?php echo (int) $config['cf_mobile_pages'] ?>" id="cf_mobile_pages" required class="required numeric frm_input" size="3"> 페이지씩 표시</td> <td><input type="text" name="cf_mobile_pages" value="<?php echo $config['cf_mobile_pages'] ?>" id="cf_mobile_pages" required class="required numeric frm_input" size="3"> 페이지씩 표시</td>
</tr> </tr>
<tr> <tr>
<th scope="row"><label for="cf_new_skin">최근게시물 스킨<strong class="sound_only">필수</strong></label></th> <th scope="row"><label for="cf_new_skin">최근게시물 스킨<strong class="sound_only">필수</strong></label></th>
@@ -516,13 +516,13 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
<th scope="row"><label for="cf_recaptcha_site_key">구글 reCAPTCHA Site key</label></th> <th scope="row"><label for="cf_recaptcha_site_key">구글 reCAPTCHA Site key</label></th>
<td colspan="3"> <td colspan="3">
<?php echo help('reCAPTCHA V2와 Invisible reCAPTCHA 캡챠의 sitekey 와 secret 키는 동일하지 않고, 서로 발급받는 키가 다릅니다.') ?> <?php echo help('reCAPTCHA V2와 Invisible reCAPTCHA 캡챠의 sitekey 와 secret 키는 동일하지 않고, 서로 발급받는 키가 다릅니다.') ?>
<input type="text" name="cf_recaptcha_site_key" value="<?php echo get_sanitize_input($config['cf_recaptcha_site_key']); ?>" id="cf_recaptcha_site_key" class="frm_input" size="52"> <a href="https://www.google.com/recaptcha/admin" target="_blank" class="btn_frmline">reCAPTCHA 등록하기</a> <input type="text" name="cf_recaptcha_site_key" value="<?php echo $config['cf_recaptcha_site_key']; ?>" id="cf_recaptcha_site_key" class="frm_input" size="52"> <a href="https://www.google.com/recaptcha/admin" target="_blank" class="btn_frmline">reCAPTCHA 등록하기</a>
</td> </td>
</tr> </tr>
<tr> <tr>
<th scope="row"><label for="cf_recaptcha_secret_key">구글 reCAPTCHA Secret key</label></th> <th scope="row"><label for="cf_recaptcha_secret_key">구글 reCAPTCHA Secret key</label></th>
<td colspan="3"> <td colspan="3">
<input type="text" name="cf_recaptcha_secret_key" value="<?php echo get_sanitize_input($config['cf_recaptcha_secret_key']); ?>" id="cf_recaptcha_secret_key" class="frm_input" size="52"> <input type="text" name="cf_recaptcha_secret_key" value="<?php echo $config['cf_recaptcha_secret_key']; ?>" id="cf_recaptcha_secret_key" class="frm_input" size="52">
</td> </td>
</tr> </tr>
<tr> <tr>
@@ -536,33 +536,33 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
<th scope="row"><label for="cf_point_term">포인트 유효기간</label></th> <th scope="row"><label for="cf_point_term">포인트 유효기간</label></th>
<td colspan="3"> <td colspan="3">
<?php echo help('기간을 0으로 설정시 포인트 유효기간이 적용되지 않습니다.') ?> <?php echo help('기간을 0으로 설정시 포인트 유효기간이 적용되지 않습니다.') ?>
<input type="text" name="cf_point_term" value="<?php echo (int) $config['cf_point_term']; ?>" id="cf_point_term" required class="required frm_input" size="5"> 일 <input type="text" name="cf_point_term" value="<?php echo $config['cf_point_term']; ?>" id="cf_point_term" required class="required frm_input" size="5"> 일
</td> </td>
</tr> </tr>
<tr> <tr>
<th scope="row"><label for="cf_possible_ip">접근가능 IP</label></th> <th scope="row"><label for="cf_possible_ip">접근가능 IP</label></th>
<td> <td>
<?php echo help('입력된 IP의 컴퓨터만 접근할 수 있습니다.<br>123.123.+ 도 입력 가능. (엔터로 구분)') ?> <?php echo help('입력된 IP의 컴퓨터만 접근할 수 있습니다.<br>123.123.+ 도 입력 가능. (엔터로 구분)') ?>
<textarea name="cf_possible_ip" id="cf_possible_ip"><?php echo get_sanitize_input($config['cf_possible_ip']); ?></textarea> <textarea name="cf_possible_ip" id="cf_possible_ip"><?php echo $config['cf_possible_ip'] ?></textarea>
</td> </td>
<th scope="row"><label for="cf_intercept_ip">접근차단 IP</label></th> <th scope="row"><label for="cf_intercept_ip">접근차단 IP</label></th>
<td> <td>
<?php echo help('입력된 IP의 컴퓨터는 접근할 수 없음.<br>123.123.+ 도 입력 가능. (엔터로 구분)') ?> <?php echo help('입력된 IP의 컴퓨터는 접근할 수 없음.<br>123.123.+ 도 입력 가능. (엔터로 구분)') ?>
<textarea name="cf_intercept_ip" id="cf_intercept_ip"><?php echo get_sanitize_input($config['cf_intercept_ip']); ?></textarea> <textarea name="cf_intercept_ip" id="cf_intercept_ip"><?php echo $config['cf_intercept_ip'] ?></textarea>
</td> </td>
</tr> </tr>
<tr> <tr>
<th scope="row"><label for="cf_analytics">방문자분석 스크립트</label></th> <th scope="row"><label for="cf_analytics">방문자분석 스크립트</label></th>
<td colspan="3"> <td colspan="3">
<?php echo help('방문자분석 스크립트 코드를 입력합니다. 예) 구글 애널리틱스'); ?> <?php echo help('방문자분석 스크립트 코드를 입력합니다. 예) 구글 애널리틱스'); ?>
<textarea name="cf_analytics" id="cf_analytics"><?php echo get_text($config['cf_analytics']); ?></textarea> <textarea name="cf_analytics" id="cf_analytics"><?php echo $config['cf_analytics']; ?></textarea>
</td> </td>
</tr> </tr>
<tr> <tr>
<th scope="row"><label for="cf_add_meta">추가 메타태그</label></th> <th scope="row"><label for="cf_add_meta">추가 메타태그</label></th>
<td colspan="3"> <td colspan="3">
<?php echo help('추가로 사용하실 meta 태그를 입력합니다.'); ?> <?php echo help('추가로 사용하실 meta 태그를 입력합니다.'); ?>
<textarea name="cf_add_meta" id="cf_add_meta"><?php echo get_text($config['cf_add_meta']); ?></textarea> <textarea name="cf_add_meta" id="cf_add_meta"><?php echo $config['cf_add_meta']; ?></textarea>
</td> </td>
</tr> </tr>
<tr> <tr>
@@ -605,7 +605,7 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
<tbody> <tbody>
<tr> <tr>
<th scope="row"><label for="cf_delay_sec">글쓰기 간격<strong class="sound_only">필수</strong></label></th> <th scope="row"><label for="cf_delay_sec">글쓰기 간격<strong class="sound_only">필수</strong></label></th>
<td><input type="text" name="cf_delay_sec" value="<?php echo (int) $config['cf_delay_sec'] ?>" id="cf_delay_sec" required class="required numeric frm_input" size="3"> 초 지난후 가능</td> <td><input type="text" name="cf_delay_sec" value="<?php echo $config['cf_delay_sec'] ?>" id="cf_delay_sec" required class="required numeric frm_input" size="3"> 초 지난후 가능</td>
<th scope="row"><label for="cf_link_target">새창 링크</label></th> <th scope="row"><label for="cf_link_target">새창 링크</label></th>
<td> <td>
<?php echo help('글내용중 자동 링크되는 타켓을 지정합니다.') ?> <?php echo help('글내용중 자동 링크되는 타켓을 지정합니다.') ?>
@@ -619,46 +619,46 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
</tr> </tr>
<tr> <tr>
<th scope="row"><label for="cf_read_point">글읽기 포인트<strong class="sound_only">필수</strong></label></th> <th scope="row"><label for="cf_read_point">글읽기 포인트<strong class="sound_only">필수</strong></label></th>
<td><input type="text" name="cf_read_point" value="<?php echo (int) $config['cf_read_point'] ?>" id="cf_read_point" required class="required frm_input" size="3"> 점</td> <td><input type="text" name="cf_read_point" value="<?php echo $config['cf_read_point'] ?>" id="cf_read_point" required class="required frm_input" size="3"> 점</td>
<th scope="row"><label for="cf_write_point">글쓰기 포인트</label></th> <th scope="row"><label for="cf_write_point">글쓰기 포인트</label></th>
<td><input type="text" name="cf_write_point" value="<?php echo (int) $config['cf_write_point'] ?>" id="cf_write_point" required class="required frm_input" size="3"> 점</td> <td><input type="text" name="cf_write_point" value="<?php echo $config['cf_write_point'] ?>" id="cf_write_point" required class="required frm_input" size="3"> 점</td>
</tr> </tr>
<tr> <tr>
<th scope="row"><label for="cf_comment_point">댓글쓰기 포인트</label></th> <th scope="row"><label for="cf_comment_point">댓글쓰기 포인트</label></th>
<td><input type="text" name="cf_comment_point" value="<?php echo (int) $config['cf_comment_point'] ?>" id="cf_comment_point" required class="required frm_input" size="3"> 점</td> <td><input type="text" name="cf_comment_point" value="<?php echo $config['cf_comment_point'] ?>" id="cf_comment_point" required class="required frm_input" size="3"> 점</td>
<th scope="row"><label for="cf_download_point">다운로드 포인트</label></th> <th scope="row"><label for="cf_download_point">다운로드 포인트</label></th>
<td><input type="text" name="cf_download_point" value="<?php echo (int) $config['cf_download_point'] ?>" id="cf_download_point" required class="required frm_input" size="3"> 점</td> <td><input type="text" name="cf_download_point" value="<?php echo $config['cf_download_point'] ?>" id="cf_download_point" required class="required frm_input" size="3"> 점</td>
</tr> </tr>
<tr> <tr>
<th scope="row"><label for="cf_search_part">검색 단위</label></th> <th scope="row"><label for="cf_search_part">검색 단위</label></th>
<td colspan="3"><input type="text" name="cf_search_part" value="<?php echo (int) $config['cf_search_part'] ?>" id="cf_search_part" class="frm_input" size="4"> 건 단위로 검색</td> <td colspan="3"><input type="text" name="cf_search_part" value="<?php echo $config['cf_search_part'] ?>" id="cf_search_part" class="frm_input" size="4"> 건 단위로 검색</td>
</tr> </tr>
<tr> <tr>
<th scope="row"><label for="cf_image_extension">이미지 업로드 확장자</label></th> <th scope="row"><label for="cf_image_extension">이미지 업로드 확장자</label></th>
<td colspan="3"> <td colspan="3">
<?php echo help('게시판 글작성시 이미지 파일 업로드 가능 확장자. | 로 구분') ?> <?php echo help('게시판 글작성시 이미지 파일 업로드 가능 확장자. | 로 구분') ?>
<input type="text" name="cf_image_extension" value="<?php echo get_sanitize_input($config['cf_image_extension']); ?>" id="cf_image_extension" class="frm_input" size="70"> <input type="text" name="cf_image_extension" value="<?php echo $config['cf_image_extension'] ?>" id="cf_image_extension" class="frm_input" size="70">
</td> </td>
</tr> </tr>
<tr> <tr>
<th scope="row"><label for="cf_flash_extension">플래쉬 업로드 확장자</label></th> <th scope="row"><label for="cf_flash_extension">플래쉬 업로드 확장자</label></th>
<td colspan="3"> <td colspan="3">
<?php echo help('게시판 글작성시 플래쉬 파일 업로드 가능 확장자. | 로 구분') ?> <?php echo help('게시판 글작성시 플래쉬 파일 업로드 가능 확장자. | 로 구분') ?>
<input type="text" name="cf_flash_extension" value="<?php echo get_sanitize_input($config['cf_flash_extension']); ?>" id="cf_flash_extension" class="frm_input" size="70"> <input type="text" name="cf_flash_extension" value="<?php echo $config['cf_flash_extension'] ?>" id="cf_flash_extension" class="frm_input" size="70">
</td> </td>
</tr> </tr>
<tr> <tr>
<th scope="row"><label for="cf_movie_extension">동영상 업로드 확장자</label></th> <th scope="row"><label for="cf_movie_extension">동영상 업로드 확장자</label></th>
<td colspan="3"> <td colspan="3">
<?php echo help('게시판 글작성시 동영상 파일 업로드 가능 확장자. | 로 구분') ?> <?php echo help('게시판 글작성시 동영상 파일 업로드 가능 확장자. | 로 구분') ?>
<input type="text" name="cf_movie_extension" value="<?php echo get_sanitize_input($config['cf_movie_extension']); ?>" id="cf_movie_extension" class="frm_input" size="70"> <input type="text" name="cf_movie_extension" value="<?php echo $config['cf_movie_extension'] ?>" id="cf_movie_extension" class="frm_input" size="70">
</td> </td>
</tr> </tr>
<tr> <tr>
<th scope="row"><label for="cf_filter">단어 필터링</label></th> <th scope="row"><label for="cf_filter">단어 필터링</label></th>
<td colspan="3"> <td colspan="3">
<?php echo help('입력된 단어가 포함된 내용은 게시할 수 없습니다. 단어와 단어 사이는 ,로 구분합니다.') ?> <?php echo help('입력된 단어가 포함된 내용은 게시할 수 없습니다. 단어와 단어 사이는 ,로 구분합니다.') ?>
<textarea name="cf_filter" id="cf_filter" rows="7"><?php echo get_sanitize_input($config['cf_filter']); ?></textarea> <textarea name="cf_filter" id="cf_filter" rows="7"><?php echo $config['cf_filter'] ?></textarea>
</td> </td>
</tr> </tr>
</tbody> </tbody>
@@ -733,11 +733,11 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
<th scope="row"><label for="cf_register_level">회원가입시 권한</label></th> <th scope="row"><label for="cf_register_level">회원가입시 권한</label></th>
<td><?php echo get_member_level_select('cf_register_level', 1, 9, $config['cf_register_level']) ?></td> <td><?php echo get_member_level_select('cf_register_level', 1, 9, $config['cf_register_level']) ?></td>
<th scope="row"><label for="cf_register_point">회원가입시 포인트</label></th> <th scope="row"><label for="cf_register_point">회원가입시 포인트</label></th>
<td><input type="text" name="cf_register_point" value="<?php echo (int) $config['cf_register_point'] ?>" id="cf_register_point" class="frm_input" size="5"> 점</td> <td><input type="text" name="cf_register_point" value="<?php echo $config['cf_register_point'] ?>" id="cf_register_point" class="frm_input" size="5"> 점</td>
</tr> </tr>
<tr> <tr>
<th scope="row" id="th310"><label for="cf_leave_day">회원탈퇴후 삭제일</label></th> <th scope="row" id="th310"><label for="cf_leave_day">회원탈퇴후 삭제일</label></th>
<td colspan="3"><input type="text" name="cf_leave_day" value="<?php echo (int) $config['cf_leave_day'] ?>" id="cf_leave_day" class="frm_input" size="2"> 일 후 자동 삭제</td> <td colspan="3"><input type="text" name="cf_leave_day" value="<?php echo $config['cf_leave_day'] ?>" id="cf_leave_day" class="frm_input" size="2"> 일 후 자동 삭제</td>
</tr> </tr>
<tr> <tr>
<th scope="row"><label for="cf_use_member_icon">회원아이콘 사용</label></th> <th scope="row"><label for="cf_use_member_icon">회원아이콘 사용</label></th>
@@ -754,25 +754,25 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
</tr> </tr>
<tr> <tr>
<th scope="row"><label for="cf_member_icon_size">회원아이콘 용량</label></th> <th scope="row"><label for="cf_member_icon_size">회원아이콘 용량</label></th>
<td><input type="text" name="cf_member_icon_size" value="<?php echo (int) $config['cf_member_icon_size'] ?>" id="cf_member_icon_size" class="frm_input" size="10"> 바이트 이하</td> <td><input type="text" name="cf_member_icon_size" value="<?php echo $config['cf_member_icon_size'] ?>" id="cf_member_icon_size" class="frm_input" size="10"> 바이트 이하</td>
<th scope="row">회원아이콘 사이즈</th> <th scope="row">회원아이콘 사이즈</th>
<td> <td>
<label for="cf_member_icon_width">가로</label> <label for="cf_member_icon_width">가로</label>
<input type="text" name="cf_member_icon_width" value="<?php echo (int) $config['cf_member_icon_width'] ?>" id="cf_member_icon_width" class="frm_input" size="2"> <input type="text" name="cf_member_icon_width" value="<?php echo $config['cf_member_icon_width'] ?>" id="cf_member_icon_width" class="frm_input" size="2">
<label for="cf_member_icon_height">세로</label> <label for="cf_member_icon_height">세로</label>
<input type="text" name="cf_member_icon_height" value="<?php echo (int) $config['cf_member_icon_height'] ?>" id="cf_member_icon_height" class="frm_input" size="2"> <input type="text" name="cf_member_icon_height" value="<?php echo $config['cf_member_icon_height'] ?>" id="cf_member_icon_height" class="frm_input" size="2">
픽셀 이하 픽셀 이하
</td> </td>
</tr> </tr>
<tr> <tr>
<th scope="row"><label for="cf_member_img_size">회원이미지 용량</label></th> <th scope="row"><label for="cf_member_img_size">회원이미지 용량</label></th>
<td><input type="text" name="cf_member_img_size" value="<?php echo (int) $config['cf_member_img_size'] ?>" id="cf_member_img_size" class="frm_input" size="10"> 바이트 이하</td> <td><input type="text" name="cf_member_img_size" value="<?php echo $config['cf_member_img_size'] ?>" id="cf_member_img_size" class="frm_input" size="10"> 바이트 이하</td>
<th scope="row">회원이미지 사이즈</th> <th scope="row">회원이미지 사이즈</th>
<td> <td>
<label for="cf_member_img_width">가로</label> <label for="cf_member_img_width">가로</label>
<input type="text" name="cf_member_img_width" value="<?php echo (int) $config['cf_member_img_width'] ?>" id="cf_member_img_width" class="frm_input" size="2"> <input type="text" name="cf_member_img_width" value="<?php echo $config['cf_member_img_width'] ?>" id="cf_member_img_width" class="frm_input" size="2">
<label for="cf_member_img_height">세로</label> <label for="cf_member_img_height">세로</label>
<input type="text" name="cf_member_img_height" value="<?php echo (int) $config['cf_member_img_height'] ?>" id="cf_member_img_height" class="frm_input" size="2"> <input type="text" name="cf_member_img_height" value="<?php echo $config['cf_member_img_height'] ?>" id="cf_member_img_height" class="frm_input" size="2">
픽셀 이하 픽셀 이하
</td> </td>
</tr> </tr>
@@ -780,27 +780,27 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
<th scope="row"><label for="cf_use_recommend">추천인제도 사용</label></th> <th scope="row"><label for="cf_use_recommend">추천인제도 사용</label></th>
<td><input type="checkbox" name="cf_use_recommend" value="1" id="cf_use_recommend" <?php echo $config['cf_use_recommend']?'checked':''; ?>> 사용</td> <td><input type="checkbox" name="cf_use_recommend" value="1" id="cf_use_recommend" <?php echo $config['cf_use_recommend']?'checked':''; ?>> 사용</td>
<th scope="row"><label for="cf_recommend_point">추천인 포인트</label></th> <th scope="row"><label for="cf_recommend_point">추천인 포인트</label></th>
<td><input type="text" name="cf_recommend_point" value="<?php echo (int) $config['cf_recommend_point'] ?>" id="cf_recommend_point" class="frm_input"> 점</td> <td><input type="text" name="cf_recommend_point" value="<?php echo $config['cf_recommend_point'] ?>" id="cf_recommend_point" class="frm_input"> 점</td>
</tr> </tr>
<tr> <tr>
<th scope="row"><label for="cf_prohibit_id">아이디,닉네임 금지단어</label></th> <th scope="row"><label for="cf_prohibit_id">아이디,닉네임 금지단어</label></th>
<td> <td>
<?php echo help('회원아이디, 닉네임으로 사용할 수 없는 단어를 정합니다. 쉼표 (,) 로 구분') ?> <?php echo help('회원아이디, 닉네임으로 사용할 수 없는 단어를 정합니다. 쉼표 (,) 로 구분') ?>
<textarea name="cf_prohibit_id" id="cf_prohibit_id" rows="5"><?php echo get_sanitize_input($config['cf_prohibit_id']); ?></textarea> <textarea name="cf_prohibit_id" id="cf_prohibit_id" rows="5"><?php echo $config['cf_prohibit_id'] ?></textarea>
</td> </td>
<th scope="row"><label for="cf_prohibit_email">입력 금지 메일</label></th> <th scope="row"><label for="cf_prohibit_email">입력 금지 메일</label></th>
<td> <td>
<?php echo help('입력 받지 않을 도메인을 지정합니다. 엔터로 구분 ex) hotmail.com') ?> <?php echo help('입력 받지 않을 도메인을 지정합니다. 엔터로 구분 ex) hotmail.com') ?>
<textarea name="cf_prohibit_email" id="cf_prohibit_email" rows="5"><?php echo get_sanitize_input($config['cf_prohibit_email']); ?></textarea> <textarea name="cf_prohibit_email" id="cf_prohibit_email" rows="5"><?php echo $config['cf_prohibit_email'] ?></textarea>
</td> </td>
</tr> </tr>
<tr> <tr>
<th scope="row"><label for="cf_stipulation">회원가입약관</label></th> <th scope="row"><label for="cf_stipulation">회원가입약관</label></th>
<td colspan="3"><textarea name="cf_stipulation" id="cf_stipulation" rows="10"><?php echo html_purifier($config['cf_stipulation']); ?></textarea></td> <td colspan="3"><textarea name="cf_stipulation" id="cf_stipulation" rows="10"><?php echo $config['cf_stipulation'] ?></textarea></td>
</tr> </tr>
<tr> <tr>
<th scope="row"><label for="cf_privacy">개인정보처리방침</label></th> <th scope="row"><label for="cf_privacy">개인정보처리방침</label></th>
<td colspan="3"><textarea id="cf_privacy" name="cf_privacy" rows="10"><?php echo html_purifier($config['cf_privacy']); ?></textarea></td> <td colspan="3"><textarea id="cf_privacy" name="cf_privacy" rows="10"><?php echo $config['cf_privacy'] ?></textarea></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@@ -862,7 +862,7 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
<th scope="row" class="cf_cert_service"><label for="cf_cert_kcb_cd">코리아크레딧뷰로<br>KCB 회원사ID</label></th> <th scope="row" class="cf_cert_service"><label for="cf_cert_kcb_cd">코리아크레딧뷰로<br>KCB 회원사ID</label></th>
<td class="cf_cert_service"> <td class="cf_cert_service">
<?php echo help('KCB 회원사ID를 입력해 주십시오.<br>서비스에 가입되어 있지 않다면, KCB와 계약체결 후 회원사ID를 발급 받으실 수 있습니다.<br>이용하시려는 서비스에 대한 계약을 아이핀, 휴대폰 본인확인 각각 체결해주셔야 합니다.<br>아이핀 본인확인 테스트의 경우에는 KCB 회원사ID가 필요 없으나,<br>휴대폰 본인확인 테스트의 경우 KCB 에서 따로 발급 받으셔야 합니다.') ?> <?php echo help('KCB 회원사ID를 입력해 주십시오.<br>서비스에 가입되어 있지 않다면, KCB와 계약체결 후 회원사ID를 발급 받으실 수 있습니다.<br>이용하시려는 서비스에 대한 계약을 아이핀, 휴대폰 본인확인 각각 체결해주셔야 합니다.<br>아이핀 본인확인 테스트의 경우에는 KCB 회원사ID가 필요 없으나,<br>휴대폰 본인확인 테스트의 경우 KCB 에서 따로 발급 받으셔야 합니다.') ?>
<input type="text" name="cf_cert_kcb_cd" value="<?php echo get_sanitize_input($config['cf_cert_kcb_cd']); ?>" id="cf_cert_kcb_cd" class="frm_input" size="20"> <a href="http://sir.kr/main/service/b_ipin.php" target="_blank" class="btn_frmline">KCB 아이핀 서비스 신청페이지</a> <input type="text" name="cf_cert_kcb_cd" value="<?php echo $config['cf_cert_kcb_cd'] ?>" id="cf_cert_kcb_cd" class="frm_input" size="20"> <a href="http://sir.kr/main/service/b_ipin.php" target="_blank" class="btn_frmline">KCB 아이핀 서비스 신청페이지</a>
<a href="http://sir.kr/main/service/b_cert.php" target="_blank" class="btn_frmline">KCB 휴대폰 본인확인 서비스 신청페이지</a> <a href="http://sir.kr/main/service/b_cert.php" target="_blank" class="btn_frmline">KCB 휴대폰 본인확인 서비스 신청페이지</a>
</td> </td>
</tr> </tr>
@@ -871,7 +871,7 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
<td class="cf_cert_service"> <td class="cf_cert_service">
<?php echo help('SM으로 시작하는 5자리 사이트 코드중 뒤의 3자리만 입력해 주십시오.<br>서비스에 가입되어 있지 않다면, 본인확인 서비스 신청페이지에서 서비스 신청 후 사이트코드를 발급 받으실 수 있습니다.') ?> <?php echo help('SM으로 시작하는 5자리 사이트 코드중 뒤의 3자리만 입력해 주십시오.<br>서비스에 가입되어 있지 않다면, 본인확인 서비스 신청페이지에서 서비스 신청 후 사이트코드를 발급 받으실 수 있습니다.') ?>
<span class="sitecode">SM</span> <span class="sitecode">SM</span>
<input type="text" name="cf_cert_kcp_cd" value="<?php echo get_sanitize_input($config['cf_cert_kcp_cd']); ?>" id="cf_cert_kcp_cd" class="frm_input" size="3"> <a href="http://sir.kr/main/service/p_cert.php" target="_blank" class="btn_frmline">NHN KCP 휴대폰 본인확인 서비스 신청페이지</a> <input type="text" name="cf_cert_kcp_cd" value="<?php echo $config['cf_cert_kcp_cd'] ?>" id="cf_cert_kcp_cd" class="frm_input" size="3"> <a href="http://sir.kr/main/service/p_cert.php" target="_blank" class="btn_frmline">NHN KCP 휴대폰 본인확인 서비스 신청페이지</a>
</td> </td>
</tr> </tr>
<tr> <tr>
@@ -879,21 +879,21 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
<td class="cf_cert_service"> <td class="cf_cert_service">
<?php echo help('LG유플러스 상점아이디 중 si_를 제외한 나머지 아이디만 입력해 주십시오.<br>서비스에 가입되어 있지 않다면, 본인확인 서비스 신청페이지에서 서비스 신청 후 상점아이디를 발급 받으실 수 있습니다.<br><strong>LG유플러스 휴대폰본인확인은 ActiveX 설치가 필요하므로 Internet Explorer 에서만 사용할 수 있습니다.</strong>') ?> <?php echo help('LG유플러스 상점아이디 중 si_를 제외한 나머지 아이디만 입력해 주십시오.<br>서비스에 가입되어 있지 않다면, 본인확인 서비스 신청페이지에서 서비스 신청 후 상점아이디를 발급 받으실 수 있습니다.<br><strong>LG유플러스 휴대폰본인확인은 ActiveX 설치가 필요하므로 Internet Explorer 에서만 사용할 수 있습니다.</strong>') ?>
<span class="sitecode">si_</span> <span class="sitecode">si_</span>
<input type="text" name="cf_lg_mid" value="<?php echo get_sanitize_input($config['cf_lg_mid']); ?>" id="cf_lg_mid" class="frm_input" size="20"> <a href="http://sir.kr/main/service/lg_cert.php" target="_blank" class="btn_frmline">LG유플러스 본인확인 서비스 신청페이지</a> <input type="text" name="cf_lg_mid" value="<?php echo $config['cf_lg_mid'] ?>" id="cf_lg_mid" class="frm_input" size="20"> <a href="http://sir.kr/main/service/lg_cert.php" target="_blank" class="btn_frmline">LG유플러스 본인확인 서비스 신청페이지</a>
</td> </td>
</tr> </tr>
<tr> <tr>
<th scope="row" class="cf_cert_service"><label for="cf_lg_mert_key">LG유플러스 MERT KEY</label></th> <th scope="row" class="cf_cert_service"><label for="cf_lg_mert_key">LG유플러스 MERT KEY</label></th>
<td class="cf_cert_service"> <td class="cf_cert_service">
<?php echo help('LG유플러스 상점MertKey는 상점관리자 -> 계약정보 -> 상점정보관리에서 확인하실 수 있습니다.') ?> <?php echo help('LG유플러스 상점MertKey는 상점관리자 -> 계약정보 -> 상점정보관리에서 확인하실 수 있습니다.') ?>
<input type="text" name="cf_lg_mert_key" value="<?php echo get_sanitize_input($config['cf_lg_mert_key']); ?>" id="cf_lg_mert_key" class="frm_input" size="40"> <input type="text" name="cf_lg_mert_key" value="<?php echo $config['cf_lg_mert_key'] ?>" id="cf_lg_mert_key" class="frm_input" size="40">
</td> </td>
</tr> </tr>
<tr> <tr>
<th scope="row" class="cf_cert_service"><label for="cf_cert_limit">본인확인 이용제한</label></th> <th scope="row" class="cf_cert_service"><label for="cf_cert_limit">본인확인 이용제한</label></th>
<td class="cf_cert_service"> <td class="cf_cert_service">
<?php echo help('하루동안 아이핀과 휴대폰 본인확인 인증 이용회수를 제한할 수 있습니다.<br>회수제한은 실서비스에서 아이핀과 휴대폰 본인확인 인증에 개별 적용됩니다.<br>0 으로 설정하시면 회수제한이 적용되지 않습니다.'); ?> <?php echo help('하루동안 아이핀과 휴대폰 본인확인 인증 이용회수를 제한할 수 있습니다.<br>회수제한은 실서비스에서 아이핀과 휴대폰 본인확인 인증에 개별 적용됩니다.<br>0 으로 설정하시면 회수제한이 적용되지 않습니다.'); ?>
<input type="text" name="cf_cert_limit" value="<?php echo (int) $config['cf_cert_limit']; ?>" id="cf_cert_limit" class="frm_input" size="3"> 회 <input type="text" name="cf_cert_limit" value="<?php echo $config['cf_cert_limit']; ?>" id="cf_cert_limit" class="frm_input" size="3"> 회
</td> </td>
</tr> </tr>
<tr> <tr>
@@ -1138,73 +1138,73 @@ include_once('_rewrite_config_form.php');
<tr> <tr>
<th scope="row"><label for="cf_naver_clientid">네이버 Client ID</label></th> <th scope="row"><label for="cf_naver_clientid">네이버 Client ID</label></th>
<td> <td>
<input type="text" name="cf_naver_clientid" value="<?php echo get_sanitize_input($config['cf_naver_clientid']); ?>" id="cf_naver_clientid" class="frm_input" size="40"> <a href="https://developers.naver.com/apps/#/register" target="_blank" class="btn_frmline">앱 등록하기</a> <input type="text" name="cf_naver_clientid" value="<?php echo $config['cf_naver_clientid'] ?>" id="cf_naver_clientid" class="frm_input" size="40"> <a href="https://developers.naver.com/apps/#/register" target="_blank" class="btn_frmline">앱 등록하기</a>
</td> </td>
<th scope="row"><label for="cf_naver_secret">네이버 Client Secret</label></th> <th scope="row"><label for="cf_naver_secret">네이버 Client Secret</label></th>
<td> <td>
<input type="text" name="cf_naver_secret" value="<?php echo get_sanitize_input($config['cf_naver_secret']); ?>" id="cf_naver_secret" class="frm_input" size="45"> <input type="text" name="cf_naver_secret" value="<?php echo $config['cf_naver_secret'] ?>" id="cf_naver_secret" class="frm_input" size="45">
</td> </td>
</tr> </tr>
<tr> <tr>
<th scope="row"><label for="cf_facebook_appid">페이스북 앱 ID</label></th> <th scope="row"><label for="cf_facebook_appid">페이스북 앱 ID</label></th>
<td> <td>
<input type="text" name="cf_facebook_appid" value="<?php echo get_sanitize_input($config['cf_facebook_appid']); ?>" id="cf_facebook_appid" class="frm_input" size="40"> <a href="https://developers.facebook.com/apps" target="_blank" class="btn_frmline">앱 등록하기</a> <input type="text" name="cf_facebook_appid" value="<?php echo $config['cf_facebook_appid'] ?>" id="cf_facebook_appid" class="frm_input" size="40"> <a href="https://developers.facebook.com/apps" target="_blank" class="btn_frmline">앱 등록하기</a>
</td> </td>
<th scope="row"><label for="cf_facebook_secret">페이스북 앱 Secret</label></th> <th scope="row"><label for="cf_facebook_secret">페이스북 앱 Secret</label></th>
<td> <td>
<input type="text" name="cf_facebook_secret" value="<?php echo get_sanitize_input($config['cf_facebook_secret']); ?>" id="cf_facebook_secret" class="frm_input" size="45"> <input type="text" name="cf_facebook_secret" value="<?php echo $config['cf_facebook_secret'] ?>" id="cf_facebook_secret" class="frm_input" size="45">
</td> </td>
</tr> </tr>
<tr> <tr>
<th scope="row"><label for="cf_twitter_key">트위터 컨슈머 Key</label></th> <th scope="row"><label for="cf_twitter_key">트위터 컨슈머 Key</label></th>
<td> <td>
<input type="text" name="cf_twitter_key" value="<?php echo get_sanitize_input($config['cf_twitter_key']); ?>" id="cf_twitter_key" class="frm_input" size="40"> <a href="https://developer.twitter.com/en/apps" target="_blank" class="btn_frmline">앱 등록하기</a> <input type="text" name="cf_twitter_key" value="<?php echo $config['cf_twitter_key'] ?>" id="cf_twitter_key" class="frm_input" size="40"> <a href="https://developer.twitter.com/en/apps" target="_blank" class="btn_frmline">앱 등록하기</a>
</td> </td>
<th scope="row"><label for="cf_twitter_secret">트위터 컨슈머 Secret</label></th> <th scope="row"><label for="cf_twitter_secret">트위터 컨슈머 Secret</label></th>
<td> <td>
<input type="text" name="cf_twitter_secret" value="<?php echo get_sanitize_input($config['cf_twitter_secret']); ?>" id="cf_twitter_secret" class="frm_input" size="45"> <input type="text" name="cf_twitter_secret" value="<?php echo $config['cf_twitter_secret'] ?>" id="cf_twitter_secret" class="frm_input" size="45">
</td> </td>
</tr> </tr>
<tr> <tr>
<th scope="row"><label for="cf_google_clientid">구글 Client ID</label></th> <th scope="row"><label for="cf_google_clientid">구글 Client ID</label></th>
<td> <td>
<input type="text" name="cf_google_clientid" value="<?php echo get_sanitize_input($config['cf_google_clientid']); ?>" id="cf_google_clientid" class="frm_input" size="40"> <a href="https://console.developers.google.com" target="_blank" class="btn_frmline">앱 등록하기</a> <input type="text" name="cf_google_clientid" value="<?php echo $config['cf_google_clientid'] ?>" id="cf_google_clientid" class="frm_input" size="40"> <a href="https://console.developers.google.com" target="_blank" class="btn_frmline">앱 등록하기</a>
</td> </td>
<th scope="row"><label for="cf_google_secret">구글 Client Secret</label></th> <th scope="row"><label for="cf_google_secret">구글 Client Secret</label></th>
<td> <td>
<input type="text" name="cf_google_secret" value="<?php echo get_sanitize_input($config['cf_google_secret']); ?>" id="cf_google_secret" class="frm_input" size="45"> <input type="text" name="cf_google_secret" value="<?php echo $config['cf_google_secret'] ?>" id="cf_google_secret" class="frm_input" size="45">
</td> </td>
</tr> </tr>
<tr> <tr>
<th scope="row"><label for="cf_googl_shorturl_apikey">구글 짧은주소 API Key</label></th> <th scope="row"><label for="cf_googl_shorturl_apikey">구글 짧은주소 API Key</label></th>
<td colspan="3"> <td colspan="3">
<input type="text" name="cf_googl_shorturl_apikey" value="<?php echo get_sanitize_input($config['cf_googl_shorturl_apikey']); ?>" id="cf_googl_shorturl_apikey" class="frm_input" size="40"> <a href="http://code.google.com/apis/console/" target="_blank" class="btn_frmline">API Key 등록하기</a> <input type="text" name="cf_googl_shorturl_apikey" value="<?php echo $config['cf_googl_shorturl_apikey'] ?>" id="cf_googl_shorturl_apikey" class="frm_input" size="40"> <a href="http://code.google.com/apis/console/" target="_blank" class="btn_frmline">API Key 등록하기</a>
</td> </td>
</tr> </tr>
<tr> <tr>
<th scope="row"><label for="cf_kakao_rest_key">카카오 REST API 키</label></th> <th scope="row"><label for="cf_kakao_rest_key">카카오 REST API 키</label></th>
<td> <td>
<input type="text" name="cf_kakao_rest_key" value="<?php echo get_sanitize_input($config['cf_kakao_rest_key']); ?>" id="cf_kakao_rest_key" class="frm_input" size="40"> <a href="https://developers.kakao.com/product/kakaoLogin" target="_blank" class="btn_frmline">앱 등록하기</a> <input type="text" name="cf_kakao_rest_key" value="<?php echo $config['cf_kakao_rest_key'] ?>" id="cf_kakao_rest_key" class="frm_input" size="40"> <a href="https://developers.kakao.com/product/kakaoLogin" target="_blank" class="btn_frmline">앱 등록하기</a>
</td> </td>
<th scope="row"><label for="cf_kakao_client_secret">카카오 Client Secret</label></th> <th scope="row"><label for="cf_kakao_client_secret">카카오 Client Secret</label></th>
<td> <td>
<input type="text" name="cf_kakao_client_secret" value="<?php echo get_sanitize_input($config['cf_kakao_client_secret']); ?>" id="cf_kakao_client_secret" class="frm_input" size="45"> <input type="text" name="cf_kakao_client_secret" value="<?php echo $config['cf_kakao_client_secret'] ?>" id="cf_kakao_client_secret" class="frm_input" size="45">
</td> </td>
</tr> </tr>
<tr> <tr>
<th scope="row"><label for="cf_kakao_js_apikey">카카오 JavaScript 키</label></th> <th scope="row"><label for="cf_kakao_js_apikey">카카오 JavaScript 키</label></th>
<td colspan="3"> <td colspan="3">
<input type="text" name="cf_kakao_js_apikey" value="<?php echo get_sanitize_input($config['cf_kakao_js_apikey']); ?>" id="cf_kakao_js_apikey" class="frm_input" size="45"> <input type="text" name="cf_kakao_js_apikey" value="<?php echo $config['cf_kakao_js_apikey'] ?>" id="cf_kakao_js_apikey" class="frm_input" size="45">
</td> </td>
</tr> </tr>
<tr> <tr>
<th scope="row"><label for="cf_payco_clientid">페이코 Client ID</label></th> <th scope="row"><label for="cf_payco_clientid">페이코 Client ID</label></th>
<td> <td>
<input type="text" name="cf_payco_clientid" value="<?php echo get_sanitize_input($config['cf_payco_clientid']); ?>" id="cf_payco_clientid" class="frm_input" size="40"> <a href="https://developers.payco.com/guide" target="_blank" class="btn_frmline">앱 등록하기</a> <input type="text" name="cf_payco_clientid" value="<?php echo $config['cf_payco_clientid']; ?>" id="cf_payco_clientid" class="frm_input" size="40"> <a href="https://developers.payco.com/guide" target="_blank" class="btn_frmline">앱 등록하기</a>
</td> </td>
<th scope="row"><label for="cf_payco_secret">페이코 Secret</label></th> <th scope="row"><label for="cf_payco_secret">페이코 Secret</label></th>
<td> <td>
<input type="text" name="cf_payco_secret" value="<?php echo get_sanitize_input($config['cf_payco_secret']); ?>" id="cf_payco_secret" class="frm_input" size="45"> <input type="text" name="cf_payco_secret" value="<?php echo $config['cf_payco_secret']; ?>" id="cf_payco_secret" class="frm_input" size="45">
</td> </td>
</tr> </tr>
</tbody> </tbody>
@@ -1276,20 +1276,20 @@ include_once('_rewrite_config_form.php');
<th scope="row"><label for="cf_icode_id">아이코드 회원아이디<br>(구버전)</label></th> <th scope="row"><label for="cf_icode_id">아이코드 회원아이디<br>(구버전)</label></th>
<td> <td>
<?php echo help("아이코드에서 사용하시는 회원아이디를 입력합니다."); ?> <?php echo help("아이코드에서 사용하시는 회원아이디를 입력합니다."); ?>
<input type="text" name="cf_icode_id" value="<?php echo get_sanitize_input($config['cf_icode_id']); ?>" id="cf_icode_id" class="frm_input" size="20"> <input type="text" name="cf_icode_id" value="<?php echo $config['cf_icode_id']; ?>" id="cf_icode_id" class="frm_input" size="20">
</td> </td>
</tr> </tr>
<tr class="icode_old_version"> <tr class="icode_old_version">
<th scope="row"><label for="cf_icode_pw">아이코드 비밀번호<br>(구버전)</label></th> <th scope="row"><label for="cf_icode_pw">아이코드 비밀번호<br>(구버전)</label></th>
<td> <td>
<?php echo help("아이코드에서 사용하시는 비밀번호를 입력합니다."); ?> <?php echo help("아이코드에서 사용하시는 비밀번호를 입력합니다."); ?>
<input type="password" name="cf_icode_pw" value="<?php echo get_sanitize_input($config['cf_icode_pw']); ?>" id="cf_icode_pw" class="frm_input"> <input type="password" name="cf_icode_pw" value="<?php echo $config['cf_icode_pw']; ?>" id="cf_icode_pw" class="frm_input">
</td> </td>
</tr> </tr>
<tr class="icode_old_version <?php if(!(isset($userinfo['payment']) && $userinfo['payment'])){ echo 'cf_tr_hide'; } ?>"> <tr class="icode_old_version <?php if(!(isset($userinfo['payment']) && $userinfo['payment'])){ echo 'cf_tr_hide'; } ?>">
<th scope="row">요금제<br>(구버전)</th> <th scope="row">요금제<br>(구버전)</th>
<td> <td>
<input type="hidden" name="cf_icode_server_ip" value="<?php echo get_sanitize_input($config['cf_icode_server_ip']); ?>"> <input type="hidden" name="cf_icode_server_ip" value="<?php echo $config['cf_icode_server_ip']; ?>">
<?php <?php
if ($userinfo['payment'] == 'A') { if ($userinfo['payment'] == 'A') {
echo '충전제'; echo '충전제';
@@ -1309,7 +1309,7 @@ include_once('_rewrite_config_form.php');
<th scope="row">충전 잔액<br>(구버전)</th> <th scope="row">충전 잔액<br>(구버전)</th>
<td> <td>
<?php echo number_format($userinfo['coin']); ?> 원. <?php echo number_format($userinfo['coin']); ?> 원.
<a href="http://www.icodekorea.com/smsbiz/credit_card_amt.php?icode_id=<?php echo get_text($config['cf_icode_id']); ?>&amp;icode_passwd=<?php echo get_text($config['cf_icode_pw']); ?>" target="_blank" class="btn_frmline">충전하기</a> <a href="http://www.icodekorea.com/smsbiz/credit_card_amt.php?icode_id=<?php echo $config['cf_icode_id']; ?>&amp;icode_passwd=<?php echo $config['cf_icode_pw']; ?>" target="_blank" class="btn_frmline">충전하기</a>
</td> </td>
</tr> </tr>
<?php } ?> <?php } ?>
+1 -5
View File
@@ -162,11 +162,7 @@ foreach( $check_keys as $k => $v ){
if( $v === 'int' ){ if( $v === 'int' ){
$posts[$key] = $_POST[$k] = isset($_POST[$k]) ? (int) $_POST[$k] : 0; $posts[$key] = $_POST[$k] = isset($_POST[$k]) ? (int) $_POST[$k] : 0;
} else { } else {
if(in_array($k, array('cf_analytics', 'cf_add_meta', 'cf_add_script', 'cf_stipulation', 'cf_privacy'))){ $posts[$key] = $_POST[$k] = isset($_POST[$k]) ? $_POST[$k] : '';
$posts[$key] = $_POST[$k] = isset($_POST[$k]) ? $_POST[$k] : '';
} else {
$posts[$key] = $_POST[$k] = isset($_POST[$k]) ? strip_tags(clean_xss_attributes($_POST[$k])) : '';
}
} }
} }
+34 -389
View File
@@ -144,7 +144,6 @@ box-shadow: 2px 0 2px rgba(150,150,150,0.1);}
.btn_submit{background:#ff4081;color:#fff} .btn_submit{background:#ff4081;color:#fff}
a.btn_submit{background:#ff4081;color:#fff} a.btn_submit{background:#ff4081;color:#fff}
.btn_confirm .btn_submit {padding:0 15px;border:0;height:30px;color:#fff} .btn_confirm .btn_submit {padding:0 15px;border:0;height:30px;color:#fff}
.btn_frmline {display:inline-block;padding:0 7px;height:24px;border:0;background:#444;color:#fff !important;letter-spacing:-0.1em;text-decoration:none;vertical-align:middle;line-height:2em} /* 우편번호검색버튼 등 */ .btn_frmline {display:inline-block;padding:0 7px;height:24px;border:0;background:#444;color:#fff !important;letter-spacing:-0.1em;text-decoration:none;vertical-align:middle;line-height:2em} /* 우편번호검색버튼 등 */
.btn_frmline:focus, .btn_frmline:hover, .btn_frmline:active {text-decoration:none} .btn_frmline:focus, .btn_frmline:hover, .btn_frmline:active {text-decoration:none}
@@ -182,10 +181,8 @@ a.btn_submit{background:#ff4081;color:#fff}
.btn_add01 button {margin:0} .btn_add01 button {margin:0}
.td_mng a.btn, .td_mng a{display:inline-block;height:26px;line-height:26px;border:0;border-radius:3px;padding:0 8px;margin:1px;font-weight:normal}
.td_mng a.btn,.td_mng a{display:inline-block;height:26px;line-height:26px;border:0;border-radius:3px;padding:0 8px;margin:1px;font-weight:normal} .td_mng button, .td_mng button.btn{height:26px;border:0;border-radius:3px;padding:0 8px;margin:1px;font-weight:normal}
.td_mng button,.td_mng button.btn{height:26px;border:0;border-radius:3px;padding:0 8px;margin:1px;font-weight:normal}
.btn{height:30px;border:0;border-radius:5px;padding:0 10px;font-weight:bold;font-size:1.09em;vertical-align:middle} .btn{height:30px;border:0;border-radius:5px;padding:0 10px;font-weight:bold;font-size:1.09em;vertical-align:middle}
a.btn{display:inline-block;height:30px;line-height:30px;border:0;border-radius:5px;padding:0 10px;font-weight:bold;font-size:1.09em;vertical-align:middle} a.btn{display:inline-block;height:30px;line-height:30px;border:0;border-radius:5px;padding:0 10px;font-weight:bold;font-size:1.09em;vertical-align:middle}
.btn_submit{background:#ff4081;color:#fff} .btn_submit{background:#ff4081;color:#fff}
@@ -200,12 +197,14 @@ a.btn_submit{background:#ff4081;color:#fff}
.btn_frmline{display:inline-block;background:#9eacc6;color:#fff;height:35px;border:0;border-radius:5px;padding:0 10px} .btn_frmline{display:inline-block;background:#9eacc6;color:#fff;height:35px;border:0;border-radius:5px;padding:0 10px}
a.btn_frmline{display:inline-block;background:#9eacc6;color:#fff;height:35px;line-height:33px;border-radius:5px;padding:0 10px;text-decoration:none !important} a.btn_frmline{display:inline-block;background:#9eacc6;color:#fff;height:35px;line-height:33px;border-radius:5px;padding:0 10px;text-decoration:none !important}
.btn_ov01{display:inline-block;line-height:30px;height:30px;font-size:0.92em;vertical-align:top} .btn_ov01{display:inline-block;line-height:30px;height:30px;font-size:0.92em;vertical-align:top}
.btn_ov01:after{display:block;visibility:hidden;clear :both;content:""}
.btn_ov01 .ov_txt{float:left;background:#9eacc6;color:#fff;border-radius:5px 0 0 5px;padding:0 5px} .btn_ov01 .ov_txt{float:left;background:#9eacc6;color:#fff;border-radius:5px 0 0 5px;padding:0 5px}
.btn_ov01 .ov_num{float:left;background:#ededed;color:#666;border-radius:0 5px 5px 0;padding:0 5px} .btn_ov01 .ov_num{float:left;background:#ededed;color:#666;border-radius:0 5px 5px 0;padding:0 5px}
a.btn_ov02,a.ov_listall{display:inline-block;line-height:30px;height:30px;font-size:0.92em;background:#565e8c;color:#fff;vertical-align:top;border-radius:5px;padding:0 7px } a.btn_ov02,a.ov_listall{display:inline-block;line-height:30px;height:30px;font-size:0.92em;background:#565e8c;color:#fff;vertical-align:top;border-radius:5px;padding:0 7px }
a.btn_ov02:hover,a.ov_listall:hover{background:#3f51b5} a.btn_ov02:hover,a.ov_listall:hover{background:#3f51b5}
.local_ov01.local_ov [data-tooltip-text]:hover {position:relative}
.local_ov01.local_ov [data-tooltip-text]:hover:after{line-height:20px;background-color:#000;background-color:rgba(0,0,0,0.8);-webkit-box-shadow:0 0 3px 1px rgba(50,50,50,0.4);-moz-box-shadow:0 0 3px 1px rgba(50,50,50,0.4);box-shadow:0 0 3px 1px rgba(50,50,50,0.4);-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;color:#FFF;font-size:11px;content:attr(data-tooltip-text);white-space: pre;margin-bottom:10px;top:130%;left:0;padding:7px 12px;position:absolute;max-width:500px;word-wrap:break-word;z-index:9999}
/*form*/ /*form*/
.sound_only {display:inline-block !important;position:absolute;top:0;left:0;margin:0 !important;padding:0 !important;width:1px !important;height:1px !important;font-size:0;line-height:0;border:0 !important;overflow:hidden !important} .sound_only {display:inline-block !important;position:absolute;top:0;left:0;margin:0 !important;padding:0 !important;width:1px !important;height:1px !important;font-size:0;line-height:0;border:0 !important;overflow:hidden !important}
.frm_input{height:35px;line-height:32px;border:1px solid #d5d5d5;} .frm_input{height:35px;line-height:32px;border:1px solid #d5d5d5;}
@@ -249,7 +248,6 @@ legend {position:absolute;width:0;height:0;font-size:0;line-height:0;text-indent
#sort_mb {width:800px} #sort_mb {width:800px}
#sort_sodr {width:600px} #sort_sodr {width:600px}
@@ -265,15 +263,16 @@ border-bottom: 5px solid black;}
/* 페이지 내 검색 */ /* 페이지 내 검색 */
.local_sch{} .local_sch{}
.local_sch:after ,.local_sch div:after{display:block;visibility:hidden;clear:both;content:""} .local_sch:after, .local_sch div:after{display:block;visibility:hidden;clear:both;content:""}
.local_sch .btn_sch{width:30px;height:30px;padding:0;float:left;border:1px solid #dcdcdc;border-left:0;background:url(../img/sch_btn.png) no-repeat 50% 50%;text-indent:-999px;overflow:hidden} .local_sch .btn_sch{width:30px;height:30px;border:1px solid #dcdcdc;border-left:0;padding:0;float:left;background:url(../img/sch_btn.png) no-repeat 50% 50%;text-indent:-999px;overflow:hidden}
.local_sch .btn_sch2{width:35px;height:35px;padding:0;border:1px solid #dcdcdc;background:url(../img/sch_btn.png) no-repeat 50% 50% #eee;text-indent:-999px;overflow:hidden} .local_sch .btn_sch2{width:35px;height:35px;border:1px solid #dcdcdc;padding:0;background:url(../img/sch_btn.png) no-repeat 50% 50% #eee;text-indent:-999px;overflow:hidden}
.local_sch .sch_input{height:30px;border:1px solid #dcdcdc;border-right:0;padding:0 5px;float:left;} .local_sch .sch_input{height:30px;border:1px solid #dcdcdc;border-right:0;padding:0 5px;float:left;}
.local_sch select{height:30px;margin-right:3px;border:1px solid #dcdcdc} .local_sch select{height:30px;margin-right:3px;border:1px solid #dcdcdc}
.local_sch01{margin: 10px 0;} .local_sch01{margin: 10px 0;}
.local_sch02{} .local_sch02{}
.local_sch01 .frm_input{height:30px;border:1px solid #dcdcdc;padding:0 5px;} .local_sch01 .frm_input{height:30px;border:1px solid #dcdcdc;padding:0 5px;}
.local_sch01 .btn_submit{width:30px;height:30px;border:1px solid #dcdcdc;padding:0;background:url(../img/sch_btn.png) no-repeat 50% 50% #eee;text-indent:-999px;overflow:hidden} .local_sch01 .btn_submit{width:30px;height:30px;padding:0;background:url(../img/sch_btn.png) no-repeat 50% 50% #eee;border:1px solid #dcdcdc;text-indent:-999px;overflow:hidden}
.local_sch03{padding:5px 15px;background:#e9ebf9;margin:10px 0} .local_sch03{padding:5px 15px;background:#e9ebf9;margin:10px 0}
.local_sch div{margin:5px 0;} .local_sch div{margin:5px 0;}
.local_sch03 strong{display:inline-block;width:70px;} .local_sch03 strong{display:inline-block;width:70px;}
@@ -307,10 +306,9 @@ border-bottom: 5px solid black;}
.local_ov {min-width:960px} .local_ov {min-width:960px}
.local_ov01 {position:relative;margin: 10px 0;} .local_ov01 {position:relative;margin: 10px 0;}
.local_ov01 .ov_a{display:inline-block;line-height:30px;height:30px;font-size:0.92em;background:#ff4081;color:#fff;vertical-align:top;border-radius:5px;padding:0 7px} .local_ov01 .ov_a {display:inline-block;margin:0 0 0 5px;padding:0 0 0 10px;border-left:1px solid #ccc;color:#ff3061}
.local_ov01 .ov_a:hover{background:#ff1464}
/* 테이블 */ /* 테이블 */
table {clear:both;width:100%;border-collapse:collapse;border-spacing:0;} table {clear:both;width:100%;border-collapse:collapse;border-spacing:0;}
table caption {height:0;font-size:0;line-height:0;overflow:hidden} table caption {height:0;font-size:0;line-height:0;overflow:hidden}
@@ -420,10 +418,6 @@ tfoot th {}
.visit_del_bt{margin:5px 0;border-top:1px solid #eee;padding:5px 0} .visit_del_bt{margin:5px 0;border-top:1px solid #eee;padding:5px 0}
.visit_del_bt .btn_submit{border:0;height:35px;padding: 0 5px;border-radius:3px} .visit_del_bt .btn_submit{border:0;height:35px;padding: 0 5px;border-radius:3px}
/*접속자로그삭제*/
.visit_del_bt{margin:5px 0;border-top:1px solid #eee;padding:5px 0}
.visit_del_bt .btn_submit{border:0;height:35px;padding: 0 5px;border-radius:3px}
/* 공통 */ /* 공통 */
.td_addr {text-align:left !important} .td_addr {text-align:left !important}
.td_alignc {text-align:center} .td_alignc {text-align:center}
@@ -554,44 +548,6 @@ td.td_grpset {width:160px;border-left:1px solid #e9ecee;text-align:center}
.session_del strong{color:#ff0000} .session_del strong{color:#ff0000}
.session_del p{line-height:1.7em;padding:10px 15px ;background:#f7ecea;border:2px solid #ffb6c1} .session_del p{line-height:1.7em;padding:10px 15px ;background:#f7ecea;border:2px solid #ffb6c1}
/* ########## 쇼핑몰 사용시 적용 ########## */
.sidx {padding:20px 0 30px;zoom:1}
.sidx:after {display:block;visibility:hidden;clear:both;content:""}
.sidx_anchor {position:absolute;margin:0;padding:0;width:1px;height:1px;font-size:0;line-height:0;overflow:hidden}
/* idx 쇼핑몰 */
#anc_sidx_ord {float:left;width:66%}
#sidx_graph {position:relative}
#sidx_graph_price {position:absolute;top:10px;left:20px;margin:0;padding:0;width:12%;list-style:none}
#sidx_graph_price li {position:relative;padding:0 10% 0 0;height:48px;font-family:tahoma;text-align:right}
#sidx_graph_price li span {position:absolute;top:7px;right:-10%;width:10px;height:1px;background:#e9e9e9}
#sidx_graph_area {position:absolute;top:0;left:15%;margin:0;padding:0;width:85%;height:260px;border:1px solid #e9e9e9;list-style:none}
#sidx_graph_area li {position:relative;float:left;padding:0 1% 0 0;width:14%;height:100%}
#sidx_graph_area .graph {position:absolute;bottom:0;width:40%;height:0}
#sidx_graph_area .order {background:#8562ca;left:7%}
#sidx_graph_area .cancel {background:#62c5ca;right:7%}
#sidx_graph_area #price_tooltip {display:none;position:absolute;top:-18px;left:0;background-color:#fff;border:1px solid gray}
#sidx_graph_area #price_tooltip div {white-space:nowrap}
#sidx_graph_date {position:absolute;top:275px;left:15%;margin:0;padding:0;width:85%;border:1px solid #fff;list-style:none}
#sidx_graph_date li {position:relative;float:left;width:14%;font-family:tahoma;text-align:center}
#sidx_graph_date li span {position:absolute;top:-16px;right:0;width:1px;height:10px;background:#e9e9e9}
#sidx_graph_legend {position:absolute;top:-25px;left:15%}
#sidx_graph_legend span {display:inline-block;width:13px;height:13px;vertical-align:middle}
#sidx_graph_legend #legend_order {background:#8562ca}
#sidx_graph_legend #legend_cancel {margin:0 0 0 10px;background:#62c5ca}
#sidx_graph_area .bg0{background:#fff }
#sidx_graph_area .bg1{background:#eff3f9 }
#anc_sidx_settle {margin:0 0 30px;padding:30px 0;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9}
#anc_sidx_settle table {text-align:center}
#sidx_stat {float:right;width:32%}
#sidx_stat h2 {padding:0 20px 0 0}
#sidx_stat .tbl_wrap {padding:0 20px 0 0}
/* idx 1:1문의/상품문의/사용후기 */ /* idx 1:1문의/상품문의/사용후기 */
.sidx_cs {} .sidx_cs {}
.sidx_cs section {float:left;margin:0 2% 0 0;width:32%} .sidx_cs section {float:left;margin:0 2% 0 0;width:32%}
@@ -612,270 +568,6 @@ td.td_grpset {width:160px;border-left:1px solid #e9ecee;text-align:center}
.sidx_cs #anc_sidx_ps .ps_link {display:block;margin:5px 0} .sidx_cs #anc_sidx_ps .ps_link {display:block;margin:5px 0}
/* 쇼핑몰 설정 */
#anc_scf_payment textarea {height:50px}
.get_shop_skin,.shop_etc,.shop_pc_index,.shop_mobile_index{background: #9eacc6;color: #fff;height: 30px;border: 0;border-radius: 5px;padding: 0 10px;font-weight: bold;font-size: 1.09em;
vertical-align: middle;}
a.scf_pgreg {display:inline-block;margin:5px 0 0;padding:5px 10px;background:#226C8B;color:#fff;font-weight:normal;text-decoration:none}
a.kcp_btn {display:inline-block;margin:5px 0 0;padding:5px 10px;background:#226C8B;color:#fff;font-weight:normal;text-decoration:none}
a.lg_btn{display:inline-block;margin:5px 0 0;padding:5px 10px;background:#ED008C;color:#fff;font-weight:normal;text-decoration:none}
a.kg_btn{display:inline-block;margin:5px 0 0;padding:5px 10px;background:#4A2C7C;color:#fff;font-weight:normal;text-decoration:none}
a.kakao_btn{display:inline-block;margin:5px 0 0;padding:5px 10px;background:#FDDC2F;color:#3B1E1E;font-weight:normal;text-decoration:none}
a.naver_btn {display:inline-block;margin:5px 0 0;padding:5px 10px;background:#00C73C;color:#fff;font-weight:normal;text-decoration:none}
.scf_cardtest {margin:5px 0 0}
.scf_cardtest_btn {margin-left:5px;vertical-align:middle}
#scf_cardtest_tip {margin:10px 0 0;padding:10px;border:3px solid #ddd}
#scf_cardtest_tip strong {display:inline-block;margin:0 0 5px}
#scf_cardtest_tip dl {margin:0 0 15px;padding:0;zoom:1}
#scf_cardtest_tip dl:after {display:block;visibility:hidden;clear:both;content:""}
#scf_cardtest_tip dt {float:left;width:100px}
#scf_cardtest_tip dd {padding:0;overflow:hidden}
.scf_cardtest_tip {display:none}
.scf_cardtest_hide {display:none}
.scf_cardtest_tip_adm_hide {display:none}
.scf_img {display:none}
#scf_sms_pre h3 {padding:10px 0}
#scf_sms_pre dl {margin:0 0 10px;zoom:1}
#scf_sms_pre dl:after {display:block;visibility:hidden;clear:both;content:""}
#scf_sms_pre dt {clear:both;float:left;padding:5px 0;width:100px}
#scf_sms_pre dd {padding:5px 0;overflow:hidden}
#scf_sms {margin:0 20px 30px;padding:20px 0 0;zoom:1}
#scf_sms:after {display:block;visibility:hidden;clear:both;content:""}
.scf_sms_box {float:left;margin:0 8px 0 9px;width:163px;text-align:center}
.scf_sms_box h4 {margin:0 0 5px}
.scf_sms_img {margin:10px 0;width:163px;height:191px;background:url('../shop_admin/img/sms_back.gif') no-repeat 0 0;text-align:center}
.scf_sms_img textarea {margin:54px 0 0;width:115px;height:85px;border:0;background:transparent;font-size:0.95em;overflow:hidden}
.scf_sms_img span {display:block}
.scf_sms_cnt {display:block}
ul.de_pg_tab{margin:0;padding:0;zoom:1}
ul.de_pg_tab:after{display:block;visibility:hidden;clear:both;content:"";}
ul.de_pg_tab li{position:relative;display:inline-block;float:left;text-align:center;margin:0;padding:0;width:120px}
ul.de_pg_tab li a{margin:0 2px;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:2.5;background-color:#f7f7f7;color:#74777b;font-weight:bold;font-size:1.2em;text-decoration:none}
ul.de_pg_tab li a:hover{text-decoration:none}
ul.de_pg_tab li.tab-current a{background:#2CC185;color:#fff}
.pg_info_fld{position:relative}
.kcp_info_fld th{background-color:#F6FCFF}
.lg_info_fld th{background-color:#FFF4FA}
.inicis_info_fld th{background-color:#F6F1FF}
.kakao_info_fld th{background-color:#FFFCED}
.naver_info_fld th{background-color:#F3FFF3}
/* 주문내역 */
#sodr_list td {text-align:center}
#sodr_list .td_name {text-align:center !important}
#orderitemlist {position:relative}
#orderitemlist .itemlist {z-index:2;position:absolute;top:0;left:-41px;width:958px;padding:10px;border:1px solid #a2a5a9;background:#f2f5f9}
#orderitemlist .itemlist h2{margin:0 0 10px}
#orderitemlist td {background:#fff}
#orderitemlist #orderitemlist_close {text-align:right}
#sodr_list .list_escrow {display:block;color:#80bc0d;text-align:center}
#sodr_list .list_test {display:block;text-align:center;color:#ff3061}
#sodr_list .odrpay {max-width:50px}
.local_sch03.local_sch [data-tooltip-text]:hover {position:relative}
.local_sch03.local_sch [data-tooltip-text]:hover:after{line-height:20px;background-color:#000;background-color:rgba(0,0,0,0.8);-webkit-box-shadow:0 0 3px 1px rgba(50,50,50,0.4);-moz-box-shadow:0 0 3px 1px rgba(50,50,50,0.4);box-shadow:0 0 3px 1px rgba(50,50,50,0.4);-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;color:#FFF;font-size:11px;content:attr(data-tooltip-text);white-space: pre;margin-bottom:10px;top:130%;left:0;padding:7px 12px;position:absolute;max-width:500px;word-wrap:break-word;z-index:9999}
/* 주문내역 수정 */
.sodr_nonpay {color:#ff6600}
strong.sodr_nonpay {display:block;padding:5px 0;text-align:right}
.sodr_sppay {color:#1f9bff}
#anc_sodr_memo textarea {width:100%}
#anc_sodr_memo .btn_confirm {margin:10px 0 0}
#anc_sodr_orderer #od_addr1, #anc_sodr_orderer #od_addr2, #anc_sodr_orderer #od_addr3 {margin:5px 0 0}
#anc_sodr_taker #od_b_addr1, #anc_sodr_taker #od_b_addr2, #anc_sodr_taker #od_b_addr3 {margin:5px 0 0}
#anc_sodr_orderer #od_addr_jibeon, #anc_sodr_taker #od_b_addr_jibeon {display:block;margin:5px 0 0}
#sodr_qty_log {padding:0 20px}
#sodr_qty_log h3 {margin:20px 0 10px}
#sodr_qty_log div {padding:10px;height:auto !important;height:200px;max-height:200px;border:1px solid #e9e9e9;background:#f5f6fa;line-height:1.8em;overflow-y:scroll}
#sodr_request_frm h3 {margin:20px 0 0}
#sodr_request_item h3 {margin-bottom:10px}
#sodr_request_frm #forderrequest {border-top:1px solid #e9e9e9}
#sodr_request_log_wrap {padding:10px;height:auto !important;height:200px;max-height:200px;border:1px solid #e9e9e9;background:#f5f6fa;overflow-y:scroll}
#sodr_request_log_wrap p {position:relative;padding:5px 0;border-bottom:1px solid #e9e9e9}
#sodr_request_log_wrap span {display:inline-block;margin:0 0 0 80px}
#sodr_request_log_wrap b {display:inline-block;margin:0 15px 0 0;font-weight:normal}
#sodr_request_log_wrap button {position:absolute;top:7px;left:0;margin:0;padding:0;border:0;background:transparent;font-weight:bold}
#sodr_request_handle h3 {margin-bottom:10px}
#anc_sodr_request h3 {margin:20px 0 10px}
#sodr_request_list {padding:10px;height:auto !important;height:200px;max-height:200px;border:1px solid #e9e9e9;background:#f5f6fa;overflow-y:scroll}
#sodr_request_list p {position:relative;padding:5px 0;border-bottom:1px solid #e9e9e9}
#anc_sodr_chk .dvr_link {color:#ff3061;text-decoration:underline}
.od_test_caution{line-height: 1.7em;padding: 10px 15px;background: #f7ecea;border: 2px solid #ffb6c1;color: #ff0000;font-weight: bold;margin:10px 0 20px}
/* 주문통합내역 */
#sodr_sort {margin:0 20px 20px;padding:0;list-style:none;zoom:1}
#sodr_sort:after {display:block;visibility:hidden;clear:both;content:""}
#sodr_sort li {float:left;margin:0 10px 0 0}
#sodr_sort a {font-size:0.95em;text-decoration:underline;letter-spacing:-0.1em}
#sodr_sort a.sort_on {color:#ff3061}
#sodr_all {margin:0 20px}
#sodr_all h2 {position:absolute;font-size:0;line-height:0;overflow:hidden}
#sodr_all .btn_list {margin:10px 0}
.sodr_all_list {clear:both;margin:0 0 50px;padding:0;list-style:none}
.sodr_all_list .sodr_basic {float:left;zoom:1}
.sodr_all_list .sodr_basic:after {display:block;visibility:hidden;clear:both;content:""}
.sodr_all_list .sodr_basic dt {float:left;margin:0 10px 0 0}
.sodr_all_list .sodr_basic dd {float:left;margin:0 30px 0 0}
.sodr_all_list .sodr_basic strong a {color:#ff3061;text-decoration:underline}
.sodr_all_list .sodr_person {float:right;zoom:1}
.sodr_all_list .sodr_person:after {display:block;visibility:hidden;clear:both;content:""}
.sodr_all_list .sodr_person dt {float:left;margin:0 0 0 30px}
.sodr_all_list .sodr_person dd {float:left;margin:0 0 0 10px}
.sodr_all_list .sodr_pay {clear:both;margin:0;border-top:1px solid #d1dee2;zoom:1}
.sodr_all_list .sodr_pay:after {display:block;visibility:hidden;clear:both;content:""}
.sodr_all_list .sodr_pay dt {float:left;padding:8px 0;width:15%}
.sodr_all_list .sodr_pay dd {float:left;margin:0;padding:8px 0;width:35%}
#sodr_total table {text-align:center}
#sodr_total th {width:125px}
/* 분류관리 목록 */
#sct .sct_name {width:130px}
#sct th{padding:5px}
#sct .sct_name div {position:relative}
#sct .sct_name1 {padding-left:25px}
#sct .sct_name2 {padding-left:50px}
#sct .sct_name3 {padding-left:75px}
#sct .sct_name4 {padding-left:100px}
#sct .name_lbl {position:absolute;top:0;left:-20px;width:13px;height:13px;background:url('../shop_admin/img/icon_reply.gif') 0 0 no-repeat}
.sct_pcskin select,.sct_mskin select{width:37% !important}
.sct_pcskin .frm_input,.sct_mskin .frm_input{width:60% !important}
/* 분류 추가/수정 */
.frm_ca_id {display:inline-block;margin:0 10px 0 0;font-weight:bold}
/* 상품관리 */
.sit_odrby {text-align:center}
.sit_amt {text-align:right;background-color:#e8fbff !important}
.sit_amt2 {text-align:right;border-color:#c3e189 !important;background-color:#f6ffe6 !important}
.sit_amt3 {text-align:right;border-color:#f6c8c4 !important;background-color:#ffedeb !important}
.sit_camt, .sit_pt, .sit_qty {text-align:right}
.frm_sit_title {margin:5px 0 0}
#fitemlistupdate .td_sort select{width: 33%;float: left;margin-right: 0.3%;}
/* 상품입력/수정 */
#sit_compact {padding:15px 0;border:1px solid #e9e9e9;background:#f7f7f7;text-align:center}
.sit_w_opt {height:70px !important}
.sit_wimg {display:none}
.sit_relation_list {width:100%;background:#f6f6f6}
.sit_relation_selected {width:100%;background:#fcfff2}
#add_span img, #sel_span img {margin:5px 0}
.sit_option {margin:0 0 10px;padding:10px 10px 0;border:1px solid #e9e9e9;background:#f7f7f7}
.sit_option .frm_input {background:#fff !important;color:#000}
.sit_option_frm_wrapper {margin:0 0 10px;height:auto !important;height:500px;max-height:500px;border:1px solid #ccc;overflow-y:scroll}
.sit_option_frm_wrapper th {padding:5px 0 !important;text-align:center !important;width:auto !important}
#sit_option_frm .btn_list {margin:0 0 10px}
#sit_option_frm fieldset {padding:10px;border:1px solid #e9e9e9;background:#f7f7f7;text-align:center}
#sit_option_frm fieldset .frm_input {margin:0 10px 0 5px;background:#fff !important;color:#000}
#sit_option_addfrm_btn {position:relative}
#sit_option_addfrm_btn button {position:absolute;top:-45px;right:0}
#sit_option_addfrm .btn_list {margin:0 0 10px}
#sit_option_addfrm fieldset {padding:10px;border:1px solid #e9e9e9;background:#f7f7f7;text-align:center}
#sit_option_addfrm fieldset .frm_input {margin:0 10px 0 5px;background:#fff !important;color:#000}
/* 상품 복사 */
#sit_copy {margin:10px;padding:10px;background:#fff}
#sit_copy label {display:inline-block;margin:0 10px 0 0;font-weight:bold}
/* 상품 일괄 등록 */
#excelfile_upload {margin:10px ;padding:20px;border:1px solid #e9e9e9;background:#fff}
#excelfile_upload label {font-weight:bold}
#excelfile_input {margin:0 0 20px;text-align:center}
#excelfile_result {margin:0 20px 20px;border-bottom:1px solid #e9e9e9;zoom:1}
#excelfile_result:after {display:block;visibility:hidden;clear:both;content:""}
#excelfile_result dt {clear:both;float:left;padding:10px 0;width:40%;font-weight:bold}
#excelfile_result dd {float:left;margin:0;padding:10px 0;width:60%}
#excelfile_result .result_done {color:#5d910b}
#excelfile_result .result_fail {color:#ff3061}
/* 상품옵션재고관리 */
.sit_stock_qty_alert {color:#ff1133;font-weight:bold}
/* 배송일괄처리 */
#sdeli_proc_fs {padding:20px 0;border-bottom:1px solid #f7f7f7;text-align:center}
/* 이벤트 입력/수정 */
.frm_ev_id {display:inline-block;margin:0 10px 0 0;font-weight:bold}
/* 관련 상품, 관련 이벤트 입력/수정 */
.srel section ul {margin:0;padding:0 10px;list-style:none;background:#fff}
.srel section li {padding:5px 0;border-bottom:1px solid #e9e9e9;zoom:1}
.srel section li:after {display:block;visibility:hidden;clear:both;content:''}
.srel .srel_list, .srel .srel_sel {height:auto !important;height:200px;max-height:200px;border:1px solid #ced9de;background:#f6f6f6;overflow-y:scroll}
.srel .list_item {float:left;width:80%}
.srel .list_item img {float:left;margin:0 10px 0 0}
.srel .list_item_btn {float:right;margin-top:7px}
.srel .srel_sel {border:1px solid #ced9de;background:#fcfff2}
.srel .srel_list p, .srel .srel_sel p {padding:10px 0;text-align:center}
.srel .compare_left ul {margin:0;list-style:none}
.srel .srel_noneimg li {padding:7px 0}
.srel .srel_noneimg button {top:0;right:0}
.srel .srel_pad {display:block;margin:0 0 10px}
.srel .srel_pad:after {display:block;visibility:hidden;clear:both;content:''}
.srel .srel_pad button {position:static}
/* 쿠폰관리 */
.scp_new_win .empty_table {padding:30px 0}
#scp_list_find {margin:10px ;padding:20px;border:1px solid #e9e9e9;background:#fff}
#scp_list_find .btn_frmline {line-height:1.5em !important}
#scp_list_find label {font-weight:bold}
.scp_find_code {width:110px;text-align:center}
/* 매출현황 */
#ssale_stats {zoom:1}
#ssale_stats:after {display:block;clear:both;visibility:hidden;content:''}
#ssale_stats div {float:left;padding:2%;width:46%;border-bottom:1px solid #eee;text-align:center}
#ssale_stats h3 {margin:30px 0 0;font-size:1.3em;text-align:center}
#ssale_stats form {margin:20px 0 10px;padding:10px 0}
#ssale_stats .frm_input {padding:0 10px !important;height:24px !important}
/* 주문내역출력 (새창) */
.new_win .sodr_print_pop_list table {width:100%}
#sodr_print_pop h2 {padding:15px 0;color:#ff3600;text-align:right}
#sodr_print_pop h3 {margin:0 0 10px}
.sodr_print_pop_list {margin:0 20px 10px;padding:0 0 10px;border-bottom:1px dotted #ddd}
.sodr_print_pop_list .sodr_print_pop_same {margin:0 0 10px;border:1px solid #e9e9e9;background:#f7f7f7;text-align:center}
.sodr_print_pop_list dl {margin:0 0 15px;padding:0;zoom:1}
.sodr_print_pop_list dl:after {display:block;visibility:hidden;clear:both;content:""}
.sodr_print_pop_list dt {float:left;padding:7px 0 6px;width:100px;border-bottom:1px solid #ddd}
.sodr_print_pop_list dd {padding:7px 0 6px;border-bottom:1px solid #ddd;overflow:hidden}
#sodr_print_pop_total {padding:20px 0;text-align:center}
#sodr_print_pop_total span {display:block;margin:0 0 10px;font-size:1.5em}
#sodr_print_pop_total strong {color:#ff3600}
/* 배너관리 */
.sbn_img {text-align:center}
.sbn_image {display:none;margin:0 0 10px;text-align:left}
/* SMS문자전송 */ /* SMS문자전송 */
#sms_send {padding-bottom:100px;zoom:1} #sms_send {padding-bottom:100px;zoom:1}
#sms_send:after {display:block;visibility:hidden;clear:both;content:""} #sms_send:after {display:block;visibility:hidden;clear:both;content:""}
@@ -890,14 +582,6 @@ strong.sodr_nonpay {display:block;padding:5px 0;text-align:right}
#sms_send .local_desc01 {min-width:320px} #sms_send .local_desc01 {min-width:320px}
/* 가격비교사이트 */
#anc_pricecompare_info li {margin:5px 0 5px -1px}
.price_engine dt a {font-weight:bold}
.price_engine dd {margin:0 0 15px}
.price_engine ul{padding: 0 0 0 15px;}
.price_engine li {margin:5px 0 5px -1px;list-style:disc }
/* 새창 기본 스타일 */ /* 새창 기본 스타일 */
.new_win {} .new_win {}
.new_win h1 {font-size:1.17em;padding:15px 20px;background:#fff;border-bottom:1px solid #ddd} .new_win h1 {font-size:1.17em;padding:15px 20px;background:#fff;border-bottom:1px solid #ddd}
@@ -998,46 +682,30 @@ box-shadow: 2px 2px 3px 0px rgba(0,0,0,0.2);}
/*부가서비스*/ /*부가서비스*/
.lnb_svc{color:#ff3061;font-weight:bold} .lnb_svc{color:#ff3061;font-weight:bold}
.service_wrap{ width:965px;margin:0 0 10px;overflow:hidden} .service_wrap{width:960px; margin:0 20px 10px;overflow:hidden}
.sevice_1{border:1px solid #ebe8e8;width:310px;float:left;border-radius:5px;text-align:center;margin-right:6px;} .sevice_1{border:1px solid #ebe8e8;width:330px;float:left;border-radius:5px;text-align:center;margin-right:6px;}
.sevice_1 .svc_img{padding:30px 0 0;} .sevice_1 .svc_img{padding:30px 0 0;}
.sevice_1 h3{font-size:16px;margin:185px 0 10px;color:#525252} .sevice_1 h3{font-size:16px;margin:15px 0;color:#525252}
.sevice_1 p{padding:20px;background:#f8f8f8;font-size:12px;text-align:left;color:#898989;line-height:18px} .sevice_1 p{padding:20px;background:#f8f8f8;font-size:12px;text-align:left;color:#898989;line-height:18px}
.sevice_1 ul {width:100%;padding:0; margin:0;border-top:1px solid #ebe8e8;} .sevice_1 ul {width:100%;padding:0; margin:0;border-top:1px solid #ebe8e8;}
.sevice_1 ul li{list-style:none;float:left;border-right:1px solid #ebe8e8;} .sevice_1 ul li{list-style:none;float:left;border-right:1px solid #ebe8e8;width:33%;}
.sevice_1 ul li a{display:inline-block;height:75px;width:100%} .sevice_1 ul li a{display:inline-block;height:76px;width:100%}
.sevice_1 ul li img{padding:8px 0 0;} .sevice_1 ul li img{padding:10px 0 0;}
.sevice_1 ul li.last{border:0} .sevice_1 ul li.last{border:0}
.sevice_1 h4{width:100%;padding:0; margin:0;border-top:1px solid #ebe8e8;} .sevice_1 h4{width:100%;padding:0; margin:0;border-top:1px solid #ebe8e8;}
.sevice_1 h4 a{display:inline-block;height:75px;padding:10px 0 0;width:100%} .sevice_1 h4 a{display:inline-block;height:66px;padding:10px 0 0;width:100%}
.svc_card{background:url('../img/service_img1.jpg') no-repeat top center;margin-right:13px;} .sevice_2{border:1px solid #ebe8e8;float:left;width:282px;}
.svc_card ul li{width:33%;} .sevice_2 .svc_a{padding:33px 0 0;}
.svc_phone {background:url('../img/service_img2.jpg') no-repeat top center;margin-right:13px;} .sevice_2 .svc_a h3{font-size:14px;letter-spacing:-1px;color:#525252;margin-bottom:5px;padding:0 20px 0}
.svc_phone ul li{width:33%;} .sevice_2 .svc_a p{color:#898989;line-height:18px;letter-spacing:-1px;padding:5px 20px 0;}
.svc_ipin {background:url('../img/service_img3.jpg') no-repeat top center;} .sevice_2 .svc_btn{text-align:center;position:absolute;bottom:0;left:0;width:282px;}
.sevice_2 .svc_btn a{display:inline-block; background:#ff3061;text-align:center;color:#fff;padding:10px 20px;}
.service_2{padding-top:15px;clear:both} .sevice_2 .svc_btn a:hover{text-decoration:none;}
.service_2 h3{font-size:14px;letter-spacing:-1px;color:#525252;margin:0 0 4px} .sevice_2 .svc_sms{overflow:hidden; height:212px;position:relative}
.sevice_2 .svc_sms .svc_btn a{display:inline-block; background:#f8f8f8;width:100%;text-align:center;margin:0;padding:10px 0 0 }
.service_2 .svc_a p{color:#898989;line-height:16px;letter-spacing:-1px;} .sevice_2 .svc_design{overflow:hidden;height:210px;position:relative}
.sevice_2 .svc_design .svc_btn a{margin:0 0 20px}
.svc_keyword{clear:both ;}
.svc_keyword .svc_a{float:left;width:230px;padding:46px 0 0 15px ;height:120px; }
.service_2 .svc_ri .svc_a{padding:25px 0 0 22px;}
.service_2 .svc_btn{float:right;}
.service_2 .svc_btn a{display:inline-block;width:126px; height:37px;background:#ff3061;color:#fff;line-height:37px;text-align:center;margin:22px 13px 0;}
.service_2 .svc_btn a:hover,.service_2 .svc_btn a:focus,.service_2 .svc_btn a:active{text-decoration:none}
.svc_keyword{background:#e6f2f4}
.svc_keyword .svc_btn{margin:40px 0 0 ;}
.svc_keyword .svc_btn a{width:160px;}
.svc_sms{border:1px solid #ebe8e8;position:relative;height:93px}
.svc_sms:after{display:block;visibility:hidden;clear:both;content:""}
.svc_sms .svc_btn2{position:absolute;top:0;right:0}
.svc_sms .svc_btn2 a{display:inline-block; width:220px; height:91px; background:#fbfbfb; text-align:center; padding:20px 0 0;}
/* 캡챠 */ /* 캡챠 */
#captcha {display:inline-block;position:relative} #captcha {display:inline-block;position:relative}
@@ -1053,7 +721,6 @@ box-shadow: 2px 2px 3px 0px rgba(0,0,0,0.2);}
#theme_list{padding:0;margin:0;list-style:none; width: 1000px;position:relative} #theme_list{padding:0;margin:0;list-style:none; width: 1000px;position:relative}
#theme_list:after{display:block;visibility:hidden;clear:both;content:""} #theme_list:after{display:block;visibility:hidden;clear:both;content:""}
#theme_list li{margin:10px 10px 10px 0;float:left} #theme_list li{margin:10px 10px 10px 0;float:left}
#theme_list li:after{display:block;visibility:hidden;clear:both;content:""} #theme_list li:after{display:block;visibility:hidden;clear:both;content:""}
#theme_list li .tmli_if{border: 1px solid #d1dee2;width:302px;} #theme_list li .tmli_if{border: 1px solid #d1dee2;width:302px;}
#theme_list li .tmli_if>img{width:300px;height:225px;} #theme_list li .tmli_if>img{width:300px;height:225px;}
@@ -1069,6 +736,7 @@ box-shadow: 2px 2px 3px 0px rgba(0,0,0,0.2);}
#theme_list li .theme_pr{float:right;margin-top:5px;padding:0 5px;height:26px;line-height:24px; border: 1px solid #ccc; background: #fafafa; } #theme_list li .theme_pr{float:right;margin-top:5px;padding:0 5px;height:26px;line-height:24px; border: 1px solid #ccc; background: #fafafa; }
#theme_list li .theme_preview{ float: right; margin-top: 5px; padding:0 5px;height:26px; border: 1px solid #ccc; background: #fafafa; margin-right:3px} #theme_list li .theme_preview{ float: right; margin-top: 5px; padding:0 5px;height:26px; border: 1px solid #ccc; background: #fafafa; margin-right:3px}
#theme_detail{position:fixed;top:50%;height:540px;width:900px;margin-top:-271px;background:#fff;background:#f3f3f3;border:1px solid #000; #theme_detail{position:fixed;top:50%;height:540px;width:900px;margin-top:-271px;background:#fff;background:#f3f3f3;border:1px solid #000;
-webkit-box-shadow: 1px 2px 5px rgba(150,150,150,100.5); -webkit-box-shadow: 1px 2px 5px rgba(150,150,150,100.5);
-moz-box-shadow: 1px 2px 5px rgba(150,150,150,0.5); -moz-box-shadow: 1px 2px 5px rgba(150,150,150,0.5);
@@ -1090,6 +758,7 @@ box-shadow: 1px 2px 5px rgba(150,150,150,0.5);z-index:1000}
#theme_detail .theme_dt_btn .close_btn:hover{background-color:#eceffc} #theme_detail .theme_dt_btn .close_btn:hover{background-color:#eceffc}
#theme_detail .theme_dt_btn .btn_03{line-height:28px;display:inline-block;vertical-align:top;margin-top:6px;padding:0 6px;border-radius:5px} #theme_detail .theme_dt_btn .btn_03{line-height:28px;display:inline-block;vertical-align:top;margin-top:6px;padding:0 6px;border-radius:5px}
/*글,댓글현황*/ /*글,댓글현황*/
#wr_cont{position:relative;margin:10px 0} #wr_cont{position:relative;margin:10px 0}
#wr_cont input[type="submit"]{background:#ff3061;border:none;color:#fff;padding: 0 5px;height: 24px;} #wr_cont input[type="submit"]{background:#ff3061;border:none;color:#fff;padding: 0 5px;height: 24px;}
@@ -1111,31 +780,7 @@ box-shadow: 1px 2px 5px rgba(150,150,150,0.5);z-index:1000}
#processing{margin: 0 auto;padding: 70px 0;border: 1px solid #eee;background: #f9f9f9;text-align:center;} #processing{margin: 0 auto;padding: 70px 0;border: 1px solid #eee;background: #f9f9f9;text-align:center;}
#processing p{font-size:1.2em} #processing p{font-size:1.2em}
.check_processing {width:300px;height:300px;margin:0 auto;background:url(../img/check.png) no-repeat 50% 50% } .check_processing {width:300px;height:300px;margin:0 auto;background:url(../img/check.png) no-repeat 50% 50% }
#processing button{background:#ff3061;border:none;color:#fff;padding: 15px;width:200px;margin-top:15px;border-radius:5px;font-weight:bold;font-size:1.167em}
#processing button{background:#ff3061;border:none;color:#fff;padding: 15px;width:200px;margin-top:15px;border-radius:5px;font-weight:bold;font-size:1.167em}
/*미완료 주문*/
#inorderlist .td_name{text-align:center !important}
#anc_sodr_pay .btn_confirm{margin-top:30px}
#anc_sodr_pay .btn_confirm .btn_submit{width:300px;height:40px;font-size:14px;}
/*상품문의 */
#itemqalist .qa_href .tit_op{background:url(./../img/op_btn1.gif) no-repeat 50% 50%;display:inline-block;text-indent:-999px;overflow:hidden;width:7px;height:4px;margin-left:5px}
#itemqalist .qa_div{background:#d8dfe9;padding:10px;margin:5px 0 0;display:none;}
#itemqalist .qa_div strong{color:#415f9d;font-size:0.92em;display:block}
#itemqalist .qa_div .qa_q{padding-bottom:10px;margin-bottom:5px;border-bottom:1px dashed #fff;}
#itemqalist .qa_href{font-weight:bold;text-decoration:none;display:block;}
#itemqalist .td_status{color:#888}
#itemqalist .td_status strong{color:#ff4588}
/*상품후기 */
#itemuselist .use_href{font-weight:bold;text-decoration:none;display:block;}
#itemuselist .use_href .tit_op{background:url(./../img/op_btn1.gif) no-repeat 50% 50%;display:inline-block;text-indent:-999px;overflow:hidden;width:7px;height:4px;margin-left:5px}
#itemuselist .use_div{background:#d8dfe9;padding:10px;margin:5px 0 0;display:none;}
#itemuselist .td_select{width:100px}
@media only screen and (max-device-width : 768px) and (orientation : landscape){ @media only screen and (max-device-width : 768px) and (orientation : landscape){
/* Styles */ /* Styles */
@@ -1145,4 +790,4 @@ input[type="text"]{max-width:200px}
@media only screen and (max-device-width : 480px) and (orientation : portrait){ @media only screen and (max-device-width : 480px) and (orientation : portrait){
/* Styles */ /* Styles */
input[type="text"]{max-width:200px} input[type="text"]{max-width:200px}
} }
-28
View File
@@ -177,34 +177,6 @@ if( !$row ) {
$is_check = true; $is_check = true;
} }
// 임시저장 테이블이 없을 경우 생성
if(!sql_query(" DESC {$g5['g5_shop_post_log_table']} ", false)) {
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['g5_shop_post_log_table']}` (
`log_id` int(11) NOT NULL AUTO_INCREMENT,
`oid` bigint(20) unsigned NOT NULL,
`mb_id` varchar(255) NOT NULL DEFAULT '',
`post_data` text NOT NULL,
`ol_code` varchar(255) NOT NULL DEFAULT '',
`ol_msg` text NOT NULL,
`ol_datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`ol_ip` varchar(25) NOT NULL DEFAULT '',
PRIMARY KEY (`log_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8; ", true);
$is_check = true;
}
$result = sql_query("describe `{$g5['g5_shop_post_log_table']}`");
while ($row = sql_fetch_array($result)){
if( $row['Field'] === 'ol_msg' && $row['Type'] === 'varchar(255)' ){
sql_query("ALTER TABLE `{$g5['g5_shop_post_log_table']}` MODIFY ol_msg TEXT NOT NULL;", false);
sql_query("ALTER TABLE `{$g5['g5_shop_post_log_table']}` DROP PRIMARY KEY;", false);
sql_query("ALTER TABLE `{$g5['g5_shop_post_log_table']}` ADD `log_id` int(11) NOT NULL AUTO_INCREMENT, ADD PRIMARY KEY (`log_id`);", false);
$is_check = true;
break;
}
}
$is_check = run_replace('admin_dbupgrade', $is_check); $is_check = run_replace('admin_dbupgrade', $is_check);
$db_upgrade_msg = $is_check ? 'DB 업그레이드가 완료되었습니다.' : '더 이상 업그레이드 할 내용이 없습니다.<br>현재 DB 업그레이드가 완료된 상태입니다.'; $db_upgrade_msg = $is_check ? 'DB 업그레이드가 완료되었습니다.' : '더 이상 업그레이드 할 내용이 없습니다.<br>현재 DB 업그레이드가 완료된 상태입니다.';
+2 -2
View File
@@ -12,11 +12,11 @@ else
check_admin_token(); check_admin_token();
$fm_id = isset($_REQUEST['fm_id']) ? (int) $_REQUEST['fm_id'] : 0; $fm_id = isset($_POST['fm_id']) ? (int) $_POST['fm_id'] : 0;
$fa_id = isset($_REQUEST['fa_id']) ? (int) $_REQUEST['fa_id'] : 0;
$fa_subject = isset($_POST['fa_subject']) ? $_POST['fa_subject'] : ''; $fa_subject = isset($_POST['fa_subject']) ? $_POST['fa_subject'] : '';
$fa_content = isset($_POST['fa_content']) ? $_POST['fa_content'] : ''; $fa_content = isset($_POST['fa_content']) ? $_POST['fa_content'] : '';
$fa_order = isset($_POST['fa_order']) ? (int) $_POST['fa_order'] : 0; $fa_order = isset($_POST['fa_order']) ? (int) $_POST['fa_order'] : 0;
$fa_id = isset($_POST['fa_id']) ? (int) $_POST['fa_id'] : 0;
$sql_common = " fa_subject = '$fa_subject', $sql_common = " fa_subject = '$fa_subject',
fa_content = '$fa_content', fa_content = '$fa_content',
+1 -1
View File
@@ -15,7 +15,7 @@ check_admin_token();
@mkdir(G5_DATA_PATH."/faq", G5_DIR_PERMISSION); @mkdir(G5_DATA_PATH."/faq", G5_DIR_PERMISSION);
@chmod(G5_DATA_PATH."/faq", G5_DIR_PERMISSION); @chmod(G5_DATA_PATH."/faq", G5_DIR_PERMISSION);
$fm_id = isset($_REQUEST['fm_id']) ? (int) $_REQUEST['fm_id'] : 0; $fm_id = isset($_POST['fm_id']) ? (int) $_POST['fm_id'] : 0;
$fm_himg_del = isset($_POST['fm_himg_del']) ? (int) $_POST['fm_himg_del'] : 0; $fm_himg_del = isset($_POST['fm_himg_del']) ? (int) $_POST['fm_himg_del'] : 0;
$fm_timg_del = isset($_POST['fm_timg_del']) ? (int) $_POST['fm_timg_del'] : 0; $fm_timg_del = isset($_POST['fm_timg_del']) ? (int) $_POST['fm_timg_del'] : 0;
$fm_subject = isset($_POST['fm_subject']) ? strip_tags(clean_xss_attributes($_POST['fm_subject'])) : ''; $fm_subject = isset($_POST['fm_subject']) ? strip_tags(clean_xss_attributes($_POST['fm_subject'])) : '';
Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

+2 -2
View File
@@ -10,10 +10,10 @@ check_admin_token();
$post_count_chk = (isset($_POST['chk']) && is_array($_POST['chk'])) ? count($_POST['chk']) : 0; $post_count_chk = (isset($_POST['chk']) && is_array($_POST['chk'])) ? count($_POST['chk']) : 0;
if(! $post_count_chk) if(!$count)
alert('삭제할 메일목록을 1개이상 선택해 주세요.'); alert('삭제할 메일목록을 1개이상 선택해 주세요.');
for($i=0; $i<$post_count_chk; $i++) { for($i=0; $i<$count; $i++) {
$ma_id = isset($_POST['chk'][$i]) ? (int) $_POST['chk'][$i] : 0; $ma_id = isset($_POST['chk'][$i]) ? (int) $_POST['chk'][$i] : 0;
$sql = " delete from {$g5['mail_table']} where ma_id = '$ma_id' "; $sql = " delete from {$g5['mail_table']} where ma_id = '$ma_id' ";
+1 -1
View File
@@ -61,7 +61,7 @@ for ($i=0; $i<count($member_list); $i++)
$content = preg_replace("/{회원아이디}/", $mb_id, $content); $content = preg_replace("/{회원아이디}/", $mb_id, $content);
$content = preg_replace("/{이메일}/", $to_email, $content); $content = preg_replace("/{이메일}/", $to_email, $content);
$content = $content . "<hr size=0><p><span style='font-size:9pt; font-family:굴림'>▶ 더 이상 정보 수신을 원치 않으시면 [<a href='".G5_BBS_URL."/email_stop.php?mb_id={$mb_id}&amp;mb_md5={$mb_md5}' target='_blank'>수신거부</a>] 해 주십시오.</span></p>"; $content = $content . "<hr size=0><p><span style='font-size:9pt; font-familye:굴림'>▶ 더 이상 정보 수신을 원치 않으시면 [<a href='".G5_BBS_URL."/email_stop.php?mb_id={$mb_id}&amp;mb_md5={$mb_md5}' target='_blank'>수신거부</a>] 해 주십시오.</span></p>";
mailer($config['cf_admin_email_name'], $config['cf_admin_email'], $to_email, $subject, $content, 1); mailer($config['cf_admin_email_name'], $config['cf_admin_email'], $to_email, $subject, $content, 1);
-1
View File
@@ -8,7 +8,6 @@ if ($is_admin != 'super')
$g5['title'] = '메뉴 추가'; $g5['title'] = '메뉴 추가';
include_once(G5_PATH.'/head.sub.php'); include_once(G5_PATH.'/head.sub.php');
$new = isset($_GET['new']) ? clean_xss_tags($_GET['new'], 1, 1) : '';
$code = isset($_GET['code']) ? preg_replace('/[^0-9a-zA-Z]/', '', $_GET['code']) : ''; $code = isset($_GET['code']) ? preg_replace('/[^0-9a-zA-Z]/', '', $_GET['code']) : '';
// 코드 // 코드
+1 -5
View File
@@ -21,11 +21,7 @@ for ($i=0; $i<$count; $i++)
{ {
$_POST = array_map_deep('trim', $_POST); $_POST = array_map_deep('trim', $_POST);
if(preg_match('/^javascript/i', preg_replace('/[ ]{1,}|[\t]/', '', $_POST['me_link'][$i]))){ $_POST['me_link'][$i] = is_array($_POST['me_link']) ? clean_xss_tags(clean_xss_attributes($_POST['me_link'][$i], 1)) : '';
$_POST['me_link'][$i] = G5_URL;
}
$_POST['me_link'][$i] = is_array($_POST['me_link']) ? clean_xss_tags(clean_xss_attributes(preg_replace('/[ ]{2,}|[\t]/', '', $_POST['me_link'][$i]), 1)) : '';
$code = is_array($_POST['code']) ? strip_tags($_POST['code'][$i]) : ''; $code = is_array($_POST['code']) ? strip_tags($_POST['code'][$i]) : '';
$me_name = is_array($_POST['me_name']) ? strip_tags($_POST['me_name'][$i]) : ''; $me_name = is_array($_POST['me_name']) ? strip_tags($_POST['me_name'][$i]) : '';
-17
View File
@@ -11,15 +11,9 @@ $nw = array(
'nw_end_time'=>'', 'nw_end_time'=>'',
'nw_subject'=>'', 'nw_subject'=>'',
'nw_content'=>'', 'nw_content'=>'',
'nw_division'=>'',
); );
$html_title = "팝업레이어"; $html_title = "팝업레이어";
// 팝업레이어 테이블에 쇼핑몰, 커뮤니티 인지 구분하는 여부 필드 추가
$sql = " ALTER TABLE `{$g5['new_win_table']}` ADD `nw_division` VARCHAR(10) NOT NULL DEFAULT 'both' ";
sql_query($sql, false);
if ($w == "u") if ($w == "u")
{ {
$html_title .= " 수정"; $html_title .= " 수정";
@@ -60,17 +54,6 @@ include_once (G5_ADMIN_PATH.'/admin.head.php');
<col> <col>
</colgroup> </colgroup>
<tbody> <tbody>
<tr>
<th scope="row"><label for="nw_division">구분</label></th>
<td>
<?php echo help("커뮤니티에 표시될 것인지 쇼핑몰에 표시될 것인지를 설정합니다."); ?>
<select name="nw_division" id="nw_division">
<option value="both"<?php echo get_selected($nw['nw_division'], 'both', true); ?>>커뮤니티와 쇼핑몰</option>
<option value="comm"<?php echo get_selected($nw['nw_division'], 'comm'); ?>>커뮤니티</option>
<option value="shop"<?php echo get_selected($nw['nw_division'], 'shop'); ?>>쇼핑몰</option>
</select>
</td>
</tr>
<tr> <tr>
<th scope="row"><label for="nw_device">접속기기</label></th> <th scope="row"><label for="nw_device">접속기기</label></th>
<td> <td>
+1 -3
View File
@@ -2,7 +2,7 @@
$sub_menu = '100310'; $sub_menu = '100310';
include_once('./_common.php'); include_once('./_common.php');
$nw_id = isset($_REQUEST['nw_id']) ? preg_replace('/[^0-9]/', '', $_REQUEST['nw_id']) : 0; $nw_id = isset($_POST['nw_id']) ? preg_replace('/[^0-9]/', '', $_POST['nw_id']) : 0;
if ($w == "u" || $w == "d") if ($w == "u" || $w == "d")
check_demo(); check_demo();
@@ -19,7 +19,6 @@ $posts = array();
$check_keys = array( $check_keys = array(
'nw_device'=>'str', 'nw_device'=>'str',
'nw_division'=>'str',
'nw_begin_time'=>'str', 'nw_begin_time'=>'str',
'nw_end_time'=>'str', 'nw_end_time'=>'str',
'nw_disable_hours'=>'int', 'nw_disable_hours'=>'int',
@@ -42,7 +41,6 @@ foreach($check_keys as $key=>$val){
} }
$sql_common = " nw_device = '{$posts['nw_device']}', $sql_common = " nw_device = '{$posts['nw_device']}',
nw_division = '{$posts['nw_division']}',
nw_begin_time = '{$posts['nw_begin_time']}', nw_begin_time = '{$posts['nw_begin_time']}',
nw_end_time = '{$posts['nw_end_time']}', nw_end_time = '{$posts['nw_end_time']}',
nw_disable_hours = '{$posts['nw_disable_hours']}', nw_disable_hours = '{$posts['nw_disable_hours']}',
-1
View File
@@ -14,7 +14,6 @@ if(!sql_query(" DESCRIBE {$g5['new_win_table']} ", false)) {
} else { } else {
$query_cp = sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['new_win_table']}` ( $query_cp = sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['new_win_table']}` (
`nw_id` int(11) NOT NULL AUTO_INCREMENT, `nw_id` int(11) NOT NULL AUTO_INCREMENT,
`nw_division` varchar(10) NOT NULL DEFAULT 'both',
`nw_device` varchar(10) NOT NULL DEFAULT 'both', `nw_device` varchar(10) NOT NULL DEFAULT 'both',
`nw_begin_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `nw_begin_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`nw_end_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `nw_end_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+1 -9
View File
@@ -61,17 +61,9 @@ if( function_exists('filter_input_include_path') ){
$qa_include_tail = filter_input_include_path($qa_include_tail); $qa_include_tail = filter_input_include_path($qa_include_tail);
} }
// 분류에 & 나 = 는 사용이 불가하므로 2바이트로 바꾼다.
$src_char = array('&', '=');
$dst_char = array('&', '〓');
$qa_category = str_replace($src_char, $dst_char, $_POST['qa_category']);
//https://github.com/gnuboard/gnuboard5/commit/f5f4925d4eb28ba1af728e1065fc2bdd9ce1da58 에 따른 조치
$qa_category = preg_replace("/[\<\>\'\"\\\'\\\"\%\=\(\)\/\^\*]/", "", $qa_category);
$sql = " update {$g5['qa_config_table']} $sql = " update {$g5['qa_config_table']}
set qa_title = '{$_POST['qa_title']}', set qa_title = '{$_POST['qa_title']}',
qa_category = '{$qa_category}', qa_category = '{$_POST['qa_category']}',
qa_skin = '{$_POST['qa_skin']}', qa_skin = '{$_POST['qa_skin']}',
qa_mobile_skin = '{$_POST['qa_mobile_skin']}', qa_mobile_skin = '{$_POST['qa_mobile_skin']}',
qa_use_email = '{$_POST['qa_use_email']}', qa_use_email = '{$_POST['qa_use_email']}',
+15 -26
View File
@@ -9,48 +9,37 @@ include_once('./admin.head.php');
?> ?>
<div class="local_desc02 local_desc"> <div class="local_desc02 local_desc">
<p>아래의 서비스들은 영카트에서 이미 지원하는 기능으로 별도의 개발이 필요 없으며 서비스 신청후 바로 사용 할수 있습니다.</p> <p>아래의 서비스들은 그누보드에서 이미 지원하는 기능으로 별도의 개발이 필요 없으며 서비스 신청후 바로 사용 할수 있습니다.</p>
</div> </div>
<div class="service_wrap"> <div class="service_wrap">
<div class="sevice_1 svc_card"> <div class="sevice_1">
<h3>신용카드 전자결제 서비스<br><span>(계좌이체, 가상계좌 결제 포함)</span></h3> <img src="<?php echo G5_ADMIN_URL ?>/img/service_img1.jpg" alt="휴대폰 본인확인 서비스" class="svc_img">
<p>이곳을 통하여 가입하시면 신용카드 결제를 국내 최저 수수료인 3.2%에 이용 할 수 있습니다. 영카트를 사용하지 않아도 이 수수료를 적용 받을 수 있습니다. 아래 가입을 희망하시는 회사의 로고를 클릭하시면 가입페이지로 이동합니다.</p>
<ul>
<li><a href="http://sir.kr/main/service/p_pg.php" target="_blank"><img src="<?php echo G5_ADMIN_URL ?>/img/svc_btn_01.jpg" alt="KCP 신용카드 전자결제 신청하기"></a></li>
<li ><a href="http://sir.kr/main/service/lg_pg.php" target="_blank"><img src="<?php echo G5_ADMIN_URL ?>/img/svc_btn_02.jpg?v2" alt="토스페이먼츠 전자결제 신청하기"></a></li>
<li class="last"><a href="http://sir.kr/main/service/inicis_pg.php" target="_blank"><img src="<?php echo G5_ADMIN_URL ?>/img/svc_btn_06.jpg" alt="KG 이니시스 전자결제 신청하기"></a></li>
</ul>
</div>
<div class="sevice_1 svc_phone">
<h3>휴대폰 본인확인 서비스</h3> <h3>휴대폰 본인확인 서비스</h3>
<p>정보통신망법 23조 2항(주민등록번호의 사용제한)에 따라 기존 주민등록번호 기반의 인증서비스 이용이 불가합니다. 주민등록번호 대체수단으로 최소한의 정보(생년월일, 휴대폰번호, 성별)를 입력받아 본인임을 확인하는 인증수단 입니다</p> <p>정보통신망법 23조 2항(주민등록번호의 사용제한)에 따라 기존 주민등록번호 기반의 인증서비스 이용이 불가합니다. 주민등록번호 대체수단으로 최소한의 정보(생년월일, 휴대폰번호, 성별)를 입력받아 본인임을 확인하는 인증수단 입니다</p>
<ul> <ul>
<li><a href="http://sir.kr/main/service/p_cert.php" target="_blank"><img src="<?php echo G5_ADMIN_URL ?>/img/svc_btn_01.jpg" alt="KCP 휴대폰 본인확인 신청하기"></a></li> <li><a href="http://sir.kr/main/service/p_cert.php" target="_blank"><img src="<?php echo G5_ADMIN_URL ?>/img/svc_btn_01.jpg" alt="KCP 휴대폰 본인확인 신청하기"></a></li>
<li><a href="http://sir.kr/main/service/lg_cert.php" target="_blank"><img src="<?php echo G5_ADMIN_URL ?>/img/svc_btn_02.jpg?v2" alt="유플러스 휴대폰 본인확인 신청하기"></a></li> <li><a href="http://sir.kr/main/service/lg_cert.php" target="_blank"><img src="<?php echo G5_ADMIN_URL ?>/img/svc_btn_02.jpg" alt="LG유플러스 휴대폰대체인증 신청하기"></a></li>
<li class="last"><a href="http://sir.kr/main/service/b_cert.php" target="_blank"><img src="<?php echo G5_ADMIN_URL ?>/img/svc_btn_03.jpg" alt="오케이네임 휴대폰대체인증 신청하기"></a></li> <li class="last"><a href="http://sir.kr/main/service/b_cert.php" target="_blank"><img src="<?php echo G5_ADMIN_URL ?>/img/svc_btn_03.jpg" alt="OKname 휴대폰 본인확인 신청하기"></a></li>
</ul> </ul>
</div> </div>
<div class="sevice_1 svc_ipin"> <div class="sevice_1">
<img src="<?php echo G5_ADMIN_URL ?>/img/service_img2.jpg" alt="아이핀 본인확인 서비스" class="svc_img">
<h3>아이핀 본인확인 서비스</h3> <h3>아이핀 본인확인 서비스</h3>
<p>정부가 주관하는 주민등록번호 대체 수단으로 본인의 개인정보를 아이핀 사이트에 한번만 발급해 놓고, 이후부터는 아이디와 패스워드 만으로 본인임을 확인하는 인증수단 입니다. </p> <p>정부가 주관하는 주민등록번호 대체 수단으로 본인의 개인정보를 아이핀 사이트에 한번만 발급해 놓고, 이후부터는 아이디와 패스워드 만으로
본인임을 확인하는 인증수단 입니다.</p>
<h4><a href="http://sir.kr/main/service/b_ipin.php" target="_blank"><img src="<?php echo G5_ADMIN_URL ?>/img/svc_btn_04.jpg" alt="오케이네임 아이핀 본인확인 신청하기"></a></h4>
<h4><a href="http://sir.kr/main/service/b_ipin.php" target="_blank"><img src="<?php echo G5_ADMIN_URL ?>/img/svc_btn_04.jpg" alt="OKname 아이핀 본인확인 신청하기"></a></h4>
</div> </div>
<div class="sevice_2">
<div class="svc_sms">
<div class="service_2">
<div class="svc_ri svc_sms">
<div class="svc_a"> <div class="svc_a">
<h3>SMS 문자 서비스</h3> <h3>SMS 문자 서비스</h3>
<p>주문이나 배송시에 상점운영자 또는 고객에게 휴대폰으로 단문메세지 (최대 한글 40자, 영문 80자)를 발송합니다.</p> <p>사이트 관리자 또는 회원이 다른 회원의 <br>휴대폰으로 단문메세지(최대 한글 40자, 영문 80자)를 발송할 수 있습니다.</p>
</div> </div>
<div class="svc_btn2"><a href="http://icodekorea.com/res/join_company_fix_a.php?sellid=sir2" target="_blank"><img src="<?php echo G5_ADMIN_URL ?>/img/svc_btn_05.jpg" alt="아이코드 SMS 서비스 신청하기"></a></div> <div class="svc_btn"><a href="http://icodekorea.com/res/join_company_fix_a.php?sellid=sir2" target="_blank"><img src="<?php echo G5_ADMIN_URL ?>/img/svc_btn_05.jpg" alt="아이코드 SMS 서비스 신청하기"></a></div>
</div> </div>
</div> </div>
</div> </div>
-12
View File
@@ -1,12 +0,0 @@
<?php
define('G5_IS_ADMIN', true);
define('G5_IS_SHOP_ADMIN_PAGE', true);
include_once ('../../common.php');
if (!defined('G5_USE_SHOP') || !G5_USE_SHOP)
die('<p>쇼핑몰 설치 후 이용해 주십시오.</p>');
include_once(G5_ADMIN_PATH.'/admin.lib.php');
include_once('./admin.shop.lib.php');
check_order_inicis_tmps();
-221
View File
@@ -1,221 +0,0 @@
<?php
if (!defined('_GNUBOARD_')) exit;
// 상품옵션별재고 또는 상품재고에 더하기
function add_io_stock($it_id, $ct_qty, $io_id="", $io_type=0)
{
global $g5;
if($io_id) {
$sql = " update {$g5['g5_shop_item_option_table']}
set io_stock_qty = io_stock_qty + '{$ct_qty}'
where it_id = '{$it_id}'
and io_id = '{$io_id}'
and io_type = '{$io_type}' ";
} else {
$sql = " update {$g5['g5_shop_item_table']}
set it_stock_qty = it_stock_qty + '{$ct_qty}'
where it_id = '{$it_id}' ";
}
return sql_query($sql);
}
// 상품옵션별재고 또는 상품재고에서 빼기
function subtract_io_stock($it_id, $ct_qty, $io_id="", $io_type=0)
{
global $g5;
if($io_id) {
$sql = " update {$g5['g5_shop_item_option_table']}
set io_stock_qty = io_stock_qty - '{$ct_qty}'
where it_id = '{$it_id}'
and io_id = '{$io_id}'
and io_type = '{$io_type}' ";
} else {
$sql = " update {$g5['g5_shop_item_table']}
set it_stock_qty = it_stock_qty - '{$ct_qty}'
where it_id = '{$it_id}' ";
}
return sql_query($sql);
}
// 주문과 장바구니의 상태를 변경한다.
function change_status($od_id, $current_status, $change_status)
{
global $g5;
$sql = " update {$g5['g5_shop_order_table']} set od_status = '{$change_status}' where od_id = '{$od_id}' and od_status = '{$current_status}' ";
sql_query($sql, true);
$sql = " update {$g5['g5_shop_cart_table']} set ct_status = '{$change_status}' where od_id = '{$od_id}' and ct_status = '{$current_status}' ";
sql_query($sql, true);
}
// 주문서에 입금시 update
function order_update_receipt($od_id)
{
global $g5;
$sql = " update {$g5['g5_shop_order_table']} set od_receipt_price = od_misu, od_misu = 0, od_receipt_time = '".G5_TIME_YMDHIS."' where od_id = '$od_id' and od_status = '입금' ";
return sql_query($sql);
}
// 주문서에 배송시 update
function order_update_delivery($od_id, $mb_id, $change_status, $delivery)
{
global $g5;
if($change_status != '배송')
return;
$sql = " update {$g5['g5_shop_order_table']} set od_delivery_company = '{$delivery['delivery_company']}', od_invoice = '{$delivery['invoice']}', od_invoice_time = '{$delivery['invoice_time']}' where od_id = '$od_id' and od_status = '준비' ";
sql_query($sql);
$sql = " select * from {$g5['g5_shop_cart_table']} where od_id = '$od_id' ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
{
// 재고를 사용하지 않았다면
$stock_use = $row['ct_stock_use'];
if(!$row['ct_stock_use'])
{
// 재고에서 뺀다.
subtract_io_stock($row['it_id'], $row['ct_qty'], $row['io_id'], $row['io_type']);
$stock_use = 1;
$sql = " update {$g5['g5_shop_cart_table']} set ct_stock_use = '$stock_use' where ct_id = '{$row['ct_id']}' ";
sql_query($sql);
}
}
}
// 처리내용 SMS
function conv_sms_contents($od_id, $contents)
{
global $g5, $config, $default;
$sms_contents = '';
if ($od_id && $config['cf_sms_use'] == 'icode')
{
$sql = " select od_id, od_name, od_invoice, od_receipt_price, od_delivery_company
from {$g5['g5_shop_order_table']} where od_id = '$od_id' ";
$od = sql_fetch($sql);
$sms_contents = $contents;
$sms_contents = str_replace("{이름}", $od['od_name'], $sms_contents);
$sms_contents = str_replace("{입금액}", number_format($od['od_receipt_price']), $sms_contents);
$sms_contents = str_replace("{택배회사}", $od['od_delivery_company'], $sms_contents);
$sms_contents = str_replace("{운송장번호}", $od['od_invoice'], $sms_contents);
$sms_contents = str_replace("{주문번호}", $od['od_id'], $sms_contents);
$sms_contents = str_replace("{회사명}", $default['de_admin_company_name'], $sms_contents);
}
return stripslashes($sms_contents);
}
function pg_setting_check($is_print=false){
global $g5, $config, $default, $member;
$msg = '';
$pg_msg = '';
if( $default['de_card_test'] ){
if( $default['de_pg_service'] === 'kcp' && $default['de_kcp_mid'] && $default['de_kcp_site_key'] ){
$pg_msg = 'NHN KCP';
} else if ( $default['de_pg_service'] === 'lg' && $config['cf_lg_mid'] && $config['cf_lg_mert_key'] ){
$pg_msg = 'LG유플러스';
} else if ( $default['de_pg_service'] === 'inicis' && $default['de_inicis_mid'] && $default['de_inicis_sign_key'] ){
$pg_msg = 'KG이니시스';
}
}
if( function_exists('is_use_easypay') && is_use_easypay('global_nhnkcp') ){
if(!extension_loaded('soap') || !class_exists('SOAPClient')) {
$msg .= '<script>'.PHP_EOL;
$msg .= 'alert("PHP SOAP 확장모듈이 설치되어 있지 않습니다.\n모바일 쇼핑몰 결제 때 사용되오니 SOAP 확장 모듈을 설치하여 주십시오.\nNHN_KCP (네이버페이) 모바일결제가 되지 않습니다.");'.PHP_EOL;
$msg .= '</script>'.PHP_EOL;
}
}
if( $pg_msg ){
$pg_test_conf_link = G5_ADMIN_URL.'/shop_admin/configform.php#de_card_test1';
$msg .= '<div class="admin_pg_notice od_test_caution">(주의!) '.$pg_msg.' 결제의 결제 설정이 현재 테스트결제 로 되어 있습니다.<br>테스트결제시 실제 결제가 되지 않으므로, 쇼핑몰 운영중이면 반드시 실결제로 설정하여 운영하셔야 합니다.<br>아래 링크를 클릭하여 실결제로 설정하여 운영해 주세요.<br><a href="'.$pg_test_conf_link.'" class="pg_test_conf_link">'.$pg_test_conf_link.'</a></div>';
}
if( $is_print ){
echo $msg;
} else{
return $msg;
}
}
function check_order_inicis_tmps(){
global $g5, $config, $default, $member;
$admin_cookie_time = get_cookie('admin_visit_time');
if( ! $admin_cookie_time ){
if( $default['de_pg_service'] === 'inicis' && empty($default['de_card_test']) ){
$sql = " select * from {$g5['g5_shop_inicis_log_table']} where P_TID <> '' and P_TYPE in ('CARD', 'ISP', 'BANK') and P_MID <> '' and P_STATUS = '00' and is_mail_send = 0 and substr(P_AUTH_DT, 1, 14) < '".date('YmdHis', strtotime('-3 minutes', G5_SERVER_TIME))."' ";
$result = sql_query($sql, false);
if( !$result ){
return;
}
$mail_msg = '';
for($i=0;$row=sql_fetch_array($result);$i++){
$oid = $row['oid'];
$p_tid = $row['P_TID'];
$p_mid = strtolower($tmps['P_MID']);
if( in_array($p_mid, array('iniescrow0', 'inipaytest')) ) continue;
$sql = "update {$g5['g5_shop_inicis_log_table']} set is_mail_send = 1 where oid = '".$oid."' and P_TID = '".$p_tid."' ";
sql_query($sql);
$sql = " select od_id from {$g5['g5_shop_order_table']} where od_id = '$oid' and od_tno = '$p_tid' ";
$tmp = sql_fetch($sql);
if( $tmp['od_id'] ) continue;
$sql = " select pp_id from {$g5['g5_shop_personalpay_table']} where pp_id = '$oid' and pp_tno = '$p_tid' ";
$tmp = sql_fetch($sql);
if( $tmp['pp_id'] ) continue;
$mail_msg .= '<a href="'.G5_ADMIN_URL.'/shop_admin/inorderform.php?od_id='.$oid.'" target="_blank" >미완료 발생 주문번호 : '.$oid.'</a><br><br>';
}
if( $mail_msg ){
include_once(G5_LIB_PATH.'/mailer.lib.php');
$mails = array_unique(array($member['mb_email'], $config['cf_admin_email']));
foreach($mails as $mail_address){
if (!preg_match("/([0-9a-zA-Z_-]+)@([0-9a-zA-Z_-]+)\.([0-9a-zA-Z_-]+)/", $mail_address)) continue;
mailer($member['mb_nick'], $member['mb_email'], $mail_address, $config['cf_title'].' 사이트 미완료 주문 알림', '이니시스를 통해 결제한 주문건 중에서 미완료 주문이 발생했습니다.<br><br>발생된 원인으로는 장바구니 금액와 실결제 금액이 맞지 않는 경우, 네트워크 오류, 프로그램 오류, 알수 없는 오류 등이 있습니다.<br><br>아래 내용과 실제 주문내역, 이니시스 상점 관리자 에서 결제된 내용을 확인하여 조치를 취해 주세요.<br><br>'.$mail_msg, 0);
}
}
}
if( $default['de_pg_service'] == 'lg' && function_exists('check_log_folder') ){
check_log_folder(G5_LGXPAY_PATH.'/lgdacom/log');
}
set_cookie('admin_visit_time', G5_SERVER_TIME, 3600); //1시간 간격으로 체크
}
} //end function check_order_inicis_tmps;
-16
View File
@@ -1,16 +0,0 @@
<?php
include_once('./_common.php');
$ca_id = isset($_POST['ca_id']) ? trim($_POST['ca_id']) : '';
if (preg_match("/[^0-9a-z]/i", $ca_id)) {
die("{\"error\":\"분류코드는 영문자 숫자 만 입력 가능합니다.\"}");
}
$sql = " select ca_name from {$g5['g5_shop_category_table']} where ca_id = '{$ca_id}' ";
$row = sql_fetch($sql);
if (isset($row['ca_name']) && $row['ca_name']) {
$ca_name = addslashes($row['ca_name']);
die("{\"error\":\"이미 등록된 분류코드 입니다.\\n\\n분류명 : {$ca_name}\"}");
}
die("{\"error\":\"\"}"); // 정상;
-15
View File
@@ -1,15 +0,0 @@
<?php
include_once('./_common.php');
$it_id = isset($_POST['it_id']) ? trim($_POST['it_id']) : '';
if (preg_match("/[^\w\-]/", $it_id)) { // \w : 0-9 A-Z a-z _
die("{\"error\":\"상품코드는 영문자 숫자 _ - 만 입력 가능합니다.\"}");
}
$row = get_shop_item($it_id, true);
if (isset($row['it_name']) && $row['it_name']) {
$it_name = addslashes($row['it_name']);
die("{\"error\":\"이미 등록된 상품코드 입니다.\\n\\n상품명 : {$it_name}\"}");
}
die("{\"error\":\"\"}"); // 정상;
-134
View File
@@ -1,134 +0,0 @@
<?php
$sub_menu = '400400';
include_once('./_common.php');
auth_check_menu($auth, $sub_menu, "r");
$od_id = isset($_POST['od_id']) ? safe_replace_regex($_POST['od_id'], 'od_id') : 0;
$sql = " select * from {$g5['g5_shop_order_table']} where od_id = '$od_id' ";
$od = sql_fetch($sql);
if(! ($od['od_id'] && $od['od_id']))
die('<div>주문정보가 존재하지 않습니다.</div>');
// 상품목록
$sql = " select it_id,
it_name,
cp_price,
ct_notax,
ct_send_cost,
it_sc_type
from {$g5['g5_shop_cart_table']}
where od_id = '$od_id'
group by it_id
order by ct_id ";
$result = sql_query($sql);
?>
<section id="cart_list">
<h2 class="h2_frm">주문상품 목록</h2>
<div class="tbl_head01 tbl_wrap">
<table>
<caption>주문 상품 목록</caption>
<thead>
<tr>
<th scope="col">상품명</th>
<th scope="col">옵션항목</th>
<th scope="col">상태</th>
<th scope="col">수량</th>
<th scope="col">판매가</th>
<th scope="col">소계</th>
<th scope="col">쿠폰</th>
<th scope="col">포인트</th>
<th scope="col">배송비</th>
</tr>
</thead>
<tbody>
<?php
for($i=0; $row=sql_fetch_array($result); $i++) {
// 상품이미지
$image = get_it_image($row['it_id'], 50, 50);
// 상품의 옵션정보
$sql = " select ct_id, it_id, ct_price, ct_qty, ct_option, ct_status, cp_price, ct_send_cost, io_type, io_price
from {$g5['g5_shop_cart_table']}
where od_id = '$od_id'
and it_id = '{$row['it_id']}'
order by io_type asc, ct_id asc ";
$res = sql_query($sql);
$rowspan = sql_num_rows($res);
// 배송비
switch($row['ct_send_cost'])
{
case 1:
$ct_send_cost = '착불';
break;
case 2:
$ct_send_cost = '무료';
break;
default:
$ct_send_cost = '선불';
break;
}
// 조건부무료
if($row['it_sc_type'] == 2) {
// 합계금액 계산
$sql = " select SUM(IF(io_type = 1, (io_price * ct_qty), ((ct_price + io_price) * ct_qty))) as price,
SUM(ct_qty) as qty
from {$g5['g5_shop_cart_table']}
where it_id = '{$row['it_id']}'
and od_id = '$od_id' ";
$sum = sql_fetch($sql);
$sendcost = get_item_sendcost($row['it_id'], $sum['price'], $sum['qty'], $od_id);
if($sendcost == 0)
$ct_send_cost = '무료';
$save_it_id = $row['it_id'];
}
for($k=0; $opt=sql_fetch_array($res); $k++) {
if($opt['io_type'])
$opt_price = $opt['io_price'];
else
$opt_price = $opt['ct_price'] + $opt['io_price'];
// 소계
$opt['ct_point'] = isset($opt['ct_point']) ? (int) $opt['ct_point'] : 0;
$ct_price['stotal'] = $opt_price * $opt['ct_qty'];
$ct_point['stotal'] = $opt['ct_point'] * $opt['ct_qty'];
?>
<tr>
<?php if($k == 0) { ?>
<td class="td_itname" rowspan="<?php echo $rowspan; ?>">
<a href="./itemform.php?w=u&amp;it_id=<?php echo $row['it_id']; ?>"><?php echo $image; ?> <?php echo stripslashes($row['it_name']); ?></a>
<?php if($od['od_tax_flag'] && $row['ct_notax']) echo '[비과세상품]'; ?>
</td>
<?php } ?>
<td class="td_itopt_tl">
<?php echo $opt['ct_option']; ?>
</td>
<td class="td_mngsmall"><?php echo $opt['ct_status']; ?></td>
<td class="td_cntsmall"><?php echo $opt['ct_qty']; ?></td>
<td class="td_num"><?php echo number_format($opt_price); ?></td>
<td class="td_num"><?php echo number_format($ct_price['stotal']); ?></td>
<td class="td_num"><?php echo number_format($opt['cp_price']); ?></td>
<td class="td_num"><?php echo number_format($ct_point['stotal']); ?></td>
<td class="td_sendcost_by"><?php echo $ct_send_cost; ?></td>
</tr>
<?php
}
?>
<?php
}
?>
</tbody>
</table>
</div>
</section>
-18
View File
@@ -1,18 +0,0 @@
<?php
include_once('./_common.php');
$type = isset($_REQUEST['type']) ? clean_xss_tags($_REQUEST['type'], 1, 1) : '';
if($type === 'mobile') {
if(preg_match('#^theme/(.+)$#', $dir, $match))
$skin_dir = G5_THEME_MOBILE_PATH.'/'.G5_SKIN_DIR.'/shop/'.$match[1];
else
$skin_dir = G5_MOBILE_PATH.'/'.G5_SKIN_DIR.'/shop/'.$dir;
} else {
if(preg_match('#^theme/(.+)$#', $dir, $match))
$skin_dir = G5_THEME_PATH.'/'.G5_SKIN_DIR.'/shop/'.$match[1];
else
$skin_dir = G5_PATH.'/'.G5_SKIN_DIR.'/shop/'.$dir;
}
echo get_list_skin_options("^list.[0-9]+\.skin\.php", $skin_dir, $sval);
-174
View File
@@ -1,174 +0,0 @@
<?php
$sub_menu = '500500';
include_once('./_common.php');
auth_check_menu($auth, $sub_menu, "w");
$bn_id = isset($_REQUEST['bn_id']) ? preg_replace('/[^0-9]/', '', $_REQUEST['bn_id']) : 0;
$bn = array(
'bn_id'=>0,
'bn_alt'=>'',
'bn_device'=>'',
'bn_position'=>'',
'bn_border'=>'',
'bn_new_win'=>'',
'bn_order'=>''
);
$html_title = '배너';
$g5['title'] = $html_title.'관리';
if ($w=="u")
{
$html_title .= ' 수정';
$sql = " select * from {$g5['g5_shop_banner_table']} where bn_id = '$bn_id' ";
$bn = sql_fetch($sql);
}
else
{
$html_title .= ' 입력';
$bn['bn_url'] = "http://";
$bn['bn_begin_time'] = date("Y-m-d 00:00:00", time());
$bn['bn_end_time'] = date("Y-m-d 00:00:00", time()+(60*60*24*31));
}
// 접속기기 필드 추가
if(!sql_query(" select bn_device from {$g5['g5_shop_banner_table']} limit 0, 1 ")) {
sql_query(" ALTER TABLE `{$g5['g5_shop_banner_table']}`
ADD `bn_device` varchar(10) not null default '' AFTER `bn_url` ", true);
sql_query(" update {$g5['g5_shop_banner_table']} set bn_device = 'pc' ", true);
}
include_once (G5_ADMIN_PATH.'/admin.head.php');
?>
<form name="fbanner" action="./bannerformupdate.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="w" value="<?php echo $w; ?>">
<input type="hidden" name="bn_id" value="<?php echo $bn_id; ?>">
<div class="tbl_frm01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?></caption>
<colgroup>
<col class="grid_4">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row">이미지</th>
<td>
<input type="file" name="bn_bimg">
<?php
$bimg_str = "";
$bimg = G5_DATA_PATH."/banner/{$bn['bn_id']}";
if (file_exists($bimg) && $bn['bn_id']) {
$size = @getimagesize($bimg);
if($size[0] && $size[0] > 750)
$width = 750;
else
$width = $size[0];
echo '<input type="checkbox" name="bn_bimg_del" value="1" id="bn_bimg_del"> <label for="bn_bimg_del">삭제</label>';
$bimg_str = '<img src="'.G5_DATA_URL.'/banner/'.$bn['bn_id'].'" width="'.$width.'">';
}
if ($bimg_str) {
echo '<div class="banner_or_img">';
echo $bimg_str;
echo '</div>';
}
?>
</td>
</tr>
<tr>
<th scope="row"><label for="bn_alt">이미지 설명</label></th>
<td>
<?php echo help("img 태그의 alt, title 에 해당되는 내용입니다.\n배너에 마우스를 오버하면 이미지의 설명이 나옵니다."); ?>
<input type="text" name="bn_alt" value="<?php echo get_text($bn['bn_alt']); ?>" id="bn_alt" class="frm_input" size="80">
</td>
</tr>
<tr>
<th scope="row"><label for="bn_url">링크</label></th>
<td>
<?php echo help("배너클릭시 이동하는 주소입니다."); ?>
<input type="text" name="bn_url" size="80" value="<?php echo get_sanitize_input($bn['bn_url']); ?>" id="bn_url" class="frm_input">
</td>
</tr>
<tr>
<th scope="row"><label for="bn_device">접속기기</label></th>
<td>
<?php echo help('배너를 표시할 접속기기를 선택합니다.'); ?>
<select name="bn_device" id="bn_device">
<option value="both"<?php echo get_selected($bn['bn_device'], 'both', true); ?>>PC와 모바일</option>
<option value="pc"<?php echo get_selected($bn['bn_device'], 'pc'); ?>>PC</option>
<option value="mobile"<?php echo get_selected($bn['bn_device'], 'mobile'); ?>>모바일</option>
</select>
</td>
</tr>
<tr>
<th scope="row"><label for="bn_position">출력위치</label></th>
<td>
<?php echo help("왼쪽 : 쇼핑몰화면 왼쪽에 출력합니다.\n메인 : 쇼핑몰 메인화면(index.php)에만 출력합니다."); ?>
<select name="bn_position" id="bn_position">
<option value="왼쪽" <?php echo get_selected($bn['bn_position'], '왼쪽'); ?>>왼쪽</option>
<option value="메인" <?php echo get_selected($bn['bn_position'], '메인'); ?>>메인</option>
</select>
</td>
</tr>
<tr>
<th scope="row"><label for="bn_border">테두리</label></th>
<td>
<?php echo help("배너이미지에 테두리를 넣을지를 설정합니다.", 50); ?>
<select name="bn_border" id="bn_border">
<option value="0" <?php echo get_selected($bn['bn_border'], 0); ?>>사용안함</option>
<option value="1" <?php echo get_selected($bn['bn_border'], 1); ?>>사용</option>
</select>
</td>
</tr>
<tr>
<th scope="row"><label for="bn_new_win">새창</label></th>
<td>
<?php echo help("배너클릭시 새창을 띄울지를 설정합니다.", 50); ?>
<select name="bn_new_win" id="bn_new_win">
<option value="0" <?php echo get_selected($bn['bn_new_win'], 0); ?>>사용안함</option>
<option value="1" <?php echo get_selected($bn['bn_new_win'], 1); ?>>사용</option>
</select>
</td>
</tr>
<tr>
<th scope="row"><label for="bn_begin_time">시작일시</label></th>
<td>
<?php echo help("배너 게시 시작일시를 설정합니다."); ?>
<input type="text" name="bn_begin_time" value="<?php echo $bn['bn_begin_time']; ?>" id="bn_begin_time" class="frm_input" size="21" maxlength="19">
<input type="checkbox" name="bn_begin_chk" value="<?php echo date("Y-m-d 00:00:00", time()); ?>" id="bn_begin_chk" onclick="if (this.checked == true) this.form.bn_begin_time.value=this.form.bn_begin_chk.value; else this.form.bn_begin_time.value = this.form.bn_begin_time.defaultValue;">
<label for="bn_begin_chk">오늘</label>
</td>
</tr>
<tr>
<th scope="row"><label for="bn_end_time">종료일시</label></th>
<td>
<?php echo help("배너 게시 종료일시를 설정합니다."); ?>
<input type="text" name="bn_end_time" value="<?php echo $bn['bn_end_time']; ?>" id="bn_end_time" class="frm_input" size=21 maxlength=19>
<input type="checkbox" name="bn_end_chk" value="<?php echo date("Y-m-d 23:59:59", time()+60*60*24*31); ?>" id="bn_end_chk" onclick="if (this.checked == true) this.form.bn_end_time.value=this.form.bn_end_chk.value; else this.form.bn_end_time.value = this.form.bn_end_time.defaultValue;">
<label for="bn_end_chk">오늘+31일</label>
</td>
</tr>
<tr>
<th scope="row"><label for="bn_order">출력 순서</label></th>
<td>
<?php echo help("배너를 출력할 때 순서를 정합니다. 숫자가 작을수록 먼저 출력됩니다."); ?>
<?php echo order_select("bn_order", $bn['bn_order']); ?>
</td>
</tr>
</tbody>
</table>
</div>
<div class="btn_fixed_top">
<a href="./bannerlist.php" class="btn_02 btn">목록</a>
<input type="submit" value="확인" class="btn_submit btn" accesskey="s">
</div>
</form>
<?php
include_once (G5_ADMIN_PATH.'/admin.tail.php');
-102
View File
@@ -1,102 +0,0 @@
<?php
$sub_menu = '500500';
include_once('./_common.php');
check_demo();
$w = isset($_REQUEST['w']) ? $_REQUEST['w'] : '';
if ($w == 'd')
auth_check_menu($auth, $sub_menu, "d");
else
auth_check_menu($auth, $sub_menu, "w");
check_admin_token();
@mkdir(G5_DATA_PATH."/banner", G5_DIR_PERMISSION);
@chmod(G5_DATA_PATH."/banner", G5_DIR_PERMISSION);
$bn_bimg = isset($_FILES['bn_bimg']['tmp_name']) ? $_FILES['bn_bimg']['tmp_name'] : '';
$bn_bimg_name = isset($_FILES['bn_bimg']['name']) ? $_FILES['bn_bimg']['name'] : '';
$bn_id = isset($_REQUEST['bn_id']) ? preg_replace('/[^0-9]/', '', $_REQUEST['bn_id']) : 0;
$bn_bimg_del = (isset($_POST['bn_bimg_del']) && $_POST['bn_bimg_del']) ? preg_replace('/[^0-9]/', '', $_POST['bn_id']) : 0;
$bn_url = isset($_POST['bn_url']) ? strip_tags(clean_xss_attributes($bn_url)) : '';
$bn_alt = isset($_POST['bn_alt']) ? strip_tags(clean_xss_attributes($bn_alt)) : '';
$bn_device = isset($_POST['bn_device']) ? clean_xss_tags($_POST['bn_device'], 1, 1) : '';
$bn_position = isset($_POST['bn_position']) ? clean_xss_tags($_POST['bn_position'], 1, 1) : '';
$bn_border = isset($_POST['bn_border']) ? (int) $_POST['bn_border'] : 0;
$bn_new_win = isset($_POST['bn_new_win']) ? (int) $_POST['bn_new_win'] : 0;
$bn_begin_time = isset($_POST['bn_begin_time']) ? clean_xss_tags($_POST['bn_begin_time'], 1, 1) : '';
$bn_end_time = isset($_POST['bn_end_time']) ? clean_xss_tags($_POST['bn_end_time'], 1, 1) : '';
$bn_order = isset($_POST['bn_order']) ? (int) $_POST['bn_order'] : 0;
if ($bn_bimg_del) @unlink(G5_DATA_PATH."/banner/$bn_id");
//파일이 이미지인지 체크합니다.
if( $bn_bimg || $bn_bimg_name ){
if( !preg_match('/\.(gif|jpe?g|bmp|png)$/i', $bn_bimg_name) ){
alert("이미지 파일만 업로드 할수 있습니다.");
}
$timg = @getimagesize($bn_bimg);
if ($timg['2'] < 1 || $timg['2'] > 16){
alert("이미지 파일만 업로드 할수 있습니다.");
}
}
if ($w=="")
{
if (!$bn_bimg_name) alert('배너 이미지를 업로드 하세요.');
sql_query(" alter table {$g5['g5_shop_banner_table']} auto_increment=1 ");
$sql = " insert into {$g5['g5_shop_banner_table']}
set bn_alt = '$bn_alt',
bn_url = '$bn_url',
bn_device = '$bn_device',
bn_position = '$bn_position',
bn_border = '$bn_border',
bn_new_win = '$bn_new_win',
bn_begin_time = '$bn_begin_time',
bn_end_time = '$bn_end_time',
bn_time = '".G5_TIME_YMDHIS."',
bn_hit = '0',
bn_order = '$bn_order' ";
sql_query($sql);
$bn_id = sql_insert_id();
}
else if ($w=="u")
{
$sql = " update {$g5['g5_shop_banner_table']}
set bn_alt = '$bn_alt',
bn_url = '$bn_url',
bn_device = '$bn_device',
bn_position = '$bn_position',
bn_border = '$bn_border',
bn_new_win = '$bn_new_win',
bn_begin_time = '$bn_begin_time',
bn_end_time = '$bn_end_time',
bn_time = '".G5_TIME_YMDHIS."',
bn_order = '$bn_order'
where bn_id = '$bn_id' ";
sql_query($sql);
}
else if ($w=="d")
{
@unlink(G5_DATA_PATH."/banner/$bn_id");
$sql = " delete from {$g5['g5_shop_banner_table']} where bn_id = $bn_id ";
$result = sql_query($sql);
}
if ($w == "" || $w == "u")
{
if ($_FILES['bn_bimg']['name']) upload_file($_FILES['bn_bimg']['tmp_name'], $bn_id, G5_DATA_PATH."/banner");
goto_url("./bannerform.php?w=u&amp;bn_id=$bn_id");
} else {
goto_url("./bannerlist.php");
}
-187
View File
@@ -1,187 +0,0 @@
<?php
$sub_menu = '500500';
include_once('./_common.php');
auth_check_menu($auth, $sub_menu, "r");
$bn_position = (isset($_GET['bn_position']) && in_array($_GET['bn_position'], array('메인', '왼쪽'))) ? $_GET['bn_position'] : '';
$bn_device = (isset($_GET['bn_device']) && in_array($_GET['bn_device'], array('pc', 'mobile'))) ? $_GET['bn_device'] : 'both';
$bn_time = (isset($_GET['bn_time']) && in_array($_GET['bn_time'], array('ing', 'end'))) ? $_GET['bn_time'] : '';
$where = ' where ';
$sql_search = '';
if ( $bn_position ){
$sql_search .= " $where bn_position = '$bn_position' ";
$where = ' and ';
$qstr .= "&amp;bn_position=$bn_position";
}
if ( $bn_device && $bn_device !== 'both' ){
$sql_search .= " $where bn_device = '$bn_device' ";
$where = ' and ';
$qstr .= "&amp;bn_device=$bn_device";
}
if ( $bn_time ){
$sql_search .= ($bn_time === 'ing') ? " $where '".G5_TIME_YMDHIS."' between bn_begin_time and bn_end_time " : " $where bn_end_time < '".G5_TIME_YMDHIS."' ";
$where = ' and ';
$qstr .= "&amp;bn_time=$bn_time";
}
$g5['title'] = '배너관리';
include_once (G5_ADMIN_PATH.'/admin.head.php');
$sql_common = " from {$g5['g5_shop_banner_table']} ";
$sql_common .= $sql_search;
// 테이블의 전체 레코드수만 얻음
$sql = " select count(*) as cnt " . $sql_common;
$row = sql_fetch($sql);
$total_count = $row['cnt'];
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
?>
<div class="local_ov01 local_ov">
<span class="btn_ov01"><span class="ov_txt"> <?php echo ($sql_search) ? '검색' : '등록'; ?>된 배너 </span><span class="ov_num"> <?php echo $total_count; ?>개</span></span>
<form name="flist" class="local_sch01 local_sch">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<label for="bn_position" class="sound_only">검색</label>
<select name="bn_position" id="bn_position">
<option value=""<?php echo get_selected($bn_position, '', true); ?>>위치 전체</option>
<option value="메인"<?php echo get_selected($bn_position, '메인', true); ?>>메인</option>
<option value="왼쪽"<?php echo get_selected($bn_position, '왼쪽', true); ?>>왼쪽</option>
</select>
<select name="bn_device" id="bn_device">
<option value="both"<?php echo get_selected($bn_device, 'both', true); ?>>PC와 모바일</option>
<option value="pc"<?php echo get_selected($bn_device, 'pc'); ?>>PC</option>
<option value="mobile"<?php echo get_selected($bn_device, 'mobile'); ?>>모바일</option>
</select>
<select name="bn_time" id="bn_time">
<option value=""<?php echo get_selected($bn_time, '', true); ?>>배너 시간 전체</option>
<option value="ing"<?php echo get_selected($bn_time, 'ing'); ?>>진행중인 배너</option>
<option value="end"<?php echo get_selected($bn_time, 'end'); ?>>종료된 배너</option>
</select>
<input type="submit" value="검색" class="btn_submit">
</form>
</div>
<div class="btn_fixed_top">
<a href="./bannerform.php" class="btn_01 btn">배너추가</a>
</div>
<div class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?> 목록</caption>
<thead>
<tr>
<th scope="col" rowspan="2" id="th_id">ID</th>
<th scope="col" id="th_dvc">접속기기</th>
<th scope="col" id="th_loc">위치</th>
<th scope="col" id="th_st">시작일시</th>
<th scope="col" id="th_end">종료일시</th>
<th scope="col" id="th_odr">출력순서</th>
<th scope="col" id="th_hit">조회</th>
<th scope="col" id="th_mng">관리</th>
</tr>
<tr>
<th scope="col" colspan="7" id="th_img">이미지</th>
</tr>
</thead>
<tbody>
<?php
$sql = " select * from {$g5['g5_shop_banner_table']} $sql_search
order by bn_order, bn_id desc
limit $from_record, $rows ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++) {
// 테두리 있는지
$bn_border = $row['bn_border'];
// 새창 띄우기인지
$bn_new_win = ($row['bn_new_win']) ? 'target="_blank"' : '';
$bimg = G5_DATA_PATH.'/banner/'.$row['bn_id'];
if(file_exists($bimg)) {
$size = @getimagesize($bimg);
if($size[0] && $size[0] > 800)
$width = 800;
else
$width = $size[0];
$bn_img = "";
$bn_img .= '<img src="'.G5_DATA_URL.'/banner/'.$row['bn_id'].'?'.preg_replace('/[^0-9]/i', '', $row['bn_time']).'" width="'.$width.'" alt="'.get_text($row['bn_alt']).'">';
}
switch($row['bn_device']) {
case 'pc':
$bn_device = 'PC';
break;
case 'mobile':
$bn_device = '모바일';
break;
default:
$bn_device = 'PC와 모바일';
break;
}
$bn_begin_time = substr($row['bn_begin_time'], 2, 14);
$bn_end_time = substr($row['bn_end_time'], 2, 14);
$bg = 'bg'.($i%2);
?>
<tr class="<?php echo $bg; ?>">
<td headers="th_id" rowspan="2" class="td_num"><?php echo $row['bn_id']; ?></td>
<td headers="th_dvc"><?php echo $bn_device; ?></td>
<td headers="th_loc"><?php echo $row['bn_position']; ?></td>
<td headers="th_st" class="td_datetime"><?php echo $bn_begin_time; ?></td>
<td headers="th_end" class="td_datetime"><?php echo $bn_end_time; ?></td>
<td headers="th_odr" class="td_num"><?php echo $row['bn_order']; ?></td>
<td headers="th_hit" class="td_num"><?php echo $row['bn_hit']; ?></td>
<td headers="th_mng" class="td_mng td_mns_m">
<a href="./bannerform.php?w=u&amp;bn_id=<?php echo $row['bn_id']; ?>" class="btn btn_03">수정</a>
<a href="./bannerformupdate.php?w=d&amp;bn_id=<?php echo $row['bn_id']; ?>" onclick="return delete_confirm(this);" class="btn btn_02">삭제</a>
</td>
</tr>
<tr class="<?php echo $bg; ?>">
<td headers="th_img" colspan="7" class="td_img_view sbn_img">
<div class="sbn_image"><?php echo $bn_img; ?></div>
<button type="button" class="sbn_img_view btn_frmline">이미지확인</button>
</td>
</tr>
<?php
}
if ($i == 0) {
echo '<tr><td colspan="8" class="empty_table">자료가 없습니다.</td></tr>';
}
?>
</tbody>
</table>
</div>
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['SCRIPT_NAME']}?$qstr&amp;page="); ?>
<script>
jQuery(function($) {
$(".sbn_img_view").on("click", function() {
$(this).closest(".td_img_view").find(".sbn_image").slideToggle();
});
});
</script>
<?php
include_once (G5_ADMIN_PATH.'/admin.tail.php');
-642
View File
@@ -1,642 +0,0 @@
<?php
$sub_menu = '400200';
include_once('./_common.php');
include_once(G5_EDITOR_LIB);
auth_check_menu($auth, $sub_menu, "w");
$ca_id = isset($_GET['ca_id']) ? preg_replace('/[^0-9a-z]/i', '', $_GET['ca_id']) : '';
$ca = array(
'ca_skin_dir'=>'',
'ca_mobile_skin_dir'=>'',
'ca_name'=>'',
'ca_order'=>'',
'ca_mb_id'=>'',
'ca_skin_dir'=>'',
'ca_cert_use'=>0,
'ca_adult_use'=>0,
'ca_sell_email'=>'',
'ca_nocoupon'=>0,
'ca_include_head'=>'',
'ca_include_tail'=>'',
'ca_head_html'=>'',
'ca_tail_html'=>'',
'ca_mobile_head_html'=>'',
'ca_mobile_tail_html'=>'',
);
for($i=0;$i<=10;$i++){
$ca['ca_'.$i.'_subj'] = '';
$ca['ca_'.$i] = '';
}
$sql_common = " from {$g5['g5_shop_category_table']} ";
if ($is_admin != 'super')
$sql_common .= " where ca_mb_id = '{$member['mb_id']}' ";
if ($w == "")
{
if ($is_admin != 'super' && !$ca_id)
alert("최고관리자만 1단계 분류를 추가할 수 있습니다.");
$len = strlen($ca_id);
if ($len == 10)
alert("분류를 더 이상 추가할 수 없습니다.\\n\\n5단계 분류까지만 가능합니다.");
$len2 = $len + 1;
$sql = " select MAX(SUBSTRING(ca_id,$len2,2)) as max_subid from {$g5['g5_shop_category_table']}
where SUBSTRING(ca_id,1,$len) = '$ca_id' ";
$row = sql_fetch($sql);
$subid = base_convert($row['max_subid'], 36, 10);
$subid += 36;
if ($subid >= 36 * 36)
{
//alert("분류를 더 이상 추가할 수 없습니다.");
// 빈상태로
$subid = " ";
}
$subid = base_convert($subid, 10, 36);
$subid = substr("00" . $subid, -2);
$subid = $ca_id . $subid;
$sublen = strlen($subid);
if ($ca_id) // 2단계이상 분류
{
$sql = " select * from {$g5['g5_shop_category_table']} where ca_id = '$ca_id' ";
$ca = sql_fetch($sql);
$html_title = $ca['ca_name'] . " 하위분류추가";
$ca['ca_name'] = "";
}
else // 1단계 분류
{
$html_title = "1단계분류추가";
$ca['ca_use'] = 1;
$ca['ca_explan_html'] = 1;
$ca['ca_img_width'] = $default['de_simg_width'];
$ca['ca_img_height'] = $default['de_simg_height'];
$ca['ca_mobile_img_width'] = $default['de_simg_width'];
$ca['ca_mobile_img_height'] = $default['de_simg_height'];
$ca['ca_list_mod'] = 3;
$ca['ca_list_row'] = 5;
$ca['ca_mobile_list_mod'] = 3;
$ca['ca_mobile_list_row'] = 5;
$ca['ca_stock_qty'] = 99999;
}
$ca['ca_skin'] = "list.10.skin.php";
$ca['ca_mobile_skin'] = "list.10.skin.php";
}
else if ($w == "u")
{
$sql = " select * from {$g5['g5_shop_category_table']} where ca_id = '$ca_id' ";
$ca = sql_fetch($sql);
if (! (isset($ca['ca_id']) && $ca['ca_id']))
alert("자료가 없습니다.");
$html_title = $ca['ca_name'] . " 수정";
$ca['ca_name'] = get_text($ca['ca_name']);
}
$g5['title'] = $html_title;
include_once (G5_ADMIN_PATH.'/admin.head.php');
$pg_anchor ='<ul class="anchor">
<li><a href="#anc_scatefrm_basic">필수입력</a></li>
<li><a href="#anc_scatefrm_optional">선택입력</a></li>
<li><a href="#anc_scatefrm_extra">여분필드</a></li>';
if ($w == 'u') $pg_anchor .= '<li><a href="#frm_etc">기타설정</a></li>';
$pg_anchor .= '</ul>';
// 쿠폰 적용 불가 설정 필드 추가
if(!sql_query(" select ca_nocoupon from {$g5['g5_shop_category_table']} limit 1 ", false)) {
sql_query(" ALTER TABLE `{$g5['g5_shop_category_table']}`
ADD `ca_nocoupon` tinyint(4) NOT NULL DEFAULT '0' AFTER `ca_adult_use` ", true);
}
// 스킨 디렉토리 필드 추가
if(!sql_query(" select ca_skin_dir from {$g5['g5_shop_category_table']} limit 1 ", false)) {
sql_query(" ALTER TABLE `{$g5['g5_shop_category_table']}`
ADD `ca_skin_dir` varchar(255) NOT NULL DEFAULT '' AFTER `ca_name`,
ADD `ca_mobile_skin_dir` varchar(255) NOT NULL DEFAULT '' AFTER `ca_skin_dir` ", true);
}
// 분류 출력순서 필드 추가
if(!sql_query(" select ca_order from {$g5['g5_shop_category_table']} limit 1 ", false)) {
sql_query(" ALTER TABLE `{$g5['g5_shop_category_table']}`
ADD `ca_order` int(11) NOT NULL DEFAULT '0' AFTER `ca_name` ", true);
sql_query(" ALTER TABLE `{$g5['g5_shop_category_table']}` ADD INDEX(`ca_order`) ", true);
}
// 모바일 상품 출력줄수 필드 추가
if(!sql_query(" select ca_mobile_list_row from {$g5['g5_shop_category_table']} limit 1 ", false)) {
sql_query(" ALTER TABLE `{$g5['g5_shop_category_table']}`
ADD `ca_mobile_list_row` int(11) NOT NULL DEFAULT '0' AFTER `ca_mobile_list_mod` ", true);
}
// 스킨 Path
if(!$ca['ca_skin_dir'])
$g5_shop_skin_path = G5_SHOP_SKIN_PATH;
else {
if(preg_match('#^theme/(.+)$#', $ca['ca_skin_dir'], $match))
$g5_shop_skin_path = G5_THEME_PATH.'/'.G5_SKIN_DIR.'/shop/'.$match[1];
else
$g5_shop_skin_path = G5_PATH.'/'.G5_SKIN_DIR.'/shop/'.$ca['ca_skin_dir'];
}
if(!$ca['ca_mobile_skin_dir'])
$g5_mshop_skin_path = G5_MSHOP_SKIN_PATH;
else {
if(preg_match('#^theme/(.+)$#', $ca['ca_mobile_skin_dir'], $match))
$g5_mshop_skin_path = G5_THEME_MOBILE_PATH.'/'.G5_SKIN_DIR.'/shop/'.$match[1];
else
$g5_mshop_skin_path = G5_MOBILE_PATH.'/'.G5_SKIN_DIR.'/shop/'.$ca['ca_mobile_skin_dir'];
}
?>
<form name="fcategoryform" action="./categoryformupdate.php" onsubmit="return fcategoryformcheck(this);" method="post" enctype="multipart/form-data">
<input type="hidden" name="codedup" value="<?php echo $default['de_code_dup_use']; ?>">
<input type="hidden" name="w" value="<?php echo $w; ?>">
<input type="hidden" name="sst" value="<?php echo $sst; ?>">
<input type="hidden" name="sod" value="<?php echo $sod; ?>">
<input type="hidden" name="sfl" value="<?php echo $sfl; ?>">
<input type="hidden" name="stx" value="<?php echo $stx; ?>">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<input type="hidden" name="ca_explan_html" value="<?php echo $ca['ca_explan_html']; ?>">
<section id="anc_scatefrm_basic">
<h2 class="h2_frm">필수입력</h2>
<?php echo $pg_anchor; ?>
<div class="tbl_frm01 tbl_wrap">
<table>
<caption>분류 추가 필수입력</caption>
<colgroup>
<col class="grid_4">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row"><label for="ca_id">분류코드</label></th>
<td>
<?php if ($w == "") { ?>
<?php echo help("자동으로 보여지는 분류코드를 사용하시길 권해드리지만 직접 입력한 값으로도 사용할 수 있습니다.\n분류코드는 나중에 수정이 되지 않으므로 신중하게 결정하여 사용하십시오.\n\n분류코드는 2자리씩 10자리를 사용하여 5단계를 표현할 수 있습니다.\n0~z까지 입력이 가능하며 한 분류당 최대 1296가지를 표현할 수 있습니다.\n그러므로 총 3656158440062976가지의 분류를 사용할 수 있습니다."); ?>
<input type="text" name="ca_id" value="<?php echo $subid; ?>" id="ca_id" required class="required frm_input" size="<?php echo $sublen; ?>" maxlength="<?php echo $sublen; ?>">
<!-- <?php if ($default['de_code_dup_use']) { ?><a href="javascript:;" onclick="codedupcheck(document.getElementById('ca_id').value)">코드 중복검사</a><?php } ?> -->
<?php } else { ?>
<input type="hidden" name="ca_id" value="<?php echo $ca['ca_id']; ?>">
<span class="frm_ca_id"><?php echo $ca['ca_id']; ?></span>
<a href="<?php echo shop_category_url($ca_id); ?>" class="btn_frmline">미리보기</a>
<a href="./categoryform.php?ca_id=<?php echo $ca_id; ?>&amp;<?php echo $qstr; ?>" class="btn_frmline">하위분류 추가</a>
<a href="./itemlist.php?sca=<?php echo $ca['ca_id']; ?>" class="btn_frmline">상품리스트</a>
<?php } ?>
</td>
</tr>
<tr>
<th scope="row"><label for="ca_name">분류명</label></th>
<td><input type="text" name="ca_name" value="<?php echo $ca['ca_name']; ?>" id="ca_name" size="38" required class="required frm_input"></td>
</tr>
<tr>
<th scope="row"><label for="ca_order">출력순서</label></th>
<td>
<?php echo help("숫자가 작을 수록 상위에 출력됩니다. 음수 입력도 가능하며 입력 가능 범위는 -2147483648 부터 2147483647 까지입니다.\n<b>입력하지 않으면 자동으로 출력됩니다.</b>"); ?>
<input type="text" name="ca_order" value="<?php echo $ca['ca_order']; ?>" id="ca_order" class="frm_input" size="12">
</td>
</tr>
<tr>
<th scope="row"><?php if ($is_admin == 'super') { ?><label for="ca_mb_id"><?php } ?>관리 회원아이디<?php if ($is_admin == 'super') { ?></label><?php } ?></th>
<td>
<?php if ($is_admin == 'super') { ?>
<input type="text" name="ca_mb_id" value="<?php echo get_sanitize_input($ca['ca_mb_id']); ?>" id="ca_mb_id" class="frm_input" maxlength="20">
<?php } else { ?>
<input type="hidden" name="ca_mb_id" value="<?php echo get_sanitize_input($ca['ca_mb_id']); ?>">
<?php echo $ca['ca_mb_id']; ?>
<?php } ?>
</td>
</tr>
<tr>
<th scope="row"><label for="ca_skin_dir">PC용 스킨명</label></th>
<td>
<?php echo get_skin_select('shop', 'ca_skin_dir', 'ca_skin_dir', $ca['ca_skin_dir']); ?>
</td>
</tr>
<tr>
<th scope="row"><label for="ca_mobile_skin_dir">모바일용 스킨명</label></th>
<td>
<?php echo get_mobile_skin_select('shop', 'ca_mobile_skin_dir', 'ca_mobile_skin_dir', $ca['ca_mobile_skin_dir']); ?>
</td>
</tr>
<tr>
<th scope="row">본인확인 체크</th>
<td>
<input type="radio" name="ca_cert_use" value="1" id="ca_cert_use_yes" <?php if($ca['ca_cert_use']) echo 'checked="checked"'; ?>>
<label for="ca_cert_use_yes">사용함</label>
<input type="radio" name="ca_cert_use" value="0" id="ca_cert_use_no" <?php if(!$ca['ca_cert_use']) echo 'checked="checked"'; ?>>
<label for="ca_cert_use_no">사용안함</label>
</td>
</tr>
<tr>
<th scope="row">성인인증 체크</th>
<td>
<input type="radio" name="ca_adult_use" value="1" id="ca_adult_use_yes" <?php if($ca['ca_adult_use']) echo 'checked="checked"'; ?>>
<label for="ca_adult_use_yes">사용함</label>
<input type="radio" name="ca_adult_use" value="0" id="ca_adult_use_no" <?php if(!$ca['ca_adult_use']) echo 'checked="checked"'; ?>>
<label for="ca_adult_use_no">사용안함</label>
</td>
</tr>
<tr>
<th scope="row"><label for="ca_skin">출력스킨</label></th>
<td>
<?php echo help('기본으로 제공하는 스킨은 '.str_replace(G5_PATH.'/', '', $g5_shop_skin_path).'/list.*.skin.php 입니다.'); ?>
<select id="ca_skin" name="ca_skin" required class="required">
<?php echo get_list_skin_options("^list.[0-9]+\.skin\.php", $g5_shop_skin_path, $ca['ca_skin']); ?>
</select>
</td>
</tr>
<tr>
<th scope="row"><label for="ca_img_width">출력이미지 폭</label></th>
<td>
<?php echo help("쇼핑몰환경설정 &gt; 이미지(소) 넓이가 기본값으로 설정됩니다.\n".G5_SHOP_URL."/list.php에서 출력되는 이미지의 폭입니다."); ?>
<input type="text" name="ca_img_width" value="<?php echo $ca['ca_img_width']; ?>" id="ca_img_width" required class="required frm_input" size="5" > 픽셀
</td>
</tr>
<tr>
<th scope="row"><label for="ca_img_height">출력이미지 높이</label></th>
<td>
<?php echo help("쇼핑몰환경설정 &gt; 이미지(소) 높이가 기본값으로 설정됩니다.\n".G5_SHOP_URL."/list.php에서 출력되는 이미지의 높이입니다."); ?>
<input type="text" name="ca_img_height" value="<?php echo $ca['ca_img_height']; ?>" id="ca_img_height" required class="required frm_input" size="5" > 픽셀
</td>
</tr>
<tr>
<th scope="row"><label for="ca_list_mod">1줄당 이미지 수</label></th>
<td>
<?php echo help("한 줄에 설정한 값만큼의 상품을 출력하지만 스킨에 따라 한 줄에 하나의 상품만 출력할 수도 있습니다."); ?>
<input type="text" name="ca_list_mod" size="3" value="<?php echo $ca['ca_list_mod']; ?>" id="ca_list_mod" required class="required frm_input"> 개
</td>
</tr>
<tr>
<th scope="row"><label for="ca_list_row">이미지 줄 수</label></th>
<td>
<?php echo help("한 페이지에 출력할 이미지 줄 수를 설정합니다.\n한 페이지에서 표시하는 상품수는 (1줄당 이미지 수 x 줄 수) 입니다."); ?>
<input type="text" name="ca_list_row" value='<?php echo $ca['ca_list_row']; ?>' id="ca_list_row" required class="required frm_input" size="3"> 줄
</td>
</tr>
<tr>
<th scope="row"><label for="ca_mobile_skin">모바일 출력스킨</label></th>
<td>
<?php echo help('기본으로 제공하는 스킨은 '.str_replace(G5_PATH.'/', '', $g5_mshop_skin_path).'/list.*.skin.php 입니다.'); ?>
<select id="ca_mobile_skin" name="ca_mobile_skin" required class="required">
<?php echo get_list_skin_options("^list.[0-9]+\.skin\.php", $g5_mshop_skin_path, $ca['ca_mobile_skin']); ?>
</select>
</td>
</tr>
<tr>
<th scope="row"><label for="ca_mobile_img_width">모바일 출력이미지 폭</label></th>
<td>
<?php echo help("쇼핑몰환경설정 &gt; 이미지(소) 넓이가 기본값으로 설정됩니다.\n".G5_SHOP_URL."/list.php에서 출력되는 이미지의 폭입니다."); ?>
<input type="text" name="ca_mobile_img_width" value="<?php echo $ca['ca_mobile_img_width']; ?>" id="ca_mobile_img_width" required class="required frm_input" size="5" > 픽셀
</td>
</tr>
<tr>
<th scope="row"><label for="ca_mobile_img_height">모바일 출력이미지 높이</label></th>
<td>
<?php echo help("쇼핑몰환경설정 &gt; 이미지(소) 높이가 기본값으로 설정됩니다.\n".G5_SHOP_URL."/list.php에서 출력되는 이미지의 높이입니다."); ?>
<input type="text" name="ca_mobile_img_height" value="<?php echo $ca['ca_mobile_img_height']; ?>" id="ca_mobile_img_height" required class="required frm_input" size="5" > 픽셀
</td>
</tr>
<tr>
<th scope="row"><label for="ca_mobile_list_mod">모바일 1줄당 이미지 수</label></th>
<td>
<?php echo help("한 줄에 설정한 값만큼의 상품을 출력하지만 스킨에 따라 한 줄에 하나의 상품만 출력할 수도 있습니다."); ?>
<input type="text" name="ca_mobile_list_mod" value='<?php echo $ca['ca_mobile_list_mod']; ?>' id="ca_mobile_list_mod" required class="required frm_input" size="3"> 개
</td>
</tr>
<tr>
<th scope="row"><label for="ca_mobile_list_row">모바일 이미지 줄 수</label></th>
<td>
<?php echo help("한 페이지에 출력할 이미지 줄 수를 설정합니다.\n한 페이지에서 표시하는 상품수는 (1줄당 이미지 수 x 줄 수) 입니다."); ?>
<input type="text" name="ca_mobile_list_row" value='<?php echo $ca['ca_mobile_list_row']; ?>' id="ca_mobile_list_row" required class="required frm_input" size="3"> 줄
</td>
</tr>
<tr>
<th scope="row"><label for="ca_stock_qty">재고수량</label></th>
<td>
<?php echo help("상품의 기본재고 수량을 설정합니다.\n재고를 사용하지 않는다면 숫자를 크게 입력하여 주십시오. 예) 999999"); ?>
<input type="text" name="ca_stock_qty" size="10" value="<?php echo $ca['ca_stock_qty']; ?>" id="ca_stock_qty" class="frm_input"> 개
</td>
</tr>
<tr>
<th scope="row"><label for="ca_sell_email">판매자 E-mail</label></th>
<td>
<?php echo help("운영자와 판매자가 다른 경우에 사용합니다.\n이 분류에 속한 상품을 등록할 경우에 기본값으로 입력됩니다."); ?>
<input type="text" name="ca_sell_email" size="40" value="<?php echo get_sanitize_input($ca['ca_sell_email']); ?>" id="ca_sell_email" class="frm_input">
</td>
</tr>
<tr>
<th scope="row"><label for="ca_use">판매가능</label></th>
<td>
<?php echo help("재고가 없거나 일시적으로 판매를 중단하시려면 체크 해제하십시오.\n체크 해제하시면 상품 출력을 하지 않으며, 주문도 받지 않습니다."); ?>
<input type="checkbox" name="ca_use" <?php echo ($ca['ca_use']) ? "checked" : ""; ?> value="1" id="ca_use">
예
</td>
</tr>
<tr>
<th scope="row"><label for="ca_nocoupon">쿠폰적용안함</label></th>
<td>
<?php echo help("설정에 체크하시면 쿠폰생성 때 분류 검색 결과에 노출되지 않습니다."); ?>
<input type="checkbox" name="ca_nocoupon" <?php echo ($ca['ca_nocoupon']) ? "checked" : ""; ?> value="1" id="ca_nocoupon">
예
</td>
</tr>
</tbody>
</table>
</div>
<button type="button" class="shop_category btn_02 btn">테마설정 가져오기</button>
</section>
<section id="anc_scatefrm_optional">
<h2 class="h2_frm">선택 입력</h2>
<?php echo $pg_anchor; ?>
<div class="tbl_frm01 tbl_wrap">
<table>
<caption>분류 추가 선택입력</caption>
<colgroup>
<col class="grid_4">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row"><label for="ca_include_head">상단파일경로</label></th>
<td>
<?php echo help("입력하지 않으면 기본 상단 파일을 사용합니다.<br>상단 내용과 달리 PHP 코드를 사용할 수 있습니다."); ?>
<input type="text" name="ca_include_head" value="<?php echo $ca['ca_include_head']; ?>" id="ca_include_head" class="frm_input" size="60">
</td>
</tr>
<tr>
<th scope="row"><label for="ca_include_tail">하단 파일 경로</label></th>
<td>
<?php echo help("입력하지 않으면 기본 하단 파일을 사용합니다.<br>하단 내용과 달리 PHP 코드를 사용할 수 있습니다."); ?>
<input type="text" name="ca_include_tail" value="<?php echo $ca['ca_include_tail']; ?>" id="ca_include_tail" class="frm_input" size="60">
</td>
</tr>
<tr id="admin_captcha_box" style="display:none;">
<th scope="row">자동등록방지</th>
<td>
<?php
echo help("파일 경로를 입력 또는 수정시 캡챠를 반드시 입력해야 합니다.");
include_once(G5_CAPTCHA_PATH.'/captcha.lib.php');
$captcha_html = captcha_html();
$captcha_js = chk_captcha_js();
echo $captcha_html;
?>
<script>
jQuery("#captcha_key").removeAttr("required").removeClass("required");
</script>
</td>
</tr>
<tr>
<th scope="row">상단내용</th>
<td>
<?php echo help("상품리스트 페이지 상단에 출력하는 HTML 내용입니다."); ?>
<?php echo editor_html('ca_head_html', get_text(html_purifier($ca['ca_head_html']), 0)); ?>
</td>
</tr>
<tr>
<th scope="row">하단내용</th>
<td>
<?php echo help("상품리스트 페이지 하단에 출력하는 HTML 내용입니다."); ?>
<?php echo editor_html('ca_tail_html', get_text(html_purifier($ca['ca_tail_html']), 0)); ?>
</td>
</tr>
<tr>
<th scope="row">모바일 상단내용</th>
<td>
<?php echo help("상품리스트 페이지 상단에 출력하는 HTML 내용입니다."); ?>
<?php echo editor_html('ca_mobile_head_html', get_text(html_purifier($ca['ca_mobile_head_html']), 0)); ?>
</td>
</tr>
<tr>
<th scope="row">모바일 하단내용</th>
<td>
<?php echo help("상품리스트 페이지 하단에 출력하는 HTML 내용입니다."); ?>
<?php echo editor_html('ca_mobile_tail_html', get_text(html_purifier($ca['ca_mobile_tail_html']), 0)); ?>
</td>
</tr>
</tbody>
</table>
</div>
</section>
<section id="anc_scatefrm_extra">
<h2>여분필드 설정</h2>
<?php echo $pg_anchor ?>
<div class="tbl_frm01 tbl_wrap">
<table>
<colgroup>
<col class="grid_3">
<col>
</colgroup>
<tbody>
<?php for ($i=1; $i<=10; $i++) { ?>
<tr>
<th scope="row">여분필드<?php echo $i ?></th>
<td class="td_extra">
<label for="ca_<?php echo $i ?>_subj">여분필드 <?php echo $i ?> 제목</label>
<input type="text" name="ca_<?php echo $i ?>_subj" id="ca_<?php echo $i ?>_subj" value="<?php echo get_text($ca['ca_'.$i.'_subj']) ?>" class="frm_input">
<label for="ca_<?php echo $i ?>">여분필드 <?php echo $i ?> 값</label>
<input type="text" name="ca_<?php echo $i ?>" value="<?php echo get_text($ca['ca_'.$i]) ?>" id="ca_<?php echo $i ?>" class="frm_input">
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</section>
<?php if ($w == "u") { ?>
<section id="frm_etc">
<h2 class="h2_frm">기타설정</h2>
<?php echo $pg_anchor; ?>
<div class="tbl_frm01 tbl_wrap">
<table>
<caption>분류 추가 기타설정</caption>
<colgroup>
<col class="grid_4">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row">하위분류</th>
<td>
<?php echo help("이 분류의 코드가 10 이라면 10 으로 시작하는 하위분류의 설정값을 이 분류와 동일하게 설정합니다.\n<strong>이 작업은 실행 후 복구할 수 없습니다.</strong>"); ?>
<label for="sub_category">이 분류의 하위분류 설정을, 이 분류와 동일하게 일괄수정</label>
<input type="checkbox" name="sub_category" value="1" id="sub_category" onclick="if (this.checked) if (confirm('이 분류에 속한 하위 분류의 속성을 똑같이 변경합니다.\n\n이 작업은 되돌릴 방법이 없습니다.\n\n그래도 변경하시겠습니까?')) return ; this.checked = false;">
</td>
</tr>
</tbody>
</table>
</div>
</section>
<?php } ?>
<div class="btn_fixed_top">
<input type="submit" value="확인" class="btn_submit btn" accesskey="s">
<a href="./categorylist.php?<?php echo $qstr; ?>" class="btn_02 btn">목록</a>
</div>
</form>
<script>
<?php if ($w == 'u') { ?>
$(".banner_or_img").addClass("sit_wimg");
$(function() {
$(".sit_wimg_view").bind("click", function() {
var sit_wimg_id = $(this).attr("id").split("_");
var $img_display = $("#"+sit_wimg_id[1]);
$img_display.toggle();
if($img_display.is(":visible")) {
$(this).text($(this).text().replace("확인", "닫기"));
} else {
$(this).text($(this).text().replace("닫기", "확인"));
}
var $img = $("#"+sit_wimg_id[1]).children("img");
var width = $img.width();
var height = $img.height();
if(width > 700) {
var img_width = 700;
var img_height = Math.round((img_width * height) / width);
$img.width(img_width).height(img_height);
}
});
$(".sit_wimg_close").bind("click", function() {
var $img_display = $(this).parents(".banner_or_img");
var id = $img_display.attr("id");
$img_display.toggle();
var $button = $("#ca_"+id+"_view");
$button.text($button.text().replace("닫기", "확인"));
});
});
<?php } ?>
function fcategoryformcheck(f)
{
if (f.w.value == "") {
var error = "";
$.ajax({
url: "./ajax.ca_id.php",
type: "POST",
data: {
"ca_id": f.ca_id.value
},
dataType: "json",
async: false,
cache: false,
success: function(data, textStatus) {
error = data.error;
}
});
if (error) {
alert(error);
return false;
}
}
<?php echo get_editor_js('ca_head_html'); ?>
<?php echo get_editor_js('ca_tail_html'); ?>
<?php echo get_editor_js('ca_mobile_head_html'); ?>
<?php echo get_editor_js('ca_mobile_tail_html'); ?>
return true;
}
var captcha_chk = false;
function use_captcha_check(){
$.ajax({
type: "POST",
url: g5_admin_url+"/ajax.use_captcha.php",
data: { admin_use_captcha: "1" },
cache: false,
async: false,
dataType: "json",
success: function(data) {
}
});
}
function frm_check_file(){
var ca_include_head = "<?php echo $ca['ca_include_head']; ?>";
var ca_include_tail = "<?php echo $ca['ca_include_tail']; ?>";
var head = jQuery.trim(jQuery("#ca_include_head").val());
var tail = jQuery.trim(jQuery("#ca_include_tail").val());
if(ca_include_head !== head || ca_include_tail !== tail){
// 캡챠를 사용합니다.
jQuery("#admin_captcha_box").show();
captcha_chk = true;
use_captcha_check();
return false;
} else {
jQuery("#admin_captcha_box").hide();
}
return true;
}
jQuery(function($){
if( window.self !== window.top ){ // frame 또는 iframe을 사용할 경우 체크
$("#ca_include_head, #ca_include_tail").on("change paste keyup", function(e) {
frm_check_file();
});
use_captcha_check();
}
$(".shop_category").on("click", function() {
if(!confirm("현재 테마의 스킨, 이미지 사이즈 등의 설정을 적용하시겠습니까?"))
return false;
$.ajax({
type: "POST",
url: "../theme_config_load.php",
cache: false,
async: false,
data: { type: 'shop_category' },
dataType: "json",
success: function(data) {
if(data.error) {
alert(data.error);
return false;
}
$.each(data, function(key, val) {
if(key == "error")
return true;
$("#"+key).val(val);
});
}
});
});
});
/*document.fcategoryform.ca_name.focus(); 포커스 해제*/
</script>
<?php
include_once (G5_ADMIN_PATH.'/admin.tail.php');
-256
View File
@@ -1,256 +0,0 @@
<?php
$sub_menu = '400200';
include_once('./_common.php');
auth_check_menu($auth, $sub_menu, "w");
$ca_include_head = isset($_POST['ca_include_head']) ? trim($_POST['ca_include_head']) : '';
$ca_include_tail = isset($_POST['ca_include_tail']) ? trim($_POST['ca_include_tail']) : '';
$ca_id = isset($_REQUEST['ca_id']) ? preg_replace('/[^0-9a-z]/i', '', $_REQUEST['ca_id']) : '';
if( ! $ca_id ){
alert('', G5_SHOP_URL);
}
if ($file = $ca_include_head) {
$file_ext = pathinfo($file, PATHINFO_EXTENSION);
if (! $file_ext || ! in_array($file_ext, array('php', 'htm', 'html')) || !preg_match("/\.(php|htm[l]?)$/i", $file)) {
alert("상단 파일 경로가 php, html 파일이 아닙니다.");
}
}
if ($file = $ca_include_tail) {
$file_ext = pathinfo($file, PATHINFO_EXTENSION);
if (! $file_ext || ! in_array($file_ext, array('php', 'htm', 'html')) || !preg_match("/\.(php|htm[l]?)$/i", $file)) {
alert("하단 파일 경로가 php, html 파일이 아닙니다.");
}
}
if( $ca_id ){
$sql = " select * from {$g5['g5_shop_category_table']} where ca_id = '$ca_id' ";
$ca = sql_fetch($sql);
if ($ca && ($ca['ca_include_head'] !== $ca_include_head || $ca['ca_include_tail'] !== $ca_include_tail) && function_exists('get_admin_captcha_by') && get_admin_captcha_by()){
include_once(G5_CAPTCHA_PATH.'/captcha.lib.php');
if (!chk_captcha()) {
alert('자동등록방지 숫자가 틀렸습니다.');
}
}
}
$check_str_keys = array(
'ca_order'=>'int',
'ca_img_width'=>'int',
'ca_img_height'=>'int',
'ca_name'=>'str',
'ca_mb_id'=>'str',
'ca_nocoupon'=>'str',
'ca_mobile_skin_dir'=>'str',
'ca_skin'=>'str',
'ca_mobile_skin'=>'str',
'ca_list_mod'=>'int',
'ca_list_row'=>'int',
'ca_mobile_img_width'=>'int',
'ca_mobile_img_height'=>'int',
'ca_mobile_list_mod'=>'int',
'ca_mobile_list_row'=>'int',
'ca_sell_email'=>'str',
'ca_use'=>'int',
'ca_stock_qty'=>'int',
'ca_explan_html'=>'int',
'ca_cert_use'=>'int',
'ca_adult_use'=>'int',
'ca_skin_dir'=>'str'
);
for($i=0;$i<=10;$i++){
$check_str_keys['ca_'.$i.'_subj'] = 'str';
$check_str_keys['ca_'.$i] = 'str';
}
foreach( $check_str_keys as $key=>$val ){
if( $val === 'int' ){
$value = isset($_POST[$key]) ? (int) $_POST[$key] : 0;
} else {
$value = isset($_POST[$key]) ? clean_xss_tags($_POST[$key], 1, 1) : '';
}
$$key = $_POST[$key] = $value;
}
$ca_head_html = isset($_POST['ca_head_html']) ? $_POST['ca_head_html'] : '';
$ca_tail_html = isset($_POST['ca_tail_html']) ? $_POST['ca_tail_html'] : '';
$ca_mobile_head_html = isset($_POST['ca_mobile_head_html']) ? $_POST['ca_mobile_head_html'] : '';
$ca_mobile_tail_html = isset($_POST['ca_mobile_tail_html']) ? $_POST['ca_mobile_tail_html'] : '';
if(!is_include_path_check($ca_include_head, 1)) {
alert('상단 파일 경로에 포함시킬수 없는 문자열이 있습니다.');
}
if(!is_include_path_check($ca_include_tail, 1)) {
alert('하단 파일 경로에 포함시킬수 없는 문자열이 있습니다.');
}
$check_keys = array('ca_skin_dir', 'ca_mobile_skin_dir', 'ca_skin', 'ca_mobile_skin');
foreach( $check_keys as $key ){
if( isset($$key) && preg_match('#\.+(\/|\\\)#', $$key) ){
alert('스킨명 또는 경로에 포함시킬수 없는 문자열이 있습니다.');
}
}
if( function_exists('filter_input_include_path') ){
$ca_include_head = filter_input_include_path($ca_include_head);
$ca_include_tail = filter_input_include_path($ca_include_tail);
}
if ($w == "u" || $w == "d")
check_demo();
auth_check_menu($auth, $sub_menu, "d");
check_admin_token();
if ($w == 'd' && $is_admin != 'super')
alert("최고관리자만 분류를 삭제할 수 있습니다.");
if ($w == "" || $w == "u")
{
if ($ca_mb_id)
{
$sql = " select mb_id from {$g5['member_table']} where mb_id = '$ca_mb_id' ";
$row = sql_fetch($sql);
if (!$row['mb_id'])
alert("\'$ca_mb_id\' 은(는) 존재하는 회원아이디가 아닙니다.");
}
}
if( $ca_skin && ! is_include_path_check($ca_skin) ){
alert('오류 : 데이터폴더가 포함된 path 를 포함할수 없습니다.');
}
$sql_common = " ca_order = '$ca_order',
ca_skin_dir = '$ca_skin_dir',
ca_mobile_skin_dir = '$ca_mobile_skin_dir',
ca_skin = '$ca_skin',
ca_mobile_skin = '$ca_mobile_skin',
ca_img_width = '$ca_img_width',
ca_img_height = '$ca_img_height',
ca_list_mod = '$ca_list_mod',
ca_list_row = '$ca_list_row',
ca_mobile_img_width = '$ca_mobile_img_width',
ca_mobile_img_height = '$ca_mobile_img_height',
ca_mobile_list_mod = '$ca_mobile_list_mod',
ca_mobile_list_row = '$ca_mobile_list_row',
ca_sell_email = '$ca_sell_email',
ca_use = '$ca_use',
ca_stock_qty = '$ca_stock_qty',
ca_explan_html = '$ca_explan_html',
ca_head_html = '$ca_head_html',
ca_tail_html = '$ca_tail_html',
ca_mobile_head_html = '$ca_mobile_head_html',
ca_mobile_tail_html = '$ca_mobile_tail_html',
ca_include_head = '$ca_include_head',
ca_include_tail = '$ca_include_tail',
ca_mb_id = '$ca_mb_id',
ca_cert_use = '$ca_cert_use',
ca_adult_use = '$ca_adult_use',
ca_nocoupon = '$ca_nocoupon',
ca_1_subj = '$ca_1_subj',
ca_2_subj = '$ca_2_subj',
ca_3_subj = '$ca_3_subj',
ca_4_subj = '$ca_4_subj',
ca_5_subj = '$ca_5_subj',
ca_6_subj = '$ca_6_subj',
ca_7_subj = '$ca_7_subj',
ca_8_subj = '$ca_8_subj',
ca_9_subj = '$ca_9_subj',
ca_10_subj = '$ca_10_subj',
ca_1 = '$ca_1',
ca_2 = '$ca_2',
ca_3 = '$ca_3',
ca_4 = '$ca_4',
ca_5 = '$ca_5',
ca_6 = '$ca_6',
ca_7 = '$ca_7',
ca_8 = '$ca_8',
ca_9 = '$ca_9',
ca_10 = '$ca_10' ";
if ($w == "")
{
if (!trim($ca_id))
alert("분류 코드가 없으므로 분류를 추가하실 수 없습니다.");
// 소문자로 변환
$ca_id = strtolower($ca_id);
$sql = " insert {$g5['g5_shop_category_table']}
set ca_id = '$ca_id',
ca_name = '$ca_name',
$sql_common ";
sql_query($sql);
}
else if ($w == "u")
{
$sql = " update {$g5['g5_shop_category_table']}
set ca_name = '$ca_name',
$sql_common
where ca_id = '$ca_id' ";
sql_query($sql);
// 하위분류를 똑같은 설정으로 반영
if (isset($_POST['sub_category']) && $_POST['sub_category']) {
$len = strlen($ca_id);
$sql = " update {$g5['g5_shop_category_table']}
set $sql_common
where SUBSTRING(ca_id,1,$len) = '$ca_id' ";
if ($is_admin != 'super')
$sql .= " and ca_mb_id = '{$member['mb_id']}' ";
sql_query($sql);
}
}
else if ($w == "d")
{
// 분류의 길이
$len = strlen($ca_id);
$sql = " select COUNT(*) as cnt from {$g5['g5_shop_category_table']}
where SUBSTRING(ca_id,1,$len) = '$ca_id'
and ca_id <> '$ca_id' ";
$row = sql_fetch($sql);
if ($row['cnt'] > 0)
alert("이 분류에 속한 하위 분류가 있으므로 삭제 할 수 없습니다.\\n\\n하위분류를 우선 삭제하여 주십시오.");
$str = $comma = "";
$sql = " select it_id from {$g5['g5_shop_item_table']} where ca_id = '$ca_id' ";
$result = sql_query($sql);
$i=0;
while ($row = sql_fetch_array($result))
{
$i++;
if ($i % 10 == 0) $str .= "\\n";
$str .= "$comma{$row['it_id']}";
$comma = " , ";
}
if ($str)
alert("이 분류와 관련된 상품이 총 {$i} 건 존재하므로 상품을 삭제한 후 분류를 삭제하여 주십시오.\\n\\n$str");
// 분류 삭제
$sql = " delete from {$g5['g5_shop_category_table']} where ca_id = '$ca_id' ";
sql_query($sql);
}
if(function_exists('get_admin_captcha_by'))
get_admin_captcha_by('remove');
if ($w == "" || $w == "u")
{
goto_url("./categoryform.php?w=u&amp;ca_id=$ca_id&amp;$qstr");
} else {
goto_url("./categorylist.php?$qstr");
}
-290
View File
@@ -1,290 +0,0 @@
<?php
$sub_menu = '400200';
include_once('./_common.php');
auth_check_menu($auth, $sub_menu, "r");
$g5['title'] = '분류관리';
include_once (G5_ADMIN_PATH.'/admin.head.php');
$where = " where ";
$sql_search = "";
$sfl = in_array($sfl, array('ca_name', 'ca_id', 'ca_mb_id')) ? $sfl : '';
if ($stx != "") {
if ($sfl != "") {
$sql_search .= " $where $sfl like '%$stx%' ";
$where = " and ";
}
if ($save_stx && ($save_stx != $stx))
$page = 1;
}
$sql_common = " from {$g5['g5_shop_category_table']} ";
if ($is_admin != 'super')
$sql_search .= " $where ca_mb_id = '{$member['mb_id']}' ";
$sql_common .= $sql_search;
// 테이블의 전체 레코드수만 얻음
$sql = " select count(*) as cnt " . $sql_common;
$row = sql_fetch($sql);
$total_count = $row['cnt'];
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
if (!$sst)
{
$sst = "ca_id";
$sod = "asc";
}
$sql_order = "order by $sst $sod";
// 출력할 레코드를 얻음
$sql = " select *
$sql_common
$sql_order
limit $from_record, $rows ";
$result = sql_query($sql);
$listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목록</a>';
?>
<div class="local_ov01 local_ov">
<?php echo $listall; ?>
<span class="btn_ov01"><span class="ov_txt">생성된 분류 수</span><span class="ov_num"> <?php echo number_format($total_count); ?>개</span></span>
</div>
<form name="flist" class="local_sch01 local_sch">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<input type="hidden" name="save_stx" value="<?php echo $stx; ?>">
<label for="sfl" class="sound_only">검색대상</label>
<select name="sfl" id="sfl">
<option value="ca_name"<?php echo get_selected($sfl, "ca_name", true); ?>>분류명</option>
<option value="ca_id"<?php echo get_selected($sfl, "ca_id", true); ?>>분류코드</option>
<option value="ca_mb_id"<?php echo get_selected($sfl, "ca_mb_id", true); ?>>회원아이디</option>
</select>
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
<input type="text" name="stx" value="<?php echo $stx; ?>" id="stx" required class="required frm_input">
<input type="submit" value="검색" class="btn_submit">
</form>
<form name="fcategorylist" method="post" action="./categorylistupdate.php" autocomplete="off">
<input type="hidden" name="sst" value="<?php echo $sst; ?>">
<input type="hidden" name="sod" value="<?php echo $sod; ?>">
<input type="hidden" name="sfl" value="<?php echo $sfl; ?>">
<input type="hidden" name="stx" value="<?php echo $stx; ?>">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<div id="sct" class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?> 목록</caption>
<thead>
<tr>
<th scope="col" rowspan="2"><?php echo subject_sort_link("ca_id"); ?>분류코드</a></th>
<th scope="col" id="sct_cate"><?php echo subject_sort_link("ca_name"); ?>분류명</a></th>
<th scope="col" id="sct_amount">상품수</th>
<th scope="col" id="sct_hpcert">본인인증</th>
<th scope="col" id="sct_imgw">이미지 폭</th>
<th scope="col" id="sct_imgcol">1행이미지수</th>
<th scope="col" id="sct_mobileimg">모바일<br>1행이미지수</th>
<th scope="col" id="sct_pcskin">PC스킨지정</th>
<th scope="col" rowspan="2">관리</th>
</tr>
<tr>
<th scope="col" id="sct_admin"><?php echo subject_sort_link("ca_mb_id"); ?>관리회원아이디</a></th>
<th scope="col" id="sct_sell"><?php echo subject_sort_link("ca_use"); ?>판매가능</a></th>
<th scope="col" id="sct_adultcert">성인인증</th>
<th scope="col" id="sct_imgh">이미지 높이</th>
<th scope="col" id="sct_imgrow">이미지 행수</th>
<th scope="col" id="sct_mobilerow">모바일<br>이미지 행수</th>
<th scope="col" id="sct_mskin">모바일스킨지정</th>
</tr>
</thead>
<tbody>
<?php
$s_add = $s_vie = $s_upd = $s_del = '';
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$level = strlen($row['ca_id']) / 2 - 1;
$p_ca_name = '';
if ($level > 0) {
$class = 'class="name_lbl"'; // 2단 이상 분류의 label 에 스타일 부여 - 지운아빠 2013-04-02
// 상위단계의 분류명
$p_ca_id = substr($row['ca_id'], 0, $level*2);
$sql = " select ca_name from {$g5['g5_shop_category_table']} where ca_id = '$p_ca_id' ";
$temp = sql_fetch($sql);
$p_ca_name = $temp['ca_name'].'의하위';
} else {
$class = '';
}
$s_level = '<div><label for="ca_name_'.$i.'" '.$class.'><span class="sound_only">'.$p_ca_name.''.($level+1).'단 분류</span></label></div>';
$s_level_input_size = 25 - $level *2; // 하위 분류일 수록 입력칸 넓이 작아짐 - 지운아빠 2013-04-02
if ($level+2 < 6) $s_add = '<a href="./categoryform.php?ca_id='.$row['ca_id'].'&amp;'.$qstr.'" class="btn btn_03">추가</a> '; // 분류는 5단계까지만 가능
else $s_add = '';
$s_upd = '<a href="./categoryform.php?w=u&amp;ca_id='.$row['ca_id'].'&amp;'.$qstr.'" class="btn btn_02"><span class="sound_only">'.get_text($row['ca_name']).' </span>수정</a> ';
if ($is_admin == 'super')
$s_del = '<a href="./categoryformupdate.php?w=d&amp;ca_id='.$row['ca_id'].'&amp;'.$qstr.'" onclick="return delete_confirm(this);" class="btn btn_02"><span class="sound_only">'.get_text($row['ca_name']).' </span>삭제</a> ';
// 해당 분류에 속한 상품의 수
$sql1 = " select COUNT(*) as cnt from {$g5['g5_shop_item_table']}
where ca_id = '{$row['ca_id']}'
or ca_id2 = '{$row['ca_id']}'
or ca_id3 = '{$row['ca_id']}' ";
$row1 = sql_fetch($sql1);
// 스킨 Path
if(!$row['ca_skin_dir'])
$g5_shop_skin_path = G5_SHOP_SKIN_PATH;
else {
if(preg_match('#^theme/(.+)$#', $row['ca_skin_dir'], $match))
$g5_shop_skin_path = G5_THEME_PATH.'/'.G5_SKIN_DIR.'/shop/'.$match[1];
else
$g5_shop_skin_path = G5_PATH.'/'.G5_SKIN_DIR.'/shop/'.$row['ca_skin_dir'];
}
if(!$row['ca_mobile_skin_dir'])
$g5_mshop_skin_path = G5_MSHOP_SKIN_PATH;
else {
if(preg_match('#^theme/(.+)$#', $row['ca_mobile_skin_dir'], $match))
$g5_mshop_skin_path = G5_THEME_MOBILE_PATH.'/'.G5_SKIN_DIR.'/shop/'.$match[1];
else
$g5_mshop_skin_path = G5_MOBILE_PATH.'/'.G5_SKIN_DIR.'/shop/'.$row['ca_mobile_skin_dir'];
}
$bg = 'bg'.($i%2);
?>
<tr class="<?php echo $bg; ?>">
<td class="td_code" rowspan="2">
<input type="hidden" name="ca_id[<?php echo $i; ?>]" value="<?php echo $row['ca_id']; ?>">
<a href="<?php echo shop_category_url($row['ca_id']); ?>"><?php echo $row['ca_id']; ?></a>
</td>
<td headers="sct_cate" class="sct_name<?php echo $level; ?>"><?php echo $s_level; ?> <input type="text" name="ca_name[<?php echo $i; ?>]" value="<?php echo get_text($row['ca_name']); ?>" id="ca_name_<?php echo $i; ?>" required class="tbl_input full_input required"></td>
<td headers="sct_amount" class="td_amount"><a href="./itemlist.php?sca=<?php echo $row['ca_id']; ?>"><?php echo $row1['cnt']; ?></a></td>
<td headers="sct_hpcert" class="td_possible">
<input type="checkbox" name="ca_cert_use[<?php echo $i; ?>]" value="1" id="ca_cert_use_yes<?php echo $i; ?>" <?php if($row['ca_cert_use']) echo 'checked="checked"'; ?>>
<label for="ca_cert_use_yes<?php echo $i; ?>">사용</label>
</td>
<td headers="sct_imgw">
<label for="ca_out_width<?php echo $i; ?>" class="sound_only">출력이미지 폭</label>
<input type="text" name="ca_img_width[<?php echo $i; ?>]" value="<?php echo get_text($row['ca_img_width']); ?>" id="ca_out_width<?php echo $i; ?>" required class="required tbl_input" size="3" > <span class="sound_only">픽셀</span>
</td>
<td headers="sct_imgcol">
<label for="ca_lineimg_num<?php echo $i; ?>" class="sound_only">1줄당 이미지 수</label>
<input type="text" name="ca_list_mod[<?php echo $i; ?>]" size="3" value="<?php echo $row['ca_list_mod']; ?>" id="ca_lineimg_num<?php echo $i; ?>" required class="required tbl_input"> <span class="sound_only">개</span>
</td>
<td headers="sct_mobileimg">
<label for="ca_mobileimg_num<?php echo $i; ?>" class="sound_only">모바일 1줄당 이미지 수</label>
<input type="text" name="ca_mobile_list_mod[<?php echo $i; ?>]" size="3" value="<?php echo $row['ca_mobile_list_mod']; ?>" id="ca_mobileimg_num<?php echo $i; ?>" required class="required tbl_input"> <span class="sound_only">개</span>
</td>
<td headers="sct_pcskin" class="sct_pcskin">
<label for="ca_skin_dir<?php echo $i; ?>" class="sound_only">PC스킨폴더</label>
<?php echo get_skin_select('shop', 'ca_skin_dir'.$i, 'ca_skin_dir['.$i.']', $row['ca_skin_dir'], 'class="skin_dir"'); ?>
<label for="ca_skin<?php echo $i; ?>" class="sound_only">PC스킨파일</label>
<select id="ca_skin<?php echo $i; ?>" name="ca_skin[<?php echo $i; ?>]" required class="required">
<?php echo get_list_skin_options("^list.[0-9]+\.skin\.php", $g5_shop_skin_path, $row['ca_skin']); ?>
</select>
</td>
<td class="td_mng td_mng_s" rowspan="2">
<?php echo $s_add; ?>
<?php echo $s_vie; ?>
<?php echo $s_upd; ?>
<?php echo $s_del; ?>
</td>
</tr>
<tr class="<?php echo $bg; ?>">
<td headers="sct_admin">
<?php if ($is_admin == 'super') {?>
<label for="ca_mb_id<?php echo $i; ?>" class="sound_only">관리회원아이디</label>
<input type="text" name="ca_mb_id[<?php echo $i; ?>]" value="<?php echo $row['ca_mb_id']; ?>" id="ca_mb_id<?php echo $i; ?>" class="tbl_input full_input" size="15" maxlength="20">
<?php } else { ?>
<input type="hidden" name="ca_mb_id[<?php echo $i; ?>]" value="<?php echo $row['ca_mb_id']; ?>">
<?php echo $row['ca_mb_id']; ?>
<?php } ?>
</td>
<td headers="sct_sell" class="td_possible">
<input type="checkbox" name="ca_use[<?php echo $i; ?>]" value="1" id="ca_use<?php echo $i; ?>" <?php echo ($row['ca_use'] ? "checked" : ""); ?>>
<label for="ca_use<?php echo $i; ?>">판매</label>
</td>
<td headers="sct_adultcert" class="td_possible">
<input type="checkbox" name="ca_adult_use[<?php echo $i; ?>]" value="1" id="ca_adult_use_yes<?php echo $i; ?>" <?php if($row['ca_adult_use']) echo 'checked="checked"'; ?>>
<label for="ca_adult_use_yes<?php echo $i; ?>">사용</label>
</td>
<td headers="sct_imgh">
<label for="ca_img_height<?php echo $i; ?>" class="sound_only">출력이미지 높이</label>
<input type="text" name="ca_img_height[<?php echo $i; ?>]" value="<?php echo $row['ca_img_height']; ?>" id="ca_img_height<?php echo $i; ?>" required class="required tbl_input" size="3" > <span class="sound_only">픽셀</span>
</td>
<td headers="sct_imgrow">
<label for="ca_imgline_num<?php echo $i; ?>" class="sound_only">이미지 줄 수</label>
<input type="text" name="ca_list_row[<?php echo $i; ?>]" value='<?php echo $row['ca_list_row']; ?>' id="ca_imgline_num<?php echo $i; ?>" required class="required tbl_input" size="3"> <span class="sound_only">줄</span>
</td>
<td headers="sct_mobilerow">
<label for="ca_mobileimg_row<?php echo $i; ?>" class="sound_only">모바일 이미지 줄 수</label>
<input type="text" name="ca_mobile_list_row[<?php echo $i; ?>]" value='<?php echo $row['ca_mobile_list_row']; ?>' id="ca_mobileimg_row<?php echo $i; ?>" required class="required tbl_input" size="3">
</td>
<td headers="sct_mskin" class="sct_mskin">
<label for="ca_mobile_skin_dir<?php echo $i; ?>" class="sound_only">모바일스킨폴더</label>
<?php echo get_mobile_skin_select('shop', 'ca_mobile_skin_dir'.$i, 'ca_mobile_skin_dir['.$i.']', $row['ca_mobile_skin_dir'], 'class="skin_dir"'); ?>
<label for="ca_mobile_skin<?php echo $i; ?>" class="sound_only">모바일스킨파일</label>
<select id="ca_mobile_skin<?php echo $i; ?>" name="ca_mobile_skin[<?php echo $i; ?>]" required class="required">
<?php echo get_list_skin_options("^list.[0-9]+\.skin\.php", $g5_mshop_skin_path, $row['ca_mobile_skin']); ?>
</select>
</td>
</tr>
<?php }
if ($i == 0) echo "<tr><td colspan=\"9\" class=\"empty_table\">자료가 한 건도 없습니다.</td></tr>\n";
?>
</tbody>
</table>
</div>
<div class="btn_fixed_top">
<input type="submit" value="일괄수정" class="btn_02 btn">
<?php if ($is_admin == 'super') {?>
<a href="./categoryform.php" id="cate_add" class="btn btn_01">분류 추가</a>
<?php } ?>
</div>
</form>
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['SCRIPT_NAME']}?$qstr&amp;page="); ?>
<script>
$(function() {
$("select.skin_dir").on("change", function() {
var type = "";
var dir = $(this).val();
if(!dir)
return false;
var id = $(this).attr("id");
var $sel = $(this).siblings("select");
var sval = $sel.find("option:selected").val();
if(id.search("mobile") > -1)
type = "mobile";
$sel.load(
"./ajax.skinfile.php",
{ dir : dir, type : type, sval: sval }
);
});
});
</script>
<?php
include_once (G5_ADMIN_PATH.'/admin.tail.php');
-97
View File
@@ -1,97 +0,0 @@
<?php
$sub_menu = '400200';
include_once('./_common.php');
check_demo();
auth_check_menu($auth, $sub_menu, "w");
check_admin_token();
$post_ca_id_count = (isset($_POST['ca_id']) && is_array($_POST['ca_id'])) ? count($_POST['ca_id']) : 0;
for ($i=0; $i<$post_ca_id_count; $i++)
{
$str_ca_mb_id = isset($_POST['ca_mb_id'][$i]) ? strip_tags(clean_xss_attributes($_POST['ca_mb_id'][$i])) : '';
if ($str_ca_mb_id)
{
$sql = " select mb_id from {$g5['member_table']} where mb_id = '".sql_real_escape_string($str_ca_mb_id)."' ";
$row = sql_fetch($sql);
if (!$row['mb_id'])
alert("\'{$str_ca_mb_id}\' 은(는) 존재하는 회원아이디가 아닙니다.", "./categorylist.php?$qstr");
}
$check_files = array();
if( !empty($_POST['ca_skin'][$i]) ){
$check_files[] = $_POST['ca_skin'][$i];
}
if( !empty($_POST['ca_mobile_skin'][$i]) ){
$check_files[] = $_POST['ca_mobile_skin'][$i];
}
if( !empty($_POST['ca_skin_dir'][$i]) ){
if( preg_match('#\.+(\/|\\\)#', $_POST['ca_skin_dir'][$i]) ){
alert('PC 스킨폴더명에 포함될수 없는 문자가 들어있습니다.');
}
}
if( !empty($_POST['ca_mobile_skin_dir'][$i]) ){
if( preg_match('#\.+(\/|\\\)#', $_POST['ca_mobile_skin_dir'][$i]) ){
alert('모바일 스킨폴더명에 포함될수 없는 문자가 들어있습니다.');
}
}
foreach( $check_files as $file ){
if( empty($file) ) continue;
if( preg_match('#\.+(\/|\\\)#', $file) ){
alert('스킨파일명에 포함될수 없는 문자가 들어있습니다.');
}
if( ! is_include_path_check($file) ){
alert('오류 : 데이터폴더가 포함된 path 또는 잘못된 path 를 포함할수 없습니다.');
}
$file_ext = pathinfo($file, PATHINFO_EXTENSION);
if( ! $file_ext || ! in_array($file_ext, array('php', 'htm', 'html')) || ! preg_match('/^.*\.(php|htm|html)$/i', $file) ) {
alert('스킨 파일 경로의 확장자는 php, htm, html 만 허용합니다.');
}
}
$p_ca_name = is_array($_POST['ca_name']) ? strip_tags(clean_xss_attributes($_POST['ca_name'][$i])) : '';
$posts = array();
$check_keys = array('ca_mb_id', 'ca_id', 'ca_use', 'ca_list_mod', 'ca_cert_use', 'ca_adult_use', 'ca_skin', 'ca_mobile_skin', 'ca_skin_dir', 'ca_mobile_skin_dir', 'ca_img_width', 'ca_img_height', 'ca_list_row', 'ca_mobile_list_mod', 'ca_mobile_list_row');
foreach($check_keys as $key){
$posts[$key] = (isset($_POST[$key]) && isset($_POST[$key][$i])) ? $_POST[$key][$i] : '';
}
$sql = " update {$g5['g5_shop_category_table']}
set ca_name = '".$p_ca_name."',
ca_mb_id = '".sql_real_escape_string(strip_tags(clean_xss_attributes($posts['ca_mb_id'])))."',
ca_use = '".sql_real_escape_string(strip_tags($posts['ca_use']))."',
ca_list_mod = '".sql_real_escape_string(strip_tags($posts['ca_list_mod']))."',
ca_cert_use = '".sql_real_escape_string(strip_tags($posts['ca_cert_use']))."',
ca_adult_use = '".sql_real_escape_string(strip_tags($posts['ca_adult_use']))."',
ca_skin = '".sql_real_escape_string(strip_tags($posts['ca_skin']))."',
ca_mobile_skin = '".sql_real_escape_string(strip_tags($posts['ca_mobile_skin']))."',
ca_skin_dir = '".sql_real_escape_string(strip_tags($posts['ca_skin_dir']))."',
ca_mobile_skin_dir = '".sql_real_escape_string(strip_tags($posts['ca_mobile_skin_dir']))."',
ca_img_width = '".sql_real_escape_string(strip_tags($posts['ca_img_width']))."',
ca_img_height = '".sql_real_escape_string(strip_tags($posts['ca_img_height']))."',
ca_list_row = '".sql_real_escape_string(strip_tags($posts['ca_list_row']))."',
ca_mobile_list_mod = '".sql_real_escape_string(strip_tags($posts['ca_mobile_list_mod']))."',
ca_mobile_list_row = '".sql_real_escape_string(strip_tags($posts['ca_mobile_list_row']))."'
where ca_id = '".sql_real_escape_string($posts['ca_id'])."' ";
sql_query($sql);
}
goto_url("./categorylist.php?$qstr");
-20
View File
@@ -1,20 +0,0 @@
<?php
include_once('./_common.php');
$name = '';
if ($it_id)
{
$row = get_shop_item($it_id, true);
$code = $it_id;
$name = $row['it_name'];
}
else if ($ca_id)
{
$sql = " select ca_name from {$g5['g5_shop_category_table']} where ca_id = '$ca_id' ";
$row = sql_fetch($sql);
$code = $ca_id;
$name = $row['ca_name'];
}
echo '{ "code": "' . $code . '", "name": "' . $name . '" }';
File diff suppressed because it is too large. Load diff
-463
View File
@@ -1,463 +0,0 @@
<?php
$sub_menu = '400100';
include_once('./_common.php');
check_demo();
auth_check_menu($auth, $sub_menu, "w");
check_admin_token();
// 대표전화번호 유효성 체크
if(! (isset($_POST['de_admin_company_tel']) && check_vaild_callback($_POST['de_admin_company_tel'])) )
alert('대표전화번호를 올바르게 입력해 주세요.');
// 로그인을 바로 이 주소로 하는 경우 쇼핑몰설정값이 사라지는 현상을 방지
if (!$_POST['de_admin_company_owner']) goto_url("./configform.php");
if (! empty($_POST['logo_img_del'])) @unlink(G5_DATA_PATH."/common/logo_img");
if (! empty($_POST['logo_img_del2'])) @unlink(G5_DATA_PATH."/common/logo_img2");
if (! empty($_POST['mobile_logo_img_del'])) @unlink(G5_DATA_PATH."/common/mobile_logo_img");
if (! empty($_POST['mobile_logo_img_del2'])) @unlink(G5_DATA_PATH."/common/mobile_logo_img2");
if ($_FILES['logo_img']['name']) upload_file($_FILES['logo_img']['tmp_name'], "logo_img", G5_DATA_PATH."/common");
if ($_FILES['logo_img2']['name']) upload_file($_FILES['logo_img2']['tmp_name'], "logo_img2", G5_DATA_PATH."/common");
if ($_FILES['mobile_logo_img']['name']) upload_file($_FILES['mobile_logo_img']['tmp_name'], "mobile_logo_img", G5_DATA_PATH."/common");
if ($_FILES['mobile_logo_img2']['name']) upload_file($_FILES['mobile_logo_img2']['tmp_name'], "mobile_logo_img2", G5_DATA_PATH."/common");
$de_kcp_mid = isset($_POST['de_kcp_mid']) ? substr($_POST['de_kcp_mid'], 0, 3) : '';
$cf_icode_server_port = isset($cf_icode_server_port) ? preg_replace('/[^0-9]/', '', $cf_icode_server_port) : '7295';
$de_shop_skin = isset($_POST['de_shop_skin']) ? preg_replace('#\.+(\/|\\\)#', '', $_POST['de_shop_skin']) : 'basic';
$de_shop_mobile_skin = isset($_POST['de_shop_mobile_skin']) ? preg_replace('#\.+(\/|\\\)#', '', $_POST['de_shop_mobile_skin']) : 'basic';
$skins = get_skin_dir('shop');
if(defined('G5_THEME_PATH') && $config['cf_theme']) {
$dirs = get_skin_dir('shop', G5_THEME_PATH.'/'.G5_SKIN_DIR);
if(!empty($dirs)) {
foreach($dirs as $dir) {
$skins[] = 'theme/'.$dir;
}
}
}
$mobile_skins = get_skin_dir('shop', G5_MOBILE_PATH.'/'.G5_SKIN_DIR);
if(defined('G5_THEME_PATH') && $config['cf_theme']) {
$dirs = get_skin_dir('shop', G5_THEME_MOBILE_PATH.'/'.G5_SKIN_DIR);
if(!empty($dirs)) {
foreach($dirs as $dir) {
$mobile_skins[] = 'theme/'.$dir;
}
}
}
$de_shop_skin = in_array($de_shop_skin, $skins) ? $de_shop_skin : 'basic';
$de_shop_mobile_skin = in_array($de_shop_mobile_skin, $mobile_skins) ? $de_shop_mobile_skin : 'basic';
$check_skin_keys = array('de_type1_list_skin', 'de_type2_list_skin', 'de_type3_list_skin', 'de_type4_list_skin', 'de_type5_list_skin', 'de_mobile_type1_list_skin', 'de_mobile_type2_list_skin', 'de_mobile_type3_list_skin', 'de_mobile_type4_list_skin', 'de_mobile_type5_list_skin', 'de_rel_list_skin', 'de_mobile_rel_list_skin', 'de_search_list_skin', 'de_mobile_search_list_skin', 'de_listtype_list_skin', 'de_mobile_listtype_list_skin');
foreach($check_skin_keys as $key){
$$key = $_POST[$key] = isset($_POST[$key]) ? preg_replace('#\.+(\/|\\\)#', '', strip_tags($_POST[$key])) : '';
if( isset($_POST[$key]) && preg_match('#\.+(\/|\\\)#', $_POST[$key]) ){
alert('스킨설정에 유효하지 문자가 포함되어 있습니다.');
}
}
// 현금영수증 발급수단
$de_taxsave_types = 'account'; // 무통장
if(isset($_POST['de_taxsave_types_vbank']) && $_POST['de_taxsave_types_vbank']){ //가상계좌
$de_taxsave_types .= ',vbank';
}
if(isset($_POST['de_taxsave_types_transfer']) && $_POST['de_taxsave_types_transfer']){ //실시간계좌이체
$de_taxsave_types .= ',transfer';
}
// NHN_KCP 간편결제 체크
$de_easy_pay_services = '';
if(isset($_POST['de_easy_pays'])){
$tmps = array();
foreach( (array) $_POST['de_easy_pays'] as $v ){
$tmps[] = preg_replace('/[^0-9a-z_\-]/i', '', $v);
}
$de_easy_pay_services = implode(",", $tmps);
}
//KVE-2019-0689, KVE-2019-0691, KVE-2019-0694
$check_sanitize_keys = array(
'de_admin_company_name', //회사명
'de_admin_company_saupja_no', //사업자등록번호
'de_admin_company_owner', //대표자명
'de_admin_company_tel', //대표전화번호
'de_admin_company_fax', //팩스번호
'de_admin_tongsin_no', //통신판매업 신고번호
'de_admin_buga_no', //부가통신 사업자번호
'de_admin_company_zip', //사업자우편번호
'de_admin_company_addr', //사업장주소
'de_admin_info_name', //정보관리책임자명
'de_admin_info_email', //정보책임자e-mail
'de_type1_list_mod', //히트상품출력 이미지수
'de_type1_list_row', //히트상품출력 줄수
'de_type1_img_width', //히트상품출력 이미지 폭
'de_type1_img_height', //히트상품출력 이미지 높이
'de_type2_list_mod', //추천상품출력 이미지 수
'de_type2_list_row', //추천상품출력 줄수
'de_type2_img_width', //추천상품출력 이미지 폭
'de_type2_img_height', //추천상품출력 이미지 높이
'de_type3_list_mod', //최신상품출력 이미지 수
'de_type3_list_row', //최신상품출력 줄수
'de_type3_img_width', //최신상품출력 이미지 폭
'de_type3_img_height', //최신상품출력 이미지 높이
'de_type4_list_mod', //인기상품출력 이미지 수
'de_type4_list_row', //인기상품출력 줄수
'de_type4_img_width', //인기상품출력 이미지 폭
'de_type4_img_height', //인기상품출력 이미지 높이
'de_type5_list_mod', //할인상품출력 이미지 수
'de_type5_list_row', //할인상품출력 줄수
'de_type5_img_width', //할인상품출력 이미지 폭
'de_type5_img_height', //할인상품출력 이미지 높이
'de_mobile_type1_list_mod', //모바일 히트상품출력 이미지수
'de_mobile_type1_list_row', //모바일 히트상품출력 줄수
'de_mobile_type1_img_width', //모바일 히트상품출력 이미지 폭
'de_mobile_type1_img_height', //모바일 히트상품출력 이미지 높이
'de_mobile_type2_list_mod', //모바일 추천상품출력 이미지수
'de_mobile_type2_list_row', //모바일 추천상품출력 줄수
'de_mobile_type2_img_width', //모바일 추천상품출력 이미지 폭
'de_mobile_type2_img_height', //모바일 추천상품출력 이미지 높이
'de_mobile_type3_list_mod', //모바일 최신상품출력 이미지수
'de_mobile_type3_list_row', //모바일 최신상품출력 줄수
'de_mobile_type3_img_width', //모바일 최신상품출력 이미지 폭
'de_mobile_type3_img_height', //모바일 최신상품출력 이미지 높이
'de_mobile_type4_list_mod', //모바일 인기상품출력 이미지수
'de_mobile_type4_list_row', //모바일 인기상품출력 줄수
'de_mobile_type4_img_width', //모바일 인기상품출력 이미지 폭
'de_mobile_type4_img_height', //모바일 인기상품출력 이미지 높이
'de_mobile_type5_list_mod', //모바일 할인상품출력 이미지수
'de_mobile_type5_list_row', //모바일 할인상품출력 줄수
'de_mobile_type5_img_width', //모바일 할인상품출력 이미지 폭
'de_mobile_type5_img_height', //모바일 할인상품출력 이미지 높이
'de_bank_use', //무통장입금사용
'de_bank_account', //은행계좌번호
'de_iche_use', //계좌이체 결제사용
'de_vbank_use', //가상계좌 결제사용
'de_hp_use', //휴대폰결제 결제사용
'de_card_use', //신용카드 결제사용
'de_card_noint_use', //신용카드 무이자할부사용
'de_easy_pay_use', //PG사 간편결제 버튼 사용
'de_taxsave_use', //현금영수증 발급사용
'cf_use_point', //포인트 사용
'de_settle_min_point', //결제 최소포인트
'de_settle_max_point', //최대 결제포인트
'de_settle_point_unit', //결제 포인트단위
'de_card_point', //포인트부여
'de_point_days', //주문완료 포인트
'de_pg_service', //결제대행사
'de_kcp_mid', //KCP SITE CODE
'de_kcp_site_key', //NHN KCP SITE KEY
'cf_lg_mid', //LG유플러스 상점아이디
'cf_lg_mert_key', //LG유플러스 MERT KEY
'de_inicis_mid', //KG이니시스 상점아이디
'de_inicis_admin_key', //KG이니시스 키패스워드
'de_inicis_sign_key', //KG이니시스 웹결제 사인키
'de_samsung_pay_use', //KG이니시스 삼성페이 사용
'de_inicis_lpay_use', //KG이니시스 Lpay 사용
'de_inicis_kakaopay_use', //KG이니시스 카카오페이 사용
'de_inicis_cartpoint_use', //KG이니시스 신용카드 포인트 결제
'de_kakaopay_mid', //카카오페이 상점MID
'de_kakaopay_key', //카카오페이 상점키
'de_kakaopay_enckey', //카카오페이 상점 EncKey
'de_kakaopay_hashkey', //카카오페이 상점 HashKey
'de_kakaopay_cancelpwd', //카카오페이 결제취소 비밀번호
'de_naverpay_mid', //네이버페이 가맹점 아이디
'de_naverpay_cert_key', //네이버페이 가맹점 인증키
'de_naverpay_button_key', //네이버페이 버튼 인증키
'de_naverpay_test', //네이버페이 결제테스트
'de_naverpay_mb_id', //네이버페이 결제테스트 아이디
'de_naverpay_sendcost', //네이버페이 추가배송비 안내
'de_escrow_use', //에스크로 사용
'de_card_test', //결제 테스트
'de_tax_flag_use', //복합과세 결제
'de_delivery_company', //배송업체
'de_send_cost_case', //배송비유형
'de_send_cost_limit', //배송비상한가
'de_send_cost_list', //배송비
'de_hope_date_use', //희망배송일사용
'de_hope_date_after', //희망배송일지정
'de_rel_img_width', //관련상품출력 이미지폭
'de_rel_img_height', //관련상품출력 이미지높이
'de_rel_list_mod', //관련상품출력 1줄당 이미지 수
'de_rel_list_use', //관련상품출력 출력여부
'de_mobile_rel_img_width', //모바일 관련상품출력 이미지폭
'de_mobile_rel_img_height', //모바일 관련상품출력 이미지높이
'de_mobile_rel_list_mod', //모바일 관련상품출력 1줄당 이미지 수
'de_mobile_rel_list_use', //모바일 관련상품출력 출력여부
'de_search_img_width', //검색상품출력 이미지폭
'de_search_img_height', //검색상품출력 이미지높이
'de_search_list_mod', //검색상품출력 1줄당 이미지 수
'de_search_list_row', //검색상품출력 출력할 줄 수
'de_mobile_search_img_width', //모바일 검색상품출력 이미지폭
'de_mobile_search_img_height', //모바일 검색상품출력 이미지높이
'de_mobile_search_list_mod', //모바일 검색상품출력 1줄당 이미지 수
'de_mobile_search_list_row', //모바일 검색상품출력 출력할 줄 수
'de_listtype_img_width', //유형별 상품리스트 이미지폭
'de_listtype_list_mod', //유형별 상품리스트 1줄당 이미지 수
'de_listtype_list_row', //유형별 상품리스트 출력할 줄 수
'de_mobile_listtype_img_width', //모바일 유형별 상품리스트 이미지폭
'de_mobile_listtype_img_height',//모바일 유형별 상품리스트 이미지높이
'de_mobile_listtype_list_mod', //모바일 유형별 상품리스트 1줄당 이미지 수
'de_mobile_listtype_list_row', //모바일 유형별 상품리스트 출력할 줄 수
'de_simg_width', //이미지(소) 폭
'de_simg_height', //이미지(소) 높이
'de_mimg_width', //이미지(중) 폭
'de_mimg_height', //이미지(중) 높이
'de_item_use_write', //사용후기 작성
'de_item_use_use', //사용후기
'de_level_sell', //상품구입 권한
'de_code_dup_use', //코드 중복검사
'de_cart_keep_term', //장바구니 보관기간
'de_guest_cart_use', //비회원 장바구니
'de_member_reg_coupon_use', //신규회원 쿠폰발행 여부
'de_member_reg_coupon_price', //신규회원 쿠폰발행 쿠폰할인금액
'de_member_reg_coupon_minimum', //주문최소금액
'de_member_reg_coupon_term', //쿠폰유효기간
'cf_sms_use', //SMS 사용
'cf_sms_type', //SMS 전송유형
'de_sms_hp', //관리자 휴대폰번호
'cf_icode_id', //아이코드 회원아이디
'cf_icode_pw', //아이코드 비밀번호
'de_sms_use1', //SMS 회원가입시 고객님께 발송
'de_sms_use2', //SMS 주문시 고객님께 발송
'de_sms_use3', //SMS 주문시 주문시 관리자에게 발송
'de_sms_use4', //SMS 입금확인시 고객님께 발송
'de_sms_use5', //SMS 상품배송시 고객님께 발송
'cf_icode_server_ip', // 아이코드 ip
'cf_icode_server_port', // 아이코드 port
'cf_icode_token_key', // 아이코드 토큰키 (JSON버전)
);
foreach( $check_sanitize_keys as $key ){
$$key = isset($_POST[$key]) ? clean_xss_tags($_POST[$key], 1, 1) : '';
}
$warning_msg = '';
// kcp 전자결제를 사용할 때 site key 입력체크
if($de_pg_service == 'kcp' && ! $de_card_test && ($de_iche_use || $de_vbank_use || $de_hp_use || $de_card_use)) {
if(! trim($de_kcp_site_key))
alert('NHN KCP SITE KEY를 입력해 주십시오.');
}
if( $de_kakaopay_enckey && ($de_pg_service === 'inicis' || $de_inicis_lpay_use || $de_inicis_kakaopay_use) ){
$warning_msg = 'KG 이니시스 결제 또는 L.pay 또는 KG이니시스 카카오페이를 사용시 결제모듈 중복문제로 카카오페이를 활성화 할수 없습니다. \\n\\n카카오페이 사용을 비활성화 합니다.';
$de_kakaopay_enckey = '';
}
//
// 영카트 default
//
$sql = " update {$g5['g5_shop_default_table']}
set de_admin_company_owner = '{$de_admin_company_owner}',
de_admin_company_name = '{$de_admin_company_name}',
de_admin_company_saupja_no = '{$de_admin_company_saupja_no}',
de_admin_company_tel = '{$de_admin_company_tel}',
de_admin_company_fax = '{$de_admin_company_fax}',
de_admin_tongsin_no = '{$de_admin_tongsin_no}',
de_admin_company_zip = '{$de_admin_company_zip}',
de_admin_company_addr = '{$de_admin_company_addr}',
de_admin_info_name = '{$de_admin_info_name}',
de_admin_info_email = '{$de_admin_info_email}',
de_shop_skin = '{$de_shop_skin}',
de_shop_mobile_skin = '{$de_shop_mobile_skin}',
de_type1_list_use = '{$_POST['de_type1_list_use']}',
de_type1_list_skin = '{$_POST['de_type1_list_skin']}',
de_type1_list_mod = '{$de_type1_list_mod}',
de_type1_list_row = '{$de_type1_list_row}',
de_type1_img_width = '{$de_type1_img_width}',
de_type1_img_height = '{$de_type1_img_height}',
de_type2_list_use = '{$de_type2_list_use}',
de_type2_list_skin = '{$de_type2_list_skin}',
de_type2_list_mod = '{$de_type2_list_mod}',
de_type2_list_row = '{$de_type2_list_row}',
de_type2_img_width = '{$de_type2_img_width}',
de_type2_img_height = '{$de_type2_img_height}',
de_type3_list_use = '{$de_type3_list_use}',
de_type3_list_skin = '{$de_type3_list_skin}',
de_type3_list_mod = '{$de_type3_list_mod}',
de_type3_list_row = '{$de_type3_list_row}',
de_type3_img_width = '{$de_type3_img_width}',
de_type3_img_height = '{$de_type3_img_height}',
de_type4_list_use = '{$de_type4_list_use}',
de_type4_list_skin = '{$de_type4_list_skin}',
de_type4_list_mod = '{$de_type4_list_mod}',
de_type4_list_row = '{$de_type4_list_row}',
de_type4_img_width = '{$de_type4_img_width}',
de_type4_img_height = '{$de_type4_img_height}',
de_type5_list_use = '{$de_type5_list_use}',
de_type5_list_skin = '{$de_type5_list_skin}',
de_type5_list_mod = '{$de_type5_list_mod}',
de_type5_list_row = '{$de_type5_list_row}',
de_type5_img_width = '{$de_type5_img_width}',
de_type5_img_height = '{$de_type5_img_height}',
de_mobile_type1_list_use = '{$de_mobile_type1_list_use}',
de_mobile_type1_list_skin = '{$de_mobile_type1_list_skin}',
de_mobile_type1_list_mod = '{$de_mobile_type1_list_mod}',
de_mobile_type1_list_row = '{$de_mobile_type1_list_row}',
de_mobile_type1_img_width = '{$de_mobile_type1_img_width}',
de_mobile_type1_img_height = '{$de_mobile_type1_img_height}',
de_mobile_type2_list_use = '{$de_mobile_type2_list_use}',
de_mobile_type2_list_skin = '{$de_mobile_type2_list_skin}',
de_mobile_type2_list_mod = '{$de_mobile_type2_list_mod}',
de_mobile_type2_list_row = '{$de_mobile_type2_list_row}',
de_mobile_type2_img_width = '{$de_mobile_type2_img_width}',
de_mobile_type2_img_height = '{$de_mobile_type2_img_height}',
de_mobile_type3_list_use = '{$de_mobile_type3_list_use}',
de_mobile_type3_list_skin = '{$de_mobile_type3_list_skin}',
de_mobile_type3_list_mod = '{$de_mobile_type3_list_mod}',
de_mobile_type3_list_row = '{$de_mobile_type3_list_row}',
de_mobile_type3_img_width = '{$de_mobile_type3_img_width}',
de_mobile_type3_img_height = '{$de_mobile_type3_img_height}',
de_mobile_type4_list_use = '{$de_mobile_type4_list_use}',
de_mobile_type4_list_skin = '{$de_mobile_type4_list_skin}',
de_mobile_type4_list_mod = '{$de_mobile_type4_list_mod}',
de_mobile_type4_list_row = '{$de_mobile_type4_list_row}',
de_mobile_type4_img_width = '{$de_mobile_type4_img_width}',
de_mobile_type4_img_height = '{$de_mobile_type4_img_height}',
de_mobile_type5_list_use = '{$de_mobile_type5_list_use}',
de_mobile_type5_list_skin = '{$de_mobile_type5_list_skin}',
de_mobile_type5_list_mod = '{$de_mobile_type5_list_mod}',
de_mobile_type5_list_row = '{$de_mobile_type5_list_row}',
de_mobile_type5_img_width = '{$de_mobile_type5_img_width}',
de_mobile_type5_img_height = '{$de_mobile_type5_img_height}',
de_rel_list_use = '{$de_rel_list_use}',
de_rel_list_skin = '{$_POST['de_rel_list_skin']}',
de_rel_list_mod = '{$de_rel_list_mod}',
de_rel_img_width = '{$de_rel_img_width}',
de_rel_img_height = '{$de_rel_img_height}',
de_mobile_rel_list_use = '{$de_mobile_rel_list_use}',
de_mobile_rel_list_skin = '{$_POST['de_mobile_rel_list_skin']}',
de_mobile_rel_list_mod = '{$de_mobile_rel_list_mod}',
de_mobile_rel_img_width = '{$de_mobile_rel_img_width}',
de_mobile_rel_img_height = '{$de_mobile_rel_img_height}',
de_search_list_skin = '{$_POST['de_search_list_skin']}',
de_search_list_mod = '{$de_search_list_mod}',
de_search_list_row = '{$de_search_list_row}',
de_search_img_width = '{$de_search_img_width}',
de_search_img_height = '{$de_search_img_height}',
de_mobile_search_list_skin = '{$_POST['de_mobile_search_list_skin']}',
de_mobile_search_list_mod = '{$de_mobile_search_list_mod}',
de_mobile_search_list_row = '{$de_mobile_search_list_row}',
de_mobile_search_img_width = '{$de_mobile_search_img_width}',
de_mobile_search_img_height = '{$de_mobile_search_img_height}',
de_listtype_list_skin = '{$_POST['de_listtype_list_skin']}',
de_listtype_list_mod = '{$de_listtype_list_mod}',
de_listtype_list_row = '{$de_listtype_list_row}',
de_listtype_img_width = '{$de_listtype_img_width}',
de_listtype_img_height = '{$_POST['de_listtype_img_height']}',
de_mobile_listtype_list_skin = '{$_POST['de_mobile_listtype_list_skin']}',
de_mobile_listtype_list_mod = '{$de_mobile_listtype_list_mod}',
de_mobile_listtype_list_row = '{$de_mobile_listtype_list_row}',
de_mobile_listtype_img_width = '{$de_mobile_listtype_img_width}',
de_mobile_listtype_img_height = '{$de_mobile_listtype_img_height}',
de_bank_use = '{$de_bank_use}',
de_bank_account = '{$de_bank_account}',
de_card_test = '{$de_card_test}',
de_card_use = '{$de_card_use}',
de_easy_pay_use = '{$de_easy_pay_use}',
de_easy_pay_services = '{$de_easy_pay_services}',
de_samsung_pay_use = '{$de_samsung_pay_use}',
de_inicis_lpay_use = '{$de_inicis_lpay_use}',
de_inicis_kakaopay_use = '{$de_inicis_kakaopay_use}',
de_inicis_cartpoint_use = '{$de_inicis_cartpoint_use}',
de_card_noint_use = '{$de_card_noint_use}',
de_card_point = '{$de_card_point}',
de_settle_min_point = '{$de_settle_min_point}',
de_settle_max_point = '{$de_settle_max_point}',
de_settle_point_unit = '{$de_settle_point_unit}',
de_level_sell = '{$de_level_sell}',
de_delivery_company = '{$de_delivery_company}',
de_send_cost_case = '{$de_send_cost_case}',
de_send_cost_limit = '{$de_send_cost_limit}',
de_send_cost_list = '{$de_send_cost_list}',
de_hope_date_use = '{$de_hope_date_use}',
de_hope_date_after = '{$de_hope_date_after}',
de_baesong_content = '{$_POST['de_baesong_content']}',
de_change_content = '{$_POST['de_change_content']}',
de_point_days = '{$de_point_days}',
de_simg_width = '{$de_simg_width}',
de_simg_height = '{$de_simg_height}',
de_mimg_width = '{$de_mimg_width}',
de_mimg_height = '{$de_mimg_height}',
de_pg_service = '{$de_pg_service}',
de_kcp_mid = '{$de_kcp_mid}',
de_kcp_site_key = '{$de_kcp_site_key}',
de_inicis_mid = '{$de_inicis_mid}',
de_inicis_admin_key = '{$de_inicis_admin_key}',
de_inicis_sign_key = '{$de_inicis_sign_key}',
de_iche_use = '{$de_iche_use}',
de_sms_cont1 = '{$_POST['de_sms_cont1']}',
de_sms_cont2 = '{$_POST['de_sms_cont2']}',
de_sms_cont3 = '{$_POST['de_sms_cont3']}',
de_sms_cont4 = '{$_POST['de_sms_cont4']}',
de_sms_cont5 = '{$_POST['de_sms_cont5']}',
de_sms_use1 = '{$de_sms_use1}',
de_sms_use2 = '{$de_sms_use2}',
de_sms_use3 = '{$de_sms_use3}',
de_sms_use4 = '{$de_sms_use4}',
de_sms_use5 = '{$de_sms_use5}',
de_sms_hp = '{$de_sms_hp}',
de_item_use_use = '{$de_item_use_use}',
de_item_use_write = '{$de_item_use_write}',
de_code_dup_use = '{$de_code_dup_use}',
de_cart_keep_term = '{$de_cart_keep_term}',
de_guest_cart_use = '{$de_guest_cart_use}',
de_admin_buga_no = '{$de_admin_buga_no}',
de_vbank_use = '{$de_vbank_use}',
de_taxsave_use = '{$de_taxsave_use}',
de_taxsave_types = '{$de_taxsave_types}',
de_guest_privacy = '{$_POST['de_guest_privacy']}',
de_hp_use = '{$de_hp_use}',
de_escrow_use = '{$de_escrow_use}',
de_tax_flag_use = '{$de_tax_flag_use}',
de_kakaopay_mid = '{$de_kakaopay_mid}',
de_kakaopay_key = '{$de_kakaopay_key}',
de_kakaopay_enckey = '{$de_kakaopay_enckey}',
de_kakaopay_hashkey = '{$de_kakaopay_hashkey}',
de_kakaopay_cancelpwd = '{$de_kakaopay_cancelpwd}',
de_naverpay_mid = '{$de_naverpay_mid}',
de_naverpay_cert_key = '{$de_naverpay_cert_key}',
de_naverpay_button_key = '{$de_naverpay_button_key}',
de_naverpay_test = '{$de_naverpay_test}',
de_naverpay_mb_id = '{$de_naverpay_mb_id}',
de_naverpay_sendcost = '{$de_naverpay_sendcost}',
de_member_reg_coupon_use = '{$de_member_reg_coupon_use}',
de_member_reg_coupon_term = '{$de_member_reg_coupon_term}',
de_member_reg_coupon_price = '{$de_member_reg_coupon_price}',
de_member_reg_coupon_minimum = '{$de_member_reg_coupon_minimum}'
";
sql_query($sql);
// 환경설정 > 포인트 사용
sql_query(" update {$g5['config_table']} set cf_use_point = '{$cf_use_point}' ");
// LG, 아이코드 설정
$sql = " update {$g5['config_table']}
set cf_sms_use = '{$cf_sms_use}',
cf_sms_type = '{$cf_sms_type}',
cf_icode_id = '{$cf_icode_id}',
cf_icode_pw = '{$cf_icode_pw}',
cf_icode_server_ip = '{$_POST['cf_icode_server_ip']}',
cf_icode_server_port = '{$_POST['cf_icode_server_port']}',
cf_icode_token_key = '{$cf_icode_token_key}',
cf_lg_mid = '{$cf_lg_mid}',
cf_lg_mert_key = '{$cf_lg_mert_key}' ";
sql_query($sql);
if( $warning_msg ){
alert($warning_msg, "./configform.php");
} else {
goto_url("./configform.php");
}
-295
View File
@@ -1,295 +0,0 @@
<?php
$sub_menu = '400800';
include_once('./_common.php');
auth_check_menu($auth, $sub_menu, "w");
$cp_id = isset($_REQUEST['cp_id']) ? clean_xss_tags($_REQUEST['cp_id'], 1, 1) : '';
$cp = array(
'cp_method'=>'',
'cp_subject'=>'',
'cp_target'=>'',
'mb_id'=>'',
'cp_type'=>'',
'cp_price'=>'',
'cp_trunc'=>'',
'cp_minimum'=>'',
'cp_maximum'=>'',
);
$g5['title'] = '쿠폰관리';
if ($w == 'u') {
$html_title = '쿠폰 수정';
$sql = " select * from {$g5['g5_shop_coupon_table']} where cp_id = '$cp_id' ";
$cp = sql_fetch($sql);
if (!$cp['cp_id']) alert('등록된 자료가 없습니다.');
}
else
{
$html_title = '쿠폰 입력';
$cp['cp_start'] = G5_TIME_YMD;
$cp['cp_end'] = date('Y-m-d', (G5_SERVER_TIME + 86400 * 7));
}
if($cp['cp_method'] == 1) {
$cp_target_label = '적용분류';
$cp_target_btn = '분류검색';
} else {
$cp_target_label = '적용상품';
$cp_target_btn = '상품검색';
}
include_once (G5_ADMIN_PATH.'/admin.head.php');
include_once(G5_PLUGIN_PATH.'/jquery-ui/datepicker.php');
?>
<form name="fcouponform" action="./couponformupdate.php" method="post" onsubmit="return form_check(this);">
<input type="hidden" name="w" value="<?php echo $w; ?>">
<input type="hidden" name="cp_id" value="<?php echo $cp_id; ?>">
<input type="hidden" name="sst" value="<?php echo $sst; ?>">
<input type="hidden" name="sod" value="<?php echo $sod; ?>">
<input type="hidden" name="sfl" value="<?php echo $sfl; ?>">
<input type="hidden" name="stx" value="<?php echo $stx; ?>">
<input type="hidden" name="page" value="<?php echo $page;?>">
<div class="tbl_frm01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?></caption>
<colgroup>
<col class="grid_4">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row"><label for="cp_subject">쿠폰이름</label></th>
<td>
<input type="text" name="cp_subject" value="<?php echo get_sanitize_input($cp['cp_subject']); ?>" id="cp_subject" required class="required frm_input" size="50">
</td>
</tr>
<tr>
<th scope="row"><label for="cp_method">쿠폰종류</label></th>
<td>
<?php echo help("쿠폰 종류를 변경하시면 입력 서식도 일부 변경됩니다."); ?>
<select name="cp_method" id="cp_method">
<option value="0"<?php echo get_selected('0', $cp['cp_method']); ?>>개별상품할인</option>
<option value="1"<?php echo get_selected('1', $cp['cp_method']); ?>>카테고리할인</option>
<option value="2"<?php echo get_selected('2', $cp['cp_method']); ?>>주문금액할인</option>
<option value="3"<?php echo get_selected('3', $cp['cp_method']); ?>>배송비할인</option>
</select>
</td>
</tr>
<tr id="tr_cp_target">
<th scope="row"><label for="cp_target"><?php echo $cp_target_label; ?></label></th>
<td>
<input type="text" name="cp_target" value="<?php echo stripslashes($cp['cp_target']); ?>" id="cp_target" required class="required frm_input">
<button type="button" id="sch_target" class="btn_frmline"><?php echo $cp_target_btn; ?></button>
</td>
</tr>
<tr>
<th scope="row"><label for="mb_id">회원아이디</label></th>
<td>
<input type="text" name="mb_id" value="<?php echo stripslashes($cp['mb_id']); ?>" id="mb_id" class="frm_input">
<button type="button" id="sch_member" class="btn_frmline">회원검색</button>
<input type="checkbox" name="chk_all_mb" id="chk_all_mb" value="1">
<label for="chk_all_mb">전체회원</label>
</td>
</tr>
<tr>
<th scope="row"><label for="cp_start">사용시작일</label></th>
<td>
<?php echo help('입력 예: '.date('Y-m-d')); ?>
<input type="text" name="cp_start" value="<?php echo stripslashes($cp['cp_start']); ?>" id="cp_start" required class="frm_input required">
</td>
</tr>
<tr>
<th scope="row"><label for="cp_end">사용종료일</label></th>
<td>
<?php echo help('입력 예: '.date('Y-m-d')); ?>
<input type="text" name="cp_end" value="<?php echo stripslashes($cp['cp_end']); ?>" id="cp_end" required class="frm_input required">
</td>
</tr>
<tr>
<th scope="row"><label for="cp_type">쿠폰타입</label></th>
<td>
<?php echo help("쿠폰 타입을 변경하시면 입력 서식도 일부 변경됩니다."); ?>
<select name="cp_type" id="cp_type">
<option value="0"<?php echo get_selected('0', $cp['cp_type']); ?>>정액할인(원)</option>
<option value="1"<?php echo get_selected('1', $cp['cp_type']); ?>>정률할인(%)</option>
</select>
</td>
</tr>
<tr>
<th scope="row"><label for="cp_price"><?php echo $cp['cp_type'] ? '할인비율' : '할인금액'; ?></label></th>
<td>
<input type="text" name="cp_price" value="<?php echo stripslashes($cp['cp_price']); ?>" id="cp_price" required class="frm_input required"> <span id="cp_price_unit"><?php echo $cp['cp_type'] ? '%' : '원'; ?></span>
</td>
</tr>
<tr id="tr_cp_trunc">
<th scope="row"><label for="cp_trunc">절사금액</label></th>
<td>
<select name="cp_trunc" id="cp_trunc">
<option value="1"<?php echo get_selected('1', $cp['cp_trunc']); ?>>1원단위</option>
<option value="10"<?php echo get_selected('10', $cp['cp_trunc']); ?>>10원단위</option>
<option value="100"<?php echo get_selected('100', $cp['cp_trunc']); ?>>100원단위</option>
<option value="1000"<?php echo get_selected('1000', $cp['cp_trunc']); ?>>1,000원단위</option>
</select>
</td>
</tr>
<tr>
<th scope="row"><label for="cp_minimum">최소주문금액</label></th>
<td>
<input type="text" name="cp_minimum" value="<?php echo stripslashes($cp['cp_minimum']); ?>" id="cp_minimum" class="frm_input"> 원
</td>
</tr>
<tr id="tr_cp_maximum">
<th scope="row"><label for="cp_maximum">최대할인금액</label></th>
<td>
<input type="text" name="cp_maximum" value="<?php echo stripslashes($cp['cp_maximum']); ?>" id="cp_maximum" class="frm_input"> 원
</td>
</tr>
<?php if($w == '') { ?>
<tr>
<th scope="row">쿠폰발행알림</th>
<td>
<label for="cp_sms_send">SMS발송</label>
<input type="checkbox" name="cp_sms_send" value="1" id="cp_sms_send" checked>
<label for="cp_email_send">이메일발송</label>
<input type="checkbox" name="cp_email_send" value="1" id="cp_email_send" checked>
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
<div class="btn_fixed_top">
<a href="./couponlist.php" class="btn btn_02">목록</a>
<input type="submit" value="확인" class="btn_submit btn" accesskey="s">
</div>
</form>
<script>
$(function() {
<?php if($cp['cp_method'] == 2 || $cp['cp_method'] == 3) { ?>
$("#tr_cp_target").hide();
$("#tr_cp_target").find("input").attr("required", false).removeClass("required");
<?php } ?>
<?php if($cp['cp_type'] != 1) { ?>
$("#tr_cp_maximum").hide();
$("#tr_cp_trunc").hide();
<?php } ?>
$("#cp_method").change(function() {
var cp_method = $(this).val();
change_method(cp_method);
});
$("#cp_type").change(function() {
var cp_type = $(this).val();
change_type(cp_type);
});
$("#sch_target").click(function() {
var cp_method = $("#cp_method").val();
var opt = "left=50,top=50,width=520,height=600,scrollbars=1";
var url = "./coupontarget.php?sch_target=";
if(cp_method == "0") {
window.open(url+"0", "win_target", opt);
} else if(cp_method == "1") {
window.open(url+"1", "win_target", opt);
} else {
return false;
}
});
$("#sch_member").click(function() {
if($("#chk_all_mb").is(":checked")) {
alert("전체회원 체크를 해제 후 이용해 주십시오.");
return false;
}
var opt = "left=50,top=50,width=520,height=600,scrollbars=1";
var url = "./couponmember.php";
window.open(url, "win_member", opt);
});
$("#cp_start, #cp_end").datepicker(
{ changeMonth: true, changeYear: true, dateFormat: "yy-mm-dd", showButtonPanel: true, yearRange: "c-99:c+99" }
);
});
function change_method(cp_method)
{
if(cp_method == "0") {
$("#sch_target").text("상품검색");
$("#tr_cp_target").find("label").text("적용상품");
$("#tr_cp_target").find("input").attr("required", true).addClass("required");
$("#tr_cp_target").show();
} else if(cp_method == "1") {
$("#sch_target").text("분류검색");
$("#tr_cp_target").find("label").text("적용분류");
$("#tr_cp_target").find("input").attr("required", true).addClass("required");
$("#tr_cp_target").show();
} else {
$("#tr_cp_target").hide();
$("#tr_cp_target").find("input").attr("required", false).removeClass("required");
}
}
function change_type(cp_type)
{
if(cp_type == "0") {
$("#cp_price_unit").text("원");
$("#cp_price_unit").closest("tr").find("label").text("할인금액");
$("#tr_cp_maximum").hide();
$("#tr_cp_trunc").hide();
} else {
$("#cp_price_unit").text("%");
$("#cp_price_unit").closest("tr").find("label").text("할인비율");
$("#tr_cp_maximum").show();
$("#tr_cp_trunc").show();
}
}
function form_check(f)
{
var sel_type = f.cp_type;
var cp_type = sel_type.options[sel_type.selectedIndex].value;
var cp_price = f.cp_price.value;
if(!f.chk_all_mb.checked && f.mb_id.value == "") {
alert("회원아이디를 입력해 주십시오.");
return false;
}
if(isNaN(cp_price)) {
if(cp_type == "1")
alert("할인비율을 숫자로 입력해 주십시오.");
else
alert("할인금액을 숫자로 입력해 주십시오.");
return false;
}
cp_price = parseInt(cp_price);
if(cp_type == "1" && (cp_price < 1 || cp_price > 99)) {
alert("할인비율을 1과 99 사이의 숫자로 입력해 주십시오.");
return false;
}
// 전체회원일 때 쿠폰알림 체크되어 있으면 확인창
if(f.chk_all_mb.checked && (f.cp_sms_send.checked || f.cp_email_send.checked)) {
if(!confirm("전체회원에게 쿠폰발행알림을 발송하시겠습니까?"))
return false;
}
return true;
}
</script>
<?php
include_once (G5_ADMIN_PATH.'/admin.tail.php');
-267
View File
@@ -1,267 +0,0 @@
<?php
$sub_menu = '400800';
include_once('./_common.php');
auth_check_menu($auth, $sub_menu, "w");
check_admin_token();
$_POST = array_map('trim', $_POST);
$check_sanitize_keys = array(
'cp_subject', // 쿠폰이름
'cp_method', // 쿠폰종류
'cp_target', // 적용상품
'mb_id', // 회원아이디
'cp_start', // 사용시작일
'cp_end', // 사용종료일
'cp_type', // 쿠폰타입
'cp_price', // 할인금액
'cp_type', // 할인금액타입
'cp_trunc', // 절사금액
'cp_minimum', // 최소주문금액
'cp_maximum', // 최대할인금액
'chk_all_mb' // 전체회원 체크
);
foreach( $check_sanitize_keys as $key ){
$$key = $_POST[$key] = isset($_POST[$key]) ? strip_tags(clean_xss_attributes($_POST[$key])) : '';
}
if(!$_POST['cp_subject'])
alert('쿠폰이름을 입력해 주십시오.');
if($_POST['cp_method'] == 0 && !$_POST['cp_target'])
alert('적용상품을 입력해 주십시오.');
if($_POST['cp_method'] == 1 && !$_POST['cp_target'])
alert('적용분류를 입력해 주십시오.');
if(!$_POST['mb_id'] && !$_POST['chk_all_mb'])
alert('회원아이디를 입력해 주십시오.');
if(!$_POST['cp_start'] || !$_POST['cp_end'])
alert('사용 시작일과 종료일을 입력해 주십시오.');
if($_POST['cp_start'] > $_POST['cp_end'])
alert('사용 시작일은 종료일 이전으로 입력해 주십시오.');
if($_POST['cp_end'] < G5_TIME_YMD)
alert('종료일은 오늘('.G5_TIME_YMD.')이후로 입력해 주십시오.');
if(!$_POST['cp_price']) {
if($_POST['cp_type'])
alert('할인비율을 입력해 주십시오.');
else
alert('할인금액을 입력해 주십시오.');
}
if( (int) $_POST['cp_price'] < 0 ){
alert('할인금액 또는 할인비율은 음수를 입력할수 없습니다.');
}
if($_POST['cp_type'] && ($_POST['cp_price'] < 1 || $_POST['cp_price'] > 99))
alert('할인비율을 1과 99사이 값으로 입력해 주십시오.');
if($_POST['cp_method'] == 0) {
$sql = " select count(*) as cnt from {$g5['g5_shop_item_table']} where it_id = '$cp_target' and it_nocoupon = '0' ";
$row = sql_fetch($sql);
if(!$row['cnt'])
alert('입력하신 상품코드는 존재하지 않는 코드이거나 쿠폰적용안함으로 설정된 상품입니다.');
} else if($_POST['cp_method'] == 1) {
$sql = " select count(*) as cnt from {$g5['g5_shop_category_table']} where ca_id = '$cp_target' and ca_nocoupon = '0' ";
$row = sql_fetch($sql);
if(!$row['cnt'])
alert('입력하신 분류코드는 존재하지 않는 분류코드이거나 쿠폰적용안함으로 설정된 분류입니다.');
}
if($w == '') {
if($_POST['chk_all_mb']) {
$mb_id = '전체회원';
} else {
$sql = " select mb_id from {$g5['member_table']} where mb_id = '{$_POST['mb_id']}' and mb_leave_date = '' and mb_intercept_date = '' ";
$row = sql_fetch($sql);
if(!$row['mb_id'])
alert('입력하신 회원아이디는 존재하지 않거나 탈퇴 또는 차단된 회원아이디입니다.');
$mb_id = $_POST['mb_id'];
}
$j = 0;
do {
$cp_id = get_coupon_id();
$sql3 = " select count(*) as cnt from {$g5['g5_shop_coupon_table']} where cp_id = '$cp_id' ";
$row3 = sql_fetch($sql3);
if(!$row3['cnt'])
break;
else {
if($j > 20)
die('Coupon ID Error');
}
$j++;
} while(1);
$sql = " INSERT INTO {$g5['g5_shop_coupon_table']}
( cp_id, cp_subject, cp_method, cp_target, mb_id, cp_start, cp_end, cp_type, cp_price, cp_trunc, cp_minimum, cp_maximum, cp_datetime )
VALUES
( '$cp_id', '$cp_subject', '$cp_method', '$cp_target', '$mb_id', '$cp_start', '$cp_end', '$cp_type', '$cp_price', '$cp_trunc', '$cp_minimum', '$cp_maximum', '".G5_TIME_YMDHIS."' ) ";
sql_query($sql);
} else if($w == 'u') {
$sql = " select * from {$g5['g5_shop_coupon_table']} where cp_id = '$cp_id' ";
$cp = sql_fetch($sql);
if(!$cp['cp_id'])
alert('쿠폰정보가 존재하지 않습니다.', './couponlist.php');
if($_POST['chk_all_mb']) {
$mb_id = '전체회원';
}
$sql = " update {$g5['g5_shop_coupon_table']}
set cp_subject = '$cp_subject',
cp_method = '$cp_method',
cp_target = '$cp_target',
mb_id = '$mb_id',
cp_start = '$cp_start',
cp_end = '$cp_end',
cp_type = '$cp_type',
cp_price = '$cp_price',
cp_trunc = '$cp_trunc',
cp_maximum = '$cp_maximum',
cp_minimum = '$cp_minimum'
where cp_id = '$cp_id' ";
sql_query($sql);
}
// 쿠폰생성알림 발송
if($w == '' && ($_POST['cp_sms_send'] || $_POST['cp_email_send'])) {
include_once(G5_LIB_PATH.'/mailer.lib.php');
$sms_count = 0;
$arr_send_list = array();
$sms_messages = array();
if($_POST['chk_all_mb']) {
$sql = " select mb_id, mb_name, mb_hp, mb_email, mb_mailling, mb_sms
from {$g5['member_table']}
where mb_leave_date = ''
and mb_intercept_date = ''
and ( mb_mailling = '1' or mb_sms = '1' )
and mb_id <> '{$config['cf_admin']}' ";
} else {
$sql = " select mb_id, mb_name, mb_hp, mb_email, mb_mailling, mb_sms
from {$g5['member_table']}
where mb_id = '$mb_id' ";
}
$result = sql_query($sql);
for($i=0; $row = sql_fetch_array($result); $i++) {
$arr_send_list[] = $row;
}
$count = count($arr_send_list);
for($i=0; $i<$count; $i++) {
if(!$arr_send_list[$i]['mb_id'])
continue;
// SMS
if($config['cf_sms_use'] == 'icode' && $_POST['cp_sms_send'] && $arr_send_list[$i]['mb_hp'] && $arr_send_list[$i]['mb_sms']) {
$sms_contents = $cp_subject.' 쿠폰이 '.get_text($arr_send_list[$i]['mb_name']).'님께 발행됐습니다. 쿠폰만료 : '.$cp_end.' '.str_replace('http://', '', G5_URL);
if($sms_contents) {
$receive_number = preg_replace("/[^0-9]/", "", $arr_send_list[$i]['mb_hp']); // 수신자번호
$send_number = preg_replace("/[^0-9]/", "", $default['de_admin_company_tel']); // 발신자번호
if($receive_number)
$sms_messages[] = array('recv' => $receive_number, 'send' => $send_number, 'cont' => $sms_contents);
}
}
// E-MAIL
if($config['cf_email_use'] && $_POST['cp_email_send'] && $arr_send_list[$i]['mb_email'] && $arr_send_list[$i]['mb_mailling']) {
$mb_name = get_text($arr_send_list[$i]['mb_name']);
switch($cp_method) {
case 2:
$coupon_method = '결제금액할인';
break;
case 3:
$coupon_method = '배송비할인';
break;
default:
$coupon_method = '개별상품할인';
break;
}
$contents = '쿠폰명 : '.$cp_subject.'<br>';
$contents .= '적용대상 : '.$coupon_method.'<br>';
$contents .= '쿠폰만료 : '.$cp_end;
$title = $config['cf_title'].' - 쿠폰발행알림 메일';
$email = $arr_send_list[$i]['mb_email'];
ob_start();
include G5_SHOP_PATH.'/mail/couponmail.mail.php';
$content = ob_get_contents();
ob_end_clean();
mailer($config['cf_admin_email_name'], $config['cf_admin_email'], $email, $title, $content, 1);
}
}
// SMS발송
$sms_count = count($sms_messages);
if($sms_count > 0) {
if($config['cf_sms_type'] == 'LMS') {
include_once(G5_LIB_PATH.'/icode.lms.lib.php');
$port_setting = get_icode_port_type($config['cf_icode_id'], $config['cf_icode_pw']);
// SMS 모듈 클래스 생성
if($port_setting !== false) {
$SMS = new LMS;
$SMS->SMS_con($config['cf_icode_server_ip'], $config['cf_icode_id'], $config['cf_icode_pw'], $port_setting);
for($s=0; $s<$sms_count; $s++) {
$strDest = array();
$strDest[] = $sms_messages[$s]['recv'];
$strCallBack = $sms_messages[$s]['send'];
$strCaller = iconv_euckr(trim($default['de_admin_company_name']));
$strSubject = '';
$strURL = '';
$strData = iconv_euckr($sms_messages[$s]['cont']);
$strDate = '';
$nCount = count($strDest);
$res = $SMS->Add($strDest, $strCallBack, $strCaller, $strSubject, $strURL, $strData, $strDate, $nCount);
$SMS->Send();
$SMS->Init(); // 보관하고 있던 결과값을 지웁니다.
}
}
} else {
include_once(G5_LIB_PATH.'/icode.sms.lib.php');
$SMS = new SMS; // SMS 연결
$SMS->SMS_con($config['cf_icode_server_ip'], $config['cf_icode_id'], $config['cf_icode_pw'], $config['cf_icode_server_port']);
for($s=0; $s<$sms_count; $s++) {
$recv_number = $sms_messages[$s]['recv'];
$send_number = $sms_messages[$s]['send'];
$sms_content = iconv_euckr($sms_messages[$s]['cont']);
$SMS->Add($recv_number, $send_number, $config['cf_icode_id'], $sms_content, "");
}
$SMS->Send();
$SMS->Init(); // 보관하고 있던 결과값을 지웁니다.
}
}
}
goto_url('./couponlist.php');
-187
View File
@@ -1,187 +0,0 @@
<?php
$sub_menu = '400800';
include_once('./_common.php');
auth_check_menu($auth, $sub_menu, "r");
$sql_common = " from {$g5['g5_shop_coupon_table']} ";
$sql_search = " where (1) ";
if ($stx) {
$sql_search .= " and ( ";
switch ($sfl) {
case 'mb_id' :
$sql_search .= " ({$sfl} = '{$stx}') ";
break;
default :
$sql_search .= " ({$sfl} like '%{$stx}%') ";
break;
}
$sql_search .= " ) ";
}
if (!$sst) {
$sst = "cp_no";
$sod = "desc";
}
$sql_order = " order by {$sst} {$sod} ";
$sql = " select count(*) as cnt
{$sql_common}
{$sql_search}
{$sql_order} ";
$row = sql_fetch($sql);
$total_count = $row['cnt'];
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page < 1) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select *
{$sql_common}
{$sql_search}
{$sql_order}
limit {$from_record}, {$rows} ";
$result = sql_query($sql);
$g5['title'] = '쿠폰관리';
include_once (G5_ADMIN_PATH.'/admin.head.php');
$colspan = 9;
?>
<div class="local_ov">
<span class="btn_ov01"><span class="ov_txt">전체 </span><span class="ov_num"> <?php echo number_format($total_count) ?> 개</span></span>
</div>
<form name="fsearch" id="fsearch" class="local_sch01 local_sch" method="get">
<select name="sfl" title="검색대상">
<option value="mb_id"<?php echo get_selected($sfl, "mb_id"); ?>>회원아이디</option>
<option value="cp_subject"<?php echo get_selected($sfl, "cp_subject"); ?>>쿠폰이름</option>
<option value="cp_id"<?php echo get_selected($sfl, "cp_id"); ?>>쿠폰코드</option>
</select>
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
<input type="text" name="stx" value="<?php echo $stx ?>" id="stx" required class="required frm_input">
<input type="submit" class="btn_submit" value="검색">
</form>
<form name="fcouponlist" id="fcouponlist" method="post" action="./couponlist_delete.php" onsubmit="return fcouponlist_submit(this);">
<input type="hidden" name="sst" value="<?php echo $sst; ?>">
<input type="hidden" name="sod" value="<?php echo $sod; ?>">
<input type="hidden" name="sfl" value="<?php echo $sfl; ?>">
<input type="hidden" name="stx" value="<?php echo $stx; ?>">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<input type="hidden" name="token" value="">
<div class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?></caption>
<thead>
<tr>
<th scope="col">
<label for="chkall" class="sound_only">쿠폰 전체</label>
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
</th>
<th scope="col">쿠폰종류</th>
<th scope="col">쿠폰코드</th>
<th scope="col">쿠폰이름</th>
<th scope="col">적용대상</th>
<th scope="col"><?php echo subject_sort_link('mb_id') ?>회원아이디</a></th>
<th scope="col"><?php echo subject_sort_link('cp_end') ?>사용기한</a></th>
<th scope="col">사용회수</th>
<th scope="col">관리</th>
</tr>
</thead>
<tbody>
<?php
for ($i=0; $row=sql_fetch_array($result); $i++) {
switch($row['cp_method']) {
case '0':
$row3 = get_shop_item($row['cp_target'], true);
$cp_method = '개별상품할인';
$cp_target = get_text($row3['it_name']);
break;
case '1':
$sql3 = " select ca_name from {$g5['g5_shop_category_table']} where ca_id = '{$row['cp_target']}' ";
$row3 = sql_fetch($sql3);
$cp_method = '카테고리할인';
$cp_target = get_text($row3['ca_name']);
break;
case '2':
$cp_method = '주문금액할인';
$cp_target = '주문금액';
break;
case '3':
$cp_method = '배송비할인';
$cp_target = '배송비';
break;
}
$link1 = '<a href="./orderform.php?od_id='.$row['od_id'].'">';
$link2 = '</a>';
// 쿠폰사용회수
$sql = " select count(*) as cnt from {$g5['g5_shop_coupon_log_table']} where cp_id = '{$row['cp_id']}' ";
$tmp = sql_fetch($sql);
$used_count = $tmp['cnt'];
$bg = 'bg'.($i%2);
?>
<tr class="<?php echo $bg; ?>">
<td class="td_chk">
<input type="hidden" id="cp_id_<?php echo $i; ?>" name="cp_id[<?php echo $i; ?>]" value="<?php echo $row['cp_id']; ?>">
<input type="checkbox" id="chk_<?php echo $i; ?>" name="chk[]" value="<?php echo $i; ?>" title="내역선택">
</td>
<td><?php echo $cp_method; ?></td>
<td><?php echo $row['cp_id']; ?></td>
<td class="td_left"><?php echo $row['cp_subject']; ?></td>
<td><?php echo $cp_target; ?></td>
<td class="td_name sv_use"><div><?php echo $row['mb_id']; ?></div></td>
<td class="td_datetime"><?php echo substr($row['cp_start'], 2, 8); ?> ~ <?php echo substr($row['cp_end'], 2, 8); ?></td>
<td class="td_cntsmall"><?php echo number_format($used_count); ?></td>
<td class="td_mng td_mng_s">
<a href="./couponform.php?w=u&amp;cp_id=<?php echo $row['cp_id']; ?>&amp;<?php echo $qstr; ?>" class="btn btn_03"><span class="sound_only"><?php echo $row['cp_id']; ?> </span>수정</a>
</td>
</tr>
<?php
}
if ($i == 0)
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
?>
</tbody>
</table>
</div>
<div class="btn_fixed_top">
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value" class="btn btn_02">
<a href="./couponform.php" id="coupon_add" class="btn btn_01">쿠폰 추가</a>
</div>
</form>
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['SCRIPT_NAME']}?$qstr&amp;page="); ?>
<script>
function fcouponlist_submit(f)
{
if (!is_checked("chk[]")) {
alert(document.pressed+" 하실 항목을 하나 이상 선택하세요.");
return false;
}
if(document.pressed == "선택삭제") {
if(!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
return false;
}
}
return true;
}
</script>
<?php
include_once (G5_ADMIN_PATH.'/admin.tail.php');
-24
View File
@@ -1,24 +0,0 @@
<?php
$sub_menu = '400800';
include_once('./_common.php');
check_demo();
auth_check_menu($auth, $sub_menu, 'd');
check_admin_token();
$count = (isset($_POST['chk']) && is_array($_POST['chk'])) ? count($_POST['chk']) : 0;
if(!$count)
alert('선택삭제 하실 항목을 하나이상 선택해 주세요.');
for ($i=0; $i<$count; $i++)
{
// 실제 번호를 넘김
$k = isset($_POST['chk'][$i]) ? (int) $_POST['chk'][$i] : 0;
$sql = " delete from {$g5['g5_shop_coupon_table']} where cp_id = '".preg_replace('/[^a-z0-9_\-]/i', '', $_POST['cp_id'][$k])."' ";
sql_query($sql);
}
goto_url('./couponlist.php?'.$qstr);
-99
View File
@@ -1,99 +0,0 @@
<?php
$sub_menu = '400800';
include_once('./_common.php');
auth_check_menu($auth, $sub_menu, "w");
$mb_name = isset($_REQUEST['mb_name']) ? clean_xss_tags($_REQUEST['mb_name'], 1, 1) : '';
$html_title = '회원검색';
$g5['title'] = $html_title;
include_once(G5_PATH.'/head.sub.php');
$sql_common = " from {$g5['member_table']} ";
$sql_where = " where mb_id <> '{$config['cf_admin']}' and mb_leave_date = '' and mb_intercept_date ='' ";
if($mb_name){
$mb_name = preg_replace('/\!\?\*$#<>()\[\]\{\}/i', '', strip_tags($mb_name));
$sql_where .= " and mb_name like '%".sql_real_escape_string($mb_name)."%' ";
}
// 테이블의 전체 레코드수만 얻음
$sql = " select count(*) as cnt " . $sql_common . $sql_where;
$row = sql_fetch($sql);
$total_count = $row['cnt'];
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select mb_id, mb_name
$sql_common
$sql_where
order by mb_id
limit $from_record, $rows ";
$result = sql_query($sql);
$qstr1 = 'mb_name='.urlencode($mb_name);
?>
<div id="sch_member_frm" class="new_win scp_new_win">
<h1>쿠폰 적용 회원선택</h1>
<form name="fmember" method="get">
<div id="scp_list_find">
<label for="mb_name">회원이름</label>
<input type="text" name="mb_name" id="mb_name" value="<?php echo get_text($mb_name); ?>" class="frm_input required" required size="20">
<input type="submit" value="검색" class="btn_frmline">
</div>
<div class="tbl_head01 tbl_wrap new_win_con">
<table>
<caption>검색결과</caption>
<thead>
<tr>
<th>회원이름</th>
<th>회원아이디</th>
<th>선택</th>
</tr>
</thead>
<tbody>
<?php
for($i=0; $row=sql_fetch_array($result); $i++) {
?>
<tr>
<td class="td_mbname"><?php echo get_text($row['mb_name']); ?></td>
<td class="td_left"><?php echo $row['mb_id']; ?></td>
<td class="scp_find_select td_mng td_mng_s"><button type="button" class="btn btn_03" onclick="sel_member_id('<?php echo $row['mb_id']; ?>');">선택</button></td>
</tr>
<?php
}
if($i ==0)
echo '<tr><td colspan="3" class="empty_table">검색된 자료가 없습니다.</td></tr>';
?>
</tbody>
</table>
</div>
</form>
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, '?'.$qstr1.'&amp;page='); ?>
<div class="btn_confirm01 btn_confirm win_btn">
<button type="button" onclick="window.close();" class="btn_close btn">닫기</button>
</div>
</div>
<script>
function sel_member_id(id)
{
var f = window.opener.document.fcouponform;
f.mb_id.value = id;
window.close();
}
</script>
<?php
include_once(G5_PATH.'/tail.sub.php');
-127
View File
@@ -1,127 +0,0 @@
<?php
$sub_menu = '400800';
include_once('./_common.php');
auth_check_menu($auth, $sub_menu, "w");
$sch_target = isset($_GET['sch_target']) ? substr(preg_replace('/[^a-zA-Z0-9]/', '', strip_tags($_GET['sch_target'])), 0, 1) : '';
$sch_word = isset($_GET['sch_word']) ? clean_xss_tags(strip_tags($_GET['sch_word'])) : '';
if($_GET['sch_target'] == 1) {
$html_title = '분류';
$t_name = '분류명';
$t_id = '분류코드';
$t_desc1 = '분류를';
$t_desc2 = '분류가';
} else {
$html_title = '상품';
$t_name = '상품명';
$t_id = '상품코드';
$t_desc1 = '상품을';
$t_desc2 = '상품이';
}
$g5['title'] = $html_title.'검색';
include_once(G5_PATH.'/head.sub.php');
if($sch_target == 1) {
$sql_common = " from {$g5['g5_shop_category_table']} ";
$sql_where = " where ca_use = '1' and ca_nocoupon = '0' ";
if($sch_word)
$sql_where .= " and ca_name like '%".sql_real_escape_string($sch_word)."%' ";
$sql_select = " select ca_id as t_id, ca_name as t_name ";
$sql_order = " order by ca_order, ca_name ";
} else {
$sql_common = " from {$g5['g5_shop_item_table']} ";
$sql_where = " where it_use = '1' and it_nocoupon = '0' ";
if($sch_word)
$sql_where .= " and it_name like '%".sql_real_escape_string($sch_word)."%' ";
$sql_select = " select it_id as t_id, it_name as t_name ";
$sql_order = " order by it_order, it_name ";
}
// 테이블의 전체 레코드수만 얻음
$sql = " select count(*) as cnt " . $sql_common . $sql_where;
$row = sql_fetch($sql);
$total_count = $row['cnt'];
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = $sql_select . $sql_common . $sql_where . $sql_order . " limit $from_record, $rows ";
$result = sql_query($sql);
$qstr1 = 'sch_target='.$sch_target.'&amp;sch_word='.urlencode($sch_word);
?>
<div id="sch_target_frm" class="new_win scp_new_win">
<h1>쿠폰 적용 <?php echo $html_title; ?>선택</h1>
<div class="local_desc01 local_desc">
<p>
쿠폰을 적용할 <?php echo $t_desc1; ?> 선택하세요.<br>
<?php echo $t_desc2; ?> 많을 경우에는 검색 기능을 이용하세요.
</p>
</div>
<form name="ftarget" method="get">
<input type="hidden" name="sch_target" value="<?php echo preg_replace('/[^a-zA-Z0-9]/', '', strip_tags($_GET['sch_target'])); ?>">
<div id="scp_list_find">
<label for="sch_word"><?php echo $t_name; ?></label>
<input type="text" name="sch_word" id="sch_word" value="<?php echo get_text($sch_word); ?>" class="frm_input required" required size="20">
<input type="submit" value="검색" class="btn_frmline">
</div>
<div class="tbl_head01 tbl_wrap new_win_con">
<table>
<caption>검색결과</caption>
<thead>
<tr>
<th scope="col"><?php echo $t_name; ?></th>
<th scope="col"><?php echo $t_id; ?></th>
<th scope="col">선택</th>
</tr>
</thead>
<tbody>
<?php
for($i=0; $row=sql_fetch_array($result); $i++) {
?>
<tr>
<td class="td_left"><?php echo $row['t_name']; ?></td>
<td class="scp_target_code"><?php echo $row['t_id']; ?></td>
<td class="td_mng td_mng_s"><button type="button" class="btn btn_03" onclick="sel_target_id('<?php echo $row['t_id']; ?>');">선택</button>
</tr>
<?php
}
if($i ==0)
echo '<tr><td colspan="3" class="empty_table">검색된 자료가 없습니다.</td></tr>';
?>
</tbody>
</table>
</div>
</form>
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, '?'.$qstr1.'&amp;page='); ?>
<div class="btn_confirm01 btn_confirm win_btn">
<button type="button" onclick="window.close();" class="btn">닫기</button>
</div>
</div>
<script>
function sel_target_id(id)
{
var f = window.opener.document.fcouponform;
f.cp_target.value = id;
window.close();
}
</script>
<?php
include_once(G5_PATH.'/tail.sub.php');
-321
View File
@@ -1,321 +0,0 @@
<?php
$sub_menu = '400810';
include_once('./_common.php');
$cz_id = isset($_REQUEST['cz_id']) ? (int) $_REQUEST['cz_id'] : 0;
$cp = array(
'cp_method'=>'',
'cz_subject'=>'',
'cp_target'=>'',
'cp_price'=>'',
'cp_trunc'=>'',
'cp_type'=>'',
'mb_id'=>'',
'cz_type'=>'',
'cz_point'=>'',
'cp_price'=>'',
'cz_file'=>'',
'cp_minimum'=>'',
'cp_maximum'=>'',
);
auth_check_menu($auth, $sub_menu, "w");
$g5['title'] = '쿠폰존 쿠폰관리';
if ($w == 'u') {
$html_title = '쿠폰 수정';
$sql = " select * from {$g5['g5_shop_coupon_zone_table']} where cz_id = '$cz_id' ";
$cp = sql_fetch($sql);
if (!$cp['cz_id']) alert('등록된 자료가 없습니다.');
}
else
{
$html_title = '쿠폰 입력';
$cp['cz_start'] = G5_TIME_YMD;
$cp['cz_end'] = date('Y-m-d', (G5_SERVER_TIME + 86400 * 15));
$cp['cz_period'] = 15;
}
if($cp['cp_method'] == 1) {
$cp_target_label = '적용분류';
$cp_target_btn = '분류검색';
} else {
$cp_target_label = '적용상품';
$cp_target_btn = '상품검색';
}
include_once (G5_ADMIN_PATH.'/admin.head.php');
include_once(G5_PLUGIN_PATH.'/jquery-ui/datepicker.php');
?>
<form name="fcouponform" action="./couponzoneformupdate.php" method="post" enctype="multipart/form-data" onsubmit="return form_check(this);">
<input type="hidden" name="w" value="<?php echo $w; ?>">
<input type="hidden" name="cz_id" value="<?php echo $cz_id; ?>">
<input type="hidden" name="stx" value="<?php echo $stx; ?>">
<input type="hidden" name="page" value="<?php echo $page;?>">
<div class="tbl_frm01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?></caption>
<colgroup>
<col class="grid_4">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row"><label for="cz_type">발행쿠폰타입</label></th>
<td>
<?php echo help("발행 쿠폰의 타입을 설정합니다.<br>포인트쿠폰은 회원의 포인트를 쿠폰으로 교환하는 쿠폰이며 다운로드 쿠폰은 회원이 다운로드하여 사용할 수 있는 쿠폰입니다."); ?>
<select name="cz_type" id="cz_type">
<option value="0"<?php echo get_selected('0', $cp['cz_type']); ?>>다운로드쿠폰</option>
<option value="1"<?php echo get_selected('1', $cp['cz_type']); ?>>포인트쿠폰</option>
</select>
</td>
</tr>
<tr>
<th scope="row"><label for="cz_subject">쿠폰이름</label></th>
<td>
<input type="text" name="cz_subject" value="<?php echo get_text($cp['cz_subject']); ?>" id="cz_subject" required class="required frm_input" size="50">
</td>
</tr>
<tr>
<th scope="row"><label for="cz_start">사용시작일</label></th>
<td>
<?php echo help('입력 예: '.date('Y-m-d')); ?>
<input type="text" name="cz_start" value="<?php echo stripslashes($cp['cz_start']); ?>" id="cz_start" required class="frm_input required">
</td>
</tr>
<tr>
<th scope="row"><label for="cz_end">사용종료일</label></th>
<td>
<?php echo help('입력 예: '.date('Y-m-d')); ?>
<input type="text" name="cz_end" value="<?php echo stripslashes($cp['cz_end']); ?>" id="cz_end" required class="frm_input required">
</td>
</tr>
<tr id="tr_cz_point">
<th scope="row"><label for="cz_point">쿠폰교환 포인트</label></th>
<td>
<?php echo help("쿠폰으로 교환할 회원의 포인트를 지정합니다. 쿠폰 다운로드 때 설정한 값만큼 회원의 포인트를 차감합니다."); ?>
<input type="text" name="cz_point" value="<?php echo get_text($cp['cz_point']); ?>" id="cz_point" class="frm_input">
</td>
</tr>
<tr>
<th scope="row"><label for="cz_period">쿠폰사용기한</label></th>
<td>
<?php echo help("쿠폰 다운로드 후 사용할 수 있는 기간을 설정합니다."); ?>
<input type="text" name="cz_period" value="<?php echo stripslashes($cp['cz_period']); ?>" id="cz_period" required class="frm_input required" size="5"> 일
</td>
</tr>
<tr>
<th scope="row">쿠폰이미지</th>
<td>
<input type="file" name="cp_img">
<?php
$cpimg_str = '';
$cpimg = G5_DATA_PATH."/coupon/{$cp['cz_file']}";
if (is_file($cpimg) && $cp['cz_id']) {
$size = @getimagesize($cpimg);
if($size[0] && $size[0] > 750)
$width = 750;
else
$width = $size[0];
echo '<input type="checkbox" name="cp_img_del" value="1" id="cp_img_del"> <label for="cp_img_del">삭제</label>';
$cpimg_str = '<img src="'.G5_DATA_URL.'/coupon/'.$cp['cz_file'].'" width="'.$width.'">';
}
if ($cpimg_str) {
echo '<div class="coupon_img">';
echo $cpimg_str;
echo '</div>';
}
?>
</td>
</tr>
<tr>
<th scope="row"><label for="cp_method">발급쿠폰종류</label></th>
<td>
<select name="cp_method" id="cp_method">
<option value="0"<?php echo get_selected('0', $cp['cp_method']); ?>>개별상품할인</option>
<option value="1"<?php echo get_selected('1', $cp['cp_method']); ?>>카테고리할인</option>
<option value="2"<?php echo get_selected('2', $cp['cp_method']); ?>>주문금액할인</option>
<option value="3"<?php echo get_selected('3', $cp['cp_method']); ?>>배송비할인</option>
</select>
</td>
</tr>
<tr id="tr_cp_target">
<th scope="row"><label for="cp_target"><?php echo $cp_target_label; ?></label></th>
<td>
<input type="text" name="cp_target" value="<?php echo stripslashes($cp['cp_target']); ?>" id="cp_target" required class="required frm_input">
<button type="button" id="sch_target" class="btn_frmline"><?php echo $cp_target_btn; ?></button>
</td>
</tr>
<tr>
<th scope="row"><label for="cp_type">할인금액타입</label></th>
<td>
<select name="cp_type" id="cp_type">
<option value="0"<?php echo get_selected('0', $cp['cp_type']); ?>>정액할인(원)</option>
<option value="1"<?php echo get_selected('1', $cp['cp_type']); ?>>정률할인(%)</option>
</select>
</td>
</tr>
<tr>
<th scope="row"><label for="cp_price"><?php echo $cp['cp_type'] ? '할인비율' : '할인금액'; ?></label></th>
<td>
<input type="text" name="cp_price" value="<?php echo stripslashes($cp['cp_price']); ?>" id="cp_price" required class="frm_input required"> <span id="cp_price_unit"><?php echo $cp['cp_type'] ? '%' : '원'; ?></span>
</td>
</tr>
<tr id="tr_cp_trunc">
<th scope="row"><label for="cp_trunc">절사금액</label></th>
<td>
<select name="cp_trunc" id="cp_trunc">
<option value="1"<?php echo get_selected('1', $cp['cp_trunc']); ?>>1원단위</option>
<option value="10"<?php echo get_selected('10', $cp['cp_trunc']); ?>>10원단위</option>
<option value="100"<?php echo get_selected('100', $cp['cp_trunc']); ?>>100원단위</option>
<option value="1000"<?php echo get_selected('1000', $cp['cp_trunc']); ?>>1,000원단위</option>
</select>
</td>
</tr>
<tr>
<th scope="row"><label for="cp_minimum">최소주문금액</label></th>
<td>
<input type="text" name="cp_minimum" value="<?php echo stripslashes($cp['cp_minimum']); ?>" id="cp_minimum" class="frm_input"> 원
</td>
</tr>
<tr id="tr_cp_maximum">
<th scope="row"><label for="cp_maximum">최대할인금액</label></th>
<td>
<input type="text" name="cp_maximum" value="<?php echo stripslashes($cp['cp_maximum']); ?>" id="cp_maximum" class="frm_input"> 원
</td>
</tr>
</tbody>
</table>
</div>
<div class="btn_fixed_top">
<a href="./couponzonelist.php?<?php echo $qstr; ?>" class="btn_02 btn">목록</a>
<input type="submit" value="확인" class="btn_submit btn" accesskey="s">
</div>
</form>
<script>
$(function() {
<?php if(!$cp['cz_type']) { ?>
$("#tr_cz_point").hide();
<?php } ?>
<?php if($cp['cp_method'] == 2 || $cp['cp_method'] == 3) { ?>
$("#tr_cp_target").hide();
$("#tr_cp_target").find("input").attr("required", false).removeClass("required");
<?php } ?>
<?php if($cp['cp_type'] != 1) { ?>
$("#tr_cp_maximum").hide();
$("#tr_cp_trunc").hide();
<?php } ?>
$("#cz_type").change(function() {
if($(this).val() == "1") {
$("#tr_cz_point").find("input").attr("required", true).addClass("required");
$("#tr_cz_point").show();
} else {
$("#tr_cz_point").find("input").attr("required", false).removeClass("required");
$("#tr_cz_point").hide();
}
});
$("#cp_method").change(function() {
var cp_method = $(this).val();
change_method(cp_method);
});
$("#cp_type").change(function() {
var cp_type = $(this).val();
change_type(cp_type);
});
$("#sch_target").click(function() {
var cp_method = $("#cp_method").val();
var opt = "left=50,top=50,width=520,height=600,scrollbars=1";
var url = "./coupontarget.php?sch_target=";
if(cp_method == "0") {
window.open(url+"0", "win_target", opt);
} else if(cp_method == "1") {
window.open(url+"1", "win_target", opt);
} else {
return false;
}
});
$("#cz_start, #cz_end").datepicker(
{ changeMonth: true, changeYear: true, dateFormat: "yy-mm-dd", showButtonPanel: true, yearRange: "c-99:c+99" }
);
});
function change_method(cp_method)
{
if(cp_method == "0") {
$("#sch_target").text("상품검색");
$("#tr_cp_target").find("label").text("적용상품");
$("#tr_cp_target").find("input").attr("required", true).addClass("required");
$("#tr_cp_target").show();
} else if(cp_method == "1") {
$("#sch_target").text("분류검색");
$("#tr_cp_target").find("label").text("적용분류");
$("#tr_cp_target").find("input").attr("required", true).addClass("required");
$("#tr_cp_target").show();
} else {
$("#tr_cp_target").hide();
$("#tr_cp_target").find("input").attr("required", false).removeClass("required");
}
}
function change_type(cp_type)
{
if(cp_type == "0") {
$("#cp_price_unit").text("원");
$("#cp_price_unit").closest("tr").find("label").text("할인금액");
$("#tr_cp_maximum").hide();
$("#tr_cp_trunc").hide();
} else {
$("#cp_price_unit").text("%");
$("#cp_price_unit").closest("tr").find("label").text("할인비율");
$("#tr_cp_maximum").show();
$("#tr_cp_trunc").show();
}
}
function form_check(f)
{
var sel_type = f.cp_type;
var cp_type = sel_type.options[sel_type.selectedIndex].value;
var cp_price = f.cp_price.value;
<?php if(!$cpimg_str) { ?>
if(f.cp_img.value == "") {
alert("쿠폰이미지를 업로드해 주십시오.");
return false;
}
<?php } ?>
if(isNaN(cp_price)) {
if(cp_type == "1")
alert("할인비율을 숫자로 입력해 주십시오.");
else
alert("할인금액을 숫자로 입력해 주십시오.");
return false;
}
cp_price = parseInt(cp_price);
if(cp_type == "1" && (cp_price < 1 || cp_price > 99)) {
alert("할인비율을 1과 99 사이의 숫자로 입력해 주십시오.");
return false;
}
return true;
}
</script>
<?php
include_once (G5_ADMIN_PATH.'/admin.tail.php');
-153
View File
@@ -1,153 +0,0 @@
<?php
$sub_menu = '400810';
include_once('./_common.php');
auth_check_menu($auth, $sub_menu, "w");
check_admin_token();
@mkdir(G5_DATA_PATH."/coupon", G5_DIR_PERMISSION);
@chmod(G5_DATA_PATH."/coupon", G5_DIR_PERMISSION);
$_POST = array_map('trim', $_POST);
$check_sanitize_keys = array(
'cz_subject', // 쿠폰이름
'cz_type', // 발행쿠폰타입
'cz_start', // 사용시작일
'cz_end', // 사용종료일
'cz_period', // 쿠폰사용기한
'cz_point', // 쿠폰교환 포인트
'cp_method', // 발급쿠폰종류
'cp_target', // 적용상품
'cp_price', // 할인금액
'cp_type', // 할인금액타입
'cp_trunc', // 절사금액
'cp_minimum', // 최소주문금액
'cp_maximum', // 최대할인금액
);
foreach( $check_sanitize_keys as $key ){
$$key = $_POST[$key] = isset($_POST[$key]) ? strip_tags(clean_xss_attributes($_POST[$key])) : '';
}
if(!$_POST['cz_subject'])
alert('쿠폰이름을 입력해 주십시오.');
if(!$_POST['cz_start'] || !$_POST['cz_end'])
alert('사용 시작일과 종료일을 입력해 주십시오.');
if($_POST['cz_start'] > $_POST['cz_end'])
alert('사용 시작일은 종료일 이전으로 입력해 주십시오.');
if($_POST['cz_end'] < G5_TIME_YMD)
alert('종료일은 오늘('.G5_TIME_YMD.')이후로 입력해 주십시오.');
if($_POST['cz_type'] && !$_POST['cz_point'])
alert('쿠폰교환 포인트를 입력해 주십시오.');
if(!$_POST['cz_period'])
alert('쿠폰사용기한을 입력해 주십시오.');
if( isset($_FILES['cp_img']) && !empty($_FILES['cp_img']['name']) ){
if( !preg_match('/\.(gif|jpe?g|bmp|png)$/i', $_FILES['cp_img']['name']) ){
alert("이미지 파일만 업로드 할수 있습니다.");
}
$timg = @getimagesize($_FILES['cp_img']['tmp_name']);
if ($timg['2'] < 1 || $timg['2'] > 16){
alert("이미지 파일만 업로드 할수 있습니다.");
}
}
if($_POST['cp_method'] == 0 && !$_POST['cp_target'])
alert('적용상품을 입력해 주십시오.');
if($_POST['cp_method'] == 1 && !$_POST['cp_target'])
alert('적용분류를 입력해 주십시오.');
if(!$_POST['cp_price']) {
if($_POST['cp_type'])
alert('할인비율을 입력해 주십시오.');
else
alert('할인금액을 입력해 주십시오.');
}
if( (int) $_POST['cp_price'] < 0 ){
alert('할인금액 또는 할인비율은 음수를 입력할수 없습니다.');
}
if($_POST['cp_type'] && ($_POST['cp_price'] < 1 || $_POST['cp_price'] > 99))
alert('할인비율을은 1과 99사이 값으로 입력해 주십시오.');
if($_POST['cp_method'] == 0) {
$sql = " select count(*) as cnt from {$g5['g5_shop_item_table']} where it_id = '$cp_target' and it_nocoupon = '0' ";
$row = sql_fetch($sql);
if(!$row['cnt'])
alert('입력하신 상품코드는 존재하지 않는 코드이거나 쿠폰적용안함으로 설정된 상품입니다.');
} else if($_POST['cp_method'] == 1) {
$sql = " select count(*) as cnt from {$g5['g5_shop_category_table']} where ca_id = '$cp_target' and ca_nocoupon = '0' ";
$row = sql_fetch($sql);
if(!$row['cnt'])
alert('입력하신 분류코드는 존재하지 않는 분류코드이거나 쿠폰적용안함으로 설정된 분류입니다.');
}
$sql_common = " cz_subject = '{$_POST['cz_subject']}',
cz_type = '{$_POST['cz_type']}',
cz_start = '{$_POST['cz_start']}',
cz_end = '{$_POST['cz_end']}',
cz_period = '{$_POST['cz_period']}',
cz_point = '{$_POST['cz_point']}',
cp_method = '{$_POST['cp_method']}',
cp_target = '{$_POST['cp_target']}',
cp_price = '{$_POST['cp_price']}',
cp_type = '{$_POST['cp_type']}',
cp_trunc = '{$_POST['cp_trunc']}',
cp_minimum = '{$_POST['cp_minimum']}',
cp_maximum = '{$_POST['cp_maximum']}' ";
if($w == '') {
if(!$_FILES['cp_img']['name'])
alert('쿠폰이미지를 업로드해 주십시오.');
$sql = " INSERT INTO {$g5['g5_shop_coupon_zone_table']}
set $sql_common,
cz_datetime = '".G5_TIME_YMDHIS."' ";
sql_query($sql, true);
$cz_id = sql_insert_id();
} else if($w == 'u') {
$sql = " select * from {$g5['g5_shop_coupon_zone_table']} where cz_id = '$cz_id' ";
$cp = sql_fetch($sql);
if(! (isset($cp['cz_id']) && $cp['cz_id']))
alert('쿠폰정보가 존재하지 않습니다.', './couponzonelist.php');
if ((isset($_POST['cp_img_del']) && $_POST['cp_img_del']) && $cp['cz_file']) {
@unlink(G5_DATA_PATH."/coupon/{$cp['cz_file']}");
$cp['cz_file'] = '';
}
if(!$cp['cz_file'] && !$_FILES['cp_img']['name'])
alert('쿠폰이미지를 업로드해 주십시오.');
$sql = " update {$g5['g5_shop_coupon_zone_table']}
set $sql_common
where cz_id = '$cz_id' ";
sql_query($sql);
}
// 이미지업로드
if($_FILES['cp_img']['tmp_name']) {
preg_match('#.+\.([a-z]+)$#', $_FILES['cp_img']['name'], $m);
$filename = date('YmdHis').(microtime(true) * 10000).'.'.strtolower($m[1]);
upload_file($_FILES['cp_img']['tmp_name'], $filename, G5_DATA_PATH."/coupon");
$sql = " update {$g5['g5_shop_coupon_zone_table']}
set cz_file = '$filename'
where cz_id = '$cz_id' ";
sql_query($sql);
}
goto_url('./couponzonelist.php?'.$qstr);
-177
View File
@@ -1,177 +0,0 @@
<?php
$sub_menu = '400810';
include_once('./_common.php');
auth_check_menu($auth, $sub_menu, "r");
$sql_common = " from {$g5['g5_shop_coupon_zone_table']} ";
$sql_search = " where (1) ";
if ($stx) {
$sql_search .= " and cz_subject like '%$stx%' ";
}
if (!$sst) {
$sst = "cz_id";
$sod = "desc";
}
$sql_order = " order by {$sst} {$sod} ";
$sql = " select count(*) as cnt
{$sql_common}
{$sql_search}
{$sql_order} ";
$row = sql_fetch($sql);
$total_count = $row['cnt'];
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page < 1) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select *
{$sql_common}
{$sql_search}
{$sql_order}
limit {$from_record}, {$rows} ";
$result = sql_query($sql);
$g5['title'] = '쿠폰존관리';
include_once (G5_ADMIN_PATH.'/admin.head.php');
$colspan = 9;
?>
<div class="local_ov">
<span class="btn_ov01"><span class="ov_txt">전체 </span><span class="ov_num"> <?php echo number_format($total_count) ?> 개</span></span>
</div>
<form name="fsearch" id="fsearch" class="local_sch01 local_sch" method="get">
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
<input type="text" name="stx" value="<?php echo $stx ?>" id="stx" required class="required frm_input">
<input type="submit" class="btn_submit" value="검색">
</form>
<form name="fcouponlist" id="fcouponzonelist" method="post" action="./couponzonelist_delete.php" onsubmit="return fcouponzonelist_submit(this);">
<input type="hidden" name="stx" value="<?php echo $stx; ?>">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<input type="hidden" name="token" value="">
<div class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?></caption>
<thead>
<tr>
<th scope="col">
<label for="chkall" class="sound_only">쿠폰 전체</label>
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
</th>
<th scope="col">쿠폰이름</th>
<th scope="col">쿠폰종류</th>
<th scope="col">적용대상</th>
<th scope="col">쿠폰금액</th>
<th scope="col">쿠폰사용기한</th>
<th scope="col">다운로드</th>
<th scope="col">사용기한</th>
<th scope="col">관리</th>
</tr>
</thead>
<tbody>
<?php
for ($i=0; $row=sql_fetch_array($result); $i++) {
switch($row['cz_type']) {
case '1':
$cz_type = '포인트쿠폰';
break;
default:
$cz_type = '다운로드쿠폰';
break;
}
switch($row['cp_method']) {
case '0':
$row3 = get_shop_item($row['cp_target'], true);
$cp_method = '개별상품할인';
$cp_target = get_text($row3['it_name']);
break;
case '1':
$sql3 = " select ca_name from {$g5['g5_shop_category_table']} where ca_id = '{$row['cp_target']}' ";
$row3 = sql_fetch($sql3);
$cp_method = '카테고리할인';
$cp_target = get_text($row3['ca_name']);
break;
case '2':
$cp_method = '주문금액할인';
$cp_target = '주문금액';
break;
case '3':
$cp_method = '배송비할인';
$cp_target = '배송비';
break;
}
if($row['cp_type'])
$cp_price = $row['cp_price'].'%';
else
$cp_price = number_format($row['cp_price']).'원';
$bg = 'bg'.($i%2);
?>
<tr class="<?php echo $bg; ?>">
<td class="td_chk">
<input type="hidden" id="cz_id_<?php echo $i; ?>" name="cz_id[<?php echo $i; ?>]" value="<?php echo $row['cz_id']; ?>">
<input type="checkbox" id="chk_<?php echo $i; ?>" name="chk[]" value="<?php echo $i; ?>" title="내역선택">
</td>
<td class="td_left"><?php echo get_text($row['cz_subject']); ?></td>
<td class="td_type"><?php echo $cz_type; ?></td>
<td class="td_type"><?php echo $cp_method; ?></td>
<td class="td_odrnum2"><?php echo $cp_price; ?></td>
<td class="td_type">다운로드 후 <?php echo $row['cz_period']; ?>일</td>
<td class="td_num"><?php echo number_format($row['cz_download']); ?></td>
<td class="td_datetime"><?php echo substr($row['cz_start'], 2, 8); ?> ~ <?php echo substr($row['cz_end'], 2, 8); ?></td>
<td class="td_mng td_mng_s">
<a href="./couponzoneform.php?w=u&amp;cz_id=<?php echo $row['cz_id']; ?>&amp;<?php echo $qstr; ?>" class="btn btn_03"><span class="sound_only"><?php echo get_text($row['cz_subject']); ?> </span>수정</a>
</td>
</tr>
<?php
}
if ($i == 0)
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
?>
</tbody>
</table>
</div>
<div class="btn_fixed_top">
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value" class="btn btn_02">
<a href="./couponzoneform.php" id="coupon_add" class="btn btn_01">쿠폰 추가</a>
</div>
</form>
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['SCRIPT_NAME']}?$qstr&amp;page="); ?>
<script>
function fcouponzonelist_submit(f)
{
if (!is_checked("chk[]")) {
alert(document.pressed+" 하실 항목을 하나 이상 선택하세요.");
return false;
}
if(document.pressed == "선택삭제") {
if(!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
return false;
}
}
return true;
}
</script>
<?php
include_once (G5_ADMIN_PATH.'/admin.tail.php');
-25
View File
@@ -1,25 +0,0 @@
<?php
$sub_menu = '400810';
include_once('./_common.php');
check_demo();
auth_check_menu($auth, $sub_menu, 'd');
check_admin_token();
$count = (isset($_POST['chk']) && is_array($_POST['chk'])) ? count($_POST['chk']) : 0;
if(!$count)
alert('선택삭제 하실 항목을 하나이상 선택해 주세요.');
for ($i=0; $i<$count; $i++)
{
// 실제 번호를 넘김
$k = isset($_POST['chk'][$i]) ? (int) $_POST['chk'][$i] : 0;
$ccz_id = isset($_POST['cz_id'][$k]) ? (int) $_POST['cz_id'][$k] : 0;
$sql = " delete from {$g5['g5_shop_coupon_zone_table']} where cz_id = '{$ccz_id}' ";
sql_query($sql);
}
goto_url('./couponzonelist.php?'.$qstr);
Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.0 KiB

-543
View File
@@ -1,543 +0,0 @@
<?php
$sub_menu = '400010';
include_once('./_common.php');
$max_limit = 7; // 몇행 출력할 것인지?
$g5['title'] = ' 쇼핑몰현황';
include_once (G5_ADMIN_PATH.'/admin.head.php');
$pg_anchor = '<ul class="anchor sidx_anchor">
<li><a href="#anc_sidx_ord">주문현황</a></li>
<li><a href="#anc_sidx_rdy">입금완료미배송내역</a></li>
<li><a href="#anc_sidx_wait">미입금주문내역</a></li>
<li><a href="#anc_sidx_ps">사용후기</a></li>
<li><a href="#anc_sidx_qna">상품문의</a></li>
</ul>';
// 주문상태에 따른 합계 금액
function get_order_status_sum($status)
{
global $g5;
$sql = " select count(*) as cnt,
sum(od_cart_price + od_send_cost + od_send_cost2 - od_cancel_price) as price
from {$g5['g5_shop_order_table']}
where od_status = '$status' ";
$row = sql_fetch($sql);
$info = array();
$info['count'] = (int)$row['cnt'];
$info['price'] = (int)$row['price'];
$info['href'] = './orderlist.php?od_status='.urlencode($status);
return $info;
}
// 일자별 주문 합계 금액
function get_order_date_sum($date)
{
global $g5;
$sql = " select sum(od_cart_price + od_send_cost + od_send_cost2) as orderprice,
sum(od_cancel_price) as cancelprice
from {$g5['g5_shop_order_table']}
where SUBSTRING(od_time, 1, 10) = '$date' ";
$row = sql_fetch($sql);
$info = array();
$info['order'] = (int)$row['orderprice'];
$info['cancel'] = (int)$row['cancelprice'];
return $info;
}
// 일자별 결제수단 주문 합계 금액
function get_order_settle_sum($date)
{
global $g5, $default;
$case = array('신용카드', '계좌이체', '가상계좌', '무통장', '휴대폰');
$info = array();
// 결제수단별 합계
foreach($case as $val)
{
$sql = " select sum(od_cart_price + od_send_cost + od_send_cost2 - od_receipt_point - od_cart_coupon - od_coupon - od_send_coupon) as price,
count(*) as cnt
from {$g5['g5_shop_order_table']}
where SUBSTRING(od_time, 1, 10) = '$date'
and od_settle_case = '$val' ";
$row = sql_fetch($sql);
$info[$val]['price'] = (int)$row['price'];
$info[$val]['count'] = (int)$row['cnt'];
}
// 포인트 합계
$sql = " select sum(od_receipt_point) as price,
count(*) as cnt
from {$g5['g5_shop_order_table']}
where SUBSTRING(od_time, 1, 10) = '$date'
and od_receipt_point > 0 ";
$row = sql_fetch($sql);
$info['포인트']['price'] = (int)$row['price'];
$info['포인트']['count'] = (int)$row['cnt'];
// 쿠폰 합계
$sql = " select sum(od_cart_coupon + od_coupon + od_send_coupon) as price,
count(*) as cnt
from {$g5['g5_shop_order_table']}
where SUBSTRING(od_time, 1, 10) = '$date'
and ( od_cart_coupon > 0 or od_coupon > 0 or od_send_coupon > 0 ) ";
$row = sql_fetch($sql);
$info['쿠폰']['price'] = (int)$row['price'];
$info['쿠폰']['count'] = (int)$row['cnt'];
return $info;
}
function get_max_value($arr)
{
foreach($arr as $key => $val)
{
if(is_array($val))
{
$arr[$key] = get_max_value($val);
}
}
sort($arr);
return array_pop($arr);
}
?>
<div class="sidx">
<section id="anc_sidx_ord">
<h2>주문현황</h2>
<?php echo $pg_anchor; ?>
<?php
$arr_order = array();
$x_val = array();
for($i=6; $i>=0; $i--) {
$date = date('Y-m-d', strtotime('-'.$i.' days', G5_SERVER_TIME));
$x_val[] = $date;
$arr_order[] = get_order_date_sum($date);
}
$max_y = get_max_value($arr_order);
$max_y = ceil(($max_y) / 1000) * 1000;
$y_val = array();
$y_val[] = $max_y;
for($i=4; $i>=1; $i--) {
$y_val[] = $max_y * (($i * 2) / 10);
}
$max_height = 230;
$h_val = array();
$js_val = array();
$offset = 10; // 금액이 상대적으로 작아 높이가 0일 때 기본 높이로 사용
foreach($arr_order as $val) {
if($val['order'] > 0)
$h1 = intval(($max_height * $val['order']) / $max_y) + $offset;
else
$h1 = 0;
if($val['cancel'] > 0)
$h2 = intval(($max_height * $val['cancel']) / $max_y) + $offset;
else
$h2 = 0 ;
$h_val['order'][] = $h1;
$h_val['cancel'][] = $h2;
}
?>
<div id="sidx_graph">
<ul id="sidx_graph_price">
<?php
foreach($y_val as $val) {
?>
<li><span></span><?php echo number_format($val); ?></li>
<?php
}
?>
</ul>
<ul id="sidx_graph_area">
<?php
for($i=0; $i<count($x_val); $i++) {
$order_title = date("n월 j일", strtotime($x_val[$i])).' 주문: '.display_price($arr_order[$i]['order']);
$cancel_title = date("n월 j일", strtotime($x_val[$i])).' 취소: '.display_price($arr_order[$i]['cancel']);
$k = 10 - $i;
$li_bg = 'bg'.($i%2);
?>
<li class="<?php echo $li_bg; ?>" style="z-index:<?php echo $k; ?>">
<div class="graph order" title="<?php echo $order_title; ?>">
</div>
<div class="graph cancel" title="<?php echo $cancel_title; ?>">
</div>
</li>
<?php
}
?>
</ul>
<ul id="sidx_graph_date">
<?php
foreach($x_val as $val) {
?>
<li><span></span><?php echo substr($val, 5, 5).' ('.get_yoil($val).')'; ?></li>
<?php
}
?>
</ul>
<div id="sidx_graph_legend">
<span id="legend_order"></span> 주문
<span id="legend_cancel"></span> 취소
</div>
</div>
</section>
<div id="sidx_stat">
<section id="anc_sidx_act">
<h2>처리할 주문</h2>
<?php echo $pg_anchor; ?>
<div id="sidx_take_act" class="tbl_head01 tbl_wrap">
<table>
<thead>
<tr>
<th scope="col" class="td_mng">상태변경</th>
<th scope="col">건수</th>
<th scope="col">금액</th>
</tr>
</thead>
<tbody>
<tr>
<?php
$info = get_order_status_sum('주문');
?>
<th scope="row">주문 -&gt; 입금</th>
<td class="td_num"><a href="<?php echo $info['href']; ?>"><?php echo number_format($info['count']); ?></a></td>
<td class="td_price"><a href="<?php echo $info['href']; ?>"><?php echo number_format($info['price']); ?></a></td>
</tr>
<tr>
<?php
$info = get_order_status_sum('입금');
?>
<th scope="row">입금 -&gt; 준비</th>
<td class="td_num"><a href="<?php echo $info['href']; ?>"><?php echo number_format($info['count']); ?></a></td>
<td class="td_price"><a href="<?php echo $info['href']; ?>"><?php echo number_format($info['price']); ?></a></td>
</tr>
<tr>
<?php
$info = get_order_status_sum('준비');
?>
<th scope="row">준비 -&gt; 배송</th>
<td class="td_num"><a href="<?php echo $info['href']; ?>"><?php echo number_format($info['count']); ?></a></td>
<td class="td_price"><a href="<?php echo $info['href']; ?>"><?php echo number_format($info['price']); ?></a></td>
</tr>
<tr>
<?php
$info = get_order_status_sum('배송');
?>
<th scope="row">배송 -&gt; 완료</th>
<td class="td_num"><a href="<?php echo $info['href']; ?>"><?php echo number_format($info['count']); ?></a></td>
<td class="td_price"><a href="<?php echo $info['href']; ?>"><?php echo number_format($info['price']); ?></a></td>
</tr>
</tbody>
</table>
</div>
</section>
<section id="anc_sidx_stock">
<h2>재고현황</h2>
<?php echo $pg_anchor; ?>
<?php
// 재고부족 상품
$item_noti = 0;
$sql = " select count(*) as cnt
from {$g5['g5_shop_item_table']}
where it_use = '1'
and it_option_subject = ''
and it_stock_qty <= it_noti_qty ";
$row = sql_fetch($sql);
$item_noti = (int)$row['cnt'];
// 재고부족 옵션
$option_noti = 0;
$sql = " select count(*) as cnt
from {$g5['g5_shop_item_option_table']}
where io_use = '1'
and io_stock_qty <= io_noti_qty ";
$row = sql_fetch($sql);
$option_noti = (int)$row['cnt'];
// SMS 정보
$userinfo = array('coin'=>0);
if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
$userinfo = get_icode_userinfo($config['cf_icode_id'], $config['cf_icode_pw']);
}
?>
<div id="sidx_stock" class="tbl_head01 tbl_wrap">
<table>
<thead>
<tr>
<th scope="col">재고부족 상품</th>
<th scope="col">재고부족 옵션</th>
<th scope="col">SMS 잔여금액</th>
</tr>
</thead>
<tbody>
<tr>
<td class="td_num2"><a href="./itemstocklist.php"><?php echo number_format($item_noti); ?></a></td>
<td class="td_num2"><a href="./optionstocklist.php"><?php echo number_format($option_noti); ?></a></td>
<td class="td_price"><?php echo display_price(intval($userinfo['coin'])); ?></td>
</tr>
</tbody>
</table>
</div>
</section>
</div>
</div>
<section id="anc_sidx_settle">
<h2>결제수단별 주문현황</h2>
<?php echo $pg_anchor; ?>
<div id="sidx_settle" class="tbl_head01 tbl_wrap">
<table>
<thead>
<tr>
<th scope="col" rowspan="2">구분</th>
<?php
$term = 3;
$info = array();
$info_key = array();
for($i=($term - 1); $i>=0; $i--) {
$date = date("Y-m-d", strtotime('-'.$i.' days', G5_SERVER_TIME));
$info[$date] = get_order_settle_sum($date);
$day = substr($date, 5, 5).' ('.get_yoil($date).')';
$info_key[] = $date;
?>
<th scope="col" colspan="2"><?php echo $day; ?></th>
<?php } ?>
</tr>
<tr>
<?php
for($i=0; $i<$term; $i++) {
?>
<th scope="col">건수</th>
<th scope="col">금액</th>
<?php } ?>
</tr>
</thead>
<tbody>
<?php
$case = array('신용카드', '계좌이체', '가상계좌', '무통장', '휴대폰', '포인트', '쿠폰');
$val_cnt = 0;
foreach($case as $val)
{
$val_cnt++;
?>
<tr>
<th scope="row" id="th_val_<?php echo $val_cnt; ?>" class="td_category"><?php echo $val; ?></th>
<?php
foreach($info_key as $date)
{
?>
<td><?php echo number_format($info[$date][$val]['count']); ?></td>
<td><?php echo number_format($info[$date][$val]['price']); ?></td>
<?php
}
?>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</section>
<div class="sidx sidx_cs">
<section id="anc_sidx_oneq">
<h2>1:1문의</h2>
<?php echo $pg_anchor; ?>
<div class="ul_01 ul_wrap">
<ul>
<?php
$sql = " select * from {$g5['qa_content_table']}
where qa_status = '0'
and qa_type = '0'
order by qa_num
limit $max_limit ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$sql1 = " select * from {$g5['member_table']} where mb_id = '{$row['mb_id']}' ";
$row1 = sql_fetch($sql1);
$name = get_sideview($row['mb_id'], get_text($row['qa_name']), $row1['mb_email'], $row1['mb_homepage']);
?>
<li>
<span class="oneq_cate oneq_span"><?php echo get_text($row['qa_category']); ?></span>
<a href="<?php echo G5_BBS_URL; ?>/qaview.php?qa_id=<?php echo $row['qa_id']; ?>" target="_blank" class="oneq_link"><?php echo conv_subject($row['qa_subject'],40); ?></a>
<?php echo $name; ?>
</li>
<?php
}
if ($i == 0)
echo '<li class="empty_list">자료가 없습니다.</li>';
?>
</ul>
</div>
<div class="btn_list03 btn_list">
<a href="<?php echo G5_BBS_URL; ?>/qalist.php" target="_blank">1:1문의 더보기</a>
</div>
</section>
<section id="anc_sidx_qna">
<h2>상품문의</h2>
<?php echo $pg_anchor; ?>
<div class="ul_01 ul_wrap">
<ul>
<?php
$sql = " select * from {$g5['g5_shop_item_qa_table']}
where iq_answer = ''
order by iq_id desc
limit $max_limit ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$sql1 = " select * from {$g5['member_table']} where mb_id = '{$row['mb_id']}' ";
$row1 = sql_fetch($sql1);
$name = get_sideview($row['mb_id'], get_text($row['iq_name']), $row1['mb_email'], $row1['mb_homepage']);
?>
<li>
<a href="./itemqaform.php?w=u&amp;iq_id=<?php echo $row['iq_id']; ?>" class="qna_link"><?php echo conv_subject($row['iq_subject'],40); ?></a>
<?php echo $name; ?>
</li>
<?php
}
if ($i == 0)
echo '<li class="empty_list">자료가 없습니다.</li>';
?>
</ul>
</div>
<div class="btn_list03 btn_list">
<a href="./itemqalist.php?sort1=iq_answer&amp;sort2=asc">상품문의 더보기</a>
</div>
</section>
<section id="anc_sidx_ps">
<h2>사용후기</h2>
<?php echo $pg_anchor; ?>
<div class="ul_01 ul_wrap">
<ul>
<?php
$sql = " select * from {$g5['g5_shop_item_use_table']}
where is_confirm = 0
order by is_id desc
limit $max_limit ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$sql1 = " select * from {$g5['member_table']} where mb_id = '{$row['mb_id']}' ";
$row1 = sql_fetch($sql1);
$name = get_sideview($row['mb_id'], get_text($row['is_name']), $row1['mb_email'], $row1['mb_homepage']);
?>
<li>
<a href="./itemuseform.php?w=u&amp;is_id=<?php echo $row['is_id']; ?>" class="ps_link"><?php echo conv_subject($row['is_subject'],40); ?></a>
<?php echo $name; ?>
</li>
<?php
}
if ($i == 0) echo '<li class="empty_list">자료가 없습니다.</li>';
?>
</ul>
</div>
<div class="btn_list03 btn_list">
<a href="./itemuselist.php?sort1=is_confirm&amp;sort2=asc">사용후기 더보기</a>
</div>
</section>
</div>
<script>
$(function() {
graph_draw();
$("#sidx_graph_area div").hover(
function() {
if($(this).is(":animated"))
return false;
var title = $(this).attr("title");
if(title && $(this).data("title") == undefined)
$(this).data("title", title);
var left = parseInt($(this).css("left")) + 10;
var bottom = $(this).height() + 5;
$(this)
.attr("title", "")
.append("<div id=\"price_tooltip\"><div></div></div>");
$("#price_tooltip")
.find("div")
.html(title)
.end()
// .css({ left: left+"px", bottom: bottom+"px" })
.show(200);
},
function() {
if($(this).is(":animated"))
return false;
$(this).attr("title", $(this).data("title"));
$("#price_tooltip").remove();
}
);
});
function graph_draw()
{
var g_h1 = new Array("<?php echo implode('", "', $h_val['order']); ?>");
var g_h2 = new Array("<?php echo implode('", "', $h_val['cancel']); ?>");
var duration = 600;
var $el = $("#sidx_graph_area li");
var h1, h2;
var $g1, $g2;
$el.each(function(index) {
h1 = g_h1[index];
h2 = g_h2[index];
$g1 = $(this).find(".order");
$g2 = $(this).find(".cancel");
$g1.animate({ height: h1+"px" }, duration);
$g2.animate({ height: h2+"px" }, duration);
});
}
</script>
<?php
include_once (G5_ADMIN_PATH.'/admin.tail.php');
-574
View File
@@ -1,574 +0,0 @@
<?php
$sub_menu = '400410';
include_once('./_common.php');
auth_check_menu($auth, $sub_menu, "w");
$od_id = isset($_REQUEST['od_id']) ? safe_replace_regex($_REQUEST['od_id'], 'od_id') : '';
$g5['title'] = "미완료주문 내역";
include_once(G5_ADMIN_PATH.'/admin.head.php');
//------------------------------------------------------------------------------
// 주문서 정보
//------------------------------------------------------------------------------
$sql = " select * from {$g5['g5_shop_order_data_table']} where od_id = '$od_id' ";
$od = sql_fetch($sql);
if (!$od['od_id']) {
alert("해당 주문번호로 미완료 주문서가 존재하지 않습니다.");
}
// 주문정보
$data = unserialize(base64_decode($od['dt_data']));
$sql_common = " from {$g5['g5_shop_cart_table']} where od_id = '{$od['cart_id']}' and ct_status = '쇼핑' and ct_select = '1' ";
// 주문금액
$sql = " select SUM(IF(io_type = 1, io_price, (ct_price + io_price)) * ct_qty) as od_price, COUNT(distinct it_id) as cart_count $sql_common ";
$row = sql_fetch($sql);
$tot_ct_price = $row['od_price'];
$cart_count = $row['cart_count'];
$tot_od_price = $tot_ct_price;
// 쿠폰금액
$tot_cp_price = 0;
if($od['mb_id']) {
// 상품쿠폰
$tot_it_cp_price = $tot_od_cp_price = 0;
$it_cp_cnt = (isset($data['cp_id']) && is_array($data['cp_id'])) ? count($data['cp_id']) : 0;
$arr_it_cp_prc = array();
for($i=0; $i<$it_cp_cnt; $i++) {
$cid = $data['cp_id'][$i];
$it_id = $data['it_id'][$i];
$sql = " select cp_id, cp_method, cp_target, cp_type, cp_price, cp_trunc, cp_minimum, cp_maximum
from {$g5['g5_shop_coupon_table']}
where cp_id = '$cid'
and mb_id IN ( '{$od['mb_id']}', '전체회원' )
and cp_method IN ( 0, 1 ) ";
$cp = sql_fetch($sql);
if(! (isset($cp['cp_id']) && $cp['cp_id']))
continue;
// 사용한 쿠폰인지
if(is_used_coupon($od['mb_id'], $cp['cp_id']))
continue;
// 분류할인인지
if($cp['cp_method']) {
$sql2 = " select it_id, ca_id, ca_id2, ca_id3
from {$g5['g5_shop_item_table']}
where it_id = '$it_id' ";
$row2 = sql_fetch($sql2);
if(!$row2['it_id'])
continue;
if($row2['ca_id'] != $cp['cp_target'] && $row2['ca_id2'] != $cp['cp_target'] && $row2['ca_id3'] != $cp['cp_target'])
continue;
} else {
if($cp['cp_target'] != $it_id)
continue;
}
// 상품금액
$sql = " select SUM( IF(io_type = '1', io_price * ct_qty, (ct_price + io_price) * ct_qty)) as sum_price $sql_common and it_id = '$it_id' ";
$ct = sql_fetch($sql);
$item_price = $ct['sum_price'];
if($cp['cp_minimum'] > $item_price)
continue;
$dc = 0;
if($cp['cp_type']) {
$dc = floor(($item_price * ($cp['cp_price'] / 100)) / $cp['cp_trunc']) * $cp['cp_trunc'];
} else {
$dc = $cp['cp_price'];
}
if($cp['cp_maximum'] && $dc > $cp['cp_maximum'])
$dc = $cp['cp_maximum'];
if($item_price < $dc)
continue;
$tot_it_cp_price += $dc;
$arr_it_cp_prc[$it_id] = $dc;
}
$tot_od_price -= $tot_it_cp_price;
// 주문쿠폰
if(isset($data['od_cp_id']) && $data['od_cp_id']) {
$sql = " select cp_id, cp_type, cp_price, cp_trunc, cp_minimum, cp_maximum
from {$g5['g5_shop_coupon_table']}
where cp_id = '{$data['od_cp_id']}'
and mb_id IN ( '{$od['mb_id']}', '전체회원' )
and cp_method = '2' ";
$cp = sql_fetch($sql);
// 사용한 쿠폰인지
$cp_used = is_used_coupon($od['mb_id'], $cp['cp_id']);
$dc = 0;
if(!$cp_used && $cp['cp_id'] && ($cp['cp_minimum'] <= $tot_od_price)) {
if($cp['cp_type']) {
$dc = floor(($tot_od_price * ($cp['cp_price'] / 100)) / $cp['cp_trunc']) * $cp['cp_trunc'];
} else {
$dc = $cp['cp_price'];
}
if($cp['cp_maximum'] && $dc > $cp['cp_maximum'])
$dc = $cp['cp_maximum'];
$tot_od_cp_price = $dc;
$tot_od_price -= $tot_od_cp_price;
}
}
$tot_cp_price = $tot_it_cp_price + $tot_od_cp_price;
}
// 배송비
$od_send_cost = get_sendcost($od['cart_id']);
$tot_sc_cp_price = 0;
if($od['mb_id'] && $od_send_cost > 0) {
// 배송쿠폰
if($data['sc_cp_id']) {
$sql = " select cp_id, cp_type, cp_price, cp_trunc, cp_minimum, cp_maximum
from {$g5['g5_shop_coupon_table']}
where cp_id = '{$data['sc_cp_id']}'
and mb_id IN ( '{$od['mb_id']}', '전체회원' )
and cp_method = '3' ";
$cp = sql_fetch($sql);
// 사용한 쿠폰인지
$cp_used = is_used_coupon($od['mb_id'], $cp['cp_id']);
$dc = 0;
if(!$cp_used && $cp['cp_id'] && ($cp['cp_minimum'] <= $tot_od_price)) {
if($cp['cp_type']) {
$dc = floor(($send_cost * ($cp['cp_price'] / 100)) / $cp['cp_trunc']) * $cp['cp_trunc'];
} else {
$dc = $cp['cp_price'];
}
if($cp['cp_maximum'] && $dc > $cp['cp_maximum'])
$dc = $cp['cp_maximum'];
if($dc > $send_cost)
$dc = $send_cost;
$tot_sc_cp_price = $dc;
}
}
}
// 추가배송비
$od_send_cost2 = isset($data['od_send_cost2']) ? (int) $data['od_send_cost2'] : 0;
// 포인트
$od_temp_point = isset($data['od_temp_point']) ? (int) $data['od_temp_point'] : 0;
$order_price = $tot_od_price + $od_send_cost + $od_send_cost2 - $tot_sc_cp_price - $od_temp_point;
// 상품목록
$sql = " select it_id, it_name, ct_notax, ct_send_cost, it_sc_type $sql_common group by it_id order by ct_id ";
$result = sql_query($sql);
$pg_anchor = '<ul class="anchor">
<li><a href="#anc_sodr_list">주문상품 목록</a></li>
<li><a href="#anc_sodr_orderer">주문하신 분</a></li>
<li><a href="#anc_sodr_taker">받으시는 분</a></li>
</ul>';
?>
<section id="anc_sodr_list">
<h2 class="h2_frm">주문상품 목록</h2>
<?php echo $pg_anchor; ?>
<div class="local_desc02 local_desc">
<p>
주문일시 <strong><?php echo substr($od['dt_time'],0,16); ?> (<?php echo get_yoil($od['dt_time']); ?>)</strong>
|
주문합계 <strong><?php echo number_format($order_price); ?></strong>원
</p>
</div>
<div class="tbl_head01 tbl_wrap">
<table>
<caption>주문 상품 목록</caption>
<thead>
<tr>
<th scope="col">상품명</th>
<th scope="col">옵션항목</th>
<th scope="col">상태</th>
<th scope="col">수량</th>
<th scope="col">판매가</th>
<th scope="col">소계</th>
<th scope="col">쿠폰</th>
<th scope="col">포인트</th>
<th scope="col">배송비</th>
<th scope="col">포인트반영</th>
<th scope="col">재고반영</th>
</tr>
</thead>
<tbody>
<?php
for($i=0; $row=sql_fetch_array($result); $i++) {
// 상품이미지
$image = get_it_image($row['it_id'], 50, 50);
// 상품의 옵션정보
$sql = " select ct_id, it_id, ct_price, ct_point, ct_qty, ct_option, ct_status, cp_price, ct_stock_use, ct_point_use, ct_send_cost, io_type, io_price $sql_common and it_id = '{$row['it_id']}' order by io_type asc, ct_id asc ";
$res = sql_query($sql);
$rowspan = sql_num_rows($res);
// 합계금액 계산
$sql = " select SUM(IF(io_type = 1, (io_price * ct_qty), ((ct_price + io_price) * ct_qty))) as price, SUM(ct_qty) as qty $sql_common and it_id = '{$row['it_id']}' ";
$sum = sql_fetch($sql);
// 배송비
switch($row['ct_send_cost'])
{
case 1:
$ct_send_cost = '착불';
break;
case 2:
$ct_send_cost = '무료';
break;
default:
$ct_send_cost = '선불';
break;
}
// 조건부무료
if($row['it_sc_type'] == 2) {
$sendcost = get_item_sendcost($row['it_id'], $sum['price'], $sum['qty'], $od['cart_id']);
if($sendcost == 0)
$ct_send_cost = '무료';
}
for($k=0; $opt=sql_fetch_array($res); $k++) {
if($opt['io_type'])
$opt_price = $opt['io_price'];
else
$opt_price = $opt['ct_price'] + $opt['io_price'];
// 소계
$ct_price['stotal'] = $opt_price * $opt['ct_qty'];
$ct_point['stotal'] = $opt['ct_point'] * $opt['ct_qty'];
if($k == 0)
$opt_cp_price = isset($arr_it_cp_prc[$row['it_id']]) ? (int) $arr_it_cp_prc[$row['it_id']] : 0;
else
$opt_cp_price = 0;
?>
<tr>
<?php if($k == 0) { ?>
<td rowspan="<?php echo $rowspan; ?>">
<?php echo $image; ?> <?php echo stripslashes($row['it_name']); ?>
<?php if(isset($od['od_tax_flag']) && $od['od_tax_flag'] && $row['ct_notax']) echo '[비과세상품]'; ?>
</td>
<?php } ?>
<td><?php echo $opt['ct_option']; ?></td>
<td class="td_mngsmall"><?php echo $opt['ct_status']; ?></td>
<td class="td_num"><?php echo number_format($opt['ct_qty']); ?></td>
<td class="td_num"><?php echo number_format($opt_price); ?></td>
<td class="td_num"><?php echo number_format($ct_price['stotal']); ?></td>
<td class="td_num"><?php echo number_format($opt_cp_price); ?></td>
<td class="td_num"><?php echo number_format($ct_point['stotal']); ?></td>
<td class="td_sendcost_by"><?php echo $ct_send_cost; ?></td>
<td class="td_mngsmall"><?php echo get_yn($opt['ct_point_use']); ?></td>
<td class="td_mngsmall"><?php echo get_yn($opt['ct_stock_use']); ?></td>
</tr>
<?php
}
?>
<?php
}
?>
</tbody>
</table>
</div>
</section>
<section id="anc_sodr_pay">
<h2 class="h2_frm">주문결제 내역</h2>
<?php echo $pg_anchor; ?>
<?php
// 주문금액 = 상품구입금액 + 배송비 + 추가배송비
$amount['order'] = $tot_ct_price + $od_send_cost + $od_send_cost2;
// 입금액
$amount['receipt'] = $od_temp_point;
// 쿠폰금액
$amount['coupon'] = $tot_cp_price + $tot_sc_cp_price;
// 취소금액
$amount['cancel'] = 0;
// 미수금 = 주문금액 - 취소금액 - 입금금액 - 쿠폰금액
$amount['misu'] = $amount['order'] - $amount['receipt'] - $amount['coupon'];
// 결제방법
$s_receipt_way = $data['od_settle_case'];
if($data['od_settle_case'] == '간편결제') {
switch($od['dt_pg']) {
case 'lg':
$s_receipt_way = 'PAYNOW';
break;
case 'inicis':
$s_receipt_way = 'KPAY';
break;
case 'kcp':
$s_receipt_way = 'PAYCO';
break;
default:
$s_receipt_way = $data['od_settle_case'];
break;
}
}
if ($od_temp_point > 0)
$s_receipt_way .= "+포인트";
?>
<div class="tbl_head01 tbl_wrap">
<form name="frmorderform" method="post" action="./inorderformupdate.php" onsubmit="return form_submit(this);">
<input type="hidden" name="od_id" value="<?php echo $od_id; ?>">
<input type="hidden" name="sst" value="<?php echo $sst; ?>">
<input type="hidden" name="sod" value="<?php echo $sod; ?>">
<input type="hidden" name="sfl" value="<?php echo $sfl; ?>">
<input type="hidden" name="stx" value="<?php echo $stx; ?>">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<strong class="sodr_nonpay">미수금 <?php echo display_price($amount['misu']); ?></strong>
<table>
<caption>주문결제 내역</caption>
<thead>
<tr>
<th scope="col">주문번호</th>
<th scope="col">결제방법</th>
<th scope="col">주문총액</th>
<th scope="col">배송비</th>
<th scope="col">포인트결제</th>
<th scope="col">총결제액</th>
<th scope="col">쿠폰</th>
<th scope="col">주문취소</th>
</tr>
</thead>
<tbody>
<tr>
<td><?php echo $od['od_id']; ?></td>
<td class="td_paybybig"><?php echo $s_receipt_way; ?></td>
<td class="td_numbig td_numsum"><?php echo display_price($amount['order']); ?></td>
<td class="td_numbig"><?php echo display_price($od_send_cost + $od_send_cost2); ?></td>
<td class="td_numbig"><?php echo display_point($od_temp_point); ?></td>
<td class="td_numbig td_numincome"><?php echo number_format($amount['receipt']); ?>원</td>
<td class="td_numbig td_numcoupon"><?php echo display_price($amount['coupon']); ?></td>
<td class="td_numbig td_numcancel"><?php echo number_format($amount['cancel']); ?>원</td>
</tr>
</tbody>
</table>
<div class="btn_confirm01 btn_confirm">
<input type="submit" value="주문 복구" class="btn_submit">
</div>
</form>
</div>
</section>
<section>
<?php
// 이니시스를 사용하고 있다면
if( $default['de_pg_service'] === 'inicis' && empty($default['de_card_test']) ){
$sql = " select * from {$g5['g5_shop_inicis_log_table']} where P_TID <> '' and P_TYPE in ('CARD', 'ISP', 'BANK') and P_MID <> '' and P_STATUS = '00' and oid = '".$od['od_id']."' ";
$results = sql_query($sql);
$tmps = array();
while( $tmp=sql_fetch_array($results) ){
$sql = " select od_id from {$g5['g5_shop_order_table']} where od_id = '".$tmp['oid']."' and od_tno = '".$tmp['P_TID']."' ";
$exist_od = sql_fetch($sql);
if( $exist_od['od_id'] ) continue;
$sql = " select pp_id from {$g5['g5_shop_personalpay_table']} where pp_id = '".$tmp['oid']."' and pp_tno = '".$tmp['P_TID']."' ";
$exist_od = sql_fetch($sql);
if( $exist_od['od_id'] ) continue;
$tmps[] = $tmp;
}
if( $tmps ) {
?>
<h2 class="h2_frm">이니시스 결제 로그</h2>
<div class="local_desc01 local_desc">
<p>실결제로 결제된 경우 반드시 이니시스 상점 관리자에서 해당 결제건을 확인 후에 주문을 처리해 주세요.</p>
</div>
<div class="tbl_head01 tbl_wrap">
<table>
<caption>이니시스 결제 로그</caption>
<tbody>
<?php foreach( $tmps as $tmp ){
if( empty($tmp) ) continue;
?>
<tr>
<th>주문번호</th>
<td><?php echo $tmp['oid']; ?></td>
</tr>
<tr>
<th>결제 TID</th>
<td><?php echo $tmp['P_TID']; ?></td>
</tr>
<tr>
<th>결제 MID</th>
<td><?php echo $tmp['P_MID']; ?><?php echo in_array( strtolower($tmp['P_MID']), array('iniescrow0', 'inipaytest') ) ? ' ( 테스트결제 )' : ''; ?></td>
</tr>
<tr>
<th>결제 시간</th>
<td><?php echo date('Y-m-d H:i:s', strtotime(substr($tmp['P_AUTH_DT'], 0, 14))); ?></td>
</tr>
<tr>
<th>결제 수단</th>
<td><?php echo $tmp['P_TYPE'].' '.$tmp['P_FN_NM']; ?></td>
</tr>
<tr>
<th>결제된 금액</th>
<td><?php echo $tmp['P_AMT'] ? number_format($tmp['P_AMT']) : 0; ?></td>
</tr>
<?php } //end foreach ?>
</tbody>
</table>
</div>
<?php
} //end if tmps
} //end if inicis
?>
<h2 class="h2_frm">주문자/배송지 정보</h2>
<?php echo $pg_anchor; ?>
<div class="compare_wrap">
<section id="anc_sodr_orderer" class="compare_left">
<h3>주문하신 분</h3>
<div class="tbl_frm01">
<table>
<caption>주문자/배송지 정보</caption>
<colgroup>
<col class="grid_4">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row"><span class="sound_only">주문하신 분 </span>이름</th>
<td><?php echo get_text($data['od_name']); ?></td>
</tr>
<tr>
<th scope="row"><span class="sound_only">주문하신 분 </span>전화번호</th>
<td><?php echo get_text($data['od_tel']); ?></td>
</tr>
<tr>
<th scope="row"><span class="sound_only">주문하신 분 </span>핸드폰</th>
<td><?php echo get_text($data['od_hp']); ?></td>
</tr>
<tr>
<th scope="row"><span class="sound_only">주문하시는 분 </span>주소</th>
<td>
<span><?php echo $data['od_zip']; ?></span>
<span><?php echo get_text($data['od_addr1']); ?></span>
<span><?php echo get_text($data['od_addr2']); ?></span>
<span><?php echo get_text($data['od_addr3']); ?></span>
</td>
</tr>
<tr>
<th scope="row"><span class="sound_only">주문하신 분 </span>E-mail</th>
<td><?php echo get_text($data['od_email']); ?></td>
</tr>
</tbody>
</table>
</div>
</section>
<section id="anc_sodr_taker" class="compare_right">
<h3>받으시는 분</h3>
<div class="tbl_frm01">
<table>
<caption>받으시는 분 정보</caption>
<colgroup>
<col class="grid_4">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row"><span class="sound_only">받으시는 분 </span>이름</th>
<td><?php echo get_text($data['od_b_name']); ?></td>
</tr>
<tr>
<th scope="row"><span class="sound_only">받으시는 분 </span>전화번호</th>
<td><?php echo get_text($data['od_b_tel']); ?></td>
</tr>
<tr>
<th scope="row"><span class="sound_only">받으시는 분 </span>핸드폰</th>
<td><?php echo get_text($data['od_b_hp']); ?></td>
</tr>
<tr>
<th scope="row"><span class="sound_only">받으시는 분 </span>주소</th>
<td>
<span><?php echo $data['od_b_zip']; ?></span>
<span><?php echo get_text($data['od_b_addr1']); ?></span>
<span><?php echo get_text($data['od_b_addr2']); ?></span>
<span><?php echo get_text($data['od_b_addr3']); ?></span>
</td>
</tr>
<?php if ($default['de_hope_date_use']) { ?>
<tr>
<th scope="row">희망배송일</th>
<td><?php echo $data['od_hope_date']; ?> (<?php echo get_yoil($data['od_hope_date']); ?>)</td>
</tr>
<?php } ?>
<tr>
<th scope="row">전달 메세지</th>
<td><?php if ($data['od_memo']) echo get_text($data['od_memo'], 1);else echo "없음";?></td>
</tr>
</tbody>
</table>
</div>
</section>
</div>
</section>
<script>
function form_submit(f)
{
if (!confirm("현재 미완료 주문을 입금완료 주문건으로 복구하시겠습니까?")) {
return false;
}
return true;
}
function del_confirm()
{
if(confirm("주문서를 삭제하시겠습니까?")) {
return true;
} else {
return false;
}
}
</script>
<?php
include_once(G5_ADMIN_PATH.'/admin.tail.php');
-393
View File
@@ -1,393 +0,0 @@
<?php
$sub_menu = '400410';
include_once('./_common.php');
check_demo();
if($w == 'd')
auth_check_menu($auth, $sub_menu, "d");
else
auth_check_menu($auth, $sub_menu, "w");
check_admin_token();
$od_id = isset($_REQUEST['od_id']) ? safe_replace_regex($_REQUEST['od_id'], 'od_id') : '';
//------------------------------------------------------------------------------
// 주문서 정보
//------------------------------------------------------------------------------
$sql = " select * from {$g5['g5_shop_order_data_table']} where od_id = '$od_id' ";
$od = sql_fetch($sql);
if (! (isset($od['od_id']) && $od['od_id'])) {
alert("해당 주문번호로 미완료 주문서가 존재하지 않습니다.");
}
if($w == 'd') {
$sql = " delete from {$g5['g5_shop_order_data_table']} where od_id = '$od_id' ";
sql_query($sql, true);
goto_url("./inorderlist.php?$qstr");
}
// 주문정보
$data = unserialize(base64_decode($od['dt_data']));
$sql_common = " from {$g5['g5_shop_cart_table']} where od_id = '{$od['cart_id']}' and ct_status = '쇼핑' ";
// 주문금액
$sql = " select SUM(IF(io_type = 1, io_price, (ct_price + io_price)) * ct_qty) as od_price, COUNT(distinct it_id) as cart_count $sql_common ";
$row = sql_fetch($sql);
$tot_ct_price = $row['od_price'];
$cart_count = $row['cart_count'];
$tot_od_price = $tot_ct_price;
$i_price = isset($data['od_price']) ? (int) $data['od_price'] : 0;
$i_send_cost = isset($data['od_send_cost']) ? (int) $data['od_send_cost'] : 0;
$i_send_cost2 = isset($data['od_send_cost2']) ? (int) $data['od_send_cost2'] : 0;
$i_send_coupon = isset($data['od_send_coupon']) ? (int) $data['od_send_coupon'] : 0;
$i_temp_point = isset($data['od_temp_point']) ? (int) $data['od_temp_point'] : 0;
// 쿠폰금액
$tot_cp_price = 0;
if($od['mb_id']) {
// 상품쿠폰
$tot_it_cp_price = $tot_od_cp_price = 0;
$it_cp_cnt = (isset($data['cp_id']) && is_array($data['cp_id'])) ? count($data['cp_id']) : 0;
$arr_it_cp_prc = array();
for($i=0; $i<$it_cp_cnt; $i++) {
$cid = $data['cp_id'][$i];
$it_id = $data['it_id'][$i];
$sql = " select cp_id, cp_method, cp_target, cp_type, cp_price, cp_trunc, cp_minimum, cp_maximum
from {$g5['g5_shop_coupon_table']}
where cp_id = '$cid'
and mb_id IN ( '{$od['mb_id']}', '전체회원' )
and cp_method IN ( 0, 1 ) ";
$cp = sql_fetch($sql);
if(! (isset($cp['cp_id']) && $cp['cp_id']))
continue;
// 사용한 쿠폰인지
if(is_used_coupon($od['mb_id'], $cp['cp_id']))
continue;
// 분류할인인지
if($cp['cp_method']) {
$sql2 = " select it_id, ca_id, ca_id2, ca_id3
from {$g5['g5_shop_item_table']}
where it_id = '$it_id' ";
$row2 = sql_fetch($sql2);
if(!$row2['it_id'])
continue;
if($row2['ca_id'] != $cp['cp_target'] && $row2['ca_id2'] != $cp['cp_target'] && $row2['ca_id3'] != $cp['cp_target'])
continue;
} else {
if($cp['cp_target'] != $it_id)
continue;
}
// 상품금액
$sql = " select SUM( IF(io_type = '1', io_price * ct_qty, (ct_price + io_price) * ct_qty)) as sum_price $sql_common and it_id = '$it_id' ";
$ct = sql_fetch($sql);
$item_price = $ct['sum_price'];
if($cp['cp_minimum'] > $item_price)
continue;
$dc = 0;
if($cp['cp_type']) {
$dc = floor(($item_price * ($cp['cp_price'] / 100)) / $cp['cp_trunc']) * $cp['cp_trunc'];
} else {
$dc = $cp['cp_price'];
}
if($cp['cp_maximum'] && $dc > $cp['cp_maximum'])
$dc = $cp['cp_maximum'];
if($item_price < $dc)
continue;
$tot_it_cp_price += $dc;
$arr_it_cp_prc[$it_id] = $dc;
}
$tot_od_price -= $tot_it_cp_price;
// 주문쿠폰
if(isset($data['od_cp_id']) && $data['od_cp_id']) {
$sql = " select cp_id, cp_type, cp_price, cp_trunc, cp_minimum, cp_maximum
from {$g5['g5_shop_coupon_table']}
where cp_id = '{$data['od_cp_id']}'
and mb_id IN ( '{$od['mb_id']}', '전체회원' )
and cp_method = '2' ";
$cp = sql_fetch($sql);
// 사용한 쿠폰인지
$cp_used = is_used_coupon($od['mb_id'], $cp['cp_id']);
$dc = 0;
if(!$cp_used && $cp['cp_id'] && ($cp['cp_minimum'] <= $tot_od_price)) {
if($cp['cp_type']) {
$dc = floor(($tot_od_price * ($cp['cp_price'] / 100)) / $cp['cp_trunc']) * $cp['cp_trunc'];
} else {
$dc = $cp['cp_price'];
}
if($cp['cp_maximum'] && $dc > $cp['cp_maximum'])
$dc = $cp['cp_maximum'];
$tot_od_cp_price = $dc;
$tot_od_price -= $tot_od_cp_price;
}
}
$tot_cp_price = $tot_it_cp_price + $tot_od_cp_price;
}
// 배송비
$od_send_cost = get_sendcost($od['cart_id']);
$tot_sc_cp_price = 0;
if($od['mb_id'] && $od_send_cost > 0) {
// 배송쿠폰
if($data['sc_cp_id']) {
$sql = " select cp_id, cp_type, cp_price, cp_trunc, cp_minimum, cp_maximum
from {$g5['g5_shop_coupon_table']}
where cp_id = '{$data['sc_cp_id']}'
and mb_id IN ( '{$od['mb_id']}', '전체회원' )
and cp_method = '3' ";
$cp = sql_fetch($sql);
// 사용한 쿠폰인지
$cp_used = is_used_coupon($od['mb_id'], $cp['cp_id']);
$dc = 0;
if(!$cp_used && $cp['cp_id'] && ($cp['cp_minimum'] <= $tot_od_price)) {
if($cp['cp_type']) {
$dc = floor(($send_cost * ($cp['cp_price'] / 100)) / $cp['cp_trunc']) * $cp['cp_trunc'];
} else {
$dc = $cp['cp_price'];
}
if($cp['cp_maximum'] && $dc > $cp['cp_maximum'])
$dc = $cp['cp_maximum'];
if($dc > $send_cost)
$dc = $send_cost;
$tot_sc_cp_price = $dc;
}
}
}
// 추가배송비
$od_send_cost2 = isset($data['od_send_cost2']) ? (int) $data['od_send_cost2'] : 0;
// 포인트
$od_temp_point = isset($data['od_temp_point']) ? (int) $data['od_temp_point'] : 0;
$i_price = $i_price + $i_send_cost + $i_send_cost2 - $i_temp_point - $i_send_coupon;
$order_price = $tot_od_price + $od_send_cost + $od_send_cost2 - $tot_sc_cp_price - $od_temp_point;
if ($od['mb_id']) {
$mb = get_member($od['mb_id']);
$od_pwd = $mb['mb_password'];
} else {
$od_pwd = get_encrypt_string($data['od_pwd']);
}
$od_escrow = 0;
// 복합과세 금액
$od_tax_mny = round($i_price / 1.1);
$od_vat_mny = $i_price - $od_tax_mny;
$od_free_mny = 0;
if($default['de_tax_flag_use']) {
$od_tax_mny = (int)$data['comm_tax_mny'];
$od_vat_mny = (int)$data['comm_vat_mny'];
$od_free_mny = (int)$data['comm_free_mny'];
}
$od_pg = $default['de_pg_service'];
if($data['od_settle_case'] == 'KAKAOPAY')
$od_pg = 'KAKAOPAY';
$od_email = get_email_address($data['od_email']);
$od_name = clean_xss_tags($data['od_name']);
$od_tel = clean_xss_tags($data['od_tel']);
$od_hp = clean_xss_tags($data['od_hp']);
$od_zip = preg_replace('/[^0-9]/', '', $data['od_zip']);
$od_zip1 = substr($od_zip, 0, 3);
$od_zip2 = substr($od_zip, 3);
$od_addr1 = clean_xss_tags($data['od_addr1']);
$od_addr2 = clean_xss_tags($data['od_addr2']);
$od_addr3 = clean_xss_tags($data['od_addr3']);
$od_addr_jibeon = preg_match("/^(N|R)$/", $data['od_addr_jibeon']) ? $data['od_addr_jibeon'] : '';
$od_b_name = clean_xss_tags($data['od_b_name']);
$od_b_tel = clean_xss_tags($data['od_b_tel']);
$od_b_hp = clean_xss_tags($data['od_b_hp']);
$od_b_zip = preg_replace('/[^0-9]/', '', $data['od_b_zip']);
$od_b_zip1 = substr($od_b_zip, 0, 3);
$od_b_zip2 = substr($od_b_zip, 3);
$od_b_addr1 = clean_xss_tags($data['od_b_addr1']);
$od_b_addr2 = clean_xss_tags($data['od_b_addr2']);
$od_b_addr3 = clean_xss_tags($data['od_b_addr3']);
$od_b_addr_jibeon = preg_match("/^(N|R)$/", $data['od_b_addr_jibeon']) ? $data['od_b_addr_jibeon'] : '';
$od_memo = clean_xss_tags($data['od_memo']);
$od_deposit_name = clean_xss_tags($data['od_deposit_name']);
$od_tax_flag = $default['de_tax_flag_use'];
$od_receipt_price = $tot_ct_price + $od_send_cost + $od_send_cost2 - ($od_temp_point + $tot_cp_price + $tot_sc_cp_price);
$od_receipt_point = $od_temp_point;
$od_receipt_time = $od['dt_time'];
$od_misu = 0;
$od_status = '입금';
$od_bank_account = isset($data['od_bank_account']) ? clean_xss_tags($data['od_bank_account'], 1, 1) : '';
$od_tno = '';
$od_app_no = '';
$od_hope_date = isset($data['od_hope_date']) ? clean_xss_tags($data['od_hope_date'], 1, 1) : '';
// 주문서에 입력
$sql = " insert {$g5['g5_shop_order_table']}
set od_id = '$od_id',
mb_id = '{$od['mb_id']}',
od_pwd = '$od_pwd',
od_name = '$od_name',
od_email = '$od_email',
od_tel = '$od_tel',
od_hp = '$od_hp',
od_zip1 = '$od_zip1',
od_zip2 = '$od_zip2',
od_addr1 = '$od_addr1',
od_addr2 = '$od_addr2',
od_addr3 = '$od_addr3',
od_addr_jibeon = '$od_addr_jibeon',
od_b_name = '$od_b_name',
od_b_tel = '$od_b_tel',
od_b_hp = '$od_b_hp',
od_b_zip1 = '$od_b_zip1',
od_b_zip2 = '$od_b_zip2',
od_b_addr1 = '$od_b_addr1',
od_b_addr2 = '$od_b_addr2',
od_b_addr3 = '$od_b_addr3',
od_b_addr_jibeon = '$od_b_addr_jibeon',
od_deposit_name = '$od_deposit_name',
od_memo = '$od_memo',
od_cart_count = '$cart_count',
od_cart_price = '$tot_ct_price',
od_cart_coupon = '$tot_it_cp_price',
od_send_cost = '$od_send_cost',
od_send_coupon = '$tot_sc_cp_price',
od_send_cost2 = '$od_send_cost2',
od_coupon = '$tot_od_cp_price',
od_receipt_price = '$od_receipt_price',
od_receipt_point = '$od_receipt_point',
od_bank_account = '$od_bank_account',
od_receipt_time = '$od_receipt_time',
od_misu = '$od_misu',
od_pg = '$od_pg',
od_tno = '$od_tno',
od_app_no = '$od_app_no',
od_escrow = '$od_escrow',
od_tax_flag = '$od_tax_flag',
od_tax_mny = '$od_tax_mny',
od_vat_mny = '$od_vat_mny',
od_free_mny = '$od_free_mny',
od_status = '$od_status',
od_shop_memo = '',
od_hope_date = '{$od_hope_date}',
od_time = '{$od['dt_time']}',
od_ip = '{$data['od_ip']}',
od_settle_case = '{$data['od_settle_case']}',
od_test = '{$data['od_test']}'
";
$result = sql_query($sql, true);
$sql_card_point = "";
if ($od_receipt_price > 0 && !$default['de_card_point']) {
$sql_card_point = " , ct_point = '0' ";
}
$sql = "update {$g5['g5_shop_cart_table']}
set od_id = '$od_id',
ct_status = '입금'
$sql_card_point
where od_id = '{$od['cart_id']}'
and ct_select = '1' ";
$result = sql_query($sql, true);
// 회원이면서 포인트를 사용했다면 테이블에 사용을 추가
if ($od['mb_id'] && $od_receipt_point)
insert_point($od['mb_id'], (-1) * $od_receipt_point, "주문번호 $od_id 결제");
// 쿠폰사용내역기록
if($od['mb_id']) {
$it_cp_cnt = (isset($data['cp_id']) && is_array($data['cp_id'])) ? count($data['cp_id']) : 0;
for($i=0; $i<$it_cp_cnt; $i++) {
$cid = $data['cp_id'][$i];
$cp_it_id = $data['it_id'][$i];
$cp_prc = isset($arr_it_cp_prc[$cp_it_id]) ? (int) $arr_it_cp_prc[$cp_it_id] : 0;
if(trim($cid)) {
$sql = " insert into {$g5['g5_shop_coupon_log_table']}
set cp_id = '$cid',
mb_id = '{$od['mb_id']}',
od_id = '$od_id',
cp_price = '$cp_prc',
cl_datetime = '{$od['dt_time']}' ";
sql_query($sql);
}
// 쿠폰사용금액 cart에 기록
$sql = " update {$g5['g5_shop_cart_table']}
set cp_price = '$cp_prc'
where od_id = '$od_id'
and it_id = '$cp_it_id'
and ct_select = '1'
order by ct_id asc
limit 1 ";
sql_query($sql);
}
if(isset($data['od_cp_id']) && $data['od_cp_id']) {
$sql = " insert into {$g5['g5_shop_coupon_log_table']}
set cp_id = '{$data['od_cp_id']}',
mb_id = '{$od['mb_id']}',
od_id = '$od_id',
cp_price = '$tot_od_cp_price',
cl_datetime = '{$od['dt_time']}' ";
sql_query($sql);
}
if(isset($data['sc_cp_id']) && $data['sc_cp_id']) {
$sql = " insert into {$g5['g5_shop_coupon_log_table']}
set cp_id = '{$data['sc_cp_id']}',
mb_id = '{$od['mb_id']}',
od_id = '$od_id',
cp_price = '$tot_sc_cp_price',
cl_datetime = '{$od['dt_time']}' ";
sql_query($sql);
}
}
// 주문정보
$info = get_order_info($od_id);
// 미수금 정보 등 반영
$sql = " update {$g5['g5_shop_order_table']}
set od_misu = '{$info['od_misu']}',
od_tax_mny = '{$info['od_tax_mny']}',
od_vat_mny = '{$info['od_vat_mny']}',
od_free_mny = '{$info['od_free_mny']}',
od_status = '$od_status'
where od_id = '$od_id' ";
sql_query($sql);
// 임시 주문정보 삭제
$sql = " delete from {$g5['g5_shop_order_data_table']} where od_id = '$od_id' and dt_pg = '$od_pg' ";
sql_query($sql, true);
echo '<meta http-equiv="content-type" content="text/html; charset=utf-8">'.PHP_EOL;
echo '<script>'.PHP_EOL;
echo 'if(confirm("복구하신 주문 상세페이지로 이동하시겠습니까?"))'.PHP_EOL;
echo 'document.location.href = "./orderform.php?od_id='.$od_id.'";'.PHP_EOL;
echo 'else'.PHP_EOL;
echo 'document.location.href = "./inorderlist.php?'.str_replace('&amp;', '&', $qstr).'";'.PHP_EOL;
echo '</script>'.PHP_EOL;
-175
View File
@@ -1,175 +0,0 @@
<?php
$sub_menu = '400410';
include_once('./_common.php');
auth_check_menu($auth, $sub_menu, "r");
$sql_common = " from {$g5['g5_shop_order_data_table']} ";
$sql_search = " where cart_id <> '0' ";
if ($stx) {
$sql_search .= " and ( ";
switch ($sfl) {
case 'od_id' :
$sql_search .= " ({$sfl} = '{$stx}') ";
break;
default :
$sql_search .= " ({$sfl} like '%{$stx}%') ";
break;
}
$sql_search .= " ) ";
}
if (!$sst) {
$sst = "od_id";
$sod = "desc";
}
$sql_order = " order by {$sst} {$sod} ";
$sql = " select count(*) as cnt
{$sql_common}
{$sql_search}
{$sql_order} ";
$row = sql_fetch($sql);
$total_count = $row['cnt'];
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page < 1) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select *
{$sql_common}
{$sql_search}
{$sql_order}
limit {$from_record}, {$rows} ";
$result = sql_query($sql);
$g5['title'] = '미완료주문';
include_once (G5_ADMIN_PATH.'/admin.head.php');
$colspan = 10;
?>
<div class="local_ov01 local_ov">
<span class="btn_ov01"><span class="ov_txt">전체 </span><span class="ov_num"> <?php echo number_format($total_count) ?> 건 </span></span>
</div>
<form name="fsearch" id="fsearch" class="local_sch01 local_sch" method="get">
<select name="sfl" title="검색대상">
<option value="od_id"<?php echo get_selected($sfl, "od_id"); ?>>주문번호</option>
</select>
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
<input type="text" name="stx" value="<?php echo $stx ?>" id="stx" required class="required frm_input">
<input type="submit" class="btn_submit" value="검색">
</form>
<form name="finorderlist" id="finorderlist" method="post" action="./inorderlistdelete.php" onsubmit="return finorderlist_submit(this);">
<input type="hidden" name="sst" value="<?php echo $sst; ?>">
<input type="hidden" name="sod" value="<?php echo $sod; ?>">
<input type="hidden" name="sfl" value="<?php echo $sfl; ?>">
<input type="hidden" name="stx" value="<?php echo $stx; ?>">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<input type="hidden" name="token" value="">
<div class="tbl_head01 tbl_wrap" id="inorderlist">
<table>
<caption><?php echo $g5['title']; ?> 목록</caption>
<thead>
<tr>
<th scope="col">
<label for="chkall" class="sound_only">미완료주문 전체</label>
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
</th>
<th scope="col"><?php echo subject_sort_link('od_id') ?>주문번호</a></th>
<th scope="col">PG</th>
<th scope="col">주문자</th>
<th scope="col">주문자전화</th>
<th scope="col">받는분</th>
<th scope="col">주문금액</th>
<th scope="col">결제방법</th>
<th scope="col">주문일시</th>
<th scope="col">관리</th>
</tr>
</thead>
<tbody>
<?php
for ($i=0; $row=sql_fetch_array($result); $i++) {
$data = unserialize(base64_decode($row['dt_data']));
switch($row['dt_pg']) {
case 'inicis':
$pg = 'KG이니시스';
break;
case 'lg':
$pg = 'LGU+';
break;
default:
$pg = 'KCP';
break;
}
// 주문금액
$sql = " select sum(if(io_type = '1', io_price, (ct_price + io_price)) * ct_qty) as price from {$g5['g5_shop_cart_table']} where od_id = '{$row['cart_id']}' and ct_status = '쇼핑' ";
$ct = sql_fetch($sql);
$bg = 'bg'.($i%2);
?>
<tr class="<?php echo $bg; ?>">
<td class="td_chk">
<input type="hidden" id="od_id_<?php echo $i; ?>" name="od_id[<?php echo $i; ?>]" value="<?php echo $row['od_id']; ?>">
<input type="checkbox" id="chk_<?php echo $i; ?>" name="chk[]" value="<?php echo $i; ?>" title="내역선택">
</td>
<td class="td_odrnum2"><?php echo $row['od_id']; ?></td>
<td class="td_center"><?php echo $pg; ?></td>
<td class="td_name"><?php echo get_text($data['od_name']); ?></td>
<td class="td_center"><?php echo get_text($data['od_tel']); ?></td>
<td class="td_name"><?php echo get_text($data['od_b_name']); ?></td>
<td class="td_price"><?php echo number_format($ct['price']); ?></td>
<td class="td_center"><?php echo $data['od_settle_case']; ?></td>
<td class="td_time"><?php echo $row['dt_time']; ?></td>
<td class="td_mng td_mng_m">
<a href="./inorderform.php?od_id=<?php echo $row['od_id']; ?>&amp;<?php echo $qstr; ?>" class="btn btn_03"><span class="sound_only"><?php echo $row['od_id']; ?> </span>보기</a>
<a href="./inorderformupdate.php?w=d&amp;od_id=<?php echo $row['od_id']; ?>&amp;<?php echo $qstr; ?>" onclick="return delete_confirm(this);" class="btn btn_02"><span class="sound_only"><?php echo $row['od_id']; ?> </span>삭제</a>
</td>
</tr>
<?php
}
if ($i == 0)
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
?>
</tbody>
</table>
</div>
<div class="btn_fixed_top">
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value" class="btn btn_02">
</div>
</form>
<?php echo get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['SCRIPT_NAME']}?$qstr&amp;page="); ?>
<script>
function finorderlist_submit(f)
{
if (!is_checked("chk[]")) {
alert(document.pressed+" 하실 항목을 하나 이상 선택하세요.");
return false;
}
if(document.pressed == "선택삭제") {
if(!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
return false;
}
}
return true;
}
</script>
<?php
include_once (G5_ADMIN_PATH.'/admin.tail.php');
-24
View File
@@ -1,24 +0,0 @@
<?php
$sub_menu = '400410';
include_once('./_common.php');
check_demo();
auth_check_menu($auth, $sub_menu, 'd');
check_admin_token();
$count = (isset($_POST['chk']) && is_array($_POST['chk'])) ? count($_POST['chk']) : 0;
if(!$count)
alert('선택삭제 하실 항목을 하나이상 선택해 주세요.');
for ($i=0; $i<$count; $i++)
{
// 실제 번호를 넘김
$k = isset($_POST['chk'][$i]) ? (int) $_POST['chk'][$i] : 0;
$od_id = isset($_POST['od_id'][$k]) ? safe_replace_regex($_POST['od_id'][$k], 'od_id') : '';
$sql = " delete from {$g5['g5_shop_order_data_table']} where od_id = '{$od_id}' ";
sql_query($sql);
}
goto_url('./inorderlist.php');
-55
View File
@@ -1,55 +0,0 @@
<?php
$sub_menu = '400300';
include_once('./_common.php');
$ca_id = isset($_REQUEST['ca_id']) ? preg_replace('/[^0-9a-z]/i', '', $_REQUEST['ca_id']) : '';
$it_id = isset($_REQUEST['it_id']) ? safe_replace_regex($_REQUEST['it_id'], 'it_id') : '';
auth_check_menu($auth, $sub_menu, "r");
$g5['title'] = '상품 복사';
include_once(G5_PATH.'/head.sub.php');
?>
<div class="new_win">
<h1>상품 복사</h1>
<form name="fitemcopy">
<div id="sit_copy">
<label for="new_it_id">상품코드</label>
<input type="text" name="new_it_id" value="<?php echo time(); ?>" id="new_it_id" class="frm_input" maxlength="20">
</div>
<div class="win_btn btn_confirm">
<input type="button" value="복사하기" class="btn_submit" onclick="_copy('itemcopyupdate.php?it_id=<?php echo $it_id; ?>&amp;ca_id=<?php echo $ca_id; ?>');">
<button type="button" onclick="self.close();">창닫기</button>
</div>
</form>
</div>
<script src="<?php echo G5_ADMIN_URL ?>/admin.js"></script>
<script>
// <![CDATA[
function _copy(link)
{
var new_it_id = document.getElementById('new_it_id').value;
var t_it_id = new_it_id.replace(/[A-Za-z0-9\-_]/g, "");
if(t_it_id.length > 0) {
alert("상품코드는 영문자, 숫자, -, _ 만 사용할 수 있습니다.");
return false;
}
var token = get_ajax_token();
if(!token) {
alert("토큰 정보가 올바르지 않습니다.");
return false;
}
opener.parent.location.href = encodeURI(link+'&new_it_id='+new_it_id+"&token="+token);
self.close();
}
// ]]>
</script>
<?php
include_once(G5_PATH.'/tail.sub.php');
-171
View File
@@ -1,171 +0,0 @@
<?php
$sub_menu = '400300';
include_once('./_common.php');
auth_check_menu($auth, $sub_menu, "w");
check_admin_token();
$ca_id = isset($_REQUEST['ca_id']) ? preg_replace('/[^0-9a-z]/i', '', $_REQUEST['ca_id']) : '';
$it_id = isset($_REQUEST['it_id']) ? safe_replace_regex($_REQUEST['it_id'], 'it_id') : '';
if ($is_admin != "super")
alert("최고관리자만 접근 가능합니다.");
if (!trim($it_id))
alert("복사할 상품코드가 없습니다.");
if(isset($_POST['new_it_id']) && preg_match('/[^A-Za-z0-9\-_]+/', $_POST['new_it_id']))
alert("상품코드는 영문자, 숫자, -, _ 만 사용할 수 있습니다.");
$new_it_id = isset($_REQUEST['new_it_id']) ? preg_replace("/[^A-Za-z0-9\-_]/", "", $_REQUEST['new_it_id']) : '';
if( ! $new_it_id ) alert('상품코드를 입력해 주세요.');
$row = sql_fetch(" select count(*) as cnt from {$g5['g5_shop_item_table']} where it_id = '$new_it_id' ");
if (isset($row['cnt']) && $row['cnt'])
alert('이미 존재하는 상품코드 입니다.');
$sql = " select * from {$g5['g5_shop_item_table']} where it_id = '$it_id' limit 1 ";
$cp = sql_fetch($sql);
// 상품테이블의 필드가 추가되어도 수정하지 않도록 필드명을 추출하여 insert 퀴리를 생성한다. (상품코드만 새로운것으로 대체)
$sql_common = "";
$fields = sql_field_names($g5['g5_shop_item_table']);
foreach($fields as $fld) {
if ($fld == 'it_id' || $fld == 'it_sum_qty' || $fld == 'it_use_cnt' || $fld == 'it_use_avg')
continue;
$sql_common .= " , $fld = '".addslashes($cp[$fld])."' ";
}
$sql = " insert {$g5['g5_shop_item_table']}
set it_id = '$new_it_id'
$sql_common ";
sql_query($sql);
// 선택/추가 옵션 copy
$opt_sql = " insert ignore into {$g5['g5_shop_item_option_table']} ( io_id, io_type, it_id, io_price, io_stock_qty, io_noti_qty, io_use )
select io_id, io_type, '$new_it_id', io_price, io_stock_qty, io_noti_qty, io_use
from {$g5['g5_shop_item_option_table']}
where it_id = '$it_id'
order by io_no asc ";
sql_query($opt_sql);
// html 에디터로 첨부된 이미지 파일 복사
if($cp['it_explan']) {
$matchs = get_editor_image($cp['it_explan'], false);
$count_matchs = (isset($matchs[1]) && is_array($matchs[1])) ? count($matchs[1]) : 0;
// 파일의 경로를 얻어 복사
for($i=0;$i<$count_matchs;$i++) {
$p = parse_url($matchs[1][$i]);
if(strpos($p['path'], "/data/") != 0)
$src_path = preg_replace("/^\/.*\/data/", "/data", $p['path']);
else
$src_path = $p['path'];
$srcfile = G5_PATH.$src_path;
$dstfile = preg_replace("/\.([^\.]+)$/", "_".$new_it_id.".\\1", $srcfile);
if(is_file($srcfile)) {
copy($srcfile, $dstfile);
$newfile = preg_replace("/\.([^\.]+)$/", "_".$new_it_id.".\\1", $matchs[1][$i]);
$cp['it_explan'] = str_replace($matchs[1][$i], $newfile, $cp['it_explan']);
}
}
$sql = " update {$g5['g5_shop_item_table']} set it_explan = '".addslashes($cp['it_explan'])."' where it_id = '$new_it_id' ";
sql_query($sql);
}
if($cp['it_mobile_explan']) {
$matchs = get_editor_image($cp['it_mobile_explan'], false);
$count_matchs = (isset($matchs[1]) && is_array($matchs[1])) ? count($matchs[1]) : 0;
// 파일의 경로를 얻어 복사
for($i=0;$i<$count_matchs;$i++) {
$p = parse_url($matchs[1][$i]);
if(strpos($p['path'], "/data/") != 0)
$src_path = preg_replace("/^\/.*\/data/", "/data", $p['path']);
else
$src_path = $p['path'];
$srcfile = G5_PATH.$src_path;
$dstfile = preg_replace("/\.([^\.]+)$/", "_".$new_it_id.".\\1", $srcfile);
if(is_file($srcfile)) {
copy($srcfile, $dstfile);
$newfile = preg_replace("/\.([^\.]+)$/", "_".$new_it_id.".\\1", $matchs[1][$i]);
$cp['it_mobile_explan'] = str_replace($matchs[1][$i], $newfile, $cp['it_mobile_explan']);
}
}
$sql = " update {$g5['g5_shop_item_table']} set it_mobile_explan = '".addslashes($cp['it_mobile_explan'])."' where it_id = '$new_it_id' ";
sql_query($sql);
}
// 상품이미지 복사
function copy_directory($src_dir, $dest_dir)
{
if($src_dir == $dest_dir)
return false;
if(!is_dir($src_dir))
return false;
if(!is_dir($dest_dir)) {
@mkdir($dest_dir, G5_DIR_PERMISSION);
@chmod($dest_dir, G5_DIR_PERMISSION);
}
$dir = opendir($src_dir);
while (false !== ($filename = readdir($dir))) {
if($filename == "." || $filename == "..")
continue;
$files[] = $filename;
}
for($i=0; $i<count($files); $i++) {
$src_file = $src_dir.'/'.$files[$i];
$dest_file = $dest_dir.'/'.$files[$i];
if(is_file($src_file)) {
copy($src_file, $dest_file);
@chmod($dest_file, G5_FILE_PERMISSION);
}
}
}
// 파일복사
$dest_path = G5_DATA_PATH.'/item/'.$new_it_id;
@mkdir($dest_path, G5_DIR_PERMISSION);
@chmod($dest_path, G5_DIR_PERMISSION);
$comma = '';
$sql_img = '';
for($i=1; $i<=10; $i++) {
$file = G5_DATA_PATH.'/item/'.$cp['it_img'.$i];
$new_img = '';
if(is_file($file)) {
$dstfile = $dest_path.'/'.basename($file);
copy($file, $dstfile);
@chmod($dstfile, G5_FILE_PERMISSION);
$new_img = $new_it_id.'/'.basename($file);
}
$sql_img .= $comma." it_img{$i} = '$new_img' ";
$comma = ',';
}
$sql = " update {$g5['g5_shop_item_table']}
set $sql_img
where it_id = '$new_it_id' ";
sql_query($sql);
$qstr = "ca_id=$ca_id&amp;sfl=$sfl&amp;sca=$sca&amp;page=$page&amp;stx=".urlencode($stx);
goto_url("itemlist.php?$qstr");
-116
View File
@@ -1,116 +0,0 @@
<?php
// itemlistdelete.php 에서 include 하는 파일
if (!defined('_GNUBOARD_')) exit;
if (!defined('_ITEM_DELETE_')) exit; // 개별 페이지 접근 불가
if (!function_exists("itemdelete")) {
// 상품삭제
// 메세지출력후 주문개별내역페이지로 이동
function itemdelete($it_id)
{
global $g5, $is_admin;
$sql = " select it_explan, it_mobile_explan, it_img1, it_img2, it_img3, it_img4, it_img5, it_img6, it_img7, it_img8, it_img9, it_img10
from {$g5['g5_shop_item_table']} where it_id = '$it_id' ";
$it = sql_fetch($sql);
// 상품 이미지 삭제
$dir_list = array();
for($i=1; $i<=10; $i++) {
$file = G5_DATA_PATH.'/item/'.clean_relative_paths($it['it_img'.$i]);
if(is_file($file) && $it['it_img'.$i]) {
@unlink($file);
$dir = dirname($file);
delete_item_thumbnail($dir, basename($file));
if(!in_array($dir, $dir_list))
$dir_list[] = $dir;
}
}
// 이미지디렉토리 삭제
for($i=0; $i<count($dir_list); $i++) {
if(is_dir($dir_list[$i]))
rmdir($dir_list[$i]);
}
// 상, 하단 이미지 삭제
@unlink(G5_DATA_PATH."/item/$it_id"."_h");
@unlink(G5_DATA_PATH."/item/$it_id"."_t");
// 장바구니 삭제
$sql = " delete from {$g5['g5_shop_cart_table']} where it_id = '$it_id' and ct_status = '쇼핑' ";
sql_query($sql);
// 이벤트삭제
$sql = " delete from {$g5['g5_shop_event_item_table']} where it_id = '$it_id' ";
sql_query($sql);
// 사용후기삭제
$sql = " delete from {$g5['g5_shop_item_use_table']} where it_id = '$it_id' ";
sql_query($sql);
// 상품문의삭제
$sql = " delete from {$g5['g5_shop_item_qa_table']} where it_id = '$it_id' ";
sql_query($sql);
// 관련상품삭제
$sql = " delete from {$g5['g5_shop_item_relation_table']} where it_id = '$it_id' or it_id2 = '$it_id' ";
sql_query($sql);
// 옵션삭제
sql_query(" delete from {$g5['g5_shop_item_option_table']} where it_id = '$it_id' ");
//------------------------------------------------------------------------
// HTML 내용에서 에디터에 올라간 이미지의 경로를 얻어 삭제함
//------------------------------------------------------------------------
$imgs = get_editor_image($it['it_explan'], false);
$count_imgs = (isset($imgs[1]) && is_array($imgs[1])) ? count($imgs[1]) : 0;
for($i=0;$i<$count_imgs;$i++) {
$p = parse_url($imgs[1][$i]);
if(strpos($p['path'], "/data/editor/") === false)
continue;
if(strpos($p['path'], "/data/") != 0)
$data_path = preg_replace("/^\/.*\/data/", "/data", $p['path']);
else
$data_path = $p['path'];
$destfile = G5_PATH.clean_relative_paths($data_path);
if(is_file($destfile) && preg_match('/(\.(gif|jpe?g|png))$/i', $destfile))
@unlink($destfile);
}
$imgs = get_editor_image($it['it_mobile_explan'], false);
$count_imgs = (isset($imgs[1]) && is_array($imgs[1])) ? count($imgs[1]) : 0;
for($i=0;$i<$count_imgs;$i++) {
$p = parse_url($imgs[1][$i]);
if(strpos($p['path'], "/data/editor/") === false)
continue;
if(strpos($p['path'], "/data/") != 0)
$data_path = preg_replace("/^\/.*\/data/", "/data", $p['path']);
else
$data_path = $p['path'];
$destfile = G5_PATH.clean_relative_paths($data_path);
if(is_file($destfile) && preg_match('/(\.(gif|jpe?g|png))$/i', $destfile))
@unlink($destfile);
}
//------------------------------------------------------------------------
// 상품 삭제
$sql = " delete from {$g5['g5_shop_item_table']} where it_id = '$it_id' ";
sql_query($sql);
}
}
run_event('shop_admin_delete_item_file', $it_id);
itemdelete($it_id);
-89
View File
@@ -1,89 +0,0 @@
<?php
$sub_menu = '500300';
include_once('./_common.php');
auth_check_menu($auth, $sub_menu, "r");
$g5['title'] = '이벤트관리';
include_once (G5_ADMIN_PATH.'/admin.head.php');
$sql_common = " from {$g5['g5_shop_event_table']} ";
// 테이블의 전체 레코드수만 얻음
$sql = " select count(*) as cnt " . $sql_common;
$row = sql_fetch($sql);
$total_count = $row['cnt'];
$sql = "select * $sql_common order by ev_id desc ";
$result = sql_query($sql);
?>
<div class="local_ov01 local_ov">
<span class="btn_ov01"><span class="ov_txt">전체 이벤트</span><span class="ov_num"> <?php echo $total_count; ?>건</span></span>
</div>
<div class="btn_fixed_top">
<a href="./itemeventform.php" class="btn btn_01">이벤트 추가</a>
</div>
<div class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?> 목록</caption>
<thead>
<tr>
<th scope="col">이벤트번호</th>
<th scope="col">제목</th>
<th scope="col">연결상품</th>
<th scope="col">사용</th>
<th scope="col">관리</th>
</tr>
</thead>
<tbody>
<?php
for ($i=0; $row=sql_fetch_array($result); $i++) {
$href = '';
$href_close = '';
$sql = " select count(ev_id) as cnt from {$g5['g5_shop_event_item_table']} where ev_id = '{$row['ev_id']}' ";
$ev = sql_fetch($sql);
if ($ev['cnt']) {
$href = '<a href="javascript:;" onclick="itemeventwin('.$row['ev_id'].');">';
$href_close = '</a>';
}
if ($row['ev_subject_strong']) $subject = '<strong>'.$row['ev_subject'].'</strong>';
else $subject = $row['ev_subject'];
?>
<tr>
<td class="td_num"><?php echo $row['ev_id']; ?></td>
<td class="td_left"><?php echo $subject; ?></td>
<td class="td_num"><?php echo $href; ?><?php echo $ev['cnt']; ?><?php echo $href_close; ?></td>
<td class="td_boolean"><?php echo $row['ev_use'] ? '<span class="txt_true">예</span>' : '<span class="txt_false">아니오</span>'; ?></td>
<td class="td_mng td_mng_l">
<a href="./itemeventform.php?w=u&amp;ev_id=<?php echo $row['ev_id']; ?>" class="btn btn_03">수정</a>
<a href="<?php echo G5_SHOP_URL; ?>/event.php?ev_id=<?php echo $row['ev_id']; ?>" class="btn btn_02">보기</a>
<a href="./itemeventformupdate.php?w=d&amp;ev_id=<?php echo $row['ev_id']; ?>" onclick="return delete_confirm(this);" class="btn btn_02">삭제</a>
</td>
</tr>
<?php
}
if ($i == 0) {
echo '<tr><td colspan="5" class="empty_table">자료가 없습니다.</td></tr>';
}
?>
</tbody>
</table>
</div>
<script>
function itemeventwin(ev_id)
{
window.open("./itemeventwin.php?ev_id="+ev_id, "itemeventwin", "left=10,top=10,width=500,height=600,scrollbars=1");
}
</script>
<?php
include_once (G5_ADMIN_PATH.'/admin.tail.php');
-456
View File
@@ -1,456 +0,0 @@
<?php
$sub_menu = '500300';
include_once('./_common.php');
include_once(G5_EDITOR_LIB);
auth_check_menu($auth, $sub_menu, "w");
$ev_id = isset($_REQUEST['ev_id']) ? preg_replace('/[^0-9]/', '', $_REQUEST['ev_id']) : '';
$ev = array(
'ev_subject'=>'',
'ev_subject_strong'=>'',
'ev_id'=>'',
'ev_head_html'=>'',
'ev_tail_html'=>''
);
$res_item = null;
$html_title = "이벤트";
$g5['title'] = $html_title.' 관리';
if ($w == "u")
{
$html_title .= " 수정";
$readonly = " readonly";
$sql = " select * from {$g5['g5_shop_event_table']} where ev_id = '$ev_id' ";
$ev = sql_fetch($sql);
if (! (isset($ev['ev_id']) && $ev['ev_id']))
alert("등록된 자료가 없습니다.");
// 등록된 이벤트 상품
$sql = " select b.it_id, b.it_name
from {$g5['g5_shop_event_item_table']} a left join {$g5['g5_shop_item_table']} b on ( a.it_id = b.it_id )
where a.ev_id = '$ev_id' ";
$res_item = sql_query($sql);
}
else
{
$html_title .= " 입력";
$ev['ev_skin'] = 'list.10.skin.php';
$ev['ev_mobile_skin'] = 'list.10.skin.php';
$ev['ev_use'] = 1;
$ev['ev_img_width'] = 230;
$ev['ev_img_height'] = 230;
$ev['ev_list_mod'] = 3;
$ev['ev_list_row'] = 5;
$ev['ev_mobile_img_width'] = 230;
$ev['ev_mobile_img_height'] = 230;
$ev['ev_mobile_list_mod'] = 3;
$ev['ev_mobile_list_row'] = 5;
}
// 분류리스트
$category_select = '';
$sql = " select * from {$g5['g5_shop_category_table']} ";
if ($is_admin != 'super')
$sql .= " where ca_mb_id = '{$member['mb_id']}' ";
$sql .= " order by ca_order, ca_id ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$len = strlen($row['ca_id']) / 2 - 1;
$nbsp = "";
for ($i=0; $i<$len; $i++)
$nbsp .= "&nbsp;&nbsp;&nbsp;";
$category_select .= "<option value=\"{$row['ca_id']}\">$nbsp{$row['ca_name']}</option>\n";
}
// 모바일 1줄당 이미지수 필드 추가
if(!sql_query(" select ev_mobile_list_row from {$g5['g5_shop_event_table']} limit 1 ", false)) {
sql_query(" ALTER TABLE `{$g5['g5_shop_event_table']}`
ADD `ev_mobile_list_row` int(11) NOT NULL DEFAULT '0' AFTER `ev_mobile_list_mod` ", true);
}
include_once (G5_ADMIN_PATH.'/admin.head.php');
?>
<form name="feventform" action="./itemeventformupdate.php" onsubmit="return feventform_check(this);" method="post" enctype="MULTIPART/FORM-DATA">
<input type="hidden" name="w" value="<?php echo $w; ?>">
<input type="hidden" name="ev_id" value="<?php echo $ev_id; ?>">
<input type="hidden" name="ev_item" value="">
<div class="tbl_frm01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?></caption>
<colgroup>
<col class="grid_4">
<col>
</colgroup>
<tbody>
<?php if ($w == "u") { ?>
<tr>
<th>이벤트번호</th>
<td>
<span class="frm_ev_id"><?php echo $ev_id; ?></span>
<a href="<?php echo G5_SHOP_URL; ?>/event.php?ev_id=<?php echo $ev['ev_id']; ?>" class="btn_frmline">이벤트바로가기</a>
<button type="button" class="btn_frmline shop_event">테마설정 가져오기</button>
</td>
</tr>
<?php } ?>
<tr>
<th scope="row"><label for="ev_skin">출력스킨</label></th>
<td>
<?php echo help('기본으로 제공하는 스킨은 '.str_replace(G5_PATH.'/', '', G5_SHOP_SKIN_PATH).'/list.*.skin.php 입니다.'.PHP_EOL.G5_SHOP_DIR.'/event.php?ev_id=1234567890&amp;skin=userskin.php 처럼 직접 만든 스킨을 사용할 수도 있습니다.'); ?>
<select name="ev_skin" id="ev_skin">
<?php echo get_list_skin_options("^list.[0-9]+\.skin\.php", G5_SHOP_SKIN_PATH, $ev['ev_skin']); ?>
</select>
</td>
</tr>
<tr>
<th scope="row"><label for="ev_mobile_skin">모바일 출력스킨</label></th>
<td>
<?php echo help('기본으로 제공하는 스킨은 '.str_replace(G5_PATH.'/', '', G5_MSHOP_SKIN_PATH).'/list.*.skin.php 입니다.'.PHP_EOL.G5_SHOP_DIR.'/event.php?ev_id=1234567890&amp;skin=userskin.php 처럼 직접 만든 스킨을 사용할 수도 있습니다.'); ?>
<select name="ev_mobile_skin" id="ev_mobile_skin">
<?php echo get_list_skin_options("^list.[0-9]+\.skin\.php", G5_MSHOP_SKIN_PATH, $ev['ev_mobile_skin']); ?>
</select>
</td>
</tr>
<tr>
<th scope="row"><label for="ev_img_width">출력이미지 폭</label></th>
<td>
<input type="text" name="ev_img_width" value="<?php echo $ev['ev_img_width']; ?>" id="ev_img_width" required class="required frm_input" size="5"> 픽셀
</td>
</tr>
<tr>
<th scope="row"><label for="ev_img_height">출력이미지 높이</label></th>
<td>
<input type="text" name="ev_img_height" value="<?php echo $ev['ev_img_height']; ?>" id="ev_img_height" required class="required frm_input" size="5"> 픽셀
</td>
</tr>
<tr>
<th scope="row"><label for="ev_list_mod">1줄당 이미지 수</label></th>
<td>
<?php echo help("1행에 설정한 값만큼의 상품을 출력합니다. 스킨 설정에 따라 1행에 하나의 상품만 출력할 수도 있습니다."); ?>
<input type="text" name="ev_list_mod" value="<?php echo $ev['ev_list_mod']; ?>" id="ev_list_mod" required class="required frm_input" size="3"> 개
</td>
</tr>
<tr>
<th scope="row"><label for="ev_list_row">이미지 줄 수</label></th>
<td>
<?php echo help("한 페이지에 출력할 이미지 줄 수를 설정합니다.\n한 페이지에 표시되는 상품수는 (1줄당 이미지 수 x 줄 수) 입니다."); ?>
<input type="text" name="ev_list_row" value="<?php echo $ev['ev_list_row']; ?>" id="ev_list_row" required class="required frm_input" size="3"> 줄
</td>
</tr>
<tr>
<th scope="row"><label for="ev_mobile_img_width">모바일 출력이미지 폭</label></th>
<td>
<input type="text" name="ev_mobile_img_width" value="<?php echo $ev['ev_mobile_img_width']; ?>" id="ev_mobile_img_width" required class="required frm_input" size="5"> 픽셀
</td>
</tr>
<tr>
<th scope="row"><label for="ev_mobile_img_height">모바일 출력이미지 높이</label></th>
<td>
<input type="text" name="ev_mobile_img_height" value="<?php echo $ev['ev_mobile_img_height']; ?>" id="ev_mobile_img_height" required class="required frm_input" size="5"> 픽셀
</td>
</tr>
<tr>
<th scope="row"><label for="ev_mobile_list_mod">모바일 1줄당 이미지 수</label></th>
<td>
<?php echo help("1행에 설정한 값만큼의 상품을 출력합니다. 스킨 설정에 따라 1행에 하나의 상품만 출력할 수도 있습니다."); ?>
<input type="text" name="ev_mobile_list_mod" value="<?php echo $ev['ev_mobile_list_mod']; ?>" id="ev_mobile_list_mod" required class="required frm_input" size="3"> 개
</td>
</tr>
<tr>
<th scope="row"><label for="ev_mobile_list_row">모바일 이미지 줄 수</label></th>
<td>
<?php echo help("한 페이지에 출력할 이미지 줄 수를 설정합니다.\n한 페이지에 표시되는 상품수는 (1줄당 이미지 수 x 줄 수) 입니다."); ?>
<input type="text" name="ev_mobile_list_row" value="<?php echo $ev['ev_mobile_list_row']; ?>" id="ev_mobile_list_row" required class="required frm_input" size="3"> 개
</td>
</tr>
<tr>
<th scope="row"><label for="ev_use">사용</label></th>
<td>
<?php echo help("사용하지 않으면 레이아웃의 이벤트 메뉴 및 이벤트 관련 페이지에 접근할 수 없습니다."); ?>
<select name="ev_use" id="ev_use">
<option value="1" <?php echo get_selected($ev['ev_use'], 1); ?>>사용</option>
<option value="0" <?php echo get_selected($ev['ev_use'], 0); ?>>사용안함</option>
</select>
</td>
</tr>
<tr>
<th scope="row"><label for="ev_subject">이벤트제목</label></th>
<td>
<input type="text" name="ev_subject" value="<?php echo htmlspecialchars2($ev['ev_subject']); ?>" id="ev_subject" required class="required frm_input" size="60">
<input type="checkbox" name="ev_subject_strong" value="1" id="ev_subject_strong" <?php if($ev['ev_subject_strong']) echo 'checked="checked"'; ?>>
<label for="ev_subject_strong">제목 강조</label>
</td>
</tr>
<tr>
<th scope="row"><label for="ev_mimg">배너이미지</label></th>
<td>
<?php echo help("쇼핑몰 레이아웃에서 글자 대신 이미지로 출력할 경우 사용합니다."); ?>
<input type="file" name="ev_mimg" id="ev_mimg">
<?php
$mimg_str = "";
$mimg = G5_DATA_PATH.'/event/'.$ev['ev_id'].'_m';
if (file_exists($mimg)) {
$size = @getimagesize($mimg);
if($size[0] && $size[0] > 750)
$width = 750;
else
$width = $size[0];
echo '<input type="checkbox" name="ev_mimg_del" value="1" id="ev_mimg_del"> <label for="ev_mimg_del">삭제</label>';
$mimg_str = '<img src="'.G5_DATA_URL.'/event/'.$ev['ev_id'].'_m" width="'.$width.'" alt="">';
}
if ($mimg_str) {
echo '<div class="banner_or_img">';
echo $mimg_str;
echo '</div>';
}
?>
</td>
</tr>
<tr>
<th scope="row">관련상품</th>
<td id="sev_it_rel" class="compare_wrap srel">
<section class="compare_left">
<h3>상품검색</h3>
<span class="srel_pad">
<select name="ca_id" id="sch_ca_id">
<option value="">분류선택</option>
<?php echo $category_select; ?>
</select>
<label for="sch_name" class="sound_only">상품명</label>
<input type="text" name="sch_name" id="sch_name" class="frm_input" size="15">
<button type="button" id="btn_search_item" class="btn_frmline">검색</button>
</span>
<div id="sch_item_list" class="srel_list">
<p>상품의 분류를 선택하시거나 상품명을 입력하신 후 검색하여 주십시오.</p>
</div>
</section>
<section class="compare_right">
<h3>등록된 상품</h3>
<span class="srel_pad"></span>
<div id="reg_item_list" class="srel_sel">
<?php
if( $res_item ) {
for($i=0; $row=sql_fetch_array($res_item); $i++) {
$it_name = get_it_image($row['it_id'], 50, 50).' '.$row['it_name'];
if($i==0)
echo '<ul>';
?>
<li>
<input type="hidden" name="it_id[]" value="<?php echo $row['it_id']; ?>">
<div class="list_item"><?php echo $it_name; ?></div>
<div class="list_item_btn"><button type="button" class="del_item btn_frmline">삭제</button></div>
</li>
<?php
} // end for
} // end if
if($i > 0)
echo '</ul>';
else
echo '<p>등록된 상품이 없습니다.</p>';
?>
</div>
</section>
</td>
</tr>
<tr>
<th scope="row"><label for="ev_himg">상단이미지</label></th>
<td>
<?php echo help("이벤트 페이지 상단에 업로드 한 이미지를 출력합니다."); ?>
<input type="file" name="ev_himg" id="ev_himg">
<?php
$himg_str = "";
$himg = G5_DATA_PATH.'/event/'.$ev['ev_id'].'_h';
if (file_exists($himg)) {
$size = @getimagesize($himg);
if($size[0] && $size[0] > 750)
$width = 750;
else
$width = $size[0];
echo '<input type="checkbox" name="ev_himg_del" value="1" id="ev_himg_del"> <label for="ev_himg_del">삭제</label>';
$himg_str = '<img src="'.G5_DATA_URL.'/event/'.$ev['ev_id'].'_h" width="'.$width.'" alt="">';
}
if ($himg_str) {
echo '<div class="banner_or_img">';
echo $himg_str;
echo '</div>';
}
?>
</td>
</tr>
<tr>
<th scope="row"><label for="ev_timg">하단이미지</label></th>
<td>
<?php echo help("이벤트 페이지 하단에 업로드 한 이미지를 출력합니다."); ?>
<input type="file" name="ev_timg" id="ev_timg">
<?php
$timg_str = "";
$timg = G5_DATA_PATH.'/event/'.$ev['ev_id'].'_t';
if (file_exists($timg)) {
$size = @getimagesize($timg);
if($size[0] && $size[0] > 750)
$width = 750;
else
$width = $size[0];
echo '<input type="checkbox" name="ev_timg_del" value="1" id="ev_timg_del"> <label for="ev_timg_del">삭제</label>';
$timg_str = '<img src="'.G5_DATA_URL.'/event/'.$ev['ev_id'].'_t" width="'.$width.'" alt="">';
}
if ($timg_str) {
echo '<div class="banner_or_img">';
echo $timg_str;
echo '</div>';
}
?>
</td>
</tr>
<tr>
<th scope="row">상단내용</th>
<td>
<?php echo editor_html('ev_head_html', get_text(html_purifier($ev['ev_head_html']), 0)); ?>
</td>
</tr>
<tr>
<th scope="row">하단내용</th>
<td>
<?php echo editor_html('ev_tail_html', get_text(html_purifier($ev['ev_tail_html']), 0)); ?>
</td>
</tr>
</tbody>
</table>
</div>
<div class="btn_fixed_top">
<a href="./itemevent.php" class="btn btn_02">목록</a>
<input type="submit" value="확인" class="btn_submit btn" accesskey="s">
</div>
</form>
<script>
$(function() {
$(".shop_event").on("click", function() {
if(!confirm("현재 테마의 스킨, 이미지 사이즈 등의 설정을 적용하시겠습니까?"))
return false;
$.ajax({
type: "POST",
url: "../theme_config_load.php",
cache: false,
async: false,
data: { type: 'shop_event' },
dataType: "json",
success: function(data) {
if(data.error) {
alert(data.error);
return false;
}
$.each(data, function(key, val) {
if(key == "error")
return true;
$("#"+key).val(val);
});
}
});
});
$("#btn_search_item").click(function() {
var ca_id = $("#sch_ca_id").val();
var it_name = $.trim($("#sch_name").val());
if(ca_id == "" && it_name == "") {
$("#sch_item_list").html("<p>상품의 분류를 선택하시거나 상품명을 입력하신 후 검색하여 주십시오.</p>");
return false;
}
$("#sch_item_list").load(
"./itemeventsearch.php",
{ w: "<?php echo $w; ?>", ev_id: "<?php echo $ev_id; ?>", ca_id: ca_id, it_name: it_name }
);
});
$(document).on("click", "#sch_item_list .add_item", function() {
// 이미 등록된 상품인지 체크
var $li = $(this).closest("li");
var it_id = $li.find("input:hidden").val();
var it_id2;
var dup = false;
$("#reg_item_list input[name='it_id[]']").each(function() {
it_id2 = $(this).val();
if(it_id == it_id2) {
dup = true;
return false;
}
});
if(dup) {
alert("이미 등록된 상품입니다.");
return false;
}
var cont = "<li>"+$li.html().replace("add_item", "del_item").replace("추가", "삭제")+"</li>";
var count = $("#reg_item_list li").length;
if(count > 0) {
$("#reg_item_list li:last").after(cont);
} else {
$("#reg_item_list").html("<ul>"+cont+"</ul>");
}
$li.remove();
});
$(document).on("click", "#reg_item_list .del_item", function() {
if(!confirm("상품을 삭제하시겠습니까?"))
return false;
$(this).closest("li").remove();
var count = $("#reg_item_list li").length;
if(count < 1)
$("#reg_item_list").html("<p>등록된 상품이 없습니다.</p>");
});
});
function feventform_check(f)
{
var item = new Array();
var ev_item = it_id = "";
$("#reg_item_list input[name='it_id[]']").each(function() {
it_id = $(this).val();
if(it_id == "")
return true;
item.push(it_id);
});
if(item.length > 0)
ev_item = item.join();
$("input[name=ev_item]").val(ev_item);
<?php echo get_editor_js('ev_head_html'); ?>
<?php echo get_editor_js('ev_tail_html'); ?>
return true;
}
/* document.feventform.ev_subject.focus(); 포커스해제*/
</script>
<?php
include_once (G5_ADMIN_PATH.'/admin.tail.php');
-129
View File
@@ -1,129 +0,0 @@
<?php
$sub_menu = '500300';
include_once('./_common.php');
if ($w == "u" || $w == "d")
check_demo();
if ($w == 'd')
auth_check_menu($auth, $sub_menu, "d");
else
auth_check_menu($auth, $sub_menu, "w");
check_admin_token();
@mkdir(G5_DATA_PATH."/event", G5_DIR_PERMISSION);
@chmod(G5_DATA_PATH."/event", G5_DIR_PERMISSION);
$ev_mimg_del = isset($_POST['ev_mimg_del']) ? (int) $_POST['ev_mimg_del'] : 0;
$ev_himg_del = isset($_POST['ev_himg_del']) ? (int) $_POST['ev_himg_del'] : 0;
$ev_timg_del = isset($_POST['ev_timg_del']) ? (int) $_POST['ev_timg_del'] : 0;
$ev_skin = isset($_POST['ev_skin']) ? clean_xss_tags($_POST['ev_skin'], 1, 1) : '';
$ev_mobile_skin = isset($_POST['ev_mobile_skin']) ? clean_xss_tags($_POST['ev_mobile_skin'], 1, 1) : '';
$ev_img_width = isset($_POST['ev_img_width']) ? (int) $_POST['ev_img_width'] : 0;
$ev_img_height = isset($_POST['ev_img_height']) ? (int) $_POST['ev_img_height'] : 0;
$ev_list_mod = isset($_POST['ev_list_mod']) ? (int) $_POST['ev_list_mod'] : 0;
$ev_list_row = isset($_POST['ev_list_row']) ? (int) $_POST['ev_list_row'] : 0;
$ev_mobile_img_width = isset($_POST['ev_mobile_img_width']) ? (int) $_POST['ev_mobile_img_width'] : 0;
$ev_mobile_img_height = isset($_POST['ev_mobile_img_height']) ? (int) $_POST['ev_mobile_img_height'] : 0;
$ev_mobile_list_mod = isset($_POST['ev_mobile_list_mod']) ? (int) $_POST['ev_mobile_list_mod'] : 0;
$ev_mobile_list_row = isset($_POST['ev_mobile_list_row']) ? (int) $_POST['ev_mobile_list_row'] : 0;
$ev_use = isset($_POST['ev_use']) ? (int) $_POST['ev_use'] : 0;
$ev_subject_strong = isset($_POST['ev_subject_strong']) ? (int) $_POST['ev_subject_strong'] : 0;
$ev_subject = isset($_POST['ev_subject']) ? clean_xss_tags($_POST['ev_subject'], 1, 1) : '';
$ev_head_html = isset($_POST['ev_head_html']) ? $_POST['ev_head_html'] : '';
$ev_tail_html = isset($_POST['ev_tail_html']) ? $_POST['ev_tail_html'] : '';
if ($ev_mimg_del) @unlink(G5_DATA_PATH."/event/{$ev_id}_m");
if ($ev_himg_del) @unlink(G5_DATA_PATH."/event/{$ev_id}_h");
if ($ev_timg_del) @unlink(G5_DATA_PATH."/event/{$ev_id}_t");
$ev_skin = preg_replace('#\.+(\/|\\\)#', '', $ev_skin);
$ev_mobile_skin = preg_replace('#\.+(\/|\\\)#', '', $ev_mobile_skin);
$skin_regex_patten = "^list.[0-9]+\.skin\.php";
$ev_skin = (preg_match("/$skin_regex_patten/", $ev_skin) && file_exists(G5_SHOP_SKIN_PATH.'/'.$ev_skin)) ? $ev_skin : '';
$ev_mobile_skin = (preg_match("/$skin_regex_patten/", $ev_mobile_skin) && file_exists(G5_MSHOP_SKIN_PATH.'/'.$ev_mobile_skin)) ? $ev_mobile_skin : '';
$ev_subject = strip_tags($ev_subject);
$sql_common = " set ev_skin = '$ev_skin',
ev_mobile_skin = '$ev_mobile_skin',
ev_img_width = '$ev_img_width',
ev_img_height = '$ev_img_height',
ev_list_mod = '$ev_list_mod',
ev_list_row = '$ev_list_row',
ev_mobile_img_width = '$ev_mobile_img_width',
ev_mobile_img_height= '$ev_mobile_img_height',
ev_mobile_list_mod = '$ev_mobile_list_mod',
ev_mobile_list_row = '$ev_mobile_list_row',
ev_subject = '$ev_subject',
ev_head_html = '$ev_head_html',
ev_tail_html = '$ev_tail_html',
ev_use = '$ev_use',
ev_subject_strong = '$ev_subject_strong'
";
if ($w == "")
{
$ev_id = G5_SERVER_TIME;
$sql = " insert {$g5['g5_shop_event_table']}
$sql_common
, ev_id = '$ev_id' ";
sql_query($sql);
}
else if ($w == "u")
{
$sql = " update {$g5['g5_shop_event_table']}
$sql_common
where ev_id = '$ev_id' ";
sql_query($sql);
}
else if ($w == "d")
{
@unlink(G5_DATA_PATH."/event/{$ev_id}_m");
@unlink(G5_DATA_PATH."/event/{$ev_id}_h");
@unlink(G5_DATA_PATH."/event/{$ev_id}_t");
// 이벤트상품삭제
$sql = " delete from {$g5['g5_shop_event_item_table']} where ev_id = '$ev_id' ";
sql_query($sql);
$sql = " delete from {$g5['g5_shop_event_table']} where ev_id = '$ev_id' ";
sql_query($sql);
}
if ($w == "" || $w == "u")
{
if ($_FILES['ev_mimg']['name']) upload_file($_FILES['ev_mimg']['tmp_name'], $ev_id."_m", G5_DATA_PATH."/event");
if ($_FILES['ev_himg']['name']) upload_file($_FILES['ev_himg']['tmp_name'], $ev_id."_h", G5_DATA_PATH."/event");
if ($_FILES['ev_timg']['name']) upload_file($_FILES['ev_timg']['tmp_name'], $ev_id."_t", G5_DATA_PATH."/event");
// 등록된 이벤트 상품 먼저 삭제
$sql = " delete from {$g5['g5_shop_event_item_table']} where ev_id = '$ev_id' ";
sql_query($sql);
// 이벤트 상품등록
$item = explode(',', $ev_item);
$count = count($item);
for($i=0; $i<$count; $i++) {
$it_id = isset($item[$i]) ? $item[$i] : '';
if($it_id) {
$sql = " insert into {$g5['g5_shop_event_item_table']}
set ev_id = '$ev_id',
it_id = '$it_id' ";
sql_query($sql);
}
}
goto_url("./itemeventform.php?w=u&amp;ev_id=$ev_id");
}
else
{
goto_url("./itemevent.php");
}
-215
View File
@@ -1,215 +0,0 @@
<?php
$sub_menu = '500310';
include_once('./_common.php');
auth_check_menu($auth, $sub_menu, "r");
$ev_id = isset($_GET['ev_id']) ? preg_replace('/[^0-9]/', '', $_GET['ev_id']) : '';
$sort1 = (isset($_GET['sort1']) && in_array($_GET['sort1'], array('a.it_id', 'it_name'))) ? $_GET['sort1'] : 'a.it_id';
$sort2 = (isset($_GET['sort2']) && in_array($_GET['sort2'], array('desc', 'asc'))) ? $_GET['sort2'] : 'desc';
$sel_field = (isset($_GET['sel_field']) && in_array($_GET['sel_field'], array('a.it_id', 'it_name')) ) ? $_GET['sel_field'] : 'it_name';
$sel_ca_id = isset($_GET['sel_ca_id']) ? get_search_string($_GET['sel_ca_id']) : '';
$search = isset($_GET['search']) ? get_search_string($_GET['search']) : '';
$ev_title = isset($ev_title) ? clean_xss_tags($ev_title, 1, 1) : '';
$g5['title'] = '이벤트일괄처리';
include_once (G5_ADMIN_PATH.'/admin.head.php');
$where = " where ";
$sql_search = "";
if ($search != "") {
if ($sel_field != "") {
$sql_search .= " $where $sel_field like '%$search%' ";
$where = " and ";
}
}
if ($sel_ca_id != "") {
$sql_search .= " $where ca_id like '$sel_ca_id%' ";
}
$sql_common = " from {$g5['g5_shop_item_table']} a
left join {$g5['g5_shop_event_item_table']} b on (a.it_id=b.it_id and b.ev_id='$ev_id') ";
$sql_common .= $sql_search;
// 테이블의 전체 레코드수만 얻음
$sql = " select count(*) as cnt " . $sql_common;
$row = sql_fetch($sql);
$total_count = $row['cnt'];
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
if (!$sort1) {
$sort1 = "b.ev_id";
}
if (!$sort2 || $sort2 != "asc") {
$sort2 = "desc";
}
$sql = " select a.*, b.ev_id
$sql_common
order by $sort1 $sort2
limit $from_record, $rows ";
$result = sql_query($sql);
//$qstr1 = 'sel_ca_id='.$sel_ca_id.'&amp;sel_field='.$sel_field.'&amp;search='.$search;
$qstr1 = 'ev_id='.$ev_id.'&amp;sel_ca_id='.$sel_ca_id.'&amp;sel_field='.$sel_field.'&amp;search='.$search;
$qstr = $qstr1.'&amp;sort1='.$sort1.'&amp;sort2='.$sort2.'&amp;page='.$page;
$listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목록</a>';
// 이벤트제목
if($ev_id) {
$tmp = sql_fetch(" select ev_subject from {$g5['g5_shop_event_table']} where ev_id = '$ev_id' ");
$ev_title = $tmp['ev_subject'];
}
?>
<div class="local_ov01 local_ov">
<?php echo $listall; ?>
<span class="btn_ov01"><span class="ov_txt">전체 이벤트</span><span class="ov_num"> <?php echo $total_count; ?>건</span></span>
</div>
<form name="flist" class="local_sch01 local_sch" autocomplete="off">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<label for="ev_id" class="sound_only">이벤트</label>
<select name="ev_id" id="ev_id" action="<?php echo $_SERVER['SCRIPT_NAME']; ?>">
<?php
// 이벤트 옵션처리
$event_option = "<option value=''>이벤트를 선택하세요</option>";
$sql1 = " select ev_id, ev_subject from {$g5['g5_shop_event_table']} order by ev_id desc ";
$result1 = sql_query($sql1);
while ($row1=sql_fetch_array($result1))
$event_option .= '<option value="'.$row1['ev_id'].'" '.get_selected($ev_id, $row1['ev_id']).' >'.conv_subject($row1['ev_subject'], 20,"…").'</option>';
echo $event_option;
?>
</select>
<input type="submit" value="이동" class="btn_submit">
</form>
<form name="flist" class="local_sch01 local_sch" autocomplete="off">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<input type="hidden" name="ev_id" value="<?php echo $ev_id; ?>">
<label for="sel_ca_id" class="sound_only">분류선택</label>
<select name="sel_ca_id" id="sel_ca_id">
<option value=''>전체분류</option>
<?php
$sql1 = " select ca_id, ca_name from {$g5['g5_shop_category_table']} order by ca_order, ca_id ";
$result1 = sql_query($sql1);
for ($i=0; $row1=sql_fetch_array($result1); $i++)
{
$len = strlen($row1['ca_id']) / 2 - 1;
$nbsp = "";
for ($i=0; $i<$len; $i++) $nbsp .= "&nbsp;&nbsp;&nbsp;";
echo '<option value="'.$row1['ca_id'].'" '.get_selected($sel_ca_id, $row1['ca_id']).'>'.$nbsp.$row1['ca_name'].'</option>'.PHP_EOL;
}
?>
</select>
<label for="sel_field" class="sound_only">검색대상</label>
<select name="sel_field" id="sel_field">
<option value="it_name" <?php echo get_selected($sel_field, 'it_name'); ?>>상품명</option>
<option value="a.it_id" <?php echo get_selected($sel_field, 'a.it_id'); ?>>상품코드</option>
</select>
<label for="search" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
<input type="text" name="search" value="<?php echo $search; ?>" id="search" required class="frm_input required">
<input type="submit" value="검색" class="btn_submit">
</form>
<div class="local_desc01 local_desc">
<p>상품을 이벤트별로 일괄 처리합니다. <?php echo ($ev_title ? '현재 선택된 이벤트는 '.$ev_title.'입니다.' : '이벤트를 선택해 주세요.'); ?></p>
</div>
<form name="fitemeventlistupdate" method="post" action="./itemeventlistupdate.php" onsubmit="return fitemeventlistupdatecheck(this)">
<input type="hidden" name="ev_id" value="<?php echo $ev_id; ?>">
<input type="hidden" name="sel_ca_id" value="<?php echo $sel_ca_id; ?>">
<input type="hidden" name="sel_field" value="<?php echo $sel_field; ?>">
<input type="hidden" name="search" value="<?php echo $search; ?>">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<input type="hidden" name="sort1" value="<?php echo $sort1; ?>">
<input type="hidden" name="sort2" value="<?php echo $sort2; ?>">
<div class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?> 목록</caption>
<thead>
<tr>
<th scope="col">이벤트</th>
<th scope="col"><a href="<?php echo title_sort("a.it_id") . '&amp;'.$qstr1.'&amp;ev_id='.$ev_id; ?>">상품코드</a></th>
<th scope="col"><a href="<?php echo title_sort("it_name") . '&&amp;'.$qstr1.'&amp;ev_id='.$ev_id; ?>">상품명</a></th>
</tr>
</thead>
<tbody>
<?php for ($i=0; $row=sql_fetch_array($result); $i++) {
$href = shop_item_url($row['it_id']);
$sql = " select ev_id from {$g5['g5_shop_event_item_table']}
where it_id = '{$row['it_id']}'
and ev_id = '$ev_id' ";
$ev = sql_fetch($sql);
$bg = 'bg'.($i%2);
?>
<tr class="<?php echo $bg; ?>">
<td class="td_chk2">
<input type="hidden" name="it_id[<?php echo $i; ?>]" value="<?php echo $row['it_id']; ?>">
<label for="ev_chk_<?php echo $i; ?>" class="sound_only">이벤트 사용</label>
<input type="checkbox" name="ev_chk[<?php echo $i; ?>]" value="1" id="ev_chk_<?php echo $i; ?>" <?php echo ($row['ev_id'] ? "checked" : ""); ?>>
</td>
<td class="td_num"><a href="<?php echo $href; ?>"><?php echo $row['it_id']; ?></a></td>
<td class="td_left"><a href="<?php echo $href; ?>"><?php echo get_it_image($row['it_id'], 50, 50); ?> <?php echo cut_str(stripslashes($row['it_name']), 60, "&#133"); ?></a></td>
</tr>
<?php
}
if ($i == 0)
echo '<tr><td colspan="4" class="empty_table">자료가 없습니다.</td></tr>';
?>
</tbody>
</table>
</div>
<div class="local_desc01 local_desc">
<p>
<?php if ($ev_title) { ?>
현재 선택된 이벤트는 <strong><?php echo $ev_title; ?></strong>입니다.<br>
선택된 이벤트의 상품 수정 내용을 반영하시려면 일괄수정 버튼을 누르십시오.
<?php } else { ?>
이벤트를 선택하지 않으셨습니다. <strong>수정 내용을 반영하기 전에 이벤트를 선택해주십시오.</strong><br>
<a href="#ev_id" class="sound_only">이벤트 선택</a>
<?php } ?>
</p>
</div>
<div class="btn_fixed_top">
<input type="submit" value="일괄수정" class="btn_submit btn" accesskey="s">
</div>
</form>
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['SCRIPT_NAME']}?$qstr&amp;page="); ?>
<script>
function fitemeventlistupdatecheck(f)
{
if (!f.ev_id.value)
{
alert('이벤트를 선택하세요');
return false;
}
return true;
}
</script>
<?php
include_once (G5_ADMIN_PATH.'/admin.tail.php');
-30
View File
@@ -1,30 +0,0 @@
<?php
$sub_menu = '500310';
include_once('./_common.php');
check_demo();
auth_check_menu($auth, $sub_menu, "w");
$post_it_id_count = (isset($_POST['it_id']) && is_array($_POST['it_id'])) ? count($_POST['it_id']) : 0;
for ($i=0; $i<$post_it_id_count; $i++)
{
$iit_id = isset($_POST['it_id'][$i]) ? preg_replace('/[^a-z0-9_\-]/i', '', $_POST['it_id'][$i]) : '';
$sql = " delete from {$g5['g5_shop_event_item_table']}
where ev_id = '$ev_id'
and it_id = '{$iit_id}' ";
sql_query($sql);
if (isset($_POST['ev_chk'][$i]) && $_POST['ev_chk'][$i])
{
$sql = "insert into {$g5['g5_shop_event_item_table']}
set ev_id = '$ev_id',
it_id = '{$iit_id}' ";
sql_query($sql);
}
}
goto_url('./itemeventlist.php?ev_id='.$ev_id.'&amp;sort1='.$sort1.'&amp;sort2='.$sort2.'&amp;sel_ca_id='.$sel_ca_id.'&amp;sel_field='.$sel_field.'&amp;search='.$search.'&amp;page='.$page);
-48
View File
@@ -1,48 +0,0 @@
<?php
$sub_menu = '500300';
include_once('./_common.php');
auth_check_menu($auth, $sub_menu, "w");
$ca_id = trim($ca_id);
$it_name = trim(strip_tags($it_name));
if(!$ca_id && !$it_name)
die('<p>상품의 분류를 선택하시거나 상품명을 입력하신 후 검색하여 주십시오.</p>');
$sql = " select it_id, it_name
from {$g5['g5_shop_item_table']}
where (1) ";
if($ca_id)
$sql .= " and ( ca_id like '$ca_id%' or ca_id2 like '$ca_id%' or ca_id3 like '$ca_id%' ) ";
if($it_name)
$sql .= " and it_name like '%$it_name%' ";
$sql .= " order by ca_id, it_name ";
$result = sql_query($sql);
$list = '';
for($i=0;$row=sql_fetch_array($result);$i++) {
if($w == 'u') {
$sql2 = " select count(*) as cnt from {$g5['g5_shop_event_item_table']} where ev_id = '$ev_id' and it_id = '{$row['it_id']}' ";
$row2 = sql_fetch($sql2);
if ($row2['cnt'])
continue;
}
$it_name = get_it_image($row['it_id'], 50, 50).' '.$row['it_name'];
$list .= '<li>';
$list .= '<input type="hidden" name="it_id[]" value="'.$row['it_id'].'">';
$list .= '<div class="list_item">'.$it_name.'</div>';
$list .= '<div class="list_item_btn"><button type="button" class="add_item btn_frmline">추가</button></div>';
$list .= '</li>'.PHP_EOL;
}
if($list)
$list = '<ul>'.$list.'</ul>';
else
$list = '<p>등록된 상품이 없습니다.</p>';
echo $list;
-64
View File
@@ -1,64 +0,0 @@
<?php
$sub_menu = '500300';
include_once('./_common.php');
auth_check_menu($auth, $sub_menu, "r");
$sql = " select ev_subject from {$g5['g5_shop_event_table']} where ev_id = '$ev_id' ";
$ev = sql_fetch($sql);
$g5['title'] = $ev['ev_subject'].' 이벤트상품';
include_once(G5_PATH.'/head.sub.php');
?>
<div class="new_win">
<h1><?php echo $g5['title']; ?></h1>
<div class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?> 입력</caption>
<thead>
<tr>
<th scope="col">상품명</th>
<th scope="col">사용</th>
<th scope="col">삭제</th>
</tr>
</thead>
<tbody>
<?php
$sql = " select b.it_id, b.it_name, b.it_use from {$g5['g5_shop_event_item_table']} a
left join {$g5['g5_shop_item_table']} b on (a.it_id=b.it_id)
where a.ev_id = '$ev_id'
order by b.it_id desc ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$href = shop_item_url($row['it_id']);
?>
<tr>
<td>
<a href="<?php echo $href; ?>" target="_blank">
<?php echo get_it_image($row['it_id'], 40, 40); ?>
<?php echo cut_str(stripslashes($row['it_name']), 60, "&#133"); ?>
</a>
</td>
<td class="td_boolean"><?php echo ($row['it_use']?"사용":"미사용"); ?></td>
<td class="td_mngsmall"><a href="javascript:del('./itemeventwindel.php?ev_id=<?php echo $ev_id; ?>&amp;it_id=<?php echo $row['it_id']; ?>');">삭제</a></td>
<tr>
<?php
}
if ($i == 0)
echo '<tr><td colspan="3" class="empty_table">자료가 없습니다.</td></tr>';
?>
</tbody>
</table>
</div>
<div class="btn_win01 btn_win">
<button type="button" onclick="javascript:window.close()">창 닫기</button>
</div>
</div>
<?php
include_once(G5_PATH.'/tail.sub.php');
-15
View File
@@ -1,15 +0,0 @@
<?php
$sub_menu = '500300';
include_once('./_common.php');
check_demo();
auth_check_menu($auth, $sub_menu, "d");
$ev_id = isset($_REQUEST['ev_id']) ? (int) $_REQUEST['ev_id'] : 0;
$it_id = isset($_REQUEST['it_id']) ? safe_replace_regex($_REQUEST['it_id'], 'it_id') : '';
$sql = " delete from {$g5['g5_shop_event_item_table']} where ev_id = '$ev_id' and it_id = '$it_id' ";
sql_query($sql);
goto_url("./itemeventwin.php?ev_id=$ev_id");
-44
View File
@@ -1,44 +0,0 @@
<?php
$sub_menu = '400300';
include_once('./_common.php');
auth_check_menu($auth, $sub_menu, "w");
$g5['title'] = '엑셀파일로 상품 일괄 등록';
include_once(G5_PATH.'/head.sub.php');
?>
<div class="new_win">
<h1><?php echo $g5['title']; ?></h1>
<div class="local_desc01 local_desc">
<p>
엑셀파일을 이용하여 상품을 일괄등록할 수 있습니다.<br>
형식은 <strong>상품일괄등록용 엑셀파일</strong>을 다운로드하여 상품 정보를 입력하시면 됩니다.<br>
수정 완료 후 엑셀파일을 업로드하시면 상품이 일괄등록됩니다.<br>
엑셀파일을 저장하실 때는 <strong>Excel 97 - 2003 통합문서 (*.xls)</strong> 로 저장하셔야 합니다.
</p>
<p>
<a href="<?php echo G5_URL; ?>/<?php echo G5_LIB_DIR; ?>/Excel/itemexcel.xls">상품일괄등록용 엑셀파일 다운로드</a>
</p>
</div>
<form name="fitemexcel" method="post" action="./itemexcelupdate.php" enctype="MULTIPART/FORM-DATA" autocomplete="off">
<div id="excelfile_upload">
<label for="excelfile">파일선택</label>
<input type="file" name="excelfile" id="excelfile">
</div>
<div class="win_btn btn_confirm">
<input type="submit" value="상품 엑셀파일 등록" class="btn_submit btn">
<button type="button" onclick="window.close();" class="btn_close btn">닫기</button>
</div>
</form>
</div>
<?php
include_once(G5_PATH.'/tail.sub.php');
-205
View File
@@ -1,205 +0,0 @@
<?php
$sub_menu = '400300';
include_once('./_common.php');
// 상품이 많을 경우 대비 설정변경
set_time_limit ( 0 );
ini_set('memory_limit', '50M');
auth_check_menu($auth, $sub_menu, "w");
function only_number($n)
{
return preg_replace('/[^0-9]/', '', $n);
}
$is_upload_file = (isset($_FILES['excelfile']['tmp_name']) && $_FILES['excelfile']['tmp_name']) ? 1 : 0;
if( ! $is_upload_file){
alert("엑셀 파일을 업로드해 주세요.");
}
if($is_upload_file) {
$file = $_FILES['excelfile']['tmp_name'];
include_once(G5_LIB_PATH.'/PHPExcel/IOFactory.php');
$objPHPExcel = PHPExcel_IOFactory::load($file);
$sheet = $objPHPExcel->getSheet(0);
$num_rows = $sheet->getHighestRow();
$highestColumn = $sheet->getHighestColumn();
$dup_it_id = array();
$fail_it_id = array();
$dup_count = 0;
$total_count = 0;
$fail_count = 0;
$succ_count = 0;
for ($i = 3; $i <= $num_rows; $i++) {
$total_count++;
$j = 0;
$rowData = $sheet->rangeToArray('A' . $i . ':' . $highestColumn . $i,
NULL,
TRUE,
FALSE);
$it_id = (string) $rowData[0][$j++];
$it_id = preg_match('/[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)/', $it_id) ? addslashes(sprintf("%.0f", $it_id)) : preg_replace('/[^0-9a-z_\-]/i', '', $it_id);
$ca_id = addslashes($rowData[0][$j++]);
$ca_id2 = addslashes($rowData[0][$j++]);
$ca_id3 = addslashes($rowData[0][$j++]);
$it_name = addslashes($rowData[0][$j++]);
$it_maker = addslashes($rowData[0][$j++]);
$it_origin = addslashes($rowData[0][$j++]);
$it_brand = addslashes($rowData[0][$j++]);
$it_model = addslashes($rowData[0][$j++]);
$it_type1 = addslashes($rowData[0][$j++]);
$it_type2 = addslashes($rowData[0][$j++]);
$it_type3 = addslashes($rowData[0][$j++]);
$it_type4 = addslashes($rowData[0][$j++]);
$it_type5 = addslashes($rowData[0][$j++]);
$it_basic = addslashes($rowData[0][$j++]);
$it_explan = addslashes($rowData[0][$j++]);
$it_mobile_explan = addslashes($rowData[0][$j++]);
$it_cust_price = addslashes(only_number($rowData[0][$j++]));
$it_price = addslashes(only_number($rowData[0][$j++]));
$it_tel_inq = addslashes($rowData[0][$j++]);
$it_point = addslashes(only_number($rowData[0][$j++]));
$it_point_type = addslashes(only_number($rowData[0][$j++]));
$it_sell_email = addslashes($rowData[0][$j++]);
$it_use = addslashes($rowData[0][$j++]);
$it_stock_qty = addslashes(only_number($rowData[0][$j++]));
$it_noti_qty = addslashes(only_number($rowData[0][$j++]));
$it_buy_min_qty = addslashes(only_number($rowData[0][$j++]));
$it_buy_max_qty = addslashes(only_number($rowData[0][$j++]));
$it_notax = addslashes(only_number($rowData[0][$j++]));
$it_order = addslashes(only_number($rowData[0][$j++]));
$it_img1 = addslashes($rowData[0][$j++]);
$it_img2 = addslashes($rowData[0][$j++]);
$it_img3 = addslashes($rowData[0][$j++]);
$it_img4 = addslashes($rowData[0][$j++]);
$it_img5 = addslashes($rowData[0][$j++]);
$it_img6 = addslashes($rowData[0][$j++]);
$it_img7 = addslashes($rowData[0][$j++]);
$it_img8 = addslashes($rowData[0][$j++]);
$it_img9 = addslashes($rowData[0][$j++]);
$it_img10 = addslashes($rowData[0][$j++]);
$it_explan2 = strip_tags(trim($it_explan));
if(!$it_id || !$ca_id || !$it_name) {
$fail_count++;
continue;
}
// it_id 중복체크
$sql2 = " select count(*) as cnt from {$g5['g5_shop_item_table']} where it_id = '$it_id' ";
$row2 = sql_fetch($sql2);
if(isset($row2['cnt']) && $row2['cnt']) {
$fail_it_id[] = $it_id;
$dup_it_id[] = $it_id;
$dup_count++;
$fail_count++;
continue;
}
// 기본분류체크
$sql2 = " select count(*) as cnt from {$g5['g5_shop_category_table']} where ca_id = '$ca_id' ";
$row2 = sql_fetch($sql2);
if(! (isset($row2['cnt']) && $row2['cnt'])) {
$fail_it_id[] = $it_id;
$fail_count++;
continue;
}
$sql = " INSERT INTO {$g5['g5_shop_item_table']}
SET it_id = '$it_id',
ca_id = '$ca_id',
ca_id2 = '$ca_id2',
ca_id3 = '$ca_id3',
it_name = '$it_name',
it_maker = '$it_maker',
it_origin = '$it_origin',
it_brand = '$it_brand',
it_model = '$it_model',
it_type1 = '$it_type1',
it_type2 = '$it_type2',
it_type3 = '$it_type3',
it_type4 = '$it_type4',
it_type5 = '$it_type5',
it_basic = '$it_basic',
it_explan = '$it_explan',
it_explan2 = '$it_explan2',
it_mobile_explan = '$it_mobile_explan',
it_cust_price = '$it_cust_price',
it_price = '$it_price',
it_point = '$it_point',
it_point_type = '$it_point_type',
it_stock_qty = '$it_stock_qty',
it_noti_qty = '$it_noti_qty',
it_buy_min_qty = '$it_buy_min_qty',
it_buy_max_qty = '$it_buy_max_qty',
it_notax = '$it_notax',
it_use = '$it_use',
it_time = '".G5_TIME_YMDHIS."',
it_ip = '{$_SERVER['REMOTE_ADDR']}',
it_order = '$it_order',
it_tel_inq = '$it_tel_inq',
it_img1 = '$it_img1',
it_img2 = '$it_img2',
it_img3 = '$it_img3',
it_img4 = '$it_img4',
it_img5 = '$it_img5',
it_img6 = '$it_img6',
it_img7 = '$it_img7',
it_img8 = '$it_img8',
it_img9 = '$it_img9',
it_img10 = '$it_img10' ";
sql_query($sql);
$succ_count++;
}
}
$g5['title'] = '상품 엑셀일괄등록 결과';
include_once(G5_PATH.'/head.sub.php');
?>
<div class="new_win">
<h1><?php echo $g5['title']; ?></h1>
<div class="local_desc01 local_desc">
<p>상품등록을 완료했습니다.</p>
</div>
<dl id="excelfile_result">
<dt>총상품수</dt>
<dd><?php echo number_format($total_count); ?></dd>
<dt>완료건수</dt>
<dd><?php echo number_format($succ_count); ?></dd>
<dt>실패건수</dt>
<dd><?php echo number_format($fail_count); ?></dd>
<?php if($fail_count > 0) { ?>
<dt>실패상품코드</dt>
<dd><?php echo implode(', ', $fail_it_id); ?></dd>
<?php } ?>
<?php if($dup_count > 0) { ?>
<dt>상품코드중복건수</dt>
<dd><?php echo number_format($dup_count); ?></dd>
<dt>중복상품코드</dt>
<dd><?php echo implode(', ', $dup_it_id); ?></dd>
<?php } ?>
</dl>
<div class="btn_win01 btn_win">
<button type="button" onclick="window.close();">창닫기</button>
</div>
</div>
<?php
include_once(G5_PATH.'/tail.sub.php');
File diff suppressed because it is too large. Load diff
-47
View File
@@ -1,47 +0,0 @@
<?php
$sub_menu = '400300';
include_once('./_common.php');
auth_check_menu($auth, $sub_menu, "w");
$ca_id = trim($ca_id);
$it_name = trim(strip_tags($it_name));
if(!$ca_id && !$it_name)
die('<p>상품의 분류를 선택하시거나 상품명을 입력하신 후 검색하여 주십시오.</p>');
$sql = " select ca_id, it_id, it_name, it_price
from {$g5['g5_shop_item_table']}
where it_id <> '$it_id' ";
if($ca_id)
$sql .= " and ( ca_id like '$ca_id%' or ca_id2 like '$ca_id%' or ca_id3 like '$ca_id%' ) ";
if($it_name)
$sql .= " and it_name like '%$it_name%' ";
$sql .= " order by ca_id, it_name ";
$result = sql_query($sql);
$list = '';
for($i=0;$row=sql_fetch_array($result);$i++) {
$sql2 = " select count(*) as cnt from {$g5['g5_shop_item_relation_table']} where it_id = '$it_id' and it_id2 = '{$row['it_id']}' ";
$row2 = sql_fetch($sql2);
if ($row2['cnt'])
continue;
$it_name = get_it_image($row['it_id'], 50, 50).' '.$row['it_name'];
$list .= '<li class="list_res">';
$list .= '<input type="hidden" name="re_it_id[]" value="'.$row['it_id'].'">';
$list .= '<div class="list_item">'.$it_name.'</div>';
$list .= '<div class="list_item_btn"><button type="button" class="add_item btn_frmline">추가</button></div>';
$list .= '</li>'.PHP_EOL;
}
if($list)
$list = '<ul>'.$list.'</ul>';
else
$list = '<p>등록된 상품이 없습니다.';
echo $list;
-655
View File
@@ -1,655 +0,0 @@
<?php
$sub_menu = '400300';
include_once('./_common.php');
if ($w == "u" || $w == "d")
check_demo();
if ($w == '' || $w == 'u')
auth_check_menu($auth, $sub_menu, "w");
else if ($w == 'd')
auth_check_menu($auth, $sub_menu, "d");
check_admin_token();
@mkdir(G5_DATA_PATH."/item", G5_DIR_PERMISSION);
@chmod(G5_DATA_PATH."/item", G5_DIR_PERMISSION);
// input vars 체크
check_input_vars();
$ca_id = isset($_POST['ca_id']) ? preg_replace('/[^0-9a-z]/i', '', $_POST['ca_id']) : '';
$ca_id2 = isset($_POST['ca_id2']) ? preg_replace('/[^0-9a-z]/i', '', $_POST['ca_id2']) : '';
$ca_id3 = isset($_POST['ca_id3']) ? preg_replace('/[^0-9a-z]/i', '', $_POST['ca_id3']) : '';
if ($is_admin != 'super') { // 최고관리자가 아니면 체크
if( $w === '' ){
$sql = "select ca_mb_id from {$g5['g5_shop_category_table']} where ca_id = '$ca_id'";
} else {
$sql = "select b.ca_mb_id from {$g5['g5_shop_item_table']} a , {$g5['g5_shop_category_table']} b where (a.ca_id = b.ca_id) and a.it_id = '$it_id'";
}
$checks = sql_fetch($sql);
if( ! (isset($checks['ca_mb_id']) && $checks['ca_mb_id']) || $checks['ca_mb_id'] !== $member['mb_id'] ){
alert("해당 분류의 관리회원이 아닙니다.");
}
}
$it_img1 = $it_img2 = $it_img3 = $it_img4 = $it_img5 = $it_img6 = $it_img7 = $it_img8 = $it_img9 = $it_img10 = '';
// 파일정보
if($w == "u") {
$sql = " select it_img1, it_img2, it_img3, it_img4, it_img5, it_img6, it_img7, it_img8, it_img9, it_img10
from {$g5['g5_shop_item_table']}
where it_id = '$it_id' ";
$file = sql_fetch($sql);
$it_img1 = $file['it_img1'];
$it_img2 = $file['it_img2'];
$it_img3 = $file['it_img3'];
$it_img4 = $file['it_img4'];
$it_img5 = $file['it_img5'];
$it_img6 = $file['it_img6'];
$it_img7 = $file['it_img7'];
$it_img8 = $file['it_img8'];
$it_img9 = $file['it_img9'];
$it_img10 = $file['it_img10'];
}
$it_img_dir = G5_DATA_PATH.'/item';
for($i=0;$i<=10;$i++){
${'it_img'.$i.'_del'} = ! empty($_POST['it_img'.$i.'_del']) ? 1 : 0;
}
// 파일삭제
if ($it_img1_del) {
$file_img1 = $it_img_dir.'/'.clean_relative_paths($it_img1);
@unlink($file_img1);
delete_item_thumbnail(dirname($file_img1), basename($file_img1));
$it_img1 = '';
}
if ($it_img2_del) {
$file_img2 = $it_img_dir.'/'.clean_relative_paths($it_img2);
@unlink($file_img2);
delete_item_thumbnail(dirname($file_img2), basename($file_img2));
$it_img2 = '';
}
if ($it_img3_del) {
$file_img3 = $it_img_dir.'/'.clean_relative_paths($it_img3);
@unlink($file_img3);
delete_item_thumbnail(dirname($file_img3), basename($file_img3));
$it_img3 = '';
}
if ($it_img4_del) {
$file_img4 = $it_img_dir.'/'.clean_relative_paths($it_img4);
@unlink($file_img4);
delete_item_thumbnail(dirname($file_img4), basename($file_img4));
$it_img4 = '';
}
if ($it_img5_del) {
$file_img5 = $it_img_dir.'/'.clean_relative_paths($it_img5);
@unlink($file_img5);
delete_item_thumbnail(dirname($file_img5), basename($file_img5));
$it_img5 = '';
}
if ($it_img6_del) {
$file_img6 = $it_img_dir.'/'.clean_relative_paths($it_img6);
@unlink($file_img6);
delete_item_thumbnail(dirname($file_img6), basename($file_img6));
$it_img6 = '';
}
if ($it_img7_del) {
$file_img7 = $it_img_dir.'/'.clean_relative_paths($it_img7);
@unlink($file_img7);
delete_item_thumbnail(dirname($file_img7), basename($file_img7));
$it_img7 = '';
}
if ($it_img8_del) {
$file_img8 = $it_img_dir.'/'.clean_relative_paths($it_img8);
@unlink($file_img8);
delete_item_thumbnail(dirname($file_img8), basename($file_img8));
$it_img8 = '';
}
if ($it_img9_del) {
$file_img9 = $it_img_dir.'/'.clean_relative_paths($it_img9);
@unlink($file_img9);
delete_item_thumbnail(dirname($file_img9), basename($file_img9));
$it_img9 = '';
}
if ($it_img10_del) {
$file_img10 = $it_img_dir.'/'.clean_relative_paths($it_img10);
@unlink($file_img10);
delete_item_thumbnail(dirname($file_img10), basename($file_img10));
$it_img10 = '';
}
// 이미지업로드
if ($_FILES['it_img1']['name']) {
if($w == 'u' && $it_img1) {
$file_img1 = $it_img_dir.'/'.clean_relative_paths($it_img1);
@unlink($file_img1);
delete_item_thumbnail(dirname($file_img1), basename($file_img1));
}
$it_img1 = it_img_upload($_FILES['it_img1']['tmp_name'], $_FILES['it_img1']['name'], $it_img_dir.'/'.$it_id);
}
if ($_FILES['it_img2']['name']) {
if($w == 'u' && $it_img2) {
$file_img2 = $it_img_dir.'/'.clean_relative_paths($it_img2);
@unlink($file_img2);
delete_item_thumbnail(dirname($file_img2), basename($file_img2));
}
$it_img2 = it_img_upload($_FILES['it_img2']['tmp_name'], $_FILES['it_img2']['name'], $it_img_dir.'/'.$it_id);
}
if ($_FILES['it_img3']['name']) {
if($w == 'u' && $it_img3) {
$file_img3 = $it_img_dir.'/'.clean_relative_paths($it_img3);
@unlink($file_img3);
delete_item_thumbnail(dirname($file_img3), basename($file_img3));
}
$it_img3 = it_img_upload($_FILES['it_img3']['tmp_name'], $_FILES['it_img3']['name'], $it_img_dir.'/'.$it_id);
}
if ($_FILES['it_img4']['name']) {
if($w == 'u' && $it_img4) {
$file_img4 = $it_img_dir.'/'.clean_relative_paths($it_img4);
@unlink($file_img4);
delete_item_thumbnail(dirname($file_img4), basename($file_img4));
}
$it_img4 = it_img_upload($_FILES['it_img4']['tmp_name'], $_FILES['it_img4']['name'], $it_img_dir.'/'.$it_id);
}
if ($_FILES['it_img5']['name']) {
if($w == 'u' && $it_img5) {
$file_img5 = $it_img_dir.'/'.clean_relative_paths($it_img5);
@unlink($file_img5);
delete_item_thumbnail(dirname($file_img5), basename($file_img5));
}
$it_img5 = it_img_upload($_FILES['it_img5']['tmp_name'], $_FILES['it_img5']['name'], $it_img_dir.'/'.$it_id);
}
if ($_FILES['it_img6']['name']) {
if($w == 'u' && $it_img6) {
$file_img6 = $it_img_dir.'/'.clean_relative_paths($it_img6);
@unlink($file_img6);
delete_item_thumbnail(dirname($file_img6), basename($file_img6));
}
$it_img6 = it_img_upload($_FILES['it_img6']['tmp_name'], $_FILES['it_img6']['name'], $it_img_dir.'/'.$it_id);
}
if ($_FILES['it_img7']['name']) {
if($w == 'u' && $it_img7) {
$file_img7 = $it_img_dir.'/'.clean_relative_paths($it_img7);
@unlink($file_img7);
delete_item_thumbnail(dirname($file_img7), basename($file_img7));
}
$it_img7 = it_img_upload($_FILES['it_img7']['tmp_name'], $_FILES['it_img7']['name'], $it_img_dir.'/'.$it_id);
}
if ($_FILES['it_img8']['name']) {
if($w == 'u' && $it_img8) {
$file_img8 = $it_img_dir.'/'.clean_relative_paths($it_img8);
@unlink($file_img8);
delete_item_thumbnail(dirname($file_img8), basename($file_img8));
}
$it_img8 = it_img_upload($_FILES['it_img8']['tmp_name'], $_FILES['it_img8']['name'], $it_img_dir.'/'.$it_id);
}
if ($_FILES['it_img9']['name']) {
if($w == 'u' && $it_img9) {
$file_img9 = $it_img_dir.'/'.clean_relative_paths($it_img9);
@unlink($file_img9);
delete_item_thumbnail(dirname($file_img9), basename($file_img9));
}
$it_img9 = it_img_upload($_FILES['it_img9']['tmp_name'], $_FILES['it_img9']['name'], $it_img_dir.'/'.$it_id);
}
if ($_FILES['it_img10']['name']) {
if($w == 'u' && $it_img10) {
$file_img10 = $it_img_dir.'/'.clean_relative_paths($it_img10);
@unlink($file_img10);
delete_item_thumbnail(dirname($file_img10), basename($file_img10));
}
$it_img10 = it_img_upload($_FILES['it_img10']['tmp_name'], $_FILES['it_img10']['name'], $it_img_dir.'/'.$it_id);
}
if ($w == "" || $w == "u")
{
// 다음 입력을 위해서 옵션값을 쿠키로 한달동안 저장함
//@setcookie("ck_ca_id", $ca_id, time() + 86400*31, $default[de_cookie_dir], $default[de_cookie_domain]);
//@setcookie("ck_maker", stripslashes($it_maker), time() + 86400*31, $default[de_cookie_dir], $default[de_cookie_domain]);
//@setcookie("ck_origin", stripslashes($it_origin), time() + 86400*31, $default[de_cookie_dir], $default[de_cookie_domain]);
@set_cookie("ck_ca_id", $ca_id, time() + 86400*31);
@set_cookie("ck_ca_id2", $ca_id2, time() + 86400*31);
@set_cookie("ck_ca_id3", $ca_id3, time() + 86400*31);
@set_cookie("ck_maker", stripslashes($it_maker), time() + 86400*31);
@set_cookie("ck_origin", stripslashes($it_origin), time() + 86400*31);
}
// 관련상품을 우선 삭제함
sql_query(" delete from {$g5['g5_shop_item_relation_table']} where it_id = '$it_id' ");
// 관련상품의 반대도 삭제
sql_query(" delete from {$g5['g5_shop_item_relation_table']} where it_id2 = '$it_id' ");
// 이벤트상품을 우선 삭제함
sql_query(" delete from {$g5['g5_shop_event_item_table']} where it_id = '$it_id' ");
// 선택옵션
sql_query(" delete from {$g5['g5_shop_item_option_table']} where io_type = '0' and it_id = '$it_id' "); // 기존선택옵션삭제
$option_count = (isset($_POST['opt_id']) && is_array($_POST['opt_id'])) ? count($_POST['opt_id']) : array();
$it_option_subject = '';
$it_supply_subject = '';
if($option_count) {
// 옵션명
$opt1_cnt = $opt2_cnt = $opt3_cnt = 0;
for($i=0; $i<$option_count; $i++) {
$post_opt_id = isset($_POST['opt_id'][$i]) ? preg_replace(G5_OPTION_ID_FILTER, '', strip_tags($_POST['opt_id'][$i])) : '';
$opt_val = explode(chr(30), $post_opt_id);
if(isset($opt_val[0]) && $opt_val[0])
$opt1_cnt++;
if(isset($opt_val[1]) && $opt_val[1])
$opt2_cnt++;
if(isset($opt_val[2]) && $opt_val[2])
$opt3_cnt++;
}
if($opt1_subject && $opt1_cnt) {
$it_option_subject = $opt1_subject;
if($opt2_subject && $opt2_cnt)
$it_option_subject .= ','.$opt2_subject;
if($opt3_subject && $opt3_cnt)
$it_option_subject .= ','.$opt3_subject;
}
}
// 추가옵션
sql_query(" delete from {$g5['g5_shop_item_option_table']} where io_type = '1' and it_id = '$it_id' "); // 기존추가옵션삭제
$supply_count = (isset($_POST['spl_id']) && is_array($_POST['spl_id'])) ? count($_POST['spl_id']) : array();
if($supply_count) {
// 추가옵션명
$arr_spl = array();
for($i=0; $i<$supply_count; $i++) {
$post_spl_id = isset($_POST['spl_id'][$i]) ? preg_replace(G5_OPTION_ID_FILTER, '', strip_tags($_POST['spl_id'][$i])) : '';
$spl_val = explode(chr(30), $post_spl_id);
if(!in_array($spl_val[0], $arr_spl))
$arr_spl[] = $spl_val[0];
}
$it_supply_subject = implode(',', $arr_spl);
}
// 상품요약정보
$value_array = array();
$count_ii_article = (isset($_POST['ii_article']) && is_array($_POST['ii_article'])) ? count($_POST['ii_article']) : 0;
for($i=0; $i<$count_ii_article; $i++) {
$key = isset($_POST['ii_article'][$i]) ? strip_tags($_POST['ii_article'][$i], '<br><span><strong><b>') : '';
$val = isset($_POST['ii_value'][$i]) ? strip_tags($_POST['ii_value'][$i], '<br><span><strong><b>') : '';
$value_array[$key] = $val;
}
$it_info_value = addslashes(serialize($value_array));
// 포인트 비율 값 체크
if(($it_point_type == 1 || $it_point_type == 2) && $it_point > 99)
alert("포인트 비율을 0과 99 사이의 값으로 입력해 주십시오.");
$it_name = isset($_POST['it_name']) ? strip_tags(clean_xss_attributes(trim($_POST['it_name']))) : '';
// KVE-2019-0708
$check_sanitize_keys = array(
'it_order', // 출력순서
'it_maker', // 제조사
'it_origin', // 원산지
'it_brand', // 브랜드
'it_model', // 모델
'it_tel_inq', // 전화문의
'it_use', // 판매가능
'it_nocoupon', // 쿠폰적용안함
'ec_mall_pid', // 네이버쇼핑 상품ID
'it_sell_email', // 판매자 e-mail
'it_price', // 판매가격
'it_cust_price', // 시중가격
'it_point_type', // 포인트 유형
'it_point', // 포인트
'it_supply_point', // 추가옵션상품 포인트
'it_soldout', // 상품품절
'it_stock_sms', // 재입고SMS 알림
'it_stock_qty', // 재고수량
'it_noti_qty', // 재고 통보수량
'it_buy_min_qty', // 최소구매수량
'it_notax', // 상품과세 유형
'it_sc_type', // 배송비 유형
'it_sc_method', // 배송비 결제
'it_sc_price', // 기본배송비
'it_sc_minimum', // 배송비 상세조건
'it_type1', // 상품유형(히트)
'it_type2', // 상품유형(추천)
'it_type3', // 상품유형(신상품)
'it_type4', // 상품유형(인기)
'it_type5', // 상품유형(할인)
);
foreach( $check_sanitize_keys as $key ){
$$key = isset($_POST[$key]) ? strip_tags(clean_xss_attributes($_POST[$key])) : '';
}
$it_basic = preg_replace('#<script(.*?)>(.*?)<\/script>#is', '', $it_basic);
$it_explan = isset($_POST['it_explan']) ? $_POST['it_explan'] : '';
if ($it_name == "")
alert("상품명을 입력해 주십시오.");
$sql_common = " ca_id = '$ca_id',
ca_id2 = '$ca_id2',
ca_id3 = '$ca_id3',
it_skin = '$it_skin',
it_mobile_skin = '$it_mobile_skin',
it_name = '$it_name',
it_maker = '$it_maker',
it_origin = '$it_origin',
it_brand = '$it_brand',
it_model = '$it_model',
it_option_subject = '$it_option_subject',
it_supply_subject = '$it_supply_subject',
it_type1 = '$it_type1',
it_type2 = '$it_type2',
it_type3 = '$it_type3',
it_type4 = '$it_type4',
it_type5 = '$it_type5',
it_basic = '$it_basic',
it_explan = '$it_explan',
it_explan2 = '".strip_tags(trim(clean_xss_attributes($it_explan)))."',
it_mobile_explan = '$it_mobile_explan',
it_cust_price = '$it_cust_price',
it_price = '$it_price',
it_point = '$it_point',
it_point_type = '$it_point_type',
it_supply_point = '$it_supply_point',
it_notax = '$it_notax',
it_sell_email = '$it_sell_email',
it_use = '$it_use',
it_nocoupon = '$it_nocoupon',
it_soldout = '$it_soldout',
it_stock_qty = '$it_stock_qty',
it_stock_sms = '$it_stock_sms',
it_noti_qty = '$it_noti_qty',
it_sc_type = '$it_sc_type',
it_sc_method = '$it_sc_method',
it_sc_price = '$it_sc_price',
it_sc_minimum = '$it_sc_minimum',
it_sc_qty = '$it_sc_qty',
it_buy_min_qty = '$it_buy_min_qty',
it_buy_max_qty = '$it_buy_max_qty',
it_head_html = '$it_head_html',
it_tail_html = '$it_tail_html',
it_mobile_head_html = '$it_mobile_head_html',
it_mobile_tail_html = '$it_mobile_tail_html',
it_ip = '{$_SERVER['REMOTE_ADDR']}',
it_order = '$it_order',
it_tel_inq = '$it_tel_inq',
it_info_gubun = '$it_info_gubun',
it_info_value = '$it_info_value',
it_shop_memo = '$it_shop_memo',
ec_mall_pid = '$ec_mall_pid',
it_img1 = '$it_img1',
it_img2 = '$it_img2',
it_img3 = '$it_img3',
it_img4 = '$it_img4',
it_img5 = '$it_img5',
it_img6 = '$it_img6',
it_img7 = '$it_img7',
it_img8 = '$it_img8',
it_img9 = '$it_img9',
it_img10 = '$it_img10',
it_1_subj = '$it_1_subj',
it_2_subj = '$it_2_subj',
it_3_subj = '$it_3_subj',
it_4_subj = '$it_4_subj',
it_5_subj = '$it_5_subj',
it_6_subj = '$it_6_subj',
it_7_subj = '$it_7_subj',
it_8_subj = '$it_8_subj',
it_9_subj = '$it_9_subj',
it_10_subj = '$it_10_subj',
it_1 = '$it_1',
it_2 = '$it_2',
it_3 = '$it_3',
it_4 = '$it_4',
it_5 = '$it_5',
it_6 = '$it_6',
it_7 = '$it_7',
it_8 = '$it_8',
it_9 = '$it_9',
it_10 = '$it_10'
";
if ($w == "")
{
$it_id = isset($_POST['it_id']) ? $_POST['it_id'] : '';
if (!trim($it_id)) {
alert('상품 코드가 없으므로 상품을 추가하실 수 없습니다.');
}
$t_it_id = preg_replace("/[A-Za-z0-9\-_]/", "", $it_id);
if($t_it_id)
alert('상품 코드는 영문자, 숫자, -, _ 만 사용할 수 있습니다.');
$sql_common .= " , it_time = '".G5_TIME_YMDHIS."' ";
$sql_common .= " , it_update_time = '".G5_TIME_YMDHIS."' ";
$sql = " insert {$g5['g5_shop_item_table']}
set it_id = '$it_id',
$sql_common ";
sql_query($sql);
}
else if ($w == "u")
{
$sql_common .= " , it_update_time = '".G5_TIME_YMDHIS."' ";
$sql = " update {$g5['g5_shop_item_table']}
set $sql_common
where it_id = '$it_id' ";
sql_query($sql);
}
/*
else if ($w == "d")
{
if ($is_admin != 'super')
{
$sql = " select it_id from {$g5['g5_shop_item_table']} a, {$g5['g5_shop_category_table']} b
where a.it_id = '$it_id'
and a.ca_id = b.ca_id
and b.ca_mb_id = '{$member['mb_id']}' ";
$row = sql_fetch($sql);
if (!$row['it_id'])
alert("\'{$member['mb_id']}\' 님께서 삭제 할 권한이 없는 상품입니다.");
}
itemdelete($it_id);
}
*/
if ($w == "" || $w == "u")
{
// 관련상품 등록
$it_id2 = explode(",", $it_list);
for ($i=0; $i<count($it_id2); $i++)
{
if (trim($it_id2[$i]))
{
$sql = " insert into {$g5['g5_shop_item_relation_table']}
set it_id = '$it_id',
it_id2 = '$it_id2[$i]',
ir_no = '$i' ";
sql_query($sql, false);
// 관련상품의 반대로도 등록
$sql = " insert into {$g5['g5_shop_item_relation_table']}
set it_id = '$it_id2[$i]',
it_id2 = '$it_id',
ir_no = '$i' ";
sql_query($sql, false);
}
}
// 이벤트상품 등록
$ev_id = explode(",", $ev_list);
for ($i=0; $i<count($ev_id); $i++)
{
if (trim($ev_id[$i]))
{
$sql = " insert into {$g5['g5_shop_event_item_table']}
set ev_id = '$ev_id[$i]',
it_id = '$it_id' ";
sql_query($sql, false);
}
}
}
// 선택옵션등록
if($option_count) {
$comma = '';
$sql = " INSERT INTO {$g5['g5_shop_item_option_table']}
( `io_id`, `io_type`, `it_id`, `io_price`, `io_stock_qty`, `io_noti_qty`, `io_use` )
VALUES ";
for($i=0; $i<$option_count; $i++) {
$sql .= $comma . " ( '{$_POST['opt_id'][$i]}', '0', '$it_id', '{$_POST['opt_price'][$i]}', '{$_POST['opt_stock_qty'][$i]}', '{$_POST['opt_noti_qty'][$i]}', '{$_POST['opt_use'][$i]}' )";
$comma = ' , ';
}
sql_query($sql);
}
// 추가옵션등록
if($supply_count) {
$comma = '';
$sql = " INSERT INTO {$g5['g5_shop_item_option_table']}
( `io_id`, `io_type`, `it_id`, `io_price`, `io_stock_qty`, `io_noti_qty`, `io_use` )
VALUES ";
for($i=0; $i<$supply_count; $i++) {
$sql .= $comma . " ( '{$_POST['spl_id'][$i]}', '1', '$it_id', '{$_POST['spl_price'][$i]}', '{$_POST['spl_stock_qty'][$i]}', '{$_POST['spl_noti_qty'][$i]}', '{$_POST['spl_use'][$i]}' )";
$comma = ' , ';
}
sql_query($sql);
}
// 동일 분류내 상품 동일 옵션 적용
$ca_fields = '';
if(is_checked('chk_ca_it_skin')) $ca_fields .= " , it_skin = '$it_skin' ";
if(is_checked('chk_ca_it_mobile_skin')) $ca_fields .= " , it_mobile_skin = '$it_mobile_skin' ";
if(is_checked('chk_ca_it_basic')) $ca_fields .= " , it_basic = '$it_basic' ";
if(is_checked('chk_ca_it_order')) $ca_fields .= " , it_order = '$it_order' ";
if(is_checked('chk_ca_it_type')) $ca_fields .= " , it_type1 = '$it_type1', it_type2 = '$it_type2', it_type3 = '$it_type3', it_type4 = '$it_type4', it_type5 = '$it_type5' ";
if(is_checked('chk_ca_it_maker')) $ca_fields .= " , it_maker = '$it_maker' ";
if(is_checked('chk_ca_it_origin')) $ca_fields .= " , it_origin = '$it_origin' ";
if(is_checked('chk_ca_it_brand')) $ca_fields .= " , it_brand = '$it_brand' ";
if(is_checked('chk_ca_it_model')) $ca_fields .= " , it_model = '$it_model' ";
if(is_checked('chk_ca_it_notax')) $ca_fields .= " , it_notax = '$it_notax' ";
if(is_checked('chk_ca_it_sell_email')) $ca_fields .= " , it_sell_email = '$it_sell_email' ";
if(is_checked('chk_ca_it_shop_memo')) $ca_fields .= " , it_shop_memo = '$it_shop_memo' ";
if(is_checked('chk_ca_it_tel_inq')) $ca_fields .= " , it_tel_inq = '$it_tel_inq' ";
if(is_checked('chk_ca_it_use')) $ca_fields .= " , it_use = '$it_use' ";
if(is_checked('chk_ca_it_nocoupon')) $ca_fields .= " , it_nocoupon = '$it_nocoupon' ";
if(is_checked('chk_ca_it_soldout')) $ca_fields .= " , it_soldout = '$it_soldout' ";
if(is_checked('chk_ca_it_info')) $ca_fields .= " , it_info_gubun = '$it_info_gubun', it_info_value = '$it_info_value' ";
if(is_checked('chk_ca_it_price')) $ca_fields .= " , it_price = '$it_price' ";
if(is_checked('chk_ca_it_cust_price')) $ca_fields .= " , it_cust_price = '$it_cust_price' ";
if(is_checked('chk_ca_it_point')) $ca_fields .= " , it_point = '$it_point' ";
if(is_checked('chk_ca_it_point_type')) $ca_fields .= " , it_point_type = '$it_point_type' ";
if(is_checked('chk_ca_it_supply_point')) $ca_fields .= " , it_supply_point = '$it_supply_point' ";
if(is_checked('chk_ca_it_stock_qty')) $ca_fields .= " , it_stock_qty = '$it_stock_qty' ";
if(is_checked('chk_ca_it_noti_qty')) $ca_fields .= " , it_noti_qty = '$it_noti_qty' ";
if(is_checked('chk_ca_it_sendcost')) $ca_fields .= " , it_sc_type = '$it_sc_type', it_sc_method = '$it_sc_method', it_sc_price = '$it_sc_price', it_sc_minimum = '$it_sc_minimum', it_sc_qty = '$it_sc_qty' ";
if(is_checked('chk_ca_it_buy_min_qty')) $ca_fields .= " , it_buy_min_qty = '$it_buy_min_qty' ";
if(is_checked('chk_ca_it_buy_max_qty')) $ca_fields .= " , it_buy_max_qty = '$it_buy_max_qty' ";
if(is_checked('chk_ca_it_head_html')) $ca_fields .= " , it_head_html = '$it_head_html' ";
if(is_checked('chk_ca_it_tail_html')) $ca_fields .= " , it_tail_html = '$it_tail_html' ";
if(is_checked('chk_ca_it_mobile_head_html')) $ca_fields .= " , it_mobile_head_html = '$it_mobile_head_html' ";
if(is_checked('chk_ca_it_mobile_tail_html')) $ca_fields .= " , it_mobile_tail_html = '$it_mobile_tail_html' ";
if(is_checked('chk_ca_1')) $ca_fields .= " , it_1_subj = '$it_1_subj', it_1 = '$it_1' ";
if(is_checked('chk_ca_2')) $ca_fields .= " , it_2_subj = '$it_2_subj', it_2 = '$it_2' ";
if(is_checked('chk_ca_3')) $ca_fields .= " , it_3_subj = '$it_3_subj', it_3 = '$it_3' ";
if(is_checked('chk_ca_4')) $ca_fields .= " , it_4_subj = '$it_4_subj', it_4 = '$it_4' ";
if(is_checked('chk_ca_5')) $ca_fields .= " , it_5_subj = '$it_5_subj', it_5 = '$it_5' ";
if(is_checked('chk_ca_6')) $ca_fields .= " , it_6_subj = '$it_6_subj', it_6 = '$it_6' ";
if(is_checked('chk_ca_7')) $ca_fields .= " , it_7_subj = '$it_7_subj', it_7 = '$it_7' ";
if(is_checked('chk_ca_8')) $ca_fields .= " , it_8_subj = '$it_8_subj', it_8 = '$it_8' ";
if(is_checked('chk_ca_9')) $ca_fields .= " , it_9_subj = '$it_9_subj', it_9 = '$it_9' ";
if(is_checked('chk_ca_10')) $ca_fields .= " , it_10_subj = '$it_10_subj', it_10 = '$it_10' ";
if($ca_fields) {
sql_query(" update {$g5['g5_shop_item_table']} set it_name = it_name {$ca_fields} where ca_id = '$ca_id' ");
if($ca_id2)
sql_query(" update {$g5['g5_shop_item_table']} set it_name = it_name {$ca_fields} where ca_id2 = '$ca_id2' ");
if($ca_id3)
sql_query(" update {$g5['g5_shop_item_table']} set it_name = it_name {$ca_fields} where ca_id3 = '$ca_id3' ");
}
// 모든 상품 동일 옵션 적용
$all_fields = '';
if(is_checked('chk_all_it_skin')) $all_fields .= " , it_skin = '$it_skin' ";
if(is_checked('chk_all_it_mobile_skin')) $all_fields .= " , it_mobile_skin = '$it_mobile_skin' ";
if(is_checked('chk_all_it_basic')) $all_fields .= " , it_basic = '$it_basic' ";
if(is_checked('chk_all_it_order')) $all_fields .= " , it_order = '$it_order' ";
if(is_checked('chk_all_it_type')) $all_fields .= " , it_type1 = '$it_type1', it_type2 = '$it_type2', it_type3 = '$it_type3', it_type4 = '$it_type4', it_type5 = '$it_type5' ";
if(is_checked('chk_all_it_maker')) $all_fields .= " , it_maker = '$it_maker' ";
if(is_checked('chk_all_it_origin')) $all_fields .= " , it_origin = '$it_origin' ";
if(is_checked('chk_all_it_brand')) $all_fields .= " , it_brand = '$it_brand' ";
if(is_checked('chk_all_it_model')) $all_fields .= " , it_model = '$it_model' ";
if(is_checked('chk_all_it_notax')) $all_fields .= " , it_notax = '$it_notax' ";
if(is_checked('chk_all_it_sell_email')) $all_fields .= " , it_sell_email = '$it_sell_email' ";
if(is_checked('chk_all_it_shop_memo')) $all_fields .= " , it_shop_memo = '$it_shop_memo' ";
if(is_checked('chk_all_it_tel_inq')) $all_fields .= " , it_tel_inq = '$it_tel_inq' ";
if(is_checked('chk_all_it_use')) $all_fields .= " , it_use = '$it_use' ";
if(is_checked('chk_all_it_nocoupon')) $all_fields .= " , it_nocoupon = '$it_nocoupon' ";
if(is_checked('chk_all_it_soldout')) $all_fields .= " , it_soldout = '$it_soldout' ";
if(is_checked('chk_all_it_info')) $all_fields .= " , it_info_gubun = '$it_info_gubun', it_info_value = '$it_info_value' ";
if(is_checked('chk_all_it_price')) $all_fields .= " , it_price = '$it_price' ";
if(is_checked('chk_all_it_cust_price')) $all_fields .= " , it_cust_price = '$it_cust_price' ";
if(is_checked('chk_all_it_point')) $all_fields .= " , it_point = '$it_point' ";
if(is_checked('chk_all_it_point_type')) $all_fields .= " , it_point_type = '$it_point_type' ";
if(is_checked('chk_all_it_supply_point')) $all_fields .= " , it_supply_point = '$it_supply_point' ";
if(is_checked('chk_all_it_stock_qty')) $all_fields .= " , it_stock_qty = '$it_stock_qty' ";
if(is_checked('chk_all_it_noti_qty')) $all_fields .= " , it_noti_qty = '$it_noti_qty' ";
if(is_checked('chk_all_it_sendcost')) $all_fields .= " , it_sc_type = '$it_sc_type', it_sc_method = '$it_sc_method', it_sc_price = '$it_sc_price', it_sc_minimum = '$it_sc_minimum', it_sc_qty = '$it_sc_qty' ";
if(is_checked('chk_all_it_buy_min_qty')) $all_fields .= " , it_buy_min_qty = '$it_buy_min_qty' ";
if(is_checked('chk_all_it_buy_max_qty')) $all_fields .= " , it_buy_max_qty = '$it_buy_max_qty' ";
if(is_checked('chk_all_it_head_html')) $all_fields .= " , it_head_html = '$it_head_html' ";
if(is_checked('chk_all_it_tail_html')) $all_fields .= " , it_tail_html = '$it_tail_html' ";
if(is_checked('chk_all_it_mobile_head_html')) $all_fields .= " , it_mobile_head_html = '$it_mobile_head_html' ";
if(is_checked('chk_all_it_mobile_tail_html')) $all_fields .= " , it_mobile_tail_html = '$it_mobile_tail_html' ";
if(is_checked('chk_all_1')) $all_fields .= " , it_1_subj = '$it_1_subj', it_1 = '$it_1' ";
if(is_checked('chk_all_2')) $all_fields .= " , it_2_subj = '$it_2_subj', it_2 = '$it_2' ";
if(is_checked('chk_all_3')) $all_fields .= " , it_3_subj = '$it_3_subj', it_3 = '$it_3' ";
if(is_checked('chk_all_4')) $all_fields .= " , it_4_subj = '$it_4_subj', it_4 = '$it_4' ";
if(is_checked('chk_all_5')) $all_fields .= " , it_5_subj = '$it_5_subj', it_5 = '$it_5' ";
if(is_checked('chk_all_6')) $all_fields .= " , it_6_subj = '$it_6_subj', it_6 = '$it_6' ";
if(is_checked('chk_all_7')) $all_fields .= " , it_7_subj = '$it_7_subj', it_7 = '$it_7' ";
if(is_checked('chk_all_8')) $all_fields .= " , it_8_subj = '$it_8_subj', it_8 = '$it_8' ";
if(is_checked('chk_all_9')) $all_fields .= " , it_9_subj = '$it_9_subj', it_9 = '$it_9' ";
if(is_checked('chk_all_10')) $all_fields .= " , it_10_subj = '$it_10_subj', it_10 = '$it_10' ";
if($all_fields) {
sql_query(" update {$g5['g5_shop_item_table']} set it_name = it_name {$all_fields} ");
}
$is_seo_title_edit = $w ? true : false;
if( function_exists('shop_seo_title_update') ) shop_seo_title_update($it_id, $is_seo_title_edit);
run_event('shop_admin_itemformupdate', $it_id, $w);
$qstr = "$qstr&amp;sca=$sca&amp;page=$page";
if ($w == "u") {
goto_url("./itemform.php?w=u&amp;it_id=$it_id&amp;$qstr");
} else if ($w == "d") {
$qstr = "ca_id=$ca_id&amp;sfl=$sfl&amp;sca=$sca&amp;page=$page&amp;stx=".urlencode($stx)."&amp;save_stx=".urlencode($save_stx);
goto_url("./itemlist.php?$qstr");
}
echo "<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">";
?>
<script>
if (confirm("계속 입력하시겠습니까?"))
location.href = "<?php echo "./itemform.php?".str_replace('&amp;', '&', $qstr); ?>";
else
location.href = "<?php echo "./itemlist.php?".str_replace('&amp;', '&', $qstr); ?>";
</script>
-73
View File
@@ -1,73 +0,0 @@
<?php
include_once('./_common.php');
include_once(G5_LIB_PATH.'/iteminfo.lib.php');
if(isset($it['it_id']) && $it['it_id']) {
//$it_id = $it['it_id'];
$gubun = $it['it_info_gubun'];
} else {
$it_id = isset($_POST['it_id']) ? safe_replace_regex($_POST['it_id'], 'it_id') : '';
$gubun = isset($_POST['gubun']) ? clean_xss_tags($_POST['gubun'], 1, 1) : 'wear';
if ( $it_id ){
$sql = " select it_id, it_info_gubun, it_info_value from {$g5['g5_shop_item_table']} where it_id = '$it_id' ";
if( $items = sql_fetch($sql) ) {
$it = $items;
}
}
}
?>
<div class="tbl_frm01 tbl_wrap">
<table>
<caption>상품요약정보 입력</caption>
<colgroup>
<col class="grid_4">
<col>
<col class="grid_3">
</colgroup>
<tbody>
<?php
if(isset($it['it_info_value']) && $it['it_info_value'])
$info_value = unserialize($it['it_info_value']);
$article = isset($item_info[$gubun]['article']) ? $item_info[$gubun]['article'] : array();
if ($article) {
// $el_no : 분류적용, 전체적용을 한번만 넣기 위해, $el_length : 수직병합할 셀 값 - 지운아빠 2013-05-20
$el_no = 0;
$el_length = count($article);
$it_info_gubun = isset($it['it_info_gubun']) ? $it['it_info_gubun'] : '';
foreach($article as $key=>$value) {
$el_name = $key;
$el_title = $value[0];
$el_example = $value[1];
$el_value = '상품페이지 참고';
if($gubun == $it_info_gubun && isset($info_value[$key]))
$el_value = $info_value[$key];
?>
<tr>
<th scope="row"><label for="ii_article_<?php echo $el_name; ?>"><?php echo $el_title; ?></label></th>
<td>
<input type="hidden" name="ii_article[]" value="<?php echo $el_name; ?>">
<?php if ($el_example != "") echo help($el_example); ?>
<input type="text" name="ii_value[]" value="<?php echo get_text($el_value); ?>" id="ii_article_<?php echo $el_name; ?>" required class="frm_input required" />
</td>
<?php if ($el_no == 0) { ?>
<td rowspan="<?php echo $el_length; ?>" class="td_grpset">
<input type="checkbox" name="chk_ca_it_info" value="1" id="chk_ca_it_info">
<label for="chk_ca_it_info">분류적용</label>
<input type="checkbox" name="chk_all_it_info" value="1" id="chk_all_it_info">
<label for="chk_all_it_info">전체적용</label>
</td>
<?php } $el_no++; ?>
</tr>
<?php
}
}
?>
</tbody>
</table>
</div>
-299
View File
@@ -1,299 +0,0 @@
<?php
$sub_menu = '400300';
include_once('./_common.php');
auth_check_menu($auth, $sub_menu, "r");
$g5['title'] = '상품관리';
include_once (G5_ADMIN_PATH.'/admin.head.php');
// 분류
$ca_list = '<option value="">선택</option>'.PHP_EOL;
$sql = " select * from {$g5['g5_shop_category_table']} ";
if ($is_admin != 'super')
$sql .= " where ca_mb_id = '{$member['mb_id']}' ";
$sql .= " order by ca_order, ca_id ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$len = strlen($row['ca_id']) / 2 - 1;
$nbsp = '';
for ($i=0; $i<$len; $i++) {
$nbsp .= '&nbsp;&nbsp;&nbsp;';
}
$ca_list .= '<option value="'.$row['ca_id'].'">'.$nbsp.$row['ca_name'].'</option>'.PHP_EOL;
}
$where = " and ";
$sql_search = "";
if ($stx != "") {
if ($sfl != "") {
$sql_search .= " $where $sfl like '%$stx%' ";
$where = " and ";
}
if ($save_stx != $stx)
$page = 1;
}
if ($sca != "") {
$sql_search .= " $where (a.ca_id like '$sca%' or a.ca_id2 like '$sca%' or a.ca_id3 like '$sca%') ";
}
if ($sfl == "") $sfl = "it_name";
$sql_common = " from {$g5['g5_shop_item_table']} a ,
{$g5['g5_shop_category_table']} b
where (a.ca_id = b.ca_id";
if ($is_admin != 'super')
$sql_common .= " and b.ca_mb_id = '{$member['mb_id']}'";
$sql_common .= ") ";
$sql_common .= $sql_search;
// 테이블의 전체 레코드수만 얻음
$sql = " select count(*) as cnt " . $sql_common;
$row = sql_fetch($sql);
$total_count = $row['cnt'];
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
if (!$sst) {
$sst = "it_id";
$sod = "desc";
}
$sql_order = "order by $sst $sod";
$sql = " select *
$sql_common
$sql_order
limit $from_record, $rows ";
$result = sql_query($sql);
//$qstr = $qstr.'&amp;sca='.$sca.'&amp;page='.$page;
$qstr = $qstr.'&amp;sca='.$sca.'&amp;page='.$page.'&amp;save_stx='.$stx;
$listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목록</a>';
?>
<div class="local_ov01 local_ov">
<?php echo $listall; ?>
<span class="btn_ov01"><span class="ov_txt">등록된 상품</span><span class="ov_num"> <?php echo $total_count; ?>건</span></span>
</div>
<form name="flist" class="local_sch01 local_sch">
<input type="hidden" name="save_stx" value="<?php echo $stx; ?>">
<label for="sca" class="sound_only">분류선택</label>
<select name="sca" id="sca">
<option value="">전체분류</option>
<?php
$sql1 = " select ca_id, ca_name from {$g5['g5_shop_category_table']} order by ca_order, ca_id ";
$result1 = sql_query($sql1);
for ($i=0; $row1=sql_fetch_array($result1); $i++) {
$len = strlen($row1['ca_id']) / 2 - 1;
$nbsp = '';
for ($i=0; $i<$len; $i++) $nbsp .= '&nbsp;&nbsp;&nbsp;';
echo '<option value="'.$row1['ca_id'].'" '.get_selected($sca, $row1['ca_id']).'>'.$nbsp.$row1['ca_name'].'</option>'.PHP_EOL;
}
?>
</select>
<label for="sfl" class="sound_only">검색대상</label>
<select name="sfl" id="sfl">
<option value="it_name" <?php echo get_selected($sfl, 'it_name'); ?>>상품명</option>
<option value="it_id" <?php echo get_selected($sfl, 'it_id'); ?>>상품코드</option>
<option value="it_maker" <?php echo get_selected($sfl, 'it_maker'); ?>>제조사</option>
<option value="it_origin" <?php echo get_selected($sfl, 'it_origin'); ?>>원산지</option>
<option value="it_sell_email" <?php echo get_selected($sfl, 'it_sell_email'); ?>>판매자 e-mail</option>
</select>
<label for="stx" class="sound_only">검색어</label>
<input type="text" name="stx" value="<?php echo $stx; ?>" id="stx" class="frm_input">
<input type="submit" value="검색" class="btn_submit">
</form>
<form name="fitemlistupdate" method="post" action="./itemlistupdate.php" onsubmit="return fitemlist_submit(this);" autocomplete="off" id="fitemlistupdate">
<input type="hidden" name="sca" value="<?php echo $sca; ?>">
<input type="hidden" name="sst" value="<?php echo $sst; ?>">
<input type="hidden" name="sod" value="<?php echo $sod; ?>">
<input type="hidden" name="sfl" value="<?php echo $sfl; ?>">
<input type="hidden" name="stx" value="<?php echo $stx; ?>">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<div class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?> 목록</caption>
<thead>
<tr>
<th scope="col" rowspan="3">
<label for="chkall" class="sound_only">상품 전체</label>
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
</th>
<th scope="col" rowspan="3"><?php echo subject_sort_link('it_id', 'sca='.$sca); ?>상품코드</a></th>
<th scope="col" colspan="5">분류</th>
<th scope="col" rowspan="3"><?php echo subject_sort_link('it_order', 'sca='.$sca); ?>순서</a></th>
<th scope="col" rowspan="3"><?php echo subject_sort_link('it_use', 'sca='.$sca, 1); ?>판매</a></th>
<th scope="col" rowspan="3"><?php echo subject_sort_link('it_soldout', 'sca='.$sca, 1); ?>품절</a></th>
<th scope="col" rowspan="3"><?php echo subject_sort_link('it_hit', 'sca='.$sca, 1); ?>조회</a></th>
<th scope="col" rowspan="3">관리</th>
</tr>
<tr>
<th scope="col" rowspan="2" id="th_img">이미지</th>
<th scope="col" rowspan="2" id="th_pc_title"><?php echo subject_sort_link('it_name', 'sca='.$sca); ?>상품명</a></th>
<th scope="col" id="th_amt"><?php echo subject_sort_link('it_price', 'sca='.$sca); ?>판매가격</a></th>
<th scope="col" id="th_camt"><?php echo subject_sort_link('it_cust_price', 'sca='.$sca); ?>시중가격</a></th>
<th scope="col" id="th_skin">PC스킨</th>
</tr>
<tr>
<th scope="col" id="th_pt"><?php echo subject_sort_link('it_point', 'sca='.$sca); ?>포인트</a></th>
<th scope="col" id="th_qty"><?php echo subject_sort_link('it_stock_qty', 'sca='.$sca); ?>재고</a></th>
<th scope="col" id="th_mskin">모바일스킨</th>
</tr>
</thead>
<tbody>
<?php
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$href = shop_item_url($row['it_id']);
$bg = 'bg'.($i%2);
$it_point = $row['it_point'];
if($row['it_point_type'])
$it_point .= '%';
?>
<tr class="<?php echo $bg; ?>">
<td rowspan="3" class="td_chk">
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo get_text($row['it_name']); ?></label>
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i; ?>">
</td>
<td rowspan="3" class="td_num">
<input type="hidden" name="it_id[<?php echo $i; ?>]" value="<?php echo $row['it_id']; ?>">
<?php echo $row['it_id']; ?>
</td>
<td colspan="5" class="td_sort">
<label for="ca_id_<?php echo $i; ?>" class="sound_only"><?php echo get_text($row['it_name']); ?> 기본분류</label>
<select name="ca_id[<?php echo $i; ?>]" id="ca_id_<?php echo $i; ?>">
<?php echo conv_selected_option($ca_list, $row['ca_id']); ?>
</select>
<label for="ca_id2_<?php echo $i; ?>" class="sound_only"><?php echo get_text($row['it_name']); ?> 2차분류</label>
<select name="ca_id2[<?php echo $i; ?>]" id="ca_id2_<?php echo $i; ?>">
<?php echo conv_selected_option($ca_list, $row['ca_id2']); ?>
</select>
<label for="ca_id3_<?php echo $i; ?>" class="sound_only"><?php echo get_text($row['it_name']); ?> 3차분류</label>
<select name="ca_id3[<?php echo $i; ?>]" id="ca_id3_<?php echo $i; ?>">
<?php echo conv_selected_option($ca_list, $row['ca_id3']); ?>
</select>
</td>
<td rowspan="3" class="td_num">
<label for="order_<?php echo $i; ?>" class="sound_only">순서</label>
<input type="text" name="it_order[<?php echo $i; ?>]" value="<?php echo $row['it_order']; ?>" id="order_<?php echo $i; ?>" class="tbl_input" size="3">
</td>
<td rowspan="3">
<label for="use_<?php echo $i; ?>" class="sound_only">판매여부</label>
<input type="checkbox" name="it_use[<?php echo $i; ?>]" <?php echo ($row['it_use'] ? 'checked' : ''); ?> value="1" id="use_<?php echo $i; ?>">
</td>
<td rowspan="3">
<label for="soldout_<?php echo $i; ?>" class="sound_only">품절</label>
<input type="checkbox" name="it_soldout[<?php echo $i; ?>]" <?php echo ($row['it_soldout'] ? 'checked' : ''); ?> value="1" id="soldout_<?php echo $i; ?>">
</td>
<td rowspan="3" class="td_num"><?php echo $row['it_hit']; ?></td>
<td rowspan="3" class="td_mng td_mng_s">
<a href="./itemform.php?w=u&amp;it_id=<?php echo $row['it_id']; ?>&amp;ca_id=<?php echo $row['ca_id']; ?>&amp;<?php echo $qstr; ?>" class="btn btn_03"><span class="sound_only"><?php echo htmlspecialchars2(cut_str($row['it_name'],250, "")); ?> </span>수정</a>
<a href="./itemcopy.php?it_id=<?php echo $row['it_id']; ?>&amp;ca_id=<?php echo $row['ca_id']; ?>" class="itemcopy btn btn_02" target="_blank"><span class="sound_only"><?php echo htmlspecialchars2(cut_str($row['it_name'],250, "")); ?> </span>복사</a>
<a href="<?php echo $href; ?>" class="btn btn_02"><span class="sound_only"><?php echo htmlspecialchars2(cut_str($row['it_name'],250, "")); ?> </span>보기</a>
</td>
</tr>
<tr class="<?php echo $bg; ?>">
<td rowspan="2" class="td_img"><a href="<?php echo $href; ?>"><?php echo get_it_image($row['it_id'], 50, 50); ?></a></td>
<td headers="th_pc_title" rowspan="2" class="td_input">
<label for="name_<?php echo $i; ?>" class="sound_only">상품명</label>
<input type="text" name="it_name[<?php echo $i; ?>]" value="<?php echo htmlspecialchars2(cut_str($row['it_name'],250, "")); ?>" id="name_<?php echo $i; ?>" required class="tbl_input required" size="30">
</td>
<td headers="th_amt" class="td_numbig td_input">
<label for="price_<?php echo $i; ?>" class="sound_only">판매가격</label>
<input type="text" name="it_price[<?php echo $i; ?>]" value="<?php echo $row['it_price']; ?>" id="price_<?php echo $i; ?>" class="tbl_input sit_amt" size="7">
</td>
<td headers="th_camt" class="td_numbig td_input">
<label for="cust_price_<?php echo $i; ?>" class="sound_only">시중가격</label>
<input type="text" name="it_cust_price[<?php echo $i; ?>]" value="<?php echo $row['it_cust_price']; ?>" id="cust_price_<?php echo $i; ?>" class="tbl_input sit_camt" size="7">
</td>
<td headers="th_skin" class="td_numbig td_input">
<label for="it_skin_<?php echo $i; ?>" class="sound_only">PC 스킨</label>
<?php echo get_skin_select('shop', 'it_skin_'.$i, 'it_skin['.$i.']', $row['it_skin']); ?>
</td>
</tr>
<tr class="<?php echo $bg; ?>">
<td headers="th_pt" class="td_numbig td_input"><?php echo $it_point; ?></td>
<td headers="th_qty" class="td_numbig td_input">
<label for="stock_qty_<?php echo $i; ?>" class="sound_only">재고</label>
<input type="text" name="it_stock_qty[<?php echo $i; ?>]" value="<?php echo $row['it_stock_qty']; ?>" id="stock_qty_<?php echo $i; ?>" class="tbl_input sit_qty" size="7">
</td>
<td headers="th_mskin" class="td_numbig td_input">
<label for="it_mobile_skin_<?php echo $i; ?>" class="sound_only">모바일 스킨</label>
<?php echo get_mobile_skin_select('shop', 'it_mobile_skin_'.$i, 'it_mobile_skin['.$i.']', $row['it_mobile_skin']); ?>
</td>
</tr>
<?php
}
if ($i == 0)
echo '<tr><td colspan="12" class="empty_table">자료가 한건도 없습니다.</td></tr>';
?>
</tbody>
</table>
</div>
<div class="btn_fixed_top">
<a href="./itemform.php" class="btn btn_01">상품등록</a>
<a href="./itemexcel.php" onclick="return excelform(this.href);" target="_blank" class="btn btn_02">상품일괄등록</a>
<input type="submit" name="act_button" value="선택수정" onclick="document.pressed=this.value" class="btn btn_02">
<?php if ($is_admin == 'super') { ?>
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value" class="btn btn_02">
<?php } ?>
</div>
<!-- <div class="btn_confirm01 btn_confirm">
<input type="submit" value="일괄수정" class="btn_submit" accesskey="s">
</div> -->
</form>
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['SCRIPT_NAME']}?$qstr&amp;page="); ?>
<script>
function fitemlist_submit(f)
{
if (!is_checked("chk[]")) {
alert(document.pressed+" 하실 항목을 하나 이상 선택하세요.");
return false;
}
if(document.pressed == "선택삭제") {
if(!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
return false;
}
}
return true;
}
$(function() {
$(".itemcopy").click(function() {
var href = $(this).attr("href");
window.open(href, "copywin", "left=100, top=100, width=300, height=200, scrollbars=0");
return false;
});
});
function excelform(url)
{
var opt = "width=600,height=450,left=10,top=10";
window.open(url, "win_excel", opt);
return false;
}
</script>
<?php
include_once (G5_ADMIN_PATH.'/admin.tail.php');
-92
View File
@@ -1,92 +0,0 @@
<?php
$sub_menu = '400300';
include_once('./_common.php');
check_demo();
check_admin_token();
$count_post_chk = (isset($_POST['chk']) && is_array($_POST['chk'])) ? count($_POST['chk']) : 0;
$post_act_button = isset($_POST['act_button']) ? $_POST['act_button'] : '';
if (! $count_post_chk) {
alert($post_act_button." 하실 항목을 하나 이상 체크하세요.");
}
if ($post_act_button == "선택수정") {
auth_check_menu($auth, $sub_menu, 'w');
for ($i=0; $i< $count_post_chk; $i++) {
// 실제 번호를 넘김
$k = isset($_POST['chk'][$i]) ? (int) $_POST['chk'][$i] : 0;
if( ! (isset($_POST['ca_id'][$k]) && $_POST['ca_id'][$k])) {
alert("기본분류는 반드시 선택해야 합니다.");
}
$p_ca_id = (isset($_POST['ca_id']) && is_array($_POST['ca_id'])) ? strip_tags($_POST['ca_id'][$k]) : '';
$p_ca_id2 = (isset($_POST['ca_id2']) && is_array($_POST['ca_id2'])) ? strip_tags($_POST['ca_id2'][$k]) : '';
$p_ca_id3 = (isset($_POST['ca_id3']) && is_array($_POST['ca_id3'])) ? strip_tags($_POST['ca_id3'][$k]) : '';
$p_it_name = (isset($_POST['it_name']) && is_array($_POST['it_name'])) ? strip_tags(clean_xss_attributes($_POST['it_name'][$k])) : '';
$p_it_cust_price = (isset($_POST['it_cust_price']) && is_array($_POST['it_cust_price'])) ? strip_tags($_POST['it_cust_price'][$k]) : '';
$p_it_price = (isset($_POST['it_price']) && is_array($_POST['it_price'])) ? strip_tags($_POST['it_price'][$k]) : '';
$p_it_stock_qty = (isset($_POST['it_stock_qty']) && is_array($_POST['it_stock_qty'])) ? strip_tags($_POST['it_stock_qty'][$k]) : '';
$p_it_skin = (isset($_POST['it_skin']) && is_array($_POST['it_skin'])) ? strip_tags($_POST['it_skin'][$k]) : '';
$p_it_mobile_skin = (isset($_POST['it_mobile_skin']) && is_array($_POST['it_mobile_skin'])) ? strip_tags($_POST['it_mobile_skin'][$k]) : '';
$p_it_use = (isset($_POST['it_use']) && is_array($_POST['it_use'])) ? strip_tags($_POST['it_use'][$k]) : '';
$p_it_soldout = (isset($_POST['it_soldout']) && is_array($_POST['it_soldout'])) ? strip_tags($_POST['it_soldout'][$k]) : '';
$p_it_order = (isset($_POST['it_order']) && is_array($_POST['it_order'])) ? strip_tags($_POST['it_order'][$k]) : '';
$p_it_id = isset($_POST['it_id'][$k]) ? preg_replace('/[^a-z0-9_\-]/i', '', $_POST['it_id'][$k]) : '';
if ($is_admin != 'super') { // 최고관리자가 아니면 체크
$sql = "select a.it_id, b.ca_mb_id from {$g5['g5_shop_item_table']} a , {$g5['g5_shop_category_table']} b where (a.ca_id = b.ca_id) and a.it_id = '$p_it_id'";
$checks = sql_fetch($sql);
if( ! $checks['ca_mb_id'] || $checks['ca_mb_id'] !== $member['mb_id'] ){
continue;
}
}
$sql = "update {$g5['g5_shop_item_table']}
set ca_id = '".sql_real_escape_string($p_ca_id)."',
ca_id2 = '".sql_real_escape_string($p_ca_id2)."',
ca_id3 = '".sql_real_escape_string($p_ca_id3)."',
it_name = '".$p_it_name."',
it_cust_price = '".sql_real_escape_string($p_it_cust_price)."',
it_price = '".sql_real_escape_string($p_it_price)."',
it_stock_qty = '".sql_real_escape_string($p_it_stock_qty)."',
it_skin = '".sql_real_escape_string($p_it_skin)."',
it_mobile_skin = '".sql_real_escape_string($p_it_mobile_skin)."',
it_use = '".sql_real_escape_string($p_it_use)."',
it_soldout = '".sql_real_escape_string($p_it_soldout)."',
it_order = '".sql_real_escape_string($p_it_order)."',
it_update_time = '".G5_TIME_YMDHIS."'
where it_id = '".$p_it_id."' ";
sql_query($sql);
if( function_exists('shop_seo_title_update') ) shop_seo_title_update($p_it_id, true);
}
} else if ($post_act_button == "선택삭제") {
if ($is_admin != 'super')
alert('상품 삭제는 최고관리자만 가능합니다.');
auth_check_menu($auth, $sub_menu, 'd');
// _ITEM_DELETE_ 상수를 선언해야 itemdelete.inc.php 가 정상 작동함
define('_ITEM_DELETE_', true);
for ($i=0; $i<$count_post_chk; $i++) {
// 실제 번호를 넘김
$k = isset($_POST['chk'][$i]) ? (int) $_POST['chk'][$i] : 0;
// include 전에 $it_id 값을 반드시 넘겨야 함
$it_id = isset($_POST['it_id'][$k]) ? preg_replace('/[^a-z0-9_\-]/i', '', $_POST['it_id'][$k]) : '';
include ('./itemdelete.inc.php');
}
}
goto_url("./itemlist.php?sca=$sca&amp;sst=$sst&amp;sod=$sod&amp;sfl=$sfl&amp;stx=$stx&amp;page=$page");
-223
View File
@@ -1,223 +0,0 @@
<?php
include_once('./_common.php');
$po_run = false;
if(isset($it['it_id']) && $it['it_id']) {
$opt_subject = explode(',', $it['it_option_subject']);
$opt1_subject = isset($opt_subject[0]) ? $opt_subject[0] : '';
$opt2_subject = isset($opt_subject[1]) ? $opt_subject[1] : '';
$opt3_subject = isset($opt_subject[2]) ? $opt_subject[2] : '';
$sql = " select * from {$g5['g5_shop_item_option_table']} where io_type = '0' and it_id = '{$it['it_id']}' order by io_no asc ";
$result = sql_query($sql);
if(sql_num_rows($result))
$po_run = true;
} else if(!empty($_POST)) {
$opt1_subject = isset($_POST['opt1_subject']) ? preg_replace(G5_OPTION_ID_FILTER, '', trim(stripslashes($_POST['opt1_subject']))) : '';
$opt2_subject = isset($_POST['opt2_subject']) ? preg_replace(G5_OPTION_ID_FILTER, '', trim(stripslashes($_POST['opt2_subject']))) : '';
$opt3_subject = isset($_POST['opt3_subject']) ? preg_replace(G5_OPTION_ID_FILTER, '', trim(stripslashes($_POST['opt3_subject']))) : '';
$opt1_val = isset($_POST['opt1']) ? preg_replace(G5_OPTION_ID_FILTER, '', trim(stripslashes($_POST['opt1']))) : '';
$opt2_val = isset($_POST['opt2']) ? preg_replace(G5_OPTION_ID_FILTER, '', trim(stripslashes($_POST['opt2']))) : '';
$opt3_val = isset($_POST['opt3']) ? preg_replace(G5_OPTION_ID_FILTER, '', trim(stripslashes($_POST['opt3']))) : '';
if(!$opt1_subject || !$opt1_val) {
echo '옵션1과 옵션1 항목을 입력해 주십시오.';
exit;
}
$po_run = true;
$opt1_count = $opt2_count = $opt3_count = 0;
if($opt1_val) {
$opt1 = explode(',', $opt1_val);
$opt1_count = count($opt1);
}
if($opt2_val) {
$opt2 = explode(',', $opt2_val);
$opt2_count = count($opt2);
}
if($opt3_val) {
$opt3 = explode(',', $opt3_val);
$opt3_count = count($opt3);
}
}
if($po_run) {
?>
<div class="sit_option_frm_wrapper">
<table>
<caption>옵션 목록</caption>
<thead>
<tr>
<th scope="col">
<label for="opt_chk_all" class="sound_only">전체 옵션</label>
<input type="checkbox" name="opt_chk_all" value="1" id="opt_chk_all">
</th>
<th scope="col">옵션</th>
<th scope="col">추가금액</th>
<th scope="col">재고수량</th>
<th scope="col">통보수량</th>
<th scope="col">사용여부</th>
</tr>
</thead>
<tbody>
<?php
if(isset($it['it_id']) && $it['it_id']) {
for($i=0; $row=sql_fetch_array($result); $i++) {
$opt_id = $row['io_id'];
$opt_val = explode(chr(30), $opt_id);
$opt_1 = $opt_val[0];
$opt_2 = isset($opt_val[1]) ? $opt_val[1] : '';
$opt_3 = isset($opt_val[2]) ? $opt_val[2] : '';
$opt_2_len = strlen($opt_2);
$opt_3_len = strlen($opt_3);
$opt_price = $row['io_price'];
$opt_stock_qty = $row['io_stock_qty'];
$opt_noti_qty = $row['io_noti_qty'];
$opt_use = $row['io_use'];
?>
<tr>
<td class="td_chk">
<input type="hidden" name="opt_id[]" value="<?php echo $opt_id; ?>">
<label for="opt_chk_<?php echo $i; ?>" class="sound_only"></label>
<input type="checkbox" name="opt_chk[]" id="opt_chk_<?php echo $i; ?>" value="1">
</td>
<td class="opt-cell"><?php echo $opt_1; if ($opt_2_len) echo ' <small>&gt;</small> '.$opt_2; if ($opt_3_len) echo ' <small>&gt;</small> '.$opt_3; ?></td>
<td class="td_numsmall">
<label for="opt_price_<?php echo $i; ?>" class="sound_only"></label>
<input type="text" name="opt_price[]" value="<?php echo $opt_price; ?>" id="opt_price_<?php echo $i; ?>" class="frm_input" size="9">
</td>
<td class="td_num">
<label for="opt_stock_qty_<?php echo $i; ?>" class="sound_only"></label>
<input type="text" name="opt_stock_qty[]" value="<?php echo $opt_stock_qty; ?>" id="op_stock_qty_<?php echo $i; ?>" class="frm_input" size="5">
</td>
<td class="td_num">
<label for="opt_noti_qty_<?php echo $i; ?>" class="sound_only"></label>
<input type="text" name="opt_noti_qty[]" value="<?php echo $opt_noti_qty; ?>" id="opt_noti_qty_<?php echo $i; ?>" class="frm_input" size="5">
</td>
<td class="td_mng">
<label for="opt_use_<?php echo $i; ?>" class="sound_only"></label>
<select name="opt_use[]" id="opt_use_<?php echo $i; ?>">
<option value="1" <?php echo get_selected('1', $opt_use); ?>>사용함</option>
<option value="0" <?php echo get_selected('0', $opt_use); ?>>사용안함</option>
</select>
</td>
</tr>
<?php
} // for
} else {
$w = isset($_POST['w']) ? $_POST['w'] : '';
$post_it_id = isset($_POST['it_id']) ? safe_replace_regex($_POST['it_id'], 'it_id') : '';
for($i=0; $i<$opt1_count; $i++) {
$j = 0;
do {
$k = 0;
do {
$opt_1 = isset($opt1[$i]) ? strip_tags(trim($opt1[$i])) : '';
$opt_2 = isset($opt2[$j]) ? strip_tags(trim($opt2[$j])) : '';
$opt_3 = isset($opt3[$k]) ? strip_tags(trim($opt3[$k])) : '';
$opt_2_len = strlen($opt_2);
$opt_3_len = strlen($opt_3);
$opt_id = $opt_1;
if($opt_2_len)
$opt_id .= chr(30).$opt_2;
if($opt_3_len)
$opt_id .= chr(30).$opt_3;
$opt_price = 0;
$opt_stock_qty = 9999;
$opt_noti_qty = 100;
$opt_use = 1;
// 기존에 설정된 값이 있는지 체크
if($w === 'u') {
$sql = " select io_price, io_stock_qty, io_noti_qty, io_use
from {$g5['g5_shop_item_option_table']}
where it_id = '{$post_it_id}'
and io_id = '$opt_id'
and io_type = '0' ";
$row = sql_fetch($sql);
if($row) {
$opt_price = (int)$row['io_price'];
$opt_stock_qty = (int)$row['io_stock_qty'];
$opt_noti_qty = (int)$row['io_noti_qty'];
$opt_use = (int)$row['io_use'];
}
}
?>
<tr>
<td class="td_chk">
<input type="hidden" name="opt_id[]" value="<?php echo $opt_id; ?>">
<label for="opt_chk_<?php echo $i; ?>" class="sound_only"></label>
<input type="checkbox" name="opt_chk[]" id="opt_chk_<?php echo $i; ?>" value="1">
</td>
<td class="opt1-cell"><?php echo $opt_1; if ($opt_2_len) echo ' <small>&gt;</small> '.$opt_2; if ($opt_3_len) echo ' <small>&gt;</small> '.$opt_3; ?></td>
<td class="td_numsmall">
<label for="opt_price_<?php echo $i; ?>" class="sound_only"></label>
<input type="text" name="opt_price[]" value="<?php echo $opt_price; ?>" id="opt_price_<?php echo $i; ?>" class="frm_input" size="9">
</td>
<td class="td_num">
<label for="opt_stock_qty_<?php echo $i; ?>" class="sound_only"></label>
<input type="text" name="opt_stock_qty[]" value="<?php echo $opt_stock_qty; ?>" id="opt_stock_qty_<?php echo $i; ?>" class="frm_input" size="5">
</td>
<td class="td_num">
<label for="opt_noti_qty_<?php echo $i; ?>" class="sound_only"></label>
<input type="text" name="opt_noti_qty[]" value="<?php echo $opt_noti_qty; ?>" id="opt_noti_qty_<?php echo $i; ?>" class="frm_input" size="5">
</td>
<td class="td_mng">
<label for="opt_use_<?php echo $i; ?>" class="sound_only"></label>
<select name="opt_use[]" id="opt_use_<?php echo $i; ?>">
<option value="1" <?php echo get_selected('1', $opt_use); ?>>사용함</option>
<option value="0" <?php echo get_selected('0', $opt_use); ?>>사용안함</option>
</select>
</td>
</tr>
<?php
$k++;
} while($k < $opt3_count);
$j++;
} while($j < $opt2_count);
} // for
}
?>
</tbody>
</table>
</div>
<div class="btn_list01 btn_list">
<input type="button" value="선택삭제" id="sel_option_delete" class="btn btn_02">
</div>
<fieldset>
<legend>옵션 일괄 적용</legend>
<?php echo help('전체 옵션의 추가금액, 재고/통보수량 및 사용여부를 일괄 적용할 수 있습니다. 단, 체크된 수정항목만 일괄 적용됩니다.'); ?>
<label for="opt_com_price">추가금액</label>
<label for="opt_com_price_chk" class="sound_only">추가금액일괄수정</label><input type="checkbox" name="opt_com_price_chk" value="1" id="opt_com_price_chk" class="opt_com_chk">
<input type="text" name="opt_com_price" value="0" id="opt_com_price" class="frm_input" size="5">
<label for="opt_com_stock">재고수량</label>
<label for="opt_com_stock_chk" class="sound_only">재고수량일괄수정</label><input type="checkbox" name="opt_com_stock_chk" value="1" id="opt_com_stock_chk" class="opt_com_chk">
<input type="text" name="opt_com_stock" value="0" id="opt_com_stock" class="frm_input" size="5">
<label for="opt_com_noti">통보수량</label>
<label for="opt_com_noti_chk" class="sound_only">통보수량일괄수정</label><input type="checkbox" name="opt_com_noti_chk" value="1" id="opt_com_noti_chk" class="opt_com_chk">
<input type="text" name="opt_com_noti" value="0" id="opt_com_noti" class="frm_input" size="5">
<label for="opt_com_use">사용여부</label>
<label for="opt_com_use_chk" class="sound_only">사용여부일괄수정</label><input type="checkbox" name="opt_com_use_chk" value="1" id="opt_com_use_chk" class="opt_com_chk">
<select name="opt_com_use" id="opt_com_use">
<option value="1">사용함</option>
<option value="0">사용안함</option>
</select>
<button type="button" id="opt_value_apply" class="btn_frmline">일괄적용</button>
</fieldset>
<?php
}
-97
View File
@@ -1,97 +0,0 @@
<?php
$sub_menu = '400660';
include_once('./_common.php');
include_once(G5_EDITOR_LIB);
auth_check_menu($auth, $sub_menu, "w");
$iq_id = isset($_REQUEST['iq_id']) ? preg_replace('/[^0-9]/', '', $_REQUEST['iq_id']) : 0;
$sql = " select *
from {$g5['g5_shop_item_qa_table']} a
left join {$g5['member_table']} b on (a.mb_id = b.mb_id)
where iq_id = '$iq_id' ";
$iq = sql_fetch($sql);
if (! (isset($iq['iq_id']) && $iq['iq_id'])) alert('등록된 자료가 없습니다.');
$name = get_sideview($iq['mb_id'], get_text($iq['iq_name']), $iq['mb_email'], $iq['mb_homepage']);
$g5['title'] = '상품문의';
include_once (G5_ADMIN_PATH.'/admin.head.php');
$qstr .= ($qstr ? '&amp;' : '').'sca='.$sca;
?>
<form name="fitemqaform" method="post" action="./itemqaformupdate.php" onsubmit="return fitemqaform_submit(this);">
<input type="hidden" name="w" value="<?php echo $w; ?>">
<input type="hidden" name="iq_id" value="<?php echo $iq_id; ?>">
<input type="hidden" name="sca" value="<?php echo $sca; ?>">
<input type="hidden" name="sst" value="<?php echo $sst; ?>">
<input type="hidden" name="sod" value="<?php echo $sod; ?>">
<input type="hidden" name="sfl" value="<?php echo $sfl; ?>">
<input type="hidden" name="stx" value="<?php echo $stx; ?>">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<div class="local_desc01 local_desc">
<p>상품에 대한 문의에 답변하실 수 있습니다. 상품 문의 내용의 수정도 가능합니다.</p>
</div>
<div class="tbl_frm01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?> 수정</caption>
<colgroup>
<col class="grid_4">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row">이름</th>
<td><?php echo $name; ?></td>
</tr>
<?php if($iq['iq_email']) { ?>
<tr>
<th scope="row">이메일</th>
<td><?php echo get_text($iq['iq_email']); ?></td>
</tr>
<?php } ?>
<?php if($iq['iq_hp']) { ?>
<tr>
<th scope="row">휴대폰</th>
<td><?php echo hyphen_hp_number($iq['iq_hp']); ?></td>
</tr>
<?php } ?>
<tr>
<th scope="row"><label for="iq_subject">제목</label></th>
<td><input type="text" name="iq_subject" value="<?php echo conv_subject($iq['iq_subject'],120); ?>" id="iq_subject" required class="frm_input required" size="95"></td>
</tr>
<tr>
<th scope="row"><label for="iq_question">질문</label></th>
<td><?php echo editor_html('iq_question', get_text(html_purifier($iq['iq_question']), 0)); ?></td>
</tr>
<tr>
<th scope="row"><label for="iq_answer">답변</label></th>
<td><?php echo editor_html('iq_answer', get_text(html_purifier($iq['iq_answer']), 0)); ?></td>
<!-- <td><textarea name="iq_answer" id="iq_answer" rows="7"><?php echo get_text($iq['iq_answer']); ?></textarea></td> -->
</tr>
</tbody>
</table>
</div>
<div class="btn_fixed_top">
<a href="./itemqalist.php?<?php echo $qstr; ?>" class="btn btn_02">목록</a>
<input type="submit" accesskey='s' value="확인" class="btn_submit btn">
</div>
</form>
<script>
function fitemqaform_submit(f)
{
<?php echo get_editor_js('iq_question'); ?>
<?php echo get_editor_js('iq_answer'); ?>
return true;
}
</script>
<?php
include_once (G5_ADMIN_PATH.'/admin.tail.php');
-87
View File
@@ -1,87 +0,0 @@
<?php
$sub_menu = '400660';
include_once('./_common.php');
check_demo();
if ($w == 'd')
auth_check_menu($auth, $sub_menu, "d");
else
auth_check_menu($auth, $sub_menu, "w");
check_admin_token();
if ($w == "u")
{
$sql = "update {$g5['g5_shop_item_qa_table']}
set iq_subject = '$iq_subject',
iq_question = '$iq_question',
iq_answer = '$iq_answer'
where iq_id = '$iq_id' ";
sql_query($sql);
if(trim($iq_answer)) {
$sql = " select a.iq_email, a.iq_hp, b.it_name
from {$g5['g5_shop_item_qa_table']} a left join {$g5['g5_shop_item_table']} b on ( a.it_id = b.it_id )
where a.iq_id = '$iq_id' ";
$row = sql_fetch($sql);
// SMS 알림
if($config['cf_sms_use'] == 'icode' && $row['iq_hp']) {
$sms_content = get_text($row['it_name']).' 상품문의에 답변이 등록되었습니다.';
$send_number = preg_replace('/[^0-9]/', '', $default['de_admin_company_tel']);
$recv_number = preg_replace('/[^0-9]/', '', $row['iq_hp']);
if($recv_number) {
if($config['cf_sms_type'] == 'LMS') {
include_once(G5_LIB_PATH.'/icode.lms.lib.php');
$port_setting = get_icode_port_type($config['cf_icode_id'], $config['cf_icode_pw']);
// SMS 모듈 클래스 생성
if($port_setting !== false) {
$SMS = new LMS;
$SMS->SMS_con($config['cf_icode_server_ip'], $config['cf_icode_id'], $config['cf_icode_pw'], $port_setting);
$strDest = array();
$strDest[] = $recv_number;
$strCallBack = $send_number;
$strCaller = iconv_euckr(trim($default['de_admin_company_name']));
$strSubject = '';
$strURL = '';
$strData = iconv_euckr($sms_content);
$strDate = '';
$nCount = count($strDest);
$res = $SMS->Add($strDest, $strCallBack, $strCaller, $strSubject, $strURL, $strData, $strDate, $nCount);
$SMS->Send();
$SMS->Init(); // 보관하고 있던 결과값을 지웁니다.
}
} else {
include_once(G5_LIB_PATH.'/icode.sms.lib.php');
$SMS = new SMS; // SMS 연결
$SMS->SMS_con($config['cf_icode_server_ip'], $config['cf_icode_id'], $config['cf_icode_pw'], $config['cf_icode_server_port']);
$SMS->Add($recv_number, $send_number, $config['cf_icode_id'], iconv_euckr(stripslashes($sms_content)), "");
$SMS->Send();
}
}
}
// 답변 이메일전송
if(trim($row['iq_email'])) {
include_once(G5_LIB_PATH.'/mailer.lib.php');
$subject = $config['cf_title'].' '.$row['it_name'].' 상품문의 답변 알림 메일';
$content = conv_content($iq_answer, 1);
mailer($config['cf_title'], $config['cf_admin_email'], $row['iq_email'], $subject, $content, 1);
}
}
goto_url("./itemqaform.php?w=$w&amp;iq_id=$iq_id&amp;sca=$sca&amp;$qstr");
}
else {
alert();
}
-207
View File
@@ -1,207 +0,0 @@
<?php
$sub_menu = '400660';
include_once('./_common.php');
auth_check_menu($auth, $sub_menu, "r");
$g5['title'] = '상품문의';
include_once (G5_ADMIN_PATH.'/admin.head.php');
$where = " where ";
$sql_search = "";
if ($stx != "") {
if ($sfl != "") {
$sql_search .= " $where $sfl like '%$stx%' ";
$where = " and ";
}
if ($save_stx != $stx)
$page = 1;
}
if ($sca != "") {
$sql_search .= " and ca_id like '$sca%' ";
}
if ($sfl == "") $sfl = "it_name";
if (!$sst) {
$sst = "iq_id";
$sod = "desc";
}
$sql_common = " from {$g5['g5_shop_item_qa_table']} a
left join {$g5['g5_shop_item_table']} b on (a.it_id = b.it_id)
left join {$g5['member_table']} c on (a.mb_id = c.mb_id) ";
$sql_common .= $sql_search;
// 테이블의 전체 레코드수만 얻음
$sql = " select count(*) as cnt " . $sql_common;
$row = sql_fetch($sql);
$total_count = $row['cnt'];
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select *
$sql_common
order by $sst $sod, iq_id desc
limit $from_record, $rows ";
$result = sql_query($sql);
//$qstr = 'page='.$page.'&amp;sst='.$sst.'&amp;sod='.$sod.'&amp;stx='.$stx;
$qstr .= ($qstr ? '&amp;' : '').'sca='.$sca.'&amp;save_stx='.$stx;
$listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목록</a>';
?>
<div class="local_ov01 local_ov">
<?php echo $listall; ?>
<span class="btn_ov01"><span class="ov_txt"> 전체 문의내역</span><span class="ov_num"> <?php echo $total_count; ?>건</span></span>
</div>
<form name="flist" class="local_sch01 local_sch">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<input type="hidden" name="save_stx" value="<?php echo $stx; ?>">
<label for="sca" class="sound_only">분류선택</label>
<select name="sca" id="sca">
<option value="">전체분류</option>
<?php
$sql1 = " select ca_id, ca_name from {$g5['g5_shop_category_table']} order by ca_order, ca_id ";
$result1 = sql_query($sql1);
for ($i=0; $row1=sql_fetch_array($result1); $i++) {
$len = strlen($row1['ca_id']) / 2 - 1;
$nbsp = "";
for ($i=0; $i<$len; $i++) $nbsp .= "&nbsp;&nbsp;&nbsp;";
$selected = ($row1['ca_id'] == $sca) ? ' selected="selected"' : '';
echo '<option value="'.$row1['ca_id'].'"'.$selected.'>'.$nbsp.$row1['ca_name'].'</option>'.PHP_EOL;
}
?>
</select>
<label for="sfl" class="sound_only">검색대상</label>
<select name="sfl" id="sfl">
<option value="it_name" <?php echo get_selected($sfl, 'it_name'); ?>>상품명</option>
<option value="a.it_id" <?php echo get_selected($sfl, 'a.it_id'); ?>>상품코드</option>
</select>
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
<input type="text" name="stx" value="<?php echo $stx; ?>" id="stx" required class="frm_input required">
<input type="submit" value="검색" class="btn_submit">
</form>
<form name="fitemqalist" method="post" action="./itemqalistupdate.php" onsubmit="return fitemqalist_submit(this);" autocomplete="off">
<input type="hidden" name="sca" value="<?php echo $sca; ?>">
<input type="hidden" name="sst" value="<?php echo $sst; ?>">
<input type="hidden" name="sod" value="<?php echo $sod; ?>">
<input type="hidden" name="sfl" value="<?php echo $sfl; ?>">
<input type="hidden" name="stx" value="<?php echo $stx; ?>">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<div class="tbl_head01 tbl_wrap" id="itemqalist">
<table>
<caption><?php echo $g5['title']; ?> 목록</caption>
<thead>
<tr>
<th scope="col">
<label for="chkall" class="sound_only">상품문의 전체</label>
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
</th>
<th scope="col"><?php echo subject_sort_link('it_name'); ?>상품명</a></th>
<th scope="col"><?php echo subject_sort_link('iq_subject'); ?>질문</a></th>
<th scope="col"><?php echo subject_sort_link('mb_name'); ?>이름</a></th>
<th scope="col"><?php echo subject_sort_link('iq_answer'); ?>답변</a></th>
<th scope="col">관리</th>
</tr>
</thead>
<tbody>
<?php
for ($i=0; $row=sql_fetch_array($result); $i++) {
$row['iq_subject'] = cut_str($row['iq_subject'], 30, "...");
$href = shop_item_url($row['it_id']);
$name = get_sideview($row['mb_id'], get_text($row['iq_name']), $row['mb_email'], $row['mb_homepage']);
$answer = $row['iq_answer'] ? 'Y' : '&nbsp;';
$iq_question = get_view_thumbnail(conv_content($row['iq_question'], 1), 300);
$iq_answer = $row['iq_answer'] ? get_view_thumbnail(conv_content($row['iq_answer'], 1), 300) : "답변이 등록되지 않았습니다.";
$bg = 'bg'.($i%2);
?>
<tr class="<?php echo $bg; ?>">
<td class="td_chk">
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo get_text($row['iq_subject']) ?> 상품문의</label>
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i; ?>">
<input type="hidden" name="iq_id[<?php echo $i; ?>]" value="<?php echo $row['iq_id']; ?>">
</td>
<td class="td_left"><a href="<?php echo $href; ?>"><?php echo get_it_image($row['it_id'], 50, 50); ?> <?php echo cut_str($row['it_name'],30); ?></a></td>
<td class="td_left">
<a href="#" class="qa_href" onclick="return false;" target="<?php echo $i; ?>"><?php echo get_text($row['iq_subject']); ?> <span class="tit_op">열기</span></a>
<div id="qa_div<?php echo $i; ?>" class="qa_div" style="display:none;">
<div class="qa_q">
<strong>문의내용</strong>
<?php echo $iq_question; ?>
</div>
<div class="qa_a">
<strong>답변</strong>
<?php echo $iq_answer; ?>
</div>
</div>
</td>
<td class="td_name"><?php echo $name; ?></td>
<td class="td_boolean"><?php echo $answer; ?></td>
<td class="td_mng td_mng_s">
<a href="./itemqaform.php?w=u&amp;iq_id=<?php echo $row['iq_id']; ?>&amp;<?php echo $qstr; ?>" class="btn btn_03"><span class="sound_only"><?php echo get_text($row['iq_subject']); ?> </span>수정</a>
</td>
</tr>
<?php
}
if ($i == 0) {
echo '<tr><td colspan="6" class="empty_table"><span>자료가 없습니다.</span></td></tr>';
}
?>
</tbody>
</table>
</div>
<div class="btn_fixed_top">
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value" class="btn btn_02">
</div>
</form>
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['SCRIPT_NAME']}?$qstr&amp;page="); ?>
<script>
function fitemqalist_submit(f)
{
if (!is_checked("chk[]")) {
alert(document.pressed+" 하실 항목을 하나 이상 선택하세요.");
return false;
}
if(document.pressed == "선택삭제") {
if(!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
return false;
}
}
return true;
}
$(function(){
$(".qa_href").click(function(){
var $content = $("#qa_div"+$(this).attr("target"));
$(".qa_div").each(function(index, value){
if ($(this).get(0) == $content.get(0)) { // 객체의 비교시 .get(0) 를 사용한다.
$(this).is(":hidden") ? $(this).show() : $(this).hide();
} else {
$(this).hide();
}
});
});
});
</script>
<?php
include_once (G5_ADMIN_PATH.'/admin.tail.php');
-29
View File
@@ -1,29 +0,0 @@
<?php
$sub_menu = '400660';
include_once('./_common.php');
check_demo();
check_admin_token();
$count_post_chk = (isset($_POST['chk']) && is_array($_POST['chk'])) ? count($_POST['chk']) : 0;
if (! $count_post_chk) {
alert($_POST['act_button']." 하실 항목을 하나 이상 체크하세요.");
}
if ($_POST['act_button'] == "선택삭제") {
auth_check_menu($auth, $sub_menu, 'd');
for ($i=0; $i<$count_post_chk; $i++) {
// 실제 번호를 넘김
$k = isset($_POST['chk'][$i]) ? (int) $_POST['chk'][$i] : 0;
$iiq_id = isset($_POST['iq_id'][$i]) ? (int) $_POST['iq_id'][$k] : 0;
$sql = "delete from {$g5['g5_shop_item_qa_table']} where iq_id = '{$iiq_id}' ";
sql_query($sql);
}
}
goto_url("./itemqalist.php?sca=$sca&amp;sst=$sst&amp;sod=$sod&amp;sfl=$sfl&amp;stx=$stx&amp;page=$page");
-179
View File
@@ -1,179 +0,0 @@
<?php
$sub_menu = '500100';
include_once('./_common.php');
auth_check_menu($auth, $sub_menu, "r");
$g5['title'] = '상품판매순위';
include_once (G5_ADMIN_PATH.'/admin.head.php');
include_once(G5_PLUGIN_PATH.'/jquery-ui/datepicker.php');
$fr_date = (isset($_GET['fr_date']) && preg_match("/[0-9]/", $_GET['fr_date'])) ? $_GET['fr_date'] : '';
$to_date = (isset($_GET['to_date']) && preg_match("/[0-9]/", $_GET['to_date'])) ? $_GET['to_date'] : date("Ymd", time());
$doc = isset($_GET['doc']) ? clean_xss_tags($_GET['doc'], 1, 1) : '';
$sort1 = (isset($_GET['sort1']) && in_array($_GET['sort1'], array('ct_status_1', 'ct_status_2', 'ct_status_3', 'ct_status_4', 'ct_status_5', 'ct_status_6', 'ct_status_7', 'ct_status_8', 'ct_status_9', 'ct_status_sum'))) ? $_GET['sort1'] : 'ct_status_sum';
$sort2 = (isset($_GET['sort2']) && in_array($_GET['sort2'], array('desc', 'asc'))) ? $_GET['sort2'] : 'desc';
$sel_ca_id = isset($_GET['sel_ca_id']) ? get_search_string($_GET['sel_ca_id']) : '';
$sql = " select a.it_id,
b.*,
SUM(IF(ct_status = '쇼핑',ct_qty, 0)) as ct_status_1,
SUM(IF(ct_status = '주문',ct_qty, 0)) as ct_status_2,
SUM(IF(ct_status = '입금',ct_qty, 0)) as ct_status_3,
SUM(IF(ct_status = '준비',ct_qty, 0)) as ct_status_4,
SUM(IF(ct_status = '배송',ct_qty, 0)) as ct_status_5,
SUM(IF(ct_status = '완료',ct_qty, 0)) as ct_status_6,
SUM(IF(ct_status = '취소',ct_qty, 0)) as ct_status_7,
SUM(IF(ct_status = '반품',ct_qty, 0)) as ct_status_8,
SUM(IF(ct_status = '품절',ct_qty, 0)) as ct_status_9,
SUM(ct_qty) as ct_status_sum
from {$g5['g5_shop_cart_table']} a, {$g5['g5_shop_item_table']} b ";
$sql .= " where a.it_id = b.it_id ";
if ($fr_date && $to_date)
{
$fr = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3", $fr_date);
$to = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3", $to_date);
$sql .= " and ct_time between '$fr 00:00:00' and '$to 23:59:59' ";
}
if ($sel_ca_id)
{
$sql .= " and b.ca_id like '$sel_ca_id%' ";
}
$sql .= " group by a.it_id
order by $sort1 $sort2 ";
$result = sql_query($sql);
$total_count = sql_num_rows($result);
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$rank = ($page - 1) * $rows;
$sql = $sql . " limit $from_record, $rows ";
$result = sql_query($sql);
//$qstr = 'page='.$page.'&amp;sort1='.$sort1.'&amp;sort2='.$sort2;
$qstr1 = $qstr.'&amp;fr_date='.$fr_date.'&amp;to_date='.$to_date.'&amp;sel_ca_id='.$sel_ca_id;
$listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목록</a>';
?>
<div class="local_ov01 local_ov">
<?php echo $listall; ?>
<span class="btn_ov01"><span class="ov_txt">등록상품 </span><span class="ov_num"> <?php echo $total_count; ?>건 </span></span>
</div>
<form name="flist" class="local_sch01 local_sch">
<input type="hidden" name="doc" value="<?php echo $doc; ?>">
<input type="hidden" name="sort1" value="<?php echo $sort1; ?>">
<input type="hidden" name="sort2" value="<?php echo $sort2; ?>">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<label for="sel_ca_id" class="sound_only">검색대상</label>
<select name="sel_ca_id" id="sel_ca_id">
<option value=''>전체분류</option>
<?php
$sql1 = " select ca_id, ca_name from {$g5['g5_shop_category_table']} order by ca_order, ca_id ";
$result1 = sql_query($sql1);
for ($i=0; $row1=sql_fetch_array($result1); $i++) {
$len = strlen($row1['ca_id']) / 2 - 1;
$nbsp = "";
for ($i=0; $i<$len; $i++) $nbsp .= "&nbsp;&nbsp;&nbsp;";
echo '<option value="'.$row1['ca_id'].'" '.get_selected($sel_ca_id, $row1['ca_id']).'>'.$nbsp.$row1['ca_name'].'</option>'.PHP_EOL;
}
?>
</select>
기간설정
<label for="fr_date" class="sound_only">시작일</label>
<input type="text" name="fr_date" value="<?php echo $fr_date; ?>" id="fr_date" required class="required frm_input" size="8" maxlength="8"> 에서
<label for="to_date" class="sound_only">종료일</label>
<input type="text" name="to_date" value="<?php echo $to_date; ?>" id="to_date" required class="required frm_input" size="8" maxlength="8"> 까지
<input type="submit" value="검색" class="btn_submit">
</form>
<div class="local_desc01 local_desc">
<p>판매량을 합산하여 상품판매순위를 집계합니다.</p>
</div>
<div class="btn_fixed_top">
<a href="./itemstocklist.php" class="btn_02 btn">상품재고관리</a>
<a href="./itemlist.php" class="btn_01 btn">상품등록</a>
</div>
<div class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?> 목록</caption>
<thead>
<tr>
<th scope="col">순위</th>
<th scope="col">상품명</th>
<th scope="col"><a href="<?php echo title_sort("ct_status_1",1)."&amp;$qstr1"; ?>">쇼핑</a></th>
<th scope="col"><a href="<?php echo title_sort("ct_status_2",1)."&amp;$qstr1"; ?>">주문</a></th>
<th scope="col"><a href="<?php echo title_sort("ct_status_3",1)."&amp;$qstr1"; ?>">입금</a></th>
<th scope="col"><a href="<?php echo title_sort("ct_status_4",1)."&amp;$qstr1"; ?>">준비</a></th>
<th scope="col"><a href="<?php echo title_sort("ct_status_5",1)."&amp;$qstr1"; ?>">배송</a></th>
<th scope="col"><a href="<?php echo title_sort("ct_status_6",1)."&amp;$qstr1"; ?>">완료</a></th>
<th scope="col"><a href="<?php echo title_sort("ct_status_7",1)."&amp;$qstr1"; ?>">취소</a></th>
<th scope="col"><a href="<?php echo title_sort("ct_status_8",1)."&amp;$qstr1"; ?>">반품</a></th>
<th scope="col"><a href="<?php echo title_sort("ct_status_9",1)."&amp;$qstr1"; ?>">품절</a></th>
<th scope="col"><a href="<?php echo title_sort("ct_status_sum",1)."&amp;$qstr1"; ?>">합계</a></th>
</tr>
</thead>
<tbody>
<?php
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$href = shop_item_url($row['it_id']);
$num = $rank + $i + 1;
$bg = 'bg'.($i%2);
?>
<tr class="<?php echo $bg; ?>">
<td class="td_num"><?php echo $num; ?></td>
<td class="td_left"><a href="<?php echo $href; ?>"><?php echo get_it_image($row['it_id'], 50, 50); ?> <?php echo cut_str($row['it_name'],30); ?></a></td>
<td class="td_num"><?php echo $row['ct_status_1']; ?></td>
<td class="td_num"><?php echo $row['ct_status_2']; ?></td>
<td class="td_num"><?php echo $row['ct_status_3']; ?></td>
<td class="td_num"><?php echo $row['ct_status_4']; ?></td>
<td class="td_num"><?php echo $row['ct_status_5']; ?></td>
<td class="td_num"><?php echo $row['ct_status_6']; ?></td>
<td class="td_num"><?php echo $row['ct_status_7']; ?></td>
<td class="td_num"><?php echo $row['ct_status_8']; ?></td>
<td class="td_num"><?php echo $row['ct_status_9']; ?></td>
<td class="td_num"><?php echo $row['ct_status_sum']; ?></td>
</tr>
<?php
}
if ($i == 0) {
echo '<tr><td colspan="12" class="empty_table">자료가 없습니다.</td></tr>';
}
?>
</tbody>
</table>
</div>
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['SCRIPT_NAME']}?$qstr1&amp;page="); ?>
<script>
$(function() {
$("#fr_date, #to_date").datepicker({
changeMonth: true,
changeYear: true,
dateFormat: "yymmdd",
showButtonPanel: true,
yearRange: "c-99:c+99",
maxDate: "+0d"
});
});
</script>
<?php
include_once (G5_ADMIN_PATH.'/admin.tail.php');
-218
View File
@@ -1,218 +0,0 @@
<?php
$sub_menu = '400620';
include_once('./_common.php');
auth_check_menu($auth, $sub_menu, "r");
$doc = isset($_GET['doc']) ? clean_xss_tags($_GET['doc'], 1, 1) : '';
$sort1 = (isset($_GET['sort1']) && in_array($_GET['sort1'], array('it_id', 'it_name', 'it_stock_qty', 'it_use', 'it_soldout', 'it_stock_sms'))) ? $_GET['sort1'] : '';
$sort2 = (isset($_GET['sort2']) && in_array($_GET['sort2'], array('desc', 'asc'))) ? $_GET['sort2'] : 'desc';
$sel_field = (isset($_GET['sel_field']) && in_array($_GET['sel_field'], array('it_id', 'it_name', 'it_stock_qty', 'it_use', 'it_soldout', 'it_stock_sms')) ) ? $_GET['sel_field'] : '';
$sel_ca_id = isset($_GET['sel_ca_id']) ? get_search_string($_GET['sel_ca_id']) : '';
$search = isset($_GET['search']) ? get_search_string($_GET['search']) : '';
$g5['title'] = '상품재고관리';
include_once (G5_ADMIN_PATH.'/admin.head.php');
$sql_search = " where 1 ";
if ($search != "") {
if ($sel_field != "") {
$sql_search .= " and $sel_field like '%$search%' ";
}
}
if ($sel_ca_id != "") {
$sql_search .= " and ca_id like '$sel_ca_id%' ";
}
if ($sel_field == "") $sel_field = "it_name";
if ($sort1 == "") $sort1 = "it_stock_qty";
if ($sort2 == "") $sort2 = "asc";
$sql_common = " from {$g5['g5_shop_item_table']} ";
$sql_common .= $sql_search;
// 테이블의 전체 레코드수만 얻음
$sql = " select count(*) as cnt " . $sql_common;
$row = sql_fetch($sql);
$total_count = $row['cnt'];
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select it_id,
it_name,
it_use,
it_stock_qty,
it_stock_sms,
it_noti_qty,
it_soldout,
ca_id
$sql_common
order by $sort1 $sort2
limit $from_record, $rows ";
$result = sql_query($sql);
$qstr1 = 'sel_ca_id='.$sel_ca_id.'&amp;sel_field='.$sel_field.'&amp;search='.$search;
$qstr = $qstr1.'&amp;sort1='.$sort1.'&amp;sort2='.$sort2.'&amp;page='.$page;
$listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목록</a>';
?>
<div class="local_ov01 local_ov">
<?php echo $listall; ?>
<span class="btn_ov01"><span class="ov_txt">전체 상품</span><span class="ov_num"> <?php echo $total_count; ?>개</span></span>
</div>
<form name="flist" class="local_sch01 local_sch">
<input type="hidden" name="doc" value="<?php echo $doc; ?>">
<input type="hidden" name="sort1" value="<?php echo $sort1; ?>">
<input type="hidden" name="sort2" value="<?php echo $sort2; ?>">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<label for="sel_ca_id" class="sound_only">분류선택</label>
<select name="sel_ca_id" id="sel_ca_id">
<option value=''>전체분류</option>
<?php
$sql1 = " select ca_id, ca_name from {$g5['g5_shop_category_table']} order by ca_order, ca_id ";
$result1 = sql_query($sql1);
for ($i=0; $row1=sql_fetch_array($result1); $i++) {
$len = strlen($row1['ca_id']) / 2 - 1;
$nbsp = "";
for ($i=0; $i<$len; $i++) $nbsp .= "&nbsp;&nbsp;&nbsp;";
echo '<option value="'.$row1['ca_id'].'" '.get_selected($sel_ca_id, $row1['ca_id']).'>'.$nbsp.$row1['ca_name'].'</option>'.PHP_EOL;
}
?>
</select>
<label for="sel_field" class="sound_only">검색대상</label>
<select name="sel_field" id="sel_field">
<option value="it_name" <?php echo get_selected($sel_field, 'it_name'); ?>>상품명</option>
<option value="it_id" <?php echo get_selected($sel_field, 'it_id'); ?>>상품코드</option>
</select>
<label for="search" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
<input type="text" name="search" id="search" value="<?php echo $search; ?>" required class="frm_input required">
<input type="submit" value="검색" class="btn_submit">
</form>
<div class="local_desc01 local_desc">
<p>재고수정의 수치를 수정하시면 창고재고의 수치가 변경됩니다.</p>
</div>
<form name="fitemstocklist" action="./itemstocklistupdate.php" method="post">
<input type="hidden" name="sort1" value="<?php echo $sort1; ?>">
<input type="hidden" name="sort2" value="<?php echo $sort2; ?>">
<input type="hidden" name="sel_ca_id" value="<?php echo $sel_ca_id; ?>">
<input type="hidden" name="sel_field" value="<?php echo $sel_field; ?>">
<input type="hidden" name="search" value="<?php echo $search; ?>">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<div class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?> 목록</caption>
<thead>
<tr>
<th scope="col"><a href="<?php echo title_sort("it_id") . "&amp;$qstr1"; ?>">상품코드</a></th>
<th scope="col"><a href="<?php echo title_sort("it_name") . "&amp;$qstr1"; ?>">상품명</a></th>
<th scope="col"><a href="<?php echo title_sort("it_stock_qty") . "&amp;$qstr1"; ?>">창고재고</a></th>
<th scope="col">주문대기</th>
<th scope="col">가재고</th>
<th scope="col">재고수정</th>
<th scope="col">통보수량</th>
<th scope="col"><a href="<?php echo title_sort("it_use") . "&amp;$qstr1"; ?>">판매</a></th>
<th scope="col"><a href="<?php echo title_sort("it_soldout") . "&amp;$qstr1"; ?>">품절</a></th>
<th scope="col"><a href="<?php echo title_sort("it_stock_sms") . "&amp;$qstr1"; ?>">재입고알림</a></th>
<th scope="col">관리</th>
</tr>
</thead>
<tbody>
<?php
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$href = shop_item_url($row['it_id']);
// 선택옵션이 있을 경우 주문대기 수량 계산하지 않음
$sql2 = " select count(*) as cnt from {$g5['g5_shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' ";
$row2 = sql_fetch($sql2);
$wait_qty = 0;
if(! (isset($row2['cnt']) && $row2['cnt'])) {
$sql1 = " select SUM(ct_qty) as sum_qty
from {$g5['g5_shop_cart_table']}
where it_id = '{$row['it_id']}'
and ct_stock_use = '0'
and ct_status in ('쇼핑', '주문', '입금', '준비') ";
$row1 = sql_fetch($sql1);
$wait_qty = $row1['sum_qty'];
}
// 가재고 (미래재고)
$temporary_qty = $row['it_stock_qty'] - $wait_qty;
// 통보수량보다 재고수량이 작을 때
$it_stock_qty = number_format($row['it_stock_qty']);
$it_stock_qty_st = ''; // 스타일 정의
if($row['it_stock_qty'] <= $row['it_noti_qty']) {
$it_stock_qty_st = ' sit_stock_qty_alert';
$it_stock_qty = ''.$it_stock_qty.' !<span class="sound_only"> 재고부족 </span>';
}
$bg = 'bg'.($i%2);
?>
<tr class="<?php echo $bg; ?>">
<td class="td_numbig">
<input type="hidden" name="it_id[<?php echo $i; ?>]" value="<?php echo $row['it_id']; ?>">
<?php echo $row['it_id']; ?>
</td>
<td class="td_left"><a href="<?php echo $href; ?>"><?php echo get_it_image($row['it_id'], 50, 50); ?> <?php echo cut_str(stripslashes($row['it_name']), 60, "&#133"); ?></a></td>
<td class="td_num<?php echo $it_stock_qty_st; ?>"><?php echo $it_stock_qty; ?></td>
<td class="td_num"><?php echo number_format($wait_qty); ?></td>
<td class="td_num"><?php echo number_format($temporary_qty); ?></td>
<td class="td_num">
<label for="stock_qty_<?php echo $i; ?>" class="sound_only">재고수정</label>
<input type="text" name="it_stock_qty[<?php echo $i; ?>]" value="<?php echo $row['it_stock_qty']; ?>" id="stock_qty_<?php echo $i; ?>" class="frm_input" size="10" autocomplete="off">
</td>
<td class="td_num">
<label for="noti_qty_<?php echo $i; ?>" class="sound_only">통보수량</label>
<input type="text" name="it_noti_qty[<?php echo $i; ?>]" value="<?php echo $row['it_noti_qty']; ?>" id="noti_qty_<?php echo $i; ?>" class="frm_input" size="10" autocomplete="off">
</td>
<td class="td_chk2">
<label for="use_<?php echo $i; ?>" class="sound_only">판매</label>
<input type="checkbox" name="it_use[<?php echo $i; ?>]" value="1" id="use_<?php echo $i; ?>" <?php echo ($row['it_use'] ? "checked" : ""); ?>>
</td>
<td class="td_chk2">
<label for="soldout_<?php echo $i; ?>" class="sound_only">품절</label>
<input type="checkbox" name="it_soldout[<?php echo $i; ?>]" value="1" id="soldout_<?php echo $i; ?>" <?php echo ($row['it_soldout'] ? "checked" : ""); ?>>
</td>
<td class="td_chk2">
<label for="stock_sms_<?php echo $i; ?>" class="sound_only">재입고 알림</label>
<input type="checkbox" name="it_stock_sms[<?php echo $i; ?>]" value="1" id="stock_sms_<?php echo $i; ?>" <?php echo ($row['it_stock_sms'] ? "checked" : ""); ?>>
</td>
<td class="td_mng td_mng_s"><a href="./itemform.php?w=u&amp;it_id=<?php echo $row['it_id']; ?>&amp;ca_id=<?php echo $row['ca_id']; ?>&amp;<?php echo $qstr; ?>" class="btn btn_03">수정</a></td>
</tr>
<?php
}
if (!$i)
echo '<tr><td colspan="11" class="empty_table"><span>자료가 없습니다.</span></td></tr>';
?>
</tbody>
</table>
</div>
<div class="btn_fixed_top">
<a href="./optionstocklist.php" class="btn btn_02">상품옵션재고</a>
<a href="./itemsellrank.php" class="btn btn_02">상품판매순위</a>
<input type="submit" value="일괄수정" class="btn_submit btn">
</div>
</form>
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['SCRIPT_NAME']}?$qstr&amp;page="); ?>
<?php
include_once (G5_ADMIN_PATH.'/admin.tail.php');
-39
View File
@@ -1,39 +0,0 @@
<?php
$sub_menu = '400620';
include_once('./_common.php');
check_demo();
auth_check_menu($auth, $sub_menu, "w");
check_admin_token();
$count_post_it_id = (isset($_POST['it_id']) && is_array($_POST['it_id'])) ? count($_POST['it_id']) : 0;
$search = isset($_REQUEST['search']) ? get_search_string($_REQUEST['search']) : '';
$sort1 = isset($_REQUEST['sort1']) ? clean_xss_tags($_REQUEST['sort1'], 1, 1) : '';
$sort2 = isset($_REQUEST['sort2']) ? clean_xss_tags($_REQUEST['sort2'], 1, 1) : '';
$sel_ca_id = isset($_REQUEST['sel_ca_id']) ? clean_xss_tags($_REQUEST['sel_ca_id'], 1, 1) : '';
$sel_field = isset($_REQUEST['sel_field']) ? clean_xss_tags($_REQUEST['sel_field'], 1, 1) : '';
// 재고 일괄수정
for ($i=0; $i<$count_post_it_id; $i++)
{
$it_stock_qty = isset($_POST['it_stock_qty'][$i]) ? (int) $_POST['it_stock_qty'][$i] : 0;
$it_noti_qty = isset($_POST['it_noti_qty'][$i]) ? (int) $_POST['it_noti_qty'][$i] : 0;
$it_use = isset($_POST['it_use'][$i]) ? (int) $_POST['it_use'][$i] : 0;
$it_soldout = isset($_POST['it_soldout'][$i]) ? (int) $_POST['it_soldout'][$i] : 0;
$it_stock_sms = isset($_POST['it_stock_sms'][$i]) ? (int) $_POST['it_stock_sms'][$i] : 0;
$it_id = isset($_POST['it_id'][$i]) ? safe_replace_regex($_POST['it_id'][$i], 'it_id') : '';
$sql = "update {$g5['g5_shop_item_table']}
set it_stock_qty = '".$it_stock_qty."',
it_noti_qty = '".$it_noti_qty."',
it_use = '".$it_use."',
it_soldout = '".$it_soldout."',
it_stock_sms = '".$it_stock_sms."'
where it_id = '".$it_id."' ";
sql_query($sql);
}
goto_url("./itemstocklist.php?sort1=$sort1&amp;sort2=$sort2&amp;sel_ca_id=$sel_ca_id&amp;sel_field=$sel_field&amp;search=$search&amp;page=$page");
-184
View File
@@ -1,184 +0,0 @@
<?php
$sub_menu = '500400';
include_once('./_common.php');
auth_check_menu($auth, $sub_menu, "r");
$g5['title'] = '재입고SMS 알림';
include_once (G5_ADMIN_PATH.'/admin.head.php');
// 테이블 생성
if(!isset($g5['g5_shop_item_stocksms_table']))
die('<meta charset="utf-8">dbconfig.php 파일에 <strong>$g5[\'g5_shop_item_stocksms_table\'] = G5_SHOP_TABLE_PREFIX.\'item_stocksms\';</strong> 를 추가해 주세요.');
if(!sql_query(" select ss_id from {$g5['g5_shop_item_stocksms_table']} limit 1", false)) {
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['g5_shop_item_stocksms_table']}` (
`ss_id` int(11) NOT NULL AUTO_INCREMENT,
`it_id` varchar(20) NOT NULL DEFAULT '',
`ss_hp` varchar(255) NOT NULL DEFAULT '',
`ss_send` tinyint(4) NOT NULL DEFAULT '0',
`ss_send_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`ss_datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`ss_ip` varchar(25) NOT NULL DEFAULT '',
PRIMARY KEY (`ss_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ", true);
}
$doc = isset($_GET['doc']) ? clean_xss_tags($_GET['doc'], 1, 1) : '';
$sort1 = (isset($_GET['sort1']) && in_array($_GET['sort1'], array('it_id', 'ss_hp', 'ss_send', 'ss_send_time', 'ss_datetime'))) ? $_GET['sort1'] : 'ss_send';
$sort2 = (isset($_GET['sort2']) && in_array($_GET['sort2'], array('desc', 'asc'))) ? $_GET['sort2'] : 'asc';
$sel_field = (isset($_GET['sel_field']) && in_array($_GET['sel_field'], array('it_id', 'ss_hp', 'ss_send')) ) ? $_GET['sel_field'] : 'it_id';
$search = isset($_GET['search']) ? get_search_string($_GET['search']) : '';
$sql_search = " where 1 ";
if ($search != "") {
if ($sel_field != "") {
$sql_search .= " and $sel_field like '%$search%' ";
}
}
$sql_common = " from {$g5['g5_shop_item_stocksms_table']} ";
// 미전송 건수
$sql = " select count(*) as cnt " . $sql_common . " where ss_send = '0' ";
$row = sql_fetch($sql);
$unsend_count = $row['cnt'];
// 테이블의 전체 레코드수만 얻음
$sql = " select count(*) as cnt " . $sql_common;
$row = sql_fetch($sql);
$total_count = $row['cnt'];
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select *
$sql_common
$sql_search
order by $sort1 $sort2
limit $from_record, $rows ";
$result = sql_query($sql);
$qstr1 = 'sel_field='.$sel_field.'&amp;search='.$search;
$qstr = $qstr1.'&amp;sort1='.$sort1.'&amp;sort2='.$sort2.'&amp;page='.$page;
$listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목록</a>';
?>
<div class="local_ov01 local_ov">
<?php echo $listall; ?>
<span class="btn_ov01"><span class="ov_txt">전체 </span><span class="ov_num"> <?php echo number_format($total_count); ?>건</span></span>
<span class="btn_ov01"><span class="ov_txt">미전송 </span><span class="ov_num"><?php echo number_format($unsend_count); ?>건</span></span>
</div>
<form name="flist" class="local_sch01 local_sch">
<input type="hidden" name="doc" value="<?php echo $doc; ?>">
<input type="hidden" name="sort1" value="<?php echo $sort1; ?>">
<input type="hidden" name="sort2" value="<?php echo $sort2; ?>">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<label for="sel_field" class="sound_only">검색대상</label>
<select name="sel_field" id="sel_field">
<option value="it_id" <?php echo get_selected($sel_field, 'it_id'); ?>>상품코드</option>
<option value="ss_hp" <?php echo get_selected($sel_field, 'ss_hp'); ?>>휴대폰번호</option>
</select>
<label for="search" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
<input type="text" name="search" id="search" value="<?php echo $search; ?>" required class="frm_input required">
<input type="submit" value="검색" class="btn_submit">
</form>
<form name="fitemstocksms" action="./itemstocksmsupdate.php" method="post" onsubmit="return fitemstocksms_submit(this);">
<input type="hidden" name="sort1" value="<?php echo $sort1; ?>">
<input type="hidden" name="sort2" value="<?php echo $sort2; ?>">
<input type="hidden" name="sel_field" value="<?php echo $sel_field; ?>">
<input type="hidden" name="search" value="<?php echo $search; ?>">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<div class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?> 목록</caption>
<thead>
<tr>
<th scope="col">
<label for="chkall" class="sound_only">알림요청 전체</label>
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
</th>
<th scope="col">상품명</th>
<th scope="col">휴대폰번호</th>
<th scope="col">SMS전송</th>
<th scope="col">SMS전송일시</th>
<th scope="col">등록일시</th>
</tr>
</thead>
<tbody>
<?php
for ($i=0; $row=sql_fetch_array($result); $i++)
{
// 상품정보
$sql = " select it_name from {$g5['g5_shop_item_table']} where it_id = '{$row['it_id']}' ";
$it = sql_fetch($sql);
if($it['it_name'])
$it_name = get_text($it['it_name']);
else
$it_name = '상품정보 없음';
$bg = 'bg'.($i%2);
?>
<tr class="<?php echo $bg; ?>">
<td class="td_chk">
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo $it_name; ?> 알림요청</label>
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i; ?>">
<input type="hidden" name="ss_id[<?php echo $i; ?>]" value="<?php echo $row['ss_id']; ?>">
</td>
<td class="td_left"><?php echo $it_name; ?></td>
<td class="td_telbig"><?php echo $row['ss_hp']; ?></td>
<td class="td_stat"><?php echo ($row['ss_send'] ? '전송완료' : '전송전'); ?></td>
<td class="td_datetime"><?php echo (is_null_time($row['ss_send_time']) ? '' : $row['ss_send_time']); ?></td>
<td class="td_datetime"><?php echo (is_null_time($row['ss_datetime']) ? '' : $row['ss_datetime']); ?></td>
</tr>
<?php
}
if (!$i)
echo '<tr><td colspan="6" class="empty_table"><span>자료가 없습니다.</span></td></tr>';
?>
</tbody>
</table>
</div>
<div class="btn_fixed_top">
<?php if ($is_admin == 'super') { ?>
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value" class="btn btn_02">
<?php } ?>
<input type="submit" name="act_button" value="선택SMS전송" class="btn_submit btn" onclick="document.pressed=this.value">
</div>
</form>
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['SCRIPT_NAME']}?$qstr&amp;page="); ?>
<script>
function fitemstocksms_submit(f)
{
if (!is_checked("chk[]")) {
alert(document.pressed+" 하실 항목을 하나 이상 선택하세요.");
return false;
}
if(document.pressed == "선택삭제") {
if(!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
return false;
}
}
return true;
}
</script>
<?php
include_once (G5_ADMIN_PATH.'/admin.tail.php');
-122
View File
@@ -1,122 +0,0 @@
<?php
$sub_menu = '500400';
include_once('./_common.php');
check_demo();
check_admin_token();
$count_post_chk = (isset($_POST['chk']) && is_array($_POST['chk'])) ? count($_POST['chk']) : 0;
if (! $count_post_chk) {
alert($_POST['act_button']." 하실 항목을 하나 이상 체크하세요.");
}
if ($_POST['act_button'] == "선택SMS전송") {
auth_check_menu($auth, $sub_menu, 'w');
$sms_messages = array();
for ($i=0; $i<$count_post_chk; $i++) {
// 실제 번호를 넘김
$k = isset($_POST['chk'][$i]) ? (int) $_POST['chk'][$i] : 0;
$ss_id = isset($_POST['ss_id'][$k]) ? (int) $_POST['ss_id'][$k] : 0;
$sql = " select a.ss_id, a.ss_hp, a.ss_send, b.it_id, b.it_name
from {$g5['g5_shop_item_stocksms_table']} a left join {$g5['g5_shop_item_table']} b on ( a.it_id = b.it_id )
where a.ss_id = '$ss_id' ";
$row = sql_fetch($sql);
if(!$row['ss_id'] || !$row['it_id'] || $row['ss_send'])
continue;
// SMS
if($config['cf_sms_use'] == 'icode') {
$sms_contents = get_text($row['it_name']).' 상품이 재입고 되었습니다. '.$default['de_admin_company_name'];
$receive_number = preg_replace("/[^0-9]/", "", $row['ss_hp']); // 수신자번호
$send_number = preg_replace("/[^0-9]/", "", $default['de_admin_company_tel']); // 발신자번호
if($receive_number)
$sms_messages[] = array('recv' => $receive_number, 'send' => $send_number, 'cont' => $sms_contents);
}
// SMS 전송으로 변경함
$sql = " update {$g5['g5_shop_item_stocksms_table']}
set ss_send = '1',
ss_send_time = '".G5_TIME_YMDHIS."'
where ss_id = '{$ss_id}' ";
sql_query($sql);
}
// SMS
$sms_count = count($sms_messages);
if($sms_count > 0) {
if($config['cf_sms_type'] == 'LMS') {
include_once(G5_LIB_PATH.'/icode.lms.lib.php');
$port_setting = get_icode_port_type($config['cf_icode_id'], $config['cf_icode_pw']);
// SMS 모듈 클래스 생성
if($port_setting !== false) {
$SMS = new LMS;
$SMS->SMS_con($config['cf_icode_server_ip'], $config['cf_icode_id'], $config['cf_icode_pw'], $port_setting);
for($s=0; $s<$sms_count; $s++) {
$strDest = array();
$strDest[] = $sms_messages[$s]['recv'];
$strCallBack = $sms_messages[$s]['send'];
$strCaller = iconv_euckr(trim($default['de_admin_company_name']));
$strSubject = '';
$strURL = '';
$strData = iconv_euckr($sms_messages[$s]['cont']);
$strDate = '';
$nCount = count($strDest);
$res = $SMS->Add($strDest, $strCallBack, $strCaller, $strSubject, $strURL, $strData, $strDate, $nCount);
$SMS->Send();
$SMS->Init(); // 보관하고 있던 결과값을 지웁니다.
}
}
} else {
include_once(G5_LIB_PATH.'/icode.sms.lib.php');
$SMS = new SMS; // SMS 연결
$SMS->SMS_con($config['cf_icode_server_ip'], $config['cf_icode_id'], $config['cf_icode_pw'], $config['cf_icode_server_port']);
for($s=0; $s<$sms_count; $s++) {
$recv_number = $sms_messages[$s]['recv'];
$send_number = $sms_messages[$s]['send'];
$sms_content = iconv_euckr($sms_messages[$s]['cont']);
$SMS->Add($recv_number, $send_number, $config['cf_icode_id'], $sms_content, "");
}
$SMS->Send();
$SMS->Init(); // 보관하고 있던 결과값을 지웁니다.
}
}
} else if ($_POST['act_button'] == "선택삭제") {
if ($is_admin != 'super')
alert('자료의 삭제는 최고관리자만 가능합니다.');
auth_check_menu($auth, $sub_menu, 'd');
for ($i=0; $i<$count_post_chk; $i++) {
// 실제 번호를 넘김
$k = isset($_POST['chk'][$i]) ? (int) $_POST['chk'][$i] : 0;
$ss_id = isset($_POST['ss_id'][$k]) ? (int) $_POST['ss_id'][$k] : 0;
$sql = " delete from {$g5['g5_shop_item_stocksms_table']} where ss_id = '{$ss_id}' ";
sql_query($sql);
}
}
$qstr1 = 'sel_field='.$sel_field.'&amp;search='.$search;
$qstr = $qstr1.'&amp;sort1='.$sort1.'&amp;sort2='.$sort2.'&amp;page='.$page;
goto_url('./itemstocksms.php?'.$qstr);
-180
View File
@@ -1,180 +0,0 @@
<?php
include_once('./_common.php');
$ps_run = false;
$post_it_id = isset($_POST['it_id']) ? safe_replace_regex($_POST['it_id'], 'it_id') : '';
if(isset($it['it_id']) && $it['it_id']) {
$sql = " select * from {$g5['g5_shop_item_option_table']} where io_type = '1' and it_id = '{$it['it_id']}' order by io_no asc ";
$result = sql_query($sql);
if(sql_num_rows($result))
$ps_run = true;
} else if(!empty($_POST)) {
$subject_count = (isset($_POST['subject']) && is_array($_POST['subject'])) ? count($_POST['subject']) : 0;
$supply_count = (isset($_POST['supply']) && is_array($_POST['supply'])) ? count($_POST['supply']) : 0;
if(!$subject_count || !$supply_count) {
echo '추가옵션명과 추가옵션항목을 입력해 주십시오.';
exit;
}
$ps_run = true;
}
if($ps_run) {
?>
<div class="sit_option_frm_wrapper">
<table>
<caption>추가옵션 목록</caption>
<thead>
<tr>
<th scope="col">
<label for="spl_chk_all" class="sound_only">전체 추가옵션</label>
<input type="checkbox" name="spl_chk_all" value="1">
</th>
<th scope="col">옵션명</th>
<th scope="col">옵션항목</th>
<th scope="col">상품금액</th>
<th scope="col">재고수량</th>
<th scope="col">통보수량</th>
<th scope="col">사용여부</th>
</tr>
</thead>
<tbody>
<?php
if(isset($it['it_id']) && $it['it_id']) {
for($i=0; $row=sql_fetch_array($result); $i++) {
$spl_id = $row['io_id'];
$spl_val = explode(chr(30), $spl_id);
$spl_subject = $spl_val[0];
$spl = $spl_val[1];
$spl_price = $row['io_price'];
$spl_stock_qty = $row['io_stock_qty'];
$spl_noti_qty = $row['io_noti_qty'];
$spl_use = $row['io_use'];
?>
<tr>
<td class="td_chk">
<input type="hidden" name="spl_id[]" value="<?php echo $spl_id; ?>">
<label for="spl_chk_<?php echo $i; ?>" class="sound_only"><?php echo $spl_subject.' '.$spl; ?></label>
<input type="checkbox" name="spl_chk[]" id="spl_chk_<?php echo $i; ?>" value="1">
</td>
<td class="spl-subject-cell"><?php echo $spl_subject; ?></td>
<td class="spl-cell"><?php echo $spl; ?></td>
<td class="td_numsmall">
<label for="spl_price_<?php echo $i; ?>" class="sound_only">상품금액</label>
<input type="text" name="spl_price[]" value="<?php echo $spl_price; ?>" id="spl_price_<?php echo $i; ?>" class="frm_input" size="5">
</td>
<td class="td_num">
<label for="spl_stock_qty_<?php echo $i; ?>" class="sound_only">재고수량</label>
<input type="text" name="spl_stock_qty[]" value="<?php echo $spl_stock_qty; ?>" id="spl_stock_qty_<?php echo $i; ?>" class="frm_input" size="5">
</td>
<td class="td_num">
<label for="spl_noti_qty_<?php echo $i; ?>" class="sound_only">통보수량</label>
<input type="text" name="spl_noti_qty[]" value="<?php echo $spl_noti_qty; ?>" id="spl_noti_qty_<?php echo $i; ?>" class="frm_input" size="5">
</td>
<td class="td_mng">
<label for="spl_use_<?php echo $i; ?>" class="sound_only">사용여부</label>
<select name="spl_use[]" id="spl_use_<?php echo $i; ?>">
<option value="1" <?php echo get_selected('1', $spl_use); ?>>사용함</option>
<option value="0" <?php echo get_selected('0', $spl_use); ?>>사용안함</option>
</select>
</td>
</tr>
<?php
} // for
} else {
for($i=0; $i<$subject_count; $i++) {
$spl_subject = isset($_POST['subject'][$i]) ? preg_replace(G5_OPTION_ID_FILTER, '', trim(stripslashes($_POST['subject'][$i]))) : '';
$spl_val = isset($_POST['supply'][$i]) ? explode(',', preg_replace(G5_OPTION_ID_FILTER, '', trim(stripslashes($_POST['supply'][$i])))) : '';
$spl_count = count($spl_val);
for($j=0; $j<$spl_count; $j++) {
$spl = isset($spl_val[$j]) ? strip_tags(trim($spl_val[$j])) : '';
if($spl_subject && strlen($spl)) {
$spl_id = $spl_subject.chr(30).$spl;
$spl_price = 0;
$spl_stock_qty = 9999;
$spl_noti_qty = 100;
$spl_use = 1;
// 기존에 설정된 값이 있는지 체크
if(isset($_POST['w']) && $_POST['w'] === 'u') {
$sql = " select io_price, io_stock_qty, io_noti_qty, io_use
from {$g5['g5_shop_item_option_table']}
where it_id = '{$post_it_id}'
and io_id = '$spl_id'
and io_type = '1' ";
$row = sql_fetch($sql);
if($row) {
$spl_price = (int)$row['io_price'];
$spl_stock_qty = (int)$row['io_stock_qty'];
$spl_noti_qty = (int)$row['io_noti_qty'];
$spl_use = (int)$row['io_use'];
}
}
?>
<tr>
<td class="td_chk">
<input type="hidden" name="spl_id[]" value="<?php echo $spl_id; ?>">
<label for="spl_chk_<?php echo $i; ?>" class="sound_only"><?php echo $spl_subject.' '.$spl; ?></label>
<input type="checkbox" name="spl_chk[]" id="spl_chk_<?php echo $i; ?>" value="1">
</td>
<td class="spl-subject-cell"><?php echo $spl_subject; ?></td>
<td class="spl-cell"><?php echo $spl; ?></td>
<td class="td_numsmall">
<label for="spl_price_<?php echo $i; ?>" class="sound_only">상품금액</label>
<input type="text" name="spl_price[]" value="<?php echo $spl_price; ?>" id="spl_price_<?php echo $i; ?>" class="frm_input" size="9">
</td>
<td class="td_num">
<label for="spl_stock_qty_<?php echo $i; ?>" class="sound_only">재고수량</label>
<input type="text" name="spl_stock_qty[]" value="<?php echo $spl_stock_qty; ?>" id="spl_stock_qty_<?php echo $i; ?>" class="frm_input" size="5">
</td>
<td class="td_num">
<label for="spl_noti_qty_<?php echo $i; ?>" class="sound_only">통보수량</label>
<input type="text" name="spl_noti_qty[]" value="<?php echo $spl_noti_qty; ?>" id="spl_noti_qty_<?php echo $i; ?>" class="frm_input" size="5">
</td>
<td class="td_mng">
<label for="spl_use_<?php echo $i; ?>" class="sound_only">사용여부</label>
<select name="spl_use[]" id="spl_use_<?php echo $i; ?>">
<option value="1" <?php echo get_selected('1', $spl_use); ?>>사용함</option>
<option value="0" <?php echo get_selected('0', $spl_use); ?>>사용안함</option>
</select>
</td>
</tr>
<?php
} // if
} // for
} // for
}
?>
</tbody>
</table>
</div>
<div class="btn_list01 btn_list">
<button type="button" id="sel_supply_delete" class="btn btn_02">선택삭제</button>
</div>
<fieldset>
<?php echo help('전체 추가 옵션의 상품금액, 재고/통보수량 및 사용여부를 일괄 적용할 수 있습니다. 단, 체크된 수정항목만 일괄 적용됩니다.'); ?>
<label for="spl_com_price">상품금액</label>
<label for="spl_com_price_chk" class="sound_only">상품금액일괄수정</label><input type="checkbox" name="spl_com_price_chk" value="1" id="spl_com_price_chk" class="spl_com_chk">
<input type="text" name="spl_com_price" value="0" id="spl_com_price" class="frm_input" size="9">
<label for="spl_com_stock">재고수량</label>
<label for="spl_com_stock_chk" class="sound_only">재고수량일괄수정</label><input type="checkbox" name="spl_com_stock_chk" value="1" id="spl_com_stock_chk" class="spl_com_chk">
<input type="text" name="spl_com_stock" value="0" id="spl_com_stock" class="frm_input" size="5">
<label for="spl_com_noti">통보수량</label>
<label for="spl_com_noti_chk" class="sound_only">통보수량일괄수정</label><input type="checkbox" name="spl_com_noti_chk" value="1" id="spl_com_noti_chk" class="spl_com_chk">
<input type="text" name="spl_com_noti" value="0" id="spl_com_noti" class="frm_input" size="5">
<label for="spl_com_use">사용여부</label>
<label for="spl_com_use_chk" class="sound_only">사용여부일괄수정</label><input type="checkbox" name="spl_com_use_chk" value="1" id="spl_com_use_chk" class="spl_com_chk">
<select name="spl_com_use" id="spl_com_use">
<option value="1">사용함</option>
<option value="0">사용안함</option>
</select>
<button type="button" id="spl_value_apply" class="btn_frmline">일괄적용</button>
</fieldset>
<?php
}
-195
View File
@@ -1,195 +0,0 @@
<?php
$sub_menu = '400610';
include_once('./_common.php');
auth_check_menu($auth, $sub_menu, "r");
$doc = isset($_GET['doc']) ? clean_xss_tags($_GET['doc'], 1, 1) : '';
$sfl = in_array($sfl, array('it_name', 'it_id')) ? $sfl : '';
$g5['title'] = '상품유형관리';
include_once (G5_ADMIN_PATH.'/admin.head.php');
/*
$sql_search = " where 1 ";
if ($search != "") {
if ($sel_field != "") {
$sql_search .= " and $sel_field like '%$search%' ";
}
}
if ($sel_ca_id != "") {
$sql_search .= " and (ca_id like '$sel_ca_id%' or ca_id2 like '$sel_ca_id%' or ca_id3 like '$sel_ca_id%') ";
}
if ($sel_field == "") $sel_field = "it_name";
*/
$where = " where ";
$sql_search = "";
if ($stx != "") {
if ($sfl != "") {
$sql_search .= " $where $sfl like '%$stx%' ";
$where = " and ";
}
if ($save_stx != $stx)
$page = 1;
}
if ($sca != "") {
$sql_search .= " $where (ca_id like '$sca%' or ca_id2 like '$sca%' or ca_id3 like '$sca%') ";
}
if ($sfl == "") $sfl = "it_name";
if (!$sst) {
$sst = "it_id";
$sod = "desc";
}
$sql_order = "order by $sst $sod";
$sql_common = " from {$g5['g5_shop_item_table']} ";
$sql_common .= $sql_search;
// 테이블의 전체 레코드수만 얻음
$sql = " select count(*) as cnt " . $sql_common;
$row = sql_fetch($sql);
$total_count = $row['cnt'];
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select it_id,
it_name,
it_type1,
it_type2,
it_type3,
it_type4,
it_type5,
ca_id
$sql_common
$sql_order
limit $from_record, $rows ";
$result = sql_query($sql);
$qstr = $qstr.'&amp;sca='.$sca.'&amp;page='.$page.'&amp;save_stx='.$stx;
$listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목록</a>';
?>
<div class="local_ov01 local_ov">
<?php echo $listall; ?>
<span class="btn_ov01"><span class="ov_txt">전체 상품</span><span class="ov_num"> <?php echo $total_count; ?>개</span></span>
</div>
<form name="flist" class="local_sch01 local_sch">
<input type="hidden" name="doc" value="<?php echo $doc; ?>">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<label for="sca" class="sound_only">분류선택</label>
<select name="sca" id="sca">
<option value="">전체분류</option>
<?php
$sql1 = " select ca_id, ca_name from {$g5['g5_shop_category_table']} order by ca_order, ca_id ";
$result1 = sql_query($sql1);
for ($i=0; $row1=sql_fetch_array($result1); $i++) {
$len = strlen($row1['ca_id']) / 2 - 1;
$nbsp = "";
for ($i=0; $i<$len; $i++) $nbsp .= "&nbsp;&nbsp;&nbsp;";
echo '<option value="'.$row1['ca_id'].'" '.get_selected($sca, $row1['ca_id']).'>'.$nbsp.$row1['ca_name'].PHP_EOL;
}
?>
</select>
<label for="sfl" class="sound_only">검색대상</label>
<select name="sfl" id="sfl">
<option value="it_name" <?php echo get_selected($sfl, 'it_name'); ?>>상품명</option>
<option value="it_id" <?php echo get_selected($sfl, 'it_id'); ?>>상품코드</option>
</select>
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
<input type="text" name="stx" value="<?php echo $stx; ?>" id="stx" required class="frm_input required">
<input type="submit" value="검색" class="btn_submit">
</form>
<form name="fitemtypelist" method="post" action="./itemtypelistupdate.php">
<input type="hidden" name="sca" value="<?php echo $sca; ?>">
<input type="hidden" name="sst" value="<?php echo $sst; ?>">
<input type="hidden" name="sod" value="<?php echo $sod; ?>">
<input type="hidden" name="sfl" value="<?php echo $sfl; ?>">
<input type="hidden" name="stx" value="<?php echo $stx; ?>">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<div class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?> 목록</caption>
<thead>
<tr>
<th scope="col"><?php echo subject_sort_link("it_id", $qstr, 1); ?>상품코드</a></th>
<th scope="col"><?php echo subject_sort_link("it_name"); ?>상품명</a></th>
<th scope="col"><?php echo subject_sort_link("it_type1", $qstr, 1); ?>히트<br>상품</a></th>
<th scope="col"><?php echo subject_sort_link("it_type2", $qstr, 1); ?>추천<br>상품</a></th>
<th scope="col"><?php echo subject_sort_link("it_type3", $qstr, 1); ?>신규<br>상품</a></th>
<th scope="col"><?php echo subject_sort_link("it_type4", $qstr, 1); ?>인기<br>상품</a></th>
<th scope="col"><?php echo subject_sort_link("it_type5", $qstr, 1); ?>할인<br>상품</a></th>
<th scope="col">관리</th>
</tr>
</thead>
<tbody>
<?php for ($i=0; $row=sql_fetch_array($result); $i++) {
$href = shop_item_url($row['it_id']);
$bg = 'bg'.($i%2);
?>
<tr class="<?php echo $bg; ?>">
<td class="td_code">
<input type="hidden" name="it_id[<?php echo $i; ?>]" value="<?php echo $row['it_id']; ?>">
<?php echo $row['it_id']; ?>
</td>
<td class="td_left"><a href="<?php echo $href; ?>"><?php echo get_it_image($row['it_id'], 50, 50); ?><?php echo cut_str(stripslashes($row['it_name']), 60, "&#133"); ?></a></td>
<td class="td_chk2">
<label for="type1_<?php echo $i; ?>" class="sound_only">히트상품</label>
<input type="checkbox" name="it_type1[<?php echo $i; ?>]" value="1" id="type1_<?php echo $i; ?>" <?php echo ($row['it_type1'] ? 'checked' : ''); ?>>
</td>
<td class="td_chk2">
<label for="type2_<?php echo $i; ?>" class="sound_only">추천상품</label>
<input type="checkbox" name="it_type2[<?php echo $i; ?>]" value="1" id="type2_<?php echo $i; ?>" <?php echo ($row['it_type2'] ? 'checked' : ''); ?>>
</td>
<td class="td_chk2">
<label for="type3_<?php echo $i; ?>" class="sound_only">신규상품</label>
<input type="checkbox" name="it_type3[<?php echo $i; ?>]" value="1" id="type3_<?php echo $i; ?>" <?php echo ($row['it_type3'] ? 'checked' : ''); ?>>
</td>
<td class="td_chk2">
<label for="type4_<?php echo $i; ?>" class="sound_only">인기상품</label>
<input type="checkbox" name="it_type4[<?php echo $i; ?>]" value="1" id="type4_<?php echo $i; ?>" <?php echo ($row['it_type4'] ? 'checked' : ''); ?>>
</td>
<td class="td_chk2">
<label for="type5_<?php echo $i; ?>" class="sound_only">할인상품</label>
<input type="checkbox" name="it_type5[<?php echo $i; ?>]" value="1" id="type5_<?php echo $i; ?>" <?php echo ($row['it_type5'] ? 'checked' : ''); ?>>
</td>
<td class="td_mng td_mng_s">
<a href="./itemform.php?w=u&amp;it_id=<?php echo $row['it_id']; ?>&amp;ca_id=<?php echo $row['ca_id']; ?>&amp;<?php echo $qstr; ?>" class="btn btn_03"><span class="sound_only"><?php echo cut_str(stripslashes($row['it_name']), 60, "&#133"); ?> </span>수정</a>
</td>
</tr>
<?php
}
if (!$i)
echo '<tr><td colspan="8" class="empty_table"><span>자료가 없습니다.</span></td></tr>';
?>
</tbody>
</table>
</div>
<div class="btn_confirm03 btn_confirm">
<input type="submit" value="일괄수정" class="btn_submit">
</div>
</form>
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['SCRIPT_NAME']}?$qstr&amp;page="); ?>
<?php
include_once (G5_ADMIN_PATH.'/admin.tail.php');
-33
View File
@@ -1,33 +0,0 @@
<?php
$sub_menu = '400610';
include_once('./_common.php');
check_demo();
auth_check_menu($auth, $sub_menu, "w");
check_admin_token();
$count_post_it_id = (isset($_POST['it_id']) && is_array($_POST['it_id'])) ? count($_POST['it_id']) : 0;
for ($i=0; $i<$count_post_it_id; $i++)
{
$it_type1 = isset($_POST['it_type1'][$i]) ? (int) $_POST['it_type1'][$i] : 0;
$it_type2 = isset($_POST['it_type2'][$i]) ? (int) $_POST['it_type2'][$i] : 0;
$it_type3 = isset($_POST['it_type3'][$i]) ? (int) $_POST['it_type3'][$i] : 0;
$it_type4 = isset($_POST['it_type4'][$i]) ? (int) $_POST['it_type4'][$i] : 0;
$it_type5 = isset($_POST['it_type5'][$i]) ? (int) $_POST['it_type5'][$i] : 0;
$it_id = isset($_POST['it_id'][$i]) ? safe_replace_regex($_POST['it_id'][$i], 'it_id') : '';
$sql = "update {$g5['g5_shop_item_table']}
set it_type1 = '".$it_type1."',
it_type2 = '".$it_type2."',
it_type3 = '".$it_type3."',
it_type4 = '".$it_type4."',
it_type5 = '".$it_type5."'
where it_id = '".$it_id."' ";
sql_query($sql);
}
goto_url("itemtypelist.php?sca=$sca&amp;sst=$sst&amp;sod=$sod&amp;sfl=$sfl&amp;stx=$stx&amp;page=$page");
-120
View File
@@ -1,120 +0,0 @@
<?php
$sub_menu = '400650';
include_once('./_common.php');
include_once(G5_EDITOR_LIB);
$is_id = isset($_GET['is_id']) ? preg_replace('/[^0-9]/', '', $_GET['is_id']) : 0;
auth_check_menu($auth, $sub_menu, "w");
$sql = " select *
from {$g5['g5_shop_item_use_table']} a
left join {$g5['member_table']} b on (a.mb_id = b.mb_id)
left join {$g5['g5_shop_item_table']} c on (a.it_id = c.it_id)
where is_id = '$is_id' ";
$is = sql_fetch($sql);
if (!$is['is_id'])
alert('등록된 자료가 없습니다.');
// 사용후기 의 답변 필드 추가
if (!isset($is['is_reply_subject'])) {
sql_query(" ALTER TABLE `{$g5['g5_shop_item_use_table']}`
ADD COLUMN `is_reply_subject` VARCHAR(255) NOT NULL DEFAULT '' AFTER `is_confirm`,
ADD COLUMN `is_reply_content` TEXT NOT NULL AFTER `is_reply_subject`,
ADD COLUMN `is_reply_name` VARCHAR(25) NOT NULL DEFAULT '' AFTER `is_reply_content`
", true);
}
$name = get_sideview($is['mb_id'], get_text($is['is_name']), $is['mb_email'], $is['mb_homepage']);
// 확인
$is_confirm_yes = $is['is_confirm'] ? 'checked="checked"' : '';
$is_confirm_no = !$is['is_confirm'] ? 'checked="checked"' : '';
$g5['title'] = '사용후기';
include_once (G5_ADMIN_PATH.'/admin.head.php');
$qstr .= ($qstr ? '&amp;' : '').'sca='.$sca;
?>
<form name="fitemuseform" method="post" action="./itemuseformupdate.php" onsubmit="return fitemuseform_submit(this);">
<input type="hidden" name="w" value="<?php echo $w; ?>">
<input type="hidden" name="is_id" value="<?php echo $is_id; ?>">
<input type="hidden" name="it_id" value="<?php echo $is['it_id']; ?>">
<input type="hidden" name="sca" value="<?php echo $sca; ?>">
<input type="hidden" name="sst" value="<?php echo $sst; ?>">
<input type="hidden" name="sod" value="<?php echo $sod; ?>">
<input type="hidden" name="sfl" value="<?php echo $sfl; ?>">
<input type="hidden" name="stx" value="<?php echo $stx; ?>">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<div class="tbl_frm01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?> 수정</caption>
<colgroup>
<col class="grid_4">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row">상품명</th>
<td><a href="<?php echo shop_item_url($is['it_id']); ?>"><?php echo $is['it_name']; ?></a></td>
</tr>
<tr>
<th scope="row">이름</th>
<td><?php echo $name; ?></td>
</tr>
<tr>
<th scope="row">평점</th>
<td><img src="<?php echo G5_URL; ?>/shop/img/s_star<?php echo $is['is_score']; ?>.png" width="100"> (<?php echo $is['is_score']; ?>점)</td>
</tr>
<tr>
<th scope="row"><label for="is_subject">제목</label></th>
<td><input type="text" name="is_subject" required class="required frm_input" id="is_subject" size="100"
value="<?php echo get_text($is['is_subject']); ?>"></td>
</tr>
<tr>
<th scope="row">내용</th>
<td><?php echo editor_html('is_content', get_text(html_purifier($is['is_content']), 0)); ?></td>
</tr>
<tr>
<th scope="row"><label for="is_reply_subject">답변 제목</label></th>
<td><input type="text" name="is_reply_subject" class="frm_input" id="is_reply_subject" size="100"
value="<?php echo get_text($is['is_reply_subject']); ?>"></td>
</tr>
<tr>
<th scope="row">답변 내용</th>
<td><?php echo editor_html('is_reply_content', get_text(html_purifier($is['is_reply_content']), 0)); ?></td>
</tr>
<tr>
<th scope="row">확인</th>
<td>
<input type="radio" name="is_confirm" value="1" id="is_confirm_yes" <?php echo $is_confirm_yes; ?>>
<label for="is_confirm_yes">예</label>
<input type="radio" name="is_confirm" value="0" id="is_confirm_no" <?php echo $is_confirm_no; ?>>
<label for="is_confirm_no">아니오</label>
</td>
</tr>
</tbody>
</table>
</div>
<div class="btn_fixed_top">
<a href="./itemuselist.php?<?php echo $qstr; ?>" class="btn_02 btn">목록</a>
<input type="submit" value="확인" class="btn_submit btn" accesskey="s">
</div>
</form>
<script>
function fitemuseform_submit(f)
{
<?php echo get_editor_js('is_content'); ?>
<?php echo get_editor_js('is_reply_content'); ?>
return true;
}
</script>
<?php
include_once (G5_ADMIN_PATH.'/admin.tail.php');
-48
View File
@@ -1,48 +0,0 @@
<?php
$sub_menu = '400650';
include_once('./_common.php');
check_demo();
if ($w == 'd')
auth_check_menu($auth, $sub_menu, "d");
else
auth_check_menu($auth, $sub_menu, "w");
check_admin_token();
$posts = array();
$check_keys = array('is_subject', 'is_content', 'is_confirm', 'is_reply_subject', 'is_reply_content', 'is_id');
foreach($check_keys as $key){
if( in_array($key, array('is_content', 'is_reply_content')) ){
$posts[$key] = isset($_POST[$key]) ? $_POST[$key] : '';
} else {
$posts[$key] = isset($_POST[$key]) ? clean_xss_tags($_POST[$key], 1, 1) : '';
}
}
if ($w == "u")
{
$sql = "update {$g5['g5_shop_item_use_table']}
set is_subject = '".$posts['is_subject']."',
is_content = '".$posts['is_content']."',
is_confirm = '".$posts['is_confirm']."',
is_reply_subject = '".$posts['is_reply_subject']."',
is_reply_content = '".$posts['is_reply_content']."',
is_reply_name = '".$member['mb_nick']."'
where is_id = '".$posts['is_id']."'";
sql_query($sql);
if( isset($_POST['it_id']) ) {
update_use_cnt($_POST['it_id']);
update_use_avg($_POST['it_id']);
}
goto_url("./itemuseform.php?w=$w&amp;is_id=$is_id&amp;sca=$sca&amp;$qstr");
}
else
{
alert();
}
-218
View File
@@ -1,218 +0,0 @@
<?php
$sub_menu = '400650';
include_once('./_common.php');
auth_check_menu($auth, $sub_menu, "r");
$g5['title'] = '사용후기';
include_once (G5_ADMIN_PATH.'/admin.head.php');
$where = " where ";
$sql_search = "";
$save_stx = isset($_REQUEST['save_stx']) ? clean_xss_tags($_REQUEST['save_stx'], 1, 1) : '';
if ($stx != "") {
if ($sfl != "") {
$sql_search .= " $where $sfl like '%$stx%' ";
$where = " and ";
}
if ($save_stx != $stx)
$page = 1;
}
if ($sca != "") {
$sql_search .= " and ca_id like '$sca%' ";
}
if ($sfl == "") $sfl = "a.it_name";
if (!$sst) {
$sst = "is_id";
$sod = "desc";
}
$sql_common = " from {$g5['g5_shop_item_use_table']} a
left join {$g5['g5_shop_item_table']} b on (a.it_id = b.it_id)
left join {$g5['member_table']} c on (a.mb_id = c.mb_id) ";
$sql_common .= $sql_search;
// 테이블의 전체 레코드수만 얻음
$sql = " select count(*) as cnt " . $sql_common;
$row = sql_fetch($sql);
$total_count = $row['cnt'];
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select *
$sql_common
order by $sst $sod, is_id desc
limit $from_record, $rows ";
$result = sql_query($sql);
//$qstr = 'page='.$page.'&amp;sst='.$sst.'&amp;sod='.$sod.'&amp;stx='.$stx;
$qstr .= ($qstr ? '&amp;' : '').'sca='.$sca.'&amp;save_stx='.$stx;
$listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목록</a>';
?>
<div class="local_ov01 local_ov">
<?php echo $listall; ?>
<span class="btn_ov01"><span class="ov_txt"> 전체 후기내역</span><span class="ov_num"> <?php echo $total_count; ?>건</span></span>
</div>
<form name="flist" class="local_sch01 local_sch">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<input type="hidden" name="save_stx" value="<?php echo $stx; ?>">
<label for="sca" class="sound_only">분류선택</label>
<select name="sca" id="sca">
<option value=''>전체분류</option>
<?php
$sql1 = " select ca_id, ca_name from {$g5['g5_shop_category_table']} order by ca_order, ca_id ";
$result1 = sql_query($sql1);
for ($i=0; $row1=sql_fetch_array($result1); $i++) {
$len = strlen($row1['ca_id']) / 2 - 1;
$nbsp = "";
for ($i=0; $i<$len; $i++) $nbsp .= "&nbsp;&nbsp;&nbsp;";
$selected = ($row1['ca_id'] == $sca) ? ' selected="selected"' : '';
echo '<option value="'.$row1['ca_id'].'"'.$selected.'>'.$nbsp.$row1['ca_name'].'</option>'.PHP_EOL;
}
?>
</select>
<label for="sfl" class="sound_only">검색대상</label>
<select name="sfl" id="sfl">
<option value="it_name" <?php echo get_selected($sfl, 'it_name'); ?>>상품명</option>
<option value="a.it_id" <?php echo get_selected($sfl, 'a.it_id'); ?>>상품코드</option>
<option value="is_name" <?php echo get_selected($sfl, 'is_name'); ?>>이름</option>
</select>
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
<input type="text" name="stx" id="stx" value="<?php echo $stx; ?>" required class="frm_input required">
<input type="submit" value="검색" class="btn_submit">
</form>
<form name="fitemuselist" method="post" action="./itemuselistupdate.php" onsubmit="return fitemuselist_submit(this);" autocomplete="off">
<input type="hidden" name="sca" value="<?php echo $sca; ?>">
<input type="hidden" name="sst" value="<?php echo $sst; ?>">
<input type="hidden" name="sod" value="<?php echo $sod; ?>">
<input type="hidden" name="sfl" value="<?php echo $sfl; ?>">
<input type="hidden" name="stx" value="<?php echo $stx; ?>">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<div class="tbl_head01 tbl_wrap" id="itemuselist">
<table>
<caption><?php echo $g5['title']; ?> 목록</caption>
<thead>
<tr>
<th scope="col">
<label for="chkall" class="sound_only">사용후기 전체</label>
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
</th>
<th scope="col"><?php echo subject_sort_link("it_name"); ?>상품명</a></th>
<th scope="col"><?php echo subject_sort_link("mb_name"); ?>이름</a></th>
<th scope="col"><?php echo subject_sort_link("is_subject"); ?>제목</a></th>
<th scope="col"><?php echo subject_sort_link("is_score"); ?>평점</a></th>
<th scope="col"><?php echo subject_sort_link("is_confirm"); ?>확인</a></th>
<th scope="col">관리</th>
</tr>
</thead>
<tbody>
<?php
for ($i=0; $row=sql_fetch_array($result); $i++) {
$href = shop_item_url($row['it_id']);
$name = get_sideview($row['mb_id'], get_text($row['is_name']), $row['mb_email'], $row['mb_homepage']);
$is_content = get_view_thumbnail(conv_content($row['is_content'], 1), 300);
$bg = 'bg'.($i%2);
?>
<tr class="<?php echo $bg; ?>">
<td class="td_chk">
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo get_text($row['is_subject']) ?> 사용후기</label>
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i; ?>">
<input type="hidden" name="is_id[<?php echo $i; ?>]" value="<?php echo $row['is_id']; ?>">
<input type="hidden" name="it_id[<?php echo $i; ?>]" value="<?php echo $row['it_id']; ?>">
</td>
<td class="td_left"><a href="<?php echo $href; ?>"><?php echo get_it_image($row['it_id'], 50, 50); ?><?php echo cut_str($row['it_name'],30); ?></a></td>
<td class="td_name"><?php echo $name; ?></td>
<td class="sit_use_subject td_left">
<a href="#" class="use_href" onclick="return false;" target="<?php echo $i; ?>"><?php echo get_text($row['is_subject']); ?><span class="tit_op">열기</span></a>
<div id="use_div<?php echo $i; ?>" class="use_div" style="display:none;">
<?php echo $is_content; ?>
</div>
</td>
<td class="td_select">
<label for="score_<?php echo $i; ?>" class="sound_only">평점</label>
<select name="is_score[<?php echo $i; ?>]" id="score_<?php echo $i; ?>">
<option value="5" <?php echo get_selected($row['is_score'], "5"); ?>>매우만족</option>
<option value="4" <?php echo get_selected($row['is_score'], "4"); ?>>만족</option>
<option value="3" <?php echo get_selected($row['is_score'], "3"); ?>>보통</option>
<option value="2" <?php echo get_selected($row['is_score'], "2"); ?>>불만</option>
<option value="1" <?php echo get_selected($row['is_score'], "1"); ?>>매우불만</option>
</select>
</td>
<td class="td_chk2">
<label for="confirm_<?php echo $i; ?>" class="sound_only">확인</label>
<input type="checkbox" name="is_confirm[<?php echo $i; ?>]" <?php echo ($row['is_confirm'] ? 'checked' : ''); ?> value="1" id="confirm_<?php echo $i; ?>">
</td>
<td class="td_mng td_mng_s">
<a href="./itemuseform.php?w=u&amp;is_id=<?php echo $row['is_id']; ?>&amp;<?php echo $qstr; ?>" class="btn btn_03"><span class="sound_only"><?php echo get_text($row['is_subject']); ?> </span>수정</a>
</td>
</tr>
<?php
}
if ($i == 0) {
echo '<tr><td colspan="7" class="empty_table">자료가 없습니다.</td></tr>';
}
?>
</tbody>
</table>
</div>
<div class="btn_fixed_top">
<input type="submit" name="act_button" value="선택수정" onclick="document.pressed=this.value" class="btn btn_02">
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value" class="btn btn_02">
</div>
</form>
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['SCRIPT_NAME']}?$qstr&amp;page="); ?>
<script>
function fitemuselist_submit(f)
{
if (!is_checked("chk[]")) {
alert(document.pressed+" 하실 항목을 하나 이상 선택하세요.");
return false;
}
if(document.pressed == "선택삭제") {
if(!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
return false;
}
}
return true;
}
$(function(){
$(".use_href").click(function(){
var $content = $("#use_div"+$(this).attr("target"));
$(".use_div").each(function(index, value){
if ($(this).get(0) == $content.get(0)) { // 객체의 비교시 .get(0) 를 사용한다.
$(this).is(":hidden") ? $(this).show() : $(this).hide();
} else {
$(this).hide();
}
});
});
});
</script>
<?php
include_once (G5_ADMIN_PATH.'/admin.tail.php');
-51
View File
@@ -1,51 +0,0 @@
<?php
$sub_menu = '400650';
include_once('./_common.php');
check_demo();
check_admin_token();
$count_post_chk = (isset($_POST['chk']) && is_array($_POST['chk'])) ? count($_POST['chk']) : 0;
if (! $count_post_chk) {
alert($_POST['act_button']." 하실 항목을 하나 이상 체크하세요.");
}
if ($_POST['act_button'] === "선택수정") {
auth_check_menu($auth, $sub_menu, 'w');
} else if ($_POST['act_button'] === "선택삭제") {
auth_check_menu($auth, $sub_menu, 'd');
} else {
alert("선택수정이나 선택삭제 작업이 아닙니다.");
}
for ($i=0; $i<$count_post_chk; $i++)
{
$k = isset($_POST['chk'][$i]) ? (int) $_POST['chk'][$i] : 0; // 실제 번호를 넘김
$iit_id = isset($_POST['it_id'][$k]) ? preg_replace('/[^a-z0-9_\-]/i', '', $_POST['it_id'][$k]) : '';
$iis_id = isset($_POST['is_id'][$k]) ? (int) $_POST['is_id'][$k] : 0;
$iis_score = isset($_POST['is_score'][$k]) ? (int) $_POST['is_score'][$k] : 0;
$iis_confirm = isset($_POST['is_confirm'][$k]) ? (int) $_POST['is_confirm'][$k] : 0;
if ($_POST['act_button'] == "선택수정")
{
$sql = "update {$g5['g5_shop_item_use_table']}
set is_score = '{$iis_score}',
is_confirm = '{$iis_confirm}'
where is_id = '{$iis_id}' ";
sql_query($sql);
}
else if ($_POST['act_button'] == "선택삭제")
{
$sql = "delete from {$g5['g5_shop_item_use_table']} where is_id = '{$iis_id}' ";
sql_query($sql);
}
if($iit_id){
update_use_cnt($iit_id);
update_use_avg($iit_id);
}
}
goto_url("./itemuselist.php?sca=$sca&amp;sst=$sst&amp;sod=$sod&amp;sfl=$sfl&amp;stx=$stx&amp;page=$page");
-231
View File
@@ -1,231 +0,0 @@
<?php
$sub_menu = '400500';
include_once('./_common.php');
auth_check_menu($auth, $sub_menu, "r");
$doc = isset($_GET['doc']) ? clean_xss_tags($_GET['doc'], 1, 1) : '';
$sort1 = (isset($_GET['sort1']) && in_array($_GET['sort1'], array('b.it_name', 'a.io_stock_qty', 'a.io_use'))) ? $_GET['sort1'] : '';
$sort2 = (isset($_GET['sort2']) && in_array($_GET['sort2'], array('desc', 'asc'))) ? $_GET['sort2'] : 'asc';
$sel_ca_id = isset($_GET['sel_ca_id']) ? get_search_string($_GET['sel_ca_id']) : '';
$sel_field = (isset($_GET['sel_field']) && in_array($_GET['sel_field'], array('b.it_name', 'a.it_id')) ) ? $_GET['sel_field'] : '';
$search = isset($_GET['search']) ? get_search_string($_GET['search']) : '';
$g5['title'] = '상품옵션재고관리';
include_once (G5_ADMIN_PATH.'/admin.head.php');
$sql_search = " where b.it_id is not NULL ";
if ($search != "") {
if ($sel_field != "") {
$sql_search .= " and $sel_field like '%$search%' ";
}
}
if ($sel_ca_id != "") {
$sql_search .= " and b.ca_id like '$sel_ca_id%' ";
}
if ($sel_field == "") $sel_field = "b.it_name";
if ($sort1 == "") $sort1 = "a.io_stock_qty";
if (!in_array($sort1, array('b.it_name', 'a.io_stock_qty', 'a.io_use'))) $sort1 = "a.io_stock_qty";
if ($sort2 == "") $sort2 = "asc";
$sql_common = " from {$g5['g5_shop_item_option_table']} a left join {$g5['g5_shop_item_table']} b on ( a.it_id = b.it_id ) ";
$sql_common .= $sql_search;
// 테이블의 전체 레코드수만 얻음
$sql = " select count(*) as cnt " . $sql_common;
$row = sql_fetch($sql);
$total_count = $row['cnt'];
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select a.it_id,
a.io_id,
a.io_type,
a.io_stock_qty,
a.io_noti_qty,
a.io_use,
b.it_name,
b.it_option_subject,
b.ca_id
$sql_common
order by $sort1 $sort2
limit $from_record, $rows ";
$result = sql_query($sql);
$qstr1 = 'sel_ca_id='.$sel_ca_id.'&amp;sel_field='.$sel_field.'&amp;search='.$search;
$qstr = $qstr1.'&amp;sort1='.$sort1.'&amp;sort2='.$sort2.'&amp;page='.$page;
$listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목록</a>';
?>
<div class="local_ov01 local_ov">
<?php echo $listall; ?>
<span class="btn_ov01"><span class="ov_txt">전체 옵션</span><span class="ov_num"> <?php echo $total_count; ?>개</span></span>
</div>
<form name="flist" class="local_sch01 local_sch">
<input type="hidden" name="doc" value="<?php echo $doc; ?>">
<input type="hidden" name="sort1" value="<?php echo $sort1; ?>">
<input type="hidden" name="sort2" value="<?php echo $sort2; ?>">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<label for="sel_ca_id" class="sound_only">분류선택</label>
<select name="sel_ca_id" id="sel_ca_id">
<option value=''>전체분류</option>
<?php
$sql1 = " select ca_id, ca_name from {$g5['g5_shop_category_table']} order by ca_order, ca_id ";
$result1 = sql_query($sql1);
for ($i=0; $row1=sql_fetch_array($result1); $i++) {
$len = strlen($row1['ca_id']) / 2 - 1;
$nbsp = "";
for ($i=0; $i<$len; $i++) $nbsp .= "&nbsp;&nbsp;&nbsp;";
echo '<option value="'.$row1['ca_id'].'" '.get_selected($sel_ca_id, $row1['ca_id']).'>'.$nbsp.$row1['ca_name'].'</option>'.PHP_EOL;
}
?>
</select>
<label for="sel_field" class="sound_only">검색대상</label>
<select name="sel_field" id="sel_field">
<option value="b.it_name" <?php echo get_selected($sel_field, 'b.it_name'); ?>>상품명</option>
<option value="a.it_id" <?php echo get_selected($sel_field, 'a.it_id'); ?>>상품코드</option>
</select>
<label for="search" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
<input type="text" name="search" id="search" value="<?php echo $search; ?>" required class="frm_input required">
<input type="submit" value="검색" class="btn_submit">
</form>
<form name="fitemstocklist" action="./optionstocklistupdate.php" method="post">
<input type="hidden" name="sort1" value="<?php echo $sort1; ?>">
<input type="hidden" name="sort2" value="<?php echo $sort2; ?>">
<input type="hidden" name="sel_ca_id" value="<?php echo $sel_ca_id; ?>">
<input type="hidden" name="sel_field" value="<?php echo $sel_field; ?>">
<input type="hidden" name="search" value="<?php echo $search; ?>">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<div class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?> 목록</caption>
<thead>
<tr>
<th scope="col"><a href="<?php echo title_sort("b.it_name") . "&amp;$qstr1"; ?>">상품명</a></th>
<th scope="col">옵션항목</th>
<th scope="col">옵션타입</th>
<th scope="col"><a href="<?php echo title_sort("a.io_stock_qty") . "&amp;$qstr1"; ?>">창고재고</a></th>
<th scope="col">주문대기</th>
<th scope="col">가재고</th>
<th scope="col">재고수정</th>
<th scope="col">통보수량</th>
<th scope="col"><a href="<?php echo title_sort("a.io_use") . "&amp;$qstr1"; ?>">판매</a></th>
<th scope="col">관리</th>
</tr>
</thead>
<tbody>
<?php
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$href = shop_item_url($row['it_id']);
$sql1 = " select SUM(ct_qty) as sum_qty
from {$g5['g5_shop_cart_table']}
where it_id = '{$row['it_id']}'
and io_id = '{$row['io_id']}'
and ct_stock_use = '0'
and ct_status in ('쇼핑', '주문', '입금', '준비') ";
$row1 = sql_fetch($sql1);
$wait_qty = $row1['sum_qty'];
// 가재고 (미래재고)
$temporary_qty = $row['io_stock_qty'] - $wait_qty;
$option = '';
$option_br = '';
if($row['io_type']) {
$opt = explode(chr(30), $row['io_id']);
if($opt[0] && $opt[1])
$option .= $opt[0].' : '.$opt[1];
} else {
$subj = explode(',', $row['it_option_subject']);
$opt = explode(chr(30), $row['io_id']);
for($k=0; $k<count($subj); $k++) {
if($subj[$k] && $opt[$k]) {
$option .= $option_br.$subj[$k].' : '.$opt[$k];
$option_br = '<br>';
}
}
}
$type = '선택옵션';
if($row['io_type'])
$type = '추가옵션';
// 통보수량보다 재고수량이 작을 때
$io_stock_qty = number_format($row['io_stock_qty']);
$io_stock_qty_st = ''; // 스타일 정의
if($row['io_stock_qty'] <= $row['io_noti_qty']) {
$io_stock_qty_st = ' sit_stock_qty_alert';
$io_stock_qty = ''.$io_stock_qty.' !<span class="sound_only"> 재고부족 </span>';
}
$bg = 'bg'.($i%2);
?>
<tr class="<?php echo $bg; ?>">
<td class="td_left">
<input type="hidden" name="it_id[<?php echo $i; ?>]" value="<?php echo $row['it_id']; ?>">
<input type="hidden" name="io_id[<?php echo $i; ?>]" value="<?php echo $row['io_id']; ?>">
<input type="hidden" name="io_type[<?php echo $i; ?>]" value="<?php echo $row['io_type']; ?>">
<a href="<?php echo $href; ?>"><?php echo get_it_image($row['it_id'], 50, 50); ?> <?php echo cut_str(stripslashes($row['it_name']), 60, "&#133"); ?></a>
</td>
<td class="td_left"><?php echo $option; ?></td>
<td class="td_mng"><?php echo $type; ?></td>
<td class="td_num<?php echo $io_stock_qty_st; ?>"><?php echo $io_stock_qty; ?></td>
<td class="td_num"><?php echo number_format($wait_qty); ?></td>
<td class="td_num"><?php echo number_format($temporary_qty); ?></td>
<td class="td_num">
<label for="stock_qty_<?php echo $i; ?>" class="sound_only">재고수정</label>
<input type="text" name="io_stock_qty[<?php echo $i; ?>]" value="<?php echo $row['io_stock_qty']; ?>" id="stock_qty_<?php echo $i; ?>" class="frm_input" size="8" autocomplete="off">
</td>
<td class="td_num">
<label for="noti_qty_<?php echo $i; ?>" class="sound_only">통보수량</label>
<input type="text" name="io_noti_qty[<?php echo $i; ?>]" value="<?php echo $row['io_noti_qty']; ?>" id="noti_qty_<?php echo $i; ?>" class="frm_input" size="8" autocomplete="off">
</td>
<td class="td_chk2">
<label for="use_<?php echo $i; ?>" class="sound_only">판매</label>
<input type="checkbox" name="io_use[<?php echo $i; ?>]" value="1" id="use_<?php echo $i; ?>" <?php echo ($row['io_use'] ? "checked" : ""); ?>>
</td>
<td class="td_mng td_mng_s"><a href="./itemform.php?w=u&amp;it_id=<?php echo $row['it_id']; ?>&amp;ca_id=<?php echo $row['ca_id']; ?>&amp;<?php echo $qstr; ?>" class="btn btn_03">수정</a></td>
</tr>
<?php
}
if (!$i)
echo '<tr><td colspan="10" class="empty_table"><span>자료가 없습니다.</span></td></tr>';
?>
</tbody>
</table>
</div>
<div class="btn_fixed_top">
<a href="./itemstocklist.php" class="btn btn_02">상품재고관리</a>
<a href="./itemsellrank.php" class="btn btn_02">상품판매순위</a>
<input type="submit" value="일괄수정" class="btn_submit btn">
</div>
</form>
<div class="local_desc01 local_desc">
<p>
재고수정의 수치를 수정하시면 창고재고의 수치가 변경됩니다.<br>
창고재고가 부족한 경우 재고수량 뒤에 <span class="sit_stock_qty_alert">!</span><span class="sound_only"> 혹은 재고부족</span>으로 표시됩니다.
</p>
</div>
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['SCRIPT_NAME']}?$qstr&amp;page="); ?>
<?php
include_once (G5_ADMIN_PATH.'/admin.tail.php');
-39
View File
@@ -1,39 +0,0 @@
<?php
$sub_menu = '400500';
include_once('./_common.php');
check_demo();
auth_check_menu($auth, $sub_menu, "w");
check_admin_token();
$count_post_it_id = (isset($_POST['it_id']) && is_array($_POST['it_id'])) ? count($_POST['it_id']) : 0;
$search = isset($_REQUEST['search']) ? get_search_string($_REQUEST['search']) : '';
$sort1 = isset($_REQUEST['sort1']) ? clean_xss_tags($_REQUEST['sort1'], 1, 1) : '';
$sort2 = isset($_REQUEST['sort2']) ? clean_xss_tags($_REQUEST['sort2'], 1, 1) : '';
$sel_field = isset($_REQUEST['sel_field']) ? clean_xss_tags($_REQUEST['sel_field'], 1, 1) : '';
$sel_ca_id = isset($_REQUEST['sel_ca_id']) ? clean_xss_tags($_REQUEST['sel_ca_id'], 1, 1) : '';
// 재고 일괄수정
for ($i=0; $i<$count_post_it_id; $i++)
{
$io_stock_qty = isset($_POST['io_stock_qty'][$i]) ? (int) $_POST['io_stock_qty'][$i] : 0;
$io_noti_qty = isset($_POST['io_noti_qty'][$i]) ? (int) $_POST['io_noti_qty'][$i] : 0;
$io_use = isset($_POST['io_use'][$i]) ? (int) $_POST['io_use'][$i] : 0;
$it_id = isset($_POST['it_id'][$i]) ? safe_replace_regex($_POST['it_id'][$i], 'it_id') : '';
$io_id = isset($_POST['io_id'][$i]) ? preg_replace(G5_OPTION_ID_FILTER, '', $_POST['io_id'][$i]) : '';
$io_type = isset($_POST['io_type'][$i]) ? (int) $_POST['io_type'][$i] : 0;
$sql = "update {$g5['g5_shop_item_option_table']}
set io_stock_qty = '".$io_stock_qty."',
io_noti_qty = '".$io_noti_qty."',
io_use = '".$io_use."'
where it_id = '".$it_id."'
and io_id = '".sql_real_escape_string($io_id)."'
and io_type = '".$io_type."' ";
sql_query($sql);
}
goto_url("./optionstocklist.php?sort1=$sort1&amp;sort2=$sort2&amp;sel_ca_id=$sel_ca_id&amp;sel_field=$sel_field&amp;search=$search&amp;page=$page");
-54
View File
@@ -1,54 +0,0 @@
<?php
$sub_menu = '400400';
include_once('./_common.php');
auth_check_menu($auth, $sub_menu, "w");
$g5['title'] = '엑셀 배송일괄처리';
include_once(G5_PATH.'/head.sub.php');
?>
<div class="new_win">
<h1><?php echo $g5['title']; ?></h1>
<div class="local_desc01 local_desc">
<p>
엑셀파일을 이용하여 배송정보를 일괄등록할 수 있습니다.<br>
형식은 <strong>배송처리용 엑셀파일</strong>을 다운로드하여 배송 정보를 입력하시면 됩니다.<br>
수정 완료 후 엑셀파일을 업로드하시면 배송정보가 일괄등록됩니다.<br>
엑셀파일을 저장하실 때는 <strong>Excel 97 - 2003 통합문서 (*.xls)</strong> 로 저장하셔야 합니다.<br>
주문상태가 준비이고 미수금이 0인 주문에 한해 엑셀파일이 생성됩니다.
</p>
<p>
<a href="<?php echo G5_ADMIN_URL; ?>/shop_admin/orderdeliveryexcel.php">배송정보 일괄등록용 엑셀파일 다운로드</a>
</p>
</div>
<form name="forderdelivery" method="post" action="./orderdeliveryupdate.php" enctype="MULTIPART/FORM-DATA" autocomplete="off">
<div id="excelfile_upload">
<label for="excelfile">파일선택</label>
<input type="file" name="excelfile" id="excelfile">
</div>
<div id="excelfile_input">
<input type="checkbox" name="od_send_mail" value="1" id="od_send_mail" checked="checked">
<label for="od_send_mail">배송안내 메일</label>
<input type="checkbox" name="send_sms" value="1" id="od_send_sms" checked="checked">
<label for="od_send_sms">배송안내 SMS</label>
<input type="checkbox" name="send_escrow" value="1" id="od_send_escrow">
<label for="od_send_escrow">에스크로배송등록</label>
</div>
<div class="btn_confirm01 btn_confirm">
<input type="submit" value="배송정보 등록" class="btn_submit">
<button type="button" onclick="window.close();">닫기</button>
</div>
</form>
</div>
<?php
include_once(G5_PATH.'/tail.sub.php');
-104
View File
@@ -1,104 +0,0 @@
<?php
$sub_menu = '400400';
include_once('./_common.php');
auth_check_menu($auth, $sub_menu, "w");
// 주문정보
$sql = " select *
from {$g5['g5_shop_order_table']}
where od_misu = '0'
and od_status = '준비'
order by od_id desc ";
$result = sql_query($sql);
if(!@sql_num_rows($result))
alert_close('배송처리할 주문 내역이 없습니다.');
if(! function_exists('column_char')) {
function column_char($i) {
return chr( 65 + $i );
}
}
if (phpversion() >= '5.2.0') {
include_once(G5_LIB_PATH.'/PHPExcel.php');
$headers = array('주문번호', '주문자명', '주문자전화1', '주문자전화2', '배송자명', '배송지전화1', '배송지전화2', '배송지주소', '배송회사', '운송장번호');
$widths = array(18, 15, 15, 15, 15, 15, 15, 50, 20, 20);
$header_bgcolor = 'FFABCDEF';
$last_char = column_char(count($headers) - 1);
$rows = array();
for($i=1; $row=sql_fetch_array($result); $i++) {
$rows[] =
array(' '.$row['od_id'],
$row['od_name'],
' '.$row['od_tel'],
' '.$row['od_hp'],
$row['od_b_name'],
' '.$row['od_b_tel'],
' '.$row['od_b_hp'],
print_address($row['od_b_addr1'], $row['od_b_addr2'], $row['od_b_addr3'], $row['od_b_addr_jibeon']),
$row['od_delivery_company'],
$row['od_invoice']);
}
$data = array_merge(array($headers), $rows);
$excel = new PHPExcel();
$excel->setActiveSheetIndex(0)->getStyle( "A1:${last_char}1" )->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID)->getStartColor()->setARGB($header_bgcolor);
$excel->setActiveSheetIndex(0)->getStyle( "A:$last_char" )->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER)->setWrapText(true);
foreach($widths as $i => $w) $excel->setActiveSheetIndex(0)->getColumnDimension( column_char($i) )->setWidth($w);
$excel->getActiveSheet()->fromArray($data,NULL,'A1');
header("Content-Type: application/octet-stream");
header("Content-Disposition: attachment; filename=\"deliverylist-".date("ymd", time()).".xls\"");
header("Cache-Control: max-age=0");
$writer = PHPExcel_IOFactory::createWriter($excel, 'Excel5');
$writer->save('php://output');
} else {
/*================================================================================
php_writeexcel http://www.bettina-attack.de/jonny/view.php/projects/php_writeexcel/
=================================================================================*/
include_once(G5_LIB_PATH.'/Excel/php_writeexcel/class.writeexcel_workbook.inc.php');
include_once(G5_LIB_PATH.'/Excel/php_writeexcel/class.writeexcel_worksheet.inc.php');
$fname = tempnam(G5_DATA_PATH, "tmp-deliverylist.xls");
$workbook = new writeexcel_workbook($fname);
$worksheet = $workbook->addworksheet();
// Put Excel data
$data = array('주문번호', '주문자명', '주문자전화1', '주문자전화2', '배송자명', '배송지전화1', '배송지전화2', '배송지주소', '배송회사', '운송장번호');
$data = array_map('iconv_euckr', $data);
$col = 0;
foreach($data as $cell) {
$worksheet->write(0, $col++, $cell);
}
for($i=1; $row=sql_fetch_array($result); $i++) {
$row = array_map('iconv_euckr', $row);
$worksheet->write($i, 0, ' '.$row['od_id']);
$worksheet->write($i, 1, $row['od_name']);
$worksheet->write($i, 2, ' '.$row['od_tel']);
$worksheet->write($i, 3, ' '.$row['od_hp']);
$worksheet->write($i, 4, $row['od_b_name']);
$worksheet->write($i, 5, ' '.$row['od_b_tel']);
$worksheet->write($i, 6, ' '.$row['od_b_hp']);
$worksheet->write($i, 7, print_address($row['od_b_addr1'], $row['od_b_addr2'], $row['od_b_addr3'], $row['od_b_addr_jibeon']));
$worksheet->write($i, 8, $row['od_delivery_company']);
$worksheet->write($i, 9, $row['od_invoice']);
}
$workbook->close();
header("Content-Type: application/x-msexcel; name=\"deliverylist-".date("ymd", time()).".xls\"");
header("Content-Disposition: inline; filename=\"deliverylist-".date("ymd", time()).".xls\"");
$fh=fopen($fname, "rb");
fpassthru($fh);
unlink($fname);
}
-184
View File
@@ -1,184 +0,0 @@
<?php
$sub_menu = '400400';
include_once('./_common.php');
include_once('./admin.shop.lib.php');
include_once(G5_LIB_PATH.'/mailer.lib.php');
auth_check_menu($auth, $sub_menu, "w");
define("_ORDERMAIL_", true);
$sms_count = 0;
$sms_messages = array();
if(isset($_FILES['excelfile']['tmp_name']) && $_FILES['excelfile']['tmp_name']) {
$file = $_FILES['excelfile']['tmp_name'];
include_once(G5_LIB_PATH.'/PHPExcel/IOFactory.php');
$objPHPExcel = PHPExcel_IOFactory::load($file);
$sheet = $objPHPExcel->getSheet(0);
$num_rows = $sheet->getHighestRow();
$highestColumn = $sheet->getHighestColumn();
$fail_od_id = array();
$total_count = 0;
$fail_count = 0;
$succ_count = 0;
// $i 사용시 ordermail.inc.php의 $i 때문에 무한루프에 빠짐
for ($k = 2; $k <= $num_rows; $k++) {
$total_count++;
$rowData = $sheet->rangeToArray('A' . $k . ':' . $highestColumn . $k,
NULL,
TRUE,
FALSE);
$od_id = isset($rowData[0][0]) ? addslashes(trim($rowData[0][0])) : '';
$od_delivery_company = isset($rowData[0][8]) ? addslashes($rowData[0][8]) : '';
$od_invoice = isset($rowData[0][9]) ? addslashes($rowData[0][9]) : '';
if(!$od_id || !$od_delivery_company || !$od_invoice) {
$fail_count++;
$fail_od_id[] = $od_id;
continue;
}
// 주문정보
$od = sql_fetch(" select * from {$g5['g5_shop_order_table']} where od_id = '$od_id' ");
if (!$od) {
$fail_count++;
$fail_od_id[] = $od_id;
continue;
}
if($od['od_status'] != '준비') {
$fail_count++;
$fail_od_id[] = $od_id;
continue;
}
$delivery['invoice'] = $od_invoice;
$delivery['invoice_time'] = G5_TIME_YMDHIS;
$delivery['delivery_company'] = $od_delivery_company;
// 주문정보 업데이트
order_update_delivery($od_id, $od['mb_id'], '배송', $delivery);
change_status($od_id, '준비', '배송');
$succ_count++;
$send_sms = isset($_POST['send_sms']) ? clean_xss_tags($_POST['send_sms'], 1, 1) : '';
$od_send_mail = isset($_POST['od_send_mail']) ? clean_xss_tags($_POST['od_send_mail'], 1, 1) : '';
$send_escrow = isset($_POST['send_escrow']) ? clean_xss_tags($_POST['send_escrow'], 1, 1) : '';
// SMS
if($config['cf_sms_use'] == 'icode' && $send_sms && $default['de_sms_use5']) {
$sms_contents = conv_sms_contents($od_id, $default['de_sms_cont5']);
if($sms_contents) {
$receive_number = preg_replace("/[^0-9]/", "", $od['od_hp']); // 수신자번호
$send_number = preg_replace("/[^0-9]/", "", $default['de_admin_company_tel']); // 발신자번호
if($receive_number)
$sms_messages[] = array('recv' => $receive_number, 'send' => $send_number, 'cont' => $sms_contents);
}
}
// 메일
if($config['cf_email_use'] && $od_send_mail)
include './ordermail.inc.php';
// 에스크로 배송
if($send_escrow && $od['od_tno'] && $od['od_escrow']) {
$escrow_tno = $od['od_tno'];
$escrow_numb = $od_invoice;
$escrow_corp = $od_delivery_company;
include(G5_SHOP_PATH.'/'.$od['od_pg'].'/escrow.register.php');
}
}
}
// SMS
$sms_count = count($sms_messages);
if($sms_count > 0) {
if($config['cf_sms_type'] == 'LMS') {
include_once(G5_LIB_PATH.'/icode.lms.lib.php');
$port_setting = get_icode_port_type($config['cf_icode_id'], $config['cf_icode_pw']);
// SMS 모듈 클래스 생성
if($port_setting !== false) {
$SMS = new LMS;
$SMS->SMS_con($config['cf_icode_server_ip'], $config['cf_icode_id'], $config['cf_icode_pw'], $port_setting);
for($s=0; $s<$sms_count; $s++) {
$strDest = array();
$strDest[] = $sms_messages[$s]['recv'];
$strCallBack = $sms_messages[$s]['send'];
$strCaller = iconv_euckr(trim($default['de_admin_company_name']));
$strSubject = '';
$strURL = '';
$strData = iconv_euckr($sms_messages[$s]['cont']);
$strDate = '';
$nCount = count($strDest);
$res = $SMS->Add($strDest, $strCallBack, $strCaller, $strSubject, $strURL, $strData, $strDate, $nCount);
$SMS->Send();
$SMS->Init(); // 보관하고 있던 결과값을 지웁니다.
}
}
} else {
include_once(G5_LIB_PATH.'/icode.sms.lib.php');
$SMS = new SMS; // SMS 연결
$SMS->SMS_con($config['cf_icode_server_ip'], $config['cf_icode_id'], $config['cf_icode_pw'], $config['cf_icode_server_port']);
for($s=0; $s<$sms_count; $s++) {
$recv_number = $sms_messages[$s]['recv'];
$send_number = $sms_messages[$s]['send'];
$sms_content = iconv_euckr($sms_messages[$s]['cont']);
$SMS->Add($recv_number, $send_number, $config['cf_icode_id'], $sms_content, "");
}
$SMS->Send();
$SMS->Init(); // 보관하고 있던 결과값을 지웁니다.
}
}
$g5['title'] = '엑셀 배송일괄처리 결과';
include_once(G5_PATH.'/head.sub.php');
?>
<div class="new_win">
<h1><?php echo $g5['title']; ?></h1>
<div class="local_desc01 local_desc">
<p>배송일괄처리를 완료했습니다.</p>
</div>
<dl id="excelfile_result">
<dt>총배송건수</dt>
<dd><?php echo number_format($total_count); ?></dd>
<dt class="result_done">완료건수</dt>
<dd class="result_done"><?php echo number_format($succ_count); ?></dd>
<dt class="result_fail">실패건수</dt>
<dd class="result_fail"><?php echo number_format($fail_count); ?></dd>
<?php if($fail_count > 0) { ?>
<dt>실패주문코드</dt>
<dd><?php echo implode(', ', $fail_od_id); ?></dd>
<?php } ?>
</dl>
<div class="btn_confirm01 btn_confirm">
<button type="button" onclick="window.close();">창닫기</button>
</div>
</div>
<?php
include_once(G5_PATH.'/tail.sub.php');
File diff suppressed because it is too large. Load diff
Loaded 100 of 1039 files, more files were not shown because too many files have changed in this diff. Show more