게시판 가로 이미지 수가 안 늘려져요 > 그누4 질문답변

그누4 질문답변

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

게시판 가로 이미지 수가 안 늘려져요 정보

게시판 가로 이미지 수가 안 늘려져요

본문

<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<?
$noIMG = $board_skin_path."/img/noimg.gif"; //[필수](URL)
$max = 100 ; //[필수](픽셀) 썸네일 이미지의 가로세로(긴쪽)의 최대치.
$resol = 90 ; //[필수](퍼센트%) 생성되는 썸네일의 JPG압축률.
$str =  25 ; //[필수](글자수) 썸네일 밑의 제목의 글자수.

function smaller( $W, $H ) {
global $max, $thum_W, $thum_H ;

if ( $W > $H ) { //가로형일 경우.
$thum_W = $max ;
$thum_H = ceil( $H * ( $max / $W ) );
}
if ( $W < $H ) { //세로형일 경우.
$thum_H = $max ;
$thum_W = ceil( $W * ( $max / $H ) );
}
if ( $W == $H ) { //정사각형일 경우.
$thum_W = ceil( $max * 0.8 );
$thum_H = ceil( $max * 0.8 );
}

return $thum_W ;
return $thum_H ;
}


function maker( $thum_W, $thum_H ) {
global $thum, $resol, $ori, $ori_info ;

//$newImg = ImageCreate($thum_W,$thum_H); // GD라이브러리 2.0 (이하일 경우)
$newImg = ImageCreateTrueColor($thum_W,$thum_H); // GD라이브러리 2.0 전용함수

if($ori_info[2]=="2") $origImg=ImageCreateFromjpeg($ori);
if($ori_info[2]=="3") $origImg=ImageCreateFrompng($ori);

//ImageCopyResized($newImg,$origImg,0,0,0,0,$thum_W,$thum_H,ImageSX($origImg),ImageSY($origImg));
imageCopyResampled($newImg,$origImg,0,0,0,0,$thum_W,$thum_H,ImageSX($origImg),ImageSY($origImg));

Imagejpeg($newImg, $thum, $resol );

chmod($thum,0707);
ImageDestroy($newImg);
ImageDestroy($origImg);

return $thum ;
}
?>
<br><br>
<table width="<?=$width?>" align=center cellpadding=0 cellspacing=0>
  <tr>
    <td colspan="2"> <!-- 상단 카테고리 시작 -->
