왕초보 질문입니다~~ 봐주세요ㅠㅠ > 그누4 질문답변

그누4 질문답변

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

왕초보 질문입니다~~ 봐주세요ㅠㅠ 정보

왕초보 질문입니다~~ 봐주세요ㅠㅠ

본문

짜집기에 짜집기를 하고 있는데....
그림파일 하나 올렸습니다. 봐주세요 ㅠ
큰사진의 밑에 작은사진들 때문에 변형이 생깁니다.
큰사진 밑에 작은사진들을 큰사진의 크기에 맞게끔 늘어나면 자동으로 아래쪽으로 내려가게
어떻게 하나요 ?

------------------------------------
|                                                    |
|                                                    |
|                                                    |          ==>큰사진
|                                                    |
|                                                    |
|                                                    |
|                                                    |
------------------------------------
----  ----  ----  ----  ----  ----  ---- 
|    | |    | |    | |    | |    | |    | |    |          ==>작은사진들
----  ----  ----  ----  ----  ----  ---- 
----  ----  ----  ----   
|    | |    | |    | |    |  
----  ----  ----  ----   


=================> 이런식으로 자동으로 아래로 내려가게 할수 없나요?

//-->
  </SCRIPT>

  <SCRIPT LANGUAGE="JavaScript">
  <!--
  image_directory = "";   //배경이미지 경로
  clear = new Image();  clear.src = image_directory + "./img/blank.gif";
  <?
  //파일 뽑기
  $sql2 = " select bf_file from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '$wr_id' order by bf_no limit 0, 10 ";
  $result2 = sql_query($sql2);
  for ($j=0; $row2 = sql_fetch_array($result2); $j++) {
   if($j==0) $view_one = "{$thumb_path2}/{$row2['bf_file']}";
  }
  ?>
  

  //  -->
  </SCRIPT>

  <table cellspacing="0" cellpadding="0" border="10" "align="center">

   <tr>
   
  
   <td style="padding:0 0 0 0px;border:1px solid #D4DBE1;" width="630" height="380" align="center" valign="top" bgcolor=white>
     <div style='width:630px;position:relative; overflow:hidden;' align="center" id="loadarea"><img src="<?=$view_one?>" border="0"></div>
   </td>
  <!--실험중 아마 큰사진옆 공간인듯 <td width="10"></td> -->
    
   <tr>
   <td style="padding:0 0 0 0px;border:10px solid #D4DBE1;" width="630" height="100%" align="center" valign="top">
    <!--작은사진목록--> 
    <table border="10" cellpadding="0" cellspacing="0" width="100%" valign='top'>
    <tr>
     <td style="border:solid 1px #D3D3D3; background-color:#E5E5E5;" height="160" valign='top'>
      <table border="0" cellpadding="0" cellspacing="0">
 
      <tr>
    
       <?
      //파일 뽑기
      $sql = " select bf_file, bf_source from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '$wr_id' order by bf_no limit 0, 10 ";
      $result = sql_query($sql);
      for ($i=0; $row = sql_fetch_array($result); $i++) {

       
       if($i != 0 && $i % 2 == 0) echo "</td><td>";

       $view_w = 630; //썸네일 가로사이즈
       $view_h = 380; //썸네일 세로사이즈
       $sch_q = 100; //썸네일 퀼리티

       if (!is_dir($thumb_path2)) {
        @mkdir($thumb_path2, 0707);
        @chmod($thumb_path2, 0707);
        
       }

       if (!is_dir($thumb_path)) {
        @mkdir($thumb_path, 0707);
        @chmod($thumb_path, 0707);
        
       }

       $filename = $row[bf_file]; //파일명
       $thumb2 = $thumb_path2.'/'.$filename; //썸네일
      
       if (!file_exists($thumb2)) { //view 용 이미지 생성

        $file = $data_path.'/'.$filename; //원본
        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
          continue;

         $rate = $view_h / $size[1];
         //$width = (int)($size[0] * $rate);
         $width = 630; //가로 사이즈 고정
         
         //echo "rate : $rate ,width : $width, $height : $board[bo_2] <br>";
         if($width <= $view_w) { //width가 지정된 사이즈보다 작을경우 rate 비율로 썸네일 생성
          $dst = imagecreatetruecolor($width, $view_h);
          imagecopyresampled($dst, $src, 0, 0, 0, 0, $width, $view_h, $size[0], $size[1]);
          imagejpeg($dst, $thumb_path2.'/'.$filename, $sch_q);
         } else {
          $rate = $view_w / $size[0];
          $height = (int)($size[1] * $rate);

          $dst = imagecreatetruecolor($view_w, $height);
          imagecopyresampled($dst, $src, 0, 0, 0, 0, $view_w, $height, $size[0], $size[1]);
          imagepng($dst, $thumb_path2.'/'.$filename, $sch_q);
         }
         chmod($thumb_path2.'/'.$filename, 0707);
        }

       }
       
       $view_w = 80; //썸네일 가로사이즈
       $view_h = 60; //썸네일 세로사이즈
       $thumb = $thumb_path.'/'.$filename; //썸네일
       if (!file_exists($thumb)) { //기본 썸네일

        $file = $data_path.'/'.$filename; //원본
        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
          continue;

         $rate = $view_h / $size[1];
         //$width = (int)($size[0] * $rate);
         $width = 80; //사이즈를고정한다.
         
         //echo "rate : $rate ,width : $width, $height : $board[bo_2] <br>";
         if($width <= $view_w) { //width가 지정된 사이즈보다 작을경우 rate 비율로 썸네일 생성
          $dst = imagecreatetruecolor($width, $view_h);
          imagecopyresampled($dst, $src, 0, 0, 0, 0, $width, $view_h, $size[0], $size[1]);
          $dst = UnsharpMask($dst, 80, 0.5, 3);
          imagejpeg($dst, $thumb_path.'/'.$filename, $sch_q);
         } else {
          $rate = $view_w / $size[0];
          $height = (int)($size[1] * $rate);
          $dst = imagecreatetruecolor($view_w, $height);
          imagecopyresampled($dst, $src, 0, 0, 0, 0, $view_w, $height, $size[0], $size[1]);
          $dst = UnsharpMask($dst, 80, 0.5, 3);
          imagepng($dst, $thumb_path.'/'.$filename, $sch_q);
         }
         chmod($thumb_path.'/'.$filename, 0707);
        }

       }

       if (file_exists($thumb) && $filename) {
       ?>

         <td style="border:solid 1px #D0D0D0;height:60px;width:80px;">
         <a rel="enlargeimage::mouseover" rev="loadarea" href="<?=$thumb_path2?>/<?=$filename?>"><img src="<?=$thumb?>" style="border-width:0px;" /></a>
         </td>
        
       
       <?
       //onMouseOut="bgChange('clear');"
        }
       }
       ?>
       </table>
      </td>
     </td>
     </table>
    <!--작은사진목록-->
    </td>
    </tr>
   </tr>
    </table>
    <!--사진테이블-->

 

  • 복사

댓글 전체

© SIRSOFT
현재 페이지 제일 처음으로