팝업 레이어와 쿠키 관련 질문입니다.
index.php 에서
<?
if ( $checkbox == "checkbox" ) {setcookie("popup", 1, time()+60*60*24); }
elseif (!isset($_COOKIE["popup"])) {
?>
<style type="text/css">
<!--
#theLayer form {
font-family: "돋움";
font-size: 12px;
}
-->
</style>
<div id="theLayer" style="position:absolute;width:250px; visibility:visible; left:100px; top: 100px; display:block;">
<table width="411" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="411" height="280" align="right" valign="top" background="/image/popup.gif"><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="99" height="29"><p> </p> </td>
<td width="73" style="cursor:pointer" onClick="document.getElementById('theLayer').style.display='none';"> </td>
</tr>
<tr>
<td height="204" colspan="2"> </td>
</tr>
<tr>
<td colspan="2"><form name="frm_pop" method="post" action="">
<input type="checkbox" name="checkbox" value="checkbox" onClick="document.getElementById('frm_pop').submit();">
<label for="checkbox">다음부터 이 창 열지않음.</label> </form></td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<? } ?>
위 구문을 삽입했습니다.
그런데, "다음부터 이 창 열지않음"을 체크하면 쿠키가 구워져야 하는데, 구워지질 않습니다.
그래서 별도로 빈 파일 하나 만들어 위 구문만 붙여넣고 테스트를 해보면 잘 됩니다.
아마도 그누보드자체에서 인클루드되는 파일들 중에 쿠키관련 부분이 있어서 index.php 파일 내에 위 구문을 삽입했을 때, 쿠키가 안구워지는 것 같은데....
해결책이 없을까요???
고수님들... 도와주세요...
<?
if ( $checkbox == "checkbox" ) {setcookie("popup", 1, time()+60*60*24); }
elseif (!isset($_COOKIE["popup"])) {
?>
<style type="text/css">
<!--
#theLayer form {
font-family: "돋움";
font-size: 12px;
}
-->
</style>
<div id="theLayer" style="position:absolute;width:250px; visibility:visible; left:100px; top: 100px; display:block;">
<table width="411" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="411" height="280" align="right" valign="top" background="/image/popup.gif"><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="99" height="29"><p> </p> </td>
<td width="73" style="cursor:pointer" onClick="document.getElementById('theLayer').style.display='none';"> </td>
</tr>
<tr>
<td height="204" colspan="2"> </td>
</tr>
<tr>
<td colspan="2"><form name="frm_pop" method="post" action="">
<input type="checkbox" name="checkbox" value="checkbox" onClick="document.getElementById('frm_pop').submit();">
<label for="checkbox">다음부터 이 창 열지않음.</label> </form></td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<? } ?>
위 구문을 삽입했습니다.
그런데, "다음부터 이 창 열지않음"을 체크하면 쿠키가 구워져야 하는데, 구워지질 않습니다.
그래서 별도로 빈 파일 하나 만들어 위 구문만 붙여넣고 테스트를 해보면 잘 됩니다.
아마도 그누보드자체에서 인클루드되는 파일들 중에 쿠키관련 부분이 있어서 index.php 파일 내에 위 구문을 삽입했을 때, 쿠키가 안구워지는 것 같은데....
해결책이 없을까요???
고수님들... 도와주세요...
|
댓글을 작성하시려면 로그인이 필요합니다.
로그인
댓글 3개
그누보드에서도 popup 이라는 쿠키를 쓸수도있으니까요. 쿠키명 변경하시고 시도해보는게 어떨런지요