질문 & 답변 게시판
<?
$_zb_url = "http://www.studiokimche.com/bbs/";
$_zb_path = "/home/studiokimche/bbs/";
include $_zb_path."outlogin.php";
?>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=euc-kr">
<title>아기사진전문 스튜디오김치 - 방문해주셔서 감사합니다. :) </title>
<meta name="generator" content="Namo WebEditor v6.0">
<script language="JavaScript"><!--
// -->
</script>
<script language="JavaScript">
<!--
function na_open_window(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable)
{
toolbar_str = toolbar ? 'yes' : 'no';
menubar_str = menubar ? 'yes' : 'no';
statusbar_str = statusbar ? 'yes' : 'no';
scrollbar_str = scrollbar ? 'yes' : 'no';
resizable_str = resizable ? 'yes' : 'no';
cookie_str = document.cookie;
cookie_str.toString();
pos_start = cookie_str.indexOf(name);
pos_start = cookie_str.indexOf('=', pos_start);
pos_end = cookie_str.indexOf(';', pos_start);
if (pos_end <= 0) pos_end = cookie_str.length;
cookie_val = cookie_str.substring(pos_start + 1, pos_end);
if (cookie_val == "done")
return;
window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
}
// -->
</script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="purple" alink="red" leftmargin="0" marginwidth="0" topmargin="0" marginheight="0">
<div align="left">
<table cellpadding="0" cellspacing="0" width="100%" style="border-collapse:collapse;" bgcolor="#999999">
<tr>
<td width="1318" height="200" align="left" valign="top" style="border-top-width:3; border-right-width:1; border-bottom-width:1; border-left-width:1; border-top-color:rgb(255,153,0); border-right-color:black; border-bottom-color:black; border-left-color:black; border-top-style:solid; border-right-style:none; border-bottom-style:none; border-left-style:none;" bgcolor="white">
<table cellpadding="0" cellspacing="0" width="1003">
<tr>
<td width="300" height="78" rowspan="3"><a href="http://www.studiokimche.com"><img src="image/nlogo.gif" width="300" height="94" border="0"></a></td>
<td width="703" height="21" align="right" bgcolor="white"><? print_outlogin("new", 1, 10) ?></td>
</tr>
<tr>
<td width="703" height="21"><a href="http://www.studiokimche.com/n_about.html"><img src="image/about.gif" width="139" height="35" border="0"></a><a href="http://www.studiokimche.com/bbs/zboard.php?id=imageboard"><img src="image/gallery.gif" width="82" height="35" border="0"></a><a href="http://www.studiokimche.com/bbs/zboard.php?id=price"><img src="image/price.gif" width="80" height="35" border="0"></a><a href="http://www.studiokimche.com/bbs/zboard.php?id=board"><img src="image/reservation.gif" width="128" height="35" border="0"></a><a href="http://www.studiokimche.com/bbs/zboard.php?id=imagebox"><img src="image/photo.gif" width="95" height="35" border="0"></a><a href="http://www.studiokimche.com/bbs/zboard.php?id=tandb"><img src="image/board.gif" width="83" height="35" border="0"></a><a href="http://www.studiokimche.com/bbs/zboard.php?id=event"><img src="image/event.gif" width="95" height="35" border="0"></a></td>
</tr>
<tr>
<td width="703" height="26"> </td>
</tr>
</table> <table cellspacing="0" style="border-collapse:collapse;" width="100%" height="700" bgcolor="black" align="center" cellpadding="50">
<tr>
<td style="border-width:1; border-color:black; border-style:none;">
<p>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="900" height="400">
<param name="movie" value="gguno_gallery_v22.swf">
<param name="play" value="true">
<param name="loop" value="true">
<param name="quality" value="high">
<embed width="900" height="400" src="gguno_gallery_v22.swf" play="true" loop="true" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed></object></p>
</td>
</tr>
</table>
<table cellspacing="0" style="border-collapse:collapse;" width="100%" bgcolor="white">
<tr>
<td width="1316" style="border-top-width:2; border-right-width:1; border-bottom-width:1; border-left-width:1; border-top-color:rgb(51,51,51); border-right-color:black; border-bottom-color:black; border-left-color:black; border-top-style:solid; border-right-style:none; border-bottom-style:none; border-left-style:none;"><a href="javascript:na_open_window('win', 'http://club.cyworld.com/club/main/club_main.asp?club_id=51090340', 0, 0, 800, 600, 0, 1, 0, 1, 1)" target="_self"><img src="image/cyi.gif" width="80" height="74" border="0"></a><a href="javascript:na_open_window('win', 'http://cafe.naver.com/studiokimche.cafe', 0, 0, 800, 600, 0, 1, 0, 1, 1)" target="_self"><img src="image/nci.gif" width="127" height="74" border="0"></a><img src="image/copy.gif" width="776" height="74" border="0"></td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</body>
</html>
이렇게 index.html를 만들었습니다 그런데 어디에 팝업창을 넣어야 하나요???
팝업창 문서는 event_pop.html입니다 크기는 400x517입니다.
index.html를 열리면서 같이 열리게 하고 싶습니다...
고수님들 꼭 도와 주세요... 어디에 구체적으로 어디에 어떻게 넣는지 검색해도 어디에 넣어야 할지 몰라 하루고생했습니다.
그럼 오늘도 좋은 하루되시길.....



