Live Brilliant

버튼 클릭시 이미지 팝업 호출 소스 본문

개발은 핵찜이야/HTML/CSS

버튼 클릭시 이미지 팝업 호출 소스

주인정 2012. 4. 13. 16:12

<!-- 결제관련 공지사항 이미지 팝업 -->
<style type="text/css">
<!--
.style2 {
color: #ed1b23;
font-weight: bold;
}
.style3 {color: #ed1b23}
.style4 {
color: #7d7d7d;
font-weight: bold;
}
.style5 {color: #7d7d7d}
.style6 {color: #0000CC}
-->
</style>
<script Language="Javascript">
<!--
function setCookie( name, value, expirehours ) {
var todayDate = new Date();
todayDate.setHours( todayDate.getHours() + expirehours );
document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}

function closeWin() {
if ( document.chk_form.chkbox.checked ){ //메인이미지 체크폼
setCookie( "ncookie", "done" , 24 ); //체크되어있으면 하루동안 열지 않기
}
document.getElementById('popup0505').style.display = "none"; //레이어 id='k_popup' 이미지를 none 으로
}
//-->
</script>

<div id="popup0505" style="position:absolute; top:124px; left:135px; width:440px; height:390px; z-index:1" >

<!--통이미지 레이어 -->
<div>
<img src="http://img.test.co.kr/popup/cash_popup/cash_pop05.jpg" width="440" height="390" border="0" USEMAP="#Map_2"> </div>


<div style="position:absolute; top:355px; left:12px; width:26px; height:23px;">
<form name="chk_form">
<input type="checkbox" name="chkbox" value="checkbox">
</form>
</div>
</div>
<MAP NAME="Map_2">
<AREA SHAPE="rect" COORDS="361,353,429,379" HREF="javascript:closeWin();" onFocus="this.blur()" >
</map>
</div>

<script language = "javascript">
<!--
cookiedata = document.cookie;
if ( cookiedata.indexOf("ncookie=done") < 0){
document.getElementById('popup0505').style.display = "none";
}else{
document.getElementById('popup0505').style.display = "none";
}
//-->
</script>
<!-- 이미지 팝업 끝-->
<!--결제관련 공지사항 이미지 팝업끝 -->

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="190" valign="top" style="padding:0 0 20 0"><!--왼쪽테이블 시작-->
<?
include $_SERVER['DOCUMENT_ROOT']."/cash/080415.cash_leftmenu.html";
?>
<!--왼쪽테이블 끝--></td>
<td width="5"></td>
<td valign="top" style="padding:0 0 20 0"><!--내용 시작-->
<script>
//결제완료시 오프너창 못찾을까봐...
window.name='payExp';

function selecGift(mode)
{
document.getElementById("payInfo").style.display="block";
document.getElementById("g_BOOK").checked=false;
document.getElementById("g_GAME").checked=false;
document.getElementById("g_CULTURE").checked=false;

var dviname="g_"+mode;

document.getElementById(dviname).checked=true;
document.getElementById("selectType").value=mode;
}
/*
function selecGo()
{
var mode=document.getElementById("selectType").value;
goCharge(mode);
}
*/

function cal_coupon(price,cash,coupon){
document.getElementById("divPrice").innerHTML=price+"원";
document.getElementById("divPoint").innerHTML=cash+"캐시";
document.getElementById("divCoupon").innerHTML=coupon+"장";
if(price=="5,000")
{
var cash2="4,550";
var vat2="450";
}
else if(price=="10,000")
{
var cash2="9,090";
var vat2="910";
}
else if(price=="20,000")
{
var cash2="18,180";
var vat2="1,820";
}
else if(price=="30,000")
{
var cash2="2,7270";
var vat2="2,730";
}
else if(price=="50,000")
{
var cash2="45,450";
var vat2="4,550";
}

// document.getElementById("divPrice2").innerHTML=price;
// document.getElementById("divPoint2").innerHTML=cash2;
// document.getElementById("divVat2").innerHTML=vat2;
}

function goCharge(arg,fkind){
if(arg=="BANK")
{
document.cash_charge_form.target="";
document.getElementById("payInfo").style.display="none";
}
else
{
if(arg=="ARS")
{
var Wleft = (screen.Width/2)-150;
var Wtop = (screen.Height/2)-170;
var Wwidth = 520;
var Wheight = 610;
document.getElementById("payInfo").style.display="none";
}
else if(arg=="HP")
{
var Wleft = (screen.Width/2)-250;
var Wtop = (screen.Height/2)-200;
var Wwidth = 390;
var Wheight = 495;
document.getElementById("payInfo").style.display="none";

//이미지 팝업 계좌이체 클릭시 공지사항 시작
cookiedata = document.cookie;
if ( cookiedata.indexOf("ncookie=done") < 0){
document.getElementById('popup0505').style.display = "block";
}else{
document.getElementById('popup0505').style.display = "none";
}
<?
if($_COOKIE['_CKE_USER_ID']=="admin"){ //관리자는 언제나 팝업이미지를 볼수있도록
?>

document.getElementById("popup0505").style.display="block";
cookiedata = document.cookie;
if ( cookiedata.indexOf("ncookie=done") < 0){
document.getElementById('popup0505').style.display = "block";
alert("LGT 결제시 공지사항을 확인해주세요.");
}else{
document.getElementById('popup0505').style.display = "none";

}
<?
}else{
$timee = date(YmdHi);
if($timee >= '200905312300' && $timee < '200906010015'){


?>

document.getElementById("popup0505").style.display="block";
cookiedata = document.cookie;
if ( cookiedata.indexOf("ncookie=done") < 0){
document.getElementById('popup0505').style.display = "block";
alert("LGT 결제시 공지사항을 확인해주세요.");

}else{
document.getElementById('popup0505').style.display = "none";

}
<? }else{ ?>

document.getElementById("popup0505").style.display="none";
<? }?>
<? } ?>
// 이미지 팝업 끝


}
else if(arg=="RA")
{
var Wleft = (screen.Width/2)-180;
var Wtop = (screen.Height/2)-230;
var Wwidth = 360;
var Wheight = 500;
document.getElementById("payInfo").style.display="none";
}
else if(arg=="PBIL")
{
var Wleft = (screen.Width/2)-150;
var Wtop = (screen.Height/2)-250;
var Wwidth = 315;
var Wheight = 509;
document.getElementById("payInfo").style.display="none";
}
else if(arg=="PP")
{
var Wleft = (screen.Width/2)-190;
var Wtop = (screen.Height/2)-220;
var Wwidth = 396;
var Wheight = 445;
// document.getElementById("payInfo").style.display="none";
if(fkind) document.all.kind.value = fkind;
}
else if(arg=="CARD")
{
var Wleft = (screen.Width/2)-180;
var Wtop = (screen.Height/2)-225;
var Wwidth = 360;
var Wheight = 550;
document.getElementById("payInfo").style.display="none";
// alert("국민, 롯데, 현대카드는 차후에 제공할 예정이며 나머지카드는 이용가능 합니다");
}
else if(arg=="CULTURE")
{
var Wleft = (screen.Width/2)-275;
var Wtop = (screen.Height/2)-205;
var Wwidth = 550;
var Wheight = 650;
}
else if(arg=="BOOK")
{
var Wleft = (screen.Width/2)-275;
var Wtop = (screen.Height/2)-275;
var Wwidth = 500;
var Wheight = 550;
}
else if(arg=="GAME")
{
var Wleft = (screen.Width/2)-275;
var Wtop = (screen.Height/2)-205;
var Wwidth = 550;
var Wheight = 650;
}
document.cash_charge_form.target="twin";
window.open("",'twin','width='+Wwidth+',height='+Wheight+',top='+Wtop+',left='+Wleft);
}

document.cash_charge_form.tool.value=arg;
document.cash_charge_form.submit();
}
</script>

 

Comments