hook 이벤트 추가 및 php 7.2 버전에 일어나는 최신글 count 오류 수정
This commit is contained in:
@ -88,5 +88,5 @@ delete_cache_latest($bo_table);
|
||||
|
||||
run_event('bbs_delete_comment', $comment_id, $board);
|
||||
|
||||
goto_url(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$write['wr_parent'].'&page='.$page. $qstr);
|
||||
goto_url(short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$write['wr_parent'].'&page='.$page. $qstr));
|
||||
?>
|
||||
|
||||
@ -8,24 +8,25 @@ if ($is_admin != 'super')
|
||||
|
||||
$board = array();
|
||||
$save_bo_table = array();
|
||||
$save_wr_id = array();
|
||||
|
||||
for($i=0;$i<count($_POST['chk_bn_id']);$i++)
|
||||
{
|
||||
// 실제 번호를 넘김
|
||||
$k = $_POST['chk_bn_id'][$i];
|
||||
|
||||
$bo_table = $_POST['bo_table'][$k];
|
||||
$wr_id = $_POST['wr_id'][$k];
|
||||
$bo_table = isset($_POST['bo_table'][$k]) ? preg_replace('/[^a-z0-9_]/i', '', $_POST['bo_table'][$k]) : '';
|
||||
$wr_id = isset($_POST['wr_id'][$k]) ? preg_replace('/[^0-9]/i', '', $_POST['wr_id'][$k]) : 0;
|
||||
|
||||
$save_bo_table[] = $bo_table;
|
||||
$save_bo_table[$i] = $bo_table;
|
||||
$save_wr_id[$i] = $wr_id;
|
||||
|
||||
$write_table = $g5['write_prefix'].$bo_table;
|
||||
|
||||
if ($board['bo_table'] != $bo_table)
|
||||
$board = sql_fetch(" select bo_subject, bo_write_point, bo_comment_point, bo_notice from {$g5['board_table']} where bo_table = '$bo_table' ");
|
||||
|
||||
$sql = " select * from $write_table where wr_id = '$wr_id' ";
|
||||
$write = sql_fetch($sql);
|
||||
$write = get_write($write_table, $wr_id);
|
||||
if (!$write) continue;
|
||||
|
||||
// 원글 삭제
|
||||
@ -138,12 +139,11 @@ for($i=0;$i<count($_POST['chk_bn_id']);$i++)
|
||||
}
|
||||
}
|
||||
|
||||
$save_bo_table = array_unique($save_bo_table);
|
||||
foreach ($save_bo_table as $key=>$value) {
|
||||
delete_cache_latest($value);
|
||||
}
|
||||
|
||||
run_event('bbs_new_delete', $chk_bn_id, $save_bo_table);
|
||||
run_event('bbs_new_delete', $chk_bn_id, $save_bo_table, $save_wr_id);
|
||||
|
||||
goto_url("new.php?sfl=$sfl&stx=$stx&page=$page");
|
||||
?>
|
||||
@ -10,7 +10,7 @@ add_stylesheet('<link rel="stylesheet" href="'.G5_JS_URL.'/owlcarousel/owl.carou
|
||||
add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css">', 0);
|
||||
$thumb_width = 138;
|
||||
$thumb_height = 80;
|
||||
$list_count = count($list);
|
||||
$list_count = (is_array($list) && $list) ? count($list) : 0;
|
||||
$divisor_count = 4;
|
||||
$start_page_num = $list_count ? '1' : '0';
|
||||
$is_show_next_prev = ($list_count > 4) ? 1 : 0;
|
||||
|
||||
@ -3,14 +3,14 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
|
||||
add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css">', 0);
|
||||
$list_count = (is_array($list) && $list) ? count($list) : 0;
|
||||
?>
|
||||
|
||||
<div class="cm_lt">
|
||||
<h2 class="cm_lt_title"><a href="<?php echo get_pretty_url($bo_table); ?>">최신댓글</a></h2>
|
||||
<ul>
|
||||
<?php
|
||||
$count = count($list);
|
||||
for ($i=0; $i<$count; $i++) {
|
||||
for ($i=0; $i<$list_count; $i++) {
|
||||
?>
|
||||
<li>
|
||||
<span class="cm_lt_nick"><?php echo get_member_profile_img($member['mb_id']); ?></span>
|
||||
@ -24,7 +24,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css">',
|
||||
<?php
|
||||
}
|
||||
|
||||
if($i ==0)
|
||||
if($list_count ==0)
|
||||
echo '<li class="empty_li">게시물이 없습니다.</li>'.PHP_EOL;
|
||||
?>
|
||||
</ul>
|
||||
|
||||
@ -4,12 +4,13 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
|
||||
add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css">', 0);
|
||||
add_javascript('<script src="'.G5_JS_URL.'/jquery.bxslider.js"></script>', 10);
|
||||
$list_count = (is_array($list) && $list) ? count($list) : 0;
|
||||
?>
|
||||
|
||||
<div class="notice ft_cnt">
|
||||
<h2><a href="<?php echo get_pretty_url($bo_table); ?>"><?php echo $bo_subject ?></a></h2>
|
||||
<ul>
|
||||
<?php for ($i=0; $i<count($list); $i++) { ?>
|
||||
<?php for ($i=0; $i<$list_count; $i++) { ?>
|
||||
<li>
|
||||
<?php
|
||||
if ($list[$i]['icon_secret']) echo "<span class=\"lock_icon\"><i class=\"fa fa-lock\" aria-hidden=\"true\"></i></span> ";
|
||||
@ -35,7 +36,7 @@ add_javascript('<script src="'.G5_JS_URL.'/jquery.bxslider.js"></script>', 10);
|
||||
?>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if (count($list) == 0) { //게시물이 없을 때 ?>
|
||||
<?php if ($list_count == 0) { //게시물이 없을 때 ?>
|
||||
<li class="empty_li">게시물이 없습니다.</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
|
||||
@ -3,12 +3,13 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
|
||||
add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css">', 0);
|
||||
$list_count = (is_array($list) && $list) ? count($list) : 0;
|
||||
?>
|
||||
|
||||
<div class="lat">
|
||||
<h2 class="lat_title"><a href="<?php echo get_pretty_url($bo_table); ?>"><?php echo $bo_subject ?></a></h2>
|
||||
<ul>
|
||||
<?php for ($i=0; $i<count($list); $i++) { ?>
|
||||
<?php for ($i=0; $i<$list_count; $i++) { ?>
|
||||
<li class="basic_li">
|
||||
<?php
|
||||
if ($list[$i]['icon_secret']) echo "<i class=\"fa fa-lock\" aria-hidden=\"true\"></i><span class=\"sound_only\">비밀글</span> ";
|
||||
@ -40,7 +41,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css">',
|
||||
</div>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if (count($list) == 0) { //게시물이 없을 때 ?>
|
||||
<?php if ($list_count == 0) { //게시물이 없을 때 ?>
|
||||
<li class="empty_li">게시물이 없습니다.</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
|
||||
@ -4,12 +4,13 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
|
||||
add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css">', 0);
|
||||
add_javascript('<script src="'.G5_JS_URL.'/jquery.bxslider.js"></script>', 10);
|
||||
$list_count = (is_array($list) && $list) ? count($list) : 0;
|
||||
?>
|
||||
|
||||
<div class="notice ft_cnt">
|
||||
<h2><a href="<?php echo get_pretty_url($bo_table); ?>"><?php echo $bo_subject ?></a></h2>
|
||||
<ul>
|
||||
<?php for ($i=0; $i<count($list); $i++) { ?>
|
||||
<?php for ($i=0; $i<$list_count; $i++) { ?>
|
||||
<li>
|
||||
<?php
|
||||
if ($list[$i]['icon_secret']) echo "<span class=\"lock_icon\"><i class=\"fa fa-lock\" aria-hidden=\"true\"></i></span> ";
|
||||
@ -35,7 +36,7 @@ add_javascript('<script src="'.G5_JS_URL.'/jquery.bxslider.js"></script>', 10);
|
||||
?>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if (count($list) == 0) { //게시물이 없을 때 ?>
|
||||
<?php if ($list_count == 0) { //게시물이 없을 때 ?>
|
||||
<li class="empty_li">게시물이 없습니다.</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
|
||||
@ -6,13 +6,14 @@ include_once(G5_LIB_PATH.'/thumbnail.lib.php');
|
||||
add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css">', 0);
|
||||
$thumb_width = 210;
|
||||
$thumb_height = 150;
|
||||
$list_count = (is_array($list) && $list) ? count($list) : 0;
|
||||
?>
|
||||
|
||||
<div class="pic_lt">
|
||||
<h2 class="lat_title"><a href="<?php echo get_pretty_url($bo_table); ?>"><?php echo $bo_subject ?></a></h2>
|
||||
<ul>
|
||||
<?php
|
||||
for ($i=0; $i<count($list); $i++) {
|
||||
for ($i=0; $i<$list_count; $i++) {
|
||||
$thumb = get_list_thumbnail($bo_table, $list[$i]['wr_id'], $thumb_width, $thumb_height, false, true);
|
||||
|
||||
if($thumb['src']) {
|
||||
@ -56,7 +57,7 @@ $thumb_height = 150;
|
||||
</div>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if (count($list) == 0) { //게시물이 없을 때 ?>
|
||||
<?php if ($list_count == 0) { //게시물이 없을 때 ?>
|
||||
<li class="empty_li">게시물이 없습니다.</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
|
||||
@ -6,13 +6,14 @@ include_once(G5_LIB_PATH.'/thumbnail.lib.php');
|
||||
add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css">', 0);
|
||||
$thumb_width = 297;
|
||||
$thumb_height = 212;
|
||||
$list_count = (is_array($list) && $list) ? count($list) : 0;
|
||||
?>
|
||||
|
||||
<div class="pic_li_lt">
|
||||
<h2 class="lat_title"><a href="<?php echo get_pretty_url($bo_table); ?>"><?php echo $bo_subject ?></a></h2>
|
||||
<ul>
|
||||
<?php
|
||||
for ($i=0; $i<count($list); $i++) {
|
||||
for ($i=0; $i<$list_count; $i++) {
|
||||
|
||||
$img_link_html = '';
|
||||
|
||||
@ -63,7 +64,7 @@ $thumb_height = 212;
|
||||
</div>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if (count($list) == 0) { //게시물이 없을 때 ?>
|
||||
<?php if ($list_count == 0) { //게시물이 없을 때 ?>
|
||||
<li class="empty_li">게시물이 없습니다.</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
|
||||
@ -10,7 +10,7 @@ add_stylesheet('<link rel="stylesheet" href="'.G5_JS_URL.'/owlcarousel/owl.carou
|
||||
add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css">', 0);
|
||||
$thumb_width = 138;
|
||||
$thumb_height = 80;
|
||||
$list_count = count($list);
|
||||
$list_count = (is_array($list) && $list) ? count($list) : 0;
|
||||
$divisor_count = 4;
|
||||
$start_page_num = $list_count ? '1' : '0';
|
||||
$is_show_next_prev = ($list_count > 4) ? 1 : 0;
|
||||
|
||||
@ -3,14 +3,14 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
|
||||
add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css">', 0);
|
||||
$list_count = (is_array($list) && $list) ? count($list) : 0;
|
||||
?>
|
||||
|
||||
<div class="cm_lt">
|
||||
<h2 class="cm_lt_title"><a href="<?php echo get_pretty_url($bo_table); ?>">최신댓글</a></h2>
|
||||
<ul>
|
||||
<?php
|
||||
$count = count($list);
|
||||
for ($i=0; $i<$count; $i++) {
|
||||
for ($i=0; $i<$list_count; $i++) {
|
||||
?>
|
||||
<li>
|
||||
<span class="cm_lt_nick"><?php echo get_member_profile_img($member['mb_id']); ?></span>
|
||||
@ -24,7 +24,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css">',
|
||||
<?php
|
||||
}
|
||||
|
||||
if($i ==0)
|
||||
if($list_count ==0)
|
||||
echo '<li class="empty_li">게시물이 없습니다.</li>'.PHP_EOL;
|
||||
?>
|
||||
</ul>
|
||||
|
||||
@ -4,12 +4,13 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
|
||||
add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css">', 0);
|
||||
add_javascript('<script src="'.G5_JS_URL.'/jquery.bxslider.js"></script>', 10);
|
||||
$list_count = (is_array($list) && $list) ? count($list) : 0;
|
||||
?>
|
||||
|
||||
<div class="notice ft_cnt">
|
||||
<h2><a href="<?php echo get_pretty_url($bo_table); ?>"><?php echo $bo_subject ?></a></h2>
|
||||
<ul>
|
||||
<?php for ($i=0; $i<count($list); $i++) { ?>
|
||||
<?php for ($i=0; $i<$list_count; $i++) { ?>
|
||||
<li>
|
||||
<?php
|
||||
if ($list[$i]['icon_secret']) echo "<span class=\"lock_icon\"><i class=\"fa fa-lock\" aria-hidden=\"true\"></i></span> ";
|
||||
@ -35,7 +36,7 @@ add_javascript('<script src="'.G5_JS_URL.'/jquery.bxslider.js"></script>', 10);
|
||||
?>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if (count($list) == 0) { //게시물이 없을 때 ?>
|
||||
<?php if ($list_count == 0) { //게시물이 없을 때 ?>
|
||||
<li class="empty_li">게시물이 없습니다.</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
|
||||
@ -3,12 +3,13 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
|
||||
add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css">', 0);
|
||||
$list_count = (is_array($list) && $list) ? count($list) : 0;
|
||||
?>
|
||||
|
||||
<div class="lat">
|
||||
<h2 class="lat_title"><a href="<?php echo get_pretty_url($bo_table); ?>"><?php echo $bo_subject ?></a></h2>
|
||||
<ul>
|
||||
<?php for ($i=0; $i<count($list); $i++) { ?>
|
||||
<?php for ($i=0; $i<$list_count; $i++) { ?>
|
||||
<li class="basic_li">
|
||||
<?php
|
||||
if ($list[$i]['icon_secret']) echo "<i class=\"fa fa-lock\" aria-hidden=\"true\"></i><span class=\"sound_only\">비밀글</span> ";
|
||||
@ -40,7 +41,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css">',
|
||||
</div>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if (count($list) == 0) { //게시물이 없을 때 ?>
|
||||
<?php if ($list_count == 0) { //게시물이 없을 때 ?>
|
||||
<li class="empty_li">게시물이 없습니다.</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
|
||||
@ -4,12 +4,13 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
|
||||
add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css">', 0);
|
||||
add_javascript('<script src="'.G5_JS_URL.'/jquery.bxslider.js"></script>', 10);
|
||||
$list_count = (is_array($list) && $list) ? count($list) : 0;
|
||||
?>
|
||||
|
||||
<div class="notice ft_cnt">
|
||||
<h2><a href="<?php echo get_pretty_url($bo_table); ?>"><?php echo $bo_subject ?></a></h2>
|
||||
<ul>
|
||||
<?php for ($i=0; $i<count($list); $i++) { ?>
|
||||
<?php for ($i=0; $i<$list_count; $i++) { ?>
|
||||
<li>
|
||||
<?php
|
||||
if ($list[$i]['icon_secret']) echo "<span class=\"lock_icon\"><i class=\"fa fa-lock\" aria-hidden=\"true\"></i></span> ";
|
||||
@ -35,7 +36,7 @@ add_javascript('<script src="'.G5_JS_URL.'/jquery.bxslider.js"></script>', 10);
|
||||
?>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if (count($list) == 0) { //게시물이 없을 때 ?>
|
||||
<?php if ($list_count == 0) { //게시물이 없을 때 ?>
|
||||
<li class="empty_li">게시물이 없습니다.</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
|
||||
@ -6,13 +6,14 @@ include_once(G5_LIB_PATH.'/thumbnail.lib.php');
|
||||
add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css">', 0);
|
||||
$thumb_width = 210;
|
||||
$thumb_height = 150;
|
||||
$list_count = (is_array($list) && $list) ? count($list) : 0;
|
||||
?>
|
||||
|
||||
<div class="pic_lt">
|
||||
<h2 class="lat_title"><a href="<?php echo get_pretty_url($bo_table); ?>"><?php echo $bo_subject ?></a></h2>
|
||||
<ul>
|
||||
<?php
|
||||
for ($i=0; $i<count($list); $i++) {
|
||||
for ($i=0; $i<$list_count; $i++) {
|
||||
$thumb = get_list_thumbnail($bo_table, $list[$i]['wr_id'], $thumb_width, $thumb_height, false, true);
|
||||
|
||||
if($thumb['src']) {
|
||||
@ -56,7 +57,7 @@ $thumb_height = 150;
|
||||
</div>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if (count($list) == 0) { //게시물이 없을 때 ?>
|
||||
<?php if ($list_count == 0) { //게시물이 없을 때 ?>
|
||||
<li class="empty_li">게시물이 없습니다.</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
|
||||
@ -6,13 +6,14 @@ include_once(G5_LIB_PATH.'/thumbnail.lib.php');
|
||||
add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css">', 0);
|
||||
$thumb_width = 297;
|
||||
$thumb_height = 212;
|
||||
$list_count = (is_array($list) && $list) ? count($list) : 0;
|
||||
?>
|
||||
|
||||
<div class="pic_li_lt">
|
||||
<h2 class="lat_title"><a href="<?php echo get_pretty_url($bo_table); ?>"><?php echo $bo_subject ?></a></h2>
|
||||
<ul>
|
||||
<?php
|
||||
for ($i=0; $i<count($list); $i++) {
|
||||
for ($i=0; $i<$list_count; $i++) {
|
||||
|
||||
$img_link_html = '';
|
||||
|
||||
@ -63,7 +64,7 @@ $thumb_height = 212;
|
||||
</div>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if (count($list) == 0) { //게시물이 없을 때 ?>
|
||||
<?php if ($list_count == 0) { //게시물이 없을 때 ?>
|
||||
<li class="empty_li">게시물이 없습니다.</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user