$msg = "Update process failed!"; foreach ($failed_to_update as $failed) { $msg .= "<br/>{$failed}"; } } } break; case 'bulk_delete': $msg = ""; $deleted = 0; $ids = array(); if (isset($_POST['seat_ids']) && count($_POST['seat_ids']) > 0) { $ids = $_POST['seat_ids']; $cls_seating_chart = new seating_chart(); foreach ($ids as $id) { if ($cls_seating_chart->delete_seat($id)) { $deleted++; } else { $row = $wpdb->get_row("select * from " . EVENTS_SEATING_CHART_SEAT_TABLE . " where id = {$id}"); if ($row !== NULL) { array_push($not_deleted, "Section: " . $row->section . "; Level: " . $row->level . "; Row: " . $row->row . "; Seat: " . $row->seat); } } } if ($deleted > 0) { $msg .= "Total number of seats deleted: {$deleted}<br/>"; } if (count($not_deleted) > 0) { $msg .= __('Following seats were not deleted because they have already been used in events:', 'event_espresso') . "<br/>"; foreach ($not_deleted as $v) { $msg .= $v . "<br/>";