From 993e6898000c21719ec9af07403cf8fac80f78e5 Mon Sep 17 00:00:00 2001
From: kjh
Date: Mon, 30 May 2022 08:30:08 +0000
Subject: [PATCH] Checked PSR-1 / PHP 8.1 Undefiend Varialbe, type error
---
adm/faqlist.php | 196 ++++-----
adm/faqmasterform.php | 342 ++++++++-------
adm/faqmasterformupdate.php | 166 +++----
adm/faqmasterlist.php | 264 +++++------
adm/index.php | 381 ++++++++--------
adm/mail_delete.php | 9 +-
adm/mail_form.php | 174 ++++----
adm/mail_list.php | 127 +++---
adm/mail_preview.php | 28 +-
adm/mail_select_form.php | 266 +++++------
adm/mail_select_list.php | 123 +++---
adm/mail_select_update.php | 37 +-
adm/mail_test.php | 21 +-
adm/mail_update.php | 24 +-
adm/member_delete.php | 20 +-
adm/member_form.php | 853 ++++++++++++++++++------------------
adm/member_form_update.php | 221 +++++-----
adm/member_list.php | 496 +++++++++++----------
adm/member_list_delete.php | 16 +-
adm/member_list_update.php | 69 ++-
adm/menu_form.php | 304 ++++++-------
adm/menu_form_search.php | 117 +++--
adm/menu_list.php | 333 +++++++-------
adm/menu_list_update.php | 45 +-
adm/newwinform.php | 346 ++++++++-------
adm/newwinformupdate.php | 158 ++++---
adm/newwinlist.php | 239 +++++-----
27 files changed, 2724 insertions(+), 2651 deletions(-)
diff --git a/adm/faqlist.php b/adm/faqlist.php
index eccd167725..0ee85cfc79 100644
--- a/adm/faqlist.php
+++ b/adm/faqlist.php
@@ -1,99 +1,97 @@
-
-
-
- 등록된 FAQ 상세내용 건
-
-
-
-
- - FAQ는 무제한으로 등록할 수 있습니다
- - FAQ 상세내용 추가를 눌러 자주하는 질문과 답변을 입력합니다.
-
-
-
-
-
-
-
- 목록
-
-
- 번호 |
- 제목 |
- 순서 |
- 관리 |
-
-
-
-
-
-
- |
- |
- |
-
- 수정
- 삭제
- |
-
-
- 자료가 없습니다. | ';
- }
- ?>
-
-
-
-
-
-
-
+
+
+ 등록된 FAQ 상세내용 건
+
+
+
+
+ - FAQ는 무제한으로 등록할 수 있습니다
+ - FAQ 상세내용 추가를 눌러 자주하는 질문과 답변을 입력합니다.
+
+
+
+
+
+
+
+ 목록
+
+
+ 번호 |
+ 제목 |
+ 순서 |
+ 관리 |
+
+
+
+
+
+
+ |
+ |
+ |
+
+ 수정
+ 삭제
+ |
+
+ 자료가 없습니다. | ';
+ }
+ ?>
+
+
+
+
+
+
+'', 'fm_subject'=>'', 'fm_id'=>0, 'fm_head_html'=> '', 'fm_tail_html'=> '', 'fm_mobile_head_html' => '', 'fm_mobile_tail_html' => '');
-}
-
-$g5['title'] = $html_title.' 관리';
-
-// 모바일 상하단 내용 필드추가
-if(!sql_query(" select fm_mobile_head_html from {$g5['faq_master_table']} limit 1 ", false)) {
- 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);
-}
-
-include_once (G5_ADMIN_PATH.'/admin.head.php');
-?>
-
-
-
-
-
- '', 'fm_subject' => '', 'fm_id' => 0, 'fm_head_html' => '', 'fm_tail_html' => '', 'fm_mobile_head_html' => '', 'fm_mobile_tail_html' => '');
+}
+
+$g5['title'] = $html_title . ' 관리';
+
+// 모바일 상하단 내용 필드추가
+if (!sql_query(" select fm_mobile_head_html from {$g5['faq_master_table']} limit 1 ", false)) {
+ 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
+ );
+}
+
+require_once G5_ADMIN_PATH . '/admin.head.php';
+?>
+
+
+
+
+
+/data/dbconfig.php 파일에
$g5[\'faq_table\'] = G5_TABLE_PREFIX.\'faq\';
$g5[\'faq_master_table\'] = G5_TABLE_PREFIX.\'faq_master\';
를 추가해 주세요.');
-}
-
-//자주하시는 질문 마스터 테이블이 있는지 검사한다.
-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);
- } else {
- $query_cp = sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['faq_master_table']}` (
- `fm_id` int(11) NOT NULL AUTO_INCREMENT,
- `fm_subject` varchar(255) NOT NULL DEFAULT '',
- `fm_head_html` text NOT NULL,
- `fm_tail_html` text NOT NULL,
- `fm_order` int(11) NOT NULL DEFAULT '0',
- PRIMARY KEY (`fm_id`)
- ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ", true);
- }
- // FAQ Master
- sql_query(" insert into `{$g5['faq_master_table']}` set fm_id = '1', fm_subject = '자주하시는 질문' ", false);
-}
-
-//자주하시는 질문 테이블이 있는지 검사한다.
-if(!sql_query(" DESCRIBE {$g5['faq_table']} ", false)) {
- if(sql_query(" DESCRIBE {$g5['g5_shop_faq_table']} ", false)) {
- sql_query(" ALTER TABLE {$g5['g5_shop_faq_table']} RENAME TO `{$g5['faq_table']}` ;", false);
- } else {
- $query_cp = sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['faq_table']}` (
- `fa_id` int(11) NOT NULL AUTO_INCREMENT,
- `fm_id` int(11) NOT NULL DEFAULT '0',
- `fa_subject` text NOT NULL,
- `fa_content` text NOT NULL,
- `fa_order` int(11) NOT NULL DEFAULT '0',
- PRIMARY KEY (`fa_id`),
- KEY `fm_id` (`fm_id`)
- ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ", true);
- }
-}
-
-$g5['title'] = 'FAQ관리';
-include_once (G5_ADMIN_PATH.'/admin.head.php');
-
-$sql_common = " from {$g5['faq_master_table']} ";
-
-// 테이블의 전체 레코드수만 얻음
-$sql = " select count(*) as cnt " . $sql_common;
-$row = sql_fetch($sql);
-$total_count = $row['cnt'];
-
-$rows = $config['cf_page_rows'];
-$total_page = ceil($total_count / $rows); // 전체 페이지 계산
-if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
-$from_record = ($page - 1) * $rows; // 시작 열을 구함
-
-$sql = "select * $sql_common order by fm_order, fm_id limit $from_record, {$config['cf_page_rows']} ";
-$result = sql_query($sql);
-?>
-
-
- 1) {?>
처음으로
-
전체 FAQ 건
-
-
-
-
- - FAQ는 무제한으로 등록할 수 있습니다
- - FAQ추가를 눌러 FAQ Master를 생성합니다. (하나의 FAQ 타이틀 생성 : 자주하시는 질문, 이용안내..등 )
- - 생성한 FAQ Master 의 제목을 눌러 세부 내용을 관리할 수 있습니다.
-
-
-
-
-
-
-
- 목록
-
-
- ID |
- 제목 |
- FAQ수 |
- 순서 |
- 관리 |
-
-
-
-
-
- |
- |
- |
- |
-
- 수정
- 보기
- 삭제
- |
-
- 자료가 한건도 없습니다. | ';
- }
- ?>
-
-
-
-
-
-
-/data/dbconfig.php 파일에
$g5[\'faq_table\'] = G5_TABLE_PREFIX.\'faq\';
$g5[\'faq_master_table\'] = G5_TABLE_PREFIX.\'faq_master\';
를 추가해 주세요.');
+}
+
+//자주하시는 질문 마스터 테이블이 있는지 검사한다.
+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);
+ } else {
+ $query_cp = sql_query(
+ " CREATE TABLE IF NOT EXISTS `{$g5['faq_master_table']}` (
+ `fm_id` int(11) NOT NULL AUTO_INCREMENT,
+ `fm_subject` varchar(255) NOT NULL DEFAULT '',
+ `fm_head_html` text NOT NULL,
+ `fm_tail_html` text NOT NULL,
+ `fm_order` int(11) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`fm_id`)
+ ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ",
+ true
+ );
+ }
+ // FAQ Master
+ sql_query(" insert into `{$g5['faq_master_table']}` set fm_id = '1', fm_subject = '자주하시는 질문' ", false);
+}
+
+//자주하시는 질문 테이블이 있는지 검사한다.
+if (!sql_query(" DESCRIBE {$g5['faq_table']} ", false)) {
+ if (sql_query(" DESCRIBE {$g5['g5_shop_faq_table']} ", false)) {
+ sql_query(" ALTER TABLE {$g5['g5_shop_faq_table']} RENAME TO `{$g5['faq_table']}` ;", false);
+ } else {
+ $query_cp = sql_query(
+ " CREATE TABLE IF NOT EXISTS `{$g5['faq_table']}` (
+ `fa_id` int(11) NOT NULL AUTO_INCREMENT,
+ `fm_id` int(11) NOT NULL DEFAULT '0',
+ `fa_subject` text NOT NULL,
+ `fa_content` text NOT NULL,
+ `fa_order` int(11) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`fa_id`),
+ KEY `fm_id` (`fm_id`)
+ ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ",
+ true
+ );
+ }
+}
+
+$g5['title'] = 'FAQ관리';
+require_once G5_ADMIN_PATH . '/admin.head.php';
+
+$sql_common = " from {$g5['faq_master_table']} ";
+
+// 테이블의 전체 레코드수만 얻음
+$sql = " select count(*) as cnt " . $sql_common;
+$row = sql_fetch($sql);
+$total_count = $row['cnt'];
+
+$rows = $config['cf_page_rows'];
+$total_page = ceil($total_count / $rows); // 전체 페이지 계산
+if ($page < 1) {
+ $page = 1;
+} // 페이지가 없으면 첫 페이지 (1 페이지)
+$from_record = ($page - 1) * $rows; // 시작 열을 구함
+
+$sql = "select * $sql_common order by fm_order, fm_id limit $from_record, {$config['cf_page_rows']} ";
+$result = sql_query($sql);
+?>
+
+
+ 1) { ?>
+
처음으로
+
+
전체 FAQ 건
+
+
+
+
+ - FAQ는 무제한으로 등록할 수 있습니다
+ - FAQ추가를 눌러 FAQ Master를 생성합니다. (하나의 FAQ 타이틀 생성 : 자주하시는 질문, 이용안내..등 )
+ - 생성한 FAQ Master 의 제목을 눌러 세부 내용을 관리할 수 있습니다.
+
+
+
+
+
+
+
+ 목록
+
+
+ ID |
+ 제목 |
+ FAQ수 |
+ 순서 |
+ 관리 |
+
+
+
+
+
+ |
+ |
+ |
+ |
+
+ 수정
+ 보기
+ 삭제
+ |
+
+ 자료가 한건도 없습니다. | ';
+ }
+ ?>
+
+
+
+
+
+
+
- 신규가입회원
-
-
- 회원아이디 |
- 이름 |
- 닉네임 |
- 권한 |
- 포인트 |
- 수신 |
- 공개 |
- 인증 |
- 차단 |
- 그룹 |
-
-
-
- '.$row2['cnt'].'';
-
- if ($is_admin == 'group')
- {
- $s_mod = '';
- $s_del = '';
- }
- else
- {
- $s_mod = '수정';
- $s_del = '삭제';
- }
- $s_grp = '그룹';
-
- $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'];
- ?>
-
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
-
- 자료가 없습니다. | ';
- ?>
-
+ 신규가입회원
+
+
+ 회원아이디 |
+ 이름 |
+ 닉네임 |
+ 권한 |
+ 포인트 |
+ 수신 |
+ 공개 |
+ 인증 |
+ 차단 |
+ 그룹 |
+
+
+
+ ' . $row2['cnt'] . '';
+ }
+
+ if ($is_admin == 'group') {
+ $s_mod = '';
+ $s_del = '';
+ } else {
+ $s_mod = '수정';
+ $s_del = '삭제';
+ }
+ $s_grp = '그룹';
+
+ $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'];
+ ?>
+
+ |
+ |
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+ 자료가 없습니다. | ';
+ }
+ ?>
+
@@ -131,13 +132,15 @@
a.wr_parent ";
+ }
}
$sql_order = " order by a.bn_id desc ";
@@ -153,72 +156,74 @@
- 최근게시물
-
-
- 그룹 |
- 게시판 |
- 제목 |
- 이름 |
- 일시 |
-
-
-
-
-
-
- |
- |
- |
- |
- |
-
-
- 자료가 없습니다. | ';
- ?>
-
+ 최근게시물
+
+
+ 그룹 |
+ 게시판 |
+ 제목 |
+ 이름 |
+ 일시 |
+
+
+
+
+
+
+ |
+ |
+ |
+
+
+ |
+ |
+
+
+ 자료가 없습니다. | ';
+ }
+ ?>
+
@@ -250,56 +255,56 @@
- 최근 포인트 발생내역
-
-
- 회원아이디 |
- 이름 |
- 닉네임 |
- 일시 |
- 포인트 내용 |
- 포인트 |
- 포인트합 |
-
-
-
- ';
- $link2 = '';
- }
- ?>
-
-
- |
- |
- |
- |
- |
- |
- |
-
-
- 자료가 없습니다. | ';
- ?>
-
+ 최근 포인트 발생내역
+
+
+ 회원아이디 |
+ 이름 |
+ 닉네임 |
+ 일시 |
+ 포인트 내용 |
+ 포인트 |
+ 포인트합 |
+
+
+
+ ';
+ $link2 = '';
+ }
+ ?>
+
+
+ |
+ |
+
+
+ |
+ |
+ |
+ |
+ |
+
+
+ 자료가 없습니다. | ';
+ }
+ ?>
+
@@ -309,4 +314,4 @@
0, 'ma_subject'=>'', 'ma_content'=>'');
-
-if ($w == 'u') {
- $html_title .= '수정';
- $readonly = ' readonly';
-
- $sql = " select * from {$g5['mail_table']} where ma_id = '{$ma_id}' ";
- $ma = sql_fetch($sql);
- if (!$ma['ma_id'])
- alert('등록된 자료가 없습니다.');
-} else {
- $html_title .= '입력';
-}
-
-$g5['title'] = $html_title;
-include_once('./admin.head.php');
-?>
-
-메일 내용에 {이름} , {닉네임} , {회원아이디} , {이메일} 처럼 내용에 삽입하면 해당 내용에 맞게 변환하여 메일을 발송합니다.
-
-
-
-
-
- 0, 'ma_subject' => '', 'ma_content' => '');
+
+if ($w == 'u') {
+ $html_title .= '수정';
+ $readonly = ' readonly';
+
+ $sql = " select * from {$g5['mail_table']} where ma_id = '{$ma_id}' ";
+ $ma = sql_fetch($sql);
+ if (!$ma['ma_id']) {
+ alert('등록된 자료가 없습니다.');
+ }
+} else {
+ $html_title .= '입력';
+}
+
+$g5['title'] = $html_title;
+require_once './admin.head.php';
+?>
+
+
+
메일 내용에 {이름} , {닉네임} , {회원아이디} , {이메일} 처럼 내용에 삽입하면 해당 내용에 맞게 변환하여 메일을 발송합니다.
+
+
+
+
+
+
+
@@ -32,73 +32,74 @@
▶ 더 이상 정보 수신을 원치 않으시면 [수신거부] 해 주십시오.
";
+$content = conv_content($se['ma_content'], 1) . "
▶ 더 이상 정보 수신을 원치 않으시면 [수신거부] 해 주십시오.
";
?>
+
-
- 메일발송 테스트
+
+ 메일발송 테스트
-
-
-
-
-
-
-
-
- 주의! 이 화면에 보여지는 디자인은 실제 내용이 발송되었을 때 디자인과 다를 수 있습니다.
-
-
+
+
+
+ 주의! 이 화면에 보여지는 디자인은 실제 내용이 발송되었을 때 디자인과 다를 수 있습니다.
+
+
\ No newline at end of file
diff --git a/adm/mail_select_form.php b/adm/mail_select_form.php
index 076e3a60fa..62ea8f91bd 100644
--- a/adm/mail_select_form.php
+++ b/adm/mail_select_form.php
@@ -1,127 +1,139 @@
- '' ";
-$row = sql_fetch($sql);
-$finish_cnt = $row['cnt'];
-
-$last_option = explode('||', $ma['ma_last_option']);
-for ($i=0; $i
-
-
- 전체회원 명 , 탈퇴대기회원 명, 정상회원 명 중 메일 발송 대상 선택
-
-
-
-
- '' ";
+$row = sql_fetch($sql);
+$finish_cnt = $row['cnt'];
+
+$last_option = explode('||', $ma['ma_last_option']);
+for ($i = 0; $i < count($last_option); $i++) {
+ $option = explode('=', $last_option[$i]);
+ // 동적변수
+ $var = isset($option[0]) ? $option[0] : '';
+ if (isset($option[1])) {
+ $$var = $option[1];
+ }
+}
+
+if (!isset($mb_id1)) {
+ $mb_id1 = 1;
+}
+if (!isset($mb_level_from)) {
+ $mb_level_from = 1;
+}
+if (!isset($mb_level_to)) {
+ $mb_level_to = 10;
+}
+if (!isset($mb_mailling)) {
+ $mb_mailling = 1;
+}
+
+$mb_id1_from = isset($mb_id1_from) ? clean_xss_tags($mb_id1_from, 1, 1, 30) : '';
+$mb_id1_to = isset($mb_id1_to) ? clean_xss_tags($mb_id1_to, 1, 1, 30) : '';
+$mb_email = isset($mb_email) ? clean_xss_tags($mb_email, 1, 1, 100) : '';
+
+$g5['title'] = '회원메일발송';
+require_once './admin.head.php';
+?>
+
+
+ 전체회원 명 , 탈퇴대기회원 명, 정상회원 명 중 메일 발송 대상 선택
+
+
+
+
+
▶ 더 이상 정보 수신을 원치 않으시면 [수신거부] 해 주십시오.
";
+ $content = $content . "
▶ 더 이상 정보 수신을 원치 않으시면 [수신거부] 해 주십시오.
";
mailer($config['cf_admin_email_name'], $config['cf_admin_email'], $to_email, $subject, $content, 1);
@@ -71,15 +69,18 @@
ob_flush();
ob_end_flush();
usleep($sleepsec);
- if ($cnt % $countgap == 0)
- {
+ if ($cnt % $countgap == 0) {
echo "\n";
}
// 화면을 지운다... 부하를 줄임
- if ($cnt % $maxscreen == 0)
+ if ($cnt % $maxscreen == 0) {
echo "\n";
+ }
}
}
?>
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/adm/mail_test.php b/adm/mail_test.php
index 3731a3f2a6..13d74aeca5 100644
--- a/adm/mail_test.php
+++ b/adm/mail_test.php
@@ -1,11 +1,12 @@
더 이상 정보 수신을 원치 않으시면 [수신거부] 해 주십시오.
';
+$content = $content . '더 이상 정보 수신을 원치 않으시면 [수신거부] 해 주십시오.
';
mailer($config['cf_title'], $member['mb_email'], $member['mb_email'], $subject, $content, 1);
-alert($member['mb_nick'].'('.$member['mb_email'].')님께 테스트 메일을 발송하였습니다. 확인하여 주십시오.');
\ No newline at end of file
+alert($member['mb_nick'] . '(' . $member['mb_email'] . ')님께 테스트 메일을 발송하였습니다. 확인하여 주십시오.');
diff --git a/adm/mail_update.php b/adm/mail_update.php
index 844aa44353..31558022e7 100644
--- a/adm/mail_update.php
+++ b/adm/mail_update.php
@@ -1,9 +1,10 @@
= $member['mb_level'])
+} elseif ($mb['mb_level'] >= $member['mb_level']) {
alert("자신보다 권한이 높거나 같은 회원은 삭제할 수 없습니다.");
+}
check_admin_token();
// 회원자료 삭제
member_delete($mb['mb_id']);
-if ($url)
- goto_url("{$url}?$qstr&w=u&mb_id=$mb_id");
-else
- goto_url("./member_list.php?$qstr");
\ No newline at end of file
+if (isset($url)) {
+ goto_url("{$url}?$qstr&w=u&mb_id=" . $mb['mb_id']);
+} else {
+ goto_url("./member_list.php?$qstr");
+}
diff --git a/adm/member_form.php b/adm/member_form.php
index 44a05f0066..fb59ae01bf 100644
--- a/adm/member_form.php
+++ b/adm/member_form.php
@@ -1,50 +1,51 @@
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,
+ '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 == '')
-{
+if ($w == '') {
$required_mb_id = 'required';
$required_mb_id_class = 'required alnum_';
$required_mb_password = 'required';
@@ -54,15 +55,15 @@
$mb['mb_open'] = 1;
$mb['mb_level'] = $config['cf_register_level'];
$html_title = '추가';
-}
-else if ($w == 'u')
-{
+} elseif ($w == 'u') {
$mb = get_member($mb_id);
- if (!$mb['mb_id'])
+ if (!$mb['mb_id']) {
alert('존재하지 않는 회원자료입니다.');
+ }
- if ($is_admin != 'super' && $mb['mb_level'] >= $member['mb_level'])
+ if ($is_admin != 'super' && $mb['mb_level'] >= $member['mb_level']) {
alert('자신보다 권한이 높거나 같은 회원은 수정할 수 없습니다.');
+ }
$required_mb_id = 'readonly';
$html_title = '수정';
@@ -90,12 +91,12 @@
$mb['mb_8'] = get_text($mb['mb_8']);
$mb['mb_9'] = get_text($mb['mb_9']);
$mb['mb_10'] = get_text($mb['mb_10']);
-}
-else
+} else {
alert('제대로 된 값이 넘어오지 않았습니다.');
+}
// 본인확인방법
-switch($mb['mb_certify']) {
+switch ($mb['mb_certify']) {
case 'simple':
$mb_certify_case = '간편인증';
$mb_certify_val = 'simple';
@@ -147,39 +148,40 @@
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'])) {
+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'])) {
+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'])) {
+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'])) {
+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'])) {
+if (!isset($mb['mb_email_certify2'])) {
sql_query(" ALTER TABLE {$g5['member_table']} ADD `mb_email_certify2` varchar(255) NOT NULL DEFAULT '' AFTER `mb_email_certify` ", false);
}
// 본인인증 내역 테이블 정보가 dbconfig에 없으면 소셜 테이블 정의
-if( !isset($g5['member_cert_history']) ){
- $g5['member_cert_history_table'] = G5_TABLE_PREFIX.'member_cert_history';
+if (!isset($g5['member_cert_history'])) {
+ $g5['member_cert_history_table'] = G5_TABLE_PREFIX . 'member_cert_history';
}
// 멤버 본인인증 정보 변경 내역 테이블 없을 경우 생성
-if(isset($g5['member_cert_history_table']) && !sql_query(" DESC {$g5['member_cert_history_table']} ", false)) {
- sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['member_cert_history_table']}` (
+if (isset($g5['member_cert_history_table']) && !sql_query(" DESC {$g5['member_cert_history_table']} ", false)) {
+ sql_query(
+ " CREATE TABLE IF NOT EXISTS `{$g5['member_cert_history_table']}` (
`ch_id` int(11) NOT NULL auto_increment,
`mb_id` varchar(20) NOT NULL DEFAULT '',
`ch_name` varchar(255) NOT NULL DEFAULT '',
@@ -189,7 +191,9 @@
`ch_datetime` datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (`ch_id`),
KEY `mb_id` (`mb_id`)
- ) ", true);
+ ) ",
+ true
+ );
}
$mb_cert_history = '';
@@ -198,389 +202,390 @@
$mb_cert_history = sql_query($sql);
}
-if ($mb['mb_intercept_date']) $g5['title'] = "차단된 ";
-else $g5['title'] .= "";
-$g5['title'] .= '회원 '.$html_title;
-include_once('./admin.head.php');
+if ($mb['mb_intercept_date']) {
+ $g5['title'] = "차단된 ";
+} else {
+ $g5['title'] .= "";
+}
+$g5['title'] .= '회원 ' . $html_title;
+require_once './admin.head.php';
// add_javascript('js 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
?>
= $member['mb_level'])
+ if ($is_admin != 'super' && $mb['mb_level'] >= $member['mb_level']) {
alert('자신보다 권한이 높거나 같은 회원은 수정할 수 없습니다.');
+ }
- if ($is_admin !== 'super' && is_admin($mb['mb_id']) === 'super' ) {
+ if ($is_admin !== 'super' && is_admin($mb['mb_id']) === 'super') {
alert('최고관리자의 비밀번호를 수정할수 없습니다.');
}
- if ($mb_id === $member['mb_id'] && $_POST['mb_level'] != $mb['mb_level'])
- alert($mb['mb_id'].' : 로그인 중인 관리자 레벨은 수정 할 수 없습니다.');
+ if ($mb_id === $member['mb_id'] && $_POST['mb_level'] != $mb['mb_level']) {
+ alert($mb['mb_id'] . ' : 로그인 중인 관리자 레벨은 수정 할 수 없습니다.');
+ }
// 닉네임중복체크
$sql = " select mb_id, mb_name, mb_nick, mb_email from {$g5['member_table']} where mb_nick = '{$mb_nick}' and mb_id <> '$mb_id' ";
$row = sql_fetch($sql);
- if (isset($row['mb_id']) && $row['mb_id'])
- alert('이미 존재하는 닉네임입니다.\\nID : '.$row['mb_id'].'\\n이름 : '.$row['mb_name'].'\\n닉네임 : '.$row['mb_nick'].'\\n메일 : '.$row['mb_email']);
+ if (isset($row['mb_id']) && $row['mb_id']) {
+ 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' ";
$row = sql_fetch($sql);
- if (isset($row['mb_id']) && $row['mb_id'])
- alert('이미 존재하는 이메일입니다.\\nID : '.$row['mb_id'].'\\n이름 : '.$row['mb_name'].'\\n닉네임 : '.$row['mb_nick'].'\\n메일 : '.$row['mb_email']);
+ if (isset($row['mb_id']) && $row['mb_id']) {
+ alert('이미 존재하는 이메일입니다.\\nID : ' . $row['mb_id'] . '\\n이름 : ' . $row['mb_name'] . '\\n닉네임 : ' . $row['mb_nick'] . '\\n메일 : ' . $row['mb_email']);
+ }
- if ($mb_password)
- $sql_password = " , mb_password = '".get_encrypt_string($mb_password)."' ";
- else
+ if ($mb_password) {
+ $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
+ if (isset($passive_certify) && $passive_certify) {
+ $sql_certify = " , mb_email_certify = '" . G5_TIME_YMDHIS . "' ";
+ } else {
$sql_certify = "";
+ }
$sql = " update {$g5['member_table']}
set {$sql_common}
@@ -168,18 +180,18 @@
{$sql_certify}
where mb_id = '{$mb_id}' ";
sql_query($sql);
-}
-else
+} else {
alert('제대로 된 값이 넘어오지 않았습니다.');
+}
-if( $w == '' || $w == 'u' ){
-
- $mb_dir = substr($mb_id,0,2);
- $mb_icon_img = get_mb_icon_name($mb_id).'.gif';
+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)
- @unlink(G5_DATA_PATH.'/member/'.$mb_dir.'/'.$mb_icon_img);
+ if (isset($del_mb_icon) && $del_mb_icon) {
+ @unlink(G5_DATA_PATH . '/member/' . $mb_dir . '/' . $mb_icon_img);
+ }
$image_regex = "/(\.(gif|jpe?g|png))$/i";
@@ -190,78 +202,83 @@
}
if (preg_match($image_regex, $_FILES['mb_icon']['name'])) {
- $mb_icon_dir = G5_DATA_PATH.'/member/'.$mb_dir;
+ $mb_icon_dir = G5_DATA_PATH . '/member/' . $mb_dir;
@mkdir($mb_icon_dir, G5_DIR_PERMISSION);
@chmod($mb_icon_dir, G5_DIR_PERMISSION);
- $dest_path = $mb_icon_dir.'/'.$mb_icon_img;
+ $dest_path = $mb_icon_dir . '/' . $mb_icon_img;
move_uploaded_file($_FILES['mb_icon']['tmp_name'], $dest_path);
chmod($dest_path, G5_FILE_PERMISSION);
-
+
if (file_exists($dest_path)) {
$size = @getimagesize($dest_path);
- if ($size[0] > $config['cf_member_icon_width'] || $size[1] > $config['cf_member_icon_height']) {
- $thumb = null;
- 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) {
+ if ($size) {
+ if ($size[0] > $config['cf_member_icon_width'] || $size[1] > $config['cf_member_icon_height']) {
+ $thumb = null;
+ 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);
- rename($mb_icon_dir.'/'.$thumb, $dest_path);
}
}
- if( !$thumb ){
- // 아이콘의 폭 또는 높이가 설정값 보다 크다면 이미 업로드 된 아이콘 삭제
- @unlink($dest_path);
- }
}
}
}
}
-
- $mb_img_dir = G5_DATA_PATH.'/member_image/';
- if( !is_dir($mb_img_dir) ){
+
+ $mb_img_dir = G5_DATA_PATH . '/member_image/';
+ if (!is_dir($mb_img_dir)) {
@mkdir($mb_img_dir, G5_DIR_PERMISSION);
@chmod($mb_img_dir, G5_DIR_PERMISSION);
}
- $mb_img_dir .= substr($mb_id,0,2);
+ $mb_img_dir .= substr($mb_id, 0, 2);
// 회원 이미지 삭제
- if (isset($del_mb_img) && $del_mb_img)
- @unlink($mb_img_dir.'/'.$mb_icon_img);
+ if (isset($del_mb_img) && $del_mb_img) {
+ @unlink($mb_img_dir . '/' . $mb_icon_img);
+ }
// 아이콘 업로드
if (isset($_FILES['mb_img']) && is_uploaded_file($_FILES['mb_img']['tmp_name'])) {
if (!preg_match($image_regex, $_FILES['mb_img']['name'])) {
alert($_FILES['mb_img']['name'] . '은(는) 이미지 파일이 아닙니다.');
}
-
+
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;
-
+
+ $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[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) {
+ 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);
- rename($mb_img_dir.'/'.$thumb, $dest_path);
}
}
- if( !$thumb ){
- // 아이콘의 폭 또는 높이가 설정값 보다 크다면 이미 업로드 된 아이콘 삭제
- @unlink($dest_path);
- }
}
}
}
@@ -270,4 +287,4 @@
run_event('admin_member_form_update', $w, $mb_id);
-goto_url('./member_form.php?'.$qstr.'&w=u&mb_id='.$mb_id, false);
\ No newline at end of file
+goto_url('./member_form.php?' . $qstr . '&w=u&mb_id=' . $mb_id, false);
diff --git a/adm/member_list.php b/adm/member_list.php
index 78ba3efd95..dc6348cdde 100644
--- a/adm/member_list.php
+++ b/adm/member_list.php
@@ -1,6 +1,6 @@
= '{$stx}') ";
break;
- case 'mb_level' :
+ case 'mb_level':
$sql_search .= " ({$sfl} = '{$stx}') ";
break;
- case 'mb_tel' :
- case 'mb_hp' :
+ case 'mb_tel':
+ case 'mb_hp':
$sql_search .= " ({$sfl} like '%{$stx}') ";
break;
- default :
+ default:
$sql_search .= " ({$sfl} like '{$stx}%') ";
break;
}
$sql_search .= " ) ";
}
-if ($is_admin != 'super')
+if ($is_admin != 'super') {
$sql_search .= " and mb_level <= '{$member['mb_level']}' ";
+}
if (!$sst) {
$sst = "mb_datetime";
@@ -43,7 +44,9 @@
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
-if ($page < 1) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
+if ($page < 1) {
+ $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
+}
$from_record = ($page - 1) * $rows; // 시작 열을 구함
// 탈퇴회원수
@@ -56,10 +59,10 @@
$row = sql_fetch($sql);
$intercept_count = $row['cnt'];
-$listall = '전체목록';
+$listall = '전체목록';
$g5['title'] = '회원관리';
-include_once('./admin.head.php');
+require_once './admin.head.php';
$sql = " select * {$sql_common} {$sql_search} {$sql_order} limit {$from_record}, {$rows} ";
$result = sql_query($sql);
@@ -71,28 +74,28 @@
총회원수 명
차단 명
- 탈퇴 명
+ 탈퇴 명
@@ -104,236 +107,243 @@
-
+
= $member['mb_level']) {
+ } elseif ($is_admin != "super" && $mb['mb_level'] >= $member['mb_level']) {
$msg .= "{$mb['mb_id']} : 자신보다 권한이 높거나 같은 회원은 삭제할 수 없습니다.\\n";
} else {
// 회원자료 삭제
@@ -30,7 +29,8 @@
}
}
-if ($msg)
+if ($msg) {
echo "";
+}
-goto_url("./member_list.php?$qstr");
\ No newline at end of file
+goto_url("./member_list.php?$qstr");
diff --git a/adm/member_list_update.php b/adm/member_list_update.php
index 82a2db6c3f..5cb721e876 100644
--- a/adm/member_list_update.php
+++ b/adm/member_list_update.php
@@ -1,11 +1,11 @@
= $member['mb_level']) {
- $msg .= $mb['mb_id'].' : 자신보다 권한이 높거나 같은 회원은 수정할 수 없습니다.\\n';
- } else if ($member['mb_id'] == $mb['mb_id']) {
- $msg .= $mb['mb_id'].' : 로그인 중인 관리자는 수정 할 수 없습니다.\\n';
+ 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 ($member['mb_id'] == $mb['mb_id']) {
+ $msg .= $mb['mb_id'] . ' : 로그인 중인 관리자는 수정 할 수 없습니다.\\n';
} else {
- if($post_mb_certify)
+ if ($post_mb_certify) {
$mb_adult = isset($_POST['mb_adult'][$k]) ? (int) $_POST['mb_adult'][$k] : 0;
- else
+ } else {
$mb_adult = 0;
+ }
$sql = " update {$g5['member_table']}
- set mb_level = '".$post_mb_level."',
- mb_intercept_date = '".sql_real_escape_string($post_mb_intercept_date)."',
- mb_mailling = '".$post_mb_mailling."',
- mb_sms = '".$post_mb_sms."',
- mb_open = '".$post_mb_open."',
- mb_certify = '".sql_real_escape_string($post_mb_certify)."',
+ set mb_level = '" . $post_mb_level . "',
+ mb_intercept_date = '" . sql_real_escape_string($post_mb_intercept_date) . "',
+ mb_mailling = '" . $post_mb_mailling . "',
+ mb_sms = '" . $post_mb_sms . "',
+ mb_open = '" . $post_mb_open . "',
+ mb_certify = '" . sql_real_escape_string($post_mb_certify) . "',
mb_adult = '{$mb_adult}'
- where mb_id = '".sql_real_escape_string($mb['mb_id'])."' ";
+ where mb_id = '" . sql_real_escape_string($mb['mb_id']) . "' ";
sql_query($sql);
}
}
-
-} else if ($_POST['act_button'] == "선택삭제") {
-
- for ($i=0; $i= $member['mb_level']) {
- $msg .= $mb['mb_id'].' : 자신보다 권한이 높거나 같은 회원은 삭제할 수 없습니다.\\n';
+ $msg .= $mb['mb_id'] . ' : 회원자료가 존재하지 않습니다.\\n';
+ } elseif ($member['mb_id'] == $mb['mb_id']) {
+ $msg .= $mb['mb_id'] . ' : 로그인 중인 관리자는 삭제 할 수 없습니다.\\n';
+ } elseif (is_admin($mb['mb_id']) == 'super') {
+ $msg .= $mb['mb_id'] . ' : 최고 관리자는 삭제할 수 없습니다.\\n';
+ } elseif ($is_admin != 'super' && $mb['mb_level'] >= $member['mb_level']) {
+ $msg .= $mb['mb_id'] . ' : 자신보다 권한이 높거나 같은 회원은 삭제할 수 없습니다.\\n';
} else {
// 회원자료 삭제
member_delete($mb['mb_id']);
@@ -80,10 +76,11 @@
}
}
-if ($msg)
+if ($msg) {
//echo '';
alert($msg);
+}
run_event('admin_member_list_update', $_POST['act_button'], $mb_datas);
-goto_url('./member_list.php?'.$qstr);
\ No newline at end of file
+goto_url('./member_list.php?' . $qstr);
diff --git a/adm/menu_form.php b/adm/menu_form.php
index 4c8c43473b..ce10a176b8 100644
--- a/adm/menu_form.php
+++ b/adm/menu_form.php
@@ -1,22 +1,24 @@
+ for ($i = 0; $row = sql_fetch_array($result); $i++) {
+ if ($i == 0) {
+ $bbs_subject_title = ($type == 'board') ? '게시판제목' : '제목';
+ ?>
-
-
- |
-
- 게시판 그룹 |
-
- 선택 |
-
-
-
-
-
+
+ |
+
+ 게시판 그룹 |
+
+ 선택 |
+
+
+
+
+
-
-
- |
-
- |
-
-
- ">
-
-
- |
-
-
-
-
+
+ |
+
+ |
+
+
+ ">
+
+
+ |
+
+
+
+
+
@@ -96,26 +96,25 @@
-
diff --git a/adm/menu_list.php b/adm/menu_list.php
index c9c77feec6..0281c32596 100644
--- a/adm/menu_list.php
+++ b/adm/menu_list.php
@@ -1,17 +1,19 @@
dbconfig.php 파일에 $g5[\'menu_table\'] = G5_TABLE_PREFIX.\'menu\'; 를 추가해 주세요.');
}
-if(!sql_query(" DESCRIBE {$g5['menu_table']} ", false)) {
- sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['menu_table']}` (
+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 '',
@@ -21,14 +23,16 @@
`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);
+ ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ",
+ true
+ );
}
$sql = " select * from {$g5['menu_table']} order by me_id ";
$result = sql_query($sql);
$g5['title'] = "메뉴설정";
-include_once('./admin.head.php');
+require_once './admin.head.php';
$colspan = 7;
$sub_menu_info = '';
@@ -39,181 +43,178 @@
'',
-'nw_end_time'=>'',
-'nw_subject'=>'',
-'nw_content'=>'',
-'nw_division'=>'',
-);
-
-$html_title = "팝업레이어";
-
-// 팝업레이어 테이블에 쇼핑몰, 커뮤니티 인지 구분하는 여부 필드 추가
-$sql = " ALTER TABLE `{$g5['new_win_table']}` ADD `nw_division` VARCHAR(10) NOT NULL DEFAULT 'both' ";
-sql_query($sql, false);
-
-if ($w == "u")
-{
- $html_title .= " 수정";
- $sql = " select * from {$g5['new_win_table']} where nw_id = '$nw_id' ";
- $nw = sql_fetch($sql);
- if (! (isset($nw['nw_id']) && $nw['nw_id'])) alert("등록된 자료가 없습니다.");
-}
-else
-{
- $html_title .= " 입력";
- $nw['nw_device'] = 'both';
- $nw['nw_disable_hours'] = 24;
- $nw['nw_left'] = 10;
- $nw['nw_top'] = 10;
- $nw['nw_width'] = 450;
- $nw['nw_height'] = 500;
- $nw['nw_content_html'] = 2;
-}
-
-$g5['title'] = $html_title;
-include_once (G5_ADMIN_PATH.'/admin.head.php');
-?>
-
-
-
-
-
- '',
+ 'nw_end_time' => '',
+ 'nw_subject' => '',
+ 'nw_content' => '',
+ 'nw_division' => '',
+);
+
+$html_title = "팝업레이어";
+
+// 팝업레이어 테이블에 쇼핑몰, 커뮤니티 인지 구분하는 여부 필드 추가
+$sql = " ALTER TABLE `{$g5['new_win_table']}` ADD `nw_division` VARCHAR(10) NOT NULL DEFAULT 'both' ";
+sql_query($sql, false);
+
+if ($w == "u") {
+ $html_title .= " 수정";
+ $sql = " select * from {$g5['new_win_table']} where nw_id = '$nw_id' ";
+ $nw = sql_fetch($sql);
+ if (!(isset($nw['nw_id']) && $nw['nw_id'])) {
+ alert("등록된 자료가 없습니다.");
+ }
+} else {
+ $html_title .= " 입력";
+ $nw['nw_device'] = 'both';
+ $nw['nw_disable_hours'] = 24;
+ $nw['nw_left'] = 10;
+ $nw['nw_top'] = 10;
+ $nw['nw_width'] = 450;
+ $nw['nw_height'] = 500;
+ $nw['nw_content_html'] = 2;
+}
+
+$g5['title'] = $html_title;
+require_once G5_ADMIN_PATH . '/admin.head.php';
+?>
+
+
+
+
+
+'str',
-'nw_division'=>'str',
-'nw_begin_time'=>'str',
-'nw_end_time'=>'str',
-'nw_disable_hours'=>'int',
-'nw_left'=>'int',
-'nw_top'=>'int',
-'nw_height'=>'int',
-'nw_width'=>'int',
-'nw_content'=>'text',
-'nw_content_html'=>'text',
-);
-
-foreach($check_keys as $key=>$val){
- if($val === 'int'){
- $posts[$key] = isset($_POST[$key]) ? (int) $_POST[$key] : 0;
- } else if ($val === 'str') {
- $posts[$key] = isset($_POST[$key]) ? clean_xss_tags($_POST[$key], 1, 1) : 0;
- } else {
- $posts[$key] = isset($_POST[$key]) ? trim($_POST[$key]) : 0;
- }
-}
-
-$sql_common = " nw_device = '{$posts['nw_device']}',
- nw_division = '{$posts['nw_division']}',
- nw_begin_time = '{$posts['nw_begin_time']}',
- nw_end_time = '{$posts['nw_end_time']}',
- nw_disable_hours = '{$posts['nw_disable_hours']}',
- nw_left = '{$posts['nw_left']}',
- 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();
-}
-else if ($w == "u")
-{
- $sql = " update {$g5['new_win_table']} set $sql_common where nw_id = '$nw_id' ";
- sql_query($sql);
-}
-else if ($w == "d")
-{
- $sql = " delete from {$g5['new_win_table']} where nw_id = '$nw_id' ";
- sql_query($sql);
-}
-
-if ($w == "d")
-{
- goto_url('./newwinlist.php');
-}
-else
-{
- goto_url("./newwinform.php?w=u&nw_id=$nw_id");
-}
\ No newline at end of file
+ 'str',
+ 'nw_division' => 'str',
+ 'nw_begin_time' => 'str',
+ 'nw_end_time' => 'str',
+ 'nw_disable_hours' => 'int',
+ 'nw_left' => 'int',
+ 'nw_top' => 'int',
+ 'nw_height' => 'int',
+ 'nw_width' => 'int',
+ 'nw_content' => 'text',
+ 'nw_content_html' => 'text',
+);
+
+foreach ($check_keys as $key => $val) {
+ if ($val === 'int') {
+ $posts[$key] = isset($_POST[$key]) ? (int) $_POST[$key] : 0;
+ } elseif ($val === 'str') {
+ $posts[$key] = isset($_POST[$key]) ? clean_xss_tags($_POST[$key], 1, 1) : 0;
+ } else {
+ $posts[$key] = isset($_POST[$key]) ? trim($_POST[$key]) : 0;
+ }
+}
+
+$sql_common = " nw_device = '{$posts['nw_device']}',
+ nw_division = '{$posts['nw_division']}',
+ nw_begin_time = '{$posts['nw_begin_time']}',
+ nw_end_time = '{$posts['nw_end_time']}',
+ nw_disable_hours = '{$posts['nw_disable_hours']}',
+ nw_left = '{$posts['nw_left']}',
+ 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();
+} elseif ($w == "u") {
+ $sql = " update {$g5['new_win_table']} set $sql_common where nw_id = '$nw_id' ";
+ sql_query($sql);
+} elseif ($w == "d") {
+ $sql = " delete from {$g5['new_win_table']} where nw_id = '$nw_id' ";
+ sql_query($sql);
+}
+
+if ($w == "d") {
+ goto_url('./newwinlist.php');
+} else {
+ goto_url("./newwinform.php?w=u&nw_id=$nw_id");
+}
diff --git a/adm/newwinlist.php b/adm/newwinlist.php
index 81c25f94d9..ff50a1fe79 100644
--- a/adm/newwinlist.php
+++ b/adm/newwinlist.php
@@ -1,118 +1,121 @@
-/data/dbconfig.php 파일에 $g5[\'new_win_table\'] = G5_TABLE_PREFIX.\'new_win\'; 를 추가해 주세요.');
-}
-//내용(컨텐츠)정보 테이블이 있는지 검사한다.
-if(!sql_query(" DESCRIBE {$g5['new_win_table']} ", false)) {
- if(sql_query(" DESCRIBE {$g5['g5_shop_new_win_table']} ", false)) {
- sql_query(" ALTER TABLE {$g5['g5_shop_new_win_table']} RENAME TO `{$g5['new_win_table']}` ;", false);
- } else {
- $query_cp = sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['new_win_table']}` (
- `nw_id` int(11) NOT NULL AUTO_INCREMENT,
- `nw_division` varchar(10) NOT NULL DEFAULT 'both',
- `nw_device` varchar(10) NOT NULL DEFAULT 'both',
- `nw_begin_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `nw_end_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `nw_disable_hours` int(11) NOT NULL DEFAULT '0',
- `nw_left` int(11) NOT NULL DEFAULT '0',
- `nw_top` int(11) NOT NULL DEFAULT '0',
- `nw_height` int(11) NOT NULL DEFAULT '0',
- `nw_width` int(11) NOT NULL DEFAULT '0',
- `nw_subject` text NOT NULL,
- `nw_content` text NOT NULL,
- `nw_content_html` tinyint(4) NOT NULL DEFAULT '0',
- PRIMARY KEY (`nw_id`)
- ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ", true);
- }
-}
-
-$g5['title'] = '팝업레이어 관리';
-include_once (G5_ADMIN_PATH.'/admin.head.php');
-
-$sql_common = " from {$g5['new_win_table']} ";
-
-// 테이블의 전체 레코드수만 얻음
-$sql = " select count(*) as cnt " . $sql_common;
-$row = sql_fetch($sql);
-$total_count = $row['cnt'];
-
-$sql = "select * $sql_common order by nw_id desc ";
-$result = sql_query($sql);
-?>
-
-전체 건
-
-
-
-
-
- 목록
-
-
- 번호 |
- 제목 |
- 접속기기 |
- 시작일시 |
- 종료일시 |
- 시간 |
- Left |
- Top |
- Width |
- Height |
- 관리 |
-
-
-
-
-
- |
- |
- |
- |
- |
- 시간 |
- px |
- px |
- px |
- px |
-
- 수정
- 삭제
- |
-
- 자료가 한건도 없습니다. | ';
- }
- ?>
-
-
-
-
-
-/data/dbconfig.php 파일에 $g5[\'new_win_table\'] = G5_TABLE_PREFIX.\'new_win\'; 를 추가해 주세요.');
+}
+//내용(컨텐츠)정보 테이블이 있는지 검사한다.
+if (!sql_query(" DESCRIBE {$g5['new_win_table']} ", false)) {
+ if (sql_query(" DESCRIBE {$g5['g5_shop_new_win_table']} ", false)) {
+ sql_query(" ALTER TABLE {$g5['g5_shop_new_win_table']} RENAME TO `{$g5['new_win_table']}` ;", false);
+ } else {
+ $query_cp = sql_query(
+ " CREATE TABLE IF NOT EXISTS `{$g5['new_win_table']}` (
+ `nw_id` int(11) NOT NULL AUTO_INCREMENT,
+ `nw_division` varchar(10) NOT NULL DEFAULT 'both',
+ `nw_device` varchar(10) NOT NULL DEFAULT 'both',
+ `nw_begin_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `nw_end_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `nw_disable_hours` int(11) NOT NULL DEFAULT '0',
+ `nw_left` int(11) NOT NULL DEFAULT '0',
+ `nw_top` int(11) NOT NULL DEFAULT '0',
+ `nw_height` int(11) NOT NULL DEFAULT '0',
+ `nw_width` int(11) NOT NULL DEFAULT '0',
+ `nw_subject` text NOT NULL,
+ `nw_content` text NOT NULL,
+ `nw_content_html` tinyint(4) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`nw_id`)
+ ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ",
+ true
+ );
+ }
+}
+
+$g5['title'] = '팝업레이어 관리';
+require_once G5_ADMIN_PATH . '/admin.head.php';
+
+$sql_common = " from {$g5['new_win_table']} ";
+
+// 테이블의 전체 레코드수만 얻음
+$sql = " select count(*) as cnt " . $sql_common;
+$row = sql_fetch($sql);
+$total_count = $row['cnt'];
+
+$sql = "select * $sql_common order by nw_id desc ";
+$result = sql_query($sql);
+?>
+
+전체 건
+
+
+
+
+
+ 목록
+
+
+ 번호 |
+ 제목 |
+ 접속기기 |
+ 시작일시 |
+ 종료일시 |
+ 시간 |
+ Left |
+ Top |
+ Width |
+ Height |
+ 관리 |
+
+
+
+
+
+ |
+ |
+ |
+ |
+ |
+ 시간 |
+ px |
+ px |
+ px |
+ px |
+
+ 수정
+ 삭제
+ |
+
+ 자료가 한건도 없습니다. | ';
+ }
+ ?>
+
+
+
+
+
+