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 값이 있으면 글읽기
|
// wr_id 값이 있으면 글읽기
|
||||||
if ((isset($wr_id) && $wr_id) || (isset($wr_seo_title) && $wr_seo_title)) {
|
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글이 삭제되었거나 이동된 경우입니다.';
|
$msg = '글이 존재하지 않습니다.\\n\\n글이 삭제되었거나 이동된 경우입니다.';
|
||||||
alert($msg, get_pretty_url($bo_table));
|
alert($msg, get_pretty_url($bo_table));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -75,9 +75,13 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
|||||||
if($w == 'cu') {
|
if($w == 'cu') {
|
||||||
$sql = " select wr_id, wr_content, mb_id from $write_table where wr_id = '$c_id' and wr_is_comment = '1' ";
|
$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);
|
$cmt = sql_fetch($sql);
|
||||||
if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id'])))
|
if (isset($cmt)) {
|
||||||
$cmt['wr_content'] = '';
|
if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id']))) {
|
||||||
$c_wr_content = $cmt['wr_content'];
|
$cmt['wr_content'] = '';
|
||||||
|
}
|
||||||
|
$c_wr_content = $cmt['wr_content'];
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|||||||
@ -75,9 +75,12 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
|||||||
if($w == 'cu') {
|
if($w == 'cu') {
|
||||||
$sql = " select wr_id, wr_content, mb_id from $write_table where wr_id = '$c_id' and wr_is_comment = '1' ";
|
$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);
|
$cmt = sql_fetch($sql);
|
||||||
if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id'])))
|
if (isset($cmt)) {
|
||||||
$cmt['wr_content'] = '';
|
if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id']))) {
|
||||||
$c_wr_content = $cmt['wr_content'];
|
$cmt['wr_content'] = '';
|
||||||
|
}
|
||||||
|
$c_wr_content = $cmt['wr_content'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|||||||
@ -58,9 +58,12 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
|||||||
if($w == 'cu') {
|
if($w == 'cu') {
|
||||||
$sql = " select wr_id, wr_content, mb_id from $write_table where wr_id = '$c_id' and wr_is_comment = '1' ";
|
$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);
|
$cmt = sql_fetch($sql);
|
||||||
if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id'])))
|
if (isset($cmt)) {
|
||||||
$cmt['wr_content'] = '';
|
if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id']))) {
|
||||||
$c_wr_content = $cmt['wr_content'];
|
$cmt['wr_content'] = '';
|
||||||
|
}
|
||||||
|
$c_wr_content = $cmt['wr_content'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|||||||
@ -58,9 +58,12 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
|||||||
if($w == 'cu') {
|
if($w == 'cu') {
|
||||||
$sql = " select wr_id, wr_content, mb_id from $write_table where wr_id = '$c_id' and wr_is_comment = '1' ";
|
$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);
|
$cmt = sql_fetch($sql);
|
||||||
if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id'])))
|
if (isset($cmt)) {
|
||||||
$cmt['wr_content'] = '';
|
if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id']))) {
|
||||||
$c_wr_content = $cmt['wr_content'];
|
$cmt['wr_content'] = '';
|
||||||
|
}
|
||||||
|
$c_wr_content = $cmt['wr_content'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|||||||
@ -75,9 +75,13 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
|||||||
if($w == 'cu') {
|
if($w == 'cu') {
|
||||||
$sql = " select wr_id, wr_content, mb_id from $write_table where wr_id = '$c_id' and wr_is_comment = '1' ";
|
$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);
|
$cmt = sql_fetch($sql);
|
||||||
if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id'])))
|
if (isset($cmt)) {
|
||||||
$cmt['wr_content'] = '';
|
if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id']))) {
|
||||||
$c_wr_content = $cmt['wr_content'];
|
$cmt['wr_content'] = '';
|
||||||
|
}
|
||||||
|
$c_wr_content = $cmt['wr_content'];
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|||||||
@ -75,9 +75,12 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
|||||||
if($w == 'cu') {
|
if($w == 'cu') {
|
||||||
$sql = " select wr_id, wr_content, mb_id from $write_table where wr_id = '$c_id' and wr_is_comment = '1' ";
|
$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);
|
$cmt = sql_fetch($sql);
|
||||||
if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id'])))
|
if (isset($cmt)) {
|
||||||
$cmt['wr_content'] = '';
|
if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id']))) {
|
||||||
$c_wr_content = $cmt['wr_content'];
|
$cmt['wr_content'] = '';
|
||||||
|
}
|
||||||
|
$c_wr_content = $cmt['wr_content'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|||||||
@ -58,9 +58,12 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
|||||||
if($w == 'cu') {
|
if($w == 'cu') {
|
||||||
$sql = " select wr_id, wr_content, mb_id from $write_table where wr_id = '$c_id' and wr_is_comment = '1' ";
|
$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);
|
$cmt = sql_fetch($sql);
|
||||||
if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id'])))
|
if (isset($cmt)) {
|
||||||
$cmt['wr_content'] = '';
|
if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id']))) {
|
||||||
$c_wr_content = $cmt['wr_content'];
|
$cmt['wr_content'] = '';
|
||||||
|
}
|
||||||
|
$c_wr_content = $cmt['wr_content'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|||||||
@ -58,9 +58,12 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
|||||||
if($w == 'cu') {
|
if($w == 'cu') {
|
||||||
$sql = " select wr_id, wr_content, mb_id from $write_table where wr_id = '$c_id' and wr_is_comment = '1' ";
|
$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);
|
$cmt = sql_fetch($sql);
|
||||||
if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id'])))
|
if (isset($cmt)) {
|
||||||
$cmt['wr_content'] = '';
|
if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id']))) {
|
||||||
$c_wr_content = $cmt['wr_content'];
|
$cmt['wr_content'] = '';
|
||||||
|
}
|
||||||
|
$c_wr_content = $cmt['wr_content'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|||||||
Reference in New Issue
Block a user