unset($_POST['price']); } if (isset($_POST['member_price']) && (empty($_POST['member_price']) || is_null($_POST['member_price']))) { unset($_POST['member_price']); } if (count($ids) > 0) { #$seating_chart_id = $_REQUEST['seating_chart_id']; #$seating_chart = $wpdb->get_row("select * from ".EVENTS_SEATING_CHART_TABLE ." where id = $seating_chart_id "); #if ( $seating_chart != NULL ) { foreach ($ids as $seat_id) { #$seat_id = $_REQUEST['seat_id']; $seat = $wpdb->get_row("select * from " . EVENTS_SEATING_CHART_SEAT_TABLE . " where seating_chart_id = {$seating_chart_id} and id = {$seat_id}"); if ($seat !== NULL) { #if ( isset($_POST['update_seat']) && $_POST['update_seat'] == 1 ) { $cls_seating_chart = new seating_chart(); $result = $cls_seating_chart->save_seat($seating_chart_id, $seat_id, $_POST); if ($result === true) { $seat = $wpdb->get_row("select * from " . EVENTS_SEATING_CHART_SEAT_TABLE . " where seating_chart_id = {$seating_chart_id} and id = {$seat_id}"); } else { $failed_to_update[] = "Failed to update seat [Level: {$seat->level}, Section: {$seat->section}, Row: {$seat->row}, Seat: {$seat->seat}"; } #} } } #} if (count($failed_to_update) == 0) { $msg = "Updated successfully"; } else { $msg = "Update process failed!"; foreach ($failed_to_update as $failed) { $msg .= "<br/>{$failed}";