AvocadoAmber/AvocadoEdition_Light/bbs/newwin.inc.php

58 lines
1.9 KiB
PHP
Raw Normal View History

2022-09-17 20:50:50 +09:00
<?php
2024-09-19 20:57:39 +09:00
if (!defined("_GNUBOARD_"))
exit; // 개별 페이지 접근 불가
2022-09-17 20:50:50 +09:00
2024-09-30 01:58:32 +09:00
$sql = "SELECT * FROM {$g5['new_win_table']}
2024-09-19 20:57:39 +09:00
where '" . G5_TIME_YMDHIS . "' between nw_begin_time and nw_end_time
2022-09-17 20:50:50 +09:00
and nw_device IN ( 'both', 'pc' )
2024-09-30 01:58:32 +09:00
ORDER BY nw_id ASC ";
2022-09-17 20:50:50 +09:00
$result = sql_query($sql, false);
?>
<!-- 팝업레이어 시작 { -->
<div id="hd_pop">
2024-09-19 20:57:39 +09:00
<h2>팝업레이어 알림</h2>
2022-09-17 20:50:50 +09:00
2024-09-19 20:57:39 +09:00
<?php
for ($i = 0; $nw = sql_fetch_array($result); $i++) {
2022-09-17 20:50:50 +09:00
// 이미 체크 되었다면 Continue
if ($_COOKIE["hd_pops_{$nw['nw_id']}"])
2024-09-19 20:57:39 +09:00
continue;
?>
2022-09-17 20:50:50 +09:00
2024-09-19 20:57:39 +09:00
<div id="hd_pops_<?php echo $nw['nw_id'] ?>" class="hd_pops"
style="top:<?php echo $nw['nw_top'] ?>px;left:<?php echo $nw['nw_left'] ?>px">
<div class="hd_pops_con" style="width:<?php echo $nw['nw_width'] ?>px;height:<?php echo $nw['nw_height'] ?>px">
<?php echo conv_content($nw['nw_content'], 1); ?>
</div>
<div class="hd_pops_footer">
<button
class="hd_pops_reject hd_pops_<?php echo $nw['nw_id']; ?> <?php echo $nw['nw_disable_hours']; ?>"><strong><?php echo $nw['nw_disable_hours']; ?></strong>시간
동안 다시 열람하지 않습니다.</button>
<button class="hd_pops_close hd_pops_<?php echo $nw['nw_id']; ?>">닫기</button>
</div>
2022-09-17 20:50:50 +09:00
</div>
2024-09-19 20:57:39 +09:00
<?php }
if ($i == 0)
echo '<span class="sound_only">팝업레이어 알림이 없습니다.</span>';
?>
2022-09-17 20:50:50 +09:00
</div>
<script>
2024-09-19 20:57:39 +09:00
$(function () {
$(".hd_pops_reject").click(function () {
var id = $(this).attr('class').split(' ');
var ck_name = id[1];
var exp_time = parseInt(id[2]);
$("#" + id[1]).css("display", "none");
set_cookie(ck_name, 1, exp_time, g5_cookie_domain);
2022-09-17 20:50:50 +09:00
});
2024-09-19 20:57:39 +09:00
$('.hd_pops_close').click(function () {
var idb = $(this).attr('class').split(' ');
$('#' + idb[1]).css('display', 'none');
2022-09-17 20:50:50 +09:00
});
$("#hd").css("z-index", 1000);
2024-09-19 20:57:39 +09:00
});
2022-09-17 20:50:50 +09:00
</script>
2024-09-19 20:57:39 +09:00
<!-- } 팝업레이어 -->