리스트 사진... > 그누4 질문답변

그누4 질문답변

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

리스트 사진... 정보

리스트 사진...

첨부파일

list.skin.php (18.7K) 2회 다운로드 2009-12-03 18:10:25

본문

리스트에서 사진이 나오게 되어 있는데여...

이게 회원일 때 나오고

비회원일 때 안나오게 해야 하는데...

이미지 처리 부분에서 어떻게 수정해야 하나여?

--------------------------------------------------------------------------------------------<? // 이미지 처리부분

##################################################################################################
$thum = "";
$list_view = "";
$image = urlencode($list[$i][file][0][file]); // 첫번째 파일이 이미지라면
$images = "$g4[path]/data/file/$bo_table/$image";

if (preg_match("/\.(gif|jpg|png)$/i", $image) && file_exists("$g4[path]/data/file/$bo_table/$image")) {


 if (preg_match("/\.(gif|jpg|png)$/i", $image) && file_exists("$g4[path]/data/file/$bo_table/$image")) {
 $ori = "$g4[path]/data/file/$bo_table/$image"; //[필수](URL) "./img/Test.gif"
 }

 $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="";

 //===== 원파일이 [ 2JPG, 2JPEG, 3PNG ] 경우
 if ( $ori_info[2]=="2" || $ori_info[2]=="3" ) {
  $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 );
  }
 }

 }

 //===== 원파일이 [ 1GIF,6BMP,7TIF ] 경우
 else if ( $ori_info[2]=="1" || $ori_info[2]=="6" || $ori_info[2]=="7" ) {
  if ( smaller( $ori_info[0], $ori_info[1] ) ) { $thum = $ori ; }
 }

 //===== 원파일이 [ 1,2,3,6,7 ] 아닐 경우
 else {
  $thum = $noIMG ;
  $noIMG_info = getimagesize ($noIMG);
  $thum_W = $noIMG_info[0] ;
  $thum_H = $noIMG_info[1] ;
 }

   $list_view = "<img src='$thum' width='$thum_W' height='$thum_H' border=0 align=absmiddle style='border-width:1; border-color:rgb(102,102,102); border-style:solid;'>";

} else if (preg_match("/\.($config[cf_flash_extension])$/i", $image)) {
 
   $list_view = "<embed src='$images' width='96' height='72' style='border-width:1; border-color:rgb(102,102,102); border-style:solid;'></embed>";
  
} else if (preg_match("/\.($config[cf_movie_extension])$/i", $image)) {  
 
   $list_view = "<embed src='$images' width='96' height='72' style='border-width:1; border-color:rgb(102,102,102); border-style:solid;'></embed>";
  
} else { $list_view = "<img src='$noIMG' alt='이미지 없음' width='96' height='72' style='border-width:1; border-color:rgb(102,102,102); border-style:solid;'>"; }
  
##################################################################################################
?>

이부분이 이미지 처리 부분입니다. 그리고 소스 파일은 첨부파일로 업했습니다

요기 아래를 수정하면 되는건지여?

댓글 전체

전체 66,554 |RSS
그누4 질문답변 내용 검색

회원로그인

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