dbnt.co.kr2023/popup.php

35 lines
1.1 KiB
PHP

<? include "include/head.php"; ?>
<section class="main_wrap">
<div>
<img id="popupImg" src="image/popup.jpg">
</div>
<span style="float:left; padding-left:5px;">
<input type="checkbox" id="notViewChk">
<label for="notViewChk"><?=$lang['POPUP_TODAY']?></label>
</span>
<span style="float:right; padding-right:5px">
<a href="#" id="closeLink"><?=$lang['POPUP_CLOSE']?></a>
</span>
</section>
<script src="vendor/jquery/jquery.min.js"></script>
<script type="text/javascript" language="javascript">
$(document).on("click", '#popupImg', function(){
/* window.opener.location.target="_blank"
window.opener.location.href="https://talbakkum.com/"; */
window.open('https://talbakkum.com/', "_blank",)
close();
})
$(document).on('click', '#closeLink', function(){
if($("#notViewChk")[0].checked){
setCookie("popupFlag", "N")
}
close();
})
// 하루 보지 않기 쿠키 설정.
function setCookie(cname, cvalue) {
var d = new Date();
d.setTime(d.getTime() + (24*60*60*1000));/* 24*60*60*1000 */
var expires = "expires="+d.toUTCString();
document.cookie = cname + "=" + cvalue + "; " + expires;
}
</script>