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 @@