コード例 #1
0
 function event_espresso_run()
 {
     global $wpdb, $org_options, $load_espresso_scripts, $espresso_content;
     do_action('action_hook_espresso_log', __FILE__, __FUNCTION__, '');
     $load_espresso_scripts = true;
     //This tells the plugin to load the required scripts
     ob_start();
     //Make sure scripts are loading
     echo espresso_check_scripts();
     // Get action type
     $regevent_action = isset($_REQUEST['regevent_action']) ? $_REQUEST['regevent_action'] : '';
     if (isset($_REQUEST['event_id']) && !empty($_REQUEST['event_id'])) {
         $_REQUEST['event_id'] = wp_strip_all_tags(absint($_REQUEST['event_id']));
     }
     if (isset($_REQUEST['form_action']) && !empty($_REQUEST['form_action'])) {
         if (isset($_REQUEST['form_action']) && !$_REQUEST['form_action'] == 'edit_attendee') {
             $_REQUEST['primary'] = wp_strip_all_tags(absint($_REQUEST['primary']));
         }
     }
     if (isset($_REQUEST['ee']) && !empty($_REQUEST['ee'])) {
         $regevent_action = "register";
         $_REQUEST['ee'] = wp_strip_all_tags(absint($_REQUEST['ee']));
         $_REQUEST['event_id'] = $_REQUEST['ee'];
     }
     if (isset($_REQUEST['form_action']) && $_REQUEST['form_action'] == 'edit_attendee' || isset($_REQUEST['edit_attendee']) && $_REQUEST['edit_attendee'] == 'true') {
         $regevent_action = "edit_attendee";
     }
     switch ($regevent_action) {
         case "register":
             register_attendees();
             break;
         case "post_attendee":
             //Various attendee functions
             require_once "includes/functions/attendee_functions.php";
             //Add attendees to the database
             require_once "includes/process-registration/add_attendees_to_db.php";
             //Payment/Registration Processing - Used to display the payment options and the payment link in the email. Used with the [ESPRESSO_PAYMENTS] tag
             require_once "includes/process-registration/payment_page.php";
             event_espresso_add_attendees_to_db(NULL, NULL, FALSE);
             break;
         case "show_shopping_cart":
             // MER ONLY - This is the form page for registering the attendee
             event_espresso_require_template('shopping_cart.php');
             event_espresso_shopping_cart();
             break;
         case "load_checkout_page":
             // MER ONLY
             if ($_POST) {
                 event_espresso_update_item_in_session('details');
             }
             event_espresso_load_checkout_page();
             break;
         case "post_multi_attendee":
             // MER ONLY
             //Various attendee functions
             require_once "includes/functions/attendee_functions.php";
             //Add attendees to the database
             require_once "includes/process-registration/add_attendees_to_db.php";
             event_espresso_update_item_in_session('attendees');
             event_espresso_add_attendees_to_db_multi();
             break;
         case "confirm_registration":
             //Various attendee functions
             require_once "includes/functions/attendee_functions.php";
             //Payment/Registration Processing - Used to display the payment options and the payment link in the email. Used with the [ESPRESSO_PAYMENTS] tag
             require_once "includes/process-registration/payment_page.php";
             espresso_confirm_registration();
             break;
         case "edit_attendee":
             //Various attendee functions
             require_once "includes/functions/attendee_functions.php";
             //Payment/Registration Processing - Used to display the payment options and the payment link in the email. Used with the [ESPRESSO_PAYMENTS] tag
             require_once "includes/process-registration/payment_page.php";
             require_once EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/process-registration/attendee_edit_record.php';
             attendee_edit_record();
             break;
         default:
             display_all_events();
     }
     $content = ob_get_contents();
     ob_end_clean();
     $espresso_content = $content;
     add_shortcode('ESPRESSO_EVENTS', 'espresso_return_espresso_content');
 }
コード例 #2
0
ファイル: espresso.php プロジェクト: sriram911/pls
 function event_espresso_run()
 {
     global $wpdb, $org_options, $load_espresso_scripts;
     do_action('action_hook_espresso_log', __FILE__, __FUNCTION__, '');
     $load_espresso_scripts = true;
     //This tells the plugin to load the required scripts
     ob_start();
     //Make sure scripts are loading
     echo espresso_check_scripts();
     // Get action type
     $regevent_action = isset($_REQUEST['regevent_action']) ? $_REQUEST['regevent_action'] : '';
     if (isset($_REQUEST['ee'])) {
         $regevent_action = "register";
         $_REQUEST['event_id'] = $_REQUEST['ee'];
     }
     if (isset($_REQUEST['form_action']) && $_REQUEST['form_action'] == 'edit_attendee' || isset($_REQUEST['edit_attendee']) && $_REQUEST['edit_attendee'] == 'true') {
         $regevent_action = "edit_attendee";
     }
     switch ($regevent_action) {
         case "register":
             register_attendees();
             break;
         case "post_attendee":
             event_espresso_add_attendees_to_db(NULL, NULL, FALSE);
             break;
         case "show_shopping_cart":
             // MER ONLY - This is the form page for registering the attendee
             event_espresso_require_template('shopping_cart.php');
             event_espresso_shopping_cart();
             break;
         case "load_checkout_page":
             // MER ONLY
             if ($_POST) {
                 event_espresso_update_item_in_session('details');
             }
             event_espresso_load_checkout_page();
             break;
         case "post_multi_attendee":
             // MER ONLY
             event_espresso_update_item_in_session('attendees');
             event_espresso_add_attendees_to_db_multi();
             break;
         case "confirm_registration":
             espresso_confirm_registration();
             break;
         case "edit_attendee":
             require_once EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/process-registration/attendee_edit_record.php';
             attendee_edit_record();
             break;
         default:
             display_all_events();
     }
     $content = ob_get_contents();
     ob_end_clean();
     return $content;
 }
コード例 #3
0
 function event_espresso_run()
 {
     global $wpdb, $org_options, $load_espresso_scripts;
     $load_espresso_scripts = true;
     //This tells the plugin to load the required scripts
     ob_start();
     //Make sure scripts are loading
     echo espresso_check_scripts();
     // Get action type
     $regevent_action = isset($_REQUEST['regevent_action']) ? $_REQUEST['regevent_action'] : '';
     if (isset($_REQUEST['ee'])) {
         $regevent_action = "register";
         $_REQUEST['event_id'] = $_REQUEST['ee'];
     }
     if (isset($_REQUEST['edit_attendee'])) {
         $regevent_action = "register";
     }
     switch ($regevent_action) {
         case "post_attendee":
             event_espresso_add_attendees_to_db();
             break;
         case "register":
             register_attendees();
             break;
         case "add_to_session":
             break;
         case "show_shopping_cart":
             //This is the form page for registering the attendee
             event_espresso_require_template('shopping_cart.php');
             event_espresso_shopping_cart();
             break;
         case "load_checkout_page":
             if ($_POST) {
                 event_espresso_calculate_total('details');
             }
             event_espresso_load_checkout_page();
             break;
         case "post_multi_attendee":
             //echo " YESssss";
             event_espresso_update_item_in_session('attendees');
             event_espresso_add_attendees_to_db_multi();
             break;
         default:
             display_all_events();
     }
     $content = ob_get_contents();
     ob_end_clean();
     return $content;
 }