출력한 소스중 팝업창으로 사용중인 소스를 모두 제거를 한 뒤에 아래 소스나 설명을 참고를 해 보세요..
<script LANGUAGE="JavaScript">
<!--
function getCookie( name ){
var nameOfCookie = name + "=";
var x = 0;
while ( x <= document.cookie.length )
{
var y = (x+nameOfCookie.length);
if ( document.cookie.substring( x, y ) == nameOfCookie ) {
if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 )
endOfCookie = document.cookie.length;
return unescape( document.cookie.substring( y, endOfCookie ) );
}
x = document.cookie.indexOf( " ", x ) + 1;
if ( x == 0 )
break;
}
return "";
}
if ( getCookie( "Notice" ) != "done" ) {
noticeWindow = window.open('http://홈주소/event_pop.html','notice','left=0, top=0, width=400,height=530');
noticeWindow.opener = self;
}
// -->
</script>
위에 소스를 부모창 즉 index.html 파일 소스 <head>와 </head> 사이에 추가를 해 줍니다.
소소를 보면 사용자분의 경로로 수정하세요..
다음)
<html>
<head>
<title>팝업창</title>
<style type='text/css'>
<!--
p,br,body,td,select,input,form,textarea,option {font-size:9pt;font-family:돋움;}
.cont{line-height:140%}
-->
</style>
<script language="JavaScript">
<!--
function setCookie( name, value, expiredays )
{
var todayDate = new Date();
todayDate.setDate( todayDate.getDate() + expiredays );
document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}
function closeWin()
{
if ( document.pop.Notice.checked )
setCookie( "Notice", "done" , 1);
window.close();
}
// -->
</script>
</head>
<body topmargin="0" leftmargin="0" align="center">
<div align="center">
<form name=pop>
내용이 들어갈 부분
<input type=checkbox name="Notice" value="">오늘 하루동안 열지 않음<a href="javascript:history.onclick=closeWin()">[닫기]</a>
</form>
</div>
</body>
</html>
위에 소스를 event_pop.html 파일로 저장 후에 index 파일이 있는 장소에 업로드를 해 줍니다..
참고로 팝업창이 떴을때 체크박스 체크 , 닫기 버튼을 실행을 하면 하루동안 팝업창이 뜨질 않습니다.
여러번 확인시엔 웹브라우저 > 도구> 옵션> 쿠키삭제를 할때만 팝업창이 다시 출력을 하게 됩니다.
쿠키를 삭제를 해서 출력여부를 재확인을 해 보세요..