コード例 #1
0
function event_espresso_manage_seating_chart()
{
    do_action('ee_seating_chart_css');
    do_action('ee_seating_chart_js');
    do_action('ee_seating_chart_flush_expired_seats');
    if (isset($_REQUEST['seating_chart_action'])) {
        switch ($_REQUEST['seating_chart_action']) {
            case 'create':
                create_seating_chart();
                break;
            case 'edit':
                edit_seating_chart();
                break;
            case 'seat_list':
                seat_list();
                break;
            case 'add_seat':
                add_seat();
                break;
            case 'edit_seat':
                edit_seat();
                break;
            case 'delete_seat':
                delete_seat();
                break;
            case 'delete':
                delete_seating_chart();
                break;
            case 'manage_event_seating_chart':
                manage_event_seating_chart();
                break;
            case 'seating_chart_list':
            default:
                display_seating_chart_list();
                break;
            case 'seating_chart_section_alignment':
            default:
                display_seating_chart_section_alignment();
                break;
        }
    } else {
        display_seating_chart_list();
    }
}
コード例 #2
0
ファイル: seat.php プロジェクト: nishishailesh/npg
    while ($x = mysql_fetch_assoc($result)) {
        echo '<tr>';
        echo '<td><button type=submit name=delete value=\'' . $x['subloc_id'] . '^' . $x['catagory'] . '\'>X</button></td>';
        foreach ($x as $k => $v) {
            if ($k != 'subloc_id') {
                echo '<td>' . $v . '</td>';
            }
        }
        echo '</tr>';
    }
    echo '</table></form>';
}
function delete_seat($link)
{
    $ex = explode('^', $_POST['delete']);
    $subloc_id = $ex[0];
    $catagory = $ex[1];
    $sql = 'delete from seat where subloc_id=\'' . $subloc_id . '\' and catagory=\'' . $catagory . '\'';
    $result = mysql_query($sql, $link);
}
$link = mysql_connect('127.0.0.1', 'root', 'pppp');
mysql_select_db('npg', $link);
read_seat($link);
if (isset($_POST['save_seat'])) {
    save_seat($link);
}
if (isset($_POST['delete'])) {
    delete_seat($link);
}
print_seat($link);
//print_array($_POST);