<? if (!$wr_id) {  ?>
<?
$cnt_bo_1 = $bo_1[0] ? $bo_1[0] : 10; // 한줄당 분류 갯수(현재:10)
$cnt = 1;
$cnt0 = 0;
$bb_s=""; $bb_e="";
$arr = explode("|", $board[bo_category_list]); // 구분자가 , 로 되어 있음

for ($i=0; $i<count($arr); $i++)
if (trim($arr[$i]))  {
if ($sca == $arr[$i]) { $cnt0++; $b_s="<font color='#EFA8AE'>"; $b_e="</font>"; } else {$b_s=""; $b_e="";}
$str1 .= "&nbsp;&nbsp;<font color='#cccccc' size=1>|</font>&nbsp;&nbsp;<a href='./board.php?bo_table=$bo_table&sca=" . rawurlencode($arr[$i]) . "'>$b_s$arr[$i]$b_e</a>";
if ($cnt == $cnt_bo_1) { $cnt = 0; $str1 .= "<br>"; }
$cnt++;
}
if ($cnt0 == 0 ) { $bb_s="<font color='#EFA8AE'>"; $bb_e="</font>"; }
?>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td>
          <a href='./board.php?bo_table=<?=$bo_table?>&page=<?=$page?>&mode=subject'>ALL Portfolio</a> <?=$str1?>
          <? if ($admin_href) { ?>&nbsp;&nbsp;&nbsp;&nbsp;<a href="<?=$admin_href?>">관리자</a><?}?>
          </td>
          <td width="24"></td>
        </tr>
      </table>

<? } ?>
<!-- 상단 카테고리 끝 --></td>
  </tr>
  <tr>
    <td height="15" colspan="2"></td>
  </tr>
    <tr>
    <td colspan="2" bgcolor=#cccccc 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++) {
  // Thumbnail
                  $image = urlencode($list[$i][file][0][file]);
                  $ori="$g4[path]/data/file/$bo_table/" . $image;
                  $ext = strtolower(substr(strrchr($ori,"."), 1)); //확장자
                  if ( $ext=="gif"||$ext=="jpg"||$ext=="jpeg"||$ext=="png"||$ext=="bmp"||$ext=="tif"||$ext=="tiff") $ori_info=getimagesize($ori); else $ori_info="";
                  if ( $ori_info[2]=="2" || $ori_info[2]=="3" ) { //원파일이 [ 2JPG, 2JPEG, 3PNG ] 경우.
          $thum = $ori.".Thum" ;
          if ( file_exists($thum) ) { // Thumbnail [O] 경우
        $thum_info = getimagesize ($thum);
    $thum_W = $thum_info[0] ;
    $thum_H = $thum_info[1] ;
            } else { // Thumbnail [X] 경우
      if ( smaller( $ori_info[0], $ori_info[1] ) ) {
maker( $thum_W, $thum_H );
    }
        }
                } else if ( $ori_info[2]=="1" || $ori_info[2]=="6" || $ori_info[2]=="7" ) { //원파일이 [ 1GIF,6BMP,7TIF ] 경우.
    if ( smaller( $ori_info[0], $ori_info[1] ) ) {
$thum = $ori ;
    }
              } else { //원파일이 [ 1,2,3,6,7 ] 아닐 경우.
              $thum = $noIMG ;
              }
              ?>
             
         
        <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="120" align="center" valign="top" style="padding-left:5px; padding-right:10px;">
                    <!-- 이미지테이블 시작-->
                    <table  border="0" cellpadding="0" cellspacing="0">
                      <tr>
                        <td > <table border="0" cellspacing="0" cellpadding="0">
                         
                            <tr>
                              <td></td>
                              <td width="120" height="90"><a href=javascript:// onClick="window.open('<?=$board_skin_path?>/movie.php?bo_table=<?=$bo_table?>&wr_id=<?=$list[$i][wr_id]?>', '', 'scrollbars=no,resizeable=yes,toolbar=no,status=no,top=100,left=100,width=640,height=500');" title='동영상보기'> <img src='<?=$thum?>' alt='동영상보기' width="120" height="90" border=0 ></a></td>
                              <td valign="top" ></td>
                            </tr>
                            <tr>
                              <td></td>
                              <td><div align="center"></div></td>
                              <td></td>
                            </tr>
                          </table></td>
                      </tr>
                      <tr>
                        <td> <table width=120 border="0" cellspacing="0" cellpadding="0">
                            <tr>
                             
                              <td style="padding-top:8px;" align=center><div align="center">   
         
                                <? if ($list[$i][wr_link1]) { ?>
    <a href=javascript:// onClick="window.open('<?=$board_skin_path?>/movie.php?bo_table=<?=$bo_table?>&wr_id=<?=$list[$i][wr_id]?>', '', 'scrollbars=no,resizeable=no,toolbar=no,status=no,top=100,left=100,width=500,height=530');" title='동영상보기'><img src="<?=$board_skin_path?>/img/vod.gif" border="0"></a>         
                                  <? }?></div> 
                   
  </td>
                             
                            </tr>
                            <tr>
                              <td></td>
                              <td ><div align="center"> </div></td>
                              <td></td>
                            </tr>
                          </table></td>
                      </tr>
                    </table>
                    <!-- 이미지테이블 끝-->
                  </td>
                  <td valign="top">
                    <!-- 내용테이블 시작 -->
                    <table width="100%" cellspacing="0" cellpadding="0">
                      <tr>
                        <td width="55" height=23><table width="55" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td width="12"><img src="<?=$board_skin_path?>/img/arr_01.gif" ></td>
                              <td width="25"><div align="center">제목</div></td>
                              <td width="12"><img src="<?=$board_skin_path?>/img/arr_03.gif" /></td>
                            </tr>
                        </table> </td>
                        <td height=23 colspan="3"><font color="#555555">
                          <? if($is_admin) { ?>
                         
                          <?=$list[$i][subject]?>&nbsp;&nbsp;
                         
                          <?  if ($is_admin == "super" || $is_auth)  { ?>
                          <a href='<?=$list[$i][href]?>'>수정</a>
                          <? } ?>
                         
                         
                         
                          <?=$list[$i][comment_cnt]?>
                          <?=$list[$i][icon_new]?>
                          <?=$list[$i][icon_hot]?>
                          <? } else { ?>
                          <?=$list[$i][subject]?>
&nbsp;
<?=$list[$i][comment_cnt]?>
<?=$list[$i][icon_new]?>
<?=$list[$i][icon_hot]?>
<? } ?></font>
                        </td>
                      </tr>
                      <tr>
                        <td height=1 colspan="4" bgcolor=#E7E7E7></td>
                      </tr>
                      <tr>
                        <td width="55" height=23><table width="55" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td width="12"><img src="<?=$board_skin_path?>/img/arr_01.gif"></td>
                              <td width="25"><div align="center">촬영</div></td>
                              <td width="12"><img src="<?=$board_skin_path?>/img/arr_03.gif"></td>
                            </tr>
                          </table></td>
                        <td><b><?=$list[$i][wr_1]?></b> <font color="#FF9933"> [<?=$list[$i][wr_2]?>] </font></td>

                      </tr>
                      <tr>
                        <td height=1 colspan="4" bgcolor=#E7E7E7></td>
                      </tr>
                      <tr>
                        <td width="55" height=23><table width="55" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td width="12"><img src="<?=$board_skin_path?>/img/arr_01.gif" ></td>
                              <td width="25"><div align="center">분류</div></td>
                              <td width="12"><img src="<?=$board_skin_path?>/img/arr_03.gif" ></td>
                            </tr>
                          </table> </td>
                        <td height=23><font color="#cd0606"><? if ($is_category) { ?><?=$list[$i][ca_name]?> <? } ?></font></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="55" valign="top" style="padding-top:5px;"><table width="55" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td width="12"><img src="<?=$board_skin_path?>/img/arr_01.gif" ></td>
                              <td width="25"><div align="center">내용</div></td>
                              <td width="12"><img src="<?=$board_skin_path?>/img/arr_03.gif" ></td>
                            </tr>
                          </table></td>
                        <td colspan="3"  valign="top" style="padding-top:5px;"><div align="justify"><font color="#555555"><?=cut_str(strip_tags($list[$i][wr_content]),150,"...")?></div></font></td>
                        </tr>

                    </table>
                    <!-- 내용테이블 끝 -->
                  </td>
                </tr>
              </table>
              <!-- 3번테이블 끝-->
            </td>
          </tr>
  <tr>
          <td  height="10"></td>
          </tr>   
          <tr>
            <td height="1" bgcolor="#E8E8E8"></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=#cccccc 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" 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=* align="right"><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=10 itemname="검색어" required value="<?=$stx?>">
              <select name=sop>
                <option value=and>and</option>
                <option value=or>or</option>
              </select> </td>
            <td width=10 ></td>
            <td align=right width="33"><input type=image src="<?=$board_skin_path?>/img/search.gif" border=0 align=absmiddle></td>
         
          </tr>
        </table>
      </form><br><br></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줄을 유지합니다.
