function wpdevbk_show_booking_page() { wpbc_welcome_panel(); //////////////////////////////////////////////////////////////////////////////////////////////////////// // Get from SETTINGS (if its not set in request yet) the "tab" & "view_mode" and set to $_REQUEST // If we have the "saved" filter set so LOAD it and set to REQUEST, if REQUEST was not set previously // & skip "wh_booking_type" from the saved filter set //////////////////////////////////////////////////////////////////////////////////////////////////////// wpdevbk_get_default_bk_listing_filter_set_to_params('default'); // Get saved filters set DONE! //debuge($_REQUEST); // Setting $_REQUEST['wh_booking_type'] if (function_exists('wpdevbk_check_wh_booking_type_param_in_request')) { wpdevbk_check_wh_booking_type_param_in_request(); } // DONE! // If "wh_booking_type" is not set, and current user is not superadmin, then set to - $_REQUEST['wh_booking_type'] - booking resource from regular user make_bk_action('check_for_resources_of_notsuperadmin_in_booking_listing'); // DONE! wpdevbk_booking_view_mode_buttons(); // Show switch calendar/listing buttons DONE! //debuge($_REQUEST); switch ($_REQUEST['view_mode']) { case 'vm_calendar': // vm_calendar bookings_overview_in_calendar(); break; default: // vm_listing wpdevbk_show_booking_listings(); } wpdevbk_booking_listing_write_js(); // Wtite inline JS wpdevbk_booking_listing_write_css(); // Write inline CSS }
function wpdevbk_show_booking_listings_OLD() { wpdevbk_get_default_bk_listing_filter_set_to_params('default'); // Get saved filters set wpdevbk_booking_listings_interface_header(); // Show Filters and Action tabs // If the booking resources is not set, and current user is not superadmin, so then get only the booking resources of the current user make_bk_action('check_for_resources_of_notsuperadmin_in_booking_listing'); $args = wpdev_get_args_from_request_in_bk_listing(); // Get safy PARAMS from REQUEST ?> <textarea id="bk_request_params" style="display:none;"><?php echo serialize($args); ?> </textarea><?php $bk_listing = wpdev_get_bk_listing_structure_engine($args); // Get Bookings structure $bookings = $bk_listing[0]; $booking_types = $bk_listing[1]; $bookings_count = $bk_listing[2]; $page_num = $bk_listing[3]; $page_items_count = $bk_listing[4]; booking_listing_table($bookings, $booking_types); // Show the bookings listing table wpdevbk_show_pagination($bookings_count, $page_num, $page_items_count); // Show Pagination wpdevbk_booking_listing_write_js(); // Wtite inline JS wpdevbk_booking_listing_write_css(); // Write inline CSS }