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

@ -4,7 +4,7 @@ include_once('./_common.php');
if($is_guest)
die('회원 로그인 후 이용해 주십시오.');
$count = count($_POST['chk']);
$count = (isset($_POST['chk']) && is_array($_POST['chk'])) ? count($_POST['chk']) : 0;
if (!$count) {
alert('수정하실 항목을 하나이상 선택하세요.');
@ -14,15 +14,15 @@ if ($is_member && $count) {
for ($i=0; $i<$count; $i++)
{
// 실제 번호를 넘김
$k = (int) $_POST['chk'][$i];
$ad_id = (int) $_POST['ad_id'][$k];
$k = isset($_POST['chk'][$i]) ? (int) $_POST['chk'][$i] : 0;
$ad_id = isset($_POST['ad_id'][$k]) ? (int) $_POST['ad_id'][$k] : 0;
$ad_subject = clean_xss_tags($_POST['ad_subject'][$k]);
$ad_subject = isset($_POST['ad_subject'][$k]) ? clean_xss_tags($_POST['ad_subject'][$k]) : '';
$sql = " update {$g5['g5_shop_order_address_table']}
set ad_subject = '$ad_subject' ";
if(!empty($_POST['ad_default']) && $ad_id == $_POST['ad_default']) {
if(!empty($_POST['ad_default']) && $ad_id === $_POST['ad_default']) {
sql_query(" update {$g5['g5_shop_order_address_table']} set ad_default = '0' where mb_id = '{$member['mb_id']}' ");
$sql .= ", ad_default = '1' ";
@ -35,5 +35,4 @@ if ($is_member && $count) {
}
}
goto_url(G5_SHOP_URL.'/orderaddress.php');
?>
goto_url(G5_SHOP_URL.'/orderaddress.php');