diff --git a/README.md b/README.md new file mode 100644 index 000000000..e69de29bb diff --git a/adm/_common.php b/adm/_common.php index aad9d14a9..989845be2 100644 --- a/adm/_common.php +++ b/adm/_common.php @@ -1,32 +1,10 @@ ', 11); -add_stylesheet('', 12); -add_javascript('', 10); +add_stylesheet('', 11); +add_stylesheet('', 12); +add_javascript('', 10); ?>

짧은 주소 설정

@@ -41,48 +43,48 @@ add_javascript('', 10);

게시판과 컨텐츠 페이지에 짧은 URL 을 사용합니다. 설정 관련 메뉴얼 보기 - - -
Apache 서버인 경우 rewrite_module 이 비활성화 되어 있으면 짧은 주소를 사용할수 없습니다. - -
짧은 주소 사용시 아래 Apache 설정 코드를 참고하여 설정해 주세요. + + +
Apache 서버인 경우 rewrite_module 이 비활성화 되어 있으면 짧은 주소를 사용할수 없습니다. + +
짧은 주소 사용시 아래 Apache 설정 코드를 참고하여 설정해 주세요.

- + - +
- - - - - - - 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' : ''; - ?> - - - - - - + + + + + + + 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' : ''; + ?> + + + + + +
짧은주소 설정
>
짧은주소 설정
>
@@ -95,13 +97,13 @@ add_javascript('', 10);

.htaccess 파일에 적용할 코드입니다. - -
Apache 서버인 경우 rewrite_module 이 비활성화 되어 있으면 짧은 주소를 사용할수 없습니다. - -
자동으로 .htaccess 파일을 수정 할수 있는 권한이 없습니다.
.htaccess 파일이 없다면 생성 후에, 아래 코드가 없으면 코드를 복사하여 붙여넣기 해 주세요.
- -
정상적으로 적용된 상태입니다. - + +
Apache 서버인 경우 rewrite_module 이 비활성화 되어 있으면 짧은 주소를 사용할수 없습니다. + +
자동으로 .htaccess 파일을 수정 할수 있는 권한이 없습니다.
.htaccess 파일이 없다면 생성 후에, 아래 코드가 없으면 코드를 복사하여 붙여넣기 해 주세요.
+ +
정상적으로 적용된 상태입니다. +

diff --git a/adm/admin.head.php b/adm/admin.head.php index ec35ab825..bb78781cc 100644 --- a/adm/admin.head.php +++ b/adm/admin.head.php @@ -1,25 +1,29 @@ $css_file) { - + foreach ((array) $files as $k => $css_file) { + $fileinfo = pathinfo($css_file); $ext = $fileinfo['extension']; - - if( $ext !== 'css' ) continue; - + + if ($ext !== 'css') { + continue; + } + $css_file = str_replace(G5_ADMIN_PATH, G5_ADMIN_URL, $css_file); - add_stylesheet('', $k); + add_stylesheet('', $k); } } -include_once(G5_PATH.'/head.sub.php'); +require_once G5_PATH . '/head.sub.php'; -function print_menu1($key, $no='') +function print_menu1($key, $no = '') { global $menu; @@ -28,35 +32,39 @@ function print_menu1($key, $no='') return $str; } -function print_menu2($key, $no='') +function print_menu2($key, $no = '') { global $menu, $auth_menu, $is_admin, $auth, $g5, $sub_menu; $str = " @@ -164,39 +172,37 @@ function imageview(id, w, h) diff --git a/adm/admin.lib.php b/adm/admin.lib.php index 1918f2748..46c706378 100644 --- a/adm/admin.lib.php +++ b/adm/admin.lib.php @@ -1,5 +1,7 @@ \n"; - for ($i=0; $i선택"; - if(preg_match('#^theme/(.+)$#', $skins[$i], $match)) - $text = '(테마) '.$match[1]; - else + for ($i = 0; $i < count($skins); $i++) { + if ($i == 0) { + $str .= ""; + } + if (preg_match('#^theme/(.+)$#', $skins[$i], $match)) { + $text = '(테마) ' . $match[1]; + } else { $text = $skins[$i]; + } $str .= option_selected($skins[$i], $selected, $text); } @@ -42,30 +47,33 @@ function get_skin_select($skin_gubun, $id, $name, $selected='', $event='') } // 모바일 스킨디렉토리를 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; $skins = array(); - if(defined('G5_THEME_PATH') && $config['cf_theme']) { - $dirs = get_skin_dir($skin_gubun, G5_THEME_MOBILE_PATH.'/'.G5_SKIN_DIR); - if(!empty($dirs)) { - foreach($dirs as $dir) { - $skins[] = 'theme/'.$dir; + if (defined('G5_THEME_PATH') && $config['cf_theme']) { + $dirs = get_skin_dir($skin_gubun, G5_THEME_MOBILE_PATH . '/' . G5_SKIN_DIR); + if (!empty($dirs)) { + foreach ($dirs as $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 = "'; - for ($i=0; $row=sql_fetch_array($result); $i++) - { - $str .= '
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 @@ $colspan = 7;
-
- - - - - - - - - - - - - - - 미리보기'; +
+
목록
번호제목작성일시테스트보내기미리보기
+ + + + + + + + + + + + + + 미리보기'; - $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); + ?> - - - - - - - - - + + + + + + + + + - "; - ?> - -
목록
번호제목작성일시테스트보내기미리보기
- - - 테스트보내기
+ + + 테스트보내기
자료가 없습니다.
-
-
- - 메일내용추가 -
+ 자료가 없습니다."; + } + ?> + + + +
+ + 메일내용추가 +

▶ 더 이상 정보 수신을 원치 않으시면 [수신거부] 해 주십시오.

"; +$content = conv_content($se['ma_content'], 1) . "

▶ 더 이상 정보 수신을 원치 않으시면 [수신거부] 해 주십시오.

"; ?> + - -<?php echo G5_VERSION ?> 메일발송 테스트 + + <?php echo G5_VERSION ?> 메일발송 테스트 - -

- -

- -

- -

- 주의! 이 화면에 보여지는 디자인은 실제 내용이 발송되었을 때 디자인과 다를 수 있습니다. -

- +

+

+

+ 주의! 이 화면에 보여지는 디자인은 실제 내용이 발송되었을 때 디자인과 다를 수 있습니다. +

+ \ No newline at end of file diff --git a/adm/mail_select_form.php b/adm/mail_select_form.php index 076e3a60f..62ea8f91b 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 - -
- 전체회원 명 , 탈퇴대기회원 명, 정상회원 명 중 메일 발송 대상 선택 -
- -
- - -
- - - - - - - - - - - - - - - - - - - - - - - - -
대상선택
회원 ID - > - > - 에서 - 까지 -
- - -
- -
권한 - - 에서 - - 까지 -
- -
-
- -
- - 목록 -
-
- - '' "; +$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'; +?> + +
+ 전체회원 명 , 탈퇴대기회원 명, 정상회원 명 중 메일 발송 대상 선택 +
+ +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
대상선택
회원 ID + > + > + 에서 + 까지 +
+ + +
+ +
권한 + + 에서 + + 까지 +
+ +
+
+ +
+ + 목록 +
+
+ +
- - + + -
- - - - - - - - - - - - - +
목록
번호회원아이디이름닉네임E-mail
+ + + + + + + + + + + + - - - - - - - - - -
목록
번호회원아이디이름닉네임E-mail
- -
+ $bg = 'bg' . ($i % 2); + ?> + + + + + + + + + + + + -
- - 뒤로 -
+
+ + 뒤로 +
";

▶ 더 이상 정보 수신을 원치 않으시면 [수신거부] 해 주십시오.

"; + $content = $content . "

▶ 더 이상 정보 수신을 원치 않으시면 [수신거부] 해 주십시오.

"; mailer($config['cf_admin_email_name'], $config['cf_admin_email'], $to_email, $subject, $content, 1); @@ -71,15 +69,18 @@ for ($i=0; $i document.all.cont.innerHTML += '
'; document.body.scrollTop += 1000; \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 3731a3f2a..13d74aeca 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 844aa4435..31558022e 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 44a05f006..8040e9d09 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 @@ if ($w == '') $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 @@ else if ($w == 'u') $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 @@ if (isset($mb['mb_certify'])) { 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 @@ if(isset($g5['member_cert_history_table']) && !sql_query(" DESC {$g5['member_cer `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,429 @@ if (isset($mb_id) && $mb_id) { $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 ?>
- - - - - - - + + + + + + + -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + + + + + + + + + + + + + + + + + - + + + + + - run_event('admin_member_form_add', $mb, $w, 'table'); - ?> + + + + + + - - - - - - + + + +
- class="frm_input " size="15" maxlength="20"> - 접근가능그룹보기 - class="frm_input " size="15" maxlength="20">
포인트
본인확인방법 - > - - > - - > - -
본인확인 - > - - > - - 성인인증 - > - - > - -
주소 - - -
- -
- - -
- - -
-
- 넓이 '.$config['cf_member_icon_width'].'픽셀 높이 '.$config['cf_member_icon_height'].'픽셀로 해주세요.') ?> - - '; - echo '삭제'; - } - ?> -
- 넓이 '.$config['cf_member_img_width'].'픽셀 높이 '.$config['cf_member_img_height'].'픽셀로 해주세요.') ?> - - 삭제'; - } - ?> -
메일 수신 - > - - > - - - > - - > - -
정보 공개 - > - - > - -
- -
- [] - / - / - / - -
- - - - 본인인증 내역이 없습니다. - -
회원가입일최근접속일
IP
인증일시 - - - - - - - -
추천인
- - " 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; }"> - - 접근차단일자 - - " 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; }"> - -
소셜계정목록 - - + + 본인인증 내역이 없습니다. + +
회원가입일최근접속일
IP
인증일시 + + + + + + + +
추천인
+ + " 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; }"> + + 접근차단일자 + + " 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; }"> + +
소셜계정목록 +
-
+ $provider = strtolower($account['provider']); + $provider_name = social_get_provider_service_name($provider); + ?> + + + + + + + + + + + + + + + + + + + + + + +
+ 목록 + +
= $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 +193,18 @@ else if ($w == 'u') {$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,77 +215,82 @@ if( $w == '' || $w == 'u' ){ } 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) { - @unlink($dest_path); - rename($mb_icon_dir.'/'.$thumb, $dest_path); + 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); } - } - 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) { - @unlink($dest_path); - rename($mb_img_dir.'/'.$thumb, $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); } - } - if( !$thumb ){ - // 아이콘의 폭 또는 높이가 설정값 보다 크다면 이미 업로드 된 아이콘 삭제 - @unlink($dest_path); } } } @@ -268,6 +298,10 @@ if( $w == '' || $w == 'u' ){ } } +if (function_exists('get_admin_captcha_by')) { + 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); \ 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 78ba3efd9..dc6348cdd 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 @@ $total_count = $row['cnt']; $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 @@ $sql = " select count(*) as cnt {$sql_common} {$sql_search} and mb_intercept_dat $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 @@ $colspan = 16; 총회원수 차단 - 탈퇴 + 탈퇴
- - - - - + + + + +
@@ -104,236 +107,243 @@ $colspan = 16;
- - - - - - + + + + + + -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - '.$row2['cnt'].''; - - if ($is_admin == 'group') { - $s_mod = ''; - } else { - $s_mod = '수정'; - } - $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']; - $leave_msg = ''; - $intercept_msg = ''; - $intercept_title = ''; - if ($row['mb_leave_date']) { - $mb_id = $mb_id; - $leave_msg = '탈퇴함'; - } - else if ($row['mb_intercept_date']) { - $mb_id = $mb_id; - $intercept_msg = '차단됨'; - $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; - } - ?> - - - - +
+ + + + 회원추가 + -
"; - ?> - -
목록
- - - 아이디본인확인메일인증정보공개메일수신상태휴대폰최종접속접근그룹관리
이름닉네임SMS수신성인인증접근차단권한전화번호가입일 포인트
- - - - - - '; - 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 ''; - echo ''; - echo ''.$provider_name.''; - echo ''; +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ' . $row2['cnt'] . ''; } - echo ''; + + if ($is_admin == 'group') { + $s_mod = ''; + } else { + $s_mod = '수정'; + } + $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']; + $leave_msg = ''; + $intercept_msg = ''; + $intercept_title = ''; + if ($row['mb_leave_date']) { + $mb_id = $mb_id; + $leave_msg = '탈퇴함'; + } elseif ($row['mb_intercept_date']) { + $mb_id = $mb_id; + $intercept_msg = '차단됨'; + $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; + } + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + if ($i == 0) { + echo ""; + } + ?> + +
목록
+ + + 아이디본인확인메일인증정보공개메일수신상태휴대폰최종접속접근그룹관리
이름닉네임SMS수신성인인증접근차단권한전화번호가입일 포인트
+ + + + + + '; + 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 ''; + echo ''; + echo '' . $provider_name . ''; + echo ''; + } + echo ''; + } + } + ?> + + > +
+ > +
+ > + +
Yes' : 'No'; ?> + + value="1" id="mb_open_"> + + + value="1" id="mb_mailling_"> + + +
+
+
+ + value="1" id="mb_sms_"> + + + value="1" id="mb_adult_"> + + + value="" id="mb_intercept_date_" title=""> + + + + +
- > -
- > -
- > - -
Yes':'No'; ?> - - value="1" id="mb_open_"> - - - value="1" id="mb_mailling_"> - - -
- - value="1" id="mb_sms_"> - - - value="1" id="mb_adult_"> - - - value="" id="mb_intercept_date_" title=""> - - - - -
자료가 없습니다.
+
-
자료가 없습니다.
-
- -
- - - - 회원추가 - - -
+
- + = $member['mb_level']) { + } elseif ($is_admin != "super" && $mb['mb_level'] >= $member['mb_level']) { $msg .= "{$mb['mb_id']} : 자신보다 권한이 높거나 같은 회원은 삭제할 수 없습니다.\\n"; } else { // 회원자료 삭제 @@ -30,7 +29,8 @@ for ($i=0; $i alert('$msg'); "; +} -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 82a2db6c3..5cb721e87 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 ($_POST['act_button'] == "선택수정") { } } -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 4c8c43473..ce10a176b 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 @@ if($sql) { -
- - - - - - - - - - - - - - + + + + + + + + + + + + + +
- - -
+ + +
diff --git a/adm/menu_list.php b/adm/menu_list.php index c9c77feec..0281c3259 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 @@ if(!sql_query(" DESCRIBE {$g5['menu_table']} ", false)) { `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 @@ $sub_menu_info = '';
- + - + if ($i == 0) { + echo '자료가 없습니다.'; + } + ?> + + + -
- - -
+
+ + +
'', -'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'); -?> - -
- - - - -
-

초기화면 접속 시 자동으로 뜰 팝업레이어를 설정합니다.

-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - -
- - -
- - 시간 -
- - " 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;"> - -
- - " 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;"> - -
- px -
- px -
- px -
- px -
- -
-
- -
- 목록 - -
-
- - - - '', + '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'; +?> + +
+ + + + +
+

초기화면 접속 시 자동으로 뜰 팝업레이어를 설정합니다.

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + +
+ + 시간 +
+ + " 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;"> + +
+ + " 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;"> + +
+ px +
+ px +
+ px +
+ px +
+ +
+
+ +
+ 목록 + +
+
+ + + +'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 81c25f94d..ff50a1fe7 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); -?> - -
전체
- - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - '; - } - ?> - -
목록
번호제목접속기기시작일시종료일시시간LeftTopWidthHeight관리
시간pxpxpxpx - 수정 - 삭제 -
자료가 한건도 없습니다.
-
- - -/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); +?> + +
전체
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + '; + } + ?> + +
목록
번호제목접속기기시작일시종료일시시간LeftTopWidthHeight관리
시간pxpxpxpx + 수정 + 삭제 +
자료가 한건도 없습니다.
+
+ + +전체목록'; +$listall = '전체목록'; $mb = array(); -if ($sfl == 'mb_id' && $stx) +if ($sfl == 'mb_id' && $stx) { $mb = get_member($stx); +} $g5['title'] = '포인트관리'; -include_once ('./admin.head.php'); +require_once './admin.head.php'; $colspan = 9; $po_expire_term = ''; -if($config['cf_point_term'] > 0) { +if ($config['cf_point_term'] > 0) { $po_expire_term = $config['cf_point_term']; } -if (strstr($sfl, "mb_id")) +if (strstr($sfl, "mb_id")) { $mb_id = $stx; -else +} else { $mb_id = ""; +} ?>
@@ -73,109 +78,110 @@ else 전체 ' . $mb['mb_id'] .' 님 포인트 합계 ' . number_format($mb['mb_point']) . '점'; + echo ' ' . $mb['mb_id'] . ' 님 포인트 합계 ' . number_format($mb['mb_point']) . '점'; } else { $row2 = sql_fetch(" select sum(po_point) as sum_point from {$g5['point_table']} "); - echo ' 전체 합계'.number_format($row2['sum_point']).'점 '; + echo ' 전체 합계' . number_format($row2['sum_point']) . '점 '; } ?>
- - - - - + + + + +
- - - - - - + + + + + + -
- - - - - - - - - - - - - - - - - +
목록
- - - 회원아이디이름닉네임포인트 내용포인트일시만료일포인트합
+ + + + + + + + + + + + + + + + '; + $link2 = ''; + } - $link1 = $link2 = ''; - if (!preg_match("/^\@/", $row['po_rel_table']) && $row['po_rel_table']) { - $link1 = ''; - $link2 = ''; - } + $expr = ''; + if ($row['po_expired'] == 1) { + $expr = ' txt_expired'; + } - $expr = ''; - if($row['po_expired'] == 1) - $expr = ' txt_expired'; + $bg = 'bg' . ($i % 2); + ?> - $bg = 'bg'.($i%2); - ?> + + + + + + + + + + + - - - - - - - - - - - + '; + } + ?> + +
목록
+ + + 회원아이디이름닉네임포인트 내용포인트일시만료일포인트합
+ + + + + +
+
+ + 만료 + +
- - - - -
- - 만료 - -
자료가 없습니다.
+
- if ($i == 0) - echo '자료가 없습니다.'; - ?> - - - - -
- -
+
+ +
@@ -185,67 +191,66 @@ else