영카트쪽에 문의를 해보아도.. 어디 스킨을 참조하란 댓글만 달아주셔서
도무지 초보인 저에게는 어떻게 할 수가 없는 어려운 문제네요.. ㅠ_ㅠ

드디어 포인트가 천점이 넘어 글 쓸수 있게되었는데..;ㅁ;!!
어디를 어떻게 수정해야하는지.. 좀 꼭찝어 해결해주시면 안될까요
꼭꼭 부탁드립니다.
 
 


# 요질문에 센드로즈님이 답해주셨어요..

 
 
센드로즈 10-07-07 13:34  121.♡.33.70   
<input type="hidden" name="sw"  value=""> <= 아래줄에
 <table width="100%" cellpadding="0" cellspacing="0" >
          <tr> <td height="10" ></td >
          </tr>
          <tr > <= 요기까지 삽입
    <? for ($i=0; $i<count($list); $i++) {
  // Thumbnail

 $thum = $noIMG ;
              }  여기 밑에줄에
              $tr = "";
    if ($i && $i%$board[bo_gallery_cols]==0)
        $tr = "</tr><tr>";
    echo "$tr"; ?>  <td>  요기까지삽입
              <!-- 3번테이블 시작-->
      <!-- 3번테이블 끝--> 요밑에 두줄을
            </td>  <? } if (($cnt = $i%$board[bo_page_rows]) != 0)
    for ($k=$cnt; $k<$$board[bo_page_rows]; $k++)

        echo "<td>&nbsp;</td>\n"; ?>
 </tr>  이렇게 수정해줍니다.
 게시판관리자에서 설정한 가로이미지 개수만큼 리스트에 뿌려집니다.
 <input type="hidden" name="sw"  value=""> <= 아래줄에
 <table width="100%" cellpadding="0" cellspacing="0" >
          <tr> <td height="10" ></td >
          </tr>
          <tr > <= 요기까지 삽입
    <? for ($i=0; $i<count($list); $i++) {
  // Thumbnail

 $thum = $noIMG ;
              }  여기 밑에줄에
              $tr = "";
    if ($i && $i%$board[bo_gallery_cols]==0)
        $tr = "</tr><tr>";
    echo "$tr"; ?>  <td>  요기까지삽입
              <!-- 3번테이블 시작-->
      <!-- 3번테이블 끝--> 요밑에 두줄을
            </td>  <? } if (($cnt = $i%$board[bo_page_rows]) != 0)
    for ($k=$cnt; $k<$$board[bo_page_rows]; $k++)

        echo "<td>&nbsp;</td>\n"; ?>
 </tr>  이렇게 수정해줍니다.
 게시판관리자에서 설정한 가로이미지 개수만큼 리스트에 뿌려집니다.
 
 
 
 
