diff --git a/adm/index.php b/adm/index.php index c2f8d146f..67b9d5637 100644 --- a/adm/index.php +++ b/adm/index.php @@ -35,6 +35,10 @@ if (!auth_check_menu($auth, '200100', 'r', true)) { $sod = "desc"; } + $allowed_sst = array('mb_datetime'); + if ($sst && !in_array($sst, $allowed_sst)) $sst = 'mb_datetime'; + if ($sod && !in_array(strtolower($sod), array('asc', 'desc'))) $sod = ''; + $sql_order = " order by {$sst} {$sod} "; $sql = " SELECT count(*) as cnt {$sql_common} {$sql_search} {$sql_order} "; diff --git a/adm/member_list.php b/adm/member_list.php index ec4695b9a..778ad1497 100644 --- a/adm/member_list.php +++ b/adm/member_list.php @@ -42,6 +42,10 @@ if (!$sst) { $sod = "desc"; } +$allowed_sst = array('mb_datetime', 'mb_id', 'mb_name', 'mb_nick', 'mb_level', 'mb_point', 'mb_today_login', 'mb_open', 'mb_mailling', 'mb_sms', 'mb_adult', 'mb_certify', 'mb_email_certify', 'mb_intercept_date', 'mb_leave_date'); +if ($sst && !in_array($sst, $allowed_sst)) $sst = 'mb_datetime'; +if ($sod && !in_array(strtolower($sod), array('asc', 'desc'))) $sod = ''; + $sql_order = " order by {$sst} {$sod} "; $sql = " select count(*) as cnt {$sql_common} {$sql_search} {$sql_order} "; diff --git a/adm/shop_admin/couponzonelist.php b/adm/shop_admin/couponzonelist.php index f4200540c..5071f5681 100644 --- a/adm/shop_admin/couponzonelist.php +++ b/adm/shop_admin/couponzonelist.php @@ -15,6 +15,9 @@ if (!$sst) { $sst = "cz_id"; $sod = "desc"; } +$allowed_sst = array('cz_id'); +if ($sst && !in_array($sst, $allowed_sst)) $sst = 'cz_id'; +if ($sod && !in_array(strtolower($sod), array('asc', 'desc'))) $sod = ''; $sql_order = " order by {$sst} {$sod} "; $sql = " select count(*) as cnt diff --git a/adm/shop_admin/inorderlist.php b/adm/shop_admin/inorderlist.php index 72202fc14..aa02f6c3f 100644 --- a/adm/shop_admin/inorderlist.php +++ b/adm/shop_admin/inorderlist.php @@ -24,6 +24,9 @@ if (!$sst) { $sst = "od_id"; $sod = "desc"; } +$allowed_sst = array('od_id'); +if ($sst && !in_array($sst, $allowed_sst)) $sst = 'od_id'; +if ($sod && !in_array(strtolower($sod), array('asc', 'desc'))) $sod = ''; $sql_order = " order by {$sst} {$sod} "; $sql = " select count(*) as cnt diff --git a/adm/shop_admin/personalpaylist.php b/adm/shop_admin/personalpaylist.php index b3ce61a72..dfa0738ac 100644 --- a/adm/shop_admin/personalpaylist.php +++ b/adm/shop_admin/personalpaylist.php @@ -27,6 +27,9 @@ if (!$sst) { $sst = "pp_id"; $sod = "desc"; } +$allowed_sst = array('pp_id', 'od_id', 'pp_receipt_time'); +if ($sst && !in_array($sst, $allowed_sst)) $sst = 'pp_id'; +if ($sod && !in_array(strtolower($sod), array('asc', 'desc'))) $sod = ''; $sql_order = " order by {$sst} {$sod} "; $sql = " select count(*) as cnt