회원로그인 폼 회원가입 아이디찾기
SIR 디자인몰 바로가기 SIR 반응형웹 강좌 SIR 드로잉 강좌 SIR PHP 강좌

그누4 질문답변

질문드립니다. 리스트가 한개 비어서 나옵니다. 진행중

  • 음냐앙
  • 작성일시
  • 조회 272
  • 댓글 1

본문


http://sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=110872&sca=%EA%B0%A4%EB%9F%AC%EB%A6%AC&page=3

게시판을 삼관왕님이 올리신 lightbox jquery 라는 게시판을 사용하였습니다.
근데 한가지 문제가 있어서요.. 
첨부파일에 첨부해 놓은것처럼 리스트의 마지막부분이 제대로 출력되지 않습니다.
리스트 갯수를 넘어가게되면 다음페이지로 넘어가는것 까지는 되는것 같은데
왜 마지막은 비워진채로 다음페이지로 넘어가게 되는걸까요;

혹시나 해서 제가 수정한것중에 오류가 발생된건 아닌가하여
다시 다운받아 적용시켜봐도 그대로네요;;

정말 죄송하지만 답변좀 부탁드립니다.

<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가

include_once("$board_skin_path/skin.lib.php");


$thumb_width = '180';  //썸네일 폭
$thumb_height = '180'; //썸네일 높이
$thumb_quality = '95'; //썸네일 퀄리티_100 이하
if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 갤러리 게시판 입니다.");

if (!$board[bo_1]) {
    $board[bo_1] = "180";
    $sql = " update $g4[board_table] set bo_1 = '$board[bo_1]', bo_1_subj = '목록 가로 픽셀' where bo_table = '$bo_table' ";
    sql_query($sql);
}

if (!$board[bo_2]) {
    $board[bo_2] = "180";
    $sql = " update $g4[board_table] set bo_2 = '$board[bo_2]', bo_2_subj = '목록 세로 픽셀' where bo_table = '$bo_table' ";
    sql_query($sql);
}

$mod = $board[bo_gallery_cols];
$td_width = (int)(100 / $mod);

$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb';


@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);


?>

<link rel="stylesheet" type="text/css" href="<?=$board_skin_path?>/css/skin.css" media="screen" />
<!-- Arquivos utilizados pelo jQuery lightBox plugin -->
<link rel="stylesheet" type="text/css" href="<?=$board_skin_path?>/css/jquery.lightbox-0.5.css" media="screen" />
<script type="text/javascript" src="<?=$board_skin_path?>/js/jquery.lightbox-0.5.js"></script>
<script type="text/javascript">
$(function() {
$('#gallery .gall a').lightBox();
});
</script>


<div>
<? if ($is_category) { ?>

<form name='fcategory' method='get'>
<font color='#5a5a5a'>
  <? 
  $cnt_bo_1 = $bo_1[0] ? $bo_1[0] : 10; // 한줄당 분류 갯수(현재:10)
  $cnt = 2;
  $cnt0 = 0;
  $bb_s="";  $bb_e="";
  $arr = explode("|", $board[bo_category_list]); // 구분자가 , 로 되어 있음
$str = "";
$str .= "";
  $f_open="";
  $f_close="";
  for ($i=0; $i<count($arr); $i++)
  if (trim($arr[$i]))  {
$sql1 = " SELECT count(*) as cCount FROM $write_table where wr_is_comment = 0 and ca_name = '$arr[$i]' ";
  $row1 = sql_fetch($sql1);
if ($sca == $arr[$i]) { $cnt0++; $b_s="<b>";$cc=$f_open; $b_e="</b>"; } else {$b_s=""; $cc=$f_close; $b_e="";}
$str .= "<a href='./board.php?bo_table=$bo_table&sca=" . rawurlencode($arr[$i]) . "' style='color:black;'>$cc$b_s$arr[$i]$b_e</a> &nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp; ";
if ($cnt == $cnt_bo_1) { $cnt = 0; $str .= "<br>"; }
$cnt++;
  }
  if ($cnt0 == 0 ) { $bb_s="<b>"; $bb_e="</b>"; }
  ?> 



&nbsp;&nbsp;&nbsp;&nbsp;
<? if(!$sca) { ?>
<a href="./board.php?bo_table=<?=$bo_table?>" style="color:black;"><b>전체 보기</b></a> &nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;
<? } else { ?>
<a href="./board.php?bo_table=<?=$bo_table?>" style="color:black;">전체 보기</a> &nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;
<? } ?>
<?=$str?>

  </form>

<? } ?>




</div>
<!-- 게시판 목록 시작 -->
<table width="<?=$width?>" align="left" style="padding-left:300px;" cellpadding="0" cellspacing="0"><tr><td>

<!--    <? if ($is_category) { ?><form name="fcategory" method="get"><div><select name=sca onchange="location='<?=$category_location?>'+this.value;"><option value=''>전체</option><?=$category_option?></select></div></form><? } ?>
 -->





<form name="fboardlist" method="post" style="margin:0px;">
<input type="hidden" name="bo_table" value="<?=$bo_table?>">
<input type="hidden" name="sfl"  value="<?=$sfl?>">
<input type="hidden" name="stx"  value="<?=$stx?>">
<input type="hidden" name="spt"  value="<?=$spt?>">
<input type="hidden" name="page" value="<?=$page?>">
<input type="hidden" name="sw"  value="">

<div id="gallery">
<table border="0" cellpadding="0" cellspacing="0" width="100%">

<!-- tr>
  <td height=30 colspan='<?=$mod?>' align="right" style="border:1px solid #ddd; height:34px; background:url(<?=$board_skin_path?>/img/title_bg.gif) repeat-x;"><?=subject_sort_link('wr_datetime', $qstr2, 1)?>날짜순</a> | <?=subject_sort_link('wr_hit', $qstr2, 1)?>조회순</a> | <?=subject_sort_link('wr_good', $qstr2, 1)?>추천순</a></td>
</tr  -->

<tr>
 <?
    for ($i=0; $i<count($list); $i++) {
        if ($i && $i%$mod==0)
            echo "</tr><tr>";

        $style = "";
        $list[$i][subject] = str_replace(" ","&nbsp;",$list[$i][subject]);
$image = $list[$i][file][0][file];

        $comment_cnt = "";
        if ($list[$i][comment_cnt])
          $comment_cnt = " <a href=\"{$list[$i][comment_href]}\"><span class='commentFont'>{$list[$i][comment_cnt]}</span></a>";

        $list[$i][name] = preg_replace("/<img /", "<img style='display:none;' ", $list[$i][name]);
        $list[$i][name] = preg_replace("/> <span/", "><span", $list[$i][name]);
        $list[$i][name] = preg_replace("/class='member'/", "", $list[$i][name]);

        echo "<td width='{$td_width}%' valign=top style='word-break:break-all; padding:3px;'>";
        echo "<table align=center>";
        echo "<tr><td height=5></td></tr>";
        echo "<tr><td align=center><div style='float:left; border:1px solid #ccc; background:#fff; padding:3px; font-size:0; line-height:0;'><div class='gall'><a href='$g4[path]/data/file/$bo_table/$image'  ttitle=".$list[$i][subject].">".makeThumbs($g4[path]."/data/file/$bo_table", $list[$i][file][0][file], $board[bo_1], $board[bo_2])."</a></div></div></td></tr>";
        //echo "<tr><td align=center style='font-size:11px; color:#888;'>Date.".$list[$i][datetime2]." / Hit.".$list[$i][wr_hit]."</td></tr>";
        echo "<tr><td align=center>";
        //if ($is_category) echo "<a href='{$list[$i][ca_name_href]}'>[{$list[$i][ca_name]}]</a> ";
        echo "<a href='{$list[$i][href]}'>{$list[$i][subject]}</a>";
        //echo " " . $list[$i][icon_new];
        //echo " " . $list[$i][icon_file];
        //echo " " . $list[$i][icon_link];
        //echo " " . $list[$i][icon_hot];
        //echo " " . $list[$i][icon_secret];
        echo "</td></tr>";
        if ($is_checkbox) echo "<tr><td align=center><input type=checkbox name=chk_wr_id[] value='{$list[$i][wr_id]}'></td></tr>";
        echo "</table></td>\n";
    }


    // 나머지 td
    $cnt = $i%$mod;
    if ($cnt)
        for ($i=$cnt; $i<$mod; $i++)
            echo "<td width='{$td_width}%'>&nbsp;</td>";
    ?>
</tr>
<tr><td colspan='<?=$mod?>' height=20></td></tr>

<? if (count($list) == 0) { echo "<tr><td colspan='$mod' height=100 align=center>게시물이 없습니다.</td></tr>"; } ?>

</table>
</div>

</form>

