PHP 8.1 기본스킨, 테마에서 없는 글,댓글 조회시 undefined variable 수정
This commit is contained in:
@ -21,7 +21,7 @@ $g5['board_title'] = ((G5_IS_MOBILE && $board['bo_mobile_subject']) ? $board['bo
|
||||
// wr_id 값이 있으면 글읽기
|
||||
if ((isset($wr_id) && $wr_id) || (isset($wr_seo_title) && $wr_seo_title)) {
|
||||
// 글이 없을 경우 해당 게시판 목록으로 이동
|
||||
if (!$write['wr_id']) {
|
||||
if (!isset($write['wr_id'])) {
|
||||
$msg = '글이 존재하지 않습니다.\\n\\n글이 삭제되었거나 이동된 경우입니다.';
|
||||
alert($msg, get_pretty_url($bo_table));
|
||||
}
|
||||
@ -234,4 +234,4 @@ include_once(G5_BBS_PATH.'/board_tail.php');
|
||||
|
||||
echo "\n<!-- 사용스킨 : ".(G5_IS_MOBILE ? $board['bo_mobile_skin'] : $board['bo_skin'])." -->\n";
|
||||
|
||||
include_once(G5_PATH.'/tail.sub.php');
|
||||
include_once(G5_PATH.'/tail.sub.php');
|
||||
|
||||
@ -75,9 +75,13 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
if($w == 'cu') {
|
||||
$sql = " select wr_id, wr_content, mb_id from $write_table where wr_id = '$c_id' and wr_is_comment = '1' ";
|
||||
$cmt = sql_fetch($sql);
|
||||
if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id'])))
|
||||
$cmt['wr_content'] = '';
|
||||
$c_wr_content = $cmt['wr_content'];
|
||||
if (isset($cmt)) {
|
||||
if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id']))) {
|
||||
$cmt['wr_content'] = '';
|
||||
}
|
||||
$c_wr_content = $cmt['wr_content'];
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
<?php } ?>
|
||||
@ -341,4 +345,4 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php }
|
||||
<?php }
|
||||
|
||||
@ -75,9 +75,12 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
if($w == 'cu') {
|
||||
$sql = " select wr_id, wr_content, mb_id from $write_table where wr_id = '$c_id' and wr_is_comment = '1' ";
|
||||
$cmt = sql_fetch($sql);
|
||||
if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id'])))
|
||||
$cmt['wr_content'] = '';
|
||||
$c_wr_content = $cmt['wr_content'];
|
||||
if (isset($cmt)) {
|
||||
if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id']))) {
|
||||
$cmt['wr_content'] = '';
|
||||
}
|
||||
$c_wr_content = $cmt['wr_content'];
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php } ?>
|
||||
@ -341,4 +344,4 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php }
|
||||
<?php }
|
||||
|
||||
@ -32,7 +32,7 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
<article id="c_<?php echo $comment_id ?>" <?php if ($cmt_depth) { ?>style="margin-left:<?php echo $cmt_depth ?>px;border-top-color:#e0e0e0"<?php } ?>>
|
||||
<div class="pf_img"><?php echo get_member_profile_img($list[$i]['mb_id']); ?></div>
|
||||
|
||||
<div class="cm_wrap">
|
||||
<div class="cm_wrap">
|
||||
|
||||
<header style="z-index:<?php echo $cmt_sv; ?>">
|
||||
<h2><?php echo get_text($list[$i]['wr_name']); ?>님의 <?php if ($cmt_depth) { ?><span class="sound_only">댓글의</span><?php } ?> 댓글</h2>
|
||||
@ -58,9 +58,12 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
if($w == 'cu') {
|
||||
$sql = " select wr_id, wr_content, mb_id from $write_table where wr_id = '$c_id' and wr_is_comment = '1' ";
|
||||
$cmt = sql_fetch($sql);
|
||||
if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id'])))
|
||||
$cmt['wr_content'] = '';
|
||||
$c_wr_content = $cmt['wr_content'];
|
||||
if (isset($cmt)) {
|
||||
if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id']))) {
|
||||
$cmt['wr_content'] = '';
|
||||
}
|
||||
$c_wr_content = $cmt['wr_content'];
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php } ?>
|
||||
@ -349,4 +352,4 @@ jQuery(function($) {
|
||||
$("#bo_vc").toggle();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@ -32,7 +32,7 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
<article id="c_<?php echo $comment_id ?>" <?php if ($cmt_depth) { ?>style="margin-left:<?php echo $cmt_depth ?>px;border-top-color:#e0e0e0"<?php } ?>>
|
||||
<div class="pf_img"><?php echo get_member_profile_img($list[$i]['mb_id']) ?></div>
|
||||
|
||||
<div class="cm_wrap">
|
||||
<div class="cm_wrap">
|
||||
|
||||
<header style="z-index:<?php echo $cmt_sv; ?>">
|
||||
<h2><?php echo get_text($list[$i]['wr_name']); ?>님의 <?php if ($cmt_depth) { ?><span class="sound_only">댓글의</span><?php } ?> 댓글</h2>
|
||||
@ -58,9 +58,12 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
if($w == 'cu') {
|
||||
$sql = " select wr_id, wr_content, mb_id from $write_table where wr_id = '$c_id' and wr_is_comment = '1' ";
|
||||
$cmt = sql_fetch($sql);
|
||||
if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id'])))
|
||||
$cmt['wr_content'] = '';
|
||||
$c_wr_content = $cmt['wr_content'];
|
||||
if (isset($cmt)) {
|
||||
if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id']))) {
|
||||
$cmt['wr_content'] = '';
|
||||
}
|
||||
$c_wr_content = $cmt['wr_content'];
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php } ?>
|
||||
@ -350,4 +353,4 @@ jQuery(function($) {
|
||||
$("#bo_vc").toggle();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@ -75,9 +75,13 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
if($w == 'cu') {
|
||||
$sql = " select wr_id, wr_content, mb_id from $write_table where wr_id = '$c_id' and wr_is_comment = '1' ";
|
||||
$cmt = sql_fetch($sql);
|
||||
if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id'])))
|
||||
$cmt['wr_content'] = '';
|
||||
$c_wr_content = $cmt['wr_content'];
|
||||
if (isset($cmt)) {
|
||||
if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id']))) {
|
||||
$cmt['wr_content'] = '';
|
||||
}
|
||||
$c_wr_content = $cmt['wr_content'];
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
<?php } ?>
|
||||
@ -341,4 +345,4 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php }
|
||||
<?php }
|
||||
|
||||
@ -75,9 +75,12 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
if($w == 'cu') {
|
||||
$sql = " select wr_id, wr_content, mb_id from $write_table where wr_id = '$c_id' and wr_is_comment = '1' ";
|
||||
$cmt = sql_fetch($sql);
|
||||
if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id'])))
|
||||
$cmt['wr_content'] = '';
|
||||
$c_wr_content = $cmt['wr_content'];
|
||||
if (isset($cmt)) {
|
||||
if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id']))) {
|
||||
$cmt['wr_content'] = '';
|
||||
}
|
||||
$c_wr_content = $cmt['wr_content'];
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php } ?>
|
||||
@ -341,4 +344,4 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php }
|
||||
<?php }
|
||||
|
||||
@ -32,7 +32,7 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
<article id="c_<?php echo $comment_id ?>" <?php if ($cmt_depth) { ?>style="margin-left:<?php echo $cmt_depth ?>px;border-top-color:#e0e0e0"<?php } ?>>
|
||||
<div class="pf_img"><?php echo get_member_profile_img($list[$i]['mb_id']); ?></div>
|
||||
|
||||
<div class="cm_wrap">
|
||||
<div class="cm_wrap">
|
||||
|
||||
<header style="z-index:<?php echo $cmt_sv; ?>">
|
||||
<h2><?php echo get_text($list[$i]['wr_name']); ?>님의 <?php if ($cmt_depth) { ?><span class="sound_only">댓글의</span><?php } ?> 댓글</h2>
|
||||
@ -58,9 +58,12 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
if($w == 'cu') {
|
||||
$sql = " select wr_id, wr_content, mb_id from $write_table where wr_id = '$c_id' and wr_is_comment = '1' ";
|
||||
$cmt = sql_fetch($sql);
|
||||
if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id'])))
|
||||
$cmt['wr_content'] = '';
|
||||
$c_wr_content = $cmt['wr_content'];
|
||||
if (isset($cmt)) {
|
||||
if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id']))) {
|
||||
$cmt['wr_content'] = '';
|
||||
}
|
||||
$c_wr_content = $cmt['wr_content'];
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php } ?>
|
||||
@ -349,4 +352,4 @@ jQuery(function($) {
|
||||
$("#bo_vc").toggle();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@ -32,7 +32,7 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
<article id="c_<?php echo $comment_id ?>" <?php if ($cmt_depth) { ?>style="margin-left:<?php echo $cmt_depth ?>px;border-top-color:#e0e0e0"<?php } ?>>
|
||||
<div class="pf_img"><?php echo get_member_profile_img($list[$i]['mb_id']) ?></div>
|
||||
|
||||
<div class="cm_wrap">
|
||||
<div class="cm_wrap">
|
||||
|
||||
<header style="z-index:<?php echo $cmt_sv; ?>">
|
||||
<h2><?php echo get_text($list[$i]['wr_name']); ?>님의 <?php if ($cmt_depth) { ?><span class="sound_only">댓글의</span><?php } ?> 댓글</h2>
|
||||
@ -58,9 +58,12 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
if($w == 'cu') {
|
||||
$sql = " select wr_id, wr_content, mb_id from $write_table where wr_id = '$c_id' and wr_is_comment = '1' ";
|
||||
$cmt = sql_fetch($sql);
|
||||
if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id'])))
|
||||
$cmt['wr_content'] = '';
|
||||
$c_wr_content = $cmt['wr_content'];
|
||||
if (isset($cmt)) {
|
||||
if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id']))) {
|
||||
$cmt['wr_content'] = '';
|
||||
}
|
||||
$c_wr_content = $cmt['wr_content'];
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php } ?>
|
||||
@ -350,4 +353,4 @@ jQuery(function($) {
|
||||
$("#bo_vc").toggle();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user