', 1); $bo_table = isset($_GET['bo_table']) ? $_GET['bo_table'] : ''; $write_table = isset($g5['write_prefix']) ? $g5['write_prefix'] . $bo_table : ''; global $board; $where = " where wr_is_comment = 0 and "; $sql_search = ""; if ($stx != "") { if ($sfl != "") { $sql_search .= " $where $sfl like '%$stx%' "; $where = " and "; } if ($save_stx != $stx) $page = 1; } if ($sca != "") { $sql_search .= " and ca_id like '$sca%' "; } //if ($sfl == "") $sfl = "it_name"; if (!$sst) { $sst = "wr_id"; $sod = "desc"; } if ($stx) { $sql_common = " from {$write_table} "; } else { $sql_common = " from {$write_table} where wr_is_comment = 0 "; } $sql_common .= $sql_search; // 테이블의 전체 레코드수만 얻음 $sql = " select count(*) as cnt " . $sql_common; $row = sql_fetch($sql); $total_count = isset($row['cnt']) ? $row['cnt'] : 0; $rows = $config['cf_page_rows']; $total_page = ceil($total_count / $rows); // 전체 페이지 계산 if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지) $from_record = ($page - 1) * $rows; // 시작 열을 구함 $sql = " select * $sql_common order by $sst $sod, wr_id desc limit $from_record, $rows "; $result = sql_query($sql); //$qstr = 'page='.$page.'&sst='.$sst.'&sod='.$sod.'&stx='.$stx; $qstr .= ($qstr ? '&' : '').'sca='.$sca.'&save_stx='.$stx; $listall = '전체목록'; //제외할 게시판이 있다면 아래 예제와 같이 추가 //$sql_wheres = " where (1) "; //$sql_wheres .= " and bo_table != 'aaa' "; //$sql_wheres .= " and bo_table != 'bbb' "; //$sql_wheres .= " and bo_table != 'ccc' "; $sql_wheres = isset($sql_wheres) ? $sql_wheres : ''; $sql_b = "SELECT bo_table, bo_subject FROM " . (isset($g5['board_table']) ? $g5['board_table'] : '') . " " . $sql_wheres . " ORDER BY bo_mobile_subject"; $res_b = sql_query($sql_b); // ?>
미선택게시판을 선택해주세요.
'; } else { echo ''; } } ?>
목록
제목 작성일 작성자 조회 관리
[]
수정
게시물이 없습니다.
게시판을 선택해주세요.
게시글 등록 게시글 등록