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

@ -25,7 +25,7 @@ else {
$count_chk_wr_id = (isset($_POST['chk_wr_id']) && is_array($_POST['chk_wr_id'])) ? count($_POST['chk_wr_id']) : 0;
for ($i=0; $i<count($count_chk_wr_id); $i++) {
for ($i=0; $i<$count_chk_wr_id; $i++) {
$wr_id_val = isset($_POST['chk_wr_id'][$i]) ? preg_replace('/[^0-9]/', '', $_POST['chk_wr_id'][$i]) : 0;
$wr_id_list .= $comma . $wr_id_val;
$comma = ',';

View File

@ -242,18 +242,16 @@ $opener_href = get_pretty_url($bo_table,'','&amp;page='.$page.'&amp;'.$qstr);
$opener_href1 = str_replace('&amp;', '&', $opener_href);
run_event('bbs_move_update', $bo_table, $chk_bo_table, $wr_id_list, $opener_href);
echo <<<HEREDOC
?>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<script>
alert("$msg");
opener.document.location.href = "$opener_href1";
alert("<?php echo $msg; ?>");
opener.document.location.href = "<?php echo $opener_href1; ?>";
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

@ -11,7 +11,7 @@ if (!$is_member)
}
// 게시글 존재하는지
if(!$write['wr_id'])
if(! (isset($write['wr_id']) && $write['wr_id']))
alert_close('스크랩하시려는 게시글이 존재하지 않습니다.');
$sql = " select count(*) as cnt from {$g5['scrap_table']}
@ -19,7 +19,7 @@ $sql = " select count(*) as cnt from {$g5['scrap_table']}
and bo_table = '$bo_table'
and wr_id = '$wr_id' ";
$row = sql_fetch($sql);
if ($row['cnt'])
if (isset($row['cnt']) && $row['cnt'])
{
echo '
<script>
@ -43,7 +43,7 @@ if ($wr_content && ($member['mb_level'] >= $board['bo_comment_level']))
{
$wr = get_write($write_table, $wr_id);
// 원글이 존재한다면
if ($wr['wr_id'])
if (isset($wr['wr_id']) && $wr['wr_id'])
{
// 세션의 시간 검사
@ -105,16 +105,14 @@ $sql = " update `{$g5['member_table']}` set mb_scrap_cnt = '".get_scrap_totals($
sql_query($sql);
delete_cache_latest($bo_table);
echo <<<HEREDOC
?>
<script>
if (confirm('이 글을 스크랩 하였습니다.\\n\\n지금 스크랩을 확인하시겠습니까?'))
document.location.href = './scrap.php';
if (confirm("이 글을 스크랩 하였습니다.\n\n지금 스크랩을 확인하시겠습니까?"))
document.location.href = "./scrap.php";
else
window.close();
</script>
<noscript>
<p>이 글을 스크랩 하였습니다.</p>
<a href="./scrap.php">스크랩 확인하기</a>
</noscript>
HEREDOC;
</noscript>