43 lines
1.7 KiB
PHP
43 lines
1.7 KiB
PHP
<?php
|
|
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
|
|
|
$sql = " select * from {$g4['shop_new_win_table']}
|
|
where '".G4_TIME_YMDHIS."' between nw_begin_time and nw_end_time
|
|
order by nw_id asc ";
|
|
$result = sql_query($sql);
|
|
for ($i=0; $row_nw=sql_fetch_array($result); $i++)
|
|
{
|
|
// 이미 체크 되었다면 Continue
|
|
if ($_COOKIE["hd_pops_{$row_nw['nw_id']}"])
|
|
continue;
|
|
|
|
$sql = " select * from {$g4['shop_new_win_table']} where nw_id = '{$row_nw['nw_id']}' ";
|
|
$nw = sql_fetch($sql);
|
|
?>
|
|
<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;width:<?php echo $nw['nw_width'] ?>px;height:<?php echo $nw['nw_height'] ?>px">
|
|
<div class="hd_pops_con">
|
|
<?=conv_content($nw['nw_content'], 1);?>
|
|
</div>
|
|
<div class="hd_pops_chk">
|
|
<label for="hd_pops_chk<?=$nw['nw_id']?>"><strong><?=$nw['nw_disable_hours']?></strong>시간동안 이 내용을 열람하지 않습니다.</label>
|
|
<input type="checkbox" name="check_popup_<?=$nw['nw_id']?>" value="<?=$nw['nw_disable_hours']?>" id="hd_pops_chk<?=$nw['nw_id']?>" class="hd_pops_close">
|
|
</div>
|
|
</div>
|
|
<?php }
|
|
if ($i == 0) echo '<span class="sound_only">팝업레이어 알림이 없습니다.</span>';
|
|
?>
|
|
|
|
<script>
|
|
$(function() {
|
|
$(".hd_pops_close").click(function() {
|
|
if($(this).is(":checked")) {
|
|
var id = $(this).attr("id");
|
|
var layer_id = id.replace("chk", "");
|
|
var ck_name = id.replace("chk", "");
|
|
var exp_time = parseInt($(this).val());
|
|
$("#"+layer_id).css("display", "none");
|
|
set_cookie(ck_name, 1, exp_time, g4_cookie_domain);
|
|
}
|
|
});
|
|
});
|
|
</script>
|