개별회원 포인트 증감 설정

- - - - - - + + + + + + -
- - - - - - - - - - - - - - - - - - - 0) { ?> - - - - - - -
-
+
+ + + + + + + + + + + + + + + + + + + 0) { ?> + + + + + + +
+
-
- -
+
+ +
0) { + if ($row['po_use_point'] > 0) { insert_use_point($row['mb_id'], $row['po_use_point'], $row['po_id']); } } @@ -53,8 +55,8 @@ for ($i=0; $i<$count; $i++) // 포인트 UPDATE $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 = '{$str_mb_id}' "; sql_query($sql); } -goto_url('./point_list.php?'.$qstr); \ No newline at end of file +goto_url('./point_list.php?' . $qstr); diff --git a/adm/point_update.php b/adm/point_update.php index b560538dd..0d929b00d 100644 --- a/adm/point_update.php +++ b/adm/point_update.php @@ -1,24 +1,26 @@ $mb['mb_point'])) - alert('포인트를 깎는 경우 현재 포인트보다 작으면 안됩니다.', './point_list.php?'.$qstr); +if (($po_point < 0) && ($po_point * (-1) > $mb['mb_point'])) { + 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); \ No newline at end of file +goto_url('./point_list.php?' . $qstr); diff --git a/adm/poll_delete.php b/adm/poll_delete.php index 5827ca065..a4346f20d 100644 --- a/adm/poll_delete.php +++ b/adm/poll_delete.php @@ -1,6 +1,6 @@ '', -'po_etc'=>'', -'po_level'=>'', -'po_point'=>'', + 'po_subject' => '', + 'po_etc' => '', + 'po_level' => '', + 'po_point' => '', ); $html_title = '투표'; -if ($w == '') +if ($w == '') { $html_title .= ' 생성'; -else if ($w == 'u') { +} elseif ($w == 'u') { $html_title .= ' 수정'; $sql = " select * from {$g5['poll_table']} where po_id = '{$po_id}' "; $po = sql_fetch($sql); -} else +} else { alert('w 값이 제대로 넘어오지 않았습니다.'); +} $g5['title'] = $html_title; -include_once('./admin.head.php'); +require_once './admin.head.php'; ?>
- - - - - - - - + + + + + + + + -
+
- - - - - - - +
+ + + + + + - 필수'; - } + 필수'; + } - $po_poll = isset($po['po_poll'.$i]) ? get_text($po['po_poll'.$i]) : ''; - $po_cnt = isset($po['po_cnt'.$i]) ? get_text($po['po_cnt'.$i]) : 0; - ?> + $po_poll = isset($po['po_poll' . $i]) ? get_text($po['po_poll' . $i]) : ''; + $po_cnt = isset($po['po_cnt' . $i]) ? get_text($po['po_cnt' . $i]) : 0; + ?> - - - - + + + + - + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - - -
- class="frm_input " maxlength="125"> - - -
+ class="frm_input " maxlength="125"> + + +
- - -
- - 이상 투표할 수 있음 -
- - 점 -
+ + +
+ + 이상 투표할 수 있음 +
+ + 점 +
투표등록일
+ + + 투표등록일 + + + + + + + + + + + + + -
+
-
- 목록 - -
+
+ 목록 + +
$value ){ - if( empty($value) ) continue; +foreach ($_POST as $key => $value) { + if (empty($value)) { + continue; + } - if( in_array($key, $check_keys) ) { + if (in_array($key, $check_keys)) { $_POST[$key] = strip_tags(clean_xss_attributes($value)); } } -if ($w == '') -{ +$po_id = isset($_POST['po_id']) ? $_POST['po_id'] : ''; + +if ($w == '') { $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 ) - 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."' ) "; + 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); $po_id = sql_insert_id(); -} -else if ($w == 'u') -{ +} elseif ($w == 'u') { $sql = " update {$g5['poll_table']} set po_subject = '{$_POST['po_subject']}', po_poll1 = '{$_POST['po_poll1']}', @@ -80,9 +82,7 @@ else if ($w == 'u') po_point = '{$_POST['po_point']}' where po_id = '{$_POST['po_id']}' "; sql_query($sql); -} -else if ($w == 'd') -{ +} elseif ($w == 'd') { $sql = " delete from {$g5['poll_table']} where po_id = '{$_POST['po_id']}' "; sql_query($sql); @@ -96,7 +96,8 @@ else if ($w == 'd') $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']}' "); -if ($w == 'd') - goto_url('./poll_list.php?'.$qstr); -else - goto_url('./poll_form.php?w=u&po_id='.$po_id.'&'.$qstr); \ No newline at end of file +if ($w == 'd') { + goto_url('./poll_list.php?' . $qstr); +} else { + goto_url('./poll_form.php?w=u&po_id=' . $po_id . '&' . $qstr); +} diff --git a/adm/poll_list.php b/adm/poll_list.php index 8b719c314..383c7a4e7 100644 --- a/adm/poll_list.php +++ b/adm/poll_list.php @@ -1,6 +1,6 @@ 전체목록'; +$listall = '전체목록'; $g5['title'] = '투표관리'; -include_once('./admin.head.php'); +require_once './admin.head.php'; $colspan = 7; ?> @@ -56,102 +58,103 @@ $colspan = 7;
-
- - - - - -
+
+ + + + + +
- - - - - - + + + + + + -
- - - - - - - - - - - - - - - +
목록
- - - 번호제목투표권한투표수기타의견관리
+ + + + + + + + + + + + + + 수정'; + $s_mod = '수정'; - $bg = 'bg'.($i%2); - ?> + $bg = 'bg' . ($i % 2); + ?> - - - - - - - - - + + + + + + + + + - '; - ?> - -
목록
+ + + 번호제목투표권한투표수기타의견관리
- - -
+ + +
자료가 없습니다.
-
+ if ($i == 0) { + echo '자료가 없습니다.'; + } + ?> + + + - +
전체목록'; - -$g5['title'] = '인기검색어관리'; -include_once('./admin.head.php'); - -$colspan = 4; -?> - - - -
- - 건수 -
- -
-
- - - - - -
-
- -
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - '; - ?> - -
목록
- - - 검색어등록일등록IP
- - -
자료가 없습니다.
- -
- - -
- -
- - -
- - - - - -전체목록'; + +$g5['title'] = '인기검색어관리'; +require_once './admin.head.php'; + +$colspan = 4; +?> + + + +
+ + 건수 +
+ +
+
+ + + + + +
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + '; + } + ?> + +
목록
+ + + 검색어등록일등록IP
+ + +
자료가 없습니다.
+ +
+ + +
+ +
+ + +
+ + + + + + '' and pp_date between '{$fr_date}' and '{$to_date}' "; -$sql_group = " group by pp_word "; -$sql_order = " order by cnt desc "; - -$sql = " select pp_word {$sql_common} {$sql_search} {$sql_group} "; -$result = sql_query($sql); -$total_count = sql_num_rows($result); - -$rows = $config['cf_page_rows']; -$total_page = ceil($total_count / $rows); // 전체 페이지 계산 -if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지) -$from_record = ($page - 1) * $rows; // 시작 열을 구함 - -$sql = " select pp_word, count(*) as cnt {$sql_common} {$sql_search} {$sql_group} {$sql_order} limit {$from_record}, {$rows} "; -$result = sql_query($sql); - -$listall = '전체목록'; - -$g5['title'] = '인기검색어순위'; -include_once('./admin.head.php'); -include_once(G5_PLUGIN_PATH.'/jquery-ui/datepicker.php'); - -$colspan = 3; -?> - - - -
- - 건수 -
- -
-
- 기간별검색 - - - ~ - - - -
-
- -
- - - - - - - -
- - - - - - - - - - - - - - - - - - - '; - ?> - -
목록
순위검색어검색회수
자료가 없습니다.
-
- -
- - '' and pp_date between '{$fr_date}' and '{$to_date}' "; +$sql_group = " group by pp_word "; +$sql_order = " order by cnt desc "; + +$sql = " select pp_word {$sql_common} {$sql_search} {$sql_group} "; +$result = sql_query($sql); +$total_count = sql_num_rows($result); + +$rows = $config['cf_page_rows']; +$total_page = ceil($total_count / $rows); // 전체 페이지 계산 +if ($page < 1) { + $page = 1; +} // 페이지가 없으면 첫 페이지 (1 페이지) +$from_record = ($page - 1) * $rows; // 시작 열을 구함 + +$sql = " select pp_word, count(*) as cnt {$sql_common} {$sql_search} {$sql_group} {$sql_order} limit {$from_record}, {$rows} "; +$result = sql_query($sql); + +$listall = '전체목록'; + +$g5['title'] = '인기검색어순위'; +require_once './admin.head.php'; +require_once G5_PLUGIN_PATH . '/jquery-ui/datepicker.php'; + +$colspan = 3; +?> + + + +
+ + 건수 +
+ +
+
+ 기간별검색 + + + ~ + + + +
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + '; + } + ?> + +
목록
순위검색어검색회수
자료가 없습니다.
+
+ +
+ +
- + -
-

1:1문의 설정

+
+

1:1문의 설정

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1:1문의 설정
- - 1:1문의 바로가기 -
- - -
- -
- -
이메일 입력 - > - > -
휴대폰 입력 - > - > -
- SMS 알림을 사용하기 위해서는 기본환경설정 > SMS 설정을 하셔야 합니다.') ?> - -
- - -
- SMS 알림을 사용하지 않으시면 알림이 전송되지 않습니다.'); ?> - -
- - -
- - -
- - -
- - -
- -
- -
- - 픽셀 -
- - 업로드 파일 한개당 bytes 이하 -
- -
- -
+ +
+ +
+ +
+ +
+ +
여분필드 + + + + +
+
+
+ +
+
-
- -
- -
\'\"\\\'\\\"\%\=\(\)\/\^\*]/", "", $qa_category); +$qa_category = preg_replace("/[\<\>\'\"\\\'\\\"\%\=\(\)\/\^\*]/", "", (string)$qa_category); $sql = " update {$g5['qa_config_table']} set qa_title = '{$_POST['qa_title']}', @@ -108,11 +108,12 @@ $sql = " update {$g5['qa_config_table']} qa_5 = '{$_POST['qa_5']}' "; sql_query($sql); -if(function_exists('get_admin_captcha_by')) +if (function_exists('get_admin_captcha_by')) { get_admin_captcha_by('remove'); +} -if($error_msg){ +if ($error_msg) { alert($error_msg, './qa_config.php'); } else { goto_url('./qa_config.php'); -} \ No newline at end of file +} diff --git a/adm/safe_check.php b/adm/safe_check.php index 0143ddf55..30b77867b 100644 --- a/adm/safe_check.php +++ b/adm/safe_check.php @@ -1,16 +1,21 @@ $before_time) continue; + if ($before_time && $modification_time > $before_time) { + continue; + } unlink($social_log_file); } } -} \ No newline at end of file +} diff --git a/adm/shop_admin/admin.shop.lib.php b/adm/shop_admin/admin.shop.lib.php index 02225e029..4aa2ba405 100644 --- a/adm/shop_admin/admin.shop.lib.php +++ b/adm/shop_admin/admin.shop.lib.php @@ -72,7 +72,7 @@ function order_update_delivery($od_id, $mb_id, $change_status, $delivery) if($change_status != '배송') return; - $sql = " update {$g5['g5_shop_order_table']} set od_delivery_company = '{$delivery['delivery_company']}', od_invoice = '{$delivery['invoice']}', od_invoice_time = '{$delivery['invoice_time']}' where od_id = '$od_id' and od_status = '준비' "; + $sql = " update {$g5['g5_shop_order_table']} set od_delivery_company = '".sql_real_escape_string($delivery['delivery_company'])."', od_invoice = '".sql_real_escape_string($delivery['invoice'])."', od_invoice_time = '".sql_real_escape_string($delivery['invoice_time'])."' where od_id = '$od_id' and od_status = '준비' "; sql_query($sql); $sql = " select * from {$g5['g5_shop_cart_table']} where od_id = '$od_id' "; diff --git a/adm/shop_admin/categoryform.php b/adm/shop_admin/categoryform.php index 1950ec2c3..88d735792 100644 --- a/adm/shop_admin/categoryform.php +++ b/adm/shop_admin/categoryform.php @@ -49,7 +49,7 @@ if ($w == "") where SUBSTRING(ca_id,1,$len) = '$ca_id' "; $row = sql_fetch($sql); - $subid = base_convert($row['max_subid'], 36, 10); + $subid = base_convert((string)$row['max_subid'], 36, 10); $subid += 36; if ($subid >= 36 * 36) { diff --git a/adm/shop_admin/configformupdate.php b/adm/shop_admin/configformupdate.php index be2128bef..96e13d9e4 100644 --- a/adm/shop_admin/configformupdate.php +++ b/adm/shop_admin/configformupdate.php @@ -239,7 +239,11 @@ $check_sanitize_keys = array( ); foreach( $check_sanitize_keys as $key ){ - $$key = isset($_POST[$key]) ? clean_xss_tags($_POST[$key], 1, 1) : ''; + if( in_array($key, array('de_bank_account')) ){ + $$key = isset($_POST[$key]) ? clean_xss_tags($_POST[$key], 1, 1, 0, 0) : ''; + } else { + $$key = isset($_POST[$key]) ? clean_xss_tags($_POST[$key], 1, 1) : ''; + } } $warning_msg = ''; diff --git a/adm/shop_admin/couponformupdate.php b/adm/shop_admin/couponformupdate.php index f5ddb3fb2..9d63f6db8 100644 --- a/adm/shop_admin/couponformupdate.php +++ b/adm/shop_admin/couponformupdate.php @@ -139,7 +139,7 @@ if($w == '') { } // 쿠폰생성알림 발송 -if($w == '' && ($_POST['cp_sms_send'] || $_POST['cp_email_send'])) { +if ($w == '' && (isset($_POST['cp_sms_send']) || isset($_POST['cp_email_send']))) { include_once(G5_LIB_PATH.'/mailer.lib.php'); $sms_count = 0; diff --git a/adm/shop_admin/inorderformupdate.php b/adm/shop_admin/inorderformupdate.php index 5d902ffec..c9b986dfb 100644 --- a/adm/shop_admin/inorderformupdate.php +++ b/adm/shop_admin/inorderformupdate.php @@ -232,7 +232,7 @@ $od_b_addr1 = clean_xss_tags($data['od_b_addr1']); $od_b_addr2 = clean_xss_tags($data['od_b_addr2']); $od_b_addr3 = clean_xss_tags($data['od_b_addr3']); $od_b_addr_jibeon = preg_match("/^(N|R)$/", $data['od_b_addr_jibeon']) ? $data['od_b_addr_jibeon'] : ''; -$od_memo = clean_xss_tags($data['od_memo']); +$od_memo = clean_xss_tags($data['od_memo'], 0, 1, 0, 0); $od_deposit_name = clean_xss_tags($data['od_deposit_name']); $od_tax_flag = $default['de_tax_flag_use']; $od_receipt_price = $tot_ct_price + $od_send_cost + $od_send_cost2 - ($od_temp_point + $tot_cp_price + $tot_sc_cp_price); diff --git a/adm/shop_admin/itemexcelupdate.php b/adm/shop_admin/itemexcelupdate.php index 600da0237..773cb1a00 100644 --- a/adm/shop_admin/itemexcelupdate.php +++ b/adm/shop_admin/itemexcelupdate.php @@ -10,7 +10,7 @@ auth_check_menu($auth, $sub_menu, "w"); function only_number($n) { - return preg_replace('/[^0-9]/', '', $n); + return preg_replace('/[^0-9]/', '', (string)$n); } $is_upload_file = (isset($_FILES['excelfile']['tmp_name']) && $_FILES['excelfile']['tmp_name']) ? 1 : 0; @@ -50,44 +50,44 @@ if($is_upload_file) { $it_id = (string) $rowData[0][$j++]; $it_id = preg_match('/[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)/', $it_id) ? addslashes(sprintf("%.0f", $it_id)) : preg_replace('/[^0-9a-z_\-]/i', '', $it_id); $ca_id = addslashes($rowData[0][$j++]); - $ca_id2 = addslashes($rowData[0][$j++]); - $ca_id3 = addslashes($rowData[0][$j++]); + $ca_id2 = addslashes((string)$rowData[0][$j++]); + $ca_id3 = addslashes((string)$rowData[0][$j++]); $it_name = addslashes($rowData[0][$j++]); - $it_maker = addslashes($rowData[0][$j++]); - $it_origin = addslashes($rowData[0][$j++]); - $it_brand = addslashes($rowData[0][$j++]); - $it_model = addslashes($rowData[0][$j++]); - $it_type1 = addslashes($rowData[0][$j++]); - $it_type2 = addslashes($rowData[0][$j++]); - $it_type3 = addslashes($rowData[0][$j++]); - $it_type4 = addslashes($rowData[0][$j++]); - $it_type5 = addslashes($rowData[0][$j++]); - $it_basic = addslashes($rowData[0][$j++]); - $it_explan = addslashes($rowData[0][$j++]); - $it_mobile_explan = addslashes($rowData[0][$j++]); + $it_maker = addslashes((string)$rowData[0][$j++]); + $it_origin = addslashes((string)$rowData[0][$j++]); + $it_brand = addslashes((string)$rowData[0][$j++]); + $it_model = addslashes((string)$rowData[0][$j++]); + $it_type1 = addslashes((string)$rowData[0][$j++]); + $it_type2 = addslashes((string)$rowData[0][$j++]); + $it_type3 = addslashes((string)$rowData[0][$j++]); + $it_type4 = addslashes((string)$rowData[0][$j++]); + $it_type5 = addslashes((string)$rowData[0][$j++]); + $it_basic = addslashes((string)$rowData[0][$j++]); + $it_explan = addslashes((string)$rowData[0][$j++]); + $it_mobile_explan = addslashes((string)$rowData[0][$j++]); $it_cust_price = addslashes(only_number($rowData[0][$j++])); $it_price = addslashes(only_number($rowData[0][$j++])); - $it_tel_inq = addslashes($rowData[0][$j++]); + $it_tel_inq = addslashes((string)$rowData[0][$j++]); $it_point = addslashes(only_number($rowData[0][$j++])); $it_point_type = addslashes(only_number($rowData[0][$j++])); - $it_sell_email = addslashes($rowData[0][$j++]); - $it_use = addslashes($rowData[0][$j++]); + $it_sell_email = addslashes((string)$rowData[0][$j++]); + $it_use = addslashes((string)$rowData[0][$j++]); $it_stock_qty = addslashes(only_number($rowData[0][$j++])); $it_noti_qty = addslashes(only_number($rowData[0][$j++])); $it_buy_min_qty = addslashes(only_number($rowData[0][$j++])); $it_buy_max_qty = addslashes(only_number($rowData[0][$j++])); $it_notax = addslashes(only_number($rowData[0][$j++])); $it_order = addslashes(only_number($rowData[0][$j++])); - $it_img1 = addslashes($rowData[0][$j++]); - $it_img2 = addslashes($rowData[0][$j++]); - $it_img3 = addslashes($rowData[0][$j++]); - $it_img4 = addslashes($rowData[0][$j++]); - $it_img5 = addslashes($rowData[0][$j++]); - $it_img6 = addslashes($rowData[0][$j++]); - $it_img7 = addslashes($rowData[0][$j++]); - $it_img8 = addslashes($rowData[0][$j++]); - $it_img9 = addslashes($rowData[0][$j++]); - $it_img10 = addslashes($rowData[0][$j++]); + $it_img1 = addslashes((string)$rowData[0][$j++]); + $it_img2 = addslashes((string)$rowData[0][$j++]); + $it_img3 = addslashes((string)$rowData[0][$j++]); + $it_img4 = addslashes((string)$rowData[0][$j++]); + $it_img5 = addslashes((string)$rowData[0][$j++]); + $it_img6 = addslashes((string)$rowData[0][$j++]); + $it_img7 = addslashes((string)$rowData[0][$j++]); + $it_img8 = addslashes((string)$rowData[0][$j++]); + $it_img9 = addslashes((string)$rowData[0][$j++]); + $it_img10 = addslashes((string)$rowData[0][$j++]); $it_explan2 = strip_tags(trim($it_explan)); if(!$it_id || !$ca_id || !$it_name) { diff --git a/adm/shop_admin/itemformupdate.php b/adm/shop_admin/itemformupdate.php index 73e4c790a..ccd16943c 100644 --- a/adm/shop_admin/itemformupdate.php +++ b/adm/shop_admin/itemformupdate.php @@ -476,13 +476,13 @@ if ($w == "" || $w == "u") { $sql = " insert into {$g5['g5_shop_item_relation_table']} set it_id = '$it_id', - it_id2 = '$it_id2[$i]', + it_id2 = '".sql_real_escape_string($it_id2[$i])."', ir_no = '$i' "; sql_query($sql, false); // 관련상품의 반대로도 등록 $sql = " insert into {$g5['g5_shop_item_relation_table']} - set it_id = '$it_id2[$i]', + set it_id = '".sql_real_escape_string($it_id2[$i])."', it_id2 = '$it_id', ir_no = '$i' "; sql_query($sql, false); @@ -496,7 +496,7 @@ if ($w == "" || $w == "u") if (trim($ev_id[$i])) { $sql = " insert into {$g5['g5_shop_event_item_table']} - set ev_id = '$ev_id[$i]', + set ev_id = '".sql_real_escape_string($ev_id[$i])."', it_id = '$it_id' "; sql_query($sql, false); } @@ -510,7 +510,7 @@ if($option_count) { ( `io_id`, `io_type`, `it_id`, `io_price`, `io_stock_qty`, `io_noti_qty`, `io_use` ) VALUES "; for($i=0; $i<$option_count; $i++) { - $sql .= $comma . " ( '{$_POST['opt_id'][$i]}', '0', '$it_id', '{$_POST['opt_price'][$i]}', '{$_POST['opt_stock_qty'][$i]}', '{$_POST['opt_noti_qty'][$i]}', '{$_POST['opt_use'][$i]}' )"; + $sql .= $comma . " ( '".sql_real_escape_string($_POST['opt_id'][$i])."', '0', '$it_id', '".sql_real_escape_string($_POST['opt_price'][$i])."', '".sql_real_escape_string($_POST['opt_stock_qty'][$i])."', '".sql_real_escape_string($_POST['opt_noti_qty'][$i])."', '".sql_real_escape_string($_POST['opt_use'][$i])."' )"; $comma = ' , '; } @@ -524,7 +524,7 @@ if($supply_count) { ( `io_id`, `io_type`, `it_id`, `io_price`, `io_stock_qty`, `io_noti_qty`, `io_use` ) VALUES "; for($i=0; $i<$supply_count; $i++) { - $sql .= $comma . " ( '{$_POST['spl_id'][$i]}', '1', '$it_id', '{$_POST['spl_price'][$i]}', '{$_POST['spl_stock_qty'][$i]}', '{$_POST['spl_noti_qty'][$i]}', '{$_POST['spl_use'][$i]}' )"; + $sql .= $comma . " ( '".sql_real_escape_string($_POST['spl_id'][$i])."', '1', '$it_id', '".sql_real_escape_string($_POST['spl_price'][$i])."', '".sql_real_escape_string($_POST['spl_stock_qty'][$i])."', '".sql_real_escape_string($_POST['spl_noti_qty'][$i])."', '".sql_real_escape_string($_POST['spl_use'][$i])."' )"; $comma = ' , '; } diff --git a/adm/shop_admin/itemlistupdate.php b/adm/shop_admin/itemlistupdate.php index 720a4979a..0bb4d393b 100644 --- a/adm/shop_admin/itemlistupdate.php +++ b/adm/shop_admin/itemlistupdate.php @@ -35,8 +35,8 @@ if ($post_act_button == "선택수정") { $p_it_stock_qty = (isset($_POST['it_stock_qty']) && is_array($_POST['it_stock_qty'])) ? strip_tags($_POST['it_stock_qty'][$k]) : ''; $p_it_skin = (isset($_POST['it_skin']) && is_array($_POST['it_skin'])) ? strip_tags($_POST['it_skin'][$k]) : ''; $p_it_mobile_skin = (isset($_POST['it_mobile_skin']) && is_array($_POST['it_mobile_skin'])) ? strip_tags($_POST['it_mobile_skin'][$k]) : ''; - $p_it_use = (isset($_POST['it_use']) && is_array($_POST['it_use'])) ? strip_tags($_POST['it_use'][$k]) : ''; - $p_it_soldout = (isset($_POST['it_soldout']) && is_array($_POST['it_soldout'])) ? strip_tags($_POST['it_soldout'][$k]) : ''; + $p_it_use = isset($_POST['it_use'][$k]) ? clean_xss_tags($_POST['it_use'][$k], 1, 1) : 0; + $p_it_soldout = isset($_POST['it_soldout'][$k]) ? clean_xss_tags($_POST['it_soldout'][$k], 1, 1) : 0; $p_it_order = (isset($_POST['it_order']) && is_array($_POST['it_order'])) ? strip_tags($_POST['it_order'][$k]) : ''; $p_it_id = isset($_POST['it_id'][$k]) ? preg_replace('/[^a-z0-9_\-]/i', '', $_POST['it_id'][$k]) : ''; diff --git a/adm/shop_admin/itemstocklist.php b/adm/shop_admin/itemstocklist.php index bd2b5519d..314192d85 100644 --- a/adm/shop_admin/itemstocklist.php +++ b/adm/shop_admin/itemstocklist.php @@ -171,9 +171,9 @@ $listall = '전체목 - - - + + + diff --git a/adm/shop_admin/itemsupply.php b/adm/shop_admin/itemsupply.php index 7abd56334..389c2bf62 100644 --- a/adm/shop_admin/itemsupply.php +++ b/adm/shop_admin/itemsupply.php @@ -85,7 +85,7 @@ if($ps_run) { } // for } else { for($i=0; $i<$subject_count; $i++) { - $spl_subject = isset($_POST['subject'][$i]) ? preg_replace(G5_OPTION_ID_FILTER, '', trim(stripslashes($_POST['subject'][$i]))) : ''; + $spl_subject = isset($_POST['subject'][$i]) ? preg_replace(G5_OPTION_ID_FILTER, '', strip_tags(trim(stripslashes($_POST['subject'][$i])))) : ''; $spl_val = isset($_POST['supply'][$i]) ? explode(',', preg_replace(G5_OPTION_ID_FILTER, '', trim(stripslashes($_POST['supply'][$i])))) : ''; $spl_count = count($spl_val); @@ -103,7 +103,7 @@ if($ps_run) { $sql = " select io_price, io_stock_qty, io_noti_qty, io_use from {$g5['g5_shop_item_option_table']} where it_id = '{$post_it_id}' - and io_id = '$spl_id' + and io_id = '".sql_real_escape_string($spl_id)."' and io_type = '1' "; $row = sql_fetch($sql); @@ -117,11 +117,11 @@ if($ps_run) { ?> - - + + - + diff --git a/adm/shop_admin/orderdeliveryexcel.php b/adm/shop_admin/orderdeliveryexcel.php index dcb3d37a4..fc86ed4f2 100644 --- a/adm/shop_admin/orderdeliveryexcel.php +++ b/adm/shop_admin/orderdeliveryexcel.php @@ -21,7 +21,6 @@ if(! function_exists('column_char')) { } } -if (phpversion() >= '5.2.0') { include_once(G5_LIB_PATH.'/PHPExcel.php'); $headers = array('주문번호', '주문자명', '주문자전화1', '주문자전화2', '배송자명', '배송지전화1', '배송지전화2', '배송지주소', '배송회사', '운송장번호'); @@ -47,7 +46,7 @@ if (phpversion() >= '5.2.0') { $data = array_merge(array($headers), $rows); $excel = new PHPExcel(); - $excel->setActiveSheetIndex(0)->getStyle( "A1:${last_char}1" )->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID)->getStartColor()->setARGB($header_bgcolor); + $excel->setActiveSheetIndex(0)->getStyle( "A1:{$last_char}1" )->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID)->getStartColor()->setARGB($header_bgcolor); $excel->setActiveSheetIndex(0)->getStyle( "A:$last_char" )->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER)->setWrapText(true); foreach($widths as $i => $w) $excel->setActiveSheetIndex(0)->getColumnDimension( column_char($i) )->setWidth($w); $excel->getActiveSheet()->fromArray($data,NULL,'A1'); @@ -58,47 +57,3 @@ if (phpversion() >= '5.2.0') { $writer = PHPExcel_IOFactory::createWriter($excel, 'Excel5'); $writer->save('php://output'); -} else { - /*================================================================================ - php_writeexcel http://www.bettina-attack.de/jonny/view.php/projects/php_writeexcel/ - =================================================================================*/ - - include_once(G5_LIB_PATH.'/Excel/php_writeexcel/class.writeexcel_workbook.inc.php'); - include_once(G5_LIB_PATH.'/Excel/php_writeexcel/class.writeexcel_worksheet.inc.php'); - - $fname = tempnam(G5_DATA_PATH, "tmp-deliverylist.xls"); - $workbook = new writeexcel_workbook($fname); - $worksheet = $workbook->addworksheet(); - - // Put Excel data - $data = array('주문번호', '주문자명', '주문자전화1', '주문자전화2', '배송자명', '배송지전화1', '배송지전화2', '배송지주소', '배송회사', '운송장번호'); - $data = array_map('iconv_euckr', $data); - - $col = 0; - foreach($data as $cell) { - $worksheet->write(0, $col++, $cell); - } - - for($i=1; $row=sql_fetch_array($result); $i++) { - $row = array_map('iconv_euckr', $row); - - $worksheet->write($i, 0, ' '.$row['od_id']); - $worksheet->write($i, 1, $row['od_name']); - $worksheet->write($i, 2, ' '.$row['od_tel']); - $worksheet->write($i, 3, ' '.$row['od_hp']); - $worksheet->write($i, 4, $row['od_b_name']); - $worksheet->write($i, 5, ' '.$row['od_b_tel']); - $worksheet->write($i, 6, ' '.$row['od_b_hp']); - $worksheet->write($i, 7, print_address($row['od_b_addr1'], $row['od_b_addr2'], $row['od_b_addr3'], $row['od_b_addr_jibeon'])); - $worksheet->write($i, 8, $row['od_delivery_company']); - $worksheet->write($i, 9, $row['od_invoice']); - } - - $workbook->close(); - - header("Content-Type: application/x-msexcel; name=\"deliverylist-".date("ymd", time()).".xls\""); - header("Content-Disposition: inline; filename=\"deliverylist-".date("ymd", time()).".xls\""); - $fh=fopen($fname, "rb"); - fpassthru($fh); - unlink($fname); -} \ No newline at end of file diff --git a/adm/shop_admin/orderprintresult.php b/adm/shop_admin/orderprintresult.php index 906eac729..8636e5ec2 100644 --- a/adm/shop_admin/orderprintresult.php +++ b/adm/shop_admin/orderprintresult.php @@ -168,7 +168,6 @@ if ($csv == 'xls') if (!$cnt) alert("출력할 내역이 없습니다."); - if (phpversion() >= '5.2.0') { include_once(G5_LIB_PATH.'/PHPExcel.php'); $headers = array('우편번호', '주소', '이름', '전화1', '전화2', '상품명', '수량', '선택사항', '배송비', '상품코드', '주문번호', '운송장번호', '전하실말씀'); @@ -235,7 +234,7 @@ if ($csv == 'xls') $data = array_merge(array($headers), $rows); $excel = new PHPExcel(); - $excel->setActiveSheetIndex(0)->getStyle( "A1:${last_char}1" )->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID)->getStartColor()->setARGB($header_bgcolor); + $excel->setActiveSheetIndex(0)->getStyle( "A1:{$last_char}1" )->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID)->getStartColor()->setARGB($header_bgcolor); $excel->setActiveSheetIndex(0)->getStyle( "A:$last_char" )->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER)->setWrapText(true); foreach($widths as $i => $w) $excel->setActiveSheetIndex(0)->getColumnDimension( column_char($i) )->setWidth($w); $excel->getActiveSheet()->fromArray($data,NULL,'A1'); @@ -246,95 +245,6 @@ if ($csv == 'xls') $writer = PHPExcel_IOFactory::createWriter($excel, 'Excel5'); $writer->save('php://output'); - - } else { - /*================================================================================ - php_writeexcel http://www.bettina-attack.de/jonny/view.php/projects/php_writeexcel/ - =================================================================================*/ - - include_once(G5_LIB_PATH.'/Excel/php_writeexcel/class.writeexcel_workbook.inc.php'); - include_once(G5_LIB_PATH.'/Excel/php_writeexcel/class.writeexcel_worksheet.inc.php'); - - $fname = tempnam(G5_DATA_PATH, "tmp-orderlist.xls"); - $workbook = new writeexcel_workbook($fname); - $worksheet = $workbook->addworksheet(); - - // Put Excel data - $data = array('우편번호', '주소', '이름', '전화1', '전화2', '상품명', '수량', '선택사항', '배송비', '상품코드', '주문번호', '운송장번호', '전하실말씀'); - $data = array_map('iconv_euckr', $data); - - $col = 0; - foreach($data as $cell) { - $worksheet->write(0, $col++, $cell); - } - - $save_it_id = ''; - for($i=1; $row=sql_fetch_array($result); $i++) - { - if($save_it_id != $row['it_id']) { - // 합계금액 계산 - $sql = " select SUM(IF(io_type = 1, (io_price * ct_qty), ((ct_price + io_price) * ct_qty))) as price, - SUM(ct_qty) as qty - from {$g5['g5_shop_cart_table']} - where it_id = '{$row['it_id']}' - and od_id = '{$row['od_id']}' "; - $sum = sql_fetch($sql); - - switch($row['ct_send_cost']) - { - case 1: - $ct_send_cost = '착불'; - break; - case 2: - $ct_send_cost = '무료'; - break; - default: - $ct_send_cost = '선불'; - break; - } - - // 조건부무료 - if($row['it_sc_type'] == 2) { - $sendcost = get_item_sendcost($row['it_id'], $sum['price'], $sum['qty'], $row['od_id']); - - if($sendcost == 0) - $ct_send_cost = '무료'; - } - - $save_it_id = $row['it_id']; - - $ct_send_cost = iconv_euckr($ct_send_cost); - } - - $pull_address = iconv('UTF-8', 'UHC', print_address($row['od_b_addr1'], $row['od_b_addr2'], $row['od_b_addr3'], $row['od_b_addr_jibeon'])); - - $row = array_map('iconv_euckr', $row); - - $worksheet->write($i, 0, ' '.$row['od_b_zip1'].$row['od_b_zip2']); - $worksheet->write($i, 1, $pull_address); - $worksheet->write($i, 2, $row['od_b_name']); - $worksheet->write($i, 3, ' '.$row['od_b_tel']); - $worksheet->write($i, 4, ' '.$row['od_b_hp']); - $worksheet->write($i, 5, $row['it_name']); - $worksheet->write($i, 6, $row['ct_qty']); - $worksheet->write($i, 7, $row['ct_option']); - $worksheet->write($i, 8, $ct_send_cost); - $worksheet->write($i, 9, ' '.$row['it_id']); - $worksheet->write($i, 10, ' '.$row['od_id']); - $worksheet->write($i, 11, $row['od_invoice']); - $worksheet->write($i, 12, $row['od_memo']); - } - - $workbook->close(); - - header("Content-Type: application/x-msexcel; name=\"orderlist-".date("ymd", time()).".xls\""); - header("Content-Disposition: inline; filename=\"orderlist-".date("ymd", time()).".xls\""); - $fh=fopen($fname, "rb"); - fpassthru($fh); - unlink($fname); - - exit; - } //end if php 5.2.0 } diff --git a/adm/sms_admin/num_book_file_download.php b/adm/sms_admin/num_book_file_download.php index 55d8e6f0d..5f5e875ea 100644 --- a/adm/sms_admin/num_book_file_download.php +++ b/adm/sms_admin/num_book_file_download.php @@ -51,7 +51,7 @@ for($i=1; $res=sql_fetch_array($qry); $i++) $data = array_merge(array($headers), $rows); -$excel->setActiveSheetIndex(0)->getStyle( "A1:${last_char}1" )->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID)->getStartColor()->setARGB($header_bgcolor); +$excel->setActiveSheetIndex(0)->getStyle( "A1:{$last_char}1" )->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID)->getStartColor()->setARGB($header_bgcolor); $excel->setActiveSheetIndex(0)->getStyle( "A:$last_char" )->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER)->setWrapText(true); foreach($widths as $i => $w) $excel->setActiveSheetIndex(0)->getColumnDimension( column_char($i) )->setWidth($w); $excel->getActiveSheet()->fromArray($data,NULL,'A1'); diff --git a/adm/sms_admin/num_book_file_upload.php b/adm/sms_admin/num_book_file_upload.php index 0c07d9ea9..bcc8f8665 100644 --- a/adm/sms_admin/num_book_file_upload.php +++ b/adm/sms_admin/num_book_file_upload.php @@ -74,13 +74,13 @@ for ($i = 1; $i <= $num_rows; $i++) { switch ($ext) { case '.csv' : - $name = $csv[$i][0]; + $name = isset($csv[$i][0]) ? $csv[$i][0] : ''; $str_encode = @mb_detect_encoding($name, $encode); if( $str_encode == "EUC-KR" ){ $name = iconv_utf8( $name ); } $name = addslashes($name); - $hp = addslashes($csv[$i][1]); + $hp = addslashes(isset($csv[$i][1]) ? $csv[$i][1] : ''); break; case '.xls' : case '.xlsx' : diff --git a/adm/sms_admin/number_move_update.php b/adm/sms_admin/number_move_update.php index f1925645f..b64a1459e 100644 --- a/adm/sms_admin/number_move_update.php +++ b/adm/sms_admin/number_move_update.php @@ -1,4 +1,5 @@ $token))); \ No newline at end of file +die(json_encode(array('token'=>$token))); diff --git a/bbs/ajax.write.token.php b/bbs/ajax.write.token.php index bc7b41dcc..1fe7b8df2 100644 --- a/bbs/ajax.write.token.php +++ b/bbs/ajax.write.token.php @@ -1,11 +1,10 @@ -'', 'token'=>$token, 'url'=>''))); -} \ No newline at end of file +'', 'token'=>$token, 'url'=>''))); +} diff --git a/bbs/board.php b/bbs/board.php index dd47af947..afde89782 100644 --- a/bbs/board.php +++ b/bbs/board.php @@ -21,7 +21,7 @@ $g5['board_title'] = ((G5_IS_MOBILE && $board['bo_mobile_subject']) ? $board['bo // wr_id 값이 있으면 글읽기 if ((isset($wr_id) && $wr_id) || (isset($wr_seo_title) && $wr_seo_title)) { // 글이 없을 경우 해당 게시판 목록으로 이동 - if (!$write['wr_id']) { + if (!isset($write['wr_id'])) { $msg = '글이 존재하지 않습니다.\\n\\n글이 삭제되었거나 이동된 경우입니다.'; alert($msg, get_pretty_url($bo_table)); } @@ -234,4 +234,4 @@ include_once(G5_BBS_PATH.'/board_tail.php'); echo "\n\n"; -include_once(G5_PATH.'/tail.sub.php'); \ No newline at end of file +include_once(G5_PATH.'/tail.sub.php'); diff --git a/bbs/memo_form.php b/bbs/memo_form.php index 0033301d5..02848e129 100644 --- a/bbs/memo_form.php +++ b/bbs/memo_form.php @@ -2,11 +2,15 @@ include_once('./_common.php'); include_once(G5_CAPTCHA_PATH.'/captcha.lib.php'); -if ($is_guest) +if ($is_guest) { alert_close('회원만 이용하실 수 있습니다.'); +} -if (!$member['mb_open'] && $is_admin != 'super' && $member['mb_id'] != $mb_id) +$mb_id = isset($mb_id) ? get_search_string($mb_id) : ''; + +if (!$member['mb_open'] && $is_admin != 'super' && $member['mb_id'] != $mb_id) { alert_close("자신의 정보를 공개하지 않으면 다른분에게 쪽지를 보낼 수 없습니다. 정보공개 설정은 회원정보수정에서 하실 수 있습니다."); +} $content = ""; $me_recv_mb_id = isset($_REQUEST['me_recv_mb_id']) ? clean_xss_tags($_REQUEST['me_recv_mb_id'], 1, 1) : ''; diff --git a/bbs/password.php b/bbs/password.php index 31e807881..9329b45a0 100644 --- a/bbs/password.php +++ b/bbs/password.php @@ -49,13 +49,15 @@ include_once(G5_PATH.'/head.sub.php'); //if ($board['bo_content_head']) { echo html_purifier(stripslashes($board['bo_content_head'])); } /* 비밀글의 제목을 가져옴 지운아빠 2013-01-29 */ -$sql = " select wr_subject from {$write_table} - where wr_num = '{$write['wr_num']}' - and wr_reply = '' - and wr_is_comment = 0 "; -$row = sql_fetch($sql); +if (isset($write['wr_num'])) { + $sql = " select wr_subject from {$write_table} + where wr_num = '{$write['wr_num']}' + and wr_reply = '' + and wr_is_comment = 0 "; + $row = sql_fetch($sql); -$g5['title'] = get_text($row['wr_subject']); + $g5['title'] = get_text((string)$row['wr_subject']); +} include_once($member_skin_path.'/password.skin.php'); diff --git a/bbs/password_lost2.php b/bbs/password_lost2.php index 9f8ec56da..912ada60b 100644 --- a/bbs/password_lost2.php +++ b/bbs/password_lost2.php @@ -23,10 +23,11 @@ if ($row['cnt'] > 1) $sql = " select mb_no, mb_id, mb_name, mb_nick, mb_email, mb_datetime, mb_leave_date from {$g5['member_table']} where mb_email = '$email' "; $mb = sql_fetch($sql); -if (!$mb['mb_id'] || $mb['mb_leave_date']) +if (empty($mb['mb_id']) || $mb['mb_leave_date']) { alert('존재하지 않는 회원입니다.'); -else if (is_admin($mb['mb_id'])) +} elseif (is_admin($mb['mb_id'])) { alert('관리자 아이디는 접근 불가합니다.'); +} // 임시비밀번호 발급 $change_password = rand(100000, 999999); diff --git a/bbs/password_reset.php b/bbs/password_reset.php index 088d734db..6600f3d4d 100644 --- a/bbs/password_reset.php +++ b/bbs/password_reset.php @@ -4,7 +4,8 @@ include_once('./_common.php'); if ($is_member) { alert("이미 로그인중입니다."); goto_url(G5_URL); } -if(!$_POST['mb_id']) { alert("잘못된 접근입니다."); goto_url(G5_URL); } +$ss_cert_mb_id = isset($_SESSION['ss_cert_mb_id']) ? trim(get_session('ss_cert_mb_id')) : ''; +if(!(isset($_POST['mb_id']) && $_POST['mb_id'] === $ss_cert_mb_id)) { alert("잘못된 접근입니다."); goto_url(G5_URL); } if($config['cf_cert_find'] != 1) alert("본인인증을 이용하여 아이디/비밀번호 찾기를 할 수 없습니다. 관리자에게 문의 하십시오."); diff --git a/bbs/register_form_update.php b/bbs/register_form_update.php index 0cfbaddf5..805803aa5 100644 --- a/bbs/register_form_update.php +++ b/bbs/register_form_update.php @@ -52,6 +52,7 @@ $mb_profile = isset($_POST['mb_profile']) ? trim($_POST['mb_profile']) $mb_recommend = isset($_POST['mb_recommend']) ? trim($_POST['mb_recommend']) : ""; $mb_mailling = isset($_POST['mb_mailling']) ? trim($_POST['mb_mailling']) : ""; $mb_sms = isset($_POST['mb_sms']) ? trim($_POST['mb_sms']) : ""; +$mb_open = isset($_POST['mb_open']) ? trim($_POST['mb_open']) : "0"; $mb_1 = isset($_POST['mb_1']) ? trim($_POST['mb_1']) : ""; $mb_2 = isset($_POST['mb_2']) ? trim($_POST['mb_2']) : ""; $mb_3 = isset($_POST['mb_3']) ? trim($_POST['mb_3']) : ""; diff --git a/bbs/write.php b/bbs/write.php index f547d4789..2192934ca 100644 --- a/bbs/write.php +++ b/bbs/write.php @@ -347,7 +347,7 @@ if ($w == '') { for($i=0;$i<$file_count;$i++){ if(! isset($file[$i])) { - $file[$i] = array('file'=>null, 'source'=>null, 'size'=>null); + $file[$i] = array('file'=>null, 'source'=>null, 'size'=>null, 'bf_content' => null); } } @@ -442,4 +442,4 @@ include_once ($board_skin_path.'/write.skin.php'); include_once('./board_tail.php'); @include_once ($board_skin_path.'/write.tail.skin.php'); -include_once(G5_PATH.'/tail.sub.php'); \ No newline at end of file +include_once(G5_PATH.'/tail.sub.php'); diff --git a/bbs/write_token.php b/bbs/write_token.php index b14245b5d..e7c9520b1 100644 --- a/bbs/write_token.php +++ b/bbs/write_token.php @@ -1,6 +1,5 @@ '게시판 정보가 올바르지 않습니다.', 'url'=>G5_URL))); @@ -9,4 +8,4 @@ set_session('ss_write_'.$bo_table.'_token', ''); $token = get_write_token($bo_table); -die(json_encode(array('error'=>'', 'token'=>$token, 'url'=>''))); \ No newline at end of file +die(json_encode(array('error'=>'', 'token'=>$token, 'url'=>''))); diff --git a/common.php b/common.php index 6f2b363ed..84f71e8df 100644 --- a/common.php +++ b/common.php @@ -516,7 +516,10 @@ if (isset($_SESSION['ss_mb_id']) && $_SESSION['ss_mb_id']) { // 로그인중이 $member = get_member($_SESSION['ss_mb_id']); // 차단된 회원이면 ss_mb_id 초기화, 또는 세션에 저장된 회원 토큰값을 비교하여 틀리면 초기화 - if( ($member['mb_intercept_date'] && $member['mb_intercept_date'] <= date("Ymd", G5_SERVER_TIME)) || (function_exists('check_auth_session_token') && !check_auth_session_token($member['mb_datetime'])) ) { + if( ($member['mb_intercept_date'] && $member['mb_intercept_date'] <= date("Ymd", G5_SERVER_TIME)) + || ($member['mb_leave_date'] && $member['mb_leave_date'] <= date("Ymd", G5_SERVER_TIME)) + || (function_exists('check_auth_session_token') && !check_auth_session_token($member['mb_datetime'])) + ) { set_session('ss_mb_id', ''); $member = array(); } else { diff --git a/config.php b/config.php index d8d72a5c3..f9185f64d 100644 --- a/config.php +++ b/config.php @@ -21,19 +21,23 @@ date_default_timezone_set("Asia/Seoul"); 회원가입, 글쓰기에 사용되는 https 로 시작되는 주소를 말합니다. 포트가 있다면 도메인 뒤에 :443 과 같이 입력하세요. 보안서버주소가 없다면 공란으로 두시면 되며 보안서버주소 뒤에 / 는 붙이지 않습니다. -입력예) https://www.domain.com:443/gnuboard5 +입력 예) https://www.domain.com:443/gnuboard5 */ define('G5_DOMAIN', ''); define('G5_HTTPS_DOMAIN', ''); -// 디버깅 상수, 실제 서버운영시 false 로 설정해 주세요. +// 그누보드 디버그바 설정입니다, 실제 서버운영시 false 로 설정해 주세요. define('G5_DEBUG', false); -// Set Databse table default engine is Databse default_storage_engine, If you want to use MyISAM or InnoDB, change to MyISAM or InnoDB. +// Set Database table default engine is Database default_storage_engine, If you want to use MyISAM or InnoDB, change to MyISAM or InnoDB. +// DB에 테이블 생성 시 테이블의 기본 스토리지 엔진을 설정할 수 있습니다. +// InnoDB 또는 MyISAM 으로 설정 가능합니다. +// 빈값으로 두면 DB 버전이나 호스팅사 정책의 기본값에 따라 설정됩니다. define('G5_DB_ENGINE', ''); -// Set Databse table default Charset -// utf8, utf8mb4 등 지정 가능 기본값은 utf8, 설치전에 utf8mb4 으로 수정시 모든 테이블에 이모지 입력이 가능합니다. utf8mb4 는 mysql 또는 mariadb 5.5 버전 이상을 요구합니다. +// Set Database table default Charset +// utf8, utf8mb4 등 지정 가능 기본값은 utf8, 설치전에 utf8mb4 으로 수정 시 모든 테이블에 이모지 입력이 가능합니다. +// utf8mb4 인코딩은 MySQL 또는 MariaDB 5.5 버전 이상을 요구합니다. define('G5_DB_CHARSET', 'utf8'); /* @@ -71,7 +75,7 @@ define('G5_THEME_DIR', 'theme'); define('G5_GROUP_DIR', 'group'); define('G5_CONTENT_DIR', 'content'); -// URL 은 브라우저상에서의 경로 (도메인으로 부터의) +// URL 은 브라우저상에서의 경로 (도메인으로 부터) if (G5_DOMAIN) { define('G5_URL', G5_DOMAIN); } else { @@ -188,8 +192,8 @@ define('G5_STRING_ENCRYPT_FUNCTION', 'create_hash'); define('G5_MYSQL_PASSWORD_LENGTH', 41); // mysql password length 41, old_password 의 경우에는 16 // SQL 에러를 표시할 것인지 지정 -// 에러를 표시하려면 TRUE 로 변경 -define('G5_DISPLAY_SQL_ERROR', FALSE); +// 에러를 표시하려면 true 로 변경 +define('G5_DISPLAY_SQL_ERROR', false); // escape string 처리 함수 지정 // addslashes 로 변경 가능 diff --git a/install/ajax.install.check.php b/install/ajax.install.check.php index 8bd7306e0..11d8a6264 100644 --- a/install/ajax.install.check.php +++ b/install/ajax.install.check.php @@ -1,12 +1,10 @@ num_rows > 0; // 그누보드5 재설치에 체크하였거나 그누보드5가 설치되어 있지 않다면 -if($g5_install || !$result) { +if ($g5_install || $is_install === false) { // 테이블 생성 ------------------------------------ $file = implode('', file('./gnuboard5.sql')); eval("\$file = \"$file\";"); @@ -107,10 +106,11 @@ if($g5_install || !$result) { $file = preg_replace('/`g5_([^`]+`)/', '`'.$table_prefix.'$1', $file); $f = explode(';', $file); for ($i=0; $i_packExtRef($ext_ref); @@ -723,7 +723,7 @@ function _convertRange3d($token) } // Split the range into 2 cell refs - list($cell1, $cell2) = split(':', $range); + list($cell1, $cell2) = explode(':', $range); // Convert the cell references if (preg_match('/^(\$)?[A-Ia-i]?[A-Za-z](\$)?(\d+)$/', $cell1)) @@ -812,7 +812,7 @@ function _convertRef3d($cell) $class = 2; // as far as I know, this is magick. // Split the ref at the ! symbol - list($ext_ref, $cell) = split('!', $cell); + list($ext_ref, $cell) = explode('!', $cell); // Convert the external reference part $ext_ref = $this->_packExtRef($ext_ref); @@ -853,7 +853,7 @@ function _packExtRef($ext_ref) { // Check if there is a sheet range eg., Sheet1:Sheet2. if (preg_match("/:/", $ext_ref)) { - list($sheet_name1, $sheet_name2) = split(':', $ext_ref); + list($sheet_name1, $sheet_name2) = explode(':', $ext_ref); $sheet1 = $this->_getSheetIndex($sheet_name1); if ($sheet1 == -1) { diff --git a/lib/PHPExcel/Calculation/DateTime.php b/lib/PHPExcel/Calculation/DateTime.php index 72f4c7a23..76d471b29 100644 --- a/lib/PHPExcel/Calculation/DateTime.php +++ b/lib/PHPExcel/Calculation/DateTime.php @@ -534,7 +534,7 @@ class PHPExcel_Calculation_DateTime if ($testVal2 !== false) { $testVal3 = strtok('- '); if ($testVal3 === false) { - $testVal3 = strftime('%Y'); + $testVal3 = date('Y'); } } else { return PHPExcel_Calculation_Functions::VALUE(); @@ -554,16 +554,16 @@ class PHPExcel_Calculation_DateTime if (($PHPDateArray !== false) && ($PHPDateArray['error_count'] == 0)) { // Execute function if ($PHPDateArray['year'] == '') { - $PHPDateArray['year'] = strftime('%Y'); + $PHPDateArray['year'] = date('Y'); } if ($PHPDateArray['year'] < 1900) { return PHPExcel_Calculation_Functions::VALUE(); } if ($PHPDateArray['month'] == '') { - $PHPDateArray['month'] = strftime('%m'); + $PHPDateArray['month'] = date('m'); } if ($PHPDateArray['day'] == '') { - $PHPDateArray['day'] = strftime('%d'); + $PHPDateArray['day'] = date('d'); } $excelDateValue = floor( PHPExcel_Shared_Date::FormattedPHPToExcel( diff --git a/lib/PHPExcel/Calculation/FormulaParser.php b/lib/PHPExcel/Calculation/FormulaParser.php index 03340e699..111ccea81 100644 --- a/lib/PHPExcel/Calculation/FormulaParser.php +++ b/lib/PHPExcel/Calculation/FormulaParser.php @@ -181,8 +181,8 @@ class PHPExcel_Calculation_FormulaParser // embeds are doubled // end marks token if ($inString) { - if ($this->formula{$index} == PHPExcel_Calculation_FormulaParser::QUOTE_DOUBLE) { - if ((($index + 2) <= $formulaLength) && ($this->formula{$index + 1} == PHPExcel_Calculation_FormulaParser::QUOTE_DOUBLE)) { + if ($this->formula[$index] == PHPExcel_Calculation_FormulaParser::QUOTE_DOUBLE) { + if ((($index + 2) <= $formulaLength) && ($this->formula[$index + 1] == PHPExcel_Calculation_FormulaParser::QUOTE_DOUBLE)) { $value .= PHPExcel_Calculation_FormulaParser::QUOTE_DOUBLE; ++$index; } else { @@ -191,7 +191,7 @@ class PHPExcel_Calculation_FormulaParser $value = ""; } } else { - $value .= $this->formula{$index}; + $value .= $this->formula[$index]; } ++$index; continue; @@ -201,15 +201,15 @@ class PHPExcel_Calculation_FormulaParser // embeds are double // end does not mark a token if ($inPath) { - if ($this->formula{$index} == PHPExcel_Calculation_FormulaParser::QUOTE_SINGLE) { - if ((($index + 2) <= $formulaLength) && ($this->formula{$index + 1} == PHPExcel_Calculation_FormulaParser::QUOTE_SINGLE)) { + if ($this->formula[$index] == PHPExcel_Calculation_FormulaParser::QUOTE_SINGLE) { + if ((($index + 2) <= $formulaLength) && ($this->formula[$index + 1] == PHPExcel_Calculation_FormulaParser::QUOTE_SINGLE)) { $value .= PHPExcel_Calculation_FormulaParser::QUOTE_SINGLE; ++$index; } else { $inPath = false; } } else { - $value .= $this->formula{$index}; + $value .= $this->formula[$index]; } ++$index; continue; @@ -219,10 +219,10 @@ class PHPExcel_Calculation_FormulaParser // no embeds (changed to "()" by Excel) // end does not mark a token if ($inRange) { - if ($this->formula{$index} == PHPExcel_Calculation_FormulaParser::BRACKET_CLOSE) { + if ($this->formula[$index] == PHPExcel_Calculation_FormulaParser::BRACKET_CLOSE) { $inRange = false; } - $value .= $this->formula{$index}; + $value .= $this->formula[$index]; ++$index; continue; } @@ -230,7 +230,7 @@ class PHPExcel_Calculation_FormulaParser // error values // end marks a token, determined from absolute list of values if ($inError) { - $value .= $this->formula{$index}; + $value .= $this->formula[$index]; ++$index; if (in_array($value, $ERRORS)) { $inError = false; @@ -241,10 +241,10 @@ class PHPExcel_Calculation_FormulaParser } // scientific notation check - if (strpos(PHPExcel_Calculation_FormulaParser::OPERATORS_SN, $this->formula{$index}) !== false) { + if (strpos(PHPExcel_Calculation_FormulaParser::OPERATORS_SN, $this->formula[$index]) !== false) { if (strlen($value) > 1) { - if (preg_match("/^[1-9]{1}(\.[0-9]+)?E{1}$/", $this->formula{$index}) != 0) { - $value .= $this->formula{$index}; + if (preg_match("/^[1-9]{1}(\.[0-9]+)?E{1}$/", $this->formula[$index]) != 0) { + $value .= $this->formula[$index]; ++$index; continue; } @@ -254,7 +254,7 @@ class PHPExcel_Calculation_FormulaParser // independent character evaluation (order not important) // establish state-dependent character evaluations - if ($this->formula{$index} == PHPExcel_Calculation_FormulaParser::QUOTE_DOUBLE) { + if ($this->formula[$index] == PHPExcel_Calculation_FormulaParser::QUOTE_DOUBLE) { if (strlen($value > 0)) { // unexpected $tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_UNKNOWN); @@ -265,7 +265,7 @@ class PHPExcel_Calculation_FormulaParser continue; } - if ($this->formula{$index} == PHPExcel_Calculation_FormulaParser::QUOTE_SINGLE) { + if ($this->formula[$index] == PHPExcel_Calculation_FormulaParser::QUOTE_SINGLE) { if (strlen($value) > 0) { // unexpected $tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_UNKNOWN); @@ -276,14 +276,14 @@ class PHPExcel_Calculation_FormulaParser continue; } - if ($this->formula{$index} == PHPExcel_Calculation_FormulaParser::BRACKET_OPEN) { + if ($this->formula[$index] == PHPExcel_Calculation_FormulaParser::BRACKET_OPEN) { $inRange = true; $value .= PHPExcel_Calculation_FormulaParser::BRACKET_OPEN; ++$index; continue; } - if ($this->formula{$index} == PHPExcel_Calculation_FormulaParser::ERROR_START) { + if ($this->formula[$index] == PHPExcel_Calculation_FormulaParser::ERROR_START) { if (strlen($value) > 0) { // unexpected $tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_UNKNOWN); @@ -296,7 +296,7 @@ class PHPExcel_Calculation_FormulaParser } // mark start and end of arrays and array rows - if ($this->formula{$index} == PHPExcel_Calculation_FormulaParser::BRACE_OPEN) { + if ($this->formula[$index] == PHPExcel_Calculation_FormulaParser::BRACE_OPEN) { if (strlen($value) > 0) { // unexpected $tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_UNKNOWN); @@ -315,7 +315,7 @@ class PHPExcel_Calculation_FormulaParser continue; } - if ($this->formula{$index} == PHPExcel_Calculation_FormulaParser::SEMICOLON) { + if ($this->formula[$index] == PHPExcel_Calculation_FormulaParser::SEMICOLON) { if (strlen($value) > 0) { $tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND); $value = ""; @@ -337,7 +337,7 @@ class PHPExcel_Calculation_FormulaParser continue; } - if ($this->formula{$index} == PHPExcel_Calculation_FormulaParser::BRACE_CLOSE) { + if ($this->formula[$index] == PHPExcel_Calculation_FormulaParser::BRACE_CLOSE) { if (strlen($value) > 0) { $tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND); $value = ""; @@ -358,14 +358,14 @@ class PHPExcel_Calculation_FormulaParser } // trim white-space - if ($this->formula{$index} == PHPExcel_Calculation_FormulaParser::WHITESPACE) { + if ($this->formula[$index] == PHPExcel_Calculation_FormulaParser::WHITESPACE) { if (strlen($value) > 0) { $tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND); $value = ""; } $tokens1[] = new PHPExcel_Calculation_FormulaToken("", PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_WHITESPACE); ++$index; - while (($this->formula{$index} == PHPExcel_Calculation_FormulaParser::WHITESPACE) && ($index < $formulaLength)) { + while (($this->formula[$index] == PHPExcel_Calculation_FormulaParser::WHITESPACE) && ($index < $formulaLength)) { ++$index; } continue; @@ -385,29 +385,29 @@ class PHPExcel_Calculation_FormulaParser } // standard infix operators - if (strpos(PHPExcel_Calculation_FormulaParser::OPERATORS_INFIX, $this->formula{$index}) !== false) { + if (strpos(PHPExcel_Calculation_FormulaParser::OPERATORS_INFIX, $this->formula[$index]) !== false) { if (strlen($value) > 0) { $tokens1[] =new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND); $value = ""; } - $tokens1[] = new PHPExcel_Calculation_FormulaToken($this->formula{$index}, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERATORINFIX); + $tokens1[] = new PHPExcel_Calculation_FormulaToken($this->formula[$index], PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERATORINFIX); ++$index; continue; } // standard postfix operators (only one) - if (strpos(PHPExcel_Calculation_FormulaParser::OPERATORS_POSTFIX, $this->formula{$index}) !== false) { + if (strpos(PHPExcel_Calculation_FormulaParser::OPERATORS_POSTFIX, $this->formula[$index]) !== false) { if (strlen($value) > 0) { $tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND); $value = ""; } - $tokens1[] = new PHPExcel_Calculation_FormulaToken($this->formula{$index}, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERATORPOSTFIX); + $tokens1[] = new PHPExcel_Calculation_FormulaToken($this->formula[$index], PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERATORPOSTFIX); ++$index; continue; } // start subexpression or function - if ($this->formula{$index} == PHPExcel_Calculation_FormulaParser::PAREN_OPEN) { + if ($this->formula[$index] == PHPExcel_Calculation_FormulaParser::PAREN_OPEN) { if (strlen($value) > 0) { $tmp = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_FUNCTION, PHPExcel_Calculation_FormulaToken::TOKEN_SUBTYPE_START); $tokens1[] = $tmp; @@ -423,7 +423,7 @@ class PHPExcel_Calculation_FormulaParser } // function, subexpression, or array parameters, or operand unions - if ($this->formula{$index} == PHPExcel_Calculation_FormulaParser::COMMA) { + if ($this->formula[$index] == PHPExcel_Calculation_FormulaParser::COMMA) { if (strlen($value) > 0) { $tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND); $value = ""; @@ -444,7 +444,7 @@ class PHPExcel_Calculation_FormulaParser } // stop subexpression - if ($this->formula{$index} == PHPExcel_Calculation_FormulaParser::PAREN_CLOSE) { + if ($this->formula[$index] == PHPExcel_Calculation_FormulaParser::PAREN_CLOSE) { if (strlen($value) > 0) { $tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND); $value = ""; @@ -460,7 +460,7 @@ class PHPExcel_Calculation_FormulaParser } // token accumulation - $value .= $this->formula{$index}; + $value .= $this->formula[$index]; ++$index; } diff --git a/lib/PHPExcel/Calculation/Statistical.php b/lib/PHPExcel/Calculation/Statistical.php index 1a33610fc..fe6a15063 100644 --- a/lib/PHPExcel/Calculation/Statistical.php +++ b/lib/PHPExcel/Calculation/Statistical.php @@ -346,7 +346,7 @@ class PHPExcel_Calculation_Statistical $y = $x; if ($y > 0.0 && $y <= LOG_GAMMA_X_MAX_VALUE) { if ($y <= EPS) { - $res = -log(y); + $res = -log($y); } elseif ($y <= 1.5) { // --------------------- // EPS .LT. X .LE. 1.5 @@ -677,7 +677,7 @@ class PHPExcel_Calculation_Statistical $q = $p - 0.5; // computation for p close to 0.5 - if (abs($q) <= split1) { + if (abs($q) <= $split1) { $R = $const1 - $q * $q; $z = $q * ((((((($a7 * $R + $a6) * $R + $a5) * $R + $a4) * $R + $a3) * $R + $a2) * $R + $a1) * $R + $a0) / ((((((($b7 * $R + $b6) * $R + $b5) * $R + $b4) * $R + $b3) * $R + $b2) * $R + $b1) * $R + 1); diff --git a/lib/PHPExcel/Cell.php b/lib/PHPExcel/Cell.php index 4b1437f55..e18dec3f8 100644 --- a/lib/PHPExcel/Cell.php +++ b/lib/PHPExcel/Cell.php @@ -842,7 +842,7 @@ class PHPExcel_Cell if ($pColumnIndex < 26) { $_indexCache[$pColumnIndex] = chr(65 + $pColumnIndex); } elseif ($pColumnIndex < 702) { - $_indexCache[$pColumnIndex] = chr(64 + ($pColumnIndex / 26)) . + $_indexCache[$pColumnIndex] = chr(64 + (int)($pColumnIndex / 26)) . chr(65 + $pColumnIndex % 26); } else { $_indexCache[$pColumnIndex] = chr(64 + (($pColumnIndex - 26) / 676)) . diff --git a/lib/PHPExcel/Reader/Excel5/Escher.php b/lib/PHPExcel/Reader/Excel5/Escher.php index 2b99e2223..1f7f304f7 100644 --- a/lib/PHPExcel/Reader/Excel5/Escher.php +++ b/lib/PHPExcel/Reader/Excel5/Escher.php @@ -280,16 +280,16 @@ class PHPExcel_Reader_Excel5_Escher $foDelay = PHPExcel_Reader_Excel5::getInt4d($recordData, 28); // offset: 32; size: 1; unused1 - $unused1 = ord($recordData{32}); + $unused1 = ord($recordData[32]); // offset: 33; size: 1; size of nameData in bytes (including null terminator) - $cbName = ord($recordData{33}); + $cbName = ord($recordData[33]); // offset: 34; size: 1; unused2 - $unused2 = ord($recordData{34}); + $unused2 = ord($recordData[34]); // offset: 35; size: 1; unused3 - $unused3 = ord($recordData{35}); + $unused3 = ord($recordData[35]); // offset: 36; size: $cbName; nameData $nameData = substr($recordData, 36, $cbName); @@ -331,7 +331,7 @@ class PHPExcel_Reader_Excel5_Escher } // offset: var; size: 1; tag - $tag = ord($recordData{$pos}); + $tag = ord($recordData[$pos]); $pos += 1; // offset: var; size: var; the raw image data @@ -372,7 +372,7 @@ class PHPExcel_Reader_Excel5_Escher } // offset: var; size: 1; tag - $tag = ord($recordData{$pos}); + $tag = ord($recordData[$pos]); $pos += 1; // offset: var; size: var; the raw image data diff --git a/lib/PHPExcel/Reader/OOCalc.php b/lib/PHPExcel/Reader/OOCalc.php index a889d9570..f25c31f1a 100644 --- a/lib/PHPExcel/Reader/OOCalc.php +++ b/lib/PHPExcel/Reader/OOCalc.php @@ -535,7 +535,7 @@ class PHPExcel_Reader_OOCalc extends PHPExcel_Reader_Abstract implements PHPExce array_push($dataArray, $pData); } } - $allCellDataText = implode($dataArray, "\n"); + $allCellDataText = implode("\n", $dataArray); // echo 'Value Type is '.$cellDataOfficeAttributes['value-type'].'
'; switch ($cellDataOfficeAttributes['value-type']) { diff --git a/lib/URI/uri.class.php b/lib/URI/uri.class.php index 91a0a5165..24eccc2ee 100644 --- a/lib/URI/uri.class.php +++ b/lib/URI/uri.class.php @@ -17,11 +17,12 @@ class G5_URI { } public function parseURL() { - /* grab URL query string and script name */ + /* grab URL query string and script name */ $uri = $_SERVER['REQUEST_URI']; $script = $_SERVER['SCRIPT_NAME']; /* get extension */ - $ext = end( explode(".",$script) ); + $script_names = explode(".",$script); + $ext = end($script_names); /* if extension is found in URL, eliminate it */ if(strstr($uri,".")) { @@ -83,14 +84,17 @@ class G5_URI { return $links; } - + /** + * convert normal URL query string to clean URL + */ public function makeClean($string_url) { - /* convert normal URL query string to clean URL */ - $url=parse_url($string_url); - $strurl = basename($url['path'],".php"); - $qstring = parse_str($url['query'],$vars); - while(list($k,$v) = each($vars)) $strurl .= "/".$v; - return $strurl; + $url = parse_url($string_url); + $strUrl = basename($url['path'],".php"); + parse_str($url['query'],$queryString); + foreach($queryString as $value){ + $strUrl .= "/$value"; + } + return $strUrl; } public function url_clean($string_url, $add_qry='') { @@ -107,7 +111,7 @@ class G5_URI { } $return_url = ''; - $qstring = parse_str($url['query'], $vars); + parse_str($url['query'], $vars); // 예) Array ( [scheme] => http [host] => sir.kr [path] => /bbs/board.php [query] => wr_id=1110870&bo_table=cm_free&cpage=1 [fragment] => c_1110946 ) //while(list($k,$v) = each($vars)) $page_name .= "/".$v; @@ -159,8 +163,10 @@ class G5_URI { $add_param .= $add_param ? '&'.$add_qry : '?'.$add_qry; } - while(list($k,$v) = each($s)) $return_url .= '/'.$v; + foreach($s as $value){ + $return_url .= "/$value"; + } - return $host.$return_url.$add_param.$fragment; + return $host.$return_url.$add_param.$fragment; } -} \ No newline at end of file +} diff --git a/lib/common.lib.php b/lib/common.lib.php index b9a879ae5..0ba393fd0 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -1511,7 +1511,7 @@ function hsc($str) //   & · 등을 정상으로 출력 function html_symbol($str) { - return preg_replace("/\&([a-z0-9]{1,20}|\#[0-9]{0,3});/i", "&\\1;", $str); + return $str ? preg_replace("/\&([a-z0-9]{1,20}|\#[0-9]{0,3});/i", "&\\1;", $str) : ""; } @@ -1527,6 +1527,7 @@ function sql_connect($host, $user, $pass, $db=G5_MYSQL_DB) global $g5; if(function_exists('mysqli_connect') && G5_MYSQLI_USE) { + mysqli_report(MYSQLI_REPORT_OFF); $link = @mysqli_connect($host, $user, $pass, $db) or die('MySQL Host, User, Password, DB 정보에 오류가 있습니다.'); // 연결 오류 발생 시 스크립트 종료 @@ -1601,7 +1602,11 @@ function sql_query($sql, $error=G5_DISPLAY_SQL_ERROR, $link=null) if ($error) { $result = @mysqli_query($link, $sql) or die("

$sql

" . mysqli_errno($link) . " : " . mysqli_error($link) . "

error file : {$_SERVER['SCRIPT_NAME']}"); } else { - $result = @mysqli_query($link, $sql); + try { + $result = @mysqli_query($link, $sql); + } catch (Exception $e) { + $result = null; + } } } else { if ($error) { @@ -1649,7 +1654,11 @@ function sql_fetch_array($result) if( ! $result) return array(); if(function_exists('mysqli_fetch_assoc') && G5_MYSQLI_USE) - $row = @mysqli_fetch_assoc($result); + try { + $row = @mysqli_fetch_assoc($result); + } catch (Exception $e) { + $row = null; + } else $row = @mysql_fetch_assoc($result); @@ -2475,22 +2484,6 @@ function get_skin_javascript($skin_path, $dir='') return $str; } -// file_put_contents 는 PHP5 전용 함수이므로 PHP4 하위버전에서 사용하기 위함 -// http://www.phpied.com/file_get_contents-for-php4/ -if (!function_exists('file_put_contents')) { - function file_put_contents($filename, $data) { - $f = @fopen($filename, 'w'); - if (!$f) { - return false; - } else { - $bytes = fwrite($f, $data); - fclose($f); - return $bytes; - } - } -} - - // HTML 마지막 처리 function html_end() { @@ -3074,10 +3067,12 @@ function get_search_string($stx) } // XSS 관련 태그 제거 -function clean_xss_tags($str, $check_entities=0, $is_remove_tags=0, $cur_str_len=0) +function clean_xss_tags($str, $check_entities=0, $is_remove_tags=0, $cur_str_len=0, $is_trim_both=1) { - // tab('\t'), formfeed('\f'), vertical tab('\v'), newline('\n'), carriage return('\r') 를 제거한다. - $str = preg_replace("#[\t\f\v\n\r]#", '', $str); + if( $is_trim_both ) { + // tab('\t'), formfeed('\f'), vertical tab('\v'), newline('\n'), carriage return('\r') 를 제거한다. + $str = preg_replace("#[\t\f\v\n\r]#", '', $str); + } if( $is_remove_tags ){ $str = strip_tags($str); @@ -3340,12 +3335,18 @@ function check_url_host($url, $msg='', $return_url=G5_URL, $is_redirect=false) if(!$msg) $msg = 'url에 타 도메인을 지정할 수 없습니다.'; + if(run_replace('check_url_host_before', '', $url, $msg, $return_url, $is_redirect) === 'is_checked'){ + return; + } + // KVE-2021-1277 Open Redirect 취약점 해결 if (preg_match('#\\\0#', $url)) { alert('url 에 올바르지 않은 값이 포함되어 있습니다.'); } - $url = urldecode($url); + while ( ( $replace_url = preg_replace(array('/\/{2,}/', '/\\@/'), array('//', ''), urldecode($url)) ) != $url ) { + $url = $replace_url; + } $p = @parse_url(trim($url)); $host = preg_replace('/:[0-9]+$/', '', $_SERVER['HTTP_HOST']); $is_host_check = false; @@ -3390,7 +3391,7 @@ function check_url_host($url, $msg='', $return_url=G5_URL, $is_redirect=false) if ((isset($p['scheme']) && $p['scheme']) || (isset($p['host']) && $p['host']) || $is_host_check) { //if ($p['host'].(isset($p['port']) ? ':'.$p['port'] : '') != $_SERVER['HTTP_HOST']) { - if ( ($p['host'] != $host) || $is_host_check ) { + if (run_replace('check_same_url_host', (($p['host'] != $host) || $is_host_check), $p, $host, $is_host_check, $return_url, $is_redirect)) { echo ' - ); // 최대 if($w == 'cu') { $sql = " select wr_id, wr_content, mb_id from $write_table where wr_id = '$c_id' and wr_is_comment = '1' "; $cmt = sql_fetch($sql); - if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id']))) - $cmt['wr_content'] = ''; - $c_wr_content = $cmt['wr_content']; + if (isset($cmt)) { + if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id']))) { + $cmt['wr_content'] = ''; + } + $c_wr_content = $cmt['wr_content']; + } } ?> @@ -341,4 +344,4 @@ var char_max = parseInt(); // 최대 }); }); - 새로운 비밀번호를 입력해주세요.


- 회원 아이디 : + 회원 아이디 : diff --git a/mobile/skin/poll/basic/poll_result.skin.php b/mobile/skin/poll/basic/poll_result.skin.php index d7c848936..6169445af 100644 --- a/mobile/skin/poll/basic/poll_result.skin.php +++ b/mobile/skin/poll/basic/poll_result.skin.php @@ -79,8 +79,8 @@ add_stylesheet('', 0) - + diff --git a/plugin/PHPMailer/class.phpmailer.php b/plugin/PHPMailer/class.phpmailer.php index abb679614..79e699706 100644 --- a/plugin/PHPMailer/class.phpmailer.php +++ b/plugin/PHPMailer/class.phpmailer.php @@ -3818,7 +3818,9 @@ class PHPMailer if (version_compare(PHP_VERSION, '5.3.0') >= 0 and in_array('sha256WithRSAEncryption', openssl_get_md_methods(true))) { if (openssl_sign($signHeader, $signature, $privKey, 'sha256WithRSAEncryption')) { - openssl_pkey_free($privKey); + if (PHP_MAJOR_VERSION < 8) { + openssl_pkey_free($privKey); + } return base64_encode($signature); } } else { @@ -3831,11 +3833,15 @@ class PHPMailer $eb = pack('H*', '0001' . str_repeat('FF', $pslen) . '00' . $t); if (openssl_private_encrypt($eb, $signature, $privKey, OPENSSL_NO_PADDING)) { - openssl_pkey_free($privKey); + if (PHP_MAJOR_VERSION < 8) { + openssl_pkey_free($privKey); + } return base64_encode($signature); } } - openssl_pkey_free($privKey); + if (PHP_MAJOR_VERSION < 8) { + openssl_pkey_free($privKey); + } return ''; } diff --git a/plugin/PHPMailer/extras/htmlfilter.php b/plugin/PHPMailer/extras/htmlfilter.php index b4b2d878a..1581c4101 100644 --- a/plugin/PHPMailer/extras/htmlfilter.php +++ b/plugin/PHPMailer/extras/htmlfilter.php @@ -348,7 +348,7 @@ function tln_getnxtag($body, $offset) } //intentional fall-through case '>': - $attary{$attname} = '"yes"'; + $attary[$attname] = '"yes"'; return array($tagname, $attary, $tagtype, $lt, $pos); break; default: @@ -382,7 +382,7 @@ function tln_getnxtag($body, $offset) } list($pos, $attval, $match) = $regary; $pos++; - $attary{$attname} = '\'' . $attval . '\''; + $attary[$attname] = '\'' . $attval . '\''; } elseif ($quot == '"') { $regary = tln_findnxreg($body, $pos + 1, '\"'); if ($regary == false) { @@ -390,7 +390,7 @@ function tln_getnxtag($body, $offset) } list($pos, $attval, $match) = $regary; $pos++; - $attary{$attname} = '"' . $attval . '"'; + $attary[$attname] = '"' . $attval . '"'; } else { /** * These are hateful. Look for \s, or >. @@ -404,13 +404,13 @@ function tln_getnxtag($body, $offset) * If it's ">" it will be caught at the top. */ $attval = preg_replace('/\"/s', '"', $attval); - $attary{$attname} = '"' . $attval . '"'; + $attary[$attname] = '"' . $attval . '"'; } } elseif (preg_match('|[\w/>]|', $char)) { /** * That was attribute type 4. */ - $attary{$attname} = '"yes"'; + $attary[$attname] = '"yes"'; } else { /** * An illegal character. Find next '>' and return. @@ -446,7 +446,7 @@ function tln_deent(&$attvalue, $regex, $hex = false) if ($hex) { $numval = hexdec($numval); } - $repl{$matches[0][$i]} = chr($numval); + $repl[$matches[0][$i]] = chr($numval); } $attvalue = strtr($attvalue, $repl); return true; @@ -528,7 +528,7 @@ function tln_fixatts( if (preg_match($matchtag, $tagname)) { foreach ($matchattrs as $matchattr) { if (preg_match($matchattr, $attname)) { - unset($attary{$attname}); + unset($attary[$attname]); continue; } } @@ -541,7 +541,7 @@ function tln_fixatts( tln_defang($attvalue); if ($attname == 'style' && $attvalue !== $oldattvalue) { $attvalue = "idiocy"; - $attary{$attname} = $attvalue; + $attary[$attname] = $attvalue; } tln_unspace($attvalue); @@ -563,7 +563,7 @@ function tln_fixatts( list($valmatch, $valrepl) = $valary; $newvalue = preg_replace($valmatch, $valrepl, $attvalue); if ($newvalue != $attvalue) { - $attary{$attname} = $newvalue; + $attary[$attname] = $newvalue; $attvalue = $newvalue; } } @@ -572,14 +572,14 @@ function tln_fixatts( } if ($attname == 'style') { if (preg_match('/[\0-\37\200-\377]+/', $attvalue)) { - $attary{$attname} = '"disallowed character"'; + $attary[$attname] = '"disallowed character"'; } preg_match_all("/url\s*\((.+)\)/si", $attvalue, $aMatch); if (count($aMatch)) { foreach($aMatch[1] as $sMatch) { $urlvalue = $sMatch; tln_fixurl($attname, $urlvalue, $trans_image_path, $block_external_images); - $attary{$attname} = str_replace($sMatch, $urlvalue, $attvalue); + $attary[$attname] = str_replace($sMatch, $urlvalue, $attvalue); } } } @@ -671,7 +671,7 @@ function tln_fixstyle($body, $pos, $trans_image_path, $block_external_images) $bSucces = false; $bEndTag = false; for ($i=$pos,$iCount=strlen($body);$i<$iCount;++$i) { - $char = $body{$i}; + $char = $body[$i]; switch ($char) { case '<': $sToken = $char; @@ -702,7 +702,7 @@ function tln_fixstyle($body, $pos, $trans_image_path, $block_external_images) case '!': if ($sToken == '<') { // possible comment - if (isset($body{$i+2}) && substr($body,$i,3) == '!--') { + if (isset($body[$i+2]) && substr($body,$i,3) == '!--') { $i = strpos($body,'-->',$i+3); if ($i === false) { // no end comment $i = strlen($body); @@ -818,7 +818,7 @@ function tln_body2div($attary, $trans_image_path) $styledef .= "color: $text; "; } if (strlen($styledef) > 0){ - $divattary{"style"} = "\"$styledef\""; + $divattary["style"] = "\"$styledef\""; } } return $divattary; @@ -914,10 +914,10 @@ function tln_sanitize( if ($tagname == "body") { $tagname = "div"; } - if (isset($open_tags{$tagname}) && - $open_tags{$tagname} > 0 + if (isset($open_tags[$tagname]) && + $open_tags[$tagname] > 0 ) { - $open_tags{$tagname}--; + $open_tags[$tagname]--; } else { $tagname = false; } @@ -961,10 +961,10 @@ function tln_sanitize( $attary = tln_body2div($attary, $trans_image_path); } if ($tagtype == 1) { - if (isset($open_tags{$tagname})) { - $open_tags{$tagname}++; + if (isset($open_tags[$tagname])) { + $open_tags[$tagname]++; } else { - $open_tags{$tagname} = 1; + $open_tags[$tagname] = 1; } } /** @@ -1121,19 +1121,19 @@ function HTMLFilter($body, $trans_image_path, $block_external_images = false) if ($block_external_images) { array_push( - $bad_attvals{'/.*/'}{'/^src|background/i'}[0], + $bad_attvals['/.*/']['/^src|background/i'][0], '/^([\'\"])\s*https*:.*([\'\"])/si' ); array_push( - $bad_attvals{'/.*/'}{'/^src|background/i'}[1], + $bad_attvals['/.*/']['/^src|background/i'][1], "\\1$trans_image_path\\1" ); array_push( - $bad_attvals{'/.*/'}{'/^style/i'}[0], + $bad_attvals['/.*/']['/^style/i'][0], '/url\(([\'\"])\s*https*:.*([\'\"])\)/si' ); array_push( - $bad_attvals{'/.*/'}{'/^style/i'}[1], + $bad_attvals['/.*/']['/^style/i'][1], "url(\\1$trans_image_path\\1)" ); } diff --git a/plugin/PHPMailer/extras/ntlm_sasl_client.php b/plugin/PHPMailer/extras/ntlm_sasl_client.php index 3fd539240..f412ef006 100644 --- a/plugin/PHPMailer/extras/ntlm_sasl_client.php +++ b/plugin/PHPMailer/extras/ntlm_sasl_client.php @@ -66,7 +66,7 @@ class ntlm_sasl_client_class public function NTLMResponse($challenge, $password) { $unicode = $this->ASCIIToUnicode($password); - $md4 = mhash(MHASH_MD4, $unicode); + $md4 = hash('md4', $unicode, true); $padded = $md4 . str_repeat(chr(0), 21 - strlen($md4)); $iv_size = mcrypt_get_iv_size(MCRYPT_DES, MCRYPT_MODE_ECB); $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND); diff --git a/plugin/editor/smarteditor2/photo_uploader/popup/php/UploadHandler.php b/plugin/editor/smarteditor2/photo_uploader/popup/php/UploadHandler.php index 8d26192a2..2eed258f8 100644 --- a/plugin/editor/smarteditor2/photo_uploader/popup/php/UploadHandler.php +++ b/plugin/editor/smarteditor2/photo_uploader/popup/php/UploadHandler.php @@ -1057,7 +1057,7 @@ class UploadHandler } if (count($failed_versions)) { $file->error = $this->get_error_message('image_resize') - .' ('.implode($failed_versions,', ').')'; + .' ('.implode(', ', $failed_versions).')'; } // Free memory: $this->destroy_image_object($file_path); diff --git a/plugin/htmlpurifier/HTMLPurifier.standalone.php b/plugin/htmlpurifier/HTMLPurifier.standalone.php index 6e9db001f..5e42bfe6b 100644 --- a/plugin/htmlpurifier/HTMLPurifier.standalone.php +++ b/plugin/htmlpurifier/HTMLPurifier.standalone.php @@ -7,7 +7,7 @@ * primary concern and you are using an opcode cache. PLEASE DO NOT EDIT THIS * FILE, changes will be overwritten the next time the script is run. * - * @version 4.13.0 + * @version 4.14.0 * * @warning * You must *not* include any other HTML Purifier files before this file, @@ -39,7 +39,7 @@ */ /* - HTML Purifier 4.13.0 - Standards Compliant HTML Filtering + HTML Purifier 4.14.0 - Standards Compliant HTML Filtering Copyright (C) 2006-2008 Edward Z. Yang This library is free software; you can redistribute it and/or @@ -78,12 +78,12 @@ class HTMLPurifier * Version of HTML Purifier. * @type string */ - public $version = '4.13.0'; + public $version = '4.14.0'; /** * Constant with version of HTML Purifier. */ - const VERSION = '4.13.0'; + const VERSION = '4.14.0'; /** * Global configuration object. @@ -1312,6 +1312,22 @@ class HTMLPurifier_CSSDefinition extends HTMLPurifier_Definition ); $this->info['background-position'] = new HTMLPurifier_AttrDef_CSS_BackgroundPosition(); + $this->info['background-size'] = new HTMLPurifier_AttrDef_CSS_Composite( + array( + new HTMLPurifier_AttrDef_Enum( + array( + 'auto', + 'cover', + 'contain', + 'initial', + 'inherit', + ) + ), + new HTMLPurifier_AttrDef_CSS_Percentage(), + new HTMLPurifier_AttrDef_CSS_Length() + ) + ); + $border_color = $this->info['border-top-color'] = $this->info['border-bottom-color'] = @@ -1811,7 +1827,7 @@ class HTMLPurifier_Config * HTML Purifier's version * @type string */ - public $version = '4.13.0'; + public $version = '4.14.0'; /** * Whether or not to automatically finalize @@ -2593,7 +2609,7 @@ class HTMLPurifier_Config if ($index !== false) { $array = (isset($array[$index]) && is_array($array[$index])) ? $array[$index] : array(); } - $mq = $mq_fix && function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc(); + $mq = $mq_fix && version_compare(PHP_VERSION, '7.4.0', '<') && function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc(); $allowed = HTMLPurifier_Config::getAllowedDirectivesForForm($allowed, $schema); $ret = array(); @@ -3785,7 +3801,7 @@ class HTMLPurifier_ElementDef if (!empty($def->content_model)) { $this->content_model = - str_replace("#SUPER", $this->content_model, $def->content_model); + str_replace("#SUPER", (string)$this->content_model, $def->content_model); $this->child = false; } if (!empty($def->content_model_type)) { @@ -6207,8 +6223,9 @@ class HTMLPurifier_HTMLModule */ public function makeLookup($list) { + $args = func_get_args(); if (is_string($list)) { - $list = func_get_args(); + $list = $args; } $ret = array(); foreach ($list as $value) { @@ -7538,7 +7555,7 @@ class HTMLPurifier_Length if ($this->n === '0' && $this->unit === false) { return true; } - if (!ctype_lower($this->unit)) { + if ($this->unit === false || !ctype_lower($this->unit)) { $this->unit = strtolower($this->unit); } if (!isset(HTMLPurifier_Length::$allowedUnits[$this->unit])) { @@ -7929,8 +7946,8 @@ class HTMLPurifier_Lexer { // normalize newlines to \n if ($config->get('Core.NormalizeNewlines')) { - $html = str_replace("\r\n", "\n", $html); - $html = str_replace("\r", "\n", $html); + $html = str_replace("\r\n", "\n", (string)$html); + $html = str_replace("\r", "\n", (string)$html); } if ($config->get('HTML.Trusted')) { @@ -8319,7 +8336,10 @@ class HTMLPurifier_PropertyListIterator extends FilterIterator /** * @return bool + * + * {@inheritdoc} */ + #[\ReturnTypeWillChange] public function accept() { $key = $this->getInnerIterator()->key(); @@ -8437,7 +8457,10 @@ class HTMLPurifier_StringHash extends ArrayObject * Retrieves a value, and logs the access. * @param mixed $index * @return mixed + * + * {@inheritdoc} */ + #[\ReturnTypeWillChange] public function offsetGet($index) { $this->accessed[$index] = true; @@ -11074,6 +11097,7 @@ class HTMLPurifier_AttrDef_CSS_Background extends HTMLPurifier_AttrDef $this->info['background-repeat'] = $def->info['background-repeat']; $this->info['background-attachment'] = $def->info['background-attachment']; $this->info['background-position'] = $def->info['background-position']; + $this->info['background-size'] = $def->info['background-size']; } /** @@ -11102,6 +11126,7 @@ class HTMLPurifier_AttrDef_CSS_Background extends HTMLPurifier_AttrDef $caught['repeat'] = false; $caught['attachment'] = false; $caught['position'] = false; + $caught['size'] = false; $i = 0; // number of catches @@ -15268,7 +15293,7 @@ class HTMLPurifier_ChildDef_Table extends HTMLPurifier_ChildDef } } - if (empty($content)) { + if (empty($content) && $thead === false && $tfoot === false) { return false; } @@ -17625,10 +17650,7 @@ class HTMLPurifier_HTMLModule_Tidy extends HTMLPurifier_HTMLModule $type = "info_$type"; $e = $this; } - // PHP does some weird parsing when I do - // $e->$type[$attr], so I have to assign a ref. - $f =& $e->$type; - $f[$attr] = $fix; + $e->{$type}[$attr] = $fix; break; case 'tag_transform': $this->info_tag_transform[$params['element']] = $fix; @@ -17968,9 +17990,11 @@ class HTMLPurifier_HTMLModule_Tidy_XHTMLAndHTML4 extends HTMLPurifier_HTMLModule // @vspace for img ------------------------------------------------ $r['img@vspace'] = new HTMLPurifier_AttrTransform_ImgSpace('vspace'); - // @width for hr, td, th ------------------------------------------ + // @width for table, hr, td, th, col ------------------------------------------ + $r['table@width'] = $r['td@width'] = $r['th@width'] = + $r['col@width'] = $r['hr@width'] = new HTMLPurifier_AttrTransform_Length('width'); return $r; @@ -18507,6 +18531,9 @@ class HTMLPurifier_Injector_Linkify extends HTMLPurifier_Injector '/\\b((?:[a-z][\\w\\-]+:(?:\\/{1,3}|[a-z0-9%])|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}\\/)(?:[^\\s()<>]|\\((?:[^\\s()<>]|(?:\\([^\\s()<>]+\\)))*\\))+(?:\\((?:[^\\s()<>]|(?:\\([^\\s()<>]+\\)))*\\)|[^\\s`!()\\[\\]{};:\'".,<>?\x{00ab}\x{00bb}\x{201c}\x{201d}\x{2018}\x{2019}]))/iu', $token->data, -1, PREG_SPLIT_DELIM_CAPTURE); + if ($bits === false) { + return; + } $token = array(); @@ -21889,7 +21916,7 @@ class HTMLPurifier_URIFilter_Munge extends HTMLPurifier_URIFilter $this->replace['%s'] = $string; $this->replace['%r'] = $context->get('EmbeddedURI', true); $token = $context->get('CurrentToken', true); - $this->replace['%n'] = $token ? $token->name : null; + $this->replace['%n'] = $token ? $token->name : ''; $this->replace['%m'] = $context->get('CurrentAttr', true); $this->replace['%p'] = $context->get('CurrentCSSProperty', true); // not always available diff --git a/plugin/htmlpurifier/standalone/HTMLPurifier/Language/classes/en-x-test.php b/plugin/htmlpurifier/standalone/HTMLPurifier/Language/classes/en-x-test.php deleted file mode 100644 index 8828f5cde..000000000 --- a/plugin/htmlpurifier/standalone/HTMLPurifier/Language/classes/en-x-test.php +++ /dev/null @@ -1,9 +0,0 @@ - 'HTML Purifier X' -); - -// vim: et sw=4 sts=4 diff --git a/plugin/htmlpurifier/standalone/HTMLPurifier/Language/messages/en-x-testmini.php b/plugin/htmlpurifier/standalone/HTMLPurifier/Language/messages/en-x-testmini.php deleted file mode 100644 index 806c83fbf..000000000 --- a/plugin/htmlpurifier/standalone/HTMLPurifier/Language/messages/en-x-testmini.php +++ /dev/null @@ -1,12 +0,0 @@ - 'HTML Purifier XNone' -); - -// vim: et sw=4 sts=4 diff --git a/plugin/htmlpurifier/standalone/HTMLPurifier/Lexer/PH5P.php b/plugin/htmlpurifier/standalone/HTMLPurifier/Lexer/PH5P.php index 72476ddf3..1564f283d 100644 --- a/plugin/htmlpurifier/standalone/HTMLPurifier/Lexer/PH5P.php +++ b/plugin/htmlpurifier/standalone/HTMLPurifier/Lexer/PH5P.php @@ -4410,7 +4410,7 @@ class HTML5TreeConstructer foreach ($token['attr'] as $attr) { if (!$el->hasAttribute($attr['name'])) { - $el->setAttribute($attr['name'], $attr['value']); + $el->setAttribute($attr['name'], (string)$attr['value']); } } diff --git a/plugin/inicert/ini_find_result.php b/plugin/inicert/ini_find_result.php index 258e615ad..5352f21f4 100644 --- a/plugin/inicert/ini_find_result.php +++ b/plugin/inicert/ini_find_result.php @@ -1,10 +1,10 @@ $mid, @@ -13,9 +13,14 @@ if ($_POST["resultCode"] === "0000") { $post_data = json_encode($data); + $authRequestUrl = isset($_POST["authRequestUrl"]) ? is_inicis_url_return($_POST["authRequestUrl"]) : ''; + if(!$authRequestUrl){ + alert('잘못된 요청입니다.', G5_URL); + } + // curl 통신 시작 $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL, $_POST["authRequestUrl"]); + curl_setopt($ch, CURLOPT_URL, $authRequestUrl); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10); curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data); @@ -73,7 +78,7 @@ if ($_POST["resultCode"] === "0000") { } } else { // resultCode===0000 아닐경우 아래 인증 실패를 출력함 // 인증실패 - alert_close('코드 : '.$_POST['resultCode'].' '.urldecode($_POST['resultMsg'])); + alert_close('코드 : '.(isset($_POST['resultCode']) ? clean_xss_tags($_POST['resultCode'], 1, 1) : '').' '.(isset($_POST['resultMsg']) ? clean_xss_tags(urldecode($_POST['resultMsg']), 1, 1) : '')); exit; } @@ -81,7 +86,7 @@ $g5['title'] = 'KG이니시스 간편인증 결과'; include_once(G5_PATH.'/head.sub.php'); ?>
-"> +">
\ No newline at end of file + diff --git a/skin/board/gallery/view_comment.skin.php b/skin/board/gallery/view_comment.skin.php index 704020f2b..837145df9 100644 --- a/skin/board/gallery/view_comment.skin.php +++ b/skin/board/gallery/view_comment.skin.php @@ -32,7 +32,7 @@ var char_max = parseInt(); // 최대
style="margin-left:px;border-top-color:#e0e0e0">
-
+

