diff --git a/src/articles.php b/src/articles.php index c4eef7d..69b530c 100644 --- a/src/articles.php +++ b/src/articles.php @@ -121,8 +121,8 @@ $stmt_man_load->execute(); $manufacturers_for_filter = $stmt_man_load->get_result()->fetch_all(MYSQLI_ASSOC); $stmt_man_load->close(); -$stmt_loc_load = $conn->prepare("SELECT id, name FROM storage_locations WHERE user_id IN ($placeholders) OR household_id = ? ORDER BY name ASC"); -$stmt_loc_load->bind_param($all_types, ...$all_params); +$stmt_loc_load = $conn->prepare("SELECT id, name FROM storage_locations WHERE user_id IN ($placeholders) ORDER BY name ASC"); +$stmt_loc_load->bind_param($types, ...$household_member_ids); $stmt_loc_load->execute(); $storage_locations_for_bulk = $stmt_loc_load->get_result()->fetch_all(MYSQLI_ASSOC); $stmt_loc_load->close(); diff --git a/src/manage_packing_list_items.php b/src/manage_packing_list_items.php index 4308f3c..e9f0e54 100644 --- a/src/manage_packing_list_items.php +++ b/src/manage_packing_list_items.php @@ -10,7 +10,6 @@ if (!isset($_SESSION['user_id'])) { exit; } require_once 'db_connect.php'; -require_once 'header.php'; $current_user_id = $_SESSION['user_id']; $packing_list_id = isset($_GET['id']) ? intval($_GET['id']) : 0; @@ -49,6 +48,8 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['empty_table'])) { exit; } +require_once 'header.php'; + $col_class_lager = ($phase == 1) ? 'col-phase1-lager' : (($phase == 2) ? 'd-none' : 'col-lg-4'); $col_class_table = ($phase == 1) ? 'col-phase1-table' : (($phase == 2) ? 'col-lg-6' : 'col-lg-4'); $col_class_rucksack = ($phase == 2) ? 'col-lg-6' : (($phase == 1) ? 'd-none' : 'col-lg-4'); @@ -279,8 +280,11 @@ $conn->close();