2013-03-27 13:17:01 - 본인 요청으로 인한 삭제 (냉무) ☆ > 자유게시판

자유게시판

2013-03-27 13:17:01 - 본인 요청으로 인한 삭제 (냉무) ☆ 정보

2013-03-27 13:17:01 - 본인 요청으로 인한 삭제 (냉무) ☆

본문

추천
0

댓글 11개

ddd ... 익스6, 5.5 도 잘 나오네요 ... 오랜만에 IE tester ... 해 보니까 ... 단,
테스트 안해 주시면 없던GIRL로 합니다... 滿렙인데 ....
아파치님을 위한 배려 ....

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

$img_width = 370; // 섬네일 이미지 가로사이즈
$img_height = 180; // 섬네일 이미지 세로사이즈
$img_quality = 90; // 이미지 해상도
$imgSpeed = 3000;  // 이미지 변환 속도
$box_width = 330; // 상단 제목 박스 가로픽셀
$button_width = 330;  // 하단 버턴 박스 가로픽셀

if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 갤러리 게시판 입니다.");

$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb_01';
$ym = date("ym", $g4[server_time]);

@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);

//코멘트와 리플글은 제외
$sql = " select * from $tmp_write_table where wr_comment = '' and wr_reply = '' order by wr_id DESC LIMIT 0, 1 ";
$result = sql_query($sql);
$last_con = sql_fetch_array($result);

?>
<style type="text/css">
#debat {
width:100%;
text-align:center;
padding:0;
margin:0 0 10px 0
}
#button1 {
width:<?=$button_width;?>px;
margin:0 auto; /*가운데정렬*/
padding:5px 0 2px 0; /*패딩*/
position: relative; top: -57px; left: 0; /*포지션위로왼쪽으로*/
z-index:2000;
background:#f3f3f3; /*버턴배경색상*/
border:2px solid #ddd /*버턴테두리픽셀색상*/
}

#captionz {
text-align:left;
width:<?=$box_width;?>px;
margin:0 auto; /*가운데정렬*/
padding:5px 0 5px 10px; /*패딩*/
position: relative; top: -200px; left: 0;  /*포지션위로왼쪽으로*/
z-index:2010;
color:#010;
background:#f6f6f6; /*제목배경색상*/
border:2px solid #ddd /*제목테두리픽셀색상*/
}
</style>

<script type="text/javascript">
<!--
new_debate_V='1';
function ComeonV(objid_V){
document.getElementById("debate_V"+new_debate_V).style.display="none";
document.getElementById("debate_V"+new_debate_V+"#1").style.display="";

document.getElementById("debate_V"+objid_V+"#1").style.display="none";
document.getElementById("debate_V"+objid_V).style.display="";

document.getElementById("debate_content_V"+new_debate_V).style.display="none";
document.getElementById("debate_content_V"+objid_V).style.display="";

new_debate_V=objid_V;
}
var objid_V = 1;
var interval_best;

function best_changeV() {
 if( objid_V == <?=count($list);?>) // 오버랩되는 갯수, 데이타 읽어올 수 만큼
  objid_V = 1;
 else
  objid_V++;

 ComeonV(objid_V);
}

function setInterval_best() {
interval_best = setInterval("best_changeV()",<?=$imgSpeed;?>);//속도조절
}

function clearInterval_best() {
clearInterval(interval_best);
}

