<?php global $wpdb; $msg = "Seating chart not found"; $seating_chart_id = 0; if (isset($_REQUEST['seating_chart_id'])) { $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) { $msg = ""; if (isset($_POST['update_seating_chart']) && $_POST['update_seating_chart'] == 1) { $cls_seating_chart = new seating_chart(); $result = $cls_seating_chart->save_seating_chart($seating_chart_id, $_POST); if ($result === true) { $seating_chart = $wpdb->get_row("select * from " . EVENTS_SEATING_CHART_TABLE . " where id = {$seating_chart_id} "); $msg = "Seating chart info updated successfully"; } else { $msg = "Failed to update seating chart info"; } } } else { $seating_chart_id = 0; } } ?> <div class="wrap" style="margin-bottom:10px;"> <div id="icon-options-event" class="icon32"></div> <h2>Manage Seating Charts</h2> <?php if ($msg != "") {