Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ad443f679c |
@@ -1,6 +1,2 @@
|
|||||||
.gitattributes export-ignore
|
.gitattributes export-ignore
|
||||||
.gitignore export-ignore
|
.gitignore export-ignore
|
||||||
*.php whitespace=blank-at-eol,blank-at-eof,space-before-tab,cr-at-eol
|
|
||||||
|
|
||||||
/tests export-ignore
|
|
||||||
/bin export-ignore
|
|
||||||
|
|||||||
+1
-21
@@ -2,32 +2,12 @@
|
|||||||
/.htaccess
|
/.htaccess
|
||||||
data/
|
data/
|
||||||
test/
|
test/
|
||||||
/tests/
|
|
||||||
/bin/
|
|
||||||
sirgle/
|
sirgle/
|
||||||
test.php
|
test.php
|
||||||
*.key
|
*.key
|
||||||
*.sh
|
*.sh
|
||||||
log
|
|
||||||
g5_tree
|
|
||||||
cheditor5.*/
|
cheditor5.*/
|
||||||
!ckeditor*/
|
ckeditor*/
|
||||||
log/
|
log/
|
||||||
g5_tree/
|
g5_tree/
|
||||||
.vscode/
|
|
||||||
.claude/
|
|
||||||
.cursor/
|
|
||||||
.windsurf/
|
|
||||||
.idea/
|
|
||||||
.playwright-mcp
|
|
||||||
.mcp.json
|
|
||||||
.agents
|
|
||||||
.DS_Store
|
|
||||||
*.swp
|
|
||||||
*.swo
|
|
||||||
CLAUDE.local.md
|
|
||||||
naver*.html
|
naver*.html
|
||||||
initests01/
|
|
||||||
SIRsoft000/
|
|
||||||
config.php
|
|
||||||
pma/
|
|
||||||
|
|||||||
@@ -1,50 +0,0 @@
|
|||||||
# 저장소 작업 지침
|
|
||||||
|
|
||||||
## 적용 범위
|
|
||||||
|
|
||||||
이 문서는 저장소 루트와 모든 하위 디렉터리에 적용한다.
|
|
||||||
|
|
||||||
## 문서 작성 언어
|
|
||||||
|
|
||||||
- README, 보안 정책, 설치 안내, 개발 가이드 등 저장소 문서는 원칙적으로 한국어로 작성한다.
|
|
||||||
- 파일명, 코드 식별자, 명령어, API 명칭, 설정값과 외부 서비스의 고유 명칭은 원문을 유지한다.
|
|
||||||
- 영문 문서나 번역본이 별도로 필요한 경우에는 해당 작업에서 명시적으로 요청된 범위에 한해 추가한다.
|
|
||||||
|
|
||||||
## 커밋 메시지
|
|
||||||
|
|
||||||
- 커밋 메시지는 한국어로 작성한다.
|
|
||||||
- 제목은 `<접두어>: <변경 내용>` 형식을 사용한다.
|
|
||||||
- 접두어는 아래 권장 목록에서 변경 목적에 가장 가까운 항목을 선택한다.
|
|
||||||
- 변경 대상을 포함해 무엇을 왜 변경했는지 알 수 있도록 구체적으로 작성한다.
|
|
||||||
- `수정`, `업데이트`, `작업`처럼 변경 내용을 식별하기 어려운 표현만 사용하지 않는다.
|
|
||||||
- 하나의 커밋에는 가능한 한 하나의 목적에 해당하는 변경만 포함한다.
|
|
||||||
- 제목만으로 설명이 부족하면 본문에 변경 이유, 영향 범위와 검증 방법을 추가한다.
|
|
||||||
- 관련 이슈가 있으면 커밋 본문이나 꼬리말에 이슈 번호를 기록한다.
|
|
||||||
|
|
||||||
### 권장 접두어
|
|
||||||
|
|
||||||
- `feat`: 새로운 기능 추가
|
|
||||||
- `fix`: 버그 또는 잘못된 동작 수정
|
|
||||||
- `security`: 보안 취약점 수정이나 보안 강화
|
|
||||||
- `docs`: 문서 추가 또는 변경
|
|
||||||
- `refactor`: 동작 변경 없는 코드 구조 개선
|
|
||||||
- `perf`: 성능 개선
|
|
||||||
- `test`: 테스트 추가 또는 변경
|
|
||||||
- `build`: 빌드 시스템이나 의존성 변경
|
|
||||||
- `ci`: CI/CD 설정이나 자동화 변경
|
|
||||||
- `chore`: 기능과 직접 관련 없는 유지보수 작업
|
|
||||||
- `revert`: 이전 변경 되돌리기
|
|
||||||
|
|
||||||
### 보안 이슈 식별자
|
|
||||||
|
|
||||||
- KVE, CVE 등 식별자가 부여된 보안 이슈를 조치하는 커밋은 제목에 관련 식별자를 반드시 병기한다.
|
|
||||||
- 식별자는 `security:` 접두어 바로 뒤에 원문 그대로 작성한다.
|
|
||||||
- 하나의 커밋이 여러 보안 이슈를 함께 조치하면 관련 식별자를 모두 병기한다.
|
|
||||||
- 예: `security: KVE-2026-1909 모바일 KCP Windows 명령 인자 주입 차단`
|
|
||||||
|
|
||||||
### 작성 예시
|
|
||||||
|
|
||||||
- `docs: Git과 압축파일 설치 절차를 구분해 README에 안내`
|
|
||||||
- `fix: 품목 일부 취소 시 PG 취소금액 불일치 수정`
|
|
||||||
- `security: KVE-2026-1899 상품 정렬값 화이트리스트 검증으로 SQL 삽입 차단`
|
|
||||||
- `refactor: 객체 캐시의 유형별 저장 키 생성 로직 분리`
|
|
||||||
@@ -1,88 +0,0 @@
|
|||||||
# 그누보드5
|
|
||||||
|
|
||||||
그누보드5는 PHP와 MySQL 또는 MariaDB 기반의 오픈소스 CMS입니다. 게시판과 회원 관리 기능을 제공하며 쇼핑몰 솔루션 영카트를 포함합니다.
|
|
||||||
|
|
||||||
## 버전 확인
|
|
||||||
|
|
||||||
현재 소스 코드의 버전은 [`version.php`](version.php)에서 확인할 수 있습니다.
|
|
||||||
|
|
||||||
## 다운로드 및 설치
|
|
||||||
|
|
||||||
### 설치 환경
|
|
||||||
|
|
||||||
#### 기본 요구사항
|
|
||||||
|
|
||||||
- PHP 5.2.17 이상
|
|
||||||
- 최소 요구 버전은 PHP 5.2.17이며 PHP 7.2 이상을 권장합니다.
|
|
||||||
- MySQL 5.0 이상 또는 MySQL 5.0 이상의 기능을 지원하는 MariaDB
|
|
||||||
- Linux 호환 운영체제
|
|
||||||
|
|
||||||
#### 필수 라이브러리
|
|
||||||
|
|
||||||
- GD Library 2.0 이상
|
|
||||||
- iconv
|
|
||||||
|
|
||||||
#### 추가로 필요한 모듈 및 프로그램
|
|
||||||
|
|
||||||
- 글을 SNS로 복사하는 기능 사용 시
|
|
||||||
- cURL
|
|
||||||
- JSON
|
|
||||||
- 영카트5 모바일 결제 사용 시
|
|
||||||
- SOAP
|
|
||||||
- OpenSSL
|
|
||||||
|
|
||||||
> SIR에서 직접 제작한 그누보드5 및 호환 프로그램은 Linux에서만 개발하고 테스트했습니다. 다른 운영체제에서의 정상 동작은 보장하지 않습니다.
|
|
||||||
|
|
||||||
설치 환경에 관한 자세한 내용은 [그누보드5 공식 매뉴얼](https://sir.kr/manuals/g5/1)을 확인하십시오.
|
|
||||||
|
|
||||||
### Git을 이용하는 방법
|
|
||||||
|
|
||||||
Git을 사용할 수 있는 서버에서는 [GitHub 저장소](https://github.com/gnuboard/gnuboard5)를 복제하여 설치할 수 있습니다.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git clone https://github.com/gnuboard/gnuboard5.git
|
|
||||||
cd gnuboard5
|
|
||||||
```
|
|
||||||
|
|
||||||
복제한 `gnuboard5` 디렉터리를 웹 서버의 서비스 경로로 사용하거나, 서비스 경로 안에 소스 전체를 배치합니다. 이후 아래의 공통 설치 절차를 진행합니다.
|
|
||||||
|
|
||||||
### 압축파일을 이용하는 방법
|
|
||||||
|
|
||||||
1. 다음 중 한 곳에서 설치할 버전의 압축파일을 내려받습니다.
|
|
||||||
- [GitHub Releases](https://github.com/gnuboard/gnuboard5/releases)에서 원하는 버전을 선택하고 `Source code (zip)`을 내려받습니다. `*.patch.zip` 파일은 기존 설치본을 업데이트하기 위한 패치이므로 신규 설치에는 사용하지 않습니다.
|
|
||||||
- [SIR 그누보드5 다운로드](https://sir.kr/boards/g5_pds)에서 원하는 버전의 배포본을 내려받습니다.
|
|
||||||
2. 내려받은 압축파일을 풉니다.
|
|
||||||
3. 압축을 푼 디렉터리의 파일과 하위 디렉터리를 FTP, SFTP 등의 방법으로 웹 서버의 서비스 경로에 업로드합니다.
|
|
||||||
4. 업로드가 끝나면 아래의 공통 설치 절차를 진행합니다.
|
|
||||||
|
|
||||||
### 공통 설치 절차
|
|
||||||
|
|
||||||
1. 브라우저에서 소스를 배치한 주소로 접속하여 설치 화면을 엽니다.
|
|
||||||
2. `data` 디렉터리를 만들라는 안내가 표시되면 `config.php`가 있는 디렉터리에 `data`를 만들고 웹 서버가 쓸 수 있도록 권한을 설정합니다. 공식 매뉴얼에서는 `707` 권한을 예시로 사용합니다.
|
|
||||||
3. 라이선스 내용을 확인하고 동의한 뒤 설치를 계속합니다.
|
|
||||||
4. MySQL 또는 MariaDB 접속 정보와 최고관리자 정보를 입력합니다.
|
|
||||||
5. 설치 완료 화면을 확인한 뒤 생성한 최고관리자 계정으로 로그인합니다.
|
|
||||||
|
|
||||||
> 기존 사이트에 재설치하면 데이터가 삭제될 수 있습니다. 진행하기 전에 파일과 데이터베이스를 백업하십시오.
|
|
||||||
|
|
||||||
### 기존 설치 업데이트
|
|
||||||
|
|
||||||
소스 코드를 업데이트한 뒤 데이터베이스 변경이 포함된 버전은 관리자 메뉴의 **환경설정 → DB업그레이드**에서 변경 내용을 확인하고 명시적으로 실행합니다.
|
|
||||||
|
|
||||||
운영 절차와 마이그레이션 작성 규칙은 [데이터베이스 마이그레이션 문서](docs/database-migrations.md)를 확인하십시오.
|
|
||||||
|
|
||||||
## 문서 및 지원
|
|
||||||
|
|
||||||
- [5.6.391 쇼핑몰 분류 표시 수정 안내](docs/release-5.6.391.md)
|
|
||||||
- [5.6.39 보안 업데이트 및 필수 DB업그레이드 안내](docs/release-5.6.39.md)
|
|
||||||
|
|
||||||
- [5.6.37 SIRK 전용 카카오페이 연동 종료 및 기존 거래 지원](docs/sirk-kakaopay-retirement.md)
|
|
||||||
- [그누보드5 공식 페이지](https://sir.kr/main/g5/)
|
|
||||||
- [그누보드5 공식 매뉴얼](https://sir.kr/manuals/g5/1)
|
|
||||||
- [그누보드5 Q&A](https://sir.kr/questions?s_tag=%EA%B7%B8%EB%88%84%EB%B3%B4%EB%93%9C5)
|
|
||||||
|
|
||||||
보안 취약점 신고 방법은 [`SECURITY.md`](SECURITY.md)를 확인하십시오.
|
|
||||||
|
|
||||||
## 라이선스
|
|
||||||
|
|
||||||
라이선스 전문과 적용 조건은 [`LICENSE.txt`](LICENSE.txt)를 확인하십시오.
|
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
# 그누보드5 보안 정책
|
|
||||||
|
|
||||||
그누보드5에서 보안 취약점을 발견한 경우 악용 가능한 상세 내용을 공개 GitHub 이슈에 게시하지 마십시오.
|
|
||||||
|
|
||||||
취약점 정보와 재현 방법은 [SIR 보안 취약점 신고 게시판](https://sir.kr/boards/co_qa)을 통해 제보해 주십시오.
|
|
||||||
+1
-8
@@ -1,10 +1,3 @@
|
|||||||
<?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,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||||
|
|
||||||
include_once(G5_PATH.'/head.php');
|
include_once(G5_PATH.'/head.php');
|
||||||
|
?>
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||||
|
|
||||||
include_once(G5_PATH.'/tail.php');
|
include_once(G5_PATH.'/tail.php');
|
||||||
|
?>
|
||||||
+4
-9
@@ -1,14 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
define('G5_IS_ADMIN', true);
|
define('G5_IS_ADMIN', true);
|
||||||
require_once '../common.php';
|
include_once ('../common.php');
|
||||||
require_once G5_ADMIN_PATH . '/admin.lib.php';
|
include_once(G5_ADMIN_PATH.'/admin.lib.php');
|
||||||
|
|
||||||
if (function_exists('g5_check_data_htaccess')) {
|
if( isset($token) ){
|
||||||
g5_check_data_htaccess();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($token)) {
|
|
||||||
$token = @htmlspecialchars(strip_tags($token), ENT_QUOTES);
|
$token = @htmlspecialchars(strip_tags($token), ENT_QUOTES);
|
||||||
}
|
}
|
||||||
|
?>
|
||||||
run_event('admin_common');
|
|
||||||
@@ -1,122 +0,0 @@
|
|||||||
<?php
|
|
||||||
if (!defined('_GNUBOARD_')) {
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
$is_use_apache = (stripos($_SERVER['SERVER_SOFTWARE'], 'apache') !== false);
|
|
||||||
|
|
||||||
$is_use_nginx = (stripos($_SERVER['SERVER_SOFTWARE'], 'nginx') !== false);
|
|
||||||
|
|
||||||
$is_use_iis = !$is_use_apache && (stripos($_SERVER['SERVER_SOFTWARE'], 'microsoft-iis') !== false);
|
|
||||||
|
|
||||||
$is_write_file = false;
|
|
||||||
$is_apache_need_rules = false;
|
|
||||||
$is_apache_rewrite = false;
|
|
||||||
|
|
||||||
if (!($is_use_apache || $is_use_nginx || $is_use_iis)) { // 셋다 아니면 다 출력시킨다.
|
|
||||||
$is_use_apache = true;
|
|
||||||
$is_use_nginx = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($is_use_nginx) {
|
|
||||||
$is_write_file = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($is_use_apache) {
|
|
||||||
$is_write_file = (is_writable(G5_PATH) || (file_exists(G5_PATH . '/.htaccess') && is_writable(G5_PATH . '/.htaccess'))) ? true : false;
|
|
||||||
$is_apache_need_rules = check_need_rewrite_rules();
|
|
||||||
$is_apache_rewrite = function_exists('apache_get_modules') && in_array('mod_rewrite', apache_get_modules());
|
|
||||||
}
|
|
||||||
|
|
||||||
$get_path_url = parse_url(G5_URL);
|
|
||||||
|
|
||||||
$base_path = isset($get_path_url['path']) ? $get_path_url['path'] . '/' : '/';
|
|
||||||
|
|
||||||
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
|
|
||||||
add_stylesheet('<link rel="stylesheet" href="' . G5_JS_URL . '/remodal/remodal.css">', 11);
|
|
||||||
add_stylesheet('<link rel="stylesheet" href="' . G5_JS_URL . '/remodal/remodal-default-theme.css">', 12);
|
|
||||||
add_javascript('<script src="' . G5_JS_URL . '/remodal/remodal.js"></script>', 10);
|
|
||||||
?>
|
|
||||||
<section id="anc_cf_url">
|
|
||||||
<h2 class="h2_frm">짧은 주소 설정</h2>
|
|
||||||
<?php echo $pg_anchor ?>
|
|
||||||
<div class="local_desc02 local_desc">
|
|
||||||
<p>
|
|
||||||
게시판과 컨텐츠 페이지에 짧은 URL 을 사용합니다. <a href="https://sir.kr/manual/g5/286" class="btn btn_03" target="_blank" style="margin-left:10px">설정 관련 메뉴얼 보기</a>
|
|
||||||
<?php if ($is_use_apache && !$is_use_nginx) { ?>
|
|
||||||
<?php if (!$is_apache_rewrite) { ?>
|
|
||||||
<br><strong>Apache 서버인 경우 rewrite_module 이 비활성화 되어 있으면 짧은 주소를 사용할수 없습니다.</strong>
|
|
||||||
<?php } elseif (!$is_write_file && $is_apache_need_rules) { // apache인 경우 ?>
|
|
||||||
<br><strong>짧은 주소 사용시 아래 Apache 설정 코드를 참고하여 설정해 주세요.</strong>
|
|
||||||
<?php } ?>
|
|
||||||
<?php } ?>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="server_config_views">
|
|
||||||
<?php if ($is_use_apache) { ?>
|
|
||||||
<button type="button" data-remodal-target="modal_apache" class="btn btn_03">Apache 설정 코드 보기</button>
|
|
||||||
<?php } ?>
|
|
||||||
<?php if ($is_use_nginx) { ?>
|
|
||||||
<button type="button" data-remodal-target="modal_nginx" class="btn btn_03">Nginx 설정 코드 보기</button>
|
|
||||||
<?php } ?>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="tbl_frm01 tbl_wrap">
|
|
||||||
<table>
|
|
||||||
<caption>짧은주소 설정</caption>
|
|
||||||
<colgroup>
|
|
||||||
<col class="grid_4">
|
|
||||||
<col>
|
|
||||||
</colgroup>
|
|
||||||
<tbody>
|
|
||||||
<?php
|
|
||||||
$short_url_arrs = array(
|
|
||||||
'0' => array('label' => '사용안함', 'url' => G5_URL . '/board.php?bo_table=free&wr_id=123'),
|
|
||||||
'1' => array('label' => '숫자', 'url' => G5_URL . '/free/123'),
|
|
||||||
'2' => array('label' => '글 이름', 'url' => G5_URL . '/free/안녕하세요/'),
|
|
||||||
);
|
|
||||||
foreach ($short_url_arrs as $k => $v) {
|
|
||||||
$checked = ((int) $config['cf_bbs_rewrite'] === (int) $k) ? 'checked' : '';
|
|
||||||
?>
|
|
||||||
<tr>
|
|
||||||
<td><input name="cf_bbs_rewrite" id="cf_bbs_rewrite_<?php echo $k; ?>" type="radio" value="<?php echo $k; ?>" <?php echo $checked; ?>><label for="cf_bbs_rewrite_<?php echo $k; ?>" class="rules_label"><?php echo $v['label']; ?></label></td>
|
|
||||||
<td><?php echo $v['url']; ?></td>
|
|
||||||
</tr>
|
|
||||||
<?php } //end foreach ?>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="server_rewrite_info">
|
|
||||||
<div class="is_rewrite remodal" data-remodal-id="modal_apache" role="dialog" aria-labelledby="modalApache" aria-describedby="modal1Desc">
|
|
||||||
|
|
||||||
<button type="button" class="connect-close" data-remodal-action="close">
|
|
||||||
<i class="fa fa-close"></i>
|
|
||||||
<span class="txt">닫기</span>
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<h4 class="copy_title">.htaccess 파일에 적용할 코드입니다.
|
|
||||||
<?php if (!$is_apache_rewrite) { ?>
|
|
||||||
<br><span class="info-warning">Apache 서버인 경우 rewrite_module 이 비활성화 되어 있으면 짧은 주소를 사용할수 없습니다.</span>
|
|
||||||
<?php } elseif (!$is_write_file && $is_apache_need_rules) { ?>
|
|
||||||
<br><span class="info-warning">자동으로 .htaccess 파일을 수정 할수 있는 권한이 없습니다.<br>.htaccess 파일이 없다면 생성 후에, 아래 코드가 없으면 코드를 복사하여 붙여넣기 해 주세요.</span>
|
|
||||||
<?php } elseif (!$is_apache_need_rules) { ?>
|
|
||||||
<br><span class="info-success">정상적으로 적용된 상태입니다.</span>
|
|
||||||
<?php } ?>
|
|
||||||
</h4>
|
|
||||||
<textarea readonly="readonly" rows="10"><?php echo get_mod_rewrite_rules(true); ?></textarea>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="is_rewrite remodal" data-remodal-id="modal_nginx" role="dialog" aria-labelledby="modalNginx" aria-describedby="modal2Desc">
|
|
||||||
|
|
||||||
<button type="button" class="connect-close" data-remodal-action="close">
|
|
||||||
<i class="fa fa-close"></i>
|
|
||||||
<span class="txt">닫기</span>
|
|
||||||
</button>
|
|
||||||
<h4 class="copy_title">아래 코드를 복사하여 nginx 설정 파일에 적용해 주세요.</h4>
|
|
||||||
<textarea readonly="readonly" rows="10"><?php echo get_nginx_conf_rules(true); ?></textarea>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
+75
-105
@@ -1,29 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
if (!defined('_GNUBOARD_')) {
|
if (!defined('_GNUBOARD_')) exit;
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
$g5_debug['php']['begin_time'] = $begin_time = get_microtime();
|
$begin_time = get_microtime();
|
||||||
|
|
||||||
$files = glob(G5_ADMIN_PATH . '/css/admin_extend_*');
|
include_once(G5_PATH.'/head.sub.php');
|
||||||
if (is_array($files)) {
|
|
||||||
foreach ((array) $files as $k => $css_file) {
|
|
||||||
|
|
||||||
$fileinfo = pathinfo($css_file);
|
function print_menu1($key, $no='')
|
||||||
$ext = $fileinfo['extension'];
|
|
||||||
|
|
||||||
if ($ext !== 'css') {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
$css_file = str_replace(G5_ADMIN_PATH, G5_ADMIN_URL, $css_file);
|
|
||||||
add_stylesheet('<link rel="stylesheet" href="' . $css_file . '">', $k);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
require_once G5_PATH . '/head.sub.php';
|
|
||||||
|
|
||||||
function print_menu1($key, $no = '')
|
|
||||||
{
|
{
|
||||||
global $menu;
|
global $menu;
|
||||||
|
|
||||||
@@ -32,39 +14,29 @@ function print_menu1($key, $no = '')
|
|||||||
return $str;
|
return $str;
|
||||||
}
|
}
|
||||||
|
|
||||||
function print_menu2($key, $no = '')
|
function print_menu2($key, $no='')
|
||||||
{
|
{
|
||||||
global $menu, $auth_menu, $is_admin, $auth, $g5, $sub_menu;
|
global $menu, $auth_menu, $is_admin, $auth, $g5, $sub_menu;
|
||||||
|
|
||||||
$str = "<ul>";
|
$str .= "<ul>";
|
||||||
for ($i = 1; $i < count($menu[$key]); $i++) {
|
for($i=1; $i<count($menu[$key]); $i++)
|
||||||
if (!isset($menu[$key][$i])) {
|
{
|
||||||
|
if ($is_admin != 'super' && (!array_key_exists($menu[$key][$i][0],$auth) || !strstr($auth[$menu[$key][$i][0]], 'r')))
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
|
|
||||||
if ($is_admin != 'super' && (!array_key_exists($menu[$key][$i][0], $auth) || strpos($auth[$menu[$key][$i][0]], 'r') === false)) {
|
if (($menu[$key][$i][4] == 1 && $gnb_grp_style == false) || ($menu[$key][$i][4] != 1 && $gnb_grp_style == true)) $gnb_grp_div = 'gnb_grp_div';
|
||||||
continue;
|
else $gnb_grp_div = '';
|
||||||
}
|
|
||||||
|
|
||||||
$gnb_grp_div = $gnb_grp_style = '';
|
if ($menu[$key][$i][4] == 1) $gnb_grp_style = 'gnb_grp_style';
|
||||||
|
else $gnb_grp_style = '';
|
||||||
if (isset($menu[$key][$i][4])) {
|
|
||||||
if (($menu[$key][$i][4] == 1 && $gnb_grp_style == false) || ($menu[$key][$i][4] != 1 && $gnb_grp_style == true)) {
|
|
||||||
$gnb_grp_div = 'gnb_grp_div';
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($menu[$key][$i][4] == 1) {
|
|
||||||
$gnb_grp_style = 'gnb_grp_style';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$current_class = '';
|
$current_class = '';
|
||||||
|
|
||||||
if ($menu[$key][$i][0] == $sub_menu) {
|
if ($menu[$key][$i][0] == $sub_menu){
|
||||||
$current_class = ' on';
|
$current_class = ' on';
|
||||||
}
|
}
|
||||||
|
|
||||||
$str .= '<li data-menu="' . $menu[$key][$i][0] . '"><a href="' . $menu[$key][$i][2] . '" class="gnb_2da ' . $gnb_grp_style . ' ' . $gnb_grp_div . $current_class . '">' . $menu[$key][$i][1] . '</a></li>';
|
$str .= '<li data-menu="'.$menu[$key][$i][0].'"><a href="'.$menu[$key][$i][2].'" class="gnb_2da '.$gnb_grp_style.' '.$gnb_grp_div.$current_class.'">'.$menu[$key][$i][1].'</a></li>';
|
||||||
|
|
||||||
$auth_menu[$menu[$key][$i][0]] = $menu[$key][$i][1];
|
$auth_menu[$menu[$key][$i][0]] = $menu[$key][$i][1];
|
||||||
}
|
}
|
||||||
@@ -74,12 +46,12 @@ function print_menu2($key, $no = '')
|
|||||||
}
|
}
|
||||||
|
|
||||||
$adm_menu_cookie = array(
|
$adm_menu_cookie = array(
|
||||||
'container' => '',
|
'container' => '',
|
||||||
'gnb' => '',
|
'gnb' => '',
|
||||||
'btn_gnb' => '',
|
'btn_gnb' => '',
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!empty($_COOKIE['g5_admin_btn_gnb'])) {
|
if( ! empty($_COOKIE['g5_admin_btn_gnb']) ){
|
||||||
$adm_menu_cookie['container'] = 'container-small';
|
$adm_menu_cookie['container'] = 'container-small';
|
||||||
$adm_menu_cookie['gnb'] = 'gnb_small';
|
$adm_menu_cookie['gnb'] = 'gnb_small';
|
||||||
$adm_menu_cookie['btn_gnb'] = 'btn_gnb_open';
|
$adm_menu_cookie['btn_gnb'] = 'btn_gnb_open';
|
||||||
@@ -87,26 +59,26 @@ if (!empty($_COOKIE['g5_admin_btn_gnb'])) {
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
var g5_admin_csrf_token_key = "<?php echo (function_exists('admin_csrf_token_key')) ? admin_csrf_token_key() : ''; ?>";
|
var tempX = 0;
|
||||||
var tempX = 0;
|
var tempY = 0;
|
||||||
var tempY = 0;
|
|
||||||
|
|
||||||
function imageview(id, w, h) {
|
function imageview(id, w, h)
|
||||||
|
{
|
||||||
|
|
||||||
menu(id);
|
menu(id);
|
||||||
|
|
||||||
var el_id = document.getElementById(id);
|
var el_id = document.getElementById(id);
|
||||||
|
|
||||||
//submenu = eval(name+".style");
|
//submenu = eval(name+".style");
|
||||||
submenu = el_id.style;
|
submenu = el_id.style;
|
||||||
submenu.left = tempX - (w + 11);
|
submenu.left = tempX - ( w + 11 );
|
||||||
submenu.top = tempY - (h / 2);
|
submenu.top = tempY - ( h / 2 );
|
||||||
|
|
||||||
selectBoxVisible();
|
selectBoxVisible();
|
||||||
|
|
||||||
if (el_id.style.display != 'none')
|
if (el_id.style.display != 'none')
|
||||||
selectBoxHidden(id);
|
selectBoxHidden(id);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div id="to_content"><a href="#container">본문 바로가기</a></div>
|
<div id="to_content"><a href="#container">본문 바로가기</a></div>
|
||||||
@@ -114,14 +86,11 @@ if (!empty($_COOKIE['g5_admin_btn_gnb'])) {
|
|||||||
<header id="hd">
|
<header id="hd">
|
||||||
<h1><?php echo $config['cf_title'] ?></h1>
|
<h1><?php echo $config['cf_title'] ?></h1>
|
||||||
<div id="hd_top">
|
<div id="hd_top">
|
||||||
<button type="button" id="btn_gnb" class="btn_gnb_close <?php echo $adm_menu_cookie['btn_gnb']; ?>">메뉴</button>
|
<button type="button" id="btn_gnb" class="btn_gnb_close <?php echo $adm_menu_cookie['btn_gnb'];?>">메뉴</button>
|
||||||
<div id="logo"><a href="<?php echo correct_goto_url(G5_ADMIN_URL); ?>"><img src="<?php echo G5_ADMIN_URL ?>/img/logo.png" alt="<?php echo get_text($config['cf_title']); ?> 관리자"></a></div>
|
<div id="logo"><a href="<?php echo G5_ADMIN_URL ?>"><img src="<?php echo G5_ADMIN_URL ?>/img/logo.png" alt="<?php echo $config['cf_title'] ?> 관리자"></a></div>
|
||||||
|
|
||||||
<div id="tnb">
|
<div id="tnb">
|
||||||
<ul>
|
<ul>
|
||||||
<?php if (defined('G5_USE_SHOP') && G5_USE_SHOP) { ?>
|
|
||||||
<li class="tnb_li"><a href="<?php echo G5_SHOP_URL ?>/" class="tnb_shop" target="_blank" title="쇼핑몰 바로가기">쇼핑몰 바로가기</a></li>
|
|
||||||
<?php } ?>
|
|
||||||
<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>
|
||||||
@@ -138,34 +107,33 @@ if (!empty($_COOKIE['g5_admin_btn_gnb'])) {
|
|||||||
<ul class="gnb_ul">
|
<ul class="gnb_ul">
|
||||||
<?php
|
<?php
|
||||||
$jj = 1;
|
$jj = 1;
|
||||||
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 {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$current_class = "";
|
$current_class = "";
|
||||||
if (isset($sub_menu) && (substr($sub_menu, 0, 3) == substr($menu['menu' . $key][0][0], 0, 3))) {
|
if (isset($sub_menu) && (substr($sub_menu, 0, 3) == substr($menu['menu'.$key][0][0], 0, 3)))
|
||||||
$current_class = " on";
|
$current_class = " on";
|
||||||
}
|
|
||||||
|
|
||||||
$button_title = $menu['menu' . $key][0][1];
|
$button_title = $menu['menu'.$key][0][1];
|
||||||
?>
|
?>
|
||||||
<li class="gnb_li<?php echo $current_class; ?>">
|
<li class="gnb_li<?php echo $current_class;?>">
|
||||||
<button type="button" class="btn_op menu-<?php echo $key; ?> menu-order-<?php echo $jj; ?>" title="<?php echo $button_title; ?>"><?php echo $button_title; ?></button>
|
<button type="button" class="btn_op menu-<?php echo $jj; ?>" title="<?php echo $button_title; ?>"><?php echo $button_title;?></button>
|
||||||
<div class="gnb_oparea_wr">
|
<div class="gnb_oparea_wr">
|
||||||
<div class="gnb_oparea">
|
<div class="gnb_oparea">
|
||||||
<h3><?php echo $menu['menu' . $key][0][1]; ?></h3>
|
<h3><?php echo $menu['menu'.$key][0][1];?></h3>
|
||||||
<?php echo print_menu1('menu' . $key, 1); ?>
|
<?php echo print_menu1('menu'.$key, 1); ?>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</div>
|
||||||
|
</li>
|
||||||
<?php
|
<?php
|
||||||
$jj++;
|
$jj++;
|
||||||
} //end foreach
|
} //end foreach
|
||||||
?>
|
?>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -173,37 +141,39 @@ if (!empty($_COOKIE['g5_admin_btn_gnb'])) {
|
|||||||
|
|
||||||
</header>
|
</header>
|
||||||
<script>
|
<script>
|
||||||
jQuery(function($) {
|
jQuery(function($){
|
||||||
|
|
||||||
var menu_cookie_key = 'g5_admin_btn_gnb';
|
var menu_cookie_key = 'g5_admin_btn_gnb';
|
||||||
|
|
||||||
$(".tnb_mb_btn").click(function() {
|
$(".tnb_mb_btn").click(function(){
|
||||||
$(".tnb_mb_area").toggle();
|
$(".tnb_mb_area").toggle();
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#btn_gnb").click(function() {
|
$("#btn_gnb").click(function(){
|
||||||
|
|
||||||
|
var $this = $(this);
|
||||||
|
|
||||||
var $this = $(this);
|
try {
|
||||||
|
if( ! $this.hasClass("btn_gnb_open") ){
|
||||||
|
set_cookie(menu_cookie_key, 1, 60*60*24*365);
|
||||||
|
} else {
|
||||||
|
delete_cookie(menu_cookie_key);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch(err) {
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
$("#container").toggleClass("container-small");
|
||||||
if (!$this.hasClass("btn_gnb_open")) {
|
$("#gnb").toggleClass("gnb_small");
|
||||||
set_cookie(menu_cookie_key, 1, 60 * 60 * 24 * 365);
|
$this.toggleClass("btn_gnb_open");
|
||||||
} else {
|
|
||||||
delete_cookie(menu_cookie_key);
|
|
||||||
}
|
|
||||||
} catch (err) {}
|
|
||||||
|
|
||||||
$("#container").toggleClass("container-small");
|
|
||||||
$("#gnb").toggleClass("gnb_small");
|
|
||||||
$this.toggleClass("btn_gnb_open");
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
$(".gnb_ul li .btn_op").click(function() {
|
|
||||||
$(this).parent().addClass("on").siblings().removeClass("on");
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(".gnb_ul li .btn_op" ).click(function() {
|
||||||
|
$(this).parent().addClass("on").siblings().removeClass("on");
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+7
-113
@@ -1,115 +1,11 @@
|
|||||||
/** 공통 UI 모듈 */
|
function check_all(f)
|
||||||
window.CommonUI = {
|
{
|
||||||
bindTabs(tabSelector, contentSelector, options = {}) {
|
var chk = document.getElementsByName("chk[]");
|
||||||
const tabs = document.querySelectorAll(tabSelector);
|
|
||||||
const contents = document.querySelectorAll(contentSelector);
|
|
||||||
|
|
||||||
tabs.forEach(tab => {
|
for (i=0; i<chk.length; i++)
|
||||||
tab.addEventListener('click', () => {
|
chk[i].checked = f.chkall.checked;
|
||||||
const tabName = tab.dataset.tab;
|
|
||||||
const target = document.getElementById(`tab-${tabName}`);
|
|
||||||
|
|
||||||
tabs.forEach(t => t.classList.remove('active'));
|
|
||||||
tab.classList.add('active');
|
|
||||||
|
|
||||||
contents.forEach(c => c.classList.add('is-hidden'));
|
|
||||||
|
|
||||||
if (target) target.classList.remove('is-hidden');
|
|
||||||
|
|
||||||
options.onChange?.(tabName, target);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
function setHtml(el, markup) {
|
|
||||||
if (!el) return;
|
|
||||||
if (markup == null || markup === '') {
|
|
||||||
el.textContent = '';
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const range = document.createRange();
|
|
||||||
range.selectNodeContents(el);
|
|
||||||
el.replaceChildren(range.createContextualFragment(markup));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 팝업 관리 모듈 */
|
|
||||||
window.PopupManager = {
|
|
||||||
open(id, options = {}) {
|
|
||||||
const el = document.getElementById(id);
|
|
||||||
if (el) {
|
|
||||||
el.classList.remove('is-hidden');
|
|
||||||
this.bindOutsideClickClose(id);
|
|
||||||
|
|
||||||
if (!options.disableOutsideClose) {
|
|
||||||
this.bindOutsideClickClose(id);
|
|
||||||
} else {
|
|
||||||
this.unbindOutsideClickClose(id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
close(id) {
|
|
||||||
const el = document.getElementById(id);
|
|
||||||
if (el) el.classList.add('is-hidden');
|
|
||||||
},
|
|
||||||
|
|
||||||
toggle(id) {
|
|
||||||
const el = document.getElementById(id);
|
|
||||||
if (el) el.classList.toggle('is-hidden');
|
|
||||||
},
|
|
||||||
|
|
||||||
bindOutsideClickClose(id) {
|
|
||||||
const el = document.getElementById(id);
|
|
||||||
if (!el) return;
|
|
||||||
el.onclick = () => this.close(id);
|
|
||||||
},
|
|
||||||
|
|
||||||
unbindOutsideClickClose(id) {
|
|
||||||
const el = document.getElementById(id);
|
|
||||||
if (!el) return;
|
|
||||||
el.onclick = null;
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 팝업 콘텐츠 렌더링 (타이틀, 바디, 푸터 구성)
|
|
||||||
* @param {string} title - 팝업 제목
|
|
||||||
* @param {string} body - 팝업 본문 HTML
|
|
||||||
* @param {string} [footer] - 푸터 HTML
|
|
||||||
* @param {object} [options] - 팝업 열기 옵션
|
|
||||||
*/
|
|
||||||
render(title, body, footer = '', options = {}) {
|
|
||||||
const titleEl = document.getElementById('popupTitle');
|
|
||||||
const bodyEl = document.getElementById('popupBody');
|
|
||||||
const footerEl = document.getElementById('popupFooter');
|
|
||||||
|
|
||||||
if (titleEl) titleEl.textContent = title;
|
|
||||||
if (bodyEl) setHtml(bodyEl, body);
|
|
||||||
if (footerEl) setHtml(footerEl, footer);
|
|
||||||
|
|
||||||
this.open('popupOverlay', options);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/** 형식 체크 */
|
|
||||||
function check_all(target) {
|
|
||||||
const chkboxes = document.getElementsByName("chk[]");
|
|
||||||
let chkall;
|
|
||||||
|
|
||||||
if (target && target.tagName === "FORM") {
|
|
||||||
chkall = target.querySelector('input[name="chkall"]');
|
|
||||||
} else if (target && target.type === "checkbox") {
|
|
||||||
chkall = target;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!chkall) return;
|
|
||||||
|
|
||||||
for (const checkbox of chkboxes) {
|
|
||||||
checkbox.checked = chkall.checked;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function btn_check(f, act)
|
function btn_check(f, act)
|
||||||
{
|
{
|
||||||
if (act == "update") // 선택수정
|
if (act == "update") // 선택수정
|
||||||
@@ -187,13 +83,11 @@ function delete_confirm2(msg)
|
|||||||
|
|
||||||
function get_ajax_token()
|
function get_ajax_token()
|
||||||
{
|
{
|
||||||
var token = "",
|
var token = "";
|
||||||
admin_csrf_token_key = (typeof g5_admin_csrf_token_key !== "undefined") ? g5_admin_csrf_token_key : "";
|
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: g5_admin_url+"/ajax.token.php",
|
url: g5_admin_url+"/ajax.token.php",
|
||||||
data : {admin_csrf_token_key:admin_csrf_token_key},
|
|
||||||
cache: false,
|
cache: false,
|
||||||
async: false,
|
async: false,
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
@@ -214,7 +108,7 @@ function get_ajax_token()
|
|||||||
}
|
}
|
||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
$(document).on("click", "form input:submit, form button:submit", function() {
|
$(document).on("click", "form input:submit", function() {
|
||||||
var f = this.form;
|
var f = this.form;
|
||||||
var token = get_ajax_token();
|
var token = get_ajax_token();
|
||||||
|
|
||||||
|
|||||||
+132
-490
@@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
if (!defined('_GNUBOARD_')) {
|
if (!defined('_GNUBOARD_')) exit;
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
// 081022 : CSRF 방지를 위해 코드를 작성했으나 효과가 없어 주석처리 함
|
// 081022 : CSRF 방지를 위해 코드를 작성했으나 효과가 없어 주석처리 함
|
||||||
@@ -12,17 +10,17 @@ if (!get_session('ss_admin')) {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// 스킨디렉토리를 SELECT 형식으로 얻음
|
// 스킨디렉토리를 SELECT 형식으로 얻음
|
||||||
function get_skin_select($skin_gubun, $id, $name, $selected = '', $event = '')
|
function get_skin_select($skin_gubun, $id, $name, $selected='', $event='')
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
$skins = array();
|
$skins = array();
|
||||||
|
|
||||||
if (defined('G5_THEME_PATH') && $config['cf_theme']) {
|
if(defined('G5_THEME_PATH') && $config['cf_theme']) {
|
||||||
$dirs = get_skin_dir($skin_gubun, G5_THEME_PATH . '/' . G5_SKIN_DIR);
|
$dirs = get_skin_dir($skin_gubun, G5_THEME_PATH.'/'.G5_SKIN_DIR);
|
||||||
if (!empty($dirs)) {
|
if(!empty($dirs)) {
|
||||||
foreach ($dirs as $dir) {
|
foreach($dirs as $dir) {
|
||||||
$skins[] = 'theme/' . $dir;
|
$skins[] = 'theme/'.$dir;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -30,15 +28,12 @@ function get_skin_select($skin_gubun, $id, $name, $selected = '', $event = '')
|
|||||||
$skins = array_merge($skins, get_skin_dir($skin_gubun));
|
$skins = array_merge($skins, get_skin_dir($skin_gubun));
|
||||||
|
|
||||||
$str = "<select id=\"$id\" name=\"$name\" $event>\n";
|
$str = "<select id=\"$id\" name=\"$name\" $event>\n";
|
||||||
for ($i = 0; $i < count($skins); $i++) {
|
for ($i=0; $i<count($skins); $i++) {
|
||||||
if ($i == 0) {
|
if ($i == 0) $str .= "<option value=\"\">선택</option>";
|
||||||
$str .= "<option value=\"\">선택</option>";
|
if(preg_match('#^theme/(.+)$#', $skins[$i], $match))
|
||||||
}
|
$text = '(테마) '.$match[1];
|
||||||
if (preg_match('#^theme/(.+)$#', $skins[$i], $match)) {
|
else
|
||||||
$text = '(테마) ' . $match[1];
|
|
||||||
} else {
|
|
||||||
$text = $skins[$i];
|
$text = $skins[$i];
|
||||||
}
|
|
||||||
|
|
||||||
$str .= option_selected($skins[$i], $selected, $text);
|
$str .= option_selected($skins[$i], $selected, $text);
|
||||||
}
|
}
|
||||||
@@ -47,33 +42,30 @@ function get_skin_select($skin_gubun, $id, $name, $selected = '', $event = '')
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 모바일 스킨디렉토리를 SELECT 형식으로 얻음
|
// 모바일 스킨디렉토리를 SELECT 형식으로 얻음
|
||||||
function get_mobile_skin_select($skin_gubun, $id, $name, $selected = '', $event = '')
|
function get_mobile_skin_select($skin_gubun, $id, $name, $selected='', $event='')
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
$skins = array();
|
$skins = array();
|
||||||
|
|
||||||
if (defined('G5_THEME_PATH') && $config['cf_theme']) {
|
if(defined('G5_THEME_PATH') && $config['cf_theme']) {
|
||||||
$dirs = get_skin_dir($skin_gubun, G5_THEME_MOBILE_PATH . '/' . G5_SKIN_DIR);
|
$dirs = get_skin_dir($skin_gubun, G5_THEME_MOBILE_PATH.'/'.G5_SKIN_DIR);
|
||||||
if (!empty($dirs)) {
|
if(!empty($dirs)) {
|
||||||
foreach ($dirs as $dir) {
|
foreach($dirs as $dir) {
|
||||||
$skins[] = 'theme/' . $dir;
|
$skins[] = 'theme/'.$dir;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$skins = array_merge($skins, get_skin_dir($skin_gubun, G5_MOBILE_PATH . '/' . G5_SKIN_DIR));
|
$skins = array_merge($skins, get_skin_dir($skin_gubun, G5_MOBILE_PATH.'/'.G5_SKIN_DIR));
|
||||||
|
|
||||||
$str = "<select id=\"$id\" name=\"$name\" $event>\n";
|
$str = "<select id=\"$id\" name=\"$name\" $event>\n";
|
||||||
for ($i = 0; $i < count($skins); $i++) {
|
for ($i=0; $i<count($skins); $i++) {
|
||||||
if ($i == 0) {
|
if ($i == 0) $str .= "<option value=\"\">선택</option>";
|
||||||
$str .= "<option value=\"\">선택</option>";
|
if(preg_match('#^theme/(.+)$#', $skins[$i], $match))
|
||||||
}
|
$text = '(테마) '.$match[1];
|
||||||
if (preg_match('#^theme/(.+)$#', $skins[$i], $match)) {
|
else
|
||||||
$text = '(테마) ' . $match[1];
|
|
||||||
} else {
|
|
||||||
$text = $skins[$i];
|
$text = $skins[$i];
|
||||||
}
|
|
||||||
|
|
||||||
$str .= option_selected($skins[$i], $selected, $text);
|
$str .= option_selected($skins[$i], $selected, $text);
|
||||||
}
|
}
|
||||||
@@ -83,26 +75,21 @@ function get_mobile_skin_select($skin_gubun, $id, $name, $selected = '', $event
|
|||||||
|
|
||||||
|
|
||||||
// 스킨경로를 얻는다
|
// 스킨경로를 얻는다
|
||||||
function get_skin_dir($skin, $skin_path = G5_SKIN_PATH)
|
function get_skin_dir($skin, $skin_path=G5_SKIN_PATH)
|
||||||
{
|
{
|
||||||
global $g5;
|
global $g5;
|
||||||
|
|
||||||
$result_array = array();
|
$result_array = array();
|
||||||
|
|
||||||
$dirname = $skin_path . '/' . $skin . '/';
|
$dirname = $skin_path.'/'.$skin.'/';
|
||||||
if (!is_dir($dirname)) {
|
if(!is_dir($dirname))
|
||||||
return array();
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
$handle = opendir($dirname);
|
$handle = opendir($dirname);
|
||||||
while ($file = readdir($handle)) {
|
while ($file = readdir($handle)) {
|
||||||
if ($file == '.' || $file == '..') {
|
if($file == '.'||$file == '..') continue;
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (is_dir($dirname . $file)) {
|
if (is_dir($dirname.$file)) $result_array[] = $file;
|
||||||
$result_array[] = $file;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
closedir($handle);
|
closedir($handle);
|
||||||
sort($result_array);
|
sort($result_array);
|
||||||
@@ -116,18 +103,15 @@ function get_theme_dir()
|
|||||||
{
|
{
|
||||||
$result_array = array();
|
$result_array = array();
|
||||||
|
|
||||||
$dirname = G5_PATH . '/' . G5_THEME_DIR . '/';
|
$dirname = G5_PATH.'/'.G5_THEME_DIR.'/';
|
||||||
$handle = opendir($dirname);
|
$handle = opendir($dirname);
|
||||||
while ($file = readdir($handle)) {
|
while ($file = readdir($handle)) {
|
||||||
if ($file == '.' || $file == '..') {
|
if($file == '.'||$file == '..') continue;
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (is_dir($dirname . $file)) {
|
if (is_dir($dirname.$file)) {
|
||||||
$theme_path = $dirname . $file;
|
$theme_path = $dirname.$file;
|
||||||
if (is_file($theme_path . '/index.php') && is_file($theme_path . '/head.php') && is_file($theme_path . '/tail.php')) {
|
if(is_file($theme_path.'/index.php') && is_file($theme_path.'/head.php') && is_file($theme_path.'/tail.php'))
|
||||||
$result_array[] = $file;
|
$result_array[] = $file;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
closedir($handle);
|
closedir($handle);
|
||||||
@@ -141,23 +125,21 @@ function get_theme_dir()
|
|||||||
function get_theme_info($dir)
|
function get_theme_info($dir)
|
||||||
{
|
{
|
||||||
$info = array();
|
$info = array();
|
||||||
$path = G5_PATH . '/' . G5_THEME_DIR . '/' . $dir;
|
$path = G5_PATH.'/'.G5_THEME_DIR.'/'.$dir;
|
||||||
|
|
||||||
if (is_dir($path)) {
|
if(is_dir($path)) {
|
||||||
$screenshot = $path . '/screenshot.png';
|
$screenshot = $path.'/screenshot.png';
|
||||||
$screenshot_url = '';
|
if(is_file($screenshot)) {
|
||||||
if (is_file($screenshot)) {
|
|
||||||
$size = @getimagesize($screenshot);
|
$size = @getimagesize($screenshot);
|
||||||
|
|
||||||
if ($size[2] == 3) {
|
if($size[2] == 3)
|
||||||
$screenshot_url = str_replace(G5_PATH, G5_URL, $screenshot);
|
$screenshot_url = str_replace(G5_PATH, G5_URL, $screenshot);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$info['screenshot'] = $screenshot_url;
|
$info['screenshot'] = $screenshot_url;
|
||||||
|
|
||||||
$text = $path . '/readme.txt';
|
$text = $path.'/readme.txt';
|
||||||
if (is_file($text)) {
|
if(is_file($text)) {
|
||||||
$content = file($text, false);
|
$content = file($text, false);
|
||||||
$content = array_map('trim', $content);
|
$content = array_map('trim', $content);
|
||||||
|
|
||||||
@@ -180,9 +162,8 @@ function get_theme_info($dir)
|
|||||||
$info['license_uri'] = trim($m7[1]);
|
$info['license_uri'] = trim($m7[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$info['theme_name']) {
|
if(!$info['theme_name'])
|
||||||
$info['theme_name'] = $dir;
|
$info['theme_name'] = $dir;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $info;
|
return $info;
|
||||||
@@ -190,20 +171,20 @@ function get_theme_info($dir)
|
|||||||
|
|
||||||
|
|
||||||
// 테마설정 정보
|
// 테마설정 정보
|
||||||
function get_theme_config_value($dir, $key = '*')
|
function get_theme_config_value($dir, $key='*')
|
||||||
{
|
{
|
||||||
$tconfig = array();
|
$tconfig = array();
|
||||||
|
|
||||||
$theme_config_file = G5_PATH . '/' . G5_THEME_DIR . '/' . $dir . '/theme.config.php';
|
$theme_config_file = G5_PATH.'/'.G5_THEME_DIR.'/'.$dir.'/theme.config.php';
|
||||||
if (is_file($theme_config_file)) {
|
if(is_file) {
|
||||||
include $theme_config_file;
|
include($theme_config_file);
|
||||||
// 22.05.26 Undefined Variable $theme_config;
|
|
||||||
if ($key == '*') {
|
if($key == '*') {
|
||||||
$tconfig = $theme_config;
|
$tconfig = $theme_config;
|
||||||
} else {
|
} else {
|
||||||
$keys = array_map('trim', explode(',', $key));
|
$keys = array_map('trim', explode(',', $key));
|
||||||
foreach ($keys as $v) {
|
foreach($keys as $v) {
|
||||||
$tconfig[$v] = isset($theme_config[$v]) ? trim($theme_config[$v]) : '';
|
$tconfig[$v] = trim($theme_config[$v]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -213,20 +194,17 @@ function get_theme_config_value($dir, $key = '*')
|
|||||||
|
|
||||||
|
|
||||||
// 회원권한을 SELECT 형식으로 얻음
|
// 회원권한을 SELECT 형식으로 얻음
|
||||||
function get_member_level_select($name, $start_id = 0, $end_id = 10, $selected = "", $event = "")
|
function get_member_level_select($name, $start_id=0, $end_id=10, $selected="", $event="")
|
||||||
{
|
{
|
||||||
global $g5;
|
global $g5;
|
||||||
|
|
||||||
$str = "\n<select id=\"{$name}\" name=\"{$name}\"";
|
$str = "\n<select id=\"{$name}\" name=\"{$name}\"";
|
||||||
if ($event) {
|
if ($event) $str .= " $event";
|
||||||
$str .= " $event";
|
|
||||||
}
|
|
||||||
$str .= ">\n";
|
$str .= ">\n";
|
||||||
for ($i = $start_id; $i <= $end_id; $i++) {
|
for ($i=$start_id; $i<=$end_id; $i++) {
|
||||||
$str .= '<option value="' . $i . '"';
|
$str .= '<option value="'.$i.'"';
|
||||||
if ($i == $selected) {
|
if ($i == $selected)
|
||||||
$str .= ' selected="selected"';
|
$str .= ' selected="selected"';
|
||||||
}
|
|
||||||
$str .= ">{$i}</option>\n";
|
$str .= ">{$i}</option>\n";
|
||||||
}
|
}
|
||||||
$str .= "</select>\n";
|
$str .= "</select>\n";
|
||||||
@@ -235,98 +213,81 @@ function get_member_level_select($name, $start_id = 0, $end_id = 10, $selected =
|
|||||||
|
|
||||||
|
|
||||||
// 회원아이디를 SELECT 형식으로 얻음
|
// 회원아이디를 SELECT 형식으로 얻음
|
||||||
function get_member_id_select($name, $level, $selected = "", $event = "")
|
function get_member_id_select($name, $level, $selected="", $event="")
|
||||||
{
|
{
|
||||||
global $g5;
|
global $g5;
|
||||||
|
|
||||||
$sql = " select mb_id from {$g5['member_table']} where mb_level >= '{$level}' ";
|
$sql = " select mb_id from {$g5['member_table']} where mb_level >= '{$level}' ";
|
||||||
$result = sql_query($sql);
|
$result = sql_query($sql);
|
||||||
$str = '<select id="' . $name . '" name="' . $name . '" ' . $event . '><option value="">선택안함</option>';
|
$str = '<select id="'.$name.'" name="'.$name.'" '.$event.'><option value="">선택안함</option>';
|
||||||
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||||
$str .= '<option value="' . $row['mb_id'] . '"';
|
{
|
||||||
if ($row['mb_id'] == $selected) {
|
$str .= '<option value="'.$row['mb_id'].'"';
|
||||||
$str .= ' selected';
|
if ($row['mb_id'] == $selected) $str .= ' selected';
|
||||||
}
|
$str .= '>'.$row['mb_id'].'</option>';
|
||||||
$str .= '>' . $row['mb_id'] . '</option>';
|
|
||||||
}
|
}
|
||||||
$str .= '</select>';
|
$str .= '</select>';
|
||||||
return $str;
|
return $str;
|
||||||
}
|
}
|
||||||
|
|
||||||
// php8 버전 호환 권한 검사 함수
|
|
||||||
function auth_check_menu($auth, $sub_menu, $attr, $return = false)
|
|
||||||
{
|
|
||||||
|
|
||||||
$check_auth = isset($auth[$sub_menu]) ? $auth[$sub_menu] : '';
|
|
||||||
return auth_check($check_auth, $attr, $return);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 권한 검사
|
// 권한 검사
|
||||||
function auth_check($auth, $attr, $return = false)
|
function auth_check($auth, $attr, $return=false)
|
||||||
{
|
{
|
||||||
global $is_admin;
|
global $is_admin;
|
||||||
|
|
||||||
if ($is_admin == 'super') {
|
if ($is_admin == 'super') return;
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!trim($auth)) {
|
if (!trim($auth)) {
|
||||||
$msg = '이 메뉴에는 접근 권한이 없습니다.\\n\\n접근 권한은 최고관리자만 부여할 수 있습니다.';
|
$msg = '이 메뉴에는 접근 권한이 없습니다.\\n\\n접근 권한은 최고관리자만 부여할 수 있습니다.';
|
||||||
if ($return) {
|
if($return)
|
||||||
return $msg;
|
return $msg;
|
||||||
} else {
|
else
|
||||||
alert($msg);
|
alert($msg);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$attr = strtolower($attr);
|
$attr = strtolower($attr);
|
||||||
|
|
||||||
if (strpos($auth, $attr) === false) {
|
if (!strstr($auth, $attr)) {
|
||||||
if ($attr == 'r') {
|
if ($attr == 'r') {
|
||||||
$msg = '읽을 권한이 없습니다.';
|
$msg = '읽을 권한이 없습니다.';
|
||||||
if ($return) {
|
if($return)
|
||||||
return $msg;
|
return $msg;
|
||||||
} else {
|
else
|
||||||
alert($msg);
|
alert($msg);
|
||||||
}
|
|
||||||
} else if ($attr == 'w') {
|
} else if ($attr == 'w') {
|
||||||
$msg = '입력, 추가, 생성, 수정 권한이 없습니다.';
|
$msg = '입력, 추가, 생성, 수정 권한이 없습니다.';
|
||||||
if ($return) {
|
if($return)
|
||||||
return $msg;
|
return $msg;
|
||||||
} else {
|
else
|
||||||
alert($msg);
|
alert($msg);
|
||||||
}
|
|
||||||
} else if ($attr == 'd') {
|
} else if ($attr == 'd') {
|
||||||
$msg = '삭제 권한이 없습니다.';
|
$msg = '삭제 권한이 없습니다.';
|
||||||
if ($return) {
|
if($return)
|
||||||
return $msg;
|
return $msg;
|
||||||
} else {
|
else
|
||||||
alert($msg);
|
alert($msg);
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
$msg = '속성이 잘못 되었습니다.';
|
$msg = '속성이 잘못 되었습니다.';
|
||||||
if ($return) {
|
if($return)
|
||||||
return $msg;
|
return $msg;
|
||||||
} else {
|
else
|
||||||
alert($msg);
|
alert($msg);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 작업아이콘 출력
|
// 작업아이콘 출력
|
||||||
function icon($act, $link = '', $target = '_parent')
|
function icon($act, $link='', $target='_parent')
|
||||||
{
|
{
|
||||||
global $g5;
|
global $g5;
|
||||||
|
|
||||||
$img = array('입력' => 'insert', '추가' => 'insert', '생성' => 'insert', '수정' => 'modify', '삭제' => 'delete', '이동' => 'move', '그룹' => 'move', '보기' => 'view', '미리보기' => 'view', '복사' => 'copy');
|
$img = array('입력'=>'insert', '추가'=>'insert', '생성'=>'insert', '수정'=>'modify', '삭제'=>'delete', '이동'=>'move', '그룹'=>'move', '보기'=>'view', '미리보기'=>'view', '복사'=>'copy');
|
||||||
$icon = '<img src="' . G5_ADMIN_PATH . '/img/icon_' . $img[$act] . '.gif" title="' . $act . '">';
|
$icon = '<img src="'.G5_ADMIN_PATH.'/img/icon_'.$img[$act].'.gif" title="'.$act.'">';
|
||||||
if ($link) {
|
if ($link)
|
||||||
$s = '<a href="' . $link . '">' . $icon . '</a>';
|
$s = '<a href="'.$link.'">'.$icon.'</a>';
|
||||||
} else {
|
else
|
||||||
$s = $icon;
|
$s = $icon;
|
||||||
}
|
|
||||||
return $s;
|
return $s;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -338,10 +299,9 @@ function rm_rf($file)
|
|||||||
if (file_exists($file)) {
|
if (file_exists($file)) {
|
||||||
if (is_dir($file)) {
|
if (is_dir($file)) {
|
||||||
$handle = opendir($file);
|
$handle = opendir($file);
|
||||||
while ($filename = readdir($handle)) {
|
while($filename = readdir($handle)) {
|
||||||
if ($filename != '.' && $filename != '..') {
|
if ($filename != '.' && $filename != '..')
|
||||||
rm_rf($file . '/' . $filename);
|
rm_rf($file.'/'.$filename);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
closedir($handle);
|
closedir($handle);
|
||||||
|
|
||||||
@@ -355,21 +315,21 @@ function rm_rf($file)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 입력 폼 안내문
|
// 입력 폼 안내문
|
||||||
function help($help = "")
|
function help($help="")
|
||||||
{
|
{
|
||||||
global $g5;
|
global $g5;
|
||||||
|
|
||||||
$str = '<span class="frm_info">' . str_replace("\n", "<br>", $help) . '</span>';
|
$str = '<span class="frm_info">'.str_replace("\n", "<br>", $help).'</span>';
|
||||||
|
|
||||||
return $str;
|
return $str;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 출력순서
|
// 출력순서
|
||||||
function order_select($fld, $sel = '')
|
function order_select($fld, $sel='')
|
||||||
{
|
{
|
||||||
$s = '<select name="' . $fld . '" id="' . $fld . '">';
|
$s = '<select name="'.$fld.'" id="'.$fld.'">';
|
||||||
for ($i = 1; $i <= 100; $i++) {
|
for ($i=1; $i<=100; $i++) {
|
||||||
$s .= '<option value="' . $i . '" ';
|
$s .= '<option value="'.$i.'" ';
|
||||||
if ($sel) {
|
if ($sel) {
|
||||||
if ($i == $sel) {
|
if ($i == $sel) {
|
||||||
$s .= 'selected';
|
$s .= 'selected';
|
||||||
@@ -379,7 +339,7 @@ function order_select($fld, $sel = '')
|
|||||||
$s .= 'selected';
|
$s .= 'selected';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$s .= '>' . $i . '</option>';
|
$s .= '>'.$i.'</option>';
|
||||||
}
|
}
|
||||||
$s .= '</select>';
|
$s .= '</select>';
|
||||||
|
|
||||||
@@ -389,118 +349,12 @@ function order_select($fld, $sel = '')
|
|||||||
// 불법접근을 막도록 토큰을 생성하면서 토큰값을 리턴
|
// 불법접근을 막도록 토큰을 생성하면서 토큰값을 리턴
|
||||||
function get_admin_token()
|
function get_admin_token()
|
||||||
{
|
{
|
||||||
$token = get_random_token_string(16);
|
$token = md5(uniqid(rand(), true));
|
||||||
set_session('ss_admin_token', $token);
|
set_session('ss_admin_token', $token);
|
||||||
|
|
||||||
return $token;
|
return $token;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 관리자가 자동등록방지를 사용해야 할 경우
|
|
||||||
function get_admin_captcha_by($type = 'get')
|
|
||||||
{
|
|
||||||
|
|
||||||
$captcha_name = 'ss_admin_use_captcha';
|
|
||||||
|
|
||||||
if ($type === 'remove') {
|
|
||||||
set_session($captcha_name, '');
|
|
||||||
}
|
|
||||||
|
|
||||||
return get_session($captcha_name);
|
|
||||||
}
|
|
||||||
|
|
||||||
//input value 에서 xss 공격 filter 역할을 함 ( 반드시 input value='' 타입에만 사용할것 )
|
|
||||||
function get_sanitize_input($s, $is_html = false)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (!$is_html) {
|
|
||||||
$s = strip_tags($s);
|
|
||||||
}
|
|
||||||
|
|
||||||
$s = htmlspecialchars($s, ENT_QUOTES, 'utf-8');
|
|
||||||
|
|
||||||
return $s;
|
|
||||||
}
|
|
||||||
|
|
||||||
function domain_mail_host($is_at=true){
|
|
||||||
list($domain_host,) = explode(':', $_SERVER['HTTP_HOST']);
|
|
||||||
|
|
||||||
if ('www.' === substr($domain_host, 0, 4)) {
|
|
||||||
$domain_host = substr($domain_host, 4);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $is_at ? '@'.$domain_host : $domain_host;
|
|
||||||
}
|
|
||||||
|
|
||||||
function check_log_folder($log_path, $is_delete = true)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (is_writable($log_path)) {
|
|
||||||
|
|
||||||
// 아파치 서버인 경우 웹에서 해당 폴더 접근 막기
|
|
||||||
$htaccess_file = $log_path . '/.htaccess';
|
|
||||||
if (!file_exists($htaccess_file)) {
|
|
||||||
if ($handle = @fopen($htaccess_file, 'w')) {
|
|
||||||
fwrite($handle, 'Order deny,allow' . "\n");
|
|
||||||
fwrite($handle, 'Deny from all' . "\n");
|
|
||||||
fclose($handle);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 아파치 서버인 경우 해당 디렉토리 파일 목록 안보이게 하기
|
|
||||||
$index_file = $log_path . '/index.php';
|
|
||||||
if (!file_exists($index_file)) {
|
|
||||||
if ($handle = @fopen($index_file, 'w')) {
|
|
||||||
fwrite($handle, '');
|
|
||||||
fclose($handle);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($is_delete) {
|
|
||||||
try {
|
|
||||||
// txt 파일과 log 파일을 조회하여 30일이 지난 파일은 삭제합니다.
|
|
||||||
$txt_files = glob($log_path . '/*.txt');
|
|
||||||
$log_files = glob($log_path . '/*.log');
|
|
||||||
|
|
||||||
$del_files = array_merge($txt_files, $log_files);
|
|
||||||
|
|
||||||
if ($del_files && is_array($del_files)) {
|
|
||||||
foreach ($del_files as $del_file) {
|
|
||||||
$filetime = filemtime($del_file);
|
|
||||||
// 30일이 지난 파일을 삭제
|
|
||||||
if ($filetime && $filetime < (G5_SERVER_TIME - 2592000)) {
|
|
||||||
@unlink($del_file);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (Exception $e) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 회원 본인확인 식별값과 인증 이력만 정리한다. 호출부에서 관리자 권한을 검증한다.
|
|
||||||
function admin_clear_member_certification($mb_id)
|
|
||||||
{
|
|
||||||
global $g5;
|
|
||||||
|
|
||||||
$esc_mb_id = sql_real_escape_string($mb_id);
|
|
||||||
$history_table = isset($g5['member_cert_history_table']) ? $g5['member_cert_history_table'] : G5_TABLE_PREFIX.'member_cert_history';
|
|
||||||
|
|
||||||
// 일반 회원정보(이름·연락처)와 이메일 인증 상태는 유지한다.
|
|
||||||
if (!sql_query(" update {$g5['member_table']}
|
|
||||||
set mb_certify = '', mb_adult = 0, mb_dupinfo = '', mb_birth = '', mb_sex = ''
|
|
||||||
where mb_id = '{$esc_mb_id}' ", false)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (!sql_query(" delete from {$history_table} where mb_id = '{$esc_mb_id}' ", false)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (!sql_query(" delete from {$g5['cert_history_table']} where mb_id = '{$esc_mb_id}' ", false)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// POST로 넘어온 토큰과 세션에 저장된 토큰 비교
|
// POST로 넘어온 토큰과 세션에 저장된 토큰 비교
|
||||||
function check_admin_token()
|
function check_admin_token()
|
||||||
@@ -508,37 +362,23 @@ function check_admin_token()
|
|||||||
$token = get_session('ss_admin_token');
|
$token = get_session('ss_admin_token');
|
||||||
set_session('ss_admin_token', '');
|
set_session('ss_admin_token', '');
|
||||||
|
|
||||||
if (!$token || !$_REQUEST['token'] || $token != $_REQUEST['token']) {
|
if(!$token || !$_REQUEST['token'] || $token != $_REQUEST['token'])
|
||||||
alert('올바른 방법으로 이용해 주십시오.', G5_URL);
|
alert('올바른 방법으로 이용해 주십시오.', G5_URL);
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function admin_csrf_token_key($is_must=0){
|
|
||||||
global $member;
|
|
||||||
|
|
||||||
$key = '';
|
|
||||||
|
|
||||||
if($is_must || !((isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest'))){
|
|
||||||
$key = md5((isset($_SERVER['SERVER_SOFTWARE']) ? $_SERVER['SERVER_SOFTWARE'] : '').(defined('G5_TOKEN_ENCRYPTION_KEY') ? G5_TOKEN_ENCRYPTION_KEY : '').$member['mb_id'].$_SERVER['DOCUMENT_ROOT']);
|
|
||||||
}
|
|
||||||
|
|
||||||
return run_replace('admin_csrf_token_key', $key, $is_must);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 관리자 페이지 referer 체크
|
// 관리자 페이지 referer 체크
|
||||||
function admin_referer_check($return = false)
|
function admin_referer_check($return=false)
|
||||||
{
|
{
|
||||||
$referer = isset($_SERVER['HTTP_REFERER']) ? trim($_SERVER['HTTP_REFERER']) : '';
|
$referer = trim($_SERVER['HTTP_REFERER']);
|
||||||
if (!$referer) {
|
if(!$referer) {
|
||||||
$msg = '정보가 올바르지 않습니다.';
|
$msg = '정보가 올바르지 않습니다.';
|
||||||
|
|
||||||
if ($return) {
|
if($return)
|
||||||
return $msg;
|
return $msg;
|
||||||
} else {
|
else
|
||||||
alert($msg, G5_URL);
|
alert($msg, G5_URL);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$p = @parse_url($referer);
|
$p = @parse_url($referer);
|
||||||
@@ -546,16 +386,16 @@ function admin_referer_check($return = false)
|
|||||||
$host = preg_replace('/:[0-9]+$/', '', $_SERVER['HTTP_HOST']);
|
$host = preg_replace('/:[0-9]+$/', '', $_SERVER['HTTP_HOST']);
|
||||||
$msg = '';
|
$msg = '';
|
||||||
|
|
||||||
if ($host != $p['host']) {
|
if($host != $p['host']) {
|
||||||
$msg = '올바른 방법으로 이용해 주십시오.';
|
$msg = '올바른 방법으로 이용해 주십시오.';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($p['path'] && !preg_match('/\/' . preg_quote(G5_ADMIN_DIR) . '\//i', $p['path'])) {
|
if( $p['path'] && ! preg_match( '/\/'.preg_quote(G5_ADMIN_DIR).'\//i', $p['path'] ) ){
|
||||||
$msg = '올바른 방법으로 이용해 주십시오';
|
$msg = '올바른 방법으로 이용해 주십시오';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($msg) {
|
if( $msg ){
|
||||||
if ($return) {
|
if($return) {
|
||||||
return $msg;
|
return $msg;
|
||||||
} else {
|
} else {
|
||||||
alert($msg, G5_URL);
|
alert($msg, G5_URL);
|
||||||
@@ -563,214 +403,41 @@ function admin_referer_check($return = false)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function admin_check_xss_params($params)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (!$params) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach ($params as $key => $value) {
|
|
||||||
|
|
||||||
if (empty($value)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (is_array($value)) {
|
|
||||||
admin_check_xss_params($value);
|
|
||||||
} else if (
|
|
||||||
(preg_match('/<\s?[^\>]*\/?\s?>/i', $value) && (preg_match('/script.*?\/script/ius', $value) || preg_match('/on[a-z]+=*/ius', $value))) || preg_match('/^(?=.*token\()(?=.*xmlhttprequest\()(?=.*send\().*$/im', $value) ||
|
|
||||||
(preg_match('/(on[a-z]+|focus)=.*/ius', $value) && preg_match('/(eval|atob|fetch|expression|exec|prompt)(\s*)\((.*)\)/ius', $value))) {
|
|
||||||
alert('요청 쿼리에 잘못된 스크립트문장이 있습니다.\\nXSS 공격일수도 있습니다.', G5_URL);
|
|
||||||
die();
|
|
||||||
} else if (preg_match('/atob\s*\(\s*[\'"]?([a-zA-Z0-9+\/=]+)[\'"]?\s*\)/ius', $value, $matches)) {
|
|
||||||
$decoded = base64_decode($matches[1], true);
|
|
||||||
if ($decoded && preg_match('/(eval|fetch|script|alert|settimeout|setinterval)/ius', $decoded)) {
|
|
||||||
// error_log("Base64 XSS 시도 감지: key=$key, decoded=$decoded, IP=" . $_SERVER['REMOTE_ADDR']);
|
|
||||||
alert('Base64로 인코딩된 위험한 스크립트가 발견되었습니다.', G5_URL);
|
|
||||||
die();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
function admin_menu_find_by($call, $search_key)
|
|
||||||
{
|
|
||||||
global $menu;
|
|
||||||
|
|
||||||
static $cache_menu = array();
|
|
||||||
|
|
||||||
if (empty($cache_menu)) {
|
|
||||||
foreach ($menu as $k1 => $arr1) {
|
|
||||||
|
|
||||||
if (empty($arr1)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
foreach ($arr1 as $k2 => $arr2) {
|
|
||||||
if (empty($arr2)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
$menu_key = isset($arr2[3]) ? $arr2[3] : '';
|
|
||||||
if (empty($menu_key)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
$cache_menu[$menu_key] = array(
|
|
||||||
'sub_menu' => $arr2[0],
|
|
||||||
'title' => $arr2[1],
|
|
||||||
'link' => $arr2[2],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($cache_menu[$call]) && isset($cache_menu[$call][$search_key])) {
|
|
||||||
return $cache_menu[$call][$search_key];
|
|
||||||
}
|
|
||||||
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
|
|
||||||
function admin_menu_local_path($url)
|
|
||||||
{
|
|
||||||
$url = (string) $url;
|
|
||||||
|
|
||||||
if (!$url) {
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
|
|
||||||
$url = preg_replace('/[?#].*$/', '', $url);
|
|
||||||
|
|
||||||
$maps = array(
|
|
||||||
G5_ADMIN_URL => G5_ADMIN_PATH,
|
|
||||||
);
|
|
||||||
|
|
||||||
if (defined('G5_SMS5_ADMIN_URL') && defined('G5_SMS5_ADMIN_PATH')) {
|
|
||||||
$maps[G5_SMS5_ADMIN_URL] = G5_SMS5_ADMIN_PATH;
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach ($maps as $base_url => $base_path) {
|
|
||||||
if (strpos($url, $base_url) !== 0) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
$path = $base_path.substr($url, strlen($base_url));
|
|
||||||
|
|
||||||
if (substr($path, -1) === '/') {
|
|
||||||
$path .= 'index.php';
|
|
||||||
}
|
|
||||||
|
|
||||||
return $path;
|
|
||||||
}
|
|
||||||
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
|
|
||||||
function admin_menu_is_super_only($menu_item)
|
|
||||||
{
|
|
||||||
static $cache = array();
|
|
||||||
|
|
||||||
$sub_menu = isset($menu_item[0]) ? (string) $menu_item[0] : '';
|
|
||||||
if (!$sub_menu) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($cache[$sub_menu])) {
|
|
||||||
return $cache[$sub_menu];
|
|
||||||
}
|
|
||||||
|
|
||||||
// 향후 메뉴 정의에서 명시적으로 최고관리자 전용 표시가 필요할 때 사용한다.
|
|
||||||
if (isset($menu_item[4]) && $menu_item[4] === 'super') {
|
|
||||||
return $cache[$sub_menu] = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
$path = admin_menu_local_path(isset($menu_item[2]) ? $menu_item[2] : '');
|
|
||||||
if (!$path || !is_readable($path)) {
|
|
||||||
return $cache[$sub_menu] = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
$content = file_get_contents($path, false, null, 0, 12000);
|
|
||||||
if ($content === false) {
|
|
||||||
return $cache[$sub_menu] = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
$pattern = '/if\s*\([^\)]*\$is_admin\s*(?:!==|!=)\s*[\'"]super[\'"][^\)]*\)\s*\{?[\s\S]{0,250}(?:alert|alert_close|die)\s*\([^\;]*(?:최고관리자만|최고관리자로)/u';
|
|
||||||
|
|
||||||
return $cache[$sub_menu] = (bool) preg_match($pattern, $content);
|
|
||||||
}
|
|
||||||
|
|
||||||
function admin_get_assignable_auth_menu()
|
|
||||||
{
|
|
||||||
global $menu;
|
|
||||||
|
|
||||||
$assignable_auth_menu = array();
|
|
||||||
|
|
||||||
if (!isset($menu) || !is_array($menu)) {
|
|
||||||
return $assignable_auth_menu;
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach ($menu as $menu_group) {
|
|
||||||
if (!is_array($menu_group)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
for ($i=1; $i<count($menu_group); $i++) {
|
|
||||||
if (!isset($menu_group[$i]) || !is_array($menu_group[$i])) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
$sub_menu = isset($menu_group[$i][0]) ? $menu_group[$i][0] : '';
|
|
||||||
if (!$sub_menu || $sub_menu === '-' || substr($sub_menu, -3) === '000') {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (admin_menu_is_super_only($menu_group[$i])) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
$assignable_auth_menu[$sub_menu] = isset($menu_group[$i][1]) ? $menu_group[$i][1] : '';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $assignable_auth_menu;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 접근 권한 검사
|
// 접근 권한 검사
|
||||||
if (!$member['mb_id']) {
|
if (!$member['mb_id'])
|
||||||
alert('로그인 하십시오.', G5_BBS_URL . '/login.php?url=' . urlencode(correct_goto_url(G5_ADMIN_URL)));
|
{
|
||||||
} else if ($is_admin != 'super') {
|
alert('로그인 하십시오.', G5_BBS_URL.'/login.php?url=' . urlencode(G5_ADMIN_URL));
|
||||||
|
}
|
||||||
|
else if ($is_admin != 'super')
|
||||||
|
{
|
||||||
$auth = array();
|
$auth = array();
|
||||||
$sql = " select au_menu, au_auth from {$g5['auth_table']} where mb_id = '{$member['mb_id']}' ";
|
$sql = " select au_menu, au_auth from {$g5['auth_table']} where mb_id = '{$member['mb_id']}' ";
|
||||||
$result = sql_query($sql);
|
$result = sql_query($sql);
|
||||||
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
for($i=0; $row=sql_fetch_array($result); $i++)
|
||||||
|
{
|
||||||
$auth[$row['au_menu']] = $row['au_auth'];
|
$auth[$row['au_menu']] = $row['au_auth'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$i) {
|
if (!$i)
|
||||||
|
{
|
||||||
alert('최고관리자 또는 관리권한이 있는 회원만 접근 가능합니다.', G5_URL);
|
alert('최고관리자 또는 관리권한이 있는 회원만 접근 가능합니다.', G5_URL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 관리자의 클라이언트를 검증하여 일치하지 않으면 세션을 끊고 관리자에게 메일을 보낸다.
|
// 관리자의 아이피, 브라우저와 다르다면 세션을 끊고 관리자에게 메일을 보낸다.
|
||||||
if (!verify_mb_key($member)) {
|
$admin_key = md5($member['mb_datetime'] . $_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT']);
|
||||||
|
if (get_session('ss_mb_key') !== $admin_key) {
|
||||||
|
|
||||||
session_destroy();
|
session_destroy();
|
||||||
|
|
||||||
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('정상적으로 로그인하여 접근하시기 바랍니다.');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($auth) && is_array($auth)) {
|
@ksort($auth);
|
||||||
@ksort($auth);
|
|
||||||
} else {
|
|
||||||
$auth = array();
|
|
||||||
}
|
|
||||||
|
|
||||||
// 가변 메뉴
|
// 가변 메뉴
|
||||||
unset($auth_menu);
|
unset($auth_menu);
|
||||||
@@ -779,51 +446,26 @@ unset($amenu);
|
|||||||
$tmp = dir(G5_ADMIN_PATH);
|
$tmp = dir(G5_ADMIN_PATH);
|
||||||
$menu_files = array();
|
$menu_files = array();
|
||||||
while ($entry = $tmp->read()) {
|
while ($entry = $tmp->read()) {
|
||||||
if (!preg_match('/^admin.menu([0-9]{3}).*\.php$/', $entry, $m)) {
|
if (!preg_match('/^admin.menu([0-9]{3}).*\.php$/', $entry, $m))
|
||||||
continue; // 파일명이 menu 으로 시작하지 않으면 무시한다.
|
continue; // 파일명이 menu 으로 시작하지 않으면 무시한다.
|
||||||
}
|
|
||||||
|
|
||||||
$amenu[$m[1]] = $entry;
|
$amenu[$m[1]] = $entry;
|
||||||
$menu_files[] = G5_ADMIN_PATH . '/' . $entry;
|
$menu_files[] = G5_ADMIN_PATH.'/'.$entry;
|
||||||
}
|
}
|
||||||
@asort($menu_files);
|
@asort($menu_files);
|
||||||
foreach ($menu_files as $file) {
|
foreach($menu_files as $file){
|
||||||
include_once $file;
|
include_once($file);
|
||||||
}
|
}
|
||||||
@ksort($amenu);
|
@ksort($amenu);
|
||||||
|
|
||||||
$amenu = run_replace('admin_amenu', $amenu);
|
|
||||||
if (isset($menu) && $menu) {
|
|
||||||
$menu = run_replace('admin_menu', $menu);
|
|
||||||
}
|
|
||||||
|
|
||||||
$arr_query = array();
|
$arr_query = array();
|
||||||
if (isset($sst)) {
|
if (isset($sst)) $arr_query[] = 'sst='.$sst;
|
||||||
$arr_query[] = 'sst=' . $sst;
|
if (isset($sod)) $arr_query[] = 'sod='.$sod;
|
||||||
}
|
if (isset($sfl)) $arr_query[] = 'sfl='.$sfl;
|
||||||
if (isset($sod)) {
|
if (isset($stx)) $arr_query[] = 'stx='.$stx;
|
||||||
$arr_query[] = 'sod=' . $sod;
|
if (isset($page)) $arr_query[] = 'page='.$page;
|
||||||
}
|
|
||||||
if (isset($sfl)) {
|
|
||||||
$arr_query[] = 'sfl=' . $sfl;
|
|
||||||
}
|
|
||||||
if (isset($stx)) {
|
|
||||||
$arr_query[] = 'stx=' . $stx;
|
|
||||||
}
|
|
||||||
if (isset($page)) {
|
|
||||||
$arr_query[] = 'page=' . $page;
|
|
||||||
}
|
|
||||||
$qstr = implode("&", $arr_query);
|
$qstr = implode("&", $arr_query);
|
||||||
|
|
||||||
if (isset($_REQUEST) && $_REQUEST) {
|
// 관리자에서는 추가 스크립트는 사용하지 않는다.
|
||||||
if (admin_referer_check(true)) {
|
//$config['cf_add_script'] = '';
|
||||||
admin_check_xss_params($_REQUEST);
|
?>
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 관리자에서는 추가 스크립트와 추가 매타태그, 방문자분석 스크립트가 실행되지 않게 빈값으로 합니다.
|
|
||||||
if (run_replace('safe_admin_add_script_boolean', false) === false) {
|
|
||||||
$config['cf_analytics'] = '';
|
|
||||||
$config['cf_add_script'] = '';
|
|
||||||
$config['cf_add_meta'] = '';
|
|
||||||
}
|
|
||||||
+18
-19
@@ -1,24 +1,23 @@
|
|||||||
<?php
|
<?php
|
||||||
$menu['menu100'] = array(
|
$menu['menu100'] = array (
|
||||||
array('100000', '환경설정', G5_ADMIN_URL . '/config_form.php', 'config'),
|
array('100000', '환경설정', G5_ADMIN_URL.'/config_form.php', 'config'),
|
||||||
array('100100', '기본환경설정', G5_ADMIN_URL . '/config_form.php', 'cf_basic'),
|
array('100100', '기본환경설정', G5_ADMIN_URL.'/config_form.php', 'cf_basic'),
|
||||||
array('100200', '관리권한설정', G5_ADMIN_URL . '/auth_list.php', 'cf_auth'),
|
array('100200', '관리권한설정', G5_ADMIN_URL.'/auth_list.php', 'cf_auth'),
|
||||||
array('100280', '테마설정', G5_ADMIN_URL . '/theme.php', 'cf_theme', 1),
|
array('100280', '테마설정', G5_ADMIN_URL.'/theme.php', 'cf_theme', 1),
|
||||||
array('100290', '메뉴설정', G5_ADMIN_URL . '/menu_list.php', 'cf_menu', 1),
|
array('100290', '메뉴설정', G5_ADMIN_URL.'/menu_list.php', 'cf_menu', 1),
|
||||||
array('100300', '메일 테스트', G5_ADMIN_URL . '/sendmail_test.php', 'cf_mailtest'),
|
array('100300', '메일 테스트', G5_ADMIN_URL.'/sendmail_test.php', 'cf_mailtest'),
|
||||||
array('100310', '팝업레이어관리', G5_ADMIN_URL . '/newwinlist.php', 'scf_poplayer'),
|
array('100310', '팝업레이어관리', G5_ADMIN_URL.'/newwinlist.php', 'scf_poplayer'),
|
||||||
array('100800', '세션파일 일괄삭제', G5_ADMIN_URL . '/session_file_delete.php', 'cf_session', 1),
|
array('100800', '세션파일 일괄삭제',G5_ADMIN_URL.'/session_file_delete.php', 'cf_session', 1),
|
||||||
array('100900', '캐시파일 일괄삭제', G5_ADMIN_URL . '/cache_file_delete.php', 'cf_cache', 1),
|
array('100900', '캐시파일 일괄삭제',G5_ADMIN_URL.'/cache_file_delete.php', 'cf_cache', 1),
|
||||||
array('100910', '캡챠파일 일괄삭제', G5_ADMIN_URL . '/captcha_file_delete.php', 'cf_captcha', 1),
|
array('100910', '캡챠파일 일괄삭제',G5_ADMIN_URL.'/captcha_file_delete.php', 'cf_captcha', 1),
|
||||||
array('100920', '썸네일파일 일괄삭제', G5_ADMIN_URL . '/thumbnail_file_delete.php', 'cf_thumbnail', 1),
|
array('100920', '썸네일파일 일괄삭제',G5_ADMIN_URL.'/thumbnail_file_delete.php', 'cf_thumbnail', 1),
|
||||||
array('100930', '회원관리파일 일괄삭제', G5_ADMIN_URL . '/member_list_file_delete.php', 'cf_memberlist', 1),
|
array('100500', 'phpinfo()', G5_ADMIN_URL.'/phpinfo.php', 'cf_phpinfo')
|
||||||
array('100500', 'phpinfo()', G5_ADMIN_URL . '/phpinfo.php', 'cf_phpinfo')
|
|
||||||
);
|
);
|
||||||
|
|
||||||
if (version_compare(phpversion(), '5.3.0', '>=') && defined('G5_BROWSCAP_USE') && G5_BROWSCAP_USE) {
|
if(version_compare(phpversion(), '5.3.0', '>=') && defined('G5_BROWSCAP_USE') && G5_BROWSCAP_USE) {
|
||||||
$menu['menu100'][] = array('100510', 'Browscap 업데이트', G5_ADMIN_URL . '/browscap.php', 'cf_browscap');
|
$menu['menu100'][] = array('100510', 'Browscap 업데이트', G5_ADMIN_URL.'/browscap.php', 'cf_browscap');
|
||||||
$menu['menu100'][] = array('100520', '접속로그 변환', G5_ADMIN_URL . '/browscap_convert.php', 'cf_visit_cnvrt');
|
$menu['menu100'][] = array('100520', '접속로그 변환', G5_ADMIN_URL.'/browscap_convert.php', 'cf_visit_cnvrt');
|
||||||
}
|
}
|
||||||
|
|
||||||
$menu['menu100'][] = array('100410', 'DB업그레이드', G5_ADMIN_URL . '/dbupgrade.php', 'db_upgrade');
|
$menu['menu100'][] = array('100400', '부가서비스', G5_ADMIN_URL.'/service.php', 'cf_service');
|
||||||
$menu['menu100'][] = array('100400', '부가서비스', G5_ADMIN_URL . '/service.php', 'cf_service');
|
?>
|
||||||
+10
-10
@@ -1,12 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
$menu['menu200'] = array(
|
$menu['menu200'] = array (
|
||||||
array('200000', '회원관리', G5_ADMIN_URL . '/member_list.php', 'member'),
|
array('200000', '회원관리', G5_ADMIN_URL.'/member_list.php', 'member'),
|
||||||
array('200100', '회원관리', G5_ADMIN_URL . '/member_list.php', 'mb_list'),
|
array('200100', '회원관리', G5_ADMIN_URL.'/member_list.php', 'mb_list'),
|
||||||
array('200400', '회원관리파일', G5_ADMIN_URL . '/member_list_exel.php', 'mb_list'),
|
array('200300', '회원메일발송', G5_ADMIN_URL.'/mail_list.php', 'mb_mail'),
|
||||||
array('200300', '회원메일발송', G5_ADMIN_URL . '/mail_list.php', 'mb_mail'),
|
array('200800', '접속자집계', G5_ADMIN_URL.'/visit_list.php', 'mb_visit', 1),
|
||||||
array('200800', '접속자집계', G5_ADMIN_URL . '/visit_list.php', 'mb_visit', 1),
|
array('200810', '접속자검색', G5_ADMIN_URL.'/visit_search.php', 'mb_search', 1),
|
||||||
array('200810', '접속자검색', G5_ADMIN_URL . '/visit_search.php', 'mb_search', 1),
|
array('200820', '접속자로그삭제', G5_ADMIN_URL.'/visit_delete.php', 'mb_delete', 1),
|
||||||
array('200820', '접속자로그삭제', G5_ADMIN_URL . '/visit_delete.php', 'mb_delete', 1),
|
array('200200', '포인트관리', G5_ADMIN_URL.'/point_list.php', 'mb_point'),
|
||||||
array('200200', '포인트관리', G5_ADMIN_URL . '/point_list.php', 'mb_point'),
|
array('200900', '투표관리', G5_ADMIN_URL.'/poll_list.php', 'mb_poll')
|
||||||
array('200900', '투표관리', G5_ADMIN_URL . '/poll_list.php', 'mb_poll')
|
|
||||||
);
|
);
|
||||||
|
?>
|
||||||
+11
-10
@@ -1,12 +1,13 @@
|
|||||||
<?php
|
<?php
|
||||||
$menu['menu300'] = array(
|
$menu['menu300'] = array (
|
||||||
array('300000', '게시판관리', '' . G5_ADMIN_URL . '/board_list.php', 'board'),
|
array('300000', '게시판관리', ''.G5_ADMIN_URL.'/board_list.php', 'board'),
|
||||||
array('300100', '게시판관리', '' . G5_ADMIN_URL . '/board_list.php', 'bbs_board'),
|
array('300100', '게시판관리', ''.G5_ADMIN_URL.'/board_list.php', 'bbs_board'),
|
||||||
array('300200', '게시판그룹관리', '' . G5_ADMIN_URL . '/boardgroup_list.php', 'bbs_group'),
|
array('300200', '게시판그룹관리', ''.G5_ADMIN_URL.'/boardgroup_list.php', 'bbs_group'),
|
||||||
array('300300', '인기검색어관리', '' . G5_ADMIN_URL . '/popular_list.php', 'bbs_poplist', 1),
|
array('300300', '인기검색어관리', ''.G5_ADMIN_URL.'/popular_list.php', 'bbs_poplist', 1),
|
||||||
array('300400', '인기검색어순위', '' . G5_ADMIN_URL . '/popular_rank.php', 'bbs_poprank', 1),
|
array('300400', '인기검색어순위', ''.G5_ADMIN_URL.'/popular_rank.php', 'bbs_poprank', 1),
|
||||||
array('300500', '1:1문의설정', '' . G5_ADMIN_URL . '/qa_config.php', 'qa'),
|
array('300500', '1:1문의설정', ''.G5_ADMIN_URL.'/qa_config.php', 'qa'),
|
||||||
array('300600', '내용관리', G5_ADMIN_URL . '/contentlist.php', 'scf_contents', 1),
|
array('300600', '내용관리', G5_ADMIN_URL.'/contentlist.php', 'scf_contents', 1),
|
||||||
array('300700', 'FAQ관리', G5_ADMIN_URL . '/faqmasterlist.php', 'scf_faq', 1),
|
array('300700', 'FAQ관리', G5_ADMIN_URL.'/faqmasterlist.php', 'scf_faq', 1),
|
||||||
array('300820', '글,댓글 현황', G5_ADMIN_URL . '/write_count.php', 'scf_write_count'),
|
array('300820', '글,댓글 현황', G5_ADMIN_URL.'/write_count.php', 'scf_write_count'),
|
||||||
);
|
);
|
||||||
|
?>
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
<?php
|
|
||||||
if (!defined('G5_USE_SHOP') || !G5_USE_SHOP) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
global $default;
|
|
||||||
|
|
||||||
$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),
|
|
||||||
);
|
|
||||||
|
|
||||||
// 결제방식이 KG이니시스이고 INIpay PRO를 사용할 때만 노출한다.
|
|
||||||
if (isset($default['de_pg_service']) && $default['de_pg_service'] === 'inicis' && !empty($default['de_inicis_pro_use'])) {
|
|
||||||
$menu['menu400'][] = array('400420', 'KG이니시스 PRO 현황', G5_ADMIN_URL . '/shop_admin/inicisloglist.php', 'scf_inicis_log');
|
|
||||||
}
|
|
||||||
@@ -1,17 +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)
|
|
||||||
);
|
|
||||||
+15
-14
@@ -1,14 +1,15 @@
|
|||||||
<?php
|
<?php
|
||||||
$menu["menu900"] = array(
|
$menu["menu900"] = array (
|
||||||
array('900000', 'SMS 관리', '' . G5_SMS5_ADMIN_URL . '/config.php', 'sms5'),
|
array('900000', 'SMS 관리', ''.G5_SMS5_ADMIN_URL.'/config.php', 'sms5'),
|
||||||
array('900100', 'SMS 기본설정', '' . G5_SMS5_ADMIN_URL . '/config.php', 'sms5_config'),
|
array('900100', 'SMS 기본설정', ''.G5_SMS5_ADMIN_URL.'/config.php', 'sms5_config'),
|
||||||
array('900200', '회원정보업데이트', '' . G5_SMS5_ADMIN_URL . '/member_update.php', 'sms5_mb_update'),
|
array('900200', '회원정보업데이트', ''.G5_SMS5_ADMIN_URL.'/member_update.php', 'sms5_mb_update'),
|
||||||
array('900300', '문자 보내기', '' . G5_SMS5_ADMIN_URL . '/sms_write.php', 'sms_write'),
|
array('900300', '문자 보내기', ''.G5_SMS5_ADMIN_URL.'/sms_write.php', 'sms_write'),
|
||||||
array('900400', '전송내역-건별', '' . G5_SMS5_ADMIN_URL . '/history_list.php', 'sms_history', 1),
|
array('900400', '전송내역-건별', ''.G5_SMS5_ADMIN_URL.'/history_list.php', 'sms_history' , 1),
|
||||||
array('900410', '전송내역-번호별', '' . G5_SMS5_ADMIN_URL . '/history_num.php', 'sms_history_num', 1),
|
array('900410', '전송내역-번호별', ''.G5_SMS5_ADMIN_URL.'/history_num.php', 'sms_history_num' , 1),
|
||||||
array('900500', '이모티콘 그룹', '' . G5_SMS5_ADMIN_URL . '/form_group.php', 'emoticon_group'),
|
array('900500', '이모티콘 그룹', ''.G5_SMS5_ADMIN_URL.'/form_group.php' , 'emoticon_group'),
|
||||||
array('900600', '이모티콘 관리', '' . G5_SMS5_ADMIN_URL . '/form_list.php', 'emoticon_list'),
|
array('900600', '이모티콘 관리', ''.G5_SMS5_ADMIN_URL.'/form_list.php', 'emoticon_list'),
|
||||||
array('900700', '휴대폰번호 그룹', '' . G5_SMS5_ADMIN_URL . '/num_group.php', 'hp_group', 1),
|
array('900700', '휴대폰번호 그룹', ''.G5_SMS5_ADMIN_URL.'/num_group.php' , 'hp_group', 1),
|
||||||
array('900800', '휴대폰번호 관리', '' . G5_SMS5_ADMIN_URL . '/num_book.php', 'hp_manage', 1),
|
array('900800', '휴대폰번호 관리', ''.G5_SMS5_ADMIN_URL.'/num_book.php', 'hp_manage', 1),
|
||||||
array('900900', '휴대폰번호 파일', '' . G5_SMS5_ADMIN_URL . '/num_book_file.php', 'hp_file', 1)
|
array('900900', '휴대폰번호 파일', ''.G5_SMS5_ADMIN_URL.'/num_book_file.php' , 'hp_file', 1)
|
||||||
);
|
);
|
||||||
|
?>
|
||||||
+117
-136
@@ -1,173 +1,154 @@
|
|||||||
<?php
|
<?php
|
||||||
if (!defined('_GNUBOARD_')) {
|
if (!defined('_GNUBOARD_')) exit;
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 그누보드5.4.5.5 버전과 영카트5.4.5.5.1 버전이 통합됨에 따라 그누보드 버전만 표시
|
$print_version = defined('G5_YOUNGCART_VER') ? 'YoungCart Version '.G5_YOUNGCART_VER : 'Version '.G5_GNUBOARD_VER;
|
||||||
// $print_version = defined('G5_YOUNGCART_VER') ? 'YoungCart Version '.G5_YOUNGCART_VER : 'Version '.G5_GNUBOARD_VER;
|
|
||||||
$print_version = ($is_admin == 'super') ? 'Version ' . G5_GNUBOARD_VER : '';
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<noscript>
|
<noscript>
|
||||||
<p>
|
<p>
|
||||||
귀하께서 사용하시는 브라우저는 현재 <strong>자바스크립트를 사용하지 않음</strong>으로 설정되어 있습니다.<br>
|
귀하께서 사용하시는 브라우저는 현재 <strong>자바스크립트를 사용하지 않음</strong>으로 설정되어 있습니다.<br>
|
||||||
<strong>자바스크립트를 사용하지 않음</strong>으로 설정하신 경우는 수정이나 삭제시 별도의 경고창이 나오지 않으므로 이점 주의하시기 바랍니다.
|
<strong>자바스크립트를 사용하지 않음</strong>으로 설정하신 경우는 수정이나 삭제시 별도의 경고창이 나오지 않으므로 이점 주의하시기 바랍니다.
|
||||||
</p>
|
</p>
|
||||||
</noscript>
|
</noscript>
|
||||||
</div>
|
|
||||||
<footer id="ft">
|
|
||||||
<p>
|
|
||||||
Copyright © <?php echo htmlspecialchars($_SERVER['HTTP_HOST']); ?>. All rights reserved. <?php echo $print_version; ?><br>
|
|
||||||
<button type="button" class="scroll_top"><span class="top_img"></span><span class="top_txt">TOP</span></button>
|
|
||||||
</p>
|
|
||||||
</footer>
|
|
||||||
|
|
||||||
<!-- 공통 레이어 팝업 컨테이너 -->
|
</div>
|
||||||
<div id="adminPopupContainer">
|
<footer id="ft">
|
||||||
<div id="popupOverlay" class="popup-overlay is-hidden" onclick="PopupManager.close('popupOverlay')">
|
<p>
|
||||||
<div class="popup-content" onclick="event.stopPropagation()">
|
Copyright © <?php echo $_SERVER['HTTP_HOST']; ?>. All rights reserved. <?php echo $print_version; ?><br>
|
||||||
<div class="popup-header">
|
<button type="button" class="scroll_top"><span class="top_img"></span><span class="top_txt">TOP</span></button>
|
||||||
<strong id="popupTitle" class="popup-title"></strong>
|
</p>
|
||||||
<button type="button" class="popup-close-btn" onclick="PopupManager.close('popupOverlay')">
|
</footer>
|
||||||
<i class="fa fa-close"></i><span class="sound_only">팝업 닫기</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div class="popup-body" id="popupBody">
|
|
||||||
<!-- 동적으로 내용 주입 -->
|
|
||||||
</div>
|
|
||||||
<div class="popup-footer" id="popupFooter">
|
|
||||||
<!-- 버튼 등 동적으로 -->
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(".scroll_top").click(function() {
|
$(".scroll_top").click(function(){
|
||||||
$("body,html").animate({
|
$("body,html").animate({scrollTop:0},400);
|
||||||
scrollTop: 0
|
})
|
||||||
}, 400);
|
|
||||||
})
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- <p>실행시간 : <?php echo get_microtime() - $begin_time; ?> -->
|
<!-- <p>실행시간 : <?php echo get_microtime() - $begin_time; ?> -->
|
||||||
|
|
||||||
<script src="<?php echo get_versioned_asset_url(G5_ADMIN_URL.'/admin.js'); ?>"></script>
|
<script src="<?php echo G5_ADMIN_URL ?>/admin.js?ver=<?php echo G5_JS_VER; ?>"></script>
|
||||||
<script src="<?php echo get_versioned_asset_url(G5_JS_URL.'/jquery.anchorScroll.js'); ?>"></script>
|
<script src="<?php echo G5_JS_URL ?>/jquery.anchorScroll.js?ver=<?php echo G5_JS_VER; ?>"></script>
|
||||||
<script>
|
<script>
|
||||||
$(function() {
|
$(function(){
|
||||||
|
|
||||||
var admin_head_height = $("#hd_top").height() + $("#container_title").height() + 5;
|
var admin_head_height = $("#hd_top").height() + $("#container_title").height() + 5;
|
||||||
|
|
||||||
$("a[href^='#']").anchorScroll({
|
$("a[href^='#']").anchorScroll({
|
||||||
scrollSpeed: 0, // scroll speed
|
scrollSpeed: 0, // scroll speed
|
||||||
offsetTop: admin_head_height, // offset for fixed top bars (defaults to 0)
|
offsetTop: admin_head_height, // offset for fixed top bars (defaults to 0)
|
||||||
onScroll: function() {
|
onScroll: function () {
|
||||||
// callback on scroll start
|
// callback on scroll start
|
||||||
},
|
},
|
||||||
scrollEnd: function() {
|
scrollEnd: function () {
|
||||||
// callback on scroll end
|
// callback on scroll end
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var hide_menu = false;
|
var hide_menu = false;
|
||||||
var mouse_event = false;
|
var mouse_event = false;
|
||||||
var oldX = oldY = 0;
|
var oldX = oldY = 0;
|
||||||
|
|
||||||
$(document).mousemove(function(e) {
|
$(document).mousemove(function(e) {
|
||||||
if (oldX == 0) {
|
if(oldX == 0) {
|
||||||
oldX = e.pageX;
|
oldX = e.pageX;
|
||||||
oldY = e.pageY;
|
oldY = e.pageY;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (oldX != e.pageX || oldY != e.pageY) {
|
if(oldX != e.pageX || oldY != e.pageY) {
|
||||||
mouse_event = true;
|
mouse_event = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// 주메뉴
|
// 주메뉴
|
||||||
var $gnb = $(".gnb_1dli > a");
|
var $gnb = $(".gnb_1dli > a");
|
||||||
$gnb.mouseover(function() {
|
$gnb.mouseover(function() {
|
||||||
if (mouse_event) {
|
if(mouse_event) {
|
||||||
$(".gnb_1dli").removeClass("gnb_1dli_over gnb_1dli_over2 gnb_1dli_on");
|
|
||||||
$(this).parent().addClass("gnb_1dli_over gnb_1dli_on");
|
|
||||||
menu_rearrange($(this).parent());
|
|
||||||
hide_menu = false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$gnb.mouseout(function() {
|
|
||||||
hide_menu = true;
|
|
||||||
});
|
|
||||||
|
|
||||||
$(".gnb_2dli").mouseover(function() {
|
|
||||||
hide_menu = false;
|
|
||||||
});
|
|
||||||
|
|
||||||
$(".gnb_2dli").mouseout(function() {
|
|
||||||
hide_menu = true;
|
|
||||||
});
|
|
||||||
|
|
||||||
$gnb.focusin(function() {
|
|
||||||
$(".gnb_1dli").removeClass("gnb_1dli_over gnb_1dli_over2 gnb_1dli_on");
|
$(".gnb_1dli").removeClass("gnb_1dli_over gnb_1dli_over2 gnb_1dli_on");
|
||||||
$(this).parent().addClass("gnb_1dli_over gnb_1dli_on");
|
$(this).parent().addClass("gnb_1dli_over gnb_1dli_on");
|
||||||
menu_rearrange($(this).parent());
|
menu_rearrange($(this).parent());
|
||||||
hide_menu = false;
|
hide_menu = false;
|
||||||
});
|
|
||||||
|
|
||||||
$gnb.focusout(function() {
|
|
||||||
hide_menu = true;
|
|
||||||
});
|
|
||||||
|
|
||||||
$(".gnb_2da").focusin(function() {
|
|
||||||
$(".gnb_1dli").removeClass("gnb_1dli_over gnb_1dli_over2 gnb_1dli_on");
|
|
||||||
var $gnb_li = $(this).closest(".gnb_1dli").addClass("gnb_1dli_over gnb_1dli_on");
|
|
||||||
menu_rearrange($(this).closest(".gnb_1dli"));
|
|
||||||
hide_menu = false;
|
|
||||||
});
|
|
||||||
|
|
||||||
$(".gnb_2da").focusout(function() {
|
|
||||||
hide_menu = true;
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#gnb_1dul>li').bind('mouseleave', function() {
|
|
||||||
submenu_hide();
|
|
||||||
});
|
|
||||||
|
|
||||||
$(document).bind('click focusin', function() {
|
|
||||||
if (hide_menu) {
|
|
||||||
submenu_hide();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// 폰트 리사이즈 쿠키있으면 실행
|
|
||||||
var font_resize_act = get_cookie("ck_font_resize_act");
|
|
||||||
if (font_resize_act != "") {
|
|
||||||
font_resize("container", font_resize_act);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
function submenu_hide() {
|
$gnb.mouseout(function() {
|
||||||
|
hide_menu = true;
|
||||||
|
});
|
||||||
|
|
||||||
|
$(".gnb_2dli").mouseover(function() {
|
||||||
|
hide_menu = false;
|
||||||
|
});
|
||||||
|
|
||||||
|
$(".gnb_2dli").mouseout(function() {
|
||||||
|
hide_menu = true;
|
||||||
|
});
|
||||||
|
|
||||||
|
$gnb.focusin(function() {
|
||||||
$(".gnb_1dli").removeClass("gnb_1dli_over gnb_1dli_over2 gnb_1dli_on");
|
$(".gnb_1dli").removeClass("gnb_1dli_over gnb_1dli_over2 gnb_1dli_on");
|
||||||
}
|
$(this).parent().addClass("gnb_1dli_over gnb_1dli_on");
|
||||||
|
menu_rearrange($(this).parent());
|
||||||
|
hide_menu = false;
|
||||||
|
});
|
||||||
|
|
||||||
function menu_rearrange(el) {
|
$gnb.focusout(function() {
|
||||||
var width = $("#gnb_1dul").width();
|
hide_menu = true;
|
||||||
var left = w1 = w2 = 0;
|
});
|
||||||
var idx = $(".gnb_1dli").index(el);
|
|
||||||
|
|
||||||
for (i = 0; i <= idx; i++) {
|
$(".gnb_2da").focusin(function() {
|
||||||
w1 = $(".gnb_1dli:eq(" + i + ")").outerWidth();
|
$(".gnb_1dli").removeClass("gnb_1dli_over gnb_1dli_over2 gnb_1dli_on");
|
||||||
w2 = $(".gnb_2dli > a:eq(" + i + ")").outerWidth(true);
|
var $gnb_li = $(this).closest(".gnb_1dli").addClass("gnb_1dli_over gnb_1dli_on");
|
||||||
|
menu_rearrange($(this).closest(".gnb_1dli"));
|
||||||
|
hide_menu = false;
|
||||||
|
});
|
||||||
|
|
||||||
if ((left + w2) > width) {
|
$(".gnb_2da").focusout(function() {
|
||||||
el.removeClass("gnb_1dli_over").addClass("gnb_1dli_over2");
|
hide_menu = true;
|
||||||
}
|
});
|
||||||
|
|
||||||
left += w1;
|
$('#gnb_1dul>li').bind('mouseleave',function(){
|
||||||
|
submenu_hide();
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).bind('click focusin',function(){
|
||||||
|
if(hide_menu) {
|
||||||
|
submenu_hide();
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 폰트 리사이즈 쿠키있으면 실행
|
||||||
|
var font_resize_act = get_cookie("ck_font_resize_act");
|
||||||
|
if(font_resize_act != "") {
|
||||||
|
font_resize("container", font_resize_act);
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
function submenu_hide() {
|
||||||
|
$(".gnb_1dli").removeClass("gnb_1dli_over gnb_1dli_over2 gnb_1dli_on");
|
||||||
|
}
|
||||||
|
|
||||||
|
function menu_rearrange(el)
|
||||||
|
{
|
||||||
|
var width = $("#gnb_1dul").width();
|
||||||
|
var left = w1 = w2 = 0;
|
||||||
|
var idx = $(".gnb_1dli").index(el);
|
||||||
|
|
||||||
|
for(i=0; i<=idx; i++) {
|
||||||
|
w1 = $(".gnb_1dli:eq("+i+")").outerWidth();
|
||||||
|
w2 = $(".gnb_2dli > a:eq("+i+")").outerWidth(true);
|
||||||
|
|
||||||
|
if((left + w2) > width) {
|
||||||
|
el.removeClass("gnb_1dli_over").addClass("gnb_1dli_over2");
|
||||||
|
}
|
||||||
|
|
||||||
|
left += w1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
require_once G5_PATH . '/tail.sub.php';
|
include_once(G5_PATH.'/tail.sub.php');
|
||||||
|
?>
|
||||||
+6
-11
@@ -1,19 +1,14 @@
|
|||||||
<?php
|
<?php
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
|
include_once(G5_LIB_PATH.'/json.lib.php');
|
||||||
|
|
||||||
set_session('ss_admin_token', '');
|
set_session('ss_admin_token', '');
|
||||||
|
|
||||||
$admin_csrf_token_key = isset($_POST['admin_csrf_token_key']) ? $_POST['admin_csrf_token_key'] : '';
|
|
||||||
|
|
||||||
if(function_exists('admin_csrf_token_key') && $admin_csrf_token_key !== admin_csrf_token_key(1)){
|
|
||||||
die(json_encode(array('error' => '토큰키 에러!', 'url' => G5_URL)));
|
|
||||||
}
|
|
||||||
|
|
||||||
$error = admin_referer_check(true);
|
$error = admin_referer_check(true);
|
||||||
if ($error) {
|
if($error)
|
||||||
die(json_encode(array('error' => $error, 'url' => G5_URL)));
|
die(json_encode(array('error'=>$error, 'url'=>G5_URL)));
|
||||||
}
|
|
||||||
|
|
||||||
$token = get_admin_token();
|
$token = get_admin_token();
|
||||||
|
|
||||||
die(json_encode(array('error' => '', 'token' => $token, 'url' => '')));
|
die(json_encode(array('error'=>'', 'token'=>$token, 'url'=>'')));
|
||||||
|
?>
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once './_common.php';
|
|
||||||
|
|
||||||
if (isset($_POST['admin_use_captcha'])) {
|
|
||||||
set_session('ss_admin_use_captcha', true);
|
|
||||||
}
|
|
||||||
+168
-198
@@ -1,23 +1,17 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "100200";
|
$sub_menu = "100200";
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
|
|
||||||
if ($is_admin != 'super') {
|
if ($is_admin != 'super')
|
||||||
alert('최고관리자만 접근 가능합니다.');
|
alert('최고관리자만 접근 가능합니다.');
|
||||||
}
|
|
||||||
|
|
||||||
$sql_common = " from {$g5['auth_table']} a left join {$g5['member_table']} b on (a.mb_id=b.mb_id) ";
|
$sql_common = " from {$g5['auth_table']} a left join {$g5['member_table']} b on (a.mb_id=b.mb_id) ";
|
||||||
|
|
||||||
$allowed_sfl = array('a.mb_id');
|
|
||||||
if (!in_array($sfl, $allowed_sfl)) {
|
|
||||||
$sfl = 'a.mb_id';
|
|
||||||
}
|
|
||||||
|
|
||||||
$sql_search = " where (1) ";
|
$sql_search = " where (1) ";
|
||||||
if ($stx) {
|
if ($stx) {
|
||||||
$sql_search .= " and ( ";
|
$sql_search .= " and ( ";
|
||||||
switch ($sfl) {
|
switch ($sfl) {
|
||||||
default:
|
default :
|
||||||
$sql_search .= " ({$sfl} like '%{$stx}%') ";
|
$sql_search .= " ({$sfl} like '%{$stx}%') ";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -28,9 +22,6 @@ if (!$sst) {
|
|||||||
$sst = "a.mb_id, au_menu";
|
$sst = "a.mb_id, au_menu";
|
||||||
$sod = "";
|
$sod = "";
|
||||||
}
|
}
|
||||||
$allowed_sst = array('a.mb_id', 'mb_nick', 'au_menu', 'au_auth', 'a.mb_id, au_menu');
|
|
||||||
if ($sst && !in_array($sst, $allowed_sst)) $sst = 'a.mb_id, au_menu';
|
|
||||||
if ($sod && !in_array(strtolower($sod), array('asc', 'desc'))) $sod = '';
|
|
||||||
$sql_order = " order by $sst $sod ";
|
$sql_order = " order by $sst $sod ";
|
||||||
|
|
||||||
$sql = " select count(*) as cnt
|
$sql = " select count(*) as cnt
|
||||||
@@ -42,9 +33,7 @@ $total_count = $row['cnt'];
|
|||||||
|
|
||||||
$rows = $config['cf_page_rows'];
|
$rows = $config['cf_page_rows'];
|
||||||
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
||||||
if ($page < 1) {
|
if ($page < 1) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||||
$page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
|
|
||||||
}
|
|
||||||
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
||||||
|
|
||||||
$sql = " select *
|
$sql = " select *
|
||||||
@@ -54,12 +43,10 @@ $sql = " select *
|
|||||||
limit {$from_record}, {$rows} ";
|
limit {$from_record}, {$rows} ";
|
||||||
$result = sql_query($sql);
|
$result = sql_query($sql);
|
||||||
|
|
||||||
$listall = '<a href="' . $_SERVER['SCRIPT_NAME'] . '" class="ov_listall btn_ov02">전체목록</a>';
|
$listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall btn_ov02">전체목록</a>';
|
||||||
|
|
||||||
$g5['title'] = "관리권한설정";
|
$g5['title'] = "관리권한설정";
|
||||||
require_once './admin.head.php';
|
include_once('./admin.head.php');
|
||||||
|
|
||||||
$assignable_auth_menu = admin_get_assignable_auth_menu();
|
|
||||||
|
|
||||||
$colspan = 5;
|
$colspan = 5;
|
||||||
?>
|
?>
|
||||||
@@ -70,213 +57,196 @@ $colspan = 5;
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<form name="fsearch" id="fsearch" class="local_sch01 local_sch" method="get">
|
<form name="fsearch" id="fsearch" class="local_sch01 local_sch" method="get">
|
||||||
<input type="hidden" name="sfl" value="a.mb_id" id="sfl">
|
<input type="hidden" name="sfl" value="a.mb_id" id="sfl">
|
||||||
|
|
||||||
<label for="stx" class="sound_only">회원아이디<strong class="sound_only"> 필수</strong></label>
|
<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="text" name="stx" value="<?php echo $stx ?>" id="stx" required class="required frm_input">
|
||||||
<input type="submit" value="검색" id="fsearch_submit" class="btn_submit">
|
<input type="submit" value="검색" id="fsearch_submit" class="btn_submit">
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<form name="fauthlist" id="fauthlist" method="post" action="./auth_list_delete.php" onsubmit="return fauthlist_submit(this);">
|
<form name="fauthlist" id="fauthlist" method="post" action="./auth_list_delete.php" onsubmit="return fauthlist_submit(this);">
|
||||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||||
<input type="hidden" name="token" value="">
|
<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"><?php echo subject_sort_link('a.mb_id') ?>회원아이디</a></th>
|
|
||||||
<th scope="col"><?php echo subject_sort_link('mb_nick') ?>닉네임</a></th>
|
|
||||||
<th scope="col">메뉴</th>
|
|
||||||
<th scope="col">권한</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<?php
|
|
||||||
$count = 0;
|
|
||||||
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
|
||||||
$is_continue = false;
|
|
||||||
// 회원아이디가 없는 메뉴는 삭제함
|
|
||||||
if ($row['mb_id'] == '' && $row['mb_nick'] == '') {
|
|
||||||
sql_query(" delete from {$g5['auth_table']} where au_menu = '{$row['au_menu']}' ");
|
|
||||||
$is_continue = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 메뉴번호가 바뀌거나 권한 부여 대상이 아닌 메뉴는 삭제함
|
|
||||||
if (!isset($assignable_auth_menu[$row['au_menu']])) {
|
|
||||||
sql_query(" delete from {$g5['auth_table']} where au_menu = '{$row['au_menu']}' ");
|
|
||||||
$is_continue = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($is_continue) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
$mb_nick = get_sideview($row['mb_id'], $row['mb_nick'], $row['mb_email'], $row['mb_homepage']);
|
|
||||||
|
|
||||||
$bg = 'bg' . ($i % 2);
|
|
||||||
?>
|
|
||||||
<tr class="<?php echo $bg; ?>">
|
|
||||||
<td class="td_chk">
|
|
||||||
<input type="hidden" name="au_menu[<?php echo $i ?>]" value="<?php echo $row['au_menu'] ?>">
|
|
||||||
<input type="hidden" name="mb_id[<?php echo $i ?>]" value="<?php echo $row['mb_id'] ?>">
|
|
||||||
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo $row['mb_nick'] ?>님 권한</label>
|
|
||||||
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
|
|
||||||
</td>
|
|
||||||
<td class="td_mbid"><a href="?sfl=a.mb_id&stx=<?php echo $row['mb_id'] ?>"><?php echo $row['mb_id'] ?></a></td>
|
|
||||||
<td class="td_auth_mbnick"><?php echo $mb_nick ?></td>
|
|
||||||
<td class="td_menu">
|
|
||||||
<?php echo $row['au_menu'] ?>
|
|
||||||
<?php echo $assignable_auth_menu[$row['au_menu']] ?>
|
|
||||||
</td>
|
|
||||||
<td class="td_auth"><?php echo $row['au_auth'] ?></td>
|
|
||||||
</tr>
|
|
||||||
<?php
|
|
||||||
$count++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($count == 0) {
|
|
||||||
echo '<tr><td colspan="' . $colspan . '" class="empty_table">자료가 없습니다.</td></tr>';
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="btn_list01 btn_list">
|
|
||||||
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value" class="btn btn_02">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
<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"><?php echo subject_sort_link('a.mb_id') ?>회원아이디</a></th>
|
||||||
|
<th scope="col"><?php echo subject_sort_link('mb_nick') ?>닉네임</a></th>
|
||||||
|
<th scope="col">메뉴</th>
|
||||||
|
<th scope="col">권한</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
//if (isset($stx))
|
$count = 0;
|
||||||
// echo '<script>document.fsearch.sfl.value = "'.$sfl.'";</script>'."\n";
|
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||||
|
{
|
||||||
|
$is_continue = false;
|
||||||
|
// 회원아이디가 없는 메뉴는 삭제함
|
||||||
|
if($row['mb_id'] == '' && $row['mb_nick'] == '') {
|
||||||
|
sql_query(" delete from {$g5['auth_table']} where au_menu = '{$row['au_menu']}' ");
|
||||||
|
$is_continue = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (strpos($sfl, 'mb_id') !== false) {
|
// 메뉴번호가 바뀌는 경우에 현재 없는 저장된 메뉴는 삭제함
|
||||||
$mb_id = $stx;
|
if (!isset($auth_menu[$row['au_menu']]))
|
||||||
} else {
|
{
|
||||||
$mb_id = '';
|
sql_query(" delete from {$g5['auth_table']} where au_menu = '{$row['au_menu']}' ");
|
||||||
}
|
$is_continue = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($is_continue)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
$mb_nick = get_sideview($row['mb_id'], $row['mb_nick'], $row['mb_email'], $row['mb_homepage']);
|
||||||
|
|
||||||
|
$bg = 'bg'.($i%2);
|
||||||
?>
|
?>
|
||||||
|
<tr class="<?php echo $bg; ?>">
|
||||||
|
<td class="td_chk">
|
||||||
|
<input type="hidden" name="au_menu[<?php echo $i ?>]" value="<?php echo $row['au_menu'] ?>">
|
||||||
|
<input type="hidden" name="mb_id[<?php echo $i ?>]" value="<?php echo $row['mb_id'] ?>">
|
||||||
|
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo $row['mb_nick'] ?>님 권한</label>
|
||||||
|
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
|
||||||
|
</td>
|
||||||
|
<td class="td_mbid"><a href="?sfl=a.mb_id&stx=<?php echo $row['mb_id'] ?>"><?php echo $row['mb_id'] ?></a></td>
|
||||||
|
<td class="td_auth_mbnick"><?php echo $mb_nick ?></td>
|
||||||
|
<td class="td_menu">
|
||||||
|
<?php echo $row['au_menu'] ?>
|
||||||
|
<?php echo $auth_menu[$row['au_menu']] ?>
|
||||||
|
</td>
|
||||||
|
<td class="td_auth"><?php echo $row['au_auth'] ?></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
$count++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($count == 0)
|
||||||
|
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="btn_list01 btn_list">
|
||||||
|
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value" class="btn btn_02">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
//if (isset($stx))
|
||||||
|
// echo '<script>document.fsearch.sfl.value = "'.$sfl.'";</script>'."\n";
|
||||||
|
|
||||||
|
if (strstr($sfl, 'mb_id'))
|
||||||
|
$mb_id = $stx;
|
||||||
|
else
|
||||||
|
$mb_id = '';
|
||||||
|
?>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$pagelist = get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, $_SERVER['SCRIPT_NAME'] . '?' . $qstr . '&page=');
|
$pagelist = get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, $_SERVER['SCRIPT_NAME'].'?'.$qstr.'&page=');
|
||||||
echo $pagelist;
|
echo $pagelist;
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<form name="fauthlist2" id="fauthlist2" action="./auth_update.php" method="post" autocomplete="off" onsubmit="return fauth_add_submit(this);">
|
<form name="fauthlist2" id="fauthlist2" action="./auth_update.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||||
<input type="hidden" name="token" value="">
|
<input type="hidden" name="token" value="">
|
||||||
|
|
||||||
<section id="add_admin">
|
<section id="add_admin">
|
||||||
<h2 class="h2_frm">관리권한 추가</h2>
|
<h2 class="h2_frm">관리권한 추가</h2>
|
||||||
|
|
||||||
<div class="local_desc01 local_desc">
|
<div class="local_desc01 local_desc">
|
||||||
<p>
|
<p>
|
||||||
다음 양식에서 회원에게 관리권한을 부여하실 수 있습니다.<br>
|
다음 양식에서 회원에게 관리권한을 부여하실 수 있습니다.<br>
|
||||||
권한 <strong>r</strong>은 읽기권한, <strong>w</strong>는 쓰기권한, <strong>d</strong>는 삭제권한입니다.
|
권한 <strong>r</strong>은 읽기권한, <strong>w</strong>는 쓰기권한, <strong>d</strong>는 삭제권한입니다.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tbl_frm01 tbl_wrap">
|
<div class="tbl_frm01 tbl_wrap">
|
||||||
<table>
|
<table>
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col class="grid_4">
|
<col class="grid_4">
|
||||||
<col>
|
<col>
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="mb_id">회원아이디<strong class="sound_only">필수</strong></label></th>
|
<th scope="row"><label for="mb_id">회원아이디<strong class="sound_only">필수</strong></label></th>
|
||||||
<td>
|
<td>
|
||||||
<strong id="msg_mb_id" class="msg_sound_only"></strong>
|
<strong id="msg_mb_id" class="msg_sound_only"></strong>
|
||||||
<input type="text" name="mb_id" value="<?php echo $mb_id ?>" id="mb_id" required class="required frm_input">
|
<input type="text" name="mb_id" value="<?php echo $mb_id ?>" id="mb_id" required class="required frm_input">
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="au_menu">접근가능메뉴<strong class="sound_only">필수</strong></label></th>
|
<th scope="row"><label for="au_menu">접근가능메뉴<strong class="sound_only">필수</strong></label></th>
|
||||||
<td>
|
<td>
|
||||||
<select id="au_menu" name="au_menu" required class="required">
|
<select id="au_menu" name="au_menu" required class="required">
|
||||||
<option value=''>선택하세요</option>
|
<option value=''>선택하세요</option>
|
||||||
<?php
|
<?php
|
||||||
foreach ($assignable_auth_menu as $key => $value) {
|
foreach($auth_menu as $key=>$value)
|
||||||
if (!(substr($key, -3) == '000' || $key == '-' || !$key)) {
|
{
|
||||||
echo '<option value="' . $key . '">' . $key . ' ' . $value . '</option>';
|
if (!(substr($key, -3) == '000' || $key == '-' || !$key))
|
||||||
}
|
echo '<option value="'.$key.'">'.$key.' '.$value.'</option>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">권한지정</th>
|
<th scope="row">권한지정</th>
|
||||||
<td>
|
<td>
|
||||||
<input type="checkbox" name="r" value="r" id="r" checked>
|
<input type="checkbox" name="r" value="r" id="r" checked>
|
||||||
<label for="r">r (읽기)</label>
|
<label for="r">r (읽기)</label>
|
||||||
<input type="checkbox" name="w" value="w" id="w">
|
<input type="checkbox" name="w" value="w" id="w">
|
||||||
<label for="w">w (쓰기)</label>
|
<label for="w">w (쓰기)</label>
|
||||||
<input type="checkbox" name="d" value="d" id="d">
|
<input type="checkbox" name="d" value="d" id="d">
|
||||||
<label for="d">d (삭제)</label>
|
<label for="d">d (삭제)</label>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
</tbody>
|
||||||
<th scope="row">자동등록방지</th>
|
</table>
|
||||||
<td>
|
</div>
|
||||||
<?php
|
|
||||||
require_once G5_CAPTCHA_PATH . '/captcha.lib.php';
|
|
||||||
$captcha_html = captcha_html();
|
|
||||||
$captcha_js = chk_captcha_js();
|
|
||||||
echo $captcha_html;
|
|
||||||
?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="btn_confirm01 btn_confirm">
|
<div class="btn_confirm01 btn_confirm">
|
||||||
<input type="submit" value="추가" class="btn_submit btn">
|
<input type="submit" value="추가" class="btn_submit btn">
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function fauth_add_submit(f) {
|
function fauthlist_submit(f)
|
||||||
|
{
|
||||||
<?php echo $captcha_js; // 캡챠 사용시 자바스크립트에서 입력된 캡챠를 검사함 ?>
|
if (!is_checked("chk[]")) {
|
||||||
|
alert(document.pressed+" 하실 항목을 하나 이상 선택하세요.");
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function fauthlist_submit(f) {
|
if(document.pressed == "선택삭제") {
|
||||||
if (!is_checked("chk[]")) {
|
if(!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
|
||||||
alert(document.pressed + " 하실 항목을 하나 이상 선택하세요.");
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (document.pressed == "선택삭제") {
|
|
||||||
if (!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
require_once './admin.tail.php';
|
include_once ('./admin.tail.php');
|
||||||
|
?>
|
||||||
|
|||||||
+11
-21
@@ -1,37 +1,27 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "100200";
|
$sub_menu = "100200";
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
|
|
||||||
check_demo();
|
check_demo();
|
||||||
|
|
||||||
if ($is_admin != 'super') {
|
if ($is_admin != 'super')
|
||||||
alert('최고관리자만 접근 가능합니다.');
|
alert('최고관리자만 접근 가능합니다.');
|
||||||
}
|
|
||||||
|
|
||||||
check_admin_token();
|
check_admin_token();
|
||||||
|
|
||||||
$count = (isset($_POST['chk']) && is_array($_POST['chk'])) ? count($_POST['chk']) : 0;
|
$count = count($_POST['chk']);
|
||||||
$post_act_button = isset($_POST['act_button']) ? clean_xss_tags($_POST['act_button'], 1, 1) : '';
|
|
||||||
|
|
||||||
if (!$count) {
|
if (!$count)
|
||||||
alert($_POST['act_button'] . " 하실 항목을 하나 이상 체크하세요.");
|
alert($_POST['act_button']." 하실 항목을 하나 이상 체크하세요.");
|
||||||
}
|
|
||||||
|
|
||||||
if ((isset($_POST['mb_id']) && !is_array($_POST['mb_id'])) || (isset($_POST['au_menu']) && !is_array($_POST['au_menu']))) {
|
for ($i=0; $i<$count; $i++)
|
||||||
alert("잘못된 요청입니다.");
|
{
|
||||||
}
|
|
||||||
|
|
||||||
for ($i = 0; $i < $count; $i++) {
|
|
||||||
// 실제 번호를 넘김
|
// 실제 번호를 넘김
|
||||||
$k = isset($_POST['chk'][$i]) ? (int) $_POST['chk'][$i] : 0;
|
$k = $chk[$i];
|
||||||
|
|
||||||
$mb_id = isset($_POST['mb_id'][$k]) ? preg_replace('/[^a-zA-Z0-9_]/', '', $_POST['mb_id'][$k]) : '';
|
$sql = " delete from {$g5['auth_table']} where mb_id = '{$_POST['mb_id'][$k]}' and au_menu = '{$_POST['au_menu'][$k]}' ";
|
||||||
$au_menu = isset($_POST['au_menu'][$k]) ? preg_replace('/[^a-zA-Z0-9_]/', '', $_POST['au_menu'][$k]) : '';
|
|
||||||
|
|
||||||
$sql = " delete from {$g5['auth_table']} where mb_id = '" . $mb_id . "' and au_menu = '" . $au_menu . "' ";
|
|
||||||
sql_query($sql);
|
sql_query($sql);
|
||||||
|
|
||||||
run_event('adm_auth_delete_member', $mb_id, $au_menu);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
goto_url('./auth_list.php?' . $qstr);
|
goto_url('./auth_list.php?'.$qstr);
|
||||||
|
?>
|
||||||
|
|||||||
+12
-42
@@ -1,60 +1,30 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "100200";
|
$sub_menu = "100200";
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
require_once G5_LIB_PATH . '/mailer.lib.php';
|
|
||||||
|
|
||||||
$au_menu = isset($_POST['au_menu']) ? preg_replace('/[^0-9a-z_]/i', '', $_POST['au_menu']) : '';
|
if ($is_admin != 'super')
|
||||||
$post_r = isset($_POST['r']) ? preg_replace('/[^0-9a-z_]/i', '', $_POST['r']) : '';
|
|
||||||
$post_w = isset($_POST['w']) ? preg_replace('/[^0-9a-z_]/i', '', $_POST['w']) : '';
|
|
||||||
$post_d = isset($_POST['d']) ? preg_replace('/[^0-9a-z_]/i', '', $_POST['d']) : '';
|
|
||||||
|
|
||||||
if ($is_admin != 'super') {
|
|
||||||
alert('최고관리자만 접근 가능합니다.');
|
alert('최고관리자만 접근 가능합니다.');
|
||||||
}
|
|
||||||
|
|
||||||
$mb = get_member($mb_id);
|
$mb = get_member($mb_id);
|
||||||
if (!(isset($mb['mb_id']) && $mb['mb_id'])) {
|
if (!$mb['mb_id'])
|
||||||
alert('존재하는 회원아이디가 아닙니다.');
|
alert('존재하는 회원아이디가 아닙니다.');
|
||||||
}
|
|
||||||
|
|
||||||
check_admin_token();
|
check_admin_token();
|
||||||
|
|
||||||
$assignable_auth_menu = admin_get_assignable_auth_menu();
|
|
||||||
if (!$au_menu || !isset($assignable_auth_menu[$au_menu])) {
|
|
||||||
alert('해당 메뉴는 관리권한을 부여할 수 없습니다.');
|
|
||||||
}
|
|
||||||
|
|
||||||
require_once G5_CAPTCHA_PATH . '/captcha.lib.php';
|
|
||||||
|
|
||||||
if (!chk_captcha()) {
|
|
||||||
alert('자동등록방지 숫자가 틀렸습니다.');
|
|
||||||
}
|
|
||||||
|
|
||||||
$sql = " insert into {$g5['auth_table']}
|
$sql = " insert into {$g5['auth_table']}
|
||||||
set mb_id = '$mb_id',
|
set mb_id = '{$_POST['mb_id']}',
|
||||||
au_menu = '$au_menu',
|
au_menu = '{$_POST['au_menu']}',
|
||||||
au_auth = '{$post_r},{$post_w},{$post_d}' ";
|
au_auth = '{$_POST['r']},{$_POST['w']},{$_POST['d']}' ";
|
||||||
$result = sql_query($sql, false);
|
$result = sql_query($sql, FALSE);
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
$sql = " update {$g5['auth_table']}
|
$sql = " update {$g5['auth_table']}
|
||||||
set au_auth = '{$post_r},{$post_w},{$post_d}'
|
set au_auth = '{$_POST['r']},{$_POST['w']},{$_POST['d']}'
|
||||||
where mb_id = '$mb_id'
|
where mb_id = '{$_POST['mb_id']}'
|
||||||
and au_menu = '$au_menu' ";
|
and au_menu = '{$_POST['au_menu']}' ";
|
||||||
sql_query($sql);
|
sql_query($sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
//sql_query(" OPTIMIZE TABLE `$g5['auth_table']` ");
|
//sql_query(" OPTIMIZE TABLE `$g5['auth_table']` ");
|
||||||
|
|
||||||
// 세션을 체크하여 하루에 한번만 메일알림이 가게 합니다.
|
goto_url('./auth_list.php?'.$qstr);
|
||||||
if (str_replace('-', '', G5_TIME_YMD) !== get_session('adm_auth_update')) {
|
?>
|
||||||
$site_url = preg_replace('/^www\./', '', strtolower($_SERVER['SERVER_NAME']));
|
|
||||||
$to_email = 'gnuboard@' . $site_url;
|
|
||||||
|
|
||||||
mailer($config['cf_admin_email_name'], $to_email, $config['cf_admin_email'], '[' . $config['cf_title'] . '] 관리권한설정 알림', '<p><b>[' . $config['cf_title'] . '] 관리권한설정 변경 안내</b></p><p style="padding-top:1em">회원 아이디 ' . $mb['mb_id'] . ' 에 관리권한이 추가 되었습니다.</p><p style="padding-top:1em">' . G5_TIME_YMDHIS . '</p><p style="padding-top:1em"><a href="' . G5_URL . '" target="_blank">' . $config['cf_title'] . '</a></p>', 1);
|
|
||||||
|
|
||||||
set_session('adm_auth_update', str_replace('-', '', G5_TIME_YMD));
|
|
||||||
}
|
|
||||||
|
|
||||||
run_event('adm_auth_update', $mb);
|
|
||||||
|
|
||||||
goto_url('./auth_list.php?' . $qstr);
|
|
||||||
|
|||||||
+50
-68
@@ -1,91 +1,73 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "300100";
|
$sub_menu = "300100";
|
||||||
require_once "./_common.php";
|
include_once("./_common.php");
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, 'w');
|
auth_check($auth[$sub_menu], 'w');
|
||||||
|
|
||||||
$g5['title'] = '게시판 복사';
|
$g5['title'] = '게시판 복사';
|
||||||
require_once G5_PATH . '/head.sub.php';
|
include_once(G5_PATH.'/head.sub.php');
|
||||||
|
|
||||||
if (empty($bo_table)) {
|
|
||||||
alert_close("정상적인 방법으로 이용해주세요.");
|
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
<script>
|
|
||||||
var g5_admin_csrf_token_key = "<?php echo (function_exists('admin_csrf_token_key')) ? admin_csrf_token_key() : ''; ?>";
|
<script src="<?php echo G5_ADMIN_URL ?>/admin.js?ver=<?php echo G5_JS_VER; ?>"></script>
|
||||||
</script>
|
|
||||||
<script src="<?php echo get_versioned_asset_url(G5_ADMIN_URL.'/admin.js'); ?>"></script>
|
|
||||||
|
|
||||||
<div class="new_win">
|
<div class="new_win">
|
||||||
<h1><?php echo $g5['title']; ?></h1>
|
<h1><?php echo $g5['title']; ?></h1>
|
||||||
|
|
||||||
<form name="fboardcopy" id="fboardcopy" action="./board_copy_update.php" onsubmit="return fboardcopy_check(this);" method="post">
|
<form name="fboardcopy" id="fboardcopy" action="./board_copy_update.php" onsubmit="return fboardcopy_check(this);" method="post">
|
||||||
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>" id="bo_table">
|
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>" id="bo_table">
|
||||||
<input type="hidden" name="token" value="">
|
<input type="hidden" name="token" value="">
|
||||||
<div class=" new_win_con">
|
<div class=" new_win_con">
|
||||||
<div class="tbl_frm01 tbl_wrap">
|
<div class="tbl_frm01 tbl_wrap">
|
||||||
<table>
|
<table>
|
||||||
<caption><?php echo $g5['title']; ?></caption>
|
<caption><?php echo $g5['title']; ?></caption>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col">원본 테이블명</th>
|
<th scope="col">원본 테이블명</th>
|
||||||
<td><?php echo $bo_table ?></td>
|
<td><?php echo $bo_table ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col"><label for="target_table">복사 테이블명<strong class="sound_only">필수</strong></label></th>
|
<th scope="col"><label for="target_table">복사 테이블명<strong class="sound_only">필수</strong></label></th>
|
||||||
<td><input type="text" name="target_table" id="target_table" required class="required alnum_ frm_input" maxlength="20">영문자, 숫자, _ 만 가능 (공백없이)</td>
|
<td><input type="text" name="target_table" id="target_table" required class="required alnum_ frm_input" maxlength="20">영문자, 숫자, _ 만 가능 (공백없이)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col"><label for="target_subject">게시판 제목<strong class="sound_only">필수</strong></label></th>
|
<th scope="col"><label for="target_subject">게시판 제목<strong class="sound_only">필수</strong></label></th>
|
||||||
<td><input type="text" name="target_subject" value="[복사본] <?php echo get_sanitize_input($board['bo_subject']); ?>" id="target_subject" required class="required frm_input" maxlength="120"></td>
|
<td><input type="text" name="target_subject" value="[복사본] <?php echo $board['bo_subject'] ?>" id="target_subject" required class="required frm_input" maxlength="120"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col">복사 유형</th>
|
<th scope="col">복사 유형</th>
|
||||||
<td>
|
<td>
|
||||||
<input type="radio" name="copy_case" value="schema_only" id="copy_case" checked>
|
<input type="radio" name="copy_case" value="schema_only" id="copy_case" checked>
|
||||||
<label for="copy_case">구조만</label>
|
<label for="copy_case">구조만</label>
|
||||||
<input type="radio" name="copy_case" value="schema_data_both" id="copy_case2">
|
<input type="radio" name="copy_case" value="schema_data_both" id="copy_case2">
|
||||||
<label for="copy_case2">구조와 데이터</label>
|
<label for="copy_case2">구조와 데이터</label>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="win_btn ">
|
|
||||||
<input type="submit" class="btn_submit btn" value="복사">
|
|
||||||
<input type="button" class="btn_close btn" value="창닫기" onclick="window.close();">
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="win_btn ">
|
||||||
|
<input type="submit" class="btn_submit btn" value="복사">
|
||||||
|
<input type="button" class="btn_close btn" value="창닫기" onclick="window.close();">
|
||||||
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function fboardcopy_check(f) {
|
function fboardcopy_check(f)
|
||||||
<?php
|
{
|
||||||
|
if (f.bo_table.value == f.target_table.value) {
|
||||||
if (!$w) {
|
alert("원본 테이블명과 복사할 테이블명이 달라야 합니다.");
|
||||||
$js_array = get_bo_table_banned_word();
|
return false;
|
||||||
echo "var banned_array = " . json_encode($js_array) . ";\n";
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
// 게시판명이 금지된 단어로 되어 있으면
|
|
||||||
if ((typeof banned_array != 'undefined') && jQuery.inArray(f.target_table.value, banned_array) !== -1) {
|
|
||||||
alert("입력한 게시판 TABLE명을 사용할수 없습니다. 다른 이름으로 입력해 주세요.");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (f.bo_table.value == f.target_table.value) {
|
|
||||||
alert("원본 테이블명과 복사할 테이블명이 달라야 합니다.");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
require_once G5_PATH . '/tail.sub.php';
|
include_once(G5_PATH.'/tail.sub.php');
|
||||||
|
?>
|
||||||
|
|||||||
+108
-135
@@ -1,46 +1,31 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = '300100';
|
$sub_menu = '300100';
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
|
|
||||||
check_demo();
|
check_demo();
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, 'w');
|
auth_check($auth[$sub_menu], 'w');
|
||||||
|
|
||||||
check_admin_token();
|
check_admin_token();
|
||||||
|
|
||||||
$bo_table = isset($_POST['bo_table']) ? substr(preg_replace('/[^a-z0-9_]/i', '', $_POST['bo_table']), 0, 20) : null;
|
$target_table = trim($_POST['target_table']);
|
||||||
$target_table = isset($_POST['target_table']) ? trim($_POST['target_table']) : '';
|
$target_subject = trim($_POST['target_subject']);
|
||||||
$target_subject = isset($_POST['target_subject']) ? trim($_POST['target_subject']) : '';
|
|
||||||
|
|
||||||
$target_subject = addslashes(strip_tags(clean_xss_attributes(stripslashes($target_subject))));
|
|
||||||
|
|
||||||
$file_copy = array();
|
|
||||||
|
|
||||||
if (empty($bo_table)) {
|
|
||||||
alert("원본 테이블 정보가 없습니다.");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!preg_match('/[A-Za-z0-9_]{1,20}/', $target_table)) {
|
if (!preg_match('/[A-Za-z0-9_]{1,20}/', $target_table)) {
|
||||||
alert('게시판 TABLE명은 공백없이 영문자, 숫자, _ 만 사용 가능합니다. (20자 이내)');
|
alert('게시판 TABLE명은 공백없이 영문자, 숫자, _ 만 사용 가능합니다. (20자 이내)');
|
||||||
}
|
}
|
||||||
|
|
||||||
$target_table = substr(preg_replace('/[^a-z0-9_]/i', '', $target_table), 0, 20);
|
|
||||||
|
|
||||||
// 게시판명이 금지된 단어로 되어 있으면
|
|
||||||
if ($w == '' && in_array($target_table, get_bo_table_banned_word())) {
|
|
||||||
alert('입력한 게시판 TABLE명을 사용할수 없습니다. 다른 이름으로 입력해 주세요.');
|
|
||||||
}
|
|
||||||
|
|
||||||
$row = sql_fetch(" select count(*) as cnt from {$g5['board_table']} where bo_table = '$target_table' ");
|
$row = sql_fetch(" select count(*) as cnt from {$g5['board_table']} where bo_table = '$target_table' ");
|
||||||
if ($row['cnt']) {
|
if ($row['cnt'])
|
||||||
alert($target_table . '은(는) 이미 존재하는 게시판 테이블명 입니다.\\n복사할 테이블명으로 사용할 수 없습니다.');
|
alert($target_table.'은(는) 이미 존재하는 게시판 테이블명 입니다.\\n복사할 테이블명으로 사용할 수 없습니다.');
|
||||||
}
|
|
||||||
|
|
||||||
// 게시판 테이블 생성
|
// 게시판 테이블 생성
|
||||||
$sql = get_table_define($g5['write_prefix'] . $bo_table);
|
$sql = get_table_define($g5['write_prefix'] . $bo_table);
|
||||||
$sql = str_replace($g5['write_prefix'] . $bo_table, $g5['write_prefix'] . $target_table, $sql);
|
$sql = str_replace($g5['write_prefix'] . $bo_table, $g5['write_prefix'] . $target_table, $sql);
|
||||||
sql_query($sql, false);
|
sql_query($sql, false);
|
||||||
|
|
||||||
|
$file_copy = array();
|
||||||
|
|
||||||
// 구조만 복사시에는 공지사항 번호는 복사하지 않는다.
|
// 구조만 복사시에는 공지사항 번호는 복사하지 않는다.
|
||||||
if ($copy_case == 'schema_only') {
|
if ($copy_case == 'schema_only') {
|
||||||
$board['bo_notice'] = '';
|
$board['bo_notice'] = '';
|
||||||
@@ -53,97 +38,95 @@ $sql = " insert into {$g5['board_table']}
|
|||||||
bo_subject = '$target_subject',
|
bo_subject = '$target_subject',
|
||||||
bo_device = '{$board['bo_device']}',
|
bo_device = '{$board['bo_device']}',
|
||||||
bo_admin = '{$board['bo_admin']}',
|
bo_admin = '{$board['bo_admin']}',
|
||||||
bo_list_level = '{$board['bo_list_level']}',
|
bo_list_level = '{$board[bo_list_level]}',
|
||||||
bo_read_level = '{$board['bo_read_level']}',
|
bo_read_level = '{$board[bo_read_level]}',
|
||||||
bo_write_level = '{$board['bo_write_level']}',
|
bo_write_level = '{$board[bo_write_level]}',
|
||||||
bo_reply_level = '{$board['bo_reply_level']}',
|
bo_reply_level = '{$board[bo_reply_level]}',
|
||||||
bo_comment_level = '{$board['bo_comment_level']}',
|
bo_comment_level = '{$board[bo_comment_level]}',
|
||||||
bo_upload_level = '{$board['bo_upload_level']}',
|
bo_upload_level = '{$board[bo_upload_level]}',
|
||||||
bo_download_level = '{$board['bo_download_level']}',
|
bo_download_level = '{$board[bo_download_level]}',
|
||||||
bo_html_level = '{$board['bo_html_level']}',
|
bo_html_level = '{$board[bo_html_level]}',
|
||||||
bo_link_level = '{$board['bo_link_level']}',
|
bo_link_level = '{$board[bo_link_level]}',
|
||||||
bo_count_modify = '{$board['bo_count_modify']}',
|
bo_count_modify = '{$board[bo_count_modify]}',
|
||||||
bo_count_delete = '{$board['bo_count_delete']}',
|
bo_count_delete = '{$board[bo_count_delete]}',
|
||||||
bo_read_point = '{$board['bo_read_point']}',
|
bo_read_point = '{$board[bo_read_point]}',
|
||||||
bo_write_point = '{$board['bo_write_point']}',
|
bo_write_point = '{$board[bo_write_point]}',
|
||||||
bo_comment_point = '{$board['bo_comment_point']}',
|
bo_comment_point = '{$board[bo_comment_point]}',
|
||||||
bo_download_point = '{$board['bo_download_point']}',
|
bo_download_point = '{$board[bo_download_point]}',
|
||||||
bo_use_category = '{$board['bo_use_category']}',
|
bo_use_category = '{$board[bo_use_category]}',
|
||||||
bo_category_list = '{$board['bo_category_list']}',
|
bo_category_list = '{$board['bo_category_list']}',
|
||||||
bo_use_sideview = '{$board['bo_use_sideview']}',
|
bo_use_sideview = '{$board[bo_use_sideview]}',
|
||||||
bo_use_file_content = '{$board['bo_use_file_content']}',
|
bo_use_file_content = '{$board[bo_use_file_content]}',
|
||||||
bo_use_secret = '{$board['bo_use_secret']}',
|
bo_use_secret = '{$board[bo_use_secret]}',
|
||||||
bo_use_dhtml_editor = '{$board['bo_use_dhtml_editor']}',
|
bo_use_dhtml_editor = '{$board[bo_use_dhtml_editor]}',
|
||||||
bo_use_rss_view = '{$board['bo_use_rss_view']}',
|
bo_use_rss_view = '{$board[bo_use_rss_view]}',
|
||||||
bo_use_good = '{$board['bo_use_good']}',
|
bo_use_good = '{$board[bo_use_good]}',
|
||||||
bo_use_nogood = '{$board['bo_use_nogood']}',
|
bo_use_nogood = '{$board[bo_use_nogood]}',
|
||||||
bo_use_name = '{$board['bo_use_name']}',
|
bo_use_name = '{$board[bo_use_name]}',
|
||||||
bo_use_signature = '{$board['bo_use_signature']}',
|
bo_use_signature = '{$board[bo_use_signature]}',
|
||||||
bo_use_ip_view = '{$board['bo_use_ip_view']}',
|
bo_use_ip_view = '{$board[bo_use_ip_view]}',
|
||||||
bo_use_list_view = '{$board['bo_use_list_view']}',
|
bo_use_list_view = '{$board['bo_use_list_view']}',
|
||||||
bo_use_list_content = '{$board['bo_use_list_content']}',
|
bo_use_list_content = '{$board[bo_use_list_content]}',
|
||||||
bo_use_list_file = '{$board['bo_use_list_file']}',
|
bo_table_width = '{$board[bo_table_width]}',
|
||||||
bo_table_width = '{$board['bo_table_width']}',
|
bo_subject_len = '{$board[bo_subject_len]}',
|
||||||
bo_subject_len = '{$board['bo_subject_len']}',
|
bo_mobile_subject_len = '{$board[bo_mobile_subject_len]}',
|
||||||
bo_mobile_subject_len = '{$board['bo_mobile_subject_len']}',
|
bo_page_rows = '{$board[bo_page_rows]}',
|
||||||
bo_page_rows = '{$board['bo_page_rows']}',
|
bo_mobile_page_rows = '{$board[bo_mobile_page_rows]}',
|
||||||
bo_mobile_page_rows = '{$board['bo_mobile_page_rows']}',
|
bo_new = '{$board[bo_new]}',
|
||||||
bo_new = '{$board['bo_new']}',
|
bo_hot = '{$board[bo_hot]}',
|
||||||
bo_hot = '{$board['bo_hot']}',
|
bo_image_width = '{$board[bo_image_width]}',
|
||||||
bo_image_width = '{$board['bo_image_width']}',
|
bo_skin = '{$board['bo_skin']}',
|
||||||
bo_skin = '" . sql_real_escape_string($board['bo_skin']). "',
|
bo_mobile_skin = '{$board['bo_mobile_skin']}',
|
||||||
bo_mobile_skin = '" . sql_real_escape_string($board['bo_mobile_skin']). "',
|
bo_include_head = '{$board['bo_include_head']}',
|
||||||
bo_include_head = '" . sql_real_escape_string($board['bo_include_head']). "',
|
bo_include_tail = '{$board['bo_include_tail']}',
|
||||||
bo_include_tail = '" . sql_real_escape_string($board['bo_include_tail']). "',
|
bo_content_head = '".addslashes($board['bo_content_head'])."',
|
||||||
bo_content_head = '" . addslashes($board['bo_content_head']) . "',
|
bo_content_tail = '".addslashes($board['bo_content_tail'])."',
|
||||||
bo_content_tail = '" . addslashes($board['bo_content_tail']) . "',
|
bo_mobile_content_head = '".addslashes($board['bo_mobile_content_head'])."',
|
||||||
bo_mobile_content_head = '" . addslashes($board['bo_mobile_content_head']) . "',
|
bo_mobile_content_tail = '".addslashes($board['bo_mobile_content_tail'])."',
|
||||||
bo_mobile_content_tail = '" . addslashes($board['bo_mobile_content_tail']) . "',
|
bo_insert_content = '".addslashes($board['bo_insert_content'])."',
|
||||||
bo_insert_content = '" . addslashes($board['bo_insert_content']) . "',
|
bo_gallery_cols = '{$board[bo_gallery_cols]}',
|
||||||
bo_gallery_cols = '{$board['bo_gallery_cols']}',
|
bo_gallery_width = '{$board[bo_gallery_width]}',
|
||||||
bo_gallery_width = '{$board['bo_gallery_width']}',
|
bo_gallery_height = '{$board[bo_gallery_height]}',
|
||||||
bo_gallery_height = '{$board['bo_gallery_height']}',
|
bo_mobile_gallery_width = '{$board[bo_mobile_gallery_width]}',
|
||||||
bo_mobile_gallery_width = '{$board['bo_mobile_gallery_width']}',
|
bo_mobile_gallery_height = '{$board[bo_mobile_gallery_height]}',
|
||||||
bo_mobile_gallery_height = '{$board['bo_mobile_gallery_height']}',
|
bo_upload_size = '{$board[bo_upload_size]}',
|
||||||
bo_upload_size = '{$board['bo_upload_size']}',
|
bo_reply_order = '{$board[bo_reply_order]}',
|
||||||
bo_reply_order = '{$board['bo_reply_order']}',
|
bo_use_search = '{$board[bo_use_search]}',
|
||||||
bo_use_search = '{$board['bo_use_search']}',
|
bo_order = '{$board[bo_order]}',
|
||||||
bo_order = '{$board['bo_order']}',
|
|
||||||
bo_notice = '{$board['bo_notice']}',
|
bo_notice = '{$board['bo_notice']}',
|
||||||
bo_upload_count = '{$board['bo_upload_count']}',
|
bo_upload_count = '{$board[bo_upload_count]}',
|
||||||
bo_use_email = '{$board['bo_use_email']}',
|
bo_use_email = '{$board[bo_use_email]}',
|
||||||
bo_use_cert = '{$board['bo_use_cert']}',
|
bo_use_cert = '{$board[bo_use_cert]}',
|
||||||
bo_use_sns = '{$board['bo_use_sns']}',
|
bo_use_sns = '{$board[bo_use_sns]}',
|
||||||
bo_use_captcha = '{$board['bo_use_captcha']}',
|
|
||||||
bo_sort_field = '{$board['bo_sort_field']}',
|
bo_sort_field = '{$board['bo_sort_field']}',
|
||||||
bo_1_subj = '" . addslashes($board['bo_1_subj']) . "',
|
bo_1_subj = '".addslashes($board['bo_1_subj'])."',
|
||||||
bo_2_subj = '" . addslashes($board['bo_2_subj']) . "',
|
bo_2_subj = '".addslashes($board['bo_2_subj'])."',
|
||||||
bo_3_subj = '" . addslashes($board['bo_3_subj']) . "',
|
bo_3_subj = '".addslashes($board['bo_3_subj'])."',
|
||||||
bo_4_subj = '" . addslashes($board['bo_4_subj']) . "',
|
bo_4_subj = '".addslashes($board['bo_4_subj'])."',
|
||||||
bo_5_subj = '" . addslashes($board['bo_5_subj']) . "',
|
bo_5_subj = '".addslashes($board['bo_5_subj'])."',
|
||||||
bo_6_subj = '" . addslashes($board['bo_6_subj']) . "',
|
bo_6_subj = '".addslashes($board['bo_6_subj'])."',
|
||||||
bo_7_subj = '" . addslashes($board['bo_7_subj']) . "',
|
bo_7_subj = '".addslashes($board['bo_7_subj'])."',
|
||||||
bo_8_subj = '" . addslashes($board['bo_8_subj']) . "',
|
bo_8_subj = '".addslashes($board['bo_8_subj'])."',
|
||||||
bo_9_subj = '" . addslashes($board['bo_9_subj']) . "',
|
bo_9_subj = '".addslashes($board['bo_9_subj'])."',
|
||||||
bo_10_subj = '" . addslashes($board['bo_10_subj']) . "',
|
bo_10_subj = '".addslashes($board['bo_10_subj'])."',
|
||||||
bo_1 = '" . addslashes($board['bo_1']) . "',
|
bo_1 = '".addslashes($board['bo_1'])."',
|
||||||
bo_2 = '" . addslashes($board['bo_2']) . "',
|
bo_2 = '".addslashes($board['bo_2'])."',
|
||||||
bo_3 = '" . addslashes($board['bo_3']) . "',
|
bo_3 = '".addslashes($board['bo_3'])."',
|
||||||
bo_4 = '" . addslashes($board['bo_4']) . "',
|
bo_4 = '".addslashes($board['bo_4'])."',
|
||||||
bo_5 = '" . addslashes($board['bo_5']) . "',
|
bo_5 = '".addslashes($board['bo_5'])."',
|
||||||
bo_6 = '" . addslashes($board['bo_6']) . "',
|
bo_6 = '".addslashes($board['bo_6'])."',
|
||||||
bo_7 = '" . addslashes($board['bo_7']) . "',
|
bo_7 = '".addslashes($board['bo_7'])."',
|
||||||
bo_8 = '" . addslashes($board['bo_8']) . "',
|
bo_8 = '".addslashes($board['bo_8'])."',
|
||||||
bo_9 = '" . addslashes($board['bo_9']) . "',
|
bo_9 = '".addslashes($board['bo_9'])."',
|
||||||
bo_10 = '" . addslashes($board['bo_10']) . "' ";
|
bo_10 = '".addslashes($board['bo_10'])."' ";
|
||||||
sql_query($sql, false);
|
sql_query($sql, false);
|
||||||
|
|
||||||
// 게시판 폴더 생성
|
// 게시판 폴더 생성
|
||||||
@mkdir(G5_DATA_PATH . '/file/' . $target_table, G5_DIR_PERMISSION);
|
@mkdir(G5_DATA_PATH.'/file/'.$target_table, G5_DIR_PERMISSION);
|
||||||
@chmod(G5_DATA_PATH . '/file/' . $target_table, G5_DIR_PERMISSION);
|
@chmod(G5_DATA_PATH.'/file/'.$target_table, G5_DIR_PERMISSION);
|
||||||
|
|
||||||
// 디렉토리에 있는 파일의 목록을 보이지 않게 한다.
|
// 디렉토리에 있는 파일의 목록을 보이지 않게 한다.
|
||||||
$board_path = G5_DATA_PATH . '/file/' . $target_table;
|
$board_path = G5_DATA_PATH.'/file/'.$target_table;
|
||||||
$file = $board_path . '/index.php';
|
$file = $board_path . '/index.php';
|
||||||
$f = @fopen($file, 'w');
|
$f = @fopen($file, 'w');
|
||||||
@fwrite($f, '');
|
@fwrite($f, '');
|
||||||
@@ -152,36 +135,31 @@ $f = @fopen($file, 'w');
|
|||||||
|
|
||||||
$copy_file = 0;
|
$copy_file = 0;
|
||||||
if ($copy_case == 'schema_data_both') {
|
if ($copy_case == 'schema_data_both') {
|
||||||
$d = dir(G5_DATA_PATH . '/file/' . $bo_table);
|
$d = dir(G5_DATA_PATH.'/file/'.$bo_table);
|
||||||
while ($entry = $d->read()) {
|
while ($entry = $d->read()) {
|
||||||
if ($entry == '.' || $entry == '..') {
|
if ($entry == '.' || $entry == '..') continue;
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 김선용 201007 :
|
// 김선용 201007 :
|
||||||
if (is_dir(G5_DATA_PATH . '/file/' . $bo_table . '/' . $entry)) {
|
if(is_dir(G5_DATA_PATH.'/file/'.$bo_table.'/'.$entry)){
|
||||||
$dd = dir(G5_DATA_PATH . '/file/' . $bo_table . '/' . $entry);
|
$dd = dir(G5_DATA_PATH.'/file/'.$bo_table.'/'.$entry);
|
||||||
@mkdir(G5_DATA_PATH . '/file/' . $target_table . '/' . $entry, G5_DIR_PERMISSION);
|
@mkdir(G5_DATA_PATH.'/file/'.$target_table.'/'.$entry, G5_DIR_PERMISSION);
|
||||||
@chmod(G5_DATA_PATH . '/file/' . $target_table . '/' . $entry, G5_DIR_PERMISSION);
|
@chmod(G5_DATA_PATH.'/file/'.$target_table.'/'.$entry, G5_DIR_PERMISSION);
|
||||||
while ($entry2 = $dd->read()) {
|
while ($entry2 = $dd->read()) {
|
||||||
if ($entry2 == '.' || $entry2 == '..') {
|
if ($entry2 == '.' || $entry2 == '..') continue;
|
||||||
continue;
|
@copy(G5_DATA_PATH.'/file/'.$bo_table.'/'.$entry.'/'.$entry2, G5_DATA_PATH.'/file/'.$target_table.'/'.$entry.'/'.$entry2);
|
||||||
}
|
@chmod(G5_DATA_PATH.'/file/'.$target_table.'/'.$entry.'/'.$entry2, G5_DIR_PERMISSION);
|
||||||
@copy(G5_DATA_PATH . '/file/' . $bo_table . '/' . $entry . '/' . $entry2, G5_DATA_PATH . '/file/' . $target_table . '/' . $entry . '/' . $entry2);
|
|
||||||
@chmod(G5_DATA_PATH . '/file/' . $target_table . '/' . $entry . '/' . $entry2, G5_DIR_PERMISSION);
|
|
||||||
$copy_file++;
|
$copy_file++;
|
||||||
}
|
}
|
||||||
$dd->close();
|
$dd->close();
|
||||||
} else {
|
}
|
||||||
@copy(G5_DATA_PATH . '/file/' . $bo_table . '/' . $entry, G5_DATA_PATH . '/file/' . $target_table . '/' . $entry);
|
else {
|
||||||
@chmod(G5_DATA_PATH . '/file/' . $target_table . '/' . $entry, G5_DIR_PERMISSION);
|
@copy(G5_DATA_PATH.'/file/'.$bo_table.'/'.$entry, G5_DATA_PATH.'/file/'.$target_table.'/'.$entry);
|
||||||
|
@chmod(G5_DATA_PATH.'/file/'.$target_table.'/'.$entry, G5_DIR_PERMISSION);
|
||||||
$copy_file++;
|
$copy_file++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$d->close();
|
$d->close();
|
||||||
|
|
||||||
run_event('admin_board_copy_file', $bo_table, $target_table);
|
|
||||||
|
|
||||||
// 글복사
|
// 글복사
|
||||||
$sql = " insert into {$g5['write_prefix']}$target_table select * from {$g5['write_prefix']}$bo_table ";
|
$sql = " insert into {$g5['write_prefix']}$target_table select * from {$g5['write_prefix']}$bo_table ";
|
||||||
sql_query($sql, false);
|
sql_query($sql, false);
|
||||||
@@ -193,34 +171,28 @@ if ($copy_case == 'schema_data_both') {
|
|||||||
sql_query($sql, false);
|
sql_query($sql, false);
|
||||||
|
|
||||||
// 4.00.01
|
// 4.00.01
|
||||||
|
// 위의 코드는 같은 테이블명을 사용하였다는 오류가 발생함. (희한하네 ㅡㅡ;)
|
||||||
$sql = " select * from {$g5['board_file_table']} where bo_table = '$bo_table' ";
|
$sql = " select * from {$g5['board_file_table']} where bo_table = '$bo_table' ";
|
||||||
$result = sql_query($sql, false);
|
$result = sql_query($sql, false);
|
||||||
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||||
$file_copy[$i] = $row;
|
$file_copy[$i] = $row;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count($file_copy)) {
|
if (count($file_copy)) {
|
||||||
for ($i = 0; $i < count($file_copy); $i++) {
|
for ($i=0; $i<count($file_copy); $i++) {
|
||||||
$file_copy[$i] = run_replace('admin_copy_update_file', $file_copy[$i], $file_copy[$i]['bf_file'], $bo_table, $target_table);
|
|
||||||
|
|
||||||
$sql = " insert into {$g5['board_file_table']}
|
$sql = " insert into {$g5['board_file_table']}
|
||||||
set bo_table = '$target_table',
|
set bo_table = '$target_table',
|
||||||
wr_id = '{$file_copy[$i]['wr_id']}',
|
wr_id = '{$file_copy[$i]['wr_id']}',
|
||||||
bf_no = '{$file_copy[$i]['bf_no']}',
|
bf_no = '{$file_copy[$i]['bf_no']}',
|
||||||
bf_source = '" . addslashes($file_copy[$i]['bf_source']) . "',
|
bf_source = '".addslashes($file_copy[$i]['bf_source'])."',
|
||||||
bf_file = '{$file_copy[$i]['bf_file']}',
|
bf_file = '{$file_copy[$i]['bf_file']}',
|
||||||
bf_download = '{$file_copy[$i]['bf_download']}',
|
bf_download = '{$file_copy[$i]['bf_download']}',
|
||||||
bf_content = '" . addslashes($file_copy[$i]['bf_content']) . "',
|
bf_content = '".addslashes($file_copy[$i]['bf_content'])."',
|
||||||
bf_fileurl = '" . addslashes($file_copy[$i]['bf_fileurl']) . "',
|
|
||||||
bf_thumburl = '" . addslashes($file_copy[$i]['bf_thumburl']) . "',
|
|
||||||
bf_storage = '" . addslashes($file_copy[$i]['bf_storage']) . "',
|
|
||||||
bf_filesize = '{$file_copy[$i]['bf_filesize']}',
|
bf_filesize = '{$file_copy[$i]['bf_filesize']}',
|
||||||
bf_width = '{$file_copy[$i]['bf_width']}',
|
bf_width = '{$file_copy[$i]['bf_width']}',
|
||||||
bf_height = '{$file_copy[$i]['bf_height']}',
|
bf_height = '{$file_copy[$i]['bf_height']}',
|
||||||
bf_type = '{$file_copy[$i]['bf_type']}',
|
bf_type = '{$file_copy[$i]['bf_type']}',
|
||||||
bf_datetime = '{$file_copy[$i]['bf_datetime']}' ";
|
bf_datetime = '{$file_copy[$i]['bf_datetime']}' ";
|
||||||
|
|
||||||
sql_query($sql, false);
|
sql_query($sql, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -230,4 +202,5 @@ delete_cache_latest($target_table);
|
|||||||
|
|
||||||
echo "<script>opener.document.location.reload();</script>";
|
echo "<script>opener.document.location.reload();</script>";
|
||||||
|
|
||||||
alert("복사에 성공 했습니다.", './board_copy.php?bo_table=' . $bo_table . '&' . $qstr);
|
alert("복사에 성공 했습니다.", './board_copy.php?bo_table='.$bo_table.'&'.$qstr);
|
||||||
|
?>
|
||||||
@@ -1,18 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
// board_delete.php , boardgroup_delete.php 에서 include 하는 파일
|
// board_delete.php , boardgroup_delete.php 에서 include 하는 파일
|
||||||
|
|
||||||
// 개별 페이지 접근 불가
|
if (!defined('_GNUBOARD_')) exit;
|
||||||
if (!defined('_GNUBOARD_')) {
|
if (!defined('_BOARD_DELETE_')) exit; // 개별 페이지 접근 불가
|
||||||
exit;
|
|
||||||
}
|
|
||||||
if (!defined('_BOARD_DELETE_')) {
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
// $tmp_bo_table 에는 $bo_table 값을 넘겨주어야 함
|
// $tmp_bo_table 에는 $bo_table 값을 넘겨주어야 함
|
||||||
if (!$tmp_bo_table) {
|
if (!$tmp_bo_table) { return; }
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 게시판 1개는 삭제 불가 (게시판 복사를 위해서)
|
// 게시판 1개는 삭제 불가 (게시판 복사를 위해서)
|
||||||
//$row = sql_fetch(" select count(*) as cnt from $g5['board_table'] ");
|
//$row = sql_fetch(" select count(*) as cnt from $g5['board_table'] ");
|
||||||
@@ -31,12 +24,10 @@ sql_query(" delete from {$g5['scrap_table']} where bo_table = '{$tmp_bo_table}'
|
|||||||
sql_query(" delete from {$g5['board_file_table']} where bo_table = '{$tmp_bo_table}' ");
|
sql_query(" delete from {$g5['board_file_table']} where bo_table = '{$tmp_bo_table}' ");
|
||||||
|
|
||||||
// 게시판 테이블 DROP
|
// 게시판 테이블 DROP
|
||||||
sql_query(" drop table {$g5['write_prefix']}{$tmp_bo_table} ", false);
|
sql_query(" drop table {$g5['write_prefix']}{$tmp_bo_table} ", FALSE);
|
||||||
|
|
||||||
// 좋아요 테이블에서 기록 삭제
|
|
||||||
sql_query(" delete from {$g5['board_good_table']} where bo_table = '{$tmp_bo_table}' ");
|
|
||||||
|
|
||||||
delete_cache_latest($tmp_bo_table);
|
delete_cache_latest($tmp_bo_table);
|
||||||
|
|
||||||
// 게시판 폴더 전체 삭제
|
// 게시판 폴더 전체 삭제
|
||||||
rm_rf(G5_DATA_PATH . '/file/' . $tmp_bo_table);
|
rm_rf(G5_DATA_PATH.'/file/'.$tmp_bo_table);
|
||||||
|
?>
|
||||||
+108
-214
@@ -1,91 +1,89 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "300100";
|
$sub_menu = "300100";
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
require_once G5_EDITOR_LIB;
|
include_once(G5_EDITOR_LIB);
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, 'w');
|
auth_check($auth[$sub_menu], 'w');
|
||||||
|
|
||||||
$sql = " select count(*) as cnt from {$g5['group_table']} ";
|
$sql = " select count(*) as cnt from {$g5['group_table']} ";
|
||||||
$row = sql_fetch($sql);
|
$row = sql_fetch($sql);
|
||||||
if (!$row['cnt']) {
|
if (!$row['cnt'])
|
||||||
alert('게시판그룹이 한개 이상 생성되어야 합니다.', './boardgroup_form.php');
|
alert('게시판그룹이 한개 이상 생성되어야 합니다.', './boardgroup_form.php');
|
||||||
}
|
|
||||||
|
|
||||||
$html_title = '게시판';
|
$html_title = '게시판';
|
||||||
|
|
||||||
|
if (!isset($board['bo_device'])) {
|
||||||
|
// 게시판 사용 필드 추가
|
||||||
|
// both : pc, mobile 둘다 사용
|
||||||
|
// pc : pc 전용 사용
|
||||||
|
// mobile : mobile 전용 사용
|
||||||
|
// none : 사용 안함
|
||||||
|
sql_query(" ALTER TABLE `{$g5['board_table']}` ADD `bo_device` ENUM( 'both', 'pc', 'mobile' ) NOT NULL DEFAULT 'both' AFTER `bo_subject` ", false);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isset($board['bo_mobile_skin'])) {
|
||||||
|
sql_query(" ALTER TABLE `{$g5['board_table']}` ADD `bo_mobile_skin` VARCHAR(255) NOT NULL DEFAULT '' AFTER `bo_skin` ", false);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isset($board['bo_gallery_width'])) {
|
||||||
|
sql_query(" ALTER TABLE `{$g5['board_table']}` ADD `bo_gallery_width` INT NOT NULL AFTER `bo_gallery_cols`, ADD `bo_gallery_height` INT NOT NULL DEFAULT '0' AFTER `bo_gallery_width`, ADD `bo_mobile_gallery_width` INT NOT NULL DEFAULT '0' AFTER `bo_gallery_height`, ADD `bo_mobile_gallery_height` INT NOT NULL DEFAULT '0' AFTER `bo_mobile_gallery_width` ", false);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isset($board['bo_mobile_subject_len'])) {
|
||||||
|
sql_query(" ALTER TABLE `{$g5['board_table']}` ADD `bo_mobile_subject_len` INT(11) NOT NULL DEFAULT '0' AFTER `bo_subject_len` ", false);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isset($board['bo_mobile_page_rows'])) {
|
||||||
|
sql_query(" ALTER TABLE `{$g5['board_table']}` ADD `bo_mobile_page_rows` INT(11) NOT NULL DEFAULT '0' AFTER `bo_page_rows` ", false);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isset($board['bo_mobile_content_head'])) {
|
||||||
|
sql_query(" ALTER TABLE `{$g5['board_table']}` ADD `bo_mobile_content_head` TEXT NOT NULL AFTER `bo_content_head`, ADD `bo_mobile_content_tail` TEXT NOT NULL AFTER `bo_content_tail`", false);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isset($board['bo_use_cert'])) {
|
||||||
|
sql_query(" ALTER TABLE `{$g5['board_table']}` ADD `bo_use_cert` ENUM('','cert','adult') NOT NULL DEFAULT '' AFTER `bo_use_email` ", false);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isset($board['bo_use_sns'])) {
|
||||||
|
sql_query(" ALTER TABLE `{$g5['board_table']}` ADD `bo_use_sns` TINYINT NOT NULL DEFAULT '0' AFTER `bo_use_cert` ", false);
|
||||||
|
|
||||||
|
$result = sql_query(" select bo_table from `{$g5['board_table']}` ");
|
||||||
|
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||||
|
sql_query(" ALTER TABLE `{$g5['write_prefix']}{$row['bo_table']}`
|
||||||
|
ADD `wr_facebook_user` VARCHAR(255) NOT NULL DEFAULT '' AFTER `wr_ip`,
|
||||||
|
ADD `wr_twitter_user` VARCHAR(255) NOT NULL DEFAULT '' AFTER `wr_facebook_user` ", false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$sql = " SHOW COLUMNS FROM `{$g5['board_table']}` LIKE 'bo_use_cert' ";
|
$sql = " SHOW COLUMNS FROM `{$g5['board_table']}` LIKE 'bo_use_cert' ";
|
||||||
$row = sql_fetch($sql);
|
$row = sql_fetch($sql);
|
||||||
|
if(strpos($row['Type'], 'hp-') === false) {
|
||||||
|
sql_query(" ALTER TABLE `{$g5['board_table']}` CHANGE `bo_use_cert` `bo_use_cert` ENUM('','cert','adult','hp-cert','hp-adult') NOT NULL DEFAULT '' ", false);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$board_default = array(
|
|
||||||
'bo_mobile_subject'=>'',
|
|
||||||
'bo_device'=>'',
|
|
||||||
'bo_use_category'=>0,
|
|
||||||
'bo_category_list'=>'',
|
|
||||||
'bo_admin'=>'',
|
|
||||||
'bo_list_level'=>0,
|
|
||||||
'bo_read_level'=>0,
|
|
||||||
'bo_write_level'=>0,
|
|
||||||
'bo_reply_level'=>0,
|
|
||||||
'bo_comment_level'=>0,
|
|
||||||
'bo_link_level'=>0,
|
|
||||||
'bo_upload_level'=>0,
|
|
||||||
'bo_download_level'=>0,
|
|
||||||
'bo_html_level'=>0,
|
|
||||||
'bo_use_sideview'=>0,
|
|
||||||
'bo_select_editor'=>'',
|
|
||||||
'bo_use_rss_view'=>0,
|
|
||||||
'bo_use_good'=>0,
|
|
||||||
'bo_use_nogood'=>0,
|
|
||||||
'bo_use_name'=>0,
|
|
||||||
'bo_use_signature'=>0,
|
|
||||||
'bo_use_ip_view'=>0,
|
|
||||||
'bo_use_list_content'=>0,
|
|
||||||
'bo_use_list_file'=>0,
|
|
||||||
'bo_use_list_view'=>0,
|
|
||||||
'bo_use_email'=>0,
|
|
||||||
'bo_use_file_content'=>0,
|
|
||||||
'bo_use_cert'=>'',
|
|
||||||
'bo_write_min'=>0,
|
|
||||||
'bo_write_max'=>0,
|
|
||||||
'bo_comment_min'=>0,
|
|
||||||
'bo_comment_max'=>0,
|
|
||||||
'bo_use_sns'=>0,
|
|
||||||
'bo_order'=>0,
|
|
||||||
'bo_use_captcha'=>0,
|
|
||||||
'bo_content_head'=>'',
|
|
||||||
'bo_content_tail'=>'',
|
|
||||||
'bo_mobile_content_head'=>'',
|
|
||||||
'bo_mobile_content_tail'=>'',
|
|
||||||
'bo_insert_content'=>'',
|
|
||||||
'bo_sort_field'=>'',
|
|
||||||
);
|
|
||||||
|
|
||||||
for ($i = 0; $i <= 10; $i++) {
|
|
||||||
$board_default['bo_'.$i.'_subj'] = '';
|
|
||||||
$board_default['bo_'.$i] = '';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$board = array_merge($board_default, $board);
|
if (!isset($board['bo_use_list_file'])) {
|
||||||
|
sql_query(" ALTER TABLE `{$g5['board_table']}` ADD `bo_use_list_file` TINYINT NOT NULL DEFAULT '0' AFTER `bo_use_list_view` ", false);
|
||||||
|
|
||||||
run_event('adm_board_form_before', $board, $w);
|
$result = sql_query(" select bo_table from `{$g5['board_table']}` ");
|
||||||
|
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||||
|
sql_query(" ALTER TABLE `{$g5['write_prefix']}{$row['bo_table']}`
|
||||||
|
ADD `wr_file` TINYINT NOT NULL DEFAULT '0' AFTER `wr_datetime` ", false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isset($board['bo_mobile_subject'])) {
|
||||||
|
sql_query(" ALTER TABLE `{$g5['board_table']}` ADD `bo_mobile_subject` VARCHAR(255) NOT NULL DEFAULT '' AFTER `bo_subject` ", false);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isset($board['bo_use_captcha'])) {
|
||||||
|
sql_query(" ALTER TABLE `{$g5['board_table']}` ADD `bo_use_captcha` TINYINT NOT NULL DEFAULT '0' AFTER `bo_use_sns` ");
|
||||||
|
}
|
||||||
|
|
||||||
$required = "";
|
$required = "";
|
||||||
$readonly = "";
|
$readonly = "";
|
||||||
$sound_only = "";
|
|
||||||
$required_valid = "";
|
|
||||||
if ($w == '') {
|
if ($w == '') {
|
||||||
|
|
||||||
$html_title .= ' 생성';
|
$html_title .= ' 생성';
|
||||||
|
|
||||||
$required = 'required';
|
$required = 'required';
|
||||||
@@ -122,20 +120,21 @@ if ($w == '') {
|
|||||||
$board['bo_use_secret'] = 0;
|
$board['bo_use_secret'] = 0;
|
||||||
$board['bo_include_head'] = '_head.php';
|
$board['bo_include_head'] = '_head.php';
|
||||||
$board['bo_include_tail'] = '_tail.php';
|
$board['bo_include_tail'] = '_tail.php';
|
||||||
} elseif ($w == 'u') {
|
|
||||||
|
} else if ($w == 'u') {
|
||||||
|
|
||||||
$html_title .= ' 수정';
|
$html_title .= ' 수정';
|
||||||
|
|
||||||
if (!$board['bo_table']) {
|
if (!$board['bo_table'])
|
||||||
alert('존재하지 않은 게시판 입니다.');
|
alert('존재하지 않은 게시판 입니다.');
|
||||||
}
|
|
||||||
|
|
||||||
if ($is_admin == 'group') {
|
if ($is_admin == 'group') {
|
||||||
if ($member['mb_id'] != $group['gr_admin']) {
|
if ($member['mb_id'] != $group['gr_admin'])
|
||||||
alert('그룹이 틀립니다.');
|
alert('그룹이 틀립니다.');
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$readonly = 'readonly';
|
$readonly = 'readonly';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($is_admin != 'super') {
|
if ($is_admin != 'super') {
|
||||||
@@ -144,7 +143,7 @@ if ($is_admin != 'super') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$g5['title'] = $html_title;
|
$g5['title'] = $html_title;
|
||||||
require_once './admin.head.php';
|
include_once ('./admin.head.php');
|
||||||
|
|
||||||
$pg_anchor = '<ul class="anchor">
|
$pg_anchor = '<ul class="anchor">
|
||||||
<li><a href="#anc_bo_basic">기본 설정</a></li>
|
<li><a href="#anc_bo_basic">기본 설정</a></li>
|
||||||
@@ -182,11 +181,11 @@ $pg_anchor = '<ul class="anchor">
|
|||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="bo_table">TABLE<?php echo $sound_only ?></label></th>
|
<th scope="row"><label for="bo_table">TABLE<?php echo $sound_only ?></label></th>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<input type="text" name="bo_table" value="<?php echo $board['bo_table'] ?>" id="bo_table" <?php echo $required ?> <?php echo $readonly ?> class="frm_input <?php echo $readonly ?> <?php echo $required ?> <?php echo $required_valid ?>" maxlength="20">
|
<input type="text" name="bo_table" value="<?php echo $board['bo_table'] ?>" id="bo_table" <?php echo $required ?> <?php echo $readonly ?> class="frm_input <?php echo $reaonly ?> <?php echo $required ?> <?php echo $required_valid ?>" maxlength="20">
|
||||||
<?php if ($w == '') { ?>
|
<?php if ($w == '') { ?>
|
||||||
영문자, 숫자, _ 만 가능 (공백없이 20자 이내)
|
영문자, 숫자, _ 만 가능 (공백없이 20자 이내)
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<a href="<?php echo get_pretty_url($board['bo_table']) ?>" class="btn_frmline">게시판 바로가기</a>
|
<a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $board['bo_table'] ?>" class="btn_frmline">게시판 바로가기</a>
|
||||||
<a href="./board_list.php?<?php echo $qstr;?>" class="btn_frmline">목록으로</a>
|
<a href="./board_list.php?<?php echo $qstr;?>" class="btn_frmline">목록으로</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</td>
|
</td>
|
||||||
@@ -195,9 +194,7 @@ $pg_anchor = '<ul class="anchor">
|
|||||||
<th scope="row"><label for="gr_id">그룹<strong class="sound_only">필수</strong></label></th>
|
<th scope="row"><label for="gr_id">그룹<strong class="sound_only">필수</strong></label></th>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<?php echo get_group_select('gr_id', $board['gr_id'], 'required'); ?>
|
<?php echo get_group_select('gr_id', $board['gr_id'], 'required'); ?>
|
||||||
<?php if ($w=='u') { ?>
|
<?php if ($w=='u') { ?><a href="javascript:document.location.href='./board_list.php?sfl=a.gr_id&stx='+document.fboardform.gr_id.value;" class="btn_frmline">동일그룹 게시판목록</a><?php } ?>
|
||||||
<a href="javascript:document.location.href='./board_list.php?sfl=a.gr_id&stx='+document.fboardform.gr_id.value;" class="btn_frmline">동일그룹 게시판목록</a>
|
|
||||||
<?php } ?>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -233,7 +230,7 @@ $pg_anchor = '<ul class="anchor">
|
|||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="bo_category_list">분류</label></th>
|
<th scope="row"><label for="bo_category_list">분류</label></th>
|
||||||
<td>
|
<td>
|
||||||
<?php echo help('분류와 분류 사이는 | 로 구분하세요. (예: 질문|답변) 첫자로 #은 입력하지 마세요. (예: #질문|#답변 [X])'."\n".'분류명에 일부 특수문자 ()/ 는 사용할수 없습니다.'); ?>
|
<?php echo help('분류와 분류 사이는 | 로 구분하세요. (예: 질문|답변) 첫자로 #은 입력하지 마세요. (예: #질문|#답변 [X])') ?>
|
||||||
<input type="text" name="bo_category_list" value="<?php echo get_text($board['bo_category_list']) ?>" id="bo_category_list" class="frm_input" size="70">
|
<input type="text" name="bo_category_list" value="<?php echo get_text($board['bo_category_list']) ?>" id="bo_category_list" class="frm_input" size="70">
|
||||||
<input type="checkbox" name="bo_use_category" value="1" id="bo_use_category" <?php echo $board['bo_use_category']?'checked':''; ?>>
|
<input type="checkbox" name="bo_use_category" value="1" id="bo_use_category" <?php echo $board['bo_use_category']?'checked':''; ?>>
|
||||||
<label for="bo_use_category">사용</label>
|
<label for="bo_use_category">사용</label>
|
||||||
@@ -484,29 +481,6 @@ $pg_anchor = '<ul class="anchor">
|
|||||||
<label for="chk_all_use_dhtml_editor">전체적용</label>
|
<label for="chk_all_use_dhtml_editor">전체적용</label>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<th scope="row"><label for="bo_select_editor">게시판 에디터 선택</label></th>
|
|
||||||
<td>
|
|
||||||
<?php echo help('게시판에 사용할 에디터를 설정합니다. 스킨에 따라 적용되지 않을 수 있습니다.') ?>
|
|
||||||
<select name="bo_select_editor" id="bo_select_editor">
|
|
||||||
<?php
|
|
||||||
$arr = get_skin_dir('', G5_EDITOR_PATH);
|
|
||||||
for ($i=0; $i<count($arr); $i++) {
|
|
||||||
if ($i == 0) {
|
|
||||||
echo "<option value=\"\">기본환경설정의 에디터 사용</option>";
|
|
||||||
}
|
|
||||||
echo "<option value=\"".$arr[$i]."\"".get_selected($board['bo_select_editor'], $arr[$i]).">".$arr[$i]."</option>\n";
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
<td class="td_grpset">
|
|
||||||
<input type="checkbox" name="chk_grp_select_editor" value="1" id="chk_grp_select_editor">
|
|
||||||
<label for="chk_grp_select_editor">그룹적용</label>
|
|
||||||
<input type="checkbox" name="chk_all_select_editor" value="1" id="chk_all_select_editor">
|
|
||||||
<label for="chk_all_select_editor">전체적용</label>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="bo_use_rss_view">RSS 보이기 사용</label></th>
|
<th scope="row"><label for="bo_use_rss_view">RSS 보이기 사용</label></th>
|
||||||
<td>
|
<td>
|
||||||
@@ -647,10 +621,12 @@ $pg_anchor = '<ul class="anchor">
|
|||||||
<?php echo help("본인확인 여부에 따라 게시물을 조회 할 수 있도록 합니다."); ?>
|
<?php echo help("본인확인 여부에 따라 게시물을 조회 할 수 있도록 합니다."); ?>
|
||||||
<select id="bo_use_cert" name="bo_use_cert">
|
<select id="bo_use_cert" name="bo_use_cert">
|
||||||
<?php
|
<?php
|
||||||
echo option_selected("", $board['bo_use_cert'], "사용안함");
|
echo option_selected("", $board['bo_use_cert'], "사용안함");
|
||||||
if ($config['cf_cert_use']) {
|
if ($config['cf_cert_use']) {
|
||||||
echo option_selected("cert", $board['bo_use_cert'], "본인확인된 회원전체");
|
echo option_selected("cert", $board['bo_use_cert'], "본인확인된 회원전체");
|
||||||
echo option_selected("adult", $board['bo_use_cert'], "본인확인된 성인회원만");
|
echo option_selected("adult", $board['bo_use_cert'], "본인확인된 성인회원만");
|
||||||
|
echo option_selected("hp-cert", $board['bo_use_cert'], "휴대폰 본인확인된 회원전체");
|
||||||
|
echo option_selected("hp-adult", $board['bo_use_cert'], "휴대폰 본인확인된 성인회원만");
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
@@ -849,11 +825,10 @@ $pg_anchor = '<ul class="anchor">
|
|||||||
<label for="chk_all_mobile_skin">전체적용</label>
|
<label for="chk_all_mobile_skin">전체적용</label>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php if ($is_admin === 'super') { // 슈퍼관리자인 경우에만 수정 가능 ?>
|
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="bo_include_head">상단 파일 경로</label></th>
|
<th scope="row"><label for="bo_include_head">상단 파일 경로</label></th>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" name="bo_include_head" value="<?php echo get_sanitize_input($board['bo_include_head']); ?>" id="bo_include_head" class="frm_input" size="50">
|
<input type="text" name="bo_include_head" value="<?php echo $board['bo_include_head'] ?>" id="bo_include_head" class="frm_input" size="50">
|
||||||
</td>
|
</td>
|
||||||
<td class="td_grpset">
|
<td class="td_grpset">
|
||||||
<input type="checkbox" name="chk_grp_include_head" value="1" id="chk_grp_include_head">
|
<input type="checkbox" name="chk_grp_include_head" value="1" id="chk_grp_include_head">
|
||||||
@@ -865,7 +840,7 @@ $pg_anchor = '<ul class="anchor">
|
|||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="bo_include_tail">하단 파일 경로</label></th>
|
<th scope="row"><label for="bo_include_tail">하단 파일 경로</label></th>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" name="bo_include_tail" value="<?php echo get_sanitize_input($board['bo_include_tail']); ?>" id="bo_include_tail" class="frm_input" size="50">
|
<input type="text" name="bo_include_tail" value="<?php echo $board['bo_include_tail'] ?>" id="bo_include_tail" class="frm_input" size="50">
|
||||||
</td>
|
</td>
|
||||||
<td class="td_grpset">
|
<td class="td_grpset">
|
||||||
<input type="checkbox" name="chk_grp_include_tail" value="1" id="chk_grp_include_tail">
|
<input type="checkbox" name="chk_grp_include_tail" value="1" id="chk_grp_include_tail">
|
||||||
@@ -874,26 +849,10 @@ $pg_anchor = '<ul class="anchor">
|
|||||||
<label for="chk_all_include_tail">전체적용</label>
|
<label for="chk_all_include_tail">전체적용</label>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</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>
|
<tr>
|
||||||
<th scope="row"><label for="bo_content_head">상단 내용</label></th>
|
<th scope="row"><label for="bo_content_head">상단 내용</label></th>
|
||||||
<td>
|
<td>
|
||||||
<?php echo editor_html("bo_content_head", get_text(html_purifier($board['bo_content_head']), 0)); ?>
|
<?php echo editor_html("bo_content_head", get_text($board['bo_content_head'], 0)); ?>
|
||||||
</td>
|
</td>
|
||||||
<td class="td_grpset">
|
<td class="td_grpset">
|
||||||
<input type="checkbox" name="chk_grp_content_head" value="1" id="chk_grp_content_head">
|
<input type="checkbox" name="chk_grp_content_head" value="1" id="chk_grp_content_head">
|
||||||
@@ -905,7 +864,7 @@ $pg_anchor = '<ul class="anchor">
|
|||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="bo_content_tail">하단 내용</label></th>
|
<th scope="row"><label for="bo_content_tail">하단 내용</label></th>
|
||||||
<td>
|
<td>
|
||||||
<?php echo editor_html("bo_content_tail", get_text(html_purifier($board['bo_content_tail']), 0)); ?>
|
<?php echo editor_html("bo_content_tail", get_text($board['bo_content_tail'], 0)); ?>
|
||||||
</td>
|
</td>
|
||||||
<td class="td_grpset">
|
<td class="td_grpset">
|
||||||
<input type="checkbox" name="chk_grp_content_tail" value="1" id="chk_grp_content_tail">
|
<input type="checkbox" name="chk_grp_content_tail" value="1" id="chk_grp_content_tail">
|
||||||
@@ -917,7 +876,7 @@ $pg_anchor = '<ul class="anchor">
|
|||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="bo_mobile_content_head">모바일 상단 내용</label></th>
|
<th scope="row"><label for="bo_mobile_content_head">모바일 상단 내용</label></th>
|
||||||
<td>
|
<td>
|
||||||
<?php echo editor_html("bo_mobile_content_head", get_text(html_purifier($board['bo_mobile_content_head']), 0)); ?>
|
<?php echo editor_html("bo_mobile_content_head", get_text($board['bo_mobile_content_head'], 0)); ?>
|
||||||
</td>
|
</td>
|
||||||
<td class="td_grpset">
|
<td class="td_grpset">
|
||||||
<input type="checkbox" name="chk_grp_mobile_content_head" value="1" id="chk_grp_mobile_content_head">
|
<input type="checkbox" name="chk_grp_mobile_content_head" value="1" id="chk_grp_mobile_content_head">
|
||||||
@@ -929,7 +888,7 @@ $pg_anchor = '<ul class="anchor">
|
|||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="bo_mobile_content_tail">모바일 하단 내용</label></th>
|
<th scope="row"><label for="bo_mobile_content_tail">모바일 하단 내용</label></th>
|
||||||
<td>
|
<td>
|
||||||
<?php echo editor_html("bo_mobile_content_tail", get_text(html_purifier($board['bo_mobile_content_tail']), 0)); ?>
|
<?php echo editor_html("bo_mobile_content_tail", get_text($board['bo_mobile_content_tail'], 0)); ?>
|
||||||
</td>
|
</td>
|
||||||
<td class="td_grpset">
|
<td class="td_grpset">
|
||||||
<input type="checkbox" name="chk_grp_mobile_content_tail" value="1" id="chk_grp_mobile_content_tail">
|
<input type="checkbox" name="chk_grp_mobile_content_tail" value="1" id="chk_grp_mobile_content_tail">
|
||||||
@@ -938,11 +897,10 @@ $pg_anchor = '<ul class="anchor">
|
|||||||
<label for="chk_all_mobile_content_tail">전체적용</label>
|
<label for="chk_all_mobile_content_tail">전체적용</label>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php } //end if $is_admin === 'super' ?>
|
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="bo_insert_content">글쓰기 기본 내용</label></th>
|
<th scope="row"><label for="bo_insert_content">글쓰기 기본 내용</label></th>
|
||||||
<td>
|
<td>
|
||||||
<textarea id="bo_insert_content" name="bo_insert_content" rows="5"><?php echo html_purifier($board['bo_insert_content']); ?></textarea>
|
<textarea id="bo_insert_content" name="bo_insert_content" rows="5"><?php echo $board['bo_insert_content'] ?></textarea>
|
||||||
</td>
|
</td>
|
||||||
<td class="td_grpset">
|
<td class="td_grpset">
|
||||||
<input type="checkbox" name="chk_grp_insert_content" value="1" id="chk_grp_insert_content">
|
<input type="checkbox" name="chk_grp_insert_content" value="1" id="chk_grp_insert_content">
|
||||||
@@ -1005,7 +963,7 @@ $pg_anchor = '<ul class="anchor">
|
|||||||
<th scope="row"><label for="bo_gallery_cols">갤러리 이미지 수<strong class="sound_only">필수</strong></label></th>
|
<th scope="row"><label for="bo_gallery_cols">갤러리 이미지 수<strong class="sound_only">필수</strong></label></th>
|
||||||
<td>
|
<td>
|
||||||
<?php echo help('갤러리 형식의 게시판 목록에서 이미지를 한줄에 몇장씩 보여 줄 것인지를 설정하는 값') ?>
|
<?php echo help('갤러리 형식의 게시판 목록에서 이미지를 한줄에 몇장씩 보여 줄 것인지를 설정하는 값') ?>
|
||||||
<input type="text" name="bo_gallery_cols" value="<?php echo $board['bo_gallery_cols'] ?>" id="bo_gallery_cols" required class="required numeric frm_input" size="4">
|
<?php echo get_member_level_select('bo_gallery_cols', 1, 10, $board['bo_gallery_cols']); ?>
|
||||||
</td>
|
</td>
|
||||||
<td class="td_grpset">
|
<td class="td_grpset">
|
||||||
<input type="checkbox" name="chk_grp_gallery_cols" value="1" id="chk_grp_gallery_cols">
|
<input type="checkbox" name="chk_grp_gallery_cols" value="1" id="chk_grp_gallery_cols">
|
||||||
@@ -1138,22 +1096,25 @@ $pg_anchor = '<ul class="anchor">
|
|||||||
<td>
|
<td>
|
||||||
<?php echo help('리스트에서 기본으로 정렬에 사용할 필드를 선택합니다. "기본"으로 사용하지 않으시는 경우 속도가 느려질 수 있습니다.') ?>
|
<?php echo help('리스트에서 기본으로 정렬에 사용할 필드를 선택합니다. "기본"으로 사용하지 않으시는 경우 속도가 느려질 수 있습니다.') ?>
|
||||||
<select id="bo_sort_field" name="bo_sort_field">
|
<select id="bo_sort_field" name="bo_sort_field">
|
||||||
<?php foreach (get_board_sort_fields($board) as $v) {
|
<option value="" <?php echo get_selected($board['bo_sort_field'], ""); ?>>wr_num, wr_reply : 기본</option>
|
||||||
$option_value = $order_by_str = $v[0];
|
<option value="wr_datetime asc" <?php echo get_selected($board['bo_sort_field'], "wr_datetime asc"); ?>>wr_datetime asc : 날짜 이전것 부터</option>
|
||||||
if ($v[0] === 'wr_num, wr_reply') {
|
<option value="wr_datetime desc" <?php echo get_selected($board['bo_sort_field'], "wr_datetime desc"); ?>>wr_datetime desc : 날짜 최근것 부터</option>
|
||||||
$selected = (! $board['bo_sort_field']) ? 'selected="selected"' : '';
|
<option value="wr_hit asc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "wr_hit asc, wr_num, wr_reply"); ?>>wr_hit asc : 조회수 낮은것 부터</option>
|
||||||
$option_value = '';
|
<option value="wr_hit desc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "wr_hit desc, wr_num, wr_reply"); ?>>wr_hit desc : 조회수 높은것 부터</option>
|
||||||
} else {
|
<option value="wr_last asc" <?php echo get_selected($board['bo_sort_field'], "wr_last asc"); ?>>wr_last asc : 최근글 이전것 부터</option>
|
||||||
$selected = ($board['bo_sort_field'] === $v[0]) ? 'selected="selected"' : '';
|
<option value="wr_last desc" <?php echo get_selected($board['bo_sort_field'], "wr_last desc"); ?>>wr_last desc : 최근글 최근것 부터</option>
|
||||||
}
|
<option value="wr_comment asc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "wr_comment asc, wr_num, wr_reply"); ?>>wr_comment asc : 댓글수 낮은것 부터</option>
|
||||||
|
<option value="wr_comment desc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "wr_comment desc, wr_num, wr_reply"); ?>>wr_comment desc : 댓글수 높은것 부터</option>
|
||||||
if ($order_by_str !== 'wr_num, wr_reply') {
|
<option value="wr_good asc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "wr_good asc, wr_num, wr_reply"); ?>>wr_good asc : 추천수 낮은것 부터</option>
|
||||||
$tmp = explode(',', $v[0]);
|
<option value="wr_good desc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "wr_good desc, wr_num, wr_reply"); ?>>wr_good desc : 추천수 높은것 부터</option>
|
||||||
$order_by_str = $tmp[0];
|
<option value="wr_nogood asc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "wr_nogood asc, wr_num, wr_reply"); ?>>wr_nogood asc : 비추천수 낮은것 부터</option>
|
||||||
}
|
<option value="wr_nogood desc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "wr_nogood desc, wr_num, wr_reply"); ?>>wr_nogood desc : 비추천수 높은것 부터</option>
|
||||||
|
<option value="wr_subject asc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "wr_subject asc, wr_num, wr_reply"); ?>>wr_subject asc : 제목 오름차순</option>
|
||||||
echo '<option value="'.$option_value.'" '.$selected.' >'.$order_by_str.' : '.$v[1].'</option>';
|
<option value="wr_subject desc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "wr_subject desc, wr_num, wr_reply"); ?>>wr_subject desc : 제목 내림차순</option>
|
||||||
} //end foreach ?>
|
<option value="wr_name asc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "wr_name asc, wr_num, wr_reply"); ?>>wr_name asc : 글쓴이 오름차순</option>
|
||||||
|
<option value="wr_name desc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "wr_name desc, wr_num, wr_reply"); ?>>wr_name desc : 글쓴이 내림차순</option>
|
||||||
|
<option value="ca_name asc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "ca_name asc, wr_num, wr_reply"); ?>>ca_name asc : 분류명 오름차순</option>
|
||||||
|
<option value="ca_name desc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "ca_name desc, wr_num, wr_reply"); ?>>ca_name desc : 분류명 내림차순</option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
<td class="td_grpset">
|
<td class="td_grpset">
|
||||||
@@ -1263,7 +1224,7 @@ $pg_anchor = '<ul class="anchor">
|
|||||||
<label for="bo_<?php echo $i ?>_subj">여분필드 <?php echo $i ?> 제목</label>
|
<label for="bo_<?php echo $i ?>_subj">여분필드 <?php echo $i ?> 제목</label>
|
||||||
<input type="text" name="bo_<?php echo $i ?>_subj" id="bo_<?php echo $i ?>_subj" value="<?php echo get_text($board['bo_'.$i.'_subj']) ?>" class="frm_input">
|
<input type="text" name="bo_<?php echo $i ?>_subj" id="bo_<?php echo $i ?>_subj" value="<?php echo get_text($board['bo_'.$i.'_subj']) ?>" class="frm_input">
|
||||||
<label for="bo_<?php echo $i ?>">여분필드 <?php echo $i ?> 값</label>
|
<label for="bo_<?php echo $i ?>">여분필드 <?php echo $i ?> 값</label>
|
||||||
<input type="text" name="bo_<?php echo $i ?>" value="<?php echo get_text($board['bo_'.$i]) ?>" id="bo_<?php echo $i ?>" class="frm_input extra-value-input">
|
<input type="text" name="bo_<?php echo $i ?>" value="<?php echo get_text($board['bo_'.$i]) ?>" id="bo_<?php echo $i ?>" class="frm_input">
|
||||||
</td>
|
</td>
|
||||||
<td class="td_grpset">
|
<td class="td_grpset">
|
||||||
<input type="checkbox" name="chk_grp_<?php echo $i ?>" value="1" id="chk_grp_<?php echo $i ?>">
|
<input type="checkbox" name="chk_grp_<?php echo $i ?>" value="1" id="chk_grp_<?php echo $i ?>">
|
||||||
@@ -1280,10 +1241,10 @@ $pg_anchor = '<ul class="anchor">
|
|||||||
|
|
||||||
|
|
||||||
<div class="btn_fixed_top">
|
<div class="btn_fixed_top">
|
||||||
<?php if ($bo_table && $w) { ?>
|
<?php if( $bo_table && $w ){ ?>
|
||||||
<a href="./board_copy.php?bo_table=<?php echo $board['bo_table']; ?>" id="board_copy" target="win_board_copy" class=" btn_02 btn">게시판복사</a>
|
<a href="./board_copy.php?bo_table='.$bo_table.'" id="board_copy" target="win_board_copy" class=" btn_02 btn">게시판복사</a>
|
||||||
<a href="<?php echo get_pretty_url($board['bo_table']); ?>" class=" btn_02 btn">게시판 바로가기</a>
|
<a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $board['bo_table']; ?>'" class=" btn_02 btn">게시판 바로가기</a>
|
||||||
<a href="./board_thumbnail_delete.php?bo_table=<?php echo $board['bo_table'].'&'.$qstr;?>" onclick="return delete_confirm2('게시판 썸네일 파일을 삭제하시겠습니까?');" class="btn_02 btn">게시판 썸네일 삭제</a>
|
<a href="./board_thumbnail_delete.php?bo_table=<?php echo $board['bo_table']; ?>'&'.$qstr.'" onclick="return delete_confirm2('게시판 썸네일 파일을 삭제하시겠습니까?');" class="btn_02 btn">게시판 썸네일 삭제</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<input type="submit" value="확인" class="btn_submi btn btn_01" accesskey="s">
|
<input type="submit" value="확인" class="btn_submi btn btn_01" accesskey="s">
|
||||||
</div>
|
</div>
|
||||||
@@ -1347,68 +1308,8 @@ function set_point(f) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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) {
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
var bo_include_head = jQuery.trim(jQuery("#bo_include_head").val()),
|
|
||||||
bo_include_tail = jQuery.trim(jQuery("#bo_include_tail").val());
|
|
||||||
|
|
||||||
function frm_check_file(){
|
|
||||||
var head = jQuery.trim(jQuery("#bo_include_head").val());
|
|
||||||
var tail = jQuery.trim(jQuery("#bo_include_tail").val());
|
|
||||||
|
|
||||||
if(bo_include_head !== head || bo_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을 사용할 경우 체크
|
|
||||||
use_captcha_check();
|
|
||||||
}
|
|
||||||
|
|
||||||
$("#bo_include_head, #bo_include_tail").on("change paste keyup", function(e) {
|
|
||||||
frm_check_file();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
function fboardform_submit(f)
|
function fboardform_submit(f)
|
||||||
{
|
{
|
||||||
<?php
|
|
||||||
if (!$w) {
|
|
||||||
$js_array = get_bo_table_banned_word();
|
|
||||||
echo "var banned_array = ". json_encode($js_array) . ";\n";
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
// 게시판명이 금지된 단어로 되어 있으면
|
|
||||||
if( (typeof banned_array != 'undefined') && jQuery.inArray(f.bo_table.value, banned_array) !== -1 ){
|
|
||||||
alert("입력한 게시판 TABLE명을 사용할수 없습니다. 다른 이름으로 입력해 주세요.");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
<?php echo get_editor_js("bo_content_head"); ?>
|
<?php echo get_editor_js("bo_content_head"); ?>
|
||||||
<?php echo get_editor_js("bo_content_tail"); ?>
|
<?php echo get_editor_js("bo_content_tail"); ?>
|
||||||
<?php echo get_editor_js("bo_mobile_content_head"); ?>
|
<?php echo get_editor_js("bo_mobile_content_head"); ?>
|
||||||
@@ -1426,17 +1327,10 @@ function fboardform_submit(f)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (frm_check_file() == false) {
|
|
||||||
jQuery(window).scrollTop($('#bo_include_tail').offset().top - 30);
|
|
||||||
}
|
|
||||||
|
|
||||||
if( captcha_chk ) {
|
|
||||||
<?php echo isset($captcha_js) ? $captcha_js : ''; // 캡챠 사용시 자바스크립트에서 입력된 캡챠를 검사함 ?>
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
require_once './admin.tail.php';
|
include_once ('./admin.tail.php');
|
||||||
|
?>
|
||||||
|
|||||||
+162
-332
@@ -2,105 +2,48 @@
|
|||||||
$sub_menu = "300100";
|
$sub_menu = "300100";
|
||||||
include_once('./_common.php');
|
include_once('./_common.php');
|
||||||
|
|
||||||
if ($w == 'u') {
|
if ($w == 'u')
|
||||||
check_demo();
|
check_demo();
|
||||||
}
|
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, 'w');
|
auth_check($auth[$sub_menu], 'w');
|
||||||
|
|
||||||
check_admin_token();
|
check_admin_token();
|
||||||
|
|
||||||
$gr_id = isset($_POST['gr_id']) ? preg_replace('/[^a-z0-9_]/i', '', (string)$_POST['gr_id']) : '';
|
if (!$_POST['gr_id']) { alert('그룹 ID는 반드시 선택하세요.'); }
|
||||||
$bo_admin = isset($_POST['bo_admin']) ? preg_replace('/[^a-z0-9_\, \|\#]/i', '', $_POST['bo_admin']) : '';
|
if (!$bo_table) { alert('게시판 TABLE명은 반드시 입력하세요.'); }
|
||||||
$bo_subject = isset($_POST['bo_subject']) ? addslashes(strip_tags(clean_xss_attributes(stripslashes($_POST['bo_subject'])))) : '';
|
if (!preg_match("/^([A-Za-z0-9_]{1,20})$/", $bo_table)) { alert('게시판 TABLE명은 공백없이 영문자, 숫자, _ 만 사용 가능합니다. (20자 이내)'); }
|
||||||
$bo_mobile_subject = isset($_POST['bo_mobile_subject']) ? addslashes(strip_tags(clean_xss_attributes(stripslashes($_POST['bo_mobile_subject'])))) : '';
|
if (!$_POST['bo_subject']) { alert('게시판 제목을 입력하세요.'); }
|
||||||
|
|
||||||
if (!$gr_id) {
|
$_POST['bo_include_head'] = preg_replace("#[\\\]+$#", "", substr($_POST['bo_include_head'], 0, 255));
|
||||||
alert('그룹 ID는 반드시 선택하세요.');
|
$_POST['bo_include_tail'] = preg_replace("#[\\\]+$#", "", substr($_POST['bo_include_tail'], 0, 255));
|
||||||
}
|
|
||||||
if (!$bo_table) {
|
|
||||||
alert('게시판 TABLE명은 반드시 입력하세요.');
|
|
||||||
}
|
|
||||||
if (!preg_match("/^([A-Za-z0-9_]{1,20})$/", $bo_table)) {
|
|
||||||
alert('게시판 TABLE명은 공백없이 영문자, 숫자, _ 만 사용 가능합니다. (20자 이내)');
|
|
||||||
}
|
|
||||||
if (!$bo_subject) {
|
|
||||||
alert('게시판 제목을 입력하세요.');
|
|
||||||
}
|
|
||||||
|
|
||||||
// 게시판명이 금지된 단어로 되어 있으면
|
if ($file = $_POST['bo_include_head']) {
|
||||||
if ($w == '' && in_array($bo_table, get_bo_table_banned_word())) {
|
$purl = parse_url($file);
|
||||||
alert('입력한 게시판 TABLE명을 사용할수 없습니다. 다른 이름으로 입력해 주세요.');
|
$file = $purl['path'];
|
||||||
}
|
if (!preg_match("/\.(php|htm['l']?)$/i", $file)) {
|
||||||
|
alert('상단 파일 경로의 확장자는 php, html 만 허용합니다.');
|
||||||
$bo_include_head = isset($_POST['bo_include_head']) ? preg_replace(array("#[\\\]+$#", "#(<\?php|<\?)#i"), "", substr($_POST['bo_include_head'], 0, 255)) : '';
|
|
||||||
$bo_include_tail = isset($_POST['bo_include_tail']) ? preg_replace(array("#[\\\]+$#", "#(<\?php|<\?)#i"), "", substr($_POST['bo_include_tail'], 0, 255)) : '';
|
|
||||||
|
|
||||||
$check_captcha = false;
|
|
||||||
|
|
||||||
// 관리자가 자동등록방지 CAPTCHA를 사용해야 할 경우
|
|
||||||
// 최고 관리자인 경우에만 수정가능
|
|
||||||
if ($is_admin === 'super') {
|
|
||||||
if ($w === 'u') {
|
|
||||||
if (isset($board['bo_include_head'], $board['bo_include_tail']) &&
|
|
||||||
($board['bo_include_head'] !== $bo_include_head || $board['bo_include_tail'] !== $bo_include_tail)) {
|
|
||||||
$check_captcha = true;
|
|
||||||
}
|
|
||||||
} elseif ($w === '') {
|
|
||||||
if ($bo_include_head !== '_head.php' || $bo_include_tail !== '_tail.php') {
|
|
||||||
$check_captcha = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
$_POST['bo_include_head'] = $file;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 실제 CAPTCHA 검증
|
if ($file = $_POST['bo_include_tail']) {
|
||||||
if ($check_captcha) {
|
$purl = parse_url($file);
|
||||||
include_once(G5_CAPTCHA_PATH . '/captcha.lib.php');
|
$file = $purl['path'];
|
||||||
|
if (!preg_match("/\.(php|htm['l']?)$/i", $file)) {
|
||||||
if (!chk_captcha()) {
|
alert('하단 파일 경로의 확장자는 php, html 만 허용합니다.');
|
||||||
alert('자동등록방지 숫자가 틀렸습니다.');
|
|
||||||
}
|
}
|
||||||
|
$_POST['bo_include_tail'] = $file;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 저장·검증 전에 경로를 먼저 정규화하여, 검증 이후 경로가 달라지지 않도록 한다.
|
if(!is_include_path_check($_POST['bo_include_head'], 1)) {
|
||||||
if (function_exists('filter_input_include_path')) {
|
alert('/data/file/ 또는 /data/editor/ 포함된 문자를 상단 파일 경로에 포함시킬수 없습니다.');
|
||||||
$bo_include_head = filter_input_include_path($bo_include_head);
|
|
||||||
$bo_include_tail = filter_input_include_path($bo_include_tail);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($file = $bo_include_head) {
|
if(!is_include_path_check($_POST['bo_include_tail'], 1)) {
|
||||||
$file_ext = pathinfo($file, PATHINFO_EXTENSION);
|
alert('/data/file/ 또는 /data/editor/ 포함된 문자를 하단 파일 경로에 포함시킬수 없습니다.');
|
||||||
|
|
||||||
if (!$file_ext || !in_array($file_ext, array('php', 'htm', 'html')) || !preg_match('/^.*\.(php|htm|html)$/i', $file)) {
|
|
||||||
alert('상단 파일 경로의 확장자는 php, htm, html 만 허용합니다.');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($file = $bo_include_tail) {
|
$board_path = G5_DATA_PATH.'/file/'.$bo_table;
|
||||||
$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 만 허용합니다.');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!is_include_path_check($bo_include_head, 1)) {
|
|
||||||
alert('상단 파일 경로에 포함시킬수 없는 문자열이 있습니다.');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!is_include_path_check($bo_include_tail, 1)) {
|
|
||||||
alert('하단 파일 경로에 포함시킬수 없는 문자열이 있습니다.');
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($bo_include_head && function_exists('is_content_include_allowed') && !is_content_include_allowed($bo_include_head)) {
|
|
||||||
alert('상단 파일 경로로 사용할 수 없는 위치입니다.');
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($bo_include_tail && function_exists('is_content_include_allowed') && !is_content_include_allowed($bo_include_tail)) {
|
|
||||||
alert('하단 파일 경로로 사용할 수 없는 위치입니다.');
|
|
||||||
}
|
|
||||||
|
|
||||||
$board_path = G5_DATA_PATH . '/file/' . $bo_table;
|
|
||||||
|
|
||||||
// 게시판 디렉토리 생성
|
// 게시판 디렉토리 생성
|
||||||
@mkdir($board_path, G5_DIR_PERMISSION);
|
@mkdir($board_path, G5_DIR_PERMISSION);
|
||||||
@@ -108,211 +51,113 @@ $board_path = G5_DATA_PATH . '/file/' . $bo_table;
|
|||||||
|
|
||||||
// 디렉토리에 있는 파일의 목록을 보이지 않게 한다.
|
// 디렉토리에 있는 파일의 목록을 보이지 않게 한다.
|
||||||
$file = $board_path . '/index.php';
|
$file = $board_path . '/index.php';
|
||||||
if ($f = @fopen($file, 'w')) {
|
$f = @fopen($file, 'w');
|
||||||
@fwrite($f, '');
|
@fwrite($f, '');
|
||||||
@fclose($f);
|
@fclose($f);
|
||||||
@chmod($file, G5_FILE_PERMISSION);
|
@chmod($file, G5_FILE_PERMISSION);
|
||||||
}
|
|
||||||
|
|
||||||
// 분류에 & 나 = 는 사용이 불가하므로 2바이트로 바꾼다.
|
// 분류에 & 나 = 는 사용이 불가하므로 2바이트로 바꾼다.
|
||||||
$src_char = array('&', '=');
|
$src_char = array('&', '=');
|
||||||
$dst_char = array('&', '〓');
|
$dst_char = array('&', '〓');
|
||||||
$bo_category_list = isset($_POST['bo_category_list']) ? str_replace($src_char, $dst_char, $_POST['bo_category_list']) : '';
|
$bo_category_list = str_replace($src_char, $dst_char, $bo_category_list);
|
||||||
//https://github.com/gnuboard/gnuboard5/commit/f5f4925d4eb28ba1af728e1065fc2bdd9ce1da58 에 따른 조치
|
|
||||||
$str_bo_category_list = preg_replace("/[\<\>\'\"\\\'\\\"\%\=\(\)\/\^\*]/", "", (string)$bo_category_list);
|
|
||||||
|
|
||||||
$bo_use_category = isset($_POST['bo_use_category']) ? (int) $_POST['bo_use_category'] : 0;
|
$sql_common = " gr_id = '{$_POST['gr_id']}',
|
||||||
$bo_use_sideview = isset($_POST['bo_use_sideview']) ? (int) $_POST['bo_use_sideview'] : 0;
|
bo_subject = '{$_POST['bo_subject']}',
|
||||||
$bo_use_dhtml_editor = isset($_POST['bo_use_dhtml_editor']) ? (int) $_POST['bo_use_dhtml_editor'] : 0;
|
bo_mobile_subject = '{$_POST['bo_mobile_subject']}',
|
||||||
$bo_use_good = isset($_POST['bo_use_good']) ? (int) $_POST['bo_use_good'] : 0;
|
bo_device = '{$_POST['bo_device']}',
|
||||||
$bo_use_nogood = isset($_POST['bo_use_nogood']) ? (int) $_POST['bo_use_nogood'] : 0;
|
bo_admin = '{$_POST['bo_admin']}',
|
||||||
$bo_use_name = isset($_POST['bo_use_name']) ? (int) $_POST['bo_use_name'] : 0;
|
bo_list_level = '{$_POST['bo_list_level']}',
|
||||||
$bo_use_signature = isset($_POST['bo_use_signature']) ? (int) $_POST['bo_use_signature'] : 0;
|
bo_read_level = '{$_POST['bo_read_level']}',
|
||||||
$bo_use_ip_view = isset($_POST['bo_use_ip_view']) ? (int) $_POST['bo_use_ip_view'] : 0;
|
bo_write_level = '{$_POST['bo_write_level']}',
|
||||||
$bo_use_list_view = isset($_POST['bo_use_list_view']) ? (int) $_POST['bo_use_list_view'] : 0;
|
bo_reply_level = '{$_POST['bo_reply_level']}',
|
||||||
$bo_use_list_file = isset($_POST['bo_use_list_file']) ? (int) $_POST['bo_use_list_file'] : 0;
|
bo_comment_level = '{$_POST['bo_comment_level']}',
|
||||||
$bo_use_list_content = isset($_POST['bo_use_list_content']) ? (int) $_POST['bo_use_list_content'] : 0;
|
bo_html_level = '{$_POST['bo_html_level']}',
|
||||||
$bo_use_email = isset($_POST['bo_use_email']) ? (int) $_POST['bo_use_email'] : 0;
|
bo_link_level = '{$_POST['bo_link_level']}',
|
||||||
$bo_use_sns = isset($_POST['bo_use_sns']) ? (int) $_POST['bo_use_sns'] : 0;
|
bo_count_modify = '{$_POST['bo_count_modify']}',
|
||||||
$bo_use_captcha = isset($_POST['bo_use_captcha']) ? (int) $_POST['bo_use_captcha'] : 0;
|
bo_count_delete = '{$_POST['bo_count_delete']}',
|
||||||
$bo_table_width = isset($_POST['bo_table_width']) ? (int) $_POST['bo_table_width'] : 0;
|
bo_upload_level = '{$_POST['bo_upload_level']}',
|
||||||
$bo_subject_len = isset($_POST['bo_subject_len']) ? (int) $_POST['bo_subject_len'] : 0;
|
bo_download_level = '{$_POST['bo_download_level']}',
|
||||||
$bo_mobile_subject_len = isset($_POST['bo_mobile_subject_len']) ? (int) $_POST['bo_mobile_subject_len'] : 0;
|
bo_read_point = '{$_POST['bo_read_point']}',
|
||||||
$bo_page_rows = isset($_POST['bo_page_rows']) ? (int) $_POST['bo_page_rows'] : 0;
|
bo_write_point = '{$_POST['bo_write_point']}',
|
||||||
$bo_mobile_page_rows = isset($_POST['bo_mobile_page_rows']) ? (int) $_POST['bo_mobile_page_rows'] : 0;
|
bo_comment_point = '{$_POST['bo_comment_point']}',
|
||||||
$bo_use_rss_view = isset($_POST['bo_use_rss_view']) ? (int) $_POST['bo_use_rss_view'] : 0;
|
bo_download_point = '{$_POST['bo_download_point']}',
|
||||||
$bo_use_secret = isset($_POST['bo_use_secret']) ? (int) $_POST['bo_use_secret'] : 0;
|
bo_use_category = '{$_POST['bo_use_category']}',
|
||||||
$bo_use_file_content = isset($_POST['bo_use_file_content']) ? (int) $_POST['bo_use_file_content'] : 0;
|
bo_category_list = '{$_POST['bo_category_list']}',
|
||||||
$bo_new = isset($_POST['bo_new']) ? (int) $_POST['bo_new'] : 0;
|
bo_use_sideview = '{$_POST['bo_use_sideview']}',
|
||||||
$bo_hot = isset($_POST['bo_hot']) ? (int) $_POST['bo_hot'] : 0;
|
bo_use_file_content = '{$_POST['bo_use_file_content']}',
|
||||||
$bo_image_width = isset($_POST['bo_image_width']) ? (int) $_POST['bo_image_width'] : 0;
|
bo_use_secret = '{$_POST['bo_use_secret']}',
|
||||||
$bo_use_search = isset($_POST['bo_use_search']) ? (int) $_POST['bo_use_search'] : 0;
|
bo_use_dhtml_editor = '{$_POST['bo_use_dhtml_editor']}',
|
||||||
$bo_use_cert = isset($_POST['bo_use_cert']) ? preg_replace('/[^0-9a-z_]/i', '', $_POST['bo_use_cert']) : '';
|
bo_use_rss_view = '{$_POST['bo_use_rss_view']}',
|
||||||
$bo_device = isset($_POST['bo_device']) ? addslashes(clean_xss_tags(stripslashes($_POST['bo_device']), 1, 1)) : '';
|
bo_use_good = '{$_POST['bo_use_good']}',
|
||||||
$bo_list_level = isset($_POST['bo_list_level']) ? (int) $_POST['bo_list_level'] : 0;
|
bo_use_nogood = '{$_POST['bo_use_nogood']}',
|
||||||
$bo_read_level = isset($_POST['bo_read_level']) ? (int) $_POST['bo_read_level'] : 0;
|
bo_use_name = '{$_POST['bo_use_name']}',
|
||||||
$bo_write_level = isset($_POST['bo_write_level']) ? (int) $_POST['bo_write_level'] : 0;
|
bo_use_signature = '{$_POST['bo_use_signature']}',
|
||||||
$bo_reply_level = isset($_POST['bo_reply_level']) ? (int) $_POST['bo_reply_level'] : 0;
|
bo_use_ip_view = '{$_POST['bo_use_ip_view']}',
|
||||||
$bo_comment_level = isset($_POST['bo_comment_level']) ? (int) $_POST['bo_comment_level'] : 0;
|
bo_use_list_view = '{$_POST['bo_use_list_view']}',
|
||||||
$bo_html_level = isset($_POST['bo_html_level']) ? (int) $_POST['bo_html_level'] : 0;
|
bo_use_list_file = '{$_POST['bo_use_list_file']}',
|
||||||
$bo_link_level = isset($_POST['bo_link_level']) ? (int) $_POST['bo_link_level'] : 0;
|
bo_use_list_content = '{$_POST['bo_use_list_content']}',
|
||||||
$bo_count_modify = isset($_POST['bo_count_modify']) ? (int) $_POST['bo_count_modify'] : 0;
|
bo_use_email = '{$_POST['bo_use_email']}',
|
||||||
$bo_count_delete = isset($_POST['bo_count_delete']) ? (int) $_POST['bo_count_delete'] : 0;
|
bo_use_cert = '{$_POST['bo_use_cert']}',
|
||||||
$bo_upload_level = isset($_POST['bo_upload_level']) ? (int) $_POST['bo_upload_level'] : 0;
|
bo_use_sns = '{$_POST['bo_use_sns']}',
|
||||||
$bo_download_level = isset($_POST['bo_download_level']) ? (int) $_POST['bo_download_level'] : 0;
|
bo_use_captcha = '{$_POST['bo_use_captcha']}',
|
||||||
$bo_read_point = isset($_POST['bo_read_point']) ? (int) $_POST['bo_read_point'] : 0;
|
bo_table_width = '{$_POST['bo_table_width']}',
|
||||||
$bo_write_point = isset($_POST['bo_write_point']) ? (int) $_POST['bo_write_point'] : 0;
|
bo_subject_len = '{$_POST['bo_subject_len']}',
|
||||||
$bo_comment_point = isset($_POST['bo_comment_point']) ? (int) $_POST['bo_comment_point'] : 0;
|
bo_mobile_subject_len = '{$_POST['bo_mobile_subject_len']}',
|
||||||
$bo_download_point = isset($_POST['bo_download_point']) ? (int) $_POST['bo_download_point'] : 0;
|
bo_page_rows = '{$_POST['bo_page_rows']}',
|
||||||
$bo_select_editor = isset($_POST['bo_select_editor']) ? addslashes(clean_xss_tags(stripslashes($_POST['bo_select_editor']), 1, 1)) : '';
|
bo_mobile_page_rows = '{$_POST['bo_mobile_page_rows']}',
|
||||||
$bo_skin = isset($_POST['bo_skin']) ? addslashes(clean_xss_tags(stripslashes($_POST['bo_skin']), 1, 1)) : '';
|
bo_new = '{$_POST['bo_new']}',
|
||||||
$bo_mobile_skin = isset($_POST['bo_mobile_skin']) ? addslashes(clean_xss_tags(stripslashes($_POST['bo_mobile_skin']), 1, 1)) : '';
|
bo_hot = '{$_POST['bo_hot']}',
|
||||||
$bo_content_head = isset($_POST['bo_content_head']) ? $_POST['bo_content_head'] : '';
|
bo_image_width = '{$_POST['bo_image_width']}',
|
||||||
$bo_content_tail = isset($_POST['bo_content_tail']) ? $_POST['bo_content_tail'] : '';
|
bo_skin = '{$_POST['bo_skin']}',
|
||||||
$bo_mobile_content_head = isset($_POST['bo_mobile_content_head']) ? $_POST['bo_mobile_content_head'] : '';
|
bo_mobile_skin = '{$_POST['bo_mobile_skin']}',
|
||||||
$bo_mobile_content_tail = isset($_POST['bo_mobile_content_tail']) ? $_POST['bo_mobile_content_tail'] : '';
|
bo_include_head = '{$_POST['bo_include_head']}',
|
||||||
$bo_insert_content = isset($_POST['bo_insert_content']) ? $_POST['bo_insert_content'] : '';
|
bo_include_tail = '{$_POST['bo_include_tail']}',
|
||||||
$bo_gallery_cols = isset($_POST['bo_gallery_cols']) ? (int) $_POST['bo_gallery_cols'] : 0;
|
bo_content_head = '{$_POST['bo_content_head']}',
|
||||||
$bo_gallery_width = isset($_POST['bo_gallery_width']) ? (int) $_POST['bo_gallery_width'] : 0;
|
bo_content_tail = '{$_POST['bo_content_tail']}',
|
||||||
$bo_gallery_height = isset($_POST['bo_gallery_height']) ? (int) $_POST['bo_gallery_height'] : 0;
|
bo_mobile_content_head = '{$_POST['bo_mobile_content_head']}',
|
||||||
$bo_mobile_gallery_width = isset($_POST['bo_mobile_gallery_width']) ? (int) $_POST['bo_mobile_gallery_width'] : 0;
|
bo_mobile_content_tail = '{$_POST['bo_mobile_content_tail']}',
|
||||||
$bo_mobile_gallery_height = isset($_POST['bo_mobile_gallery_height']) ? (int) $_POST['bo_mobile_gallery_height'] : 0;
|
bo_insert_content = '{$_POST['bo_insert_content']}',
|
||||||
$bo_upload_count = isset($_POST['bo_upload_count']) ? (int) $_POST['bo_upload_count'] : 0;
|
bo_gallery_cols = '{$_POST['bo_gallery_cols']}',
|
||||||
$bo_upload_size = isset($_POST['bo_upload_size']) ? (int) $_POST['bo_upload_size'] : 0;
|
bo_gallery_width = '{$_POST['bo_gallery_width']}',
|
||||||
$bo_reply_order = isset($_POST['bo_reply_order']) ? (int) $_POST['bo_reply_order'] : 0;
|
bo_gallery_height = '{$_POST['bo_gallery_height']}',
|
||||||
$bo_order = isset($_POST['bo_order']) ? (int) $_POST['bo_order'] : 0;
|
bo_mobile_gallery_width = '{$_POST['bo_mobile_gallery_width']}',
|
||||||
$bo_write_min = isset($_POST['bo_write_min']) ? (int) $_POST['bo_write_min'] : 0;
|
bo_mobile_gallery_height= '{$_POST['bo_mobile_gallery_height']}',
|
||||||
$bo_write_max = isset($_POST['bo_write_max']) ? (int) $_POST['bo_write_max'] : 0;
|
bo_upload_count = '{$_POST['bo_upload_count']}',
|
||||||
$bo_comment_min = isset($_POST['bo_comment_min']) ? (int) $_POST['bo_comment_min'] : 0;
|
bo_upload_size = '{$_POST['bo_upload_size']}',
|
||||||
$bo_comment_max = isset($_POST['bo_comment_max']) ? (int) $_POST['bo_comment_max'] : 0;
|
bo_reply_order = '{$_POST['bo_reply_order']}',
|
||||||
$bo_sort_field = isset($_POST['bo_sort_field']) ? trim(stripslashes($_POST['bo_sort_field'])) : '';
|
bo_use_search = '{$_POST['bo_use_search']}',
|
||||||
$bo_allowed_sort_field = array('');
|
bo_order = '{$_POST['bo_order']}',
|
||||||
if (function_exists('get_board_sort_fields')) {
|
bo_write_min = '{$_POST['bo_write_min']}',
|
||||||
foreach (get_board_sort_fields(isset($board) ? $board : array()) as $bo_sort_v) {
|
bo_write_max = '{$_POST['bo_write_max']}',
|
||||||
$bo_allowed_sort_field[] = $bo_sort_v[0];
|
bo_comment_min = '{$_POST['bo_comment_min']}',
|
||||||
}
|
bo_comment_max = '{$_POST['bo_comment_max']}',
|
||||||
}
|
bo_sort_field = '{$_POST['bo_sort_field']}',
|
||||||
if (!in_array($bo_sort_field, $bo_allowed_sort_field, true)) {
|
bo_1_subj = '{$_POST['bo_1_subj']}',
|
||||||
$bo_sort_field = '';
|
bo_2_subj = '{$_POST['bo_2_subj']}',
|
||||||
}
|
bo_3_subj = '{$_POST['bo_3_subj']}',
|
||||||
$bo_sort_field = addslashes($bo_sort_field);
|
bo_4_subj = '{$_POST['bo_4_subj']}',
|
||||||
|
bo_5_subj = '{$_POST['bo_5_subj']}',
|
||||||
if (strpbrk($bo_skin.$bo_mobile_skin, "?%*:|\"<>") !== false) {
|
bo_6_subj = '{$_POST['bo_6_subj']}',
|
||||||
alert('스킨 디렉토리명 오류!');
|
bo_7_subj = '{$_POST['bo_7_subj']}',
|
||||||
}
|
bo_8_subj = '{$_POST['bo_8_subj']}',
|
||||||
|
bo_9_subj = '{$_POST['bo_9_subj']}',
|
||||||
$etcs = array();
|
bo_10_subj = '{$_POST['bo_10_subj']}',
|
||||||
|
bo_1 = '{$_POST['bo_1']}',
|
||||||
for ($i = 1; $i <= 10; $i++) {
|
bo_2 = '{$_POST['bo_2']}',
|
||||||
$etcs['bo_' . $i . '_subj'] = ${'bo_' . $i . '_subj'} = isset($_POST['bo_' . $i . '_subj']) ? $_POST['bo_' . $i . '_subj'] : '';
|
bo_3 = '{$_POST['bo_3']}',
|
||||||
$etcs['bo_' . $i] = ${'bo_' . $i} = isset($_POST['bo_' . $i]) ? $_POST['bo_' . $i] : '';
|
bo_4 = '{$_POST['bo_4']}',
|
||||||
}
|
bo_5 = '{$_POST['bo_5']}',
|
||||||
|
bo_6 = '{$_POST['bo_6']}',
|
||||||
$sql_common = " gr_id = '{$gr_id}',
|
bo_7 = '{$_POST['bo_7']}',
|
||||||
bo_subject = '{$bo_subject}',
|
bo_8 = '{$_POST['bo_8']}',
|
||||||
bo_mobile_subject = '{$bo_mobile_subject}',
|
bo_9 = '{$_POST['bo_9']}',
|
||||||
bo_device = '{$bo_device}',
|
bo_10 = '{$_POST['bo_10']}' ";
|
||||||
bo_admin = '{$bo_admin}',
|
|
||||||
bo_list_level = '{$bo_list_level}',
|
|
||||||
bo_read_level = '{$bo_read_level}',
|
|
||||||
bo_write_level = '{$bo_write_level}',
|
|
||||||
bo_reply_level = '{$bo_reply_level}',
|
|
||||||
bo_comment_level = '{$bo_comment_level}',
|
|
||||||
bo_html_level = '{$bo_html_level}',
|
|
||||||
bo_link_level = '{$bo_link_level}',
|
|
||||||
bo_count_modify = '{$bo_count_modify}',
|
|
||||||
bo_count_delete = '{$bo_count_delete}',
|
|
||||||
bo_upload_level = '{$bo_upload_level}',
|
|
||||||
bo_download_level = '{$bo_download_level}',
|
|
||||||
bo_read_point = '{$bo_read_point}',
|
|
||||||
bo_write_point = '{$bo_write_point}',
|
|
||||||
bo_comment_point = '{$bo_comment_point}',
|
|
||||||
bo_download_point = '{$bo_download_point}',
|
|
||||||
bo_use_category = '{$bo_use_category}',
|
|
||||||
bo_category_list = '{$str_bo_category_list}',
|
|
||||||
bo_use_sideview = '{$bo_use_sideview}',
|
|
||||||
bo_use_file_content = '{$bo_use_file_content}',
|
|
||||||
bo_use_secret = '{$bo_use_secret}',
|
|
||||||
bo_use_dhtml_editor = '{$bo_use_dhtml_editor}',
|
|
||||||
bo_select_editor = '{$bo_select_editor}',
|
|
||||||
bo_use_rss_view = '{$bo_use_rss_view}',
|
|
||||||
bo_use_good = '{$bo_use_good}',
|
|
||||||
bo_use_nogood = '{$bo_use_nogood}',
|
|
||||||
bo_use_name = '{$bo_use_name}',
|
|
||||||
bo_use_signature = '{$bo_use_signature}',
|
|
||||||
bo_use_ip_view = '{$bo_use_ip_view}',
|
|
||||||
bo_use_list_view = '{$bo_use_list_view}',
|
|
||||||
bo_use_list_file = '{$bo_use_list_file}',
|
|
||||||
bo_use_list_content = '{$bo_use_list_content}',
|
|
||||||
bo_use_email = '{$bo_use_email}',
|
|
||||||
bo_use_cert = '{$bo_use_cert}',
|
|
||||||
bo_use_sns = '{$bo_use_sns}',
|
|
||||||
bo_use_captcha = '{$bo_use_captcha}',
|
|
||||||
bo_table_width = '{$bo_table_width}',
|
|
||||||
bo_subject_len = '{$bo_subject_len}',
|
|
||||||
bo_mobile_subject_len = '{$bo_mobile_subject_len}',
|
|
||||||
bo_page_rows = '{$bo_page_rows}',
|
|
||||||
bo_mobile_page_rows = '{$bo_mobile_page_rows}',
|
|
||||||
bo_new = '{$bo_new}',
|
|
||||||
bo_hot = '{$bo_hot}',
|
|
||||||
bo_image_width = '{$bo_image_width}',
|
|
||||||
bo_skin = '{$bo_skin}',
|
|
||||||
bo_mobile_skin = '{$bo_mobile_skin}',
|
|
||||||
";
|
|
||||||
|
|
||||||
// 최고 관리자인 경우에만 수정가능
|
|
||||||
if ($is_admin === 'super') {
|
|
||||||
$sql_common .= " bo_include_head = '" . $bo_include_head . "',
|
|
||||||
bo_include_tail = '" . $bo_include_tail . "',
|
|
||||||
bo_content_head = '{$bo_content_head}',
|
|
||||||
bo_content_tail = '{$bo_content_tail}',
|
|
||||||
bo_mobile_content_head = '{$bo_mobile_content_head}',
|
|
||||||
bo_mobile_content_tail = '{$bo_mobile_content_tail}',
|
|
||||||
";
|
|
||||||
}
|
|
||||||
|
|
||||||
$sql_common .= " bo_insert_content = '{$bo_insert_content}',
|
|
||||||
bo_gallery_cols = '{$bo_gallery_cols}',
|
|
||||||
bo_gallery_width = '{$bo_gallery_width}',
|
|
||||||
bo_gallery_height = '{$bo_gallery_height}',
|
|
||||||
bo_mobile_gallery_width = '{$bo_mobile_gallery_width}',
|
|
||||||
bo_mobile_gallery_height= '{$bo_mobile_gallery_height}',
|
|
||||||
bo_upload_count = '{$bo_upload_count}',
|
|
||||||
bo_upload_size = '{$bo_upload_size}',
|
|
||||||
bo_reply_order = '{$bo_reply_order}',
|
|
||||||
bo_use_search = '{$bo_use_search}',
|
|
||||||
bo_order = '{$bo_order}',
|
|
||||||
bo_write_min = '{$bo_write_min}',
|
|
||||||
bo_write_max = '{$bo_write_max}',
|
|
||||||
bo_comment_min = '{$bo_comment_min}',
|
|
||||||
bo_comment_max = '{$bo_comment_max}',
|
|
||||||
bo_sort_field = '{$bo_sort_field}',
|
|
||||||
bo_1_subj = '{$bo_1_subj}',
|
|
||||||
bo_2_subj = '{$bo_2_subj}',
|
|
||||||
bo_3_subj = '{$bo_3_subj}',
|
|
||||||
bo_4_subj = '{$bo_4_subj}',
|
|
||||||
bo_5_subj = '{$bo_5_subj}',
|
|
||||||
bo_6_subj = '{$bo_6_subj}',
|
|
||||||
bo_7_subj = '{$bo_7_subj}',
|
|
||||||
bo_8_subj = '{$bo_8_subj}',
|
|
||||||
bo_9_subj = '{$bo_9_subj}',
|
|
||||||
bo_10_subj = '{$bo_10_subj}',
|
|
||||||
bo_1 = '{$bo_1}',
|
|
||||||
bo_2 = '{$bo_2}',
|
|
||||||
bo_3 = '{$bo_3}',
|
|
||||||
bo_4 = '{$bo_4}',
|
|
||||||
bo_5 = '{$bo_5}',
|
|
||||||
bo_6 = '{$bo_6}',
|
|
||||||
bo_7 = '{$bo_7}',
|
|
||||||
bo_8 = '{$bo_8}',
|
|
||||||
bo_9 = '{$bo_9}',
|
|
||||||
bo_10 = '{$bo_10}' ";
|
|
||||||
|
|
||||||
if ($w == '') {
|
if ($w == '') {
|
||||||
|
|
||||||
$row = sql_fetch(" select count(*) as cnt from {$g5['board_table']} where bo_table = '{$bo_table}' ");
|
$row = sql_fetch(" select count(*) as cnt from {$g5['board_table']} where bo_table = '{$bo_table}' ");
|
||||||
if ($row['cnt']) {
|
if ($row['cnt'])
|
||||||
alert($bo_table . ' 은(는) 이미 존재하는 TABLE 입니다.');
|
alert($bo_table.' 은(는) 이미 존재하는 TABLE 입니다.');
|
||||||
}
|
|
||||||
|
|
||||||
$sql = " insert into {$g5['board_table']}
|
$sql = " insert into {$g5['board_table']}
|
||||||
set bo_table = '{$bo_table}',
|
set bo_table = '{$bo_table}',
|
||||||
@@ -323,9 +168,7 @@ if ($w == '') {
|
|||||||
|
|
||||||
// 게시판 테이블 생성
|
// 게시판 테이블 생성
|
||||||
$file = file('./sql_write.sql');
|
$file = file('./sql_write.sql');
|
||||||
$file = get_db_create_replace($file);
|
$sql = implode($file, "\n");
|
||||||
|
|
||||||
$sql = implode("\n", $file);
|
|
||||||
|
|
||||||
$create_table = $g5['write_prefix'] . $bo_table;
|
$create_table = $g5['write_prefix'] . $bo_table;
|
||||||
|
|
||||||
@@ -333,8 +176,10 @@ if ($w == '') {
|
|||||||
$source = array('/__TABLE_NAME__/', '/;/');
|
$source = array('/__TABLE_NAME__/', '/;/');
|
||||||
$target = array($create_table, '');
|
$target = array($create_table, '');
|
||||||
$sql = preg_replace($source, $target, $sql);
|
$sql = preg_replace($source, $target, $sql);
|
||||||
sql_query($sql, false);
|
sql_query($sql, FALSE);
|
||||||
} elseif ($w == 'u') {
|
|
||||||
|
} else if ($w == 'u') {
|
||||||
|
|
||||||
// 게시판의 글 수
|
// 게시판의 글 수
|
||||||
$sql = " select count(*) as cnt from {$g5['write_prefix']}{$bo_table} where wr_is_comment = 0 ";
|
$sql = " select count(*) as cnt from {$g5['write_prefix']}{$bo_table} where wr_is_comment = 0 ";
|
||||||
$row = sql_fetch($sql);
|
$row = sql_fetch($sql);
|
||||||
@@ -355,7 +200,7 @@ if ($w == '') {
|
|||||||
//$sql = " select wr_id from {$g5['write_prefix']}{$bo_table} where wr_is_comment = 0 ";
|
//$sql = " select wr_id from {$g5['write_prefix']}{$bo_table} where wr_is_comment = 0 ";
|
||||||
$sql = " select a.wr_id, (count(b.wr_parent) - 1) as cnt from {$g5['write_prefix']}{$bo_table} a, {$g5['write_prefix']}{$bo_table} b where a.wr_id=b.wr_parent and a.wr_is_comment=0 group by a.wr_id ";
|
$sql = " select a.wr_id, (count(b.wr_parent) - 1) as cnt from {$g5['write_prefix']}{$bo_table} a, {$g5['write_prefix']}{$bo_table} b where a.wr_id=b.wr_parent and a.wr_is_comment=0 group by a.wr_id ";
|
||||||
$result = sql_query($sql);
|
$result = sql_query($sql);
|
||||||
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||||
/*
|
/*
|
||||||
// 코멘트수를 얻습니다.
|
// 코멘트수를 얻습니다.
|
||||||
$sql2 = " select count(*) as cnt from {$g5['write_prefix']}$bo_table where wr_parent = '{$row['wr_id']}' and wr_is_comment = 1 ";
|
$sql2 = " select count(*) as cnt from {$g5['write_prefix']}$bo_table where wr_parent = '{$row['wr_id']}' and wr_is_comment = 1 ";
|
||||||
@@ -371,10 +216,11 @@ if ($w == '') {
|
|||||||
$lf = "";
|
$lf = "";
|
||||||
if ($board['bo_notice']) {
|
if ($board['bo_notice']) {
|
||||||
$tmp_array = explode(",", $board['bo_notice']);
|
$tmp_array = explode(",", $board['bo_notice']);
|
||||||
for ($i = 0; $i < count($tmp_array); $i++) {
|
for ($i=0; $i<count($tmp_array); $i++) {
|
||||||
$tmp_wr_id = trim($tmp_array[$i]);
|
$tmp_wr_id = trim($tmp_array[$i]);
|
||||||
$row = sql_fetch(" select count(*) as cnt from {$g5['write_prefix']}{$bo_table} where wr_id = '{$tmp_wr_id}' ");
|
$row = sql_fetch(" select count(*) as cnt from {$g5['write_prefix']}{$bo_table} where wr_id = '{$tmp_wr_id}' ");
|
||||||
if ($row['cnt']) {
|
if ($row['cnt'])
|
||||||
|
{
|
||||||
$bo_notice .= $lf . $tmp_wr_id;
|
$bo_notice .= $lf . $tmp_wr_id;
|
||||||
$lf = ",";
|
$lf = ",";
|
||||||
}
|
}
|
||||||
@@ -388,6 +234,7 @@ if ($w == '') {
|
|||||||
{$sql_common}
|
{$sql_common}
|
||||||
where bo_table = '{$bo_table}' ";
|
where bo_table = '{$bo_table}' ";
|
||||||
sql_query($sql);
|
sql_query($sql);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -411,14 +258,13 @@ if (is_checked('chk_grp_write_point')) $grp_fields .= " , bo_write_poin
|
|||||||
if (is_checked('chk_grp_comment_point')) $grp_fields .= " , bo_comment_point = '{$bo_comment_point}' ";
|
if (is_checked('chk_grp_comment_point')) $grp_fields .= " , bo_comment_point = '{$bo_comment_point}' ";
|
||||||
if (is_checked('chk_grp_download_point')) $grp_fields .= " , bo_download_point = '{$bo_download_point}' ";
|
if (is_checked('chk_grp_download_point')) $grp_fields .= " , bo_download_point = '{$bo_download_point}' ";
|
||||||
if (is_checked('chk_grp_category_list')) {
|
if (is_checked('chk_grp_category_list')) {
|
||||||
$grp_fields .= " , bo_category_list = '{$str_bo_category_list}' ";
|
$grp_fields .= " , bo_category_list = '{$bo_category_list}' ";
|
||||||
$grp_fields .= " , bo_use_category = '{$bo_use_category}' ";
|
$grp_fields .= " , bo_use_category = '{$bo_use_category}' ";
|
||||||
}
|
}
|
||||||
if (is_checked('chk_grp_use_sideview')) $grp_fields .= " , bo_use_sideview = '{$bo_use_sideview}' ";
|
if (is_checked('chk_grp_use_sideview')) $grp_fields .= " , bo_use_sideview = '{$bo_use_sideview}' ";
|
||||||
if (is_checked('chk_grp_use_file_content')) $grp_fields .= " , bo_use_file_content = '{$bo_use_file_content}' ";
|
if (is_checked('chk_grp_use_file_content')) $grp_fields .= " , bo_use_file_content = '{$bo_use_file_content}' ";
|
||||||
if (is_checked('chk_grp_use_secret')) $grp_fields .= " , bo_use_secret = '{$bo_use_secret}' ";
|
if (is_checked('chk_grp_use_secret')) $grp_fields .= " , bo_use_secret = '{$bo_use_secret}' ";
|
||||||
if (is_checked('chk_grp_use_dhtml_editor')) $grp_fields .= " , bo_use_dhtml_editor = '{$bo_use_dhtml_editor}' ";
|
if (is_checked('chk_grp_use_dhtml_editor')) $grp_fields .= " , bo_use_dhtml_editor = '{$bo_use_dhtml_editor}' ";
|
||||||
if (is_checked('chk_grp_select_editor')) $grp_fields .= " , bo_select_editor = '{$bo_select_editor}' ";
|
|
||||||
if (is_checked('chk_grp_use_rss_view')) $grp_fields .= " , bo_use_rss_view = '{$bo_use_rss_view}' ";
|
if (is_checked('chk_grp_use_rss_view')) $grp_fields .= " , bo_use_rss_view = '{$bo_use_rss_view}' ";
|
||||||
if (is_checked('chk_grp_use_good')) $grp_fields .= " , bo_use_good = '{$bo_use_good}' ";
|
if (is_checked('chk_grp_use_good')) $grp_fields .= " , bo_use_good = '{$bo_use_good}' ";
|
||||||
if (is_checked('chk_grp_use_nogood')) $grp_fields .= " , bo_use_nogood = '{$bo_use_nogood}' ";
|
if (is_checked('chk_grp_use_nogood')) $grp_fields .= " , bo_use_nogood = '{$bo_use_nogood}' ";
|
||||||
@@ -441,9 +287,9 @@ if (is_checked('chk_grp_mobile_gallery_width')) $grp_fields .= " , bo_mobile_gal
|
|||||||
if (is_checked('chk_grp_mobile_gallery_height'))$grp_fields .= " , bo_mobile_gallery_height = '{$bo_mobile_gallery_height}' ";
|
if (is_checked('chk_grp_mobile_gallery_height'))$grp_fields .= " , bo_mobile_gallery_height = '{$bo_mobile_gallery_height}' ";
|
||||||
if (is_checked('chk_grp_table_width')) $grp_fields .= " , bo_table_width = '{$bo_table_width}' ";
|
if (is_checked('chk_grp_table_width')) $grp_fields .= " , bo_table_width = '{$bo_table_width}' ";
|
||||||
if (is_checked('chk_grp_page_rows')) $grp_fields .= " , bo_page_rows = '{$bo_page_rows}' ";
|
if (is_checked('chk_grp_page_rows')) $grp_fields .= " , bo_page_rows = '{$bo_page_rows}' ";
|
||||||
if (is_checked('chk_grp_mobile_page_rows')) $grp_fields .= " , bo_mobile_page_rows = '{$bo_mobile_page_rows}' ";
|
if (is_checked('chk_grp_mobile_page_rows')) $grp_fields .= " , bo_mobile_page_rows = '{$bo_mobile_page_rows}' ";
|
||||||
if (is_checked('chk_grp_subject_len')) $grp_fields .= " , bo_subject_len = '{$bo_subject_len}' ";
|
if (is_checked('chk_grp_subject_len')) $grp_fields .= " , bo_subject_len = '{$bo_subject_len}' ";
|
||||||
if (is_checked('chk_grp_mobile_subject_len')) $grp_fields .= " , bo_mobile_subject_len = '{$bo_mobile_subject_len}' ";
|
if (is_checked('chk_grp_mobile_subject_len')) $grp_fields .= " , bo_mobile_subject_len = '{$bo_mobile_subject_len}' ";
|
||||||
if (is_checked('chk_grp_new')) $grp_fields .= " , bo_new = '{$bo_new}' ";
|
if (is_checked('chk_grp_new')) $grp_fields .= " , bo_new = '{$bo_new}' ";
|
||||||
if (is_checked('chk_grp_hot')) $grp_fields .= " , bo_hot = '{$bo_hot}' ";
|
if (is_checked('chk_grp_hot')) $grp_fields .= " , bo_hot = '{$bo_hot}' ";
|
||||||
if (is_checked('chk_grp_image_width')) $grp_fields .= " , bo_image_width = '{$bo_image_width}' ";
|
if (is_checked('chk_grp_image_width')) $grp_fields .= " , bo_image_width = '{$bo_image_width}' ";
|
||||||
@@ -455,24 +301,19 @@ if (is_checked('chk_grp_comment_min')) $grp_fields .= " , bo_comment_mi
|
|||||||
if (is_checked('chk_grp_comment_max')) $grp_fields .= " , bo_comment_max = '{$bo_comment_max}' ";
|
if (is_checked('chk_grp_comment_max')) $grp_fields .= " , bo_comment_max = '{$bo_comment_max}' ";
|
||||||
if (is_checked('chk_grp_upload_count')) $grp_fields .= " , bo_upload_count = '{$bo_upload_count}' ";
|
if (is_checked('chk_grp_upload_count')) $grp_fields .= " , bo_upload_count = '{$bo_upload_count}' ";
|
||||||
if (is_checked('chk_grp_upload_size')) $grp_fields .= " , bo_upload_size = '{$bo_upload_size}' ";
|
if (is_checked('chk_grp_upload_size')) $grp_fields .= " , bo_upload_size = '{$bo_upload_size}' ";
|
||||||
|
if (is_checked('chk_grp_include_head')) $grp_fields .= " , bo_include_head = '{$bo_include_head}' ";
|
||||||
//최고관리자만 수정가능
|
if (is_checked('chk_grp_include_tail')) $grp_fields .= " , bo_include_tail = '{$bo_include_tail}' ";
|
||||||
if ($is_admin === 'super') {
|
if (is_checked('chk_grp_content_head')) $grp_fields .= " , bo_content_head = '{$bo_content_head}' ";
|
||||||
if (is_checked('chk_grp_include_head')) $grp_fields .= " , bo_include_head = '{$bo_include_head}' ";
|
if (is_checked('chk_grp_content_tail')) $grp_fields .= " , bo_content_tail = '{$bo_content_tail}' ";
|
||||||
if (is_checked('chk_grp_include_tail')) $grp_fields .= " , bo_include_tail = '{$bo_include_tail}' ";
|
if (is_checked('chk_grp_mobile_content_head')) $grp_fields .= " , bo_mobile_content_head = '{$bo_mobile_content_head}' ";
|
||||||
if (is_checked('chk_grp_content_head')) $grp_fields .= " , bo_content_head = '{$bo_content_head}' ";
|
if (is_checked('chk_grp_mobile_content_tail')) $grp_fields .= " , bo_mobile_content_tail = '{$bo_mobile_content_tail}' ";
|
||||||
if (is_checked('chk_grp_content_tail')) $grp_fields .= " , bo_content_tail = '{$bo_content_tail}' ";
|
|
||||||
if (is_checked('chk_grp_mobile_content_head')) $grp_fields .= " , bo_mobile_content_head = '{$bo_mobile_content_head}' ";
|
|
||||||
if (is_checked('chk_grp_mobile_content_tail')) $grp_fields .= " , bo_mobile_content_tail = '{$bo_mobile_content_tail}' ";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (is_checked('chk_grp_insert_content')) $grp_fields .= " , bo_insert_content = '{$bo_insert_content}' ";
|
if (is_checked('chk_grp_insert_content')) $grp_fields .= " , bo_insert_content = '{$bo_insert_content}' ";
|
||||||
if (is_checked('chk_grp_use_search')) $grp_fields .= " , bo_use_search = '{$bo_use_search}' ";
|
if (is_checked('chk_grp_use_search')) $grp_fields .= " , bo_use_search = '{$bo_use_search}' ";
|
||||||
if (is_checked('chk_grp_order')) $grp_fields .= " , bo_order = '{$bo_order}' ";
|
if (is_checked('chk_grp_order')) $grp_fields .= " , bo_order = '{$bo_order}' ";
|
||||||
for ($i = 1; $i <= 10; $i++) {
|
for ($i=1; $i<=10; $i++) {
|
||||||
if (is_checked('chk_grp_' . $i)) {
|
if (is_checked('chk_grp_'.$i)) {
|
||||||
$grp_fields .= " , bo_{$i}_subj = '" . $etcs['bo_' . $i . '_subj'] . "' ";
|
$grp_fields .= " , bo_{$i}_subj = '".$_POST['bo_'.$i.'_subj']."' ";
|
||||||
$grp_fields .= " , bo_{$i} = '" . $etcs['bo_' . $i] . "' ";
|
$grp_fields .= " , bo_{$i} = '".$_POST['bo_'.$i]."' ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -501,14 +342,13 @@ if (is_checked('chk_all_write_point')) $all_fields .= " , bo_write_poin
|
|||||||
if (is_checked('chk_all_comment_point')) $all_fields .= " , bo_comment_point = '{$bo_comment_point}' ";
|
if (is_checked('chk_all_comment_point')) $all_fields .= " , bo_comment_point = '{$bo_comment_point}' ";
|
||||||
if (is_checked('chk_all_download_point')) $all_fields .= " , bo_download_point = '{$bo_download_point}' ";
|
if (is_checked('chk_all_download_point')) $all_fields .= " , bo_download_point = '{$bo_download_point}' ";
|
||||||
if (is_checked('chk_all_category_list')) {
|
if (is_checked('chk_all_category_list')) {
|
||||||
$all_fields .= " , bo_category_list = '{$str_bo_category_list}' ";
|
$all_fields .= " , bo_category_list = '{$bo_category_list}' ";
|
||||||
$all_fields .= " , bo_use_category = '{$bo_use_category}' ";
|
$all_fields .= " , bo_use_category = '{$bo_use_category}' ";
|
||||||
}
|
}
|
||||||
if (is_checked('chk_all_use_sideview')) $all_fields .= " , bo_use_sideview = '{$bo_use_sideview}' ";
|
if (is_checked('chk_all_use_sideview')) $all_fields .= " , bo_use_sideview = '{$bo_use_sideview}' ";
|
||||||
if (is_checked('chk_all_use_file_content')) $all_fields .= " , bo_use_file_content = '{$bo_use_file_content}' ";
|
if (is_checked('chk_all_use_file_content')) $all_fields .= " , bo_use_file_content = '{$bo_use_file_content}' ";
|
||||||
if (is_checked('chk_all_use_secret')) $all_fields .= " , bo_use_secret = '{$bo_use_secret}' ";
|
if (is_checked('chk_all_use_secret')) $all_fields .= " , bo_use_secret = '{$bo_use_secret}' ";
|
||||||
if (is_checked('chk_all_use_dhtml_editor')) $all_fields .= " , bo_use_dhtml_editor = '{$bo_use_dhtml_editor}' ";
|
if (is_checked('chk_all_use_dhtml_editor')) $all_fields .= " , bo_use_dhtml_editor = '{$bo_use_dhtml_editor}' ";
|
||||||
if (is_checked('chk_all_select_editor')) $all_fields .= " , bo_select_editor = '{$bo_select_editor}' ";
|
|
||||||
if (is_checked('chk_all_use_rss_view')) $all_fields .= " , bo_use_rss_view = '{$bo_use_rss_view}' ";
|
if (is_checked('chk_all_use_rss_view')) $all_fields .= " , bo_use_rss_view = '{$bo_use_rss_view}' ";
|
||||||
if (is_checked('chk_all_use_good')) $all_fields .= " , bo_use_good = '{$bo_use_good}' ";
|
if (is_checked('chk_all_use_good')) $all_fields .= " , bo_use_good = '{$bo_use_good}' ";
|
||||||
if (is_checked('chk_all_use_nogood')) $all_fields .= " , bo_use_nogood = '{$bo_use_nogood}' ";
|
if (is_checked('chk_all_use_nogood')) $all_fields .= " , bo_use_nogood = '{$bo_use_nogood}' ";
|
||||||
@@ -528,12 +368,12 @@ if (is_checked('chk_all_gallery_cols')) $all_fields .= " , bo_gallery_co
|
|||||||
if (is_checked('chk_all_gallery_width')) $all_fields .= " , bo_gallery_width = '{$bo_gallery_width}' ";
|
if (is_checked('chk_all_gallery_width')) $all_fields .= " , bo_gallery_width = '{$bo_gallery_width}' ";
|
||||||
if (is_checked('chk_all_gallery_height')) $all_fields .= " , bo_gallery_height = '{$bo_gallery_height}' ";
|
if (is_checked('chk_all_gallery_height')) $all_fields .= " , bo_gallery_height = '{$bo_gallery_height}' ";
|
||||||
if (is_checked('chk_all_mobile_gallery_width')) $all_fields .= " , bo_mobile_gallery_width = '{$bo_mobile_gallery_width}' ";
|
if (is_checked('chk_all_mobile_gallery_width')) $all_fields .= " , bo_mobile_gallery_width = '{$bo_mobile_gallery_width}' ";
|
||||||
if (is_checked('chk_all_mobile_gallery_height')) $all_fields .= " , bo_mobile_gallery_height = '{$bo_mobile_gallery_height}' ";
|
if (is_checked('chk_all_mobile_gallery_height'))$all_fields .= " , bo_mobile_gallery_height = '{$bo_mobile_gallery_height}' ";
|
||||||
if (is_checked('chk_all_table_width')) $all_fields .= " , bo_table_width = '{$bo_table_width}' ";
|
if (is_checked('chk_all_table_width')) $all_fields .= " , bo_table_width = '{$bo_table_width}' ";
|
||||||
if (is_checked('chk_all_page_rows')) $all_fields .= " , bo_page_rows = '{$bo_page_rows}' ";
|
if (is_checked('chk_all_page_rows')) $all_fields .= " , bo_page_rows = '{$bo_page_rows}' ";
|
||||||
if (is_checked('chk_all_mobile_page_rows')) $all_fields .= " , bo_mobile_page_rows = '{$bo_mobile_page_rows}' ";
|
if (is_checked('chk_all_mobile_page_rows')) $all_fields .= " , bo_mobile_page_rows = '{$bo_mobile_page_rows}' ";
|
||||||
if (is_checked('chk_all_subject_len')) $all_fields .= " , bo_subject_len = '{$bo_subject_len}' ";
|
if (is_checked('chk_all_subject_len')) $all_fields .= " , bo_subject_len = '{$bo_subject_len}' ";
|
||||||
if (is_checked('chk_all_mobile_subject_len')) $all_fields .= " , bo_mobile_subject_len = '{$bo_mobile_subject_len}' ";
|
if (is_checked('chk_all_mobile_subject_len')) $all_fields .= " , bo_mobile_subject_len = '{$bo_mobile_subject_len}' ";
|
||||||
if (is_checked('chk_all_new')) $all_fields .= " , bo_new = '{$bo_new}' ";
|
if (is_checked('chk_all_new')) $all_fields .= " , bo_new = '{$bo_new}' ";
|
||||||
if (is_checked('chk_all_hot')) $all_fields .= " , bo_hot = '{$bo_hot}' ";
|
if (is_checked('chk_all_hot')) $all_fields .= " , bo_hot = '{$bo_hot}' ";
|
||||||
if (is_checked('chk_all_image_width')) $all_fields .= " , bo_image_width = '{$bo_image_width}' ";
|
if (is_checked('chk_all_image_width')) $all_fields .= " , bo_image_width = '{$bo_image_width}' ";
|
||||||
@@ -545,24 +385,19 @@ if (is_checked('chk_all_comment_min')) $all_fields .= " , bo_comment_mi
|
|||||||
if (is_checked('chk_all_comment_max')) $all_fields .= " , bo_comment_max = '{$bo_comment_max}' ";
|
if (is_checked('chk_all_comment_max')) $all_fields .= " , bo_comment_max = '{$bo_comment_max}' ";
|
||||||
if (is_checked('chk_all_upload_count')) $all_fields .= " , bo_upload_count = '{$bo_upload_count}' ";
|
if (is_checked('chk_all_upload_count')) $all_fields .= " , bo_upload_count = '{$bo_upload_count}' ";
|
||||||
if (is_checked('chk_all_upload_size')) $all_fields .= " , bo_upload_size = '{$bo_upload_size}' ";
|
if (is_checked('chk_all_upload_size')) $all_fields .= " , bo_upload_size = '{$bo_upload_size}' ";
|
||||||
|
if (is_checked('chk_all_include_head')) $all_fields .= " , bo_include_head = '{$bo_include_head}' ";
|
||||||
//최고관리자만 수정가능
|
if (is_checked('chk_all_include_tail')) $all_fields .= " , bo_include_tail = '{$bo_include_tail}' ";
|
||||||
if ($is_admin === 'super') {
|
if (is_checked('chk_all_content_head')) $all_fields .= " , bo_content_head = '{$bo_content_head}' ";
|
||||||
if (is_checked('chk_all_include_head')) $all_fields .= " , bo_include_head = '{$bo_include_head}' ";
|
if (is_checked('chk_all_content_tail')) $all_fields .= " , bo_content_tail = '{$bo_content_tail}' ";
|
||||||
if (is_checked('chk_all_include_tail')) $all_fields .= " , bo_include_tail = '{$bo_include_tail}' ";
|
if (is_checked('chk_all_mobile_content_head')) $all_fields .= " , bo_mobile_content_head = '{$bo_mobile_content_head}' ";
|
||||||
if (is_checked('chk_all_content_head')) $all_fields .= " , bo_content_head = '{$bo_content_head}' ";
|
if (is_checked('chk_all_mobile_content_tail')) $all_fields .= " , bo_mobile_content_tail = '{$bo_mobile_content_tail}' ";
|
||||||
if (is_checked('chk_all_content_tail')) $all_fields .= " , bo_content_tail = '{$bo_content_tail}' ";
|
|
||||||
if (is_checked('chk_all_mobile_content_head')) $all_fields .= " , bo_mobile_content_head = '{$bo_mobile_content_head}' ";
|
|
||||||
if (is_checked('chk_all_mobile_content_tail')) $all_fields .= " , bo_mobile_content_tail = '{$bo_mobile_content_tail}' ";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (is_checked('chk_all_insert_content')) $all_fields .= " , bo_insert_content = '{$bo_insert_content}' ";
|
if (is_checked('chk_all_insert_content')) $all_fields .= " , bo_insert_content = '{$bo_insert_content}' ";
|
||||||
if (is_checked('chk_all_use_search')) $all_fields .= " , bo_use_search = '{$bo_use_search}' ";
|
if (is_checked('chk_all_use_search')) $all_fields .= " , bo_use_search = '{$bo_use_search}' ";
|
||||||
if (is_checked('chk_all_order')) $all_fields .= " , bo_order = '{$bo_order}' ";
|
if (is_checked('chk_all_order')) $all_fields .= " , bo_order = '{$bo_order}' ";
|
||||||
for ($i = 1; $i <= 10; $i++) {
|
for ($i=1; $i<=10; $i++) {
|
||||||
if (is_checked('chk_all_' . $i)) {
|
if (is_checked('chk_all_'.$i)) {
|
||||||
$all_fields .= " , bo_{$i}_subj = '" . $etcs['bo_' . $i . '_subj'] . "' ";
|
$all_fields .= " , bo_{$i}_subj = '".$_POST['bo_'.$i.'_subj']."' ";
|
||||||
$all_fields .= " , bo_{$i} = '" . $etcs['bo_' . $i] . "' ";
|
$all_fields .= " , bo_{$i} = '".$_POST['bo_'.$i]."' ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -572,10 +407,5 @@ if ($all_fields) {
|
|||||||
|
|
||||||
delete_cache_latest($bo_table);
|
delete_cache_latest($bo_table);
|
||||||
|
|
||||||
if (function_exists('get_admin_captcha_by')) {
|
|
||||||
get_admin_captcha_by('remove');
|
|
||||||
}
|
|
||||||
|
|
||||||
run_event('admin_board_form_update', $bo_table, $w);
|
|
||||||
|
|
||||||
goto_url("./board_form.php?w=u&bo_table={$bo_table}&{$qstr}");
|
goto_url("./board_form.php?w=u&bo_table={$bo_table}&{$qstr}");
|
||||||
|
?>
|
||||||
|
|||||||
+166
-169
@@ -1,8 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "300100";
|
$sub_menu = "300100";
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, 'r');
|
auth_check($auth[$sub_menu], 'r');
|
||||||
|
|
||||||
$sql_common = " from {$g5['board_table']} a ";
|
$sql_common = " from {$g5['board_table']} a ";
|
||||||
$sql_search = " where (1) ";
|
$sql_search = " where (1) ";
|
||||||
@@ -12,21 +12,16 @@ if ($is_admin != "super") {
|
|||||||
$sql_search .= " and (a.gr_id = b.gr_id and b.gr_admin = '{$member['mb_id']}') ";
|
$sql_search .= " and (a.gr_id = b.gr_id and b.gr_admin = '{$member['mb_id']}') ";
|
||||||
}
|
}
|
||||||
|
|
||||||
$allowed_sfl = array('bo_table', 'bo_subject', 'a.gr_id');
|
|
||||||
if (!in_array($sfl, $allowed_sfl)) {
|
|
||||||
$sfl = 'bo_table';
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($stx) {
|
if ($stx) {
|
||||||
$sql_search .= " and ( ";
|
$sql_search .= " and ( ";
|
||||||
switch ($sfl) {
|
switch ($sfl) {
|
||||||
case "bo_table":
|
case "bo_table" :
|
||||||
$sql_search .= " ($sfl like '$stx%') ";
|
$sql_search .= " ($sfl like '$stx%') ";
|
||||||
break;
|
break;
|
||||||
case "a.gr_id":
|
case "a.gr_id" :
|
||||||
$sql_search .= " ($sfl = '$stx') ";
|
$sql_search .= " ($sfl = '$stx') ";
|
||||||
break;
|
break;
|
||||||
default:
|
default :
|
||||||
$sql_search .= " ($sfl like '%$stx%') ";
|
$sql_search .= " ($sfl like '%$stx%') ";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -37,9 +32,6 @@ if (!$sst) {
|
|||||||
$sst = "a.gr_id, a.bo_table";
|
$sst = "a.gr_id, a.bo_table";
|
||||||
$sod = "asc";
|
$sod = "asc";
|
||||||
}
|
}
|
||||||
$allowed_sst = array('a.gr_id', 'bo_table', 'bo_skin', 'bo_mobile_skin', 'bo_subject', 'bo_use_sns', 'bo_use_search', 'bo_order', 'a.gr_id, a.bo_table');
|
|
||||||
if ($sst && !in_array($sst, $allowed_sst)) $sst = 'a.gr_id, a.bo_table';
|
|
||||||
if ($sod && !in_array(strtolower($sod), array('asc', 'desc'))) $sod = '';
|
|
||||||
$sql_order = " order by $sst $sod ";
|
$sql_order = " order by $sst $sod ";
|
||||||
|
|
||||||
$sql = " select count(*) as cnt {$sql_common} {$sql_search} {$sql_order} ";
|
$sql = " select count(*) as cnt {$sql_common} {$sql_search} {$sql_order} ";
|
||||||
@@ -48,18 +40,16 @@ $total_count = $row['cnt'];
|
|||||||
|
|
||||||
$rows = $config['cf_page_rows'];
|
$rows = $config['cf_page_rows'];
|
||||||
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
||||||
if ($page < 1) {
|
if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||||
$page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
|
|
||||||
}
|
|
||||||
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
||||||
|
|
||||||
$sql = " select * {$sql_common} {$sql_search} {$sql_order} limit {$from_record}, {$rows} ";
|
$sql = " select * {$sql_common} {$sql_search} {$sql_order} limit {$from_record}, {$rows} ";
|
||||||
$result = sql_query($sql);
|
$result = sql_query($sql);
|
||||||
|
|
||||||
$listall = '<a href="' . $_SERVER['SCRIPT_NAME'] . '" class="ov_listall">전체목록</a>';
|
$listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목록</a>';
|
||||||
|
|
||||||
$g5['title'] = '게시판관리';
|
$g5['title'] = '게시판관리';
|
||||||
require_once './admin.head.php';
|
include_once('./admin.head.php');
|
||||||
|
|
||||||
$colspan = 15;
|
$colspan = 15;
|
||||||
?>
|
?>
|
||||||
@@ -70,173 +60,180 @@ $colspan = 15;
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<form name="fsearch" id="fsearch" class="local_sch01 local_sch" method="get">
|
<form name="fsearch" id="fsearch" class="local_sch01 local_sch" method="get">
|
||||||
<label for="sfl" class="sound_only">검색대상</label>
|
|
||||||
<select name="sfl" id="sfl">
|
<label for="sfl" class="sound_only">검색대상</label>
|
||||||
<option value="bo_table" <?php echo get_selected($sfl, "bo_table", true); ?>>TABLE</option>
|
<select name="sfl" id="sfl">
|
||||||
<option value="bo_subject" <?php echo get_selected($sfl, "bo_subject"); ?>>제목</option>
|
<option value="bo_table"<?php echo get_selected($_GET['sfl'], "bo_table", true); ?>>TABLE</option>
|
||||||
<option value="a.gr_id" <?php echo get_selected($sfl, "a.gr_id"); ?>>그룹ID</option>
|
<option value="bo_subject"<?php echo get_selected($_GET['sfl'], "bo_subject"); ?>>제목</option>
|
||||||
</select>
|
<option value="a.gr_id"<?php echo get_selected($_GET['sfl'], "a.gr_id"); ?>>그룹ID</option>
|
||||||
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
</select>
|
||||||
<input type="text" name="stx" value="<?php echo $stx ?>" id="stx" required class="required frm_input">
|
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
||||||
<input type="submit" value="검색" class="btn_submit">
|
<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>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<form name="fboardlist" id="fboardlist" action="./board_list_update.php" onsubmit="return fboardlist_submit(this);" method="post">
|
<form name="fboardlist" id="fboardlist" action="./board_list_update.php" onsubmit="return fboardlist_submit(this);" method="post">
|
||||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||||
<input type="hidden" name="token" value="<?php echo isset($token) ? $token : ''; ?>">
|
<input type="hidden" name="token" value="<?php echo $token ?>">
|
||||||
|
|
||||||
<div class="tbl_head01 tbl_wrap">
|
<div class="tbl_head01 tbl_wrap">
|
||||||
<table>
|
<table>
|
||||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col">
|
<th scope="col">
|
||||||
<label for="chkall" class="sound_only">게시판 전체</label>
|
<label for="chkall" class="sound_only">게시판 전체</label>
|
||||||
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
|
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
|
||||||
</th>
|
</th>
|
||||||
<th scope="col"><?php echo subject_sort_link('a.gr_id') ?>그룹</a></th>
|
<th scope="col"><?php echo subject_sort_link('a.gr_id') ?>그룹</a></th>
|
||||||
<th scope="col"><?php echo subject_sort_link('bo_table') ?>TABLE</a></th>
|
<th scope="col"><?php echo subject_sort_link('bo_table') ?>TABLE</a></th>
|
||||||
<th scope="col"><?php echo subject_sort_link('bo_skin', '', 'desc') ?>스킨</a></th>
|
<th scope="col"><?php echo subject_sort_link('bo_skin', '', 'desc') ?>스킨</a></th>
|
||||||
<th scope="col"><?php echo subject_sort_link('bo_mobile_skin', '', 'desc') ?>모바일<br>스킨</a></th>
|
<th scope="col"><?php echo subject_sort_link('bo_mobile_skin', '', 'desc') ?>모바일<br>스킨</a></th>
|
||||||
<th scope="col"><?php echo subject_sort_link('bo_subject') ?>제목</a></th>
|
<th scope="col"><?php echo subject_sort_link('bo_subject') ?>제목</a></th>
|
||||||
<th scope="col">읽기P<span class="sound_only">포인트</span></th>
|
<th scope="col">읽기P<span class="sound_only">포인트</span></th>
|
||||||
<th scope="col">쓰기P<span class="sound_only">포인트</span></th>
|
<th scope="col">쓰기P<span class="sound_only">포인트</span></th>
|
||||||
<th scope="col">댓글P<span class="sound_only">포인트</span></th>
|
<th scope="col">댓글P<span class="sound_only">포인트</span></th>
|
||||||
<th scope="col">다운P<span class="sound_only">포인트</span></th>
|
<th scope="col">다운P<span class="sound_only">포인트</span></th>
|
||||||
<th scope="col"><?php echo subject_sort_link('bo_use_sns') ?>SNS<br>사용</a></th>
|
<th scope="col"><?php echo subject_sort_link('bo_use_sns') ?>SNS<br>사용</a></th>
|
||||||
<th scope="col"><?php echo subject_sort_link('bo_use_search') ?>검색<br>사용</a></th>
|
<th scope="col"><?php echo subject_sort_link('bo_use_search') ?>검색<br>사용</a></th>
|
||||||
<th scope="col"><?php echo subject_sort_link('bo_order') ?>출력<br>순서</a></th>
|
<th scope="col"><?php echo subject_sort_link('bo_order') ?>출력<br>순서</a></th>
|
||||||
<th scope="col">접속기기</th>
|
<th scope="col">접속기기</th>
|
||||||
<th scope="col">관리</th>
|
<th scope="col">관리</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||||
$one_update = '<a href="./board_form.php?w=u&bo_table=' . $row['bo_table'] . '&' . $qstr . '" class="btn btn_03">수정</a>';
|
$one_update = '<a href="./board_form.php?w=u&bo_table='.$row['bo_table'].'&'.$qstr.'" class="btn btn_03">수정</a>';
|
||||||
$one_copy = '<a href="./board_copy.php?bo_table=' . $row['bo_table'] . '" class="board_copy btn btn_02" target="win_board_copy">복사</a>';
|
$one_copy = '<a href="./board_copy.php?bo_table='.$row['bo_table'].'" class="board_copy btn btn_02" target="win_board_copy">복사</a>';
|
||||||
|
|
||||||
$bg = 'bg' . ($i % 2);
|
$bg = 'bg'.($i%2);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<tr class="<?php echo $bg; ?>">
|
<tr class="<?php echo $bg; ?>">
|
||||||
<td class="td_chk">
|
<td class="td_chk">
|
||||||
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo get_text($row['bo_subject']) ?></label>
|
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo get_text($row['bo_subject']) ?></label>
|
||||||
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
|
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<?php if ($is_admin == 'super') { ?>
|
<?php if ($is_admin == 'super'){ ?>
|
||||||
<?php echo get_group_select("gr_id[$i]", $row['gr_id']) ?>
|
<?php echo get_group_select("gr_id[$i]", $row['gr_id']) ?>
|
||||||
<?php } else { ?>
|
<?php }else{ ?>
|
||||||
<input type="hidden" name="gr_id[<?php echo $i ?>]" value="<?php echo $row['gr_id'] ?>"><?php echo $row['gr_subject'] ?>
|
<input type="hidden" name="gr_id[<?php echo $i ?>]" value="<?php echo $row['gr_id'] ?>"><?php echo $row['gr_subject'] ?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="hidden" name="board_table[<?php echo $i ?>]" value="<?php echo $row['bo_table'] ?>">
|
<input type="hidden" name="board_table[<?php echo $i ?>]" value="<?php echo $row['bo_table'] ?>">
|
||||||
<a href="<?php echo get_pretty_url($row['bo_table']) ?>"><?php echo $row['bo_table'] ?></a>
|
<a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $row['bo_table'] ?>"><?php echo $row['bo_table'] ?></a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<label for="bo_skin_<?php echo $i; ?>" class="sound_only">스킨</label>
|
<label for="bo_skin_<?php echo $i; ?>" class="sound_only">스킨</label>
|
||||||
<?php echo get_skin_select('board', 'bo_skin_' . $i, "bo_skin[$i]", $row['bo_skin']); ?>
|
<?php echo get_skin_select('board', 'bo_skin_'.$i, "bo_skin[$i]", $row['bo_skin']); ?>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<label for="bo_mobile_skin_<?php echo $i; ?>" class="sound_only">모바일 스킨</label>
|
<label for="bo_mobile_skin_<?php echo $i; ?>" class="sound_only">모바일 스킨</label>
|
||||||
<?php echo get_mobile_skin_select('board', 'bo_mobile_skin_' . $i, "bo_mobile_skin[$i]", $row['bo_mobile_skin']); ?>
|
<?php echo get_mobile_skin_select('board', 'bo_mobile_skin_'.$i, "bo_mobile_skin[$i]", $row['bo_mobile_skin']); ?>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<label for="bo_subject_<?php echo $i; ?>" class="sound_only">게시판 제목<strong class="sound_only"> 필수</strong></label>
|
<label for="bo_subject_<?php echo $i; ?>" class="sound_only">게시판 제목<strong class="sound_only"> 필수</strong></label>
|
||||||
<input type="text" name="bo_subject[<?php echo $i ?>]" value="<?php echo get_text($row['bo_subject']) ?>" id="bo_subject_<?php echo $i ?>" required class="required tbl_input bo_subject full_input" size="10">
|
<input type="text" name="bo_subject[<?php echo $i ?>]" value="<?php echo get_text($row['bo_subject']) ?>" id="bo_subject_<?php echo $i ?>" required class="required tbl_input bo_subject full_input" size="10">
|
||||||
</td>
|
</td>
|
||||||
<td class="td_numsmall">
|
<td class="td_numsmall">
|
||||||
<label for="bo_read_point_<?php echo $i; ?>" class="sound_only">읽기 포인트</label>
|
<label for="bo_read_point_<?php echo $i; ?>" class="sound_only">읽기 포인트</label>
|
||||||
<input type="text" name="bo_read_point[<?php echo $i ?>]" value="<?php echo $row['bo_read_point'] ?>" id="bo_read_point_<?php echo $i; ?>" class="tbl_input" size="2">
|
<input type="text" name="bo_read_point[<?php echo $i ?>]" value="<?php echo $row['bo_read_point'] ?>" id="bo_read_point_<?php echo $i; ?>" class="tbl_input" size="2">
|
||||||
</td>
|
</td>
|
||||||
<td class="td_numsmall">
|
<td class="td_numsmall">
|
||||||
<label for="bo_write_point_<?php echo $i; ?>" class="sound_only">쓰기 포인트</label>
|
<label for="bo_write_point_<?php echo $i; ?>" class="sound_only">쓰기 포인트</label>
|
||||||
<input type="text" name="bo_write_point[<?php echo $i ?>]" value="<?php echo $row['bo_write_point'] ?>" id="bo_write_point_<?php echo $i; ?>" class="tbl_input" size="2">
|
<input type="text" name="bo_write_point[<?php echo $i ?>]" value="<?php echo $row['bo_write_point'] ?>" id="bo_write_point_<?php echo $i; ?>" class="tbl_input" size="2">
|
||||||
</td>
|
</td>
|
||||||
<td class="td_numsmall">
|
<td class="td_numsmall">
|
||||||
<label for="bo_comment_point_<?php echo $i; ?>" class="sound_only">댓글 포인트</label>
|
<label for="bo_comment_point_<?php echo $i; ?>" class="sound_only">댓글 포인트</label>
|
||||||
<input type="text" name="bo_comment_point[<?php echo $i ?>]" value="<?php echo $row['bo_comment_point'] ?>" id="bo_comment_point_<?php echo $i; ?>" class="tbl_input" size="2">
|
<input type="text" name="bo_comment_point[<?php echo $i ?>]" value="<?php echo $row['bo_comment_point'] ?>" id="bo_comment_point_<?php echo $i; ?>" class="tbl_input" size="2">
|
||||||
</td>
|
</td>
|
||||||
<td class="td_numsmall">
|
<td class="td_numsmall">
|
||||||
<label for="bo_download_point_<?php echo $i; ?>" class="sound_only">다운<br>포인트</label>
|
<label for="bo_download_point_<?php echo $i; ?>" class="sound_only">다운<br>포인트</label>
|
||||||
<input type="text" name="bo_download_point[<?php echo $i ?>]" value="<?php echo $row['bo_download_point'] ?>" id="bo_download_point_<?php echo $i; ?>" class="tbl_input" size="2">
|
<input type="text" name="bo_download_point[<?php echo $i ?>]" value="<?php echo $row['bo_download_point'] ?>" id="bo_download_point_<?php echo $i; ?>" class="tbl_input" size="2">
|
||||||
</td>
|
</td>
|
||||||
<td class="td_numsmall">
|
<td class="td_numsmall">
|
||||||
<label for="bo_use_sns_<?php echo $i; ?>" class="sound_only">SNS<br>사용</label>
|
<label for="bo_use_sns_<?php echo $i; ?>" class="sound_only">SNS<br>사용</label>
|
||||||
<input type="checkbox" name="bo_use_sns[<?php echo $i ?>]" value="1" id="bo_use_sns_<?php echo $i ?>" <?php echo $row['bo_use_sns'] ? "checked" : "" ?>>
|
<input type="checkbox" name="bo_use_sns[<?php echo $i ?>]" value="1" id="bo_use_sns_<?php echo $i ?>" <?php echo $row['bo_use_sns']?"checked":"" ?>>
|
||||||
</td>
|
</td>
|
||||||
<td class="td_numsmall">
|
<td class="td_numsmall">
|
||||||
<label for="bo_use_search_<?php echo $i; ?>" class="sound_only">검색<br>사용</label>
|
<label for="bo_use_search_<?php echo $i; ?>" class="sound_only">검색<br>사용</label>
|
||||||
<input type="checkbox" name="bo_use_search[<?php echo $i ?>]" value="1" id="bo_use_search_<?php echo $i ?>" <?php echo $row['bo_use_search'] ? "checked" : "" ?>>
|
<input type="checkbox" name="bo_use_search[<?php echo $i ?>]" value="1" id="bo_use_search_<?php echo $i ?>" <?php echo $row['bo_use_search']?"checked":"" ?>>
|
||||||
</td>
|
</td>
|
||||||
<td class="td_numsmall">
|
<td class="td_numsmall">
|
||||||
<label for="bo_order_<?php echo $i; ?>" class="sound_only">출력<br>순서</label>
|
<label for="bo_order_<?php echo $i; ?>" class="sound_only">출력<br>순서</label>
|
||||||
<input type="text" name="bo_order[<?php echo $i ?>]" value="<?php echo $row['bo_order'] ?>" id="bo_order_<?php echo $i ?>" class="tbl_input" size="2">
|
<input type="text" name="bo_order[<?php echo $i ?>]" value="<?php echo $row['bo_order'] ?>" id="bo_order_<?php echo $i ?>" class="tbl_input" size="2">
|
||||||
</td>
|
</td>
|
||||||
<td class="td_mngsmall">
|
<td class="td_mngsmall">
|
||||||
<label for="bo_device_<?php echo $i; ?>" class="sound_only">접속기기</label>
|
<label for="bo_device_<?php echo $i; ?>" class="sound_only">접속기기</label>
|
||||||
<select name="bo_device[<?php echo $i ?>]" id="bo_device_<?php echo $i ?>">
|
<select name="bo_device[<?php echo $i ?>]" id="bo_device_<?php echo $i ?>">
|
||||||
<option value="both" <?php echo get_selected($row['bo_device'], 'both', true); ?>>모두</option>
|
<option value="both"<?php echo get_selected($row['bo_device'], 'both', true); ?>>모두</option>
|
||||||
<option value="pc" <?php echo get_selected($row['bo_device'], 'pc'); ?>>PC</option>
|
<option value="pc"<?php echo get_selected($row['bo_device'], 'pc'); ?>>PC</option>
|
||||||
<option value="mobile" <?php echo get_selected($row['bo_device'], 'mobile'); ?>>모바일</option>
|
<option value="mobile"<?php echo get_selected($row['bo_device'], 'mobile'); ?>>모바일</option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
<td class="td_mng td_mng_m">
|
<td class="td_mng td_mng_m">
|
||||||
<?php echo $one_update ?>
|
<?php echo $one_update ?>
|
||||||
<?php echo $one_copy ?>
|
<?php echo $one_copy ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
if ($i == 0) {
|
if ($i == 0)
|
||||||
echo '<tr><td colspan="' . $colspan . '" class="empty_table">자료가 없습니다.</td></tr>';
|
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||||
}
|
?>
|
||||||
?>
|
</tbody>
|
||||||
</tbody>
|
</table>
|
||||||
</table>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="btn_fixed_top">
|
<div class="btn_fixed_top">
|
||||||
<input type="submit" name="act_button" value="선택수정" onclick="document.pressed=this.value" class="btn_02 btn">
|
<input type="submit" name="act_button" value="선택수정" onclick="document.pressed=this.value" class="btn_02 btn">
|
||||||
<?php if ($is_admin == 'super') { ?>
|
<?php if ($is_admin == 'super') { ?>
|
||||||
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value" class="btn_02 btn">
|
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value" class="btn_02 btn">
|
||||||
<a href="./board_form.php" id="bo_add" class="btn_01 btn">게시판 추가</a>
|
<?php } ?>
|
||||||
<?php } ?>
|
<?php if ($is_admin == 'super') { ?>
|
||||||
</div>
|
<a href="./board_form.php" id="bo_add" class="btn_01 btn">게시판 추가</a>
|
||||||
|
<?php } ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, $_SERVER['SCRIPT_NAME'] . '?' . $qstr . '&page='); ?>
|
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, $_SERVER['SCRIPT_NAME'].'?'.$qstr.'&page='); ?>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function fboardlist_submit(f) {
|
function fboardlist_submit(f)
|
||||||
if (!is_checked("chk[]")) {
|
{
|
||||||
alert(document.pressed + " 하실 항목을 하나 이상 선택하세요.");
|
if (!is_checked("chk[]")) {
|
||||||
return false;
|
alert(document.pressed+" 하실 항목을 하나 이상 선택하세요.");
|
||||||
}
|
return false;
|
||||||
|
|
||||||
if (document.pressed == "선택삭제") {
|
|
||||||
if (!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$(function() {
|
if(document.pressed == "선택삭제") {
|
||||||
$(".board_copy").click(function() {
|
if(!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
|
||||||
window.open(this.href, "win_board_copy", "left=100,top=100,width=550,height=450");
|
|
||||||
return false;
|
return false;
|
||||||
});
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
$(function(){
|
||||||
|
$(".board_copy").click(function(){
|
||||||
|
window.open(this.href, "win_board_copy", "left=100,top=100,width=550,height=450");
|
||||||
|
return false;
|
||||||
});
|
});
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
require_once './admin.tail.php';
|
include_once('./admin.tail.php');
|
||||||
|
?>
|
||||||
|
|||||||
+41
-62
@@ -1,96 +1,75 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "300100";
|
$sub_menu = "300100";
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
|
|
||||||
check_demo();
|
check_demo();
|
||||||
|
|
||||||
$post_count_chk = (isset($_POST['chk']) && is_array($_POST['chk'])) ? count($_POST['chk']) : 0;
|
if (!count($_POST['chk'])) {
|
||||||
$chk = (isset($_POST['chk']) && is_array($_POST['chk'])) ? $_POST['chk'] : array();
|
alert($_POST['act_button']." 하실 항목을 하나 이상 체크하세요.");
|
||||||
$act_button = isset($_POST['act_button']) ? strip_tags($_POST['act_button']) : '';
|
|
||||||
$board_table = (isset($_POST['board_table']) && is_array($_POST['board_table'])) ? $_POST['board_table'] : array();
|
|
||||||
|
|
||||||
if (!$post_count_chk) {
|
|
||||||
alert($act_button . " 하실 항목을 하나 이상 체크하세요.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
check_admin_token();
|
if ($_POST['act_button'] == "선택수정") {
|
||||||
|
|
||||||
if ($act_button === "선택수정") {
|
auth_check($auth[$sub_menu], 'w');
|
||||||
auth_check_menu($auth, $sub_menu, 'w');
|
|
||||||
|
for ($i=0; $i<count($_POST['chk']); $i++) {
|
||||||
|
|
||||||
for ($i = 0; $i < $post_count_chk; $i++) {
|
|
||||||
// 실제 번호를 넘김
|
// 실제 번호를 넘김
|
||||||
$k = isset($_POST['chk'][$i]) ? (int) $_POST['chk'][$i] : 0;
|
$k = $_POST['chk'][$i];
|
||||||
|
|
||||||
$post_gr_id = isset($_POST['gr_id'][$k]) ? clean_xss_tags($_POST['gr_id'][$k], 1, 1) : '';
|
|
||||||
$post_bo_device = isset($_POST['bo_device'][$k]) ? clean_xss_tags($_POST['bo_device'][$k], 1, 1) : '';
|
|
||||||
$post_bo_skin = isset($_POST['bo_skin'][$k]) ? clean_xss_tags($_POST['bo_skin'][$k], 1, 1) : '';
|
|
||||||
$post_bo_mobile_skin = isset($_POST['bo_mobile_skin'][$k]) ? clean_xss_tags($_POST['bo_mobile_skin'][$k], 1, 1) : '';
|
|
||||||
$post_bo_read_point = isset($_POST['bo_read_point'][$k]) ? clean_xss_tags($_POST['bo_read_point'][$k], 1, 1) : '';
|
|
||||||
$post_bo_write_point = isset($_POST['bo_write_point'][$k]) ? clean_xss_tags($_POST['bo_write_point'][$k], 1, 1) : '';
|
|
||||||
$post_bo_comment_point = isset($_POST['bo_comment_point'][$k]) ? clean_xss_tags($_POST['bo_comment_point'][$k], 1, 1) : '';
|
|
||||||
$post_bo_download_point = isset($_POST['bo_download_point'][$k]) ? clean_xss_tags($_POST['bo_download_point'][$k], 1, 1) : '';
|
|
||||||
$post_bo_use_search = isset($_POST['bo_use_search'][$k]) ? clean_xss_tags($_POST['bo_use_search'][$k], 1, 1) : '';
|
|
||||||
$post_bo_use_sns = isset($_POST['bo_use_sns'][$k]) ? clean_xss_tags($_POST['bo_use_sns'][$k], 1, 1) : '';
|
|
||||||
$post_bo_order = isset($_POST['bo_order'][$k]) ? clean_xss_tags($_POST['bo_order'][$k], 1, 1) : '';
|
|
||||||
$post_board_table = isset($_POST['board_table'][$k]) ? clean_xss_tags($_POST['board_table'][$k], 1, 1) : '';
|
|
||||||
|
|
||||||
if ($is_admin != 'super') {
|
if ($is_admin != 'super') {
|
||||||
$sql = " select count(*) as cnt from {$g5['board_table']} a, {$g5['group_table']} b
|
$sql = " select count(*) as cnt from {$g5['board_table']} a, {$g5['group_table']} b
|
||||||
where a.gr_id = '" . sql_real_escape_string($post_gr_id) . "'
|
where a.gr_id = '{$_POST['gr_id'][$k]}'
|
||||||
and a.gr_id = b.gr_id
|
and a.gr_id = b.gr_id
|
||||||
and b.gr_admin = '{$member['mb_id']}' ";
|
and b.gr_admin = '{$member['mb_id']}' ";
|
||||||
$row = sql_fetch($sql);
|
$row = sql_fetch($sql);
|
||||||
if (!$row['cnt']) {
|
if (!$row['cnt'])
|
||||||
alert('최고관리자가 아닌 경우 다른 관리자의 게시판(' . $board_table[$k] . ')은 수정이 불가합니다.');
|
alert('최고관리자가 아닌 경우 다른 관리자의 게시판('.$board_table[$k].')은 수정이 불가합니다.');
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$p_bo_subject = is_array($_POST['bo_subject']) ? addslashes(strip_tags(clean_xss_attributes(stripslashes($_POST['bo_subject'][$k])))) : '';
|
|
||||||
|
|
||||||
$sql = " update {$g5['board_table']}
|
$sql = " update {$g5['board_table']}
|
||||||
set gr_id = '" . sql_real_escape_string($post_gr_id) . "',
|
set gr_id = '{$_POST['gr_id'][$k]}',
|
||||||
bo_subject = '" . $p_bo_subject . "',
|
bo_subject = '{$_POST['bo_subject'][$k]}',
|
||||||
bo_device = '" . sql_real_escape_string($post_bo_device) . "',
|
bo_device = '{$_POST['bo_device'][$k]}',
|
||||||
bo_skin = '" . sql_real_escape_string($post_bo_skin) . "',
|
bo_skin = '{$_POST['bo_skin'][$k]}',
|
||||||
bo_mobile_skin = '" . sql_real_escape_string($post_bo_mobile_skin) . "',
|
bo_mobile_skin = '{$_POST['bo_mobile_skin'][$k]}',
|
||||||
bo_read_point = '" . sql_real_escape_string($post_bo_read_point) . "',
|
bo_read_point = '{$_POST['bo_read_point'][$k]}',
|
||||||
bo_write_point = '" . sql_real_escape_string($post_bo_write_point) . "',
|
bo_write_point = '{$_POST['bo_write_point'][$k]}',
|
||||||
bo_comment_point = '" . sql_real_escape_string($post_bo_comment_point) . "',
|
bo_comment_point = '{$_POST['bo_comment_point'][$k]}',
|
||||||
bo_download_point = '" . sql_real_escape_string($post_bo_download_point) . "',
|
bo_download_point = '{$_POST['bo_download_point'][$k]}',
|
||||||
bo_use_search = '" . sql_real_escape_string($post_bo_use_search) . "',
|
bo_use_search = '{$_POST['bo_use_search'][$k]}',
|
||||||
bo_use_sns = '" . sql_real_escape_string($post_bo_use_sns) . "',
|
bo_use_sns = '{$_POST['bo_use_sns'][$k]}',
|
||||||
bo_order = '" . sql_real_escape_string($post_bo_order) . "'
|
bo_order = '{$_POST['bo_order'][$k]}'
|
||||||
where bo_table = '" . sql_real_escape_string($post_board_table) . "' ";
|
where bo_table = '{$_POST['board_table'][$k]}' ";
|
||||||
|
|
||||||
sql_query($sql);
|
sql_query($sql);
|
||||||
}
|
}
|
||||||
} elseif ($act_button === "선택삭제") {
|
|
||||||
if ($is_admin != 'super') {
|
|
||||||
alert('게시판 삭제는 최고관리자만 가능합니다.');
|
|
||||||
}
|
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, 'd');
|
} else if ($_POST['act_button'] == "선택삭제") {
|
||||||
|
|
||||||
|
if ($is_admin != 'super')
|
||||||
|
alert('게시판 삭제는 최고관리자만 가능합니다.');
|
||||||
|
|
||||||
|
auth_check($auth[$sub_menu], 'd');
|
||||||
|
|
||||||
|
check_admin_token();
|
||||||
|
|
||||||
// _BOARD_DELETE_ 상수를 선언해야 board_delete.inc.php 가 정상 작동함
|
// _BOARD_DELETE_ 상수를 선언해야 board_delete.inc.php 가 정상 작동함
|
||||||
/* 확인필요 22.05.27
|
|
||||||
A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects,
|
|
||||||
or it should execute logic with side effects, but should not do both.*/
|
|
||||||
define('_BOARD_DELETE_', true);
|
define('_BOARD_DELETE_', true);
|
||||||
|
|
||||||
for ($i = 0; $i < $post_count_chk; $i++) {
|
for ($i=0; $i<count($_POST['chk']); $i++) {
|
||||||
// 실제 번호를 넘김
|
// 실제 번호를 넘김
|
||||||
$k = isset($_POST['chk'][$i]) ? (int) $_POST['chk'][$i] : 0;
|
$k = $_POST['chk'][$i];
|
||||||
|
|
||||||
// include 전에 $bo_table 값을 반드시 넘겨야 함
|
// include 전에 $bo_table 값을 반드시 넘겨야 함
|
||||||
$tmp_bo_table = isset($_POST['board_table'][$k]) ? trim(clean_xss_tags($_POST['board_table'][$k], 1, 1)) : '';
|
$tmp_bo_table = trim($_POST['board_table'][$k]);
|
||||||
|
|
||||||
if (preg_match("/^[A-Za-z0-9_]+$/", $tmp_bo_table)) {
|
if( preg_match("/^[A-Za-z0-9_]+$/", $tmp_bo_table) ){
|
||||||
include './board_delete.inc.php';
|
include ('./board_delete.inc.php');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run_event('admin_board_list_update', $act_button, $chk, $board_table, $qstr);
|
goto_url('./board_list.php?'.$qstr);
|
||||||
|
?>
|
||||||
goto_url('./board_list.php?' . $qstr);
|
|
||||||
|
|||||||
@@ -1,15 +1,14 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = '300100';
|
$sub_menu = '300100';
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, 'w');
|
auth_check($auth[$sub_menu], 'w');
|
||||||
|
|
||||||
if (!$board['bo_table']) {
|
if(!$board['bo_table'])
|
||||||
alert('존재하지 않는 게시판입니다.');
|
alert('존재하지 않는 게시판입니다.');
|
||||||
}
|
|
||||||
|
|
||||||
$g5['title'] = $board['bo_subject'] . ' 게시판 썸네일 삭제';
|
$g5['title'] = $board['bo_subject'].' 게시판 썸네일 삭제';
|
||||||
require_once './admin.head.php';
|
include_once('./admin.head.php');
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="local_desc02 local_desc">
|
<div class="local_desc02 local_desc">
|
||||||
@@ -19,29 +18,28 @@ require_once './admin.head.php';
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$dir = G5_DATA_PATH . '/file/' . $bo_table;
|
$dir = G5_DATA_PATH.'/file/'.$bo_table;
|
||||||
|
|
||||||
$cnt = 0;
|
$cnt = 0;
|
||||||
if (is_dir($dir)) {
|
if(is_dir($dir)) {
|
||||||
echo '<ul>';
|
echo '<ul>';
|
||||||
$files = glob($dir . '/thumb-*');
|
$files = glob($dir.'/thumb-*');
|
||||||
if (is_array($files)) {
|
if (is_array($files)) {
|
||||||
foreach ($files as $thumbnail) {
|
foreach($files as $thumbnail) {
|
||||||
$cnt++;
|
$cnt++;
|
||||||
@unlink($thumbnail);
|
@unlink($thumbnail);
|
||||||
|
|
||||||
echo '<li>' . $thumbnail . '</li>' . PHP_EOL;
|
echo '<li>'.$thumbnail.'</li>'.PHP_EOL;
|
||||||
|
|
||||||
flush();
|
flush();
|
||||||
|
|
||||||
if (($cnt % 10) == 0) {
|
if ($cnt%10==0)
|
||||||
echo PHP_EOL;
|
echo PHP_EOL;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '<li>완료됨</li></ul>' . PHP_EOL;
|
echo '<li>완료됨</li></ul>'.PHP_EOL;
|
||||||
echo '<div class="local_desc01 local_desc"><p><strong>썸네일 ' . $cnt . '건의 삭제 완료됐습니다.</strong></p></div>' . PHP_EOL;
|
echo '<div class="local_desc01 local_desc"><p><strong>썸네일 '.$cnt.'건의 삭제 완료됐습니다.</strong></p></div>'.PHP_EOL;
|
||||||
} else {
|
} else {
|
||||||
echo '<p>첨부파일 디렉토리가 존재하지 않습니다.</p>';
|
echo '<p>첨부파일 디렉토리가 존재하지 않습니다.</p>';
|
||||||
}
|
}
|
||||||
@@ -50,4 +48,5 @@ if (is_dir($dir)) {
|
|||||||
<div class="btn_confirm01 btn_confirm"><a href="./board_form.php?w=u&bo_table=<?php echo $bo_table; ?>&<?php echo $qstr; ?>">게시판 수정으로 돌아가기</a></div>
|
<div class="btn_confirm01 btn_confirm"><a href="./board_form.php?w=u&bo_table=<?php echo $bo_table; ?>&<?php echo $qstr; ?>">게시판 수정으로 돌아가기</a></div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
require_once './admin.tail.php';
|
include_once('./admin.tail.php');
|
||||||
|
?>
|
||||||
+113
-129
@@ -1,152 +1,134 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "300200";
|
$sub_menu = "300200";
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, 'w');
|
auth_check($auth[$sub_menu], 'w');
|
||||||
|
|
||||||
if ($is_admin != 'super' && $w == '') {
|
if ($is_admin != 'super' && $w == '') alert('최고관리자만 접근 가능합니다.');
|
||||||
alert('최고관리자만 접근 가능합니다.');
|
|
||||||
}
|
|
||||||
|
|
||||||
$html_title = '게시판그룹';
|
$html_title = '게시판그룹';
|
||||||
$gr_id_attr = '';
|
$gr_id_attr = '';
|
||||||
$sound_only = '';
|
$sound_only = '';
|
||||||
|
|
||||||
if (!isset($group['gr_id'])) {
|
|
||||||
$group['gr_id'] = '';
|
|
||||||
$group['gr_subject'] = '';
|
|
||||||
$group['gr_device'] = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
$gr = array('gr_use_access' => 0, 'gr_admin' => '');
|
|
||||||
if ($w == '') {
|
if ($w == '') {
|
||||||
$gr_id_attr = 'required';
|
$gr_id_attr = 'required';
|
||||||
$sound_only = '<strong class="sound_only"> 필수</strong>';
|
$sound_only = '<strong class="sound_only"> 필수</strong>';
|
||||||
|
$gr['gr_use_access'] = 0;
|
||||||
$html_title .= ' 생성';
|
$html_title .= ' 생성';
|
||||||
} elseif ($w == 'u') {
|
} else if ($w == 'u') {
|
||||||
$gr_id_attr = 'readonly';
|
$gr_id_attr = 'readonly';
|
||||||
$gr = sql_fetch(" select * from {$g5['group_table']} where gr_id = '$gr_id' ");
|
$gr = sql_fetch(" select * from {$g5['group_table']} where gr_id = '$gr_id' ");
|
||||||
$html_title .= ' 수정';
|
$html_title .= ' 수정';
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
alert('제대로 된 값이 넘어오지 않았습니다.');
|
alert('제대로 된 값이 넘어오지 않았습니다.');
|
||||||
|
|
||||||
|
if (!isset($group['gr_device'])) {
|
||||||
|
sql_query(" ALTER TABLE `{$g5['group_table']}` ADD `gr_device` ENUM('both','pc','mobile') NOT NULL DEFAULT 'both' AFTER `gr_subject` ", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 접근회원수
|
|
||||||
$sql1 = " select count(*) as cnt from {$g5['group_member_table']} where gr_id = '{$gr_id}' ";
|
|
||||||
$row1 = sql_fetch($sql1);
|
|
||||||
$group_member_count = $row1['cnt'];
|
|
||||||
|
|
||||||
$g5['title'] = $html_title;
|
$g5['title'] = $html_title;
|
||||||
require_once './admin.head.php';
|
include_once('./admin.head.php');
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<form name="fboardgroup" id="fboardgroup" action="./boardgroup_form_update.php" onsubmit="return fboardgroup_check(this);" method="post" autocomplete="off">
|
<form name="fboardgroup" id="fboardgroup" action="./boardgroup_form_update.php" onsubmit="return fboardgroup_check(this);" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="w" value="<?php echo $w ?>">
|
<input type="hidden" name="w" value="<?php echo $w ?>">
|
||||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||||
<input type="hidden" name="token" value="">
|
<input type="hidden" name="token" value="">
|
||||||
|
|
||||||
<div class="tbl_frm01 tbl_wrap">
|
<div class="tbl_frm01 tbl_wrap">
|
||||||
<table>
|
<table>
|
||||||
<caption><?php echo $g5['title']; ?></caption>
|
<caption><?php echo $g5['title']; ?></caption>
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col class="grid_4">
|
<col class="grid_4">
|
||||||
<col>
|
<col>
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="gr_id">그룹 ID<?php echo $sound_only ?></label></th>
|
<th scope="row"><label for="gr_id">그룹 ID<?php echo $sound_only ?></label></th>
|
||||||
<td><input type="text" name="gr_id" value="<?php echo $group['gr_id'] ?>" id="gr_id" <?php echo $gr_id_attr; ?> class="<?php echo $gr_id_attr; ?> alnum_ frm_input" maxlength="10">
|
<td><input type="text" name="gr_id" value="<?php echo $group['gr_id'] ?>" id="gr_id" <?php echo $gr_id_attr; ?> class="<?php echo $gr_id_attr; ?> alnum_ frm_input" maxlength="10">
|
||||||
<?php
|
<?php
|
||||||
if ($w == '') {
|
if ($w=='')
|
||||||
echo '영문자, 숫자, _ 만 가능 (공백없이)';
|
echo '영문자, 숫자, _ 만 가능 (공백없이)';
|
||||||
} else {
|
else
|
||||||
echo '<a href="' . G5_BBS_URL . '/group.php?gr_id=' . $group['gr_id'] . '" class="btn_frmline">게시판그룹 바로가기</a>';
|
echo '<a href="'.G5_BBS_URL.'/group.php?gr_id='.$group['gr_id'].'" class="btn_frmline">게시판그룹 바로가기</a>';
|
||||||
}
|
?>
|
||||||
?>
|
</td>
|
||||||
</td>
|
</tr>
|
||||||
</tr>
|
<tr>
|
||||||
<tr>
|
<th scope="row"><label for="gr_subject">그룹 제목<strong class="sound_only"> 필수</strong></label></th>
|
||||||
<th scope="row"><label for="gr_subject">그룹 제목<strong class="sound_only"> 필수</strong></label></th>
|
<td>
|
||||||
<td>
|
<input type="text" name="gr_subject" value="<?php echo get_text($group['gr_subject']) ?>" id="gr_subject" required class="required frm_input" size="80">
|
||||||
<input type="text" name="gr_subject" value="<?php echo get_text($group['gr_subject']) ?>" id="gr_subject" required class="required frm_input" size="80">
|
<?php
|
||||||
<?php
|
if ($w == 'u')
|
||||||
if ($w == 'u') {
|
echo '<a href="./board_form.php?gr_id='.$gr_id.'" class="btn_frmline">게시판생성</a>';
|
||||||
echo '<a href="./board_form.php?gr_id=' . $gr_id . '" class="btn_frmline">게시판생성</a>';
|
?>
|
||||||
}
|
</td>
|
||||||
?>
|
</tr>
|
||||||
</td>
|
<tr>
|
||||||
</tr>
|
<th scope="row"><label for="gr_device">접속기기</label></th>
|
||||||
<tr>
|
<td>
|
||||||
<th scope="row"><label for="gr_device">접속기기</label></th>
|
<?php echo help("PC 와 모바일 사용을 구분합니다.") ?>
|
||||||
<td>
|
<select id="gr_device" name="gr_device">
|
||||||
<?php echo help("PC 와 모바일 사용을 구분합니다.") ?>
|
<option value="both"<?php echo get_selected($group['gr_device'], 'both', true); ?>>PC와 모바일에서 모두 사용</option>
|
||||||
<select id="gr_device" name="gr_device">
|
<option value="pc"<?php echo get_selected($group['gr_device'], 'pc'); ?>>PC 전용</option>
|
||||||
<option value="both" <?php echo get_selected($group['gr_device'], 'both', true); ?>>PC와 모바일에서 모두 사용</option>
|
<option value="mobile"<?php echo get_selected($group['gr_device'], 'mobile'); ?>>모바일 전용</option>
|
||||||
<option value="pc" <?php echo get_selected($group['gr_device'], 'pc'); ?>>PC 전용</option>
|
</select>
|
||||||
<option value="mobile" <?php echo get_selected($group['gr_device'], 'mobile'); ?>>모바일 전용</option>
|
</td>
|
||||||
</select>
|
</tr>
|
||||||
</td>
|
<tr>
|
||||||
</tr>
|
<th scope="row"><?php if ($is_admin == 'super') { ?><label for="gr_admin"><?php } ?>그룹 관리자<?php if ($is_admin == 'super') { ?></label><?php } ?></th>
|
||||||
<tr>
|
<td>
|
||||||
<th scope="row">
|
<?php
|
||||||
<?php
|
if ($is_admin == 'super')
|
||||||
if ($is_admin == 'super') {
|
echo '<input type="text" id="gr_admin" name="gr_admin" class="frm_input" value="'.$gr['gr_admin'].'" maxlength="20">';
|
||||||
echo '<label for="gr_admin">그룹 관리자</label>';
|
else
|
||||||
} else {
|
echo '<input type="hidden" id="gr_admin" name="gr_admin" value="'.$gr['gr_admin'].'">'.$gr['gr_admin'];
|
||||||
echo '그룹 관리자';
|
?>
|
||||||
}
|
</td>
|
||||||
?>
|
</tr>
|
||||||
</th>
|
<tr>
|
||||||
<td>
|
<th scope="row"><label for="gr_use_access">접근회원사용</label></th>
|
||||||
<?php
|
<td>
|
||||||
if ($is_admin == 'super') {
|
<?php echo help("사용에 체크하시면 이 그룹에 속한 게시판은 접근가능한 회원만 접근이 가능합니다.") ?>
|
||||||
echo '<input type="text" id="gr_admin" name="gr_admin" class="frm_input" value="' . $gr['gr_admin'] . '" maxlength="20">';
|
<input type="checkbox" name="gr_use_access" value="1" id="gr_use_access" <?php echo $gr['gr_use_access']?'checked':''; ?>>
|
||||||
} else {
|
사용
|
||||||
echo '<input type="hidden" id="gr_admin" name="gr_admin" value="' . $gr['gr_admin'] . '">' . $gr['gr_admin'];
|
</td>
|
||||||
}
|
</tr>
|
||||||
?>
|
<tr>
|
||||||
</td>
|
<th scope="row">접근회원수</th>
|
||||||
</tr>
|
<td>
|
||||||
<tr>
|
<?php
|
||||||
<th scope="row"><label for="gr_use_access">접근회원사용</label></th>
|
// 접근회원수
|
||||||
<td>
|
$sql1 = " select count(*) as cnt from {$g5['group_member_table']} where gr_id = '{$gr_id}' ";
|
||||||
<?php echo help("사용에 체크하시면 이 그룹에 속한 게시판은 접근가능한 회원만 접근이 가능합니다.") ?>
|
$row1 = sql_fetch($sql1);
|
||||||
<input type="checkbox" name="gr_use_access" value="1" id="gr_use_access" <?php echo $gr['gr_use_access'] ? 'checked' : ''; ?>>
|
echo '<a href="./boardgroupmember_list.php?gr_id='.$gr_id.'">'.$row1['cnt'].'</a>';
|
||||||
사용
|
?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<?php for ($i=1;$i<=10;$i++) { ?>
|
||||||
<th scope="row">접근회원수</th>
|
<tr>
|
||||||
<td>
|
<th scope="row">여분필드<?php echo $i ?></th>
|
||||||
<?php
|
<td class="td_extra">
|
||||||
echo '<a href="./boardgroupmember_list.php?gr_id=' . $gr_id . '">' . $group_member_count . '</a>';
|
<label for="gr_<?php echo $i ?>_subj">여분필드 <?php echo $i ?> 제목</label>
|
||||||
?>
|
<input type="text" name="gr_<?php echo $i ?>_subj" value="<?php echo get_text($group['gr_'.$i.'_subj']) ?>" id="gr_<?php echo $i ?>_subj" class="frm_input">
|
||||||
</td>
|
<label for="gr_<?php echo $i ?>">여분필드 <?php echo $i ?> 내용</label>
|
||||||
</tr>
|
<input type="text" name="gr_<?php echo $i ?>" value="<?php echo $gr['gr_'.$i] ?>" id="gr_<?php echo $i ?>" class="frm_input">
|
||||||
<?php for ($i = 1; $i <= 10; $i++) { ?>
|
</td>
|
||||||
<tr>
|
</tr>
|
||||||
<th scope="row">여분필드<?php echo $i ?></th>
|
<?php } ?>
|
||||||
<td class="td_extra">
|
</tbody>
|
||||||
<label for="gr_<?php echo $i ?>_subj">여분필드 <?php echo $i ?> 제목</label>
|
</table>
|
||||||
<input type="text" name="gr_<?php echo $i ?>_subj" value="<?php echo isset($group['gr_' . $i . '_subj']) ? get_text($group['gr_' . $i . '_subj']) : ''; ?>" id="gr_<?php echo $i ?>_subj" class="frm_input">
|
</div>
|
||||||
<label for="gr_<?php echo $i ?>">여분필드 <?php echo $i ?> 내용</label>
|
|
||||||
<input type="text" name="gr_<?php echo $i ?>" value="<?php echo isset($gr['gr_' . $i]) ? get_sanitize_input($gr['gr_' . $i]) : ''; ?>" id="gr_<?php echo $i ?>" class="frm_input">
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<?php } ?>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="btn_fixed_top">
|
<div class="btn_fixed_top">
|
||||||
<a href="./boardgroup_list.php?<?php echo $qstr ?>" class="btn btn_02">목록</a>
|
<a href="./boardgroup_list.php?<?php echo $qstr ?>" class="btn btn_02">목록</a>
|
||||||
<input type="submit" class="btn_submit btn" accesskey="s" value="확인">
|
<input type="submit" class="btn_submit btn" accesskey="s" value="확인">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
@@ -158,11 +140,13 @@ require_once './admin.head.php';
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function fboardgroup_check(f) {
|
function fboardgroup_check(f)
|
||||||
f.action = './boardgroup_form_update.php';
|
{
|
||||||
return true;
|
f.action = './boardgroup_form_update.php';
|
||||||
}
|
return true;
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
require_once './admin.tail.php';
|
include_once ('./admin.tail.php');
|
||||||
|
?>
|
||||||
|
|||||||
@@ -1,99 +1,71 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "300200";
|
$sub_menu = "300200";
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
|
|
||||||
if ($w == 'u') {
|
if ($w == 'u')
|
||||||
check_demo();
|
check_demo();
|
||||||
}
|
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, 'w');
|
auth_check($auth[$sub_menu], 'w');
|
||||||
|
|
||||||
if ($is_admin != 'super' && $w == '') {
|
if ($is_admin != 'super' && $w == '') alert('최고관리자만 접근 가능합니다.');
|
||||||
alert('최고관리자만 접근 가능합니다.');
|
|
||||||
}
|
|
||||||
|
|
||||||
check_admin_token();
|
check_admin_token();
|
||||||
|
|
||||||
$gr_id = isset($_POST['gr_id']) ? $_POST['gr_id'] : '';
|
if (!preg_match("/^([A-Za-z0-9_]{1,10})$/", $_POST['gr_id']))
|
||||||
|
|
||||||
if (!preg_match("/^([A-Za-z0-9_]{1,10})$/", $gr_id)) {
|
|
||||||
alert('그룹 ID는 공백없이 영문자, 숫자, _ 만 사용 가능합니다. (10자 이내)');
|
alert('그룹 ID는 공백없이 영문자, 숫자, _ 만 사용 가능합니다. (10자 이내)');
|
||||||
}
|
|
||||||
|
|
||||||
if (empty($gr_subject)) {
|
if (!$gr_subject) alert('그룹 제목을 입력하세요.');
|
||||||
alert('그룹 제목을 입력하세요.');
|
|
||||||
}
|
|
||||||
|
|
||||||
$posts = array();
|
$sql_common = " gr_subject = '{$_POST['gr_subject']}',
|
||||||
|
gr_device = '{$_POST['gr_device']}',
|
||||||
$check_keys = array(
|
gr_admin = '{$_POST['gr_admin']}',
|
||||||
'gr_subject' => '',
|
gr_1_subj = '{$_POST['gr_1_subj']}',
|
||||||
'gr_device' => '',
|
gr_2_subj = '{$_POST['gr_2_subj']}',
|
||||||
'gr_admin' => '',
|
gr_3_subj = '{$_POST['gr_3_subj']}',
|
||||||
);
|
gr_4_subj = '{$_POST['gr_4_subj']}',
|
||||||
|
gr_5_subj = '{$_POST['gr_5_subj']}',
|
||||||
for ($i = 1; $i <= 10; $i++) {
|
gr_6_subj = '{$_POST['gr_6_subj']}',
|
||||||
$check_keys['gr_' . $i . '_subj'] = isset($_POST['gr_' . $i . '_subj']) ? $_POST['gr_' . $i . '_subj'] : '';
|
gr_7_subj = '{$_POST['gr_7_subj']}',
|
||||||
$check_keys['gr_' . $i] = isset($_POST['gr_' . $i]) ? $_POST['gr_' . $i] : '';
|
gr_8_subj = '{$_POST['gr_8_subj']}',
|
||||||
}
|
gr_9_subj = '{$_POST['gr_9_subj']}',
|
||||||
|
gr_10_subj = '{$_POST['gr_10_subj']}',
|
||||||
foreach ($check_keys as $key => $value) {
|
gr_1 = '{$_POST['gr_1']}',
|
||||||
if ($key === 'gr_subject') {
|
gr_2 = '{$_POST['gr_2']}',
|
||||||
$posts[$key] = isset($_POST[$key]) ? addslashes(strip_tags(clean_xss_attributes(stripslashes($_POST[$key])))) : '';
|
gr_3 = '{$_POST['gr_3']}',
|
||||||
} else {
|
gr_4 = '{$_POST['gr_4']}',
|
||||||
$posts[$key] = isset($_POST[$key]) ? $_POST[$key] : '';
|
gr_5 = '{$_POST['gr_5']}',
|
||||||
}
|
gr_6 = '{$_POST['gr_6']}',
|
||||||
}
|
gr_7 = '{$_POST['gr_7']}',
|
||||||
|
gr_8 = '{$_POST['gr_8']}',
|
||||||
$sql_common = " gr_subject = '{$posts['gr_subject']}',
|
gr_9 = '{$_POST['gr_9']}',
|
||||||
gr_device = '{$posts['gr_device']}',
|
gr_10 = '{$_POST['gr_10']}' ";
|
||||||
gr_admin = '{$posts['gr_admin']}',
|
if (isset($_POST['gr_use_access']))
|
||||||
gr_1_subj = '{$posts['gr_1_subj']}',
|
|
||||||
gr_2_subj = '{$posts['gr_2_subj']}',
|
|
||||||
gr_3_subj = '{$posts['gr_3_subj']}',
|
|
||||||
gr_4_subj = '{$posts['gr_4_subj']}',
|
|
||||||
gr_5_subj = '{$posts['gr_5_subj']}',
|
|
||||||
gr_6_subj = '{$posts['gr_6_subj']}',
|
|
||||||
gr_7_subj = '{$posts['gr_7_subj']}',
|
|
||||||
gr_8_subj = '{$posts['gr_8_subj']}',
|
|
||||||
gr_9_subj = '{$posts['gr_9_subj']}',
|
|
||||||
gr_10_subj = '{$posts['gr_10_subj']}',
|
|
||||||
gr_1 = '{$posts['gr_1']}',
|
|
||||||
gr_2 = '{$posts['gr_2']}',
|
|
||||||
gr_3 = '{$posts['gr_3']}',
|
|
||||||
gr_4 = '{$posts['gr_4']}',
|
|
||||||
gr_5 = '{$posts['gr_5']}',
|
|
||||||
gr_6 = '{$posts['gr_6']}',
|
|
||||||
gr_7 = '{$posts['gr_7']}',
|
|
||||||
gr_8 = '{$posts['gr_8']}',
|
|
||||||
gr_9 = '{$posts['gr_9']}',
|
|
||||||
gr_10 = '{$posts['gr_10']}' ";
|
|
||||||
if (isset($_POST['gr_use_access'])) {
|
|
||||||
$sql_common .= ", gr_use_access = '{$_POST['gr_use_access']}' ";
|
$sql_common .= ", gr_use_access = '{$_POST['gr_use_access']}' ";
|
||||||
} else {
|
else
|
||||||
$sql_common .= ", gr_use_access = '' ";
|
$sql_common .= ", gr_use_access = '' ";
|
||||||
}
|
|
||||||
|
|
||||||
if ($w == '') {
|
if ($w == '') {
|
||||||
$sql = " select count(*) as cnt from {$g5['group_table']} where gr_id = '{$gr_id}' ";
|
|
||||||
|
$sql = " select count(*) as cnt from {$g5['group_table']} where gr_id = '{$_POST['gr_id']}' ";
|
||||||
$row = sql_fetch($sql);
|
$row = sql_fetch($sql);
|
||||||
if ($row['cnt']) {
|
if ($row['cnt'])
|
||||||
alert('이미 존재하는 그룹 ID 입니다.');
|
alert('이미 존재하는 그룹 ID 입니다.');
|
||||||
}
|
|
||||||
|
|
||||||
$sql = " insert into {$g5['group_table']}
|
$sql = " insert into {$g5['group_table']}
|
||||||
set gr_id = '{$gr_id}',
|
set gr_id = '{$_POST['gr_id']}',
|
||||||
{$sql_common} ";
|
{$sql_common} ";
|
||||||
sql_query($sql);
|
sql_query($sql);
|
||||||
} elseif ($w == "u") {
|
|
||||||
|
} else if ($w == "u") {
|
||||||
|
|
||||||
$sql = " update {$g5['group_table']}
|
$sql = " update {$g5['group_table']}
|
||||||
set {$sql_common}
|
set {$sql_common}
|
||||||
where gr_id = '{$gr_id}' ";
|
where gr_id = '{$_POST['gr_id']}' ";
|
||||||
sql_query($sql);
|
sql_query($sql);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
alert('제대로 된 값이 넘어오지 않았습니다.');
|
alert('제대로 된 값이 넘어오지 않았습니다.');
|
||||||
}
|
}
|
||||||
|
|
||||||
run_event('admin_boardgroup_form_update', $gr_id, $w);
|
goto_url('./boardgroup_form.php?w=u&gr_id='.$gr_id.'&'.$qstr);
|
||||||
|
?>
|
||||||
goto_url('./boardgroup_form.php?w=u&gr_id=' . $gr_id . '&' . $qstr);
|
|
||||||
|
|||||||
+135
-136
@@ -1,44 +1,42 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "300200";
|
$sub_menu = "300200";
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, 'r');
|
auth_check($auth[$sub_menu], 'r');
|
||||||
|
|
||||||
|
if (!isset($group['gr_device'])) {
|
||||||
|
// 게시판 그룹 사용 필드 추가
|
||||||
|
// both : pc, mobile 둘다 사용
|
||||||
|
// pc : pc 전용 사용
|
||||||
|
// mobile : mobile 전용 사용
|
||||||
|
// none : 사용 안함
|
||||||
|
sql_query(" ALTER TABLE `{$g5['board_group_table']}` ADD `gr_device` ENUM( 'both', 'pc', 'mobile' ) NOT NULL DEFAULT 'both' AFTER `gr_subject` ", false);
|
||||||
|
}
|
||||||
|
|
||||||
$sql_common = " from {$g5['group_table']} ";
|
$sql_common = " from {$g5['group_table']} ";
|
||||||
|
|
||||||
$sql_search = " where (1) ";
|
$sql_search = " where (1) ";
|
||||||
if ($is_admin != 'super') {
|
if ($is_admin != 'super')
|
||||||
$sql_search .= " and (gr_admin = '{$member['mb_id']}') ";
|
$sql_search .= " and (gr_admin = '{$member['mb_id']}') ";
|
||||||
}
|
|
||||||
|
|
||||||
$allowed_sfl = array('gr_subject', 'gr_id', 'gr_admin');
|
|
||||||
if (!in_array($sfl, $allowed_sfl)) {
|
|
||||||
$sfl = 'gr_subject';
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($stx) {
|
if ($stx) {
|
||||||
$sql_search .= " and ( ";
|
$sql_search .= " and ( ";
|
||||||
switch ($sfl) {
|
switch ($sfl) {
|
||||||
case "gr_id":
|
case "gr_id" :
|
||||||
case "gr_admin":
|
case "gr_admin" :
|
||||||
$sql_search .= " ({$sfl} = '{$stx}') ";
|
$sql_search .= " ({$sfl} = '{$stx}') ";
|
||||||
break;
|
break;
|
||||||
default:
|
default :
|
||||||
$sql_search .= " ({$sfl} like '%{$stx}%') ";
|
$sql_search .= " ({$sfl} like '%{$stx}%') ";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$sql_search .= " ) ";
|
$sql_search .= " ) ";
|
||||||
}
|
}
|
||||||
|
|
||||||
$allowed_sst = array('gr_id', 'gr_subject', 'gr_admin', 'gr_order');
|
if ($sst)
|
||||||
if ($sst && !in_array($sst, $allowed_sst)) $sst = '';
|
|
||||||
if ($sod && !in_array(strtolower($sod), array('asc', 'desc'))) $sod = '';
|
|
||||||
if ($sst) {
|
|
||||||
$sql_order = " order by {$sst} {$sod} ";
|
$sql_order = " order by {$sst} {$sod} ";
|
||||||
} else {
|
else
|
||||||
$sql_order = " order by gr_id asc ";
|
$sql_order = " order by gr_id asc ";
|
||||||
}
|
|
||||||
|
|
||||||
$sql = " select count(*) as cnt {$sql_common} {$sql_search} {$sql_order} ";
|
$sql = " select count(*) as cnt {$sql_common} {$sql_search} {$sql_order} ";
|
||||||
$row = sql_fetch($sql);
|
$row = sql_fetch($sql);
|
||||||
@@ -46,137 +44,136 @@ $total_count = $row['cnt'];
|
|||||||
|
|
||||||
$rows = $config['cf_page_rows'];
|
$rows = $config['cf_page_rows'];
|
||||||
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
||||||
if ($page < 1) {
|
if ($page < 1) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||||
$page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
|
|
||||||
}
|
|
||||||
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
||||||
|
|
||||||
$sql = " select * {$sql_common} {$sql_search} {$sql_order} limit {$from_record}, {$rows} ";
|
$sql = " select * {$sql_common} {$sql_search} {$sql_order} limit {$from_record}, {$rows} ";
|
||||||
$result = sql_query($sql);
|
$result = sql_query($sql);
|
||||||
|
|
||||||
$listall = '<a href="' . $_SERVER['SCRIPT_NAME'] . '" class="ov_listall">처음</a>';
|
$listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">처음</a>';
|
||||||
|
|
||||||
$g5['title'] = '게시판그룹설정';
|
$g5['title'] = '게시판그룹설정';
|
||||||
require_once './admin.head.php';
|
include_once('./admin.head.php');
|
||||||
|
|
||||||
$colspan = 10;
|
$colspan = 10;
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="local_ov01 local_ov">
|
<div class="local_ov01 local_ov">
|
||||||
<?php echo $listall ?>
|
<?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($total_count) ?>개</span></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<form name="fsearch" id="fsearch" class="local_sch01 local_sch" method="get">
|
<form name="fsearch" id="fsearch" class="local_sch01 local_sch" method="get">
|
||||||
<label for="sfl" class="sound_only">검색대상</label>
|
<label for="sfl" class="sound_only">검색대상</label>
|
||||||
<select name="sfl" id="sfl">
|
<select name="sfl" id="sfl">
|
||||||
<option value="gr_subject" <?php echo get_selected($sfl, "gr_subject"); ?>>제목</option>
|
<option value="gr_subject"<?php echo get_selected($_GET['sfl'], "gr_subject"); ?>>제목</option>
|
||||||
<option value="gr_id" <?php echo get_selected($sfl, "gr_id"); ?>>ID</option>
|
<option value="gr_id"<?php echo get_selected($_GET['sfl'], "gr_id"); ?>>ID</option>
|
||||||
<option value="gr_admin" <?php echo get_selected($sfl, "gr_admin"); ?>>그룹관리자</option>
|
<option value="gr_admin"<?php echo get_selected($_GET['sfl'], "gr_admin"); ?>>그룹관리자</option>
|
||||||
</select>
|
</select>
|
||||||
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
<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="required frm_input">
|
<input type="text" name="stx" id="stx" value="<?php echo $stx ?>" required class="required frm_input">
|
||||||
<input type="submit" value="검색" class="btn_submit">
|
<input type="submit" value="검색" class="btn_submit">
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
||||||
<form name="fboardgrouplist" id="fboardgrouplist" action="./boardgroup_list_update.php" onsubmit="return fboardgrouplist_submit(this);" method="post">
|
<form name="fboardgrouplist" id="fboardgrouplist" action="./boardgroup_list_update.php" onsubmit="return fboardgrouplist_submit(this);" method="post">
|
||||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||||
<input type="hidden" name="token" value="">
|
<input type="hidden" name="token" value="">
|
||||||
|
|
||||||
<div class="tbl_head01 tbl_wrap">
|
<div class="tbl_head01 tbl_wrap">
|
||||||
<table>
|
<table>
|
||||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col">
|
<th scope="col">
|
||||||
<label for="chkall" class="sound_only">그룹 전체</label>
|
<label for="chkall" class="sound_only">그룹 전체</label>
|
||||||
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
|
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
|
||||||
</th>
|
</th>
|
||||||
<th scope="col"><?php echo subject_sort_link('gr_id') ?>그룹아이디</a></th>
|
<th scope="col"><?php echo subject_sort_link('gr_id') ?>그룹아이디</a></th>
|
||||||
<th scope="col"><?php echo subject_sort_link('gr_subject') ?>제목</a></th>
|
<th scope="col"><?php echo subject_sort_link('gr_subject') ?>제목</a></th>
|
||||||
<th scope="col"><?php echo subject_sort_link('gr_admin') ?>그룹관리자</a></th>
|
<th scope="col"><?php echo subject_sort_link('gr_admin') ?>그룹관리자</a></th>
|
||||||
<th scope="col">게시판</th>
|
<th scope="col">게시판</th>
|
||||||
<th scope="col">접근<br>사용</th>
|
<th scope="col">접근<br>사용</th>
|
||||||
<th scope="col">접근<br>회원수</th>
|
<th scope="col">접근<br>회원수</th>
|
||||||
<th scope="col"><?php echo subject_sort_link('gr_order') ?>출력<br>순서</a></th>
|
<th scope="col"><?php echo subject_sort_link('gr_order') ?>출력<br>순서</a></th>
|
||||||
<th scope="col">접속기기</th>
|
<th scope="col">접속기기</th>
|
||||||
<th scope="col">관리</th>
|
<th scope="col">관리</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||||
// 접근회원수
|
{
|
||||||
$sql1 = " select count(*) as cnt from {$g5['group_member_table']} where gr_id = '{$row['gr_id']}' ";
|
// 접근회원수
|
||||||
$row1 = sql_fetch($sql1);
|
$sql1 = " select count(*) as cnt from {$g5['group_member_table']} where gr_id = '{$row['gr_id']}' ";
|
||||||
|
$row1 = sql_fetch($sql1);
|
||||||
|
|
||||||
// 게시판수
|
// 게시판수
|
||||||
$sql2 = " select count(*) as cnt from {$g5['board_table']} where gr_id = '{$row['gr_id']}' ";
|
$sql2 = " select count(*) as cnt from {$g5['board_table']} where gr_id = '{$row['gr_id']}' ";
|
||||||
$row2 = sql_fetch($sql2);
|
$row2 = sql_fetch($sql2);
|
||||||
|
|
||||||
$s_upd = '<a href="./boardgroup_form.php?' . $qstr . '&w=u&gr_id=' . $row['gr_id'] . '" class="btn_03 btn">수정</a>';
|
$s_upd = '<a href="./boardgroup_form.php?'.$qstr.'&w=u&gr_id='.$row['gr_id'].'" class="btn_03 btn">수정</a>';
|
||||||
|
|
||||||
$bg = 'bg' . ($i % 2);
|
$bg = 'bg'.($i%2);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<tr class="<?php echo $bg; ?>">
|
<tr class="<?php echo $bg; ?>">
|
||||||
<td class="td_chk">
|
<td class="td_chk">
|
||||||
<input type="hidden" name="group_id[<?php echo $i ?>]" value="<?php echo $row['gr_id'] ?>">
|
<input type="hidden" name="group_id[<?php echo $i ?>]" value="<?php echo $row['gr_id'] ?>">
|
||||||
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo get_text($row['gr_subject']); ?> 그룹</label>
|
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo $row['gr_subject'] ?> 그룹</label>
|
||||||
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
|
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
|
||||||
</td>
|
</td>
|
||||||
<td class="td_left"><a href="<?php echo G5_BBS_URL ?>/group.php?gr_id=<?php echo $row['gr_id'] ?>"><?php echo $row['gr_id'] ?></a></td>
|
<td class="td_left"><a href="<?php echo G5_BBS_URL ?>/group.php?gr_id=<?php echo $row['gr_id'] ?>"><?php echo $row['gr_id'] ?></a></td>
|
||||||
<td class="td_input">
|
<td class="td_input">
|
||||||
<label for="gr_subject_<?php echo $i; ?>" class="sound_only">그룹제목</label>
|
<label for="gr_subject_<?php echo $i; ?>" class="sound_only">그룹제목</label>
|
||||||
<input type="text" name="gr_subject[<?php echo $i ?>]" value="<?php echo get_text($row['gr_subject']) ?>" id="gr_subject_<?php echo $i ?>" class="tbl_input">
|
<input type="text" name="gr_subject[<?php echo $i ?>]" value="<?php echo get_text($row['gr_subject']) ?>" id="gr_subject_<?php echo $i ?>" class="tbl_input">
|
||||||
</td>
|
</td>
|
||||||
<td class="td_mng td_input">
|
<td class="td_mng td_input">
|
||||||
<?php if ($is_admin == 'super') { ?>
|
<?php if ($is_admin == 'super'){ ?>
|
||||||
<label for="gr_admin_<?php echo $i; ?>" class="sound_only">그룹관리자</label>
|
<label for="gr_admin_<?php echo $i; ?>" class="sound_only">그룹관리자</label>
|
||||||
<input type="text" name="gr_admin[<?php echo $i ?>]" value="<?php echo get_sanitize_input($row['gr_admin']); ?>" id="gr_admin_<?php echo $i ?>" class="tbl_input" size="10" maxlength="20">
|
<input type="text" name="gr_admin[<?php echo $i ?>]" value="<?php echo $row['gr_admin'] ?>" id="gr_admin_<?php echo $i ?>" class="tbl_input" size="10" maxlength="20">
|
||||||
<?php } else { ?>
|
<?php }else{ ?>
|
||||||
<input type="hidden" name="gr_admin[<?php echo $i ?>]" value="<?php echo get_sanitize_input($row['gr_admin']); ?>"><?php echo get_text($row['gr_admin']); ?>
|
<input type="hidden" name="gr_admin[<?php echo $i ?>]" value="<?php echo $row['gr_admin'] ?>"><?php echo $row['gr_admin'] ?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</td>
|
</td>
|
||||||
<td class="td_num"><a href="./board_list.php?sfl=a.gr_id&stx=<?php echo $row['gr_id'] ?>"><?php echo $row2['cnt'] ?></a></td>
|
<td class="td_num"><a href="./board_list.php?sfl=a.gr_id&stx=<?php echo $row['gr_id'] ?>"><?php echo $row2['cnt'] ?></a></td>
|
||||||
<td class="td_numsmall">
|
<td class="td_numsmall">
|
||||||
<label for="gr_use_access_<?php echo $i; ?>" class="sound_only">접근회원 사용</label>
|
<label for="gr_use_access_<?php echo $i; ?>" class="sound_only">접근회원 사용</label>
|
||||||
<input type="checkbox" name="gr_use_access[<?php echo $i ?>]" <?php echo $row['gr_use_access'] ? 'checked' : '' ?> value="1" id="gr_use_access_<?php echo $i ?>">
|
<input type="checkbox" name="gr_use_access[<?php echo $i ?>]" <?php echo $row['gr_use_access']?'checked':'' ?> value="1" id="gr_use_access_<?php echo $i ?>">
|
||||||
</td>
|
</td>
|
||||||
<td class="td_num"><a href="./boardgroupmember_list.php?gr_id=<?php echo $row['gr_id'] ?>"><?php echo $row1['cnt'] ?></a></td>
|
<td class="td_num"><a href="./boardgroupmember_list.php?gr_id=<?php echo $row['gr_id'] ?>"><?php echo $row1['cnt'] ?></a></td>
|
||||||
<td class="td_numsmall">
|
<td class="td_numsmall">
|
||||||
<label for="gr_order_<?php echo $i; ?>" class="sound_only">메인메뉴 출력순서</label>
|
<label for="gr_order_<?php echo $i; ?>" class="sound_only">메인메뉴 출력순서</label>
|
||||||
<input type="text" name="gr_order[<?php echo $i ?>]" value="<?php echo $row['gr_order'] ?>" id="gr_order_<?php echo $i ?>" class="tbl_input" size="2">
|
<input type="text" name="gr_order[<?php echo $i ?>]" value="<?php echo $row['gr_order'] ?>" id="gr_order_<?php echo $i ?>" class="tbl_input" size="2">
|
||||||
</td>
|
</td>
|
||||||
<td class="td_mng">
|
<td class="td_mng">
|
||||||
<label for="gr_device_<?php echo $i; ?>" class="sound_only">접속기기</label>
|
<label for="gr_device_<?php echo $i; ?>" class="sound_only">접속기기</label>
|
||||||
<select name="gr_device[<?php echo $i ?>]" id="gr_device_<?php echo $i ?>">
|
<select name="gr_device[<?php echo $i ?>]" id="gr_device_<?php echo $i ?>">
|
||||||
<option value="both" <?php echo get_selected($row['gr_device'], 'both'); ?>>모두</option>
|
<option value="both"<?php echo get_selected($row['gr_device'], 'both'); ?>>모두</option>
|
||||||
<option value="pc" <?php echo get_selected($row['gr_device'], 'pc'); ?>>PC</option>
|
<option value="pc"<?php echo get_selected($row['gr_device'], 'pc'); ?>>PC</option>
|
||||||
<option value="mobile" <?php echo get_selected($row['gr_device'], 'mobile'); ?>>모바일</option>
|
<option value="mobile"<?php echo get_selected($row['gr_device'], 'mobile'); ?>>모바일</option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
<td class="td_mng td_mng_s"><?php echo $s_upd ?></td>
|
<td class="td_mng td_mng_s"><?php echo $s_upd ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
|
||||||
}
|
|
||||||
if ($i == 0) {
|
|
||||||
echo '<tr><td colspan="' . $colspan . '" class="empty_table">자료가 없습니다.</td></tr>';
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="btn_fixed_top">
|
<?php
|
||||||
<input type="submit" name="act_button" onclick="document.pressed=this.value" value="선택수정" class="btn btn_02">
|
}
|
||||||
<input type="submit" name="act_button" onclick="document.pressed=this.value" value="선택삭제" class="btn btn_02">
|
if ($i == 0)
|
||||||
<a href="./boardgroup_form.php" class="btn btn_01">게시판그룹 추가</a>
|
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||||
</div>
|
?>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="btn_fixed_top">
|
||||||
|
<input type="submit" name="act_button" onclick="document.pressed=this.value" value="선택수정" class="btn btn_02">
|
||||||
|
<input type="submit" name="act_button" onclick="document.pressed=this.value" value="선택삭제" class="btn btn_02">
|
||||||
|
<a href="./boardgroup_form.php" class="btn btn_01">게시판그룹 추가</a>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<div class="local_desc01 local_desc">
|
<div class="local_desc01 local_desc">
|
||||||
@@ -187,26 +184,28 @@ $colspan = 10;
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$pagelist = get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, $_SERVER['SCRIPT_NAME'] . '?' . $qstr . '&page=');
|
$pagelist = get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, $_SERVER['SCRIPT_NAME'].'?'.$qstr.'&page=');
|
||||||
echo $pagelist;
|
echo $pagelist;
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function fboardgrouplist_submit(f) {
|
function fboardgrouplist_submit(f)
|
||||||
if (!is_checked("chk[]")) {
|
{
|
||||||
alert(document.pressed + " 하실 항목을 하나 이상 선택하세요.");
|
if (!is_checked("chk[]")) {
|
||||||
|
alert(document.pressed+" 하실 항목을 하나 이상 선택하세요.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(document.pressed == "선택삭제") {
|
||||||
|
if(!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (document.pressed == "선택삭제") {
|
|
||||||
if (!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
require_once './admin.tail.php';
|
include_once('./admin.tail.php');
|
||||||
|
?>
|
||||||
|
|||||||
@@ -1,49 +1,40 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "300200";
|
$sub_menu = "300200";
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
//print_r2($_POST); exit;
|
||||||
|
|
||||||
check_demo();
|
check_demo();
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, 'w');
|
auth_check($auth[$sub_menu], 'w');
|
||||||
|
|
||||||
check_admin_token();
|
check_admin_token();
|
||||||
|
|
||||||
$post_chk = isset($_POST['chk']) ? (array) $_POST['chk'] : array();
|
$count = count($_POST['chk']);
|
||||||
$post_group_id = isset($_POST['group_id']) ? (array) $_POST['group_id'] : array();
|
|
||||||
$act_button = isset($_POST['act_button']) ? $_POST['act_button'] : '';
|
|
||||||
|
|
||||||
$chk_count = count($post_chk);
|
if(!$count)
|
||||||
|
alert($_POST['act_button'].'할 게시판그룹을 1개이상 선택해 주세요.');
|
||||||
|
|
||||||
if (!$chk_count) {
|
for ($i=0; $i<$count; $i++)
|
||||||
alert($act_button . '할 게시판그룹을 1개이상 선택해 주세요.');
|
{
|
||||||
}
|
$k = $_POST['chk'][$i];
|
||||||
|
$gr_id = $_POST['group_id'][$k];
|
||||||
|
|
||||||
for ($i = 0; $i < $chk_count; $i++) {
|
if($_POST['act_button'] == '선택수정') {
|
||||||
$k = isset($post_chk[$i]) ? (int) $post_chk[$i] : 0;
|
|
||||||
$gr_id = preg_replace('/[^a-z0-9_]/i', '', $post_group_id[$k]);
|
|
||||||
$gr_subject = isset($_POST['gr_subject'][$k]) ? addslashes(strip_tags(clean_xss_attributes(stripslashes($_POST['gr_subject'][$k])))) : '';
|
|
||||||
$gr_admin = isset($_POST['gr_admin'][$k]) ? strip_tags(clean_xss_attributes($_POST['gr_admin'][$k])) : '';
|
|
||||||
$gr_device = isset($_POST['gr_device'][$k]) ? clean_xss_tags($_POST['gr_device'][$k], 1, 1, 10) : '';
|
|
||||||
$gr_use_access = isset($_POST['gr_use_access'][$k]) ? (int) $_POST['gr_use_access'][$k] : 0;
|
|
||||||
$gr_order = isset($_POST['gr_order'][$k]) ? (int) $_POST['gr_order'][$k] : 0;
|
|
||||||
|
|
||||||
if ($act_button == '선택수정') {
|
|
||||||
$sql = " update {$g5['group_table']}
|
$sql = " update {$g5['group_table']}
|
||||||
set gr_subject = '{$gr_subject}',
|
set gr_subject = '{$_POST['gr_subject'][$k]}',
|
||||||
gr_device = '" . sql_real_escape_string($gr_device) . "',
|
gr_device = '{$_POST['gr_device'][$k]}',
|
||||||
gr_admin = '" . sql_real_escape_string($gr_admin) . "',
|
gr_admin = '{$_POST['gr_admin'][$k]}',
|
||||||
gr_use_access = '" . $gr_use_access . "',
|
gr_use_access = '{$_POST['gr_use_access'][$k]}',
|
||||||
gr_order = '" . $gr_order . "'
|
gr_order = '{$_POST['gr_order'][$k]}'
|
||||||
where gr_id = '{$gr_id}' ";
|
where gr_id = '{$gr_id}' ";
|
||||||
if ($is_admin != 'super') {
|
if ($is_admin != 'super')
|
||||||
$sql .= " and gr_admin = '" . sql_real_escape_string($gr_admin) . "' ";
|
$sql .= " and gr_admin = '{$_POST['gr_admin'][$k]}' ";
|
||||||
}
|
|
||||||
sql_query($sql);
|
sql_query($sql);
|
||||||
} elseif ($act_button == '선택삭제') {
|
} else if($_POST['act_button'] == '선택삭제') {
|
||||||
$row = sql_fetch(" select count(*) as cnt from {$g5['board_table']} where gr_id = '$gr_id' ");
|
$row = sql_fetch(" select count(*) as cnt from {$g5['board_table']} where gr_id = '$gr_id' ");
|
||||||
if ($row['cnt']) {
|
if ($row['cnt'])
|
||||||
alert("이 그룹에 속한 게시판이 존재하여 게시판 그룹을 삭제할 수 없습니다.\\n\\n이 그룹에 속한 게시판을 먼저 삭제하여 주십시오.", './board_list.php?sfl=a.gr_id&stx=' . $gr_id);
|
alert("이 그룹에 속한 게시판이 존재하여 게시판 그룹을 삭제할 수 없습니다.\\n\\n이 그룹에 속한 게시판을 먼저 삭제하여 주십시오.", './board_list.php?sfl=gr_id&stx='.$gr_id);
|
||||||
}
|
|
||||||
|
|
||||||
// 그룹 삭제
|
// 그룹 삭제
|
||||||
sql_query(" delete from {$g5['group_table']} where gr_id = '$gr_id' ");
|
sql_query(" delete from {$g5['group_table']} where gr_id = '$gr_id' ");
|
||||||
@@ -53,6 +44,5 @@ for ($i = 0; $i < $chk_count; $i++) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
run_event('admin_boardgroup_list_update', $act_button, $post_chk, $post_group_id, $qstr);
|
goto_url('./boardgroup_list.php?'.$qstr);
|
||||||
|
?>
|
||||||
goto_url('./boardgroup_list.php?' . $qstr);
|
|
||||||
|
|||||||
+102
-104
@@ -1,134 +1,132 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "300200";
|
$sub_menu = "300200";
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, 'w');
|
auth_check($auth[$sub_menu], 'w');
|
||||||
|
|
||||||
$mb = get_member($mb_id);
|
$mb = get_member($mb_id);
|
||||||
$token = isset($token) ? $token : '';
|
if (!$mb['mb_id'])
|
||||||
|
|
||||||
if (!(isset($mb['mb_id']) && $mb['mb_id'])) {
|
|
||||||
alert('존재하지 않는 회원입니다.');
|
alert('존재하지 않는 회원입니다.');
|
||||||
}
|
|
||||||
|
|
||||||
$g5['title'] = '접근가능그룹';
|
$g5['title'] = '접근가능그룹';
|
||||||
require_once './admin.head.php';
|
include_once('./admin.head.php');
|
||||||
|
|
||||||
$colspan = 4;
|
$colspan = 4;
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<form name="fboardgroupmember_form" id="fboardgroupmember_form" action="./boardgroupmember_update.php" onsubmit="return boardgroupmember_form_check(this)" method="post">
|
<form name="fboardgroupmember_form" id="fboardgroupmember_form" action="./boardgroupmember_update.php" onsubmit="return boardgroupmember_form_check(this)" method="post">
|
||||||
<input type="hidden" name="mb_id" value="<?php echo $mb['mb_id'] ?>" id="mb_id">
|
<input type="hidden" name="mb_id" value="<?php echo $mb['mb_id'] ?>" id="mb_id">
|
||||||
<input type="hidden" name="token" value="" id="token">
|
<input type="hidden" name="token" value="" id="token">
|
||||||
|
<div class="local_ov01 local_ov">
|
||||||
|
<span class="btn_ov01"><span class="ov_txt"> 아이디</span><span class="ov_num"><?php echo $mb['mb_id'] ?></span></span>
|
||||||
|
<span class="btn_ov01"><span class="ov_txt"> 이름</span><span class="ov_num"><?php echo get_text($mb['mb_name']); ?></span></span>
|
||||||
|
<span class="btn_ov01"><span class="ov_txt"> 닉네임</span><span class="ov_num"><?php echo $mb['mb_nick'] ?></span></span>
|
||||||
|
</div>
|
||||||
|
<div class="local_cmd01 local_cmd">
|
||||||
|
|
||||||
<div class="local_ov01 local_ov">
|
<label for="gr_id">그룹지정</label>
|
||||||
<span class="btn_ov01"><span class="ov_txt"> 아이디</span><span class="ov_num"><?php echo $mb['mb_id'] ?></span></span>
|
<select name="gr_id" id="gr_id">
|
||||||
<span class="btn_ov01"><span class="ov_txt"> 이름</span><span class="ov_num"><?php echo get_text($mb['mb_name']); ?></span></span>
|
<option value="">접근가능 그룹을 선택하세요.</option>
|
||||||
<span class="btn_ov01"><span class="ov_txt"> 닉네임</span><span class="ov_num"><?php echo $mb['mb_nick'] ?></span></span>
|
<?php
|
||||||
</div>
|
$sql = " select *
|
||||||
|
from {$g5['group_table']}
|
||||||
<div class="local_cmd01 local_cmd">
|
where gr_use_access = 1 ";
|
||||||
<label for="gr_id">그룹지정</label>
|
//if ($is_admin == 'group') {
|
||||||
<select name="gr_id" id="gr_id">
|
if ($is_admin != 'super')
|
||||||
<option value="">접근가능 그룹을 선택하세요.</option>
|
$sql .= " and gr_admin = '{$member['mb_id']}' ";
|
||||||
<?php
|
$sql .= " order by gr_id ";
|
||||||
$sql = " select *
|
$result = sql_query($sql);
|
||||||
from {$g5['group_table']}
|
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||||
where gr_use_access = 1 ";
|
echo "<option value=\"".$row['gr_id']."\">".$row['gr_subject']."</option>";
|
||||||
if ($is_admin != 'super') {
|
}
|
||||||
$sql .= " and gr_admin = '{$member['mb_id']}' ";
|
?>
|
||||||
}
|
</select>
|
||||||
$sql .= " order by gr_id ";
|
<input type="submit" value="선택" class="btn_submit btn" accesskey="s">
|
||||||
$result = sql_query($sql);
|
</div>
|
||||||
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
|
||||||
echo "<option value=\"" . $row['gr_id'] . "\">" . $row['gr_subject'] . "</option>";
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
<input type="submit" value="선택" class="btn_submit btn" accesskey="s">
|
|
||||||
</div>
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<form name="fboardgroupmember" id="fboardgroupmember" action="./boardgroupmember_update.php" onsubmit="return fboardgroupmember_submit(this);" method="post">
|
<form name="fboardgroupmember" id="fboardgroupmember" action="./boardgroupmember_update.php" onsubmit="return fboardgroupmember_submit(this);" method="post">
|
||||||
<input type="hidden" name="sst" value="<?php echo $sst ?>" id="sst">
|
<input type="hidden" name="sst" value="<?php echo $sst ?>" id="sst">
|
||||||
<input type="hidden" name="sod" value="<?php echo $sod ?>" id="sod">
|
<input type="hidden" name="sod" value="<?php echo $sod ?>" id="sod">
|
||||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>" id="sfl">
|
<input type="hidden" name="sfl" value="<?php echo $sfl ?>" id="sfl">
|
||||||
<input type="hidden" name="stx" value="<?php echo $stx ?>" id="stx">
|
<input type="hidden" name="stx" value="<?php echo $stx ?>" id="stx">
|
||||||
<input type="hidden" name="page" value="<?php echo $page ?>" id="page">
|
<input type="hidden" name="page" value="<?php echo $page ?>" id="page">
|
||||||
<input type="hidden" name="token" value="<?php echo get_sanitize_input($token); ?>" id="token">
|
<input type="hidden" name="token" value="<?php echo $token ?>" id="token">
|
||||||
<input type="hidden" name="mb_id" value="<?php echo $mb['mb_id'] ?>" id="mb_id">
|
<input type="hidden" name="mb_id" value="<?php echo $mb['mb_id'] ?>" id="mb_id">
|
||||||
<input type="hidden" name="w" value="d" id="w">
|
<input type="hidden" name="w" value="d" id="w">
|
||||||
|
|
||||||
<div class="tbl_head01 tbl_wrap">
|
<div class="tbl_head01 tbl_wrap">
|
||||||
<table>
|
<table>
|
||||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col">
|
<th scope="col">
|
||||||
<label for="chkall" class="sound_only">접근가능그룹 전체</label>
|
<label for="chkall" class="sound_only">접근가능그룹 전체</label>
|
||||||
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
|
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
|
||||||
</th>
|
</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>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
$sql = " select * from {$g5['group_member_table']} a, {$g5['group_table']} b
|
$sql = " select * from {$g5['group_member_table']} a, {$g5['group_table']} b
|
||||||
where a.mb_id = '{$mb['mb_id']}'
|
where a.mb_id = '{$mb['mb_id']}'
|
||||||
and a.gr_id = b.gr_id ";
|
and a.gr_id = b.gr_id ";
|
||||||
if ($is_admin != 'super') {
|
if ($is_admin != 'super')
|
||||||
$sql .= " and b.gr_admin = '{$member['mb_id']}' ";
|
$sql .= " and b.gr_admin = '{$member['mb_id']}' ";
|
||||||
}
|
$sql .= " order by a.gr_id desc ";
|
||||||
$sql .= " order by a.gr_id desc ";
|
$result = sql_query($sql);
|
||||||
$result = sql_query($sql);
|
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||||
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
?>
|
||||||
?>
|
<tr>
|
||||||
<tr>
|
<td class="td_chk">
|
||||||
<td class="td_chk">
|
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo $row['gr_subject'] ?> 그룹</label>
|
||||||
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo $row['gr_subject'] ?> 그룹</label>
|
<input type="checkbox" name="chk[]" value="<?php echo $row['gm_id'] ?>" id="chk_<?php echo $i ?>">
|
||||||
<input type="checkbox" name="chk[]" value="<?php echo $row['gm_id'] ?>" id="chk_<?php echo $i ?>">
|
</td>
|
||||||
</td>
|
<td class="td_grid"><a href="<?php echo G5_BBS_URL; ?>/group.php?gr_id=<?php echo $row['gr_id'] ?>"><?php echo $row['gr_id'] ?></a></td>
|
||||||
<td class="td_grid"><a href="<?php echo G5_BBS_URL; ?>/group.php?gr_id=<?php echo $row['gr_id'] ?>"><?php echo $row['gr_id'] ?></a></td>
|
<td class="td_category"><?php echo $row['gr_subject'] ?></td>
|
||||||
<td class="td_category"><?php echo $row['gr_subject'] ?></td>
|
<td class="td_datetime"><?php echo $row['gm_datetime'] ?></td>
|
||||||
<td class="td_datetime"><?php echo $row['gm_datetime'] ?></td>
|
</tr>
|
||||||
</tr>
|
<?php
|
||||||
<?php
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if ($i == 0) {
|
if ($i == 0) {
|
||||||
echo '<tr><td colspan="' . $colspan . '" class="empty_table">접근가능한 그룹이 없습니다.</td></tr>';
|
echo '<tr><td colspan="'.$colspan.'" class="empty_table">접근가능한 그룹이 없습니다.</td></tr>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="btn_list01 btn_list">
|
<div class="btn_list01 btn_list">
|
||||||
<input type="submit" name="" value="선택삭제" class="btn btn_02">
|
<input type="submit" name="" value="선택삭제" class="btn btn_02">
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function fboardgroupmember_submit(f) {
|
function fboardgroupmember_submit(f)
|
||||||
if (!is_checked("chk[]")) {
|
{
|
||||||
alert("선택삭제 하실 항목을 하나 이상 선택하세요.");
|
if (!is_checked("chk[]")) {
|
||||||
return false;
|
alert("선택삭제 하실 항목을 하나 이상 선택하세요.");
|
||||||
}
|
return false;
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function boardgroupmember_form_check(f) {
|
return true;
|
||||||
if (f.gr_id.value == '') {
|
}
|
||||||
alert('접근가능 그룹을 선택하세요.');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
function boardgroupmember_form_check(f)
|
||||||
|
{
|
||||||
|
if (f.gr_id.value == '') {
|
||||||
|
alert('접근가능 그룹을 선택하세요.');
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
require_once './admin.tail.php';
|
include_once('./admin.tail.php');
|
||||||
|
?>
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "300200";
|
$sub_menu = "300200";
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, 'r');
|
auth_check($auth[$sub_menu], 'r');
|
||||||
|
|
||||||
$gr = get_group($gr_id);
|
$gr = get_group($gr_id);
|
||||||
if (!$gr['gr_id']) {
|
if (!$gr['gr_id']) {
|
||||||
@@ -11,18 +11,13 @@ if (!$gr['gr_id']) {
|
|||||||
|
|
||||||
$sql_common = " from {$g5['group_member_table']} a
|
$sql_common = " from {$g5['group_member_table']} a
|
||||||
left outer join {$g5['member_table']} b on (a.mb_id = b.mb_id) ";
|
left outer join {$g5['member_table']} b on (a.mb_id = b.mb_id) ";
|
||||||
|
|
||||||
$sql_search = " where gr_id = '{$gr_id}' ";
|
$sql_search = " where gr_id = '{$gr_id}' ";
|
||||||
|
|
||||||
$allowed_sfl = array('a.mb_id');
|
|
||||||
if (!in_array($sfl, $allowed_sfl)) {
|
|
||||||
$sfl = 'a.mb_id';
|
|
||||||
}
|
|
||||||
|
|
||||||
// 회원아이디로 검색되지 않던 오류를 수정
|
// 회원아이디로 검색되지 않던 오류를 수정
|
||||||
if (isset($stx) && $stx) {
|
if (isset($stx) && $stx) {
|
||||||
$sql_search .= " and ( ";
|
$sql_search .= " and ( ";
|
||||||
switch ($sfl) {
|
switch ($sfl) {
|
||||||
default:
|
default :
|
||||||
$sql_search .= " ($sfl like '%$stx%') ";
|
$sql_search .= " ($sfl like '%$stx%') ";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -30,12 +25,9 @@ if (isset($stx) && $stx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!$sst) {
|
if (!$sst) {
|
||||||
$sst = "gm_datetime";
|
$sst = "gm_datetime";
|
||||||
$sod = "desc";
|
$sod = "desc";
|
||||||
}
|
}
|
||||||
$allowed_sst = array('gm_datetime', 'b.mb_id', 'b.mb_name', 'b.mb_nick', 'b.mb_today_login', 'a.gm_datetime');
|
|
||||||
if ($sst && !in_array($sst, $allowed_sst)) $sst = 'gm_datetime';
|
|
||||||
if ($sod && !in_array(strtolower($sod), array('asc', 'desc'))) $sod = '';
|
|
||||||
$sql_order = " order by {$sst} {$sod} ";
|
$sql_order = " order by {$sst} {$sod} ";
|
||||||
|
|
||||||
$sql = " select count(*) as cnt
|
$sql = " select count(*) as cnt
|
||||||
@@ -47,9 +39,7 @@ $total_count = $row['cnt'];
|
|||||||
|
|
||||||
$rows = $config['cf_page_rows'];
|
$rows = $config['cf_page_rows'];
|
||||||
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
||||||
if ($page < 1) {
|
if ($page < 1) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||||
$page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
|
|
||||||
}
|
|
||||||
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
||||||
|
|
||||||
$sql = " select *
|
$sql = " select *
|
||||||
@@ -59,107 +49,108 @@ $sql = " select *
|
|||||||
limit {$from_record}, {$rows} ";
|
limit {$from_record}, {$rows} ";
|
||||||
$result = sql_query($sql);
|
$result = sql_query($sql);
|
||||||
|
|
||||||
$g5['title'] = $gr['gr_subject'] . ' 그룹 접근가능회원 (그룹아이디:' . $gr['gr_id'] . ')';
|
$g5['title'] = $gr['gr_subject'].' 그룹 접근가능회원 (그룹아이디:'.$gr['gr_id'].')';
|
||||||
require_once './admin.head.php';
|
include_once('./admin.head.php');
|
||||||
|
|
||||||
$colspan = 7;
|
$colspan = 7;
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<form name="fsearch" id="fsearch" class="local_sch01 local_sch" method="get">
|
<form name="fsearch" id="fsearch" class="local_sch01 local_sch" method="get">
|
||||||
<input type="hidden" name="gr_id" value="<?php echo $gr_id ?>">
|
<input type="hidden" name="gr_id" value="<?php echo $gr_id ?>">
|
||||||
<label for="sfl" class="sound_only">검색대상</label>
|
<label for="sfl" class="sound_only">검색대상</label>
|
||||||
<select name="sfl" id="sfl">
|
<select name="sfl" id="sfl">
|
||||||
<option value="a.mb_id" <?php echo get_selected($sfl, "a.mb_id") ?>>회원아이디</option>
|
<option value="a.mb_id"<?php echo get_selected($_GET['sfl'], "a.mb_id") ?>>회원아이디</option>
|
||||||
</select>
|
</select>
|
||||||
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
<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="text" name="stx" value="<?php echo $stx ?>" id="stx" required class="required frm_input">
|
||||||
<input type="submit" value="검색" class="btn_submit">
|
<input type="submit" value="검색" class="btn_submit">
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<form name="fboardgroupmember" id="fboardgroupmember" action="./boardgroupmember_update.php" onsubmit="return fboardgroupmember_submit(this);" method="post">
|
<form name="fboardgroupmember" id="fboardgroupmember" action="./boardgroupmember_update.php" onsubmit="return fboardgroupmember_submit(this);" method="post">
|
||||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||||
<input type="hidden" name="token" value="<?php echo $token ?>">
|
<input type="hidden" name="token" value="<?php echo $token ?>">
|
||||||
<input type="hidden" name="gr_id" value="<?php echo $gr_id ?>">
|
<input type="hidden" name="gr_id" value="<?php echo $gr_id ?>">
|
||||||
<input type="hidden" name="w" value="ld">
|
<input type="hidden" name="w" value="ld">
|
||||||
|
|
||||||
<div class="tbl_head01 tbl_wrap">
|
<div class="tbl_head01 tbl_wrap">
|
||||||
<table>
|
<table>
|
||||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col">
|
<th scope="col">
|
||||||
<label for="chkall" class="sound_only">접근가능회원 전체</label>
|
<label for="chkall" class="sound_only">접근가능회원 전체</label>
|
||||||
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
|
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
|
||||||
</th>
|
</th>
|
||||||
<th scope="col">그룹</th>
|
<th scope="col">그룹</th>
|
||||||
<th scope="col"><?php echo subject_sort_link('b.mb_id', 'gr_id=' . $gr_id) ?>회원아이디</a></th>
|
<th scope="col"><?php echo subject_sort_link('b.mb_id', 'gr_id='.$gr_id) ?>회원아이디</a></th>
|
||||||
<th scope="col"><?php echo subject_sort_link('b.mb_name', 'gr_id=' . $gr_id) ?>이름</a></th>
|
<th scope="col"><?php echo subject_sort_link('b.mb_name', 'gr_id='.$gr_id) ?>이름</a></th>
|
||||||
<th scope="col"><?php echo subject_sort_link('b.mb_nick', 'gr_id=' . $gr_id) ?>별명</a></th>
|
<th scope="col"><?php echo subject_sort_link('b.mb_nick', 'gr_id='.$gr_id) ?>별명</a></th>
|
||||||
<th scope="col"><?php echo subject_sort_link('b.mb_today_login', 'gr_id=' . $gr_id) ?>최종접속</a></th>
|
<th scope="col"><?php echo subject_sort_link('b.mb_today_login', 'gr_id='.$gr_id) ?>최종접속</a></th>
|
||||||
<th scope="col"><?php echo subject_sort_link('a.gm_datetime', 'gr_id=' . $gr_id) ?>처리일시</a></th>
|
<th scope="col"><?php echo subject_sort_link('a.gm_datetime', 'gr_id='.$gr_id) ?>처리일시</a></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||||
// 접근가능한 그룹수
|
{
|
||||||
$sql2 = " select count(*) as cnt from {$g5['group_member_table']} where mb_id = '{$row['mb_id']}' ";
|
// 접근가능한 그룹수
|
||||||
$row2 = sql_fetch($sql2);
|
$sql2 = " select count(*) as cnt from {$g5['group_member_table']} where mb_id = '{$row['mb_id']}' ";
|
||||||
$group = "";
|
$row2 = sql_fetch($sql2);
|
||||||
if ($row2['cnt']) {
|
$group = "";
|
||||||
$group = '<a href="./boardgroupmember_form.php?mb_id=' . $row['mb_id'] . '">' . $row2['cnt'] . '</a>';
|
if ($row2['cnt'])
|
||||||
}
|
$group = '<a href="./boardgroupmember_form.php?mb_id='.$row['mb_id'].'">'.$row2['cnt'].'</a>';
|
||||||
|
|
||||||
$mb_nick = get_sideview($row['mb_id'], $row['mb_nick'], $row['mb_email'], $row['mb_homepage']);
|
$mb_nick = get_sideview($row['mb_id'], $row['mb_nick'], $row['mb_email'], $row['mb_homepage']);
|
||||||
|
|
||||||
$bg = 'bg' . ($i % 2);
|
$bg = 'bg'.($i%2);
|
||||||
?>
|
?>
|
||||||
<tr class="<?php echo $bg; ?>">
|
<tr class="<?php echo $bg; ?>">
|
||||||
<td class="td_chk">
|
<td class="td_chk">
|
||||||
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo $row['mb_nick'] ?> 회원</label>
|
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo $row['mb_nick'] ?> 회원</label>
|
||||||
<input type="checkbox" name="chk[]" value="<?php echo $row['gm_id'] ?>" id="chk_<?php echo $i ?>">
|
<input type="checkbox" name="chk[]" value="<?php echo $row['gm_id'] ?>" id="chk_<?php echo $i ?>">
|
||||||
</td>
|
</td>
|
||||||
<td class="td_grid"><?php echo $group ?></td>
|
<td class="td_grid"><?php echo $group ?></td>
|
||||||
<td class="td_mbid"><?php echo $row['mb_id'] ?></td>
|
<td class="td_mbid"><?php echo $row['mb_id'] ?></td>
|
||||||
<td class="td_mbname"><?php echo get_text($row['mb_name']); ?></td>
|
<td class="td_mbname"><?php echo get_text($row['mb_name']); ?></td>
|
||||||
<td class="td_name sv_use"><?php echo $mb_nick ?></td>
|
<td class="td_name sv_use"><?php echo $mb_nick ?></td>
|
||||||
<td class="td_datetime"><?php echo substr($row['mb_today_login'], 2, 8) ?></td>
|
<td class="td_datetime"><?php echo substr($row['mb_today_login'],2,8) ?></td>
|
||||||
<td class="td_datetime"><?php echo $row['gm_datetime'] ?></td>
|
<td class="td_datetime"><?php echo $row['gm_datetime'] ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($i == 0) {
|
if ($i == 0)
|
||||||
echo '<tr><td colspan="' . $colspan . '" class="empty_table">자료가 없습니다.</td></tr>';
|
{
|
||||||
}
|
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||||
?>
|
}
|
||||||
</tbody>
|
?>
|
||||||
</table>
|
</tbody>
|
||||||
</div>
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="btn_list01 btn_list">
|
<div class="btn_list01 btn_list">
|
||||||
<input type="submit" name="" value="선택삭제">
|
<input type="submit" name="" value="선택삭제">
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<?php
|
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['SCRIPT_NAME']}?$qstr&gr_id=$gr_id&page="); ?>
|
||||||
echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['SCRIPT_NAME']}?$qstr&gr_id=$gr_id&page=");
|
|
||||||
?>
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function fboardgroupmember_submit(f) {
|
function fboardgroupmember_submit(f)
|
||||||
if (!is_checked("chk[]")) {
|
{
|
||||||
alert("선택삭제 하실 항목을 하나 이상 선택하세요.");
|
if (!is_checked("chk[]")) {
|
||||||
return false;
|
alert("선택삭제 하실 항목을 하나 이상 선택하세요.");
|
||||||
}
|
return false;
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
require_once './admin.tail.php';
|
include_once('./admin.tail.php');
|
||||||
|
?>
|
||||||
|
|||||||
@@ -1,18 +1,20 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "300200";
|
$sub_menu = "300200";
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
sql_query(" ALTER TABLE {$g5['group_member_table']} CHANGE `gm_id` `gm_id` INT( 11 ) DEFAULT '0' NOT NULL AUTO_INCREMENT ", false);
|
||||||
|
|
||||||
if ($w == '') {
|
if ($w == '')
|
||||||
auth_check_menu($auth, $sub_menu, 'w');
|
{
|
||||||
|
auth_check($auth[$sub_menu], 'w');
|
||||||
|
|
||||||
$mb = get_member($mb_id);
|
$mb = get_member($mb_id);
|
||||||
if (empty($mb['mb_id'])) {
|
if (!$mb['mb_id']) {
|
||||||
alert('존재하지 않는 회원입니다.');
|
alert('존재하지 않는 회원입니다.');
|
||||||
}
|
}
|
||||||
|
|
||||||
$gr = get_group($gr_id);
|
$gr = get_group($gr_id);
|
||||||
if (empty($gr['gr_id'])) {
|
if (!$gr['gr_id']) {
|
||||||
alert('존재하지 않는 그룹입니다.');
|
alert('존재하지 않는 그룹입니다.');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -23,35 +25,37 @@ if ($w == '') {
|
|||||||
$row = sql_fetch($sql);
|
$row = sql_fetch($sql);
|
||||||
if ($row['cnt']) {
|
if ($row['cnt']) {
|
||||||
alert('이미 등록되어 있는 자료입니다.');
|
alert('이미 등록되어 있는 자료입니다.');
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
check_admin_token();
|
check_admin_token();
|
||||||
|
|
||||||
$sql = " insert into {$g5['group_member_table']}
|
$sql = " insert into {$g5['group_member_table']}
|
||||||
set gr_id = '{$_POST['gr_id']}',
|
set gr_id = '{$_POST['gr_id']}',
|
||||||
mb_id = '{$_POST['mb_id']}',
|
mb_id = '{$_POST['mb_id']}',
|
||||||
gm_datetime = '" . G5_TIME_YMDHIS . "' ";
|
gm_datetime = '".G5_TIME_YMDHIS."' ";
|
||||||
sql_query($sql);
|
sql_query($sql);
|
||||||
}
|
}
|
||||||
} elseif ($w == 'd' || $w == 'ld') {
|
}
|
||||||
auth_check_menu($auth, $sub_menu, 'd');
|
else if ($w == 'd' || $w == 'ld')
|
||||||
|
{
|
||||||
|
auth_check($auth[$sub_menu], 'd');
|
||||||
|
|
||||||
$count = count($_POST['chk']);
|
$count = count($_POST['chk']);
|
||||||
if (!$count) {
|
if(!$count)
|
||||||
alert('삭제할 목록을 하나이상 선택해 주세요.');
|
alert('삭제할 목록을 하나이상 선택해 주세요.');
|
||||||
}
|
|
||||||
|
|
||||||
check_admin_token();
|
check_admin_token();
|
||||||
|
|
||||||
for ($i = 0; $i < $count; $i++) {
|
for($i=0; $i<$count; $i++) {
|
||||||
$gm_id = (int) $_POST['chk'][$i];
|
$gm_id = $_POST['chk'][$i];
|
||||||
$sql = " select * from {$g5['group_member_table']} where gm_id = '$gm_id' ";
|
$sql = " select * from {$g5['group_member_table']} where gm_id = '$gm_id' ";
|
||||||
$gm = sql_fetch($sql);
|
$gm = sql_fetch($sql);
|
||||||
if (!$gm['gm_id']) {
|
if (!$gm['gm_id']) {
|
||||||
if ($count == 1) {
|
if($count == 1)
|
||||||
alert('존재하지 않는 자료입니다.');
|
alert('존재하지 않는 자료입니다.');
|
||||||
} else {
|
else
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = " delete from {$g5['group_member_table']} where gm_id = '$gm_id' ";
|
$sql = " delete from {$g5['group_member_table']} where gm_id = '$gm_id' ";
|
||||||
@@ -59,8 +63,8 @@ if ($w == '') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($w == 'ld') {
|
if ($w == 'ld')
|
||||||
goto_url('./boardgroupmember_list.php?gr_id=' . $gr_id);
|
goto_url('./boardgroupmember_list.php?gr_id='.$gr_id);
|
||||||
} else {
|
else
|
||||||
goto_url('./boardgroupmember_form.php?mb_id=' . $mb_id);
|
goto_url('./boardgroupmember_form.php?mb_id='.$mb_id);
|
||||||
}
|
?>
|
||||||
|
|||||||
+23
-24
@@ -1,17 +1,15 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "100510";
|
$sub_menu = "100510";
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
|
|
||||||
if (!(version_compare(phpversion(), '5.3.0', '>=') && defined('G5_BROWSCAP_USE') && G5_BROWSCAP_USE)) {
|
if(!(version_compare(phpversion(), '5.3.0', '>=') && defined('G5_BROWSCAP_USE') && G5_BROWSCAP_USE))
|
||||||
alert('사용할 수 없는 기능입니다.', correct_goto_url(G5_ADMIN_URL));
|
alert('사용할 수 없는 기능입니다.', G5_ADMIN_URL);
|
||||||
}
|
|
||||||
|
|
||||||
if ($is_admin != 'super') {
|
if ($is_admin != 'super')
|
||||||
alert('최고관리자만 접근 가능합니다.');
|
alert('최고관리자만 접근 가능합니다.');
|
||||||
}
|
|
||||||
|
|
||||||
$g5['title'] = 'Browscap 업데이트';
|
$g5['title'] = 'Browscap 업데이트';
|
||||||
require_once './admin.head.php';
|
include_once('./admin.head.php');
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div id="processing">
|
<div id="processing">
|
||||||
@@ -20,27 +18,28 @@ require_once './admin.head.php';
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(function() {
|
$(function() {
|
||||||
$("#run_update").on("click", function() {
|
$("#run_update").on("click", function() {
|
||||||
$("#processing").html('<div class="update_processing"></div><p>Browscap 정보를 업데이트 중입니다.</p>');
|
$("#processing").html('<div class="update_processing"></div><p>Browscap 정보를 업데이트 중입니다.</p>');
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "./browscap_update.php",
|
url: "./browscap_update.php",
|
||||||
async: true,
|
async: true,
|
||||||
cache: false,
|
cache: false,
|
||||||
dataType: "html",
|
dataType: "html",
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
if (data != "") {
|
if(data != "") {
|
||||||
alert(data);
|
alert(data);
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
|
|
||||||
$("#processing").html("<div class='check_processing'></div><p>Browscap 정보를 업데이트 했습니다.</p>");
|
|
||||||
}
|
}
|
||||||
});
|
|
||||||
|
$("#processing").html("<div class='check_processing'></div><p>Browscap 정보를 업데이트 했습니다.</p>");
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
require_once './admin.tail.php';
|
include_once('./admin.tail.php');
|
||||||
|
?>
|
||||||
+23
-27
@@ -1,22 +1,19 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "100520";
|
$sub_menu = "100520";
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
|
|
||||||
if (!(version_compare(phpversion(), '5.3.0', '>=') && defined('G5_BROWSCAP_USE') && G5_BROWSCAP_USE)) {
|
if(!(version_compare(phpversion(), '5.3.0', '>=') && defined('G5_BROWSCAP_USE') && G5_BROWSCAP_USE))
|
||||||
alert('사용할 수 없는 기능입니다.', correct_goto_url(G5_ADMIN_URL));
|
alert('사용할 수 없는 기능입니다.', G5_ADMIN_URL);
|
||||||
}
|
|
||||||
|
|
||||||
if ($is_admin != 'super') {
|
if ($is_admin != 'super')
|
||||||
alert('최고관리자만 접근 가능합니다.');
|
alert('최고관리자만 접근 가능합니다.');
|
||||||
}
|
|
||||||
|
|
||||||
$rows = isset($_GET['rows']) ? preg_replace('#[^0-9]#', '', $_GET['rows']) : 0;
|
$rows = preg_replace('#[^0-9]#', '', $_GET['rows']);
|
||||||
if (!$rows) {
|
if(!$rows)
|
||||||
$rows = 100;
|
$rows = 100;
|
||||||
}
|
|
||||||
|
|
||||||
$g5['title'] = '접속로그 변환';
|
$g5['title'] = '접속로그 변환';
|
||||||
require_once './admin.head.php';
|
include_once('./admin.head.php');
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div id="processing">
|
<div id="processing">
|
||||||
@@ -25,26 +22,25 @@ require_once './admin.head.php';
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(function() {
|
$(function() {
|
||||||
$(document).on("click", "#run_update", function() {
|
$(document).on("click", "#run_update", function() {
|
||||||
$("#processing").html('<div class="update_processing"></div><p>Browscap 정보로 변환 중입니다.</p>');
|
$("#processing").html('<div class="update_processing"></div><p>Browscap 정보로 변환 중입니다.</p>');
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
method: "GET",
|
method: "GET",
|
||||||
url: "./browscap_converter.php",
|
url: "./browscap_converter.php",
|
||||||
data: {
|
data: { rows: "<?php echo $rows; ?>" },
|
||||||
rows: "<?php echo strval($rows); ?>"
|
async: true,
|
||||||
},
|
cache: false,
|
||||||
async: true,
|
dataType: "html",
|
||||||
cache: false,
|
success: function(data) {
|
||||||
dataType: "html",
|
$("#processing").html(data);
|
||||||
success: function(data) {
|
}
|
||||||
$("#processing").html(data);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
require_once './admin.tail.php';
|
include_once('./admin.tail.php');
|
||||||
|
?>
|
||||||
+19
-25
@@ -1,39 +1,36 @@
|
|||||||
<?php
|
<?php
|
||||||
ini_set('memory_limit', '-1');
|
ini_set('memory_limit', '-1');
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
|
|
||||||
// clean the output buffer
|
// clean the output buffer
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
|
|
||||||
if (!(version_compare(phpversion(), '5.3.0', '>=') && defined('G5_BROWSCAP_USE') && G5_BROWSCAP_USE)) {
|
if(!(version_compare(phpversion(), '5.3.0', '>=') && defined('G5_BROWSCAP_USE') && G5_BROWSCAP_USE))
|
||||||
die('사용할 수 없는 기능입니다.');
|
die('사용할 수 없는 기능입니다.');
|
||||||
}
|
|
||||||
|
|
||||||
if ($is_admin != 'super') {
|
if($is_admin != 'super')
|
||||||
die('최고관리자로 로그인 후 실행해 주세요.');
|
die('최고관리자로 로그인 후 실행해 주세요.');
|
||||||
}
|
|
||||||
|
|
||||||
// browscap cache 파일 체크
|
// browscap cache 파일 체크
|
||||||
if (!is_file(G5_DATA_PATH . '/cache/browscap_cache.php')) {
|
if(!is_file(G5_DATA_PATH.'/cache/browscap_cache.php')) {
|
||||||
echo '<p>Browscap 정보가 없습니다. 아래 링크로 이동해 Browscap 정보를 업데이트 하세요.</p>' . PHP_EOL;
|
echo '<p>Browscap 정보가 없습니다. 아래 링크로 이동해 Browscap 정보를 업데이트 하세요.</p>'.PHP_EOL;
|
||||||
echo '<p><a href="' . G5_ADMIN_URL . '/browscap.php">Browscap 업데이트</a></p>' . PHP_EOL;
|
echo '<p><a href="'.G5_ADMIN_URL.'/browscap.php">Browscap 업데이트</a></p>'.PHP_EOL;
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once G5_PLUGIN_PATH . '/browscap/Browscap.php';
|
include_once(G5_PLUGIN_PATH.'/browscap/Browscap.php');
|
||||||
$browscap = new Browscap(G5_DATA_PATH . '/cache');
|
$browscap = new phpbrowscap\Browscap(G5_DATA_PATH.'/cache');
|
||||||
$browscap->doAutoUpdate = false;
|
$browscap->doAutoUpdate = false;
|
||||||
$browscap->cacheFilename = 'browscap_cache.php';
|
$browscap->cacheFilename = 'browscap_cache.php';
|
||||||
|
|
||||||
// 데이터 변환
|
// 데이터 변환
|
||||||
$rows = isset($_GET['rows']) ? preg_replace('#[^0-9]#', '', $_GET['rows']) : 0;
|
$rows = preg_replace('#[^0-9]#', '', $_GET['rows']);
|
||||||
if (!$rows) {
|
if(!$rows)
|
||||||
$rows = 100;
|
$rows = 100;
|
||||||
}
|
|
||||||
|
|
||||||
$sql_common = " from {$g5['visit_table']} where vi_agent <> '' and ( vi_browser = '' or vi_os = '' or vi_device = '' ) ";
|
$sql_common = " from {$g5['visit_table']} where vi_agent <> '' and ( vi_browser = '' or vi_os = '' or vi_device = '' ) ";
|
||||||
$sql_order = " order by vi_id desc ";
|
$sql_order = " order by vi_id desc ";
|
||||||
$sql_limit = " limit 0, " . strval($rows) . " ";
|
$sql_limit = " limit 0, $rows ";
|
||||||
|
|
||||||
$sql = " select count(vi_id) as cnt $sql_common ";
|
$sql = " select count(vi_id) as cnt $sql_common ";
|
||||||
$row = sql_fetch($sql);
|
$row = sql_fetch($sql);
|
||||||
@@ -46,23 +43,20 @@ $sql = " select vi_id, vi_agent, vi_browser, vi_os, vi_device
|
|||||||
$result = sql_query($sql);
|
$result = sql_query($sql);
|
||||||
|
|
||||||
$cnt = 0;
|
$cnt = 0;
|
||||||
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
for($i=0; $row=sql_fetch_array($result); $i++) {
|
||||||
$info = $browscap->getBrowser($row['vi_agent']);
|
$info = $browscap->getBrowser($row['vi_agent']);
|
||||||
|
|
||||||
$brow = $row['vi_browser'];
|
$brow = $row['vi_browser'];
|
||||||
if (!$brow) {
|
if(!$brow)
|
||||||
$brow = $info->Comment;
|
$brow = $info->Comment;
|
||||||
}
|
|
||||||
|
|
||||||
$os = $row['vi_os'];
|
$os = $row['vi_os'];
|
||||||
if (!$os) {
|
if(!$os)
|
||||||
$os = $info->Platform;
|
$os = $info->Platform;
|
||||||
}
|
|
||||||
|
|
||||||
$device = $row['vi_device'];
|
$device = $row['vi_device'];
|
||||||
if (!$device) {
|
if(!$device)
|
||||||
$device = $info->Device_Type;
|
$device = $info->Device_Type;
|
||||||
}
|
|
||||||
|
|
||||||
$sql2 = " update {$g5['visit_table']}
|
$sql2 = " update {$g5['visit_table']}
|
||||||
set vi_browser = '$brow',
|
set vi_browser = '$brow',
|
||||||
@@ -74,8 +68,8 @@ for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
|||||||
$cnt++;
|
$cnt++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (($total_count - $cnt) == 0 || $total_count == 0) {
|
if(($total_count - $cnt) == 0 || $total_count == 0)
|
||||||
echo '<div class="check_processing"></div><p>변환완료</p>';
|
echo '<div class="check_processing"></div><p>변환완료</p>';
|
||||||
} else {
|
else
|
||||||
echo '<p>총 ' . number_format($total_count) . '건 중 ' . number_format($cnt) . '건 변환완료<br><br>접속로그를 추가로 변환하시려면 아래 업데이트 버튼을 클릭해 주세요.</p><button type="button" id="run_update">업데이트</button>';
|
echo '<p>총 '.number_format($total_count).'건 중 '.number_format($cnt).'건 변환완료<br><br>접속로그를 추가로 변환하시려면 아래 업데이트 버튼을 클릭해 주세요.</p><button type="button" id="run_update">업데이트</button>';
|
||||||
}
|
?>
|
||||||
@@ -2,24 +2,23 @@
|
|||||||
ini_set('memory_limit', '-1');
|
ini_set('memory_limit', '-1');
|
||||||
|
|
||||||
$sub_menu = "100510";
|
$sub_menu = "100510";
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
|
|
||||||
// clean the output buffer
|
// clean the output buffer
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
|
|
||||||
if (!(version_compare(phpversion(), '5.3.0', '>=') && defined('G5_BROWSCAP_USE') && G5_BROWSCAP_USE)) {
|
if(!(version_compare(phpversion(), '5.3.0', '>=') && defined('G5_BROWSCAP_USE') && G5_BROWSCAP_USE))
|
||||||
die('사용할 수 없는 기능입니다.');
|
die('사용할 수 없는 기능입니다.');
|
||||||
}
|
|
||||||
|
|
||||||
if ($is_admin != 'super') {
|
if ($is_admin != 'super')
|
||||||
die('최고관리자만 접근 가능합니다.');
|
die('최고관리자만 접근 가능합니다.');
|
||||||
}
|
|
||||||
|
|
||||||
require_once G5_PLUGIN_PATH . '/browscap/Browscap.php';
|
include_once(G5_PLUGIN_PATH.'/browscap/Browscap.php');
|
||||||
|
|
||||||
$browscap = new Browscap(G5_DATA_PATH . '/cache');
|
$browscap = new phpbrowscap\Browscap(G5_DATA_PATH.'/cache');
|
||||||
$browscap->updateMethod = 'cURL';
|
$browscap->updateMethod = 'cURL';
|
||||||
$browscap->cacheFilename = 'browscap_cache.php';
|
$browscap->cacheFilename = 'browscap_cache.php';
|
||||||
$browscap->updateCache();
|
$browscap->updateCache();
|
||||||
|
|
||||||
die('');
|
die('');
|
||||||
|
?>
|
||||||
+48
-61
@@ -1,61 +1,48 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = '100900';
|
$sub_menu = '100900';
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
|
|
||||||
if ($is_admin != 'super') {
|
if ($is_admin != 'super')
|
||||||
alert('최고관리자만 접근 가능합니다.', G5_URL);
|
alert('최고관리자만 접근 가능합니다.', G5_URL);
|
||||||
}
|
|
||||||
|
$g5['title'] = '캐시파일 일괄삭제';
|
||||||
@require_once './safe_check.php';
|
include_once('./admin.head.php');
|
||||||
if (function_exists('social_log_file_delete')) {
|
?>
|
||||||
social_log_file_delete();
|
|
||||||
}
|
<div class="local_desc02 local_desc">
|
||||||
|
<p>
|
||||||
run_event('adm_cache_file_delete_before');
|
완료 메세지가 나오기 전에 프로그램의 실행을 중지하지 마십시오.
|
||||||
|
</p>
|
||||||
$g5['title'] = '캐시파일 일괄삭제';
|
</div>
|
||||||
require_once './admin.head.php';
|
|
||||||
?>
|
<?php
|
||||||
|
flush();
|
||||||
<div class="local_desc02 local_desc">
|
|
||||||
<p>
|
if (!$dir=@opendir(G5_DATA_PATH.'/cache')) {
|
||||||
완료 메세지가 나오기 전에 프로그램의 실행을 중지하지 마십시오.
|
echo '<p>캐시디렉토리를 열지못했습니다.</p>';
|
||||||
</p>
|
}
|
||||||
</div>
|
|
||||||
|
$cnt=0;
|
||||||
<?php
|
echo '<ul class="session_del">'.PHP_EOL;
|
||||||
flush();
|
|
||||||
|
$files = glob(G5_DATA_PATH.'/cache/latest-*');
|
||||||
if (!$dir = @opendir(G5_DATA_PATH . '/cache')) {
|
if (is_array($files)) {
|
||||||
echo '<p>캐시디렉토리를 열지못했습니다.</p>';
|
foreach ($files as $cache_file) {
|
||||||
}
|
$cnt++;
|
||||||
|
unlink($cache_file);
|
||||||
$cnt = 0;
|
echo '<li>'.$cache_file.'</li>'.PHP_EOL;
|
||||||
echo '<ul class="session_del">' . PHP_EOL;
|
|
||||||
|
flush();
|
||||||
$files = glob(G5_DATA_PATH . '/cache/latest-*');
|
|
||||||
$content_files = glob(G5_DATA_PATH . '/cache/content-*');
|
if ($cnt%10==0)
|
||||||
|
echo PHP_EOL;
|
||||||
$files = array_merge($files, $content_files);
|
}
|
||||||
if (is_array($files)) {
|
}
|
||||||
foreach ($files as $cache_file) {
|
|
||||||
$cnt++;
|
echo '<li>완료됨</li></ul>'.PHP_EOL;
|
||||||
unlink($cache_file);
|
echo '<div class="local_desc01 local_desc"><p><strong>최신글 캐시파일 '.$cnt.'건 삭제 완료됐습니다.</strong><br>프로그램의 실행을 끝마치셔도 좋습니다.</p></div>'.PHP_EOL;
|
||||||
echo '<li>' . $cache_file . '</li>' . PHP_EOL;
|
?>
|
||||||
|
|
||||||
flush();
|
<?php
|
||||||
|
include_once('./admin.tail.php');
|
||||||
if ($cnt % 10 == 0) {
|
?>
|
||||||
echo PHP_EOL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
run_event('adm_cache_file_delete');
|
|
||||||
|
|
||||||
echo '<li>완료됨</li></ul>' . PHP_EOL;
|
|
||||||
echo '<div class="local_desc01 local_desc"><p><strong>최신글 캐시파일 ' . $cnt . '건 삭제 완료됐습니다.</strong><br>프로그램의 실행을 끝마치셔도 좋습니다.</p></div>' . PHP_EOL;
|
|
||||||
?>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
require_once './admin.tail.php';
|
|
||||||
+53
-56
@@ -1,56 +1,53 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = '100910';
|
$sub_menu = '100910';
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
|
|
||||||
if ($is_admin != 'super') {
|
if ($is_admin != 'super')
|
||||||
alert('최고관리자만 접근 가능합니다.', G5_URL);
|
alert('최고관리자만 접근 가능합니다.', G5_URL);
|
||||||
}
|
|
||||||
|
$g5['title'] = '캡챠파일 일괄삭제';
|
||||||
$g5['title'] = '캡챠파일 일괄삭제';
|
include_once('./admin.head.php');
|
||||||
require_once './admin.head.php';
|
?>
|
||||||
?>
|
|
||||||
|
<div class="local_desc02 local_desc">
|
||||||
<div class="local_desc02 local_desc">
|
<p>
|
||||||
<p>
|
완료 메세지가 나오기 전에 프로그램의 실행을 중지하지 마십시오.
|
||||||
완료 메세지가 나오기 전에 프로그램의 실행을 중지하지 마십시오.
|
</p>
|
||||||
</p>
|
</div>
|
||||||
</div>
|
|
||||||
|
<?php
|
||||||
<?php
|
flush();
|
||||||
flush();
|
|
||||||
|
if (!$dir=@opendir(G5_DATA_PATH.'/cache')) {
|
||||||
if (!$dir = @opendir(G5_DATA_PATH . '/cache')) {
|
echo '<p>캐시디렉토리를 열지못했습니다.</p>';
|
||||||
echo '<p>캐시디렉토리를 열지못했습니다.</p>';
|
}
|
||||||
}
|
|
||||||
|
$cnt=0;
|
||||||
$cnt = 0;
|
echo '<ul class="session_del">'.PHP_EOL;
|
||||||
echo '<ul class="session_del">' . PHP_EOL;
|
|
||||||
|
$files = glob(G5_DATA_PATH.'/cache/?captcha-*');
|
||||||
$files = glob(G5_DATA_PATH . '/cache/?captcha-*');
|
if (is_array($files)) {
|
||||||
if (is_array($files)) {
|
$before_time = G5_SERVER_TIME - 3600; // 한시간전
|
||||||
$before_time = G5_SERVER_TIME - 3600; // 한시간전
|
foreach ($files as $gcaptcha_file) {
|
||||||
foreach ($files as $gcaptcha_file) {
|
$modification_time = filemtime($gcaptcha_file); // 파일접근시간
|
||||||
$modification_time = filemtime($gcaptcha_file); // 파일접근시간
|
|
||||||
|
if ($modification_time > $before_time) continue;
|
||||||
if ($modification_time > $before_time) {
|
|
||||||
continue;
|
$cnt++;
|
||||||
}
|
unlink($gcaptcha_file);
|
||||||
|
echo '<li>'.$gcaptcha_file.'</li>'.PHP_EOL;
|
||||||
$cnt++;
|
|
||||||
unlink($gcaptcha_file);
|
flush();
|
||||||
echo '<li>' . $gcaptcha_file . '</li>' . PHP_EOL;
|
|
||||||
|
if ($cnt%10==0)
|
||||||
flush();
|
echo PHP_EOL;
|
||||||
|
}
|
||||||
if ($cnt % 10 == 0) {
|
}
|
||||||
echo PHP_EOL;
|
|
||||||
}
|
echo '<li>완료됨</li></ul>'.PHP_EOL;
|
||||||
}
|
echo '<div class="local_desc01 local_desc"><p><strong>캡챠파일 '.$cnt.'건의 삭제 완료됐습니다.</strong><br>프로그램의 실행을 끝마치셔도 좋습니다.</p></div>'.PHP_EOL;
|
||||||
}
|
?>
|
||||||
|
|
||||||
echo '<li>완료됨</li></ul>' . PHP_EOL;
|
<?php
|
||||||
echo '<div class="local_desc01 local_desc"><p><strong>캡챠파일 ' . $cnt . '건의 삭제 완료됐습니다.</strong><br>프로그램의 실행을 끝마치셔도 좋습니다.</p></div>' . PHP_EOL;
|
include_once('./admin.tail.php');
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php
|
|
||||||
require_once './admin.tail.php';
|
|
||||||
+1378
-1385
File diff suppressed because it is too large
Load Diff
+15
-227
@@ -1,227 +1,34 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "100100";
|
$sub_menu = "100100";
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
|
|
||||||
check_demo();
|
check_demo();
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, 'w');
|
auth_check($auth[$sub_menu], 'w');
|
||||||
|
|
||||||
if ($is_admin != 'super') {
|
if ($is_admin != 'super')
|
||||||
alert('최고관리자만 접근 가능합니다.');
|
alert('최고관리자만 접근 가능합니다.');
|
||||||
}
|
|
||||||
|
|
||||||
$sql = " select * from {$g5['config_table']} limit 1";
|
|
||||||
$ori_config = sql_fetch($sql);
|
|
||||||
|
|
||||||
$cf_title = isset($_POST['cf_title']) ? addslashes(strip_tags(clean_xss_attributes(stripslashes($_POST['cf_title'])))) : '';
|
|
||||||
$cf_admin = isset($_POST['cf_admin']) ? safe_replace_regex($_POST['cf_admin']) : '';
|
|
||||||
|
|
||||||
$mb = get_member($cf_admin);
|
$mb = get_member($cf_admin);
|
||||||
|
if (!$mb['mb_id'])
|
||||||
if (!(isset($mb['mb_id']) && $mb['mb_id'])) {
|
|
||||||
alert('최고관리자 회원아이디가 존재하지 않습니다.');
|
alert('최고관리자 회원아이디가 존재하지 않습니다.');
|
||||||
}
|
|
||||||
|
|
||||||
check_admin_token();
|
check_admin_token();
|
||||||
|
|
||||||
$cf_social_servicelist = !empty($_POST['cf_social_servicelist']) ? implode(',', $_POST['cf_social_servicelist']) : '';
|
|
||||||
|
|
||||||
$check_keys = array('cf_cert_kcb_cd', 'cf_cert_kcp_cd', 'cf_cert_kcp_enckey', 'cf_editor', 'cf_recaptcha_site_key', 'cf_recaptcha_secret_key', 'cf_naver_clientid', 'cf_naver_secret', 'cf_facebook_appid', 'cf_facebook_secret', 'cf_twitter_key', 'cf_twitter_secret', 'cf_google_clientid', 'cf_google_secret', 'cf_googl_shorturl_apikey', 'cf_kakao_rest_key', 'cf_kakao_client_secret', 'cf_kakao_js_apikey', 'cf_payco_clientid', 'cf_payco_secret', 'cf_cert_kg_cd', 'cf_cert_kg_mid');
|
|
||||||
|
|
||||||
foreach ($check_keys as $key) {
|
|
||||||
if (isset($_POST[$key]) && $_POST[$key]) {
|
|
||||||
$_POST[$key] = preg_replace('/[^a-z0-9_\-\.]/i', '', $_POST[$key]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$_POST['cf_icode_server_port'] = isset($_POST['cf_icode_server_port']) ? preg_replace('/[^0-9]/', '', $_POST['cf_icode_server_port']) : '7295';
|
|
||||||
|
|
||||||
if (isset($_POST['cf_intercept_ip']) && $_POST['cf_intercept_ip']) {
|
|
||||||
$pattern = explode("\n", trim($_POST['cf_intercept_ip']));
|
|
||||||
for ($i = 0; $i < count($pattern); $i++) {
|
|
||||||
$pattern[$i] = trim($pattern[$i]);
|
|
||||||
if (empty($pattern[$i])) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
$pattern[$i] = str_replace(".", "\.", $pattern[$i]);
|
|
||||||
$pattern[$i] = str_replace("+", "[0-9\.]+", $pattern[$i]);
|
|
||||||
$pat = "/^{$pattern[$i]}$/";
|
|
||||||
|
|
||||||
if (preg_match($pat, $_SERVER['REMOTE_ADDR'])) {
|
|
||||||
alert("현재 접속 IP : " . $_SERVER['REMOTE_ADDR'] . " 가 차단될수 있기 때문에, 다른 IP를 입력해 주세요.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$check_keys = array(
|
|
||||||
'cf_use_email_certify' => 'int',
|
|
||||||
'cf_email_certify_minutes' => 'int',
|
|
||||||
'cf_use_homepage' => 'int',
|
|
||||||
'cf_req_homepage' => 'int',
|
|
||||||
'cf_use_tel' => 'int',
|
|
||||||
'cf_req_tel' => 'int',
|
|
||||||
'cf_use_hp' => 'int',
|
|
||||||
'cf_req_hp' => 'int',
|
|
||||||
'cf_use_addr' => 'int',
|
|
||||||
'cf_req_addr' => 'int',
|
|
||||||
'cf_use_signature' => 'int',
|
|
||||||
'cf_req_signature' => 'int',
|
|
||||||
'cf_use_profile' => 'int',
|
|
||||||
'cf_req_profile' => 'int',
|
|
||||||
'cf_register_level' => 'int',
|
|
||||||
'cf_register_point' => 'int',
|
|
||||||
'cf_icon_level' => 'int',
|
|
||||||
'cf_use_recommend' => 'int',
|
|
||||||
'cf_leave_day' => 'int',
|
|
||||||
'cf_search_part' => 'int',
|
|
||||||
'cf_email_use' => 'int',
|
|
||||||
'cf_email_wr_super_admin' => 'int',
|
|
||||||
'cf_email_wr_group_admin' => 'int',
|
|
||||||
'cf_email_wr_board_admin' => 'int',
|
|
||||||
'cf_email_wr_write' => 'int',
|
|
||||||
'cf_email_wr_comment_all' => 'int',
|
|
||||||
'cf_email_mb_super_admin' => 'int',
|
|
||||||
'cf_email_mb_member' => 'int',
|
|
||||||
'cf_email_po_super_admin' => 'int',
|
|
||||||
'cf_prohibit_id' => 'text',
|
|
||||||
'cf_prohibit_email' => 'text',
|
|
||||||
'cf_new_del' => 'int',
|
|
||||||
'cf_memo_del' => 'int',
|
|
||||||
'cf_visit_del' => 'int',
|
|
||||||
'cf_popular_del' => 'int',
|
|
||||||
'cf_use_member_icon' => 'int',
|
|
||||||
'cf_member_icon_size' => 'int',
|
|
||||||
'cf_member_icon_width' => 'int',
|
|
||||||
'cf_member_icon_height' => 'int',
|
|
||||||
'cf_member_img_size' => 'int',
|
|
||||||
'cf_member_img_width' => 'int',
|
|
||||||
'cf_member_img_height' => 'int',
|
|
||||||
'cf_login_minutes' => 'int',
|
|
||||||
'cf_formmail_is_member' => 'int',
|
|
||||||
'cf_page_rows' => 'int',
|
|
||||||
'cf_mobile_page_rows' => 'int',
|
|
||||||
'cf_social_login_use' => 'int',
|
|
||||||
'cf_cert_req' => 'int',
|
|
||||||
'cf_cert_use' => 'int',
|
|
||||||
'cf_cert_find' => 'int',
|
|
||||||
'cf_cert_ipin' => 'char',
|
|
||||||
'cf_cert_hp' => 'char',
|
|
||||||
'cf_cert_simple' => 'char',
|
|
||||||
'cf_cert_use_seed' => 'int',
|
|
||||||
'cf_admin_email' => 'char',
|
|
||||||
'cf_admin_email_name' => 'char',
|
|
||||||
'cf_add_script' => 'text',
|
|
||||||
'cf_use_point' => 'int',
|
|
||||||
'cf_point_term' => 'int',
|
|
||||||
'cf_use_copy_log' => 'int',
|
|
||||||
'cf_login_point' => 'int',
|
|
||||||
'cf_cut_name' => 'int',
|
|
||||||
'cf_nick_modify' => 'int',
|
|
||||||
'cf_new_skin' => 'char',
|
|
||||||
'cf_new_rows' => 'int',
|
|
||||||
'cf_search_skin' => 'char',
|
|
||||||
'cf_connect_skin' => 'char',
|
|
||||||
'cf_faq_skin' => 'char',
|
|
||||||
'cf_read_point' => 'int',
|
|
||||||
'cf_write_point' => 'int',
|
|
||||||
'cf_comment_point' => 'int',
|
|
||||||
'cf_download_point' => 'int',
|
|
||||||
'cf_write_pages' => 'int',
|
|
||||||
'cf_mobile_pages' => 'int',
|
|
||||||
'cf_link_target' => 'char',
|
|
||||||
'cf_delay_sec' => 'int',
|
|
||||||
'cf_filter' => 'text',
|
|
||||||
'cf_possible_ip' => 'text',
|
|
||||||
'cf_analytics' => 'text',
|
|
||||||
'cf_add_meta' => 'text',
|
|
||||||
'cf_member_skin' => 'char',
|
|
||||||
'cf_image_extension' => 'char',
|
|
||||||
'cf_flash_extension' => 'char',
|
|
||||||
'cf_movie_extension' => 'char',
|
|
||||||
'cf_visit' => 'char',
|
|
||||||
'cf_stipulation' => 'text',
|
|
||||||
'cf_privacy' => 'text',
|
|
||||||
'cf_use_promotion' => 'int',
|
|
||||||
'cf_open_modify' => 'int',
|
|
||||||
'cf_memo_send_point' => 'int',
|
|
||||||
'cf_mobile_new_skin' => 'char',
|
|
||||||
'cf_mobile_search_skin' => 'char',
|
|
||||||
'cf_mobile_connect_skin' => 'char',
|
|
||||||
'cf_mobile_faq_skin' => 'char',
|
|
||||||
'cf_mobile_member_skin' => 'char',
|
|
||||||
'cf_captcha_mp3' => 'char',
|
|
||||||
'cf_cert_limit' => 'int',
|
|
||||||
'cf_sms_use' => 'char',
|
|
||||||
'cf_sms_type' => 'char',
|
|
||||||
'cf_icode_id' => 'char',
|
|
||||||
'cf_icode_pw' => 'char',
|
|
||||||
'cf_icode_server_ip' => 'char',
|
|
||||||
'cf_captcha' => 'char',
|
|
||||||
'cf_syndi_token' => '',
|
|
||||||
'cf_syndi_except' => ''
|
|
||||||
);
|
|
||||||
|
|
||||||
for ($i = 1; $i <= 10; $i++) {
|
|
||||||
$check_keys['cf_' . $i . '_subj'] = isset($_POST['cf_' . $i . '_subj']) ? $_POST['cf_' . $i . '_subj'] : '';
|
|
||||||
$check_keys['cf_' . $i] = isset($_POST['cf_' . $i]) ? $_POST['cf_' . $i] : '';
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach ($check_keys as $k => $v) {
|
|
||||||
if ($v === 'int') {
|
|
||||||
$_POST[$k] = isset($_POST[$k]) ? (int) $_POST[$k] : 0;
|
|
||||||
} else {
|
|
||||||
if (in_array($k, array('cf_analytics', 'cf_add_meta', 'cf_add_script', 'cf_stipulation', 'cf_privacy'))) {
|
|
||||||
$_POST[$k] = isset($_POST[$k]) ? $_POST[$k] : '';
|
|
||||||
} else {
|
|
||||||
$_POST[$k] = isset($_POST[$k]) ? addslashes(strip_tags(clean_xss_attributes(stripslashes($_POST[$k])))) : '';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$_POST['cf_email_certify_minutes'] = max(0, $_POST['cf_email_certify_minutes']);
|
|
||||||
|
|
||||||
// 본인확인을 사용할 경우 아이핀, 휴대폰인증 중 하나는 선택되어야 함
|
// 본인확인을 사용할 경우 아이핀, 휴대폰인증 중 하나는 선택되어야 함
|
||||||
if ($_POST['cf_cert_use'] && !$_POST['cf_cert_ipin'] && !$_POST['cf_cert_hp'] && !$_POST['cf_cert_simple']) {
|
if($_POST['cf_cert_use'] && !$_POST['cf_cert_ipin'] && !$_POST['cf_cert_hp'])
|
||||||
alert('본인확인을 위해 아이핀, 휴대폰 본인확인, KG이니시스 간편인증 서비스 중 하나 이상 선택해 주십시오.');
|
alert('본인확인을 위해 아이핀 또는 휴대폰 본인학인 서비스를 하나이상 선택해 주십시오');
|
||||||
}
|
|
||||||
|
|
||||||
if (!$_POST['cf_cert_use']) {
|
if(!$_POST['cf_cert_use']) {
|
||||||
$_POST['cf_cert_ipin'] = '';
|
$_POST['cf_cert_ipin'] = '';
|
||||||
$_POST['cf_cert_hp'] = '';
|
$_POST['cf_cert_hp'] = '';
|
||||||
$_POST['cf_cert_simple'] = '';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 관리자가 자동등록방지를 사용해야 할 경우 ( 기본환경설정에서 최고관리자, 방문자분석 스크립트, 추가 메타태그, 추가 script, css 변경시 )
|
$cf_social_servicelist = !empty($_POST['cf_social_servicelist']) ? implode(',', $_POST['cf_social_servicelist']) : '';
|
||||||
$check_captcha = 0;
|
|
||||||
|
|
||||||
if ($cf_admin && $ori_config['cf_admin'] !== $cf_admin) {
|
|
||||||
$check_captcha = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($_POST['cf_analytics'] && $ori_config['cf_analytics'] !== stripslashes($_POST['cf_analytics'])) {
|
|
||||||
$check_captcha = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($_POST['cf_add_meta'] && $ori_config['cf_add_meta'] !== stripslashes($_POST['cf_add_meta'])) {
|
|
||||||
$check_captcha = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($_POST['cf_add_script'] && $ori_config['cf_add_script'] !== stripslashes($_POST['cf_add_script'])) {
|
|
||||||
$check_captcha = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($check_captcha) {
|
|
||||||
include_once(G5_CAPTCHA_PATH . '/captcha.lib.php');
|
|
||||||
|
|
||||||
if (!chk_captcha()) {
|
|
||||||
alert('자동등록방지 숫자가 틀렸습니다.');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$sql = " update {$g5['config_table']}
|
$sql = " update {$g5['config_table']}
|
||||||
set cf_title = '{$cf_title}',
|
set cf_title = '{$_POST['cf_title']}',
|
||||||
cf_admin = '{$cf_admin}',
|
cf_admin = '{$_POST['cf_admin']}',
|
||||||
cf_admin_email = '{$_POST['cf_admin_email']}',
|
cf_admin_email = '{$_POST['cf_admin_email']}',
|
||||||
cf_admin_email_name = '{$_POST['cf_admin_email_name']}',
|
cf_admin_email_name = '{$_POST['cf_admin_email_name']}',
|
||||||
cf_add_script = '{$_POST['cf_add_script']}',
|
cf_add_script = '{$_POST['cf_add_script']}',
|
||||||
@@ -229,7 +36,6 @@ $sql = " update {$g5['config_table']}
|
|||||||
cf_point_term = '{$_POST['cf_point_term']}',
|
cf_point_term = '{$_POST['cf_point_term']}',
|
||||||
cf_use_copy_log = '{$_POST['cf_use_copy_log']}',
|
cf_use_copy_log = '{$_POST['cf_use_copy_log']}',
|
||||||
cf_use_email_certify = '{$_POST['cf_use_email_certify']}',
|
cf_use_email_certify = '{$_POST['cf_use_email_certify']}',
|
||||||
cf_email_certify_minutes = '{$_POST['cf_email_certify_minutes']}',
|
|
||||||
cf_login_point = '{$_POST['cf_login_point']}',
|
cf_login_point = '{$_POST['cf_login_point']}',
|
||||||
cf_cut_name = '{$_POST['cf_cut_name']}',
|
cf_cut_name = '{$_POST['cf_cut_name']}',
|
||||||
cf_nick_modify = '{$_POST['cf_nick_modify']}',
|
cf_nick_modify = '{$_POST['cf_nick_modify']}',
|
||||||
@@ -247,13 +53,12 @@ $sql = " update {$g5['config_table']}
|
|||||||
cf_link_target = '{$_POST['cf_link_target']}',
|
cf_link_target = '{$_POST['cf_link_target']}',
|
||||||
cf_delay_sec = '{$_POST['cf_delay_sec']}',
|
cf_delay_sec = '{$_POST['cf_delay_sec']}',
|
||||||
cf_filter = '{$_POST['cf_filter']}',
|
cf_filter = '{$_POST['cf_filter']}',
|
||||||
cf_possible_ip = '" . trim($_POST['cf_possible_ip']) . "',
|
cf_possible_ip = '".trim($_POST['cf_possible_ip'])."',
|
||||||
cf_intercept_ip = '" . trim($_POST['cf_intercept_ip']) . "',
|
cf_intercept_ip = '".trim($_POST['cf_intercept_ip'])."',
|
||||||
cf_analytics = '{$_POST['cf_analytics']}',
|
cf_analytics = '{$_POST['cf_analytics']}',
|
||||||
cf_add_meta = '{$_POST['cf_add_meta']}',
|
cf_add_meta = '{$_POST['cf_add_meta']}',
|
||||||
cf_syndi_token = '{$_POST['cf_syndi_token']}',
|
cf_syndi_token = '{$_POST['cf_syndi_token']}',
|
||||||
cf_syndi_except = '{$_POST['cf_syndi_except']}',
|
cf_syndi_except = '{$_POST['cf_syndi_except']}',
|
||||||
cf_bbs_rewrite = '{$_POST['cf_bbs_rewrite']}',
|
|
||||||
cf_member_skin = '{$_POST['cf_member_skin']}',
|
cf_member_skin = '{$_POST['cf_member_skin']}',
|
||||||
cf_use_homepage = '{$_POST['cf_use_homepage']}',
|
cf_use_homepage = '{$_POST['cf_use_homepage']}',
|
||||||
cf_req_homepage = '{$_POST['cf_req_homepage']}',
|
cf_req_homepage = '{$_POST['cf_req_homepage']}',
|
||||||
@@ -305,7 +110,6 @@ $sql = " update {$g5['config_table']}
|
|||||||
cf_mobile_page_rows = '{$_POST['cf_mobile_page_rows']}',
|
cf_mobile_page_rows = '{$_POST['cf_mobile_page_rows']}',
|
||||||
cf_stipulation = '{$_POST['cf_stipulation']}',
|
cf_stipulation = '{$_POST['cf_stipulation']}',
|
||||||
cf_privacy = '{$_POST['cf_privacy']}',
|
cf_privacy = '{$_POST['cf_privacy']}',
|
||||||
cf_use_promotion = '{$_POST['cf_use_promotion']}',
|
|
||||||
cf_open_modify = '{$_POST['cf_open_modify']}',
|
cf_open_modify = '{$_POST['cf_open_modify']}',
|
||||||
cf_memo_send_point = '{$_POST['cf_memo_send_point']}',
|
cf_memo_send_point = '{$_POST['cf_memo_send_point']}',
|
||||||
cf_mobile_new_skin = '{$_POST['cf_mobile_new_skin']}',
|
cf_mobile_new_skin = '{$_POST['cf_mobile_new_skin']}',
|
||||||
@@ -316,23 +120,18 @@ $sql = " update {$g5['config_table']}
|
|||||||
cf_captcha_mp3 = '{$_POST['cf_captcha_mp3']}',
|
cf_captcha_mp3 = '{$_POST['cf_captcha_mp3']}',
|
||||||
cf_editor = '{$_POST['cf_editor']}',
|
cf_editor = '{$_POST['cf_editor']}',
|
||||||
cf_cert_use = '{$_POST['cf_cert_use']}',
|
cf_cert_use = '{$_POST['cf_cert_use']}',
|
||||||
cf_cert_find = '{$_POST['cf_cert_find']}',
|
|
||||||
cf_cert_ipin = '{$_POST['cf_cert_ipin']}',
|
cf_cert_ipin = '{$_POST['cf_cert_ipin']}',
|
||||||
cf_cert_hp = '{$_POST['cf_cert_hp']}',
|
cf_cert_hp = '{$_POST['cf_cert_hp']}',
|
||||||
cf_cert_simple = '{$_POST['cf_cert_simple']}',
|
|
||||||
cf_cert_use_seed = '".(int)$_POST['cf_cert_use_seed']."',
|
|
||||||
cf_cert_kg_cd = '{$_POST['cf_cert_kg_cd']}',
|
|
||||||
cf_cert_kg_mid = '" . trim($_POST['cf_cert_kg_mid']) . "',
|
|
||||||
cf_cert_kcb_cd = '{$_POST['cf_cert_kcb_cd']}',
|
cf_cert_kcb_cd = '{$_POST['cf_cert_kcb_cd']}',
|
||||||
cf_cert_kcp_cd = '{$_POST['cf_cert_kcp_cd']}',
|
cf_cert_kcp_cd = '{$_POST['cf_cert_kcp_cd']}',
|
||||||
cf_cert_kcp_enckey = '{$_POST['cf_cert_kcp_enckey']}',
|
cf_lg_mid = '{$_POST['cf_lg_mid']}',
|
||||||
|
cf_lg_mert_key = '{$_POST['cf_lg_mert_key']}',
|
||||||
cf_cert_limit = '{$_POST['cf_cert_limit']}',
|
cf_cert_limit = '{$_POST['cf_cert_limit']}',
|
||||||
cf_cert_req = '{$_POST['cf_cert_req']}',
|
cf_cert_req = '{$_POST['cf_cert_req']}',
|
||||||
cf_sms_use = '{$_POST['cf_sms_use']}',
|
cf_sms_use = '{$_POST['cf_sms_use']}',
|
||||||
cf_sms_type = '{$_POST['cf_sms_type']}',
|
cf_sms_type = '{$_POST['cf_sms_type']}',
|
||||||
cf_icode_id = '{$_POST['cf_icode_id']}',
|
cf_icode_id = '{$_POST['cf_icode_id']}',
|
||||||
cf_icode_pw = '{$_POST['cf_icode_pw']}',
|
cf_icode_pw = '{$_POST['cf_icode_pw']}',
|
||||||
cf_icode_token_key = '{$_POST['cf_icode_token_key']}',
|
|
||||||
cf_icode_server_ip = '{$_POST['cf_icode_server_ip']}',
|
cf_icode_server_ip = '{$_POST['cf_icode_server_ip']}',
|
||||||
cf_icode_server_port = '{$_POST['cf_icode_server_port']}',
|
cf_icode_server_port = '{$_POST['cf_icode_server_port']}',
|
||||||
cf_googl_shorturl_apikey = '{$_POST['cf_googl_shorturl_apikey']}',
|
cf_googl_shorturl_apikey = '{$_POST['cf_googl_shorturl_apikey']}',
|
||||||
@@ -378,16 +177,5 @@ sql_query($sql);
|
|||||||
|
|
||||||
//sql_query(" OPTIMIZE TABLE `$g5[config_table]` ");
|
//sql_query(" OPTIMIZE TABLE `$g5[config_table]` ");
|
||||||
|
|
||||||
if (isset($_POST['cf_bbs_rewrite'])) {
|
|
||||||
g5_delete_all_cache();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (function_exists('get_admin_captcha_by')) {
|
|
||||||
get_admin_captcha_by('remove');
|
|
||||||
}
|
|
||||||
|
|
||||||
run_event('admin_config_form_update');
|
|
||||||
|
|
||||||
update_rewrite_rules();
|
|
||||||
|
|
||||||
goto_url('./config_form.php', false);
|
goto_url('./config_form.php', false);
|
||||||
|
?>
|
||||||
+213
-281
@@ -1,281 +1,213 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = '300600';
|
$sub_menu = '300600';
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
require_once G5_EDITOR_LIB;
|
include_once(G5_EDITOR_LIB);
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, "w");
|
auth_check($auth[$sub_menu], "w");
|
||||||
|
|
||||||
$co_id = isset($_REQUEST['co_id']) ? preg_replace('/[^a-z0-9_]/i', '', $_REQUEST['co_id']) : '';
|
// 상단, 하단 파일경로 필드 추가
|
||||||
|
if(!sql_query(" select co_include_head from {$g5['content_table']} limit 1 ", false)) {
|
||||||
// 상단, 하단 파일경로 필드 추가
|
$sql = " ALTER TABLE `{$g5['content_table']}` ADD `co_include_head` VARCHAR( 255 ) NOT NULL ,
|
||||||
|
ADD `co_include_tail` VARCHAR( 255 ) NOT NULL ";
|
||||||
// html purifier 사용여부 필드
|
sql_query($sql, false);
|
||||||
|
}
|
||||||
// 모바일 내용 추가
|
|
||||||
|
// html purifier 사용여부 필드
|
||||||
// 스킨 설정 추가
|
if(!sql_query(" select co_tag_filter_use from {$g5['content_table']} limit 1 ", false)) {
|
||||||
|
sql_query(" ALTER TABLE `{$g5['content_table']}`
|
||||||
$html_title = "내용";
|
ADD `co_tag_filter_use` tinyint(4) NOT NULL DEFAULT '0' AFTER `co_content` ", true);
|
||||||
$g5['title'] = $html_title . ' 관리';
|
sql_query(" update {$g5['content_table']} set co_tag_filter_use = '1' ");
|
||||||
$readonly = '';
|
}
|
||||||
|
|
||||||
if ($w == "u") {
|
// 모바일 내용 추가
|
||||||
$html_title .= " 수정";
|
if(!sql_query(" select co_mobile_content from {$g5['content_table']} limit 1", false)) {
|
||||||
$readonly = " readonly";
|
sql_query(" ALTER TABLE `{$g5['content_table']}`
|
||||||
|
ADD `co_mobile_content` longtext NOT NULL AFTER `co_content` ", true);
|
||||||
$sql = " select * from {$g5['content_table']} where co_id = '$co_id' ";
|
}
|
||||||
$co = sql_fetch($sql);
|
|
||||||
if (!$co['co_id']) {
|
// 스킨 설정 추가
|
||||||
alert('등록된 자료가 없습니다.');
|
if(!sql_query(" select co_skin from {$g5['content_table']} limit 1 ", false)) {
|
||||||
}
|
sql_query(" ALTER TABLE `{$g5['content_table']}`
|
||||||
|
ADD `co_skin` varchar(255) NOT NULL DEFAULT '' AFTER `co_mobile_content`,
|
||||||
if (function_exists('check_case_exist_title')) check_case_exist_title($co, G5_CONTENT_DIR, false);
|
ADD `co_mobile_skin` varchar(255) NOT NULL DEFAULT '' AFTER `co_skin` ", true);
|
||||||
|
sql_query(" update {$g5['content_table']} set co_skin = 'basic', co_mobile_skin = 'basic' ");
|
||||||
} else {
|
}
|
||||||
$html_title .= ' 입력';
|
|
||||||
$co = array(
|
$html_title = "내용";
|
||||||
'co_id' => '',
|
$g5['title'] = $html_title.' 관리';
|
||||||
'co_subject' => '',
|
|
||||||
'co_content' => '',
|
if ($w == "u")
|
||||||
'co_mobile_content' => '',
|
{
|
||||||
'co_include_head' => '',
|
$html_title .= " 수정";
|
||||||
'co_include_tail' => '',
|
$readonly = " readonly";
|
||||||
'co_tag_filter_use' => 1,
|
|
||||||
'co_html' => 2,
|
$sql = " select * from {$g5['content_table']} where co_id = '$co_id' ";
|
||||||
'co_skin' => 'basic',
|
$co = sql_fetch($sql);
|
||||||
'co_mobile_skin' => 'basic'
|
if (!$co['co_id'])
|
||||||
);
|
alert('등록된 자료가 없습니다.');
|
||||||
}
|
}
|
||||||
|
else
|
||||||
require_once G5_ADMIN_PATH . '/admin.head.php';
|
{
|
||||||
?>
|
$html_title .= ' 입력';
|
||||||
|
$co['co_html'] = 2;
|
||||||
<form name="frmcontentform" action="./contentformupdate.php" onsubmit="return frmcontentform_check(this);" method="post" enctype="MULTIPART/FORM-DATA">
|
$co['co_skin'] = 'basic';
|
||||||
<input type="hidden" name="w" value="<?php echo $w; ?>">
|
$co['co_mobile_skin'] = 'basic';
|
||||||
<input type="hidden" name="co_html" value="1">
|
}
|
||||||
<input type="hidden" name="token" value="">
|
|
||||||
|
include_once (G5_ADMIN_PATH.'/admin.head.php');
|
||||||
<div class="tbl_frm01 tbl_wrap">
|
?>
|
||||||
<table>
|
|
||||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
<form name="frmcontentform" action="./contentformupdate.php" onsubmit="return frmcontentform_check(this);" method="post" enctype="MULTIPART/FORM-DATA" >
|
||||||
<colgroup>
|
<input type="hidden" name="w" value="<?php echo $w; ?>">
|
||||||
<col class="grid_4">
|
<input type="hidden" name="co_html" value="1">
|
||||||
<col>
|
<input type="hidden" name="token" value="">
|
||||||
</colgroup>
|
|
||||||
<tbody>
|
<div class="tbl_frm01 tbl_wrap">
|
||||||
<tr>
|
<table>
|
||||||
<th scope="row"><label for="co_id">ID</label></th>
|
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||||
<td>
|
<colgroup>
|
||||||
<?php echo help('20자 이내의 영문자, 숫자, _ 만 가능합니다.'); ?>
|
<col class="grid_4">
|
||||||
<input type="text" value="<?php echo $co['co_id']; ?>" name="co_id" id="co_id" required <?php echo $readonly; ?> class="required <?php echo $readonly; ?> frm_input" size="20" maxlength="20">
|
<col>
|
||||||
<?php if ($w == 'u') { ?><a href="<?php echo get_pretty_url('content', $co_id); ?>" class="btn_frmline">내용확인</a><?php } ?>
|
</colgroup>
|
||||||
</td>
|
<tbody>
|
||||||
</tr>
|
<tr>
|
||||||
<tr>
|
<th scope="row"><label for="co_id">ID</label></th>
|
||||||
<th scope="row"><label for="co_subject">제목</label></th>
|
<td>
|
||||||
<td><input type="text" name="co_subject" value="<?php echo htmlspecialchars2($co['co_subject']); ?>" id="co_subject" required class="frm_input required" size="90"></td>
|
<?php echo help('20자 이내의 영문자, 숫자, _ 만 가능합니다.'); ?>
|
||||||
</tr>
|
<input type="text" value="<?php echo $co['co_id']; ?>" name="co_id" id ="co_id" required <?php echo $readonly; ?> class="required <?php echo $readonly; ?> frm_input" size="20" maxlength="20">
|
||||||
<tr>
|
<?php if ($w == 'u') { ?><a href="<?php echo G5_BBS_URL; ?>/content.php?co_id=<?php echo $co_id; ?>" class="btn_frmline">내용확인</a><?php } ?>
|
||||||
<th scope="row">내용</th>
|
</td>
|
||||||
<td><?php echo editor_html('co_content', get_text(html_purifier($co['co_content']), 0)); ?></td>
|
</tr>
|
||||||
</tr>
|
<tr>
|
||||||
<tr>
|
<th scope="row"><label for="co_subject">제목</label></th>
|
||||||
<th scope="row">모바일 내용</th>
|
<td><input type="text" name="co_subject" value="<?php echo htmlspecialchars2($co['co_subject']); ?>" id="co_subject" required class="frm_input required" size="90"></td>
|
||||||
<td><?php echo editor_html('co_mobile_content', get_text(html_purifier($co['co_mobile_content']), 0)); ?></td>
|
</tr>
|
||||||
</tr>
|
<tr>
|
||||||
<tr>
|
<th scope="row">내용</th>
|
||||||
<th scope="row"><label for="co_skin">스킨 디렉토리<strong class="sound_only">필수</strong></label></th>
|
<td><?php echo editor_html('co_content', get_text($co['co_content'], 0)); ?></td>
|
||||||
<td>
|
</tr>
|
||||||
<?php echo get_skin_select('content', 'co_skin', 'co_skin', $co['co_skin'], 'required'); ?>
|
<tr>
|
||||||
</td>
|
<th scope="row">모바일 내용</th>
|
||||||
</tr>
|
<td><?php echo editor_html('co_mobile_content', get_text($co['co_mobile_content'], 0)); ?></td>
|
||||||
<tr>
|
</tr>
|
||||||
<th scope="row"><label for="co_mobile_skin">모바일스킨 디렉토리<strong class="sound_only">필수</strong></label></th>
|
<tr>
|
||||||
<td>
|
<th scope="row"><label for="co_skin">스킨 디렉토리<strong class="sound_only">필수</strong></label></th>
|
||||||
<?php echo get_mobile_skin_select('content', 'co_mobile_skin', 'co_mobile_skin', $co['co_mobile_skin'], 'required'); ?>
|
<td>
|
||||||
</td>
|
<?php echo get_skin_select('content', 'co_skin', 'co_skin', $co['co_skin'], 'required'); ?>
|
||||||
</tr>
|
</td>
|
||||||
<!--
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="co_tag_filter_use">태그 필터링 사용</label></th>
|
<th scope="row"><label for="co_mobile_skin">모바일스킨 디렉토리<strong class="sound_only">필수</strong></label></th>
|
||||||
<td>
|
<td>
|
||||||
<?php echo help("내용에서 iframe 등의 태그를 사용하려면 사용안함으로 선택해 주십시오."); ?>
|
<?php echo get_mobile_skin_select('content', 'co_mobile_skin', 'co_mobile_skin', $co['co_mobile_skin'], 'required'); ?>
|
||||||
<select name="co_tag_filter_use" id="co_tag_filter_use">
|
</td>
|
||||||
<option value="1"<?php echo get_selected($co['co_tag_filter_use'], 1); ?>>사용함</option>
|
</tr>
|
||||||
<option value="0"<?php echo get_selected($co['co_tag_filter_use'], 0); ?>>사용안함</option>
|
<tr>
|
||||||
</select>
|
<th scope="row"><label for="co_tag_filter_use">태그 필터링 사용</label></th>
|
||||||
</td>
|
<td>
|
||||||
</tr>
|
<?php echo help("내용에서 iframe 등의 태그를 사용하려면 사용안함으로 선택해 주십시오."); ?>
|
||||||
-->
|
<select name="co_tag_filter_use" id="co_tag_filter_use">
|
||||||
<tr>
|
<option value="1"<?php echo get_selected(1, $co['co_tag_filter_use']); ?>>사용함</option>
|
||||||
<th scope="row"><label for="co_include_head">상단 파일 경로</label></th>
|
<option value="0"<?php echo get_selected(0, $co['co_tag_filter_use']); ?>>사용안함</option>
|
||||||
<td>
|
</select>
|
||||||
<?php echo help("설정값이 없으면 기본 상단 파일을 사용합니다."); ?>
|
</td>
|
||||||
<input type="text" name="co_include_head" value="<?php echo get_sanitize_input($co['co_include_head']); ?>" id="co_include_head" class="frm_input" size="60">
|
</tr>
|
||||||
</td>
|
<tr>
|
||||||
</tr>
|
<th scope="row"><label for="co_include_head">상단 파일 경로</label></th>
|
||||||
<tr>
|
<td>
|
||||||
<th scope="row"><label for="co_include_tail">하단 파일 경로</label></th>
|
<?php echo help("설정값이 없으면 기본 상단 파일을 사용합니다."); ?>
|
||||||
<td>
|
<input type="text" name="co_include_head" value="<?php echo $co['co_include_head']; ?>" id="co_include_head" class="frm_input" size="60">
|
||||||
<?php echo help("설정값이 없으면 기본 하단 파일을 사용합니다."); ?>
|
</td>
|
||||||
<input type="text" name="co_include_tail" value="<?php echo get_sanitize_input($co['co_include_tail']); ?>" id="co_include_tail" class="frm_input" size="60">
|
</tr>
|
||||||
</td>
|
<tr>
|
||||||
</tr>
|
<th scope="row"><label for="co_include_tail">하단 파일 경로</label></th>
|
||||||
<tr id="admin_captcha_box" style="display:none;">
|
<td>
|
||||||
<th scope="row">자동등록방지</th>
|
<?php echo help("설정값이 없으면 기본 하단 파일을 사용합니다."); ?>
|
||||||
<td>
|
<input type="text" name="co_include_tail" value="<?php echo $co['co_include_tail']; ?>" id="co_include_tail" class="frm_input" size="60">
|
||||||
<?php
|
</td>
|
||||||
echo help("파일 경로를 입력 또는 수정시 캡챠를 반드시 입력해야 합니다.");
|
</tr>
|
||||||
|
<tr>
|
||||||
require_once G5_CAPTCHA_PATH . '/captcha.lib.php';
|
<th scope="row"><label for="co_himg">상단이미지</label></th>
|
||||||
$captcha_html = captcha_html();
|
<td>
|
||||||
$captcha_js = chk_captcha_js();
|
<input type="file" name="co_himg" id="co_himg">
|
||||||
echo $captcha_html;
|
<?php
|
||||||
?>
|
$himg = G5_DATA_PATH.'/content/'.$co['co_id'].'_h';
|
||||||
<script>
|
if (file_exists($himg)) {
|
||||||
jQuery("#captcha_key").removeAttr("required").removeClass("required");
|
$size = @getimagesize($himg);
|
||||||
</script>
|
if($size[0] && $size[0] > 750)
|
||||||
</td>
|
$width = 750;
|
||||||
</tr>
|
else
|
||||||
<tr>
|
$width = $size[0];
|
||||||
<th scope="row"><label for="co_himg">상단이미지</label></th>
|
|
||||||
<td>
|
echo '<input type="checkbox" name="co_himg_del" value="1" id="co_himg_del"> <label for="co_himg_del">삭제</label>';
|
||||||
<input type="file" name="co_himg" id="co_himg">
|
$himg_str = '<img src="'.G5_DATA_URL.'/content/'.$co['co_id'].'_h" width="'.$width.'" alt="">';
|
||||||
<?php
|
}
|
||||||
$himg = G5_DATA_PATH . '/content/' . $co['co_id'] . '_h';
|
if ($himg_str) {
|
||||||
$himg_str = '';
|
echo '<div class="banner_or_img">';
|
||||||
if (file_exists($himg)) {
|
echo $himg_str;
|
||||||
$size = @getimagesize($himg);
|
echo '</div>';
|
||||||
if ($size[0] && $size[0] > 750) {
|
}
|
||||||
$width = 750;
|
?>
|
||||||
} else {
|
</td>
|
||||||
$width = $size[0];
|
</tr>
|
||||||
}
|
<tr>
|
||||||
|
<th scope="row"><label for="co_timg">하단이미지</label></th>
|
||||||
echo '<input type="checkbox" name="co_himg_del" value="1" id="co_himg_del"> <label for="co_himg_del">삭제</label>';
|
<td>
|
||||||
$himg_str = '<img src="' . G5_DATA_URL . '/content/' . $co['co_id'] . '_h" width="' . $width . '" alt="">';
|
<input type="file" name="co_timg" id="co_timg">
|
||||||
}
|
<?php
|
||||||
if ($himg_str) {
|
$timg = G5_DATA_PATH.'/content/'.$co['co_id'].'_t';
|
||||||
echo '<div class="banner_or_img">';
|
if (file_exists($timg)) {
|
||||||
echo $himg_str;
|
$size = @getimagesize($timg);
|
||||||
echo '</div>';
|
if($size[0] && $size[0] > 750)
|
||||||
}
|
$width = 750;
|
||||||
?>
|
else
|
||||||
</td>
|
$width = $size[0];
|
||||||
</tr>
|
|
||||||
<tr>
|
echo '<input type="checkbox" name="co_timg_del" value="1" id="co_timg_del"> <label for="co_timg_del">삭제</label>';
|
||||||
<th scope="row"><label for="co_timg">하단이미지</label></th>
|
$timg_str = '<img src="'.G5_DATA_URL.'/content/'.$co['co_id'].'_t" width="'.$width.'" alt="">';
|
||||||
<td>
|
}
|
||||||
<input type="file" name="co_timg" id="co_timg">
|
if ($timg_str) {
|
||||||
<?php
|
echo '<div class="banner_or_img">';
|
||||||
$timg = G5_DATA_PATH . '/content/' . $co['co_id'] . '_t';
|
echo $timg_str;
|
||||||
$timg_str = '';
|
echo '</div>';
|
||||||
if (file_exists($timg)) {
|
}
|
||||||
$size = @getimagesize($timg);
|
?>
|
||||||
if ($size[0] && $size[0] > 750) {
|
</td>
|
||||||
$width = 750;
|
</tr>
|
||||||
} else {
|
</tbody>
|
||||||
$width = $size[0];
|
</table>
|
||||||
}
|
</div>
|
||||||
|
|
||||||
echo '<input type="checkbox" name="co_timg_del" value="1" id="co_timg_del"> <label for="co_timg_del">삭제</label>';
|
<div class="btn_fixed_top">
|
||||||
$timg_str = '<img src="' . G5_DATA_URL . '/content/' . $co['co_id'] . '_t" width="' . $width . '" alt="">';
|
<a href="./contentlist.php" class="btn btn_02">목록</a>
|
||||||
}
|
<input type="submit" value="확인" class="btn btn_submit" accesskey="s">
|
||||||
if ($timg_str) {
|
</div>
|
||||||
echo '<div class="banner_or_img">';
|
|
||||||
echo $timg_str;
|
</form>
|
||||||
echo '</div>';
|
|
||||||
}
|
<script>
|
||||||
?>
|
function frmcontentform_check(f)
|
||||||
</td>
|
{
|
||||||
</tr>
|
errmsg = "";
|
||||||
</tbody>
|
errfld = "";
|
||||||
</table>
|
|
||||||
</div>
|
<?php echo get_editor_js('co_content'); ?>
|
||||||
|
<?php echo chk_editor_js('co_content'); ?>
|
||||||
<div class="btn_fixed_top">
|
<?php echo get_editor_js('co_mobile_content'); ?>
|
||||||
<a href="./contentlist.php" class="btn btn_02">목록</a>
|
|
||||||
<input type="submit" value="확인" class="btn btn_submit" accesskey="s">
|
check_field(f.co_id, "ID를 입력하세요.");
|
||||||
</div>
|
check_field(f.co_subject, "제목을 입력하세요.");
|
||||||
|
check_field(f.co_content, "내용을 입력하세요.");
|
||||||
</form>
|
|
||||||
|
if (errmsg != "") {
|
||||||
<?php
|
alert(errmsg);
|
||||||
// [KVE-2018-2089] 취약점 으로 인해 파일 경로 수정시에만 자동등록방지 코드 사용
|
errfld.focus();
|
||||||
?>
|
return false;
|
||||||
<script>
|
}
|
||||||
var captcha_chk = false;
|
return true;
|
||||||
|
}
|
||||||
function use_captcha_check() {
|
</script>
|
||||||
$.ajax({
|
|
||||||
type: "POST",
|
<?php
|
||||||
url: g5_admin_url + "/ajax.use_captcha.php",
|
include_once (G5_ADMIN_PATH.'/admin.tail.php');
|
||||||
data: {
|
?>
|
||||||
admin_use_captcha: "1"
|
|
||||||
},
|
|
||||||
cache: false,
|
|
||||||
async: false,
|
|
||||||
dataType: "json",
|
|
||||||
success: function(data) {}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function frm_check_file() {
|
|
||||||
var co_include_head = "<?php echo $co['co_include_head']; ?>";
|
|
||||||
var co_include_tail = "<?php echo $co['co_include_tail']; ?>";
|
|
||||||
var head = jQuery.trim(jQuery("#co_include_head").val());
|
|
||||||
var tail = jQuery.trim(jQuery("#co_include_tail").val());
|
|
||||||
|
|
||||||
if (co_include_head !== head || co_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을 사용할 경우 체크
|
|
||||||
$("#co_include_head, #co_include_tail").on("change paste keyup", function(e) {
|
|
||||||
frm_check_file();
|
|
||||||
});
|
|
||||||
|
|
||||||
use_captcha_check();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
function frmcontentform_check(f) {
|
|
||||||
errmsg = "";
|
|
||||||
errfld = "";
|
|
||||||
|
|
||||||
<?php echo get_editor_js('co_content'); ?>
|
|
||||||
<?php echo chk_editor_js('co_content'); ?>
|
|
||||||
<?php echo get_editor_js('co_mobile_content'); ?>
|
|
||||||
|
|
||||||
check_field(f.co_id, "ID를 입력하세요.");
|
|
||||||
check_field(f.co_subject, "제목을 입력하세요.");
|
|
||||||
check_field(f.co_content, "내용을 입력하세요.");
|
|
||||||
|
|
||||||
if (errmsg != "") {
|
|
||||||
alert(errmsg);
|
|
||||||
errfld.focus();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (captcha_chk) {
|
|
||||||
<?php echo $captcha_js; // 캡챠 사용시 자바스크립트에서 입력된 캡챠를 검사함 ?>
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
require_once G5_ADMIN_PATH . '/admin.tail.php';
|
|
||||||
|
|||||||
+115
-191
@@ -1,191 +1,115 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = '300600';
|
$sub_menu = '300600';
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
|
|
||||||
if ($w == "u" || $w == "d") {
|
if ($w == "u" || $w == "d")
|
||||||
check_demo();
|
check_demo();
|
||||||
}
|
|
||||||
|
if ($w == 'd')
|
||||||
if ($w == 'd') {
|
auth_check($auth[$sub_menu], "d");
|
||||||
auth_check_menu($auth, $sub_menu, "d");
|
else
|
||||||
} else {
|
auth_check($auth[$sub_menu], "w");
|
||||||
auth_check_menu($auth, $sub_menu, "w");
|
|
||||||
}
|
check_admin_token();
|
||||||
|
|
||||||
check_admin_token();
|
@mkdir(G5_DATA_PATH."/content", G5_DIR_PERMISSION);
|
||||||
|
@chmod(G5_DATA_PATH."/content", G5_DIR_PERMISSION);
|
||||||
$co_row = array('co_id' => '', 'co_include_head' => '', 'co_include_tail' => '');
|
|
||||||
|
if ($co_himg_del) @unlink(G5_DATA_PATH."/content/{$co_id}_h");
|
||||||
if ($w == "" || $w == "u") {
|
if ($co_timg_del) @unlink(G5_DATA_PATH."/content/{$co_id}_t");
|
||||||
if (isset($_REQUEST['co_id']) && preg_match("/[^a-z0-9_]/i", $_REQUEST['co_id'])) {
|
|
||||||
alert("ID 는 영문자, 숫자, _ 만 가능합니다.");
|
$error_msg = '';
|
||||||
}
|
|
||||||
|
if( $co_include_head ){
|
||||||
$sql = " select * from {$g5['content_table']} where co_id = '$co_id' ";
|
$purl = parse_url($co_include_head);
|
||||||
$co_row = sql_fetch($sql);
|
$file = $purl['path'];
|
||||||
}
|
if (!preg_match("/\.(php|htm['l']?)$/i", $file)) {
|
||||||
|
alert('상단 파일 경로의 확장자는 php, html 만 허용합니다.');
|
||||||
$co_id = isset($_REQUEST['co_id']) ? preg_replace('/[^a-z0-9_]/i', '', $_REQUEST['co_id']) : '';
|
}
|
||||||
$co_subject = isset($_POST['co_subject']) ? addslashes(strip_tags(clean_xss_attributes(stripslashes($_POST['co_subject'])))) : '';
|
}
|
||||||
$co_include_head = isset($_POST['co_include_head']) ? preg_replace(array("#[\\\]+$#", "#(<\?php|<\?)#i"), "", substr($_POST['co_include_head'], 0, 255)) : '';
|
|
||||||
$co_include_tail = isset($_POST['co_include_tail']) ? preg_replace(array("#[\\\]+$#", "#(<\?php|<\?)#i"), "", substr($_POST['co_include_tail'], 0, 255)) : '';
|
if( $co_include_tail ){
|
||||||
|
$purl = parse_url($co_include_tail);
|
||||||
// 최고 관리자가 아니면 include 경로 변경 불가 (board_form_update.php 와 동일 정책)
|
$file = $purl['path'];
|
||||||
if ($is_admin !== 'super') {
|
if (!preg_match("/\.(php|htm['l']?)$/i", $file)) {
|
||||||
if ($w == 'u') {
|
alert('하단 파일 경로의 확장자는 php, html 만 허용합니다.');
|
||||||
$co_include_head = isset($co_row['co_include_head']) ? $co_row['co_include_head'] : '';
|
}
|
||||||
$co_include_tail = isset($co_row['co_include_tail']) ? $co_row['co_include_tail'] : '';
|
}
|
||||||
} else {
|
|
||||||
$co_include_head = '';
|
if( $co_include_head && ! is_include_path_check($co_include_head) ){
|
||||||
$co_include_tail = '';
|
$co_include_head = '';
|
||||||
}
|
$error_msg = '/data/file/ 또는 /data/editor/ 포함된 문자를 상단 파일 경로에 포함시킬수 없습니다.';
|
||||||
}
|
}
|
||||||
// 저장·검증 전에 경로를 먼저 정규화하여, 검증 이후 경로가 달라지지 않도록 한다.
|
|
||||||
if (function_exists('filter_input_include_path')) {
|
if( $co_include_tail && ! is_include_path_check($co_include_tail) ){
|
||||||
$co_include_head = filter_input_include_path($co_include_head);
|
$co_include_tail = '';
|
||||||
$co_include_tail = filter_input_include_path($co_include_tail);
|
$error_msg = '/data/file/ 또는 /data/editor/ 포함된 문자를 하단 파일 경로에 포함시킬수 없습니다.';
|
||||||
}
|
}
|
||||||
|
|
||||||
$co_tag_filter_use = isset($_POST['co_tag_filter_use']) ? (int) $_POST['co_tag_filter_use'] : 1;
|
$sql_common = " co_include_head = '$co_include_head',
|
||||||
$co_himg_del = (isset($_POST['co_himg_del']) && $_POST['co_himg_del']) ? 1 : 0;
|
co_include_tail = '$co_include_tail',
|
||||||
$co_timg_del = (isset($_POST['co_timg_del']) && $_POST['co_timg_del']) ? 1 : 0;
|
co_html = '$co_html',
|
||||||
$co_html = isset($_POST['co_html']) ? (int) $_POST['co_html'] : 0;
|
co_tag_filter_use = '$co_tag_filter_use',
|
||||||
$co_content = isset($_POST['co_content']) ? $_POST['co_content'] : '';
|
co_subject = '$co_subject',
|
||||||
$co_mobile_content = isset($_POST['co_mobile_content']) ? $_POST['co_mobile_content'] : '';
|
co_content = '$co_content',
|
||||||
$co_skin = isset($_POST['co_skin']) ? addslashes(clean_xss_tags(stripslashes($_POST['co_skin']), 1, 1)) : '';
|
co_mobile_content = '$co_mobile_content',
|
||||||
$co_mobile_skin = isset($_POST['co_mobile_skin']) ? addslashes(clean_xss_tags(stripslashes($_POST['co_mobile_skin']), 1, 1)) : '';
|
co_skin = '$co_skin',
|
||||||
|
co_mobile_skin = '$co_mobile_skin' ";
|
||||||
// 관리자가 자동등록방지를 사용해야 할 경우
|
|
||||||
if (((isset($co_row['co_include_head']) && $co_row['co_include_head'] !== $co_include_head) || (isset($co_row['co_include_tail']) && $co_row['co_include_tail'] !== $co_include_tail)) && function_exists('get_admin_captcha_by') && get_admin_captcha_by()) {
|
if ($w == "")
|
||||||
include_once G5_CAPTCHA_PATH . '/captcha.lib.php';
|
{
|
||||||
|
//if(eregi("[^a-z0-9_]", $co_id)) alert("ID 는 영문자, 숫자, _ 만 가능합니다.");
|
||||||
if (!chk_captcha()) {
|
if(preg_match("/[^a-z0-9_]/i", $co_id)) alert("ID 는 영문자, 숫자, _ 만 가능합니다.");
|
||||||
alert('자동등록방지 숫자가 틀렸습니다.');
|
|
||||||
}
|
$sql = " select co_id from {$g5['content_table']} where co_id = '$co_id' ";
|
||||||
}
|
$row = sql_fetch($sql);
|
||||||
|
if ($row['co_id'])
|
||||||
@mkdir(G5_DATA_PATH . "/content", G5_DIR_PERMISSION);
|
alert("이미 같은 ID로 등록된 내용이 있습니다.");
|
||||||
@chmod(G5_DATA_PATH . "/content", G5_DIR_PERMISSION);
|
|
||||||
|
$sql = " insert {$g5['content_table']}
|
||||||
if ($co_himg_del) {
|
set co_id = '$co_id',
|
||||||
@unlink(G5_DATA_PATH . "/content/{$co_id}_h");
|
$sql_common ";
|
||||||
}
|
sql_query($sql);
|
||||||
if ($co_timg_del) {
|
}
|
||||||
@unlink(G5_DATA_PATH . "/content/{$co_id}_t");
|
else if ($w == "u")
|
||||||
}
|
{
|
||||||
|
$sql = " update {$g5['content_table']}
|
||||||
$error_msg = '';
|
set $sql_common
|
||||||
|
where co_id = '$co_id' ";
|
||||||
if ($co_include_head) {
|
sql_query($sql);
|
||||||
$file_ext = pathinfo($co_include_head, PATHINFO_EXTENSION);
|
}
|
||||||
|
else if ($w == "d")
|
||||||
if (!$file_ext || !in_array($file_ext, array('php', 'htm', 'html')) || !preg_match('/^.*\.(php|htm|html)$/i', $co_include_head)) {
|
{
|
||||||
alert('상단 파일 경로의 확장자는 php, htm, html 만 허용합니다.');
|
@unlink(G5_DATA_PATH."/content/{$co_id}_h");
|
||||||
}
|
@unlink(G5_DATA_PATH."/content/{$co_id}_t");
|
||||||
}
|
|
||||||
|
$sql = " delete from {$g5['content_table']} where co_id = '$co_id' ";
|
||||||
if ($co_include_tail) {
|
sql_query($sql);
|
||||||
$file_ext = pathinfo($co_include_tail, PATHINFO_EXTENSION);
|
}
|
||||||
|
|
||||||
if (!$file_ext || !in_array($file_ext, array('php', 'htm', 'html')) || !preg_match('/^.*\.(php|htm|html)$/i', $co_include_tail)) {
|
if ($w == "" || $w == "u")
|
||||||
alert('하단 파일 경로의 확장자는 php, htm, html 만 허용합니다.');
|
{
|
||||||
}
|
if ($_FILES['co_himg']['name'])
|
||||||
}
|
{
|
||||||
|
$dest_path = G5_DATA_PATH."/content/".$co_id."_h";
|
||||||
if ($co_include_head && function_exists('is_content_include_allowed') && !is_content_include_allowed($co_include_head)) {
|
@move_uploaded_file($_FILES['co_himg']['tmp_name'], $dest_path);
|
||||||
alert('상단 파일 경로로 사용할 수 없는 위치입니다.');
|
@chmod($dest_path, G5_FILE_PERMISSION);
|
||||||
}
|
}
|
||||||
|
if ($_FILES['co_timg']['name'])
|
||||||
if ($co_include_tail && function_exists('is_content_include_allowed') && !is_content_include_allowed($co_include_tail)) {
|
{
|
||||||
alert('하단 파일 경로로 사용할 수 없는 위치입니다.');
|
$dest_path = G5_DATA_PATH."/content/".$co_id."_t";
|
||||||
}
|
@move_uploaded_file($_FILES['co_timg']['tmp_name'], $dest_path);
|
||||||
|
@chmod($dest_path, G5_FILE_PERMISSION);
|
||||||
if ($co_include_head && !is_include_path_check($co_include_head, 1)) {
|
}
|
||||||
$co_include_head = '';
|
|
||||||
$error_msg = '/data/file/ 또는 /data/editor/ 포함된 문자를 상단 파일 경로에 포함시킬수 없습니다.';
|
if( $error_msg ){
|
||||||
}
|
alert($error_msg, "./contentform.php?w=u&co_id=$co_id");
|
||||||
|
} else {
|
||||||
if ($co_include_tail && !is_include_path_check($co_include_tail, 1)) {
|
goto_url("./contentform.php?w=u&co_id=$co_id");
|
||||||
$co_include_tail = '';
|
}
|
||||||
$error_msg = '/data/file/ 또는 /data/editor/ 포함된 문자를 하단 파일 경로에 포함시킬수 없습니다.';
|
}
|
||||||
}
|
else
|
||||||
|
{
|
||||||
$co_seo_title = exist_seo_title_recursive('content', generate_seo_title($co_subject), $g5['content_table'], $co_id);
|
goto_url("./contentlist.php");
|
||||||
|
}
|
||||||
$sql_common = " co_include_head = '$co_include_head',
|
?>
|
||||||
co_include_tail = '$co_include_tail',
|
|
||||||
co_html = '$co_html',
|
|
||||||
co_tag_filter_use = '$co_tag_filter_use',
|
|
||||||
co_subject = '$co_subject',
|
|
||||||
co_content = '$co_content',
|
|
||||||
co_mobile_content = '$co_mobile_content',
|
|
||||||
co_seo_title = '$co_seo_title',
|
|
||||||
co_skin = '$co_skin',
|
|
||||||
co_mobile_skin = '$co_mobile_skin' ";
|
|
||||||
|
|
||||||
if ($w == "") {
|
|
||||||
$row = $co_row;
|
|
||||||
if (isset($row['co_id']) && $row['co_id']) {
|
|
||||||
alert("이미 같은 ID로 등록된 내용이 있습니다.");
|
|
||||||
}
|
|
||||||
|
|
||||||
$sql = " insert {$g5['content_table']}
|
|
||||||
set co_id = '$co_id',
|
|
||||||
$sql_common ";
|
|
||||||
sql_query($sql);
|
|
||||||
run_event('admin_content_created', $co_id);
|
|
||||||
} elseif ($w == "u") {
|
|
||||||
$sql = " update {$g5['content_table']}
|
|
||||||
set $sql_common
|
|
||||||
where co_id = '$co_id' ";
|
|
||||||
sql_query($sql);
|
|
||||||
run_event('admin_content_updated', $co_id);
|
|
||||||
} elseif ($w == "d") {
|
|
||||||
@unlink(G5_DATA_PATH . "/content/{$co_id}_h");
|
|
||||||
@unlink(G5_DATA_PATH . "/content/{$co_id}_t");
|
|
||||||
|
|
||||||
$sql = " delete from {$g5['content_table']} where co_id = '$co_id' ";
|
|
||||||
sql_query($sql);
|
|
||||||
run_event('admin_content_deleted', $co_id);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (function_exists('get_admin_captcha_by')) {
|
|
||||||
get_admin_captcha_by('remove');
|
|
||||||
}
|
|
||||||
|
|
||||||
g5_delete_cache_by_prefix('content-' . $co_id . '-');
|
|
||||||
|
|
||||||
if ($w == "" || $w == "u") {
|
|
||||||
foreach (array('co_himg', 'co_timg') as $content_img_field) {
|
|
||||||
if (empty($_FILES[$content_img_field]['name']) || empty($_FILES[$content_img_field]['tmp_name']))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
// 상단/하단 이미지 슬롯에는 이미지만 허용하고, 실행 가능한 태그가 담긴 파일은 거부한다.
|
|
||||||
$tmp_file = $_FILES[$content_img_field]['tmp_name'];
|
|
||||||
$is_valid_image = @getimagesize($tmp_file);
|
|
||||||
$head_bytes = @file_get_contents($tmp_file, false, null, 0, 8192);
|
|
||||||
|
|
||||||
if ($is_valid_image === false || ($head_bytes !== false && preg_match('/<\?php|<\?=|<\?|<script/i', $head_bytes))) {
|
|
||||||
alert('상단/하단 이미지에는 이미지 파일만 등록할 수 있습니다.');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($_FILES['co_himg']['name']) {
|
|
||||||
$dest_path = G5_DATA_PATH . "/content/" . $co_id . "_h";
|
|
||||||
@move_uploaded_file($_FILES['co_himg']['tmp_name'], $dest_path);
|
|
||||||
@chmod($dest_path, G5_FILE_PERMISSION);
|
|
||||||
}
|
|
||||||
if ($_FILES['co_timg']['name']) {
|
|
||||||
$dest_path = G5_DATA_PATH . "/content/" . $co_id . "_t";
|
|
||||||
@move_uploaded_file($_FILES['co_timg']['tmp_name'], $dest_path);
|
|
||||||
@chmod($dest_path, G5_FILE_PERMISSION);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($error_msg) {
|
|
||||||
alert($error_msg, "./contentform.php?w=u&co_id=$co_id");
|
|
||||||
} else {
|
|
||||||
goto_url("./contentform.php?w=u&co_id=$co_id");
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
goto_url("./contentlist.php");
|
|
||||||
}
|
|
||||||
|
|||||||
+98
-78
@@ -1,78 +1,98 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = '300600';
|
$sub_menu = '300600';
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, "r");
|
auth_check($auth[$sub_menu], "r");
|
||||||
|
|
||||||
if (!isset($g5['content_table'])) {
|
if( !isset($g5['content_table']) ){
|
||||||
die('<meta charset="utf-8">/data/dbconfig.php 파일에 <strong>$g5[\'content_table\'] = G5_TABLE_PREFIX.\'content\';</strong> 를 추가해 주세요.');
|
die('<meta charset="utf-8">/data/dbconfig.php 파일에 <strong>$g5[\'content_table\'] = G5_TABLE_PREFIX.\'content\';</strong> 를 추가해 주세요.');
|
||||||
}
|
}
|
||||||
//내용(컨텐츠)정보 테이블이 있는지 검사한다.
|
//내용(컨텐츠)정보 테이블이 있는지 검사한다.
|
||||||
|
if(!sql_query(" DESCRIBE {$g5['content_table']} ", false)) {
|
||||||
$g5['title'] = '내용관리';
|
if(sql_query(" DESCRIBE {$g5['g5_shop_content_table']} ", false)) {
|
||||||
require_once G5_ADMIN_PATH . '/admin.head.php';
|
sql_query(" ALTER TABLE {$g5['g5_shop_content_table']} RENAME TO `{$g5['content_table']}` ;", false);
|
||||||
|
} else {
|
||||||
$sql_common = " from {$g5['content_table']} ";
|
$query_cp = sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['content_table']}` (
|
||||||
|
`co_id` varchar(20) NOT NULL DEFAULT '',
|
||||||
// 테이블의 전체 레코드수만 얻음
|
`co_html` tinyint(4) NOT NULL DEFAULT '0',
|
||||||
$sql = " select count(*) as cnt " . $sql_common;
|
`co_subject` varchar(255) NOT NULL DEFAULT '',
|
||||||
$row = sql_fetch($sql);
|
`co_content` longtext NOT NULL,
|
||||||
$total_count = $row['cnt'];
|
`co_hit` int(11) NOT NULL DEFAULT '0',
|
||||||
|
`co_include_head` varchar(255) NOT NULL,
|
||||||
$rows = $config['cf_page_rows'];
|
`co_include_tail` varchar(255) NOT NULL,
|
||||||
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
PRIMARY KEY (`co_id`)
|
||||||
if ($page < 1) {
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ", true);
|
||||||
$page = 1;
|
|
||||||
} // 페이지가 없으면 첫 페이지 (1 페이지)
|
// 내용관리 생성
|
||||||
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
sql_query(" insert into `{$g5['content_table']}` set co_id = 'company', co_html = '1', co_subject = '회사소개', co_content= '<p align=center><b>회사소개에 대한 내용을 입력하십시오.</b></p>' ", false );
|
||||||
|
sql_query(" insert into `{$g5['content_table']}` set co_id = 'privacy', co_html = '1', co_subject = '개인정보 처리방침', co_content= '<p align=center><b>개인정보 처리방침에 대한 내용을 입력하십시오.</b></p>' ", false );
|
||||||
$sql = "select * $sql_common order by co_id limit $from_record, {$config['cf_page_rows']} ";
|
sql_query(" insert into `{$g5['content_table']}` set co_id = 'provision', co_html = '1', co_subject = '서비스 이용약관', co_content= '<p align=center><b>서비스 이용약관에 대한 내용을 입력하십시오.</b></p>' ", false );
|
||||||
$result = sql_query($sql);
|
}
|
||||||
?>
|
}
|
||||||
|
|
||||||
<div class="local_ov01 local_ov">
|
$g5['title'] = '내용관리';
|
||||||
<?php if ($page > 1) { ?><a href="<?php echo $_SERVER['SCRIPT_NAME']; ?>">처음으로</a><?php } ?>
|
include_once (G5_ADMIN_PATH.'/admin.head.php');
|
||||||
<span class="btn_ov01"><span class="ov_txt">전체 내용</span><span class="ov_num"> <?php echo $total_count; ?>건</span></span>
|
|
||||||
</div>
|
$sql_common = " from {$g5['content_table']} ";
|
||||||
|
|
||||||
<div class="btn_fixed_top">
|
// 테이블의 전체 레코드수만 얻음
|
||||||
<a href="./contentform.php" class="btn btn_01">내용 추가</a>
|
$sql = " select count(*) as cnt " . $sql_common;
|
||||||
</div>
|
$row = sql_fetch($sql);
|
||||||
|
$total_count = $row['cnt'];
|
||||||
<div class="tbl_head01 tbl_wrap">
|
|
||||||
<table>
|
$rows = $config['cf_page_rows'];
|
||||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
||||||
<thead>
|
if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||||
<tr>
|
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
||||||
<th scope="col">ID</th>
|
|
||||||
<th scope="col">제목</th>
|
$sql = "select * $sql_common order by co_id limit $from_record, {$config['cf_page_rows']} ";
|
||||||
<th scope="col">관리</th>
|
$result = sql_query($sql);
|
||||||
</tr>
|
?>
|
||||||
</thead>
|
|
||||||
<tbody>
|
<div class="local_ov01 local_ov">
|
||||||
<?php for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
<?php if ($page > 1) {?><a href="<?php echo $_SERVER['SCRIPT_NAME']; ?>">처음으로</a><?php } ?>
|
||||||
$bg = 'bg' . ($i % 2);
|
<span class="btn_ov01"><span class="ov_txt">전체 내용</span><span class="ov_num"> <?php echo $total_count; ?>건</span></span>
|
||||||
?>
|
</div>
|
||||||
<tr class="<?php echo $bg; ?>">
|
|
||||||
<td class="td_id"><?php echo $row['co_id']; ?></td>
|
<div class="btn_fixed_top">
|
||||||
<td class="td_left"><?php echo htmlspecialchars2($row['co_subject']); ?></td>
|
<a href="./contentform.php" class="btn btn_01">내용 추가</a>
|
||||||
<td class="td_mng td_mng_l">
|
</div>
|
||||||
<a href="./contentform.php?w=u&co_id=<?php echo $row['co_id']; ?>" class="btn btn_03"><span class="sound_only"><?php echo htmlspecialchars2($row['co_subject']); ?> </span>수정</a>
|
|
||||||
<a href="<?php echo get_pretty_url('content', $row['co_id']); ?>" class="btn btn_02"><span class="sound_only"><?php echo htmlspecialchars2($row['co_subject']); ?> </span> 보기</a>
|
<div class="tbl_head01 tbl_wrap">
|
||||||
<a href="./contentformupdate.php?w=d&co_id=<?php echo $row['co_id']; ?>" onclick="return delete_confirm(this);" class="btn btn_02"><span class="sound_only"><?php echo htmlspecialchars2($row['co_subject']); ?> </span>삭제</a>
|
<table>
|
||||||
</td>
|
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||||
</tr>
|
<thead>
|
||||||
<?php
|
<tr>
|
||||||
}
|
<th scope="col">ID</th>
|
||||||
if ($i == 0) {
|
<th scope="col">제목</th>
|
||||||
echo '<tr><td colspan="3" class="empty_table">자료가 한건도 없습니다.</td></tr>';
|
<th scope="col">관리</th>
|
||||||
}
|
</tr>
|
||||||
?>
|
</thead>
|
||||||
</tbody>
|
<tbody>
|
||||||
</table>
|
<?php for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||||
</div>
|
$bg = 'bg'.($i%2);
|
||||||
|
?>
|
||||||
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['SCRIPT_NAME']}?$qstr&page="); ?>
|
<tr class="<?php echo $bg; ?>">
|
||||||
|
<td class="td_id"><?php echo $row['co_id']; ?></td>
|
||||||
<?php
|
<td class="td_left"><?php echo htmlspecialchars2($row['co_subject']); ?></td>
|
||||||
require_once G5_ADMIN_PATH . '/admin.tail.php';
|
<td class="td_mng td_mng_l">
|
||||||
|
<a href="./contentform.php?w=u&co_id=<?php echo $row['co_id']; ?>" class="btn btn_03"><span class="sound_only"><?php echo htmlspecialchars2($row['co_subject']); ?> </span>수정</a>
|
||||||
|
<a href="<?php echo G5_BBS_URL; ?>/content.php?co_id=<?php echo $row['co_id']; ?>" class="btn btn_02"><span class="sound_only"><?php echo htmlspecialchars2($row['co_subject']); ?> </span> 보기</a>
|
||||||
|
<a href="./contentformupdate.php?w=d&co_id=<?php echo $row['co_id']; ?>" onclick="return delete_confirm(this);" class="btn btn_02"><span class="sound_only"><?php echo htmlspecialchars2($row['co_subject']); ?> </span>삭제</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
if ($i == 0) {
|
||||||
|
echo '<tr><td colspan="3" 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&page="); ?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
include_once (G5_ADMIN_PATH.'/admin.tail.php');
|
||||||
|
?>
|
||||||
|
|||||||
+101
-560
@@ -13,57 +13,23 @@ legend {position:absolute;margin:0;padding:0;font-size:0;line-height:0;text-inde
|
|||||||
label, input, button, select, img {vertical-align:middle}
|
label, input, button, select, img {vertical-align:middle}
|
||||||
input, button {margin:0;padding:0;font-family:'Malgun Gothic',"맑은 고딕",AppleGothic,Dotum,"돋움", sans-serif;font-size:1em}
|
input, button {margin:0;padding:0;font-family:'Malgun Gothic',"맑은 고딕",AppleGothic,Dotum,"돋움", sans-serif;font-size:1em}
|
||||||
button,input[type="submit"] {cursor:pointer}
|
button,input[type="submit"] {cursor:pointer}
|
||||||
textarea, select {font-family:'Malgun Gothic',"맑은 고딕",AppleGothic,Dotum,"돋움", sans-serif;font-size:1em}
|
textarea, select {font-family:'Malgun Gothic',"맑은 고딕",AppleGothic,Dotum,"돋움", sans-serif;;font-size:1em}
|
||||||
select {margin:0}
|
select {margin:0}
|
||||||
p {margin:0;padding:0;word-break:break-all}
|
p {margin:0;padding:0;word-break:break-all}
|
||||||
pre {overflow-x:scroll;font-size:1.1em}
|
pre {overflow-x:scroll;font-size:1.1em}
|
||||||
a:link, a:visited {color:#000;text-decoration:none}
|
a:link, a:visited {color:#000;text-decoration:none}
|
||||||
|
|
||||||
* {
|
* {
|
||||||
-webkit-box-sizing: border-box;
|
-webkit-box-sizing: border-box;
|
||||||
-moz-box-sizing: border-box;
|
-moz-box-sizing: border-box;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
h2{font-size: 1.083em;font-weight: bold;margin:10px 0}
|
h2{font-size: 1.083em;font-weight: bold;margin:10px 0}
|
||||||
|
|
||||||
#wrapper {min-height:480px}
|
|
||||||
|
|
||||||
/* admin 공통 */
|
|
||||||
/* 공통 - display none/block */
|
|
||||||
.is-hidden { display: none !important; }
|
|
||||||
.is-visible { display: block !important; }
|
|
||||||
|
|
||||||
/* 공통 - 뷰포트 (pc / mobile) 별 display none/block */
|
|
||||||
.pc-only { display: none; }
|
|
||||||
@media (min-width: 769px) { .pc-only { display: block !important; }}
|
|
||||||
.mobile-only { display: block; }
|
|
||||||
@media (min-width: 769px) { .mobile-only { display: none !important; }}
|
|
||||||
|
|
||||||
/* 공통 - 레이어 팝업 */
|
|
||||||
.popup-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.3); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); z-index: 9999; display: flex; justify-content: center; align-items: center; }
|
|
||||||
.popup-content { background: #fff; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.15); width: 800px; overflow: hidden; }
|
|
||||||
.popup-header, .popup-footer { padding: 18px 20px; display: flex; align-items: center; }
|
|
||||||
.popup-header { justify-content: space-between; border-bottom: 1px solid #e0e0e0; }
|
|
||||||
.popup-footer { gap: 20px; border-top: 1px solid #e0e0e0;}
|
|
||||||
.popup-close-btn { background: none; border: none; color: #888; font-size: 20px; cursor: pointer; padding: 4px; display: flex; align-items: center; justify-content: center; transition: color 0.2s ease; }
|
|
||||||
.popup-close-btn:hover { color: #333; }
|
|
||||||
.popup-title { font-size: 18px; font-weight: 600; }
|
|
||||||
.popup-body { padding: 20px; max-height: 400px; overflow-y: auto; color: #333; }
|
|
||||||
.popup-footer button { background: #3d70ff; color: white; border: 1px solid #3d70ff; padding: 8px 16px; border-radius: 6px; font-weight: 600; cursor: pointer; transition: background 0.2s ease, border-color 0.2s ease; }
|
|
||||||
.popup-footer button:hover { background: #2b3d9f; border-color: #2b3d9f; }
|
|
||||||
|
|
||||||
/* 공통 - tab */
|
|
||||||
.tab-container { display: flex; flex-direction: column; width: 100%; }
|
|
||||||
.tab-header { position: relative; bottom: -1px; display: flex; }
|
|
||||||
.tab-btn { padding: 10px 14px; background: none; border: none; border-bottom: 2px solid transparent; cursor: pointer; color: inherit; font: inherit; }
|
|
||||||
.tab-btn.active { border-bottom-color: #000; font-weight: bold; }
|
|
||||||
.tab-body { width: 100%; border-top: 1px solid #ccc; }
|
|
||||||
.tab-content { padding: 16px 0; }
|
|
||||||
|
|
||||||
/* 레이아웃 */
|
/* 레이아웃 */
|
||||||
#hd h1 {position:absolute;font-size:0;line-height:0;overflow:hidden}
|
#hd h1 {position:absolute;font-size:0;line-height:0;overflow:hidden}
|
||||||
#hd_top{position:fixed;top:0;left:0;width:100%;height:50px;background:#3f51b5;z-index:1000}
|
#hd_top{position:fixed;top:0;left:0;width:100%;width:100%;height:50px;background:#3f51b5;z-index:1000}
|
||||||
#hd_top:after{display:block;visibility:hidden;clear:both;content:""}
|
#hd_top:after{display:block;visibility:hidden;clear:both;content:""}
|
||||||
#logo{background:#2f409f;height:100%;float:left;width:220px;padding:15px 0 15px 50px;text-align:center}
|
#logo{background:#2f409f;height:100%;float:left;width:220px;padding:15px 0 15px 50px;text-align:center}
|
||||||
#btn_gnb{background:url(../img/menu-cl.png) 50% 50% no-repeat #223390;width:50px;height:50px;border:0;position:absolute;top:0;left:0;text-indent:-999px;overflow:hidden}
|
#btn_gnb{background:url(../img/menu-cl.png) 50% 50% no-repeat #223390;width:50px;height:50px;border:0;position:absolute;top:0;left:0;text-indent:-999px;overflow:hidden}
|
||||||
@@ -72,12 +38,12 @@ h2{font-size: 1.083em;font-weight: bold;margin:10px 0}
|
|||||||
#tnb{float:right;padding:10px}
|
#tnb{float:right;padding:10px}
|
||||||
#tnb ul:after{display:block;visibility:hidden;clear:both;content:""}
|
#tnb ul:after{display:block;visibility:hidden;clear:both;content:""}
|
||||||
#tnb li{float:left;position:relative;margin-left:3px}
|
#tnb li{float:left;position:relative;margin-left:3px}
|
||||||
#tnb a{color:#fff;padding:0 10px;display:block;line-height:30px;}
|
#tnb a{color:#fff;;padding:0 10px;display:block;line-height:30px;}
|
||||||
#tnb .tnb_service{border-radius:3px;background:#4e5eb7;color:#fff;padding:0 10px;text-align:left;height:30px;line-height:30px;}
|
#tnb .tnb_service{border-radius:3px;background:#4e5eb7;color:#fff;padding:0 10px;text-align:left;height:30px;line-height:30px;}
|
||||||
#tnb .tnb_service:hover{background:#5969c3}
|
#tnb .tnb_service:hover{background:#5969c3}
|
||||||
#tnb button{width:100px;border:0;border-radius:3px;background:#4e5eb7;color:#fff;padding:0 30px 0 10px;text-align:left;height:30px;position:relative;text-overflow: ellipsis;overflow: hidden;white-space: nowrap;}
|
#tnb button{width:100px;;border:0;border-radius:3px;background:#4e5eb7;color:#fff;padding:0 30px 0 10px;text-align:left;height:30px;position:relative;text-overflow: ellipsis;overflow: hidden;white-space: nowrap;}
|
||||||
#tnb button span{display:block;text-indent:-999px;overflow:hidden;width:30px;border-radius:3px;height:30px;position:absolute;top:0;right:0;background:url(../img/op_btn.png) 50% 50% no-repeat #5969c3}
|
#tnb button span{display:block;text-indent:-999px;overflow:hidden;width:30px;border-radius:3px;height:30px;position:absolute;top:0;right:0;background:url(../img/op_btn.png) 50% 50% no-repeat #5969c3}
|
||||||
#tnb button:hover {background:#5969c3}
|
#tnb button:hover {background:#5969c3}
|
||||||
#tnb .tnb_mb_area{display:none;background:#5e6dc2;width:100px;position:absolute;padding:5px;margin-top:1px;}
|
#tnb .tnb_mb_area{display:none;background:#5e6dc2;width:100px;position:absolute;padding:5px;margin-top:1px;}
|
||||||
#tnb .tnb_mb_area a{padding:0}
|
#tnb .tnb_mb_area a{padding:0}
|
||||||
#tnb .tnb_mb_area li{float:none;}
|
#tnb .tnb_mb_area li{float:none;}
|
||||||
@@ -92,25 +58,23 @@ h2{font-size: 1.083em;font-weight: bold;margin:10px 0}
|
|||||||
#gnb .gnb_ul{position:relative;height:100%;background:#ebebeb;width:50px}
|
#gnb .gnb_ul{position:relative;height:100%;background:#ebebeb;width:50px}
|
||||||
#gnb .gnb_li{border-bottom:1px solid #ddd }
|
#gnb .gnb_li{border-bottom:1px solid #ddd }
|
||||||
#gnb .gnb_li button{background-color: #ebebeb;border:0;width:50px;height:50px;text-indent:-999px;overflow:hidden;}
|
#gnb .gnb_li button{background-color: #ebebeb;border:0;width:50px;height:50px;text-indent:-999px;overflow:hidden;}
|
||||||
#gnb .gnb_li .btn_op{background:url(../img/menu_default.png) 50% 50% no-repeat #ebebeb}
|
#gnb .gnb_li .menu-1{background:url(../img/menu-1-1.png) 50% 50% no-repeat #ebebeb }
|
||||||
#gnb .on .btn_op{background:url(../img/menu_default_on.png) 50% 50% no-repeat #fff}
|
#gnb .on .menu-1{background:url(../img/menu-1.png) 50% 50% no-repeat #fff}
|
||||||
#gnb .gnb_li .btn_op.menu-100{background:url(../img/menu-1-1.png) 50% 50% no-repeat #ebebeb }
|
#gnb .gnb_li .menu-2{background:url(../img/menu-2-1.png) 50% 50% no-repeat #ebebeb }
|
||||||
#gnb .on .btn_op.menu-100{background:url(../img/menu-1.png) 50% 50% no-repeat #fff}
|
#gnb .on .menu-2{background:url(../img/menu-2.png) 50% 50% no-repeat #fff}
|
||||||
#gnb .gnb_li .btn_op.menu-200{background:url(../img/menu-2-1.png) 50% 50% no-repeat #ebebeb }
|
#gnb .gnb_li .menu-3{background:url(../img/menu-3-1.png) 50% 50% no-repeat #ebebeb }
|
||||||
#gnb .on .btn_op.menu-200{background:url(../img/menu-2.png) 50% 50% no-repeat #fff}
|
#gnb .on .menu-3{background:url(../img/menu-3.png) 50% 50% no-repeat #fff}
|
||||||
#gnb .gnb_li .btn_op.menu-300{background:url(../img/menu-3-1.png) 50% 50% no-repeat #ebebeb }
|
#gnb .gnb_li .menu-4{background:url(../img/menu-7-1.png) 50% 50% no-repeat #ebebeb }
|
||||||
#gnb .on .btn_op.menu-300{background:url(../img/menu-3.png) 50% 50% no-repeat #fff}
|
#gnb .on .menu-4{background:url(../img/menu-7.png) 50% 50% no-repeat #fff}
|
||||||
#gnb .gnb_li .btn_op.menu-400{background:url(../img/menu-7-1.png) 50% 50% no-repeat #ebebeb }
|
#gnb .gnb_li .menu-5{background:url(../img/menu-6-1.png) 50% 50% no-repeat #ebebeb }
|
||||||
#gnb .on .btn_op.menu-400{background:url(../img/menu-7.png) 50% 50% no-repeat #fff}
|
#gnb .on .menu-5{background:url(../img/menu-6.png) 50% 50% no-repeat #fff}
|
||||||
#gnb .gnb_li .btn_op.menu-500{background:url(../img/menu-6-1.png) 50% 50% no-repeat #ebebeb }
|
#gnb .gnb_li .menu-6{background:url(../img/menu-4-1.png) 50% 50% no-repeat #ebebeb }
|
||||||
#gnb .on .btn_op.menu-500{background:url(../img/menu-6.png) 50% 50% no-repeat #fff}
|
#gnb .on .menu-6{background:url(../img/menu-4.png) 50% 50% no-repeat #fff}
|
||||||
#gnb .gnb_li .btn_op.menu-900{background:url(../img/menu-4-1.png) 50% 50% no-repeat #ebebeb }
|
|
||||||
#gnb .on .btn_op.menu-900{background:url(../img/menu-4.png) 50% 50% no-repeat #fff}
|
|
||||||
#gnb .gnb_li button:hover{background-color:#f3f3f3}
|
#gnb .gnb_li button:hover{background-color:#f3f3f3}
|
||||||
#gnb .gnb_oparea{display:none;position:absolute;top:0;left:50px;background:#fff;height:100%;width:170px;padding:20px;border-right:1px solid #dbdbdb;
|
#gnb .gnb_oparea{display:none;position:absolute;top:0;left:50px;background:#fff;height:100%;width:170px;padding:20px;border-right:1px solid #dbdbdb;
|
||||||
-webkit-box-shadow: 2px 0 2px rgba(150,150,150,100.1);
|
-webkit-box-shadow: 2px 0 2px rgba(150,150,150,100.1);
|
||||||
-moz-box-shadow: 2px 0 2px rgba(150,150,150,0.1);
|
-moz-box-shadow: 2px 0 2px rgba(150,150,150,0.1);
|
||||||
box-shadow: 2px 0 2px rgba(150,150,150,0.1);}
|
box-shadow: 2px 0 2px rgba(150,150,150,0.1);}
|
||||||
#gnb .on .gnb_oparea{display:block}
|
#gnb .on .gnb_oparea{display:block}
|
||||||
#gnb .gnb_oparea h3{margin-bottom:10px;line-height:18px;font-size:1.17em}
|
#gnb .gnb_oparea h3{margin-bottom:10px;line-height:18px;font-size:1.17em}
|
||||||
#gnb .gnb_oparea li{line-height:28px}
|
#gnb .gnb_oparea li{line-height:28px}
|
||||||
@@ -128,11 +92,9 @@ box-shadow: 2px 0 2px rgba(150,150,150,0.1);}
|
|||||||
#container.container-small #container_title{padding-left:70px}
|
#container.container-small #container_title{padding-left:70px}
|
||||||
.container_wr{padding:20px}
|
.container_wr{padding:20px}
|
||||||
|
|
||||||
/* 화면낭독기 사용자용 (스크린 리더 대응) */
|
/* 화면낭독기 사용자용 */
|
||||||
/* 일반적인 .blind/.sr-only 사용시에 .sound_only 사용 권장 */
|
|
||||||
#hd_login_msg {position:absolute;top:0;left:0;width:1px;height:1px;overflow:hidden}
|
#hd_login_msg {position:absolute;top:0;left:0;width:1px;height:1px;overflow:hidden}
|
||||||
.sound_only, .msg_sound_only {overflow:hidden;position:absolute;width:1px;height:1px;margin:-1px;padding:0;clip:rect(0,0,0,0)}
|
.msg_sound_only, .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}
|
||||||
|
|
||||||
/* 본문 바로가기 */
|
/* 본문 바로가기 */
|
||||||
#to_content a {z-index:100000;position:absolute;top:0;left:0;font-size:0;line-height:0;overflow:hidden}
|
#to_content a {z-index:100000;position:absolute;top:0;left:0;font-size:0;line-height:0;overflow:hidden}
|
||||||
#to_content a:focus, #to_content a:active {width:100%;height:70px;background:#fff;font-size:2em;font-weight:bold;text-align:center;text-decoration:none;line-height:3.1em}
|
#to_content a:focus, #to_content a:active {width:100%;height:70px;background:#fff;font-size:2em;font-weight:bold;text-align:center;text-decoration:none;line-height:3.1em}
|
||||||
@@ -179,7 +141,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}
|
||||||
@@ -213,16 +174,14 @@ a.btn_submit{background:#ff4081;color:#fff}
|
|||||||
|
|
||||||
.btn_add01 {text-align:right}
|
.btn_add01 {text-align:right}
|
||||||
.btn_add01 a, .btn_add01 button {padding:10px;border:1px solid #ccc;background:#f0f0f0;text-decoration:none;cursor:pointer}
|
.btn_add01 a, .btn_add01 button {padding:10px;border:1px solid #ccc;background:#f0f0f0;text-decoration:none;cursor:pointer}
|
||||||
.btn_add01 a {display:inline-block;vertical-align:middle}
|
.btn_add01 a {display:inline-block;vertical-align:middle}btn_confirm
|
||||||
.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;border:0;;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}
|
||||||
|
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{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}
|
||||||
a.btn_submit{background:#ff4081;color:#fff}
|
a.btn_submit{background:#ff4081;color:#fff}
|
||||||
.btn_submit:hover{background:#ff1464}
|
.btn_submit:hover{background:#ff1464}
|
||||||
@@ -233,7 +192,7 @@ a.btn_submit{background:#ff4081;color:#fff}
|
|||||||
.btn_03,a.btn_03{background:#3f51b5;color:#fff;}
|
.btn_03,a.btn_03{background:#3f51b5;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: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}
|
||||||
@@ -243,9 +202,9 @@ a.btn_ov02:hover,a.ov_listall:hover{background:#3f51b5}
|
|||||||
|
|
||||||
/*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{padding:0 5px;height:35px;line-height:32px;border:1px solid #d5d5d5;}
|
.frm_input{height:35px;line-height:32px;border:1px solid #d5d5d5;}
|
||||||
.frm_input_full{width:100%}
|
.frm_input_full{width:100%}
|
||||||
.required{background:url('../img/wrest.gif') top right no-repeat #fff !important}
|
.required{background:url('../img/wrest.gif') top right no-repeat #fff !important}
|
||||||
select{height:35px;line-height:32px;border:1px solid #d5d5d5;}
|
select{height:35px;line-height:32px;border:1px solid #d5d5d5;}
|
||||||
textarea{width:100%;border:1px solid #d5d5d5;min-height:80px}
|
textarea{width:100%;border:1px solid #d5d5d5;min-height:80px}
|
||||||
legend {position:absolute;width:0;height:0;font-size:0;line-height:0;text-indent:-9999em;border:0;overflow:hidden}
|
legend {position:absolute;width:0;height:0;font-size:0;line-height:0;text-indent:-9999em;border:0;overflow:hidden}
|
||||||
@@ -253,7 +212,7 @@ legend {position:absolute;width:0;height:0;font-size:0;line-height:0;text-indent
|
|||||||
|
|
||||||
/* 외부서비스 사이트코드 */
|
/* 외부서비스 사이트코드 */
|
||||||
.sitecode {display:inline-block;font:bold 15px 'Verdana';vertical-align:middle}
|
.sitecode {display:inline-block;font:bold 15px 'Verdana';vertical-align:middle}
|
||||||
.sitecode.title {width:80px}
|
|
||||||
|
|
||||||
.readonly {}
|
.readonly {}
|
||||||
|
|
||||||
@@ -270,7 +229,7 @@ legend {position:absolute;width:0;height:0;font-size:0;line-height:0;text-indent
|
|||||||
.color_st03{background:#b668d0;color:#fff;display:inline-block;padding:0 3px;font-size:0.92em;line-height:18px}
|
.color_st03{background:#b668d0;color:#fff;display:inline-block;padding:0 3px;font-size:0.92em;line-height:18px}
|
||||||
.color_st04{background:#ffa700;color:#fff;display:inline-block;padding:0 3px;font-size:0.92em;line-height:18px}
|
.color_st04{background:#ffa700;color:#fff;display:inline-block;padding:0 3px;font-size:0.92em;line-height:18px}
|
||||||
.color_st05{background:#688fef;color:#fff;display:inline-block;padding:0 3px;font-size:0.92em;line-height:18px}
|
.color_st05{background:#688fef;color:#fff;display:inline-block;padding:0 3px;font-size:0.92em;line-height:18px}
|
||||||
.color_st06{color:#ff0000;border:1px solid #ff0000;display:inline-block;padding:0 3px;font-size:0.92em;line-height:18px}
|
.color_st06{;color:#ff0000;border:1px solid #ff0000;display:inline-block;padding:0 3px;font-size:0.92em;line-height:18px}
|
||||||
|
|
||||||
/* 폼 안내글 */
|
/* 폼 안내글 */
|
||||||
.frm_info {display:block;padding:0 0 5px;color:#5b747e}
|
.frm_info {display:block;padding:0 0 5px;color:#5b747e}
|
||||||
@@ -280,16 +239,19 @@ legend {position:absolute;width:0;height:0;font-size:0;line-height:0;text-indent
|
|||||||
.anchor:after {display:block;visibility:hidden;clear:both;content:""}
|
.anchor:after {display:block;visibility:hidden;clear:both;content:""}
|
||||||
.anchor li{float:left;margin-left:-1px;list-style:none}
|
.anchor li{float:left;margin-left:-1px;list-style:none}
|
||||||
.anchor a {display:inline-block;padding:5px 10px;border:1px solid #c8ced1;background:#d6dde1;text-decoration:none}
|
.anchor a {display:inline-block;padding:5px 10px;border:1px solid #c8ced1;background:#d6dde1;text-decoration:none}
|
||||||
.anchor .selected{background:#3f51b5}
|
.anchor .selected{background:#3f51b5}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#sort_mb {width:800px}
|
#sort_mb {width:800px}
|
||||||
|
|
||||||
#sort_sodr {width:600px}
|
#sort_sodr {width:600px}
|
||||||
|
|
||||||
|
|
||||||
/* 하단 레이아웃 */
|
/* 하단 레이아웃 */
|
||||||
#ft{background:#f3f3f3;padding:0 25px;color:#777;text-align:center}
|
#ft{background:#f3f3f3;padding:0 25px;color:#777;text-align:center}
|
||||||
#ft p{line-height:50px;}
|
#ft p{line-height:50px;}
|
||||||
.scroll_top{position:fixed;bottom:10px;right:10px;width:50px;height:50px;border:0;text-align:center;background:#ddd;background:rgba(0,0,0,0.1);z-index:50;}
|
.scroll_top{position:fixed;bottom:10px;right:10px;width:50px;height:50px;border:0;text-align:center;background:#ddd;background:rgba(0,0,0,0.1)}
|
||||||
.scroll_top span.top_img{display:inline-block;width: 0; height: 0; border-left: 5px solid transparent;border-right: 5px solid transparent;
|
.scroll_top span.top_img{display:inline-block;width: 0; height: 0; border-left: 5px solid transparent;border-right: 5px solid transparent;
|
||||||
border-bottom: 5px solid black;}
|
border-bottom: 5px solid black;}
|
||||||
.scroll_top span.top_txt{display:block}
|
.scroll_top span.top_txt{display:block}
|
||||||
@@ -297,65 +259,25 @@ 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:0;padding:0;float:left;background:url(../img/sch_btn.png) no-repeat 50% 50%;border:1px solid #dcdcdc;border-left:0;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:0;padding:0;background:url(../img/sch_btn.png) no-repeat 50% 50% #eee;border:1px solid #dcdcdc;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;border:0;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;}
|
||||||
.local_sch03 label{margin-right:5px;display:inline-block}
|
.local_sch03 label{margin-right:5px;display:inline-block}
|
||||||
.local_sch03 button{height:30px;padding:0 5px;border:0;background:#9eacc6;color:#fff;}
|
.local_sch03 button{height:30px;padding:0 5px;border:0;background:#9eacc6;color:#fff;}
|
||||||
.local_sch03 .btn_submit{height:30px;padding:0 5px;border:0;color:#fff;}
|
.local_sch03 .btn_submit{height:30px;padding:0 5px;border:0;;color:#fff;}
|
||||||
.local_sch03 .frm_input{height:30px;border:1px solid #dcdcdc;padding:0 5px;}
|
.local_sch03 .frm_input{height:30px;border:1px solid #dcdcdc;padding:0 5px;}
|
||||||
|
/* 페이지 내 실행 */
|
||||||
/* 회원 관리 데이터 필터링 */
|
|
||||||
.member_list_data { display: flex; flex-direction: column; padding: 20px; margin: 20px 0 40px; background: #f9f9f9; border: 1px solid #f2f2f2; color: #333; }
|
|
||||||
.sch_table { display: flex; flex-direction: column; gap: 10px; font-size: 11.5px; color: #333; }
|
|
||||||
.member_list_data .sch_row { display: flex; align-items: center; gap: 12px; min-height: 30px; }
|
|
||||||
.label { min-width: 120px; font-weight: 500; white-space: nowrap; display: flex; align-items: center; }
|
|
||||||
.label label {display: flex; gap: 10px;}
|
|
||||||
.field { flex: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
|
|
||||||
.field input[type="text"], .field input[type="number"], .field input[type="date"], .field select { height: 30px; min-width: 100px; padding: 0 10px; font-size: 11.5px; border: 1px solid #ddd; border-radius: 8px; background: #fff; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
|
|
||||||
.field input[type="text"]:focus, .field input[type="number"]:focus, .field input[type="date"]:focus, .field select:focus { border-color: #6f809a; box-shadow: 0 0 0 2px rgba(63,81,181,0.1); outline: none; }
|
|
||||||
.field input::placeholder { color: #aaa; }
|
|
||||||
.field input[type="checkbox"], .field input[type="radio"] { width: 14px; height: 14px; accent-color: #536177; }
|
|
||||||
.radio_group { display: flex; gap: 15px; align-items: center; padding: 0 10px;}
|
|
||||||
.radio_group label {display: flex; align-items: center; gap: 5px;}
|
|
||||||
.ad_range_wrap {flex: 1; padding-left: 20px;}
|
|
||||||
.ad_range_box {display: flex;}
|
|
||||||
.ad_range_box .label {width: 109px;}
|
|
||||||
.sch_notice { font-size: 11px; color: #999; }
|
|
||||||
.sch_btn { display: flex; gap: 20px; justify-content: center; margin-top: 40px; }
|
|
||||||
.sch_btn { display: flex; gap: 10px; }
|
|
||||||
|
|
||||||
.btn_reset { display: flex; align-items: center; gap: 6px; padding: 0 20px; height: 40px; background: #9eacc6; color: #fff; font-weight: 600; border: none; border-radius: 8px; cursor: pointer; transition: background 0.2s ease, transform 0.15s ease; }
|
|
||||||
.btn_reset:hover { background: #5f6e89; }
|
|
||||||
.sch_btn button:not(.btn_reset) { padding: 0 20px; height: 40px; border: 1px solid #ccd1d8; background-color: #fff; color: #444; font-weight: 600; border-radius: 8px; cursor: pointer; user-select: none; transition: border-color 0.2s ease, box-shadow 0.2s ease; box-shadow: 0 1px 2px rgba(0,0,0,0.03); }
|
|
||||||
.sch_btn button:not(.btn_reset):hover { border-color: #6f809a; box-shadow: 0 2px 4px rgba(111, 128, 154, 0.15); }
|
|
||||||
.sch_btn button:not(.btn_reset):active { box-shadow: inset 0 1px 2px rgba(0,0,0,0.1); }
|
|
||||||
|
|
||||||
/* 회원 관리 다운로드 진행 팝업 */
|
|
||||||
.excel-download-progress p { color: #374151; }
|
|
||||||
.excel-download-progress .progress-desc { padding: 40px 0 32px; text-align: center; }
|
|
||||||
.excel-download-progress .progress-summary { margin-bottom: 6px; font-size: 16px; font-weight: 500; color: #111827; }
|
|
||||||
.excel-download-progress .progress-message { font-size: 20px; font-weight: 600; color: #3b82f6; }
|
|
||||||
.excel-download-progress .progress-error { color:red; }
|
|
||||||
.progress-spinner { display: flex; flex-direction: column; align-items: center; gap: 45px; padding: 24px 0; transition: all 0.2s ease; }
|
|
||||||
.spinner { width: 48px; height: 48px; border: 5px solid #3b82f6; border-top: 5px solid #fff; border-radius: 50%; animation: spin 0.8s linear infinite; }
|
|
||||||
@keyframes spin { to { transform: rotate(360deg); } }
|
|
||||||
.loading-message { text-align: center; font-size: 14px; color: #374151; }
|
|
||||||
.excel-download-progress .progress-download-box { margin-top: 24px; background: #f9fafb; padding: 20px; border-radius: 8px; box-shadow: 0 1px 2px rgba(0,0,0,0.03); }
|
|
||||||
.excel-download-progress .progress-download-box a { display: block; width: 100%; height: auto; text-align: center; margin-top: 8px; font-weight: 600; font-size: 14px; padding: 10px 20px; background: #fff; border: 1px solid #ccd1d8; border-radius: 8px; color: #444; cursor: pointer; transition: border-color 0.2s ease, box-shadow 0.2s ease; box-shadow: 0 1px 2px rgba(0,0,0,0.03); }
|
|
||||||
.excel-download-progress .progress-download-box a:hover { border-color: #6f809a; box-shadow: 0 2px 4px rgba(111, 128, 154, 0.15); }
|
|
||||||
.excel-download-progress .progress-download-box a:active { box-shadow: inset 0 1px 2px rgba(0,0,0,0.1); }
|
|
||||||
|
|
||||||
/* 페이지 내 실행 */
|
|
||||||
.local_cmd {min-width:960px}
|
.local_cmd {min-width:960px}
|
||||||
|
|
||||||
.local_cmd01 {margin:0 0 10px;padding:0 }
|
.local_cmd01 {margin:0 0 10px;padding:0 }
|
||||||
.local_cmd01 .cmd_tit {font-weight:bold}
|
.local_cmd01 .cmd_tit {font-weight:bold}
|
||||||
.local_cmd01 .btn_submit {padding:3px 5px;border:1px solid #ff3061;color:#fff;font-size:0.95em;vertical-align:middle}
|
.local_cmd01 .btn_submit {padding:3px 5px;border:1px solid #ff3061;color:#fff;font-size:0.95em;vertical-align:middle}
|
||||||
@@ -370,7 +292,7 @@ border-bottom: 5px solid black;}
|
|||||||
|
|
||||||
.local_desc01 {margin:10px 0 10px ;padding:10px 20px;border:1px solid #f2f2f2;background:#f9f9f9}
|
.local_desc01 {margin:10px 0 10px ;padding:10px 20px;border:1px solid #f2f2f2;background:#f9f9f9}
|
||||||
.local_desc01 strong {color:#ff3061}
|
.local_desc01 strong {color:#ff3061}
|
||||||
.local_desc01 a {text-decoration:underline;text-underline-offset:2px;}
|
.local_desc01 a {text-decoration:underline}
|
||||||
|
|
||||||
.local_desc02 {margin:10px 0 ;min-width:960px} /* 주로 온라인 서식 관련 안내 내용에 사용 */
|
.local_desc02 {margin:10px 0 ;min-width:960px} /* 주로 온라인 서식 관련 안내 내용에 사용 */
|
||||||
.local_desc02 p {padding:0;line-height:1.8em}
|
.local_desc02 p {padding:0;line-height:1.8em}
|
||||||
@@ -378,9 +300,8 @@ 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}
|
|
||||||
|
|
||||||
|
|
||||||
/* 테이블 */
|
/* 테이블 */
|
||||||
@@ -473,7 +394,6 @@ tfoot th {}
|
|||||||
.mb_leave_msg {color:#b6b6b6}
|
.mb_leave_msg {color:#b6b6b6}
|
||||||
.mb_intercept_msg {color:#ff0000}
|
.mb_intercept_msg {color:#ff0000}
|
||||||
#point_mng {margin-top:50px}
|
#point_mng {margin-top:50px}
|
||||||
.ad_agree_log {max-height: 150px !important;}
|
|
||||||
|
|
||||||
/* 게시판추가/수정 */
|
/* 게시판추가/수정 */
|
||||||
#anc_bo_extra .td_grpset label {width:auto}
|
#anc_bo_extra .td_grpset label {width:auto}
|
||||||
@@ -481,9 +401,6 @@ tfoot th {}
|
|||||||
#anc_bo_extra label {display:inline-block;width:100px}
|
#anc_bo_extra label {display:inline-block;width:100px}
|
||||||
#anc_bo_extra input {margin-right:10px}
|
#anc_bo_extra input {margin-right:10px}
|
||||||
|
|
||||||
/* 환경설정 및 게시판 여분필드 값 input style 로빈아빠님 제안 */
|
|
||||||
#anc_bo_extra input.extra-value-input, #anc_cf_extra input.extra-value-input{width:calc(100% - 370px);}
|
|
||||||
|
|
||||||
/* 접속자집계 목록 */
|
/* 접속자집계 목록 */
|
||||||
.tbl_visit_list td {text-align:center}
|
.tbl_visit_list td {text-align:center}
|
||||||
.visit_bar {position:relative}
|
.visit_bar {position:relative}
|
||||||
@@ -493,10 +410,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}
|
||||||
@@ -520,7 +433,6 @@ tfoot th {}
|
|||||||
.td_delino {width:130px}
|
.td_delino {width:130px}
|
||||||
.td_device {width:70px;text-align:center}
|
.td_device {width:70px;text-align:center}
|
||||||
.td_etc {width:80px;text-align:center}
|
.td_etc {width:80px;text-align:center}
|
||||||
.td_use {width:80px;text-align:center}
|
|
||||||
.td_extra label {display:inline-block;width:100px}
|
.td_extra label {display:inline-block;width:100px}
|
||||||
.td_extra input {margin-right:5px;width:130px}
|
.td_extra input {margin-right:5px;width:130px}
|
||||||
.td_grid {width:60px;text-align:center}
|
.td_grid {width:60px;text-align:center}
|
||||||
@@ -577,7 +489,6 @@ td.td_grpset {width:160px;border-left:1px solid #e9ecee;text-align:center}
|
|||||||
.td_time{text-align:center;width:130px}
|
.td_time{text-align:center;width:130px}
|
||||||
.td_center{text-align:center;}
|
.td_center{text-align:center;}
|
||||||
.td_type{width:120px}
|
.td_type{width:120px}
|
||||||
.td_consent{min-width:70px;max-width:200px}
|
|
||||||
|
|
||||||
.td_mng_s{width:60px}
|
.td_mng_s{width:60px}
|
||||||
.td_mng_m{width:100px}
|
.td_mng_m{width:100px}
|
||||||
@@ -599,24 +510,8 @@ td.td_grpset {width:160px;border-left:1px solid #e9ecee;text-align:center}
|
|||||||
/* 환경설정 */
|
/* 환경설정 */
|
||||||
.cf_cert_hide {display:none}
|
.cf_cert_hide {display:none}
|
||||||
|
|
||||||
.server_config_views {margin-bottom:10px}
|
|
||||||
.rules_label {margin-left:5px;vertical-align:middle}
|
|
||||||
|
|
||||||
.is_rewrite .connect-close {position:absolute;top:10px;right:10px;margin:0;padding:0;width:30px;height:30px;border:0;background:transparent;color:#383838;cursor:pointer;font-size:15px}
|
|
||||||
.is_rewrite .connect-close:hover {color:#ff5191}
|
|
||||||
.is_rewrite .connect-close .fa {margin:0 0 0 1px}
|
|
||||||
.is_rewrite .connect-close .txt {position:absolute;line-height:0;font-size:0;overflow:hidden}
|
|
||||||
.is_rewrite textarea{width:99%;min-height:260px}
|
|
||||||
.is_rewrite .copy_title{margin-top:15px;margin-bottom:10px;font-weight:bold;text-align:left}
|
|
||||||
.is_rewrite .info-success{color:#155724}
|
|
||||||
.is_rewrite .info-warning{color:#856404}
|
|
||||||
|
|
||||||
.icode_old_version th{background-color:#FFFCED}
|
|
||||||
.icode_json_version th{background-color:#F6F1FF}
|
|
||||||
.cf_tr_hide {display:none}
|
|
||||||
|
|
||||||
/* 관리권한설정 */
|
/* 관리권한설정 */
|
||||||
#add_admin fieldset {margin-top:20px;overflow:auto;padding:2px 6px;line-height:1.4;resize:vertical}
|
#add_admin fieldset {margin-top:20px}
|
||||||
|
|
||||||
/* 메일 테스트 */
|
/* 메일 테스트 */
|
||||||
|
|
||||||
@@ -629,44 +524,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%}
|
||||||
@@ -687,278 +544,19 @@ 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}
|
||||||
|
|
||||||
/* 쇼핑몰 설정 */
|
/* SMS문자전송 */
|
||||||
#anc_scf_payment textarea {height:50px}
|
#sms_send {padding-bottom:100px;zoom:1}
|
||||||
.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;
|
#sms_send:after {display:block;visibility:hidden;clear:both;content:""}
|
||||||
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}
|
#sms_frm {float:left;width:650px}
|
||||||
a.kcp_btn {display:inline-block;margin:5px 0 0;padding:5px 10px;background:#226C8B;color:#fff;font-weight:normal;text-decoration:none}
|
#sms_frm table {margin:0 0 30px}
|
||||||
a.lg_btn{display:inline-block;margin:5px 0 0;padding:5px 10px;background:#ED008C;color:#fff;font-weight:normal;text-decoration:none}
|
#sms_frm textarea {height:70px}
|
||||||
a.kg_btn{display:inline-block;margin:5px 0 0;padding:5px 10px;background:#4A2C7C;color:#fff;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}
|
|
||||||
a.nicepay_btn{display:inline-block;margin:5px 0 0;padding:5px 10px;background:#0057bf;color:#fff;font-weight:normal;text-decoration:none}
|
|
||||||
|
|
||||||
.scf_cardtest {margin:5px 0 0}
|
#sms_sm {position:relative;float:left;width:229px;height:418px;background:url('../shop_admin/img/mobilebg.jpg') no-repeat}
|
||||||
.scf_cardtest_btn {margin-left:5px;vertical-align:middle}
|
#sms_sm_text {position:absolute;top:75px;left:27px;width:180px;color:#fff;font-size:2em;word-break:break-all}
|
||||||
#scf_cardtest_tip {margin:10px 0 0;padding:10px;border:3px solid #ddd}
|
#sms_sm p {position:absolute;bottom:-70px;left:0;font-size:0.95em;letter-spacing:-0.1em}
|
||||||
#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}
|
#sms_send .local_desc01 {min-width:320px}
|
||||||
|
|
||||||
#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;min-width:130px}
|
|
||||||
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; padding:0px 10px;}
|
|
||||||
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}
|
|
||||||
.lg_info_fld_v2 th{background-color:#ffe8f5}
|
|
||||||
.inicis_info_fld th{background-color:#F6F1FF}
|
|
||||||
.naver_info_fld th{background-color:#F3FFF3}
|
|
||||||
.nicepay_info_fld th{background-color:#d1e6ff}
|
|
||||||
|
|
||||||
/* 주문내역 */
|
|
||||||
#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}
|
|
||||||
|
|
||||||
/* 가격비교사이트 */
|
|
||||||
#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 {}
|
||||||
@@ -967,8 +565,10 @@ strong.sodr_nonpay {display:block;padding:5px 0;text-align:right}
|
|||||||
.new_win_ul {margin:-20px 0 20px 0;padding:0 0 0 20px;border-bottom:1px solid #515151;background:#484848;list-style:none;zoom:1}
|
.new_win_ul {margin:-20px 0 20px 0;padding:0 0 0 20px;border-bottom:1px solid #515151;background:#484848;list-style:none;zoom:1}
|
||||||
.new_win_ul:after {display:block;visibility:hidden;clear:both;content:""}
|
.new_win_ul:after {display:block;visibility:hidden;clear:both;content:""}
|
||||||
.new_win_ul li {float:left;margin-left:-1px}
|
.new_win_ul li {float:left;margin-left:-1px}
|
||||||
|
|
||||||
.new_win_ul a {display:block;padding:10px 10px 8px;border-right:1px solid #595959;border-left:1px solid #595959;color:#fff;font-family:dotum;font-weight:bold;text-decoration:none}
|
.new_win_ul a {display:block;padding:10px 10px 8px;border-right:1px solid #595959;border-left:1px solid #595959;color:#fff;font-family:dotum;font-weight:bold;text-decoration:none}
|
||||||
|
|
||||||
|
|
||||||
.new_win_desc {margin:0 }
|
.new_win_desc {margin:0 }
|
||||||
.new_win .anchor {margin:0 0 5px}
|
.new_win .anchor {margin:0 0 5px}
|
||||||
|
|
||||||
@@ -978,13 +578,12 @@ strong.sodr_nonpay {display:block;padding:5px 0;text-align:right}
|
|||||||
.new_win .win_btn a {display:inline-block;padding:0 10px;height:30px;background:#4b545e;color:#fff;vertical-align:middle;line-height:2.4em}
|
.new_win .win_btn a {display:inline-block;padding:0 10px;height:30px;background:#4b545e;color:#fff;vertical-align:middle;line-height:2.4em}
|
||||||
.new_win .win_btn a:focus, .new_win .win_btn a:hover {text-decoration:none}
|
.new_win .win_btn a:focus, .new_win .win_btn a:hover {text-decoration:none}
|
||||||
|
|
||||||
|
|
||||||
.new_win .local_sch, .new_win .local_cmd, .new_win .local_desc01, .new_win .local_desc02, .new_win .local_ov {margin:10px}
|
.new_win .local_sch, .new_win .local_cmd, .new_win .local_desc01, .new_win .local_desc02, .new_win .local_ov {margin:10px}
|
||||||
|
|
||||||
.new_win_con{margin: 10px; background:#fff;padding:20px}
|
.new_win_con{margin: 10px; background:#fff;padding:20px}
|
||||||
.new_win_con .table_form table th{width:120px}
|
.new_win_con .table_form table th{width:120px}
|
||||||
|
|
||||||
.new_win .btn_confirm {text-align:center;}
|
|
||||||
|
|
||||||
/* 자바스크립트 alert 대안 */
|
/* 자바스크립트 alert 대안 */
|
||||||
#validation_check {margin:100px auto;width:500px}
|
#validation_check {margin:100px auto;width:500px}
|
||||||
#validation_check h1 {margin-bottom:20px;font-size:1.3em}
|
#validation_check h1 {margin-bottom:20px;font-size:1.3em}
|
||||||
@@ -1003,7 +602,7 @@ strong.sodr_nonpay {display:block;padding:5px 0;text-align:right}
|
|||||||
-moz-box-shadow: 2px 2px 3px 0px rgba(0,0,0,0.2);
|
-moz-box-shadow: 2px 2px 3px 0px rgba(0,0,0,0.2);
|
||||||
box-shadow: 2px 2px 3px 0px rgba(0,0,0,0.2);}
|
box-shadow: 2px 2px 3px 0px rgba(0,0,0,0.2);}
|
||||||
.sv_wrap .sv:before{content: "";position: absolute;top: -6px;left: 15px;width: 0;height: 0;border-style: solid;border-width: 0 6px 6px 6px;border-color: transparent transparent #333 transparent;}
|
.sv_wrap .sv:before{content: "";position: absolute;top: -6px;left: 15px;width: 0;height: 0;border-style: solid;border-width: 0 6px 6px 6px;border-color: transparent transparent #333 transparent;}
|
||||||
.sv_wrap .sv a {display:inline-block;margin:0;padding:0 10px;line-height:30px;width:100px;font-weight:normal;color:#bbb }
|
.sv_wrap .sv a {display:inline-block;margin:0;padding:0 10px;line-height:30px;width:100px;font-weight:normal;color:#bbb }
|
||||||
.sv_wrap .sv a:hover{background:#000;color:#fff}
|
.sv_wrap .sv a:hover{background:#000;color:#fff}
|
||||||
.sv_member{color:#333}
|
.sv_member{color:#333}
|
||||||
.sv_on {display:block !important;position:absolute;top:23px;left:0px;width:auto;height:auto}
|
.sv_on {display:block !important;position:absolute;top:23px;left:0px;width:auto;height:auto}
|
||||||
@@ -1059,98 +658,74 @@ 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:190px 0 10px;min-height:45px;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;width:520px;}
|
.sevice_2{border:1px solid #ebe8e8;float:left;width:282px;}
|
||||||
.svc_card ul li{width:25%;box-sizing:border-box;}
|
.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:50%;}
|
.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 legend {position:absolute;margin:0;padding:0;font-size:0;line-height:0;text-indent:-9999em;overflow:hidden;}
|
|
||||||
#captcha #captcha_img {height:40px;border:1px solid #898989;vertical-align:top;padding:0;margin:0}
|
|
||||||
#captcha #captcha_mp3 {margin:0;padding:0;width:40px;height:40px;border:0;background:transparent;vertical-align:middle;overflow:hidden;cursor:pointer;background:url('../../img/captcha2.png') no-repeat;text-indent:-999px;border-radius:3px}
|
|
||||||
#captcha #captcha_reload {margin:0;padding:0;width:40px;height:40px;border:0;background:transparent;vertical-align:middle;overflow:hidden;cursor:pointer;background:url('../../img/captcha2.png') no-repeat 0 -40px;text-indent:-999px;border-radius:3px}
|
|
||||||
#captcha #captcha_key {margin:0 0 0 3px;padding:0 5px;width:90px;height:40px;border:1px solid #ccc;background:#fff;font-size:1.333em;font-weight:bold;text-align:center;border-radius:3px;vertical-align:top}
|
|
||||||
#captcha #captcha_info {display:block;margin:5px 0 0;font-size:0.95em;letter-spacing:-0.1em}
|
|
||||||
|
|
||||||
/*테마*/
|
/*테마*/
|
||||||
.theme_p{margin:0 0 10px }
|
.theme_p{margin:0 0 10px }
|
||||||
#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 ;margin: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;}
|
||||||
#theme_list li .tmli_if:hover>img{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";filter: alpha(opacity=50);-moz-opacity:0.5;-khtml-opacity: 0.5;opacity: 0.5;}
|
#theme_list li .tmli_if:hover>img{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";filter: alpha(opacity=50);-moz-opacity:0.5;-khtml-opacity: 0.5;opacity: 0.5;}
|
||||||
#theme_list li .tmli_tit{position:relative; border-top: 1px solid #d1dee2; background: #e5ecef;}
|
#theme_list li .tmli_tit{position:relative; border-top: 1px solid #d1dee2; background: #e5ecef;}
|
||||||
#theme_list li .tmli_tit p{height:40px;line-height:40px;padding:0 10px 0;font-weight:bold;text-overflow: ellipsis; overflow: hidden; white-space: nowrap;}
|
#theme_list li .tmli_tit p{height:40px;line-height:40px;padding:0 10px 0;font-weight:bold;text-overflow: ellipsis; overflow: hidden; white-space: nowrap;}
|
||||||
#theme_list li .tmli_tit button.tmli_dt{position:absolute;top:8px;right:10px;padding:5px;background:#111;color:#fff;display:none;border:none}
|
#theme_list li .tmli_tit button.tmli_dt{position:absolute;top:8px;right:10px;padding:5px;background:#111;color:#fff;display:none;border:none}
|
||||||
#theme_list li .tmli_if:hover button.tmli_dt{display:block}
|
#theme_list li .tmli_if:hover button.tmli_dt{display:block}
|
||||||
#theme_list li .theme_sl{float:left;border:none;margin-top:5px;padding:0 5px;height:26px;background:#999;color:#fff}
|
#theme_list li .theme_sl{float:left;border:none;margin-top:5px;padding:0 5px;height:26px;background:#999;color:#fff}
|
||||||
#theme_list li .theme_sl:hover{background:#ff3061}
|
#theme_list li .theme_sl:hover{background:#ff3061}
|
||||||
#theme_list li .theme_deactive{margin-left:4px}
|
#theme_list li .theme_deactive{margin-left:4px}
|
||||||
#theme_list li .theme_sl_use{background:#ff3061;line-height:26px}
|
#theme_list li .theme_sl_use{background:#ff3061;line-height:26px}
|
||||||
#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);
|
||||||
box-shadow: 1px 2px 5px rgba(150,150,150,0.5);z-index:1000}
|
box-shadow: 1px 2px 5px rgba(150,150,150,0.5);z-index:1000}
|
||||||
#theme_detail:after{display:block;visibility:hidden;clear:both;content:""}
|
#theme_detail:after{display:block;visibility:hidden;clear:both;content:""}
|
||||||
#theme_detail h2{font-size:1.25em;background:#fff;padding:0 15px;line-height:40px;border-bottom:1px solid #d8d8d8;margin:0}
|
#theme_detail h2{font-size:1.25em;background:#fff;padding:0 15px;line-height:40px;border-bottom:1px solid #d8d8d8;margin:0}
|
||||||
.theme_dt_img{float:left;padding:20px}
|
.theme_dt_img{float:left;padding:20px}
|
||||||
.theme_dt_img img{border:1px solid #aaa;max-width:600px;max-height:460px}
|
.theme_dt_img img{border:1px solid #aaa;}
|
||||||
.theme_dt_if{float:left;width:235px;padding:20px 0}
|
.theme_dt_if{float:left;width:235px;padding:20px 0}
|
||||||
.theme_dt_if table{width:100%;border-collapse:collapse;margin:15px 0 0 ;font-size:0.92em}
|
.theme_dt_if table{width:100%;border-collapse:collapse;;margin:15px 0 0 ;font-size:0.92em}
|
||||||
.theme_dt_if table th{padding:5px;background:#fff;border-bottom:1px solid #f3f3f3;vertical-align:top;color:#3f51b5}
|
.theme_dt_if table th{padding:5px;background:#fff;border-bottom:1px solid #f3f3f3;vertical-align:top;color:#3f51b5}
|
||||||
.theme_dt_if table td{padding:5px;background:#fff;border-bottom:1px solid #f3f3f3;line-height:1.56em}
|
.theme_dt_if table td{padding:5px;background:#fff;border-bottom:1px solid #f3f3f3;line-height:1.56em}
|
||||||
.theme_dt_if table td a{text-decoration:underline}
|
.theme_dt_if table td a{text-decoration:underline}
|
||||||
.theme_dt_if p{line-height:1.5em}
|
.theme_dt_if p{line-height:1.5em}
|
||||||
.if_p_bg{display:inline-block;width:20px;height:1px ;background:#000;margin:30px 0 10px}
|
.if_p_bg{display:inline-block;width:20px;height:1px ;background:#000;margin:30px 0 10px}
|
||||||
#theme_detail .theme_dt_btn{position:absolute;top:0px;right:0px;background:#fff;}
|
#theme_detail .theme_dt_btn{position:absolute;top:0px;right:0px;background:#fff;}
|
||||||
#theme_detail .theme_dt_btn .close_btn{border:0;border-left:1px solid #d8d8d8;background:url('../img/close.png') 50% 50% no-repeat;width:40px;height:40px;overflow:hidden;text-indent:-99999px}
|
#theme_detail .theme_dt_btn .close_btn{background:url('../img/close.png') 50% 50% no-repeat;width:40px;height:40px;overflow:hidden;border:0;text-indent:-99999px;border-left:1px solid #d8d8d8}
|
||||||
|
|
||||||
#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;}
|
||||||
@@ -1172,38 +747,4 @@ 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){
|
|
||||||
/* Styles */
|
|
||||||
input[type="text"]{max-width:200px}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media only screen and (max-device-width : 480px) and (orientation : portrait){
|
|
||||||
/* Styles */
|
|
||||||
input[type="text"]{max-width:200px}
|
|
||||||
}
|
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
@charset "utf-8";
|
@charset "utf-8";
|
||||||
#preview_item{height:50px}
|
#preview_item{height:50px}
|
||||||
#preview_item ul{margin:0;padding:0;top:0;width:100%;margin:0 auto;text-align:center;background:#000;position:fixed;top:0;z-index:999999}
|
#preview_item ul{margin:0;padding:0;top:0;width:100%margin:0 auto;text-align:center;background:#000;position:fixed;top:0;z-index:999999;width:100%;}
|
||||||
#preview_item ul li{list-style:none;display:inline-block;height:50px;line-height:50px;padding:0 2px;*display:inline; zoom:1;}
|
#preview_item ul li{list-style:none;display:inline-block;height:50px;line-height:50px;padding:0 2px;*display:inline; zoom:1;}
|
||||||
#preview_item ul li a{color:#ccc;padding:0 8px;height:32px;line-height:30px;background:none;font-weight:bold;border-radius:5px;display:inline-block;vertical-align:middle;border:1px solid #aaa;}
|
#preview_item ul li a{color:#ccc;padding:0 8px;height:32px;line-height:30px;background:none;font-weight:bold;border-radius:5px;display:inline-block;vertical-align:middle;border:1px solid #aaa;}
|
||||||
#preview_item ul li a:hover{background:#fff;text-decoration:none;border:1px solid #ccc;color:#333}
|
#preview_item ul li a:hover{background:#fff;text-decoration:none;border:1px solid #ccc;color:#333}
|
||||||
|
|||||||
@@ -1,213 +0,0 @@
|
|||||||
<?php
|
|
||||||
$sub_menu = '100410';
|
|
||||||
include_once('./_common.php');
|
|
||||||
include_once(G5_LIB_PATH . '/migration.lib.php');
|
|
||||||
include_once(G5_LIB_PATH . '/shop_install.lib.php');
|
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, 'r');
|
|
||||||
|
|
||||||
if ($is_admin != 'super') {
|
|
||||||
alert('최고관리자만 접근 가능합니다.');
|
|
||||||
}
|
|
||||||
|
|
||||||
$is_execute = isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] === 'POST';
|
|
||||||
$migration_result = array('success' => true, 'applied' => 0, 'skipped' => 0, 'errors' => array());
|
|
||||||
$shop_install_result = null;
|
|
||||||
$action = '';
|
|
||||||
|
|
||||||
if ($is_execute) {
|
|
||||||
check_demo();
|
|
||||||
check_admin_token();
|
|
||||||
$action = isset($_POST['action']) ? trim($_POST['action']) : 'migrate';
|
|
||||||
if ($action === 'install_shop') {
|
|
||||||
$shop_install_result = g5_shop_install_run();
|
|
||||||
} elseif ($action === 'record_existing') {
|
|
||||||
$migration_result = g5_migration_run('', true);
|
|
||||||
} else {
|
|
||||||
$migration_id = isset($_POST['migration_id']) ? trim($_POST['migration_id']) : '';
|
|
||||||
$migration_result = g5_migration_run($migration_id);
|
|
||||||
$migration_result = run_replace('admin_dbupgrade_result', $migration_result);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$migration_statuses = g5_migration_status();
|
|
||||||
$pending_count = 0;
|
|
||||||
$unrecorded_count = 0;
|
|
||||||
foreach ($migration_statuses as $migration_status) {
|
|
||||||
if (isset($migration_status['status']) && $migration_status['status'] === 'unrecorded') {
|
|
||||||
$unrecorded_count++;
|
|
||||||
} elseif (isset($migration_status['error']) || $migration_status['status'] !== 'success' || $migration_status['checksum_changed']) {
|
|
||||||
$pending_count++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($shop_install_result !== null && $shop_install_result['success']) {
|
|
||||||
alert('쇼핑몰 설치가 완료되었습니다.', G5_ADMIN_URL . '/dbupgrade.php');
|
|
||||||
} elseif ($shop_install_result !== null) {
|
|
||||||
$db_upgrade_msg = '쇼핑몰 설치에 실패했습니다. 오류 내용을 확인해 주십시오.';
|
|
||||||
} elseif (!$is_execute) {
|
|
||||||
$db_upgrade_msg = $pending_count ? '확인·실행이 필요한 DB 마이그레이션이 있습니다. 아래 내용을 확인해 주십시오.' : ($unrecorded_count ? '현재 실행할 변경은 없지만 기존 상태 확인 이력이 등록되지 않았습니다.' : 'DB 마이그레이션이 모두 적용되어 있습니다.');
|
|
||||||
} elseif (!$migration_result['success']) {
|
|
||||||
$db_upgrade_msg = 'DB 마이그레이션에 실패했습니다. 오류 내용을 확인해 주십시오.';
|
|
||||||
} elseif ($action === 'record_existing') {
|
|
||||||
$db_upgrade_msg = '기존 상태 확인 이력 ' . (int) $migration_result['skipped'] . '건을 등록했습니다. 선행 항목에 실행이 필요하거나 실패 이력이 있으면 등록을 중단합니다.';
|
|
||||||
} elseif ($migration_result['applied'] || $migration_result['skipped']) {
|
|
||||||
$db_upgrade_msg = 'DB 마이그레이션이 완료되었습니다.';
|
|
||||||
} else {
|
|
||||||
$db_upgrade_msg = '적용할 DB 마이그레이션이 없습니다.';
|
|
||||||
}
|
|
||||||
|
|
||||||
$g5['title'] = 'DB 업그레이드';
|
|
||||||
include_once('./admin.head.php');
|
|
||||||
$dbupgrade_token = get_admin_token();
|
|
||||||
?>
|
|
||||||
|
|
||||||
<div class="local_desc01 local_desc">
|
|
||||||
<p><?php echo $db_upgrade_msg; ?></p>
|
|
||||||
<?php if ($unrecorded_count) { ?>
|
|
||||||
<p>실행 불필요 <?php echo (int) $unrecorded_count; ?>건: 현재 실행 조건상 건너뛰는 항목입니다. 과거 실행 성공을 의미하지 않으며, 선행 작업 후에는 결과가 달라질 수 있습니다. 기존 상태 등록은 처음부터 연속해서 실행 불필요한 항목만 기록합니다.</p>
|
|
||||||
<?php } ?>
|
|
||||||
<p>대기 항목에는 데이터 보정 등 조회만으로 완료를 판단할 수 없는 작업도 포함됩니다. 조회 시 DB 변경이나 이력 등록은 수행하지 않습니다.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php if ($shop_install_result !== null && !$shop_install_result['success']) { ?>
|
|
||||||
<div class="local_desc01 local_desc" style="color:#d00">
|
|
||||||
<p><?php echo htmlspecialchars($shop_install_result['error'], ENT_QUOTES, 'UTF-8'); ?></p>
|
|
||||||
</div>
|
|
||||||
<?php } elseif ($migration_result['errors']) { ?>
|
|
||||||
<div class="local_desc01 local_desc" style="color:#d00">
|
|
||||||
<?php foreach ($migration_result['errors'] as $migration_error) { ?>
|
|
||||||
<p><?php echo htmlspecialchars($migration_error, ENT_QUOTES, 'UTF-8'); ?></p>
|
|
||||||
<?php } ?>
|
|
||||||
</div>
|
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
<div class="dbupgrade_all_actions">
|
|
||||||
<?php if ($unrecorded_count) { ?>
|
|
||||||
<form class="dbupgrade_existing_action" method="post" action="<?php echo G5_ADMIN_URL; ?>/dbupgrade.php">
|
|
||||||
<input type="hidden" name="token" value="<?php echo $dbupgrade_token; ?>">
|
|
||||||
<input type="hidden" name="action" value="record_existing">
|
|
||||||
<button type="submit" class="btn_submit">기존 상태 확인 이력 등록</button>
|
|
||||||
</form>
|
|
||||||
<?php } ?>
|
|
||||||
<?php if (!defined('G5_USE_SHOP') || !G5_USE_SHOP) { ?>
|
|
||||||
<form method="post" action="<?php echo G5_ADMIN_URL; ?>/dbupgrade.php" onsubmit="return confirm('쇼핑몰을 설치하시겠습니까? 설치 전 데이터베이스와 data/dbconfig.php 백업을 권장합니다.');">
|
|
||||||
<input type="hidden" name="token" value="<?php echo $dbupgrade_token; ?>">
|
|
||||||
<input type="hidden" name="action" value="install_shop">
|
|
||||||
<button type="submit" class="btn_submit">쇼핑몰 설치</button>
|
|
||||||
</form>
|
|
||||||
<?php } ?>
|
|
||||||
<form method="post" action="<?php echo G5_ADMIN_URL; ?>/dbupgrade.php" onsubmit="return confirm('선택한 DB 마이그레이션을 실행하시겠습니까? 실행 전 데이터베이스 백업을 권장합니다.');">
|
|
||||||
<input type="hidden" name="token" value="<?php echo $dbupgrade_token; ?>">
|
|
||||||
<input type="hidden" name="action" value="migrate">
|
|
||||||
<button type="submit" name="migration_id" value="" class="btn_submit">전체 마이그레이션 실행</button>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
<form method="post" action="<?php echo G5_ADMIN_URL; ?>/dbupgrade.php" onsubmit="return confirm('선택한 DB 마이그레이션을 실행하시겠습니까? 실행 전 데이터베이스 백업을 권장합니다.');">
|
|
||||||
<input type="hidden" name="token" value="<?php echo $dbupgrade_token; ?>">
|
|
||||||
<input type="hidden" name="action" value="migrate">
|
|
||||||
<div class="tbl_head01 tbl_wrap">
|
|
||||||
<table id="dbupgrade_migration_table">
|
|
||||||
<caption>버전형 DB 마이그레이션 목록</caption>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th scope="col" aria-sort="none"><button type="button" class="dbupgrade_sort" data-column="0">마이그레이션 <span aria-hidden="true"></span></button></th>
|
|
||||||
<th scope="col" class="dbupgrade_description" aria-sort="none"><button type="button" class="dbupgrade_sort" data-column="1">설명 <span aria-hidden="true"></span></button></th>
|
|
||||||
<th scope="col" aria-sort="none"><button type="button" class="dbupgrade_sort" data-column="2">상태 <span aria-hidden="true"></span></button></th>
|
|
||||||
<th scope="col" aria-sort="none"><button type="button" class="dbupgrade_sort" data-column="3">적용 시각 <span aria-hidden="true"></span></button></th>
|
|
||||||
<th scope="col" aria-sort="none"><button type="button" class="dbupgrade_sort" data-column="4">실행 <span aria-hidden="true"></span></button></th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<?php $previous_migrations_ready = true; ?>
|
|
||||||
<?php foreach ($migration_statuses as $migration_status) { ?>
|
|
||||||
<?php
|
|
||||||
$current_migration_status = isset($migration_status['status']) ? $migration_status['status'] : 'error';
|
|
||||||
$migration_succeeded = $current_migration_status === 'success' && !$migration_status['checksum_changed'];
|
|
||||||
$migration_can_run = in_array($current_migration_status, array('pending', 'failed'), true) && $previous_migrations_ready;
|
|
||||||
$migration_button_title = $current_migration_status === 'unrecorded' ? '기존 상태 확인 이력을 등록해 주십시오.' : ($current_migration_status === 'success' ? '이미 성공한 마이그레이션입니다.' : ($previous_migrations_ready ? '' : '선행 마이그레이션을 먼저 실행해야 합니다.'));
|
|
||||||
?>
|
|
||||||
<tr>
|
|
||||||
<?php if (isset($migration_status['error'])) { ?>
|
|
||||||
<td colspan="5"><?php echo htmlspecialchars($migration_status['error'], ENT_QUOTES, 'UTF-8'); ?></td>
|
|
||||||
<?php } else { ?>
|
|
||||||
<td><?php echo htmlspecialchars($migration_status['id'], ENT_QUOTES, 'UTF-8'); ?></td>
|
|
||||||
<td class="dbupgrade_description"><?php echo htmlspecialchars($migration_status['description'], ENT_QUOTES, 'UTF-8'); ?></td>
|
|
||||||
<td><?php echo g5_migration_status_label($migration_status['status'], $migration_status['checksum_changed']); ?></td>
|
|
||||||
<td><?php echo htmlspecialchars($migration_status['applied_at'], ENT_QUOTES, 'UTF-8'); ?></td>
|
|
||||||
<td>
|
|
||||||
<button type="submit" name="migration_id" value="<?php echo htmlspecialchars($migration_status['id'], ENT_QUOTES, 'UTF-8'); ?>" class="btn_frmline"<?php echo $migration_can_run ? '' : ' disabled'; ?><?php echo $migration_button_title !== '' ? ' title="' . htmlspecialchars($migration_button_title, ENT_QUOTES, 'UTF-8') . '"' : ''; ?>>실행</button>
|
|
||||||
</td>
|
|
||||||
<?php } ?>
|
|
||||||
</tr>
|
|
||||||
<?php $previous_migrations_ready = $previous_migrations_ready && $migration_succeeded; ?>
|
|
||||||
<?php } ?>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
.dbupgrade_all_actions {display:flex;width:100%;margin:0 0 20px;justify-content:flex-end;gap:5px}
|
|
||||||
.dbupgrade_all_actions form {margin:0}
|
|
||||||
.dbupgrade_all_actions .dbupgrade_existing_action {margin-right:auto}
|
|
||||||
.dbupgrade_all_actions .btn_submit {display:inline-block;float:none;position:static;width:auto;height:30px;margin:0;padding:0 15px;border:0}
|
|
||||||
.dbupgrade_sort {width:100%; border:0; background:transparent; color:inherit; font:inherit; cursor:pointer}
|
|
||||||
#dbupgrade_migration_table td.dbupgrade_description {text-align:left}
|
|
||||||
#dbupgrade_migration_table th.dbupgrade_description, #dbupgrade_migration_table th.dbupgrade_description .dbupgrade_sort {text-align:center}
|
|
||||||
.btn_frmline:disabled {background:#b7b7b7;color:#fff;cursor:not-allowed}
|
|
||||||
</style>
|
|
||||||
<script>
|
|
||||||
(function () {
|
|
||||||
var table = document.getElementById('dbupgrade_migration_table');
|
|
||||||
if (!table || !table.tBodies.length) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var buttons = table.querySelectorAll('.dbupgrade_sort');
|
|
||||||
var tbody = table.tBodies[0];
|
|
||||||
|
|
||||||
function getCellText(row, column) {
|
|
||||||
return row.cells[column] ? row.cells[column].textContent.replace(/^\s+|\s+$/g, '') : '';
|
|
||||||
}
|
|
||||||
|
|
||||||
function sortRows(button, initialAscending) {
|
|
||||||
var column = parseInt(button.getAttribute('data-column'), 10);
|
|
||||||
var header = button.parentNode;
|
|
||||||
var ascending = typeof initialAscending === 'boolean' ? initialAscending : header.getAttribute('aria-sort') !== 'ascending';
|
|
||||||
var rows = Array.prototype.slice.call(tbody.rows);
|
|
||||||
|
|
||||||
rows.sort(function (left, right) {
|
|
||||||
var leftText = getCellText(left, column);
|
|
||||||
var rightText = getCellText(right, column);
|
|
||||||
var compared = leftText.localeCompare(rightText, undefined, {numeric: true, sensitivity: 'base'});
|
|
||||||
|
|
||||||
return ascending ? compared : -compared;
|
|
||||||
});
|
|
||||||
|
|
||||||
for (var i = 0; i < buttons.length; i++) {
|
|
||||||
buttons[i].parentNode.setAttribute('aria-sort', 'none');
|
|
||||||
buttons[i].getElementsByTagName('span')[0].textContent = '';
|
|
||||||
}
|
|
||||||
header.setAttribute('aria-sort', ascending ? 'ascending' : 'descending');
|
|
||||||
button.getElementsByTagName('span')[0].textContent = ascending ? '▲' : '▼';
|
|
||||||
|
|
||||||
for (var j = 0; j < rows.length; j++) {
|
|
||||||
tbody.appendChild(rows[j]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (var i = 0; i < buttons.length; i++) {
|
|
||||||
buttons[i].onclick = function () {
|
|
||||||
sortRows(this);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
if (buttons.length) {
|
|
||||||
sortRows(buttons[0], false);
|
|
||||||
}
|
|
||||||
}());
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
include_once('./admin.tail.php');
|
|
||||||
+5
-9
@@ -3,18 +3,13 @@ $sub_menu = '300700';
|
|||||||
include_once('./_common.php');
|
include_once('./_common.php');
|
||||||
include_once(G5_EDITOR_LIB);
|
include_once(G5_EDITOR_LIB);
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, "w");
|
auth_check($auth[$sub_menu], "w");
|
||||||
|
|
||||||
$fm_id = isset($_GET['fm_id']) ? (int) $_GET['fm_id'] : 0;
|
|
||||||
$fa_id = isset($_GET['fa_id']) ? (int) $_GET['fa_id'] : 0;
|
|
||||||
|
|
||||||
$sql = " select * from {$g5['faq_master_table']} where fm_id = '$fm_id' ";
|
$sql = " select * from {$g5['faq_master_table']} where fm_id = '$fm_id' ";
|
||||||
$fm = sql_fetch($sql);
|
$fm = sql_fetch($sql);
|
||||||
|
|
||||||
$html_title = 'FAQ '.$fm['fm_subject'];
|
$html_title = 'FAQ '.$fm['fm_subject'];
|
||||||
|
|
||||||
$fa = array('fa_id'=>0, 'fm_id'=>0, 'fa_subject'=>'', 'fa_content'=>'', 'fa_order'=>0);
|
|
||||||
|
|
||||||
if ($w == "u")
|
if ($w == "u")
|
||||||
{
|
{
|
||||||
$html_title .= " 수정";
|
$html_title .= " 수정";
|
||||||
@@ -56,11 +51,11 @@ include_once (G5_ADMIN_PATH.'/admin.head.php');
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">질문</th>
|
<th scope="row">질문</th>
|
||||||
<td><?php echo editor_html('fa_subject', get_text(html_purifier($fa['fa_subject']), 0)); ?></td>
|
<td><?php echo editor_html('fa_subject', get_text($fa['fa_subject'], 0)); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">답변</th>
|
<th scope="row">답변</th>
|
||||||
<td><?php echo editor_html('fa_content', get_text(html_purifier($fa['fa_content']), 0)); ?></td>
|
<td><?php echo editor_html('fa_content', get_text($fa['fa_content'], 0)); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@@ -99,4 +94,5 @@ function frmfaqform_check(f)
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
include_once (G5_ADMIN_PATH.'/admin.tail.php');
|
include_once (G5_ADMIN_PATH.'/admin.tail.php');
|
||||||
|
?>
|
||||||
|
|||||||
+5
-14
@@ -5,19 +5,13 @@ include_once('./_common.php');
|
|||||||
if ($w == "u" || $w == "d")
|
if ($w == "u" || $w == "d")
|
||||||
check_demo();
|
check_demo();
|
||||||
|
|
||||||
if ($w == 'd')
|
if ($W == 'd')
|
||||||
auth_check_menu($auth, $sub_menu, "d");
|
auth_check($auth[$sub_menu], "d");
|
||||||
else
|
else
|
||||||
auth_check_menu($auth, $sub_menu, "w");
|
auth_check($auth[$sub_menu], "w");
|
||||||
|
|
||||||
check_admin_token();
|
check_admin_token();
|
||||||
|
|
||||||
$fm_id = isset($_REQUEST['fm_id']) ? (int) $_REQUEST['fm_id'] : 0;
|
|
||||||
$fa_id = isset($_REQUEST['fa_id']) ? (int) $_REQUEST['fa_id'] : 0;
|
|
||||||
$fa_subject = isset($_POST['fa_subject']) ? $_POST['fa_subject'] : '';
|
|
||||||
$fa_content = isset($_POST['fa_content']) ? $_POST['fa_content'] : '';
|
|
||||||
$fa_order = isset($_POST['fa_order']) ? (int) $_POST['fa_order'] : 0;
|
|
||||||
|
|
||||||
$sql_common = " fa_subject = '$fa_subject',
|
$sql_common = " fa_subject = '$fa_subject',
|
||||||
fa_content = '$fa_content',
|
fa_content = '$fa_content',
|
||||||
fa_order = '$fa_order' ";
|
fa_order = '$fa_order' ";
|
||||||
@@ -30,7 +24,6 @@ if ($w == "")
|
|||||||
sql_query($sql);
|
sql_query($sql);
|
||||||
|
|
||||||
$fa_id = sql_insert_id();
|
$fa_id = sql_insert_id();
|
||||||
run_event('admin_faq_item_created', $fa_id, $fm_id);
|
|
||||||
}
|
}
|
||||||
else if ($w == "u")
|
else if ($w == "u")
|
||||||
{
|
{
|
||||||
@@ -38,17 +31,15 @@ else if ($w == "u")
|
|||||||
set $sql_common
|
set $sql_common
|
||||||
where fa_id = '$fa_id' ";
|
where fa_id = '$fa_id' ";
|
||||||
sql_query($sql);
|
sql_query($sql);
|
||||||
run_event('admin_faq_item_updated', $fa_id, $fm_id);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else if ($w == "d")
|
else if ($w == "d")
|
||||||
{
|
{
|
||||||
$sql = " delete from {$g5['faq_table']} where fa_id = '$fa_id' ";
|
$sql = " delete from {$g5['faq_table']} where fa_id = '$fa_id' ";
|
||||||
sql_query($sql);
|
sql_query($sql);
|
||||||
run_event('admin_faq_item_deleted', $fa_id, $fm_id);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($w == 'd')
|
if ($w == 'd')
|
||||||
goto_url("./faqlist.php?fm_id=$fm_id");
|
goto_url("./faqlist.php?fm_id=$fm_id");
|
||||||
else
|
else
|
||||||
goto_url("./faqform.php?w=u&fm_id=$fm_id&fa_id=$fa_id");
|
goto_url("./faqform.php?w=u&fm_id=$fm_id&fa_id=$fa_id");
|
||||||
|
?>
|
||||||
|
|||||||
+92
-97
@@ -1,97 +1,92 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = '300700';
|
$sub_menu = '300700';
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, "r");
|
auth_check($auth[$sub_menu], "r");
|
||||||
|
|
||||||
$g5['title'] = 'FAQ 상세관리';
|
$g5['title'] = 'FAQ 상세관리';
|
||||||
if (isset($_REQUEST['fm_subject'])) {
|
if ($fm_subject) $g5['title'] .= ' : '.$fm_subject;
|
||||||
$fm_subject = clean_xss_tags($_REQUEST['fm_subject'], 1, 1, 255);
|
include_once (G5_ADMIN_PATH.'/admin.head.php');
|
||||||
$g5['title'] .= ' : ' . $fm_subject;
|
|
||||||
}
|
$sql = " select * from {$g5['faq_master_table']} where fm_id = '$fm_id' ";
|
||||||
|
$fm = sql_fetch($sql);
|
||||||
$fm_id = isset($fm_id) ? (int) $fm_id : 0;
|
|
||||||
|
$sql_common = " from {$g5['faq_table']} where fm_id = '$fm_id' ";
|
||||||
require_once G5_ADMIN_PATH . '/admin.head.php';
|
|
||||||
|
// 테이블의 전체 레코드수만 얻음
|
||||||
$sql = " select * from {$g5['faq_master_table']} where fm_id = '$fm_id' ";
|
$sql = " select count(*) as cnt " . $sql_common;
|
||||||
$fm = sql_fetch($sql);
|
$row = sql_fetch($sql);
|
||||||
|
$total_count = $row[cnt];
|
||||||
$sql_common = " from {$g5['faq_table']} where fm_id = '$fm_id' ";
|
|
||||||
|
$sql = "select * $sql_common order by fa_order , fa_id ";
|
||||||
// 테이블의 전체 레코드수만 얻음
|
$result = sql_query($sql);
|
||||||
$sql = " select count(*) as cnt " . $sql_common;
|
?>
|
||||||
$row = sql_fetch($sql);
|
|
||||||
$total_count = $row['cnt'];
|
<div class="local_ov01 local_ov">
|
||||||
|
<span class="btn_ov01"><span class="ov_txt"> 등록된 FAQ 상세내용</span><span class="ov_num"> <?php echo $total_count; ?>건</span></span>
|
||||||
$sql = "select * $sql_common order by fa_order , fa_id ";
|
</div>
|
||||||
$result = sql_query($sql);
|
|
||||||
?>
|
<div class="local_desc01 local_desc">
|
||||||
|
<ol>
|
||||||
<div class="local_ov01 local_ov">
|
<li>FAQ는 무제한으로 등록할 수 있습니다</li>
|
||||||
<span class="btn_ov01"><span class="ov_txt"> 등록된 FAQ 상세내용</span><span class="ov_num"> <?php echo $total_count; ?>건</span></span>
|
<li><strong>FAQ 상세내용 추가</strong>를 눌러 자주하는 질문과 답변을 입력합니다.</li>
|
||||||
</div>
|
</ol>
|
||||||
|
</div>
|
||||||
<div class="local_desc01 local_desc">
|
|
||||||
<ol>
|
<div class="btn_fixed_top">
|
||||||
<li>FAQ는 무제한으로 등록할 수 있습니다</li>
|
<a href="./faqmasterlist.php" class="btn btn_02">FAQ 관리</a>
|
||||||
<li><strong>FAQ 상세내용 추가</strong>를 눌러 자주하는 질문과 답변을 입력합니다.</li>
|
<a href="./faqform.php?fm_id=<?php echo $fm['fm_id']; ?>" class="btn btn_01">FAQ 상세내용 추가</a>
|
||||||
</ol>
|
</div>
|
||||||
</div>
|
|
||||||
|
<div class="tbl_head01 tbl_wrap">
|
||||||
<div class="btn_fixed_top">
|
<table>
|
||||||
<a href="./faqmasterlist.php" class="btn btn_02">FAQ 관리</a>
|
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||||
<a href="./faqform.php?fm_id=<?php echo $fm['fm_id']; ?>" class="btn btn_01">FAQ 상세내용 추가</a>
|
<thead>
|
||||||
</div>
|
<tr>
|
||||||
|
<th scope="col">번호</th>
|
||||||
<div class="tbl_head01 tbl_wrap">
|
<th scope="col">제목</th>
|
||||||
<table>
|
<th scope="col">순서</th>
|
||||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
<th scope="col">관리</th>
|
||||||
<thead>
|
</tr>
|
||||||
<tr>
|
</thead>
|
||||||
<th scope="col">번호</th>
|
<tbody>
|
||||||
<th scope="col">제목</th>
|
<?php
|
||||||
<th scope="col">순서</th>
|
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||||
<th scope="col">관리</th>
|
{
|
||||||
</tr>
|
$row1 = sql_fetch(" select COUNT(*) as cnt from {$g5['faq_table']} where fm_id = '{$row['fm_id']}' ");
|
||||||
</thead>
|
$cnt = $row1[cnt];
|
||||||
<tbody>
|
|
||||||
<?php
|
$s_mod = icon("수정", "");
|
||||||
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
$s_del = icon("삭제", "");
|
||||||
$row1 = sql_fetch(" select COUNT(*) as cnt from {$g5['faq_table']} where fm_id = '{$row['fm_id']}' ");
|
|
||||||
$cnt = $row1['cnt'];
|
$num = $i + 1;
|
||||||
|
|
||||||
$s_mod = icon("수정", "");
|
$bg = 'bg'.($i%2);
|
||||||
$s_del = icon("삭제", "");
|
?>
|
||||||
|
|
||||||
$num = $i + 1;
|
<tr class="<?php echo $bg; ?>">
|
||||||
|
<td class="td_num"><?php echo $num; ?></td>
|
||||||
$bg = 'bg' . ($i % 2);
|
<td class="td_left"><?php echo stripslashes($row['fa_subject']); ?></td>
|
||||||
|
<td class="td_num"><?php echo $row['fa_order']; ?></td>
|
||||||
$fa_subject = conv_content($row['fa_subject'], 1);
|
<td class="td_mng td_mng_m">
|
||||||
?>
|
<a href="./faqform.php?w=u&fm_id=<?php echo $row['fm_id']; ?>&fa_id=<?php echo $row['fa_id']; ?>" class="btn btn_03"><span class="sound_only"><?php echo stripslashes($row['fa_subject']); ?> </span>수정</a>
|
||||||
|
<a href="./faqformupdate.php?w=d&fm_id=<?php echo $row['fm_id']; ?>&fa_id=<?php echo $row['fa_id']; ?>" onclick="return delete_confirm(this);" class="btn btn_02"><span class="sound_only"><?php echo stripslashes($row['fa_subject']); ?> </span>삭제</a>
|
||||||
<tr class="<?php echo $bg; ?>">
|
</td>
|
||||||
<td class="td_num"><?php echo $num; ?></td>
|
</tr>
|
||||||
<td class="td_left"><?php echo $fa_subject; ?></td>
|
|
||||||
<td class="td_num"><?php echo $row['fa_order']; ?></td>
|
<?php
|
||||||
<td class="td_mng td_mng_m">
|
}
|
||||||
<a href="./faqform.php?w=u&fm_id=<?php echo $row['fm_id']; ?>&fa_id=<?php echo $row['fa_id']; ?>" class="btn btn_03"><span class="sound_only"><?php echo $fa_subject; ?> </span>수정</a>
|
|
||||||
<a href="./faqformupdate.php?w=d&fm_id=<?php echo $row['fm_id']; ?>&fa_id=<?php echo $row['fa_id']; ?>" onclick="return delete_confirm(this);" class="btn btn_02"><span class="sound_only"><?php echo $fa_subject; ?> </span>삭제</a>
|
if ($i == 0) {
|
||||||
</td>
|
echo '<tr><td colspan="4" class="empty_table">자료가 없습니다.</td></tr>';
|
||||||
</tr>
|
}
|
||||||
<?php
|
?>
|
||||||
}
|
</tbody>
|
||||||
|
</table>
|
||||||
if ($i == 0) {
|
|
||||||
echo '<tr><td colspan="4" class="empty_table">자료가 없습니다.</td></tr>';
|
</div>
|
||||||
}
|
|
||||||
?>
|
|
||||||
</tbody>
|
<?php
|
||||||
</table>
|
include_once (G5_ADMIN_PATH.'/admin.tail.php');
|
||||||
|
?>
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<?php
|
|
||||||
require_once G5_ADMIN_PATH . '/admin.tail.php';
|
|
||||||
|
|||||||
+165
-167
@@ -1,167 +1,165 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = '300700';
|
$sub_menu = '300700';
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
require_once G5_EDITOR_LIB;
|
include_once(G5_EDITOR_LIB);
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, "w");
|
auth_check($auth[$sub_menu], "w");
|
||||||
|
|
||||||
$html_title = 'FAQ';
|
$html_title = 'FAQ';
|
||||||
|
|
||||||
$fm_id = isset($_GET['fm_id']) ? strval(preg_replace('/[^0-9]/', '', $_GET['fm_id'])) : 0;
|
$fm_id = preg_replace('/[^0-9]/', '', $fm_id);
|
||||||
|
|
||||||
if ($w == "u") {
|
if ($w == "u")
|
||||||
$html_title .= ' 수정';
|
{
|
||||||
$readonly = ' readonly';
|
$html_title .= ' 수정';
|
||||||
|
$readonly = ' readonly';
|
||||||
$sql = " select * from {$g5['faq_master_table']} where fm_id = '$fm_id' ";
|
|
||||||
$fm = sql_fetch($sql);
|
$sql = " select * from {$g5['faq_master_table']} where fm_id = '$fm_id' ";
|
||||||
if (!$fm['fm_id']) {
|
$fm = sql_fetch($sql);
|
||||||
alert('등록된 자료가 없습니다.');
|
if (!$fm['fm_id']) alert('등록된 자료가 없습니다.');
|
||||||
}
|
}
|
||||||
} else {
|
else
|
||||||
$html_title .= ' 입력';
|
{
|
||||||
$fm = array('fm_order' => '', 'fm_subject' => '', 'fm_id' => 0, 'fm_head_html' => '', 'fm_tail_html' => '', 'fm_mobile_head_html' => '', 'fm_mobile_tail_html' => '');
|
$html_title .= ' 입력';
|
||||||
}
|
}
|
||||||
|
|
||||||
$g5['title'] = $html_title . ' 관리';
|
$g5['title'] = $html_title.' 관리';
|
||||||
|
|
||||||
// 모바일 상하단 내용 필드추가
|
// 모바일 상하단 내용 필드추가
|
||||||
|
if(!sql_query(" select fm_mobile_head_html from {$g5['faq_master_table']} limit 1 ", false)) {
|
||||||
require_once G5_ADMIN_PATH . '/admin.head.php';
|
sql_query(" ALTER TABLE `{$g5['faq_master_table']}`
|
||||||
?>
|
ADD `fm_mobile_head_html` text NOT NULL AFTER `fm_tail_html`,
|
||||||
|
ADD `fm_mobile_tail_html` text NOT NULL AFTER `fm_mobile_head_html` ", true);
|
||||||
<form name="frmfaqmasterform" action="./faqmasterformupdate.php" onsubmit="return frmfaqmasterform_check(this);" method="post" enctype="MULTIPART/FORM-DATA">
|
}
|
||||||
<input type="hidden" name="w" value="<?php echo $w; ?>">
|
|
||||||
<input type="hidden" name="fm_id" value="<?php echo $fm_id; ?>">
|
include_once (G5_ADMIN_PATH.'/admin.head.php');
|
||||||
<input type="hidden" name="token" value="">
|
?>
|
||||||
|
|
||||||
<div class="tbl_frm01 tbl_wrap">
|
<form name="frmfaqmasterform" action="./faqmasterformupdate.php" onsubmit="return frmfaqmasterform_check(this);" method="post" enctype="MULTIPART/FORM-DATA">
|
||||||
<table>
|
<input type="hidden" name="w" value="<?php echo $w; ?>">
|
||||||
<caption><?php echo $g5['title']; ?></caption>
|
<input type="hidden" name="fm_id" value="<?php echo $fm_id; ?>">
|
||||||
<colgroup>
|
<input type="hidden" name="token" value="">
|
||||||
<col class="grid_4">
|
|
||||||
<col>
|
<div class="tbl_frm01 tbl_wrap">
|
||||||
</colgroup>
|
<table>
|
||||||
<tbody>
|
<caption><?php echo $g5['title']; ?></caption>
|
||||||
<tr>
|
<colgroup>
|
||||||
<th scope="row"><label for="fm_order">출력순서</label></th>
|
<col class="grid_4">
|
||||||
<td>
|
<col>
|
||||||
<?php echo help('숫자가 작을수록 FAQ 분류에서 먼저 출력됩니다.'); ?>
|
</colgroup>
|
||||||
<input type="text" name="fm_order" value="<?php echo $fm['fm_order']; ?>" id="fm_order" class="frm_input" maxlength="10" size="10">
|
<tbody>
|
||||||
</td>
|
<tr>
|
||||||
</tr>
|
<th scope="row"><label for="fm_order">출력순서</label></th>
|
||||||
<tr>
|
<td>
|
||||||
<th scope="row"><label for="fm_subject">제목</label></th>
|
<?php echo help('숫자가 작을수록 FAQ 분류에서 먼저 출력됩니다.'); ?>
|
||||||
<td>
|
<input type="text" name="fm_order" value="<?php echo $fm['fm_order']; ?>" id="fm_order" class="frm_input" maxlength="10" size="10">
|
||||||
<input type="text" value="<?php echo get_text($fm['fm_subject']); ?>" name="fm_subject" id="fm_subject" required class="frm_input required" size="70">
|
</td>
|
||||||
<?php if ($w == 'u') { ?>
|
</tr>
|
||||||
<a href="<?php echo G5_BBS_URL; ?>/faq.php?fm_id=<?php echo $fm_id; ?>" class="btn_frmline">보기</a>
|
<tr>
|
||||||
<a href="./faqlist.php?fm_id=<?php echo $fm_id; ?>" class="btn_frmline">상세보기</a>
|
<th scope="row"><label for="fm_subject">제목</label></th>
|
||||||
<?php } ?>
|
<td>
|
||||||
</td>
|
<input type="text" value="<?php echo get_text($fm['fm_subject']); ?>" name="fm_subject" id="fm_subject" required class="frm_input required" size="70">
|
||||||
</tr>
|
<?php if ($w == 'u') { ?>
|
||||||
<tr>
|
<a href="<?php echo G5_BBS_URL; ?>/faq.php?fm_id=<?php echo $fm_id; ?>" class="btn_frmline">보기</a>
|
||||||
<th scope="row"><label for="fm_himg">상단이미지</label></th>
|
<a href="./faqlist.php?fm_id=<?php echo $fm_id; ?>" class="btn_frmline">상세보기</a>
|
||||||
<td>
|
<?php } ?>
|
||||||
<input type="file" name="fm_himg" id="fm_himg">
|
</td>
|
||||||
<?php
|
</tr>
|
||||||
$himg = G5_DATA_PATH . '/faq/' . $fm['fm_id'] . '_h';
|
<tr>
|
||||||
$himg_str = '';
|
<th scope="row"><label for="fm_himg">상단이미지</label></th>
|
||||||
$width = 0;
|
<td>
|
||||||
if (file_exists($himg)) {
|
<input type="file" name="fm_himg" id="fm_himg">
|
||||||
$size = @getimagesize($himg);
|
<?php
|
||||||
if ($size) {
|
$himg = G5_DATA_PATH.'/faq/'.$fm['fm_id'].'_h';
|
||||||
if ($size[0] && $size[0] > 750) {
|
if (file_exists($himg)) {
|
||||||
$width = 750;
|
$size = @getimagesize($himg);
|
||||||
} else {
|
if($size[0] && $size[0] > 750)
|
||||||
$width = $size[0];
|
$width = 750;
|
||||||
}
|
else
|
||||||
}
|
$width = $size[0];
|
||||||
echo '<input type="checkbox" name="fm_himg_del" value="1" id="fm_himg_del"> <label for="fm_himg_del">삭제</label>';
|
|
||||||
$himg_str = '<img src="' . G5_DATA_URL . '/faq/' . $fm['fm_id'] . '_h" width="' . $width . '" alt="">';
|
echo '<input type="checkbox" name="fm_himg_del" value="1" id="fm_himg_del"> <label for="fm_himg_del">삭제</label>';
|
||||||
}
|
$himg_str = '<img src="'.G5_DATA_URL.'/faq/'.$fm['fm_id'].'_h" width="'.$width.'" alt="">';
|
||||||
if ($himg_str) {
|
}
|
||||||
echo '<div class="banner_or_img">';
|
if ($himg_str) {
|
||||||
echo $himg_str;
|
echo '<div class="banner_or_img">';
|
||||||
echo '</div>';
|
echo $himg_str;
|
||||||
}
|
echo '</div>';
|
||||||
?>
|
}
|
||||||
</td>
|
?>
|
||||||
</tr>
|
</td>
|
||||||
<tr>
|
</tr>
|
||||||
<th scope="row"><label for="fm_timg">하단이미지</label></th>
|
<tr>
|
||||||
<td>
|
<th scope="row"><label for="fm_timg">하단이미지</label></th>
|
||||||
<input type="file" name="fm_timg" id="fm_timg">
|
<td>
|
||||||
<?php
|
<input type="file" name="fm_timg" id="fm_timg">
|
||||||
$timg = G5_DATA_PATH . '/faq/' . $fm['fm_id'] . '_t';
|
<?php
|
||||||
$timg_str = '';
|
$timg = G5_DATA_PATH.'/faq/'.$fm['fm_id'].'_t';
|
||||||
$width = 0;
|
if (file_exists($timg)) {
|
||||||
if (file_exists($timg)) {
|
$size = @getimagesize($timg);
|
||||||
$size = @getimagesize($timg);
|
if($size[0] && $size[0] > 750)
|
||||||
if ($size) {
|
$width = 750;
|
||||||
if ($size[0] && $size[0] > 750) {
|
else
|
||||||
$width = 750;
|
$width = $size[0];
|
||||||
} else {
|
|
||||||
$width = $size[0];
|
echo '<input type="checkbox" name="fm_timg_del" value="1" id="fm_timg_del"><label for="fm_timg_del">삭제</label>';
|
||||||
}
|
$timg_str = '<img src="'.G5_DATA_URL.'/faq/'.$fm['fm_id'].'_t" width="'.$width.'" alt="">';
|
||||||
}
|
}
|
||||||
|
if ($timg_str) {
|
||||||
echo '<input type="checkbox" name="fm_timg_del" value="1" id="fm_timg_del"><label for="fm_timg_del">삭제</label>';
|
echo '<div class="banner_or_img">';
|
||||||
$timg_str = '<img src="' . G5_DATA_URL . '/faq/' . $fm['fm_id'] . '_t" width="' . $width . '" alt="">';
|
echo $timg_str;
|
||||||
}
|
echo '</div>';
|
||||||
if ($timg_str) {
|
}
|
||||||
echo '<div class="banner_or_img">';
|
?>
|
||||||
echo $timg_str;
|
</td>
|
||||||
echo '</div>';
|
</tr>
|
||||||
}
|
<tr>
|
||||||
?>
|
<th scope="row">상단 내용</th>
|
||||||
</td>
|
<td>
|
||||||
</tr>
|
<?php echo editor_html('fm_head_html', get_text($fm['fm_head_html'], 0)); ?>
|
||||||
<tr>
|
</td>
|
||||||
<th scope="row">상단 내용</th>
|
</tr>
|
||||||
<td>
|
<tr>
|
||||||
<?php echo editor_html('fm_head_html', get_text(html_purifier($fm['fm_head_html']), 0)); ?>
|
<th scope="row">하단 내용</th>
|
||||||
</td>
|
<td>
|
||||||
</tr>
|
<?php echo editor_html('fm_tail_html', get_text($fm['fm_tail_html'], 0)); ?>
|
||||||
<tr>
|
</td>
|
||||||
<th scope="row">하단 내용</th>
|
</tr>
|
||||||
<td>
|
<tr>
|
||||||
<?php echo editor_html('fm_tail_html', get_text(html_purifier($fm['fm_tail_html']), 0)); ?>
|
<th scope="row">모바일상단 내용</th>
|
||||||
</td>
|
<td>
|
||||||
</tr>
|
<?php echo editor_html('fm_mobile_head_html', get_text($fm['fm_mobile_head_html'], 0)); ?>
|
||||||
<tr>
|
</td>
|
||||||
<th scope="row">모바일상단 내용</th>
|
</tr>
|
||||||
<td>
|
<tr>
|
||||||
<?php echo editor_html('fm_mobile_head_html', get_text(html_purifier($fm['fm_mobile_head_html']), 0)); ?>
|
<th scope="row">모바일하단 내용</th>
|
||||||
</td>
|
<td>
|
||||||
</tr>
|
<?php echo editor_html('fm_mobile_tail_html', get_text($fm['fm_mobile_tail_html'], 0)); ?>
|
||||||
<tr>
|
</td>
|
||||||
<th scope="row">모바일하단 내용</th>
|
</tr>
|
||||||
<td>
|
</tbody>
|
||||||
<?php echo editor_html('fm_mobile_tail_html', get_text(html_purifier($fm['fm_mobile_tail_html']), 0)); ?>
|
</table>
|
||||||
</td>
|
</div>
|
||||||
</tr>
|
|
||||||
</tbody>
|
<div class="btn_fixed_top">
|
||||||
</table>
|
<a href="./faqmasterlist.php" class="btn btn_02">목록</a>
|
||||||
</div>
|
<input type="submit" value="확인" class="btn_submit btn" accesskey="s">
|
||||||
|
</div>
|
||||||
<div class="btn_fixed_top">
|
|
||||||
<a href="./faqmasterlist.php" class="btn btn_02">목록</a>
|
</form>
|
||||||
<input type="submit" value="확인" class="btn_submit btn" accesskey="s">
|
|
||||||
</div>
|
<script>
|
||||||
|
function frmfaqmasterform_check(f)
|
||||||
</form>
|
{
|
||||||
|
<?php echo get_editor_js('fm_head_html'); ?>
|
||||||
<script>
|
<?php echo get_editor_js('fm_tail_html'); ?>
|
||||||
function frmfaqmasterform_check(f) {
|
<?php echo get_editor_js('fm_mobile_head_html'); ?>
|
||||||
<?php echo get_editor_js('fm_head_html'); ?>
|
<?php echo get_editor_js('fm_mobile_tail_html'); ?>
|
||||||
<?php echo get_editor_js('fm_tail_html'); ?>
|
}
|
||||||
<?php echo get_editor_js('fm_mobile_head_html'); ?>
|
|
||||||
<?php echo get_editor_js('fm_mobile_tail_html'); ?>
|
// document.frmfaqmasterform.fm_subject.focus();
|
||||||
}
|
</script>
|
||||||
|
|
||||||
// document.frmfaqmasterform.fm_subject.focus();
|
<?php
|
||||||
</script>
|
include_once (G5_ADMIN_PATH.'/admin.tail.php');
|
||||||
|
?>
|
||||||
<?php
|
|
||||||
require_once G5_ADMIN_PATH . '/admin.tail.php';
|
|
||||||
|
|||||||
+74
-86
@@ -1,86 +1,74 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = '300700';
|
$sub_menu = '300700';
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
|
|
||||||
if ($w == "u" || $w == "d") {
|
if ($w == "u" || $w == "d")
|
||||||
check_demo();
|
check_demo();
|
||||||
}
|
|
||||||
|
if ($W == 'd')
|
||||||
if ($w == 'd') {
|
auth_check($auth[$sub_menu], "d");
|
||||||
auth_check_menu($auth, $sub_menu, "d");
|
else
|
||||||
} else {
|
auth_check($auth[$sub_menu], "w");
|
||||||
auth_check_menu($auth, $sub_menu, "w");
|
|
||||||
}
|
check_admin_token();
|
||||||
|
|
||||||
check_admin_token();
|
@mkdir(G5_DATA_PATH."/faq", G5_DIR_PERMISSION);
|
||||||
|
@chmod(G5_DATA_PATH."/faq", G5_DIR_PERMISSION);
|
||||||
@mkdir(G5_DATA_PATH . "/faq", G5_DIR_PERMISSION);
|
|
||||||
@chmod(G5_DATA_PATH . "/faq", G5_DIR_PERMISSION);
|
if ($fm_himg_del) @unlink(G5_DATA_PATH."/faq/{$fm_id}_h");
|
||||||
|
if ($fm_timg_del) @unlink(G5_DATA_PATH."/faq/{$fm_id}_t");
|
||||||
$fm_id = isset($_REQUEST['fm_id']) ? (int) $_REQUEST['fm_id'] : 0;
|
|
||||||
$fm_himg_del = isset($_POST['fm_himg_del']) ? (int) $_POST['fm_himg_del'] : 0;
|
$sql_common = " set fm_subject = '$fm_subject',
|
||||||
$fm_timg_del = isset($_POST['fm_timg_del']) ? (int) $_POST['fm_timg_del'] : 0;
|
fm_head_html = '$fm_head_html',
|
||||||
$fm_subject = isset($_POST['fm_subject']) ? addslashes(strip_tags(clean_xss_attributes(stripslashes($_POST['fm_subject'])))) : '';
|
fm_tail_html = '$fm_tail_html',
|
||||||
$fm_head_html = isset($_POST['fm_head_html']) ? $_POST['fm_head_html'] : '';
|
fm_mobile_head_html = '$fm_mobile_head_html',
|
||||||
$fm_tail_html = isset($_POST['fm_tail_html']) ? $_POST['fm_tail_html'] : '';
|
fm_mobile_tail_html = '$fm_mobile_tail_html',
|
||||||
$fm_mobile_head_html = isset($_POST['fm_mobile_head_html']) ? $_POST['fm_mobile_head_html'] : '';
|
fm_order = '$fm_order' ";
|
||||||
$fm_mobile_tail_html = isset($_POST['fm_mobile_tail_html']) ? $_POST['fm_mobile_tail_html'] : '';
|
|
||||||
$fm_order = isset($_POST['fm_order']) ? (int) $_POST['fm_order'] : 0;
|
if ($w == "")
|
||||||
|
{
|
||||||
if ($fm_himg_del) {
|
$sql = " alter table {$g5['faq_master_table']} auto_increment=1 ";
|
||||||
@unlink(G5_DATA_PATH . "/faq/{$fm_id}_h");
|
sql_query($sql);
|
||||||
}
|
|
||||||
if ($fm_timg_del) {
|
$sql = " insert {$g5['faq_master_table']} $sql_common ";
|
||||||
@unlink(G5_DATA_PATH . "/faq/{$fm_id}_t");
|
sql_query($sql);
|
||||||
}
|
|
||||||
|
$fm_id = sql_insert_id();
|
||||||
$sql_common = " set fm_subject = '$fm_subject',
|
}
|
||||||
fm_head_html = '$fm_head_html',
|
else if ($w == "u")
|
||||||
fm_tail_html = '$fm_tail_html',
|
{
|
||||||
fm_mobile_head_html = '$fm_mobile_head_html',
|
$sql = " update {$g5['faq_master_table']} $sql_common where fm_id = '$fm_id' ";
|
||||||
fm_mobile_tail_html = '$fm_mobile_tail_html',
|
sql_query($sql);
|
||||||
fm_order = '$fm_order' ";
|
}
|
||||||
|
else if ($w == "d")
|
||||||
if ($w == "") {
|
{
|
||||||
$sql = " insert {$g5['faq_master_table']} $sql_common ";
|
@unlink(G5_DATA_PATH."/faq/{$fm_id}_h");
|
||||||
sql_query($sql);
|
@unlink(G5_DATA_PATH."/faq/{$fm_id}_t");
|
||||||
|
|
||||||
$fm_id = sql_insert_id();
|
// FAQ삭제
|
||||||
run_event('admin_faq_master_created', $fm_id);
|
$sql = " delete from {$g5['faq_master_table']} where fm_id = '$fm_id' ";
|
||||||
|
sql_query($sql);
|
||||||
} elseif ($w == "u") {
|
|
||||||
$sql = " update {$g5['faq_master_table']} $sql_common where fm_id = '$fm_id' ";
|
// FAQ상세삭제
|
||||||
sql_query($sql);
|
$sql = " delete from {$g5['faq_table']} where fm_id = '$fm_id' ";
|
||||||
run_event('admin_faq_master_updated', $fm_id);
|
sql_query($sql);
|
||||||
|
}
|
||||||
} elseif ($w == "d") {
|
|
||||||
@unlink(G5_DATA_PATH . "/faq/{$fm_id}_h");
|
if ($w == "" || $w == "u")
|
||||||
@unlink(G5_DATA_PATH . "/faq/{$fm_id}_t");
|
{
|
||||||
|
if ($_FILES['fm_himg']['name']){
|
||||||
// FAQ삭제
|
$dest_path = G5_DATA_PATH."/faq/".$fm_id."_h";
|
||||||
$sql = " delete from {$g5['faq_master_table']} where fm_id = '$fm_id' ";
|
@move_uploaded_file($_FILES['fm_himg']['tmp_name'], $dest_path);
|
||||||
sql_query($sql);
|
@chmod($dest_path, G5_FILE_PERMISSION);
|
||||||
|
}
|
||||||
// FAQ상세삭제
|
if ($_FILES['fm_timg']['name']){
|
||||||
$sql = " delete from {$g5['faq_table']} where fm_id = '$fm_id' ";
|
$dest_path = G5_DATA_PATH."/faq/".$fm_id."_t";
|
||||||
sql_query($sql);
|
@move_uploaded_file($_FILES['fm_timg']['tmp_name'], $dest_path);
|
||||||
|
@chmod($dest_path, G5_FILE_PERMISSION);
|
||||||
run_event('admin_faq_master_deleted', $fm_id);
|
}
|
||||||
}
|
|
||||||
|
goto_url("./faqmasterform.php?w=u&fm_id=$fm_id");
|
||||||
if ($w == "" || $w == "u") {
|
}
|
||||||
if ($_FILES['fm_himg']['name']) {
|
else
|
||||||
$dest_path = G5_DATA_PATH . "/faq/" . $fm_id . "_h";
|
goto_url("./faqmasterlist.php");
|
||||||
@move_uploaded_file($_FILES['fm_himg']['tmp_name'], $dest_path);
|
?>
|
||||||
@chmod($dest_path, G5_FILE_PERMISSION);
|
|
||||||
}
|
|
||||||
if ($_FILES['fm_timg']['name']) {
|
|
||||||
$dest_path = G5_DATA_PATH . "/faq/" . $fm_id . "_t";
|
|
||||||
@move_uploaded_file($_FILES['fm_timg']['tmp_name'], $dest_path);
|
|
||||||
@chmod($dest_path, G5_FILE_PERMISSION);
|
|
||||||
}
|
|
||||||
|
|
||||||
goto_url("./faqmasterform.php?w=u&fm_id=$fm_id");
|
|
||||||
} else {
|
|
||||||
goto_url("./faqmasterlist.php");
|
|
||||||
}
|
|
||||||
|
|||||||
+128
-100
@@ -1,100 +1,128 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = '300700';
|
$sub_menu = '300700';
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, "r");
|
auth_check($auth[$sub_menu], "r");
|
||||||
|
|
||||||
//dbconfig파일에 $g5['faq_table'] , $g5['faq_master_table'] 배열변수가 있는지 체크
|
//dbconfig파일에 $g5['faq_table'] , $g5['faq_master_table'] 배열변수가 있는지 체크
|
||||||
if (!isset($g5['faq_table']) || !isset($g5['faq_master_table'])) {
|
if( !isset($g5['faq_table']) || !isset($g5['faq_master_table']) ){
|
||||||
die('<meta charset="utf-8">/data/dbconfig.php 파일에 <br ><strong>$g5[\'faq_table\'] = G5_TABLE_PREFIX.\'faq\';</strong><br ><strong>$g5[\'faq_master_table\'] = G5_TABLE_PREFIX.\'faq_master\';</strong><br > 를 추가해 주세요.');
|
die('<meta charset="utf-8">/data/dbconfig.php 파일에 <br ><strong>$g5[\'faq_table\'] = G5_TABLE_PREFIX.\'faq\';</strong><br ><strong>$g5[\'faq_master_table\'] = G5_TABLE_PREFIX.\'faq_master\';</strong><br > 를 추가해 주세요.');
|
||||||
}
|
}
|
||||||
|
|
||||||
//자주하시는 질문 마스터 테이블이 있는지 검사한다.
|
//자주하시는 질문 마스터 테이블이 있는지 검사한다.
|
||||||
|
if(!sql_query(" DESCRIBE {$g5['faq_master_table']} ", false)) {
|
||||||
//자주하시는 질문 테이블이 있는지 검사한다.
|
if(sql_query(" DESCRIBE {$g5['g5_shop_faq_master_table']} ", false)) {
|
||||||
|
sql_query(" ALTER TABLE {$g5['g5_shop_faq_master_table']} RENAME TO `{$g5['faq_master_table']}` ;", false);
|
||||||
$g5['title'] = 'FAQ관리';
|
} else {
|
||||||
require_once G5_ADMIN_PATH . '/admin.head.php';
|
$query_cp = sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['faq_master_table']}` (
|
||||||
|
`fm_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
$sql_common = " from {$g5['faq_master_table']} ";
|
`fm_subject` varchar(255) NOT NULL DEFAULT '',
|
||||||
|
`fm_head_html` text NOT NULL,
|
||||||
// 테이블의 전체 레코드수만 얻음
|
`fm_tail_html` text NOT NULL,
|
||||||
$sql = " select count(*) as cnt " . $sql_common;
|
`fm_order` int(11) NOT NULL DEFAULT '0',
|
||||||
$row = sql_fetch($sql);
|
PRIMARY KEY (`fm_id`)
|
||||||
$total_count = $row['cnt'];
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ", true);
|
||||||
|
}
|
||||||
$rows = $config['cf_page_rows'];
|
// FAQ Master
|
||||||
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
sql_query(" insert into `{$g5['faq_master_table']}` set fm_id = '1', fm_subject = '자주하시는 질문' ", false);
|
||||||
if ($page < 1) {
|
}
|
||||||
$page = 1;
|
|
||||||
} // 페이지가 없으면 첫 페이지 (1 페이지)
|
//자주하시는 질문 테이블이 있는지 검사한다.
|
||||||
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
if(!sql_query(" DESCRIBE {$g5['faq_table']} ", false)) {
|
||||||
|
if(sql_query(" DESCRIBE {$g5['g5_shop_faq_table']} ", false)) {
|
||||||
$sql = "select * $sql_common order by fm_order, fm_id limit $from_record, {$config['cf_page_rows']} ";
|
sql_query(" ALTER TABLE {$g5['g5_shop_faq_table']} RENAME TO `{$g5['faq_table']}` ;", false);
|
||||||
$result = sql_query($sql);
|
} else {
|
||||||
?>
|
$query_cp = sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['faq_table']}` (
|
||||||
|
`fa_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
<div class="local_ov01 local_ov">
|
`fm_id` int(11) NOT NULL DEFAULT '0',
|
||||||
<?php if ($page > 1) { ?>
|
`fa_subject` text NOT NULL,
|
||||||
<a href="<?php echo $_SERVER['SCRIPT_NAME']; ?>">처음으로</a>
|
`fa_content` text NOT NULL,
|
||||||
<?php } ?>
|
`fa_order` int(11) NOT NULL DEFAULT '0',
|
||||||
<span class="btn_ov01"><span class="ov_txt"> 전체 FAQ </span><span class="ov_num"> <?php echo $total_count; ?>건</span></span>
|
PRIMARY KEY (`fa_id`),
|
||||||
</div>
|
KEY `fm_id` (`fm_id`)
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ", true);
|
||||||
<div class="local_desc01 local_desc">
|
}
|
||||||
<ol>
|
}
|
||||||
<li>FAQ는 무제한으로 등록할 수 있습니다</li>
|
|
||||||
<li><strong>FAQ추가</strong>를 눌러 FAQ Master를 생성합니다. (하나의 FAQ 타이틀 생성 : 자주하시는 질문, 이용안내..등 )</li>
|
$g5['title'] = 'FAQ관리';
|
||||||
<li>생성한 FAQ Master 의 <strong>제목</strong>을 눌러 세부 내용을 관리할 수 있습니다.</li>
|
include_once (G5_ADMIN_PATH.'/admin.head.php');
|
||||||
</ol>
|
|
||||||
</div>
|
$sql_common = " from {$g5['faq_master_table']} ";
|
||||||
|
|
||||||
<div class="btn_fixed_top">
|
// 테이블의 전체 레코드수만 얻음
|
||||||
<a href="./faqmasterform.php" class="btn_01 btn">FAQ추가</a>
|
$sql = " select count(*) as cnt " . $sql_common;
|
||||||
</div>
|
$row = sql_fetch($sql);
|
||||||
|
$total_count = $row['cnt'];
|
||||||
<div class="tbl_head01 tbl_wrap">
|
|
||||||
<table>
|
$rows = $config['cf_page_rows'];
|
||||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
||||||
<thead>
|
if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||||
<tr>
|
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
||||||
<th scope="col">ID</th>
|
|
||||||
<th scope="col">제목</th>
|
$sql = "select * $sql_common order by fm_order, fm_id limit $from_record, {$config['cf_page_rows']} ";
|
||||||
<th scope="col">FAQ수</th>
|
$result = sql_query($sql);
|
||||||
<th scope="col">순서</th>
|
?>
|
||||||
<th scope="col">관리</th>
|
|
||||||
</tr>
|
<div class="local_ov01 local_ov">
|
||||||
</thead>
|
<?php if ($page > 1) {?><a href="<?php echo $_SERVER['SCRIPT_NAME']; ?>">처음으로</a><?php } ?>
|
||||||
<tbody>
|
<span class="btn_ov01"><span class="ov_txt"> 전체 FAQ </span><span class="ov_num"> <?php echo $total_count; ?>건</span></span>
|
||||||
<?php for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
</div>
|
||||||
$sql1 = " select COUNT(*) as cnt from {$g5['faq_table']} where fm_id = '{$row['fm_id']}' ";
|
|
||||||
$row1 = sql_fetch($sql1);
|
<div class="local_desc01 local_desc">
|
||||||
$cnt = $row1['cnt'];
|
<ol>
|
||||||
$bg = 'bg' . ($i % 2);
|
<li>FAQ는 무제한으로 등록할 수 있습니다</li>
|
||||||
?>
|
<li><strong>FAQ추가</strong>를 눌러 FAQ Master를 생성합니다. (하나의 FAQ 타이틀 생성 : 자주하시는 질문, 이용안내..등 )</li>
|
||||||
<tr class="<?php echo $bg; ?>">
|
<li>생성한 FAQ Master 의 <strong>제목</strong>을 눌러 세부 내용을 관리할 수 있습니다.</li>
|
||||||
<td class="td_num"><?php echo $row['fm_id']; ?></td>
|
</ol>
|
||||||
<td class="td_left"><a href="./faqlist.php?fm_id=<?php echo $row['fm_id']; ?>&fm_subject=<?php echo $row['fm_subject']; ?>"><?php echo stripslashes($row['fm_subject']); ?></a></td>
|
</div>
|
||||||
<td class="td_num"><?php echo $cnt; ?></td>
|
|
||||||
<td class="td_num"><?php echo $row['fm_order'] ?></td>
|
<div class="btn_fixed_top">
|
||||||
<td class="td_mng td_mng_l">
|
<a href="./faqmasterform.php" class="btn_01 btn">FAQ추가</a>
|
||||||
<a href="./faqmasterform.php?w=u&fm_id=<?php echo $row['fm_id']; ?>" class="btn btn_03"><span class="sound_only"><?php echo stripslashes($row['fm_subject']); ?> </span>수정</a>
|
</div>
|
||||||
<a href="<?php echo G5_BBS_URL; ?>/faq.php?fm_id=<?php echo $row['fm_id']; ?>" class="btn btn_02"><span class="sound_only"><?php echo stripslashes($row['fm_subject']); ?> </span>보기</a>
|
|
||||||
<a href="./faqmasterformupdate.php?w=d&fm_id=<?php echo $row['fm_id']; ?>" onclick="return delete_confirm(this);" class="btn btn_02"><span class="sound_only"><?php echo stripslashes($row['fm_subject']); ?> </span>삭제</a>
|
<div class="tbl_head01 tbl_wrap">
|
||||||
</td>
|
<table>
|
||||||
</tr>
|
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||||
<?php
|
<thead>
|
||||||
}
|
<tr>
|
||||||
|
<th scope="col">ID</th>
|
||||||
if ($i == 0) {
|
<th scope="col">제목</th>
|
||||||
echo '<tr><td colspan="5" class="empty_table"><span>자료가 한건도 없습니다.</span></td></tr>';
|
<th scope="col">FAQ수</th>
|
||||||
}
|
<th scope="col">순서</th>
|
||||||
?>
|
<th scope="col">관리</th>
|
||||||
</tbody>
|
</tr>
|
||||||
</table>
|
</thead>
|
||||||
</div>
|
<tbody>
|
||||||
|
<?php for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||||
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['SCRIPT_NAME']}?$qstr&page="); ?>
|
$sql1 = " select COUNT(*) as cnt from {$g5['faq_table']} where fm_id = '{$row['fm_id']}' ";
|
||||||
|
$row1 = sql_fetch($sql1);
|
||||||
<?php
|
$cnt = $row1['cnt'];
|
||||||
require_once G5_ADMIN_PATH . '/admin.tail.php';
|
$bg = 'bg'.($i%2);
|
||||||
|
?>
|
||||||
|
<tr class="<?php echo $bg; ?>">
|
||||||
|
<td class="td_num"><?php echo $row['fm_id']; ?></td>
|
||||||
|
<td class="td_left"><a href="./faqlist.php?fm_id=<?php echo $row['fm_id']; ?>&fm_subject=<?php echo $row['fm_subject']; ?>"><?php echo stripslashes($row['fm_subject']); ?></a></td>
|
||||||
|
<td class="td_num"><?php echo $cnt; ?></td>
|
||||||
|
<td class="td_num"><?php echo $row['fm_order']?></td>
|
||||||
|
<td class="td_mng td_mng_l">
|
||||||
|
<a href="./faqmasterform.php?w=u&fm_id=<?php echo $row['fm_id']; ?>" class="btn btn_03"><span class="sound_only"><?php echo stripslashes($row['fm_subject']); ?> </span>수정</a>
|
||||||
|
<a href="<?php echo G5_BBS_URL; ?>/faq.php?fm_id=<?php echo $row['fm_id']; ?>" class="btn btn_02"><span class="sound_only"><?php echo stripslashes($row['fm_subject']); ?> </span>보기</a>
|
||||||
|
<a href="./faqmasterformupdate.php?w=d&fm_id=<?php echo $row['fm_id']; ?>" onclick="return delete_confirm(this);" class="btn btn_02"><span class="sound_only"><?php echo stripslashes($row['fm_subject']); ?> </span>삭제</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($i == 0){
|
||||||
|
echo '<tr><td colspan="5" class="empty_table"><span>자료가 한건도 없습니다.</span></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&page="); ?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
include_once (G5_ADMIN_PATH.'/admin.tail.php');
|
||||||
|
?>
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 3.0 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 4.7 KiB |
+266
-300
@@ -1,347 +1,313 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = '100000';
|
$sub_menu = '100000';
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
|
|
||||||
@require_once './safe_check.php';
|
|
||||||
|
|
||||||
if (function_exists('social_log_file_delete')) {
|
|
||||||
//소셜로그인 디버그 파일 24시간 지난것은 삭제
|
|
||||||
social_log_file_delete(86400);
|
|
||||||
}
|
|
||||||
|
|
||||||
$g5['title'] = '관리자메인';
|
$g5['title'] = '관리자메인';
|
||||||
require_once './admin.head.php';
|
include_once ('./admin.head.php');
|
||||||
|
|
||||||
$new_member_rows = 5;
|
$new_member_rows = 5;
|
||||||
$new_point_rows = 5;
|
$new_point_rows = 5;
|
||||||
$new_write_rows = 5;
|
$new_write_rows = 5;
|
||||||
|
|
||||||
$addtional_content_before = run_replace('adm_index_addtional_content_before', '', $is_admin, $auth, $member);
|
$sql_common = " from {$g5['member_table']} ";
|
||||||
if ($addtional_content_before) {
|
|
||||||
echo $addtional_content_before;
|
$sql_search = " where (1) ";
|
||||||
|
|
||||||
|
if ($is_admin != 'super')
|
||||||
|
$sql_search .= " and mb_level <= '{$member['mb_level']}' ";
|
||||||
|
|
||||||
|
if (!$sst) {
|
||||||
|
$sst = "mb_datetime";
|
||||||
|
$sod = "desc";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!auth_check_menu($auth, '200100', 'r', true)) {
|
$sql_order = " order by {$sst} {$sod} ";
|
||||||
$sql_common = " from {$g5['member_table']} ";
|
|
||||||
|
|
||||||
$sql_search = " where (1) ";
|
$sql = " select count(*) as cnt {$sql_common} {$sql_search} {$sql_order} ";
|
||||||
|
$row = sql_fetch($sql);
|
||||||
|
$total_count = $row['cnt'];
|
||||||
|
|
||||||
if ($is_admin != 'super') {
|
// 탈퇴회원수
|
||||||
$sql_search .= " and mb_level <= '{$member['mb_level']}' ";
|
$sql = " select count(*) as cnt {$sql_common} {$sql_search} and mb_leave_date <> '' {$sql_order} ";
|
||||||
}
|
$row = sql_fetch($sql);
|
||||||
|
$leave_count = $row['cnt'];
|
||||||
|
|
||||||
if (!$sst) {
|
// 차단회원수
|
||||||
$sst = "mb_datetime";
|
$sql = " select count(*) as cnt {$sql_common} {$sql_search} and mb_intercept_date <> '' {$sql_order} ";
|
||||||
$sod = "desc";
|
$row = sql_fetch($sql);
|
||||||
}
|
$intercept_count = $row['cnt'];
|
||||||
|
|
||||||
$allowed_sst = array('mb_datetime');
|
$sql = " select * {$sql_common} {$sql_search} {$sql_order} limit {$new_member_rows} ";
|
||||||
if ($sst && !in_array($sst, $allowed_sst)) $sst = 'mb_datetime';
|
$result = sql_query($sql);
|
||||||
if ($sod && !in_array(strtolower($sod), array('asc', 'desc'))) $sod = '';
|
|
||||||
|
|
||||||
$sql_order = " order by {$sst} {$sod} ";
|
$colspan = 12;
|
||||||
|
?>
|
||||||
|
|
||||||
$sql = " SELECT count(*) as cnt {$sql_common} {$sql_search} {$sql_order} ";
|
<section>
|
||||||
$row = sql_fetch($sql);
|
<h2>신규가입회원 <?php echo $new_member_rows ?>건 목록</h2>
|
||||||
$total_count = $row['cnt'];
|
<div class="local_desc02 local_desc">
|
||||||
|
총회원수 <?php echo number_format($total_count) ?>명 중 차단 <?php echo number_format($intercept_count) ?>명, 탈퇴 : <?php echo number_format($leave_count) ?>명
|
||||||
|
</div>
|
||||||
|
|
||||||
// 탈퇴회원수
|
<div class="tbl_head01 tbl_wrap">
|
||||||
$sql = " select count(*) as cnt {$sql_common} {$sql_search} and mb_leave_date <> '' {$sql_order} ";
|
<table>
|
||||||
$row = sql_fetch($sql);
|
<caption>신규가입회원</caption>
|
||||||
$leave_count = $row['cnt'];
|
<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>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||||
|
{
|
||||||
|
// 접근가능한 그룹수
|
||||||
|
$sql2 = " select count(*) as cnt from {$g5['group_member_table']} where mb_id = '{$row['mb_id']}' ";
|
||||||
|
$row2 = sql_fetch($sql2);
|
||||||
|
$group = "";
|
||||||
|
if ($row2['cnt'])
|
||||||
|
$group = '<a href="./boardgroupmember_form.php?mb_id='.$row['mb_id'].'">'.$row2['cnt'].'</a>';
|
||||||
|
|
||||||
// 차단회원수
|
if ($is_admin == 'group')
|
||||||
$sql = " SELECT count(*) as cnt {$sql_common} {$sql_search} and mb_intercept_date <> '' {$sql_order} ";
|
{
|
||||||
$row = sql_fetch($sql);
|
$s_mod = '';
|
||||||
$intercept_count = $row['cnt'];
|
$s_del = '';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$s_mod = '<a href="./member_form.php?$qstr&w=u&mb_id='.$row['mb_id'].'">수정</a>';
|
||||||
|
$s_del = '<a href="./member_delete.php?'.$qstr.'&w=d&mb_id='.$row['mb_id'].'&url='.$_SERVER['SCRIPT_NAME'].'" onclick="return delete_confirm(this);">삭제</a>';
|
||||||
|
}
|
||||||
|
$s_grp = '<a href="./boardgroupmember_form.php?mb_id='.$row['mb_id'].'">그룹</a>';
|
||||||
|
|
||||||
$sql = " SELECT * {$sql_common} {$sql_search} {$sql_order} limit {$new_member_rows} ";
|
$leave_date = $row['mb_leave_date'] ? $row['mb_leave_date'] : date("Ymd", G5_SERVER_TIME);
|
||||||
$result = sql_query($sql);
|
$intercept_date = $row['mb_intercept_date'] ? $row['mb_intercept_date'] : date("Ymd", G5_SERVER_TIME);
|
||||||
|
|
||||||
$colspan = 12;
|
$mb_nick = get_sideview($row['mb_id'], get_text($row['mb_nick']), $row['mb_email'], $row['mb_homepage']);
|
||||||
?>
|
|
||||||
|
|
||||||
<section>
|
$mb_id = $row['mb_id'];
|
||||||
<h2>신규가입회원 <?php echo $new_member_rows ?>건 목록</h2>
|
if ($row['mb_leave_date'])
|
||||||
<div class="local_desc02 local_desc">
|
$mb_id = $mb_id;
|
||||||
총회원수 <?php echo number_format($total_count) ?>명 중 차단 <?php echo number_format($intercept_count) ?>명, 탈퇴 : <?php echo number_format($leave_count) ?>명
|
else if ($row['mb_intercept_date'])
|
||||||
</div>
|
$mb_id = $mb_id;
|
||||||
|
|
||||||
<div class="tbl_head01 tbl_wrap">
|
?>
|
||||||
<table>
|
<tr>
|
||||||
<caption>신규가입회원</caption>
|
<td class="td_mbid"><?php echo $mb_id ?></td>
|
||||||
<thead>
|
<td class="td_mbname"><?php echo get_text($row['mb_name']); ?></td>
|
||||||
<tr>
|
<td class="td_mbname sv_use"><div><?php echo $mb_nick ?></div></td>
|
||||||
<th scope="col">회원아이디</th>
|
<td class="td_num"><?php echo $row['mb_level'] ?></td>
|
||||||
<th scope="col">이름</th>
|
<td><a href="./point_list.php?sfl=mb_id&stx=<?php echo $row['mb_id'] ?>"><?php echo number_format($row['mb_point']) ?></a></td>
|
||||||
<th scope="col">닉네임</th>
|
<td class="td_boolean"><?php echo $row['mb_mailling']?'예':'아니오'; ?></td>
|
||||||
<th scope="col">권한</th>
|
<td class="td_boolean"><?php echo $row['mb_open']?'예':'아니오'; ?></td>
|
||||||
<th scope="col">포인트</th>
|
<td class="td_boolean"><?php echo preg_match('/[1-9]/', $row['mb_email_certify'])?'예':'아니오'; ?></td>
|
||||||
<th scope="col">수신</th>
|
<td class="td_boolean"><?php echo $row['mb_intercept_date']?'예':'아니오'; ?></td>
|
||||||
<th scope="col">공개</th>
|
<td class="td_category"><?php echo $group ?></td>
|
||||||
<th scope="col">인증</th>
|
</tr>
|
||||||
<th scope="col">차단</th>
|
<?php
|
||||||
<th scope="col">그룹</th>
|
}
|
||||||
</tr>
|
if ($i == 0)
|
||||||
</thead>
|
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||||
<tbody>
|
?>
|
||||||
<?php
|
</tbody>
|
||||||
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
</table>
|
||||||
// 접근가능한 그룹수
|
</div>
|
||||||
$sql2 = " SELECT count(*) as cnt from {$g5['group_member_table']} where mb_id = '{$row['mb_id']}' ";
|
|
||||||
$row2 = sql_fetch($sql2);
|
|
||||||
$group = "";
|
|
||||||
if ($row2['cnt']) {
|
|
||||||
$group = '<a href="./boardgroupmember_form.php?mb_id=' . $row['mb_id'] . '">' . $row2['cnt'] . '</a>';
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($is_admin == 'group') {
|
<div class="btn_list03 btn_list">
|
||||||
$s_mod = '';
|
<a href="./member_list.php">회원 전체보기</a>
|
||||||
$s_del = '';
|
</div>
|
||||||
} else {
|
|
||||||
$s_mod = '<a href="./member_form.php?$qstr&w=u&mb_id=' . $row['mb_id'] . '">수정</a>';
|
|
||||||
$s_del = '<a href="./member_delete.php?' . $qstr . '&w=d&mb_id=' . $row['mb_id'] . '&url=' . $_SERVER['SCRIPT_NAME'] . '" onclick="return delete_confirm(this);">삭제</a>';
|
|
||||||
}
|
|
||||||
$s_grp = '<a href="./boardgroupmember_form.php?mb_id=' . $row['mb_id'] . '">그룹</a>';
|
|
||||||
|
|
||||||
$leave_date = $row['mb_leave_date'] ? $row['mb_leave_date'] : date("Ymd", G5_SERVER_TIME);
|
</section>
|
||||||
$intercept_date = $row['mb_intercept_date'] ? $row['mb_intercept_date'] : date("Ymd", G5_SERVER_TIME);
|
|
||||||
|
|
||||||
$mb_nick = get_sideview($row['mb_id'], get_text($row['mb_nick']), $row['mb_email'], $row['mb_homepage']);
|
<?php
|
||||||
|
$sql_common = " from {$g5['board_new_table']} a, {$g5['board_table']} b, {$g5['group_table']} c where a.bo_table = b.bo_table and b.gr_id = c.gr_id ";
|
||||||
|
|
||||||
$mb_id = $row['mb_id'];
|
if ($gr_id)
|
||||||
?>
|
$sql_common .= " and b.gr_id = '$gr_id' ";
|
||||||
<tr>
|
if ($view) {
|
||||||
<td class="td_mbid"><?php echo $mb_id ?></td>
|
if ($view == 'w')
|
||||||
<td class="td_mbname"><?php echo get_text($row['mb_name']); ?></td>
|
$sql_common .= " and a.wr_id = a.wr_parent ";
|
||||||
<td class="td_mbname sv_use">
|
else if ($view == 'c')
|
||||||
<div><?php echo $mb_nick ?></div>
|
$sql_common .= " and a.wr_id <> a.wr_parent ";
|
||||||
</td>
|
}
|
||||||
<td class="td_num"><?php echo $row['mb_level'] ?></td>
|
$sql_order = " order by a.bn_id desc ";
|
||||||
<td><a href="./point_list.php?sfl=mb_id&stx=<?php echo $row['mb_id'] ?>"><?php echo number_format($row['mb_point']) ?></a></td>
|
|
||||||
<td class="td_boolean"><?php echo $row['mb_mailling'] ? '예' : '아니오'; ?></td>
|
|
||||||
<td class="td_boolean"><?php echo $row['mb_open'] ? '예' : '아니오'; ?></td>
|
|
||||||
<td class="td_boolean"><?php echo preg_match('/[1-9]/', $row['mb_email_certify']) ? '예' : '아니오'; ?></td>
|
|
||||||
<td class="td_boolean"><?php echo $row['mb_intercept_date'] ? '예' : '아니오'; ?></td>
|
|
||||||
<td class="td_category"><?php echo $group ?></td>
|
|
||||||
</tr>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
if ($i == 0) {
|
|
||||||
echo '<tr><td colspan="' . $colspan . '" class="empty_table">자료가 없습니다.</td></tr>';
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="btn_list03 btn_list">
|
$sql = " select count(*) as cnt {$sql_common} ";
|
||||||
<a href="./member_list.php">회원 전체보기</a>
|
$row = sql_fetch($sql);
|
||||||
</div>
|
$total_count = $row['cnt'];
|
||||||
</section>
|
|
||||||
|
|
||||||
<?php
|
$colspan = 5;
|
||||||
} //endif 최신 회원
|
?>
|
||||||
|
|
||||||
if (!auth_check_menu($auth, '300100', 'r', true)) {
|
<section>
|
||||||
|
<h2>최근게시물</h2>
|
||||||
|
|
||||||
$sql_common = " from {$g5['board_new_table']} a, {$g5['board_table']} b, {$g5['group_table']} c where a.bo_table = b.bo_table and b.gr_id = c.gr_id ";
|
<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>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
$sql = " select a.*, b.bo_subject, c.gr_subject, c.gr_id {$sql_common} {$sql_order} limit {$new_write_rows} ";
|
||||||
|
$result = sql_query($sql);
|
||||||
|
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||||
|
{
|
||||||
|
$tmp_write_table = $g5['write_prefix'] . $row['bo_table'];
|
||||||
|
|
||||||
if ($gr_id) {
|
if ($row['wr_id'] == $row['wr_parent']) // 원글
|
||||||
$sql_common .= " and b.gr_id = '{$gr_id}' ";
|
{
|
||||||
}
|
$comment = "";
|
||||||
if (isset($view) && $view) {
|
$comment_link = "";
|
||||||
if ($view == 'w') {
|
$row2 = sql_fetch(" select * from $tmp_write_table where wr_id = '{$row['wr_id']}' ");
|
||||||
$sql_common .= " and a.wr_id = a.wr_parent ";
|
|
||||||
} elseif ($view == 'c') {
|
$name = get_sideview($row2['mb_id'], get_text(cut_str($row2['wr_name'], $config['cf_cut_name'])), $row2['wr_email'], $row2['wr_homepage']);
|
||||||
$sql_common .= " and a.wr_id <> a.wr_parent ";
|
// 당일인 경우 시간으로 표시함
|
||||||
|
$datetime = substr($row2['wr_datetime'],0,10);
|
||||||
|
$datetime2 = $row2['wr_datetime'];
|
||||||
|
if ($datetime == G5_TIME_YMD)
|
||||||
|
$datetime2 = substr($datetime2,11,5);
|
||||||
|
else
|
||||||
|
$datetime2 = substr($datetime2,5,5);
|
||||||
|
|
||||||
|
}
|
||||||
|
else // 코멘트
|
||||||
|
{
|
||||||
|
$comment = '댓글. ';
|
||||||
|
$comment_link = '#c_'.$row['wr_id'];
|
||||||
|
$row2 = sql_fetch(" select * from {$tmp_write_table} where wr_id = '{$row['wr_parent']}' ");
|
||||||
|
$row3 = sql_fetch(" select mb_id, wr_name, wr_email, wr_homepage, wr_datetime from {$tmp_write_table} where wr_id = '{$row['wr_id']}' ");
|
||||||
|
|
||||||
|
$name = get_sideview($row3['mb_id'], get_text(cut_str($row3['wr_name'], $config['cf_cut_name'])), $row3['wr_email'], $row3['wr_homepage']);
|
||||||
|
// 당일인 경우 시간으로 표시함
|
||||||
|
$datetime = substr($row3['wr_datetime'],0,10);
|
||||||
|
$datetime2 = $row3['wr_datetime'];
|
||||||
|
if ($datetime == G5_TIME_YMD)
|
||||||
|
$datetime2 = substr($datetime2,11,5);
|
||||||
|
else
|
||||||
|
$datetime2 = substr($datetime2,5,5);
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="td_category"><a href="<?php echo G5_BBS_URL ?>/new.php?gr_id=<?php echo $row['gr_id'] ?>"><?php echo cut_str($row['gr_subject'],10) ?></a></td>
|
||||||
|
<td class="td_category"><a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $row['bo_table'] ?>"><?php echo cut_str($row['bo_subject'],20) ?></a></td>
|
||||||
|
<td><a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $row['bo_table'] ?>&wr_id=<?php echo $row2['wr_id'] ?><?php echo $comment_link ?>"><?php echo $comment ?><?php echo conv_subject($row2['wr_subject'], 100) ?></a></td>
|
||||||
|
<td class="td_mbname"><div><?php echo $name ?></div></td>
|
||||||
|
<td class="td_datetime"><?php echo $datetime ?></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<?php
|
||||||
}
|
}
|
||||||
}
|
if ($i == 0)
|
||||||
$sql_order = " order by a.bn_id desc ";
|
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
$sql = " SELECT count(*) as cnt {$sql_common} ";
|
<div class="btn_list03 btn_list">
|
||||||
$row = sql_fetch($sql);
|
<a href="<?php echo G5_BBS_URL ?>/new.php">최근게시물 더보기</a>
|
||||||
$total_count = $row['cnt'];
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
$colspan = 5;
|
<?php
|
||||||
?>
|
$sql_common = " from {$g5['point_table']} ";
|
||||||
|
$sql_search = " where (1) ";
|
||||||
|
$sql_order = " order by po_id desc ";
|
||||||
|
|
||||||
<section>
|
$sql = " select count(*) as cnt {$sql_common} {$sql_search} {$sql_order} ";
|
||||||
<h2>최근게시물</h2>
|
$row = sql_fetch($sql);
|
||||||
|
$total_count = $row['cnt'];
|
||||||
|
|
||||||
<div class="tbl_head01 tbl_wrap">
|
$sql = " select * {$sql_common} {$sql_search} {$sql_order} limit {$new_point_rows} ";
|
||||||
<table>
|
$result = sql_query($sql);
|
||||||
<caption>최근게시물</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
|
|
||||||
$sql = " SELECT a.*, b.bo_subject, c.gr_subject, c.gr_id {$sql_common} {$sql_order} limit {$new_write_rows} ";
|
|
||||||
$result = sql_query($sql);
|
|
||||||
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
|
||||||
$tmp_write_table = $g5['write_prefix'] . $row['bo_table'];
|
|
||||||
|
|
||||||
if ($row['wr_id'] == $row['wr_parent']) {
|
$colspan = 7;
|
||||||
// 원글
|
?>
|
||||||
$comment = "";
|
|
||||||
$comment_link = "";
|
|
||||||
$row2 = sql_fetch(" SELECT * from {$tmp_write_table} where wr_id = '{$row['wr_id']}' ");
|
|
||||||
|
|
||||||
$name = get_sideview($row2['mb_id'], get_text(cut_str($row2['wr_name'], $config['cf_cut_name'])), $row2['wr_email'], $row2['wr_homepage']);
|
<section>
|
||||||
// 당일인 경우 시간으로 표시함
|
<h2>최근 포인트 발생내역</h2>
|
||||||
$datetime = substr($row2['wr_datetime'], 0, 10);
|
<div class="local_desc02 local_desc">
|
||||||
$datetime2 = $row2['wr_datetime'];
|
전체 <?php echo number_format($total_count) ?> 건 중 <?php echo $new_point_rows ?>건 목록
|
||||||
if ($datetime == G5_TIME_YMD) {
|
</div>
|
||||||
$datetime2 = substr($datetime2, 11, 5);
|
|
||||||
} else {
|
|
||||||
$datetime2 = substr($datetime2, 5, 5);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// 코멘트
|
|
||||||
$comment = '댓글. ';
|
|
||||||
$comment_link = '#c_' . $row['wr_id'];
|
|
||||||
$row2 = sql_fetch(" SELECT * from {$tmp_write_table} where wr_id = '{$row['wr_parent']}' ");
|
|
||||||
$row3 = sql_fetch(" SELECT mb_id, wr_name, wr_email, wr_homepage, wr_datetime from {$tmp_write_table} where wr_id = '{$row['wr_id']}' ");
|
|
||||||
|
|
||||||
$name = get_sideview($row3['mb_id'], get_text(cut_str($row3['wr_name'], $config['cf_cut_name'])), $row3['wr_email'], $row3['wr_homepage']);
|
<div class="tbl_head01 tbl_wrap">
|
||||||
// 당일인 경우 시간으로 표시함
|
<table>
|
||||||
$datetime = substr($row3['wr_datetime'], 0, 10);
|
<caption>최근 포인트 발생내역</caption>
|
||||||
$datetime2 = $row3['wr_datetime'];
|
<thead>
|
||||||
if ($datetime == G5_TIME_YMD) {
|
<tr>
|
||||||
$datetime2 = substr($datetime2, 11, 5);
|
<th scope="col">회원아이디</th>
|
||||||
} else {
|
<th scope="col">이름</th>
|
||||||
$datetime2 = substr($datetime2, 5, 5);
|
<th scope="col">닉네임</th>
|
||||||
}
|
<th scope="col">일시</th>
|
||||||
}
|
<th scope="col">포인트 내용</th>
|
||||||
?>
|
<th scope="col">포인트</th>
|
||||||
|
<th scope="col">포인트합</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
$row2['mb_id'] = '';
|
||||||
|
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||||
|
{
|
||||||
|
if ($row2['mb_id'] != $row['mb_id'])
|
||||||
|
{
|
||||||
|
$sql2 = " select mb_id, mb_name, mb_nick, mb_email, mb_homepage, mb_point from {$g5['member_table']} where mb_id = '{$row['mb_id']}' ";
|
||||||
|
$row2 = sql_fetch($sql2);
|
||||||
|
}
|
||||||
|
|
||||||
<tr>
|
$mb_nick = get_sideview($row['mb_id'], $row2['mb_nick'], $row2['mb_email'], $row2['mb_homepage']);
|
||||||
<td class="td_category"><a href="<?php echo G5_BBS_URL ?>/new.php?gr_id=<?php echo $row['gr_id'] ?>"><?php echo cut_str($row['gr_subject'], 10) ?></a></td>
|
|
||||||
<td class="td_category"><a href="<?php echo get_pretty_url($row['bo_table']) ?>"><?php echo cut_str($row['bo_subject'], 20) ?></a></td>
|
|
||||||
<td><a href="<?php echo get_pretty_url($row['bo_table'], $row2['wr_id']); ?><?php echo $comment_link ?>"><?php echo $comment ?><?php echo conv_subject($row2['wr_subject'], 100) ?></a></td>
|
|
||||||
<td class="td_mbname">
|
|
||||||
<div><?php echo $name ?></div>
|
|
||||||
</td>
|
|
||||||
<td class="td_datetime"><?php echo $datetime ?></td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<?php
|
$link1 = $link2 = "";
|
||||||
}
|
if (!preg_match("/^\@/", $row['po_rel_table']) && $row['po_rel_table'])
|
||||||
if ($i == 0) {
|
{
|
||||||
echo '<tr><td colspan="' . $colspan . '" class="empty_table">자료가 없습니다.</td></tr>';
|
$link1 = '<a href="'.G5_BBS_URL.'/board.php?bo_table='.$row['po_rel_table'].'&wr_id='.$row['po_rel_id'].'" target="_blank">';
|
||||||
}
|
$link2 = '</a>';
|
||||||
?>
|
}
|
||||||
</tbody>
|
?>
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="btn_list03 btn_list">
|
<tr>
|
||||||
<a href="<?php echo G5_BBS_URL ?>/new.php">최근게시물 더보기</a>
|
<td class="td_mbid"><a href="./point_list.php?sfl=mb_id&stx=<?php echo $row['mb_id'] ?>"><?php echo $row['mb_id'] ?></a></td>
|
||||||
</div>
|
<td class="td_mbname"><?php echo get_text($row2['mb_name']); ?></td>
|
||||||
</section>
|
<td class="td_name sv_use"><div><?php echo $mb_nick ?></div></td>
|
||||||
|
<td class="td_datetime"><?php echo $row['po_datetime'] ?></td>
|
||||||
|
<td><?php echo $link1.$row['po_content'].$link2 ?></td>
|
||||||
|
<td class="td_numbig"><?php echo number_format($row['po_point']) ?></td>
|
||||||
|
<td class="td_numbig"><?php echo number_format($row['po_mb_point']) ?></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
} //endif 최근게시물
|
}
|
||||||
|
|
||||||
if (!auth_check_menu($auth, '200200', 'r', true)) {
|
if ($i == 0)
|
||||||
|
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
$sql_common = " from {$g5['point_table']} ";
|
<div class="btn_list03 btn_list">
|
||||||
$sql_search = " where (1) ";
|
<a href="./point_list.php">포인트내역 전체보기</a>
|
||||||
$sql_order = " order by po_id desc ";
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
$sql = " SELECT count(*) as cnt {$sql_common} {$sql_search} {$sql_order} ";
|
<?php
|
||||||
$row = sql_fetch($sql);
|
include_once ('./admin.tail.php');
|
||||||
$total_count = $row['cnt'];
|
?>
|
||||||
|
|
||||||
$sql = " SELECT * {$sql_common} {$sql_search} {$sql_order} limit {$new_point_rows} ";
|
|
||||||
$result = sql_query($sql);
|
|
||||||
|
|
||||||
$colspan = 7;
|
|
||||||
?>
|
|
||||||
|
|
||||||
<section>
|
|
||||||
<h2>최근 포인트 발생내역</h2>
|
|
||||||
<div class="local_desc02 local_desc">
|
|
||||||
전체 <?php echo number_format($total_count) ?> 건 중 <?php echo $new_point_rows ?>건 목록
|
|
||||||
</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>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<?php
|
|
||||||
$row2 = array('mb_id'=>'');
|
|
||||||
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
|
||||||
if (empty($row2) || $row2['mb_id'] != $row['mb_id']) {
|
|
||||||
$sql2 = " SELECT mb_id, mb_name, mb_nick, mb_email, mb_homepage, mb_point from {$g5['member_table']} where mb_id = '{$row['mb_id']}' ";
|
|
||||||
$row2 = sql_fetch($sql2);
|
|
||||||
}
|
|
||||||
|
|
||||||
$mb_nick = get_sideview(
|
|
||||||
$row['mb_id'],
|
|
||||||
isset($row2['mb_nick']) ? $row2['mb_nick'] : '',
|
|
||||||
isset($row2['mb_email']) ? $row2['mb_email'] : '',
|
|
||||||
isset($row2['mb_homepage']) ? $row2['mb_homepage'] : ''
|
|
||||||
);
|
|
||||||
|
|
||||||
$link1 = $link2 = "";
|
|
||||||
if (!preg_match("/^\@/", $row['po_rel_table']) && $row['po_rel_table']) {
|
|
||||||
$link1 = '<a href="' . get_pretty_url($row['po_rel_table'], $row['po_rel_id']) . '" target="_blank">';
|
|
||||||
$link2 = '</a>';
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="td_mbid"><a href="./point_list.php?sfl=mb_id&stx=<?php echo $row['mb_id'] ?>"><?php echo $row['mb_id'] ?></a></td>
|
|
||||||
<td class="td_mbname"><?php echo isset($row2['mb_name']) ? get_text($row2['mb_name']) : ''; ?></td>
|
|
||||||
<td class="td_name sv_use">
|
|
||||||
<div><?php echo $mb_nick ?></div>
|
|
||||||
</td>
|
|
||||||
<td class="td_datetime"><?php echo $row['po_datetime'] ?></td>
|
|
||||||
<td><?php echo $link1 . $row['po_content'] . $link2 ?></td>
|
|
||||||
<td class="td_numbig"><?php echo number_format($row['po_point']) ?></td>
|
|
||||||
<td class="td_numbig"><?php echo number_format($row['po_mb_point']) ?></td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($i == 0) {
|
|
||||||
echo '<tr><td colspan="' . $colspan . '" class="empty_table">자료가 없습니다.</td></tr>';
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="btn_list03 btn_list">
|
|
||||||
<a href="./point_list.php">포인트내역 전체보기</a>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
} //endif
|
|
||||||
|
|
||||||
$addtional_content_after = run_replace('adm_index_addtional_content_after', '', $is_admin, $auth, $member);
|
|
||||||
if ($addtional_content_after) {
|
|
||||||
echo $addtional_content_after;
|
|
||||||
}
|
|
||||||
require_once './admin.tail.php';
|
|
||||||
|
|||||||
+7
-8
@@ -1,25 +1,24 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = '200300';
|
$sub_menu = '200300';
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
|
|
||||||
check_demo();
|
check_demo();
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, 'd');
|
auth_check($auth[$sub_menu], 'd');
|
||||||
|
|
||||||
check_admin_token();
|
check_admin_token();
|
||||||
|
|
||||||
$post_count_chk = (isset($_POST['chk']) && is_array($_POST['chk'])) ? count($_POST['chk']) : 0;
|
$count = count($_POST['chk']);
|
||||||
|
|
||||||
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 = $_POST['chk'][$i];
|
||||||
|
|
||||||
$sql = " delete from {$g5['mail_table']} where ma_id = '$ma_id' ";
|
$sql = " delete from {$g5['mail_table']} where ma_id = '$ma_id' ";
|
||||||
sql_query($sql);
|
sql_query($sql);
|
||||||
run_event('admin_mail_deleted', $ma_id);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
goto_url('./mail_list.php');
|
goto_url('./mail_list.php');
|
||||||
|
?>
|
||||||
+84
-88
@@ -1,88 +1,84 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "200300";
|
$sub_menu = "200300";
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
require_once G5_EDITOR_LIB;
|
include_once(G5_EDITOR_LIB);
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, 'r');
|
auth_check($auth[$sub_menu], 'r');
|
||||||
|
|
||||||
$html_title = '회원메일';
|
$html_title = '회원메일';
|
||||||
|
|
||||||
$ma_id = isset($_GET['ma_id']) ? (int) $_GET['ma_id'] : 0;
|
if ($w == 'u') {
|
||||||
$ma = array('ma_id' => 0, 'ma_subject' => '', 'ma_content' => '');
|
$html_title .= '수정';
|
||||||
|
$readonly = ' readonly';
|
||||||
if ($w == 'u') {
|
|
||||||
$html_title .= '수정';
|
$sql = " select * from {$g5['mail_table']} where ma_id = '{$ma_id}' ";
|
||||||
$readonly = ' readonly';
|
$ma = sql_fetch($sql);
|
||||||
|
if (!$ma['ma_id'])
|
||||||
$sql = " select * from {$g5['mail_table']} where ma_id = '{$ma_id}' ";
|
alert('등록된 자료가 없습니다.');
|
||||||
$ma = sql_fetch($sql);
|
} else {
|
||||||
if (!$ma['ma_id']) {
|
$html_title .= '입력';
|
||||||
alert('등록된 자료가 없습니다.');
|
}
|
||||||
}
|
|
||||||
} else {
|
$g5['title'] = $html_title;
|
||||||
$html_title .= '입력';
|
include_once('./admin.head.php');
|
||||||
}
|
?>
|
||||||
|
|
||||||
$g5['title'] = $html_title;
|
<div class="local_desc"><p>메일 내용에 {이름} , {닉네임} , {회원아이디} , {이메일} 처럼 내용에 삽입하면 해당 내용에 맞게 변환하여 메일을 발송합니다.</p></div>
|
||||||
require_once './admin.head.php';
|
|
||||||
?>
|
<form name="fmailform" id="fmailform" action="./mail_update.php" onsubmit="return fmailform_check(this);" method="post">
|
||||||
|
<input type="hidden" name="w" value="<?php echo $w ?>" id="w">
|
||||||
<div class="local_desc">
|
<input type="hidden" name="ma_id" value="<?php echo $ma['ma_id'] ?>" id="ma_id">
|
||||||
<p>메일 내용에 {이름} , {닉네임} , {회원아이디} , {이메일} 처럼 내용에 삽입하면 해당 내용에 맞게 변환하여 메일을 발송합니다.</p>
|
<input type="hidden" name="token" value="" id="token">
|
||||||
</div>
|
|
||||||
|
<div class="tbl_frm01 tbl_wrap">
|
||||||
<form name="fmailform" id="fmailform" action="./mail_update.php" onsubmit="return fmailform_check(this);" method="post">
|
<table>
|
||||||
<input type="hidden" name="w" value="<?php echo $w ?>" id="w">
|
<caption><?php echo $g5['title']; ?></caption>
|
||||||
<input type="hidden" name="ma_id" value="<?php echo $ma['ma_id'] ?>" id="ma_id">
|
<colgroup>
|
||||||
<input type="hidden" name="token" value="" id="token">
|
<col class="grid_4">
|
||||||
|
<col>
|
||||||
<div class="tbl_frm01 tbl_wrap">
|
</colgroup>
|
||||||
<table>
|
<tbody>
|
||||||
<caption><?php echo $g5['title']; ?></caption>
|
<tr>
|
||||||
<colgroup>
|
<th scope="row"><label for="ma_subject">메일 제목<strong class="sound_only">필수</strong></label></th>
|
||||||
<col class="grid_4">
|
<td><input type="text" name="ma_subject" value="<?php echo $ma['ma_subject'] ?>" id="ma_subject" required class="required frm_input" size="100"></td>
|
||||||
<col>
|
</tr>
|
||||||
</colgroup>
|
<tr>
|
||||||
<tbody>
|
<th scope="row"><label for="ma_content">메일 내용<strong class="sound_only">필수</strong></label></th>
|
||||||
<tr>
|
<td><?php echo editor_html("ma_content", get_text($ma['ma_content'], 0)); ?></td>
|
||||||
<th scope="row"><label for="ma_subject">메일 제목<strong class="sound_only">필수</strong></label></th>
|
</tr>
|
||||||
<td><input type="text" name="ma_subject" value="<?php echo get_sanitize_input($ma['ma_subject']); ?>" id="ma_subject" required class="required frm_input" size="100"></td>
|
</tbody>
|
||||||
</tr>
|
</table>
|
||||||
<tr>
|
</div>
|
||||||
<th scope="row"><label for="ma_content">메일 내용<strong class="sound_only">필수</strong></label></th>
|
|
||||||
<td><?php echo editor_html("ma_content", get_text(html_purifier($ma['ma_content']), 0)); ?></td>
|
<div class="btn_fixed_top ">
|
||||||
</tr>
|
<input type="submit" class="btn_submit btn" accesskey="s" value="확인">
|
||||||
</tbody>
|
</div>
|
||||||
</table>
|
</form>
|
||||||
</div>
|
|
||||||
|
<script>
|
||||||
<div class="btn_fixed_top ">
|
function fmailform_check(f)
|
||||||
<input type="submit" class="btn_submit btn" accesskey="s" value="확인">
|
{
|
||||||
</div>
|
errmsg = "";
|
||||||
</form>
|
errfld = "";
|
||||||
|
|
||||||
<script>
|
check_field(f.ma_subject, "제목을 입력하세요.");
|
||||||
function fmailform_check(f) {
|
//check_field(f.ma_content, "내용을 입력하세요.");
|
||||||
errmsg = "";
|
|
||||||
errfld = "";
|
if (errmsg != "") {
|
||||||
|
alert(errmsg);
|
||||||
check_field(f.ma_subject, "제목을 입력하세요.");
|
errfld.focus();
|
||||||
//check_field(f.ma_content, "내용을 입력하세요.");
|
return false;
|
||||||
|
}
|
||||||
if (errmsg != "") {
|
|
||||||
alert(errmsg);
|
<?php echo get_editor_js("ma_content"); ?>
|
||||||
errfld.focus();
|
<?php echo chk_editor_js("ma_content"); ?>
|
||||||
return false;
|
|
||||||
}
|
return true;
|
||||||
|
}
|
||||||
<?php echo get_editor_js("ma_content"); ?>
|
|
||||||
<?php echo chk_editor_js("ma_content"); ?>
|
document.fmailform.ma_subject.focus();
|
||||||
|
</script>
|
||||||
return true;
|
|
||||||
}
|
<?php
|
||||||
|
include_once('./admin.tail.php');
|
||||||
document.fmailform.ma_subject.focus();
|
?>
|
||||||
</script>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
require_once './admin.tail.php';
|
|
||||||
|
|||||||
+61
-61
@@ -1,8 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = '200300';
|
$sub_menu = '200300';
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, 'r');
|
auth_check($auth[$sub_menu], 'r');
|
||||||
|
|
||||||
$sql_common = " from {$g5['mail_table']} ";
|
$sql_common = " from {$g5['mail_table']} ";
|
||||||
|
|
||||||
@@ -17,7 +17,7 @@ $sql = " select * {$sql_common} order by ma_id desc ";
|
|||||||
$result = sql_query($sql);
|
$result = sql_query($sql);
|
||||||
|
|
||||||
$g5['title'] = '회원메일발송';
|
$g5['title'] = '회원메일발송';
|
||||||
require_once './admin.head.php';
|
include_once('./admin.head.php');
|
||||||
|
|
||||||
$colspan = 7;
|
$colspan = 7;
|
||||||
?>
|
?>
|
||||||
@@ -32,74 +32,74 @@ $colspan = 7;
|
|||||||
|
|
||||||
|
|
||||||
<form name="fmaillist" id="fmaillist" action="./mail_delete.php" method="post">
|
<form name="fmaillist" id="fmaillist" action="./mail_delete.php" method="post">
|
||||||
<div class="tbl_head01 tbl_wrap">
|
<div class="tbl_head01 tbl_wrap">
|
||||||
<table>
|
<table>
|
||||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col"><input type="checkbox" name="chkall" value="1" id="chkall" title="현재 페이지 목록 전체선택" onclick="check_all(this.form)"></th>
|
<th scope="col"><input type="checkbox" name="chkall" value="1" id="chkall" title="현재 페이지 목록 전체선택" 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>
|
||||||
<th scope="col">보내기</th>
|
<th scope="col">보내기</th>
|
||||||
<th scope="col">미리보기</th>
|
<th scope="col">미리보기</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||||
$s_vie = '<a href="./mail_preview.php?ma_id=' . $row['ma_id'] . '" target="_blank" class="btn btn_03">미리보기</a>';
|
$s_vie = '<a href="./mail_preview.php?ma_id='.$row['ma_id'].'" target="_blank" class="btn btn_03">미리보기</a>';
|
||||||
|
|
||||||
$num = number_format($total_count - ($page - 1) * $config['cf_page_rows'] - $i);
|
$num = number_format($total_count - ($page - 1) * $config['cf_page_rows'] - $i);
|
||||||
|
|
||||||
$bg = 'bg' . ($i % 2);
|
$bg = 'bg'.($i%2);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<tr class="<?php echo $bg; ?>">
|
<tr class="<?php echo $bg; ?>">
|
||||||
<td class="td_chk">
|
<td class="td_chk">
|
||||||
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo $row['ma_subject']; ?> 메일</label>
|
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo $row['ma_subject']; ?> 메일</label>
|
||||||
<input type="checkbox" id="chk_<?php echo $i ?>" name="chk[]" value="<?php echo $row['ma_id'] ?>">
|
<input type="checkbox" id="chk_<?php echo $i ?>" name="chk[]" value="<?php echo $row['ma_id'] ?>">
|
||||||
</td>
|
</td>
|
||||||
<td class="td_num_c"><?php echo $num ?></td>
|
<td class="td_num_c"><?php echo $num ?></td>
|
||||||
<td class="td_left"><a href="./mail_form.php?w=u&ma_id=<?php echo $row['ma_id'] ?>"><?php echo $row['ma_subject'] ?></a></td>
|
<td class="td_left"><a href="./mail_form.php?w=u&ma_id=<?php echo $row['ma_id'] ?>"><?php echo $row['ma_subject'] ?></a></td>
|
||||||
<td class="td_datetime"><?php echo $row['ma_time'] ?></td>
|
<td class="td_datetime"><?php echo $row['ma_time'] ?></td>
|
||||||
<td class="td_test"><a href="./mail_test.php?ma_id=<?php echo $row['ma_id'] ?>">테스트</a></td>
|
<td class="td_test"><a href="./mail_test.php?ma_id=<?php echo $row['ma_id'] ?>">테스트</a></td>
|
||||||
<td class="td_send"><a href="./mail_select_form.php?ma_id=<?php echo $row['ma_id'] ?>">보내기</a></td>
|
<td class="td_send"><a href="./mail_select_form.php?ma_id=<?php echo $row['ma_id'] ?>">보내기</a></td>
|
||||||
<td class="td_mng"><?php echo $s_vie ?></td>
|
<td class="td_mng"><?php echo $s_vie ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
if (!$i) {
|
if (!$i)
|
||||||
echo "<tr><td colspan=\"" . $colspan . "\" class=\"empty_table\">자료가 없습니다.</td></tr>";
|
echo "<tr><td colspan=\"".$colspan."\" class=\"empty_table\">자료가 없습니다.</td></tr>";
|
||||||
}
|
?>
|
||||||
?>
|
</tbody>
|
||||||
</tbody>
|
</table>
|
||||||
</table>
|
</div>
|
||||||
</div>
|
<div class="btn_fixed_top">
|
||||||
<div class="btn_fixed_top">
|
<input type="submit" value="선택삭제" class="btn btn_02">
|
||||||
<input type="submit" value="선택삭제" class="btn btn_02">
|
<a href="./mail_form.php" id="mail_add" class="btn btn_01">메일내용추가</a>
|
||||||
<a href="./mail_form.php" id="mail_add" class="btn btn_01">메일내용추가</a>
|
</div>
|
||||||
</div>
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(function() {
|
$(function() {
|
||||||
$('#fmaillist').submit(function() {
|
$('#fmaillist').submit(function() {
|
||||||
if (confirm("한번 삭제한 자료는 복구할 방법이 없습니다.\n\n정말 삭제하시겠습니까?")) {
|
if(confirm("한번 삭제한 자료는 복구할 방법이 없습니다.\n\n정말 삭제하시겠습니까?")) {
|
||||||
if (!is_checked("chk[]")) {
|
if (!is_checked("chk[]")) {
|
||||||
alert("선택삭제 하실 항목을 하나 이상 선택하세요.");
|
alert("선택삭제 하실 항목을 하나 이상 선택하세요.");
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
require_once './admin.tail.php';
|
include_once ('./admin.tail.php');
|
||||||
|
?>
|
||||||
+17
-15
@@ -1,32 +1,34 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "200300";
|
$sub_menu = "200300";
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
require_once G5_LIB_PATH . '/mailer.lib.php';
|
include_once(G5_LIB_PATH.'/mailer.lib.php');
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, 'r');
|
auth_check($auth[$sub_menu], 'r');
|
||||||
|
|
||||||
$ma_id = isset($_REQUEST['ma_id']) ? (int) $_REQUEST['ma_id'] : 0;
|
|
||||||
|
|
||||||
$se = sql_fetch("select ma_subject, ma_content from {$g5['mail_table']} where ma_id = '{$ma_id}' ");
|
$se = sql_fetch("select ma_subject, ma_content from {$g5['mail_table']} where ma_id = '{$ma_id}' ");
|
||||||
|
|
||||||
$subject = $se['ma_subject'];
|
$subject = $se['ma_subject'];
|
||||||
$content = conv_content($se['ma_content'], 1) . "<hr size=0><p><span style='font-size:9pt; font-family:굴림'>▶ 더 이상 정보 수신을 원치 않으시면 [<a href='" . G5_BBS_URL . "/email_stop.php?mb_id=***&mb_md5=***' target='_blank'>수신거부</a>] 해 주십시오.</span></p>";
|
$content = conv_content($se['ma_content'], 1) . "<hr size=0><p><span style='font-size:9pt; font-family:굴림'>▶ 더 이상 정보 수신을 원치 않으시면 [<a href='".G5_BBS_URL."/email_stop.php?mb_id=***&mb_md5=***' target='_blank'>수신거부</a>] 해 주십시오.</span></p>";
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="ko">
|
<html lang="ko">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title><?php echo G5_VERSION ?> 메일발송 테스트</title>
|
<title><?php echo G5_VERSION ?> 메일발송 테스트</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<h1><?php echo $subject; ?></h1>
|
|
||||||
<p><?php echo $content; ?></p>
|
|
||||||
<p>
|
|
||||||
<strong>주의!</strong> 이 화면에 보여지는 디자인은 실제 내용이 발송되었을 때 디자인과 다를 수 있습니다.
|
|
||||||
</p>
|
|
||||||
</body>
|
|
||||||
|
|
||||||
|
<h1><?php echo $subject; ?></h1>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<?php echo $content; ?>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<strong>주의!</strong> 이 화면에 보여지는 디자인은 실제 내용이 발송되었을 때 디자인과 다를 수 있습니다.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
</html>
|
</html>
|
||||||
+122
-139
@@ -1,139 +1,122 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "200300";
|
$sub_menu = "200300";
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
|
|
||||||
if (!$config['cf_email_use']) {
|
if (!$config['cf_email_use'])
|
||||||
alert('환경설정에서 \'메일발송 사용\'에 체크하셔야 메일을 발송할 수 있습니다.');
|
alert('환경설정에서 \'메일발송 사용\'에 체크하셔야 메일을 발송할 수 있습니다.');
|
||||||
}
|
|
||||||
|
auth_check($auth[$sub_menu], 'r');
|
||||||
auth_check_menu($auth, $sub_menu, 'r');
|
|
||||||
|
$sql = " select * from {$g5['mail_table']} where ma_id = '$ma_id' ";
|
||||||
$ma_id = isset($_GET['ma_id']) ? (int) $_GET['ma_id'] : 0;
|
$ma = sql_fetch($sql);
|
||||||
|
if (!$ma['ma_id'])
|
||||||
$sql = " select * from {$g5['mail_table']} where ma_id = '$ma_id' ";
|
alert('보내실 내용을 선택하여 주십시오.');
|
||||||
$ma = sql_fetch($sql);
|
|
||||||
if (!$ma['ma_id']) {
|
// 전체회원수
|
||||||
alert('보내실 내용을 선택하여 주십시오.');
|
$sql = " select COUNT(*) as cnt from {$g5['member_table']} ";
|
||||||
}
|
$row = sql_fetch($sql);
|
||||||
|
$tot_cnt = $row['cnt'];
|
||||||
// 전체회원수
|
|
||||||
$sql = " select COUNT(*) as cnt from {$g5['member_table']} ";
|
// 탈퇴대기회원수
|
||||||
$row = sql_fetch($sql);
|
$sql = " select COUNT(*) as cnt from {$g5['member_table']} where mb_leave_date <> '' ";
|
||||||
$tot_cnt = $row['cnt'];
|
$row = sql_fetch($sql);
|
||||||
|
$finish_cnt = $row['cnt'];
|
||||||
// 탈퇴대기회원수
|
|
||||||
$sql = " select COUNT(*) as cnt from {$g5['member_table']} where mb_leave_date <> '' ";
|
$last_option = explode('||', $ma['ma_last_option']);
|
||||||
$row = sql_fetch($sql);
|
for ($i=0; $i<count($last_option); $i++) {
|
||||||
$finish_cnt = $row['cnt'];
|
$option = explode('=', $last_option[$i]);
|
||||||
|
// 동적변수
|
||||||
$last_option = explode('||', $ma['ma_last_option']);
|
$var = $option[0];
|
||||||
for ($i = 0; $i < count($last_option); $i++) {
|
$$var = $option[1];
|
||||||
$option = explode('=', $last_option[$i]);
|
}
|
||||||
// 동적변수
|
|
||||||
$var = isset($option[0]) ? $option[0] : '';
|
if (!isset($mb_id1)) $mb_id1 = 1;
|
||||||
if (isset($option[1])) {
|
if (!isset($mb_level_from)) $mb_level_from = 1;
|
||||||
$$var = $option[1];
|
if (!isset($mb_level_to)) $mb_level_to = 10;
|
||||||
}
|
if (!isset($mb_mailling)) $mb_mailling = 1;
|
||||||
}
|
|
||||||
|
$g5['title'] = '회원메일발송';
|
||||||
if (!isset($mb_id1)) {
|
include_once('./admin.head.php');
|
||||||
$mb_id1 = 1;
|
?>
|
||||||
}
|
|
||||||
if (!isset($mb_level_from)) {
|
<div class="local_ov01 local_ov">
|
||||||
$mb_level_from = 1;
|
전체회원 <?php echo number_format($tot_cnt) ?>명 , 탈퇴대기회원 <?php echo number_format($finish_cnt) ?>명, 정상회원 <?php echo number_format($tot_cnt - $finish_cnt) ?>명 중 메일 발송 대상 선택
|
||||||
}
|
</div>
|
||||||
if (!isset($mb_level_to)) {
|
|
||||||
$mb_level_to = 10;
|
<form name="frmsendmailselectform" id="frmsendmailselectform" action="./mail_select_list.php" method="post" autocomplete="off">
|
||||||
}
|
<input type="hidden" name="ma_id" value="<?php echo $ma_id ?>">
|
||||||
if (!isset($mb_mailling)) {
|
|
||||||
$mb_mailling = 1;
|
<div class="tbl_frm01 tbl_wrap">
|
||||||
}
|
<table>
|
||||||
|
<caption><?php echo $g5['title']; ?> 대상선택</caption>
|
||||||
$mb_id1_from = isset($mb_id1_from) ? clean_xss_tags($mb_id1_from, 1, 1, 30) : '';
|
<tbody>
|
||||||
$mb_id1_to = isset($mb_id1_to) ? clean_xss_tags($mb_id1_to, 1, 1, 30) : '';
|
<tr>
|
||||||
$mb_email = isset($mb_email) ? clean_xss_tags($mb_email, 1, 1, 100) : '';
|
<th scope="row">회원 ID</th>
|
||||||
|
<td>
|
||||||
$g5['title'] = '회원메일발송';
|
<input type="radio" name="mb_id1" value="1" id="mb_id1_all" <?php echo $mb_id1?"checked":""; ?>> <label for="mb_id1_all">전체</label>
|
||||||
require_once './admin.head.php';
|
<input type="radio" name="mb_id1" value="0" id="mb_id1_section" <?php echo !$mb_id1?"checked":""; ?>> <label for="mb_id1_section">구간</label>
|
||||||
?>
|
<input type="text" name="mb_id1_from" value="<?php echo $mb_id1_from ?>" id="mb_id1_from" title="시작구간" class="frm_input"> 에서
|
||||||
|
<input type="text" name="mb_id1_to" value="<?php echo $mb_id1_to ?>" id="mb_id1_to" title="종료구간" class="frm_input"> 까지
|
||||||
<div class="local_ov01 local_ov">
|
</td>
|
||||||
전체회원 <?php echo number_format($tot_cnt) ?>명 , 탈퇴대기회원 <?php echo number_format($finish_cnt) ?>명, 정상회원 <?php echo number_format($tot_cnt - $finish_cnt) ?>명 중 메일 발송 대상 선택
|
</tr>
|
||||||
</div>
|
<tr>
|
||||||
|
<th scope="row"><label for="mb_email">E-mail</label></th>
|
||||||
<form name="frmsendmailselectform" id="frmsendmailselectform" action="./mail_select_list.php" method="post" autocomplete="off">
|
<td>
|
||||||
<input type="hidden" name="ma_id" value="<?php echo $ma_id ?>">
|
<?php echo help("메일 주소에 단어 포함 (예 : @".preg_replace('#^(www[^\.]*\.){1}#', '', $_SERVER['HTTP_HOST']).")") ?>
|
||||||
|
<input type="text" name="mb_email" value="<?php echo $mb_email ?>" id="mb_email" class="frm_input" size="50">
|
||||||
<div class="tbl_frm01 tbl_wrap">
|
</td>
|
||||||
<table>
|
</tr>
|
||||||
<caption><?php echo $g5['title']; ?> 대상선택</caption>
|
<tr>
|
||||||
<tbody>
|
<th scope="row"><label for="mb_mailling">메일링</label></th>
|
||||||
<tr>
|
<td>
|
||||||
<th scope="row">회원 ID</th>
|
<select name="mb_mailling" id="mb_mailling">
|
||||||
<td>
|
<option value="1">수신동의한 회원만
|
||||||
<input type="radio" name="mb_id1" value="1" id="mb_id1_all" <?php echo $mb_id1 ? "checked" : ""; ?>> <label for="mb_id1_all">전체</label>
|
<option value="">전체
|
||||||
<input type="radio" name="mb_id1" value="0" id="mb_id1_section" <?php echo !$mb_id1 ? "checked" : ""; ?>> <label for="mb_id1_section">구간</label>
|
</select>
|
||||||
<input type="text" name="mb_id1_from" value="<?php echo get_sanitize_input($mb_id1_from); ?>" id="mb_id1_from" title="시작구간" class="frm_input"> 에서
|
</td>
|
||||||
<input type="text" name="mb_id1_to" value="<?php echo get_sanitize_input($mb_id1_to); ?>" id="mb_id1_to" title="종료구간" class="frm_input"> 까지
|
</tr>
|
||||||
</td>
|
<tr>
|
||||||
</tr>
|
<th scope="row">권한</th>
|
||||||
<tr>
|
<td>
|
||||||
<th scope="row"><label for="mb_email">E-mail</label></th>
|
<label for="mb_level_from" class="sound_only">최소권한</label>
|
||||||
<td>
|
<select name="mb_level_from" id="mb_level_from">
|
||||||
<?php echo help("메일 주소에 단어 포함 (예 : @" . htmlspecialchars(preg_replace('#^(www[^\.]*\.){1}#', '', $_SERVER['HTTP_HOST'])) . ")") ?>
|
<?php for ($i=1; $i<=10; $i++) { ?>
|
||||||
<input type="text" name="mb_email" value="<?php echo get_sanitize_input($mb_email); ?>" id="mb_email" class="frm_input" size="50">
|
<option value="<?php echo $i ?>"><?php echo $i ?></option>
|
||||||
</td>
|
<?php } ?>
|
||||||
</tr>
|
</select> 에서
|
||||||
<tr>
|
<label for="mb_level_to" class="sound_only">최대권한</label>
|
||||||
<th scope="row"><label for="mb_mailling">메일링</label></th>
|
<select name="mb_level_to" id="mb_level_to">
|
||||||
<td>
|
<?php for ($i=1; $i<=10; $i++) { ?>
|
||||||
<select name="mb_mailling" id="mb_mailling">
|
<option value="<?php echo $i ?>"<?php echo $i==10 ? " selected" : ""; ?>><?php echo $i ?></option>
|
||||||
<option value="1">수신동의한 회원만
|
<?php } ?>
|
||||||
<option value="">전체
|
</select> 까지
|
||||||
</select>
|
</td>
|
||||||
</td>
|
</tr>
|
||||||
</tr>
|
<tr>
|
||||||
<tr>
|
<th scope="row"><label for="gr_id">게시판그룹회원</label></th>
|
||||||
<th scope="row">권한</th>
|
<td>
|
||||||
<td>
|
<select name="gr_id" id="gr_id">
|
||||||
<label for="mb_level_from" class="sound_only">최소권한</label>
|
<option value=''>전체</option>
|
||||||
<select name="mb_level_from" id="mb_level_from">
|
<?php
|
||||||
<?php for ($i = 1; $i <= 10; $i++) { ?>
|
$sql = " select gr_id, gr_subject from {$g5['group_table']} order by gr_subject ";
|
||||||
<option value="<?php echo $i ?>"><?php echo $i ?></option>
|
$result = sql_query($sql);
|
||||||
<?php } ?>
|
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||||
</select> 에서
|
echo '<option value="'.$row['gr_id'].'">'.$row['gr_subject'].'</option>';
|
||||||
<label for="mb_level_to" class="sound_only">최대권한</label>
|
}
|
||||||
<select name="mb_level_to" id="mb_level_to">
|
?>
|
||||||
<?php for ($i = 1; $i <= 10; $i++) { ?>
|
</select>
|
||||||
<option value="<?php echo $i ?>" <?php echo $i == 10 ? " selected" : ""; ?>><?php echo $i ?></option>
|
</td>
|
||||||
<?php } ?>
|
</tr>
|
||||||
</select> 까지
|
</tbody>
|
||||||
</td>
|
</table>
|
||||||
</tr>
|
</div>
|
||||||
<tr>
|
|
||||||
<th scope="row"><label for="gr_id">게시판그룹회원</label></th>
|
<div class="btn_confirm01 btn_confirm">
|
||||||
<td>
|
<input type="submit" value="확인" class="btn_submit">
|
||||||
<select name="gr_id" id="gr_id">
|
<a href="./mail_list.php">목록 </a>
|
||||||
<option value=''>전체</option>
|
</div>
|
||||||
<?php
|
</form>
|
||||||
$sql = " select gr_id, gr_subject from {$g5['group_table']} order by gr_subject ";
|
|
||||||
$result = sql_query($sql);
|
<?php
|
||||||
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
include_once('./admin.tail.php');
|
||||||
echo '<option value="' . $row['gr_id'] . '">' . $row['gr_subject'] . '</option>';
|
?>
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="btn_confirm01 btn_confirm">
|
|
||||||
<input type="submit" value="확인" class="btn_submit">
|
|
||||||
<a href="./mail_list.php">목록 </a>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
require_once './admin.tail.php';
|
|
||||||
|
|||||||
+54
-68
@@ -1,38 +1,25 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "200300";
|
$sub_menu = "200300";
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, 'r');
|
auth_check($auth[$sub_menu], 'r');
|
||||||
|
|
||||||
$ma_id = isset($_REQUEST['ma_id']) ? (int) $_REQUEST['ma_id'] : 0;
|
|
||||||
|
|
||||||
$ma_last_option = "";
|
$ma_last_option = "";
|
||||||
|
|
||||||
$sql_common = " from {$g5['member_table']} ";
|
$sql_common = " from {$g5['member_table']} ";
|
||||||
$sql_where = " where (1) ";
|
$sql_where = " where (1) ";
|
||||||
|
|
||||||
$mb_id1 = isset($_POST['mb_id1']) ? (int) $_POST['mb_id1'] : 1;
|
|
||||||
$mb_id1_from = isset($_POST['mb_id1_from']) ? addslashes(clean_xss_tags(stripslashes($_POST['mb_id1_from']), 1, 1, 30)) : '';
|
|
||||||
$mb_id1_to = isset($_POST['mb_id1_to']) ? addslashes(clean_xss_tags(stripslashes($_POST['mb_id1_to']), 1, 1, 30)) : '';
|
|
||||||
$mb_email = isset($_POST['mb_email']) ? addslashes(clean_xss_tags(stripslashes($_POST['mb_email']), 1, 1, 100)) : '';
|
|
||||||
$mb_mailling = isset($_POST['mb_mailling']) ? addslashes(clean_xss_tags(stripslashes($_POST['mb_mailling']), 1, 1, 100)) : '';
|
|
||||||
$mb_level_from = isset($_POST['mb_level_from'])? (int) $_POST['mb_level_from'] : 1;
|
|
||||||
$mb_level_to = isset($_POST['mb_level_to']) ? (int) $_POST['mb_level_to'] : 10;
|
|
||||||
|
|
||||||
// 회원ID ..에서 ..까지
|
// 회원ID ..에서 ..까지
|
||||||
if ($mb_id1 != 1) {
|
if ($mb_id1 != 1)
|
||||||
$sql_where .= " and mb_id between '{$mb_id1_from}' and '{$mb_id1_to}' ";
|
$sql_where .= " and mb_id between '{$mb_id1_from}' and '{$mb_id1_to}' ";
|
||||||
}
|
|
||||||
|
|
||||||
// E-mail에 특정 단어 포함
|
// E-mail에 특정 단어 포함
|
||||||
if ($mb_email != "") {
|
if ($mb_email != "")
|
||||||
$sql_where .= " and mb_email like '%{$mb_email}%' ";
|
$sql_where .= " and mb_email like '%{$mb_email}%' ";
|
||||||
}
|
|
||||||
|
|
||||||
// 메일링
|
// 메일링
|
||||||
if ($mb_mailling != "") {
|
if ($mb_mailling != "")
|
||||||
$sql_where .= " and mb_mailling = '{$mb_mailling}' ";
|
$sql_where .= " and mb_mailling = '{$mb_mailling}' ";
|
||||||
}
|
|
||||||
|
|
||||||
// 권한
|
// 권한
|
||||||
$sql_where .= " and mb_level between '{$mb_level_from}' and '{$mb_level_to}' ";
|
$sql_where .= " and mb_level between '{$mb_level_from}' and '{$mb_level_to}' ";
|
||||||
@@ -43,14 +30,13 @@ if ($gr_id) {
|
|||||||
$comma = "";
|
$comma = "";
|
||||||
$sql2 = " select mb_id from {$g5['group_member_table']} where gr_id = '{$gr_id}' order by mb_id ";
|
$sql2 = " select mb_id from {$g5['group_member_table']} where gr_id = '{$gr_id}' order by mb_id ";
|
||||||
$result2 = sql_query($sql2);
|
$result2 = sql_query($sql2);
|
||||||
for ($k = 0; $row2 = sql_fetch_array($result2); $k++) {
|
for ($k=0; $row2=sql_fetch_array($result2); $k++) {
|
||||||
$group_member .= "{$comma}'{$row2['mb_id']}'";
|
$group_member .= "{$comma}'{$row2['mb_id']}'";
|
||||||
$comma = ",";
|
$comma = ",";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$group_member) {
|
if (!$group_member)
|
||||||
alert('선택하신 게시판 그룹회원이 한명도 없습니다.');
|
alert('선택하신 게시판 그룹회원이 한명도 없습니다.');
|
||||||
}
|
|
||||||
|
|
||||||
$sql_where .= " and mb_id in ($group_member) ";
|
$sql_where .= " and mb_id in ($group_member) ";
|
||||||
}
|
}
|
||||||
@@ -61,9 +47,8 @@ $sql_where .= " and mb_leave_date = '' and mb_intercept_date = '' ";
|
|||||||
$sql = " select COUNT(*) as cnt {$sql_common} {$sql_where} ";
|
$sql = " select COUNT(*) as cnt {$sql_common} {$sql_where} ";
|
||||||
$row = sql_fetch($sql);
|
$row = sql_fetch($sql);
|
||||||
$cnt = $row['cnt'];
|
$cnt = $row['cnt'];
|
||||||
if ($cnt == 0) {
|
if ($cnt == 0)
|
||||||
alert('선택하신 내용으로는 해당되는 회원자료가 없습니다.');
|
alert('선택하신 내용으로는 해당되는 회원자료가 없습니다.');
|
||||||
}
|
|
||||||
|
|
||||||
// 마지막 옵션을 저장합니다.
|
// 마지막 옵션을 저장합니다.
|
||||||
$ma_last_option .= "mb_id1={$mb_id1}";
|
$ma_last_option .= "mb_id1={$mb_id1}";
|
||||||
@@ -78,58 +63,59 @@ $ma_last_option .= "||gr_id={$gr_id}";
|
|||||||
sql_query(" update {$g5['mail_table']} set ma_last_option = '{$ma_last_option}' where ma_id = '{$ma_id}' ");
|
sql_query(" update {$g5['mail_table']} set ma_last_option = '{$ma_last_option}' where ma_id = '{$ma_id}' ");
|
||||||
|
|
||||||
$g5['title'] = "메일발송 대상 회원";
|
$g5['title'] = "메일발송 대상 회원";
|
||||||
require_once './admin.head.php';
|
include_once('./admin.head.php');
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<form name="fmailselectlist" id="fmailselectlist" method="post" action="./mail_select_update.php">
|
<form name="fmailselectlist" id="fmailselectlist" method="post" action="./mail_select_update.php">
|
||||||
<input type="hidden" name="token" value="">
|
<input type="hidden" name="token" value="">
|
||||||
<input type="hidden" name="ma_id" value="<?php echo get_text($ma_id); ?>">
|
<input type="hidden" name="ma_id" value="<?php echo $ma_id ?>">
|
||||||
|
|
||||||
<div class="tbl_head01 tbl_wrap">
|
<div class="tbl_head01 tbl_wrap">
|
||||||
<table>
|
<table>
|
||||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<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">E-mail</th>
|
<th scope="col">E-mail</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
$sql = " select mb_id, mb_name, mb_nick, mb_email, mb_datetime $sql_common $sql_where order by mb_id ";
|
$sql = " select mb_id, mb_name, mb_nick, mb_email, mb_datetime $sql_common $sql_where order by mb_id ";
|
||||||
$result = sql_query($sql);
|
$result = sql_query($sql);
|
||||||
$i = 0;
|
$i=0;
|
||||||
$ma_list = "";
|
$ma_list = "";
|
||||||
$cr = "";
|
$cr = "";
|
||||||
while ($row = sql_fetch_array($result)) {
|
while ($row=sql_fetch_array($result)) {
|
||||||
$i++;
|
$i++;
|
||||||
$ma_list .= $cr . $row['mb_email'] . "||" . $row['mb_id'] . "||" . get_text($row['mb_name']) . "||" . $row['mb_nick'] . "||" . $row['mb_datetime'];
|
$ma_list .= $cr . $row['mb_email'] . "||" . $row['mb_id'] . "||" . get_text($row['mb_name']) . "||" . $row['mb_nick'] . "||" . $row['mb_datetime'];
|
||||||
$cr = "\n";
|
$cr = "\n";
|
||||||
|
|
||||||
$bg = 'bg' . ($i % 2);
|
$bg = 'bg'.($i%2);
|
||||||
?>
|
?>
|
||||||
<tr class="<?php echo $bg; ?>">
|
<tr class="<?php echo $bg; ?>">
|
||||||
<td class="td_num"><?php echo $i ?></td>
|
<td class="td_num"><?php echo $i ?></td>
|
||||||
<td class="td_mbid"><?php echo $row['mb_id'] ?></td>
|
<td class="td_mbid"><?php echo $row['mb_id'] ?></td>
|
||||||
<td class="td_mbname"><?php echo get_text($row['mb_name']); ?></td>
|
<td class="td_mbname"><?php echo get_text($row['mb_name']); ?></td>
|
||||||
<td class="td_mbname"><?php echo $row['mb_nick'] ?></td>
|
<td class="td_mbname"><?php echo $row['mb_nick'] ?></td>
|
||||||
<td><?php echo $row['mb_email'] ?></td>
|
<td><?php echo $row['mb_email'] ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<textarea name="ma_list" style="display:none"><?php echo html_purifier($ma_list); ?></textarea>
|
<textarea name="ma_list" style="display:none"><?=$ma_list?></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="btn_confirm01 btn_confirm">
|
<div class="btn_confirm01 btn_confirm">
|
||||||
<input type="submit" value="메일보내기" class="btn_submit">
|
<input type="submit" value="메일보내기" class="btn_submit">
|
||||||
<a href="./mail_select_form.php?ma_id=<?php echo $ma_id ?>">뒤로</a>
|
<a href="./mail_select_form.php?ma_id=<?php echo $ma_id ?>">뒤로</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
require_once './admin.tail.php';
|
include_once('./admin.tail.php');
|
||||||
|
?>
|
||||||
|
|||||||
+23
-24
@@ -1,19 +1,17 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "200300";
|
$sub_menu = "200300";
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, 'w');
|
auth_check($auth[$sub_menu], 'w');
|
||||||
|
|
||||||
$html_title = '회원메일 발송';
|
$html_title = '회원메일 발송';
|
||||||
|
|
||||||
check_demo();
|
check_demo();
|
||||||
|
|
||||||
$security_mail_url = g5_require_security_mail_url();
|
|
||||||
|
|
||||||
check_admin_token();
|
check_admin_token();
|
||||||
|
|
||||||
require_once './admin.head.php';
|
include_once('./admin.head.php');
|
||||||
require_once G5_LIB_PATH . '/mailer.lib.php';
|
include_once(G5_LIB_PATH.'/mailer.lib.php');
|
||||||
|
|
||||||
$countgap = 10; // 몇건씩 보낼지 설정
|
$countgap = 10; // 몇건씩 보낼지 설정
|
||||||
$maxscreen = 500; // 몇건씩 화면에 보여줄건지?
|
$maxscreen = 500; // 몇건씩 화면에 보여줄건지?
|
||||||
@@ -27,13 +25,15 @@ echo "</span>";
|
|||||||
<span id="cont"></span>
|
<span id="cont"></span>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
require_once './admin.tail.php';
|
include_once('./admin.tail.php');
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php
|
||||||
flush();
|
flush();
|
||||||
ob_flush();
|
ob_flush();
|
||||||
|
|
||||||
$ma_id = isset($_POST['ma_id']) ? (int) $_POST['ma_id'] : 0;
|
$ma_id = trim($_POST['ma_id']);
|
||||||
$select_member_list = isset($_POST['ma_list']) ? trim($_POST['ma_list']) : '';
|
$select_member_list = trim($_POST['ma_list']);
|
||||||
|
|
||||||
//print_r2($_POST); EXIT;
|
//print_r2($_POST); EXIT;
|
||||||
$member_list = explode("\n", conv_unescape_nl($select_member_list));
|
$member_list = explode("\n", conv_unescape_nl($select_member_list));
|
||||||
@@ -45,23 +45,25 @@ $ma = sql_fetch($sql);
|
|||||||
$subject = $ma['ma_subject'];
|
$subject = $ma['ma_subject'];
|
||||||
|
|
||||||
$cnt = 0;
|
$cnt = 0;
|
||||||
for ($i = 0; $i < count($member_list); $i++) {
|
for ($i=0; $i<count($member_list); $i++)
|
||||||
|
{
|
||||||
list($to_email, $mb_id, $name, $nick, $datetime) = explode("||", trim($member_list[$i]));
|
list($to_email, $mb_id, $name, $nick, $datetime) = explode("||", trim($member_list[$i]));
|
||||||
|
|
||||||
$sw = preg_match("/[0-9a-zA-Z_]+(\.[0-9a-zA-Z_]+)*@[0-9a-zA-Z_]+(\.[0-9a-zA-Z_]+)*/", $to_email);
|
$sw = preg_match("/[0-9a-zA-Z_]+(\.[0-9a-zA-Z_]+)*@[0-9a-zA-Z_]+(\.[0-9a-zA-Z_]+)*/", $to_email);
|
||||||
// 올바른 메일 주소만
|
// 올바른 메일 주소만
|
||||||
if ($sw == true) {
|
if ($sw == true)
|
||||||
|
{
|
||||||
$cnt++;
|
$cnt++;
|
||||||
|
|
||||||
$mb_md5 = md5($mb_id . $to_email . $datetime);
|
$mb_md5 = md5($mb_id.$to_email.$datetime);
|
||||||
|
|
||||||
$content = $ma['ma_content'];
|
$content = $ma['ma_content'];
|
||||||
$content = preg_replace("/{이름}/", $name, (string)$content);
|
$content = preg_replace("/{이름}/", $name, $content);
|
||||||
$content = preg_replace("/{닉네임}/", $nick, (string)$content);
|
$content = preg_replace("/{닉네임}/", $nick, $content);
|
||||||
$content = preg_replace("/{회원아이디}/", $mb_id, (string)$content);
|
$content = preg_replace("/{회원아이디}/", $mb_id, $content);
|
||||||
$content = preg_replace("/{이메일}/", $to_email, (string)$content);
|
$content = preg_replace("/{이메일}/", $to_email, $content);
|
||||||
|
|
||||||
$content = $content . "<hr size=0><p><span style='font-size:9pt; font-family:굴림'>▶ 더 이상 정보 수신을 원치 않으시면 [<a href='" . ($security_mail_url . '/' . G5_BBS_DIR) . "/email_stop.php?mb_id={$mb_id}&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}&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);
|
||||||
|
|
||||||
@@ -71,18 +73,15 @@ for ($i = 0; $i < count($member_list); $i++) {
|
|||||||
ob_flush();
|
ob_flush();
|
||||||
ob_end_flush();
|
ob_end_flush();
|
||||||
usleep($sleepsec);
|
usleep($sleepsec);
|
||||||
if ($cnt % $countgap == 0) {
|
if ($cnt % $countgap == 0)
|
||||||
|
{
|
||||||
echo "<script> document.all.cont.innerHTML += '<br>'; document.body.scrollTop += 1000; </script>\n";
|
echo "<script> document.all.cont.innerHTML += '<br>'; document.body.scrollTop += 1000; </script>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
// 화면을 지운다... 부하를 줄임
|
// 화면을 지운다... 부하를 줄임
|
||||||
if ($cnt % $maxscreen == 0) {
|
if ($cnt % $maxscreen == 0)
|
||||||
echo "<script> document.all.cont.innerHTML = ''; document.body.scrollTop += 1000; </script>\n";
|
echo "<script> document.all.cont.innerHTML = ''; document.body.scrollTop += 1000; </script>\n";
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<script>
|
<script> document.all.cont.innerHTML += "<br><br>총 <?php echo number_format($cnt) ?>건 발송<br><br><font color=crimson><b>[끝]</b></font>"; document.body.scrollTop += 1000; </script>
|
||||||
document.all.cont.innerHTML += "<br><br>총 <?php echo number_format($cnt) ?>건 발송<br><br><font color=crimson><b>[끝]</b></font>";
|
|
||||||
document.body.scrollTop += 1000;
|
|
||||||
</script>
|
|
||||||
|
|||||||
+12
-15
@@ -1,26 +1,22 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "200300";
|
$sub_menu = "200300";
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
|
|
||||||
if (!$config['cf_email_use']) {
|
if (!$config['cf_email_use'])
|
||||||
alert('환경설정에서 \'메일발송 사용\'에 체크하셔야 메일을 발송할 수 있습니다.');
|
alert('환경설정에서 \'메일발송 사용\'에 체크하셔야 메일을 발송할 수 있습니다.');
|
||||||
}
|
|
||||||
|
|
||||||
require_once G5_LIB_PATH . '/mailer.lib.php';
|
include_once(G5_LIB_PATH.'/mailer.lib.php');
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, 'w');
|
auth_check($auth[$sub_menu], 'w');
|
||||||
|
|
||||||
check_demo();
|
check_demo();
|
||||||
|
|
||||||
$security_mail_url = g5_require_security_mail_url();
|
|
||||||
|
|
||||||
$g5['title'] = '회원메일 테스트';
|
$g5['title'] = '회원메일 테스트';
|
||||||
|
|
||||||
$name = get_text($member['mb_name']);
|
$name = get_text($member['mb_name']);
|
||||||
$nick = $member['mb_nick'];
|
$nick = $member['mb_nick'];
|
||||||
$mb_id = $member['mb_id'];
|
$mb_id = $member['mb_id'];
|
||||||
$email = $member['mb_email'];
|
$email = $member['mb_email'];
|
||||||
$ma_id = isset($_REQUEST['ma_id']) ? (int) $_REQUEST['ma_id'] : 0;
|
|
||||||
|
|
||||||
$sql = "select ma_subject, ma_content from {$g5['mail_table']} where ma_id = '{$ma_id}' ";
|
$sql = "select ma_subject, ma_content from {$g5['mail_table']} where ma_id = '{$ma_id}' ";
|
||||||
$ma = sql_fetch($sql);
|
$ma = sql_fetch($sql);
|
||||||
@@ -28,15 +24,16 @@ $ma = sql_fetch($sql);
|
|||||||
$subject = $ma['ma_subject'];
|
$subject = $ma['ma_subject'];
|
||||||
|
|
||||||
$content = $ma['ma_content'];
|
$content = $ma['ma_content'];
|
||||||
$content = preg_replace("/{이름}/", $name, (string)$content);
|
$content = preg_replace("/{이름}/", $name, $content);
|
||||||
$content = preg_replace("/{닉네임}/", $nick, (string)$content);
|
$content = preg_replace("/{닉네임}/", $nick, $content);
|
||||||
$content = preg_replace("/{회원아이디}/", $mb_id, (string)$content);
|
$content = preg_replace("/{회원아이디}/", $mb_id, $content);
|
||||||
$content = preg_replace("/{이메일}/", $email, (string)$content);
|
$content = preg_replace("/{이메일}/", $email, $content);
|
||||||
|
|
||||||
$mb_md5 = md5($member['mb_id'] . $member['mb_email'] . $member['mb_datetime']);
|
$mb_md5 = md5($member['mb_id'].$member['mb_email'].$member['mb_datetime']);
|
||||||
|
|
||||||
$content = $content . '<p>더 이상 정보 수신을 원치 않으시면 [<a href="' . ($security_mail_url . '/' . G5_BBS_DIR) . '/email_stop.php?mb_id=' . $mb_id . '&mb_md5=' . $mb_md5 . '" target="_blank">수신거부</a>] 해 주십시오.</p>';
|
$content = $content . '<p>더 이상 정보 수신을 원치 않으시면 [<a href="'.G5_BBS_URL.'/email_stop.php?mb_id='.$mb_id.'&mb_md5='.$mb_md5.'" target="_blank">수신거부</a>] 해 주십시오.</p>';
|
||||||
|
|
||||||
mailer($config['cf_title'], $member['mb_email'], $member['mb_email'], $subject, $content, 1);
|
mailer($config['cf_title'], $member['mb_email'], $member['mb_email'], $subject, $content, 1);
|
||||||
|
|
||||||
alert($member['mb_nick'] . '(' . $member['mb_email'] . ')님께 테스트 메일을 발송하였습니다. 확인하여 주십시오.');
|
alert($member['mb_nick'].'('.$member['mb_email'].')님께 테스트 메일을 발송하였습니다. 확인하여 주십시오.');
|
||||||
|
?>
|
||||||
|
|||||||
+21
-26
@@ -1,44 +1,39 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "200300";
|
$sub_menu = "200300";
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
|
|
||||||
if ($w == 'u' || $w == 'd') {
|
if ($w == 'u' || $w == 'd')
|
||||||
check_demo();
|
check_demo();
|
||||||
}
|
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, 'w');
|
auth_check($auth[$sub_menu], 'w');
|
||||||
|
|
||||||
check_admin_token();
|
check_admin_token();
|
||||||
|
|
||||||
$ma_id = isset($_POST['ma_id']) ? (int) $_POST['ma_id'] : 0;
|
if ($w == '')
|
||||||
$ma_subject = isset($_POST['ma_subject']) ? addslashes(strip_tags(clean_xss_attributes(stripslashes($_POST['ma_subject'])))) : '';
|
{
|
||||||
$ma_content = isset($_POST['ma_content']) ? $_POST['ma_content'] : '';
|
|
||||||
|
|
||||||
if ($w == '') {
|
|
||||||
$sql = " insert {$g5['mail_table']}
|
$sql = " insert {$g5['mail_table']}
|
||||||
set ma_subject = '{$ma_subject}',
|
set ma_id = '{$_POST['ma_id']}',
|
||||||
ma_content = '{$ma_content}',
|
ma_subject = '{$_POST['ma_subject']}',
|
||||||
ma_time = '" . G5_TIME_YMDHIS . "',
|
ma_content = '{$_POST['ma_content']}',
|
||||||
|
ma_time = '".G5_TIME_YMDHIS."',
|
||||||
ma_ip = '{$_SERVER['REMOTE_ADDR']}' ";
|
ma_ip = '{$_SERVER['REMOTE_ADDR']}' ";
|
||||||
sql_query($sql);
|
sql_query($sql);
|
||||||
|
}
|
||||||
$ma_id = sql_insert_id();
|
else if ($w == 'u')
|
||||||
run_event('admin_mail_created', $ma_id);
|
{
|
||||||
|
|
||||||
} elseif ($w == 'u') {
|
|
||||||
$sql = " update {$g5['mail_table']}
|
$sql = " update {$g5['mail_table']}
|
||||||
set ma_subject = '{$ma_subject}',
|
set ma_subject = '{$_POST['ma_subject']}',
|
||||||
ma_content = '{$ma_content}',
|
ma_content = '{$_POST['ma_content']}',
|
||||||
ma_time = '" . G5_TIME_YMDHIS . "',
|
ma_time = '".G5_TIME_YMDHIS."',
|
||||||
ma_ip = '{$_SERVER['REMOTE_ADDR']}'
|
ma_ip = '{$_SERVER['REMOTE_ADDR']}'
|
||||||
where ma_id = '{$ma_id}' ";
|
where ma_id = '{$_POST['ma_id']}' ";
|
||||||
sql_query($sql);
|
sql_query($sql);
|
||||||
run_event('admin_mail_updated', $ma_id);
|
}
|
||||||
|
else if ($w == 'd')
|
||||||
} elseif ($w == 'd') {
|
{
|
||||||
$sql = " delete from {$g5['mail_table']} where ma_id = '{$ma_id}' ";
|
$sql = " delete from {$g5['mail_table']} where ma_id = '{$_POST['ma_id']}' ";
|
||||||
sql_query($sql);
|
sql_query($sql);
|
||||||
run_event('admin_mail_deleted', $ma_id);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
goto_url('./mail_list.php');
|
goto_url('./mail_list.php');
|
||||||
|
?>
|
||||||
|
|||||||
@@ -1,30 +0,0 @@
|
|||||||
<?php
|
|
||||||
$sub_menu = '200100';
|
|
||||||
require_once './_common.php';
|
|
||||||
|
|
||||||
check_demo();
|
|
||||||
auth_check_menu($auth, $sub_menu, 'w');
|
|
||||||
auth_check_menu($auth, $sub_menu, 'd');
|
|
||||||
|
|
||||||
if ($_SERVER['REQUEST_METHOD'] !== 'POST') {
|
|
||||||
alert('올바른 방법으로 이용해 주십시오.');
|
|
||||||
}
|
|
||||||
|
|
||||||
check_admin_token();
|
|
||||||
admin_referer_check();
|
|
||||||
|
|
||||||
$mb_id = isset($_POST['mb_id']) && is_string($_POST['mb_id']) ? trim($_POST['mb_id']) : '';
|
|
||||||
$mb = get_member($mb_id);
|
|
||||||
if (empty($mb['mb_id'])) {
|
|
||||||
alert('존재하지 않는 회원자료입니다.');
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($is_admin !== 'super' && ($mb['mb_level'] >= $member['mb_level'] || is_admin($mb['mb_id']) === 'super')) {
|
|
||||||
alert('자신보다 권한이 높거나 같은 회원의 본인확인 정보는 삭제할 수 없습니다.');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!admin_clear_member_certification($mb['mb_id'])) {
|
|
||||||
alert('본인확인 정보를 모두 삭제하지 못했습니다. DB 상태를 확인한 뒤 다시 시도해 주십시오.');
|
|
||||||
}
|
|
||||||
|
|
||||||
alert('본인확인 정보와 인증 내역을 삭제했습니다.', './member_form.php?w=u&mb_id='.urlencode($mb['mb_id']));
|
|
||||||
+11
-12
@@ -1,30 +1,29 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "200100";
|
$sub_menu = "200100";
|
||||||
require_once "./_common.php";
|
include_once("./_common.php");
|
||||||
|
|
||||||
check_demo();
|
check_demo();
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, "d");
|
auth_check($auth[$sub_menu], "d");
|
||||||
|
|
||||||
$mb = isset($_POST['mb_id']) ? get_member($_POST['mb_id']) : array();
|
$mb = get_member($_POST['mb_id']);
|
||||||
|
|
||||||
if (!(isset($mb['mb_id']) && $mb['mb_id'])) {
|
if (!$mb['mb_id'])
|
||||||
alert("회원자료가 존재하지 않습니다.");
|
alert("회원자료가 존재하지 않습니다.");
|
||||||
} elseif ($member['mb_id'] == $mb['mb_id']) {
|
else if ($member['mb_id'] == $mb['mb_id'])
|
||||||
alert("로그인 중인 관리자는 삭제 할 수 없습니다.");
|
alert("로그인 중인 관리자는 삭제 할 수 없습니다.");
|
||||||
} elseif (is_admin($mb['mb_id']) == "super") {
|
else if (is_admin($mb['mb_id']) == "super")
|
||||||
alert("최고 관리자는 삭제할 수 없습니다.");
|
alert("최고 관리자는 삭제할 수 없습니다.");
|
||||||
} elseif ($mb['mb_level'] >= $member['mb_level']) {
|
else if ($mb['mb_level'] >= $member['mb_level'])
|
||||||
alert("자신보다 권한이 높거나 같은 회원은 삭제할 수 없습니다.");
|
alert("자신보다 권한이 높거나 같은 회원은 삭제할 수 없습니다.");
|
||||||
}
|
|
||||||
|
|
||||||
check_admin_token();
|
check_admin_token();
|
||||||
|
|
||||||
// 회원자료 삭제
|
// 회원자료 삭제
|
||||||
member_delete($mb['mb_id']);
|
member_delete($mb['mb_id']);
|
||||||
|
|
||||||
if (isset($url)) {
|
if ($url)
|
||||||
goto_url("{$url}?$qstr&w=u&mb_id=" . $mb['mb_id']);
|
goto_url("{$url}?$qstr&w=u&mb_id=$mb_id");
|
||||||
} else {
|
else
|
||||||
goto_url("./member_list.php?$qstr");
|
goto_url("./member_list.php?$qstr");
|
||||||
}
|
?>
|
||||||
|
|||||||
+341
-547
@@ -1,74 +1,32 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "200100";
|
$sub_menu = "200100";
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, 'w');
|
auth_check($auth[$sub_menu], 'w');
|
||||||
|
|
||||||
$mb = array(
|
if ($w == '')
|
||||||
'mb_certify' => null,
|
{
|
||||||
'mb_adult' => null,
|
|
||||||
'mb_sms' => null,
|
|
||||||
'mb_intercept_date' => null,
|
|
||||||
'mb_id' => null,
|
|
||||||
'mb_name' => null,
|
|
||||||
'mb_nick' => null,
|
|
||||||
'mb_point' => null,
|
|
||||||
'mb_email' => null,
|
|
||||||
'mb_homepage' => null,
|
|
||||||
'mb_hp' => null,
|
|
||||||
'mb_tel' => null,
|
|
||||||
'mb_zip1' => null,
|
|
||||||
'mb_zip2' => null,
|
|
||||||
'mb_addr1' => null,
|
|
||||||
'mb_addr2' => null,
|
|
||||||
'mb_addr3' => null,
|
|
||||||
'mb_addr_jibeon' => null,
|
|
||||||
'mb_signature' => null,
|
|
||||||
'mb_profile' => null,
|
|
||||||
'mb_memo' => null,
|
|
||||||
'mb_leave_date' => null,
|
|
||||||
'mb_1' => null,
|
|
||||||
'mb_2' => null,
|
|
||||||
'mb_3' => null,
|
|
||||||
'mb_4' => null,
|
|
||||||
'mb_5' => null,
|
|
||||||
'mb_6' => null,
|
|
||||||
'mb_7' => null,
|
|
||||||
'mb_8' => null,
|
|
||||||
'mb_9' => null,
|
|
||||||
'mb_10' => null,
|
|
||||||
);
|
|
||||||
|
|
||||||
$sound_only = '';
|
|
||||||
$required_mb_id = '';
|
|
||||||
$required_mb_id_class = '';
|
|
||||||
$required_mb_password = '';
|
|
||||||
$html_title = '';
|
|
||||||
|
|
||||||
if ($w == '') {
|
|
||||||
$required_mb_id = 'required';
|
$required_mb_id = 'required';
|
||||||
$required_mb_id_class = 'required alnum_';
|
$required_mb_id_class = 'required alnum_';
|
||||||
$required_mb_password = 'required';
|
$required_mb_password = 'required';
|
||||||
$sound_only = '<strong class="sound_only">필수</strong>';
|
$sound_only = '<strong class="sound_only">필수</strong>';
|
||||||
|
|
||||||
$mb['mb_mailling'] = 1;
|
$mb['mb_mailling'] = 1;
|
||||||
$mb['mb_sms'] = 1;
|
|
||||||
$mb['mb_open'] = 1;
|
$mb['mb_open'] = 1;
|
||||||
$mb['mb_level'] = $config['cf_register_level'];
|
$mb['mb_level'] = $config['cf_register_level'];
|
||||||
$mb['mb_marketing_agree'] = 0;
|
|
||||||
$mb['mb_thirdparty_agree'] = 0;
|
|
||||||
$html_title = '추가';
|
$html_title = '추가';
|
||||||
} elseif ($w == 'u') {
|
}
|
||||||
|
else if ($w == 'u')
|
||||||
|
{
|
||||||
$mb = get_member($mb_id);
|
$mb = get_member($mb_id);
|
||||||
if (!$mb['mb_id']) {
|
if (!$mb['mb_id'])
|
||||||
alert('존재하지 않는 회원자료입니다.');
|
alert('존재하지 않는 회원자료입니다.');
|
||||||
}
|
|
||||||
|
|
||||||
if ($is_admin != 'super' && $mb['mb_level'] >= $member['mb_level']) {
|
if ($is_admin != 'super' && $mb['mb_level'] >= $member['mb_level'])
|
||||||
alert('자신보다 권한이 높거나 같은 회원은 수정할 수 없습니다.');
|
alert('자신보다 권한이 높거나 같은 회원은 수정할 수 없습니다.');
|
||||||
}
|
|
||||||
|
|
||||||
$required_mb_id = 'readonly';
|
$required_mb_id = 'readonly';
|
||||||
|
$required_mb_password = '';
|
||||||
$html_title = '수정';
|
$html_title = '수정';
|
||||||
|
|
||||||
$mb['mb_name'] = get_text($mb['mb_name']);
|
$mb['mb_name'] = get_text($mb['mb_name']);
|
||||||
@@ -94,16 +52,12 @@ if ($w == '') {
|
|||||||
$mb['mb_8'] = get_text($mb['mb_8']);
|
$mb['mb_8'] = get_text($mb['mb_8']);
|
||||||
$mb['mb_9'] = get_text($mb['mb_9']);
|
$mb['mb_9'] = get_text($mb['mb_9']);
|
||||||
$mb['mb_10'] = get_text($mb['mb_10']);
|
$mb['mb_10'] = get_text($mb['mb_10']);
|
||||||
} else {
|
|
||||||
alert('제대로 된 값이 넘어오지 않았습니다.');
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
alert('제대로 된 값이 넘어오지 않았습니다.');
|
||||||
|
|
||||||
// 본인확인방법
|
// 본인확인방법
|
||||||
switch ($mb['mb_certify']) {
|
switch($mb['mb_certify']) {
|
||||||
case 'simple':
|
|
||||||
$mb_certify_case = '간편인증';
|
|
||||||
$mb_certify_val = 'simple';
|
|
||||||
break;
|
|
||||||
case 'hp':
|
case 'hp':
|
||||||
$mb_certify_case = '휴대폰';
|
$mb_certify_case = '휴대폰';
|
||||||
$mb_certify_val = 'hp';
|
$mb_certify_val = 'hp';
|
||||||
@@ -142,526 +96,366 @@ $mb_sms_no = !$mb['mb_sms'] ? 'checked="checked"' : '';
|
|||||||
$mb_open_yes = $mb['mb_open'] ? 'checked="checked"' : '';
|
$mb_open_yes = $mb['mb_open'] ? 'checked="checked"' : '';
|
||||||
$mb_open_no = !$mb['mb_open'] ? 'checked="checked"' : '';
|
$mb_open_no = !$mb['mb_open'] ? 'checked="checked"' : '';
|
||||||
|
|
||||||
// 마케팅 목적의 개인정보 수집 및 이용
|
if (isset($mb['mb_certify'])) {
|
||||||
$mb_marketing_agree_yes = $mb['mb_marketing_agree'] ? 'checked="checked"' : '';
|
// 날짜시간형이라면 drop 시킴
|
||||||
$mb_marketing_agree_no = !$mb['mb_marketing_agree'] ? 'checked="checked"' : '';
|
if (preg_match("/-/", $mb['mb_certify'])) {
|
||||||
|
sql_query(" ALTER TABLE `{$g5['member_table']}` DROP `mb_certify` ", false);
|
||||||
// 개인정보 제3자 제공 동의
|
}
|
||||||
$mb_thirdparty_agree_yes = $mb['mb_thirdparty_agree'] ? 'checked="checked"' : '';
|
} else {
|
||||||
$mb_thirdparty_agree_no = !$mb['mb_thirdparty_agree'] ? 'checked="checked"' : '';
|
sql_query(" ALTER TABLE `{$g5['member_table']}` ADD `mb_certify` TINYINT(4) NOT NULL DEFAULT '0' AFTER `mb_hp` ", false);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isset($mb['mb_adult'])) {
|
||||||
|
sql_query(" ALTER TABLE `{$g5['member_table']}` CHANGE `mb_adult` `mb_adult` TINYINT(4) NOT NULL DEFAULT '0' ", false);
|
||||||
|
} else {
|
||||||
|
sql_query(" ALTER TABLE `{$g5['member_table']}` ADD `mb_adult` TINYINT NOT NULL DEFAULT '0' AFTER `mb_certify` ", false);
|
||||||
|
}
|
||||||
|
|
||||||
// 지번주소 필드추가
|
// 지번주소 필드추가
|
||||||
|
if(!isset($mb['mb_addr_jibeon'])) {
|
||||||
|
sql_query(" ALTER TABLE {$g5['member_table']} ADD `mb_addr_jibeon` varchar(255) NOT NULL DEFAULT '' AFTER `mb_addr2` ", false);
|
||||||
|
}
|
||||||
|
|
||||||
// 건물명필드추가
|
// 건물명필드추가
|
||||||
|
if(!isset($mb['mb_addr3'])) {
|
||||||
|
sql_query(" ALTER TABLE {$g5['member_table']} ADD `mb_addr3` varchar(255) NOT NULL DEFAULT '' AFTER `mb_addr2` ", false);
|
||||||
|
}
|
||||||
|
|
||||||
// 중복가입 확인필드 추가
|
// 중복가입 확인필드 추가
|
||||||
|
if(!isset($mb['mb_dupinfo'])) {
|
||||||
|
sql_query(" ALTER TABLE {$g5['member_table']} ADD `mb_dupinfo` varchar(255) NOT NULL DEFAULT '' AFTER `mb_adult` ", false);
|
||||||
|
}
|
||||||
|
|
||||||
// 이메일인증 체크 필드추가
|
// 이메일인증 체크 필드추가
|
||||||
|
if(!isset($mb['mb_email_certify2'])) {
|
||||||
// 본인인증 내역 테이블 정보가 dbconfig에 없으면 소셜 테이블 정의
|
sql_query(" ALTER TABLE {$g5['member_table']} ADD `mb_email_certify2` varchar(255) NOT NULL DEFAULT '' AFTER `mb_email_certify` ", false);
|
||||||
if (!isset($g5['member_cert_history'])) {
|
|
||||||
$g5['member_cert_history_table'] = G5_TABLE_PREFIX . 'member_cert_history';
|
|
||||||
}
|
|
||||||
// 멤버 본인인증 정보 변경 내역 테이블 없을 경우 생성
|
|
||||||
|
|
||||||
$mb_cert_history = '';
|
|
||||||
if (isset($mb_id) && $mb_id) {
|
|
||||||
$sql = "select * from {$g5['member_cert_history_table']} where mb_id = '{$mb_id}' order by ch_id asc";
|
|
||||||
$mb_cert_history = sql_query($sql);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($mb['mb_intercept_date']) {
|
if ($mb['mb_intercept_date']) $g5['title'] = "차단된 ";
|
||||||
$g5['title'] = "차단된 ";
|
else $g5['title'] .= "";
|
||||||
} else {
|
$g5['title'] .= '회원 '.$html_title;
|
||||||
$g5['title'] = "";
|
include_once('./admin.head.php');
|
||||||
}
|
|
||||||
$g5['title'] .= '회원 ' . $html_title;
|
|
||||||
require_once './admin.head.php';
|
|
||||||
|
|
||||||
// add_javascript('js 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
|
// add_javascript('js 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
|
||||||
add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<form name="fmember" id="fmember" action="./member_form_update.php" onsubmit="return fmember_submit(this);" method="post" enctype="multipart/form-data">
|
<form name="fmember" id="fmember" action="./member_form_update.php" onsubmit="return fmember_submit(this);" method="post" enctype="multipart/form-data">
|
||||||
<input type="hidden" name="w" value="<?php echo $w ?>">
|
<input type="hidden" name="w" value="<?php echo $w ?>">
|
||||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||||
<input type="hidden" name="token" value="">
|
<input type="hidden" name="token" value="">
|
||||||
|
|
||||||
<div class="tbl_frm01 tbl_wrap">
|
<div class="tbl_frm01 tbl_wrap">
|
||||||
<table>
|
<table>
|
||||||
<caption><?php echo $g5['title']; ?></caption>
|
<caption><?php echo $g5['title']; ?></caption>
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col class="grid_4">
|
<col class="grid_4">
|
||||||
<col>
|
<col>
|
||||||
<col class="grid_4">
|
<col class="grid_4">
|
||||||
<col>
|
<col>
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="mb_id">아이디<?php echo $sound_only ?></label></th>
|
<th scope="row"><label for="mb_id">아이디<?php echo $sound_only ?></label></th>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" name="mb_id" value="<?php echo $mb['mb_id'] ?>" id="mb_id" <?php echo $required_mb_id ?> class="frm_input <?php echo $required_mb_id_class ?>" size="15" maxlength="20">
|
<input type="text" name="mb_id" value="<?php echo $mb['mb_id'] ?>" id="mb_id" <?php echo $required_mb_id ?> class="frm_input <?php echo $required_mb_id_class ?>" size="15" maxlength="20">
|
||||||
<?php if ($w == 'u') { ?><a href="./boardgroupmember_form.php?mb_id=<?php echo $mb['mb_id'] ?>" class="btn_frmline">접근가능그룹보기</a><?php } ?>
|
<?php if ($w=='u'){ ?><a href="./boardgroupmember_form.php?mb_id=<?php echo $mb['mb_id'] ?>" class="btn_frmline">접근가능그룹보기</a><?php } ?>
|
||||||
</td>
|
</td>
|
||||||
<th scope="row"><label for="mb_password">비밀번호<?php echo $sound_only ?></label></th>
|
<th scope="row"><label for="mb_password">비밀번호<?php echo $sound_only ?></label></th>
|
||||||
<td>
|
<td><input type="password" name="mb_password" id="mb_password" <?php echo $required_mb_password ?> class="frm_input <?php echo $required_mb_password ?>" size="15" maxlength="20"></td>
|
||||||
<div>
|
</tr>
|
||||||
<input type="password" name="mb_password" id="mb_password" <?php echo $required_mb_password ?> class="frm_input <?php echo $required_mb_password ?>" size="15" maxlength="20">
|
<tr>
|
||||||
</div>
|
<th scope="row"><label for="mb_name">이름(실명)<strong class="sound_only">필수</strong></label></th>
|
||||||
<div id="mb_password_captcha_wrap" style="display:none">
|
<td><input type="text" name="mb_name" value="<?php echo $mb['mb_name'] ?>" id="mb_name" required class="required frm_input" size="15" maxlength="20"></td>
|
||||||
<?php
|
<th scope="row"><label for="mb_nick">닉네임<strong class="sound_only">필수</strong></label></th>
|
||||||
require_once G5_CAPTCHA_PATH . '/captcha.lib.php';
|
<td><input type="text" name="mb_nick" value="<?php echo $mb['mb_nick'] ?>" id="mb_nick" required class="required frm_input" size="15" maxlength="20"></td>
|
||||||
$captcha_html = captcha_html();
|
</tr>
|
||||||
$captcha_js = chk_captcha_js();
|
<tr>
|
||||||
echo $captcha_html;
|
<th scope="row"><label for="mb_level">회원 권한</label></th>
|
||||||
?>
|
<td><?php echo get_member_level_select('mb_level', 1, $member['mb_level'], $mb['mb_level']) ?></td>
|
||||||
</div>
|
<th scope="row">포인트</th>
|
||||||
</td>
|
<td><a href="./point_list.php?sfl=mb_id&stx=<?php echo $mb['mb_id'] ?>" target="_blank"><?php echo number_format($mb['mb_point']) ?></a> 점</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="mb_name">이름(실명)<strong class="sound_only">필수</strong></label></th>
|
<th scope="row"><label for="mb_email">E-mail<strong class="sound_only">필수</strong></label></th>
|
||||||
<td><input type="text" name="mb_name" value="<?php echo $mb['mb_name'] ?>" id="mb_name" required class="required frm_input" size="15" maxlength="20"></td>
|
<td><input type="text" name="mb_email" value="<?php echo $mb['mb_email'] ?>" id="mb_email" maxlength="100" required class="required frm_input email" size="30"></td>
|
||||||
<th scope="row"><label for="mb_nick">닉네임<strong class="sound_only">필수</strong></label></th>
|
<th scope="row"><label for="mb_homepage">홈페이지</label></th>
|
||||||
<td><input type="text" name="mb_nick" value="<?php echo $mb['mb_nick'] ?>" id="mb_nick" required class="required frm_input" size="15" maxlength="20"></td>
|
<td><input type="text" name="mb_homepage" value="<?php echo $mb['mb_homepage'] ?>" id="mb_homepage" class="frm_input" maxlength="255" size="15"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="mb_level">회원 권한</label></th>
|
<th scope="row"><label for="mb_hp">휴대폰번호</label></th>
|
||||||
<td><?php echo get_member_level_select('mb_level', 1, $member['mb_level'], $mb['mb_level']) ?></td>
|
<td><input type="text" name="mb_hp" value="<?php echo $mb['mb_hp'] ?>" id="mb_hp" class="frm_input" size="15" maxlength="20"></td>
|
||||||
<th scope="row">포인트</th>
|
<th scope="row"><label for="mb_tel">전화번호</label></th>
|
||||||
<td><a href="./point_list.php?sfl=mb_id&stx=<?php echo $mb['mb_id'] ?>" target="_blank"><?php echo number_format(isset($mb['mb_point']) ? $mb['mb_point'] : 0) ?></a> 점</td>
|
<td><input type="text" name="mb_tel" value="<?php echo $mb['mb_tel'] ?>" id="mb_tel" class="frm_input" size="15" maxlength="20"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="mb_email">E-mail<strong class="sound_only">필수</strong></label></th>
|
<th scope="row">본인확인방법</th>
|
||||||
<td><input type="text" name="mb_email" value="<?php echo $mb['mb_email'] ?>" id="mb_email" maxlength="100" required class="required frm_input email" size="30"></td>
|
<td colspan="3">
|
||||||
<th scope="row"><label for="mb_homepage">홈페이지</label></th>
|
<input type="radio" name="mb_certify_case" value="ipin" id="mb_certify_ipin" <?php if($mb['mb_certify'] == 'ipin') echo 'checked="checked"'; ?>>
|
||||||
<td><input type="text" name="mb_homepage" value="<?php echo $mb['mb_homepage'] ?>" id="mb_homepage" class="frm_input" maxlength="255" size="15"></td>
|
<label for="mb_certify_ipin">아이핀</label>
|
||||||
</tr>
|
<input type="radio" name="mb_certify_case" value="hp" id="mb_certify_hp" <?php if($mb['mb_certify'] == 'hp') echo 'checked="checked"'; ?>>
|
||||||
<tr>
|
<label for="mb_certify_hp">휴대폰</label>
|
||||||
<th scope="row"><label for="mb_hp">휴대폰번호</label></th>
|
</td>
|
||||||
<td><input type="text" name="mb_hp" value="<?php echo $mb['mb_hp'] ?>" id="mb_hp" class="frm_input" size="15" maxlength="20"></td>
|
</tr>
|
||||||
<th scope="row"><label for="mb_tel">전화번호</label></th>
|
<tr>
|
||||||
<td><input type="text" name="mb_tel" value="<?php echo $mb['mb_tel'] ?>" id="mb_tel" class="frm_input" size="15" maxlength="20"></td>
|
<th scope="row">본인확인</th>
|
||||||
</tr>
|
<td>
|
||||||
<tr>
|
<input type="radio" name="mb_certify" value="1" id="mb_certify_yes" <?php echo $mb_certify_yes; ?>>
|
||||||
<th scope="row">본인확인방법</th>
|
<label for="mb_certify_yes">예</label>
|
||||||
<td colspan="3">
|
<input type="radio" name="mb_certify" value="" id="mb_certify_no" <?php echo $mb_certify_no; ?>>
|
||||||
<input type="radio" name="mb_certify_case" value="simple" id="mb_certify_sa" <?php if ($mb['mb_certify'] == 'simple') { echo 'checked="checked"'; } ?>>
|
<label for="mb_certify_no">아니오</label>
|
||||||
<label for="mb_certify_sa">간편인증</label>
|
</td>
|
||||||
<input type="radio" name="mb_certify_case" value="hp" id="mb_certify_hp" <?php if ($mb['mb_certify'] == 'hp') { echo 'checked="checked"'; } ?>>
|
<th scope="row">성인인증</th>
|
||||||
<label for="mb_certify_hp">휴대폰</label>
|
<td>
|
||||||
<input type="radio" name="mb_certify_case" value="ipin" id="mb_certify_ipin" <?php if ($mb['mb_certify'] == 'ipin') { echo 'checked="checked"'; } ?>>
|
<input type="radio" name="mb_adult" value="1" id="mb_adult_yes" <?php echo $mb_adult_yes; ?>>
|
||||||
<label for="mb_certify_ipin">아이핀</label>
|
<label for="mb_adult_yes">예</label>
|
||||||
</td>
|
<input type="radio" name="mb_adult" value="0" id="mb_adult_no" <?php echo $mb_adult_no; ?>>
|
||||||
</tr>
|
<label for="mb_adult_no">아니오</label>
|
||||||
<tr>
|
</td>
|
||||||
<th scope="row">본인확인</th>
|
</tr>
|
||||||
<td>
|
<tr>
|
||||||
<input type="radio" name="mb_certify" value="1" id="mb_certify_yes" <?php echo $mb_certify_yes; ?>>
|
<th scope="row">주소</th>
|
||||||
<label for="mb_certify_yes">예</label>
|
<td colspan="3" class="td_addr_line">
|
||||||
<input type="radio" name="mb_certify" value="0" id="mb_certify_no" <?php echo $mb_certify_no; ?>>
|
<label for="mb_zip" class="sound_only">우편번호</label>
|
||||||
<label for="mb_certify_no">아니오</label>
|
<input type="text" name="mb_zip" value="<?php echo $mb['mb_zip1'].$mb['mb_zip2']; ?>" id="mb_zip" class="frm_input readonly" size="5" maxlength="6">
|
||||||
</td>
|
<button type="button" class="btn_frmline" onclick="win_zip('fmember', 'mb_zip', 'mb_addr1', 'mb_addr2', 'mb_addr3', 'mb_addr_jibeon');">주소 검색</button><br>
|
||||||
<th scope="row">성인인증</th>
|
<input type="text" name="mb_addr1" value="<?php echo $mb['mb_addr1'] ?>" id="mb_addr1" class="frm_input readonly" size="60">
|
||||||
<td>
|
<label for="mb_addr1">기본주소</label><br>
|
||||||
<input type="radio" name="mb_adult" value="1" id="mb_adult_yes" <?php echo $mb_adult_yes; ?>>
|
<input type="text" name="mb_addr2" value="<?php echo $mb['mb_addr2'] ?>" id="mb_addr2" class="frm_input" size="60">
|
||||||
<label for="mb_adult_yes">예</label>
|
<label for="mb_addr2">상세주소</label>
|
||||||
<input type="radio" name="mb_adult" value="0" id="mb_adult_no" <?php echo $mb_adult_no; ?>>
|
<br>
|
||||||
<label for="mb_adult_no">아니오</label>
|
<input type="text" name="mb_addr3" value="<?php echo $mb['mb_addr3'] ?>" id="mb_addr3" class="frm_input" size="60">
|
||||||
</td>
|
<label for="mb_addr3">참고항목</label>
|
||||||
</tr>
|
<input type="hidden" name="mb_addr_jibeon" value="<?php echo $mb['mb_addr_jibeon']; ?>"><br>
|
||||||
<tr>
|
</td>
|
||||||
<th scope="row">주소</th>
|
</tr>
|
||||||
<td colspan="3" class="td_addr_line">
|
<tr>
|
||||||
<label for="mb_zip" class="sound_only">우편번호</label>
|
<th scope="row"><label for="mb_icon">회원아이콘</label></th>
|
||||||
<input type="text" name="mb_zip" value="<?php echo $mb['mb_zip1'] . $mb['mb_zip2']; ?>" id="mb_zip" class="frm_input readonly" size="5" maxlength="6">
|
<td colspan="3">
|
||||||
<button type="button" class="btn_frmline" onclick="win_zip('fmember', 'mb_zip', 'mb_addr1', 'mb_addr2', 'mb_addr3', 'mb_addr_jibeon');">주소 검색</button><br>
|
<?php echo help('이미지 크기는 <strong>넓이 '.$config['cf_member_icon_width'].'픽셀 높이 '.$config['cf_member_icon_height'].'픽셀</strong>로 해주세요.') ?>
|
||||||
<input type="text" name="mb_addr1" value="<?php echo $mb['mb_addr1'] ?>" id="mb_addr1" class="frm_input readonly" size="60">
|
<input type="file" name="mb_icon" id="mb_icon">
|
||||||
<label for="mb_addr1">기본주소</label><br>
|
<?php
|
||||||
<input type="text" name="mb_addr2" value="<?php echo $mb['mb_addr2'] ?>" id="mb_addr2" class="frm_input" size="60">
|
$mb_dir = substr($mb['mb_id'],0,2);
|
||||||
<label for="mb_addr2">상세주소</label>
|
$icon_file = G5_DATA_PATH.'/member/'.$mb_dir.'/'.$mb['mb_id'].'.gif';
|
||||||
<br>
|
if (file_exists($icon_file)) {
|
||||||
<input type="text" name="mb_addr3" value="<?php echo $mb['mb_addr3'] ?>" id="mb_addr3" class="frm_input" size="60">
|
$icon_url = G5_DATA_URL.'/member/'.$mb_dir.'/'.$mb['mb_id'].'.gif';
|
||||||
<label for="mb_addr3">참고항목</label>
|
echo '<img src="'.$icon_url.'" alt="">';
|
||||||
<input type="hidden" name="mb_addr_jibeon" value="<?php echo $mb['mb_addr_jibeon']; ?>"><br>
|
echo '<input type="checkbox" id="del_mb_icon" name="del_mb_icon" value="1">삭제';
|
||||||
</td>
|
}
|
||||||
</tr>
|
?>
|
||||||
<tr>
|
</td>
|
||||||
<th scope="row"><label for="mb_icon">회원아이콘</label></th>
|
</tr>
|
||||||
<td colspan="3">
|
<tr>
|
||||||
<?php echo help('이미지 크기는 <strong>넓이 ' . $config['cf_member_icon_width'] . '픽셀 높이 ' . $config['cf_member_icon_height'] . '픽셀</strong>로 해주세요.') ?>
|
<th scope="row">메일 수신</th>
|
||||||
<input type="file" name="mb_icon" id="mb_icon">
|
<td>
|
||||||
<?php
|
<input type="radio" name="mb_mailling" value="1" id="mb_mailling_yes" <?php echo $mb_mailling_yes; ?>>
|
||||||
$mb_dir = substr(isset($mb['mb_id']) ? $mb['mb_id'] : '', 0, 2);
|
<label for="mb_mailling_yes">예</label>
|
||||||
$icon_file = G5_DATA_PATH . '/member/' . $mb_dir . '/' . get_mb_icon_name($mb['mb_id']) . '.gif';
|
<input type="radio" name="mb_mailling" value="0" id="mb_mailling_no" <?php echo $mb_mailling_no; ?>>
|
||||||
if (file_exists($icon_file)) {
|
<label for="mb_mailling_no">아니오</label>
|
||||||
$icon_url = str_replace(G5_DATA_PATH, G5_DATA_URL, $icon_file);
|
</td>
|
||||||
$icon_filemtile = (defined('G5_USE_MEMBER_IMAGE_FILETIME') && G5_USE_MEMBER_IMAGE_FILETIME) ? '?' . filemtime($icon_file) : '';
|
<th scope="row"><label for="mb_sms_yes">SMS 수신</label></th>
|
||||||
echo '<img src="' . $icon_url . $icon_filemtile . '" alt="">';
|
<td>
|
||||||
echo '<input type="checkbox" id="del_mb_icon" name="del_mb_icon" value="1">삭제';
|
<input type="radio" name="mb_sms" value="1" id="mb_sms_yes" <?php echo $mb_sms_yes; ?>>
|
||||||
}
|
<label for="mb_sms_yes">예</label>
|
||||||
?>
|
<input type="radio" name="mb_sms" value="0" id="mb_sms_no" <?php echo $mb_sms_no; ?>>
|
||||||
</td>
|
<label for="mb_sms_no">아니오</label>
|
||||||
</tr>
|
</td>
|
||||||
<tr>
|
</tr>
|
||||||
<th scope="row"><label for="mb_img">회원이미지</label></th>
|
<tr>
|
||||||
<td colspan="3">
|
<th scope="row">정보 공개</th>
|
||||||
<?php echo help('이미지 크기는 <strong>넓이 ' . $config['cf_member_img_width'] . '픽셀 높이 ' . $config['cf_member_img_height'] . '픽셀</strong>로 해주세요.') ?>
|
<td colspan="3">
|
||||||
<input type="file" name="mb_img" id="mb_img">
|
<input type="radio" name="mb_open" value="1" id="mb_open_yes" <?php echo $mb_open_yes; ?>>
|
||||||
<?php
|
<label for="mb_open_yes">예</label>
|
||||||
$mb_dir = substr(isset($mb['mb_id']) ? $mb['mb_id'] : '', 0, 2);
|
<input type="radio" name="mb_open" value="0" id="mb_open_no" <?php echo $mb_open_no; ?>>
|
||||||
$icon_file = G5_DATA_PATH . '/member_image/' . $mb_dir . '/' . get_mb_icon_name($mb['mb_id']) . '.gif';
|
<label for="mb_open_no">아니오</label>
|
||||||
if (file_exists($icon_file)) {
|
</td>
|
||||||
echo get_member_profile_img($mb['mb_id']);
|
</tr>
|
||||||
echo '<input type="checkbox" id="del_mb_img" name="del_mb_img" value="1">삭제';
|
<tr>
|
||||||
}
|
<th scope="row"><label for="mb_signature">서명</label></th>
|
||||||
?>
|
<td colspan="3"><textarea name="mb_signature" id="mb_signature"><?php echo $mb['mb_signature'] ?></textarea></td>
|
||||||
</td>
|
</tr>
|
||||||
</tr>
|
<tr>
|
||||||
<tr>
|
<th scope="row"><label for="mb_profile">자기 소개</label></th>
|
||||||
<th scope="row">광고성 이메일 수신</th>
|
<td colspan="3"><textarea name="mb_profile" id="mb_profile"><?php echo $mb['mb_profile'] ?></textarea></td>
|
||||||
<td>
|
</tr>
|
||||||
<input type="radio" name="mb_mailling" value="1" id="mb_mailling_yes" <?php echo $mb_mailling_yes; ?>>
|
<tr>
|
||||||
<label for="mb_mailling_yes">예</label>
|
<th scope="row"><label for="mb_memo">메모</label></th>
|
||||||
<input type="radio" name="mb_mailling" value="0" id="mb_mailling_no" <?php echo $mb_mailling_no; ?>>
|
<td colspan="3"><textarea name="mb_memo" id="mb_memo"><?php echo $mb['mb_memo'] ?></textarea></td>
|
||||||
<label for="mb_mailling_no">아니오</label>
|
</tr>
|
||||||
|
|
||||||
<?php if($w == "u" && $mb['mb_mailling_date'] != "0000-00-00 00:00:00"){
|
|
||||||
echo $mb['mb_mailling'] == 1 ? "<br>(동의 일자: ".$mb['mb_mailling_date'].")" : '';
|
|
||||||
} ?>
|
|
||||||
</td>
|
|
||||||
<th scope="row"><label for="mb_sms_yes">광고성 SMS/카카오톡 수신</label></th>
|
|
||||||
<td>
|
|
||||||
<input type="radio" name="mb_sms" value="1" id="mb_sms_yes" <?php echo $mb_sms_yes; ?>>
|
|
||||||
<label for="mb_sms_yes">예</label>
|
|
||||||
<input type="radio" name="mb_sms" value="0" id="mb_sms_no" <?php echo $mb_sms_no; ?>>
|
|
||||||
<label for="mb_sms_no">아니오</label>
|
|
||||||
<?php if($w == "u" && $mb['mb_sms_date'] != "0000-00-00 00:00:00"){
|
|
||||||
echo $mb['mb_sms'] == 1 ? "<br>(동의 일자: ".$mb['mb_sms_date'].")" : '';
|
|
||||||
} ?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th scope="row">마케팅 목적의<br>개인정보 수집 및 이용</th>
|
|
||||||
<td>
|
|
||||||
<input type="radio" name="mb_marketing_agree" value="1" id="mb_marketing_agree_yes" <?php echo $mb_marketing_agree_yes; ?>>
|
|
||||||
<label for="mb_marketing_agree_yes">예</label>
|
|
||||||
<input type="radio" name="mb_marketing_agree" value="0" id="mb_marketing_agree_no" <?php echo $mb_marketing_agree_no; ?>>
|
|
||||||
<label for="mb_marketing_agree_no">아니오</label>
|
|
||||||
|
|
||||||
<?php if($w == "u" && $mb['mb_marketing_date'] != "0000-00-00 00:00:00"){
|
|
||||||
echo $mb['mb_marketing_agree'] == 1 ? "<br>(동의 일자: ".$mb['mb_marketing_date'].")" : '';
|
|
||||||
} ?>
|
|
||||||
</td>
|
|
||||||
<th scope="row"><label for="mb_sms_yes">개인정보 제3자 제공</label></th>
|
|
||||||
<td>
|
|
||||||
<input type="radio" name="mb_thirdparty_agree" value="1" id="mb_thirdparty_agree_yes" <?php echo $mb_thirdparty_agree_yes; ?>>
|
|
||||||
<label for="mb_thirdparty_agree_yes">예</label>
|
|
||||||
<input type="radio" name="mb_thirdparty_agree" value="0" id="mb_thirdparty_agree_no" <?php echo $mb_thirdparty_agree_no; ?>>
|
|
||||||
<label for="mb_thirdparty_agree_no">아니오</label>
|
|
||||||
|
|
||||||
<?php if($w == "u" && $mb['mb_thirdparty_date'] != "0000-00-00 00:00:00"){
|
|
||||||
echo $mb['mb_thirdparty_agree'] == 1 ? "<br>(동의 일자: ".$mb['mb_thirdparty_date'].")" : '';
|
|
||||||
} ?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<?php if($w == "u"){?>
|
|
||||||
<tr>
|
|
||||||
<th scope="row">약관동의 변경내역</th>
|
|
||||||
<td colspan="3">
|
|
||||||
<section id="sodr_request_log_wrap" class="ad_agree_log">
|
|
||||||
<div>
|
|
||||||
<?php echo conv_content($mb['mb_agree_log'], 0); ?>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<?php } ?>
|
|
||||||
<tr>
|
|
||||||
<th scope="row">정보 공개</th>
|
|
||||||
<td colspan="3">
|
|
||||||
<input type="radio" name="mb_open" value="1" id="mb_open_yes" <?php echo $mb_open_yes; ?>>
|
|
||||||
<label for="mb_open_yes">예</label>
|
|
||||||
<input type="radio" name="mb_open" value="0" id="mb_open_no" <?php echo $mb_open_no; ?>>
|
|
||||||
<label for="mb_open_no">아니오</label>
|
|
||||||
<?php if($w == "u" && $mb['mb_open_date'] != "0000-00-00 00:00:00"){
|
|
||||||
echo $mb['mb_open'] == 1 ? "<br>(동의 일자: ".$mb['mb_open_date'].")" : '';
|
|
||||||
} ?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th scope="row"><label for="mb_signature">서명</label></th>
|
|
||||||
<td colspan="3"><textarea name="mb_signature" id="mb_signature"><?php echo html_purifier($mb['mb_signature']); ?></textarea></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th scope="row"><label for="mb_profile">자기 소개</label></th>
|
|
||||||
<td colspan="3"><textarea name="mb_profile" id="mb_profile"><?php echo html_purifier($mb['mb_profile']); ?></textarea></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th scope="row"><label for="mb_memo">메모</label></th>
|
|
||||||
<td colspan="3"><textarea name="mb_memo" id="mb_memo"><?php echo html_purifier($mb['mb_memo']); ?></textarea></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th scope="row"><label for="mb_cert_history">본인인증 내역</label></th>
|
|
||||||
<td colspan="3">
|
|
||||||
<?php
|
|
||||||
$cnt = 0;
|
|
||||||
while ($row = sql_fetch_array($mb_cert_history)) {
|
|
||||||
$cnt++;
|
|
||||||
$cert_type = '';
|
|
||||||
switch ($row['ch_type']) {
|
|
||||||
case 'simple':
|
|
||||||
$cert_type = '간편인증';
|
|
||||||
break;
|
|
||||||
case 'hp':
|
|
||||||
$cert_type = '휴대폰';
|
|
||||||
break;
|
|
||||||
case 'ipin':
|
|
||||||
$cert_type = '아이핀';
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<div>
|
|
||||||
[<?php echo $row['ch_datetime']; ?>]
|
|
||||||
<?php echo $row['mb_id']; ?> /
|
|
||||||
<?php echo $row['ch_name']; ?> /
|
|
||||||
<?php echo $row['ch_hp']; ?> /
|
|
||||||
<?php echo $cert_type; ?>
|
|
||||||
</div>
|
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
<?php if ($cnt == 0) { ?>
|
<?php if ($w == 'u') { ?>
|
||||||
본인인증 내역이 없습니다.
|
<tr>
|
||||||
<?php } ?>
|
<th scope="row">회원가입일</th>
|
||||||
<?php
|
<td><?php echo $mb['mb_datetime'] ?></td>
|
||||||
$has_certification_data = $cnt > 0 || !empty($mb['mb_dupinfo']) || !empty($mb['mb_certify'])
|
<th scope="row">최근접속일</th>
|
||||||
|| !empty($mb['mb_adult']) || !empty($mb['mb_birth']) || !empty($mb['mb_sex']);
|
<td><?php echo $mb['mb_today_login'] ?></td>
|
||||||
if ($w === 'u' && !$has_certification_data) {
|
</tr>
|
||||||
$cert_request = sql_fetch("select count(*) as cnt from {$g5['cert_history_table']} where mb_id = '".sql_real_escape_string($mb['mb_id'])."'");
|
<tr>
|
||||||
$has_certification_data = !empty($cert_request['cnt']);
|
<th scope="row">IP</th>
|
||||||
}
|
<td colspan="3"><?php echo $mb['mb_ip'] ?></td>
|
||||||
$can_cleanup_certification = $w === 'u' && $has_certification_data
|
</tr>
|
||||||
&& ($is_admin === 'super' || (isset($auth[$sub_menu]) && strpos($auth[$sub_menu], 'd') !== false));
|
<?php if ($config['cf_use_email_certify']) { ?>
|
||||||
?>
|
<tr>
|
||||||
<?php if ($can_cleanup_certification) { ?>
|
<th scope="row">인증일시</th>
|
||||||
<p>본인확인 ‘아니오’는 인증 상태만 변경합니다. 정보 삭제는 CI/DI 관련 식별값, 본인확인·성인인증 상태, 생년월일·성별 및 본인인증 내역을 삭제합니다. 회원 이름과 연락처는 유지합니다.</p>
|
<td colspan="3">
|
||||||
<button type="submit" form="fmembercertcleanup" class="btn btn_02">본인확인 정보 삭제</button>
|
<?php if ($mb['mb_email_certify'] == '0000-00-00 00:00:00') { ?>
|
||||||
<?php } ?>
|
<?php echo help('회원님이 메일을 수신할 수 없는 경우 등에 직접 인증처리를 하실 수 있습니다.') ?>
|
||||||
</td>
|
<input type="checkbox" name="passive_certify" id="passive_certify">
|
||||||
</tr>
|
<label for="passive_certify">수동인증</label>
|
||||||
|
<?php } else { ?>
|
||||||
|
<?php echo $mb['mb_email_certify'] ?>
|
||||||
|
<?php } ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php } ?>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
<?php if ($w == 'u') { ?>
|
<?php if ($config['cf_use_recommend']) { // 추천인 사용 ?>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">회원가입일</th>
|
<th scope="row">추천인</th>
|
||||||
<td><?php echo $mb['mb_datetime'] ?></td>
|
<td colspan="3"><?php echo ($mb['mb_recommend'] ? get_text($mb['mb_recommend']) : '없음'); // 081022 : CSRF 보안 결함으로 인한 코드 수정 ?></td>
|
||||||
<th scope="row">최근접속일</th>
|
</tr>
|
||||||
<td><?php echo $mb['mb_today_login'] ?></td>
|
<?php } ?>
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th scope="row">IP</th>
|
|
||||||
<td colspan="3"><?php echo $mb['mb_ip'] ?></td>
|
|
||||||
</tr>
|
|
||||||
<?php if ($config['cf_use_email_certify']) { ?>
|
|
||||||
<tr>
|
|
||||||
<th scope="row">인증일시</th>
|
|
||||||
<td colspan="3">
|
|
||||||
<?php if ($mb['mb_email_certify'] == '0000-00-00 00:00:00') { ?>
|
|
||||||
<?php echo help('회원님이 메일을 수신할 수 없는 경우 등에 직접 인증처리를 하실 수 있습니다.') ?>
|
|
||||||
<input type="checkbox" name="passive_certify" id="passive_certify">
|
|
||||||
<label for="passive_certify">수동인증</label>
|
|
||||||
<?php } else { ?>
|
|
||||||
<?php echo $mb['mb_email_certify'] ?>
|
|
||||||
<?php } ?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<?php } ?>
|
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
<?php if ($config['cf_use_recommend']) { // 추천인 사용 ?>
|
<tr>
|
||||||
<tr>
|
<th scope="row"><label for="mb_leave_date">탈퇴일자</label></th>
|
||||||
<th scope="row">추천인</th>
|
<td>
|
||||||
<td colspan="3"><?php echo ((isset($mb['mb_recommend']) && $mb['mb_recommend']) ? get_text($mb['mb_recommend']) : '없음'); // 081022 : CSRF 보안 결함으로 인한 코드 수정 ?></td>
|
<input type="text" name="mb_leave_date" value="<?php echo $mb['mb_leave_date'] ?>" id="mb_leave_date" class="frm_input" maxlength="8">
|
||||||
</tr>
|
<input type="checkbox" value="<?php echo date("Ymd"); ?>" id="mb_leave_date_set_today" onclick="if (this.form.mb_leave_date.value==this.form.mb_leave_date.defaultValue) {
|
||||||
<?php } ?>
|
this.form.mb_leave_date.value=this.value; } else { this.form.mb_leave_date.value=this.form.mb_leave_date.defaultValue; }">
|
||||||
|
<label for="mb_leave_date_set_today">탈퇴일을 오늘로 지정</label>
|
||||||
|
</td>
|
||||||
|
<th scope="row">접근차단일자</th>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="mb_intercept_date" value="<?php echo $mb['mb_intercept_date'] ?>" id="mb_intercept_date" class="frm_input" maxlength="8">
|
||||||
|
<input type="checkbox" value="<?php echo date("Ymd"); ?>" id="mb_intercept_date_set_today" onclick="if
|
||||||
|
(this.form.mb_intercept_date.value==this.form.mb_intercept_date.defaultValue) { this.form.mb_intercept_date.value=this.value; } else {
|
||||||
|
this.form.mb_intercept_date.value=this.form.mb_intercept_date.defaultValue; }">
|
||||||
|
<label for="mb_intercept_date_set_today">접근차단일을 오늘로 지정</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<?php
|
||||||
<th scope="row"><label for="mb_leave_date">탈퇴일자</label></th>
|
//소셜계정이 있다면
|
||||||
<td>
|
if(function_exists('social_login_link_account') && $mb['mb_id'] ){
|
||||||
<input type="text" name="mb_leave_date" value="<?php echo $mb['mb_leave_date'] ?>" id="mb_leave_date" class="frm_input" maxlength="8">
|
if( $my_social_accounts = social_login_link_account($mb['mb_id'], false, 'get_data') ){ ?>
|
||||||
<input type="checkbox" value="<?php echo date("Ymd"); ?>" id="mb_leave_date_set_today" onclick="if (this.form.mb_leave_date.value==this.form.mb_leave_date.defaultValue) { this.form.mb_leave_date.value=this.value; } else { this.form.mb_leave_date.value=this.form.mb_leave_date.defaultValue; }">
|
|
||||||
<label for="mb_leave_date_set_today">탈퇴일을 오늘로 지정</label>
|
|
||||||
</td>
|
|
||||||
<th scope="row">접근차단일자</th>
|
|
||||||
<td>
|
|
||||||
<input type="text" name="mb_intercept_date" value="<?php echo $mb['mb_intercept_date'] ?>" id="mb_intercept_date" class="frm_input" maxlength="8">
|
|
||||||
<input type="checkbox" value="<?php echo date("Ymd"); ?>" id="mb_intercept_date_set_today" onclick="if (this.form.mb_intercept_date.value==this.form.mb_intercept_date.defaultValue) { this.form.mb_intercept_date.value=this.value; } else { this.form.mb_intercept_date.value=this.form.mb_intercept_date.defaultValue; }">
|
|
||||||
<label for="mb_intercept_date_set_today">접근차단일을 오늘로 지정</label>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<?php
|
<tr>
|
||||||
//소셜계정이 있다면
|
<th>소셜계정목록</th>
|
||||||
if (function_exists('social_login_link_account') && $mb['mb_id']) {
|
<td colspan="3">
|
||||||
if ($my_social_accounts = social_login_link_account($mb['mb_id'], false, 'get_data')) { ?>
|
<ul class="social_link_box">
|
||||||
<tr>
|
<li class="social_login_container">
|
||||||
<th>소셜계정목록</th>
|
<h4>연결된 소셜 계정 목록</h4>
|
||||||
<td colspan="3">
|
<?php foreach($my_social_accounts as $account){ //반복문
|
||||||
<ul class="social_link_box">
|
if( empty($account) ) continue;
|
||||||
<li class="social_login_container">
|
|
||||||
<h4>연결된 소셜 계정 목록</h4>
|
|
||||||
<?php foreach ($my_social_accounts as $account) { //반복문
|
|
||||||
if (empty($account)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
$provider = strtolower($account['provider']);
|
$provider = strtolower($account['provider']);
|
||||||
$provider_name = social_get_provider_service_name($provider);
|
$provider_name = social_get_provider_service_name($provider);
|
||||||
?>
|
|
||||||
<div class="account_provider" data-mpno="social_<?php echo $account['mp_no']; ?>">
|
|
||||||
<div class="sns-wrap-32 sns-wrap-over">
|
|
||||||
<span class="sns-icon sns-<?php echo $provider; ?>" title="<?php echo $provider_name; ?>">
|
|
||||||
<span class="ico"></span>
|
|
||||||
<span class="txt"><?php echo $provider_name; ?></span>
|
|
||||||
</span>
|
|
||||||
|
|
||||||
<span class="provider_name"><?php echo $provider_name; //서비스이름 ?> ( <?php echo $account['displayname']; ?> )</span>
|
|
||||||
<span class="account_hidden" style="display:none"><?php echo $account['mb_id']; ?></span>
|
|
||||||
</div>
|
|
||||||
<div class="btn_info"><a href="<?php echo G5_SOCIAL_LOGIN_URL . '/unlink.php?mp_no=' . $account['mp_no'] ?>" class="social_unlink" data-provider="<?php echo $account['mp_no']; ?>">연동해제</a> <span class="sound_only"><?php echo substr(isset($account['mp_register_day']) ? $account['mp_register_day'] : '', 2, 14); ?></span></div>
|
|
||||||
</div>
|
|
||||||
<?php } //end foreach ?>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<script>
|
|
||||||
jQuery(function($) {
|
|
||||||
$(".account_provider").on("click", ".social_unlink", function(e) {
|
|
||||||
e.preventDefault();
|
|
||||||
|
|
||||||
if (!confirm('정말 이 계정 연결을 삭제하시겠습니까?')) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
var ajax_url = "<?php echo G5_SOCIAL_LOGIN_URL . '/unlink.php' ?>";
|
|
||||||
var mb_id = '',
|
|
||||||
mp_no = $(this).attr("data-provider"),
|
|
||||||
$mp_el = $(this).parents(".account_provider");
|
|
||||||
|
|
||||||
mb_id = $mp_el.find(".account_hidden").text();
|
|
||||||
|
|
||||||
if (!mp_no) {
|
|
||||||
alert('잘못된 요청! mp_no 값이 없습니다.');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$.ajax({
|
|
||||||
url: ajax_url,
|
|
||||||
type: 'POST',
|
|
||||||
data: {
|
|
||||||
'mp_no': mp_no,
|
|
||||||
'mb_id': mb_id
|
|
||||||
},
|
|
||||||
dataType: 'json',
|
|
||||||
async: false,
|
|
||||||
success: function(data, textStatus) {
|
|
||||||
if (data.error) {
|
|
||||||
alert(data.error);
|
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
alert("연결이 해제 되었습니다.");
|
|
||||||
$mp_el.fadeOut("normal", function() {
|
|
||||||
$(this).remove();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
} //end if
|
|
||||||
} //end if
|
|
||||||
|
|
||||||
run_event('admin_member_form_add', $mb, $w, 'table');
|
|
||||||
?>
|
?>
|
||||||
|
<div class="account_provider" data-mpno="social_<?php echo $account['mp_no'];?>" >
|
||||||
|
<div class="sns-wrap-32 sns-wrap-over">
|
||||||
|
<span class="sns-icon sns-<?php echo $provider; ?>" title="<?php echo $provider_name; ?>">
|
||||||
|
<span class="ico"></span>
|
||||||
|
<span class="txt"><?php echo $provider_name; ?></span>
|
||||||
|
</span>
|
||||||
|
|
||||||
<?php for ($i = 1; $i <= 10; $i++) { ?>
|
<span class="provider_name"><?php echo $provider_name; //서비스이름?> ( <?php echo $account['displayname']; ?> )</span>
|
||||||
<tr>
|
<span class="account_hidden" style="display:none"><?php echo $account['mb_id']; ?></span>
|
||||||
<th scope="row"><label for="mb_<?php echo $i ?>">여분 필드 <?php echo $i ?></label></th>
|
</div>
|
||||||
<td colspan="3"><input type="text" name="mb_<?php echo $i ?>" value="<?php echo get_sanitize_input($mb['mb_' . $i]); ?>" id="mb_<?php echo $i ?>" class="frm_input" size="30" maxlength="255"></td>
|
<div class="btn_info"><a href="<?php echo G5_SOCIAL_LOGIN_URL.'/unlink.php?mp_no='.$account['mp_no'] ?>" class="social_unlink" data-provider="<?php echo $account['mp_no'];?>" >연동해제</a> <span class="sound_only"><?php echo substr($account['mp_register_day'], 2, 14); ?></span></div>
|
||||||
</tr>
|
</div>
|
||||||
<?php } ?>
|
<?php } //end foreach ?>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<script>
|
||||||
|
jQuery(function($){
|
||||||
|
$(".account_provider").on("click", ".social_unlink", function(e){
|
||||||
|
e.preventDefault();
|
||||||
|
|
||||||
</tbody>
|
if (!confirm('정말 이 계정 연결을 삭제하시겠습니까?')) {
|
||||||
</table>
|
return false;
|
||||||
</div>
|
}
|
||||||
|
|
||||||
<div class="btn_fixed_top">
|
var ajax_url = "<?php echo G5_SOCIAL_LOGIN_URL.'/unlink.php' ?>";
|
||||||
<a href="./member_list.php?<?php echo $qstr ?>" class="btn btn_02">목록</a>
|
var mb_id = '',
|
||||||
<input type="submit" value="확인" class="btn_submit btn" accesskey='s'>
|
mp_no = $(this).attr("data-provider"),
|
||||||
</div>
|
$mp_el = $(this).parents(".account_provider");
|
||||||
|
|
||||||
|
mb_id = $mp_el.find(".account_hidden").text();
|
||||||
|
|
||||||
|
if( ! mp_no ){
|
||||||
|
alert('잘못된 요청! mp_no 값이 없습니다.');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
url: ajax_url,
|
||||||
|
type: 'POST',
|
||||||
|
data: {
|
||||||
|
'mp_no': mp_no,
|
||||||
|
'mb_id': mb_id
|
||||||
|
},
|
||||||
|
dataType: 'json',
|
||||||
|
async: false,
|
||||||
|
success: function(data, textStatus) {
|
||||||
|
if (data.error) {
|
||||||
|
alert(data.error);
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
alert("연결이 해제 되었습니다.");
|
||||||
|
$mp_el.fadeOut("normal", function() {
|
||||||
|
$(this).remove();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
} //end if
|
||||||
|
} //end if
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php for ($i=1; $i<=10; $i++) { ?>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="mb_<?php echo $i ?>">여분 필드 <?php echo $i ?></label></th>
|
||||||
|
<td colspan="3"><input type="text" name="mb_<?php echo $i ?>" value="<?php echo $mb['mb_'.$i] ?>" id="mb_<?php echo $i ?>" class="frm_input" size="30" maxlength="255"></td>
|
||||||
|
</tr>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="btn_fixed_top">
|
||||||
|
<a href="./member_list.php?<?php echo $qstr ?>" class="btn btn_02">목록</a>
|
||||||
|
<input type="submit" value="확인" class="btn_submit btn" accesskey='s'>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<?php if ($can_cleanup_certification) { ?>
|
|
||||||
<form id="fmembercertcleanup" method="post" action="./member_cert_cleanup.php" onsubmit="return confirm('본인확인 정보와 인증 내역을 삭제하시겠습니까? 삭제 후 복구할 수 없으며, 회원정보의 다른 수정사항은 저장하지 않습니다.');">
|
|
||||||
<input type="hidden" name="mb_id" value="<?php echo get_text($mb['mb_id']); ?>">
|
|
||||||
<input type="hidden" name="token" value="">
|
|
||||||
</form>
|
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function fmember_submit(f) {
|
function fmember_submit(f)
|
||||||
if (!f.mb_icon.value.match(/\.(gif|jpe?g|png)$/i) && f.mb_icon.value) {
|
{
|
||||||
alert('아이콘은 이미지 파일만 가능합니다.');
|
if (!f.mb_icon.value.match(/\.gif$/i) && f.mb_icon.value) {
|
||||||
return false;
|
alert('아이콘은 gif 파일만 가능합니다.');
|
||||||
}
|
return false;
|
||||||
|
|
||||||
if (!f.mb_img.value.match(/\.(gif|jpe?g|png)$/i) && f.mb_img.value) {
|
|
||||||
alert('회원이미지는 이미지 파일만 가능합니다.');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if( jQuery("#mb_password").val() ){
|
|
||||||
<?php echo $captcha_js; // 캡챠 사용시 자바스크립트에서 입력된 캡챠를 검사함 ?>
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
jQuery(function($){
|
return true;
|
||||||
$("#captcha_key").prop('required', false).removeAttr("required").removeClass("required");
|
}
|
||||||
|
|
||||||
$("#mb_password").on("keyup", function(e) {
|
|
||||||
var $warp = $("#mb_password_captcha_wrap"),
|
|
||||||
tooptipid = "mp_captcha_tooltip",
|
|
||||||
$span_text = $("<span>", {id:tooptipid, style:"font-size:0.95em;letter-spacing:-0.1em"}).html("비밀번호를 수정할 경우 캡챠를 입력해야 합니다."),
|
|
||||||
$parent = $(this).parent(),
|
|
||||||
is_invisible_recaptcha = $("#captcha").hasClass("invisible_recaptcha");
|
|
||||||
|
|
||||||
if($(this).val()){
|
|
||||||
$warp.show();
|
|
||||||
if(! is_invisible_recaptcha) {
|
|
||||||
$warp.css("margin-top","1em");
|
|
||||||
if(! $("#"+tooptipid).length){ $parent.append($span_text) }
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$warp.hide();
|
|
||||||
if($("#"+tooptipid).length && ! is_invisible_recaptcha){ $parent.find("#"+tooptipid).remove(); }
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
<?php
|
|
||||||
run_event('admin_member_form_after', $mb, $w);
|
|
||||||
|
|
||||||
require_once './admin.tail.php';
|
<?php
|
||||||
|
include_once('./admin.tail.php');
|
||||||
|
?>
|
||||||
|
|||||||
+97
-325
@@ -1,397 +1,169 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "200100";
|
$sub_menu = "200100";
|
||||||
require_once "./_common.php";
|
include_once("./_common.php");
|
||||||
require_once G5_LIB_PATH . "/register.lib.php";
|
include_once(G5_LIB_PATH."/register.lib.php");
|
||||||
require_once G5_LIB_PATH . '/thumbnail.lib.php';
|
|
||||||
|
|
||||||
if ($w == 'u') {
|
if ($w == 'u')
|
||||||
check_demo();
|
check_demo();
|
||||||
}
|
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, 'w');
|
auth_check($auth[$sub_menu], 'w');
|
||||||
|
|
||||||
check_admin_token();
|
check_admin_token();
|
||||||
|
|
||||||
$mb_id = isset($_POST['mb_id']) ? trim($_POST['mb_id']) : '';
|
$mb_id = trim($_POST['mb_id']);
|
||||||
$mb_password = isset($_POST['mb_password']) ? trim($_POST['mb_password']) : '';
|
|
||||||
$mb_certify_case = isset($_POST['mb_certify_case']) ? preg_replace('/[^0-9a-z_]/i', '', $_POST['mb_certify_case']) : '';
|
|
||||||
$mb_certify = isset($_POST['mb_certify']) ? preg_replace('/[^0-9a-z_]/i', '', $_POST['mb_certify']) : '';
|
|
||||||
$mb_zip = isset($_POST['mb_zip']) ? preg_replace('/[^0-9a-z_]/i', '', $_POST['mb_zip']) : '';
|
|
||||||
|
|
||||||
// 광고성 정보 수신
|
|
||||||
$mb_marketing_agree = isset($_POST['mb_marketing_agree']) ? addslashes(clean_xss_tags(stripslashes($_POST['mb_marketing_agree']), 1, 1)) : '0';
|
|
||||||
$mb_thirdparty_agree = isset($_POST['mb_thirdparty_agree']) ? addslashes(clean_xss_tags(stripslashes($_POST['mb_thirdparty_agree']), 1, 1)) : '0';
|
|
||||||
|
|
||||||
// 관리자가 자동등록방지를 사용해야 할 경우 ( 회원의 비밀번호 변경시 캡챠를 체크한다 )
|
|
||||||
if ($mb_password) {
|
|
||||||
include_once(G5_CAPTCHA_PATH . '/captcha.lib.php');
|
|
||||||
|
|
||||||
if (!chk_captcha()) {
|
|
||||||
alert('자동등록방지 숫자가 틀렸습니다.');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 휴대폰번호 체크
|
// 휴대폰번호 체크
|
||||||
$mb_hp = hyphen_hp_number($_POST['mb_hp']);
|
$mb_hp = hyphen_hp_number($_POST['mb_hp']);
|
||||||
if ($mb_hp) {
|
if($mb_hp) {
|
||||||
$result = exist_mb_hp($mb_hp, $mb_id);
|
$result = exist_mb_hp($mb_hp, $mb_id);
|
||||||
if ($result) {
|
if ($result)
|
||||||
alert($result);
|
alert($result);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 인증정보처리
|
// 인증정보처리
|
||||||
if ($mb_certify_case && $mb_certify) {
|
if($_POST['mb_certify_case'] && $_POST['mb_certify']) {
|
||||||
$mb_certify = isset($_POST['mb_certify_case']) ? preg_replace('/[^0-9a-z_]/i', '', (string)$_POST['mb_certify_case']) : '';
|
$mb_certify = $_POST['mb_certify_case'];
|
||||||
$mb_adult = isset($_POST['mb_adult']) ? preg_replace('/[^0-9a-z_]/i', '', (string)$_POST['mb_adult']) : '';
|
$mb_adult = $_POST['mb_adult'];
|
||||||
} else {
|
} else {
|
||||||
$mb_certify = '';
|
$mb_certify = '';
|
||||||
$mb_adult = 0;
|
$mb_adult = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$mb_zip1 = substr($mb_zip, 0, 3);
|
$mb_zip1 = substr($_POST['mb_zip'], 0, 3);
|
||||||
$mb_zip2 = substr($mb_zip, 3);
|
$mb_zip2 = substr($_POST['mb_zip'], 3);
|
||||||
|
|
||||||
$mb_email = isset($_POST['mb_email']) ? get_email_address(trim($_POST['mb_email'])) : '';
|
$sql_common = " mb_name = '{$_POST['mb_name']}',
|
||||||
$mb_nick = isset($_POST['mb_nick']) ? trim(strip_tags($_POST['mb_nick'])) : '';
|
mb_nick = '{$_POST['mb_nick']}',
|
||||||
|
mb_email = '{$_POST['mb_email']}',
|
||||||
if ($msg = valid_mb_nick($mb_nick)) {
|
mb_homepage = '{$_POST['mb_homepage']}',
|
||||||
alert($msg, "", true, true);
|
mb_tel = '{$_POST['mb_tel']}',
|
||||||
}
|
|
||||||
|
|
||||||
$posts = array();
|
|
||||||
$check_keys = array(
|
|
||||||
'mb_name',
|
|
||||||
'mb_homepage',
|
|
||||||
'mb_tel',
|
|
||||||
'mb_addr1',
|
|
||||||
'mb_addr2',
|
|
||||||
'mb_addr3',
|
|
||||||
'mb_addr_jibeon',
|
|
||||||
'mb_signature',
|
|
||||||
'mb_leave_date',
|
|
||||||
'mb_intercept_date',
|
|
||||||
'mb_mailling',
|
|
||||||
'mb_sms',
|
|
||||||
'mb_open',
|
|
||||||
'mb_profile',
|
|
||||||
'mb_level'
|
|
||||||
);
|
|
||||||
|
|
||||||
for ($i = 1; $i <= 10; $i++) {
|
|
||||||
$check_keys[] = 'mb_' . $i;
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach ($check_keys as $key) {
|
|
||||||
if( in_array($key, array('mb_signature', 'mb_profile')) ){
|
|
||||||
$posts[$key] = isset($_POST[$key]) ? addslashes(clean_xss_tags(stripslashes($_POST[$key]), 1, 1, 0, 0)) : '';
|
|
||||||
} else {
|
|
||||||
$posts[$key] = isset($_POST[$key]) ? addslashes(clean_xss_tags(stripslashes($_POST[$key]), 1, 1)) : '';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$sql_common = " mb_name = '{$posts['mb_name']}',
|
|
||||||
mb_nick = '{$mb_nick}',
|
|
||||||
mb_email = '{$mb_email}',
|
|
||||||
mb_homepage = '{$posts['mb_homepage']}',
|
|
||||||
mb_tel = '{$posts['mb_tel']}',
|
|
||||||
mb_hp = '{$mb_hp}',
|
mb_hp = '{$mb_hp}',
|
||||||
mb_certify = '{$mb_certify}',
|
mb_certify = '{$mb_certify}',
|
||||||
mb_adult = '{$mb_adult}',
|
mb_adult = '{$mb_adult}',
|
||||||
mb_zip1 = '$mb_zip1',
|
mb_zip1 = '$mb_zip1',
|
||||||
mb_zip2 = '$mb_zip2',
|
mb_zip2 = '$mb_zip2',
|
||||||
mb_addr1 = '{$posts['mb_addr1']}',
|
mb_addr1 = '{$_POST['mb_addr1']}',
|
||||||
mb_addr2 = '{$posts['mb_addr2']}',
|
mb_addr2 = '{$_POST['mb_addr2']}',
|
||||||
mb_addr3 = '{$posts['mb_addr3']}',
|
mb_addr3 = '{$_POST['mb_addr3']}',
|
||||||
mb_addr_jibeon = '{$posts['mb_addr_jibeon']}',
|
mb_addr_jibeon = '{$_POST['mb_addr_jibeon']}',
|
||||||
mb_signature = '{$posts['mb_signature']}',
|
mb_signature = '{$_POST['mb_signature']}',
|
||||||
mb_leave_date = '{$posts['mb_leave_date']}',
|
mb_leave_date = '{$_POST['mb_leave_date']}',
|
||||||
mb_intercept_date='{$posts['mb_intercept_date']}',
|
mb_intercept_date='{$_POST['mb_intercept_date']}',
|
||||||
mb_memo = '{$mb_memo}',
|
mb_memo = '{$_POST['mb_memo']}',
|
||||||
mb_mailling = '{$posts['mb_mailling']}',
|
mb_mailling = '{$_POST['mb_mailling']}',
|
||||||
mb_sms = '{$posts['mb_sms']}',
|
mb_sms = '{$_POST['mb_sms']}',
|
||||||
mb_open = '{$posts['mb_open']}',
|
mb_open = '{$_POST['mb_open']}',
|
||||||
mb_open_date = '".G5_TIME_YMDHIS."',
|
mb_profile = '{$_POST['mb_profile']}',
|
||||||
mb_profile = '{$posts['mb_profile']}',
|
mb_level = '{$_POST['mb_level']}',
|
||||||
mb_level = '{$posts['mb_level']}',
|
mb_1 = '{$_POST['mb_1']}',
|
||||||
mb_marketing_agree = '{$mb_marketing_agree}',
|
mb_2 = '{$_POST['mb_2']}',
|
||||||
mb_thirdparty_agree = '{$mb_thirdparty_agree}',
|
mb_3 = '{$_POST['mb_3']}',
|
||||||
mb_1 = '{$posts['mb_1']}',
|
mb_4 = '{$_POST['mb_4']}',
|
||||||
mb_2 = '{$posts['mb_2']}',
|
mb_5 = '{$_POST['mb_5']}',
|
||||||
mb_3 = '{$posts['mb_3']}',
|
mb_6 = '{$_POST['mb_6']}',
|
||||||
mb_4 = '{$posts['mb_4']}',
|
mb_7 = '{$_POST['mb_7']}',
|
||||||
mb_5 = '{$posts['mb_5']}',
|
mb_8 = '{$_POST['mb_8']}',
|
||||||
mb_6 = '{$posts['mb_6']}',
|
mb_9 = '{$_POST['mb_9']}',
|
||||||
mb_7 = '{$posts['mb_7']}',
|
mb_10 = '{$_POST['mb_10']}' ";
|
||||||
mb_8 = '{$posts['mb_8']}',
|
|
||||||
mb_9 = '{$posts['mb_9']}',
|
|
||||||
mb_10 = '{$posts['mb_10']}' ";
|
|
||||||
|
|
||||||
// 부여하려는 mb_level 상한 검증 (자기보다 높은 권한 부여 차단)
|
if ($w == '')
|
||||||
if ($is_admin !== 'super' && (int) $posts['mb_level'] >= (int) $member['mb_level']) {
|
{
|
||||||
alert('자신보다 권한이 높거나 같은 등급은 부여할 수 없습니다.');
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($w == '') {
|
|
||||||
$mb = get_member($mb_id);
|
$mb = get_member($mb_id);
|
||||||
if (isset($mb['mb_id']) && $mb['mb_id']) {
|
if ($mb['mb_id'])
|
||||||
alert('이미 존재하는 회원아이디입니다.\\nID : ' . $mb['mb_id'] . '\\n이름 : ' . $mb['mb_name'] . '\\n닉네임 : ' . $mb['mb_nick'] . '\\n메일 : ' . $mb['mb_email']);
|
alert('이미 존재하는 회원아이디입니다.\\nID : '.$mb['mb_id'].'\\n이름 : '.$mb['mb_name'].'\\n닉네임 : '.$mb['mb_nick'].'\\n메일 : '.$mb['mb_email']);
|
||||||
}
|
|
||||||
|
|
||||||
// 닉네임중복체크
|
// 닉네임중복체크
|
||||||
$sql = " select mb_id, mb_name, mb_nick, mb_email from {$g5['member_table']} where mb_nick = '{$mb_nick}' ";
|
$sql = " select mb_id, mb_name, mb_nick, mb_email from {$g5['member_table']} where mb_nick = '{$_POST['mb_nick']}' ";
|
||||||
$row = sql_fetch($sql);
|
$row = sql_fetch($sql);
|
||||||
if (isset($row['mb_id']) && $row['mb_id']) {
|
if ($row['mb_id'])
|
||||||
alert('이미 존재하는 닉네임입니다.\\nID : ' . $row['mb_id'] . '\\n이름 : ' . $row['mb_name'] . '\\n닉네임 : ' . $row['mb_nick'] . '\\n메일 : ' . $row['mb_email']);
|
alert('이미 존재하는 닉네임입니다.\\nID : '.$row['mb_id'].'\\n이름 : '.$row['mb_name'].'\\n닉네임 : '.$row['mb_nick'].'\\n메일 : '.$row['mb_email']);
|
||||||
}
|
|
||||||
|
|
||||||
// 이메일중복체크
|
// 이메일중복체크
|
||||||
$sql = " select mb_id, mb_name, mb_nick, mb_email from {$g5['member_table']} where mb_email = '{$mb_email}' ";
|
$sql = " select mb_id, mb_name, mb_nick, mb_email from {$g5['member_table']} where mb_email = '{$_POST['mb_email']}' ";
|
||||||
$row = sql_fetch($sql);
|
$row = sql_fetch($sql);
|
||||||
if (isset($row['mb_id']) && $row['mb_id']) {
|
if ($row['mb_id'])
|
||||||
alert('이미 존재하는 이메일입니다.\\nID : ' . $row['mb_id'] . '\\n이름 : ' . $row['mb_name'] . '\\n닉네임 : ' . $row['mb_nick'] . '\\n메일 : ' . $row['mb_email']);
|
alert('이미 존재하는 이메일입니다.\\nID : '.$row['mb_id'].'\\n이름 : '.$row['mb_name'].'\\n닉네임 : '.$row['mb_nick'].'\\n메일 : '.$row['mb_email']);
|
||||||
}
|
|
||||||
|
|
||||||
$agree_items = array();
|
sql_query(" insert into {$g5['member_table']} set mb_id = '{$mb_id}', mb_password = '".get_encrypt_string($mb_password)."', mb_datetime = '".G5_TIME_YMDHIS."', mb_ip = '{$_SERVER['REMOTE_ADDR']}', mb_email_certify = '".G5_TIME_YMDHIS."', {$sql_common} ");
|
||||||
// 마케팅 목적의 개인정보 수집 및 이용
|
}
|
||||||
if ($mb_marketing_agree == 1) {
|
else if ($w == 'u')
|
||||||
$sql_common .= " , mb_marketing_date = '".G5_TIME_YMDHIS."' ";
|
{
|
||||||
$agree_items[] = "마케팅 목적의 개인정보 수집 및 이용(동의)";
|
|
||||||
}
|
|
||||||
|
|
||||||
// 광고성 이메일 수신
|
|
||||||
if ($mb_mailling == 1) {
|
|
||||||
$sql_common .= " , mb_mailling_date = '".G5_TIME_YMDHIS."' ";
|
|
||||||
$agree_items[] = "광고성 이메일 수신(동의)";
|
|
||||||
}
|
|
||||||
|
|
||||||
// 광고성 SMS/카카오톡 수신
|
|
||||||
if ($mb_sms == 1) {
|
|
||||||
$sql_common .= " , mb_sms_date = '".G5_TIME_YMDHIS."' ";
|
|
||||||
$agree_items[] = "광고성 SMS/카카오톡 수신(동의)";
|
|
||||||
}
|
|
||||||
|
|
||||||
// 개인정보 제3자 제공
|
|
||||||
if ($mb_thirdparty_agree == 1) {
|
|
||||||
$sql_common .= " , mb_thirdparty_date = '".G5_TIME_YMDHIS."' ";
|
|
||||||
$agree_items[] = "개인정보 제3자 제공(동의)";
|
|
||||||
}
|
|
||||||
|
|
||||||
// 동의 로그 추가
|
|
||||||
if (!empty($agree_items)) {
|
|
||||||
$agree_log = "[".G5_TIME_YMDHIS.", 관리자 회원추가] " . implode(' | ', $agree_items) . "\n";
|
|
||||||
$sql_common .= " , mb_agree_log = CONCAT('{$agree_log}', IFNULL(mb_agree_log, ''))";
|
|
||||||
}
|
|
||||||
sql_query(" insert into {$g5['member_table']} set mb_id = '{$mb_id}', mb_password = '" . get_encrypt_string($mb_password) . "', mb_datetime = '" . G5_TIME_YMDHIS . "', mb_ip = '{$_SERVER['REMOTE_ADDR']}', mb_email_certify = '" . G5_TIME_YMDHIS . "', {$sql_common} ");
|
|
||||||
} elseif ($w == 'u') {
|
|
||||||
$mb = get_member($mb_id);
|
$mb = get_member($mb_id);
|
||||||
if (!(isset($mb['mb_id']) && $mb['mb_id'])) {
|
if (!$mb['mb_id'])
|
||||||
alert('존재하지 않는 회원자료입니다.');
|
alert('존재하지 않는 회원자료입니다.');
|
||||||
}
|
|
||||||
|
|
||||||
if ($is_admin != 'super' && $mb['mb_level'] >= $member['mb_level']) {
|
if ($is_admin != 'super' && $mb['mb_level'] >= $member['mb_level'])
|
||||||
alert('자신보다 권한이 높거나 같은 회원은 수정할 수 없습니다.');
|
alert('자신보다 권한이 높거나 같은 회원은 수정할 수 없습니다.');
|
||||||
}
|
|
||||||
|
|
||||||
if ($is_admin !== 'super' && is_admin($mb['mb_id']) === 'super') {
|
if ($is_admin !== 'super' && is_admin($mb['mb_id']) === 'super' ) {
|
||||||
alert('최고관리자의 비밀번호를 수정할수 없습니다.');
|
alert('최고관리자의 비밀번호를 수정할수 없습니다.');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($mb_id === $member['mb_id'] && $_POST['mb_level'] != $mb['mb_level']) {
|
if ($_POST['mb_id'] == $member['mb_id'] && $_POST['mb_level'] != $mb['mb_level'])
|
||||||
alert($mb['mb_id'] . ' : 로그인 중인 관리자 레벨은 수정할 수 없습니다.');
|
alert($mb['mb_id'].' : 로그인 중인 관리자 레벨은 수정 할 수 없습니다.');
|
||||||
}
|
|
||||||
|
|
||||||
if ($posts['mb_leave_date'] || $posts['mb_intercept_date']){
|
|
||||||
if ($member['mb_id'] === $mb['mb_id'] || is_admin($mb['mb_id']) === 'super'){
|
|
||||||
alert('해당 관리자의 탈퇴 일자 또는 접근 차단 일자를 수정할 수 없습니다.');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 닉네임중복체크
|
// 닉네임중복체크
|
||||||
$sql = " select mb_id, mb_name, mb_nick, mb_email from {$g5['member_table']} where mb_nick = '{$mb_nick}' and mb_id <> '$mb_id' ";
|
$sql = " select mb_id, mb_name, mb_nick, mb_email from {$g5['member_table']} where mb_nick = '{$_POST['mb_nick']}' and mb_id <> '$mb_id' ";
|
||||||
$row = sql_fetch($sql);
|
$row = sql_fetch($sql);
|
||||||
if (isset($row['mb_id']) && $row['mb_id']) {
|
if ($row['mb_id'])
|
||||||
alert('이미 존재하는 닉네임입니다.\\nID : ' . $row['mb_id'] . '\\n이름 : ' . $row['mb_name'] . '\\n닉네임 : ' . $row['mb_nick'] . '\\n메일 : ' . $row['mb_email']);
|
alert('이미 존재하는 닉네임입니다.\\nID : '.$row['mb_id'].'\\n이름 : '.$row['mb_name'].'\\n닉네임 : '.$row['mb_nick'].'\\n메일 : '.$row['mb_email']);
|
||||||
}
|
|
||||||
|
|
||||||
// 이메일중복체크
|
// 이메일중복체크
|
||||||
$sql = " select mb_id, mb_name, mb_nick, mb_email from {$g5['member_table']} where mb_email = '{$mb_email}' and mb_id <> '$mb_id' ";
|
$sql = " select mb_id, mb_name, mb_nick, mb_email from {$g5['member_table']} where mb_email = '{$_POST['mb_email']}' and mb_id <> '$mb_id' ";
|
||||||
$row = sql_fetch($sql);
|
$row = sql_fetch($sql);
|
||||||
if (isset($row['mb_id']) && $row['mb_id']) {
|
if ($row['mb_id'])
|
||||||
alert('이미 존재하는 이메일입니다.\\nID : ' . $row['mb_id'] . '\\n이름 : ' . $row['mb_name'] . '\\n닉네임 : ' . $row['mb_nick'] . '\\n메일 : ' . $row['mb_email']);
|
alert('이미 존재하는 이메일입니다.\\nID : '.$row['mb_id'].'\\n이름 : '.$row['mb_name'].'\\n닉네임 : '.$row['mb_nick'].'\\n메일 : '.$row['mb_email']);
|
||||||
}
|
|
||||||
|
|
||||||
if ($mb_password) {
|
$mb_dir = substr($mb_id,0,2);
|
||||||
$sql_password = " , mb_password = '" . get_encrypt_string($mb_password) . "' ";
|
|
||||||
} else {
|
|
||||||
$sql_password = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($passive_certify) && $passive_certify) {
|
|
||||||
$sql_certify = " , mb_email_certify = '" . G5_TIME_YMDHIS . "' ";
|
|
||||||
} else {
|
|
||||||
$sql_certify = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
// 현재 데이터 조회
|
|
||||||
$row = sql_fetch("select * from {$g5['member_table']} where mb_id = '{$mb_id}' ");
|
|
||||||
$agree_items = array();
|
|
||||||
|
|
||||||
// 마케팅 목적의 개인정보 수집 및 이용
|
|
||||||
$sql_marketing_date = "";
|
|
||||||
if ($row['mb_marketing_agree'] !== $mb_marketing_agree) {
|
|
||||||
$sql_marketing_date .= " , mb_marketing_date = '".G5_TIME_YMDHIS."' ";
|
|
||||||
$agree_items[] = "마케팅 목적의 개인정보 수집 및 이용(" . ($mb_marketing_agree == 1 ? "동의" : "철회") . ")";
|
|
||||||
}
|
|
||||||
|
|
||||||
// 광고성 이메일 수신
|
|
||||||
$sql_mailling_date = "";
|
|
||||||
if ($row['mb_mailling'] !== $mb_mailling) {
|
|
||||||
$sql_mailling_date .= " , mb_mailling_date = '".G5_TIME_YMDHIS."' ";
|
|
||||||
$agree_items[] = "광고성 이메일 수신(" . ($mb_mailling == 1 ? "동의" : "철회") . ")";
|
|
||||||
}
|
|
||||||
|
|
||||||
// 광고성 SMS/카카오톡 수신
|
|
||||||
$sql_sms_date = "";
|
|
||||||
if ($row['mb_sms'] !== $mb_sms) {
|
|
||||||
$sql_sms_date .= " , mb_sms_date = '".G5_TIME_YMDHIS."' ";
|
|
||||||
$agree_items[] = "광고성 SMS/카카오톡 수신(" . ($mb_sms == 1 ? "동의" : "철회") . ")";
|
|
||||||
}
|
|
||||||
|
|
||||||
// 개인정보 제3자 제공
|
|
||||||
$sql_thirdparty_date = "";
|
|
||||||
if ($row['mb_thirdparty_agree'] !== $mb_thirdparty_agree) {
|
|
||||||
$sql_thirdparty_date .= " , mb_thirdparty_date = '".G5_TIME_YMDHIS."' ";
|
|
||||||
$agree_items[] = "개인정보 제3자 제공(" . ($mb_thirdparty_agree == 1 ? "동의" : "철회") . ")";
|
|
||||||
}
|
|
||||||
|
|
||||||
// 동의 로그 추가
|
|
||||||
$sql_agree_log = "";
|
|
||||||
if (!empty($agree_items)) {
|
|
||||||
$agree_log = "[".G5_TIME_YMDHIS.", 관리자 회원수정] " . implode(' | ', $agree_items) . "\n";
|
|
||||||
$sql_agree_log .= " , mb_agree_log = CONCAT('{$agree_log}', IFNULL(mb_agree_log, ''))";
|
|
||||||
}
|
|
||||||
|
|
||||||
$sql = " update {$g5['member_table']}
|
|
||||||
set {$sql_common}
|
|
||||||
{$sql_password}
|
|
||||||
{$sql_certify}
|
|
||||||
{$sql_mailling_date}
|
|
||||||
{$sql_sms_date}
|
|
||||||
{$sql_marketing_date}
|
|
||||||
{$sql_thirdparty_date}
|
|
||||||
{$sql_agree_log}
|
|
||||||
where mb_id = '{$mb_id}' ";
|
|
||||||
sql_query($sql);
|
|
||||||
} else {
|
|
||||||
alert('제대로 된 값이 넘어오지 않았습니다.');
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($w == '' || $w == 'u') {
|
|
||||||
$mb_dir = substr($mb_id, 0, 2);
|
|
||||||
$mb_icon_img = get_mb_icon_name($mb_id) . '.gif';
|
|
||||||
|
|
||||||
// 회원 아이콘 삭제
|
// 회원 아이콘 삭제
|
||||||
if (isset($del_mb_icon) && $del_mb_icon) {
|
if ($del_mb_icon)
|
||||||
@unlink(G5_DATA_PATH . '/member/' . $mb_dir . '/' . $mb_icon_img);
|
@unlink(G5_DATA_PATH.'/member/'.$mb_dir.'/'.$mb_id.'.gif');
|
||||||
}
|
|
||||||
|
|
||||||
$image_regex = "/(\.(gif|jpe?g|png))$/i";
|
|
||||||
|
|
||||||
// 아이콘 업로드
|
// 아이콘 업로드
|
||||||
if (isset($_FILES['mb_icon']) && is_uploaded_file($_FILES['mb_icon']['tmp_name'])) {
|
if (is_uploaded_file($_FILES['mb_icon']['tmp_name'])) {
|
||||||
if (!preg_match($image_regex, $_FILES['mb_icon']['name'])) {
|
if (!preg_match("/(\.gif)$/i", $_FILES['mb_icon']['name'])) {
|
||||||
alert($_FILES['mb_icon']['name'] . '은(는) 이미지 파일이 아닙니다.');
|
alert($_FILES['mb_icon']['name'] . '은(는) gif 파일이 아닙니다.');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (preg_match($image_regex, $_FILES['mb_icon']['name'])) {
|
if (preg_match("/(\.gif)$/i", $_FILES['mb_icon']['name'])) {
|
||||||
$mb_icon_dir = G5_DATA_PATH . '/member/' . $mb_dir;
|
@mkdir(G5_DATA_PATH.'/member/'.$mb_dir, G5_DIR_PERMISSION);
|
||||||
@mkdir($mb_icon_dir, G5_DIR_PERMISSION);
|
@chmod(G5_DATA_PATH.'/member/'.$mb_dir, G5_DIR_PERMISSION);
|
||||||
@chmod($mb_icon_dir, G5_DIR_PERMISSION);
|
|
||||||
|
|
||||||
$dest_path = $mb_icon_dir . '/' . $mb_icon_img;
|
$dest_path = G5_DATA_PATH.'/member/'.$mb_dir.'/'.$mb_id.'.gif';
|
||||||
|
|
||||||
move_uploaded_file($_FILES['mb_icon']['tmp_name'], $dest_path);
|
move_uploaded_file($_FILES['mb_icon']['tmp_name'], $dest_path);
|
||||||
chmod($dest_path, G5_FILE_PERMISSION);
|
chmod($dest_path, G5_FILE_PERMISSION);
|
||||||
|
|
||||||
if (file_exists($dest_path)) {
|
if (file_exists($dest_path)) {
|
||||||
$size = @getimagesize($dest_path);
|
$size = getimagesize($dest_path);
|
||||||
if ($size) {
|
// 아이콘의 폭 또는 높이가 설정값 보다 크다면 이미 업로드 된 아이콘 삭제
|
||||||
if ($size[0] > $config['cf_member_icon_width'] || $size[1] > $config['cf_member_icon_height']) {
|
if ($size[0] > $config['cf_member_icon_width'] || $size[1] > $config['cf_member_icon_height']) {
|
||||||
$thumb = null;
|
@unlink($dest_path);
|
||||||
if ($size[2] === 2 || $size[2] === 3) {
|
|
||||||
//jpg 또는 png 파일 적용
|
|
||||||
$thumb = thumbnail($mb_icon_img, $mb_icon_dir, $mb_icon_dir, $config['cf_member_icon_width'], $config['cf_member_icon_height'], true, true);
|
|
||||||
if ($thumb) {
|
|
||||||
@unlink($dest_path);
|
|
||||||
rename($mb_icon_dir . '/' . $thumb, $dest_path);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!$thumb) {
|
|
||||||
// 아이콘의 폭 또는 높이가 설정값 보다 크다면 이미 업로드 된 아이콘 삭제
|
|
||||||
@unlink($dest_path);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$mb_img_dir = G5_DATA_PATH . '/member_image/';
|
if ($mb_password)
|
||||||
if (!is_dir($mb_img_dir)) {
|
$sql_password = " , mb_password = '".get_encrypt_string($mb_password)."' ";
|
||||||
@mkdir($mb_img_dir, G5_DIR_PERMISSION);
|
else
|
||||||
@chmod($mb_img_dir, G5_DIR_PERMISSION);
|
$sql_password = "";
|
||||||
}
|
|
||||||
$mb_img_dir .= substr($mb_id, 0, 2);
|
|
||||||
|
|
||||||
// 회원 이미지 삭제
|
if ($passive_certify)
|
||||||
if (isset($del_mb_img) && $del_mb_img) {
|
$sql_certify = " , mb_email_certify = '".G5_TIME_YMDHIS."' ";
|
||||||
@unlink($mb_img_dir . '/' . $mb_icon_img);
|
else
|
||||||
}
|
$sql_certify = "";
|
||||||
|
|
||||||
// 아이콘 업로드
|
$sql = " update {$g5['member_table']}
|
||||||
if (isset($_FILES['mb_img']) && is_uploaded_file($_FILES['mb_img']['tmp_name'])) {
|
set {$sql_common}
|
||||||
if (!preg_match($image_regex, $_FILES['mb_img']['name'])) {
|
{$sql_password}
|
||||||
alert($_FILES['mb_img']['name'] . '은(는) 이미지 파일이 아닙니다.');
|
{$sql_certify}
|
||||||
}
|
where mb_id = '{$mb_id}' ";
|
||||||
|
sql_query($sql);
|
||||||
if (preg_match($image_regex, $_FILES['mb_img']['name'])) {
|
|
||||||
@mkdir($mb_img_dir, G5_DIR_PERMISSION);
|
|
||||||
@chmod($mb_img_dir, G5_DIR_PERMISSION);
|
|
||||||
|
|
||||||
$dest_path = $mb_img_dir . '/' . $mb_icon_img;
|
|
||||||
|
|
||||||
move_uploaded_file($_FILES['mb_img']['tmp_name'], $dest_path);
|
|
||||||
chmod($dest_path, G5_FILE_PERMISSION);
|
|
||||||
|
|
||||||
if (file_exists($dest_path)) {
|
|
||||||
$size = @getimagesize($dest_path);
|
|
||||||
if ($size) {
|
|
||||||
if ($size[0] > $config['cf_member_img_width'] || $size[1] > $config['cf_member_img_height']) {
|
|
||||||
$thumb = null;
|
|
||||||
if ($size[2] === 2 || $size[2] === 3) {
|
|
||||||
//jpg 또는 png 파일 적용
|
|
||||||
$thumb = thumbnail($mb_icon_img, $mb_img_dir, $mb_img_dir, $config['cf_member_img_width'], $config['cf_member_img_height'], true, true);
|
|
||||||
if ($thumb) {
|
|
||||||
@unlink($dest_path);
|
|
||||||
rename($mb_img_dir . '/' . $thumb, $dest_path);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!$thumb) {
|
|
||||||
// 아이콘의 폭 또는 높이가 설정값 보다 크다면 이미 업로드 된 아이콘 삭제
|
|
||||||
@unlink($dest_path);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
alert('제대로 된 값이 넘어오지 않았습니다.');
|
||||||
|
|
||||||
if (function_exists('get_admin_captcha_by')) {
|
goto_url('./member_form.php?'.$qstr.'&w=u&mb_id='.$mb_id, false);
|
||||||
get_admin_captcha_by('remove');
|
?>
|
||||||
}
|
|
||||||
|
|
||||||
run_event('admin_member_form_update', $w, $mb_id);
|
|
||||||
|
|
||||||
goto_url('./member_form.php?' . $qstr . '&w=u&mb_id=' . $mb_id, false);
|
|
||||||
+241
-268
@@ -1,50 +1,40 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "200100";
|
$sub_menu = "200100";
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, 'r');
|
auth_check($auth[$sub_menu], 'r');
|
||||||
|
|
||||||
$sql_common = " from {$g5['member_table']} ";
|
$sql_common = " from {$g5['member_table']} ";
|
||||||
|
|
||||||
$allowed_sfl = array('mb_id', 'mb_nick', 'mb_name', 'mb_level', 'mb_email', 'mb_tel', 'mb_hp', 'mb_point', 'mb_datetime', 'mb_ip', 'mb_recommend');
|
|
||||||
if (!in_array($sfl, $allowed_sfl)) {
|
|
||||||
$sfl = 'mb_id';
|
|
||||||
}
|
|
||||||
|
|
||||||
$sql_search = " where (1) ";
|
$sql_search = " where (1) ";
|
||||||
if ($stx) {
|
if ($stx) {
|
||||||
$sql_search .= " and ( ";
|
$sql_search .= " and ( ";
|
||||||
switch ($sfl) {
|
switch ($sfl) {
|
||||||
case 'mb_point':
|
case 'mb_point' :
|
||||||
$sql_search .= " ({$sfl} >= '{$stx}') ";
|
$sql_search .= " ({$sfl} >= '{$stx}') ";
|
||||||
break;
|
break;
|
||||||
case 'mb_level':
|
case 'mb_level' :
|
||||||
$sql_search .= " ({$sfl} = '{$stx}') ";
|
$sql_search .= " ({$sfl} = '{$stx}') ";
|
||||||
break;
|
break;
|
||||||
case 'mb_tel':
|
case 'mb_tel' :
|
||||||
case 'mb_hp':
|
case 'mb_hp' :
|
||||||
$sql_search .= " ({$sfl} like '%{$stx}') ";
|
$sql_search .= " ({$sfl} like '%{$stx}') ";
|
||||||
break;
|
break;
|
||||||
default:
|
default :
|
||||||
$sql_search .= " ({$sfl} like '{$stx}%') ";
|
$sql_search .= " ({$sfl} like '{$stx}%') ";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$sql_search .= " ) ";
|
$sql_search .= " ) ";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($is_admin != 'super') {
|
if ($is_admin != 'super')
|
||||||
$sql_search .= " and mb_level <= '{$member['mb_level']}' ";
|
$sql_search .= " and mb_level <= '{$member['mb_level']}' ";
|
||||||
}
|
|
||||||
|
|
||||||
if (!$sst) {
|
if (!$sst) {
|
||||||
$sst = "mb_datetime";
|
$sst = "mb_datetime";
|
||||||
$sod = "desc";
|
$sod = "desc";
|
||||||
}
|
}
|
||||||
|
|
||||||
$allowed_sst = array('mb_datetime', 'mb_id', 'mb_name', 'mb_nick', 'mb_level', 'mb_point', 'mb_today_login', 'mb_open', 'mb_mailling', 'mb_sms', 'mb_adult', 'mb_certify', 'mb_email_certify', 'mb_intercept_date', 'mb_leave_date');
|
|
||||||
if ($sst && !in_array($sst, $allowed_sst)) $sst = 'mb_datetime';
|
|
||||||
if ($sod && !in_array(strtolower($sod), array('asc', 'desc'))) $sod = '';
|
|
||||||
|
|
||||||
$sql_order = " order by {$sst} {$sod} ";
|
$sql_order = " order by {$sst} {$sod} ";
|
||||||
|
|
||||||
$sql = " select count(*) as cnt {$sql_common} {$sql_search} {$sql_order} ";
|
$sql = " select count(*) as cnt {$sql_common} {$sql_search} {$sql_order} ";
|
||||||
@@ -53,9 +43,7 @@ $total_count = $row['cnt'];
|
|||||||
|
|
||||||
$rows = $config['cf_page_rows'];
|
$rows = $config['cf_page_rows'];
|
||||||
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
||||||
if ($page < 1) {
|
if ($page < 1) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||||
$page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
|
|
||||||
}
|
|
||||||
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
||||||
|
|
||||||
// 탈퇴회원수
|
// 탈퇴회원수
|
||||||
@@ -68,10 +56,10 @@ $sql = " select count(*) as cnt {$sql_common} {$sql_search} and mb_intercept_dat
|
|||||||
$row = sql_fetch($sql);
|
$row = sql_fetch($sql);
|
||||||
$intercept_count = $row['cnt'];
|
$intercept_count = $row['cnt'];
|
||||||
|
|
||||||
$listall = '<a href="' . $_SERVER['SCRIPT_NAME'] . '" class="ov_listall">전체목록</a>';
|
$listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목록</a>';
|
||||||
|
|
||||||
$g5['title'] = '회원관리';
|
$g5['title'] = '회원관리';
|
||||||
require_once './admin.head.php';
|
include_once('./admin.head.php');
|
||||||
|
|
||||||
$sql = " select * {$sql_common} {$sql_search} {$sql_order} limit {$from_record}, {$rows} ";
|
$sql = " select * {$sql_common} {$sql_search} {$sql_order} limit {$from_record}, {$rows} ";
|
||||||
$result = sql_query($sql);
|
$result = sql_query($sql);
|
||||||
@@ -82,29 +70,29 @@ $colspan = 16;
|
|||||||
<div class="local_ov01 local_ov">
|
<div class="local_ov01 local_ov">
|
||||||
<?php echo $listall ?>
|
<?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($total_count) ?>명 </span></span>
|
||||||
<a href="?sst=mb_intercept_date&sod=desc&sfl=<?php echo $sfl ?>&stx=<?php echo $stx ?>" class="btn_ov01" data-tooltip-text="차단된 순으로 정렬합니다.
전체 데이터를 출력합니다."> <span class="ov_txt">차단 </span><span class="ov_num"><?php echo number_format($intercept_count) ?>명</span></a>
|
<a href="?sst=mb_intercept_date&sod=desc&sfl=<?php echo $sfl ?>&stx=<?php echo $stx ?>" class="btn_ov01"> <span class="ov_txt">차단 </span><span class="ov_num"><?php echo number_format($intercept_count) ?>명</span></a>
|
||||||
<a href="?sst=mb_leave_date&sod=desc&sfl=<?php echo $sfl ?>&stx=<?php echo $stx ?>" class="btn_ov01" data-tooltip-text="탈퇴된 순으로 정렬합니다.
전체 데이터를 출력합니다."> <span class="ov_txt">탈퇴 </span><span class="ov_num"><?php echo number_format($leave_count) ?>명</span></a>
|
<a href="?sst=mb_leave_date&sod=desc&sfl=<?php echo $sfl ?>&stx=<?php echo $stx ?>" class="btn_ov01"> <span class="ov_txt">탈퇴 </span><span class="ov_num"><?php echo number_format($leave_count) ?>명</span></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<form id="fsearch" name="fsearch" class="local_sch01 local_sch" method="get">
|
<form id="fsearch" name="fsearch" class="local_sch01 local_sch" method="get">
|
||||||
|
|
||||||
<label for="sfl" class="sound_only">검색대상</label>
|
<label for="sfl" class="sound_only">검색대상</label>
|
||||||
<select name="sfl" id="sfl">
|
<select name="sfl" id="sfl">
|
||||||
<option value="mb_id" <?php echo get_selected($sfl, "mb_id"); ?>>회원아이디</option>
|
<option value="mb_id"<?php echo get_selected($_GET['sfl'], "mb_id"); ?>>회원아이디</option>
|
||||||
<option value="mb_nick" <?php echo get_selected($sfl, "mb_nick"); ?>>닉네임</option>
|
<option value="mb_nick"<?php echo get_selected($_GET['sfl'], "mb_nick"); ?>>닉네임</option>
|
||||||
<option value="mb_name" <?php echo get_selected($sfl, "mb_name"); ?>>이름</option>
|
<option value="mb_name"<?php echo get_selected($_GET['sfl'], "mb_name"); ?>>이름</option>
|
||||||
<option value="mb_level" <?php echo get_selected($sfl, "mb_level"); ?>>권한</option>
|
<option value="mb_level"<?php echo get_selected($_GET['sfl'], "mb_level"); ?>>권한</option>
|
||||||
<option value="mb_email" <?php echo get_selected($sfl, "mb_email"); ?>>E-MAIL</option>
|
<option value="mb_email"<?php echo get_selected($_GET['sfl'], "mb_email"); ?>>E-MAIL</option>
|
||||||
<option value="mb_tel" <?php echo get_selected($sfl, "mb_tel"); ?>>전화번호</option>
|
<option value="mb_tel"<?php echo get_selected($_GET['sfl'], "mb_tel"); ?>>전화번호</option>
|
||||||
<option value="mb_hp" <?php echo get_selected($sfl, "mb_hp"); ?>>휴대폰번호</option>
|
<option value="mb_hp"<?php echo get_selected($_GET['sfl'], "mb_hp"); ?>>휴대폰번호</option>
|
||||||
<option value="mb_point" <?php echo get_selected($sfl, "mb_point"); ?>>포인트</option>
|
<option value="mb_point"<?php echo get_selected($_GET['sfl'], "mb_point"); ?>>포인트</option>
|
||||||
<option value="mb_datetime" <?php echo get_selected($sfl, "mb_datetime"); ?>>가입일시</option>
|
<option value="mb_datetime"<?php echo get_selected($_GET['sfl'], "mb_datetime"); ?>>가입일시</option>
|
||||||
<option value="mb_ip" <?php echo get_selected($sfl, "mb_ip"); ?>>IP</option>
|
<option value="mb_ip"<?php echo get_selected($_GET['sfl'], "mb_ip"); ?>>IP</option>
|
||||||
<option value="mb_recommend" <?php echo get_selected($sfl, "mb_recommend"); ?>>추천인</option>
|
<option value="mb_recommend"<?php echo get_selected($_GET['sfl'], "mb_recommend"); ?>>추천인</option>
|
||||||
</select>
|
</select>
|
||||||
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
<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="text" name="stx" value="<?php echo $stx ?>" id="stx" required class="required frm_input">
|
||||||
<input type="submit" class="btn_submit" value="검색">
|
<input type="submit" class="btn_submit" value="검색">
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
@@ -116,246 +104,231 @@ $colspan = 16;
|
|||||||
|
|
||||||
|
|
||||||
<form name="fmemberlist" id="fmemberlist" action="./member_list_update.php" onsubmit="return fmemberlist_submit(this);" method="post">
|
<form name="fmemberlist" id="fmemberlist" action="./member_list_update.php" onsubmit="return fmemberlist_submit(this);" method="post">
|
||||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||||
<input type="hidden" name="token" value="">
|
<input type="hidden" name="token" value="">
|
||||||
|
|
||||||
<div class="tbl_head01 tbl_wrap">
|
<div class="tbl_head01 tbl_wrap">
|
||||||
<table>
|
<table>
|
||||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col" id="mb_list_chk" rowspan="2">
|
<th scope="col" id="mb_list_chk" rowspan="2" >
|
||||||
<label for="chkall" class="sound_only">회원 전체</label>
|
<label for="chkall" class="sound_only">회원 전체</label>
|
||||||
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
|
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
|
||||||
</th>
|
</th>
|
||||||
<th scope="col" id="mb_list_id" colspan="2"><?php echo subject_sort_link('mb_id') ?>아이디</a></th>
|
<th scope="col" id="mb_list_id" colspan="2"><?php echo subject_sort_link('mb_id') ?>아이디</a></th>
|
||||||
<th scope="col" rowspan="2" id="mb_list_cert"><?php echo subject_sort_link('mb_certify', '', 'desc') ?>본인확인</a></th>
|
<th scope="col" rowspan="2" id="mb_list_cert"><?php echo subject_sort_link('mb_certify', '', 'desc') ?>본인확인</a></th>
|
||||||
<th scope="col" id="mb_list_mailc"><?php echo subject_sort_link('mb_email_certify', '', 'desc') ?>메일인증</a></th>
|
<th scope="col" id="mb_list_mailc"><?php echo subject_sort_link('mb_email_certify', '', 'desc') ?>메일인증</a></th>
|
||||||
<th scope="col" id="mb_list_open"><?php echo subject_sort_link('mb_open', '', 'desc') ?>정보공개</a></th>
|
<th scope="col" id="mb_list_open"><?php echo subject_sort_link('mb_open', '', 'desc') ?>정보공개</a></th>
|
||||||
<th scope="col" id="mb_list_mailr"><?php echo subject_sort_link('mb_mailling', '', 'desc') ?>광고성이메일</a></th>
|
<th scope="col" id="mb_list_mailr"><?php echo subject_sort_link('mb_mailling', '', 'desc') ?>메일수신</a></th>
|
||||||
<th scope="col" id="mb_list_auth">상태</th>
|
<th scope="col" id="mb_list_auth">상태</th>
|
||||||
<th scope="col" id="mb_list_mobile">휴대폰</th>
|
<th scope="col" id="mb_list_mobile">휴대폰</th>
|
||||||
<th scope="col" id="mb_list_lastcall"><?php echo subject_sort_link('mb_today_login', '', 'desc') ?>최종접속</a></th>
|
<th scope="col" id="mb_list_lastcall"><?php echo subject_sort_link('mb_today_login', '', 'desc') ?>최종접속</a></th>
|
||||||
<th scope="col" id="mb_list_grp">접근그룹</th>
|
<th scope="col" id="mb_list_grp">접근그룹</th>
|
||||||
<th scope="col" rowspan="2" id="mb_list_mng">관리</th>
|
<th scope="col" rowspan="2" id="mb_list_mng">관리</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col" id="mb_list_name"><?php echo subject_sort_link('mb_name') ?>이름</a></th>
|
<th scope="col" id="mb_list_name"><?php echo subject_sort_link('mb_name') ?>이름</a></th>
|
||||||
<th scope="col" id="mb_list_nick"><?php echo subject_sort_link('mb_nick') ?>닉네임</a></th>
|
<th scope="col" id="mb_list_nick"><?php echo subject_sort_link('mb_nick') ?>닉네임</a></th>
|
||||||
<th scope="col" id="mb_list_adultc"><?php echo subject_sort_link('mb_adult', '', 'desc') ?>성인인증</a></th>
|
<th scope="col" id="mb_list_sms"><?php echo subject_sort_link('mb_sms', '', 'desc') ?>SMS수신</a></th>
|
||||||
<th scope="col" id="mb_list_auth"><?php echo subject_sort_link('mb_intercept_date', '', 'desc') ?>접근차단</a></th>
|
<th scope="col" id="mb_list_adultc"><?php echo subject_sort_link('mb_adult', '', 'desc') ?>성인인증</a></th>
|
||||||
<th scope="col" id="mb_list_sms"><?php echo subject_sort_link('mb_sms', '', 'desc') ?>광고성SMS</a></th>
|
<th scope="col" id="mb_list_auth"><?php echo subject_sort_link('mb_intercept_date', '', 'desc') ?>접근차단</a></th>
|
||||||
<th scope="col" id="mb_list_deny"><?php echo subject_sort_link('mb_level', '', 'desc') ?>권한</a></th>
|
<th scope="col" id="mb_list_deny"><?php echo subject_sort_link('mb_level', '', 'desc') ?>권한</a></th>
|
||||||
<th scope="col" id="mb_list_tel">전화번호</th>
|
<th scope="col" id="mb_list_tel">전화번호</th>
|
||||||
<th scope="col" id="mb_list_join"><?php echo subject_sort_link('mb_datetime', '', 'desc') ?>가입일</a></th>
|
<th scope="col" id="mb_list_join"><?php echo subject_sort_link('mb_datetime', '', 'desc') ?>가입일</a></th>
|
||||||
<th scope="col" id="mb_list_point"><?php echo subject_sort_link('mb_point', '', 'desc') ?> 포인트</a></th>
|
<th scope="col" id="mb_list_point"><?php echo subject_sort_link('mb_point', '', 'desc') ?> 포인트</a></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||||
// 접근가능한 그룹수
|
// 접근가능한 그룹수
|
||||||
$sql2 = " select count(*) as cnt from {$g5['group_member_table']} where mb_id = '{$row['mb_id']}' ";
|
$sql2 = " select count(*) as cnt from {$g5['group_member_table']} where mb_id = '{$row['mb_id']}' ";
|
||||||
$row2 = sql_fetch($sql2);
|
$row2 = sql_fetch($sql2);
|
||||||
$group = '';
|
$group = '';
|
||||||
if ($row2['cnt']) {
|
if ($row2['cnt'])
|
||||||
$group = '<a href="./boardgroupmember_form.php?mb_id=' . $row['mb_id'] . '">' . $row2['cnt'] . '</a>';
|
$group = '<a href="./boardgroupmember_form.php?mb_id='.$row['mb_id'].'">'.$row2['cnt'].'</a>';
|
||||||
|
|
||||||
|
if ($is_admin == 'group') {
|
||||||
|
$s_mod = '';
|
||||||
|
} else {
|
||||||
|
$s_mod = '<a href="./member_form.php?'.$qstr.'&w=u&mb_id='.$row['mb_id'].'" class="btn btn_03">수정</a>';
|
||||||
|
}
|
||||||
|
$s_grp = '<a href="./boardgroupmember_form.php?mb_id='.$row['mb_id'].'" class="btn btn_02">그룹</a>';
|
||||||
|
|
||||||
|
$leave_date = $row['mb_leave_date'] ? $row['mb_leave_date'] : date('Ymd', G5_SERVER_TIME);
|
||||||
|
$intercept_date = $row['mb_intercept_date'] ? $row['mb_intercept_date'] : date('Ymd', G5_SERVER_TIME);
|
||||||
|
|
||||||
|
$mb_nick = get_sideview($row['mb_id'], get_text($row['mb_nick']), $row['mb_email'], $row['mb_homepage']);
|
||||||
|
|
||||||
|
$mb_id = $row['mb_id'];
|
||||||
|
$leave_msg = '';
|
||||||
|
$intercept_msg = '';
|
||||||
|
$intercept_title = '';
|
||||||
|
if ($row['mb_leave_date']) {
|
||||||
|
$mb_id = $mb_id;
|
||||||
|
$leave_msg = '<span class="mb_leave_msg">탈퇴함</span>';
|
||||||
|
}
|
||||||
|
else if ($row['mb_intercept_date']) {
|
||||||
|
$mb_id = $mb_id;
|
||||||
|
$intercept_msg = '<span class="mb_intercept_msg">차단됨</span>';
|
||||||
|
$intercept_title = '차단해제';
|
||||||
|
}
|
||||||
|
if ($intercept_title == '')
|
||||||
|
$intercept_title = '차단하기';
|
||||||
|
|
||||||
|
$address = $row['mb_zip1'] ? print_address($row['mb_addr1'], $row['mb_addr2'], $row['mb_addr3'], $row['mb_addr_jibeon']) : '';
|
||||||
|
|
||||||
|
$bg = 'bg'.($i%2);
|
||||||
|
|
||||||
|
switch($row['mb_certify']) {
|
||||||
|
case 'hp':
|
||||||
|
$mb_certify_case = '휴대폰';
|
||||||
|
$mb_certify_val = 'hp';
|
||||||
|
break;
|
||||||
|
case 'ipin':
|
||||||
|
$mb_certify_case = '아이핀';
|
||||||
|
$mb_certify_val = '';
|
||||||
|
break;
|
||||||
|
case 'admin':
|
||||||
|
$mb_certify_case = '관리자';
|
||||||
|
$mb_certify_val = 'admin';
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$mb_certify_case = ' ';
|
||||||
|
$mb_certify_val = 'admin';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<tr class="<?php echo $bg; ?>">
|
||||||
|
<td headers="mb_list_chk" class="td_chk" rowspan="2">
|
||||||
|
<input type="hidden" name="mb_id[<?php echo $i ?>]" value="<?php echo $row['mb_id'] ?>" id="mb_id_<?php echo $i ?>">
|
||||||
|
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo get_text($row['mb_name']); ?> <?php echo get_text($row['mb_nick']); ?>님</label>
|
||||||
|
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
|
||||||
|
</td>
|
||||||
|
<td headers="mb_list_id" colspan="2" class="td_name sv_use">
|
||||||
|
<?php echo $mb_id ?>
|
||||||
|
<?php
|
||||||
|
//소셜계정이 있다면
|
||||||
|
if(function_exists('social_login_link_account')){
|
||||||
|
if( $my_social_accounts = social_login_link_account($row['mb_id'], false, 'get_data') ){
|
||||||
|
|
||||||
|
echo '<div class="member_social_provider sns-wrap-over sns-wrap-32">';
|
||||||
|
foreach( (array) $my_social_accounts as $account){ //반복문
|
||||||
|
if( empty($account) || empty($account['provider']) ) continue;
|
||||||
|
|
||||||
|
$provider = strtolower($account['provider']);
|
||||||
|
$provider_name = social_get_provider_service_name($provider);
|
||||||
|
|
||||||
|
echo '<span class="sns-icon sns-'.$provider.'" title="'.$provider_name.'">';
|
||||||
|
echo '<span class="ico"></span>';
|
||||||
|
echo '<span class="txt">'.$provider_name.'</span>';
|
||||||
|
echo '</span>';
|
||||||
}
|
}
|
||||||
|
echo '</div>';
|
||||||
if ($is_admin == 'group') {
|
|
||||||
$s_mod = '';
|
|
||||||
} else {
|
|
||||||
$s_mod = '<a href="./member_form.php?' . $qstr . '&w=u&mb_id=' . $row['mb_id'] . '" class="btn btn_03">수정</a>';
|
|
||||||
}
|
|
||||||
$s_grp = '<a href="./boardgroupmember_form.php?mb_id=' . $row['mb_id'] . '" class="btn btn_02">그룹</a>';
|
|
||||||
|
|
||||||
$leave_date = $row['mb_leave_date'] ? $row['mb_leave_date'] : date('Ymd', G5_SERVER_TIME);
|
|
||||||
$intercept_date = $row['mb_intercept_date'] ? $row['mb_intercept_date'] : date('Ymd', G5_SERVER_TIME);
|
|
||||||
|
|
||||||
$mb_nick = get_sideview($row['mb_id'], get_text($row['mb_nick']), $row['mb_email'], $row['mb_homepage']);
|
|
||||||
|
|
||||||
$mb_id = $row['mb_id'];
|
|
||||||
$leave_msg = '';
|
|
||||||
$intercept_msg = '';
|
|
||||||
$intercept_title = '';
|
|
||||||
if ($row['mb_leave_date']) {
|
|
||||||
$mb_id = $mb_id;
|
|
||||||
$leave_msg = '<span class="mb_leave_msg">탈퇴함</span>';
|
|
||||||
} elseif ($row['mb_intercept_date']) {
|
|
||||||
$mb_id = $mb_id;
|
|
||||||
$intercept_msg = '<span class="mb_intercept_msg">차단됨</span>';
|
|
||||||
$intercept_title = '차단해제';
|
|
||||||
}
|
|
||||||
if ($intercept_title == '') {
|
|
||||||
$intercept_title = '차단하기';
|
|
||||||
}
|
|
||||||
|
|
||||||
$address = $row['mb_zip1'] ? print_address($row['mb_addr1'], $row['mb_addr2'], $row['mb_addr3'], $row['mb_addr_jibeon']) : '';
|
|
||||||
|
|
||||||
$bg = 'bg' . ($i % 2);
|
|
||||||
|
|
||||||
switch ($row['mb_certify']) {
|
|
||||||
case 'hp':
|
|
||||||
$mb_certify_case = '휴대폰';
|
|
||||||
$mb_certify_val = 'hp';
|
|
||||||
break;
|
|
||||||
case 'ipin':
|
|
||||||
$mb_certify_case = '아이핀';
|
|
||||||
$mb_certify_val = '';
|
|
||||||
break;
|
|
||||||
case 'simple':
|
|
||||||
$mb_certify_case = '간편인증';
|
|
||||||
$mb_certify_val = '';
|
|
||||||
break;
|
|
||||||
case 'admin':
|
|
||||||
$mb_certify_case = '관리자';
|
|
||||||
$mb_certify_val = 'admin';
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
$mb_certify_case = ' ';
|
|
||||||
$mb_certify_val = 'admin';
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
<tr class="<?php echo $bg; ?>">
|
|
||||||
<td headers="mb_list_chk" class="td_chk" rowspan="2">
|
|
||||||
<input type="hidden" name="mb_id[<?php echo $i ?>]" value="<?php echo $row['mb_id'] ?>" id="mb_id_<?php echo $i ?>">
|
|
||||||
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo get_text($row['mb_name']); ?> <?php echo get_text($row['mb_nick']); ?>님</label>
|
|
||||||
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
|
|
||||||
</td>
|
|
||||||
<td headers="mb_list_id" colspan="2" class="td_name sv_use">
|
|
||||||
<?php echo $mb_id ?>
|
|
||||||
<?php
|
|
||||||
//소셜계정이 있다면
|
|
||||||
if (function_exists('social_login_link_account')) {
|
|
||||||
if ($my_social_accounts = social_login_link_account($row['mb_id'], false, 'get_data')) {
|
|
||||||
echo '<div class="member_social_provider sns-wrap-over sns-wrap-32">';
|
|
||||||
foreach ((array) $my_social_accounts as $account) { //반복문
|
|
||||||
if (empty($account) || empty($account['provider'])) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
$provider = strtolower($account['provider']);
|
|
||||||
$provider_name = social_get_provider_service_name($provider);
|
|
||||||
|
|
||||||
echo '<span class="sns-icon sns-' . $provider . '" title="' . $provider_name . '">';
|
|
||||||
echo '<span class="ico"></span>';
|
|
||||||
echo '<span class="txt">' . $provider_name . '</span>';
|
|
||||||
echo '</span>';
|
|
||||||
}
|
|
||||||
echo '</div>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</td>
|
|
||||||
<td headers="mb_list_cert" rowspan="2" class="td_mbcert">
|
|
||||||
<input type="radio" name="mb_certify[<?php echo $i; ?>]" value="simple" id="mb_certify_sa_<?php echo $i; ?>" <?php echo $row['mb_certify'] == 'simple' ? 'checked' : ''; ?>>
|
|
||||||
<label for="mb_certify_sa_<?php echo $i; ?>">간편인증</label><br>
|
|
||||||
<input type="radio" name="mb_certify[<?php echo $i; ?>]" value="hp" id="mb_certify_hp_<?php echo $i; ?>" <?php echo $row['mb_certify'] == 'hp' ? 'checked' : ''; ?>>
|
|
||||||
<label for="mb_certify_hp_<?php echo $i; ?>">휴대폰</label><br>
|
|
||||||
<input type="radio" name="mb_certify[<?php echo $i; ?>]" value="ipin" id="mb_certify_ipin_<?php echo $i; ?>" <?php echo $row['mb_certify'] == 'ipin' ? 'checked' : ''; ?>>
|
|
||||||
<label for="mb_certify_ipin_<?php echo $i; ?>">아이핀</label>
|
|
||||||
</td>
|
|
||||||
<td headers="mb_list_mailc" class="td_consent"><?php echo preg_match('/[1-9]/', $row['mb_email_certify']) ? '<span class="txt_true">Yes</span>' : '<span class="txt_false">No</span>'; ?></td>
|
|
||||||
<td headers="mb_list_open" class="td_consent">
|
|
||||||
<label for="mb_open_<?php echo $i; ?>" class="sound_only">정보공개</label>
|
|
||||||
<input type="checkbox" name="mb_open[<?php echo $i; ?>]" <?php echo $row['mb_open'] ? 'checked' : ''; ?> value="1" id="mb_open_<?php echo $i; ?>">
|
|
||||||
</td>
|
|
||||||
<td headers="mb_list_mailr" class="td_consent">
|
|
||||||
<label for="mb_mailling_<?php echo $i; ?>" class="sound_only">광고성이메일수신</label>
|
|
||||||
<input type="checkbox" name="mb_mailling[<?php echo $i; ?>]" <?php echo $row['mb_mailling'] ? 'checked' : ''; ?> value="1" id="mb_mailling_<?php echo $i; ?>">
|
|
||||||
<input type="hidden" name="mb_mailling_default[<?php echo $i; ?>]" value="<?php echo isset($row['mb_mailling']) ? $row['mb_mailling'] : '0'; ?> " id="mb_mailling_default_<?php echo $i; ?>">
|
|
||||||
</td>
|
|
||||||
<td headers="mb_list_auth" class="td_mbstat">
|
|
||||||
<?php
|
|
||||||
if ($leave_msg || $intercept_msg) {
|
|
||||||
echo $leave_msg . ' ' . $intercept_msg;
|
|
||||||
} else if ($config['cf_use_email_certify'] && !preg_match('/[1-9]/', $row['mb_email_certify'])) {
|
|
||||||
echo '<span class="txt_false">메일 미인증</span>';
|
|
||||||
} else {
|
|
||||||
echo "정상";
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</td>
|
|
||||||
<td headers="mb_list_mobile" class="td_tel"><?php echo get_text($row['mb_hp']); ?></td>
|
|
||||||
<td headers="mb_list_lastcall" class="td_date"><?php echo substr($row['mb_today_login'], 2, 8); ?></td>
|
|
||||||
<td headers="mb_list_grp" class="td_numsmall"><?php echo $group ?></td>
|
|
||||||
<td headers="mb_list_mng" rowspan="2" class="td_mng td_mng_s"><?php echo $s_mod ?><?php echo $s_grp ?></td>
|
|
||||||
</tr>
|
|
||||||
<tr class="<?php echo $bg; ?>">
|
|
||||||
<td headers="mb_list_name" class="td_mbname"><?php echo get_text($row['mb_name']); ?></td>
|
|
||||||
<td headers="mb_list_nick" class="td_name sv_use">
|
|
||||||
<div><?php echo $mb_nick ?></div>
|
|
||||||
</td>
|
|
||||||
<td headers="mb_list_adultc">
|
|
||||||
<label for="mb_adult_<?php echo $i; ?>" class="sound_only">성인인증</label>
|
|
||||||
<input type="checkbox" name="mb_adult[<?php echo $i; ?>]" <?php echo $row['mb_adult'] ? 'checked' : ''; ?> value="1" id="mb_adult_<?php echo $i; ?>">
|
|
||||||
</td>
|
|
||||||
<td headers="mb_list_deny">
|
|
||||||
<?php if (empty($row['mb_leave_date'])) { ?>
|
|
||||||
<input type="checkbox" name="mb_intercept_date[<?php echo $i; ?>]" <?php echo $row['mb_intercept_date'] ? 'checked' : ''; ?> value="<?php echo $intercept_date ?>" id="mb_intercept_date_<?php echo $i ?>" title="<?php echo $intercept_title ?>">
|
|
||||||
<label for="mb_intercept_date_<?php echo $i; ?>" class="sound_only">접근차단</label>
|
|
||||||
<?php } ?>
|
|
||||||
</td>
|
|
||||||
<td headers="mb_list_sms">
|
|
||||||
<label for="mb_sms_<?php echo $i; ?>" class="sound_only">광고성SMS/카카오톡수신</label>
|
|
||||||
<input type="checkbox" name="mb_sms[<?php echo $i; ?>]" <?php echo $row['mb_sms'] ? 'checked' : ''; ?> value="1" id="mb_sms_<?php echo $i; ?>">
|
|
||||||
<input type="hidden" name="mb_sms_default[<?php echo $i; ?>]" value="<?php echo isset($row['mb_sms']) ? $row['mb_sms'] : '0'; ?> " id="mb_sms_default_<?php echo $i; ?>">
|
|
||||||
</td>
|
|
||||||
<td headers="mb_list_auth" class="td_mbstat">
|
|
||||||
<?php echo get_member_level_select("mb_level[$i]", 1, $member['mb_level'], $row['mb_level']) ?>
|
|
||||||
</td>
|
|
||||||
<td headers="mb_list_tel" class="td_tel"><?php echo get_text($row['mb_tel']); ?></td>
|
|
||||||
<td headers="mb_list_join" class="td_date"><?php echo substr($row['mb_datetime'], 2, 8); ?></td>
|
|
||||||
<td headers="mb_list_point" class="td_num"><a href="point_list.php?sfl=mb_id&stx=<?php echo $row['mb_id'] ?>"><?php echo number_format($row['mb_point']) ?></a></td>
|
|
||||||
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
}
|
}
|
||||||
if ($i == 0) {
|
}
|
||||||
echo "<tr><td colspan=\"" . $colspan . "\" class=\"empty_table\">자료가 없습니다.</td></tr>";
|
?>
|
||||||
}
|
</td>
|
||||||
?>
|
<td headers="mb_list_cert" rowspan="2" class="td_mbcert">
|
||||||
</tbody>
|
<input type="radio" name="mb_certify[<?php echo $i; ?>]" value="ipin" id="mb_certify_ipin_<?php echo $i; ?>" <?php echo $row['mb_certify']=='ipin'?'checked':''; ?>>
|
||||||
</table>
|
<label for="mb_certify_ipin_<?php echo $i; ?>">아이핀</label><br>
|
||||||
</div>
|
<input type="radio" name="mb_certify[<?php echo $i; ?>]" value="hp" id="mb_certify_hp_<?php echo $i; ?>" <?php echo $row['mb_certify']=='hp'?'checked':''; ?>>
|
||||||
|
<label for="mb_certify_hp_<?php echo $i; ?>">휴대폰</label>
|
||||||
|
</td>
|
||||||
|
<td headers="mb_list_mailc"><?php echo preg_match('/[1-9]/', $row['mb_email_certify'])?'<span class="txt_true">Yes</span>':'<span class="txt_false">No</span>'; ?></td>
|
||||||
|
<td headers="mb_list_open">
|
||||||
|
<label for="mb_open_<?php echo $i; ?>" class="sound_only">정보공개</label>
|
||||||
|
<input type="checkbox" name="mb_open[<?php echo $i; ?>]" <?php echo $row['mb_open']?'checked':''; ?> value="1" id="mb_open_<?php echo $i; ?>">
|
||||||
|
</td>
|
||||||
|
<td headers="mb_list_mailr">
|
||||||
|
<label for="mb_mailling_<?php echo $i; ?>" class="sound_only">메일수신</label>
|
||||||
|
<input type="checkbox" name="mb_mailling[<?php echo $i; ?>]" <?php echo $row['mb_mailling']?'checked':''; ?> value="1" id="mb_mailling_<?php echo $i; ?>">
|
||||||
|
</td>
|
||||||
|
<td headers="mb_list_auth" class="td_mbstat">
|
||||||
|
<?php
|
||||||
|
if ($leave_msg || $intercept_msg) echo $leave_msg.' '.$intercept_msg;
|
||||||
|
else echo "정상";
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
<td headers="mb_list_mobile" class="td_tel"><?php echo get_text($row['mb_hp']); ?></td>
|
||||||
|
<td headers="mb_list_lastcall" class="td_date"><?php echo substr($row['mb_today_login'],2,8); ?></td>
|
||||||
|
<td headers="mb_list_grp" class="td_numsmall"><?php echo $group ?></td>
|
||||||
|
<td headers="mb_list_mng" rowspan="2" class="td_mng td_mng_s"><?php echo $s_mod ?><?php echo $s_grp ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr class="<?php echo $bg; ?>">
|
||||||
|
<td headers="mb_list_name" class="td_mbname"><?php echo get_text($row['mb_name']); ?></td>
|
||||||
|
<td headers="mb_list_nick" class="td_name sv_use"><div><?php echo $mb_nick ?></div></td>
|
||||||
|
|
||||||
|
<td headers="mb_list_sms">
|
||||||
|
<label for="mb_sms_<?php echo $i; ?>" class="sound_only">SMS수신</label>
|
||||||
|
<input type="checkbox" name="mb_sms[<?php echo $i; ?>]" <?php echo $row['mb_sms']?'checked':''; ?> value="1" id="mb_sms_<?php echo $i; ?>">
|
||||||
|
</td>
|
||||||
|
<td headers="mb_list_adultc">
|
||||||
|
<label for="mb_adult_<?php echo $i; ?>" class="sound_only">성인인증</label>
|
||||||
|
<input type="checkbox" name="mb_adult[<?php echo $i; ?>]" <?php echo $row['mb_adult']?'checked':''; ?> value="1" id="mb_adult_<?php echo $i; ?>">
|
||||||
|
</td>
|
||||||
|
<td headers="mb_list_deny">
|
||||||
|
<?php if(empty($row['mb_leave_date'])){ ?>
|
||||||
|
<input type="checkbox" name="mb_intercept_date[<?php echo $i; ?>]" <?php echo $row['mb_intercept_date']?'checked':''; ?> value="<?php echo $intercept_date ?>" id="mb_intercept_date_<?php echo $i ?>" title="<?php echo $intercept_title ?>">
|
||||||
|
<label for="mb_intercept_date_<?php echo $i; ?>" class="sound_only">접근차단</label>
|
||||||
|
<?php } ?>
|
||||||
|
</td>
|
||||||
|
<td headers="mb_list_auth" class="td_mbstat">
|
||||||
|
<?php echo get_member_level_select("mb_level[$i]", 1, $member['mb_level'], $row['mb_level']) ?>
|
||||||
|
</td>
|
||||||
|
<td headers="mb_list_tel" class="td_tel"><?php echo get_text($row['mb_tel']); ?></td>
|
||||||
|
<td headers="mb_list_join" class="td_date"><?php echo substr($row['mb_datetime'],2,8); ?></td>
|
||||||
|
<td headers="mb_list_point" class="td_num"><a href="point_list.php?sfl=mb_id&stx=<?php echo $row['mb_id'] ?>"><?php echo number_format($row['mb_point']) ?></a></td>
|
||||||
|
|
||||||
<div class="btn_fixed_top">
|
</tr>
|
||||||
<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">
|
|
||||||
<?php if ($is_admin == 'super') { ?>
|
|
||||||
<a href="./member_form.php" id="member_add" class="btn btn_01">회원추가</a>
|
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
</div>
|
<?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">
|
||||||
|
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value" class="btn btn_02">
|
||||||
|
<?php if ($is_admin == 'super') { ?>
|
||||||
|
<a href="./member_form.php" id="member_add" class="btn btn_01">회원추가</a>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, '?' . $qstr . '&page='); ?>
|
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, '?'.$qstr.'&page='); ?>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function fmemberlist_submit(f) {
|
function fmemberlist_submit(f)
|
||||||
if (!is_checked("chk[]")) {
|
{
|
||||||
alert(document.pressed + " 하실 항목을 하나 이상 선택하세요.");
|
if (!is_checked("chk[]")) {
|
||||||
|
alert(document.pressed+" 하실 항목을 하나 이상 선택하세요.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(document.pressed == "선택삭제") {
|
||||||
|
if(!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (document.pressed == "선택삭제") {
|
|
||||||
if (!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
require_once './admin.tail.php';
|
include_once ('./admin.tail.php');
|
||||||
|
?>
|
||||||
|
|||||||
@@ -1,15 +1,16 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "200100";
|
$sub_menu = "200100";
|
||||||
require_once "./_common.php";
|
include_once("./_common.php");
|
||||||
|
|
||||||
check_demo();
|
check_demo();
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, "d");
|
auth_check($auth[$sub_menu], "d");
|
||||||
|
|
||||||
check_admin_token();
|
check_admin_token();
|
||||||
|
|
||||||
$msg = "";
|
$msg = "";
|
||||||
for ($i = 0; $i < count($chk); $i++) {
|
for ($i=0; $i<count($chk); $i++)
|
||||||
|
{
|
||||||
// 실제 번호를 넘김
|
// 실제 번호를 넘김
|
||||||
$k = $_POST['chk'][$i];
|
$k = $_POST['chk'][$i];
|
||||||
|
|
||||||
@@ -17,11 +18,11 @@ for ($i = 0; $i < count($chk); $i++) {
|
|||||||
|
|
||||||
if (!$mb['mb_id']) {
|
if (!$mb['mb_id']) {
|
||||||
$msg .= "{$mb['mb_id']} : 회원자료가 존재하지 않습니다.\\n";
|
$msg .= "{$mb['mb_id']} : 회원자료가 존재하지 않습니다.\\n";
|
||||||
} elseif ($member['mb_id'] == $mb['mb_id']) {
|
} else if ($member['mb_id'] == $mb['mb_id']) {
|
||||||
$msg .= "{$mb['mb_id']} : 로그인 중인 관리자는 삭제 할 수 없습니다.\\n";
|
$msg .= "{$mb['mb_id']} : 로그인 중인 관리자는 삭제 할 수 없습니다.\\n";
|
||||||
} elseif (is_admin($mb['mb_id']) == "super") {
|
} else if (is_admin($mb['mb_id']) == "super") {
|
||||||
$msg .= "{$mb['mb_id']} : 최고 관리자는 삭제할 수 없습니다.\\n";
|
$msg .= "{$mb['mb_id']} : 최고 관리자는 삭제할 수 없습니다.\\n";
|
||||||
} elseif ($is_admin != "super" && $mb['mb_level'] >= $member['mb_level']) {
|
} else if ($is_admin != "super" && $mb['mb_level'] >= $member['mb_level']) {
|
||||||
$msg .= "{$mb['mb_id']} : 자신보다 권한이 높거나 같은 회원은 삭제할 수 없습니다.\\n";
|
$msg .= "{$mb['mb_id']} : 자신보다 권한이 높거나 같은 회원은 삭제할 수 없습니다.\\n";
|
||||||
} else {
|
} else {
|
||||||
// 회원자료 삭제
|
// 회원자료 삭제
|
||||||
@@ -29,8 +30,8 @@ for ($i = 0; $i < count($chk); $i++) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($msg) {
|
if ($msg)
|
||||||
echo "<script type='text/javascript'> alert('$msg'); </script>";
|
echo "<script type='text/javascript'> alert('$msg'); </script>";
|
||||||
}
|
|
||||||
|
|
||||||
goto_url("./member_list.php?$qstr");
|
goto_url("./member_list.php?$qstr");
|
||||||
|
?>
|
||||||
|
|||||||
@@ -1,285 +0,0 @@
|
|||||||
<?php
|
|
||||||
/*************************************************************************
|
|
||||||
**
|
|
||||||
** 내보내기 관련 상수 정의
|
|
||||||
**
|
|
||||||
*************************************************************************/
|
|
||||||
define('MEMBER_EXPORT_PAGE_SIZE', 10000); // 파일당 처리할 회원 수
|
|
||||||
define('MEMBER_EXPORT_MAX_SIZE', 300000); // 최대 처리할 회원 수
|
|
||||||
define('MEMBER_BASE_DIR', "member_list"); // 엑셀 베이스 폴더
|
|
||||||
// 폴더/파일명용 날짜 - 저장 경로가 추측되지 않도록 임의 문자열을 덧붙인다.
|
|
||||||
define('MEMBER_BASE_SALT', function_exists('get_random_token_string') ? get_random_token_string(8) : substr(md5(uniqid(mt_rand(), true)), 0, 8));
|
|
||||||
define('MEMBER_BASE_DATE', date('YmdHis') . '_' . MEMBER_BASE_SALT);
|
|
||||||
define('MEMBER_EXPORT_DIR', G5_DATA_PATH . "/" . MEMBER_BASE_DIR . "/" . MEMBER_BASE_DATE); // 엑셀 파일 저장 경로
|
|
||||||
define('MEMBER_LOG_DIR', G5_DATA_PATH . "/" . MEMBER_BASE_DIR . "/" . "log"); // 로그 파일 저장 경로
|
|
||||||
|
|
||||||
/*************************************************************************
|
|
||||||
**
|
|
||||||
** 공통 함수 정의
|
|
||||||
**
|
|
||||||
*************************************************************************/
|
|
||||||
/**
|
|
||||||
* 검색 옵션 설정
|
|
||||||
*/
|
|
||||||
function get_export_config($type = null)
|
|
||||||
{
|
|
||||||
$config = array(
|
|
||||||
'sfl_list' => array(
|
|
||||||
'mb_id'=>'아이디',
|
|
||||||
'mb_name'=>'이름',
|
|
||||||
'mb_nick'=>'닉네임',
|
|
||||||
'mb_email'=>'이메일',
|
|
||||||
'mb_tel'=>'전화번호',
|
|
||||||
'mb_hp'=>'휴대폰번호',
|
|
||||||
'mb_addr1'=>'주소'
|
|
||||||
),
|
|
||||||
'point_cond_map' => array(
|
|
||||||
'gte'=>'≥',
|
|
||||||
'lte'=>'≤',
|
|
||||||
'eq'=>'='
|
|
||||||
),
|
|
||||||
'intercept_list' => array(
|
|
||||||
'exclude'=>'차단회원 제외',
|
|
||||||
'only'=>'차단회원만'
|
|
||||||
),
|
|
||||||
'ad_range_list' => array(
|
|
||||||
'all' => '수신동의 회원 전체',
|
|
||||||
'mailling_only' => '이메일 수신동의 회원만',
|
|
||||||
'sms_only' => 'SMS/카카오톡 수신동의 회원만',
|
|
||||||
'month_confirm' => date('m월').' 수신동의 확인 대상만',
|
|
||||||
'custom_period' => '수신동의 기간 직접 입력'
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
return $type ? (isset($config[$type]) ? $config[$type] : array()) : $config;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 파라미터 수집 및 유효성 검사
|
|
||||||
*/
|
|
||||||
function get_member_export_params()
|
|
||||||
{
|
|
||||||
$params = array(
|
|
||||||
'page' => 1,
|
|
||||||
'use_stx' => isset($_GET['use_stx']) ? $_GET['use_stx'] : 0,
|
|
||||||
'stx_cond' => clean_xss_tags(isset($_GET['stx_cond']) ? $_GET['stx_cond'] : 'like'),
|
|
||||||
'sfl' => clean_xss_tags(isset($_GET['sfl']) ? $_GET['sfl'] : ''),
|
|
||||||
'stx' => clean_xss_tags(isset($_GET['stx']) ? $_GET['stx'] : ''),
|
|
||||||
'use_level' => isset($_GET['use_level']) ? $_GET['use_level'] : 0,
|
|
||||||
'level_start' => (int)(isset($_GET['level_start']) ? $_GET['level_start'] : 1),
|
|
||||||
'level_end' => (int)(isset($_GET['level_end']) ? $_GET['level_end'] : 10),
|
|
||||||
'use_date' => isset($_GET['use_date']) ? $_GET['use_date'] : 0,
|
|
||||||
'date_start' => clean_xss_tags(isset($_GET['date_start']) ? $_GET['date_start'] : ''),
|
|
||||||
'date_end' => clean_xss_tags(isset($_GET['date_end']) ? $_GET['date_end'] : ''),
|
|
||||||
'use_point' => isset($_GET['use_point']) ? $_GET['use_point'] : 0,
|
|
||||||
'point' => isset($_GET['point']) ? $_GET['point'] : '',
|
|
||||||
'point_cond' => isset($_GET['point_cond']) ? $_GET['point_cond'] : 'gte',
|
|
||||||
'use_hp_exist' => isset($_GET['use_hp_exist']) ? $_GET['use_hp_exist'] : 0,
|
|
||||||
'ad_range_only' => isset($_GET['ad_range_only']) ? $_GET['ad_range_only'] : 0,
|
|
||||||
'ad_range_type' => clean_xss_tags(isset($_GET['ad_range_type']) ? $_GET['ad_range_type'] : 'all'),
|
|
||||||
'ad_mailling' => isset($_GET['ad_mailling']) ? $_GET['ad_mailling'] : 0,
|
|
||||||
'ad_sms' => isset($_GET['ad_sms']) ? $_GET['ad_sms'] : 0,
|
|
||||||
'agree_date_start' => clean_xss_tags(isset($_GET['agree_date_start']) ? $_GET['agree_date_start'] : ''),
|
|
||||||
'agree_date_end' => clean_xss_tags(isset($_GET['agree_date_end']) ? $_GET['agree_date_end'] : ''),
|
|
||||||
'use_intercept' => isset($_GET['use_intercept']) ? $_GET['use_intercept'] : 0,
|
|
||||||
'intercept' => clean_xss_tags(isset($_GET['intercept']) ? $_GET['intercept'] : 'exclude'),
|
|
||||||
);
|
|
||||||
|
|
||||||
// 레벨 범위 검증
|
|
||||||
if ($params['level_start'] > $params['level_end']) {
|
|
||||||
$tmp_level = $params['level_start'];
|
|
||||||
$params['level_start'] = $params['level_end'];
|
|
||||||
$params['level_end'] = $tmp_level;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 가입기간 - 날짜 범위 검증
|
|
||||||
if ($params['use_date'] && $params['date_start'] && $params['date_end']) {
|
|
||||||
if ($params['date_start'] > $params['date_end']) {
|
|
||||||
$tmp_date = $params['date_start'];
|
|
||||||
$params['date_start'] = $params['date_end'];
|
|
||||||
$params['date_end'] = $tmp_date;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 수신동의기간 - 날짜 범위 검증
|
|
||||||
if ($params['ad_range_type'] == 'custom_period' && $params['agree_date_start'] && $params['agree_date_end']) {
|
|
||||||
if ($params['agree_date_start'] > $params['agree_date_end']) {
|
|
||||||
$tmp_agree_date = $params['agree_date_start'];
|
|
||||||
$params['agree_date_start'] = $params['agree_date_end'];
|
|
||||||
$params['agree_date_end'] = $tmp_agree_date;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $params;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 전체 데이터 개수 조회
|
|
||||||
*/
|
|
||||||
function member_export_get_total_count($params)
|
|
||||||
{
|
|
||||||
global $g5;
|
|
||||||
|
|
||||||
$where = member_export_build_where($params);
|
|
||||||
$sql = "SELECT COUNT(*) as cnt FROM {$g5['member_table']} {$where}";
|
|
||||||
|
|
||||||
$result = sql_query($sql);
|
|
||||||
if (!$result) {
|
|
||||||
throw new Exception("데이터 조회에 실패하였습니다. 다시 시도해주세요.");
|
|
||||||
}
|
|
||||||
|
|
||||||
$row = sql_fetch_array($result);
|
|
||||||
return (int)$row['cnt'];
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* WHERE 조건절 생성
|
|
||||||
*/
|
|
||||||
function member_export_build_where($params)
|
|
||||||
{
|
|
||||||
global $config;
|
|
||||||
$conditions = array();
|
|
||||||
|
|
||||||
// 기본 조건 - 탈퇴하지 않은 사용자
|
|
||||||
$conditions[] = "mb_leave_date = ''";
|
|
||||||
|
|
||||||
// 검색어 조건 (sql_escape_string 사용으로 보안 강화)
|
|
||||||
if (!empty($params['use_stx']) && $params['use_stx'] === '1') {
|
|
||||||
$sfl_list = get_export_config('sfl_list');
|
|
||||||
$sfl = in_array($params['sfl'], array_keys($sfl_list)) ? $params['sfl'] : '';
|
|
||||||
$stx = sql_escape_string($params['stx']);
|
|
||||||
|
|
||||||
if(!empty($sfl) && !empty($stx)){
|
|
||||||
if ($params['stx_cond'] === 'like') {
|
|
||||||
$conditions[] = "{$sfl} LIKE '%{$stx}%'";
|
|
||||||
} else {
|
|
||||||
$conditions[] = "{$sfl} = '{$stx}'";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 권한 조건
|
|
||||||
if (!empty($params['use_level']) && $params['use_level'] === '1') {
|
|
||||||
$level_start = max(1, (int)$params['level_start']);
|
|
||||||
$level_end = min(10, (int)$params['level_end']);
|
|
||||||
|
|
||||||
$conditions[] = "(mb_level BETWEEN {$level_start} AND {$level_end})";
|
|
||||||
}
|
|
||||||
|
|
||||||
// 가입기간 조건
|
|
||||||
if (!empty($params['use_date']) && $params['use_date'] === '1') {
|
|
||||||
$date_start = isset($params['date_start']) ? sql_escape_string(trim($params['date_start'])) : '';
|
|
||||||
$date_end = isset($params['date_end']) ? sql_escape_string(trim($params['date_end'])) : '';
|
|
||||||
|
|
||||||
if ($date_start && $date_end) {
|
|
||||||
$conditions[] = "mb_datetime BETWEEN '{$date_start} 00:00:00' AND '{$date_end} 23:59:59'";
|
|
||||||
} elseif ($date_start) {
|
|
||||||
$conditions[] = "mb_datetime >= '{$date_start} 00:00:00'";
|
|
||||||
} elseif ($date_end) {
|
|
||||||
$conditions[] = "mb_datetime <= '{$date_end} 23:59:59'";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 포인트 조건
|
|
||||||
if (!empty($params['use_point']) && $params['use_point'] === '1') {
|
|
||||||
$point = $params['point'];
|
|
||||||
$point_cond = $params['point_cond'];
|
|
||||||
|
|
||||||
if ($point != '') {
|
|
||||||
$point = (int)$point; // 정수로 캐스팅
|
|
||||||
|
|
||||||
switch ($point_cond) {
|
|
||||||
case 'lte':
|
|
||||||
$conditions[] = "mb_point <= {$point}";
|
|
||||||
break;
|
|
||||||
case 'eq':
|
|
||||||
$conditions[] = "mb_point = {$point}";
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
$conditions[] = "mb_point >= {$point}";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 휴대폰 번호 존재 조건
|
|
||||||
if (!empty($params['use_hp_exist']) && $params['use_hp_exist'] === '1') {
|
|
||||||
$conditions[] = "(mb_hp is not null and mb_hp != '')";
|
|
||||||
}
|
|
||||||
|
|
||||||
// 정보수신동의 조건
|
|
||||||
if (!empty($params['ad_range_only']) && $params['ad_range_only'] === '1') {
|
|
||||||
$range = isset($params['ad_range_type']) ? $params['ad_range_type'] : '';
|
|
||||||
|
|
||||||
// 공통: 마케팅 목적 수집·이용 동의 + (필요 시) 제3자 동의
|
|
||||||
$thirdparty_clause = $config['cf_sms_use'] !== '' ? " AND mb_thirdparty_agree = 1" : "";
|
|
||||||
$base_marketing = "mb_marketing_agree = 1{$thirdparty_clause}";
|
|
||||||
|
|
||||||
if ($range === 'all') {
|
|
||||||
// 마케팅 동의 + (이메일 OR SMS 동의)
|
|
||||||
$conditions[] = "({$base_marketing} AND (mb_mailling = 1 OR mb_sms = 1))";
|
|
||||||
} elseif ($range === 'mailling_only') {
|
|
||||||
// 마케팅 동의 + 이메일 동의
|
|
||||||
$conditions[] = "({$base_marketing} AND mb_mailling = 1)";
|
|
||||||
} elseif ($range === 'sms_only') {
|
|
||||||
// 마케팅 동의 + SMS/카카오톡 동의
|
|
||||||
$conditions[] = "({$base_marketing} AND mb_sms = 1)";
|
|
||||||
} elseif ($range === 'month_confirm' || $range === 'custom_period') {
|
|
||||||
// 채널 필터 체크
|
|
||||||
$useEmail = !empty($params['ad_mailling']);
|
|
||||||
$useSms = !empty($params['ad_sms']);
|
|
||||||
|
|
||||||
if ($range === 'month_confirm') {
|
|
||||||
// 23개월 전 그 달
|
|
||||||
$start = date('Y-m-01 00:00:00', strtotime('-23 months'));
|
|
||||||
$end = date('Y-m-t 23:59:59', strtotime('-23 months'));
|
|
||||||
$emailDateCond = "mb_mailling_date BETWEEN '{$start}' AND '{$end}'";
|
|
||||||
$smsDateCond = "mb_sms_date BETWEEN '{$start}' AND '{$end}'";
|
|
||||||
|
|
||||||
} else {
|
|
||||||
// 수신동의기간 직접 입력 - custom_period
|
|
||||||
$date_start = isset($params['agree_date_start']) ? sql_escape_string(trim($params['agree_date_start'])) : '';
|
|
||||||
$date_end = isset($params['agree_date_end']) ? sql_escape_string(trim($params['agree_date_end'])) : '';
|
|
||||||
|
|
||||||
if ($date_start && $date_end) {
|
|
||||||
$emailDateCond = "mb_mailling_date BETWEEN '{$date_start} 00:00:00' AND '{$date_end} 23:59:59'";
|
|
||||||
$smsDateCond = "mb_sms_date BETWEEN '{$date_start} 00:00:00' AND '{$date_end} 23:59:59'";
|
|
||||||
} elseif ($date_start) {
|
|
||||||
$emailDateCond = "mb_mailling_date >= '{$date_start} 00:00:00'";
|
|
||||||
$smsDateCond = "mb_sms_date >= '{$date_start} 00:00:00'";
|
|
||||||
} elseif ($date_end) {
|
|
||||||
$emailDateCond = "mb_mailling_date <= '{$date_end} 23:59:59'";
|
|
||||||
$smsDateCond = "mb_sms_date <= '{$date_end} 23:59:59'";
|
|
||||||
} else {
|
|
||||||
$emailDateCond = "mb_mailling_date <> '0000-00-00 00:00:00'";
|
|
||||||
$smsDateCond = "mb_sms_date <> '0000-00-00 00:00:00'";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!$useEmail && !$useSms) {
|
|
||||||
$conditions[] = "0=1"; // 둘 다 해제 ⇒ 결과 0건
|
|
||||||
} else {
|
|
||||||
// 조건 조립
|
|
||||||
$parts = array();
|
|
||||||
if ($useEmail) $parts[] = "(mb_mailling = 1 AND {$emailDateCond})";
|
|
||||||
if ($useSms) $parts[] = "(mb_sms = 1 AND {$smsDateCond})";
|
|
||||||
|
|
||||||
$conditions[] = !empty($parts) ? '(' . implode(' OR ', $parts) . ')' : '';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 차단 회원 조건
|
|
||||||
if (!empty($params['use_intercept']) && $params['use_intercept'] === '1') {
|
|
||||||
switch ($params['intercept']) {
|
|
||||||
case 'exclude':
|
|
||||||
$conditions[] = "mb_intercept_date = ''";
|
|
||||||
break;
|
|
||||||
case 'only':
|
|
||||||
$conditions[] = "mb_intercept_date != ''";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return empty($conditions) ? '' : 'WHERE ' . implode(' AND ', $conditions);
|
|
||||||
}
|
|
||||||
@@ -1,457 +0,0 @@
|
|||||||
<?php
|
|
||||||
$sub_menu = "200400";
|
|
||||||
require_once './_common.php';
|
|
||||||
require_once './member_list_exel.lib.php'; // 회원관리파일 공통 라이브러리
|
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, 'r');
|
|
||||||
|
|
||||||
// 파라미터 수집 및 유효성 검사
|
|
||||||
$params = get_member_export_params();
|
|
||||||
|
|
||||||
// 총건수
|
|
||||||
$total_count = 0;
|
|
||||||
$total_error = "";
|
|
||||||
try {
|
|
||||||
$total_count = member_export_get_total_count($params);
|
|
||||||
} catch (Exception $e) {
|
|
||||||
$total_error = $e->getMessage(); // 메서드 호출 괄호 필수
|
|
||||||
}
|
|
||||||
|
|
||||||
$g5['title'] = '회원관리파일';
|
|
||||||
require_once './admin.head.php';
|
|
||||||
$colspan = 14;
|
|
||||||
?>
|
|
||||||
|
|
||||||
<h2>회원 엑셀 생성</h2>
|
|
||||||
|
|
||||||
<div class="local_desc01 local_desc">
|
|
||||||
<p><b>회원수 <?php echo number_format(MEMBER_EXPORT_PAGE_SIZE);?>건 초과 시</b> <?php echo number_format(MEMBER_EXPORT_PAGE_SIZE);?>건 단위로 분리 저장되며, <b>엑셀 생성 최대 건수는 <?php echo number_format(MEMBER_EXPORT_MAX_SIZE);?>건</b>입니다. 초과 시 조건 추가 설정 후 재시도하시기 바랍니다.</p>
|
|
||||||
<p><b>수신동의 확인 대상은 만료일까지 1달 미만인 회원</b>을 기준으로 필터링됩니다.</p>
|
|
||||||
|
|
||||||
<br>
|
|
||||||
<p>파일 생성 시 서버에 임시 생성된 파일 중 <b>오늘 날짜를 제외 한 파일은 자동 삭제</b>되며, 수동 삭제 필요 시 <a href="<?php echo G5_ADMIN_URL;?>/member_list_file_delete.php"><b>회원관리파일 일괄삭제</b></a>에서 진행하시기 바랍니다.</p>
|
|
||||||
<p>회원 정보 수정은 <a href="<?php echo G5_ADMIN_URL;?>/member_list.php" class="link"><b>회원 관리</b></a>에서 진행하실 수 있습니다.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="local_ov01 local_ov">
|
|
||||||
<span class="btn_ov01">
|
|
||||||
<span class="ov_txt">총건수 </span>
|
|
||||||
<?php if($total_error != "") { ?>
|
|
||||||
<span class="ov_num"> <?php echo $total_error ?></span>
|
|
||||||
<?php } else {?>
|
|
||||||
<span class="ov_num"> <?php echo number_format($total_count) ?>건</span>
|
|
||||||
<?php } ?>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 회원 검색 필터링 폼 -->
|
|
||||||
<form id="fsearch" name="fsearch" class="member_list_data" method="get">
|
|
||||||
<input type="hidden" name="token" value="<?php echo get_token(); ?>">
|
|
||||||
<fieldset>
|
|
||||||
<legend class="sound_only">회원 검색 필터링</legend>
|
|
||||||
<div class="sch_table">
|
|
||||||
|
|
||||||
<!-- 검색어 적용 -->
|
|
||||||
<div class="sch_row">
|
|
||||||
<div class="label">
|
|
||||||
<label>
|
|
||||||
<input type="checkbox" name="use_stx" value="1" <?php echo isset($_GET['use_stx']) ? 'checked' : ''; ?>>
|
|
||||||
검색어 적용
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
<div class="field">
|
|
||||||
<select name="sfl">
|
|
||||||
<?php
|
|
||||||
// 검색어 옵션 : [정의] get_export_config() - adm/member_list_exel.lib.php;
|
|
||||||
foreach (get_export_config('sfl_list') as $val => $label) {
|
|
||||||
$selected = (isset($_GET['sfl']) && $_GET['sfl'] === $val) ? 'selected' : '';
|
|
||||||
echo "<option value=\"$val\" $selected>$label</option>";
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
<input type="text" name="stx" value="<?php echo htmlspecialchars(isset($_GET['stx']) ? $_GET['stx'] : ''); ?>" placeholder="검색어 입력">
|
|
||||||
<span class="radio_group">
|
|
||||||
<label><input type="radio" name="stx_cond" value="like" <?php echo (isset($_GET['stx_cond']) ? $_GET['stx_cond'] : 'like') === 'like' ? 'checked' : ''; ?>> 포함</label>
|
|
||||||
<label><input type="radio" name="stx_cond" value="equal" <?php echo (isset($_GET['stx_cond']) ? $_GET['stx_cond'] : '') === 'equal' ? 'checked' : ''; ?>> 일치</label>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 레벨 적용 -->
|
|
||||||
<div class="sch_row">
|
|
||||||
<div class="label">
|
|
||||||
<label><input type="checkbox" name="use_level" value="1" <?php echo isset($_GET['use_level']) ? 'checked' : ''; ?>> 레벨 적용</label>
|
|
||||||
</div>
|
|
||||||
<div class="field">
|
|
||||||
<select name="level_start">
|
|
||||||
<?php for ($i = 1; $i <= 10; $i++): ?>
|
|
||||||
<option value="<?php echo $i; ?>" <?php echo (isset($_GET['level_start']) && $_GET['level_start'] == $i) ? 'selected' : ''; ?>><?php echo $i; ?></option>
|
|
||||||
<?php endfor; ?>
|
|
||||||
</select> ~
|
|
||||||
<select name="level_end">
|
|
||||||
<?php for ($i = 1; $i <= 10; $i++): ?>
|
|
||||||
<option value="<?php echo $i; ?>" <?php echo (isset($_GET['level_end']) && $_GET['level_end'] == $i) ? 'selected' : ''; ?>><?php echo $i; ?></option>
|
|
||||||
<?php endfor; ?>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 가입기간 적용 -->
|
|
||||||
<div class="sch_row">
|
|
||||||
<div class="label">
|
|
||||||
<label><input type="checkbox" name="use_date" value="1" <?php echo isset($_GET['use_date']) ? 'checked' : ''; ?>> 가입기간 적용</label>
|
|
||||||
</div>
|
|
||||||
<div class="field">
|
|
||||||
<input type="date" name="date_start" max="9999-12-31" value="<?php echo htmlspecialchars(isset($_GET['date_start']) ? $_GET['date_start'] : ''); ?>"> ~
|
|
||||||
<input type="date" name="date_end" max="9999-12-31" value="<?php echo htmlspecialchars(isset($_GET['date_end']) ? $_GET['date_end'] : ''); ?>">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 포인트 적용 -->
|
|
||||||
<div class="sch_row">
|
|
||||||
<div class="label">
|
|
||||||
<label><input type="checkbox" name="use_point" value="1" <?php echo isset($_GET['use_point']) ? 'checked' : ''; ?>> 포인트 적용</label>
|
|
||||||
</div>
|
|
||||||
<div class="field">
|
|
||||||
<input type="number" name="point" value="<?php echo htmlspecialchars(isset($_GET['point']) ? $_GET['point'] : ''); ?>" placeholder="포인트 입력">
|
|
||||||
<span class="radio_group">
|
|
||||||
<label><input type="radio" name="point_cond" value="gte" <?php echo (isset($_GET['point_cond']) ? $_GET['point_cond'] : 'gte') === 'gte' ? 'checked' : ''; ?>> 이상</label>
|
|
||||||
<label><input type="radio" name="point_cond" value="lte" <?php echo (isset($_GET['point_cond']) ? $_GET['point_cond'] : '') === 'lte' ? 'checked' : ''; ?>> 이하</label>
|
|
||||||
<label><input type="radio" name="point_cond" value="eq" <?php echo (isset($_GET['point_cond']) ? $_GET['point_cond'] : '') === 'eq' ? 'checked' : ''; ?>> 일치</label>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 차단회원 조건 -->
|
|
||||||
<div class="sch_row">
|
|
||||||
<div class="label">
|
|
||||||
<label><input type="checkbox" name="use_intercept" value="1" <?php echo isset($_GET['use_intercept']) ? 'checked' : ''; ?>> 차단회원</label>
|
|
||||||
</div>
|
|
||||||
<div class="field">
|
|
||||||
<select name="intercept" id="intercept">
|
|
||||||
<?php
|
|
||||||
// 차단회원 옵션 : [정의] get_export_config() - adm/member_list_exel.lib.php
|
|
||||||
foreach (get_export_config('intercept_list') as $val => $label) {
|
|
||||||
$selected = ((isset($_GET['intercept']) ? $_GET['intercept'] : '') === $val) ? 'selected' : '';
|
|
||||||
echo "<option value=\"$val\" $selected>$label</option>";
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 휴대폰 번호 조건 - 초기세팅(설정에 휴대폰번호가 보이기/필수입력이면 기본값 checked로 설정) -->
|
|
||||||
<div class="sch_row">
|
|
||||||
<div class="label">
|
|
||||||
<label>
|
|
||||||
<?php $use_hp_checked = isset($_GET['token']) ? (isset($_GET['use_hp_exist']) ? 'checked' : '') : (($config['cf_use_hp'] || $config['cf_req_hp']) ? 'checked' : '');?>
|
|
||||||
<input type="checkbox" name="use_hp_exist" value="1" <?php echo $use_hp_checked; ?>> 휴대폰 번호 있는 경우만
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 정보수신동의 조건 -->
|
|
||||||
<div class="sch_row">
|
|
||||||
<div class="label">
|
|
||||||
<label><input type="checkbox" name="ad_range_only" value="1" <?php echo isset($_GET['ad_range_only']) ? 'checked' : ''; ?>> 정보수신동의에 동의한 경우만</label>
|
|
||||||
</div>
|
|
||||||
<!-- 안내 문구 -->
|
|
||||||
<div class="field">
|
|
||||||
<p class="sch_notice">「정보통신망이용촉진및정보보호등에관한법률」에 따라 <b>광고성 정보 수신동의 여부</b>를 <b>매2년</b>마다 확인해야 합니다.</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="sch_row <?php echo isset($_GET['ad_range_only']) ? '' : 'is-hidden'; ?>">
|
|
||||||
<div class="ad_range_wrap">
|
|
||||||
<div class="ad_range_box">
|
|
||||||
<div class="label">
|
|
||||||
<label for="ad_range_type">회원범위</label>
|
|
||||||
</div>
|
|
||||||
<div class="field">
|
|
||||||
<select name="ad_range_type" id="ad_range_type">
|
|
||||||
<?php
|
|
||||||
foreach (get_export_config('ad_range_list') as $val => $label) {
|
|
||||||
$selected = ((isset($_GET['ad_range_type']) ? $_GET['ad_range_type'] : '') === $val) ? 'selected' : '';
|
|
||||||
echo "<option value=\"$val\" $selected>$label</option>";
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<div class="ad_range_wrap">
|
|
||||||
<!-- 기간 직접 입력 -->
|
|
||||||
<div class="ad_range_box <?php echo isset($_GET['ad_range_only']) && (isset($_GET['ad_range_type']) ? $_GET['ad_range_type'] : '') == 'custom_period' ? '' : 'is-hidden'; ?>">
|
|
||||||
<div class="field">
|
|
||||||
<input type="date" name="agree_date_start" max="9999-12-31" value="<?php echo htmlspecialchars(isset($_GET['agree_date_start']) ? $_GET['agree_date_start'] : date('Y-m-d', strtotime('-1 month'))); ?>"> ~
|
|
||||||
<input type="date" name="agree_date_end" max="9999-12-31" value="<?php echo htmlspecialchars(isset($_GET['agree_date_end']) ? $_GET['agree_date_end'] : date('Y-m-d')); ?>">
|
|
||||||
<p>* 광고성 정보 수신(<b>이메일 또는 SMS/카카오톡</b>) 동의일자 기준</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 설명 문구 -->
|
|
||||||
<?php
|
|
||||||
$thirdpartyLbl = (!empty($config['cf_sms_use'])) ? ' / <b>개인정보 제3자 제공</b>' : '';
|
|
||||||
|
|
||||||
$ad_range_text = array(
|
|
||||||
'all' => "* <b>광고성 정보 수신(이메일 또는 SMS/카카오톡)</b> / <b>마케팅 목적의 개인정보 수집 및 이용</b>{$thirdpartyLbl}에 모두 동의한 회원을 선택합니다.",
|
|
||||||
'mailling_only' => "* <b>광고성 이메일 수신</b> / <b>마케팅 목적의 개인정보 수집 및 이용</b>{$thirdpartyLbl}에 모두 동의한 회원을 선택합니다.",
|
|
||||||
'sms_only' => "* <b>광고성 SMS/카카오톡 수신</b> / <b>마케팅 목적의 개인정보 수집 및 이용</b>{$thirdpartyLbl}에 모두 동의한 회원을 선택합니다.",
|
|
||||||
'month_confirm' => "* 23개월 전(" . date('Y년 m월', strtotime('-23 month')) . ") <b>광고성 정보 수신 동의(이메일 또는 SMS/카카오톡)</b>한 회원을 선택합니다."
|
|
||||||
);
|
|
||||||
|
|
||||||
if (isset($_GET['ad_range_only'], $_GET['ad_range_type']) && isset($ad_range_text[$_GET['ad_range_type']])) {
|
|
||||||
echo '<div class="ad_range_box"><p>' . $ad_range_text[$_GET['ad_range_type']] . '</p></div>';
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
<br>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 채널 체크박스 -->
|
|
||||||
<div class="sch_row <?php echo isset($_GET['ad_range_only']) && in_array($_GET['ad_range_type'], array('month_confirm', 'custom_period')) ? '' : 'is-hidden'; ?>">
|
|
||||||
<div class="ad_range_wrap">
|
|
||||||
<div class="ad_range_box">
|
|
||||||
<div class="label">
|
|
||||||
</div>
|
|
||||||
<div class="field">
|
|
||||||
<?php $ad_mailling_checked = isset($_GET['token']) ? (isset($_GET['ad_mailling']) ? 'checked' : '') : 'checked';?>
|
|
||||||
<?php $ad_sms_checked = isset($_GET['token']) ? (isset($_GET['ad_sms']) ? 'checked' : '') : 'checked';?>
|
|
||||||
<label><input type="checkbox" name="ad_mailling" value="1" <?php echo $ad_mailling_checked; ?>> 광고성 이메일 수신</label>
|
|
||||||
<label><input type="checkbox" name="ad_sms" value="1" <?php echo $ad_sms_checked; ?>> 광고성 SMS/카카오톡 수신</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="sch_btn">
|
|
||||||
<button type="button" id="btnExcelDownload">엑셀파일 다운로드</button>
|
|
||||||
<button type="button" class="btn_reset" onclick="location.href='?'">초기화</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
document.querySelector('input[name="ad_range_only"]').addEventListener('change', function () {
|
|
||||||
document.querySelectorAll('.ad_range_wrap').forEach(el => {
|
|
||||||
el.classList.toggle('is-hidden', !this.checked);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
document.querySelectorAll('#fsearch input, #fsearch select').forEach(el => {
|
|
||||||
const submit = () => document.getElementById('fsearch').submit();
|
|
||||||
el.addEventListener(el.type === 'date' ? 'blur' : 'change', submit);
|
|
||||||
|
|
||||||
el.addEventListener('keydown', e => {
|
|
||||||
if (e.key === 'Enter') {
|
|
||||||
e.preventDefault();
|
|
||||||
submit();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
let eventSource = null;
|
|
||||||
|
|
||||||
// 일반 엑셀 다운로드 버튼 클릭
|
|
||||||
document.getElementById('btnExcelDownload').addEventListener('click', () => {
|
|
||||||
startExcelDownload();
|
|
||||||
});
|
|
||||||
|
|
||||||
// 엑셀 다운로드 실행
|
|
||||||
// 1. 기존 SSE 종료
|
|
||||||
function closePreviousEventSource() {
|
|
||||||
if (eventSource) {
|
|
||||||
eventSource.close();
|
|
||||||
eventSource = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 2. FormData QueryString 변환
|
|
||||||
function buildDownloadParams() {
|
|
||||||
const formData = new FormData(document.getElementById('fsearch'));
|
|
||||||
const params = new URLSearchParams(formData);
|
|
||||||
|
|
||||||
params.append('mode', 'start');
|
|
||||||
|
|
||||||
return params.toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
// 3. 메인 함수
|
|
||||||
function startExcelDownload() {
|
|
||||||
closePreviousEventSource();
|
|
||||||
|
|
||||||
const query = buildDownloadParams();
|
|
||||||
showDownloadPopup();
|
|
||||||
|
|
||||||
eventSource = new EventSource(`member_list_exel_export.php?${query}`);
|
|
||||||
eventSource.onmessage = handleProgressUpdate();
|
|
||||||
eventSource.onerror = handleDownloadError();
|
|
||||||
}
|
|
||||||
|
|
||||||
// 다운로드 팝업 표시
|
|
||||||
function showDownloadPopup() {
|
|
||||||
const bodyHTML = `
|
|
||||||
<div class="excel-download-progress">
|
|
||||||
<div class="progress-desc">
|
|
||||||
<p class="progress-summary">총 <strong>0</strong>개 파일로 분할됩니다</p>
|
|
||||||
<p class="progress-message"><strong>(0 / 0)</strong> 파일 다운로드 중</p>
|
|
||||||
<p class="progress-error"></p>
|
|
||||||
</div>
|
|
||||||
<div class="progress-spinner">
|
|
||||||
<div class="spinner"></div>
|
|
||||||
<p class="loading-message">
|
|
||||||
엑셀 파일을 생성 중입니다. 잠시만 기다려주세요.<br>
|
|
||||||
현재 데이터 기준으로 <strong id="estimatedTimeText"></strong> 정도 소요될 수 있습니다.<br>
|
|
||||||
<strong>페이지를 벗어나거나 닫으면 다운로드가 중단</strong>되니, 작업 완료까지 기다려 주세요.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div class="progress-box">
|
|
||||||
<div class="progress-download-box"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
`;
|
|
||||||
|
|
||||||
PopupManager.render('엑셀 다운로드 진행 중', bodyHTML, '', { disableOutsideClose: true });
|
|
||||||
|
|
||||||
// 닫기 버튼 이벤트 핸들링
|
|
||||||
const closeBtn = document.querySelector('.popup-close-btn');
|
|
||||||
if (closeBtn) {
|
|
||||||
closeBtn.removeAttribute('onclick');
|
|
||||||
closeBtn.addEventListener('click', handlePopupCloseWithConfirm);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 닫기 버튼 클릭 시 다운로드 중단 여부 확인
|
|
||||||
function handlePopupCloseWithConfirm(e) {
|
|
||||||
if (eventSource) {
|
|
||||||
const confirmClose = confirm("엑셀 다운로드가 진행 중입니다.\n정말 중지하시겠습니까?");
|
|
||||||
if (!confirmClose) {
|
|
||||||
e.preventDefault();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
eventSource.close();
|
|
||||||
eventSource = null;
|
|
||||||
alert("엑셀 다운로드가 중단되었습니다.");
|
|
||||||
}
|
|
||||||
PopupManager.close('popupOverlay');
|
|
||||||
}
|
|
||||||
|
|
||||||
// 엑셀 생성 및 다운로드 실행
|
|
||||||
function handleProgressUpdate() {
|
|
||||||
return function(e) {
|
|
||||||
const data = JSON.parse(e.data);
|
|
||||||
const { status, downloadType, message, total, current, totalChunks, currentChunk, zipFile, files, filePath } = data;
|
|
||||||
|
|
||||||
// DOM 요소 캐싱
|
|
||||||
const titleEl = document.getElementById('popupTitle');
|
|
||||||
const summaryEl = document.querySelector('.progress-summary');
|
|
||||||
const messageEl = document.querySelector('.progress-message');
|
|
||||||
const spinnerEl = document.querySelector('.progress-spinner');
|
|
||||||
const resultEl = document.querySelector('.loading-message');
|
|
||||||
const downloadBoxEl = document.querySelector('.progress-download-box');
|
|
||||||
const errorEl = document.querySelector('.progress-error');
|
|
||||||
|
|
||||||
if (status === "progress")
|
|
||||||
{
|
|
||||||
summaryEl.innerHTML = `총 <strong>${totalChunks}</strong>개 파일로 ` + (downloadType === 2 ? `분할 생성됩니다` : `다운로드됩니다`) + ` (총 ${total.toLocaleString('ko-KR')}건)`;
|
|
||||||
messageEl.innerHTML = downloadType === 2 ? `<strong>(${currentChunk} / ${totalChunks})</strong> 파일 생성 중` : `엑셀 파일 생성 중`;
|
|
||||||
|
|
||||||
/* 작업 소요 시간 : 예상 시간 (1만건당 10초) */
|
|
||||||
const sec = Math.max(5, Math.ceil(total * 0.0012 * 1.2)); // 최소 5초 보장
|
|
||||||
const text = `예상 처리 시간은 약 ${sec >= 60 ? `${Math.floor(sec / 60)}분 ${sec % 60}초` : `${sec}초`}`;
|
|
||||||
document.getElementById('estimatedTimeText').innerText = text;
|
|
||||||
}
|
|
||||||
else if (status === "zipping")
|
|
||||||
{
|
|
||||||
summaryEl.innerHTML = `총 <strong>${totalChunks}</strong>개 파일이 압축파일로 생성됩니다`;
|
|
||||||
messageEl.innerHTML = `<strong>${totalChunks}</strong> 파일 압축하는 중`;
|
|
||||||
}
|
|
||||||
else if (status === "zippingError")
|
|
||||||
{
|
|
||||||
errorEl.innerHTML = message;
|
|
||||||
}
|
|
||||||
else if (status === "error")
|
|
||||||
{
|
|
||||||
summaryEl.innerHTML = `엑셀 파일 다운로드 실패`;
|
|
||||||
resultEl.innerHTML = '';
|
|
||||||
spinnerEl?.classList.add('is-hidden');
|
|
||||||
|
|
||||||
const parts = message.split(/<br\s*\/?>/i);
|
|
||||||
messageEl.innerHTML = parts[0] || '';
|
|
||||||
errorEl.innerHTML = parts.slice(1).join('<br>') || '';
|
|
||||||
|
|
||||||
// SSE 작업 닫기
|
|
||||||
eventSource?.close();
|
|
||||||
eventSource = null;
|
|
||||||
}
|
|
||||||
else if (status === "done")
|
|
||||||
{
|
|
||||||
// SSE 작업 닫기
|
|
||||||
eventSource?.close();
|
|
||||||
eventSource = null;
|
|
||||||
|
|
||||||
titleEl.textContent = '엑셀 파일 다운로드 완료';
|
|
||||||
messageEl.innerHTML = `<strong>총 ${total.toLocaleString('ko-KR')}건의 데이터 다운로드가 완료되었습니다!</strong>`;
|
|
||||||
spinnerEl?.classList.add('is-hidden');
|
|
||||||
|
|
||||||
let html = '<p>* 자동으로 다운로드가 되지 않았다면 아래 버튼을 클릭해주세요.</p>';
|
|
||||||
const baseUrl = `<?php echo G5_DATA_URL; ?>/member_list/<?php echo date('Ymdhis'); ?>/`; // 공통 URL 분리
|
|
||||||
|
|
||||||
if (zipFile) {
|
|
||||||
const url = `${filePath}/${zipFile}`;
|
|
||||||
html += `<a href="${url}" class="btn btn_03" download>압축파일 다운로드</a>`;
|
|
||||||
downloadBoxEl.innerHTML = html;
|
|
||||||
triggerAutoDownload(url, zipFile);
|
|
||||||
} else if (files?.length) {
|
|
||||||
files.forEach((file, index) => {
|
|
||||||
const url = `${filePath}/${file}`;
|
|
||||||
html += `<a class="btn btn_03" href="${url}" download>엑셀파일 다운로드 ${index + 1}</a>`;
|
|
||||||
});
|
|
||||||
downloadBoxEl.innerHTML = html;
|
|
||||||
|
|
||||||
if (files.length === 1) {
|
|
||||||
const url = `${filePath}/${files[0]}`;
|
|
||||||
triggerAutoDownload(url, files[0]);
|
|
||||||
} else {
|
|
||||||
summaryEl.innerHTML = `총 <strong>${totalChunks}</strong>개 파일이 생성되었습니다. 아래 버튼을 눌러 다운로드 받아주세요.`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// SSE 오류 처리
|
|
||||||
function handleDownloadError() {
|
|
||||||
return function(e){
|
|
||||||
const errorMessage = e?.message || e?.data || '알 수 없는 오류가 발생했습니다.';
|
|
||||||
|
|
||||||
document.querySelector('.progress-summary').innerHTML = `엑셀 파일 다운로드 실패`;
|
|
||||||
document.querySelector('.progress-message').innerHTML = `엑셀 파일 다운로드에 실패하였습니다`;
|
|
||||||
document.querySelector('.progress-error').innerHTML = errorMessage;
|
|
||||||
document.querySelector('.loading-message').innerHTML = '';
|
|
||||||
document.querySelector('.progress-spinner').classList.add('is-hidden');
|
|
||||||
|
|
||||||
if (eventSource) {
|
|
||||||
eventSource.close();
|
|
||||||
eventSource = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 자동 다운로드 실행
|
|
||||||
function triggerAutoDownload(url, filename) {
|
|
||||||
const a = document.createElement('a');
|
|
||||||
a.href = url;
|
|
||||||
a.download = filename;
|
|
||||||
document.body.appendChild(a);
|
|
||||||
a.click();
|
|
||||||
document.body.removeChild(a);
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
require_once './admin.tail.php';
|
|
||||||
@@ -1,565 +0,0 @@
|
|||||||
<?php
|
|
||||||
$sub_menu = "200400";
|
|
||||||
require_once './_common.php';
|
|
||||||
require_once './member_list_exel.lib.php'; // 회원관리파일 공통 라이브러리 (상수, 검색 옵션 설정, SQL WHERE 등)
|
|
||||||
include_once(G5_LIB_PATH.'/PHPExcel.php');
|
|
||||||
|
|
||||||
check_demo();
|
|
||||||
auth_check_menu($auth, $sub_menu, 'w');
|
|
||||||
|
|
||||||
ini_set('memory_limit', '-1');
|
|
||||||
session_write_close(); // 세션 종료 및 잠금 해제 (백그라운드 작업을 위해 필요)
|
|
||||||
|
|
||||||
// 파라미터 수집 및 유효성 검사
|
|
||||||
$params = get_member_export_params();
|
|
||||||
if (!$params || !is_array($params)) {
|
|
||||||
member_export_send_progress("error", "데이터가 올바르게 전달되지 않아 작업에 실패하였습니다.");
|
|
||||||
member_export_write_log(array(), array('success' => false, 'error' => '데이터가 올바르게 전달되지 않아 작업에 실패하였습니다.'));
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 기존 생성된 엑셀 파일 삭제 - LOG 및 오늘 날짜 폴더 제외
|
|
||||||
$resultExcelDelete = member_export_delete();
|
|
||||||
|
|
||||||
// 서버 전송 이벤트(SSE)를 위한 헤더 설정
|
|
||||||
member_export_set_sse_headers();
|
|
||||||
|
|
||||||
// 모드 확인
|
|
||||||
$mode = isset($_GET['mode']) ? $_GET['mode'] : '';
|
|
||||||
if ($mode !== 'start') {
|
|
||||||
member_export_send_progress("error", "잘못된 요청 입니다.");
|
|
||||||
member_export_write_log($params, array('success' => false, 'error' => '잘못된 요청 입니다.'));
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 회원 내보내기 처리 실행 (예외 처리 포함)
|
|
||||||
*/
|
|
||||||
try {
|
|
||||||
main_member_export($params);
|
|
||||||
}
|
|
||||||
catch (Exception $e)
|
|
||||||
{
|
|
||||||
// 에러 로그 저장 및 SSE 에러 전송
|
|
||||||
error_log("[Member Export Error] " . $e->getMessage());
|
|
||||||
member_export_send_progress("error", $e->getMessage());
|
|
||||||
member_export_write_log($params, array('success' => false, 'error' => $e->getMessage()));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 메인 내보내기 프로세스
|
|
||||||
*/
|
|
||||||
function main_member_export($params)
|
|
||||||
{
|
|
||||||
$total = member_export_get_total_count($params);
|
|
||||||
|
|
||||||
if($total > MEMBER_EXPORT_MAX_SIZE){
|
|
||||||
throw new Exception("엑셀 다운로드 가능 범위(최대 " . number_format(MEMBER_EXPORT_MAX_SIZE) . "건)를 초과했습니다.<br>조건을 추가로 설정하신 후 다시 시도해 주세요.");
|
|
||||||
}
|
|
||||||
|
|
||||||
if($total <= 0){
|
|
||||||
throw new Exception("조회된 데이터가 없어 엑셀 파일을 생성할 수 없습니다.<br>조건을 추가로 설정하신 후 다시 시도해 주세요.");
|
|
||||||
}
|
|
||||||
|
|
||||||
$fileName = 'member_'.MEMBER_BASE_DATE;
|
|
||||||
$fileList = array();
|
|
||||||
$zipFileName = '';
|
|
||||||
|
|
||||||
if ($total > MEMBER_EXPORT_PAGE_SIZE) {
|
|
||||||
// 대용량 데이터 - 분할 처리
|
|
||||||
$pages = (int)ceil($total / MEMBER_EXPORT_PAGE_SIZE);
|
|
||||||
member_export_send_progress("progress", "", 2, $total, 0, $pages, 0);
|
|
||||||
|
|
||||||
for ($i = 1; $i <= $pages; $i++) {
|
|
||||||
$params['page'] = $i;
|
|
||||||
|
|
||||||
member_export_send_progress("progress", "", 2, $total, ($pages == $i ? $total : $i * MEMBER_EXPORT_PAGE_SIZE), $pages, $i);
|
|
||||||
try {
|
|
||||||
$data = member_export_get_data($params);
|
|
||||||
$fileList[] = member_export_create_excel($data, $fileName, $i);
|
|
||||||
} catch (Exception $e) {
|
|
||||||
throw new Exception("총 {$pages}개 중 {$i}번째 파일을 생성하지 못했습니다<br>" . $e->getMessage());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 압축 파일 생성
|
|
||||||
if (count($fileList) > 1) {
|
|
||||||
member_export_send_progress("zipping", "", 2, $total, $total, $pages, $i);
|
|
||||||
$zipResult = member_export_create_zip($fileList, $fileName); // 압축 파일 생성
|
|
||||||
|
|
||||||
if($zipResult['error']){
|
|
||||||
member_export_write_log($params, array('success' => false, 'error' => $zipResult['error']));
|
|
||||||
member_export_send_progress("zippingError", $zipResult['error']);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($zipResult && $zipResult['result']) {
|
|
||||||
member_export_delete($fileList); // 압축 후 엑셀 파일 제거
|
|
||||||
$zipFileName = $zipResult['zipFile'];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
// 소용량 데이터 - 단일 파일
|
|
||||||
member_export_send_progress("progress", "", 1, $total, 0);
|
|
||||||
$data = member_export_get_data($params);
|
|
||||||
member_export_send_progress("progress", "", 1, $total, $total/2);
|
|
||||||
$fileList[] = member_export_create_excel($data, $fileName, 0);
|
|
||||||
member_export_send_progress("progress", "", 1, $total, $total);
|
|
||||||
}
|
|
||||||
|
|
||||||
member_export_write_log($params, array('success' => true, 'total' => $total, 'files' => $fileList, 'zip' => isset($zipFileName) ? $zipFileName : null));
|
|
||||||
member_export_send_progress("done", "", 2, $total, $total, $pages, $pages, $fileList, $zipFileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 진행률 전송
|
|
||||||
*/
|
|
||||||
function member_export_send_progress($status, $message = "", $downloadType = 1, $total = 1, $current = 1, $totalChunks = 1, $currentChunk = 1, $files = array(), $zipFile = '')
|
|
||||||
{
|
|
||||||
// 연결 상태 확인
|
|
||||||
if (connection_aborted()) return;
|
|
||||||
|
|
||||||
$data = array(
|
|
||||||
'status' => $status,
|
|
||||||
'message' => $message,
|
|
||||||
'downloadType' => $downloadType,
|
|
||||||
'total' => $total,
|
|
||||||
'current' => $current,
|
|
||||||
'totalChunks' => $totalChunks,
|
|
||||||
'currentChunk' => $currentChunk,
|
|
||||||
'files' => $files,
|
|
||||||
'zipFile' => $zipFile,
|
|
||||||
'filePath' => G5_DATA_URL . "/" . MEMBER_BASE_DIR . "/" . MEMBER_BASE_DATE,
|
|
||||||
);
|
|
||||||
|
|
||||||
$json_options = defined('JSON_UNESCAPED_UNICODE') ? JSON_UNESCAPED_UNICODE : 0;
|
|
||||||
echo "data: " . json_encode($data, $json_options) . "\n\n";
|
|
||||||
|
|
||||||
// 더 안정적인 플러시
|
|
||||||
if (ob_get_level()) ob_end_flush();
|
|
||||||
flush();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 엑셀 내보내기 설정
|
|
||||||
*/
|
|
||||||
function member_export_get_config()
|
|
||||||
{
|
|
||||||
$type = 1;
|
|
||||||
$configs = array(
|
|
||||||
1 => array(
|
|
||||||
'title' => array("회원관리파일(일반)"),
|
|
||||||
'headers' => array('아이디', '이름', '닉네임', '휴대폰번호', '전화번호', '이메일', '주소', '회원권한', '포인트', '가입일', '차단',
|
|
||||||
'광고성 이메일 수신동의', '광고성 이메일 동의일자', '광고성 SMS/카카오톡 수신동의', '광고성 SMS/카카오톡 동의일자',
|
|
||||||
'마케팅목적의개인정보수집및이용동의', '마케팅목적의개인정보수집및이용동의일자', '개인정보제3자제공동의', '개인정보제3자제공동의일자'),
|
|
||||||
'fields' => array('mb_id', 'mb_name', 'mb_nick', 'mb_hp', 'mb_tel', 'mb_email', 'mb_addr1', 'mb_level', 'mb_point', 'mb_datetime', 'mb_intercept_date',
|
|
||||||
'mb_mailling','mb_mailling_date', 'mb_sms','mb_sms_date', 'mb_marketing_agree',
|
|
||||||
'mb_marketing_date', 'mb_thirdparty_agree', 'mb_thirdparty_date'),
|
|
||||||
'widths' => array(20, 20, 20, 20, 20, 30, 30, 10, 15, 25, 10, 20, 25, 20, 25, 20, 25, 20, 25),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
return isset($configs[$type]) ? $configs[$type] : $configs[1];
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* SSE 헤더 설정
|
|
||||||
*/
|
|
||||||
function member_export_set_sse_headers()
|
|
||||||
{
|
|
||||||
header('Content-Type: text/event-stream');
|
|
||||||
header('Cache-Control: no-cache');
|
|
||||||
header('Connection: keep-alive');
|
|
||||||
header('X-Accel-Buffering: no');
|
|
||||||
|
|
||||||
if (ob_get_level()) ob_end_flush();
|
|
||||||
ob_implicit_flush(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 엑셀 컬럼 문자 반환
|
|
||||||
*/
|
|
||||||
function member_export_column_char($i)
|
|
||||||
{
|
|
||||||
return chr(65 + $i);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 회원 데이터 조회
|
|
||||||
*/
|
|
||||||
function member_export_get_data($params)
|
|
||||||
{
|
|
||||||
global $g5;
|
|
||||||
|
|
||||||
$config = member_export_get_config();
|
|
||||||
$fields = $config['fields'];
|
|
||||||
$fields = array_unique($fields);
|
|
||||||
|
|
||||||
// SQL 변환 맵 (가공이 필요한 필드만 정의)
|
|
||||||
$sqlTransformMap = array(
|
|
||||||
'mb_datetime' => "IF(mb_datetime = '0000-00-00 00:00:00', '', mb_datetime) AS mb_datetime",
|
|
||||||
'mb_intercept_date' => "IF(mb_intercept_date != '', '차단됨', '정상') AS mb_intercept_date",
|
|
||||||
'mb_sms' => "IF(mb_sms = '1', '동의', '미동의') AS mb_sms",
|
|
||||||
'mb_sms_date' => "IF(mb_sms != '1' OR mb_sms_date = '0000-00-00 00:00:00', '', mb_sms_date) AS mb_sms_date",
|
|
||||||
'mb_mailling' => "IF(mb_mailling = '1', '동의', '미동의') AS mb_mailling",
|
|
||||||
'mb_mailling_date' => "IF(mb_mailling != '1' OR mb_mailling_date = '0000-00-00 00:00:00', '', mb_mailling_date) AS mb_mailling_date",
|
|
||||||
'mb_marketing_agree' => "IF(mb_marketing_agree = '1', '동의', '미동의') AS mb_marketing_agree",
|
|
||||||
'mb_marketing_date' => "IF(mb_marketing_agree != '1' OR mb_marketing_date = '0000-00-00 00:00:00', '', mb_marketing_date) AS mb_marketing_date",
|
|
||||||
'mb_thirdparty_agree' => "IF(mb_thirdparty_agree = '1', '동의', '미동의') AS mb_thirdparty_agree",
|
|
||||||
'mb_thirdparty_date' => "IF(mb_thirdparty_agree != '1' OR mb_thirdparty_date = '0000-00-00 00:00:00', '', mb_thirdparty_date) AS mb_thirdparty_date",
|
|
||||||
);
|
|
||||||
|
|
||||||
// SQL 필드 생성
|
|
||||||
$sqlFields = array();
|
|
||||||
foreach ($fields as $field) {
|
|
||||||
$sqlFields[] = isset($sqlTransformMap[$field]) ? $sqlTransformMap[$field] : $field;
|
|
||||||
}
|
|
||||||
$field_list = implode(', ', $sqlFields);
|
|
||||||
|
|
||||||
$where = member_export_build_where($params);
|
|
||||||
|
|
||||||
$page = (int)(isset($params['page']) ? $params['page'] : 1);
|
|
||||||
if ($page < 1) $page = 1;
|
|
||||||
$offset = ($page - 1) * MEMBER_EXPORT_PAGE_SIZE;
|
|
||||||
|
|
||||||
$sql = "SELECT {$field_list} FROM {$g5['member_table']} {$where} ORDER BY mb_no DESC LIMIT {$offset}, " . MEMBER_EXPORT_PAGE_SIZE;
|
|
||||||
|
|
||||||
$result = sql_query($sql);
|
|
||||||
if (!$result) {
|
|
||||||
throw new Exception("데이터 조회에 실패하였습니다");
|
|
||||||
}
|
|
||||||
|
|
||||||
$excelData = array($config['title'], $config['headers']);
|
|
||||||
|
|
||||||
while ($row = sql_fetch_array($result)) {
|
|
||||||
$rowData = array();
|
|
||||||
foreach ($fields as $field) {
|
|
||||||
if (isset($row[$field])) {
|
|
||||||
$rowData[] = function_exists('csv_safe_cell') ? csv_safe_cell($row[$field]) : $row[$field];
|
|
||||||
} else {
|
|
||||||
$rowData[] = '';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$excelData[] = $rowData;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $excelData;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 엑셀 파일 생성
|
|
||||||
*/
|
|
||||||
function member_export_create_excel($data, $fileName, $index = 0)
|
|
||||||
{
|
|
||||||
$config = member_export_get_config();
|
|
||||||
|
|
||||||
if (!class_exists('PHPExcel')) {
|
|
||||||
error_log('[Member Export Error] PHPExcel 라이브러리를 찾을 수 없습니다.');
|
|
||||||
throw new Exception('파일 생성 중 내부 오류가 발생했습니다: PHPExcel 라이브러리를 찾을 수 없습니다.');
|
|
||||||
}
|
|
||||||
|
|
||||||
// 현재 설정값 백업
|
|
||||||
$currentCache = PHPExcel_Settings::getCacheStorageMethod();
|
|
||||||
|
|
||||||
// 캐싱 모드 설정 (엑셀 생성 전용)
|
|
||||||
$cacheMethods = array(
|
|
||||||
PHPExcel_CachedObjectStorageFactory::cache_to_discISAM,
|
|
||||||
PHPExcel_CachedObjectStorageFactory::cache_in_memory_serialized
|
|
||||||
);
|
|
||||||
|
|
||||||
foreach ($cacheMethods as $method) {
|
|
||||||
if (PHPExcel_Settings::setCacheStorageMethod($method)) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
$excel = new PHPExcel();
|
|
||||||
$sheet = $excel->setActiveSheetIndex(0);
|
|
||||||
|
|
||||||
// 헤더 스타일 적용
|
|
||||||
$last_char = member_export_column_char(count($config['headers']) - 1);
|
|
||||||
$sheet->getStyle("A2:{$last_char}2")->applyFromArray(array(
|
|
||||||
'fill' => array(
|
|
||||||
'type' => PHPExcel_Style_Fill::FILL_SOLID,
|
|
||||||
'startcolor' => array('rgb' => 'D9E1F2'), // 연파랑 배경
|
|
||||||
),
|
|
||||||
));
|
|
||||||
|
|
||||||
// 셀 정렬 및 줄바꿈 설정
|
|
||||||
$sheet->getStyle("A:{$last_char}")->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER)->setWrapText(true);
|
|
||||||
|
|
||||||
// 컬럼 너비 설정
|
|
||||||
foreach ($config['widths'] as $i => $width) {
|
|
||||||
$sheet->getColumnDimension(member_export_column_char($i))->setWidth($width);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 데이터 입력
|
|
||||||
$sheet->fromArray($data, NULL, 'A1');
|
|
||||||
|
|
||||||
// 디렉토리 확인
|
|
||||||
member_export_ensure_directory(MEMBER_EXPORT_DIR);
|
|
||||||
|
|
||||||
// 파일명 생성
|
|
||||||
$subname = $index == 0 ? 'all' : sprintf("%02d", $index);
|
|
||||||
$filename = $fileName . "_" . $subname . ".xlsx";
|
|
||||||
$filePath = MEMBER_EXPORT_DIR . "/" . $filename;
|
|
||||||
|
|
||||||
// 파일 저장
|
|
||||||
$writer = PHPExcel_IOFactory::createWriter($excel, 'Excel2007');
|
|
||||||
$writer->setPreCalculateFormulas(false);
|
|
||||||
$writer->save($filePath);
|
|
||||||
|
|
||||||
unset($excel, $sheet, $writer); // 생성 완료 후 메모리 해제
|
|
||||||
}
|
|
||||||
catch (Exception $e)
|
|
||||||
{
|
|
||||||
if ($currentCache) {
|
|
||||||
PHPExcel_Settings::setCacheStorageMethod($currentCache);
|
|
||||||
}
|
|
||||||
throw new Exception("엑셀 파일 생성에 실패하였습니다: " . $e->getMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
// 캐싱 모드 원래 상태로 복원
|
|
||||||
if ($currentCache) {
|
|
||||||
PHPExcel_Settings::setCacheStorageMethod($currentCache);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $filename;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 압축 파일 생성
|
|
||||||
*/
|
|
||||||
function member_export_create_zip($files, $zipFileName)
|
|
||||||
{
|
|
||||||
if (!class_exists('ZipArchive')) {
|
|
||||||
error_log('[Member Export Error] ZipArchive 클래스를 사용할 수 없습니다.');
|
|
||||||
return array('error' => '파일을 압축하는 중 문제가 발생했습니다. 개별 파일로 제공됩니다.<br>: ZipArchive 클래스를 사용할 수 없습니다.');
|
|
||||||
}
|
|
||||||
|
|
||||||
member_export_ensure_directory(MEMBER_EXPORT_DIR);
|
|
||||||
$destinationZipPath = rtrim(MEMBER_EXPORT_DIR, "/") . "/" . $zipFileName . ".zip";
|
|
||||||
|
|
||||||
$zip = new ZipArchive();
|
|
||||||
if ($zip->open($destinationZipPath, ZipArchive::CREATE | ZipArchive::OVERWRITE) !== TRUE) {
|
|
||||||
return array('error' => "파일을 압축하는 중 문제가 발생했습니다. 개별 파일로 제공됩니다.");
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach ($files as $file) {
|
|
||||||
$filePath = MEMBER_EXPORT_DIR . "/" . $file;
|
|
||||||
if (file_exists($filePath)) {
|
|
||||||
$zip->addFile($filePath, basename($filePath));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$result = $zip->close();
|
|
||||||
|
|
||||||
return array(
|
|
||||||
'result' => $result,
|
|
||||||
'zipFile' => $zipFileName . ".zip",
|
|
||||||
'zipPath' => $destinationZipPath,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 디렉토리 생성 및 확인
|
|
||||||
*/
|
|
||||||
function member_export_ensure_directory($dir)
|
|
||||||
{
|
|
||||||
if (!is_dir($dir)) {
|
|
||||||
if (!@mkdir($dir, G5_DIR_PERMISSION, true)) {
|
|
||||||
throw new Exception("디렉토리 생성 실패");
|
|
||||||
}
|
|
||||||
@chmod($dir, G5_DIR_PERMISSION);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!is_writable($dir)) {
|
|
||||||
throw new Exception("디렉토리 쓰기 권한 없음");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 파일 삭제 - 값이 있으면 해당 파일만 삭제, 없으면 디렉토리 내 모든 파일 삭제
|
|
||||||
* - 알집 생성 완료 시 엑셀 파일 제거
|
|
||||||
* - 작업 전 오늘 날짜 폴더 및 log 폴더를 제외한 나머지 파일 모두 제거
|
|
||||||
*/
|
|
||||||
function member_export_delete($fileList = array())
|
|
||||||
{
|
|
||||||
$cnt = 0;
|
|
||||||
|
|
||||||
// 파일 리스트가 있는 경우 -> 해당 파일만 삭제
|
|
||||||
if (!empty($fileList)) {
|
|
||||||
foreach ($fileList as $file) {
|
|
||||||
$filePath = rtrim(MEMBER_EXPORT_DIR, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . $file;
|
|
||||||
if (file_exists($filePath) && is_file($filePath) && @unlink($filePath)) {
|
|
||||||
$cnt++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 파일 리스트가 없는 경우 -> 디렉토리 내 모든 파일 삭제
|
|
||||||
else {
|
|
||||||
$files = glob(rtrim(G5_DATA_PATH . "/" . MEMBER_BASE_DIR, '/') . '/*');
|
|
||||||
|
|
||||||
function deleteFolder($dir) {
|
|
||||||
foreach (glob($dir . '/{.,}*', GLOB_BRACE) as $item) {
|
|
||||||
if (in_array(basename($item), array('.', '..'))) continue;
|
|
||||||
is_dir($item) ? deleteFolder($item) : unlink($item);
|
|
||||||
}
|
|
||||||
rmdir($dir);
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach ($files as $file) {
|
|
||||||
$name = basename($file);
|
|
||||||
|
|
||||||
// log 폴더와 오늘 날짜로 시작하는 폴더는 제외
|
|
||||||
if ($name === 'log' || preg_match('/^' . date('Ymd') . '\d{6}(_[A-Za-z0-9]+)?$/', $name)) continue;
|
|
||||||
|
|
||||||
if (is_file($file) && pathinfo($file, PATHINFO_EXTENSION) !== 'log' && @unlink($file)) {
|
|
||||||
$cnt++;
|
|
||||||
} elseif (is_dir($file)) {
|
|
||||||
deleteFolder($file); // 재귀 폴더 삭제 함수 사용
|
|
||||||
$cnt++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $cnt;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 로그 작성
|
|
||||||
*/
|
|
||||||
function member_export_write_log($params, $result = array())
|
|
||||||
{
|
|
||||||
global $member;
|
|
||||||
|
|
||||||
$maxSize = 1024 * 1024 * 2; // 2MB
|
|
||||||
$maxFiles = 10; // 최대 로그 파일 수 (필요시 조정)
|
|
||||||
$username = isset($member['mb_id']) ? $member['mb_id'] : 'guest';
|
|
||||||
$datetime = date("Y-m-d H:i:s");
|
|
||||||
|
|
||||||
if (!is_dir(MEMBER_LOG_DIR)) {
|
|
||||||
@mkdir(MEMBER_LOG_DIR, G5_DIR_PERMISSION, true);
|
|
||||||
@chmod(MEMBER_LOG_DIR, G5_DIR_PERMISSION);
|
|
||||||
}
|
|
||||||
|
|
||||||
$logFiles = glob(MEMBER_LOG_DIR . "/export_log_*.log");
|
|
||||||
if (!$logFiles) {
|
|
||||||
$logFiles = array();
|
|
||||||
}
|
|
||||||
|
|
||||||
// 최신 파일 기준 정렬 (최신 → 오래된)
|
|
||||||
usort($logFiles, 'member_export_compare_log_mtime');
|
|
||||||
|
|
||||||
$latestLogFile = isset($logFiles[0]) ? $logFiles[0] : null;
|
|
||||||
|
|
||||||
// 용량 기준으로 새 파일 생성
|
|
||||||
if (!$latestLogFile || filesize($latestLogFile) >= $maxSize) {
|
|
||||||
$latestLogFile = MEMBER_LOG_DIR . "/export_log_" . date("YmdHi") . ".log";
|
|
||||||
file_put_contents($latestLogFile, '');
|
|
||||||
array_unshift($logFiles, $latestLogFile);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 최대 파일 수 초과 시 오래된 파일 제거
|
|
||||||
if (count($logFiles) > $maxFiles) {
|
|
||||||
$filesToDelete = array_slice($logFiles, $maxFiles);
|
|
||||||
foreach ($filesToDelete as $file) {
|
|
||||||
@unlink($file);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$success = isset($result['success']) && $result['success'] === true;
|
|
||||||
$status = $success ? '성공' : '실패';
|
|
||||||
|
|
||||||
// 조건 정리
|
|
||||||
$condition = array();
|
|
||||||
|
|
||||||
// 검색 조건
|
|
||||||
if ($params['use_stx'] == 1 && !empty($params['stx'])) {
|
|
||||||
$sfl_list = get_export_config('sfl_list');
|
|
||||||
|
|
||||||
$label = isset($sfl_list[$params['sfl']]) ? $sfl_list[$params['sfl']] : '';
|
|
||||||
$condition[] = "검색({$params['stx_cond']}) : {$label} - {$params['stx']}";
|
|
||||||
}
|
|
||||||
|
|
||||||
// 레벨 조건
|
|
||||||
if ($params['use_level'] == 1 && ($params['level_start'] || $params['level_end'])) {
|
|
||||||
$condition[] = "레벨: {$params['level_start']}~{$params['level_end']}";
|
|
||||||
}
|
|
||||||
|
|
||||||
// 가입일 조건
|
|
||||||
if ($params['use_date'] == 1 && ($params['date_start'] || $params['date_end'])) {
|
|
||||||
$condition[] = "가입일: {$params['date_start']}~{$params['date_end']}";
|
|
||||||
}
|
|
||||||
|
|
||||||
// 포인트 조건
|
|
||||||
if ($params['use_point'] == 1 && $params['point'] !== '') {
|
|
||||||
$point_cond_map = get_export_config('point_cond_map');
|
|
||||||
$symbol = isset($point_cond_map[$params['point_cond']]) ? $point_cond_map[$params['point_cond']] : '≥';
|
|
||||||
$condition[] = "포인트 {$symbol} {$params['point']}";
|
|
||||||
}
|
|
||||||
|
|
||||||
// 휴대폰 여부
|
|
||||||
if ($params['use_hp_exist'] == 1) {
|
|
||||||
$condition[] = "휴대폰번호 있는 경우만";
|
|
||||||
}
|
|
||||||
|
|
||||||
// 광고 수신 동의
|
|
||||||
if ($params['ad_range_only'] == 1) {
|
|
||||||
$ad_range_list = get_export_config('ad_range_list');
|
|
||||||
$label = isset($ad_range_list[$params['ad_range_type']]) ? $ad_range_list[$params['ad_range_type']] : '';
|
|
||||||
$condition[] = "수신동의: 예 ({$label})";
|
|
||||||
|
|
||||||
if ($params['ad_range_type'] == "custom_period" && ($params['agree_date_start'] || $params['agree_date_end'])) {
|
|
||||||
$condition[] = "수신동의일: {$params['agree_date_start']}~{$params['agree_date_end']}";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (in_array($params['ad_range_type'], array("month_confirm", "custom_period"))){
|
|
||||||
$channels = array_filter(array(
|
|
||||||
!empty($params['ad_mailling']) && (int)$params['ad_mailling'] === 1 ? '이메일' : null,
|
|
||||||
!empty($params['ad_sms']) && (int)$params['ad_sms'] === 1 ? 'SMS/카카오톡' : null,
|
|
||||||
));
|
|
||||||
|
|
||||||
if ($channels) {
|
|
||||||
$condition[] = '수신채널: ' . implode(', ', $channels);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 차단회원 처리
|
|
||||||
if ($params['use_intercept'] == 1) {
|
|
||||||
$intercept_list = get_export_config('intercept_list');
|
|
||||||
$label = isset($intercept_list[$params['intercept']]) ? $intercept_list[$params['intercept']] : '';
|
|
||||||
if ($label) $condition[] = $label;
|
|
||||||
}
|
|
||||||
|
|
||||||
$conditionStr = !empty($condition) ? implode(', ', $condition) : '없음';
|
|
||||||
$line1 = "[{$datetime}] [{$status}] 관리자: {$username}";
|
|
||||||
|
|
||||||
// 성공일 경우 추가 정보
|
|
||||||
if ($success) {
|
|
||||||
$total = isset($result['total']) ? $result['total'] : 0;
|
|
||||||
$fileCount = isset($result['zip']) ? 1 : count(isset($result['files']) ? $result['files'] : array());
|
|
||||||
$line1 .= " | 총 {$total}건 | 파일: {$fileCount}개";
|
|
||||||
}
|
|
||||||
|
|
||||||
$logEntry = $line1 . PHP_EOL;
|
|
||||||
$logEntry .= "조건: {$conditionStr}" . PHP_EOL;
|
|
||||||
|
|
||||||
if (!$success && !empty($result['error'])) {
|
|
||||||
$logEntry .= "오류 메시지: {$result['error']}" . PHP_EOL;
|
|
||||||
}
|
|
||||||
|
|
||||||
$logEntry .= PHP_EOL;
|
|
||||||
|
|
||||||
// 파일에 기록
|
|
||||||
if (@file_put_contents($latestLogFile, $logEntry, FILE_APPEND | LOCK_EX) === false) {
|
|
||||||
error_log("[Member Export Error] 로그 파일 기록 실패: {$latestLogFile}");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function member_export_compare_log_mtime($a, $b)
|
|
||||||
{
|
|
||||||
return filemtime($b) - filemtime($a);
|
|
||||||
}
|
|
||||||
@@ -1,72 +0,0 @@
|
|||||||
<?php
|
|
||||||
$sub_menu = '100930';
|
|
||||||
include_once('./_common.php');
|
|
||||||
|
|
||||||
if ($is_admin != 'super')
|
|
||||||
alert('최고관리자만 접근 가능합니다.', G5_URL);
|
|
||||||
|
|
||||||
$g5['title'] = '회원관리파일 일괄삭제';
|
|
||||||
include_once(G5_ADMIN_PATH.'/admin.head.php');
|
|
||||||
?>
|
|
||||||
|
|
||||||
<div class="local_desc02 local_desc">
|
|
||||||
<p>
|
|
||||||
완료 메세지가 나오기 전에 프로그램의 실행을 중지하지 마십시오.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
flush();
|
|
||||||
|
|
||||||
if (!$dir = @opendir(G5_DATA_PATH . '/member_list')) {
|
|
||||||
echo '<p>회원관리파일를 열지못했습니다.</p>';
|
|
||||||
}
|
|
||||||
|
|
||||||
$cnt = 0;
|
|
||||||
echo '<ul class="session_del">' . PHP_EOL;
|
|
||||||
|
|
||||||
$files = glob(G5_DATA_PATH . '/member_list/*');
|
|
||||||
$cnt = 0;
|
|
||||||
|
|
||||||
// 폴더 및 하위 파일 재귀 삭제 함수
|
|
||||||
function deleteFolder($folderPath) {
|
|
||||||
$items = glob($folderPath . '/*');
|
|
||||||
foreach ($items as $item) {
|
|
||||||
if (is_dir($item)) {
|
|
||||||
deleteFolder($item);
|
|
||||||
} else {
|
|
||||||
unlink($item);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
rmdir($folderPath); // 폴더 자체 삭제
|
|
||||||
}
|
|
||||||
|
|
||||||
if (is_array($files)) {
|
|
||||||
foreach ($files as $member_list_file) {
|
|
||||||
// log 확장자가 아닌 파일/디렉토리 처리
|
|
||||||
$ext = strtolower(pathinfo($member_list_file, PATHINFO_EXTENSION));
|
|
||||||
$basename = basename($member_list_file);
|
|
||||||
|
|
||||||
if (is_file($member_list_file) && $ext !== 'log') {
|
|
||||||
unlink($member_list_file);
|
|
||||||
echo '<li>파일 삭제: ' . $member_list_file . '</li>' . PHP_EOL;
|
|
||||||
$cnt++;
|
|
||||||
} elseif (is_dir($member_list_file) && $basename !== 'log') {
|
|
||||||
deleteFolder($member_list_file);
|
|
||||||
echo '<li>폴더 삭제: ' . $member_list_file . '</li>' . PHP_EOL;
|
|
||||||
$cnt++;
|
|
||||||
}
|
|
||||||
|
|
||||||
flush();
|
|
||||||
|
|
||||||
if ($cnt % 10 == 0) {
|
|
||||||
echo PHP_EOL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
echo '<li>완료됨</li></ul>' . PHP_EOL;
|
|
||||||
echo '<div class="local_desc01 local_desc"><p><strong>회원관리파일 ' . $cnt . '건 삭제 완료됐습니다.</strong><br>프로그램의 실행을 끝마치셔도 좋습니다.</p></div>' . PHP_EOL;
|
|
||||||
?>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
include_once(G5_ADMIN_PATH.'/admin.tail.php');
|
|
||||||
+43
-82
@@ -1,103 +1,66 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "200100";
|
$sub_menu = "200100";
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
|
|
||||||
check_demo();
|
check_demo();
|
||||||
|
|
||||||
if (!(isset($_POST['chk']) && is_array($_POST['chk']))) {
|
if (!count($_POST['chk'])) {
|
||||||
alert($_POST['act_button'] . " 하실 항목을 하나 이상 체크하세요.");
|
alert($_POST['act_button']." 하실 항목을 하나 이상 체크하세요.");
|
||||||
}
|
}
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, 'w');
|
auth_check($auth[$sub_menu], 'w');
|
||||||
|
|
||||||
check_admin_token();
|
|
||||||
|
|
||||||
$mb_datas = array();
|
|
||||||
$msg = '';
|
|
||||||
|
|
||||||
if ($_POST['act_button'] == "선택수정") {
|
if ($_POST['act_button'] == "선택수정") {
|
||||||
for ($i = 0; $i < count($_POST['chk']); $i++) {
|
|
||||||
|
for ($i=0; $i<count($_POST['chk']); $i++)
|
||||||
|
{
|
||||||
// 실제 번호를 넘김
|
// 실제 번호를 넘김
|
||||||
$k = isset($_POST['chk'][$i]) ? (int) $_POST['chk'][$i] : 0;
|
$k = $_POST['chk'][$i];
|
||||||
|
|
||||||
$post_mb_certify = (isset($_POST['mb_certify'][$k]) && $_POST['mb_certify'][$k]) ? clean_xss_tags($_POST['mb_certify'][$k], 1, 1, 20) : '';
|
$mb = get_member($_POST['mb_id'][$k]);
|
||||||
$post_mb_level = isset($_POST['mb_level'][$k]) ? (int) $_POST['mb_level'][$k] : 0;
|
|
||||||
$post_mb_intercept_date = (isset($_POST['mb_intercept_date'][$k]) && $_POST['mb_intercept_date'][$k]) ? clean_xss_tags($_POST['mb_intercept_date'][$k], 1, 1, 8) : '';
|
|
||||||
$post_mb_mailling = isset($_POST['mb_mailling'][$k]) ? (int) $_POST['mb_mailling'][$k] : 0;
|
|
||||||
$post_mb_sms = isset($_POST['mb_sms'][$k]) ? (int) $_POST['mb_sms'][$k] : 0;
|
|
||||||
$post_mb_open = isset($_POST['mb_open'][$k]) ? (int) $_POST['mb_open'][$k] : 0;
|
|
||||||
|
|
||||||
$agree_items = array();
|
if (!$mb['mb_id']) {
|
||||||
// 광고성 이메일 수신동의 일자 추가
|
$msg .= $mb['mb_id'].' : 회원자료가 존재하지 않습니다.\\n';
|
||||||
$post_mb_mailling_default = isset($_POST['mb_mailling_default'][$k]) ? (int) $_POST['mb_mailling_default'][$k] : 0;
|
} else if ($is_admin != 'super' && $mb['mb_level'] >= $member['mb_level']) {
|
||||||
$sql_mailling_date = "";
|
$msg .= $mb['mb_id'].' : 자신보다 권한이 높거나 같은 회원은 수정할 수 없습니다.\\n';
|
||||||
if ($post_mb_mailling_default != $post_mb_mailling) {
|
} else if ($member['mb_id'] == $mb['mb_id']) {
|
||||||
$sql_mailling_date = " , mb_mailling_date = '".G5_TIME_YMDHIS."' ";
|
$msg .= $mb['mb_id'].' : 로그인 중인 관리자는 수정 할 수 없습니다.\\n';
|
||||||
$agree_items[] = "광고성 이메일 수신(" . ($post_mb_mailling == 1 ? "동의" : "철회") . ")";
|
|
||||||
}
|
|
||||||
|
|
||||||
// 광고성 SMS/카카오톡 수신동의 일자 추가
|
|
||||||
$post_mb_sms_default = isset($_POST['mb_sms_default'][$k]) ? (int) $_POST['mb_sms_default'][$k] : 0;
|
|
||||||
$sql_sms_date = "";
|
|
||||||
if ($post_mb_sms_default != $post_mb_sms) {
|
|
||||||
$sql_sms_date = " , mb_sms_date = '".G5_TIME_YMDHIS."' ";
|
|
||||||
$agree_items[] = "광고성 SMS/카카오톡 수신(" . ($post_mb_sms == 1 ? "동의" : "철회") . ")";
|
|
||||||
}
|
|
||||||
|
|
||||||
// 동의 로그 추가
|
|
||||||
$sql_agree_log = "";
|
|
||||||
if (!empty($agree_items)) {
|
|
||||||
$agree_log = "[".G5_TIME_YMDHIS.", 회원관리 선택수정] " . implode(' | ', $agree_items) . "\n";
|
|
||||||
$sql_agree_log .= " , mb_agree_log = CONCAT('{$agree_log}', IFNULL(mb_agree_log, ''))";
|
|
||||||
}
|
|
||||||
|
|
||||||
$mb_datas[] = $mb = get_member($_POST['mb_id'][$k]);
|
|
||||||
|
|
||||||
if (!(isset($mb['mb_id']) && $mb['mb_id'])) {
|
|
||||||
$msg .= $mb['mb_id'] . ' : 회원자료가 존재하지 않습니다.\\n';
|
|
||||||
} elseif ($is_admin != 'super' && $mb['mb_level'] >= $member['mb_level']) {
|
|
||||||
$msg .= $mb['mb_id'] . ' : 자신보다 권한이 높거나 같은 회원은 수정할 수 없습니다.\\n';
|
|
||||||
} elseif ($is_admin != 'super' && $post_mb_level >= (int) $member['mb_level']) {
|
|
||||||
$msg .= $mb['mb_id'] . ' : 자신보다 권한이 높거나 같은 등급은 부여할 수 없습니다.\\n';
|
|
||||||
} elseif ($member['mb_id'] == $mb['mb_id']) {
|
|
||||||
$msg .= $mb['mb_id'] . ' : 로그인 중인 관리자는 수정 할 수 없습니다.\\n';
|
|
||||||
} else {
|
} else {
|
||||||
if ($post_mb_certify) {
|
if($_POST['mb_certify'][$k])
|
||||||
$mb_adult = isset($_POST['mb_adult'][$k]) ? (int) $_POST['mb_adult'][$k] : 0;
|
$mb_adult = $_POST['mb_adult'][$k];
|
||||||
} else {
|
else
|
||||||
$mb_adult = 0;
|
$mb_adult = 0;
|
||||||
}
|
|
||||||
|
|
||||||
$sql = " update {$g5['member_table']}
|
$sql = " update {$g5['member_table']}
|
||||||
set mb_level = '" . $post_mb_level . "',
|
set mb_level = '{$_POST['mb_level'][$k]}',
|
||||||
mb_intercept_date = '" . sql_real_escape_string($post_mb_intercept_date) . "',
|
mb_intercept_date = '{$_POST['mb_intercept_date'][$k]}',
|
||||||
mb_mailling = '" . $post_mb_mailling . "',
|
mb_mailling = '{$_POST['mb_mailling'][$k]}',
|
||||||
mb_sms = '" . $post_mb_sms . "',
|
mb_sms = '{$_POST['mb_sms'][$k]}',
|
||||||
mb_open = '" . $post_mb_open . "',
|
mb_open = '{$_POST['mb_open'][$k]}',
|
||||||
mb_certify = '" . sql_real_escape_string($post_mb_certify) . "',
|
mb_certify = '{$_POST['mb_certify'][$k]}',
|
||||||
mb_adult = '{$mb_adult}'
|
mb_adult = '{$mb_adult}'
|
||||||
{$sql_mailling_date}
|
where mb_id = '{$_POST['mb_id'][$k]}' ";
|
||||||
{$sql_sms_date}
|
|
||||||
{$sql_agree_log}
|
|
||||||
where mb_id = '" . sql_real_escape_string($mb['mb_id']) . "' ";
|
|
||||||
sql_query($sql);
|
sql_query($sql);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} elseif ($_POST['act_button'] == "선택삭제") {
|
|
||||||
for ($i = 0; $i < count($_POST['chk']); $i++) {
|
|
||||||
// 실제 번호를 넘김
|
|
||||||
$k = isset($_POST['chk'][$i]) ? (int) $_POST['chk'][$i] : 0;
|
|
||||||
|
|
||||||
$mb_datas[] = $mb = get_member($_POST['mb_id'][$k]);
|
} else if ($_POST['act_button'] == "선택삭제") {
|
||||||
|
|
||||||
|
for ($i=0; $i<count($_POST['chk']); $i++)
|
||||||
|
{
|
||||||
|
// 실제 번호를 넘김
|
||||||
|
$k = $_POST['chk'][$i];
|
||||||
|
|
||||||
|
$mb = get_member($_POST['mb_id'][$k]);
|
||||||
|
|
||||||
if (!$mb['mb_id']) {
|
if (!$mb['mb_id']) {
|
||||||
$msg .= $mb['mb_id'] . ' : 회원자료가 존재하지 않습니다.\\n';
|
$msg .= $mb['mb_id'].' : 회원자료가 존재하지 않습니다.\\n';
|
||||||
} elseif ($member['mb_id'] == $mb['mb_id']) {
|
} else if ($member['mb_id'] == $mb['mb_id']) {
|
||||||
$msg .= $mb['mb_id'] . ' : 로그인 중인 관리자는 삭제 할 수 없습니다.\\n';
|
$msg .= $mb['mb_id'].' : 로그인 중인 관리자는 삭제 할 수 없습니다.\\n';
|
||||||
} elseif (is_admin($mb['mb_id']) == 'super') {
|
} else if (is_admin($mb['mb_id']) == 'super') {
|
||||||
$msg .= $mb['mb_id'] . ' : 최고 관리자는 삭제할 수 없습니다.\\n';
|
$msg .= $mb['mb_id'].' : 최고 관리자는 삭제할 수 없습니다.\\n';
|
||||||
} elseif ($is_admin != 'super' && $mb['mb_level'] >= $member['mb_level']) {
|
} else if ($is_admin != 'super' && $mb['mb_level'] >= $member['mb_level']) {
|
||||||
$msg .= $mb['mb_id'] . ' : 자신보다 권한이 높거나 같은 회원은 삭제할 수 없습니다.\\n';
|
$msg .= $mb['mb_id'].' : 자신보다 권한이 높거나 같은 회원은 삭제할 수 없습니다.\\n';
|
||||||
} else {
|
} else {
|
||||||
// 회원자료 삭제
|
// 회원자료 삭제
|
||||||
member_delete($mb['mb_id']);
|
member_delete($mb['mb_id']);
|
||||||
@@ -105,11 +68,9 @@ if ($_POST['act_button'] == "선택수정") {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($msg) {
|
if ($msg)
|
||||||
//echo '<script> alert("'.$msg.'"); </script>';
|
//echo '<script> alert("'.$msg.'"); </script>';
|
||||||
alert($msg);
|
alert($msg);
|
||||||
}
|
|
||||||
|
|
||||||
run_event('admin_member_list_update', $_POST['act_button'], $mb_datas);
|
goto_url('./member_list.php?'.$qstr);
|
||||||
|
?>
|
||||||
goto_url('./member_list.php?' . $qstr);
|
|
||||||
|
|||||||
+160
-174
@@ -1,24 +1,21 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "100290";
|
$sub_menu = "100290";
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
|
|
||||||
if ($is_admin != 'super') {
|
if ($is_admin != 'super')
|
||||||
alert_close('최고관리자만 접근 가능합니다.');
|
alert_close('최고관리자만 접근 가능합니다.');
|
||||||
}
|
|
||||||
|
|
||||||
$g5['title'] = '메뉴 추가';
|
$g5['title'] = '메뉴 추가';
|
||||||
require_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($code) ? preg_replace('/[^0-9a-zA-Z]/', '', strip_tags($code)) : '';
|
||||||
$code = isset($_GET['code']) ? (string)preg_replace('/[^0-9a-zA-Z]/', '', $_GET['code']) : '';
|
|
||||||
|
|
||||||
// 코드
|
// 코드
|
||||||
if ($new == 'new' || !$code) {
|
if($new == 'new' || !$code) {
|
||||||
$code = (int)base_convert(substr($code, 0, 2), 36, 10);
|
$code = base_convert(substr($code,0, 2), 36, 10);
|
||||||
$code += 36;
|
$code += 36;
|
||||||
$code = base_convert((string)$code, 10, 36);
|
$code = base_convert($code, 10, 36);
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div id="menu_frm" class="new_win">
|
<div id="menu_frm" class="new_win">
|
||||||
@@ -26,186 +23,175 @@ if ($new == 'new' || !$code) {
|
|||||||
|
|
||||||
<form name="fmenuform" id="fmenuform" class="new_win_con">
|
<form name="fmenuform" id="fmenuform" class="new_win_con">
|
||||||
|
|
||||||
<div class="new_win_desc">
|
<div class="new_win_desc">
|
||||||
<label for="me_type">대상선택</label>
|
<label for="me_type">대상선택</label>
|
||||||
<select name="me_type" id="me_type">
|
<select name="me_type" id="me_type">
|
||||||
<option value="">직접입력</option>
|
<option value="">직접입력</option>
|
||||||
<option value="group">게시판그룹</option>
|
<option value="group">게시판그룹</option>
|
||||||
<option value="board">게시판</option>
|
<option value="board">게시판</option>
|
||||||
<option value="content">내용관리</option>
|
<option value="content">내용관리</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="menu_result"></div>
|
<div id="menu_result"></div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(function() {
|
$(function() {
|
||||||
$("#menu_result").load(
|
$("#menu_result").load(
|
||||||
"./menu_form_search.php"
|
"./menu_form_search.php"
|
||||||
);
|
);
|
||||||
|
|
||||||
function link_checks_all_chage() {
|
function link_checks_all_chage(){
|
||||||
|
|
||||||
var $links = $(opener.document).find("#menulist input[name='me_link[]']"),
|
var $links = $(opener.document).find("#menulist input[name='me_link[]']"),
|
||||||
$o_link = $(".td_mngsmall input[name='link[]']"),
|
$o_link = $(".td_mngsmall input[name='link[]']"),
|
||||||
hrefs = [],
|
hrefs = [],
|
||||||
menu_exist = false;
|
menu_exist = false;
|
||||||
|
|
||||||
if ($links.length) {
|
if( $links.length ){
|
||||||
$links.each(function(index) {
|
$links.each(function( index ) {
|
||||||
hrefs.push($(this).val());
|
hrefs.push( $(this).val() );
|
||||||
});
|
|
||||||
|
|
||||||
$o_link.each(function(index) {
|
|
||||||
if ($.inArray($(this).val(), hrefs) != -1) {
|
|
||||||
$(this).closest("tr").find("td:eq( 0 )").addClass("exist_menu_link");
|
|
||||||
menu_exist = true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (menu_exist) {
|
|
||||||
$(".menu_exists_tip").show();
|
|
||||||
} else {
|
|
||||||
$(".menu_exists_tip").hide();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function menu_result_change(type) {
|
|
||||||
|
|
||||||
var dfd = new $.Deferred();
|
|
||||||
|
|
||||||
$("#menu_result").empty().load(
|
|
||||||
"./menu_form_search.php", {
|
|
||||||
type: type
|
|
||||||
},
|
|
||||||
function() {
|
|
||||||
dfd.resolve('Finished');
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
return dfd.promise();
|
|
||||||
}
|
|
||||||
|
|
||||||
$("#me_type").on("change", function() {
|
|
||||||
var type = $(this).val();
|
|
||||||
|
|
||||||
var promise = menu_result_change(type);
|
|
||||||
|
|
||||||
promise.done(function(message) {
|
|
||||||
link_checks_all_chage(type);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
$o_link.each(function( index ) {
|
||||||
|
if( $.inArray( $(this).val(), hrefs ) != -1 ){
|
||||||
$(document).on("click", "#add_manual", function() {
|
$(this).closest("tr").find("td:eq( 0 )").addClass("exist_menu_link");
|
||||||
var me_name = $.trim($("#me_name").val());
|
menu_exist = true;
|
||||||
var me_link = $.trim($("#me_link").val());
|
}
|
||||||
|
});
|
||||||
add_menu_list(me_name, me_link, "<?php echo $code; ?>");
|
|
||||||
});
|
|
||||||
|
|
||||||
$(document).on("click", ".add_select", function() {
|
|
||||||
var me_name = $.trim($(this).siblings("input[name='subject[]']").val());
|
|
||||||
var me_link = $.trim($(this).siblings("input[name='link[]']").val());
|
|
||||||
|
|
||||||
add_menu_list(me_name, me_link, "<?php echo $code; ?>");
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
function htmlEscape(str) {
|
|
||||||
return str
|
|
||||||
.replace(/&/g, '&')
|
|
||||||
.replace(/</g, '<')
|
|
||||||
.replace(/>/g, '>')
|
|
||||||
.replace(/"/g, '"')
|
|
||||||
.replace(/'/g, ''');
|
|
||||||
}
|
|
||||||
|
|
||||||
function add_menu_list(name, link, code) {
|
|
||||||
var $menulist = $("#menulist", opener.document);
|
|
||||||
var ms = new Date().getTime();
|
|
||||||
var sub_menu_class;
|
|
||||||
<?php if ($new == 'new') { ?>
|
|
||||||
sub_menu_class = " class=\"td_category\"";
|
|
||||||
<?php } else { ?>
|
|
||||||
sub_menu_class = " class=\"td_category sub_menu_class\"";
|
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
name = htmlEscape(name);
|
|
||||||
link = htmlEscape(link);
|
|
||||||
|
|
||||||
var list = "<tr class=\"menu_list menu_group_<?php echo $code; ?>\">";
|
|
||||||
list += "<td" + sub_menu_class + ">";
|
|
||||||
list += "<label for=\"me_name_" + ms + "\" class=\"sound_only\">메뉴<strong class=\"sound_only\"> 필수</strong></label>";
|
|
||||||
list += "<input type=\"hidden\" name=\"code[]\" value=\"<?php echo $code; ?>\">";
|
|
||||||
list += "<input type=\"text\" name=\"me_name[]\" value=\"" + name + "\" id=\"me_name_" + ms + "\" required class=\"required frm_input full_input\">";
|
|
||||||
list += "</td>";
|
|
||||||
list += "<td>";
|
|
||||||
list += "<label for=\"me_link_" + ms + "\" class=\"sound_only\">링크<strong class=\"sound_only\"> 필수</strong></label>";
|
|
||||||
list += "<input type=\"text\" name=\"me_link[]\" value=\"" + link + "\" id=\"me_link_" + ms + "\" required class=\"required frm_input full_input\">";
|
|
||||||
list += "</td>";
|
|
||||||
list += "<td class=\"td_mng\">";
|
|
||||||
list += "<label for=\"me_target_" + ms + "\" class=\"sound_only\">새창</label>";
|
|
||||||
list += "<select name=\"me_target[]\" id=\"me_target_" + ms + "\">";
|
|
||||||
list += "<option value=\"self\">사용안함</option>";
|
|
||||||
list += "<option value=\"blank\">사용함</option>";
|
|
||||||
list += "</select>";
|
|
||||||
list += "</td>";
|
|
||||||
list += "<td class=\"td_numsmall\">";
|
|
||||||
list += "<label for=\"me_order_" + ms + "\" class=\"sound_only\">순서<strong class=\"sound_only\"> 필수</strong></label>";
|
|
||||||
list += "<input type=\"text\" name=\"me_order[]\" value=\"0\" id=\"me_order_" + ms + "\" required class=\"required frm_input\" size=\"5\">";
|
|
||||||
list += "</td>";
|
|
||||||
list += "<td class=\"td_mngsmall\">";
|
|
||||||
list += "<label for=\"me_use_" + ms + "\" class=\"sound_only\">PC사용</label>";
|
|
||||||
list += "<select name=\"me_use[]\" id=\"me_use_" + ms + "\">";
|
|
||||||
list += "<option value=\"1\">사용함</option>";
|
|
||||||
list += "<option value=\"0\">사용안함</option>";
|
|
||||||
list += "</select>";
|
|
||||||
list += "</td>";
|
|
||||||
list += "<td class=\"td_mngsmall\">";
|
|
||||||
list += "<label for=\"me_mobile_use_" + ms + "\" class=\"sound_only\">모바일사용</label>";
|
|
||||||
list += "<select name=\"me_mobile_use[]\" id=\"me_mobile_use_" + ms + "\">";
|
|
||||||
list += "<option value=\"1\">사용함</option>";
|
|
||||||
list += "<option value=\"0\">사용안함</option>";
|
|
||||||
list += "</select>";
|
|
||||||
list += "</td>";
|
|
||||||
list += "<td class=\"td_mng\">";
|
|
||||||
<?php if ($new == 'new') { ?>
|
|
||||||
list += "<button type=\"button\" class=\"btn_add_submenu btn_03\">추가</button>\n";
|
|
||||||
<?php } ?>
|
|
||||||
list += "<button type=\"button\" class=\"btn_del_menu btn_02\">삭제</button>";
|
|
||||||
list += "</td>";
|
|
||||||
list += "</tr>";
|
|
||||||
|
|
||||||
var $menu_last = null;
|
|
||||||
|
|
||||||
if (code)
|
|
||||||
$menu_last = $menulist.find("tr.menu_group_" + code + ":last");
|
|
||||||
else
|
|
||||||
$menu_last = $menulist.find("tr.menu_list:last");
|
|
||||||
|
|
||||||
if ($menu_last.length > 0) {
|
|
||||||
$menu_last.after(list);
|
|
||||||
} else {
|
|
||||||
if ($menulist.find("#empty_menu_list").length > 0)
|
|
||||||
$menulist.find("#empty_menu_list").remove();
|
|
||||||
|
|
||||||
$menulist.find("table tbody").append(list);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$menulist.find("tr.menu_list").each(function(index) {
|
if( menu_exist ){
|
||||||
$(this).removeClass("bg0 bg1")
|
$(".menu_exists_tip").show();
|
||||||
.addClass("bg" + (index % 2));
|
} else {
|
||||||
|
$(".menu_exists_tip").hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function menu_result_change( type ){
|
||||||
|
|
||||||
|
var dfd = new $.Deferred();
|
||||||
|
|
||||||
|
$("#menu_result").empty().load(
|
||||||
|
"./menu_form_search.php",
|
||||||
|
{ type : type },
|
||||||
|
function(){
|
||||||
|
dfd.resolve('Finished');
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
return dfd.promise();
|
||||||
|
}
|
||||||
|
|
||||||
|
$("#me_type").on("change", function() {
|
||||||
|
var type = $(this).val();
|
||||||
|
|
||||||
|
var promise = menu_result_change( type );
|
||||||
|
|
||||||
|
promise.done(function(message) {
|
||||||
|
link_checks_all_chage(type);
|
||||||
});
|
});
|
||||||
|
|
||||||
window.close();
|
});
|
||||||
|
|
||||||
|
$(document).on("click", "#add_manual", function() {
|
||||||
|
var me_name = $.trim($("#me_name").val());
|
||||||
|
var me_link = $.trim($("#me_link").val());
|
||||||
|
|
||||||
|
add_menu_list(me_name, me_link, "<?php echo $code; ?>");
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).on("click", ".add_select", function() {
|
||||||
|
var me_name = $.trim($(this).siblings("input[name='subject[]']").val());
|
||||||
|
var me_link = $.trim($(this).siblings("input[name='link[]']").val());
|
||||||
|
|
||||||
|
add_menu_list(me_name, me_link, "<?php echo $code; ?>");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
function add_menu_list(name, link, code)
|
||||||
|
{
|
||||||
|
var $menulist = $("#menulist", opener.document);
|
||||||
|
var ms = new Date().getTime();
|
||||||
|
var sub_menu_class;
|
||||||
|
<?php if($new == 'new') { ?>
|
||||||
|
sub_menu_class = " class=\"td_category\"";
|
||||||
|
<?php } else { ?>
|
||||||
|
sub_menu_class = " class=\"td_category sub_menu_class\"";
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
var list = "<tr class=\"menu_list menu_group_<?php echo $code; ?>\">";
|
||||||
|
list += "<td"+sub_menu_class+">";
|
||||||
|
list += "<label for=\"me_name_"+ms+"\" class=\"sound_only\">메뉴<strong class=\"sound_only\"> 필수</strong></label>";
|
||||||
|
list += "<input type=\"hidden\" name=\"code[]\" value=\"<?php echo $code; ?>\">";
|
||||||
|
list += "<input type=\"text\" name=\"me_name[]\" value=\""+name+"\" id=\"me_name_"+ms+"\" required class=\"required frm_input full_input\">";
|
||||||
|
list += "</td>";
|
||||||
|
list += "<td>";
|
||||||
|
list += "<label for=\"me_link_"+ms+"\" class=\"sound_only\">링크<strong class=\"sound_only\"> 필수</strong></label>";
|
||||||
|
list += "<input type=\"text\" name=\"me_link[]\" value=\""+link+"\" id=\"me_link_"+ms+"\" required class=\"required frm_input full_input\">";
|
||||||
|
list += "</td>";
|
||||||
|
list += "<td class=\"td_mng\">";
|
||||||
|
list += "<label for=\"me_target_"+ms+"\" class=\"sound_only\">새창</label>";
|
||||||
|
list += "<select name=\"me_target[]\" id=\"me_target_"+ms+"\">";
|
||||||
|
list += "<option value=\"self\">사용안함</option>";
|
||||||
|
list += "<option value=\"blank\">사용함</option>";
|
||||||
|
list += "</select>";
|
||||||
|
list += "</td>";
|
||||||
|
list += "<td class=\"td_numsmall\">";
|
||||||
|
list += "<label for=\"me_order_"+ms+"\" class=\"sound_only\">순서<strong class=\"sound_only\"> 필수</strong></label>";
|
||||||
|
list += "<input type=\"text\" name=\"me_order[]\" value=\"0\" id=\"me_order_"+ms+"\" required class=\"required frm_input\" size=\"5\">";
|
||||||
|
list += "</td>";
|
||||||
|
list += "<td class=\"td_mngsmall\">";
|
||||||
|
list += "<label for=\"me_use_"+ms+"\" class=\"sound_only\">PC사용</label>";
|
||||||
|
list += "<select name=\"me_use[]\" id=\"me_use_"+ms+"\">";
|
||||||
|
list += "<option value=\"1\">사용함</option>";
|
||||||
|
list += "<option value=\"0\">사용안함</option>";
|
||||||
|
list += "</select>";
|
||||||
|
list += "</td>";
|
||||||
|
list += "<td class=\"td_mngsmall\">";
|
||||||
|
list += "<label for=\"me_mobile_use_"+ms+"\" class=\"sound_only\">모바일사용</label>";
|
||||||
|
list += "<select name=\"me_mobile_use[]\" id=\"me_mobile_use_"+ms+"\">";
|
||||||
|
list += "<option value=\"1\">사용함</option>";
|
||||||
|
list += "<option value=\"0\">사용안함</option>";
|
||||||
|
list += "</select>";
|
||||||
|
list += "</td>";
|
||||||
|
list += "<td class=\"td_mngsmall\">";
|
||||||
|
<?php if($new == 'new') { ?>
|
||||||
|
list += "<button type=\"button\" class=\"btn_add_submenu btn\">추가</button>";
|
||||||
|
<?php } ?>
|
||||||
|
list += "<button type=\"button\" class=\"btn_del_menu btn\">삭제</button>";
|
||||||
|
list += "</td>";
|
||||||
|
list += "</tr>";
|
||||||
|
|
||||||
|
var $menu_last = null;
|
||||||
|
|
||||||
|
if(code)
|
||||||
|
$menu_last = $menulist.find("tr.menu_group_"+code+":last");
|
||||||
|
else
|
||||||
|
$menu_last = $menulist.find("tr.menu_list:last");
|
||||||
|
|
||||||
|
if($menu_last.size() > 0) {
|
||||||
|
$menu_last.after(list);
|
||||||
|
} else {
|
||||||
|
if($menulist.find("#empty_menu_list").size() > 0)
|
||||||
|
$menulist.find("#empty_menu_list").remove();
|
||||||
|
|
||||||
|
$menulist.find("table tbody").append(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$menulist.find("tr.menu_list").each(function(index) {
|
||||||
|
$(this).removeClass("bg0 bg1")
|
||||||
|
.addClass("bg"+(index % 2));
|
||||||
|
});
|
||||||
|
|
||||||
|
window.close();
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
require_once G5_PATH . '/tail.sub.php';
|
include_once(G5_PATH.'/tail.sub.php');
|
||||||
|
?>
|
||||||
+62
-61
@@ -1,13 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
|
|
||||||
if ($is_admin != 'super') {
|
if ($is_admin != 'super')
|
||||||
die('최고관리자만 접근 가능합니다.');
|
die('최고관리자만 접근 가능합니다.');
|
||||||
}
|
|
||||||
|
|
||||||
$type = isset($_REQUEST['type']) ? preg_replace('/[^0-9a-z_]/i', '', $_REQUEST['type']) : '';
|
switch($type) {
|
||||||
|
|
||||||
switch ($type) {
|
|
||||||
case 'group':
|
case 'group':
|
||||||
$sql = " select gr_id as id, gr_subject as subject
|
$sql = " select gr_id as id, gr_subject as subject
|
||||||
from {$g5['group_table']}
|
from {$g5['group_table']}
|
||||||
@@ -27,63 +24,66 @@ switch ($type) {
|
|||||||
$sql = '';
|
$sql = '';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
if ($sql) {
|
<?php
|
||||||
|
if($sql) {
|
||||||
$result = sql_query($sql);
|
$result = sql_query($sql);
|
||||||
|
|
||||||
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
for($i=0; $row=sql_fetch_array($result); $i++) {
|
||||||
if ($i == 0) {
|
if($i == 0) {
|
||||||
$bbs_subject_title = ($type == 'board') ? '게시판제목' : '제목';
|
|
||||||
?>
|
$bbs_subject_title = ($type == 'board') ? '게시판제목' : '제목';
|
||||||
|
?>
|
||||||
|
|
||||||
<div class="tbl_head01 tbl_wrap">
|
<div class="tbl_head01 tbl_wrap">
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col"><?php echo $bbs_subject_title; ?></th>
|
<th scope="col"><?php echo $bbs_subject_title; ?></th>
|
||||||
<?php if ($type == 'board') { ?>
|
<?php if($type == 'board'){ ?>
|
||||||
<th scope="col">게시판 그룹</th>
|
<th scope="col">게시판 그룹</th>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<th scope="col">선택</th>
|
<th scope="col">선택</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|
||||||
<?php }
|
<?php }
|
||||||
switch ($type) {
|
switch($type) {
|
||||||
case 'group':
|
case 'group':
|
||||||
$link = G5_BBS_URL . '/group.php?gr_id=' . $row['id'];
|
$link = G5_BBS_URL.'/group.php?gr_id='.$row['id'];
|
||||||
break;
|
break;
|
||||||
case 'board':
|
case 'board':
|
||||||
$link = get_pretty_url($row['id']);
|
$link = G5_BBS_URL.'/board.php?bo_table='.$row['id'];
|
||||||
break;
|
break;
|
||||||
case 'content':
|
case 'content':
|
||||||
$link = get_pretty_url(G5_CONTENT_DIR, $row['id']);
|
$link = G5_BBS_URL.'/content.php?co_id='.$row['id'];
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$link = '';
|
$link = '';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td><?php echo $row['subject']; ?></td>
|
||||||
|
<?php
|
||||||
|
if($type == 'board'){
|
||||||
|
$group = get_call_func_cache('get_group', array($row['gr_id']));
|
||||||
?>
|
?>
|
||||||
|
<td><?php echo $group['gr_subject']; ?></td>
|
||||||
|
<?php } ?>
|
||||||
|
<td class="td_mngsmall">
|
||||||
|
<input type="hidden" name="subject[]" value="<?php echo preg_replace('/[\'\"]/', '', $row['subject']); ?>">
|
||||||
|
<input type="hidden" name="link[]" value="<?php echo $link; ?>">
|
||||||
|
<button type="button" class="add_select btn btn_03"><span class="sound_only"><?php echo $row['subject']; ?> </span>선택</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<?php } ?>
|
||||||
<td><?php echo $row['subject']; ?></td>
|
|
||||||
<?php
|
|
||||||
if ($type == 'board') {
|
|
||||||
$group = get_call_func_cache('get_group', array($row['gr_id']));
|
|
||||||
?>
|
|
||||||
<td><?php echo $group['gr_subject']; ?></td>
|
|
||||||
<?php } ?>
|
|
||||||
<td class="td_mngsmall">
|
|
||||||
<input type="hidden" name="subject[]" value="<?php echo preg_replace('/[\'\"]/', '', $row['subject']); ?>">
|
|
||||||
<input type="hidden" name="link[]" value="<?php echo $link; ?>">
|
|
||||||
<button type="button" class="add_select btn btn_03"><span class="sound_only"><?php echo $row['subject']; ?> </span>선택</button>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<?php } ?>
|
</tbody>
|
||||||
|
|
||||||
</tbody>
|
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -96,25 +96,26 @@ if ($sql) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
|
|
||||||
<div class="tbl_frm01 tbl_wrap">
|
<div class="tbl_frm01 tbl_wrap">
|
||||||
<table>
|
<table>
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col class="grid_2">
|
<col class="grid_2">
|
||||||
<col>
|
<col>
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="me_name">메뉴<strong class="sound_only"> 필수</strong></label></th>
|
<th scope="row"><label for="me_name">메뉴<strong class="sound_only"> 필수</strong></label></th>
|
||||||
<td><input type="text" name="me_name" id="me_name" required class="frm_input required"></td>
|
<td><input type="text" name="me_name" id="me_name" required class="frm_input required"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="me_link">링크<strong class="sound_only"> 필수</strong></label></th>
|
<th scope="row"><label for="me_link">링크<strong class="sound_only"> 필수</strong></label></th>
|
||||||
<td>
|
<td>
|
||||||
<?php echo help('링크는 http://를 포함해서 입력해 주세요.'); ?>
|
<?php echo help('링크는 http://를 포함해서 입력해 주세요.'); ?>
|
||||||
<input type="text" name="me_link" id="me_link" required class="frm_input full_input required">
|
<input type="text" name="me_link" id="me_link" required class="frm_input full_input required">
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -122,4 +123,4 @@ if ($sql) {
|
|||||||
<button type="button" id="add_manual" class="btn_submit btn">추가</button>
|
<button type="button" id="add_manual" class="btn_submit btn">추가</button>
|
||||||
<button type="button" class="btn_02 btn" onclick="window.close();">창닫기</button>
|
<button type="button" class="btn_02 btn" onclick="window.close();">창닫기</button>
|
||||||
</div>
|
</div>
|
||||||
<?php } // end if;
|
<?php } ?>
|
||||||
+164
-163
@@ -1,25 +1,36 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "100290";
|
$sub_menu = "100290";
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
|
|
||||||
if ($is_admin != 'super') {
|
if ($is_admin != 'super')
|
||||||
alert('최고관리자만 접근 가능합니다.');
|
alert('최고관리자만 접근 가능합니다.');
|
||||||
}
|
|
||||||
|
|
||||||
// 메뉴테이블 생성
|
// 메뉴테이블 생성
|
||||||
if (!isset($g5['menu_table'])) {
|
if( !isset($g5['menu_table']) ){
|
||||||
die('<meta charset="utf-8">dbconfig.php 파일에 <strong>$g5[\'menu_table\'] = G5_TABLE_PREFIX.\'menu\';</strong> 를 추가해 주세요.');
|
die('<meta charset="utf-8">dbconfig.php 파일에 <strong>$g5[\'menu_table\'] = G5_TABLE_PREFIX.\'menu\';</strong> 를 추가해 주세요.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!sql_query(" DESCRIBE {$g5['menu_table']} ", false)) {
|
||||||
|
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['menu_table']}` (
|
||||||
|
`me_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`me_code` varchar(255) NOT NULL DEFAULT '',
|
||||||
|
`me_name` varchar(255) NOT NULL DEFAULT '',
|
||||||
|
`me_link` varchar(255) NOT NULL DEFAULT '',
|
||||||
|
`me_target` varchar(255) NOT NULL DEFAULT '0',
|
||||||
|
`me_order` int(11) NOT NULL DEFAULT '0',
|
||||||
|
`me_use` tinyint(4) NOT NULL DEFAULT '0',
|
||||||
|
`me_mobile_use` tinyint(4) NOT NULL DEFAULT '0',
|
||||||
|
PRIMARY KEY (`me_id`)
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ", true);
|
||||||
|
}
|
||||||
|
|
||||||
$sql = " select * from {$g5['menu_table']} order by me_id ";
|
$sql = " select * from {$g5['menu_table']} order by me_id ";
|
||||||
$result = sql_query($sql);
|
$result = sql_query($sql);
|
||||||
|
|
||||||
$g5['title'] = "메뉴설정";
|
$g5['title'] = "메뉴설정";
|
||||||
require_once './admin.head.php';
|
include_once('./admin.head.php');
|
||||||
|
|
||||||
$colspan = 7;
|
$colspan = 7;
|
||||||
$sub_menu_info = '';
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="local_desc01 local_desc">
|
<div class="local_desc01 local_desc">
|
||||||
@@ -27,178 +38,168 @@ $sub_menu_info = '';
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<form name="fmenulist" id="fmenulist" method="post" action="./menu_list_update.php" onsubmit="return fmenulist_submit(this);">
|
<form name="fmenulist" id="fmenulist" method="post" action="./menu_list_update.php" onsubmit="return fmenulist_submit(this);">
|
||||||
<input type="hidden" name="token" value="">
|
<input type="hidden" name="token" value="">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div id="menulist" class="tbl_head01 tbl_wrap">
|
<div id="menulist" class="tbl_head01 tbl_wrap">
|
||||||
<table>
|
<table>
|
||||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<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">PC사용</th>
|
<th scope="col">PC사용</th>
|
||||||
<th scope="col">모바일사용</th>
|
<th scope="col">모바일사용</th>
|
||||||
<th scope="col">관리</th>
|
<th scope="col">관리</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||||
$bg = 'bg' . ($i % 2);
|
{
|
||||||
$sub_menu_class = '';
|
$bg = 'bg'.($i%2);
|
||||||
if (strlen($row['me_code']) == 4) {
|
$sub_menu_class = '';
|
||||||
$sub_menu_class = ' sub_menu_class';
|
if(strlen($row['me_code']) == 4) {
|
||||||
$sub_menu_info = '<span class="sound_only">' . $row['me_name'] . '의 서브</span>';
|
$sub_menu_class = ' sub_menu_class';
|
||||||
$sub_menu_ico = '<span class="sub_menu_ico"></span>';
|
$sub_menu_info = '<span class="sound_only">'.$row['me_name'].'의 서브</span>';
|
||||||
}
|
$sub_menu_ico = '<span class="sub_menu_ico"></span>';
|
||||||
|
}
|
||||||
|
|
||||||
$search = array('"', "'");
|
$search = array('"', "'");
|
||||||
$replace = array('"', ''');
|
$replace = array('"', ''');
|
||||||
$me_name = str_replace($search, $replace, $row['me_name']);
|
$me_name = str_replace($search, $replace, $row['me_name']);
|
||||||
?>
|
?>
|
||||||
<tr class="<?php echo $bg; ?> menu_list menu_group_<?php echo substr($row['me_code'], 0, 2); ?>">
|
<tr class="<?php echo $bg; ?> menu_list menu_group_<?php echo substr($row['me_code'], 0, 2); ?>">
|
||||||
<td class="td_category<?php echo $sub_menu_class; ?>">
|
<td class="td_category<?php echo $sub_menu_class; ?>">
|
||||||
<input type="hidden" name="code[]" value="<?php echo substr($row['me_code'], 0, 2) ?>">
|
<input type="hidden" name="code[]" value="<?php echo substr($row['me_code'], 0, 2) ?>">
|
||||||
<label for="me_name_<?php echo $i; ?>" class="sound_only"><?php echo $sub_menu_info; ?> 메뉴<strong class="sound_only"> 필수</strong></label>
|
<label for="me_name_<?php echo $i; ?>" class="sound_only"><?php echo $sub_menu_info; ?> 메뉴<strong class="sound_only"> 필수</strong></label>
|
||||||
<input type="text" name="me_name[]" value="<?php echo get_sanitize_input($me_name); ?>" id="me_name_<?php echo $i; ?>" required class="required tbl_input full_input">
|
<input type="text" name="me_name[]" value="<?php echo $me_name; ?>" id="me_name_<?php echo $i; ?>" required class="required tbl_input full_input">
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<label for="me_link_<?php echo $i; ?>" class="sound_only">링크<strong class="sound_only"> 필수</strong></label>
|
<label for="me_link_<?php echo $i; ?>" class="sound_only">링크<strong class="sound_only"> 필수</strong></label>
|
||||||
<input type="text" name="me_link[]" value="<?php echo $row['me_link'] ?>" id="me_link_<?php echo $i; ?>" required class="required tbl_input full_input">
|
<input type="text" name="me_link[]" value="<?php echo $row['me_link'] ?>" id="me_link_<?php echo $i; ?>" required class="required tbl_input full_input">
|
||||||
</td>
|
</td>
|
||||||
<td class="td_mng">
|
<td class="td_mng">
|
||||||
<label for="me_target_<?php echo $i; ?>" class="sound_only">새창</label>
|
<label for="me_target_<?php echo $i; ?>" class="sound_only">새창</label>
|
||||||
<select name="me_target[]" id="me_target_<?php echo $i; ?>">
|
<select name="me_target[]" id="me_target_<?php echo $i; ?>">
|
||||||
<option value="self" <?php echo get_selected($row['me_target'], 'self', true); ?>>사용안함</option>
|
<option value="self"<?php echo get_selected($row['me_target'], 'self', true); ?>>사용안함</option>
|
||||||
<option value="blank" <?php echo get_selected($row['me_target'], 'blank', true); ?>>사용함</option>
|
<option value="blank"<?php echo get_selected($row['me_target'], 'blank', true); ?>>사용함</option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
<td class="td_num">
|
<td class="td_num">
|
||||||
<label for="me_order_<?php echo $i; ?>" class="sound_only">순서</label>
|
<label for="me_order_<?php echo $i; ?>" class="sound_only">순서</label>
|
||||||
<input type="text" name="me_order[]" value="<?php echo $row['me_order'] ?>" id="me_order_<?php echo $i; ?>" class="tbl_input" size="5">
|
<input type="text" name="me_order[]" value="<?php echo $row['me_order'] ?>" id="me_order_<?php echo $i; ?>" class="tbl_input" size="5">
|
||||||
</td>
|
</td>
|
||||||
<td class="td_mng">
|
<td class="td_mng">
|
||||||
<label for="me_use_<?php echo $i; ?>" class="sound_only">PC사용</label>
|
<label for="me_use_<?php echo $i; ?>" class="sound_only">PC사용</label>
|
||||||
<select name="me_use[]" id="me_use_<?php echo $i; ?>">
|
<select name="me_use[]" id="me_use_<?php echo $i; ?>">
|
||||||
<option value="1" <?php echo get_selected($row['me_use'], '1', true); ?>>사용함</option>
|
<option value="1"<?php echo get_selected($row['me_use'], '1', true); ?>>사용함</option>
|
||||||
<option value="0" <?php echo get_selected($row['me_use'], '0', true); ?>>사용안함</option>
|
<option value="0"<?php echo get_selected($row['me_use'], '0', true); ?>>사용안함</option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
<td class="td_mng">
|
<td class="td_mng">
|
||||||
<label for="me_mobile_use_<?php echo $i; ?>" class="sound_only">모바일사용</label>
|
<label for="me_mobile_use_<?php echo $i; ?>" class="sound_only">모바일사용</label>
|
||||||
<select name="me_mobile_use[]" id="me_mobile_use_<?php echo $i; ?>">
|
<select name="me_mobile_use[]" id="me_mobile_use_<?php echo $i; ?>">
|
||||||
<option value="1" <?php echo get_selected($row['me_mobile_use'], '1', true); ?>>사용함</option>
|
<option value="1"<?php echo get_selected($row['me_mobile_use'], '1', true); ?>>사용함</option>
|
||||||
<option value="0" <?php echo get_selected($row['me_mobile_use'], '0', true); ?>>사용안함</option>
|
<option value="0"<?php echo get_selected($row['me_mobile_use'], '0', true); ?>>사용안함</option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
<td class="td_mng">
|
<td class="td_mng">
|
||||||
<?php if (strlen($row['me_code']) == 2) { ?>
|
<?php if(strlen($row['me_code']) == 2) { ?>
|
||||||
<button type="button" class="btn_add_submenu btn_03 ">추가</button>
|
<button type="button" class="btn_add_submenu btn_03 ">추가</button>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<button type="button" class="btn_del_menu btn_02">삭제</button>
|
<button type="button" class="btn_del_menu btn_02">삭제</button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($i == 0) {
|
if ($i==0)
|
||||||
echo '<tr id="empty_menu_list"><td colspan="' . $colspan . '" class="empty_table">자료가 없습니다.</td></tr>';
|
echo '<tr id="empty_menu_list"><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||||
}
|
?>
|
||||||
?>
|
</tbody>
|
||||||
</tbody>
|
</table>
|
||||||
</table>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="btn_fixed_top">
|
<div class="btn_fixed_top">
|
||||||
<button type="button" onclick="return add_menu();" class="btn btn_02">메뉴추가<span class="sound_only"> 새창</span></button>
|
<button type="button" onclick="return add_menu();" class="btn btn_02">메뉴추가<span class="sound_only"> 새창</span></button>
|
||||||
<input type="submit" name="act_button" value="확인" class="btn_submit btn ">
|
<input type="submit" name="act_button" value="확인" class="btn_submit btn ">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(function() {
|
$(function() {
|
||||||
$(document).on("click", ".btn_add_submenu", function() {
|
$(document).on("click", ".btn_add_submenu", function() {
|
||||||
var code = $(this).closest("tr").find("input[name='code[]']").val().substr(0, 2);
|
var code = $(this).closest("tr").find("input[name='code[]']").val().substr(0, 2);
|
||||||
add_submenu(code);
|
add_submenu(code);
|
||||||
});
|
|
||||||
|
|
||||||
$(document).on("click", ".btn_del_menu", function() {
|
|
||||||
if (!confirm("메뉴를 삭제하시겠습니까?\n메뉴 삭제후 메뉴설정의 확인 버튼을 눌러 메뉴를 저장해 주세요."))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
var $tr = $(this).closest("tr");
|
|
||||||
if ($tr.find("td.sub_menu_class").length > 0) {
|
|
||||||
$tr.remove();
|
|
||||||
} else {
|
|
||||||
var code = $(this).closest("tr").find("input[name='code[]']").val().substr(0, 2);
|
|
||||||
$("tr.menu_group_" + code).remove();
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($("#menulist tr.menu_list").length < 1) {
|
|
||||||
var list = "<tr id=\"empty_menu_list\"><td colspan=\"<?php echo $colspan; ?>\" class=\"empty_table\">자료가 없습니다.</td></tr>\n";
|
|
||||||
$("#menulist table tbody").append(list);
|
|
||||||
} else {
|
|
||||||
$("#menulist tr.menu_list").each(function(index) {
|
|
||||||
$(this).removeClass("bg0 bg1")
|
|
||||||
.addClass("bg" + (index % 2));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function add_menu() {
|
$(document).on("click", ".btn_del_menu", function() {
|
||||||
var max_code = base_convert(0, 10, 36);
|
if(!confirm("메뉴를 삭제하시겠습니까?"))
|
||||||
$("#menulist tr.menu_list").each(function() {
|
return false;
|
||||||
var me_code = $(this).find("input[name='code[]']").val().substr(0, 2);
|
|
||||||
if (max_code < me_code)
|
|
||||||
max_code = me_code;
|
|
||||||
});
|
|
||||||
|
|
||||||
var url = "./menu_form.php?code=" + max_code + "&new=new";
|
var $tr = $(this).closest("tr");
|
||||||
window.open(url, "add_menu", "left=100,top=100,width=550,height=650,scrollbars=yes,resizable=yes");
|
if($tr.find("td.sub_menu_class").size() > 0) {
|
||||||
return false;
|
$tr.remove();
|
||||||
}
|
} else {
|
||||||
|
var code = $(this).closest("tr").find("input[name='code[]']").val().substr(0, 2);
|
||||||
function add_submenu(code) {
|
$("tr.menu_group_"+code).remove();
|
||||||
var url = "./menu_form.php?code=" + code;
|
|
||||||
window.open(url, "add_menu", "left=100,top=100,width=550,height=650,scrollbars=yes,resizable=yes");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
function base_convert(number, frombase, tobase) {
|
|
||||||
// discuss at: http://phpjs.org/functions/base_convert/
|
|
||||||
// original by: Philippe Baumann
|
|
||||||
// improved by: Rafał Kukawski (http://blog.kukawski.pl)
|
|
||||||
// example 1: base_convert('A37334', 16, 2);
|
|
||||||
// returns 1: '101000110111001100110100'
|
|
||||||
|
|
||||||
return parseInt(number + '', frombase | 0)
|
|
||||||
.toString(tobase | 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
function fmenulist_submit(f) {
|
|
||||||
|
|
||||||
var me_links = document.getElementsByName('me_link[]');
|
|
||||||
var reg = /^javascript/;
|
|
||||||
|
|
||||||
for (i = 0; i < me_links.length; i++) {
|
|
||||||
|
|
||||||
if (reg.test(me_links[i].value)) {
|
|
||||||
|
|
||||||
alert('링크에 자바스크립트문을 입력할수 없습니다.');
|
|
||||||
me_links[i].focus();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
if($("#menulist tr.menu_list").size() < 1) {
|
||||||
}
|
var list = "<tr id=\"empty_menu_list\"><td colspan=\"<?php echo $colspan; ?>\" class=\"empty_table\">자료가 없습니다.</td></tr>\n";
|
||||||
|
$("#menulist table tbody").append(list);
|
||||||
|
} else {
|
||||||
|
$("#menulist tr.menu_list").each(function(index) {
|
||||||
|
$(this).removeClass("bg0 bg1")
|
||||||
|
.addClass("bg"+(index % 2));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
function add_menu()
|
||||||
|
{
|
||||||
|
var max_code = base_convert(0, 10, 36);
|
||||||
|
$("#menulist tr.menu_list").each(function() {
|
||||||
|
var me_code = $(this).find("input[name='code[]']").val().substr(0, 2);
|
||||||
|
if(max_code < me_code)
|
||||||
|
max_code = me_code;
|
||||||
|
});
|
||||||
|
|
||||||
|
var url = "./menu_form.php?code="+max_code+"&new=new";
|
||||||
|
window.open(url, "add_menu", "left=100,top=100,width=550,height=650,scrollbars=yes,resizable=yes");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function add_submenu(code)
|
||||||
|
{
|
||||||
|
var url = "./menu_form.php?code="+code;
|
||||||
|
window.open(url, "add_menu", "left=100,top=100,width=550,height=650,scrollbars=yes,resizable=yes");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function base_convert(number, frombase, tobase) {
|
||||||
|
// discuss at: http://phpjs.org/functions/base_convert/
|
||||||
|
// original by: Philippe Baumann
|
||||||
|
// improved by: Rafał Kukawski (http://blog.kukawski.pl)
|
||||||
|
// example 1: base_convert('A37334', 16, 2);
|
||||||
|
// returns 1: '101000110111001100110100'
|
||||||
|
|
||||||
|
return parseInt(number + '', frombase | 0)
|
||||||
|
.toString(tobase | 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
function fmenulist_submit(f)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
require_once './admin.tail.php';
|
include_once ('./admin.tail.php');
|
||||||
|
?>
|
||||||
|
|||||||
+23
-32
@@ -1,12 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "100290";
|
$sub_menu = "100290";
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
|
|
||||||
check_demo();
|
check_demo();
|
||||||
|
|
||||||
if ($is_admin != 'super') {
|
if ($is_admin != 'super')
|
||||||
alert('최고관리자만 접근 가능합니다.');
|
alert('최고관리자만 접근 가능합니다.');
|
||||||
}
|
|
||||||
|
|
||||||
check_admin_token();
|
check_admin_token();
|
||||||
|
|
||||||
@@ -16,47 +15,40 @@ sql_query($sql);
|
|||||||
|
|
||||||
$group_code = null;
|
$group_code = null;
|
||||||
$primary_code = null;
|
$primary_code = null;
|
||||||
$count = isset($_POST['code']) ? count($_POST['code']) : 0;
|
$count = count($_POST['code']);
|
||||||
|
|
||||||
for ($i = 0; $i < $count; $i++) {
|
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]))) {
|
$code = $_POST['code'][$i];
|
||||||
$_POST['me_link'][$i] = G5_URL;
|
$me_name = $_POST['me_name'][$i];
|
||||||
}
|
$me_link = $_POST['me_link'][$i];
|
||||||
|
|
||||||
$_POST['me_link'][$i] = is_array($_POST['me_link']) ? clean_xss_tags(clean_xss_attributes(preg_replace('/[ ]{2,}|[\t]/', '', $_POST['me_link'][$i]), 1)) : '';
|
if(!$code || !$me_name || !$me_link)
|
||||||
$_POST['me_link'][$i] = html_purifier($_POST['me_link'][$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_link = (preg_match('/^javascript/i', $_POST['me_link'][$i]) || preg_match('/script:/i', $_POST['me_link'][$i])) ? G5_URL : addslashes(strip_tags(clean_xss_attributes(stripslashes($_POST['me_link'][$i]))));
|
|
||||||
|
|
||||||
if (!$code || !$me_name || !$me_link) {
|
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
|
|
||||||
$sub_code = '';
|
$sub_code = '';
|
||||||
if ($group_code == $code) {
|
if($group_code == $code) {
|
||||||
$sql = " select MAX(SUBSTRING(me_code,3,2)) as max_me_code
|
$sql = " select MAX(SUBSTRING(me_code,3,2)) as max_me_code
|
||||||
from {$g5['menu_table']}
|
from {$g5['menu_table']}
|
||||||
where SUBSTRING(me_code,1,2) = '$primary_code' ";
|
where SUBSTRING(me_code,1,2) = '$primary_code' ";
|
||||||
$row = sql_fetch($sql);
|
$row = sql_fetch($sql);
|
||||||
|
|
||||||
$sub_code = (int)base_convert($row['max_me_code'], 36, 10);
|
$sub_code = base_convert($row['max_me_code'], 36, 10);
|
||||||
$sub_code += 36;
|
$sub_code += 36;
|
||||||
$sub_code = base_convert((string)$sub_code, 10, 36);
|
$sub_code = base_convert($sub_code, 10, 36);
|
||||||
|
|
||||||
$me_code = $primary_code . $sub_code;
|
$me_code = $primary_code.$sub_code;
|
||||||
} else {
|
} else {
|
||||||
$sql = " select MAX(SUBSTRING(me_code,1,2)) as max_me_code
|
$sql = " select MAX(SUBSTRING(me_code,1,2)) as max_me_code
|
||||||
from {$g5['menu_table']}
|
from {$g5['menu_table']}
|
||||||
where LENGTH(me_code) = '2' ";
|
where LENGTH(me_code) = '2' ";
|
||||||
$row = sql_fetch($sql);
|
$row = sql_fetch($sql);
|
||||||
|
|
||||||
$me_code = (int)base_convert($row['max_me_code'], 36, 10);
|
$me_code = base_convert($row['max_me_code'], 36, 10);
|
||||||
$me_code += 36;
|
$me_code += 36;
|
||||||
$me_code = base_convert((string)$me_code, 10, 36);
|
$me_code = base_convert($me_code, 10, 36);
|
||||||
|
|
||||||
$group_code = $code;
|
$group_code = $code;
|
||||||
$primary_code = $me_code;
|
$primary_code = $me_code;
|
||||||
@@ -64,16 +56,15 @@ for ($i = 0; $i < $count; $i++) {
|
|||||||
|
|
||||||
// 메뉴 등록
|
// 메뉴 등록
|
||||||
$sql = " insert into {$g5['menu_table']}
|
$sql = " insert into {$g5['menu_table']}
|
||||||
set me_code = '" . $me_code . "',
|
set me_code = '$me_code',
|
||||||
me_name = '" . $me_name . "',
|
me_name = '$me_name',
|
||||||
me_link = '" . $me_link . "',
|
me_link = '$me_link',
|
||||||
me_target = '" . sql_real_escape_string(strip_tags($_POST['me_target'][$i])) . "',
|
me_target = '{$_POST['me_target'][$i]}',
|
||||||
me_order = '" . sql_real_escape_string(strip_tags($_POST['me_order'][$i])) . "',
|
me_order = '{$_POST['me_order'][$i]}',
|
||||||
me_use = '" . sql_real_escape_string(strip_tags($_POST['me_use'][$i])) . "',
|
me_use = '{$_POST['me_use'][$i]}',
|
||||||
me_mobile_use = '" . sql_real_escape_string(strip_tags($_POST['me_mobile_use'][$i])) . "' ";
|
me_mobile_use = '{$_POST['me_mobile_use'][$i]}' ";
|
||||||
sql_query($sql);
|
sql_query($sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
run_event('admin_menu_list_update');
|
|
||||||
|
|
||||||
goto_url('./menu_list.php');
|
goto_url('./menu_list.php');
|
||||||
|
?>
|
||||||
|
|||||||
+150
-170
@@ -1,170 +1,150 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = '100310';
|
$sub_menu = '100310';
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
require_once G5_EDITOR_LIB;
|
include_once(G5_EDITOR_LIB);
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, "w");
|
auth_check($auth[$sub_menu], "w");
|
||||||
|
|
||||||
$nw_id = isset($_REQUEST['nw_id']) ? (string)preg_replace('/[^0-9]/', '', $_REQUEST['nw_id']) : 0;
|
$nw_id = preg_replace('/[^0-9]/', '', $nw_id);
|
||||||
$nw = array(
|
|
||||||
'nw_begin_time' => '',
|
$html_title = "팝업레이어";
|
||||||
'nw_end_time' => '',
|
if ($w == "u")
|
||||||
'nw_subject' => '',
|
{
|
||||||
'nw_content' => '',
|
$html_title .= " 수정";
|
||||||
'nw_division' => '',
|
$sql = " select * from {$g5['new_win_table']} where nw_id = '$nw_id' ";
|
||||||
);
|
$nw = sql_fetch($sql);
|
||||||
|
if (!$nw['nw_id']) alert("등록된 자료가 없습니다.");
|
||||||
$html_title = "팝업레이어";
|
}
|
||||||
|
else
|
||||||
// 팝업레이어 테이블에 쇼핑몰, 커뮤니티 인지 구분하는 여부 필드 추가
|
{
|
||||||
|
$html_title .= " 입력";
|
||||||
if ($w == "u") {
|
$nw['nw_device'] = 'both';
|
||||||
$html_title .= " 수정";
|
$nw['nw_disable_hours'] = 24;
|
||||||
$sql = " select * from {$g5['new_win_table']} where nw_id = '$nw_id' ";
|
$nw['nw_left'] = 10;
|
||||||
$nw = sql_fetch($sql);
|
$nw['nw_top'] = 10;
|
||||||
if (!(isset($nw['nw_id']) && $nw['nw_id'])) {
|
$nw['nw_width'] = 450;
|
||||||
alert("등록된 자료가 없습니다.");
|
$nw['nw_height'] = 500;
|
||||||
}
|
$nw['nw_content_html'] = 2;
|
||||||
} else {
|
}
|
||||||
$html_title .= " 입력";
|
|
||||||
$nw['nw_device'] = 'both';
|
$g5['title'] = $html_title;
|
||||||
$nw['nw_disable_hours'] = 24;
|
include_once (G5_ADMIN_PATH.'/admin.head.php');
|
||||||
$nw['nw_left'] = 10;
|
?>
|
||||||
$nw['nw_top'] = 10;
|
|
||||||
$nw['nw_width'] = 450;
|
<form name="frmnewwin" action="./newwinformupdate.php" onsubmit="return frmnewwin_check(this);" method="post">
|
||||||
$nw['nw_height'] = 500;
|
<input type="hidden" name="w" value="<?php echo $w; ?>">
|
||||||
$nw['nw_content_html'] = 2;
|
<input type="hidden" name="nw_id" value="<?php echo $nw_id; ?>">
|
||||||
}
|
<input type="hidden" name="token" value="">
|
||||||
|
|
||||||
$g5['title'] = $html_title;
|
<div class="local_desc01 local_desc">
|
||||||
require_once G5_ADMIN_PATH . '/admin.head.php';
|
<p>초기화면 접속 시 자동으로 뜰 팝업레이어를 설정합니다.</p>
|
||||||
?>
|
</div>
|
||||||
|
|
||||||
<form name="frmnewwin" action="./newwinformupdate.php" onsubmit="return frmnewwin_check(this);" method="post">
|
<div class="tbl_frm01 tbl_wrap">
|
||||||
<input type="hidden" name="w" value="<?php echo $w; ?>">
|
<table>
|
||||||
<input type="hidden" name="nw_id" value="<?php echo $nw_id; ?>">
|
<caption><?php echo $g5['title']; ?></caption>
|
||||||
<input type="hidden" name="token" value="">
|
<colgroup>
|
||||||
|
<col class="grid_4">
|
||||||
<div class="local_desc01 local_desc">
|
<col>
|
||||||
<p>초기화면 접속 시 자동으로 뜰 팝업레이어를 설정합니다.</p>
|
</colgroup>
|
||||||
</div>
|
<tbody>
|
||||||
|
<tr>
|
||||||
<div class="tbl_frm01 tbl_wrap">
|
<th scope="row"><label for="nw_device">접속기기</label></th>
|
||||||
<table>
|
<td>
|
||||||
<caption><?php echo $g5['title']; ?></caption>
|
<?php echo help("팝업레이어가 표시될 접속기기를 설정합니다."); ?>
|
||||||
<colgroup>
|
<select name="nw_device" id="nw_device">
|
||||||
<col class="grid_4">
|
<option value="both"<?php echo get_selected($nw['nw_device'], 'both', true); ?>>PC와 모바일</option>
|
||||||
<col>
|
<option value="pc"<?php echo get_selected($nw['nw_device'], 'pc'); ?>>PC</option>
|
||||||
</colgroup>
|
<option value="mobile"<?php echo get_selected($nw['nw_device'], 'mobile'); ?>>모바일</option>
|
||||||
<tbody>
|
</select>
|
||||||
<tr>
|
</td>
|
||||||
<th scope="row"><label for="nw_division">구분</label></th>
|
</tr>
|
||||||
<td>
|
<tr>
|
||||||
<?php echo help("커뮤니티에 표시될 것인지 쇼핑몰에 표시될 것인지를 설정합니다."); ?>
|
<th scope="row"><label for="nw_disable_hours">시간<strong class="sound_only"> 필수</strong></label></th>
|
||||||
<select name="nw_division" id="nw_division">
|
<td>
|
||||||
<option value="comm" <?php echo get_selected($nw['nw_division'], 'comm'); ?>>커뮤니티</option>
|
<?php echo help("고객이 다시 보지 않음을 선택할 시 몇 시간동안 팝업레이어를 보여주지 않을지 설정합니다."); ?>
|
||||||
<?php if (defined('G5_USE_SHOP') && G5_USE_SHOP) { ?>
|
<input type="text" name="nw_disable_hours" value="<?php echo $nw['nw_disable_hours']; ?>" id="nw_disable_hours" required class="frm_input required" size="5"> 시간
|
||||||
<option value="both" <?php echo get_selected($nw['nw_division'], 'both', true); ?>>커뮤니티와 쇼핑몰</option>
|
</td>
|
||||||
<option value="shop" <?php echo get_selected($nw['nw_division'], 'shop'); ?>>쇼핑몰</option>
|
</tr>
|
||||||
<?php } ?>
|
<tr>
|
||||||
</select>
|
<th scope="row"><label for="nw_begin_time">시작일시<strong class="sound_only"> 필수</strong></label></th>
|
||||||
</td>
|
<td>
|
||||||
</tr>
|
<input type="text" name="nw_begin_time" value="<?php echo $nw['nw_begin_time']; ?>" id="nw_begin_time" required class="frm_input required" size="21" maxlength="19">
|
||||||
<tr>
|
<input type="checkbox" name="nw_begin_chk" value="<?php echo date("Y-m-d 00:00:00", G5_SERVER_TIME); ?>" id="nw_begin_chk" onclick="if (this.checked == true) this.form.nw_begin_time.value=this.form.nw_begin_chk.value; else this.form.nw_begin_time.value = this.form.nw_begin_time.defaultValue;">
|
||||||
<th scope="row"><label for="nw_device">접속기기</label></th>
|
<label for="nw_begin_chk">시작일시를 오늘로</label>
|
||||||
<td>
|
</td>
|
||||||
<?php echo help("팝업레이어가 표시될 접속기기를 설정합니다."); ?>
|
</tr>
|
||||||
<select name="nw_device" id="nw_device">
|
<tr>
|
||||||
<option value="both" <?php echo get_selected($nw['nw_device'], 'both', true); ?>>PC와 모바일</option>
|
<th scope="row"><label for="nw_end_time">종료일시<strong class="sound_only"> 필수</strong></label></th>
|
||||||
<option value="pc" <?php echo get_selected($nw['nw_device'], 'pc'); ?>>PC</option>
|
<td>
|
||||||
<option value="mobile" <?php echo get_selected($nw['nw_device'], 'mobile'); ?>>모바일</option>
|
<input type="text" name="nw_end_time" value="<?php echo $nw['nw_end_time']; ?>" id="nw_end_time" required class="frm_input required" size="21" maxlength="19">
|
||||||
</select>
|
<input type="checkbox" name="nw_end_chk" value="<?php echo date("Y-m-d 23:59:59", G5_SERVER_TIME+(60*60*24*7)); ?>" id="nw_end_chk" onclick="if (this.checked == true) this.form.nw_end_time.value=this.form.nw_end_chk.value; else this.form.nw_end_time.value = this.form.nw_end_time.defaultValue;">
|
||||||
</td>
|
<label for="nw_end_chk">종료일시를 오늘로부터 7일 후로</label>
|
||||||
</tr>
|
</td>
|
||||||
<tr>
|
</tr>
|
||||||
<th scope="row"><label for="nw_disable_hours">시간<strong class="sound_only"> 필수</strong></label></th>
|
<tr>
|
||||||
<td>
|
<th scope="row"><label for="nw_left">팝업레이어 좌측 위치<strong class="sound_only"> 필수</strong></label></th>
|
||||||
<?php echo help("고객이 다시 보지 않음을 선택할 시 몇 시간동안 팝업레이어를 보여주지 않을지 설정합니다."); ?>
|
<td>
|
||||||
<input type="text" name="nw_disable_hours" value="<?php echo $nw['nw_disable_hours']; ?>" id="nw_disable_hours" required class="frm_input required" size="5"> 시간
|
<input type="text" name="nw_left" value="<?php echo $nw['nw_left']; ?>" id="nw_left" required class="frm_input required" size="5"> px
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="nw_begin_time">시작일시<strong class="sound_only"> 필수</strong></label></th>
|
<th scope="row"><label for="nw_top">팝업레이어 상단 위치<strong class="sound_only"> 필수</strong></label></th>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" name="nw_begin_time" value="<?php echo $nw['nw_begin_time']; ?>" id="nw_begin_time" required class="frm_input required" size="21" maxlength="19">
|
<input type="text" name="nw_top" value="<?php echo $nw['nw_top']; ?>" id="nw_top" required class="frm_input required" size="5"> px
|
||||||
<input type="checkbox" name="nw_begin_chk" value="<?php echo date("Y-m-d 00:00:00", G5_SERVER_TIME); ?>" id="nw_begin_chk" onclick="if (this.checked == true) this.form.nw_begin_time.value=this.form.nw_begin_chk.value; else this.form.nw_begin_time.value = this.form.nw_begin_time.defaultValue;">
|
</td>
|
||||||
<label for="nw_begin_chk">시작일시를 오늘로</label>
|
</tr>
|
||||||
</td>
|
<tr>
|
||||||
</tr>
|
<th scope="row"><label for="nw_width">팝업레이어 넓이<strong class="sound_only"> 필수</strong></label></th>
|
||||||
<tr>
|
<td>
|
||||||
<th scope="row"><label for="nw_end_time">종료일시<strong class="sound_only"> 필수</strong></label></th>
|
<input type="text" name="nw_width" value="<?php echo $nw['nw_width'] ?>" id="nw_width" required class="frm_input required" size="5"> px
|
||||||
<td>
|
</td>
|
||||||
<input type="text" name="nw_end_time" value="<?php echo $nw['nw_end_time']; ?>" id="nw_end_time" required class="frm_input required" size="21" maxlength="19">
|
</tr>
|
||||||
<input type="checkbox" name="nw_end_chk" value="<?php echo date("Y-m-d 23:59:59", G5_SERVER_TIME + (60 * 60 * 24 * 7)); ?>" id="nw_end_chk" onclick="if (this.checked == true) this.form.nw_end_time.value=this.form.nw_end_chk.value; else this.form.nw_end_time.value = this.form.nw_end_time.defaultValue;">
|
<tr>
|
||||||
<label for="nw_end_chk">종료일시를 오늘로부터 7일 후로</label>
|
<th scope="row"><label for="nw_height">팝업레이어 높이<strong class="sound_only"> 필수</strong></label></th>
|
||||||
</td>
|
<td>
|
||||||
</tr>
|
<input type="text" name="nw_height" value="<?php echo $nw['nw_height'] ?>" id="nw_height" required class="frm_input required" size="5"> px
|
||||||
<tr>
|
</td>
|
||||||
<th scope="row"><label for="nw_left">팝업레이어 좌측 위치<strong class="sound_only"> 필수</strong></label></th>
|
</tr>
|
||||||
<td>
|
<tr>
|
||||||
<input type="text" name="nw_left" value="<?php echo $nw['nw_left']; ?>" id="nw_left" required class="frm_input required" size="5"> px
|
<th scope="row"><label for="nw_subject">팝업 제목<strong class="sound_only"> 필수</strong></label></th>
|
||||||
</td>
|
<td>
|
||||||
</tr>
|
<input type="text" name="nw_subject" value="<?php echo stripslashes($nw['nw_subject']) ?>" id="nw_subject" required class="frm_input required" size="80">
|
||||||
<tr>
|
</td>
|
||||||
<th scope="row"><label for="nw_top">팝업레이어 상단 위치<strong class="sound_only"> 필수</strong></label></th>
|
</tr>
|
||||||
<td>
|
<tr>
|
||||||
<input type="text" name="nw_top" value="<?php echo $nw['nw_top']; ?>" id="nw_top" required class="frm_input required" size="5"> px
|
<th scope="row"><label for="nw_content">내용</label></th>
|
||||||
</td>
|
<td><?php echo editor_html('nw_content', get_text($nw['nw_content'], 0)); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
</tbody>
|
||||||
<th scope="row"><label for="nw_width">팝업레이어 넓이<strong class="sound_only"> 필수</strong></label></th>
|
</table>
|
||||||
<td>
|
</div>
|
||||||
<input type="text" name="nw_width" value="<?php echo $nw['nw_width'] ?>" id="nw_width" required class="frm_input required" size="5"> px
|
|
||||||
</td>
|
<div class="btn_fixed_top">
|
||||||
</tr>
|
<a href="./newwinlist.php" class=" btn btn_02">목록</a>
|
||||||
<tr>
|
<input type="submit" value="확인" class="btn_submit btn" accesskey="s">
|
||||||
<th scope="row"><label for="nw_height">팝업레이어 높이<strong class="sound_only"> 필수</strong></label></th>
|
</div>
|
||||||
<td>
|
</form>
|
||||||
<input type="text" name="nw_height" value="<?php echo $nw['nw_height'] ?>" id="nw_height" required class="frm_input required" size="5"> px
|
|
||||||
</td>
|
<script>
|
||||||
</tr>
|
function frmnewwin_check(f)
|
||||||
<tr>
|
{
|
||||||
<th scope="row"><label for="nw_subject">팝업 제목<strong class="sound_only"> 필수</strong></label></th>
|
errmsg = "";
|
||||||
<td>
|
errfld = "";
|
||||||
<input type="text" name="nw_subject" value="<?php echo get_sanitize_input($nw['nw_subject']); ?>" id="nw_subject" required class="frm_input required" size="80">
|
|
||||||
</td>
|
<?php echo get_editor_js('nw_content'); ?>
|
||||||
</tr>
|
|
||||||
<tr>
|
check_field(f.nw_subject, "제목을 입력하세요.");
|
||||||
<th scope="row"><label for="nw_content">내용</label></th>
|
|
||||||
<td><?php echo editor_html('nw_content', get_text(html_purifier($nw['nw_content']), 0)); ?></td>
|
if (errmsg != "") {
|
||||||
</tr>
|
alert(errmsg);
|
||||||
</tbody>
|
errfld.focus();
|
||||||
</table>
|
return false;
|
||||||
</div>
|
}
|
||||||
|
return true;
|
||||||
<div class="btn_fixed_top">
|
}
|
||||||
<a href="./newwinlist.php" class=" btn btn_02">목록</a>
|
</script>
|
||||||
<input type="submit" value="확인" class="btn_submit btn" accesskey="s">
|
|
||||||
</div>
|
<?php
|
||||||
</form>
|
include_once (G5_ADMIN_PATH.'/admin.tail.php');
|
||||||
|
?>
|
||||||
<script>
|
|
||||||
function frmnewwin_check(f) {
|
|
||||||
errmsg = "";
|
|
||||||
errfld = "";
|
|
||||||
|
|
||||||
<?php echo get_editor_js('nw_content'); ?>
|
|
||||||
|
|
||||||
check_field(f.nw_subject, "제목을 입력하세요.");
|
|
||||||
|
|
||||||
if (errmsg != "") {
|
|
||||||
alert(errmsg);
|
|
||||||
errfld.focus();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
require_once G5_ADMIN_PATH . '/admin.tail.php';
|
|
||||||
|
|||||||
+53
-78
@@ -1,78 +1,53 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = '100310';
|
$sub_menu = '100310';
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
|
|
||||||
$nw_id = isset($_REQUEST['nw_id']) ? (string)preg_replace('/[^0-9]/', '', $_REQUEST['nw_id']) : 0;
|
if ($w == "u" || $w == "d")
|
||||||
|
check_demo();
|
||||||
if ($w == "u" || $w == "d") {
|
|
||||||
check_demo();
|
if ($w == 'd')
|
||||||
}
|
auth_check($auth[$sub_menu], "d");
|
||||||
|
else
|
||||||
if ($w == 'd') {
|
auth_check($auth[$sub_menu], "w");
|
||||||
auth_check_menu($auth, $sub_menu, "d");
|
|
||||||
} else {
|
check_admin_token();
|
||||||
auth_check_menu($auth, $sub_menu, "w");
|
|
||||||
}
|
$sql_common = " nw_device = '{$_POST['nw_device']}',
|
||||||
|
nw_begin_time = '{$_POST['nw_begin_time']}',
|
||||||
check_admin_token();
|
nw_end_time = '{$_POST['nw_end_time']}',
|
||||||
|
nw_disable_hours = '{$_POST['nw_disable_hours']}',
|
||||||
$nw_subject = isset($_POST['nw_subject']) ? addslashes(strip_tags(clean_xss_attributes(stripslashes($_POST['nw_subject'])))) : '';
|
nw_left = '{$_POST['nw_left']}',
|
||||||
$posts = array();
|
nw_top = '{$_POST['nw_top']}',
|
||||||
|
nw_height = '{$_POST['nw_height']}',
|
||||||
$check_keys = array(
|
nw_width = '{$_POST['nw_width']}',
|
||||||
'nw_device' => 'str',
|
nw_subject = '{$_POST['nw_subject']}',
|
||||||
'nw_division' => 'str',
|
nw_content = '{$_POST['nw_content']}',
|
||||||
'nw_begin_time' => 'str',
|
nw_content_html = '{$_POST['nw_content_html']}' ";
|
||||||
'nw_end_time' => 'str',
|
|
||||||
'nw_disable_hours' => 'int',
|
if($w == "")
|
||||||
'nw_left' => 'int',
|
{
|
||||||
'nw_top' => 'int',
|
$sql = " insert {$g5['new_win_table']} set $sql_common ";
|
||||||
'nw_height' => 'int',
|
sql_query($sql);
|
||||||
'nw_width' => 'int',
|
|
||||||
'nw_content' => 'text',
|
$nw_id = sql_insert_id();
|
||||||
'nw_content_html' => 'text',
|
}
|
||||||
);
|
else if ($w == "u")
|
||||||
|
{
|
||||||
foreach ($check_keys as $key => $val) {
|
$sql = " update {$g5['new_win_table']} set $sql_common where nw_id = '$nw_id' ";
|
||||||
if ($val === 'int') {
|
sql_query($sql);
|
||||||
$posts[$key] = isset($_POST[$key]) ? (int) $_POST[$key] : 0;
|
}
|
||||||
} elseif ($val === 'str') {
|
else if ($w == "d")
|
||||||
$posts[$key] = isset($_POST[$key]) ? addslashes(clean_xss_tags(stripslashes($_POST[$key]), 1, 1)) : 0;
|
{
|
||||||
} else {
|
$sql = " delete from {$g5['new_win_table']} where nw_id = '$nw_id' ";
|
||||||
$posts[$key] = isset($_POST[$key]) ? trim($_POST[$key]) : 0;
|
sql_query($sql);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
if ($w == "d")
|
||||||
$sql_common = " nw_device = '{$posts['nw_device']}',
|
{
|
||||||
nw_division = '{$posts['nw_division']}',
|
goto_url('./newwinlist.php');
|
||||||
nw_begin_time = '{$posts['nw_begin_time']}',
|
}
|
||||||
nw_end_time = '{$posts['nw_end_time']}',
|
else
|
||||||
nw_disable_hours = '{$posts['nw_disable_hours']}',
|
{
|
||||||
nw_left = '{$posts['nw_left']}',
|
goto_url("./newwinform.php?w=u&nw_id=$nw_id");
|
||||||
nw_top = '{$posts['nw_top']}',
|
}
|
||||||
nw_height = '{$posts['nw_height']}',
|
?>
|
||||||
nw_width = '{$posts['nw_width']}',
|
|
||||||
nw_subject = '{$nw_subject}',
|
|
||||||
nw_content = '{$posts['nw_content']}',
|
|
||||||
nw_content_html = '{$posts['nw_content_html']}' ";
|
|
||||||
|
|
||||||
if ($w == "") {
|
|
||||||
$sql = " insert {$g5['new_win_table']} set $sql_common ";
|
|
||||||
sql_query($sql);
|
|
||||||
$nw_id = sql_insert_id();
|
|
||||||
run_event('admin_newwin_created', $nw_id);
|
|
||||||
} elseif ($w == "u") {
|
|
||||||
$sql = " update {$g5['new_win_table']} set $sql_common where nw_id = '$nw_id' ";
|
|
||||||
sql_query($sql);
|
|
||||||
run_event('admin_newwin_updated', $nw_id);
|
|
||||||
} elseif ($w == "d") {
|
|
||||||
$sql = " delete from {$g5['new_win_table']} where nw_id = '$nw_id' ";
|
|
||||||
sql_query($sql);
|
|
||||||
run_event('admin_newwin_deleted', $nw_id);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($w == "d") {
|
|
||||||
goto_url('./newwinlist.php');
|
|
||||||
} else {
|
|
||||||
goto_url("./newwinform.php?w=u&nw_id=$nw_id");
|
|
||||||
}
|
|
||||||
|
|||||||
+118
-96
@@ -1,96 +1,118 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = '100310';
|
$sub_menu = '100310';
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, "r");
|
auth_check($auth[$sub_menu], "r");
|
||||||
|
|
||||||
if (!isset($g5['new_win_table'])) {
|
if( !isset($g5['new_win_table']) ){
|
||||||
die('<meta charset="utf-8">/data/dbconfig.php 파일에 <strong>$g5[\'new_win_table\'] = G5_TABLE_PREFIX.\'new_win\';</strong> 를 추가해 주세요.');
|
die('<meta charset="utf-8">/data/dbconfig.php 파일에 <strong>$g5[\'new_win_table\'] = G5_TABLE_PREFIX.\'new_win\';</strong> 를 추가해 주세요.');
|
||||||
}
|
}
|
||||||
//내용(컨텐츠)정보 테이블이 있는지 검사한다.
|
//내용(컨텐츠)정보 테이블이 있는지 검사한다.
|
||||||
|
if(!sql_query(" DESCRIBE {$g5['new_win_table']} ", false)) {
|
||||||
$g5['title'] = '팝업레이어 관리';
|
if(sql_query(" DESCRIBE {$g5['g5_shop_new_win_table']} ", false)) {
|
||||||
require_once G5_ADMIN_PATH . '/admin.head.php';
|
sql_query(" ALTER TABLE {$g5['g5_shop_new_win_table']} RENAME TO `{$g5['new_win_table']}` ;", false);
|
||||||
|
} else {
|
||||||
$sql_common = " from {$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_device` varchar(10) NOT NULL DEFAULT 'both',
|
||||||
$sql = " select count(*) as cnt " . $sql_common;
|
`nw_begin_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||||
$row = sql_fetch($sql);
|
`nw_end_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||||
$total_count = $row['cnt'];
|
`nw_disable_hours` int(11) NOT NULL DEFAULT '0',
|
||||||
|
`nw_left` int(11) NOT NULL DEFAULT '0',
|
||||||
$sql = "select * $sql_common order by nw_id desc ";
|
`nw_top` int(11) NOT NULL DEFAULT '0',
|
||||||
$result = sql_query($sql);
|
`nw_height` int(11) NOT NULL DEFAULT '0',
|
||||||
?>
|
`nw_width` int(11) NOT NULL DEFAULT '0',
|
||||||
|
`nw_subject` text NOT NULL,
|
||||||
<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>
|
`nw_content` text NOT NULL,
|
||||||
|
`nw_content_html` tinyint(4) NOT NULL DEFAULT '0',
|
||||||
<div class="btn_fixed_top ">
|
PRIMARY KEY (`nw_id`)
|
||||||
<a href="./newwinform.php" class="btn btn_01">새창관리추가</a>
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ", true);
|
||||||
</div>
|
}
|
||||||
|
}
|
||||||
<div class="tbl_head01 tbl_wrap">
|
|
||||||
<table>
|
$g5['title'] = '팝업레이어 관리';
|
||||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
include_once (G5_ADMIN_PATH.'/admin.head.php');
|
||||||
<thead>
|
|
||||||
<tr>
|
$sql_common = " from {$g5['new_win_table']} ";
|
||||||
<th scope="col">번호</th>
|
|
||||||
<th scope="col">제목</th>
|
// 테이블의 전체 레코드수만 얻음
|
||||||
<th scope="col">접속기기</th>
|
$sql = " select count(*) as cnt " . $sql_common;
|
||||||
<th scope="col">시작일시</th>
|
$row = sql_fetch($sql);
|
||||||
<th scope="col">종료일시</th>
|
$total_count = $row['cnt'];
|
||||||
<th scope="col">시간</th>
|
|
||||||
<th scope="col">Left</th>
|
$sql = "select * $sql_common order by nw_id desc ";
|
||||||
<th scope="col">Top</th>
|
$result = sql_query($sql);
|
||||||
<th scope="col">Width</th>
|
?>
|
||||||
<th scope="col">Height</th>
|
|
||||||
<th scope="col">관리</th>
|
<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>
|
||||||
</tr>
|
|
||||||
</thead>
|
<div class="btn_fixed_top ">
|
||||||
<tbody>
|
<a href="./newwinform.php" class="btn btn_01">새창관리추가</a>
|
||||||
<?php
|
</div>
|
||||||
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
|
||||||
$bg = 'bg' . ($i % 2);
|
<div class="tbl_head01 tbl_wrap">
|
||||||
|
<table>
|
||||||
switch ($row['nw_device']) {
|
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||||
case 'pc':
|
<thead>
|
||||||
$nw_device = 'PC';
|
<tr>
|
||||||
break;
|
<th scope="col">번호</th>
|
||||||
case 'mobile':
|
<th scope="col">제목</th>
|
||||||
$nw_device = '모바일';
|
<th scope="col">접속기기</th>
|
||||||
break;
|
<th scope="col">시작일시</th>
|
||||||
default:
|
<th scope="col">종료일시</th>
|
||||||
$nw_device = '모두';
|
<th scope="col">시간</th>
|
||||||
break;
|
<th scope="col">Left</th>
|
||||||
}
|
<th scope="col">Top</th>
|
||||||
?>
|
<th scope="col">Width</th>
|
||||||
<tr class="<?php echo $bg; ?>">
|
<th scope="col">Height</th>
|
||||||
<td class="td_num"><?php echo $row['nw_id']; ?></td>
|
<th scope="col">관리</th>
|
||||||
<td class="td_left"><?php echo $row['nw_subject']; ?></td>
|
</tr>
|
||||||
<td class="td_device"><?php echo $nw_device; ?></td>
|
</thead>
|
||||||
<td class="td_datetime"><?php echo substr($row['nw_begin_time'], 2, 14); ?></td>
|
<tbody>
|
||||||
<td class="td_datetime"><?php echo substr($row['nw_end_time'], 2, 14); ?></td>
|
<?php
|
||||||
<td class="td_num"><?php echo $row['nw_disable_hours']; ?>시간</td>
|
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||||
<td class="td_num"><?php echo $row['nw_left']; ?>px</td>
|
$bg = 'bg'.($i%2);
|
||||||
<td class="td_num"><?php echo $row['nw_top']; ?>px</td>
|
|
||||||
<td class="td_num"><?php echo $row['nw_width']; ?>px</td>
|
switch($row['nw_device']) {
|
||||||
<td class="td_num"><?php echo $row['nw_height']; ?>px</td>
|
case 'pc':
|
||||||
<td class="td_mng td_mng_m">
|
$nw_device = 'PC';
|
||||||
<a href="./newwinform.php?w=u&nw_id=<?php echo $row['nw_id']; ?>" class="btn btn_03"><span class="sound_only"><?php echo $row['nw_subject']; ?> </span>수정</a>
|
break;
|
||||||
<a href="./newwinformupdate.php?w=d&nw_id=<?php echo $row['nw_id']; ?>" onclick="return delete_confirm(this);" class="btn btn_02"><span class="sound_only"><?php echo $row['nw_subject']; ?> </span>삭제</a>
|
case 'mobile':
|
||||||
</td>
|
$nw_device = '모바일';
|
||||||
</tr>
|
break;
|
||||||
<?php
|
default:
|
||||||
}
|
$nw_device = '모두';
|
||||||
|
break;
|
||||||
if ($i == 0) {
|
}
|
||||||
echo '<tr><td colspan="11" class="empty_table">자료가 한건도 없습니다.</td></tr>';
|
?>
|
||||||
}
|
<tr class="<?php echo $bg; ?>">
|
||||||
?>
|
<td class="td_num"><?php echo $row['nw_id']; ?></td>
|
||||||
</tbody>
|
<td class="td_left"><?php echo $row['nw_subject']; ?></td>
|
||||||
</table>
|
<td class="td_device"><?php echo $nw_device; ?></td>
|
||||||
</div>
|
<td class="td_datetime"><?php echo substr($row['nw_begin_time'],2,14); ?></td>
|
||||||
|
<td class="td_datetime"><?php echo substr($row['nw_end_time'],2,14); ?></td>
|
||||||
|
<td class="td_num"><?php echo $row['nw_disable_hours']; ?>시간</td>
|
||||||
<?php
|
<td class="td_num"><?php echo $row['nw_left']; ?>px</td>
|
||||||
require_once G5_ADMIN_PATH . '/admin.tail.php';
|
<td class="td_num"><?php echo $row['nw_top']; ?>px</td>
|
||||||
|
<td class="td_num"><?php echo $row['nw_width']; ?>px</td>
|
||||||
|
<td class="td_num"><?php echo $row['nw_height']; ?>px</td>
|
||||||
|
<td class="td_mng td_mng_m">
|
||||||
|
<a href="./newwinform.php?w=u&nw_id=<?php echo $row['nw_id']; ?>" class="btn btn_03"><span class="sound_only"><?php echo $row['nw_subject']; ?> </span>수정</a>
|
||||||
|
<a href="./newwinformupdate.php?w=d&nw_id=<?php echo $row['nw_id']; ?>" onclick="return delete_confirm(this);" class="btn btn_02"><span class="sound_only"><?php echo $row['nw_subject']; ?> </span>삭제</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($i == 0) {
|
||||||
|
echo '<tr><td colspan="11" class="empty_table">자료가 한건도 없습니다.</td></tr>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<?php
|
||||||
|
include_once (G5_ADMIN_PATH.'/admin.tail.php');
|
||||||
|
?>
|
||||||
|
|||||||
+3
-2
@@ -1,9 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "100500";
|
$sub_menu = "100500";
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
|
|
||||||
check_demo();
|
check_demo();
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, 'r');
|
auth_check($auth[$sub_menu], 'r');
|
||||||
|
|
||||||
phpinfo();
|
phpinfo();
|
||||||
|
?>
|
||||||
+150
-162
@@ -1,25 +1,20 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "200200";
|
$sub_menu = "200200";
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, 'r');
|
auth_check($auth[$sub_menu], 'r');
|
||||||
|
|
||||||
$sql_common = " from {$g5['point_table']} po";
|
$sql_common = " from {$g5['point_table']} ";
|
||||||
|
|
||||||
$allowed_sfl = array('mb_id', 'po_content');
|
|
||||||
if (!in_array($sfl, $allowed_sfl)) {
|
|
||||||
$sfl = 'mb_id';
|
|
||||||
}
|
|
||||||
|
|
||||||
$sql_search = " where (1) ";
|
$sql_search = " where (1) ";
|
||||||
|
|
||||||
if ($stx) {
|
if ($stx) {
|
||||||
$sql_search .= " and ( ";
|
$sql_search .= " and ( ";
|
||||||
switch ($sfl) {
|
switch ($sfl) {
|
||||||
case 'mb_id':
|
case 'mb_id' :
|
||||||
$sql_search .= " (po.{$sfl} = '{$stx}') ";
|
$sql_search .= " ({$sfl} = '{$stx}') ";
|
||||||
break;
|
break;
|
||||||
default:
|
default :
|
||||||
$sql_search .= " ({$sfl} like '%{$stx}%') ";
|
$sql_search .= " ({$sfl} like '%{$stx}%') ";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -30,9 +25,6 @@ if (!$sst) {
|
|||||||
$sst = "po_id";
|
$sst = "po_id";
|
||||||
$sod = "desc";
|
$sod = "desc";
|
||||||
}
|
}
|
||||||
$allowed_sst = array('po_id', 'mb_id', 'po_content', 'po_point', 'po_datetime');
|
|
||||||
if ($sst && !in_array($sst, $allowed_sst)) $sst = 'po_id';
|
|
||||||
if ($sod && !in_array(strtolower($sod), array('asc', 'desc'))) $sod = '';
|
|
||||||
$sql_order = " order by {$sst} {$sod} ";
|
$sql_order = " order by {$sst} {$sod} ";
|
||||||
|
|
||||||
$sql = " select count(*) as cnt
|
$sql = " select count(*) as cnt
|
||||||
@@ -44,41 +36,36 @@ $total_count = $row['cnt'];
|
|||||||
|
|
||||||
$rows = $config['cf_page_rows'];
|
$rows = $config['cf_page_rows'];
|
||||||
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
||||||
if ($page < 1) {
|
if ($page < 1) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||||
$page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
|
|
||||||
}
|
|
||||||
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
||||||
|
|
||||||
$sql = " select po.*, mb.mb_name, mb.mb_nick, mb.mb_email, mb.mb_homepage, mb.mb_point
|
$sql = " select *
|
||||||
{$sql_common}
|
{$sql_common}
|
||||||
LEFT JOIN {$g5['member_table']} mb ON po.mb_id = mb.mb_id
|
|
||||||
{$sql_search}
|
{$sql_search}
|
||||||
{$sql_order}
|
{$sql_order}
|
||||||
limit {$from_record}, {$rows} ";
|
limit {$from_record}, {$rows} ";
|
||||||
$result = sql_query($sql);
|
$result = sql_query($sql);
|
||||||
|
|
||||||
$listall = '<a href="' . $_SERVER['SCRIPT_NAME'] . '" class="ov_listall">전체목록</a>';
|
$listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목록</a>';
|
||||||
|
|
||||||
$mb = array();
|
$mb = array();
|
||||||
if ($sfl == 'mb_id' && $stx) {
|
if ($sfl == 'mb_id' && $stx)
|
||||||
$mb = get_member($stx);
|
$mb = get_member($stx);
|
||||||
}
|
|
||||||
|
|
||||||
$g5['title'] = '포인트관리';
|
$g5['title'] = '포인트관리';
|
||||||
require_once './admin.head.php';
|
include_once ('./admin.head.php');
|
||||||
|
|
||||||
$colspan = 9;
|
$colspan = 9;
|
||||||
|
|
||||||
$po_expire_term = '';
|
$po_expire_term = '';
|
||||||
if ($config['cf_point_term'] > 0) {
|
if($config['cf_point_term'] > 0) {
|
||||||
$po_expire_term = $config['cf_point_term'];
|
$po_expire_term = $config['cf_point_term'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strpos($sfl, "mb_id") !== false) {
|
if (strstr($sfl, "mb_id"))
|
||||||
$mb_id = $stx;
|
$mb_id = $stx;
|
||||||
} else {
|
else
|
||||||
$mb_id = "";
|
$mb_id = "";
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="local_ov01 local_ov">
|
<div class="local_ov01 local_ov">
|
||||||
@@ -86,110 +73,109 @@ if (strpos($sfl, "mb_id") !== false) {
|
|||||||
<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($total_count) ?> 건 </span></span>
|
||||||
<?php
|
<?php
|
||||||
if (isset($mb['mb_id']) && $mb['mb_id']) {
|
if (isset($mb['mb_id']) && $mb['mb_id']) {
|
||||||
echo ' <span class="btn_ov01"><span class="ov_txt">' . $mb['mb_id'] . ' 님 포인트 합계 </span><span class="ov_num"> ' . number_format($mb['mb_point']) . '점</span></span>';
|
echo ' <span class="btn_ov01"><span class="ov_txt">' . $mb['mb_id'] .' 님 포인트 합계 </span><span class="ov_num"> ' . number_format($mb['mb_point']) . '점</span></span>';
|
||||||
} else {
|
} else {
|
||||||
$row2 = sql_fetch(" select sum(po_point) as sum_point from {$g5['point_table']} ");
|
$row2 = sql_fetch(" select sum(po_point) as sum_point from {$g5['point_table']} ");
|
||||||
echo ' <span class="btn_ov01"><span class="ov_txt">전체 합계</span><span class="ov_num">' . number_format($row2['sum_point']) . '점 </span></span>';
|
echo ' <span class="btn_ov01"><span class="ov_txt">전체 합계</span><span class="ov_num">'.number_format($row2['sum_point']).'점 </span></span>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<form name="fsearch" id="fsearch" class="local_sch01 local_sch" method="get">
|
<form name="fsearch" id="fsearch" class="local_sch01 local_sch" method="get">
|
||||||
<label for="sfl" class="sound_only">검색대상</label>
|
<label for="sfl" class="sound_only">검색대상</label>
|
||||||
<select name="sfl" id="sfl">
|
<select name="sfl" id="sfl">
|
||||||
<option value="mb_id" <?php echo get_selected($sfl, "mb_id"); ?>>회원아이디</option>
|
<option value="mb_id"<?php echo get_selected($_GET['sfl'], "mb_id"); ?>>회원아이디</option>
|
||||||
<option value="po_content" <?php echo get_selected($sfl, "po_content"); ?>>내용</option>
|
<option value="po_content"<?php echo get_selected($_GET['sfl'], "po_content"); ?>>내용</option>
|
||||||
</select>
|
</select>
|
||||||
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
<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="text" name="stx" value="<?php echo $stx ?>" id="stx" required class="required frm_input">
|
||||||
<input type="submit" class="btn_submit" value="검색">
|
<input type="submit" class="btn_submit" value="검색">
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<form name="fpointlist" id="fpointlist" method="post" action="./point_list_delete.php" onsubmit="return fpointlist_submit(this);">
|
<form name="fpointlist" id="fpointlist" method="post" action="./point_list_delete.php" onsubmit="return fpointlist_submit(this);">
|
||||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||||
<input type="hidden" name="token" value="">
|
<input type="hidden" name="token" value="">
|
||||||
|
|
||||||
<div class="tbl_head01 tbl_wrap">
|
<div class="tbl_head01 tbl_wrap">
|
||||||
<table>
|
<table>
|
||||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col">
|
<th scope="col">
|
||||||
<label for="chkall" class="sound_only">포인트 내역 전체</label>
|
<label for="chkall" class="sound_only">포인트 내역 전체</label>
|
||||||
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
|
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
|
||||||
</th>
|
</th>
|
||||||
<th scope="col"><?php echo subject_sort_link('mb_id') ?>회원아이디</a></th>
|
<th scope="col"><?php echo subject_sort_link('mb_id') ?>회원아이디</a></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('po_content') ?>포인트 내용</a></th>
|
<th scope="col"><?php echo subject_sort_link('po_content') ?>포인트 내용</a></th>
|
||||||
<th scope="col"><?php echo subject_sort_link('po_point') ?>포인트</a></th>
|
<th scope="col"><?php echo subject_sort_link('po_point') ?>포인트</a></th>
|
||||||
<th scope="col"><?php echo subject_sort_link('po_datetime') ?>일시</a></th>
|
<th scope="col"><?php echo subject_sort_link('po_datetime') ?>일시</a></th>
|
||||||
<th scope="col">만료일</th>
|
<th scope="col">만료일</th>
|
||||||
<th scope="col">포인트합</th>
|
<th scope="col">포인트합</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||||
$mb_nick = get_sideview($row['mb_id'], $row['mb_nick'], $row['mb_email'], $row['mb_homepage']);
|
if ($i==0 || ($row2['mb_id'] != $row['mb_id'])) {
|
||||||
|
$sql2 = " select mb_id, mb_name, mb_nick, mb_email, mb_homepage, mb_point from {$g5['member_table']} where mb_id = '{$row['mb_id']}' ";
|
||||||
|
$row2 = sql_fetch($sql2);
|
||||||
|
}
|
||||||
|
|
||||||
$link1 = $link2 = '';
|
$mb_nick = get_sideview($row['mb_id'], $row2['mb_nick'], $row2['mb_email'], $row2['mb_homepage']);
|
||||||
if (!preg_match("/^\@/", $row['po_rel_table']) && $row['po_rel_table']) {
|
|
||||||
$link1 = '<a href="' . get_pretty_url($row['po_rel_table'], $row['po_rel_id']) . '" target="_blank">';
|
|
||||||
$link2 = '</a>';
|
|
||||||
}
|
|
||||||
|
|
||||||
$expr = '';
|
$link1 = $link2 = '';
|
||||||
if ($row['po_expired'] == 1) {
|
if (!preg_match("/^\@/", $row['po_rel_table']) && $row['po_rel_table']) {
|
||||||
$expr = ' txt_expired';
|
$link1 = '<a href="'.G5_BBS_URL.'/board.php?bo_table='.$row['po_rel_table'].'&wr_id='.$row['po_rel_id'].'" target="_blank">';
|
||||||
}
|
$link2 = '</a>';
|
||||||
|
}
|
||||||
|
|
||||||
$bg = 'bg' . ($i % 2);
|
$expr = '';
|
||||||
?>
|
if($row['po_expired'] == 1)
|
||||||
|
$expr = ' txt_expired';
|
||||||
|
|
||||||
<tr class="<?php echo $bg; ?>">
|
$bg = 'bg'.($i%2);
|
||||||
<td class="td_chk">
|
?>
|
||||||
<input type="hidden" name="mb_id[<?php echo $i ?>]" value="<?php echo $row['mb_id'] ?>" id="mb_id_<?php echo $i ?>">
|
|
||||||
<input type="hidden" name="po_id[<?php echo $i ?>]" value="<?php echo $row['po_id'] ?>" id="po_id_<?php echo $i ?>">
|
|
||||||
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo $row['po_content'] ?> 내역</label>
|
|
||||||
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
|
|
||||||
</td>
|
|
||||||
<td class="td_left"><a href="?sfl=mb_id&stx=<?php echo $row['mb_id'] ?>"><?php echo $row['mb_id'] ?></a></td>
|
|
||||||
<td class="td_left"><?php echo get_text($row['mb_name']); ?></td>
|
|
||||||
<td class="td_left sv_use">
|
|
||||||
<div><?php echo $mb_nick ?></div>
|
|
||||||
</td>
|
|
||||||
<td class="td_left"><?php echo $link1 ?><?php echo $row['po_content'] ?><?php echo $link2 ?></td>
|
|
||||||
<td class="td_num td_pt"><?php echo number_format($row['po_point']) ?></td>
|
|
||||||
<td class="td_datetime"><?php echo $row['po_datetime'] ?></td>
|
|
||||||
<td class="td_datetime2<?php echo $expr; ?>">
|
|
||||||
<?php if ($row['po_expired'] == 1) { ?>
|
|
||||||
만료<?php echo substr(str_replace('-', '', $row['po_expire_date']), 2); ?>
|
|
||||||
<?php } else {
|
|
||||||
echo $row['po_expire_date'] == '9999-12-31' ? ' ' : $row['po_expire_date'];
|
|
||||||
} ?>
|
|
||||||
</td>
|
|
||||||
<td class="td_num td_pt"><?php echo number_format($row['po_mb_point']) ?></td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<?php
|
<tr class="<?php echo $bg; ?>">
|
||||||
}
|
<td class="td_chk">
|
||||||
|
<input type="hidden" name="mb_id[<?php echo $i ?>]" value="<?php echo $row['mb_id'] ?>" id="mb_id_<?php echo $i ?>">
|
||||||
|
<input type="hidden" name="po_id[<?php echo $i ?>]" value="<?php echo $row['po_id'] ?>" id="po_id_<?php echo $i ?>">
|
||||||
|
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo $row['po_content'] ?> 내역</label>
|
||||||
|
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
|
||||||
|
</td>
|
||||||
|
<td class="td_left"><a href="?sfl=mb_id&stx=<?php echo $row['mb_id'] ?>"><?php echo $row['mb_id'] ?></a></td>
|
||||||
|
<td class="td_left"><?php echo get_text($row2['mb_name']); ?></td>
|
||||||
|
<td class="td_left sv_use"><div><?php echo $mb_nick ?></div></td>
|
||||||
|
<td class="td_left"><?php echo $link1 ?><?php echo $row['po_content'] ?><?php echo $link2 ?></td>
|
||||||
|
<td class="td_num td_pt"><?php echo number_format($row['po_point']) ?></td>
|
||||||
|
<td class="td_datetime"><?php echo $row['po_datetime'] ?></td>
|
||||||
|
<td class="td_datetime2<?php echo $expr; ?>">
|
||||||
|
<?php if ($row['po_expired'] == 1) { ?>
|
||||||
|
만료<?php echo substr(str_replace('-', '', $row['po_expire_date']), 2); ?>
|
||||||
|
<?php } else echo $row['po_expire_date'] == '9999-12-31' ? ' ' : $row['po_expire_date']; ?>
|
||||||
|
</td>
|
||||||
|
<td class="td_num td_pt"><?php echo number_format($row['po_mb_point']) ?></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
if ($i == 0) {
|
<?php
|
||||||
echo '<tr><td colspan="' . $colspan . '" class="empty_table">자료가 없습니다.</td></tr>';
|
}
|
||||||
}
|
|
||||||
?>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="btn_fixed_top">
|
if ($i == 0)
|
||||||
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value" class="btn btn_02">
|
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||||
</div>
|
?>
|
||||||
|
</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>
|
</form>
|
||||||
|
|
||||||
@@ -199,66 +185,68 @@ if (strpos($sfl, "mb_id") !== false) {
|
|||||||
<h2 class="h2_frm">개별회원 포인트 증감 설정</h2>
|
<h2 class="h2_frm">개별회원 포인트 증감 설정</h2>
|
||||||
|
|
||||||
<form name="fpointlist2" method="post" id="fpointlist2" action="./point_update.php" autocomplete="off">
|
<form name="fpointlist2" method="post" id="fpointlist2" action="./point_update.php" autocomplete="off">
|
||||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||||
<input type="hidden" name="token" value="<?php echo isset($token) ? $token : ''; ?>">
|
<input type="hidden" name="token" value="<?php echo $token ?>">
|
||||||
|
|
||||||
<div class="tbl_frm01 tbl_wrap">
|
<div class="tbl_frm01 tbl_wrap">
|
||||||
<table>
|
<table>
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col class="grid_4">
|
<col class="grid_4">
|
||||||
<col>
|
<col>
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="mb_id">회원아이디<strong class="sound_only">필수</strong></label></th>
|
<th scope="row"><label for="mb_id">회원아이디<strong class="sound_only">필수</strong></label></th>
|
||||||
<td><input type="text" name="mb_id" value="<?php echo $mb_id ?>" id="mb_id" class="required frm_input" required></td>
|
<td><input type="text" name="mb_id" value="<?php echo $mb_id ?>" id="mb_id" class="required frm_input" required></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="po_content">포인트 내용<strong class="sound_only">필수</strong></label></th>
|
<th scope="row"><label for="po_content">포인트 내용<strong class="sound_only">필수</strong></label></th>
|
||||||
<td><input type="text" name="po_content" id="po_content" required class="required frm_input" size="80"></td>
|
<td><input type="text" name="po_content" id="po_content" required class="required frm_input" size="80"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="po_point">포인트<strong class="sound_only">필수</strong></label></th>
|
<th scope="row"><label for="po_point">포인트<strong class="sound_only">필수</strong></label></th>
|
||||||
<td><input type="text" name="po_point" id="po_point" required class="required frm_input"></td>
|
<td><input type="text" name="po_point" id="po_point" required class="required frm_input"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php if ($config['cf_point_term'] > 0) { ?>
|
<?php if($config['cf_point_term'] > 0) { ?>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="po_expire_term">포인트 유효기간</label></th>
|
<th scope="row"><label for="po_expire_term">포인트 유효기간</label></th>
|
||||||
<td><input type="text" name="po_expire_term" value="<?php echo $po_expire_term; ?>" id="po_expire_term" class="frm_input" size="5"> 일</td>
|
<td><input type="text" name="po_expire_term" value="<?php echo $po_expire_term; ?>" id="po_expire_term" class="frm_input" size="5"> 일</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="btn_confirm01 btn_confirm">
|
<div class="btn_confirm01 btn_confirm">
|
||||||
<input type="submit" value="확인" class="btn_submit btn">
|
<input type="submit" value="확인" class="btn_submit btn">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function fpointlist_submit(f) {
|
function fpointlist_submit(f)
|
||||||
if (!is_checked("chk[]")) {
|
{
|
||||||
alert(document.pressed + " 하실 항목을 하나 이상 선택하세요.");
|
if (!is_checked("chk[]")) {
|
||||||
|
alert(document.pressed+" 하실 항목을 하나 이상 선택하세요.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(document.pressed == "선택삭제") {
|
||||||
|
if(!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (document.pressed == "선택삭제") {
|
|
||||||
if (!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
require_once './admin.tail.php';
|
include_once ('./admin.tail.php');
|
||||||
|
?>
|
||||||
|
|||||||
+19
-22
@@ -1,62 +1,59 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = '200200';
|
$sub_menu = '200200';
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
|
|
||||||
check_demo();
|
check_demo();
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, 'd');
|
auth_check($auth[$sub_menu], 'd');
|
||||||
|
|
||||||
check_admin_token();
|
check_admin_token();
|
||||||
|
|
||||||
$count = (isset($_POST['chk']) && is_array($_POST['chk'])) ? count($_POST['chk']) : 0;
|
$count = count($_POST['chk']);
|
||||||
if (!$count) {
|
if(!$count)
|
||||||
alert($_POST['act_button'] . ' 하실 항목을 하나 이상 체크하세요.');
|
alert($_POST['act_button'].' 하실 항목을 하나 이상 체크하세요.');
|
||||||
}
|
|
||||||
|
|
||||||
for ($i = 0; $i < $count; $i++) {
|
for ($i=0; $i<$count; $i++)
|
||||||
|
{
|
||||||
// 실제 번호를 넘김
|
// 실제 번호를 넘김
|
||||||
$k = $_POST['chk'][$i];
|
$k = $_POST['chk'][$i];
|
||||||
$po_id = (int) $_POST['po_id'][$k];
|
|
||||||
$str_mb_id = sql_real_escape_string($_POST['mb_id'][$k]);
|
|
||||||
|
|
||||||
// 포인트 내역정보
|
// 포인트 내역정보
|
||||||
$sql = " select * from {$g5['point_table']} where po_id = '{$po_id}' ";
|
$sql = " select * from {$g5['point_table']} where po_id = '{$_POST['po_id'][$k]}' ";
|
||||||
$row = sql_fetch($sql);
|
$row = sql_fetch($sql);
|
||||||
|
|
||||||
if (!$row['po_id']) {
|
if(!$row['po_id'])
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
|
|
||||||
if ($row['po_point'] < 0) {
|
if($row['po_point'] < 0) {
|
||||||
$mb_id = $row['mb_id'];
|
$mb_id = $row['mb_id'];
|
||||||
$po_point = abs($row['po_point']);
|
$po_point = abs($row['po_point']);
|
||||||
|
|
||||||
if ($row['po_rel_table'] == '@expire') {
|
if($row['po_rel_table'] == '@expire')
|
||||||
delete_expire_point($mb_id, $po_point);
|
delete_expire_point($mb_id, $po_point);
|
||||||
} else {
|
else
|
||||||
delete_use_point($mb_id, $po_point);
|
delete_use_point($mb_id, $po_point);
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
if ($row['po_use_point'] > 0) {
|
if($row['po_use_point'] > 0) {
|
||||||
insert_use_point($row['mb_id'], $row['po_use_point'], $row['po_id']);
|
insert_use_point($row['mb_id'], $row['po_use_point'], $row['po_id']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 포인트 내역삭제
|
// 포인트 내역삭제
|
||||||
$sql = " delete from {$g5['point_table']} where po_id = '{$po_id}' ";
|
$sql = " delete from {$g5['point_table']} where po_id = '{$_POST['po_id'][$k]}' ";
|
||||||
sql_query($sql);
|
sql_query($sql);
|
||||||
|
|
||||||
// po_mb_point에 반영
|
// po_mb_point에 반영
|
||||||
$sql = " update {$g5['point_table']}
|
$sql = " update {$g5['point_table']}
|
||||||
set po_mb_point = po_mb_point - '{$row['po_point']}'
|
set po_mb_point = po_mb_point - '{$row['po_point']}'
|
||||||
where mb_id = '{$str_mb_id}'
|
where mb_id = '{$_POST['mb_id'][$k]}'
|
||||||
and po_id > '{$po_id}' ";
|
and po_id > '{$_POST['po_id'][$k]}' ";
|
||||||
sql_query($sql);
|
sql_query($sql);
|
||||||
|
|
||||||
// 포인트 UPDATE
|
// 포인트 UPDATE
|
||||||
$sum_point = get_point_sum($_POST['mb_id'][$k]);
|
$sum_point = get_point_sum($_POST['mb_id'][$k]);
|
||||||
$sql = " update {$g5['member_table']} set mb_point = '$sum_point' where mb_id = '{$str_mb_id}' ";
|
$sql= " update {$g5['member_table']} set mb_point = '$sum_point' where mb_id = '{$_POST['mb_id'][$k]}' ";
|
||||||
sql_query($sql);
|
sql_query($sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
goto_url('./point_list.php?' . $qstr);
|
goto_url('./point_list.php?'.$qstr);
|
||||||
|
?>
|
||||||
+13
-14
@@ -1,26 +1,25 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "200200";
|
$sub_menu = "200200";
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, 'w');
|
auth_check($auth[$sub_menu], 'w');
|
||||||
|
|
||||||
check_admin_token();
|
check_admin_token();
|
||||||
|
|
||||||
$mb_id = isset($_POST['mb_id']) ? strip_tags(clean_xss_attributes($_POST['mb_id'])) : '';
|
$mb_id = $_POST['mb_id'];
|
||||||
$po_point = isset($_POST['po_point']) ? (int)strip_tags(clean_xss_attributes($_POST['po_point'])) : 0;
|
$po_point = $_POST['po_point'];
|
||||||
$po_content = isset($_POST['po_content']) ? strip_tags(clean_xss_attributes($_POST['po_content'])) : '';
|
$po_content = $_POST['po_content'];
|
||||||
$expire = isset($_POST['po_expire_term']) ? preg_replace('/[^0-9]/', '', $_POST['po_expire_term']) : '';
|
$expire = preg_replace('/[^0-9]/', '', $_POST['po_expire_term']);
|
||||||
|
|
||||||
$mb = get_member($mb_id);
|
$mb = get_member($mb_id);
|
||||||
|
|
||||||
if (!$mb['mb_id']) {
|
if (!$mb['mb_id'])
|
||||||
alert('존재하는 회원아이디가 아닙니다.', './point_list.php?' . $qstr);
|
alert('존재하는 회원아이디가 아닙니다.', './point_list.php?'.$qstr);
|
||||||
}
|
|
||||||
|
|
||||||
if (($po_point < 0) && ($po_point * (-1) > $mb['mb_point'])) {
|
if (($po_point < 0) && ($po_point * (-1) > $mb['mb_point']))
|
||||||
alert('포인트를 깎는 경우 현재 포인트보다 작으면 안됩니다.', './point_list.php?' . $qstr);
|
alert('포인트를 깎는 경우 현재 포인트보다 작으면 안됩니다.', './point_list.php?'.$qstr);
|
||||||
}
|
|
||||||
|
|
||||||
insert_point($mb_id, $po_point, $po_content, '@passive', $mb_id, $member['mb_id'] . '-' . uniqid(''), $expire);
|
insert_point($mb_id, $po_point, $po_content, '@passive', $mb_id, $member['mb_id'].'-'.uniqid(''), $expire);
|
||||||
|
|
||||||
goto_url('./point_list.php?' . $qstr);
|
goto_url('./point_list.php?'.$qstr);
|
||||||
|
?>
|
||||||
|
|||||||
+8
-8
@@ -1,21 +1,20 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "200900";
|
$sub_menu = "200900";
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
|
|
||||||
check_demo();
|
check_demo();
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, 'd');
|
auth_check($auth[$sub_menu], 'd');
|
||||||
|
|
||||||
check_admin_token();
|
check_admin_token();
|
||||||
|
|
||||||
$count = (isset($_POST['chk']) && is_array($_POST['chk'])) ? count($_POST['chk']) : 0;
|
$count = count($_POST['chk']);
|
||||||
|
|
||||||
if (!$count) {
|
if(!$count)
|
||||||
alert('삭제할 투표목록을 1개이상 선택해 주세요.');
|
alert('삭제할 투표목록을 1개이상 선택해 주세요.');
|
||||||
}
|
|
||||||
|
|
||||||
for ($i = 0; $i < $count; $i++) {
|
for($i=0; $i<$count; $i++) {
|
||||||
$po_id = isset($_POST['chk'][$i]) ? (int) $_POST['chk'][$i] : 0;
|
$po_id = $_POST['chk'][$i];
|
||||||
|
|
||||||
$sql = " delete from {$g5['poll_table']} where po_id = '$po_id' ";
|
$sql = " delete from {$g5['poll_table']} where po_id = '$po_id' ";
|
||||||
sql_query($sql);
|
sql_query($sql);
|
||||||
@@ -24,4 +23,5 @@ for ($i = 0; $i < $count; $i++) {
|
|||||||
sql_query($sql);
|
sql_query($sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
goto_url('./poll_list.php?' . $qstr);
|
goto_url('./poll_list.php?'.$qstr);
|
||||||
|
?>
|
||||||
+84
-98
@@ -1,127 +1,113 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "200900";
|
$sub_menu = "200900";
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, 'w');
|
auth_check($auth[$sub_menu], 'w');
|
||||||
|
|
||||||
$po_id = isset($po_id) ? (int) $po_id : 0;
|
|
||||||
$po = array(
|
|
||||||
'po_subject' => '',
|
|
||||||
'po_etc' => '',
|
|
||||||
'po_level' => '',
|
|
||||||
'po_point' => '',
|
|
||||||
);
|
|
||||||
|
|
||||||
$html_title = '투표';
|
$html_title = '투표';
|
||||||
if ($w == '') {
|
if ($w == '')
|
||||||
$html_title .= ' 생성';
|
$html_title .= ' 생성';
|
||||||
} elseif ($w == 'u') {
|
else if ($w == 'u') {
|
||||||
$html_title .= ' 수정';
|
$html_title .= ' 수정';
|
||||||
$sql = " select * from {$g5['poll_table']} where po_id = '{$po_id}' ";
|
$sql = " select * from {$g5['poll_table']} where po_id = '{$po_id}' ";
|
||||||
$po = sql_fetch($sql);
|
$po = sql_fetch($sql);
|
||||||
} else {
|
} else
|
||||||
alert('w 값이 제대로 넘어오지 않았습니다.');
|
alert('w 값이 제대로 넘어오지 않았습니다.');
|
||||||
}
|
|
||||||
|
|
||||||
$g5['title'] = $html_title;
|
$g5['title'] = $html_title;
|
||||||
require_once './admin.head.php';
|
include_once('./admin.head.php');
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<form name="fpoll" id="fpoll" action="./poll_form_update.php" method="post" enctype="multipart/form-data">
|
<form name="fpoll" id="fpoll" action="./poll_form_update.php" method="post" enctype="multipart/form-data">
|
||||||
<input type="hidden" name="po_id" value="<?php echo $po_id ?>">
|
<input type="hidden" name="po_id" value="<?php echo $po_id ?>">
|
||||||
<input type="hidden" name="w" value="<?php echo $w ?>">
|
<input type="hidden" name="w" value="<?php echo $w ?>">
|
||||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||||
<input type="hidden" name="token" value="">
|
<input type="hidden" name="token" value="">
|
||||||
|
|
||||||
<div class="tbl_frm01 tbl_wrap">
|
<div class="tbl_frm01 tbl_wrap">
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<caption><?php echo $g5['title']; ?></caption>
|
<caption><?php echo $g5['title']; ?></caption>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="po_subject">투표 제목<strong class="sound_only">필수</strong></label></th>
|
<th scope="row"><label for="po_subject">투표 제목<strong class="sound_only">필수</strong></label></th>
|
||||||
<td><input type="text" name="po_subject" value="<?php echo get_sanitize_input($po['po_subject']); ?>" id="po_subject" required class="required frm_input" size="80" maxlength="125"></td>
|
<td><input type="text" name="po_subject" value="<?php echo $po['po_subject'] ?>" id="po_subject" required class="required frm_input" size="80" maxlength="125"></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
for ($i = 1; $i <= 9; $i++) {
|
for ($i=1; $i<=9; $i++) {
|
||||||
$required = '';
|
$required = '';
|
||||||
$sound_only = '';
|
if ($i==1 || $i==2) {
|
||||||
if ($i == 1 || $i == 2) {
|
$required = 'required';
|
||||||
$required = 'required';
|
$sound_only = '<strong class="sound_only">필수</strong>';
|
||||||
$sound_only = '<strong class="sound_only">필수</strong>';
|
}
|
||||||
}
|
|
||||||
|
|
||||||
$po_poll = isset($po['po_poll' . $i]) ? get_text($po['po_poll' . $i]) : '';
|
$po_poll = get_text($po['po_poll'.$i]);
|
||||||
$po_cnt = isset($po['po_cnt' . $i]) ? get_text($po['po_cnt' . $i]) : 0;
|
?>
|
||||||
?>
|
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="po_poll<?php echo $i ?>">항목 <?php echo $i ?><?php echo $sound_only ?></label></th>
|
<th scope="row"><label for="po_poll<?php echo $i ?>">항목 <?php echo $i ?><?php echo $sound_only ?></label></th>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" name="po_poll<?php echo $i ?>" value="<?php echo $po_poll ?>" id="po_poll<?php echo $i ?>" <?php echo $required ?> class="frm_input <?php echo $required ?>" maxlength="125">
|
<input type="text" name="po_poll<?php echo $i ?>" value="<?php echo $po_poll ?>" id="po_poll<?php echo $i ?>" <?php echo $required ?> class="frm_input <?php echo $required ?>" maxlength="125">
|
||||||
<label for="po_cnt<?php echo $i ?>">항목 <?php echo $i ?> 투표수</label>
|
<label for="po_cnt<?php echo $i ?>">항목 <?php echo $i ?> 투표수</label>
|
||||||
<input type="text" name="po_cnt<?php echo $i ?>" value="<?php echo $po_cnt; ?>" id="po_cnt<?php echo $i ?>" class="frm_input" size="3">
|
<input type="text" name="po_cnt<?php echo $i ?>" value="<?php echo $po['po_cnt'.$i] ?>" id="po_cnt<?php echo $i ?>" class="frm_input" size="3">
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="po_etc">기타의견</label></th>
|
<th scope="row"><label for="po_etc">기타의견</label></th>
|
||||||
<td>
|
<td>
|
||||||
<?php echo help('기타 의견을 남길 수 있도록 하려면, 간단한 질문을 입력하세요.') ?>
|
<?php echo help('기타 의견을 남길 수 있도록 하려면, 간단한 질문을 입력하세요.') ?>
|
||||||
<input type="text" name="po_etc" value="<?php echo get_text($po['po_etc']) ?>" id="po_etc" class="frm_input" size="80" maxlength="125">
|
<input type="text" name="po_etc" value="<?php echo get_text($po['po_etc']) ?>" id="po_etc" class="frm_input" size="80" maxlength="125">
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="po_level">투표가능 회원레벨</label></th>
|
<th scope="row"><label for="po_level">투표가능 회원레벨</label></th>
|
||||||
<td>
|
<td>
|
||||||
<?php echo help("레벨을 1로 설정하면 손님도 투표할 수 있습니다.") ?>
|
<?php echo help("레벨을 1로 설정하면 손님도 투표할 수 있습니다.") ?>
|
||||||
<?php echo get_member_level_select('po_level', 1, 10, $po['po_level']) ?> 이상 투표할 수 있음
|
<?php echo get_member_level_select('po_level', 1, 10, $po['po_level']) ?> 이상 투표할 수 있음
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="po_point">포인트</label></th>
|
<th scope="row"><label for="po_point">포인트</label></th>
|
||||||
<td>
|
<td>
|
||||||
<?php echo help('투표에 참여한 회원에게 포인트를 부여합니다.') ?>
|
<?php echo help('투표에 참여한 회원에게 포인트를 부여합니다.') ?>
|
||||||
<input type="text" name="po_point" value="<?php echo $po['po_point'] ?>" id="po_point" class="frm_input"> 점
|
<input type="text" name="po_point" value="<?php echo $po['po_point'] ?>" id="po_point" class="frm_input"> 점
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php if ($w == 'u') { ?>
|
<?php if ($w == 'u') { ?>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">투표사용</th>
|
<th scope="row">투표등록일</th>
|
||||||
<td><input type="checkbox" name="po_use" id="po_use" value="1" <?php if ($po['po_use']) { echo 'checked="checked"'; } ?>> <label for="po_use">사용</label></td>
|
<td><?php echo $po['po_date']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">투표등록일</th>
|
<th scope="row"><label for="po_ips">투표참가 IP</label></th>
|
||||||
<td><?php echo $po['po_date']; ?></td>
|
<td><textarea name="po_ips" id="po_ips" readonly rows="10"><?php echo preg_replace("/\n/", " / ", $po['po_ips']) ?></textarea></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="po_ips">투표참가 IP</label></th>
|
<th scope="row"><label for="mb_ids">투표참가 회원</label></th>
|
||||||
<td><textarea name="po_ips" id="po_ips" readonly rows="10"><?php echo html_purifier(preg_replace("/\n/", " / ", $po['po_ips'])); ?></textarea></td>
|
<td><textarea name="mb_ids" id="mb_ids" readonly rows="10"><?php echo preg_replace("/\n/", " / ", $po['mb_ids']) ?></textarea></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<?php } ?>
|
||||||
<th scope="row"><label for="mb_ids">투표참가 회원</label></th>
|
</tbody>
|
||||||
<td><textarea name="mb_ids" id="mb_ids" readonly rows="10"><?php echo html_purifier(preg_replace("/\n/", " / ", $po['mb_ids'])); ?></textarea></td>
|
</table>
|
||||||
</tr>
|
|
||||||
<?php } ?>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="btn_fixed_top ">
|
<div class="btn_fixed_top ">
|
||||||
<a href="./poll_list.php?<?php echo $qstr ?>" class="btn_02 btn">목록</a>
|
<a href="./poll_list.php?<?php echo $qstr ?>" class="btn_02 btn">목록</a>
|
||||||
<input type="submit" value="확인" class="btn_submit btn" accesskey="s">
|
<input type="submit" value="확인" class="btn_submit btn" accesskey="s">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
require_once './admin.tail.php';
|
include_once('./admin.tail.php');
|
||||||
|
?>
|
||||||
|
|||||||
+19
-59
@@ -1,67 +1,26 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "200900";
|
$sub_menu = "200900";
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
|
|
||||||
$w = $_POST['w'];
|
$w = $_POST['w'];
|
||||||
if ($w == 'u' || $w == 'd') {
|
if ($w == 'u' || $w == 'd')
|
||||||
check_demo();
|
check_demo();
|
||||||
}
|
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, 'w');
|
auth_check($auth[$sub_menu], 'w');
|
||||||
|
|
||||||
check_admin_token();
|
check_admin_token();
|
||||||
|
|
||||||
$check_keys = array(
|
if ($w == '')
|
||||||
'po_subject',
|
{
|
||||||
'po_poll1',
|
|
||||||
'po_poll2',
|
|
||||||
'po_poll3',
|
|
||||||
'po_poll4',
|
|
||||||
'po_poll5',
|
|
||||||
'po_poll6',
|
|
||||||
'po_poll7',
|
|
||||||
'po_poll8',
|
|
||||||
'po_poll9',
|
|
||||||
'po_cnt1',
|
|
||||||
'po_cnt2',
|
|
||||||
'po_cnt3',
|
|
||||||
'po_cnt4',
|
|
||||||
'po_cnt5',
|
|
||||||
'po_cnt6',
|
|
||||||
'po_cnt7',
|
|
||||||
'po_cnt8',
|
|
||||||
'po_cnt9',
|
|
||||||
'po_etc',
|
|
||||||
'po_level',
|
|
||||||
'po_point',
|
|
||||||
'po_id'
|
|
||||||
);
|
|
||||||
|
|
||||||
foreach ($_POST as $key => $value) {
|
|
||||||
if (empty($value)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (in_array($key, $check_keys)) {
|
|
||||||
if (preg_match('/^po_cnt[1-9]$/', $key) || in_array($key, array('po_level', 'po_point', 'po_id'), true)) {
|
|
||||||
$_POST[$key] = (int) $value;
|
|
||||||
} else {
|
|
||||||
$_POST[$key] = addslashes(strip_tags(clean_xss_attributes(stripslashes($value))));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$po_id = isset($_POST['po_id']) ? (int) $_POST['po_id'] : 0;
|
|
||||||
$_POST['po_use'] = isset($_POST['po_use']) ? (int) $_POST['po_use'] : 0;
|
|
||||||
|
|
||||||
if ($w == '') {
|
|
||||||
$sql = " insert {$g5['poll_table']}
|
$sql = " insert {$g5['poll_table']}
|
||||||
( po_subject, po_poll1, po_poll2, po_poll3, po_poll4, po_poll5, po_poll6, po_poll7, po_poll8, po_poll9, po_cnt1, po_cnt2, po_cnt3, po_cnt4, po_cnt5, po_cnt6, po_cnt7, po_cnt8, po_cnt9, po_etc, po_level, po_point, po_date, po_use )
|
( po_subject, po_poll1, po_poll2, po_poll3, po_poll4, po_poll5, po_poll6, po_poll7, po_poll8, po_poll9, po_cnt1, po_cnt2, po_cnt3, po_cnt4, po_cnt5, po_cnt6, po_cnt7, po_cnt8, po_cnt9, po_etc, po_level, po_point, po_date )
|
||||||
values ( '{$_POST['po_subject']}', '{$_POST['po_poll1']}', '{$_POST['po_poll2']}', '{$_POST['po_poll3']}', '{$_POST['po_poll4']}', '{$_POST['po_poll5']}', '{$_POST['po_poll6']}', '{$_POST['po_poll7']}', '{$_POST['po_poll8']}', '{$_POST['po_poll9']}', '{$_POST['po_cnt1']}', '{$_POST['po_cnt2']}', '{$_POST['po_cnt3']}', '{$_POST['po_cnt4']}', '{$_POST['po_cnt5']}', '{$_POST['po_cnt6']}', '{$_POST['po_cnt7']}', '{$_POST['po_cnt8']}', '{$_POST['po_cnt9']}', '{$_POST['po_etc']}', '{$_POST['po_level']}', '{$_POST['po_point']}', '" . G5_TIME_YMD . "', 1 ) ";
|
values ( '{$_POST['po_subject']}', '{$_POST['po_poll1']}', '{$_POST['po_poll2']}', '{$_POST['po_poll3']}', '{$_POST['po_poll4']}', '{$_POST['po_poll5']}', '{$_POST['po_poll6']}', '{$_POST['po_poll7']}', '{$_POST['po_poll8']}', '{$_POST['po_poll9']}', '{$_POST['po_cnt1']}', '{$_POST['po_cnt2']}', '{$_POST['po_cnt3']}', '{$_POST['po_cnt4']}', '{$_POST['po_cnt5']}', '{$_POST['po_cnt6']}', '{$_POST['po_cnt7']}', '{$_POST['po_cnt8']}', '{$_POST['po_cnt9']}', '{$_POST['po_etc']}', '{$_POST['po_level']}', '{$_POST['po_point']}', '".G5_TIME_YMD."' ) ";
|
||||||
sql_query($sql);
|
sql_query($sql);
|
||||||
|
|
||||||
$po_id = sql_insert_id();
|
$po_id = sql_insert_id();
|
||||||
} elseif ($w == 'u') {
|
}
|
||||||
|
else if ($w == 'u')
|
||||||
|
{
|
||||||
$sql = " update {$g5['poll_table']}
|
$sql = " update {$g5['poll_table']}
|
||||||
set po_subject = '{$_POST['po_subject']}',
|
set po_subject = '{$_POST['po_subject']}',
|
||||||
po_poll1 = '{$_POST['po_poll1']}',
|
po_poll1 = '{$_POST['po_poll1']}',
|
||||||
@@ -84,11 +43,12 @@ if ($w == '') {
|
|||||||
po_cnt9 = '{$_POST['po_cnt9']}',
|
po_cnt9 = '{$_POST['po_cnt9']}',
|
||||||
po_etc = '{$_POST['po_etc']}',
|
po_etc = '{$_POST['po_etc']}',
|
||||||
po_level = '{$_POST['po_level']}',
|
po_level = '{$_POST['po_level']}',
|
||||||
po_point = '{$_POST['po_point']}',
|
po_point = '{$_POST['po_point']}'
|
||||||
po_use = '{$_POST['po_use']}'
|
|
||||||
where po_id = '{$_POST['po_id']}' ";
|
where po_id = '{$_POST['po_id']}' ";
|
||||||
sql_query($sql);
|
sql_query($sql);
|
||||||
} elseif ($w == 'd') {
|
}
|
||||||
|
else if ($w == 'd')
|
||||||
|
{
|
||||||
$sql = " delete from {$g5['poll_table']} where po_id = '{$_POST['po_id']}' ";
|
$sql = " delete from {$g5['poll_table']} where po_id = '{$_POST['po_id']}' ";
|
||||||
sql_query($sql);
|
sql_query($sql);
|
||||||
|
|
||||||
@@ -102,8 +62,8 @@ if ($w == '') {
|
|||||||
$row = sql_fetch(" select max(po_id) as max_po_id from {$g5['poll_table']} ");
|
$row = sql_fetch(" select max(po_id) as max_po_id from {$g5['poll_table']} ");
|
||||||
sql_query(" update {$g5['config_table']} set cf_max_po_id = '{$row['max_po_id']}' ");
|
sql_query(" update {$g5['config_table']} set cf_max_po_id = '{$row['max_po_id']}' ");
|
||||||
|
|
||||||
if ($w == 'd') {
|
if ($w == 'd')
|
||||||
goto_url('./poll_list.php?' . $qstr);
|
goto_url('./poll_list.php?'.$qstr);
|
||||||
} else {
|
else
|
||||||
goto_url('./poll_form.php?w=u&po_id=' . $po_id . '&' . $qstr);
|
goto_url('./poll_form.php?w=u&po_id='.$po_id.'&'.$qstr);
|
||||||
}
|
?>
|
||||||
|
|||||||
+86
-99
@@ -1,21 +1,16 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "200900";
|
$sub_menu = "200900";
|
||||||
require_once './_common.php';
|
include_once('./_common.php');
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, 'r');
|
auth_check($auth[$sub_menu], 'r');
|
||||||
|
|
||||||
$sql_common = " from {$g5['poll_table']} ";
|
$sql_common = " from {$g5['poll_table']} ";
|
||||||
|
|
||||||
$allowed_sfl = array('po_subject');
|
|
||||||
if (!in_array($sfl, $allowed_sfl)) {
|
|
||||||
$sfl = 'po_subject';
|
|
||||||
}
|
|
||||||
|
|
||||||
$sql_search = " where (1) ";
|
$sql_search = " where (1) ";
|
||||||
if ($stx) {
|
if ($stx) {
|
||||||
$sql_search .= " and ( ";
|
$sql_search .= " and ( ";
|
||||||
switch ($sfl) {
|
switch ($sfl) {
|
||||||
default:
|
default :
|
||||||
$sql_search .= " ({$sfl} like '%{$stx}%') ";
|
$sql_search .= " ({$sfl} like '%{$stx}%') ";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -23,12 +18,9 @@ if ($stx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!$sst) {
|
if (!$sst) {
|
||||||
$sst = "po_id";
|
$sst = "po_id";
|
||||||
$sod = "desc";
|
$sod = "desc";
|
||||||
}
|
}
|
||||||
$allowed_sst = array('po_id', 'po_subject', 'po_level', 'po_use', 'po_etc');
|
|
||||||
if ($sst && !in_array($sst, $allowed_sst)) $sst = 'po_id';
|
|
||||||
if ($sod && !in_array(strtolower($sod), array('asc', 'desc'))) $sod = '';
|
|
||||||
$sql_order = " order by {$sst} {$sod} ";
|
$sql_order = " order by {$sst} {$sod} ";
|
||||||
|
|
||||||
$sql = " select count(*) as cnt
|
$sql = " select count(*) as cnt
|
||||||
@@ -40,9 +32,7 @@ $total_count = $row['cnt'];
|
|||||||
|
|
||||||
$rows = $config['cf_page_rows'];
|
$rows = $config['cf_page_rows'];
|
||||||
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
||||||
if ($page < 1) {
|
if ($page < 1) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||||
$page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
|
|
||||||
}
|
|
||||||
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
||||||
|
|
||||||
$sql = " select *
|
$sql = " select *
|
||||||
@@ -52,12 +42,12 @@ $sql = " select *
|
|||||||
limit {$from_record}, {$rows} ";
|
limit {$from_record}, {$rows} ";
|
||||||
$result = sql_query($sql);
|
$result = sql_query($sql);
|
||||||
|
|
||||||
$listall = '<a href="' . $_SERVER['SCRIPT_NAME'] . '" class="ov_listall">전체목록</a>';
|
$listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목록</a>';
|
||||||
|
|
||||||
$g5['title'] = '투표관리';
|
$g5['title'] = '투표관리';
|
||||||
require_once './admin.head.php';
|
include_once('./admin.head.php');
|
||||||
|
|
||||||
$colspan = 8;
|
$colspan = 7;
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="local_ov01 local_ov">
|
<div class="local_ov01 local_ov">
|
||||||
@@ -66,106 +56,103 @@ $colspan = 8;
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<form name="fsearch" id="fsearch" class="local_sch01 local_sch" method="get">
|
<form name="fsearch" id="fsearch" class="local_sch01 local_sch" method="get">
|
||||||
<div class="sch_last">
|
<div class="sch_last">
|
||||||
<label for="sfl" class="sound_only">검색대상</label>
|
<label for="sfl" class="sound_only">검색대상</label>
|
||||||
<select name="sfl" id="sfl">
|
<select name="sfl" id="sfl">
|
||||||
<option value="po_subject" <?php echo get_selected($sfl, "po_subject"); ?>>제목</option>
|
<option value="po_subject"<?php echo get_selected($_GET['sfl'], "po_subject"); ?>>제목</option>
|
||||||
</select>
|
</select>
|
||||||
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
<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="text" name="stx" value="<?php echo $stx ?>" id="stx" required class="required frm_input">
|
||||||
<input type="submit" class="btn_submit" value="검색">
|
<input type="submit" class="btn_submit" value="검색">
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
||||||
<form name="fpolllist" id="fpolllist" action="./poll_delete.php" method="post">
|
<form name="fpolllist" id="fpolllist" action="./poll_delete.php" method="post">
|
||||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||||
<input type="hidden" name="token" value="">
|
<input type="hidden" name="token" value="">
|
||||||
|
|
||||||
<div class="tbl_head01 tbl_wrap">
|
<div class="tbl_head01 tbl_wrap">
|
||||||
<table>
|
<table>
|
||||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col">
|
<th scope="col">
|
||||||
<label for="chkall" class="sound_only">현재 페이지 투표 전체</label>
|
<label for="chkall" class="sound_only">현재 페이지 투표 전체</label>
|
||||||
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
|
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
|
||||||
</th>
|
</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>
|
||||||
<th scope="col">사용</th>
|
<th scope="col">관리</th>
|
||||||
<th scope="col">관리</th>
|
</tr>
|
||||||
</tr>
|
</thead>
|
||||||
</thead>
|
<tbody>
|
||||||
<tbody>
|
<?php
|
||||||
<?php
|
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||||
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
$sql2 = " select sum(po_cnt1+po_cnt2+po_cnt3+po_cnt4+po_cnt5+po_cnt6+po_cnt7+po_cnt8+po_cnt9) as sum_po_cnt from {$g5['poll_table']} where po_id = '{$row['po_id']}' ";
|
||||||
$sql2 = " select sum(po_cnt1+po_cnt2+po_cnt3+po_cnt4+po_cnt5+po_cnt6+po_cnt7+po_cnt8+po_cnt9) as sum_po_cnt from {$g5['poll_table']} where po_id = '{$row['po_id']}' ";
|
$row2 = sql_fetch($sql2);
|
||||||
$row2 = sql_fetch($sql2);
|
$po_etc = ($row['po_etc']) ? "사용" : "미사용";
|
||||||
$po_etc = ($row['po_etc']) ? "사용" : "미사용";
|
|
||||||
$po_use = ($row['po_use']) ? "사용" : "미사용";
|
|
||||||
|
|
||||||
$s_mod = '<a href="./poll_form.php?' . $qstr . '&w=u&po_id=' . $row['po_id'] . '" class="btn btn_03">수정</a>';
|
$s_mod = '<a href="./poll_form.php?'.$qstr.'&w=u&po_id='.$row['po_id'].'" class="btn btn_03">수정</a>';
|
||||||
|
|
||||||
$bg = 'bg' . ($i % 2);
|
$bg = 'bg'.($i%2);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<tr class="<?php echo $bg; ?>">
|
<tr class="<?php echo $bg; ?>">
|
||||||
<td class="td_chk">
|
<td class="td_chk">
|
||||||
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo cut_str(get_text($row['po_subject']), 70) ?> 투표</label>
|
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo cut_str(get_text($row['po_subject']),70) ?> 투표</label>
|
||||||
<input type="checkbox" name="chk[]" value="<?php echo $row['po_id'] ?>" id="chk_<?php echo $i ?>">
|
<input type="checkbox" name="chk[]" value="<?php echo $row['po_id'] ?>" id="chk_<?php echo $i ?>">
|
||||||
</td>
|
</td>
|
||||||
<td class="td_num"><?php echo $row['po_id'] ?></td>
|
<td class="td_num"><?php echo $row['po_id'] ?></td>
|
||||||
<td class="td_left"><?php echo cut_str(get_text($row['po_subject']), 70) ?></td>
|
<td class="td_left"><?php echo cut_str(get_text($row['po_subject']),70) ?></td>
|
||||||
<td class="td_num"><?php echo $row['po_level'] ?></td>
|
<td class="td_num"><?php echo $row['po_level'] ?></td>
|
||||||
<td class="td_num"><?php echo $row2['sum_po_cnt'] ?></td>
|
<td class="td_num"><?php echo $row2['sum_po_cnt'] ?></td>
|
||||||
<td class="td_etc"><?php echo $po_etc ?></td>
|
<td class="td_etc"><?php echo $po_etc ?></td>
|
||||||
<td class="td_use"><?php echo $po_use ?></td>
|
<td class="td_mng td_mng_s"><?php echo $s_mod ?></td>
|
||||||
<td class="td_mng td_mng_s"><?php echo $s_mod ?></td>
|
</tr>
|
||||||
</tr>
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($i == 0) {
|
if ($i==0)
|
||||||
echo '<tr><td colspan="' . $colspan . '" class="empty_table">자료가 없습니다.</td></tr>';
|
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||||
}
|
?>
|
||||||
?>
|
</tbody>
|
||||||
</tbody>
|
</table>
|
||||||
</table>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="btn_fixed_top">
|
<div class="btn_fixed_top">
|
||||||
<input type="submit" value="선택삭제" class="btn btn_02">
|
<input type="submit" value="선택삭제" class="btn btn_02">
|
||||||
<a href="./poll_form.php" id="poll_add" class="btn btn_01">투표 추가</a>
|
<a href="./poll_form.php" id="poll_add" class="btn btn_01">투표 추가</a>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['SCRIPT_NAME']}?$qstr&page="); ?>
|
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['SCRIPT_NAME']}?$qstr&page="); ?>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(function() {
|
$(function() {
|
||||||
$('#fpolllist').submit(function() {
|
$('#fpolllist').submit(function() {
|
||||||
if (confirm("한번 삭제한 자료는 복구할 방법이 없습니다.\n\n정말 삭제하시겠습니까?")) {
|
if(confirm("한번 삭제한 자료는 복구할 방법이 없습니다.\n\n정말 삭제하시겠습니까?")) {
|
||||||
if (!is_checked("chk[]")) {
|
if (!is_checked("chk[]")) {
|
||||||
alert("선택삭제 하실 항목을 하나 이상 선택하세요.");
|
alert("선택삭제 하실 항목을 하나 이상 선택하세요.");
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
require_once './admin.tail.php';
|
include_once ('./admin.tail.php');
|
||||||
|
?>
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user