<?php echo $write_pages ?> 관하여
본문
다름이 아니라 <?php echo $write_pages ?> 이부분 페이지가 많아지면 1,2,3,4이렇게 생성이되서 2를 누르면 2번째 장으로 넘ㅇ어가게되어있는건데 왜 이게 안나오는지 모르겠어요
아예 이부분이 화면상에 안나와요 왜그런가요?
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
include_once(G5_LIB_PATH.'/thumbnail.lib.php');
$thumb_width = 60; //썸네일 가로 사이즈
$thumb_height = 50; //썸네일 세로 사이즈
// 선택삭제으로 인해 셀합치기가 가변적으로 변함
$colspan = 5;
if ($is_admin) $colspan++;
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet('<link rel="stylesheet" href="'.$new_skin_url.'/style.css">', 0);
?>
<!-- 전체게시물 검색 시작 { -->
<fieldset id="new_sch">
<!-- <legend>상세검색</legend>
<form name="fnew" method="get">
<?php echo $group_select ?>
<label for="view" class="sound_only">검색대상</label>
<select name="view" id="view">
<option value="">전체게시물
<option value="w">원글만
<option value="c">코멘트만
</select>
<label for="mb_id" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
<input type="text" name="mb_id" value="<?php echo $mb_id ?>" id="mb_id" required class="frm_input required">
<input type="submit" value="검색" class="btn_submit">
<p>회원 아이디만 검색 가능</p>
</form>-->
<script>
/* 셀렉트 박스에서 자동 이동 해제
function select_change()
{
document.fnew.submit();
}
*/
document.getElementById("gr_id").value = "<?php echo $gr_id ?>";
document.getElementById("view").value = "<?php echo $view ?>";
</script>
</fieldset>
<!-- } 전체게시물 검색 끝 -->
<!-- 전체게시물 목록 시작 { -->
<form name="fnewlist" method="post" action="#" onsubmit="return fnew_submit(this);">
<input type="hidden" name="sw" value="move">
<input type="hidden" name="view" value="<?php echo $view; ?>">
<input type="hidden" name="sfl" value="<?php echo $sfl; ?>">
<input type="hidden" name="stx" value="<?php echo $stx; ?>">
<input type="hidden" name="bo_table" value="<?php echo $bo_table; ?>">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<input type="hidden" name="pressed" value="">
<div class="tbl_head01 tbl_wrap">
<table>
<thead>
<tr>
<?php if ($is_admin) { ?>
<th scope="col">
<label for="all_chk" class="sound_only">목록 전체</label>
<input type="checkbox" id="all_chk">
</th>
<?php } ?>
<th scope="col">Group</th>
<th scope="col">Board</th>
<th scope="col">Subject</th>
<th scope="col">Name</th>
<th scope="col">Date</th>
</tr>
</thead>
<tbody>
<?php
for ($i=0; $i<count($list); $i++)
{
$thumb = get_list_thumbnail($list[$i]['bo_table'], $list[$i]['wr_id'], $thumb_width, $thumb_height);
if($thumb['src']) {
$img = '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" width="'.$thumb_width.'" height="'.$thumb_height.'">';
}
$num = $total_count - ($page - 1) * $config['cf_page_rows'] - $i;
$gr_subject = cut_str($list[$i]['gr_subject'], 20);
$bo_subject = cut_str($list[$i]['bo_subject'], 20);
$wr_subject = get_text(cut_str($list[$i]['wr_subject'], 80));
?>
<tr>
<?php if ($is_admin) { ?>
<td class="td_chk">
<label for="chk_bn_id_<?php echo $i; ?>" class="sound_only"><?php echo $num?>번</label>
<input type="checkbox" name="chk_bn_id[]" value="<?php echo $i; ?>" id="chk_bn_id_<?php echo $i; ?>">
<input type="hidden" name="bo_table[<?php echo $i; ?>]" value="<?php echo $list[$i]['bo_table']; ?>">
<input type="hidden" name="wr_id[<?php echo $i; ?>]" value="<?php echo $list[$i]['wr_id']; ?>">
</td>
<?php } ?>
<td class="td_group"><a href="./new.php?gr_id=<?php echo $list[$i]['gr_id'] ?>"><?php echo $gr_subject ?></a></td>
<td class="td_board"><a href="./board.php?bo_table=<?php echo $list[$i]['bo_table'] ?>"><?php echo $bo_subject ?></a></td>
<td class="td_subject_new">
<?php if($thumb['src']) { ?>
<div class="sb_vimg"><a href="<?php echo $list[$i]['href']; ?>"><?php echo $img; ?></a></div>
<div class="sb_content" style="margin-left:<?php echo $thumb_width+12; ?>px;height:<?php echo $thumb_height ?>px">
<p><a href="<?php echo $list[$i]['href'] ?>"><?php echo $list[$i]['comment'] ?><?php echo $wr_subject ?></a></p>
</div>
<?php } else { ?>
<a href="<?php echo $list[$i]['href'] ?>"><?php echo $list[$i]['comment'] ?><?php echo $wr_subject ?></a>
<?php } ?>
</td>
<td class="td_name"><div><?php echo $list[$i]['name'] ?></div></td>
<td class="td_date"><?php echo $list[$i]['datetime2'] ?></td>
</tr>
<?php } ?>
<?php if ($i == 0)
echo '<tr><td colspan="'.$colspan.'" class="empty_table">게시물이 없습니다.</td></tr>';
?>
</tbody>
</table>
</div>
<?php if ($is_admin) { ?>
<div class="sir_bw02 sir_bw">
<input type="submit" onclick="document.pressed=this.value" value="선택삭제" class="btn_submit">
</div>
<?php } ?>
</form>
<?php if ($is_admin) { ?>
<script>
$(function(){
$('#all_chk').click(function(){
$('[name="chk_bn_id[]"]').attr('checked', this.checked);
});
});
function fnew_submit(f)
{
f.pressed.value = document.pressed;
var cnt = 0;
for (var i=0; i<f.length; i++) {
if (f.elements[i].name == "chk_bn_id[]" && f.elements[i].checked)
cnt++;
}
if (!cnt) {
alert(document.pressed+"할 게시물을 하나 이상 선택하세요.");
return false;
}
if (!confirm("선택한 게시물을 정말 "+document.pressed+" 하시겠습니까?\n\n한번 삭제한 자료는 복구할 수 없습니다")) {
return false;
}
f.action = "./new_delete.php";
return true;
}
</script>
<?php } ?>
<?php echo $write_pages ?>
<!-- } 전체게시물 목록 끝 -->
답변 2
검색해보니 이런 게 있던데
이걸 사용 중이라면 위 스킨은 본문 설명에 나와있다시피 아이프레임을 사용하고 있습니다.
제가 올렸던 스킨은 이미지가 들어가서 기본 스킨보다 세로 길이가 더 길어졌기 때문에
위 스킨에 있는 아이프레임 코드에서 세로 길이를 더 늘려야 하단이 잘리지 않습니다.
이렇게 되어 있군요.
<iframe id=memo name=tab_mypage src="<?php echo G5_SKIN_URL ?>/board/mypage/new.php?mb_id=<?php echo $member[mb_id] ?>" width="100%" height="800px" scrolling="no" frameborder="0"></iframe>
게시물이 페이지를 넘어갈 만큼 많은가요? 게시물 수가 부족하면 원래 아무것도 나오지 않습니다.
올려주신 코드 그대로 복사해서 사용해봤는데 문제가 없습니다.
혹시 bbs/new.php 파일을 수정한 적이 있다면 원본으로 교체도 해보세요.
그리고 new.php 에 있는 글은 일정 시간이 지나면 삭제되기 때문에 모든 게시판 글들이 다 나오지 않습니다.
환경설정 > 기본환경설정 > 최근게시물삭제 설정일에 영향을 받습니다.
답변을 작성하시기 전에 로그인 해주세요.