php8.0 버전 호환 코드 적용 및 PHP 끝 태그 삭제 일괄적용

This commit is contained in:
thisgun
2021-01-04 15:39:15 +09:00
parent 131b170b54
commit 27e9af5e42
1009 changed files with 12120 additions and 10849 deletions

View File

@ -3,24 +3,24 @@ include_once('./_common.php');
$po_run = false;
if($it['it_id']) {
if(isset($it['it_id']) && $it['it_id']) {
$opt_subject = explode(',', $it['it_option_subject']);
$opt1_subject = $opt_subject[0];
$opt2_subject = $opt_subject[1];
$opt3_subject = $opt_subject[2];
$opt1_subject = isset($opt_subject[0]) ? $opt_subject[0] : '';
$opt2_subject = isset($opt_subject[1]) ? $opt_subject[1] : '';
$opt3_subject = isset($opt_subject[2]) ? $opt_subject[2] : '';
$sql = " select * from {$g5['g5_shop_item_option_table']} where io_type = '0' and it_id = '{$it['it_id']}' order by io_no asc ";
$result = sql_query($sql);
if(sql_num_rows($result))
$po_run = true;
} else if(!empty($_POST)) {
$opt1_subject = preg_replace(G5_OPTION_ID_FILTER, '', trim(stripslashes($_POST['opt1_subject'])));
$opt2_subject = preg_replace(G5_OPTION_ID_FILTER, '', trim(stripslashes($_POST['opt2_subject'])));
$opt3_subject = preg_replace(G5_OPTION_ID_FILTER, '', trim(stripslashes($_POST['opt3_subject'])));
$opt1_subject = isset($_POST['opt1_subject']) ? preg_replace(G5_OPTION_ID_FILTER, '', trim(stripslashes($_POST['opt1_subject']))) : '';
$opt2_subject = isset($_POST['opt2_subject']) ? preg_replace(G5_OPTION_ID_FILTER, '', trim(stripslashes($_POST['opt2_subject']))) : '';
$opt3_subject = isset($_POST['opt3_subject']) ? preg_replace(G5_OPTION_ID_FILTER, '', trim(stripslashes($_POST['opt3_subject']))) : '';
$opt1_val = preg_replace(G5_OPTION_ID_FILTER, '', trim(stripslashes($_POST['opt1'])));
$opt2_val = preg_replace(G5_OPTION_ID_FILTER, '', trim(stripslashes($_POST['opt2'])));
$opt3_val = preg_replace(G5_OPTION_ID_FILTER, '', trim(stripslashes($_POST['opt3'])));
$opt1_val = isset($_POST['opt1']) ? preg_replace(G5_OPTION_ID_FILTER, '', trim(stripslashes($_POST['opt1']))) : '';
$opt2_val = isset($_POST['opt2']) ? preg_replace(G5_OPTION_ID_FILTER, '', trim(stripslashes($_POST['opt2']))) : '';
$opt3_val = isset($_POST['opt3']) ? preg_replace(G5_OPTION_ID_FILTER, '', trim(stripslashes($_POST['opt3']))) : '';
if(!$opt1_subject || !$opt1_val) {
echo '옵션1과 옵션1 항목을 입력해 주십시오.';
@ -68,13 +68,13 @@ if($po_run) {
</thead>
<tbody>
<?php
if($it['it_id']) {
if(isset($it['it_id']) && $it['it_id']) {
for($i=0; $row=sql_fetch_array($result); $i++) {
$opt_id = $row['io_id'];
$opt_val = explode(chr(30), $opt_id);
$opt_1 = $opt_val[0];
$opt_2 = $opt_val[1];
$opt_3 = $opt_val[2];
$opt_2 = isset($opt_val[1]) ? $opt_val[1] : '';
$opt_3 = isset($opt_val[2]) ? $opt_val[2] : '';
$opt_2_len = strlen($opt_2);
$opt_3_len = strlen($opt_3);
$opt_price = $row['io_price'];
@ -112,14 +112,18 @@ if($po_run) {
<?php
} // for
} else {
$w = isset($_POST['w']) ? $_POST['w'] : '';
$post_it_id = isset($_POST['it_id']) ? safe_replace_regex($_POST['it_id'], 'it_id') : '';
for($i=0; $i<$opt1_count; $i++) {
$j = 0;
do {
$k = 0;
do {
$opt_1 = strip_tags(trim($opt1[$i]));
$opt_2 = strip_tags(trim($opt2[$j]));
$opt_3 = strip_tags(trim($opt3[$k]));
$opt_1 = isset($opt1[$i]) ? strip_tags(trim($opt1[$i])) : '';
$opt_2 = isset($opt2[$j]) ? strip_tags(trim($opt2[$j])) : '';
$opt_3 = isset($opt3[$k]) ? strip_tags(trim($opt3[$k])) : '';
$opt_2_len = strlen($opt_2);
$opt_3_len = strlen($opt_3);
@ -135,10 +139,10 @@ if($po_run) {
$opt_use = 1;
// 기존에 설정된 값이 있는지 체크
if($_POST['w'] == 'u') {
if($w === 'u') {
$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']}'
where it_id = '{$post_it_id}'
and io_id = '$opt_id'
and io_type = '0' ";
$row = sql_fetch($sql);
@ -216,5 +220,4 @@ if($po_run) {
<button type="button" id="opt_value_apply" class="btn_frmline">일괄적용</button>
</fieldset>
<?php
}
?>
}