님의 댓글의 댓글

@@ -58,9 +58,12 @@ var char_max = parseInt(); // 최대 if($w == 'cu') { $sql = " select wr_id, wr_content, mb_id from $write_table where wr_id = '$c_id' and wr_is_comment = '1' "; $cmt = sql_fetch($sql); - if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id']))) - $cmt['wr_content'] = ''; - $c_wr_content = $cmt['wr_content']; + if (isset($cmt)) { + if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id']))) { + $cmt['wr_content'] = ''; + } + $c_wr_content = $cmt['wr_content']; + } } ?> @@ -350,4 +353,4 @@ jQuery(function($) { $("#bo_vc").toggle(); }); }); - \ No newline at end of file + diff --git a/skin/member/basic/password_reset.skin.php b/skin/member/basic/password_reset.skin.php index f7dfafdaa..f8d6accc5 100644 --- a/skin/member/basic/password_reset.skin.php +++ b/skin/member/basic/password_reset.skin.php @@ -13,7 +13,7 @@ add_stylesheet('새로운 비밀번호를 입력해주세요.


- 회원 아이디 : + 회원 아이디 : diff --git a/skin/poll/basic/poll_result.skin.php b/skin/poll/basic/poll_result.skin.php index 7c7383046..8538986d8 100644 --- a/skin/poll/basic/poll_result.skin.php +++ b/skin/poll/basic/poll_result.skin.php @@ -79,8 +79,8 @@ add_stylesheet('', 0)
- + diff --git a/skin/poll/shop_basic/poll_result.skin.php b/skin/poll/shop_basic/poll_result.skin.php index ab3df7063..8141ab7b3 100644 --- a/skin/poll/shop_basic/poll_result.skin.php +++ b/skin/poll/shop_basic/poll_result.skin.php @@ -80,8 +80,8 @@ add_stylesheet('', 0)
- + diff --git a/skin/shop/basic/listcategory3.skin.php b/skin/shop/basic/listcategory3.skin.php index 6a06aed37..4bb32bdb2 100644 --- a/skin/shop/basic/listcategory3.skin.php +++ b/skin/shop/basic/listcategory3.skin.php @@ -6,7 +6,7 @@ $exists = false; $depth2_ca_id = substr($ca_id, 0, 2); -$sql = " select ca_id, ca_name from {$g5['g5_shop_category_table']} where ca_id like '${depth2_ca_id}%' and length(ca_id) = 4 and ca_use = '1' order by ca_order, ca_id "; +$sql = " select ca_id, ca_name from {$g5['g5_shop_category_table']} where ca_id like '{$depth2_ca_id}%' and length(ca_id) = 4 and ca_use = '1' order by ca_order, ca_id "; $result = sql_query($sql); while ($row=sql_fetch_array($result)) { if (preg_match("/^{$row['ca_id']}/", $ca_id)) diff --git a/tail.sub.php b/tail.sub.php index ec25a8297..7fdec4b08 100644 --- a/tail.sub.php +++ b/tail.sub.php @@ -9,21 +9,6 @@ if(!defined('G5_IS_ADMIN') && defined('G5_THEME_PATH') && is_file(G5_THEME_PATH. - - diff --git a/theme/basic/css/default_shop.css b/theme/basic/css/default_shop.css index 69919d158..2f132f603 100644 --- a/theme/basic/css/default_shop.css +++ b/theme/basic/css/default_shop.css @@ -1067,6 +1067,17 @@ a.btn_frmline.is-long-text{height:auto;width:160px} #sod_fin_dvr .dvr_link {color:#ff3061;text-decoration:underline} +#sod_fin_tot {margin:10px 0} +#sod_fin_tot h2 {position:absolute;font-size:0;line-height:0;overflow:hidden} +#sod_fin_tot ul {margin:0;padding:0;list-style:none} +#sod_fin_tot li {padding:10px;background:#38b2b9;border-bottom:1px solid #5ec2c7;color:#fff;zoom:1} +#sod_fin_tot li:after {display:block;visibility:hidden;clear:both;content:""} +#sod_fin_tot #alrdy {border-bottom:0 !important} +#sod_fin_tot #alrdy .right{margin-top:10px;text-align:right;color:#f3f3f3;font-size:0.9em} +#sod_fin_tot #alrdy .right p{position:relative} +#sod_fin_tot #alrdy .right .title{position:absolute;left:0;padding-left:8px} +#sod_fin_tot strong {float:right} + #sod_fin_cancel {text-align:center} #sod_fin_cancel .sod_fin_c_btn {height:50px;border:1px solid #bababa;border-radius:3px;font-weight:bold;width:100%;background:none;color:#5e6b6f} #sod_fin_cancel .sod_fin_c_btn:hover {background:#fff} diff --git a/theme/basic/mobile/skin/board/basic/view_comment.skin.php b/theme/basic/mobile/skin/board/basic/view_comment.skin.php index 8ddd30dd8..2b942ceb1 100644 --- a/theme/basic/mobile/skin/board/basic/view_comment.skin.php +++ b/theme/basic/mobile/skin/board/basic/view_comment.skin.php @@ -75,9 +75,13 @@ var char_max = parseInt(); // 최대 if($w == 'cu') { $sql = " select wr_id, wr_content, mb_id from $write_table where wr_id = '$c_id' and wr_is_comment = '1' "; $cmt = sql_fetch($sql); - if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id']))) - $cmt['wr_content'] = ''; - $c_wr_content = $cmt['wr_content']; + if (isset($cmt)) { + if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id']))) { + $cmt['wr_content'] = ''; + } + $c_wr_content = $cmt['wr_content']; + } + } ?> @@ -341,4 +345,4 @@ var char_max = parseInt(); // 최대 }); }); - ); // 최대 if($w == 'cu') { $sql = " select wr_id, wr_content, mb_id from $write_table where wr_id = '$c_id' and wr_is_comment = '1' "; $cmt = sql_fetch($sql); - if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id']))) - $cmt['wr_content'] = ''; - $c_wr_content = $cmt['wr_content']; + if (isset($cmt)) { + if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id']))) { + $cmt['wr_content'] = ''; + } + $c_wr_content = $cmt['wr_content']; + } } ?> @@ -341,4 +344,4 @@ var char_max = parseInt(); // 최대 }); }); - 새로운 비밀번호를 입력해주세요.


- 회원 아이디 : + 회원 아이디 : diff --git a/theme/basic/mobile/skin/poll/basic/poll_result.skin.php b/theme/basic/mobile/skin/poll/basic/poll_result.skin.php index d7c848936..6169445af 100644 --- a/theme/basic/mobile/skin/poll/basic/poll_result.skin.php +++ b/theme/basic/mobile/skin/poll/basic/poll_result.skin.php @@ -79,8 +79,8 @@ add_stylesheet('', 0) - + diff --git a/theme/basic/skin/board/basic/view_comment.skin.php b/theme/basic/skin/board/basic/view_comment.skin.php index 879a9d074..498b45d42 100644 --- a/theme/basic/skin/board/basic/view_comment.skin.php +++ b/theme/basic/skin/board/basic/view_comment.skin.php @@ -32,7 +32,7 @@ var char_max = parseInt(); // 최대
style="margin-left:px;border-top-color:#e0e0e0">
-
+

님의 댓글의 댓글

@@ -58,9 +58,12 @@ var char_max = parseInt(); // 최대 if($w == 'cu') { $sql = " select wr_id, wr_content, mb_id from $write_table where wr_id = '$c_id' and wr_is_comment = '1' "; $cmt = sql_fetch($sql); - if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id']))) - $cmt['wr_content'] = ''; - $c_wr_content = $cmt['wr_content']; + if (isset($cmt)) { + if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id']))) { + $cmt['wr_content'] = ''; + } + $c_wr_content = $cmt['wr_content']; + } } ?> @@ -349,4 +352,4 @@ jQuery(function($) { $("#bo_vc").toggle(); }); }); - \ No newline at end of file + diff --git a/theme/basic/skin/board/gallery/view_comment.skin.php b/theme/basic/skin/board/gallery/view_comment.skin.php index 0c856557a..22d0aa11d 100644 --- a/theme/basic/skin/board/gallery/view_comment.skin.php +++ b/theme/basic/skin/board/gallery/view_comment.skin.php @@ -32,7 +32,7 @@ var char_max = parseInt(); // 최대
style="margin-left:px;border-top-color:#e0e0e0">
-
+

님의 댓글의 댓글

@@ -58,9 +58,12 @@ var char_max = parseInt(); // 최대 if($w == 'cu') { $sql = " select wr_id, wr_content, mb_id from $write_table where wr_id = '$c_id' and wr_is_comment = '1' "; $cmt = sql_fetch($sql); - if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id']))) - $cmt['wr_content'] = ''; - $c_wr_content = $cmt['wr_content']; + if (isset($cmt)) { + if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id']))) { + $cmt['wr_content'] = ''; + } + $c_wr_content = $cmt['wr_content']; + } } ?> @@ -350,4 +353,4 @@ jQuery(function($) { $("#bo_vc").toggle(); }); }); - \ No newline at end of file + diff --git a/theme/basic/skin/member/basic/password_reset.skin.php b/theme/basic/skin/member/basic/password_reset.skin.php index f7dfafdaa..f8d6accc5 100644 --- a/theme/basic/skin/member/basic/password_reset.skin.php +++ b/theme/basic/skin/member/basic/password_reset.skin.php @@ -13,7 +13,7 @@ add_stylesheet('새로운 비밀번호를 입력해주세요.


- 회원 아이디 : + 회원 아이디 : diff --git a/theme/basic/skin/poll/basic/poll_result.skin.php b/theme/basic/skin/poll/basic/poll_result.skin.php index 7c7383046..8538986d8 100644 --- a/theme/basic/skin/poll/basic/poll_result.skin.php +++ b/theme/basic/skin/poll/basic/poll_result.skin.php @@ -79,8 +79,8 @@ add_stylesheet('', 0)
- + diff --git a/theme/basic/skin/poll/shop_basic/poll_result.skin.php b/theme/basic/skin/poll/shop_basic/poll_result.skin.php index ab3df7063..8141ab7b3 100644 --- a/theme/basic/skin/poll/shop_basic/poll_result.skin.php +++ b/theme/basic/skin/poll/shop_basic/poll_result.skin.php @@ -80,8 +80,8 @@ add_stylesheet('', 0)
- + diff --git a/theme/basic/skin/shop/basic/listcategory3.skin.php b/theme/basic/skin/shop/basic/listcategory3.skin.php index 6a06aed37..4bb32bdb2 100644 --- a/theme/basic/skin/shop/basic/listcategory3.skin.php +++ b/theme/basic/skin/shop/basic/listcategory3.skin.php @@ -6,7 +6,7 @@ $exists = false; $depth2_ca_id = substr($ca_id, 0, 2); -$sql = " select ca_id, ca_name from {$g5['g5_shop_category_table']} where ca_id like '${depth2_ca_id}%' and length(ca_id) = 4 and ca_use = '1' order by ca_order, ca_id "; +$sql = " select ca_id, ca_name from {$g5['g5_shop_category_table']} where ca_id like '{$depth2_ca_id}%' and length(ca_id) = 4 and ca_use = '1' order by ca_order, ca_id "; $result = sql_query($sql); while ($row=sql_fetch_array($result)) { if (preg_match("/^{$row['ca_id']}/", $ca_id)) diff --git a/theme/basic/tail.sub.php b/theme/basic/tail.sub.php index 513656f17..70238485c 100644 --- a/theme/basic/tail.sub.php +++ b/theme/basic/tail.sub.php @@ -4,24 +4,8 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가 - - - -