그런데.. 결론은 게시물 딱 한개만 뚝 떨어져나가 좌측에 하나 생기고 나머지 게시판은
죄다 우측으로 밀려서 나와요..ㅠ_ㅠ
도대체 어떻게 해야할까요..ㅠ_ㅠ
  • 복사

댓글 전체

아래 내용으로 list.skin.php를 교체해 보세요.

<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<?
$noIMG = $board_skin_path."/img/noimg.gif"; //[필수](URL)
$max = 100 ; //[필수](픽셀) 썸네일 이미지의 가로세로(긴쪽)의 최대치.
$resol = 90 ; //[필수](퍼센트%) 생성되는 썸네일의 JPG압축률.
$str =  25 ; //[필수](글자수) 썸네일 밑의 제목의 글자수.

function smaller( $W, $H ) {
global $max, $thum_W, $thum_H ;

if ( $W > $H ) { //가로형일 경우.
$thum_W = $max ;
$thum_H = ceil( $H * ( $max / $W ) );
}
if ( $W < $H ) { //세로형일 경우.
$thum_H = $max ;
$thum_W = ceil( $W * ( $max / $H ) );
}
if ( $W == $H ) { //정사각형일 경우.
$thum_W = ceil( $max * 0.8 );
$thum_H = ceil( $max * 0.8 );
}

return $thum_W ;
return $thum_H ;
}


function maker( $thum_W, $thum_H ) {
global $thum, $resol, $ori, $ori_info ;

//$newImg = ImageCreate($thum_W,$thum_H); // GD라이브러리 2.0 (이하일 경우)
$newImg = ImageCreateTrueColor($thum_W,$thum_H); // GD라이브러리 2.0 전용함수

if($ori_info[2]=="2") $origImg=ImageCreateFromjpeg($ori);
if($ori_info[2]=="3") $origImg=ImageCreateFrompng($ori);

//ImageCopyResized($newImg,$origImg,0,0,0,0,$thum_W,$thum_H,ImageSX($origImg),ImageSY($origImg));
imageCopyResampled($newImg,$origImg,0,0,0,0,$thum_W,$thum_H,ImageSX($origImg),ImageSY($origImg));

Imagejpeg($newImg, $thum, $resol );

chmod($thum,0707);
ImageDestroy($newImg);
ImageDestroy($origImg);

return $thum ;
}
?>
<br><br>
<table width="<?=$width?>" align=center cellpadding=0 cellspacing=0>
  <tr>
    <td colspan="2"> <!-- 상단 카테고리 시작 -->
