게시판에서 그림 첨부된 게시물은 어떻게 검색하죠? > 자유게시판

자유게시판

게시판에서 그림 첨부된 게시물은 어떻게 검색하죠? 정보

게시판에서 그림 첨부된 게시물은 어떻게 검색하죠?

본문

갑자기 궁금해 졌습니다.
추천
0

댓글 6개

초면에......죄성 하지만 ..
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
잘~~~~~~~~~~~~~~~~~~~~~~~ ^^* 즐건 주말 ㅋㅋ
1,일단 업로드된 파일의 수 만큼 반복이 되어야 겠구요... $list[$i][file][count]
2,그 중에 파일 타입이 1,2,6,7.. 이미지 파일이냐를 알아야겠구요..
3,수정,삭제,후에 실질적으로 그 $i 번째에 파일이 있냐 겠죠..
4,만약 파일이 있다고 판명될 경우 링크를 걸고 새창으로 이미지를 열경우
좌 우로 이미지를 드래그 가능하고 더블클릭시 닫히게 하려면
업로드 된 파일중 가로로 가장 큰 이미지의 크기를 알아야 스크롤바가 생기지 않겠네요..

<? 
      #####################################################  
  $big_width_ok=0; $big_height_ok=0;
  for($fi=0, $fi_pic=0, $m=0; $m < $list[$i][file][count]; $m++){
            $res_sql = @mysql_query("select * from g4_board_file
where (bo_table='$bo_table' and wr_id='{$list[$i][wr_id]}' and bf_no='$m')");
            while($data_sql = @mysql_fetch_array($res_sql))
{$file_bf_wr_id=$data_sql[wr_id];
  $file_bf_no=$data_sql[bf_no];
  $file_bf_source=$data_sql[bf_source];
                  $file_bf_file=$data_sql[bf_file];                     
                  $file_bf_download=$data_sql[bf_download]; 
                  $file_bf_download=$data_sql[bf_download];
  $file_bf_content=$data_sql[bf_content];
  $file_bf_filesize=$data_sql[bf_filesize];
  $file_bf_width=$data_sql[bf_width];
  $file_bf_height=$data_sql[bf_height];
  $file_bf_type=$data_sql[bf_type];
  $file_bf_datetime=$data_sql[bf_datetime];
  //___________________________________________________________________  
                  if(strlen($file_bf_file) >3 && strlen($file_bf_source) >3 && $file_bf_filesize >0)
  {$fi++; //실질적으로 파일이 있다면 갯수 증가
                  //__파일 타입이 1:gif 나  2:jpg 이면
  if($file_bf_type==1 || $file_bf_type==2 ||$file_bf_type==6) //이미지가 발견되면
{$fi_pic++;//echo"$fi_pic";  
                      $big_width=$file_bf_width;
  if($big_width_ok<$big_width) $big_width_ok=$big_width;  //제일큰 이미지에 맞춰
                      $big_height=$file_bf_height;
  if($big_height_ok<$big_height) $big_height_ok=$big_height; //제일긴 이미지에 맞춰..한장일때를 위함
}//file type 1 or 2                                       
}//strlen_____________________________________________________________     
              }//while
  }//for 파일 수만큼 반복
  if($fi_pic !=0){
//처음발견된 이미지가 아니라 글중에 이미지가 있다면 무조건 1번만 보인다.
          $big_width_ok=$big_width_ok+30;   
$big_height_ok=$big_height_ok+160;
    echo "<a href=\"javascript:popup_window('$latest_skin_path/imgs_new_windows_open.php?bo_table={$bo_table}&wr_id={$list[$i][wr_id]}&no=0','winBoard','left=0, top=0, width=$big_width_ok, height=$big_height_ok, scrollbars=1,overflow-x:hidden,overflow-y:auto,resizable=no')\" onfocus=\"this.blur()\"><img src='$latest_skin_path/img/f8_dot.gif' border='0'></a>";
          } else{echo"<img src='$latest_skin_path/img/f8_doc.gif' border='0'>";}
        ######################################################
        ?>
전체 199,696 |RSS
자유게시판 내용 검색

회원로그인

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