j

리스트 이미지 엑박


갤러리 게시판리스트에서 엑박이 뜹니다.
엑박에서 썸네일명은 잡히는것 같은데..
엑박이 뜨는 이유를 모르겠네요..
밑에는 소스입니다.
고수님들 부탁드립니다.
===============================================================================
<?

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

if (!$board[bo_1]) alert("게시판 설정 : 여분 필드 1 에 목록에서 보여질 이미지의 폭을 설정하십시오. (픽셀 단위)");
if (!$board[bo_2]) alert("게시판 설정 : 여분 필드 2 에 목록에서 보여질 이미지의 질(quality)을 비율로 설정하십시오. (100 이하)");
if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 갤러리 게시판 입니다.");

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

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

<table width="<?=$width?>" align=center cellpadding=0 cellspacing=0>
  <tr>
    <td colspan="2"> <!-- 상단 카테고리 시작 -->
<? if (!$wr_id) {  ?>
<?
    $cnt = 1;
    $sql = " SELECT bo_category_list FROM $g4[board_table] WHERE bo_table = '$bo_table' ";
    $row = sql_fetch($sql);
    $arr = explode("|", $row[bo_category_list]); // 구분자가 , 로 되어 있음
    $str = "";
    $str .= "";
    for ($i=0; $i<count($arr); $i++)
        if (trim($arr[$i]))  {
  $sql1 = " SELECT count(*) as cCount FROM $write_table WHERE ca_name = '$arr[$i]' and wr_comment >= 0 ";
      $row1 = sql_fetch($sql1);         
            $str .= "<td background='$board_skin_path/img/search_bg.gif' align='center'><img src='$board_skin_path/img/cata_ico.gif' align='absmiddle'> <a href='./board.php?bo_table=$bo_table&sca=$arr[$i]'>$arr[$i] ($row1[cCount])</a>&nbsp;<font color='#838383'>|</font>&nbsp;</td>";
  if ($cnt == 5) { $cnt = 1; $str .= ""; }
      $cnt++;
    }
   
    $sql2 = " SELECT count(*) as cCount FROM $write_table WHERE wr_comment >= 0 ";
    $row2 = sql_fetch($sql2);
    $Total_Cat = $row2[cCount]
?>
      <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
        <tr>
          <td width="24"><img src="<?=$board_skin_path?>/img/cate_list.gif" width="24" height="39"></td>
          <? if ($is_category) {
             echo "$str";
             }
             else {
            echo "<td background='$board_skin_path/img/search_bg.gif' align='right'><font color='#BA003A'>- $config[cf_title] -</font></td>";
            }
    ?>
          <td width="24"><img src="<?=$board_skin_path?>/img/cate_right.gif" width="24" height="39" border=0 align=absmiddle></td>
        </tr>
      </table>
 
<? } ?>
<!-- 상단 카테고리 끝 --></td>
  </tr>
  <tr>
    <td height="15" colspan="2"></td>
  </tr>
    <tr>
    <td colspan="2" bgcolor=#BA003A height=1></td>
  </tr>
  <tr>
    <td colspan="2" height=2 bgcolor=#EFEFEF></td>
  </tr>

  <tr>
    <td valign="top"> <form name="fboardlist" method="post">
        <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="">
<?
for ($i=0; $i<count($list); $i++)
{
    $img = "<img src='$board_skin_path/img/noimage.gif' border=0 width='$board[bo_1]' title='이미지 없음'>";
    $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 = $board[bo_1] / $size[0];
            $height = (int)($size[1] * $rate);

            $dst = imagecreatetruecolor($board[bo_1], $height);
            imagecopyresampled($dst, $src, 0, 0, 0, 0, $board[bo_1], $height, $size[0], $size[1]);
            imagepng($dst, $thumb_path.'/'.$list[$i][wr_id], $board[bo_2]);
            chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
        }
    }

    if (file_exists($thumb))
        $img = "<img src='$thumb' border=0>";
