최신글 추출관련질문입니다. > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

최신글 추출관련질문입니다. 정보

최신글 추출관련질문입니다.

본문

최신글(5개추출)을 추출해오는데 테스트할려고
게시판에 10개쓰니 5개 최신글로 잘 추출해옵니다.
문제는 글 5개를 지원버리니 전에 쓴 5개의 글이 남았는데 그걸 가져오지 못하네요.
어디에 쿠키같은게 남은것같은데 어떻게 해결하죠?
(참고로 디자이너라 프로그램 초짜입니다 ㅡㅜ)


소스올려드립니다

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

$img_width = 60;
$img_height = 45;
$img_quality = 99;

if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 갤러리 게시판 입니다.");

$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path."thumbnail/$row[wr_id]";
$ym = date("ym", $g4[server_time]);

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

?>

<style>
.dm-subject { font:bold; font-size:14px; color:#000000; padding:3 5 3 3; }
.dm-hit { text-align:center; font:bold; font-size:12px; color:#e95eee; }

</style>

<div align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
    <? for ($i=0; $i<count($list); $i++) { ?>
  <tr>
    <td width="10%" height="56" valign="middle">
    <table width="50" border="0" cellspacing="0" cellpadding="5">
  <tr>
    <td height="40" background="<?=$latest_skin_path?>/img/hit_bg.gif"><div class="dm-hit"><?=$list[$i][wr_hit]?></div></td>
  </tr>
    </table>
   
    </td>
    <td style="padding:3px 5px;" width="85%">
          <div style="margin-bottom:5px;"><span class="dm-subject">
          <a href="<?=$list[$i][href]?>"><?=$list[$i][subject]?></a></span>
  <span style="color:#FF6633; font-size:10px">
          <?=$list[$i]['comment_cnt']?>
          </span>
            <?
            echo $list[$i]['icon_file'] . " ";

              echo " " . $list[$i]['icon_new'];
  echo " " . $list[$i]['icon_link'];
              echo " " . $list[$i]['icon_hot'];
 
            ?>
            </div>
            <div>
            <span style="color:#8f8f8f; padding:0 5 0 5;"><?=$list[$i][wr_name]?></span> <span style="color:#dcdcdc;">|</span> <span style="color:#8f8f8f; padding:0 5 0 5;"><?=$list[$i][datetime2]?></span> <span style="color:#dcdcdc;">|</span> <span style="color:#8f8f8f; padding:0 5 0 5;">학력: <?=$list[$i][wr_7]?></span> <span style="color:#dcdcdc;">|</span> <span style="color:#8f8f8f; padding:0 5 0 5;">경력: <?=$list[$i][wr_4]?></span> <span style="color:#dcdcdc;">|</span> <span style="color:#8f8f8f; padding:0 5 0 5;">모집기간: <?=$list[$i][wr_5]?></span> 
   
            </div>
    </td>
    <td width="10%" align="center" valign="middle">
   
    <?
//썸네일 생성
$thumfile = "";
    $thumb = $thumb_path.'/'.$list[$i][wr_id];
    // 썸네일 이미지가 존재하지 않는다면
    if (!file_exists($thumb)) {
        $file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
        // 업로드된 파일이 이미지라면
        if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file) && file_exists($file)) {
            $size = getimagesize($file);
            if ($size[2] == 1)
                $src = imagecreatefromgif($file);
            else if ($size[2] == 2)
                $src = imagecreatefromjpeg($file);
            else if ($size[2] == 3)
                $src = imagecreatefrompng($file);
            else
                break;

            $rate = $img_width / $size[0];
            $height = (int)($size[1] * $rate);

            // 계산된 썸네일 이미지의 높이가 설정된 이미지의 높이보다 작다면
            if ($height < $img_height)
                // 계산된 이미지 높이로 복사본 이미지 생성
                $dst = imagecreatetruecolor($img_width, $height);
            else
                // 설정된 이미지 높이로 복사본 이미지 생성
                $dst = imagecreatetruecolor($img_width, $img_height);
            imagecopyresampled($dst, $src, 0, 0, 0, 0, $img_width, $height, $size[0], $size[1]);
            imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id], $img_quality);
            chmod($thumb_path.'/'.$list[$i][wr_id], 0606);

    }
}

    if (file_exists($thumb))
        $thumfile = "<img src='$thumb' width='{$img_width}' height='{$img_height}' border='0' style='border:0 #eee solid' onmouseover=this.style.filter='alpha(opacity=80)' onmouseout=this.style.filter=''></a>";
else
//이미지가 없으면
$thumfile="<img src='$latest_skin_path/img/noimg.gif' width='{$img_width}' height='{$img_height}' style='border:0 #E7E7E7 solid'></a>";
//이미지가 아니네
        if(preg_match("/\.(swf|wma|asf)$/i","$file") && file_exists($file))
      { $thumfile = "<script>doc_write(flash_movie('$file', 'flash$i', '$img_width', '$img_height', 'transparent'));</script>"; }

?><a href='<?=$list[$i][href]?>'><?=$thumfile?></a>
   
   
   
    </td>
  </tr>
  <tr><td colspan="3" height="1" bgcolor="#f3f3f3"></td></tr>
  <? } ?>
 
  <? if (count($list) == 0) { echo "<tr><td align=center height=50><font color=#6A6A6A>오늘 등록된 게시물이 없습니다.</a></td></tr>"; } ?>
</table>
</div>

댓글 전체

전체 66,554 |RSS
그누4 질문답변 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1402호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT