Merge branch 'master' of github.com:gnuboard/yc4s
This commit is contained in:
@ -16,6 +16,7 @@ if ($w == "u")
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$html_title .= " 입력";
|
$html_title .= " 입력";
|
||||||
|
$nw['nw_device'] = 'both';
|
||||||
$nw['nw_disable_hours'] = 24;
|
$nw['nw_disable_hours'] = 24;
|
||||||
$nw['nw_left'] = 10;
|
$nw['nw_left'] = 10;
|
||||||
$nw['nw_top'] = 10;
|
$nw['nw_top'] = 10;
|
||||||
@ -44,6 +45,17 @@ include_once (G5_ADMIN_PATH.'/admin.head.php');
|
|||||||
<col>
|
<col>
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="nw_device">접속기기</label></th>
|
||||||
|
<td>
|
||||||
|
<?php echo help("팝업레이어가 표시될 접속기기를 설정합니다."); ?>
|
||||||
|
<select name="nw_device" id="nw_device">
|
||||||
|
<option value="both"<?php echo get_selected($nw['nw_device'], 'both', true); ?>>PC와 모바일</option>
|
||||||
|
<option value="pc"<?php echo get_selected($nw['nw_device'], 'pc'); ?>>PC</option>
|
||||||
|
<option value="mobile"<?php echo get_selected($nw['nw_device'], 'mobile'); ?>>모바일</option>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="nw_disable_hours">시간</label></th>
|
<th scope="row"><label for="nw_disable_hours">시간</label></th>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@ -10,7 +10,8 @@ if ($W == 'd')
|
|||||||
else
|
else
|
||||||
auth_check($auth[$sub_menu], "w");
|
auth_check($auth[$sub_menu], "w");
|
||||||
|
|
||||||
$sql_common = " nw_begin_time = '$nw_begin_time',
|
$sql_common = " nw_device = '$nw_device',
|
||||||
|
nw_begin_time = '$nw_begin_time',
|
||||||
nw_end_time = '$nw_end_time',
|
nw_end_time = '$nw_end_time',
|
||||||
nw_disable_hours = '$nw_disable_hours',
|
nw_disable_hours = '$nw_disable_hours',
|
||||||
nw_left = '$nw_left',
|
nw_left = '$nw_left',
|
||||||
@ -23,9 +24,6 @@ $sql_common = " nw_begin_time = '$nw_begin_time',
|
|||||||
|
|
||||||
if($w == "")
|
if($w == "")
|
||||||
{
|
{
|
||||||
$sql = " alter table {$g5['g5_shop_new_win_table']} auto_increment=1 ";
|
|
||||||
sql_query($sql);
|
|
||||||
|
|
||||||
$sql = " insert {$g5['g5_shop_new_win_table']} set $sql_common ";
|
$sql = " insert {$g5['g5_shop_new_win_table']} set $sql_common ";
|
||||||
sql_query($sql);
|
sql_query($sql);
|
||||||
|
|
||||||
|
|||||||
@ -31,6 +31,7 @@ $result = sql_query($sql);
|
|||||||
<tr>
|
<tr>
|
||||||
<th scope="col">번호</th>
|
<th scope="col">번호</th>
|
||||||
<th scope="col">제목</th>
|
<th scope="col">제목</th>
|
||||||
|
<th scope="col">접속기기</th>
|
||||||
<th scope="col">시작일시</th>
|
<th scope="col">시작일시</th>
|
||||||
<th scope="col">종료일시</th>
|
<th scope="col">종료일시</th>
|
||||||
<th scope="col">시간</th>
|
<th scope="col">시간</th>
|
||||||
@ -45,10 +46,23 @@ $result = sql_query($sql);
|
|||||||
<?php
|
<?php
|
||||||
for ($i=0; $row=mysql_fetch_array($result); $i++) {
|
for ($i=0; $row=mysql_fetch_array($result); $i++) {
|
||||||
$bg = 'bg'.($i%2);
|
$bg = 'bg'.($i%2);
|
||||||
|
|
||||||
|
switch($row['nw_device']) {
|
||||||
|
case 'pc':
|
||||||
|
$nw_device = 'PC';
|
||||||
|
break;
|
||||||
|
case 'mobile':
|
||||||
|
$nw_device = '모바일';
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$nw_device = '모두';
|
||||||
|
break;
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
<tr class="<?php echo $bg; ?>">
|
<tr class="<?php echo $bg; ?>">
|
||||||
<td class="td_num"><?php echo $row['nw_id']; ?></td>
|
<td class="td_num"><?php echo $row['nw_id']; ?></td>
|
||||||
<td><?php echo $row['nw_subject']; ?></td>
|
<td><?php echo $row['nw_subject']; ?></td>
|
||||||
|
<td><?php echo $nw_device; ?></td>
|
||||||
<td class="td_datetime"><?php echo substr($row['nw_begin_time'],2,14); ?></td>
|
<td class="td_datetime"><?php echo substr($row['nw_begin_time'],2,14); ?></td>
|
||||||
<td class="td_datetime"><?php echo substr($row['nw_end_time'],2,14); ?></td>
|
<td class="td_datetime"><?php echo substr($row['nw_end_time'],2,14); ?></td>
|
||||||
<td class="td_num"><?php echo $row['nw_disable_hours']; ?>시간</td>
|
<td class="td_num"><?php echo $row['nw_disable_hours']; ?>시간</td>
|
||||||
@ -65,7 +79,7 @@ $result = sql_query($sql);
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($i == 0) {
|
if ($i == 0) {
|
||||||
echo '<tr><td colspan="10" class="empty_table">자료가 한건도 없습니다.</td></tr>';
|
echo '<tr><td colspan="11" class="empty_table">자료가 한건도 없습니다.</td></tr>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
@ -737,4 +737,10 @@ if(!sql_query(" select it_soldout from {$g5['g5_shop_item_table']} limit 1 ", fa
|
|||||||
sql_query(" ALTER TABLE `{$g5['g5_shop_item_table']}`
|
sql_query(" ALTER TABLE `{$g5['g5_shop_item_table']}`
|
||||||
ADD `it_soldout` tinyint(4) NOT NULL DEFAULT '0' AFTER `it_use` ", true);
|
ADD `it_soldout` tinyint(4) NOT NULL DEFAULT '0' AFTER `it_use` ", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 팝업 레이어 접속기기 필드 추가
|
||||||
|
if(!sql_query(" select nw_device from {$g5['g5_shop_new_win_table']} limit 1 ", false)) {
|
||||||
|
sql_query(" ALTER TABLE `{$g5['g5_shop_new_win_table']}`
|
||||||
|
ADD `nw_device` varchar(10) NOT NULL DEFAULT 'both' AFTER `nw_id` ", true);
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -579,6 +579,7 @@ CREATE TABLE IF NOT EXISTS `g5_shop_item_relation` (
|
|||||||
DROP TABLE IF EXISTS `g5_shop_new_win`;
|
DROP TABLE IF EXISTS `g5_shop_new_win`;
|
||||||
CREATE TABLE IF NOT EXISTS `g5_shop_new_win` (
|
CREATE TABLE IF NOT EXISTS `g5_shop_new_win` (
|
||||||
`nw_id` int(11) NOT NULL AUTO_INCREMENT,
|
`nw_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`nw_device` varchar(10) NOT NULL DEFAULT 'both',
|
||||||
`nw_begin_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
`nw_begin_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||||
`nw_end_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
`nw_end_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||||
`nw_disable_hours` int(11) NOT NULL DEFAULT '0',
|
`nw_disable_hours` int(11) NOT NULL DEFAULT '0',
|
||||||
|
|||||||
48
mobile/shop/newwin.inc.php
Normal file
48
mobile/shop/newwin.inc.php
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
<?php
|
||||||
|
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||||
|
|
||||||
|
$sql = " select * from {$g5['g5_shop_new_win_table']}
|
||||||
|
where '".G5_TIME_YMDHIS."' between nw_begin_time and nw_end_time
|
||||||
|
and nw_device IN ( 'both', 'mobile' )
|
||||||
|
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 {$g5['g5_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">
|
||||||
|
<?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>
|
||||||
|
</div>
|
||||||
|
<?php }
|
||||||
|
if ($i == 0) echo '<span class="sound_only">팝업레이어 알림이 없습니다.</span>';
|
||||||
|
?>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(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);
|
||||||
|
});
|
||||||
|
$('.hd_pops_close').click(function() {
|
||||||
|
var idb = $(this).attr('class').split(' ');
|
||||||
|
$('#'+idb[1]).css('display','none');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<!-- } 팝업레이어 끝 -->
|
||||||
@ -12,6 +12,13 @@ include_once(G5_LIB_PATH.'/popular.lib.php');
|
|||||||
|
|
||||||
<div id="skip_to_container"><a href="#container">본문 바로가기</a></div>
|
<div id="skip_to_container"><a href="#container">본문 바로가기</a></div>
|
||||||
|
|
||||||
|
<?php if(defined('_INDEX_')) { // index에서만 실행 ?>
|
||||||
|
<div id="hd_pop">
|
||||||
|
<h2>팝업레이어 알림</h2>
|
||||||
|
<?php include G5_MSHOP_PATH.'/newwin.inc.php'; // 팝업레이어 ?>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
<div id="logo"><a href="<?php echo G5_SHOP_URL; ?>/"><img src="<?php echo G5_DATA_URL; ?>/common/mobile_logo_img" alt="<?php echo $config['cf_title']; ?> 메인"></a></div>
|
<div id="logo"><a href="<?php echo G5_SHOP_URL; ?>/"><img src="<?php echo G5_DATA_URL; ?>/common/mobile_logo_img" alt="<?php echo $config['cf_title']; ?> 메인"></a></div>
|
||||||
|
|
||||||
<a href="<?php echo G5_SHOP_URL; ?>/category.php" target="_blank" id="hd_ct">분류</a>
|
<a href="<?php echo G5_SHOP_URL; ?>/category.php" target="_blank" id="hd_ct">분류</a>
|
||||||
|
|||||||
@ -3,6 +3,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
|||||||
|
|
||||||
$sql = " select * from {$g5['g5_shop_new_win_table']}
|
$sql = " select * from {$g5['g5_shop_new_win_table']}
|
||||||
where '".G5_TIME_YMDHIS."' between nw_begin_time and nw_end_time
|
where '".G5_TIME_YMDHIS."' between nw_begin_time and nw_end_time
|
||||||
|
and nw_device IN ( 'both', 'pc' )
|
||||||
order by nw_id asc ";
|
order by nw_id asc ";
|
||||||
$result = sql_query($sql);
|
$result = sql_query($sql);
|
||||||
for ($i=0; $row_nw=sql_fetch_array($result); $i++)
|
for ($i=0; $row_nw=sql_fetch_array($result); $i++)
|
||||||
|
|||||||
@ -127,7 +127,7 @@ if($i == 1) echo "<p class=\"sct_noitem\">등록된 상품이 없습니다.</p>\
|
|||||||
var el_id = this[0].id;
|
var el_id = this[0].id;
|
||||||
|
|
||||||
$smt.each(function() {
|
$smt.each(function() {
|
||||||
var h = $(this).height();
|
var h = $(this).outerHeight(true);
|
||||||
if(h > height)
|
if(h > height)
|
||||||
height = h;
|
height = h;
|
||||||
});
|
});
|
||||||
|
|||||||
@ -124,7 +124,7 @@ if($i == 1) echo "<p class=\"sct_noitem\">등록된 상품이 없습니다.</p>\
|
|||||||
var el_id = this[0].id;
|
var el_id = this[0].id;
|
||||||
|
|
||||||
$smt.each(function() {
|
$smt.each(function() {
|
||||||
var h = $(this).height();
|
var h = $(this).outerHeight(true);
|
||||||
if(h > height)
|
if(h > height)
|
||||||
height = h;
|
height = h;
|
||||||
});
|
});
|
||||||
|
|||||||
@ -127,7 +127,7 @@ if($i == 1) echo "<p class=\"sct_noitem\">등록된 상품이 없습니다.</p>\
|
|||||||
var height = 0;
|
var height = 0;
|
||||||
|
|
||||||
$smt.each(function() {
|
$smt.each(function() {
|
||||||
var h = $(this).height();
|
var h = $(this).outerHeight(true);
|
||||||
if(h > height)
|
if(h > height)
|
||||||
height = h;
|
height = h;
|
||||||
});
|
});
|
||||||
|
|||||||
@ -127,7 +127,7 @@ if($i == 1) echo "<p class=\"sct_noitem\">등록된 상품이 없습니다.</p>\
|
|||||||
var el_id = this[0].id;
|
var el_id = this[0].id;
|
||||||
|
|
||||||
$smt.find("li.sct_li").each(function() {
|
$smt.find("li.sct_li").each(function() {
|
||||||
var h = $(this).height();
|
var h = $(this).outerHeight(true);
|
||||||
if(h > height)
|
if(h > height)
|
||||||
height = h;
|
height = h;
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user