From 1fb9b5051c2f1ca2fde45981c163c4d83df55578 Mon Sep 17 00:00:00 2001 From: kjh Date: Tue, 31 May 2022 05:53:49 +0000 Subject: [PATCH] Checked PSR-1 / PHP 8.1 Undefiend Varialbe, Type error --- adm/phpinfo.php | 4 +- adm/point_list.php | 300 ++++++++++---------- adm/point_list_delete.php | 26 +- adm/point_update.php | 18 +- adm/poll_delete.php | 9 +- adm/poll_form.php | 176 ++++++------ adm/poll_form_update.php | 83 +++--- adm/poll_list.php | 169 ++++++------ adm/popular_list.php | 340 +++++++++++------------ adm/popular_rank.php | 234 ++++++++-------- adm/qa_config.php | 565 +++++++++++++++++++------------------- adm/qa_config_update.php | 37 +-- adm/safe_check.php | 17 +- 13 files changed, 1011 insertions(+), 967 deletions(-) diff --git a/adm/phpinfo.php b/adm/phpinfo.php index 6bb61c4be..86fd47669 100644 --- a/adm/phpinfo.php +++ b/adm/phpinfo.php @@ -1,9 +1,9 @@ 전체목록'; +$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,111 @@ 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 +192,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 +}