팝업레이어 하루 닫기 해도 다시 열리는 점 ㅠ 도와주세요..
하루닫기를 해도 새로고침시 다시 열리네요 ㅠ
이리저리 만저봐도 통 안돼서 질문올려봐요..
도와주세요! ㅠ
https://sir.kr/data/editor/1708/ec013df91e08d589a64e8ede4fe75470_1502329470_5342.jpg" title="ec013df91e08d589a64e8ede4fe75470_1502329470_5342.jpg">
</p><p style="font-size: 14.6667px;"><?</p><p style="font-size: 14.6667px;">///레이어보기</p><p style="font-size: 14.6667px;">function view_layer($no){</p><p style="font-size: 14.6667px;">
</p><p style="font-size: 14.6667px;">global $g4;</p><p style="font-size: 14.6667px;">
</p><p style="font-size: 14.6667px;">
</p><p style="font-size: 14.6667px;">$sql="select * from {$g4[site_popup_table]} where no=$no ";</p><p style="font-size: 14.6667px;">
</p><p style="font-size: 14.6667px;">$result=mysql_query($sql);</p><p style="font-size: 14.6667px;">$layer=mysql_fetch_array($result);</p><p style="font-size: 14.6667px;">
</p><p style="font-size: 14.6667px;">$title=stripslashes($layer[title]);</p><p style="font-size: 14.6667px;">$check_input=$layer[check_input];</p><p style="font-size: 14.6667px;">
</p><p style="font-size: 14.6667px;">$content=nl2br(stripslashes($layer[content]));</p><p style="font-size: 14.6667px;">
</p><p style="font-size: 14.6667px;">
</p><p style="font-size: 14.6667px;">
</p><p style="font-size: 14.6667px;">$img_file=$layer[img_file];</p><p style="font-size: 14.6667px;">$img_url=$layer[img_url];</p><p style="font-size: 14.6667px;">$gigan=$layer[gigan];</p><p style="font-size: 14.6667px;">
</p><p style="font-size: 14.6667px;">
</p><p style="font-size: 14.6667px;">$gigan_hour=$gigan*24;</p><p style="font-size: 14.6667px;">
</p><p style="font-size: 14.6667px;">switch($gigan)</p><p style="font-size: 14.6667px;">{</p><p style="font-size: 14.6667px;"><span style="white-space: pre;"> </span>case '1':</p><p style="font-size: 14.6667px;"><span style="white-space: pre;"> </span>$gigan_text="하루동안 보이지 않습니다";</p><p style="font-size: 14.6667px;"><span style="white-space: pre;"> </span>break;</p><p style="font-size: 14.6667px;"><span style="white-space: pre;"> </span>case '2':</p><p style="font-size: 14.6667px;"><span style="white-space: pre;"> </span>$gigan_text="이틀동안 보이지 않습니다";</p><p style="font-size: 14.6667px;"><span style="white-space: pre;"> </span>break;</p><p style="font-size: 14.6667px;">
</p><p style="font-size: 14.6667px;"><span style="white-space: pre;"> </span>case '3':</p><p style="font-size: 14.6667px;"><span style="white-space: pre;"> </span>$gigan_text="사흘동안 보이지 않습니다";</p><p style="font-size: 14.6667px;"><span style="white-space: pre;"> </span>break;</p><p style="font-size: 14.6667px;">
</p><p style="font-size: 14.6667px;"><span style="white-space: pre;"> </span>case '7':</p><p style="font-size: 14.6667px;"><span style="white-space: pre;"> </span>$gigan_text="일주일동안 보이지 않습니다";</p><p style="font-size: 14.6667px;"><span style="white-space: pre;"> </span>break;</p><p style="font-size: 14.6667px;">
</p><p style="font-size: 14.6667px;"><span style="white-space: pre;"> </span>case '15':</p><p style="font-size: 14.6667px;"><span style="white-space: pre;"> </span>$gigan_text="보름동안 보이지 않습니다";</p><p style="font-size: 14.6667px;"><span style="white-space: pre;"> </span>break;</p><p style="font-size: 14.6667px;">
</p><p style="font-size: 14.6667px;"><span style="white-space: pre;"> </span>case '0':</p><p style="font-size: 14.6667px;"><span style="white-space: pre;"> </span>$gigan_text="다음에 보이지 않습니다.";</p><p style="font-size: 14.6667px;"><span style="white-space: pre;"> </span>break;</p><p style="font-size: 14.6667px;">
</p><p style="font-size: 14.6667px;"><span style="white-space: pre;"> </span>default:</p><p style="font-size: 14.6667px;"><span style="white-space: pre;"> </span>$gigan_text="하루동안 보이지 않습니다";</p><p style="font-size: 14.6667px;"><span style="white-space: pre;"> </span>break;</p><p style="font-size: 14.6667px;">}</p><p style="font-size: 14.6667px;">
</p><p style="font-size: 14.6667px;">
</p><p style="font-size: 14.6667px;">//----이미지파일을 너비/높이로.변경....</p><p style="font-size: 14.6667px;"><span style="white-space: pre;"> </span>if($layer[check_input]=="IMG" && $layer[img_file]){</p><p style="font-size: 14.6667px;">
</p><p style="font-size: 14.6667px;"><span style="white-space: pre;"> </span>$size=GetImageSize($g4[path]."/popup_img/".$layer[img_file]);</p><p style="font-size: 14.6667px;"><span style="white-space: pre;"> </span>$width=$size[0];</p><p style="font-size: 14.6667px;"><span style="white-space: pre;"> </span>$height=$size[1];</p><p style="font-size: 14.6667px;"><span style="white-space: pre;"> </span>}else{</p><p style="font-size: 14.6667px;"><span style="white-space: pre;"> </span>$width=$layer[width];</p><p style="font-size: 14.6667px;"><span style="white-space: pre;"> </span>$height=$layer[height];</p><p style="font-size: 14.6667px;">
</p><p style="font-size: 14.6667px;"><span style="white-space: pre;"> </span>}</p><p style="font-size: 14.6667px;">
</p><p style="font-size: 14.6667px;">if($img_url){</p><p style="font-size: 14.6667px;"><span style="white-space: pre;"> </span>$a_img_start="<a href='{$img_url}'>";</p><p style="font-size: 14.6667px;"><span style="white-space: pre;"> </span>$a_img_end="</a>";</p><p style="font-size: 14.6667px;">}else{</p><p style="font-size: 14.6667px;"><span style="white-space: pre;"> </span>$a_img_start="";</p><p style="font-size: 14.6667px;"><span style="white-space: pre;"> </span>$a_img_end="";</p><p style="font-size: 14.6667px;">}</p><p style="font-size: 14.6667px;">
</p><p style="font-size: 14.6667px;">
</p><p style="font-size: 14.6667px;">
</p><p style="font-size: 14.6667px;">?></p><p style="font-size: 14.6667px;"><div id="layer_<?=$no?>" style="position:absolute; left:<?=$layer[popup_left]?>%; top:<?=$layer[popup_top]?>%; width: 100%; max-width:<?=$width?>px; height:auto; z-index:<?=1000 +$no?>;filter:revealTrans(transition=23,duration=0.5) blendTrans(duration=0.5);cursor:hand;background-color:#FFFFFF"</p><p style="font-size: 14.6667px;">onmouseover="dragObj=layer_<?=$no?>; drag=1;move=0" onmouseout="drag=0"></p><p style="font-size: 14.6667px;">
</p><p style="font-size: 14.6667px;">
</p><p style="font-size: 14.6667px;"><table border=0 cellpadding=0 cellspacing=0></p><p style="font-size: 14.6667px;"><!--<tr height=20 bgcolor=#000000></p><p style="font-size: 14.6667px;"><td colspan=2> <font color=#e1e1e1 class='font_11'>■</FONT> <font color=#ffffff class='font_11'><?=$title?></FONT></td></p><p style="font-size: 14.6667px;"></tr>--></p><p style="font-size: 14.6667px;"><tr valign=top ></p><p style="font-size: 14.6667px;"><span style="white-space: pre;"> </span><td colspan=2></p><p style="font-size: 14.6667px;"><!--------------본문----------------></p><p style="font-size: 14.6667px;"><?if($check_input=="TEXT") {</p><p style="font-size: 14.6667px;"><span style="white-space: pre;"> </span>?></p><p style="font-size: 14.6667px;"><table border=0 cellpadding=0 cellspacing=0 style="width: 100%; height: auto;" ></p><p style="font-size: 14.6667px;"><tr></p><p style="font-size: 14.6667px;"><span style="white-space: pre;"> </span><td valign=top><?=$content?></td></p><p style="font-size: 14.6667px;"></tr></p><p style="font-size: 14.6667px;"></table></p><p style="font-size: 14.6667px;"><? }//컨텐츠 끝?></p><p style="font-size: 14.6667px;"><?if($check_input=="IMG") {</p><p style="font-size: 14.6667px;"><span style="white-space: pre;"> </span>?></p><p style="font-size: 14.6667px;"><table border=0 cellpadding=0 cellspacing=0 style="width: 100%; height: auto;"></p><p style="font-size: 14.6667px;"><tr></p><p style="font-size: 14.6667px;"><span style="white-space: pre;"> </span><td class="img_td" align=center valign=top><?=$a_img_start?><img src="<?=$g4[path]?>/popup_img/<?=$img_file?>" border=0 alt="이미지를 클릭하시면 해당정보로 이동합니다!"><?=$a_img_end?></td></p><p style="font-size: 14.6667px;"><span style="white-space: pre;"> </span><style></p><p style="font-size: 14.6667px;"><span style="white-space: pre;"> </span>.img_td>img{width: 100%; height: auto;}</p><p style="font-size: 14.6667px;"><span style="white-space: pre;"> </span></style></p><p style="font-size: 14.6667px;"></tr></p><p style="font-size: 14.6667px;">
</p><p style="font-size: 14.6667px;"></table></p><p style="font-size: 14.6667px;"><? }//이미지 끝?></p><p style="font-size: 14.6667px;">
</p><p style="font-size: 14.6667px;"><!---------------본문 끝-------------></p><p style="font-size: 14.6667px;"><span style="white-space: pre;"> </span></td></p><p style="font-size: 14.6667px;"></tr></p><p style="font-size: 14.6667px;">
</p><p style="font-size: 14.6667px;"><tr height=20 bgcolor=#000000></p><p style="font-size: 14.6667px;"><span style="white-space: pre;"> </span><td> </p><p style="font-size: 14.6667px;"><span style="white-space: pre;"> </span><font color=#FFFFFF style='font-size:11px;font-family:돋움'><?=$gigan_text?></FONT> </p><p style="font-size: 14.6667px;"><span style="white-space: pre;"> </span><input type=checkbox name="gigan" value="<?=$no?>" onclick="set_cookie('cookie_<?=$no?>','Y', <?=$gigan_hour?>,'/');layer_<?=$no?>.style.display='none';" align=absmiddle></p><p style="font-size: 14.6667px;"><span style="white-space: pre;"> </span> </p><p style="font-size: 14.6667px;"><span style="white-space: pre;"> </span></td></p><p style="font-size: 14.6667px;"><span style="white-space: pre;"> </span><td align=right><span OnClick="layer_<?=$no?>.style.display='none';" style='cursor:hand'><img src='<?=$g4[path]?>/img/img_close_x.gif' border=0 align='absmiddle'></span></p><p style="font-size: 14.6667px;"><span style="white-space: pre;"> </span> </p><p style="font-size: 14.6667px;"><span style="white-space: pre;"> </span></td></p><p style="font-size: 14.6667px;"></tr></p><p style="font-size: 14.6667px;">
</p><p style="font-size: 14.6667px;"></table></p><p style="font-size: 14.6667px;"></div></p><p style="font-size: 14.6667px;"><?</p><p style="font-size: 14.6667px;">}//view_layer의 끝</p><p style="font-size: 14.6667px;">?></p><p style="font-size: 14.6667px;">
댓글을 작성하려면 로그인이 필요합니다.
답변 1개
Expert
8년 전
팝업 하루 열리지 않게 하는것은 자바스크립트로 구현하셔야 하는 부분인데 php 구문이랑 쿼리로 사용하셨네요
참고 소스를 보시고 적용해 보세요
https://sir.kr/g4_tiptech/23170">https://sir.kr/g4_tiptech/23170
로그인 후 평가할 수 있습니다
답변에 대한 댓글 2개
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인전체 질문 목록
답변대기
답변대기
답변대기
답변대기
답변대기
답변대기
답변대기
답변대기
채택
답변대기
답변대기
답변대기
답변대기
채택
채택
답변대기
답변대기
답변대기
채택