<? if (!$wr_id) {  ?>
<?
$cnt_bo_1 = $bo_1[0] ? $bo_1[0] : 10; // 한줄당 분류 갯수(현재:10)
$cnt = 1;
$cnt0 = 0;
$bb_s=""; $bb_e="";
$arr = explode("|", $board[bo_category_list]); // 구분자가 , 로 되어 있음

for ($i=0; $i<count($arr); $i++)
if (trim($arr[$i]))  {
if ($sca == $arr[$i]) { $cnt0++; $b_s="<font color='#EFA8AE'>"; $b_e="</font>"; } else {$b_s=""; $b_e="";}
$str1 .= "&nbsp;&nbsp;<font color='#cccccc' size=1>|</font>&nbsp;&nbsp;<a href='./board.php?bo_table=$bo_table&sca=" . rawurlencode($arr[$i]) . "'>$b_s$arr[$i]$b_e</a>";
if ($cnt == $cnt_bo_1) { $cnt = 0; $str1 .= "<br>"; }
$cnt++;
}
if ($cnt0 == 0 ) { $bb_s="<font color='#EFA8AE'>"; $bb_e="</font>"; }
?>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td>
          <a href='./board.php?bo_table=<?=$bo_table?>&page=<?=$page?>&mode=subject'>ALL Portfolio</a> <?=$str1?>
          <? if ($admin_href) { ?>&nbsp;&nbsp;&nbsp;&nbsp;<a href="<?=$admin_href?>">관리자</a><?}?>
          </td>
          <td width="24"></td>
        </tr>
      </table>

<? } ?>
<!-- 상단 카테고리 끝 --></td>
  </tr>
  <tr>
    <td height="15" colspan="2"></td>
  </tr>
    <tr>
    <td colspan="2" bgcolor=#cccccc 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="">

  <table width="100%" cellpadding="0" cellspacing="0" >
          <tr>
            <td height="10" ></td >
          </tr>
          <tr >
        <? for ($i=0; $i<count($list); $i++) {
  // Thumbnail
                  $image = urlencode($list[$i][file][0][file]);
                  $ori="$g4[path]/data/file/$bo_table/" . $image;
                  $ext = strtolower(substr(strrchr($ori,"."), 1)); //확장자
                  if ( $ext=="gif"||$ext=="jpg"||$ext=="jpeg"||$ext=="png"||$ext=="bmp"||$ext=="tif"||$ext=="tiff") $ori_info=getimagesize($ori); else $ori_info="";
                  if ( $ori_info[2]=="2" || $ori_info[2]=="3" ) { //원파일이 [ 2JPG, 2JPEG, 3PNG ] 경우.
          $thum = $ori.".Thum" ;
          if ( file_exists($thum) ) { // Thumbnail [O] 경우
        $thum_info = getimagesize ($thum);
    $thum_W = $thum_info[0] ;
    $thum_H = $thum_info[1] ;
            } else { // Thumbnail [X] 경우
      if ( smaller( $ori_info[0], $ori_info[1] ) ) {
maker( $thum_W, $thum_H );
    }
        }
                } else if ( $ori_info[2]=="1" || $ori_info[2]=="6" || $ori_info[2]=="7" ) { //원파일이 [ 1GIF,6BMP,7TIF ] 경우.
    if ( smaller( $ori_info[0], $ori_info[1] ) ) {
$thum = $ori ;
    }
              } else { //원파일이 [ 1,2,3,6,7 ] 아닐 경우.
              $thum = $noIMG ;
              }
              $tr = "";
    if ($i && $i%$board[bo_gallery_cols]==0)
        $tr = "</tr><tr>";
    echo "$tr"; ?>
             
         
     
            <td>
           
            <!-- 3번테이블 시작-->
              <table width="100%" border="0" cellpadding="0" cellspacing="0" >
                <tr>
                  <td width="120" align="center" valign="top" style="padding-left:5px; padding-right:10px;">
                    <!-- 이미지테이블 시작-->
                    <table  border="0" cellpadding="0" cellspacing="0">
                      <tr>
                        <td > <table border="0" cellspacing="0" cellpadding="0">
                         
                            <tr>
                              <td></td>
                              <td width="120" height="90"><a href=javascript:// onClick="window.open('<?=$board_skin_path?>/movie.php?bo_table=<?=$bo_table?>&wr_id=<?=$list[$i][wr_id]?>', '', 'scrollbars=no,resizeable=yes,toolbar=no,status=no,top=100,left=100,width=640,height=500');" title='동영상보기'> <img src='<?=$thum?>' alt='동영상보기' width="120" height="90" border=0 ></a></td>
                              <td valign="top" ></td>
                            </tr>
                            <tr>
                              <td></td>
                              <td><div align="center"></div></td>
                              <td></td>
                            </tr>
                          </table></td>
                      </tr>
                      <tr>
                        <td> <table width=120 border="0" cellspacing="0" cellpadding="0">
                            <tr>
                             
                              <td style="padding-top:8px;" align=center><div align="center">   
         
                                <? if ($list[$i][wr_link1]) { ?>
    <a href=javascript:// onClick="window.open('<?=$board_skin_path?>/movie.php?bo_table=<?=$bo_table?>&wr_id=<?=$list[$i][wr_id]?>', '', 'scrollbars=no,resizeable=no,toolbar=no,status=no,top=100,left=100,width=500,height=530');" title='동영상보기'><img src="<?=$board_skin_path?>/img/vod.gif" border="0"></a>         
                                  <? }?></div> 
                   
  </td>
                             
                            </tr>
                            <tr>
                              <td></td>
                              <td ><div align="center"> </div></td>
                              <td></td>
                            </tr>
                          </table></td>
                      </tr>
                    </table>
                    <!-- 이미지테이블 끝-->
                  </td>
                  <td valign="top">
                    <!-- 내용테이블 시작 -->
                    <table width="100%" cellspacing="0" cellpadding="0">
                      <tr>
                        <td width="55" height=23><table width="55" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td width="12"><img src="<?=$board_skin_path?>/img/arr_01.gif" ></td>
                              <td width="25"><div align="center">제목</div></td>
                              <td width="12"><img src="<?=$board_skin_path?>/img/arr_03.gif" /></td>
                            </tr>
                        </table> </td>
                        <td height=23 colspan="3"><font color="#555555">
                          <? if($is_admin) { ?>
                         
                          <?=$list[$i][subject]?>&nbsp;&nbsp;
                         
                          <?  if ($is_admin == "super" || $is_auth)  { ?>
                          <a href='<?=$list[$i][href]?>'>수정</a>
                          <? } ?>
                         
                         
                         
                          <?=$list[$i][comment_cnt]?>
                          <?=$list[$i][icon_new]?>
                          <?=$list[$i][icon_hot]?>
                          <? } else { ?>
                          <?=$list[$i][subject]?>
&nbsp;
<?=$list[$i][comment_cnt]?>
<?=$list[$i][icon_new]?>
<?=$list[$i][icon_hot]?>
<? } ?></font>
                        </td>
                      </tr>
                      <tr>
                        <td height=1 colspan="4" bgcolor=#E7E7E7></td>
                      </tr>
                      <tr>
                        <td width="55" height=23><table width="55" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td width="12"><img src="<?=$board_skin_path?>/img/arr_01.gif"></td>
                              <td width="25"><div align="center">촬영</div></td>
                              <td width="12"><img src="<?=$board_skin_path?>/img/arr_03.gif"></td>
                            </tr>
                          </table></td>
                        <td><b><?=$list[$i][wr_1]?></b> <font color="#FF9933"> [<?=$list[$i][wr_2]?>] </font></td>

                      </tr>
                      <tr>
                        <td height=1 colspan="4" bgcolor=#E7E7E7></td>
                      </tr>
                      <tr>
                        <td width="55" height=23><table width="55" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td width="12"><img src="<?=$board_skin_path?>/img/arr_01.gif" ></td>
                              <td width="25"><div align="center">분류</div></td>
                              <td width="12"><img src="<?=$board_skin_path?>/img/arr_03.gif" ></td>
                            </tr>
                          </table> </td>
                        <td height=23><font color="#cd0606"><? if ($is_category) { ?><?=$list[$i][ca_name]?> <? } ?></font></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="55" valign="top" style="padding-top:5px;"><table width="55" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td width="12"><img src="<?=$board_skin_path?>/img/arr_01.gif" ></td>
                              <td width="25"><div align="center">내용</div></td>
                              <td width="12"><img src="<?=$board_skin_path?>/img/arr_03.gif" ></td>
                            </tr>
                          </table></td>
                        <td colspan="3"  valign="top" style="padding-top:5px;"><div align="justify"><font color="#555555"><?=cut_str(strip_tags($list[$i][wr_content]),150,"...")?></div></font></td>
                        </tr>

                    </table>
                    <!-- 내용테이블 끝 -->
                  </td>
                </tr>
              </table>
             
              <!-- 3번테이블 끝-->
            </td>  <? } if (($cnt = $i%$board[bo_page_rows]) != 0)
    for ($k=$cnt; $k<$$board[bo_page_rows]; $k++)

        echo "<td>&nbsp;</td>\n"; ?>
          </tr> 
        <tr>
          <td  height="10"></td>
          </tr>   
          <tr>
            <td height="1" bgcolor="#E8E8E8"></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=#cccccc 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" 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=* align="right"><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=10 itemname="검색어" required value="<?=$stx?>">
              <input type =hidden name=sop value=and>
              </td>
            <td width=10 ></td>
            <td align=right width="33"><input type=image src="<?=$board_skin_path?>/img/search.gif" border=0 align=absmiddle></td>
         
          </tr>
        </table>
      </form><br><br></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>

<!-- 게시판 목록 끝 -->
© SIRSOFT
현재 페이지 제일 처음으로