diff --git a/.gitignore b/.gitignore index 104c9a4..b40b2ea 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ /images/ /temp/* data/config.php - +.vscode/ diff --git a/back/room.php b/back/room.php index 8004b9c..7ef08a6 100755 --- a/back/room.php +++ b/back/room.php @@ -266,12 +266,12 @@ elseif ($_REQUEST['act'] == 'insert' || $_REQUEST['act'] == 'update') @unlink('../' . $row['image1']); } } - $original_img = $image->upload_image($_FILES['image1']); // 原始图片 - if ($original_img === false) - { - sys_msg($image->error_msg(), 1, array(), false); - } - $image1 = $original_img; // 商品图片 + $original_img = $image->upload_image($_FILES['image1']); // 原始图片 + if ($original_img === false) + { + sys_msg($image->error_msg(), 1, array(), false); + } + $image1 = $original_img; // 商品图片 } @@ -664,12 +664,11 @@ elseif ($_REQUEST['act'] == 'toggle_enable') /*------------------------------------------------------ */ elseif ($_REQUEST['act'] == 'edit_sort_order') { - check_authz_json('room_manage'); - + // check_authz_json('room_manage'); $room_id = intval($_POST['id']); $sort_order = intval($_POST['val']); - if ($exc->edit("sort_order = '$sort_order', last_update=" .gmtime(), $room_id)) + if ($exc->edit("sort_order = '$sort_order', ustamp=" .time(), $room_id)) { clear_cache_files(); make_json_result($sort_order); @@ -1594,8 +1593,8 @@ function room_list($id) { $filter['keyword'] = json_str_iconv($filter['keyword']); } - $filter['sort_by'] = empty($_REQUEST['sort_by']) ? 'id' : trim($_REQUEST['sort_by']); - $filter['sort_order'] = empty($_REQUEST['sort_order']) ? 'DESC' : trim($_REQUEST['sort_order']); + $filter['sort_by'] = empty($_REQUEST['sort_by']) ? 'sort_order' : trim($_REQUEST['sort_by']); + $filter['sort_order'] = empty($_REQUEST['sort_order']) ? 'ASC' : trim($_REQUEST['sort_order']); /* 关键字 */ if (!empty($filter['keyword'])) diff --git a/back/templates/room_list.htm b/back/templates/room_list.htm index bf639aa..1b53adb 100755 --- a/back/templates/room_list.htm +++ b/back/templates/room_list.htm @@ -18,7 +18,7 @@