?>
        <table width="100%" cellpadding="0" cellspacing="0" >
          <tr>
            <td height="10" ></td >
          </tr>
          <tr >
            <td>
              <!-- 3번테이블 시작-->
              <table width="100%" border="0" cellpadding="0" cellspacing="0" >
                <tr>
                  <td width="147" align="center" valign="top" style="padding-left:5px; padding-right:10px;">
                    <!-- 이미지테이블 시작-->
                    <table width="137" border="0" cellpadding="0" cellspacing="0">
                      <tr>
                        <td width="137"> <table width="137" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td width="13"><img src="<?=$board_skin_path?>/img/box_01.gif" width="13" height="10"></td>
                              <td width="110" background="<?=$board_skin_path?>/img/box_03.gif"><div align="center"><img src="<?=$board_skin_path?>/img/box_03.gif" width="2" height="10"></div></td>
                              <td width="14"><img src="<?=$board_skin_path?>/img/box_05.gif" width="14" height="10"></td>
                            </tr>
                            <tr>
                              <td background="<?=$board_skin_path?>/img/box_10.gif"><img src="<?=$board_skin_path?>/img/box_10.gif" width="13" height="1"></td>
                              <td width="110" height="83"><a href=javascript:// onClick="window.open('<?=$g4[path]?>/skin/board/cast_others/movie.php?bo_table=<?=$bo_table?>&wr_id=<?=$list[$i][wr_id]?>', '', 'scrollbars=no,resizeable=no,toolbar=no,status=no,top=0,left=0,width=420,height=472');" title='동영상보기'><?=$img?></a></td>
                              <td valign="top" background="<?=$board_skin_path?>/img/box_08.gif"><img src="<?=$board_skin_path?>/img/box_09.gif" width="14" height="67"></td>
                            </tr>
                            <tr>
                              <td><img src="<?=$board_skin_path?>/img/box_14.gif" width="13" height="11"></td>
                              <td background="<?=$board_skin_path?>/img/box_16.gif"><div align="center"><img src="<?=$board_skin_path?>/img/box_16.gif" width="1" height="11"></div></td>
                              <td><img src="<?=$board_skin_path?>/img/box_18.gif" width="14" height="11"></td>
                            </tr>
                          </table></td>
                      </tr>
                      <tr>
                        <td><? if ($list[$i][wr_link1]) { ?><table width="137" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td width="13" background="<?=$board_skin_path?>/img/box_24.gif"><img src="<?=$board_skin_path?>/img/box_24.gif" width="13" height="8"></td>
                              <td width="120" style="padding-top:8px;"><div align="center">
         <table  border="0" cellspacing="0" cellpadding="0" align="center">
                                   <tr>
                                   <td> <a href=javascript:// onClick="window.open('<?=$g4[path]?>/skin/board/cast_others/movie.php?bo_table=<?=$bo_table?>&wr_id=<?=$list[$i][wr_id]?>', '', 'scrollbars=no,resizeable=no,toolbar=no,status=no,top=0,left=0,width=420,height=472');" title='동영상보기'><img src="<?=$board_skin_path?>/img/gohome.gif" border="0"></a></td>
                                  </tr>
                                </table>                                
                                 </div>         
         </td>
                              <td width="14" background="<?=$board_skin_path?>/img/box_26.gif"><img src="<?=$board_skin_path?>/img/box_26.gif" width="14" height="1"></td>
                            </tr>
                            <tr>
                              <td><img src="<?=$board_skin_path?>/img/box_28.gif" width="13" height="9"></td>
                              <td background="<?=$board_skin_path?>/img/box_30.gif"><div align="center"><img src="<?=$board_skin_path?>/img/box_30.gif" width="1" height="9"></div></td>
                              <td><img src="<?=$board_skin_path?>/img/box_32.gif" width="14" height="9"></td>
                            </tr>
                          </table><? }?>
       
          <? if (($member[mb_id] && ($member[mb_id] == $write[mb_id])) || $is_admin) { ?>
<table width="109" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
     <td width="20"><input type=checkbox name=chk_wr_id[] value="<?=$list[$i][wr_id]?>"></td>
                           <td width="12" valign="bottom">&nbsp;<font color="#C3C3C2">|</font></td>
  <td width="39"><div align="center"><a href="<?=$write_href?>&w=u&wr_id=<?=$list[$i][wr_id]?>&page=<?=$page?>"><img src="<?=$board_skin_path?>/img/modify_btn.gif" alt="수정" width="39" height="12" vspace="5" border="0"  align="absmiddle" title="수정하기"></a></div></td> 
   <td width="38"><div align="center"><a href="javascript:del('./delete.php?bo_table=<?=$bo_table?>&wr_id=<?=$list[$i][wr_id]?>&page=');"><img src="<?=$board_skin_path?>/img/delete_btn.gif" alt="삭제" width="38" height="12" vspace="5" border="0" align="absmiddle" title="삭제하기"></a></div></td>
  </tr>
</table>
<? } ?>
                                           
        
       
        </td>
                      </tr>
                    </table>
                    <!-- 이미지테이블 끝-->
                  </td>
                  <td valign="top">
                    <!-- 내용테이블 시작 -->
                    <table width="100%" cellspacing="0" cellpadding="0">
                      <tr>
                        <td width="94" height=23><table width="94" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td width="16"><img src="<?=$board_skin_path?>/img/arr_01.gif" width="13" height="11"></td>
                              <td width="40"><div align="right">제목</div></td>
                              <td width="19"><img src="<?=$board_skin_path?>/img/arr_03.gif" width="15" height="11"></td>
                            </tr>
                          </table> </td>
                        <td height=23 colspan="3"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><a href='<?=$list[$i][href]?>'><?=$list[$i][subject]?></a>&nbsp;<?=$list[$i][comment_cnt]?><?=$list[$i][icon_new]?><?=$list[$i][icon_hot]?> </td>
    <td width="80"><a href='<?=$list[$i][href]?>'>
                                <div align="right"><img src="<?=$board_skin_path?>/img/view_in.gif" width="80" height="24" border="0" align="absmiddle"></div></td>
  </tr>