<div  style="margin-top:7px; height:31px;">
    <div style="float:left;">

    <? if ($is_checkbox) { ?>
    <span class="button"><a href="javascript:select_delete();">선택삭제</a></span>
    <span class="button"><a href="javascript:select_copy('copy');">선택복사</a></span>
    <span class="button"><a href="javascript:select_copy('move');">선택이동</a></span>
<? if ($is_checkbox) { ?>
<div>
<? if ($is_checkbox) { ?><input onclick="if (this.checked) all_checked(true); else all_checked(false);" type=checkbox> 전체 선택 <?}?>
</div>
<? } ?>
    <? } ?>
    </div>

    <div style="float:right;">
<? if ($admin_href) { ?><span class="button"><a href="<?=$admin_href?>">관리자</a></span><?}?>
<? if ($write_href) { ?><span class="button"><a href="<?=$write_href?>">글쓰기</a></span><? } ?>

    </div>
<div style="clear:both;"></div>
</div>


<!-- 페이지 -->
<div style="text-align:center;  margin:5px 0 10px 0; padding:5px 0;">

    <? if ($prev_part_href) { echo "<a href='$prev_part_href'><img src='$board_skin_path/img/page_search_prev.gif' border=0 align=absmiddle title='이전검색'></a>"; } ?>
    <?
    // 기본으로 넘어오는 페이지를 아래와 같이 변환하여 이미지로도 출력할 수 있습니다.
    //echo $write_pages;
    $write_pages = str_replace("처음", "<img src='$board_skin_path/img/page_begin.gif' border='0' align='absmiddle' title='처음'>", $write_pages);
    $write_pages = str_replace("이전", "<img src='$board_skin_path/img/page_prev.gif' border='0' align='absmiddle' title='이전'>", $write_pages);
    $write_pages = str_replace("다음", "<img src='$board_skin_path/img/page_next.gif' border='0' align='absmiddle' title='다음'>", $write_pages);
    $write_pages = str_replace("맨끝", "<img src='$board_skin_path/img/page_end.gif' border='0' align='absmiddle' title='맨끝'>", $write_pages);
    $write_pages = preg_replace("/<span>([0-9]*)<\/span>/", "<b><span style=\"color:#B3B3B3; font-size:12px;\">$1</span></b>", $write_pages);
    $write_pages = preg_replace("/<b>([0-9]*)<\/b>/", "<b><span style=\" font-size:12px; text-decoration:underline;\">$1</span></b>", $write_pages);
    ?>
    <?=$write_pages?>
    <? if ($next_part_href) { echo "<a href='$next_part_href'><img src='$board_skin_path/img/page_search_next.gif' border=0 align=absmiddle title='다음검색'></a>"; } ?>

</div>

    <!-- 검색 -->
    <div class="board_search">
        <form name="fsearch" method="get">
        <input type="hidden" name="bo_table" value="<?=$bo_table?>">
        <input type="hidden" name="sca" value="<?=$sca?>">
<input type="hidden" name="sop" value="and">
        <select name="sfl">
            <option value="wr_subject">제목</option>
            <option value="wr_content">내용</option>
            <option value="wr_subject||wr_content">제목+내용</option>
<!--            <option value="mb_id,1">회원아이디</option>
            <option value="mb_id,0">회원아이디(코)</option>
            <option value="wr_name,1">글쓴이</option>
            <option value="wr_name,0">글쓴이(코)</option> -->
        </select>
        <input name="stx" style="height:16px; border:1px solid #ccc;" maxlength="15" itemname="검색어" required value='<?=stripslashes($stx)?>'>
        <input type="image" src="<?=$board_skin_path?>/img/btn_search.gif" border='0' align="absmiddle">

<input type="radio" name="sop" value="and">and
        <input type="radio" name="sop" value="or">or
       
</form>
    </div>


</td></tr></table>




<script type="text/javascript">
if ('<?=$sca?>') document.fcategory.sca.value = '<?=$sca?>';
if ('<?=$stx?>') {
    document.fsearch.sfl.value = '<?=$sfl?>';

    if ('<?=$sop?>' == 'and')
        document.fsearch.sop[0].checked = true;

    if ('<?=$sop?>' == 'or')
        document.fsearch.sop[1].checked = true;
} else {
    document.fsearch.sop[0].checked = true;
}
</script>


