From 2ee32c8c014ff2e11a9141b5aa362d0ccb175f1a Mon Sep 17 00:00:00 2001 From: thisgun Date: Tue, 9 Jul 2019 09:50:12 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B4=80=EB=A6=AC=EC=9E=90=20=EB=B0=B0?= =?UTF-8?q?=EB=84=88=20=ED=8E=98=EC=9D=B4=EC=A7=80=20=EA=B2=80=EC=83=89=20?= =?UTF-8?q?=EC=A1=B0=EA=B1=B4=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/shop_admin/bannerlist.php | 59 +++++++++++++++++++++++++++++++++-- 1 file changed, 56 insertions(+), 3 deletions(-) diff --git a/adm/shop_admin/bannerlist.php b/adm/shop_admin/bannerlist.php index 0e14cd169..fc2346901 100644 --- a/adm/shop_admin/bannerlist.php +++ b/adm/shop_admin/bannerlist.php @@ -4,10 +4,36 @@ auth_check($auth[$sub_menu], "r"); +$bn_position = (isset($_GET['bn_position']) && in_array($_GET['bn_position'], array('메인', '왼쪽'))) ? $_GET['bn_position'] : ''; +$bn_device = (isset($_GET['bn_device']) && in_array($_GET['bn_device'], array('pc', 'mobile'))) ? $_GET['bn_device'] : 'both'; +$bn_time = (isset($_GET['bn_time']) && in_array($_GET['bn_time'], array('ing', 'end'))) ? $_GET['bn_time'] : ''; + +$where = ' where '; +$sql_search = ''; + +if ( $bn_position ){ + $sql_search .= " $where bn_position = '$bn_position' "; + $where = ' and '; + $qstr .= "&bn_position=$bn_position"; +} + +if ( $bn_device && $bn_device !== 'both' ){ + $sql_search .= " $where bn_device = '$bn_device' "; + $where = ' and '; + $qstr .= "&bn_device=$bn_device"; +} + +if ( $bn_time ){ + $sql_search .= ($bn_time === 'ing') ? " $where '".G5_TIME_YMDHIS."' between bn_begin_time and bn_end_time " : " $where bn_end_time < '".G5_TIME_YMDHIS."' "; + $where = ' and '; + $qstr .= "&bn_time=$bn_time"; +} + $g5['title'] = '배너관리'; include_once (G5_ADMIN_PATH.'/admin.head.php'); $sql_common = " from {$g5['g5_shop_banner_table']} "; +$sql_common .= $sql_search; // 테이블의 전체 레코드수만 얻음 $sql = " select count(*) as cnt " . $sql_common; @@ -21,7 +47,34 @@ ?>
- 등록된 배너 + 된 배너 + +
+ + + + + + + + + + + +
+
@@ -48,7 +101,7 @@