레이어에서 첨부이미지 불러오기 > 그누4 질문답변

그누4 질문답변

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

레이어에서 첨부이미지 불러오기 정보

레이어에서 첨부이미지 불러오기

본문

게시판 리스트페이지에서 제목에 마우스를 올리면 등장하는 레이어에

첫번째 첨부파일(이미지)를 불러오려고합니다

$file1 = $list[$i][file][0][path] .'/'. $list[$i][file][0][file]; 이걸 넣어 보긴했는데 출력되지 않네요

답변부탁드립니다

<?
$html = 0;
if (strstr($row[wr_option], "html1"))
    $html = 1;
else if (strstr($row[wr_option], "html2"))
    $html = 2;

    $from_date = str_replace("http://","",$row[wr_link1]);
    $to_date = str_replace("http://","",$row[wr_link2]);
    $from_date = substr($from_date,0,4)."년 ".sprintf("%2d",substr($from_date,4,2))."월 ".sprintf("%2d",substr($from_date,6,2))."일";
    $to_date  = substr($to_date,0,4)."년 ".sprintf("%2d",substr($to_date,4,2))."월 ".sprintf("%2d",substr($to_date,6,2))."일";

$viewlist = cut_str(conv_content($row[wr_content], $html),1000,"…");


echo "<b><font color=#000 font size=2 style='margin-left:10px;'>["
.$row[ca_name]."]".$row[wr_subject]."</font></b>


<a href=http://".$row[wr_8]." target='_blank'>[정보보기]</a>&nbsp;<a href=http://".$row[wr_9]." target='_blank'>[바로가기]</a><font style='cursor:pointer;'> [닫기]</font>


<br>";

$file1 = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];

echo "<br>";
echo "<font color=#000 style='margin-left:15px;'>서비스 : ".$row[wr_2]."</font><br>";

if($from_date != $to_date) {

echo "<font color=#000 style='margin-left:15px;'>기간 : $from_date $row[wr_6] ~ $to_date $row[wr_7]</font><br>";
} else {
echo "<font color=#000 style='margin-left:15px;'>기간 : $from_date $row[wr_6]</font><br>";

}


echo "<div style='margin-left:15px;'>$viewlist</div>";

?>

댓글 전체

리스트에 마우스 오바하면 레이어 나오게 하는 부분을 보여주셔야 원인을 알텐데요
제목에 마우스를 올리면 등장하는 레이어에 <---이렇게 하려면 다음처럼 하면 됩니다
리스트 만들때
for($i=0; $i<count($list); $i++)
~
~
~
<td class="subject" ref='<?=$list[$i][file][0][file]?>'>
~~

자바스크립트 부분에서
$(function(){
 $('.subject').mouseover(function(){
    img="<?=$g4[path]?>/data/file/<?=$bo_table?>/"+$(this).attr('ref');
  window.open(img);
  이렇게 하면 새창에 이미지 나옵니다
  레이어 나오게 하는 부분에 위 이미지 추가하고 레이어 보이게 window.open 부분을 고치면 됩니다
 });

});
답변해주신 내용과 예전 균이님께서 다른분께 답변해준 것을 참고하니 이제 출력 잘되고 있습니다

http://sir.co.kr/bbs/board.php?bo_table=g4_qa&wr_id=195806&sfl=mb_id%2C1&stx=jec1000e

감사합니다
전체 66,554 |RSS
그누4 질문답변 내용 검색

회원로그인

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