브레스웹님의 팝업(POPUP)창 게시판에서 팝업 여러개 띄우기 정보
브레스웹님의 팝업(POPUP)창 게시판에서 팝업 여러개 띄우기본문
브레스웹님의 팝업창 게시판을 너무나 고맙게 쓰던 중 부득이 하게 여러개의 팝업창을 띄워야만 해서 고쳐 보았습니다.
원본 파일 및 설치 방법은 아래 브레스웹님의 원글을 참조하시고...
http://www.sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=4084&sca=&sfl=wr_subject%7C%7Cwr_content&stx=%C6%CB%BE%F7&sop=and&page=2
브레스웹님의 첨부파일을 다운로드 받아 설치 하신 후에
./skin/latest/popup_latest/latest.skin.php 파일을 아래 소스로 바꾸시기 바랍니다.
많이 고친 것은 아니고 레이어창의 이름과 쿠키명을 글의 고유번호로 서로 구분하게 하였습니다.
이리저리 고치다가 지우다가 해서 원본과 얼마나 다른지 몰라 있는 소스를 모두 올립니다.
다만, 모든 레이어에 대한 드래그&드롭이 하나만 되고 다른 것은 잘 안되는 것이 흠이라면 흠입니다.
이 부분도 알게 되면 다시 올리겠습니다.
소스
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<?
for ($i=0; $i<count($list); $i++)
{
if ($i > 0)
$title = get_text($list[$i][wr_subject]);
$content = nl2br($list[$i][wr_content]);
$wr_id = "pop".$list[$i][wr_id] ;
$ileft = $i +$i +$i +$i +$i +$i +$i +$i + 50;
$itop = $i +$i +$i +$i +$i +$i +$i +$i + 300;
$img = "$g4[path]/data/file/$bo_table/".urlencode($list[$i][file][0][file]);
if (!file_exists($img) || !$list[$i][file][0][file])
echo "";
if ($list[$i][wr_1] == "실행")
{
?>
<SCRIPT language=javascript>
<!--
clicked = false;
function startDrag<?=$wr_id?>(cx,cy) {
clicked = true;
pleft=parseInt(document.getElementById("<?=$wr_id?>").style.left);
ptop=parseInt(document.getElementById("<?=$wr_id?>").style.top);
dragxcoor=cx;
dragycoor=cy;
}
function stopDrag<?=$wr_id?>() {
clicked = false;
}
function dragBox<?=$wr_id?>(evt) {
e = evt || event;
if (clicked == true) {
newx = pleft+e.clientX-dragxcoor;
newy = ptop+e.clientY-dragycoor;
document.getElementById("<?=$wr_id?>").style.left=newx;
document.getElementById("<?=$wr_id?>").style.top=newy;
// return false;
}
}
document.onmousemove = dragBox<?=$wr_id?>;
-->
</SCRIPT>
<script language="JavaScript">
<!--
function setCookie<?=$wr_id?>( name, value, expiredays ) {
var todayDate = new Date();
todayDate.setDate( todayDate.getDate() + expiredays );
document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}
function closeWin<?=$wr_id?>() {
if ( document.notice_form<?=$wr_id?>.chkbox.checked ){
setCookie<?=$wr_id?>( "<?=$wr_id?>", "done" , 1 );
}
document.all['<?=$wr_id?>'].style.visibility = "hidden";
}
//-->
</script>
<div id="<?=$wr_id?>" style="position:absolute; left:<?=$ileft?>px; top:<?=$ileft?>; z-index:200; visibility:visible; display:table; cursor:move" onmousedown="startDrag<?=$wr_id?>(event.clientX,event.clientY)" onmouseup="stopDrag<?=$wr_id?>()">
<table border='0' cellspacing='0' cellpadding='0' bgcolor="#FFFFFF">
<tr>
<td width='7'><img src='<?=$latest_skin_path?>/img/bg_01.gif' width='7' height='31'></td>
<td background='<?=$latest_skin_path?>/img/bg_04.gif'><img src='<?=$latest_skin_path?>/img/bg_02.gif' width='97' height='31'></td>
<td background='<?=$latest_skin_path?>/img/bg_04.gif'><div align='right'><img src='<?=$latest_skin_path?>/img/bg_06.gif' width='114' height='31'></div></td>
<td width='7'><img src='<?=$latest_skin_path?>/img/bg_07.gif' width='7' height='31'></td>
</tr>
<tr>
<td background='<?=$latest_skin_path?>/img/bg_22.gif'><img src='<?=$latest_skin_path?>/img/bg_22.gif' width='7' height='1'></td>
<td colspan='2' valign='top'>
<?
if ($list[$i][file][0][file])
{
echo "<a href={$list[$i][wr_link1]} target={$list[$i][wr_2]}><img src='{$img}' border='0'></a>";
}
else
{
echo "<table width='367' border='0' cellspacing='0' cellpadding='0'>";
echo "<tr>";
echo "<td width='23'><img src='{$latest_skin_path}/img/bg_09.gif' width='23' height='27'></td>";
echo "<td width='320' background='{$latest_skin_path}/img/bg_11.gif'><div align='center'><img src='{$latest_skin_path}/img/bg_11.gif' width='1' height='27'></div></td>";
echo "<td width='24'><img src='{$latest_skin_path}/img/bg_13.gif' width='24' height='27'></td>";
echo "</tr>";
echo "<tr>";
echo "<td background='{$latest_skin_path}/img/bg_23.gif'><img src='{$latest_skin_path}/img/bg_23.gif' width='23' height='1'></td>";
echo "<td valign='top'>";
echo "<table width=100% border=0 cellspacing=0 cellpadding=0 align=center>";
echo "<tr><td height=25><font color=#416B01>♣ <b>{$list[$i][wr_subject]}</b></font></td><td align=right>{$list[$i][datetime]}</td></tr>";
echo "<tr><td height=1 colspan=2 bgcolor=#cccccc></td></tr>";
echo "<tr><td height=2 colspan=2 bgcolor=#efefef></td></tr>";
echo "<td valign=top colspan=2 style=padding-top:10px;>{$content}</td>";
echo "</tr>";
echo "</table>";
echo "</td>";
echo "<td background='{$latest_skin_path}/img/bg_19.gif'><img src='{$latest_skin_path}/img/bg_19.gif' width='24' height='8'></td>";
echo "</tr>";
echo "<tr>";
echo "<td><img src='{$latest_skin_path}/img/bg_26.gif' width='23' height='66'></td>";
echo "<td background='{$latest_skin_path}/img/bg_28.gif'><img src='{$latest_skin_path}/img/bg_27.gif' width='320' height='66'></td>";
echo "<td><img src='{$latest_skin_path}/img/bg_29.gif' width='24' height='66'></td>";
echo "</tr>";
echo "</table>";
}
?>
</td>
<td background='<?=$latest_skin_path?>/img/bg_18.gif'><img src='<?=$latest_skin_path?>/img/bg_18.gif' width='7' height='1'></td>
</tr>
<tr>
<td><img src='<?=$latest_skin_path?>/img/bg_30.gif' width='7' height='31'></td>
<td colspan='2' background='<?=$latest_skin_path?>/img/bg_32.gif'>
<form name="notice_form<?=$wr_id?>">
<table width='256' border='0' cellspacing='0' cellpadding='0' align='right'>
<tr>
<td width="20"><a href="#"><input type="checkbox" name="chkbox" value="checkbox" onclick="closeWin<?=$wr_id?>();"></a></td>
<td width="167">24시간 동안 이 창을 열지 않음</td>
<td width="67"><a href="javascript:closeWin<?=$wr_id?>();"><img src='<?=$latest_skin_path?>/img/bg_34.gif' width='67' height='31' align='absmiddle' border='0'></a></td>
</tr>
</table>
</form>
</td>
<td>
<img src='<?=$latest_skin_path?>/img/bg_35.gif' width='7' height='31'>
</td>
</tr>
</table>
</div>
<script language="Javascript">
cookiedata = document.cookie;
if ( cookiedata.indexOf("<?=$wr_id?>=done") < 0 ){
document.all['<?=$wr_id?>'].style.visibility = "visible";
}
else {
document.all['<?=$wr_id?>'].style.visibility = "hidden";
}
</script>
<?
}
?>
<?
}
?>
원본 파일 및 설치 방법은 아래 브레스웹님의 원글을 참조하시고...
http://www.sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=4084&sca=&sfl=wr_subject%7C%7Cwr_content&stx=%C6%CB%BE%F7&sop=and&page=2
브레스웹님의 첨부파일을 다운로드 받아 설치 하신 후에
./skin/latest/popup_latest/latest.skin.php 파일을 아래 소스로 바꾸시기 바랍니다.
많이 고친 것은 아니고 레이어창의 이름과 쿠키명을 글의 고유번호로 서로 구분하게 하였습니다.
이리저리 고치다가 지우다가 해서 원본과 얼마나 다른지 몰라 있는 소스를 모두 올립니다.
다만, 모든 레이어에 대한 드래그&드롭이 하나만 되고 다른 것은 잘 안되는 것이 흠이라면 흠입니다.
이 부분도 알게 되면 다시 올리겠습니다.
소스
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<?
for ($i=0; $i<count($list); $i++)
{
if ($i > 0)
$title = get_text($list[$i][wr_subject]);
$content = nl2br($list[$i][wr_content]);
$wr_id = "pop".$list[$i][wr_id] ;
$ileft = $i +$i +$i +$i +$i +$i +$i +$i + 50;
$itop = $i +$i +$i +$i +$i +$i +$i +$i + 300;
$img = "$g4[path]/data/file/$bo_table/".urlencode($list[$i][file][0][file]);
if (!file_exists($img) || !$list[$i][file][0][file])
echo "";
if ($list[$i][wr_1] == "실행")
{
?>
<SCRIPT language=javascript>
<!--
clicked = false;
function startDrag<?=$wr_id?>(cx,cy) {
clicked = true;
pleft=parseInt(document.getElementById("<?=$wr_id?>").style.left);
ptop=parseInt(document.getElementById("<?=$wr_id?>").style.top);
dragxcoor=cx;
dragycoor=cy;
}
function stopDrag<?=$wr_id?>() {
clicked = false;
}
function dragBox<?=$wr_id?>(evt) {
e = evt || event;
if (clicked == true) {
newx = pleft+e.clientX-dragxcoor;
newy = ptop+e.clientY-dragycoor;
document.getElementById("<?=$wr_id?>").style.left=newx;
document.getElementById("<?=$wr_id?>").style.top=newy;
// return false;
}
}
document.onmousemove = dragBox<?=$wr_id?>;
-->
</SCRIPT>
<script language="JavaScript">
<!--
function setCookie<?=$wr_id?>( name, value, expiredays ) {
var todayDate = new Date();
todayDate.setDate( todayDate.getDate() + expiredays );
document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}
function closeWin<?=$wr_id?>() {
if ( document.notice_form<?=$wr_id?>.chkbox.checked ){
setCookie<?=$wr_id?>( "<?=$wr_id?>", "done" , 1 );
}
document.all['<?=$wr_id?>'].style.visibility = "hidden";
}
//-->
</script>
<div id="<?=$wr_id?>" style="position:absolute; left:<?=$ileft?>px; top:<?=$ileft?>; z-index:200; visibility:visible; display:table; cursor:move" onmousedown="startDrag<?=$wr_id?>(event.clientX,event.clientY)" onmouseup="stopDrag<?=$wr_id?>()">
<table border='0' cellspacing='0' cellpadding='0' bgcolor="#FFFFFF">
<tr>
<td width='7'><img src='<?=$latest_skin_path?>/img/bg_01.gif' width='7' height='31'></td>
<td background='<?=$latest_skin_path?>/img/bg_04.gif'><img src='<?=$latest_skin_path?>/img/bg_02.gif' width='97' height='31'></td>
<td background='<?=$latest_skin_path?>/img/bg_04.gif'><div align='right'><img src='<?=$latest_skin_path?>/img/bg_06.gif' width='114' height='31'></div></td>
<td width='7'><img src='<?=$latest_skin_path?>/img/bg_07.gif' width='7' height='31'></td>
</tr>
<tr>
<td background='<?=$latest_skin_path?>/img/bg_22.gif'><img src='<?=$latest_skin_path?>/img/bg_22.gif' width='7' height='1'></td>
<td colspan='2' valign='top'>
<?
if ($list[$i][file][0][file])
{
echo "<a href={$list[$i][wr_link1]} target={$list[$i][wr_2]}><img src='{$img}' border='0'></a>";
}
else
{
echo "<table width='367' border='0' cellspacing='0' cellpadding='0'>";
echo "<tr>";
echo "<td width='23'><img src='{$latest_skin_path}/img/bg_09.gif' width='23' height='27'></td>";
echo "<td width='320' background='{$latest_skin_path}/img/bg_11.gif'><div align='center'><img src='{$latest_skin_path}/img/bg_11.gif' width='1' height='27'></div></td>";
echo "<td width='24'><img src='{$latest_skin_path}/img/bg_13.gif' width='24' height='27'></td>";
echo "</tr>";
echo "<tr>";
echo "<td background='{$latest_skin_path}/img/bg_23.gif'><img src='{$latest_skin_path}/img/bg_23.gif' width='23' height='1'></td>";
echo "<td valign='top'>";
echo "<table width=100% border=0 cellspacing=0 cellpadding=0 align=center>";
echo "<tr><td height=25><font color=#416B01>♣ <b>{$list[$i][wr_subject]}</b></font></td><td align=right>{$list[$i][datetime]}</td></tr>";
echo "<tr><td height=1 colspan=2 bgcolor=#cccccc></td></tr>";
echo "<tr><td height=2 colspan=2 bgcolor=#efefef></td></tr>";
echo "<td valign=top colspan=2 style=padding-top:10px;>{$content}</td>";
echo "</tr>";
echo "</table>";
echo "</td>";
echo "<td background='{$latest_skin_path}/img/bg_19.gif'><img src='{$latest_skin_path}/img/bg_19.gif' width='24' height='8'></td>";
echo "</tr>";
echo "<tr>";
echo "<td><img src='{$latest_skin_path}/img/bg_26.gif' width='23' height='66'></td>";
echo "<td background='{$latest_skin_path}/img/bg_28.gif'><img src='{$latest_skin_path}/img/bg_27.gif' width='320' height='66'></td>";
echo "<td><img src='{$latest_skin_path}/img/bg_29.gif' width='24' height='66'></td>";
echo "</tr>";
echo "</table>";
}
?>
</td>
<td background='<?=$latest_skin_path?>/img/bg_18.gif'><img src='<?=$latest_skin_path?>/img/bg_18.gif' width='7' height='1'></td>
</tr>
<tr>
<td><img src='<?=$latest_skin_path?>/img/bg_30.gif' width='7' height='31'></td>
<td colspan='2' background='<?=$latest_skin_path?>/img/bg_32.gif'>
<form name="notice_form<?=$wr_id?>">
<table width='256' border='0' cellspacing='0' cellpadding='0' align='right'>
<tr>
<td width="20"><a href="#"><input type="checkbox" name="chkbox" value="checkbox" onclick="closeWin<?=$wr_id?>();"></a></td>
<td width="167">24시간 동안 이 창을 열지 않음</td>
<td width="67"><a href="javascript:closeWin<?=$wr_id?>();"><img src='<?=$latest_skin_path?>/img/bg_34.gif' width='67' height='31' align='absmiddle' border='0'></a></td>
</tr>
</table>
</form>
</td>
<td>
<img src='<?=$latest_skin_path?>/img/bg_35.gif' width='7' height='31'>
</td>
</tr>
</table>
</div>
<script language="Javascript">
cookiedata = document.cookie;
if ( cookiedata.indexOf("<?=$wr_id?>=done") < 0 ){
document.all['<?=$wr_id?>'].style.visibility = "visible";
}
else {
document.all['<?=$wr_id?>'].style.visibility = "hidden";
}
</script>
<?
}
?>
<?
}
?>
추천
2
2
댓글 18개
필요하였던건데...
잘 모르긴 해도 감사합니다.
이 게으름의 끝은 어딜까요.. 다른분들이 올려주신 팁만가지고 살아가는...
이 게으름의 끝은 어딜까요.. 다른분들이 올려주신 팁만가지고 살아가는...
구~웃~!!
감사합니다... 다음 스킨 만들때 적용해야겠네요..
아.. 감사합니다.
근데요..
음.. 밑에쪽 그.. 모서리부분(?)이라고 해야하나 1mm에 살짝 오차가 서로 생기면서 엇갈리네요...
근데요..
음.. 밑에쪽 그.. 모서리부분(?)이라고 해야하나 1mm에 살짝 오차가 서로 생기면서 엇갈리네요...
레이어의 위치를 서로 다르게 하려면 어떤 부분에서 위치 표시를 해줘야 되는지요?
두개를 뛰울때는 어떤부분을 고쳐야 될지 모르겠네요..
부탁드립니다...
두개를 뛰울때는 어떤부분을 고쳐야 될지 모르겠네요..
부탁드립니다...
감사합니다. 추~~~천 ^^
잘 사용하겠습니다.
아 그리고 저도 위에 분들처럼 1mm오차와 레이어위치 궁금하네요 ^^
잘 사용하겠습니다.
아 그리고 저도 위에 분들처럼 1mm오차와 레이어위치 궁금하네요 ^^
브레스웹님의 팝업(POPUP)창 게시판에서 팝업 여러개 띄우기
코멘트
코멘트
감사합니다.
swf 파일을 업로드 하여 사용 할 수는 없나요?
팝업창관련
감사합니다.
좋습니다.
좋네요 ^^
언젠가는 필요할듯....일단 스크랩
감사해요
어렵다..
감사합니다.