setInterval_best();
//-->
</script>
<div id="debat">
<? for ($i=0; $i<count($list); $i++) {
$j = $i + 1; 
if ($j == "1") {
echo "<div>";
echo "<div id='debate_content_V$j' onmouseover='clearInterval_best()' onmouseout='setInterval_best()'>"; }
else { echo "<div id='debate_content_V$j' onmouseover='clearInterval_best()' onmouseout='setInterval_best()' style='display: none;'>\n"; }
?>
<div id="debat">
<?
//썸네일 생성
$thumfile = "";
    $thumb = $thumb_path.'/'.$list[$i][wr_id];
   
    // 썸네일 이미지가 존재하지 않는다면
    if (!file_exists($thumb)) {
        $file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
        // 업로드된 파일이 이미지라면
        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
                break;

            $rate = $img_width / $size[0];
            $height = (int)($size[1] * $rate);

            // 계산된 썸네일 이미지의 높이가 설정된 이미지의 높이보다 작다면
            if ($height < $img_height)
                // 계산된 이미지 높이로 복사본 이미지 생성
                $dst = imagecreatetruecolor($img_width, $height);
            else
                // 설정된 이미지 높이로 복사본 이미지 생성
                $dst = imagecreatetruecolor($img_width, $img_height);
            imagecopyresampled($dst, $src, 0, 0, 0, 0, $img_width, $height, $size[0], $size[1]);
            imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id], $img_quality);
            chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
        } else { //editor로 삽입한 이미지
$edit_img = $list[$i]['wr_content'];
if (eregi("data/[^<>]*\.(gif|jp[e]?g|png|bmp)", $edit_img, $tmp)) { // data/editor------
$file = './' . $tmp[0]; // 파일명
$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
break;

$rate = $img_width / $size[0];
$height = (int)($size[1] * $rate);

// 계산된 썸네일 이미지의 높이가 설정된 이미지의 높이보다 작다면
if ($height < $img_height)
// 계산된 이미지 높이로 복사본 이미지 생성
$dst = imagecreatetruecolor($img_width, $height);
else
// 설정된 이미지 높이로 복사본 이미지 생성
$dst = imagecreatetruecolor($img_width, $img_height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $img_width, $height, $size[0], $size[1]);
imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id], $img_quality);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
    }
}

$subjectv = cut_str(strip_tags($list[$i][subject]), 50);
$contentv = cut_str(strip_tags($list[$i][wr_content]), 58);

    if (file_exists($thumb))
        $thumfile = "<img src='$thumb' width='{$img_width}' height='{$img_height}' style='border:1px #ccc solid'>";
else
//이미지가 없으면
$thumfile="<img src='$latest_skin_path/img/noimg.gif' width='{$img_width}' height='{$img_height}' style='border:0 #E7E7E7 solid'>";
//이미지가 아니네
        if(preg_match("/\.(swf|wma|asf)$/i","$file") && file_exists($file))
      { $thumfile = "<script>doc_write(flash_movie('$file', 'flash$i', '$img_width', '$img_height', 'transparent'));</script>"; }
?>
<a href='<?=$list[$i][href]?>'><?=$thumfile?></a>
<div id="captionz">제목 : <?=$subjectv?><!--<br />내용 : <?=$contentv?>--></div>
</div>

<?
echo "</div>";
}
?>
<div id="button1">
<? for ($i=0; $i<count($list); $i++) {
$k = $i + 1;
?>
<a href="javascript:ComeonV('<?=$k?>');" onmouseover="ComeonV('<?=$k?>')"><img src="<?=$latest_skin_path?>/img/<?=$k?>_on.gif" id="debate_V<?=$k?>" onmouseover="clearInterval_best()" onmouseout="setInterval_best()" <? if($k == "1") { echo ""; } else { echo "style='display: none;' "; } ?>><img src="<?=$latest_skin_path?>/img/<?=$k?>.gif" id="debate_V<?=$k?>#1"  <? if($k == "1") { echo "style='display: none;'"; } else { echo ""; } ?>>
<?}?>
</div>
</div>
</div>
수정 :

$thumfile = "<img src='$thumb' style='width:{$img_width}px; height:{$img_height}px; border:1px solid #ccc'>";
else
//이미지가 없으면
$thumfile="<img src='$latest_skin_path/img/noimg.gif' style='width:{$img_width}px; height:{$img_height}px; border:0 solid #E7E7E7'>";
신경 써 주셔서 감사합니다...^^

외출했다가 힘들어 한숨자고 지금 일어나서 보았습니다....ㅜㅜ

새벽 3시 30분 이네요...눈비비고...ㅋㅋ

다운받아서 잘 모셔두었다가 필요할때 잘 사용 하겠습니다. 감사합니다....^^
전체 199,654 |RSS
자유게시판 내용 검색

회원로그인

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