PHP80 버전에서 경고문이 나오는 코드 및 글 이동시 오류 현상 수정

This commit is contained in:
thisgun
2021-01-06 09:59:33 +09:00
parent 242eed5b35
commit e5ab7456f2
9 changed files with 34 additions and 36 deletions

View File

@ -1,4 +1,5 @@
<?php
$sub_menu = "900600";
include_once('./_common.php');
auth_check_menu($auth, $sub_menu, "r");
@ -46,18 +47,16 @@ if ($sw == 'move')
$msg = '해당 이모티콘을 선택한 그룹으로 이동 하였습니다.';
$opener_href = './form_list.php?page='.$page;
echo <<<HEREDOC
?>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<script>
alert("$msg");
opener.document.location.href = "$opener_href";
alert("<?php echo $msg; ?>");
opener.document.location.href = "<?php echo $opener_href; ?>";
window.close();
</script>
<noscript>
<p>
"$msg"
<?php echo $msg; ?>
</p>
<a href="$opener_href">돌아가기</a>
</noscript>
HEREDOC;
<a href="<?php echo $opener_href; ?>">돌아가기</a>
</noscript>

View File

@ -34,7 +34,7 @@ if ($st == 'all') {
}
$total_res = sql_fetch("select count(*) as cnt from {$g5['sms5_form_table']} where 1 $sql_group $sql_search");
$total_count = $total_res['cnt'];
$total_count = isset($total_res['cnt']) ? $total_res['cnt'] : 0;
$total_page = (int)($total_count/$page_size) + ($total_count%$page_size==0 ? 0 : 1);
$page_start = $page_size * ( $page - 1 );
@ -46,7 +46,7 @@ $qry = sql_query("select * from {$g5['sms5_form_group_table']} order by fg_name"
while ($res = sql_fetch_array($qry)) array_push($group, $res);
$res = sql_fetch("select count(*) as cnt from {$g5['sms5_form_table']} where fg_no=0");
$no_count = $res['cnt'];
$no_count = isset($res['cnt']) ? $res['cnt'] : 0;
include_once(G5_ADMIN_PATH.'/admin.head.php');
?>
@ -146,6 +146,7 @@ function multi_update(sel)
<form name="emoticonlist" id="emoticonlist" method="post" action="./form_multi_update.php" onsubmit="return emoticonlist_submit(this);" >
<input type="hidden" name="page" value="<?php echo $page; ?>">
<input type="hidden" name="token" value="<?php echo $token; ?>">
<input type="hidden" name="fg_no" value="<?php echo $fg_no; ?>">
<input type="hidden" name="sw" value="">
<input type="hidden" name="atype" value="del">
<ul id="sms5_preset" class="sms5_box">
@ -234,7 +235,7 @@ function select_copy(sw, f) {
}
</script>
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, $_SERVER['SCRIPT_NAME']."?fg_no=$fg_no&amp;st=$st&amp;sv=$sv&amp;page="); ?>
<?php
echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, $_SERVER['SCRIPT_NAME']."?fg_no=$fg_no&amp;st=$st&amp;sv=$sv&amp;page=");
include_once(G5_ADMIN_PATH.'/admin.tail.php');

View File

@ -8,6 +8,7 @@ check_admin_token();
$post_fo_no = (isset($_POST['fo_no']) && is_array($_POST['fo_no'])) ? $_POST['fo_no'] : array();
$atype = isset($_POST['atype']) ? clean_xss_tags($_POST['atype'], 1, 1) : '';
$fg_no = isset($_POST['fg_no']) ? (int) $_POST['fg_no'] : 0;
if($atype == "del"){
$count = count($post_fo_no);
@ -27,4 +28,4 @@ if($atype == "del"){
sql_query("update {$g5['sms5_form_group_table']} set fg_count = fg_count - 1 where fg_no='{$res['fg_no']}'");
}
}
goto_url('./form_list.php');
goto_url('./form_list.php?fg_no='.$fg_no);

View File

@ -7,6 +7,7 @@ auth_check_menu($auth, $sub_menu, "w");
$fo_name = isset($_REQUEST['fo_name']) ? strip_tags(clean_xss_attributes($_REQUEST['fo_name'])) : '';
$fo_content = isset($_REQUEST['fo_content']) ? strip_tags(clean_xss_attributes($_REQUEST['fo_content'])) : '';
$fo_receipt = isset($_REQUEST['fo_receipt']) ? clean_xss_tags($_REQUEST['fo_receipt'], 1, 1) : '';
$get_fg_no = '';
$g5['title'] = "이모티콘 업데이트";