최근갤러리게시물에서 이미지없을경우 노이미지출력 > 질문답변

본문 바로가기
사이트 내 전체검색

질문답변

서버정보나 계정정보는 보안유지를 위해 관리자쪽지나 메일로 발송해 주시거나 제작의뢰 게시판을 이용해 주시면 감사하겠습니다..

최근갤러리게시물에서 이미지없을경우 노이미지출력

페이지 정보

본문

이미지가 엑박안뜨고 노이미지.gif파일 뜨게하는방법은?
아래 최근갤러리 소스입니다..


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

$cols  = 4; //  이미지 가로갯수 //  이미지 세로 갯수는 메인에서 지정(총 이미지 수)
$imgwidth=60; //표시할 이미지의 가로사이즈
$imgheight=50; //표시할 이미지의 세로사이즈
$image_h  = 20; // 이미지 상하 간격

$col_width = (int)(99 / $cols);

$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb';
?>
<style type="text/css">
<!--
.data  { font-family:돋움; font-size:8pt; color:#636363; }
-->
</style>

<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="DDDDDD">
    <tr>
        <td>
            <table width="100%" border="0" cellpadding="0" cellspacing="4" bgcolor="F5F5F5">
                <tr>
                    <td valign="top" bgcolor="FFFFFF" style="padding:0px">


<table width=100% border=0 cellpadding='0' cellspacing='0' align='center'>

<!-- 최신글 제목 -->
<tr><td>

    <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
              <td width="10" bgcolor=#F5F5F5></td>
              <td height="23" bgcolor=#F5F5F5><strong><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><font color=#314662><?=$board[bo_subject]?></font></a></strong></td>
              <td align="right" bgcolor=#F5F5F5><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><span style='font-size:8pt; color:#9A9A9A;'>더보기</span></a></td>
              <td width="5" bgcolor=#F5F5F5></td>
          </tr>
          <tr>
                <td colspan=4 height="1" bgcolor=#ececec></td>
          </tr>
      </table>

</td></tr>

<tr><td height='10'></td></tr>
<tr>
<td align='center'>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>

<? for ($i=0; $i<count($list); $i++) {
  if ($i>0 && $i%$cols==0) { echo "</tr><tr><td colspan='$cols' height='$image_h'></td></tr><tr>"; }
?>

<td width="<?=$col_width?>%" align="center" valign='top'>

<?
$image = $list[$i][file][0][file]; //원본
$img=$data_path. "/".$image;  //썸네일이 없을경우 원본출력
$thumb = $thumb_path. "/". $list[$i][wr_id];

  if ( file_exists($thumb) )
$img = $thumb;
 
    $style = "font-family:돋움; font-size:8pt; color:#636363;";
    if ($list[$i][icon_new])
    $style = "style='font-family:돋움; font-size:8pt; color:#636363;' ";
$subject = "<span $style>".cut_str($list[$i][subject],15)."</span>"; //제목 글자수 자르기

$bg = "";  //새글?
    if ($list[$i][icon_new])
        $bg="la_top_2.gif";
    else
        $bg="la_top_1.gif";

    echo $list[$i][icon_reply] . " ";

echo "<table width='100%' cellpadding='0' cellspacing='0' border='0'>";
echo " <tr><td valign='top' align='center'><a href='{$list[$i]['href']}'><img src='$img' width='{$imgwidth}' height='{$imgheight}' align='absmiddle' style='width:{$imgwidth}px;height:{$imgheight}px;border:1px solid #CCCCCC; padding:3px'></a></td></tr>";
echo " <tr><td align='center' height='21'><a href='{$list[$i]['href']}'>{$subject}</a></td></tr></table>";
?>
</td>
<? } ?>

<?
$cnt = ($i%$cols);
for ($k=$cnt; $k<$cols && $cnt; $k++) {
    echo "<td width=$col_width%>&nbsp;</td>";
}
?>

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

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

<table width="100%" cellpadding=0 cellspacing=0>
<tr><td height=5></td></tr>
</table>
추천0

댓글목록

등록된 댓글이 없습니다.

Total 1,640건 37 페이지
  • RSS
질문답변 목록
번호 제목 글쓴이 조회 추천 날짜
740
utf 설치 댓글1
tenuun쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 7764 0 11-22
739 재다이얼쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 6042 0 11-21
738 알럽투데이쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 7810 0 11-20
737 디란도쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 6993 0 11-20
736 김형우쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 9232 1 11-20
735 tenuun쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 9269 0 11-20
734 천녀의집쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 10611 0 11-19
733 dool쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15446 0 11-19
732 포인트쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 40 0 11-19
731 디란도쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 38 0 11-19
730 디란도쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 41 0 11-19
729
질문.!! 댓글3
재다이얼쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 7346 0 11-15
728 천녀의집쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 34 0 11-15
727 재다이얼쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 5341 0 11-15
열람중 포인트쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 8853 0 11-14
725 tenuun쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 7639 0 11-14
724 토마토마쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 6399 0 11-13
723 재다이얼쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 5151 0 11-13
722 하이얌쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 6427 0 11-13
721 JSclub쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 16136 0 11-12
720 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 56 0 10-26
719 포인트쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 5891 0 11-12
718 소피쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 6120 0 11-11
717 하늘만나쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 5912 0 11-10
716 쿠하하쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 10650 0 11-10

검색

회원로그인

회원가입

사이트 정보

株式会社YHPLUS / 대표 : ZERO
〒140-0011 東京都品川区東大井2-5-9-203
050-5539-7787
오픈카카오톡 (YHPLUS) :
https://open.kakao.com/o/slfDj15d

접속자집계

오늘
7,812
어제
7,420
최대
8,233
전체
1,523,937
Copyright (c) 株式会社YHPLUS. All rights reserved.