Skip to content

Commit

Permalink
PHP 8.1 기본스킨, 테마에서 없는 글,댓글 조회시 undefined variable 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
kitrio authored and thisgun committed Jun 13, 2022
1 parent 7950307 commit 509b2c0
Show file tree
Hide file tree
Showing 9 changed files with 64 additions and 38 deletions.
4 changes: 2 additions & 2 deletions bbs/board.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
// 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));
}
Expand Down Expand Up @@ -234,4 +234,4 @@

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');
12 changes: 8 additions & 4 deletions mobile/skin/board/basic/view_comment.skin.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,13 @@
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 } ?>
Expand Down Expand Up @@ -341,4 +345,4 @@ function() {
});
});
</script>
<?php }
<?php }
11 changes: 7 additions & 4 deletions mobile/skin/board/gallery/view_comment.skin.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,12 @@
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 } ?>
Expand Down Expand Up @@ -341,4 +344,4 @@ function() {
});
});
</script>
<?php }
<?php }
13 changes: 8 additions & 5 deletions skin/board/basic/view_comment.skin.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<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>
Expand All @@ -58,9 +58,12 @@
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 } ?>
Expand Down Expand Up @@ -349,4 +352,4 @@ function() {
$("#bo_vc").toggle();
});
});
</script>
</script>
13 changes: 8 additions & 5 deletions skin/board/gallery/view_comment.skin.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<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>
Expand All @@ -58,9 +58,12 @@
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 } ?>
Expand Down Expand Up @@ -350,4 +353,4 @@ function() {
$("#bo_vc").toggle();
});
});
</script>
</script>
12 changes: 8 additions & 4 deletions theme/basic/mobile/skin/board/basic/view_comment.skin.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,13 @@
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 } ?>
Expand Down Expand Up @@ -341,4 +345,4 @@ function() {
});
});
</script>
<?php }
<?php }
11 changes: 7 additions & 4 deletions theme/basic/mobile/skin/board/gallery/view_comment.skin.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,12 @@
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 } ?>
Expand Down Expand Up @@ -341,4 +344,4 @@ function() {
});
});
</script>
<?php }
<?php }
13 changes: 8 additions & 5 deletions theme/basic/skin/board/basic/view_comment.skin.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<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>
Expand All @@ -58,9 +58,12 @@
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 } ?>
Expand Down Expand Up @@ -349,4 +352,4 @@ function() {
$("#bo_vc").toggle();
});
});
</script>
</script>
13 changes: 8 additions & 5 deletions theme/basic/skin/board/gallery/view_comment.skin.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<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>
Expand All @@ -58,9 +58,12 @@
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 } ?>
Expand Down Expand Up @@ -350,4 +353,4 @@ function() {
$("#bo_vc").toggle();
});
});
</script>
</script>

0 comments on commit 509b2c0

Please sign in to comment.