Fix PHP 5.2 compatibility issues

This commit is contained in:
thisgun
2026-05-26 09:34:18 +00:00
parent d914a7843d
commit c927925a05
24 changed files with 272 additions and 272 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ if (!is_file(G5_DATA_PATH . '/cache/browscap_cache.php')) {
}
require_once G5_PLUGIN_PATH . '/browscap/Browscap.php';
$browscap = new phpbrowscap\Browscap(G5_DATA_PATH . '/cache');
$browscap = new Browscap(G5_DATA_PATH . '/cache');
$browscap->doAutoUpdate = false;
$browscap->cacheFilename = 'browscap_cache.php';
+1 -1
View File
@@ -17,7 +17,7 @@ if ($is_admin != 'super') {
require_once G5_PLUGIN_PATH . '/browscap/Browscap.php';
$browscap = new phpbrowscap\Browscap(G5_DATA_PATH . '/cache');
$browscap = new Browscap(G5_DATA_PATH . '/cache');
$browscap->updateMethod = 'cURL';
$browscap->cacheFilename = 'browscap_cache.php';
$browscap->updateCache();
+25 -19
View File
@@ -21,8 +21,8 @@ define('MEMBER_LOG_DIR', G5_DATA_PATH . "/" . MEMBER_BASE_DIR . "/" . "log");
*/
function get_export_config($type = null)
{
$config = [
'sfl_list' => [
$config = array(
'sfl_list' => array(
'mb_id'=>'아이디',
'mb_name'=>'이름',
'mb_nick'=>'닉네임',
@@ -30,26 +30,26 @@ function get_export_config($type = null)
'mb_tel'=>'전화번호',
'mb_hp'=>'휴대폰번호',
'mb_addr1'=>'주소'
],
'point_cond_map' => [
),
'point_cond_map' => array(
'gte'=>'≥',
'lte'=>'≤',
'eq'=>'='
],
'intercept_list' => [
),
'intercept_list' => array(
'exclude'=>'차단회원 제외',
'only'=>'차단회원만'
],
'ad_range_list' => [
),
'ad_range_list' => array(
'all' => '수신동의 회원 전체',
'mailling_only' => '이메일 수신동의 회원만',
'sms_only' => 'SMS/카카오톡 수신동의 회원만',
'month_confirm' => date('m월').' 수신동의 확인 대상만',
'custom_period' => '수신동의 기간 직접 입력'
],
];
),
);
return $type ? (isset($config[$type]) ? $config[$type] : []) : $config;
return $type ? (isset($config[$type]) ? $config[$type] : array()) : $config;
}
/**
@@ -59,14 +59,14 @@ function get_member_export_params()
{
// 친구톡 양식 - 엑셀 양식에 포함할 항목
$fieldArray = array_map('trim', explode(',', isset($_GET['fields']) ? $_GET['fields'] : ''));
$vars = [];
$vars = array();
foreach ($fieldArray as $index => $field) {
if(!empty($field)){
$vars['var' . ($index + 1)] = $field;
}
}
$params = [
$params = array(
'page' => 1,
'formatType' => (int)(isset($_GET['formatType']) ? $_GET['formatType'] : 1),
'use_stx' => isset($_GET['use_stx']) ? $_GET['use_stx'] : 0,
@@ -92,24 +92,30 @@ function get_member_export_params()
'use_intercept' => isset($_GET['use_intercept']) ? $_GET['use_intercept'] : 0,
'intercept' => clean_xss_tags(isset($_GET['intercept']) ? $_GET['intercept'] : 'exclude'),
'vars' => $vars,
];
);
// 레벨 범위 검증
if ($params['level_start'] > $params['level_end']) {
[$params['level_start'] , $params['level_end']] = [$params['level_end'], $params['level_start']];
$tmp_level = $params['level_start'];
$params['level_start'] = $params['level_end'];
$params['level_end'] = $tmp_level;
}
// 가입기간 - 날짜 범위 검증
if ($params['use_date'] && $params['date_start'] && $params['date_end']) {
if ($params['date_start'] > $params['date_end']) {
[$params['date_start'] , $params['date_end']] = [$params['date_end'], $params['date_start']];
$tmp_date = $params['date_start'];
$params['date_start'] = $params['date_end'];
$params['date_end'] = $tmp_date;
}
}
// 수신동의기간 - 날짜 범위 검증
if ($params['ad_range_type'] == 'custom_period' && $params['agree_date_start'] && $params['agree_date_end']) {
if ($params['agree_date_start'] > $params['agree_date_end']) {
[$params['agree_date_start'] , $params['agree_date_end']] = [$params['agree_date_end'], $params['agree_date_start']];
$tmp_agree_date = $params['agree_date_start'];
$params['agree_date_start'] = $params['agree_date_end'];
$params['agree_date_end'] = $tmp_agree_date;
}
}
@@ -141,7 +147,7 @@ function member_export_get_total_count($params)
function member_export_build_where($params)
{
global $config;
$conditions = [];
$conditions = array();
// 기본 조건 - 탈퇴하지 않은 사용자
$conditions[] = "mb_leave_date = ''";
@@ -263,7 +269,7 @@ function member_export_build_where($params)
$conditions[] = "0=1"; // 둘 다 해제 ⇒ 결과 0건
} else {
// 조건 조립
$parts = [];
$parts = array();
if ($useEmail) $parts[] = "(mb_mailling = 1 AND {$emailDateCond})";
if ($useSms) $parts[] = "(mb_sms = 1 AND {$smsDateCond})";
+4 -4
View File
@@ -191,12 +191,12 @@ $colspan = 14;
<?php
$thirdpartyLbl = (!empty($config['cf_sms_use'])) ? ' / <b>개인정보 제3자 제공</b>' : '';
$ad_range_text = [
$ad_range_text = array(
'all' => "* <b>광고성 정보 수신(이메일 또는 SMS/카카오톡)</b> / <b>마케팅 목적의 개인정보 수집 및 이용</b>{$thirdpartyLbl}에 모두 동의한 회원을 선택합니다.",
'mailling_only' => "* <b>광고성 이메일 수신</b> / <b>마케팅 목적의 개인정보 수집 및 이용</b>{$thirdpartyLbl}에 모두 동의한 회원을 선택합니다.",
'sms_only' => "* <b>광고성 SMS/카카오톡 수신</b> / <b>마케팅 목적의 개인정보 수집 및 이용</b>{$thirdpartyLbl}에 모두 동의한 회원을 선택합니다.",
'month_confirm' => "* 23개월 전(" . date('Y년 m월', strtotime('-23 month')) . ") <b>광고성 정보 수신 동의(이메일 또는 SMS/카카오톡)</b>한 회원을 선택합니다."
];
);
if (isset($_GET['ad_range_only'], $_GET['ad_range_type']) && isset($ad_range_text[$_GET['ad_range_type']])) {
echo '<div class="ad_range_box"><p>' . $ad_range_text[$_GET['ad_range_type']] . '</p></div>';
@@ -210,7 +210,7 @@ $colspan = 14;
</div>
<!-- 채널 체크박스 -->
<div class="sch_row <?php echo isset($_GET['ad_range_only']) && in_array($_GET['ad_range_type'], ['month_confirm', 'custom_period']) ? '' : 'is-hidden'; ?>">
<div class="sch_row <?php echo isset($_GET['ad_range_only']) && in_array($_GET['ad_range_type'], array('month_confirm', 'custom_period')) ? '' : 'is-hidden'; ?>">
<div class="ad_range_wrap">
<div class="ad_range_box">
<div class="label">
@@ -480,4 +480,4 @@ function triggerAutoDownload(url, filename) {
</script>
<?php
require_once './admin.tail.php';
require_once './admin.tail.php';
+62 -52
View File
@@ -14,7 +14,7 @@ session_write_close(); // 세션 종료 및 잠금 해제 (백그라운드 작
$params = get_member_export_params();
if (!$params || !is_array($params)) {
member_export_send_progress("error", "데이터가 올바르게 전달되지 않아 작업에 실패하였습니다.");
member_export_write_log([], ['success' => false, 'error' => '데이터가 올바르게 전달되지 않아 작업에 실패하였습니다.']);
member_export_write_log(array(), array('success' => false, 'error' => '데이터가 올바르게 전달되지 않아 작업에 실패하였습니다.'));
exit;
}
@@ -28,7 +28,7 @@ member_export_set_sse_headers();
$mode = isset($_GET['mode']) ? $_GET['mode'] : '';
if ($mode !== 'start') {
member_export_send_progress("error", "잘못된 요청 입니다.");
member_export_write_log($params, ['success' => false, 'error' => '잘못된 요청 입니다.']);
member_export_write_log($params, array('success' => false, 'error' => '잘못된 요청 입니다.'));
exit;
}
@@ -43,7 +43,7 @@ catch (Exception $e)
// 에러 로그 저장 및 SSE 에러 전송
error_log("[Member Export Error] " . $e->getMessage());
member_export_send_progress("error", $e->getMessage());
member_export_write_log($params, ['success' => false, 'error' => $e->getMessage()]);
member_export_write_log($params, array('success' => false, 'error' => $e->getMessage()));
}
/**
@@ -62,7 +62,7 @@ function main_member_export($params)
}
$fileName = 'member_'.MEMBER_BASE_DATE;
$fileList = [];
$fileList = array();
$zipFileName = '';
if ($total > MEMBER_EXPORT_PAGE_SIZE) {
@@ -88,7 +88,7 @@ function main_member_export($params)
$zipResult = member_export_create_zip($fileList, $fileName); // 압축 파일 생성
if($zipResult['error']){
member_export_write_log($params, ['success' => false, 'error' => $zipResult['error']]);
member_export_write_log($params, array('success' => false, 'error' => $zipResult['error']));
member_export_send_progress("zippingError", $zipResult['error']);
}
@@ -107,19 +107,19 @@ function main_member_export($params)
member_export_send_progress("progress", "", 1, $total, $total);
}
member_export_write_log($params, ['success' => true, 'total' => $total, 'files' => $fileList, 'zip' => isset($zipFileName) ? $zipFileName : null]);
member_export_write_log($params, array('success' => true, 'total' => $total, 'files' => $fileList, 'zip' => isset($zipFileName) ? $zipFileName : null));
member_export_send_progress("done", "", 2, $total, $total, $pages, $pages, $fileList, $zipFileName);
}
/**
* 진행률 전송
*/
function member_export_send_progress($status, $message = "", $downloadType = 1, $total = 1, $current = 1, $totalChunks = 1, $currentChunk = 1, $files = [], $zipFile = '')
function member_export_send_progress($status, $message = "", $downloadType = 1, $total = 1, $current = 1, $totalChunks = 1, $currentChunk = 1, $files = array(), $zipFile = '')
{
// 연결 상태 확인
if (connection_aborted()) return;
$data = [
$data = array(
'status' => $status,
'message' => $message,
'downloadType' => $downloadType,
@@ -130,9 +130,10 @@ function member_export_send_progress($status, $message = "", $downloadType = 1,
'files' => $files,
'zipFile' => $zipFile,
'filePath' => G5_DATA_URL . "/" . MEMBER_BASE_DIR . "/" . MEMBER_BASE_DATE,
];
);
echo "data: " . json_encode($data, JSON_UNESCAPED_UNICODE) . "\n\n";
$json_options = defined('JSON_UNESCAPED_UNICODE') ? JSON_UNESCAPED_UNICODE : 0;
echo "data: " . json_encode($data, $json_options) . "\n\n";
// 더 안정적인 플러시
if (ob_get_level()) ob_end_flush();
@@ -145,18 +146,18 @@ function member_export_send_progress($status, $message = "", $downloadType = 1,
function member_export_get_config()
{
$type = 1;
$configs = [
1 => [
'title' => ["회원관리파일(일반)"],
'headers' => ['아이디', '이름', '닉네임', '휴대폰번호', '전화번호', '이메일', '주소', '회원권한', '포인트', '가입일', '차단',
$configs = array(
1 => array(
'title' => array("회원관리파일(일반)"),
'headers' => array('아이디', '이름', '닉네임', '휴대폰번호', '전화번호', '이메일', '주소', '회원권한', '포인트', '가입일', '차단',
'광고성 이메일 수신동의', '광고성 이메일 동의일자', '광고성 SMS/카카오톡 수신동의', '광고성 SMS/카카오톡 동의일자',
'마케팅목적의개인정보수집및이용동의', '마케팅목적의개인정보수집및이용동의일자', '개인정보제3자제공동의', '개인정보제3자제공동의일자'],
'fields' => ['mb_id', 'mb_name', 'mb_nick', 'mb_hp', 'mb_tel', 'mb_email', 'mb_addr1', 'mb_level', 'mb_point', 'mb_datetime', 'mb_intercept_date',
'마케팅목적의개인정보수집및이용동의', '마케팅목적의개인정보수집및이용동의일자', '개인정보제3자제공동의', '개인정보제3자제공동의일자'),
'fields' => array('mb_id', 'mb_name', 'mb_nick', 'mb_hp', 'mb_tel', 'mb_email', 'mb_addr1', 'mb_level', 'mb_point', 'mb_datetime', 'mb_intercept_date',
'mb_mailling','mb_mailling_date', 'mb_sms','mb_sms_date', 'mb_marketing_agree',
'mb_marketing_date', 'mb_thirdparty_agree', 'mb_thirdparty_date'],
'widths' => [20, 20, 20, 20, 20, 30, 30, 10, 15, 25, 10, 20, 25, 20, 25, 20, 25, 20, 25],
],
];
'mb_marketing_date', 'mb_thirdparty_agree', 'mb_thirdparty_date'),
'widths' => array(20, 20, 20, 20, 20, 30, 30, 10, 15, 25, 10, 20, 25, 20, 25, 20, 25, 20, 25),
),
);
return isset($configs[$type]) ? $configs[$type] : $configs[1];
}
@@ -195,7 +196,7 @@ function member_export_get_data($params)
$fields = array_unique($fields);
// SQL 변환 맵 (가공이 필요한 필드만 정의)
$sqlTransformMap = [
$sqlTransformMap = array(
'mb_datetime' => "IF(mb_datetime = '0000-00-00 00:00:00', '', mb_datetime) AS mb_datetime",
'mb_intercept_date' => "IF(mb_intercept_date != '', '차단됨', '정상') AS mb_intercept_date",
'mb_sms' => "IF(mb_sms = '1', '동의', '미동의') AS mb_sms",
@@ -206,10 +207,10 @@ function member_export_get_data($params)
'mb_marketing_date' => "IF(mb_marketing_agree != '1' OR mb_marketing_date = '0000-00-00 00:00:00', '', mb_marketing_date) AS mb_marketing_date",
'mb_thirdparty_agree' => "IF(mb_thirdparty_agree = '1', '동의', '미동의') AS mb_thirdparty_agree",
'mb_thirdparty_date' => "IF(mb_thirdparty_agree != '1' OR mb_thirdparty_date = '0000-00-00 00:00:00', '', mb_thirdparty_date) AS mb_thirdparty_date",
];
);
// SQL 필드 생성
$sqlFields = [];
$sqlFields = array();
foreach ($fields as $field) {
$sqlFields[] = isset($sqlTransformMap[$field]) ? $sqlTransformMap[$field] : $field;
}
@@ -228,10 +229,10 @@ function member_export_get_data($params)
throw new Exception("데이터 조회에 실패하였습니다");
}
$excelData = [$config['title'], $config['headers']];
$excelData = array($config['title'], $config['headers']);
while ($row = sql_fetch_array($result)) {
$rowData = [];
$rowData = array();
foreach ($fields as $field) {
if (isset($row[$field])) {
$rowData[] = function_exists('csv_safe_cell') ? csv_safe_cell($row[$field]) : $row[$field];
@@ -261,10 +262,10 @@ function member_export_create_excel($data, $fileName, $index = 0)
$currentCache = PHPExcel_Settings::getCacheStorageMethod();
// 캐싱 모드 설정 (엑셀 생성 전용)
$cacheMethods = [
$cacheMethods = array(
PHPExcel_CachedObjectStorageFactory::cache_to_discISAM,
PHPExcel_CachedObjectStorageFactory::cache_in_memory_serialized
];
);
foreach ($cacheMethods as $method) {
if (PHPExcel_Settings::setCacheStorageMethod($method)) {
@@ -278,12 +279,12 @@ function member_export_create_excel($data, $fileName, $index = 0)
// 헤더 스타일 적용
$last_char = member_export_column_char(count($config['headers']) - 1);
$sheet->getStyle("A2:{$last_char}2")->applyFromArray([
'fill' => [
$sheet->getStyle("A2:{$last_char}2")->applyFromArray(array(
'fill' => array(
'type' => PHPExcel_Style_Fill::FILL_SOLID,
'startcolor' => ['rgb' => 'D9E1F2'], // 연파랑 배경
],
]);
'startcolor' => array('rgb' => 'D9E1F2'), // 연파랑 배경
),
));
// 셀 정렬 및 줄바꿈 설정
$sheet->getStyle("A:{$last_char}")->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER)->setWrapText(true);
@@ -313,14 +314,15 @@ function member_export_create_excel($data, $fileName, $index = 0)
}
catch (Exception $e)
{
throw new Exception("엑셀 파일 생성에 실패하였습니다: " . $e->getMessage());
}
finally
{
// 캐싱 모드 원래 상태로 복원
if ($currentCache) {
PHPExcel_Settings::setCacheStorageMethod($currentCache);
}
throw new Exception("엑셀 파일 생성에 실패하였습니다: " . $e->getMessage());
}
// 캐싱 모드 원래 상태로 복원
if ($currentCache) {
PHPExcel_Settings::setCacheStorageMethod($currentCache);
}
return $filename;
@@ -333,7 +335,7 @@ function member_export_create_zip($files, $zipFileName)
{
if (!class_exists('ZipArchive')) {
error_log('[Member Export Error] ZipArchive 클래스를 사용할 수 없습니다.');
return ['error' => '파일을 압축하는 중 문제가 발생했습니다. 개별 파일로 제공됩니다.<br>: ZipArchive 클래스를 사용할 수 없습니다.'];
return array('error' => '파일을 압축하는 중 문제가 발생했습니다. 개별 파일로 제공됩니다.<br>: ZipArchive 클래스를 사용할 수 없습니다.');
}
member_export_ensure_directory(MEMBER_EXPORT_DIR);
@@ -341,7 +343,7 @@ function member_export_create_zip($files, $zipFileName)
$zip = new ZipArchive();
if ($zip->open($destinationZipPath, ZipArchive::CREATE | ZipArchive::OVERWRITE) !== TRUE) {
return ['error' => "파일을 압축하는 중 문제가 발생했습니다. 개별 파일로 제공됩니다."];
return array('error' => "파일을 압축하는 중 문제가 발생했습니다. 개별 파일로 제공됩니다.");
}
foreach ($files as $file) {
@@ -353,11 +355,11 @@ function member_export_create_zip($files, $zipFileName)
$result = $zip->close();
return [
return array(
'result' => $result,
'zipFile' => $zipFileName . ".zip",
'zipPath' => $destinationZipPath,
];
);
}
/**
@@ -382,7 +384,7 @@ function member_export_ensure_directory($dir)
* - 알집 생성 완료 시 엑셀 파일 제거
* - 작업 전 오늘 날짜 폴더 및 log 폴더를 제외한 나머지 파일 모두 제거
*/
function member_export_delete($fileList = [])
function member_export_delete($fileList = array())
{
$cnt = 0;
@@ -401,7 +403,7 @@ function member_export_delete($fileList = [])
function deleteFolder($dir) {
foreach (glob($dir . '/{.,}*', GLOB_BRACE) as $item) {
if (in_array(basename($item), ['.', '..'])) continue;
if (in_array(basename($item), array('.', '..'))) continue;
is_dir($item) ? deleteFolder($item) : unlink($item);
}
rmdir($dir);
@@ -428,7 +430,7 @@ function member_export_delete($fileList = [])
/**
* 로그 작성
*/
function member_export_write_log($params, $result = [])
function member_export_write_log($params, $result = array())
{
global $member;
@@ -442,10 +444,13 @@ function member_export_write_log($params, $result = [])
@chmod(MEMBER_LOG_DIR, G5_DIR_PERMISSION);
}
$logFiles = glob(MEMBER_LOG_DIR . "/export_log_*.log") ?: [];
$logFiles = glob(MEMBER_LOG_DIR . "/export_log_*.log");
if (!$logFiles) {
$logFiles = array();
}
// 최신 파일 기준 정렬 (최신 → 오래된)
usort($logFiles, fn($a, $b) => filemtime($b) - filemtime($a));
usort($logFiles, 'member_export_compare_log_mtime');
$latestLogFile = isset($logFiles[0]) ? $logFiles[0] : null;
@@ -468,7 +473,7 @@ function member_export_write_log($params, $result = [])
$status = $success ? '성공' : '실패';
// 조건 정리
$condition = [];
$condition = array();
// 검색 조건
if ($params['use_stx'] == 1 && !empty($params['stx'])) {
@@ -510,11 +515,11 @@ function member_export_write_log($params, $result = [])
$condition[] = "수신동의일: {$params['agree_date_start']}~{$params['agree_date_end']}";
}
if (in_array($params['ad_range_type'], ["month_confirm", "custom_period"])){
$channels = array_filter([
if (in_array($params['ad_range_type'], array("month_confirm", "custom_period"))){
$channels = array_filter(array(
!empty($params['ad_mailling']) && (int)$params['ad_mailling'] === 1 ? '이메일' : null,
!empty($params['ad_sms']) && (int)$params['ad_sms'] === 1 ? 'SMS/카카오톡' : null,
]);
));
if ($channels) {
$condition[] = '수신채널: ' . implode(', ', $channels);
@@ -535,7 +540,7 @@ function member_export_write_log($params, $result = [])
// 성공일 경우 추가 정보
if ($success) {
$total = isset($result['total']) ? $result['total'] : 0;
$fileCount = isset($result['zip']) ? 1 : count(isset($result['files']) ? $result['files'] : []);
$fileCount = isset($result['zip']) ? 1 : count(isset($result['files']) ? $result['files'] : array());
$line1 .= " | 총 {$total}건 | 파일: {$fileCount}개";
}
@@ -552,4 +557,9 @@ function member_export_write_log($params, $result = [])
if (@file_put_contents($latestLogFile, $logEntry, FILE_APPEND | LOCK_EX) === false) {
error_log("[Member Export Error] 로그 파일 기록 실패: {$latestLogFile}");
}
}
}
function member_export_compare_log_mtime($a, $b)
{
return filemtime($b) - filemtime($a);
}
+1 -1
View File
@@ -27,7 +27,7 @@ if ($_POST['act_button'] == "선택수정") {
$post_mb_sms = isset($_POST['mb_sms'][$k]) ? (int) $_POST['mb_sms'][$k] : 0;
$post_mb_open = isset($_POST['mb_open'][$k]) ? (int) $_POST['mb_open'][$k] : 0;
$agree_items = [];
$agree_items = array();
// 광고성 이메일 수신동의 일자 추가
$post_mb_mailling_default = isset($_POST['mb_mailling_default'][$k]) ? (int) $_POST['mb_mailling_default'][$k] : 0;
$sql_mailling_date = "";
+7 -6
View File
@@ -161,11 +161,12 @@ function all_send()
if( $write['wr_memo'] ){
$tmp_wr_memo = @unserialize($write['wr_memo']);
if( count($tmp_wr_memo) && is_array($tmp_wr_memo) ){
if(function_exists('array_fill_keys')){
$tmp_wr_hp = array_replace($tmp_wr_memo['hp'],array_fill_keys(array_keys($tmp_wr_memo['hp'], null),''));
} else {
$tmp_wr_hp = $tmp_wr_memo['hp'];
}
$tmp_wr_hp = $tmp_wr_memo['hp'];
if (is_array($tmp_wr_hp)) {
foreach (array_keys($tmp_wr_hp, null) as $empty_key) {
$tmp_wr_hp[$empty_key] = '';
}
}
$arr_wr_memo = @array_count_values( $tmp_wr_hp );
?>
<h2>중복번호 <?php echo $tmp_wr_memo['total'];?>건</h2>
@@ -265,4 +266,4 @@ function all_send()
<?php echo sms5_sub_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $spage, $total_spage, $_SERVER['SCRIPT_NAME']."?wr_no=$wr_no&amp;wr_renum=$wr_renum&amp;page=$page&amp;st=$st&amp;sv=$sv&amp;sst=$sst&amp;ssv=$ssv", "", "spage"); ?>
<?php
include_once(G5_ADMIN_PATH.'/admin.tail.php');
include_once(G5_ADMIN_PATH.'/admin.tail.php');
+2 -2
View File
@@ -8,7 +8,7 @@ if(!(version_compare(phpversion(), '5.3.0', '>=') && defined('G5_BROWSCAP_USE')
if(defined('G5_VISIT_BROWSCAP_USE') && G5_VISIT_BROWSCAP_USE && is_file(G5_DATA_PATH.'/cache/browscap_cache.php')) {
include_once(G5_PLUGIN_PATH.'/browscap/Browscap.php');
$browscap = new phpbrowscap\Browscap(G5_DATA_PATH.'/cache');
$browscap = new Browscap(G5_DATA_PATH.'/cache');
$browscap->doAutoUpdate = false;
$browscap->cacheFilename = 'browscap_cache.php';
@@ -17,4 +17,4 @@ if(defined('G5_VISIT_BROWSCAP_USE') && G5_VISIT_BROWSCAP_USE && is_file(G5_DATA_
$vi_browser = $info->Comment;
$vi_os = $info->Platform;
$vi_device = $info->Device_Type;
}
}
+2 -3
View File
@@ -3249,8 +3249,7 @@ class html_process {
if (isset(self::$instances[self::$id])) {
return self::$instances[self::$id];
}
$calledClass = get_called_class();
return self::$instances[self::$id] = new $calledClass;
return self::$instances[self::$id] = new self;
}
public static function merge_stylesheet($stylesheet, $order)
@@ -4655,7 +4654,7 @@ function is_include_path_check($path='', $is_input='')
return false;
}
$dirname_doc_root = !empty($_SERVER['DOCUMENT_ROOT']) ? dirname($_SERVER['DOCUMENT_ROOT']) : dirname(dirname(dirname(__DIR__)));
$dirname_doc_root = !empty($_SERVER['DOCUMENT_ROOT']) ? dirname($_SERVER['DOCUMENT_ROOT']) : dirname(dirname(dirname(dirname(__FILE__))));
// 웹서버 폴더만 허용
if ($dirname_doc_root && file_exists($path) && strpos(realpath($path), realpath($dirname_doc_root)) !== 0) {
+2 -2
View File
@@ -40,7 +40,7 @@ $sql = "
{$addQuery}
";
$res = sql_fetch($sql);
$dt_data = [];
$dt_data = array();
if (isset($res['dt_data'])) {
$dt_data = unserialize(base64_decode($res['dt_data']));
}
@@ -189,4 +189,4 @@ function getFormObject() {
</script>
<?php
include_once(G5_PATH.'/tail.sub.php');
include_once(G5_PATH.'/tail.sub.php');
@@ -328,10 +328,10 @@ if ($config['cf_cert_use'] && ($config['cf_cert_simple'] || $config['cf_cert_ipi
<!-- (선택) 개인정보 제3자 제공 동의 -->
<!-- SMS 사용시에만 -->
<?php
$configKeys = ['cf_sms_use'];
$companies = ['icode' => '아이코드'];
$configKeys = array('cf_sms_use');
$companies = array('icode' => '아이코드');
$usedCompanies = [];
$usedCompanies = array();
foreach ($configKeys as $key) {
if (!empty($config[$key]) && isset($companies[$config[$key]])) {
$usedCompanies[] = $companies[$config[$key]];
@@ -378,7 +378,7 @@ if ($config['cf_cert_use'] && ($config['cf_cert_simple'] || $config['cf_cert_ipi
</div>
</form>
<?php include_once(__DIR__ . '/consent_modal.inc.php'); ?>
<?php include_once(dirname(__FILE__) . '/consent_modal.inc.php'); ?>
<script>
$(function() {
@@ -628,4 +628,4 @@ if ($config['cf_cert_use'] && ($config['cf_cert_simple'] || $config['cf_cert_ipi
childPromo.forEach(cb => cb.addEventListener('change', syncParentFromChildren));
});
</script>
</div>
</div>
@@ -213,10 +213,10 @@ $email_msg = $is_exists_email ? '등록할 이메일이 중복되었습니다.
<!-- (선택) 개인정보 제3자 제공 동의 -->
<!-- SMS 사용시에만 -->
<?php
$configKeys = ['cf_sms_use'];
$companies = ['icode' => '아이코드'];
$configKeys = array('cf_sms_use');
$companies = array('icode' => '아이코드');
$usedCompanies = [];
$usedCompanies = array();
foreach ($configKeys as $key) {
if (!empty($config[$key]) && isset($companies[$config[$key]])) {
$usedCompanies[] = $companies[$config[$key]];
@@ -298,7 +298,7 @@ $email_msg = $is_exists_email ? '등록할 이메일이 중복되었습니다.
</div>
</div>
<?php include_once(__DIR__ . '/consent_modal.inc.php'); ?>
<?php include_once(dirname(__FILE__) . '/consent_modal.inc.php'); ?>
<script>
$(function() {
@@ -465,4 +465,4 @@ $email_msg = $is_exists_email ? '등록할 이메일이 중복되었습니다.
});
</script>
<!-- } 회원정보 입력/수정 끝 -->
<!-- } 회원정보 입력/수정 끝 -->
@@ -51,22 +51,24 @@ class PHPMailerOAuthGoogle
private function getProvider()
{
return new League\OAuth2\Client\Provider\Google([
$providerClass = 'League\\OAuth2\\Client\\Provider\\Google';
return new $providerClass(array(
'clientId' => $this->oauthClientId,
'clientSecret' => $this->oauthClientSecret
]);
));
}
private function getGrant()
{
return new \League\OAuth2\Client\Grant\RefreshToken();
$grantClass = 'League\\OAuth2\\Client\\Grant\\RefreshToken';
return new $grantClass();
}
private function getToken()
{
$provider = $this->getProvider();
$grant = $this->getGrant();
return $provider->getAccessToken($grant, ['refresh_token' => $this->oauthRefreshToken]);
return $provider->getAccessToken($grant, array('refresh_token' => $this->oauthRefreshToken));
}
public function getOauth64()
+10 -102
View File
@@ -13,122 +13,30 @@
* PHP Version 5.4
*/
namespace League\OAuth2\Client\Provider;
if (version_compare(PHP_VERSION, '5.4.0', '<')) {
exit('This OAuth token helper requires PHP 5.4 or later.');
}
require 'vendor/autoload.php';
use League\OAuth2\Client\Provider\Exception\IdentityProviderException;
use League\OAuth2\Client\Token\AccessToken;
use League\OAuth2\Client\Tool\BearerAuthorizationTrait;
use Psr\Http\Message\ResponseInterface;
session_start();
//If this automatic URL doesn't work, set it yourself manually
$redirectUri = isset($_SERVER['HTTPS']) ? 'https://' : 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];
$redirectUri = (isset($_SERVER['HTTPS']) ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];
//$redirectUri = 'http://localhost/phpmailer/get_oauth_token.php';
//These details obtained are by setting up app in Google developer console.
$clientId = 'RANDOMCHARS-----duv1n2.apps.googleusercontent.com';
$clientSecret = 'RANDOMCHARS-----lGyjPcRtvP';
class Google extends AbstractProvider
{
use BearerAuthorizationTrait;
const ACCESS_TOKEN_RESOURCE_OWNER_ID = 'id';
/**
* @var string If set, this will be sent to google as the "access_type" parameter.
* @link https://developers.google.com/accounts/docs/OAuth2WebServer#offline
*/
protected $accessType;
/**
* @var string If set, this will be sent to google as the "hd" parameter.
* @link https://developers.google.com/accounts/docs/OAuth2Login#hd-param
*/
protected $hostedDomain;
/**
* @var string If set, this will be sent to google as the "scope" parameter.
* @link https://developers.google.com/gmail/api/auth/scopes
*/
protected $scope;
public function getBaseAuthorizationUrl()
{
return 'https://accounts.google.com/o/oauth2/auth';
}
public function getBaseAccessTokenUrl(array $params)
{
return 'https://accounts.google.com/o/oauth2/token';
}
public function getResourceOwnerDetailsUrl(AccessToken $token)
{
return ' ';
}
protected function getAuthorizationParameters(array $options)
{
if (is_array($this->scope)) {
$separator = $this->getScopeSeparator();
$this->scope = implode($separator, $this->scope);
}
$params = array_merge(
parent::getAuthorizationParameters($options),
array_filter([
'hd' => $this->hostedDomain,
'access_type' => $this->accessType,
'scope' => $this->scope,
// if the user is logged in with more than one account ask which one to use for the login!
'authuser' => '-1'
])
);
return $params;
}
protected function getDefaultScopes()
{
return [
'email',
'openid',
'profile',
];
}
protected function getScopeSeparator()
{
return ' ';
}
protected function checkResponse(ResponseInterface $response, $data)
{
if (!empty($data['error'])) {
$code = 0;
$error = $data['error'];
if (is_array($error)) {
$code = $error['code'];
$error = $error['message'];
}
throw new IdentityProviderException($error, $code, $data);
}
}
protected function createResourceOwner(array $response, AccessToken $token)
{
return new GoogleUser($response);
}
}
//Set Redirect URI in Developer Console as [https/http]://<yourdomain>/<folder>/get_oauth_token.php
$provider = new Google(
$providerClass = 'League\\OAuth2\\Client\\Provider\\Google';
if (!class_exists($providerClass)) {
exit('League OAuth2 Google provider class was not found. Install the Composer dependencies first.');
}
$provider = new $providerClass(
array(
'clientId' => $clientId,
'clientSecret' => $clientSecret,
+59 -26
View File
@@ -1,7 +1,5 @@
<?php
namespace phpbrowscap;
/**
* Browscap.ini parsing class with caching and update capabilities
*
@@ -219,14 +217,14 @@ class Browscap
date_default_timezone_set(date_default_timezone_get());
if (!isset($cache_dir)) {
throw new Exception('You have to provide a path to read/store the browscap cache file');
throw new Browscap_Exception('You have to provide a path to read/store the browscap cache file');
}
$old_cache_dir = $cache_dir;
$cache_dir = realpath($cache_dir);
if (false === $cache_dir) {
throw new Exception(
throw new Browscap_Exception(
sprintf(
'The cache path %s is invalid. Are you sure that it exists and that you have permission to access it?',
$old_cache_dir
@@ -318,7 +316,7 @@ class Browscap
$cache_file = $this->cacheDir . $this->cacheFilename;
if (!$this->_cacheLoaded && !$this->_loadCache($cache_file)) {
throw new Exception('Cannot load cache file - the cache format is not compatible.');
throw new Browscap_Exception('Cannot load cache file - the cache format is not compatible.');
}
// Automatically detect the useragent
@@ -549,10 +547,10 @@ class Browscap
$lockRes = fopen($lockfile, 'w+');
if (false === $lockRes) {
throw new Exception(sprintf('error opening lockfile %s', $lockfile));
throw new Browscap_Exception(sprintf('error opening lockfile %s', $lockfile));
}
if (false === flock($lockRes, LOCK_EX | LOCK_NB)) {
throw new Exception(sprintf('error locking lockfile %s', $lockfile));
throw new Browscap_Exception(sprintf('error locking lockfile %s', $lockfile));
}
$ini_path = $this->cacheDir . $this->iniFilename;
@@ -586,12 +584,12 @@ class Browscap
// asume that all will be ok
if (false === ($fileRes = fopen($tmpFile, 'w+'))) {
// opening the temparary file failed
throw new Exception('opening temporary file failed');
throw new Browscap_Exception('opening temporary file failed');
}
if (false === fwrite($fileRes, $this->_buildCache())) {
// writing to the temparary file failed
throw new Exception('writing to temporary file failed');
throw new Browscap_Exception('writing to temporary file failed');
}
fclose($fileRes);
@@ -600,7 +598,7 @@ class Browscap
// renaming file failed, remove temp file
@unlink($tmpFile);
throw new Exception('could not rename temporary file to the cache file');
throw new Browscap_Exception('could not rename temporary file to the cache file');
}
@flock($lockRes, LOCK_UN);
@@ -611,6 +609,41 @@ class Browscap
return true;
}
/**
* Parse ini content on PHP versions that do not provide parse_ini_string().
*
* @param string $iniContent
* @param bool $processSections
*
* @return array
*/
protected function parseIniString($iniContent, $processSections = true)
{
if (function_exists('parse_ini_string')) {
if (defined('INI_SCANNER_RAW')) {
return parse_ini_string($iniContent, $processSections, INI_SCANNER_RAW);
}
return parse_ini_string($iniContent, $processSections);
}
$tmpDir = function_exists('sys_get_temp_dir') ? sys_get_temp_dir() : dirname(__FILE__);
$tmpFile = tempnam($tmpDir, 'browscap_ini_');
if ($tmpFile === false) {
throw new Browscap_Exception('could not create temporary ini file');
}
if (file_put_contents($tmpFile, $iniContent) === false) {
@unlink($tmpFile);
throw new Browscap_Exception('could not write temporary ini file');
}
$parsed = parse_ini_file($tmpFile, $processSections);
@unlink($tmpFile);
return is_array($parsed) ? $parsed : array();
}
/**
* creates the cache content
*
@@ -619,7 +652,7 @@ class Browscap
*/
protected function createCacheOldWay($iniContent, $actLikeNewVersion = false)
{
$browsers = parse_ini_string($iniContent, true, INI_SCANNER_RAW);
$browsers = $this->parseIniString($iniContent, true);
if ($actLikeNewVersion) {
$this->_source_version = (int) $browsers[self::BROWSCAP_VERSION_KEY]['Version'];
@@ -718,13 +751,13 @@ class Browscap
preg_match_all('/(?<=\[)(?:[^\r\n]+)(?=\])/m', $iniContent, $patternPositions);
if (!isset($patternPositions[0])) {
throw new Exception('could not extract patterns from ini file');
throw new Browscap_Exception('could not extract patterns from ini file');
}
$patternPositions = $patternPositions[0];
if (!count($patternPositions)) {
throw new Exception('no patterns were found inside the ini file');
throw new Browscap_Exception('no patterns were found inside the ini file');
}
// split the ini file into sections and save the data in one line with a hash of the belonging
@@ -735,7 +768,7 @@ class Browscap
$matches = array();
if (preg_match('/.*\[DefaultProperties\]([^[]*).*/', $iniContent, $matches)) {
$properties = parse_ini_string($matches[1], true, INI_SCANNER_RAW);
$properties = $this->parseIniString($matches[1], true);
$this->_properties = array_keys($properties);
@@ -766,7 +799,7 @@ class Browscap
continue;
}
$properties = parse_ini_string($iniParts[($position + 1)], true, INI_SCANNER_RAW);
$properties = $this->parseIniString($iniParts[($position + 1)], true);
if (empty($properties['Comment'])
|| false !== strpos($userAgent, '*')
@@ -1157,7 +1190,7 @@ class Browscap
// Check if it's possible to write to the .ini file.
if (is_file($path)) {
if (!is_writable($path)) {
throw new Exception(
throw new Browscap_Exception(
'Could not write to "' . $path . '" (check the permissions of the current/old ini file).'
);
}
@@ -1169,7 +1202,7 @@ class Browscap
fclose($test_file);
unlink($path);
} else {
throw new Exception(
throw new Browscap_Exception(
'Could not write to "' . $path . '" (check the permissions of the cache directory).'
);
}
@@ -1179,11 +1212,11 @@ class Browscap
$content = $this->_getRemoteData($url);
if (!is_string($content) || strlen($content) < 1) {
throw new Exception('Could not load .ini content from "' . $url . '"');
throw new Browscap_Exception('Could not load .ini content from "' . $url . '"');
}
if (false !== strpos('rate limit', $content)) {
throw new Exception(
throw new Browscap_Exception(
'Could not load .ini content from "' . $url . '" because the rate limit is exeeded for your IP'
);
}
@@ -1192,7 +1225,7 @@ class Browscap
$content = $this->sanitizeContent($content);
if (!file_put_contents($path, $content)) {
throw new Exception('Could not write .ini content to "' . $path . '"');
throw new Browscap_Exception('Could not write .ini content to "' . $path . '"');
}
return true;
@@ -1224,7 +1257,7 @@ class Browscap
$remote_tmstp = strtotime($remote_datetime);
if (!$remote_tmstp) {
throw new Exception("Bad datetime format from {$this->remoteVerUrl}");
throw new Browscap_Exception("Bad datetime format from {$this->remoteVerUrl}");
}
return $remote_tmstp;
@@ -1239,7 +1272,7 @@ class Browscap
protected function _getLocalMTime()
{
if (!is_readable($this->localFile) || !is_file($this->localFile)) {
throw new Exception('Local file is not readable');
throw new Browscap_Exception('Local file is not readable');
}
return filemtime($this->localFile);
@@ -1331,7 +1364,7 @@ class Browscap
if ($file !== false) {
return $file;
} else {
throw new Exception('Cannot open the local file');
throw new Browscap_Exception('Cannot open the local file');
}
case self::UPDATE_FOPEN:
if (ini_get('allow_url_fopen') && function_exists('file_get_contents')) {
@@ -1419,7 +1452,7 @@ class Browscap
}
}// else try with the next possibility
case false:
throw new Exception(
throw new Browscap_Exception(
'Your server can\'t connect to external resources. Please update the file manually.'
);
}
@@ -1452,7 +1485,7 @@ class Browscap
* @license http://www.opensource.org/licenses/MIT MIT License
* @link https://github.com/GaretJax/phpbrowscap/
*/
class Exception extends \Exception
class Browscap_Exception extends Exception
{
// nothing to do here
}
}
+2 -2
View File
@@ -104,7 +104,7 @@ $mb_marketing_agree = isset($_POST['mb_marketing_agree']) ? trim($_POST['mb_mark
//개인정보 제3자 제공 동의
$mb_thirdparty_agree = isset($_POST['mb_thirdparty_agree']) ? trim($_POST['mb_thirdparty_agree']) : "0";
$agree_items = [];
$agree_items = array();
$sql_agree = "";
// 마케팅 목적의 개인정보 수집 및 이용
if ($mb_marketing_agree == 1) {
@@ -340,4 +340,4 @@ if($result) {
alert('회원 가입 오류!', G5_URL );
}
}
+51 -10
View File
@@ -32,20 +32,61 @@ function write_toss_log($reason, $orderId = '', $status = '')
}
}
function g5_toss_http_response_code($code)
{
if (function_exists('http_response_code')) {
http_response_code($code);
return;
}
$messages = array(
200 => 'OK',
400 => 'Bad Request',
);
$message = isset($messages[$code]) ? $messages[$code] : 'Status';
header('HTTP/1.1 ' . $code . ' ' . $message);
}
function g5_toss_json_last_error_msg()
{
if (function_exists('json_last_error_msg')) {
return json_last_error_msg();
}
if (!function_exists('json_last_error')) {
return 'JSON error';
}
switch (json_last_error()) {
case JSON_ERROR_NONE:
return 'No error';
case JSON_ERROR_DEPTH:
return 'Maximum stack depth exceeded';
case JSON_ERROR_STATE_MISMATCH:
return 'State mismatch';
case JSON_ERROR_CTRL_CHAR:
return 'Control character error';
case JSON_ERROR_SYNTAX:
return 'Syntax error';
}
return 'Unknown error';
}
// 입금통보 결과 데이터 읽기
$raw = file_get_contents('php://input');
if ($raw == false) {
write_toss_log("입력 데이터 읽기 실패");
http_response_code(400);
g5_toss_http_response_code(400);
exit;
}
// json 파싱 체크
$data = json_decode($raw, true);
if (!is_array($data)) {
$json_error = json_last_error_msg();
$json_error = g5_toss_json_last_error_msg();
write_toss_log("데이터 파싱 실패: " . $json_error);
http_response_code(400);
g5_toss_http_response_code(400);
exit;
}
@@ -59,7 +100,7 @@ $TOSS_TRANSACTIONKEY = sql_real_escape_string(isset($data["transactionKey"]) ? $
// orderId 형식 검증 (영문, 숫자, 하이픈, 언더스코어만 허용)
if ($TOSS_ORDERID && !preg_match('/^[a-zA-Z0-9_-]+$/', $TOSS_ORDERID)) {
write_toss_log("잘못된 orderId 형식", $TOSS_ORDERID, $TOSS_STATUS);
http_response_code(400);
g5_toss_http_response_code(400);
exit;
}
@@ -78,7 +119,7 @@ if (!$orderResult || $order_info['secret'] !== $TOSS_SECRET) {
$error_msg = isset($order_info['message']) ? $order_info['message'] : '주문 정보 조회 실패';
$error_code = isset($order_info['code']) ? $order_info['code'] : 'UNKNOWN_ERROR';
write_toss_log("주문 정보 조회 실패 - {$error_code} : {$error_msg}", $TOSS_ORDERID, $TOSS_STATUS);
http_response_code(400);
g5_toss_http_response_code(400);
exit;
}
@@ -150,7 +191,7 @@ if($TOSS_STATUS == "DONE"){
$row = sql_fetch($sql);
if(!$row['od_id']) {
write_toss_log("주문내역 조회 실패", $TOSS_ORDERID, $TOSS_STATUS);
http_response_code(400);
g5_toss_http_response_code(400);
exit;
}
@@ -244,7 +285,7 @@ elseif($TOSS_STATUS == "WAITING_FOR_DEPOSIT")
$row = sql_fetch($sql);
if(empty($row['od_id'])) {
write_toss_log("주문 데이터가 존재하지 않음", $TOSS_ORDERID, $TOSS_STATUS);
http_response_code(400);
g5_toss_http_response_code(400);
exit;
}
@@ -415,15 +456,15 @@ if($payLog) {
if ($result)
{
http_response_code(200); // 절대로 지우지마세요
g5_toss_http_response_code(200); // 절대로 지우지마세요
echo "OK";
exit;
}
else
{
http_response_code(400);
g5_toss_http_response_code(400);
echo "FAIL";
exit;
}
//*************************************************************************************
//*************************************************************************************
+5 -5
View File
@@ -61,17 +61,17 @@ $amount = $order_price;
$type = ($_POST['tr_code'] == '0') ? '소득공제' : '지출증빙';
$customerIdentityNumber = $_POST['id_info'];
$orderName = $od_name;
$customerEmail = $_POST['buyeremail'] ?: $od_email;
$customerMobilePhone = $_POST['buyertel'] ?: $od_tel;
$customerEmail = !empty($_POST['buyeremail']) ? $_POST['buyeremail'] : $od_email;
$customerMobilePhone = !empty($_POST['buyertel']) ? $_POST['buyertel'] : $od_tel;
// 토스페이먼츠 현금영수증 발급 API 호출
$toss->setCashReceiptsData([
$toss->setCashReceiptsData(array(
'orderId' => $orderId,
'amount' => $amount,
'type' => $type,
'customerIdentityNumber' => $customerIdentityNumber,
'orderName' => $goods_name,
]);
));
$toss_result = $toss->issueCashReceipt();
/*
@@ -199,4 +199,4 @@ function showreceipt() // 현금 영수증 출력
</div>
<?php
include_once(G5_PATH.'/tail.sub.php');
include_once(G5_PATH.'/tail.sub.php');
+3 -3
View File
@@ -14,11 +14,11 @@ $orderId = isset($_REQUEST['orderId']) ? $_REQUEST['orderId'] : '';
$amount = isset($_REQUEST['amount']) ? $_REQUEST['amount'] : '';
$paymentKey = isset($_REQUEST['paymentKey']) ? $_REQUEST['paymentKey'] : '';
$toss->setPaymentData([
$toss->setPaymentData(array(
'orderId' => $orderId,
'amount' => $amount,
'paymentKey' => $paymentKey,
]);
));
// 장바구니 ID 설정 (바로구매 여부 확인)
$ss_cart_id = get_session('ss_direct') ? get_session('ss_cart_direct') : get_session('ss_cart_id');
@@ -48,7 +48,7 @@ $sql = "
LIMIT 1
";
$res = sql_fetch($sql);
$dt_data = [];
$dt_data = array();
if (isset($res['dt_data'])) {
$dt_data = unserialize(base64_decode($res['dt_data']));
}
+3 -3
View File
@@ -29,11 +29,11 @@ $toss = new TossPayments(
);
// 결제데이터 셋팅
$toss->setPaymentData([
$toss->setPaymentData(array(
'amount' => $amount,
'orderId' => $orderId,
'paymentKey' => $paymentKey
]);
));
$toss->setPaymentHeader();
// 결제승인 요청
@@ -105,4 +105,4 @@ if ($result) {
}
} else {
alert($toss->responseData['message'].' 코드 : '.$toss->responseData['code'], G5_SHOP_URL);
}
}
+1 -1
View File
@@ -390,7 +390,7 @@ gif, jpg, png파일만 가능하며 용량 <?php echo number_format($config['cf_
</form>
</div>
<?php include_once(__DIR__ . '/consent_modal.inc.php'); ?>
<?php include_once(dirname(__FILE__) . '/consent_modal.inc.php'); ?>
<script>
$(function() {
+5 -5
View File
@@ -210,10 +210,10 @@ $email_msg = $is_exists_email ? '등록할 이메일이 중복되었습니다.
<!-- (선택) 개인정보 제3자 제공 동의 -->
<!-- SMS 사용시에만 -->
<?php
$configKeys = ['cf_sms_use'];
$companies = ['icode' => '아이코드'];
$configKeys = array('cf_sms_use');
$companies = array('icode' => '아이코드');
$usedCompanies = [];
$usedCompanies = array();
foreach ($configKeys as $key) {
if (!empty($config[$key]) && isset($companies[$config[$key]])) {
$usedCompanies[] = $companies[$config[$key]];
@@ -295,7 +295,7 @@ $email_msg = $is_exists_email ? '등록할 이메일이 중복되었습니다.
</div>
</div>
<?php include_once(__DIR__ . '/consent_modal.inc.php'); ?>
<?php include_once(dirname(__FILE__) . '/consent_modal.inc.php'); ?>
<script>
$(function() {
@@ -462,4 +462,4 @@ $email_msg = $is_exists_email ? '등록할 이메일이 중복되었습니다.
});
</script>
<!-- } 회원정보 입력/수정 끝 -->
<!-- } 회원정보 입력/수정 끝 -->
@@ -327,10 +327,10 @@ if ($config['cf_cert_use'] && ($config['cf_cert_simple'] || $config['cf_cert_ipi
<!-- (선택) 개인정보 제3자 제공 동의 -->
<!-- SMS 사용시에만 -->
<?php
$configKeys = ['cf_sms_use'];
$companies = ['icode' => '아이코드'];
$configKeys = array('cf_sms_use');
$companies = array('icode' => '아이코드');
$usedCompanies = [];
$usedCompanies = array();
foreach ($configKeys as $key) {
if (!empty($config[$key]) && isset($companies[$config[$key]])) {
$usedCompanies[] = $companies[$config[$key]];
@@ -377,7 +377,7 @@ if ($config['cf_cert_use'] && ($config['cf_cert_simple'] || $config['cf_cert_ipi
</div>
</form>
<?php include_once(__DIR__ . '/consent_modal.inc.php'); ?>
<?php include_once(dirname(__FILE__) . '/consent_modal.inc.php'); ?>
<script>
$(function() {
@@ -627,4 +627,4 @@ if ($config['cf_cert_use'] && ($config['cf_cert_simple'] || $config['cf_cert_ipi
childPromo.forEach(cb => cb.addEventListener('change', syncParentFromChildren));
});
</script>
</div>
</div>
@@ -339,10 +339,10 @@ gif, jpg, png파일만 가능하며 용량 <?php echo number_format($config['cf_
<!-- (선택) 개인정보 제3자 제공 동의 -->
<!-- SMS 사용시에만 -->
<?php
$configKeys = ['cf_sms_use'];
$companies = ['icode' => '아이코드'];
$configKeys = array('cf_sms_use');
$companies = array('icode' => '아이코드');
$usedCompanies = [];
$usedCompanies = array();
foreach ($configKeys as $key) {
if (!empty($config[$key]) && isset($companies[$config[$key]])) {
$usedCompanies[] = $companies[$config[$key]];
@@ -390,7 +390,7 @@ gif, jpg, png파일만 가능하며 용량 <?php echo number_format($config['cf_
</form>
</div>
<?php include_once(__DIR__ . '/consent_modal.inc.php'); ?>
<?php include_once(dirname(__FILE__) . '/consent_modal.inc.php'); ?>
<script>
$(function() {
@@ -626,4 +626,4 @@ document.addEventListener('DOMContentLoaded', function () {
</script>
<!-- } 회원정보 입력/수정 끝 -->
<!-- } 회원정보 입력/수정 끝 -->