コード例 #1
0
<?php

global $wpdb;
$msg = "";
if (isset($_POST['insert_seating_chart'])) {
    if (isset($_POST['name']) && !empty($_POST['name']) && strlen(trim($_POST['name'])) > 0) {
        $cls_seating_chart = new seating_chart();
        $seating_chart_id = $cls_seating_chart->insert_seating_chart($_POST);
        if ($seating_chart_id > 0) {
            $msg = "Seating chart created";
        } else {
            $msg = "Error: [" . mysql_errno() . "] - " . mysql_error();
        }
    } else {
        $msg = "Failed to create seating chart. Seating chart name missing!";
    }
}
?>


<!-- Tabs: Default to Add Custom-->  


<!-- Add New Chart: Fluid Left --> 
<div class="wrap" style="margin-bottom:10px;">
    <div id="icon-options-event" class="icon32"></div>
    <h2>Manage Seating Charts</h2>
    <?php 
if ($msg != "") {
    ?>
    <div id="message" class="updated fade below-h2" style="margin-top:10px;margin-bottom:10px;">