</table>
</td>
                      </tr>
                      <tr>
                        <td height=1 colspan="4" bgcolor=#E7E7E7></td>
                      </tr>
                      <tr>
                        <td width="94" height=23><table width="94" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td width="16"><img src="<?=$board_skin_path?>/img/arr_01.gif" width="13" height="11"></td>
                              <td width="40"><div align="right">이름</div></td>
                              <td width="19"><img src="<?=$board_skin_path?>/img/arr_03.gif" width="15" height="11"></td>
                            </tr>
                          </table></td>
                        <td><?=$list[$i][wr_1]?></td>
                        <td width="94"><table width="94" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td width="16"><img src="<?=$board_skin_path?>/img/arr_01.gif" width="13" height="11"></td>
                              <td width="40"><div align="right">힛트</div></td>
                              <td width="19"><img src="<?=$board_skin_path?>/img/arr_03.gif" width="15" height="11"></td>
                            </tr>
                          </table></td>
                        <td width="70"><span class=hit><?=$list[$i][wr_hit]?></span></td>
                      </tr>
                      <tr>
                        <td height=1 colspan="4" bgcolor=#E7E7E7></td>
                      </tr>
                      <tr>
                        <td width="94" height=23><table width="94" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td width="16"><img src="<?=$board_skin_path?>/img/arr_01.gif" width="13" height="11"></td>
                              <td width="40"><div align="right">분류</div></td>
                              <td width="19"><img src="<?=$board_skin_path?>/img/arr_03.gif" width="15" height="11"></td>
                            </tr>
                          </table> </td>
                        <td height=23>
                          <? if ($is_category) { ?><?=$list[$i][ca_name]?> <? } ?>
                        </td>
                        <td width="94" height=23><table width="94" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td width="16"><img src="<?=$board_skin_path?>/img/arr_01.gif" width="13" height="11"></td>
                              <td width="40"><div align="right">날짜</div></td>
                              <td width="19"><img src="<?=$board_skin_path?>/img/arr_03.gif" width="15" height="11"></td>
                            </tr>
                          </table></td>
                        <td width="70" height=23><?=$list[$i][wr_2]?></td>
                      </tr>
                      <tr>
                        <td height=1 colspan="4" bgcolor=#E7E7E7></td>
                      </tr>                                    
                    </table>
     <table width="100%" border="0" cellspacing="0" cellpadding="0">
                       <tr>
                         <td width="94" valign="top" style="padding-top:5px;"><table width="94" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td width="16"><img src="<?=$board_skin_path?>/img/arr_01.gif" width="13" height="11"></td>
                              <td width="40"><div align="right">내용</div></td>
                              <td width="19"><img src="<?=$board_skin_path?>/img/arr_03.gif" width="15" height="11"></td>
                            </tr>
                          </table></td>
                        <td colspan="3"  valign="top" style="padding-top:5px;"><div align="justify"><?=cut_str(strip_tags($list[$i][wr_content]),150,"...")?></div></td>
                         </tr>
    
                    </table>
                    <!-- 내용테이블 끝 -->
                  </td>
                </tr>
              </table>
              <!-- 3번테이블 끝-->
            </td>
          </tr>
    <tr>
           <td  height="10"></td>
          </tr>   
          <tr>
            <td height="1" bgcolor="#1F7297"></td >
          </tr>
        </table>
        <!-- 2번테이블 끝-->
        <? } ?>

        <? if (count($list) == 0) { echo "  <table width=100% border=0 cellpadding=0 cellspacing=0 ><tr><td height=100 align=center> 게시물이 없습니다.</td></tr></table>"; } ?>
      </form></td>
  </tr>
  <tr>
    <td colspan="2" height=2 bgcolor=#EFEFEF></td>
  </tr>
  <tr>
    <td colspan="2" bgcolor=#BA003A height=1></td>
  </tr>
  <tr>
    <td colspan="2" valign="top">
      <!-- 페이지 -->
      <table width="100%" cellspacing="0" cellpadding="0">
        <tr>
          <td width="60"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <? if ($list_href) { ?>
                <td><a href="<?=$list_href?>"><img src="<?=$board_skin_path?>/img/btn_list.gif" vspace="10" border="0"></a></td>
                <? } ?>
                <td>
                  <? if ($is_checkbox) { ?>
                  <a href="javascript:select_delete();"><img src="<?=$board_skin_path?>/img/btn_select_delete.gif" hspace="2" vspace="10" border="0"></a></td>
                <td><a href="javascript:select_copy('copy');"><img src="<?=$board_skin_path?>/img/btn_select_copy.gif" vspace="10" border="0"></a></td>
                <td><a href="javascript:select_copy('move');"><img src="<?=$board_skin_path?>/img/btn_select_move.gif" hspace="2" vspace="10" border="0"></a><? } ?></td>
              </tr>
            </table></td>
          <td align="center" height=58>&nbsp;
            <? if ($prev_part_href) { echo "<a href='$prev_part_href'><img src='$board_skin_path/img/btn_search_prev.gif' width=50 height=20 border=0 align=absmiddle title='이전검색'></a>"; } ?>
            <?
        // 기본으로 넘어오는 페이지를 아래와 같이 변환하여 이미지로도 출력할 수 있습니다.
        //echo $write_pages;
        $write_pages = str_replace("처음", "<img src='$board_skin_path/img/begin.gif' border='0' align='absmiddle' title='처음'>", $write_pages);
        $write_pages = str_replace("이전", "<img src='$board_skin_path/img/prev.gif' border='0' align='absmiddle' title='이전'>", $write_pages);
        $write_pages = str_replace("다음", "<img src='$board_skin_path/img/next.gif' border='0' align='absmiddle' title='다음'>", $write_pages);
        $write_pages = str_replace("맨끝", "<img src='$board_skin_path/img/end.gif' border='0' align='absmiddle' title='맨끝'>", $write_pages);
        $write_pages = preg_replace("/<span>([0-9]*)<\/span>/", "<b><font style=\"font-family:돋움; font-size:9pt; \">$1</font></b>", $write_pages);
        $write_pages = preg_replace("/<b>([0-9]*)<\/b>/", "<b><font style=\"font-family:돋움; font-size:9pt; color:#FF6600;\">$1</font></b>", $write_pages);
        ?>
            <?=$write_pages?>
            <? if ($next_part_href) { echo "<a href='$next_part_href'><img src='$board_skin_path/img/btn_search_next.gif' width=50 height=20 border=0 align=absmiddle title='다음검색'></a>"; } ?>
          </td>
          <td width="60" valign="bottom" align="right">
            <? if ($write_href) { ?>
            <a href="<?=$write_href?>"><img src="<?=$board_skin_path?>/img/btn_write.gif" vspace="10" border="0"></a>
            <? } ?>
          </td>
        </tr>
      </table></td>
  </tr>
  <tr>
    <td colspan="2" valign="top"><form name=fsearch method=get style="margin:0px;">
        <input type=hidden name=bo_table value="<?=$bo_table?>">
        <input type=hidden name=sca      value="<?=$sca?>">
        <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
          <tr>
            <td width="88"><img src="<?=$board_skin_path?>/img/search_01.gif" width="88" height="39"></td>
            <td width="34"><img src="<?=$board_skin_path?>/img/search_02.gif" width="34" height="39"></td>
            <td  background="<?=$board_skin_path?>/img/search_bg.gif" align="center"><select name=sfl>
                <option value='wr_subject||wr_content'>제목+내용</option>
                <option value='wr_subject'>제목</option>
                <option value='wr_content'>내용</option>
                <option value='mb_id'>회원아이디</option>
                <option value='wr_name'>이름</option>
              </select> <input name=stx maxlength=15 size=20 itemname="검색어" required value="<?=$stx?>">
              <select name=sop>
                <option value=and>and</option>
                <option value=or>or</option>
              </select> </td>
            <td width="93"><input type=image src="<?=$board_skin_path?>/img/search.gif" width="93" height="39" border=0 align=absmiddle></td>
          </tr>
        </table>
      </form></td>
  </tr>
</table>

<script language="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=396, height=550, scrollbars=1");

    f.sw.value = sw;
    f.target = "move";
    f.action = "./move.php";
    f.submit();
}
</script>

<!-- 게시판 목록 끝 -->

|

댓글 1개

지정한 경로가 맞는것인지, 또는 파일이 제대로 업로드 되어있는지 확인하시고,

업로드 디렉토리의 권한이 707로 되어있는지도 확인하시고, 그에 맞는 조치를 해주면 됩니다.
댓글을 작성하시려면 로그인이 필요합니다. 로그인

그누4 질문답변

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

+
제목 글쓴이 날짜 조회
15년 전 조회 815
15년 전 조회 953
15년 전 조회 753
15년 전 조회 1,547
15년 전 조회 1,731
15년 전 조회 1,444
15년 전 조회 977
15년 전 조회 1,534
15년 전 조회 959
15년 전 조회 1,777
15년 전 조회 948
15년 전 조회 947
15년 전 조회 1,514
15년 전 조회 1,512
15년 전 조회 1,583
15년 전 조회 1,460
15년 전 조회 982
15년 전 조회 1,536
15년 전 조회 2,065
15년 전 조회 1,090
🐛 버그신고