Пример #1
0
/**
 * Decide what content to show in the bookings section. 
 */
function em_bookings_page()
{
    //First any actions take priority
    if (!empty($_REQUEST['booking_id'])) {
        em_bookings_single();
    } elseif (!empty($_REQUEST['person_id'])) {
        em_bookings_person();
    } elseif (!empty($_REQUEST['event_id'])) {
        em_bookings_event();
    } elseif (!empty($_REQUEST['ticket_id'])) {
        em_bookings_ticket();
    } else {
        em_bookings_dashboard();
    }
}
Пример #2
0
/**
 * Decide what content to show in the bookings section. 
 */
function em_bookings_page()
{
    //First any actions take priority
    if (!empty($_REQUEST['action']) && substr($_REQUEST['action'], 0, 7) != 'booking') {
        //actions not starting with booking_
        do_action('em_bookings_' . $_REQUEST['action']);
    } elseif (!empty($_REQUEST['booking_id'])) {
        em_bookings_single();
    } elseif (!empty($_REQUEST['person_id'])) {
        em_bookings_person();
    } elseif (!empty($_REQUEST['event_id'])) {
        em_bookings_event();
    } elseif (!empty($_REQUEST['ticket_id'])) {
        em_bookings_ticket();
    } else {
        em_bookings_dashboard();
    }
}
/**
 * Decide what content to show in the bookings section. 
 */
function em_bookings_page()
{
    //First any actions take priority
    if (!empty($_REQUEST['_wpnonce'])) {
        $_REQUEST['_wpnonce'] = $_GET['_wpnonce'] = $_POST['_wpnonce'] = esc_attr($_REQUEST['_wpnonce']);
    }
    //XSS fix just in case here too
    if (!empty($_REQUEST['action']) && substr($_REQUEST['action'], 0, 7) != 'booking') {
        //actions not starting with booking_
        do_action('em_bookings_' . $_REQUEST['action']);
    } elseif (!empty($_REQUEST['booking_id'])) {
        em_bookings_single();
    } elseif (!empty($_REQUEST['person_id'])) {
        em_bookings_person();
    } elseif (!empty($_REQUEST['event_id'])) {
        em_bookings_event();
    } elseif (!empty($_REQUEST['ticket_id'])) {
        em_bookings_ticket();
    } else {
        em_bookings_dashboard();
    }
}