<? if ($is_checkbox) { ?>
<script type="text/javascript">
function all_checked(sw) {
    var f = document.fboardlist;

    for (var i=0; i<f.length; i++) {
        if (f.elements[i].name == "chk_wr_id[]")
            f.elements[i].checked = sw;
    }
}

function check_confirm(str) {
    var f = document.fboardlist;
    var chk_count = 0;

    for (var i=0; i<f.length; i++) {
        if (f.elements[i].name == "chk_wr_id[]" && f.elements[i].checked)
            chk_count++;
    }

    if (!chk_count) {
        alert(str + "할 게시물을 하나 이상 선택하세요.");
        return false;
    }
    return true;
}

// 선택한 게시물 삭제
function select_delete() {
    var f = document.fboardlist;

    str = "삭제";
    if (!check_confirm(str))
        return;

    if (!confirm("선택한 게시물을 정말 "+str+" 하시겠습니까?\n\n한번 "+str+"한 자료는 복구할 수 없습니다"))
        return;

    f.action = "./delete_all.php";
    f.submit();
}

// 선택한 게시물 복사 및 이동
function select_copy(sw) {
    var f = document.fboardlist;

    if (sw == "copy")
        str = "복사";
    else
        str = "이동";
                     
    if (!check_confirm(str))
        return;

    var sub_win = window.open("", "move", "left=50, top=50, width=500, height=550, scrollbars=1");

    f.sw.value = sw;
    f.target = "move";
    f.action = "./move.php";
    f.submit();
}
</script>
<? } ?>
<!-- 게시판 목록 끝 -->
  • 이 글을 내 페이스북 계정으로 보내기
  • 이 글을 내 트위터 계정으로 보내기
  • 이 글을 내 미투데이 계정으로 보내기
  • 이 글을 내 요즘 계정으로 보내기
  • 이 글을 내 구글플러스 계정으로 보내기

댓글보기

로그인 하시면 댓글을 남길 수 있습니다.

그누보드4 버전에 대한 질문을 할 수 있습니다.
쪽지나 메일로 해결해 주겠다는 답변은 정상적인 답변으로 보기 어려우므로 신고해 주시기 바랍니다.

그누4 질문답변 내용 검색
TOTAL 63,529 RSS 글쓰기
그누4 질문답변 목록
번호 제목 작성자 조회 날짜
공지 미채택초보자를 위한 HOWTO (질문하는 방법?) 댓글30 31781 11.08.18
공지 채택됨syntax highlight 기능 추가 안내 댓글47 48173 10.03.23
63529 진행중스누피.클래스 에서 텍스트 추출하는 부분 질문 입니다. 댓글1 14 13.05.19
63528 진행중회원가입후 가입확인 페이지 댓글2 16 13.05.19
63527 채택됨그누보드 배추빌더 질문입니다. 댓글1 14 13.05.19
63526 진행중$g4[title] 선언시 오류 발생.. 18 13.05.18
63525 진행중게시판 테이블 오류 댓글1 12 13.05.18
63524 진행중이미지상점 오류문의요 댓글1 12 13.05.18
63523 진행중그누보드 시간이 이상해요 댓글1 22 13.05.18
63522 진행중글쓰기 input 버튼을 <a href=""></a>으로 바꾸고 싶어요! 댓글2 26 13.05.18
63521 진행중다중검색 관련 질문 좀 할께요 .^^ 댓글2 25 13.05.18
63520 채택됨DIV코딩은 안해봐서 ㅠㅠ 계시판을 넣었는데 밀려버리네요 ㅠㅠ 왜그런거죠… 댓글2 39 13.05.18
63519 진행중접속자현황 에러? 댓글4 27 13.05.18
63518 진행중그누4S로 만드는 홈피에 폰&카드결재가 가능할까요? 39 13.05.18
63517 진행중에러 메세지 확인좀해주세요 댓글3 28 13.05.18
63516 진행중글쓰기 포인트 글자몇개 이상일때만 지급 되게끔 할 수 있나요? 댓글1 18 13.05.18
63515 채택됨php문에서 url 질문드립니다 댓글2 62 13.05.18
63514 채택됨게시판이 아닌 추천/비추천 댓글2 43 13.05.18
63513 채택됨웹페이지 테두리 삭제 하는 방법좀 알려주세요.. 댓글4 53 13.05.18
63512 채택됨snoopy 파싱 후 필요한 정보 가공 하는 방법 댓글9 54 13.05.18
63511 채택됨게시판 view 파일에 쓰는 코드인데 list에도 적용하고 싶습니다 댓글1 29 13.05.18
63510 진행중windows 7 에서 게시판 본문에 쓰기가 안됩니다. 37 13.05.17