Changeset 3446173
- Timestamp:
- 01/24/2026 03:19:29 PM (2 months ago)
- Location:
- bookingor/trunk
- Files:
-
- 10 edited
-
README.txt (modified) (1 diff)
-
app/Backend/Controller/Bookings/BookingsControl.php (modified) (1 diff)
-
app/Backend/Controller/Category/CategoryControl.php (modified) (1 diff)
-
app/Backend/Controller/Dashboard/DashboardControl.php (modified) (1 diff)
-
app/Backend/Controller/Location/LocationControl.php (modified) (1 diff)
-
app/Backend/Controller/Service/ServiceControl.php (modified) (2 diffs)
-
app/Backend/Controller/Settings/SettingsControl.php (modified) (1 diff)
-
app/Backend/Controller/Staff/StaffControl.php (modified) (1 diff)
-
bookingor.php (modified) (3 diffs)
-
includes/class-bookingor.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
bookingor/trunk/README.txt
r3446143 r3446173 5 5 Tested up to: 6.9 6 6 Donate link: https://bookingor.com 7 Stable tag: 2.0. 97 Stable tag: 2.0.10 8 8 Requires PHP: 7.2 9 9 License: GPLv2 or later -
bookingor/trunk/app/Backend/Controller/Bookings/BookingsControl.php
r3444926 r3446173 57 57 } 58 58 } 59 if (!current_user_can('manage_options')) { 60 $response = [ 61 'status' => htmlspecialchars('error'), 62 'message' => htmlspecialchars('You do not have permission.') 63 ]; 64 echo wp_json_encode($response); 65 die(); 66 } 59 67 60 68 61 if (!empty($customer_booked) && !empty($customer_detail) && !empty($staff_detail) && !empty($service_detail)) { -
bookingor/trunk/app/Backend/Controller/Category/CategoryControl.php
r3444926 r3446173 232 232 $category = $wpdb->prefix . self::$dp_prefix . 'categories'; 233 233 $subcategory = $wpdb->prefix . self::$dp_prefix . 'subcategory'; 234 if (!current_user_can('manage_options')) { 235 $response = [ 236 'status' => htmlspecialchars('error'), 237 'message' => htmlspecialchars('You do not have permission.') 238 ]; 239 echo wp_json_encode($response); 240 die(); 241 } 234 242 235 if (class_exists('Bookingor\Backend\Controller\Subcategory\SubcategoryControl')) { 243 236 return self::$category_table = SubcategoryControl::bp_category_and_subcategory_view(); -
bookingor/trunk/app/Backend/Controller/Dashboard/DashboardControl.php
r3444926 r3446173 114 114 die(); 115 115 } 116 117 public function aktBookingor()118 {119 if (isset($_REQUEST['action'])) {120 121 122 if (isset($_POST['nonce'])) {123 if (!wp_verify_nonce(sanitize_text_field(wp_unslash($_POST['nonce'])), 'bookingor_ajax_nonce')) {124 $response = [125 'status' => htmlspecialchars('error'),126 'message' => htmlspecialchars('Nonce verification failed.')127 ];128 echo wp_json_encode($response);129 }130 }131 if (!current_user_can('manage_options')) {132 $response = [133 'status' => htmlspecialchars('error'),134 'message' => htmlspecialchars('You do not have permission.')135 ];136 echo wp_json_encode($response);137 die();138 }139 140 update_option(self::$name_prefix . '_settings_p_ky_id', sanitize_text_field(wp_unslash($_POST['it_id'] ?? '')));141 update_option(self::$name_prefix . '_settings_p_ky', sanitize_text_field(wp_unslash($_POST['lc_code'] ?? '')));142 143 $get_p_k = sanitize_text_field(wp_unslash($_POST['lc_code']));144 $get_p_k_id = sanitize_text_field(wp_unslash($_POST['it_id']));145 146 $client = new Client();147 $endpoint = 'https://bookingor.com/';148 149 try {150 // Send a GET request151 $response = $client->get($endpoint, [152 'query' => [153 'edd_action' => 'check_license',154 'item_id' => $get_p_k_id,155 'license' => $get_p_k,156 'url' => home_url(),157 ],158 ]);159 160 // Get the response body161 $body = $response->getBody();162 $data = json_decode($body, true);163 164 $json_Data = wp_json_encode($data);165 // // Output the response data166 167 if ($data['success'] === true && $data['license'] === 'valid') {168 update_option(self::$name_prefix . '_settings_p_data', sanitize_text_field($json_Data ?? ''));169 $response = [170 'license_status' => $data['license'],171 'status' => htmlspecialchars('success'),172 'message' => htmlspecialchars('License key verified successfully'),173 ];174 } elseif ($data['success'] == true && $data['license'] === 'site_inactive') {175 update_option(self::$name_prefix . '_settings_p_data', '');176 177 $response = [178 'license' => $data['license'],179 'status' => htmlspecialchars('error'),180 'message' => htmlspecialchars('Site Name not matched'),181 ];182 } else {183 update_option(self::$name_prefix . '_settings_p_data', '');184 185 $response = [186 'status' => htmlspecialchars('error'),187 'message' => htmlspecialchars('License key not verified'),188 ];189 }190 191 echo wp_json_encode($response);192 die();193 } catch (\Exception $e) {194 // Handle exceptions195 return ['error' => $e->getMessage()];196 }197 }198 }199 116 } -
bookingor/trunk/app/Backend/Controller/Location/LocationControl.php
r3444926 r3446173 119 119 } 120 120 } 121 if (!current_user_can('manage_options')) { 122 $response = [ 123 'status' => htmlspecialchars('error'), 124 'message' => htmlspecialchars('You do not have permission.') 125 ]; 126 echo wp_json_encode($response); 127 die(); 128 } 121 129 122 130 123 $response = self::$bookingorDb->get_results($wpdb->prepare("SELECT location_id, location_title, location_icon, location_address, status FROM {$wpdb->prefix}bookingor_location WHERE location_id = %d", $location_id)); -
bookingor/trunk/app/Backend/Controller/Service/ServiceControl.php
r3444926 r3446173 627 627 } 628 628 } 629 if (!current_user_can('manage_options')) { 630 $response = [ 631 'status' => htmlspecialchars('error'), 632 'message' => htmlspecialchars('You do not have permission.') 633 ]; 634 echo wp_json_encode($response); 635 die(); 636 } 629 637 630 self::$get_service_data = self::$bookingorDb->get_results($wpdb->prepare( 638 631 "SELECT service_id, service_icon, service_name, service_description, category_get_id, service_cost, service_deposit, service_deposit_type, service_tax, service_duration, service_duration_type, timeslot_length, service_slot_increment, padding_before, padding_after, service_capacity_min, service_capacity_max, recurring_status, recurring_type, recurring_payment, service_cancel_booking_time, service_allow_booking_time, single_booking_only_slot, service_time_sheet, wc_id, status FROM {$wpdb->prefix}bookingor_services WHERE service_id = %d", … … 672 665 return self::$gets_category = self::$bookingorDb->get_results($wpdb->prepare("SELECT category_id, icon, category_name, status FROM {$wpdb->prefix}bookingor_categories WHERE status = %d", 1)); 673 666 } 674 675 /**676 * Retrieves a list of all subcategories from the database.677 * This function is used to populate the subcategory dropdown in the service creation and editing forms.678 * The function returns an array of subcategory details, including the subcategory ID, category ID, and subcategory name.679 *680 * @return array An array of subcategory details681 */682 public function bp_subcategory_for_services()683 {684 global $wpdb;685 self::$bookingorDb = $wpdb;686 self::$gets_subcategory_serv = self::$bookingorDb->get_results($wpdb->prepare("SELECT subcategory_id, category_get_id, subcategory_name FROM {$wpdb->prefix}bookingor_subcategory"));687 }688 689 /**690 * Retrieves the selected subcategory for a given service ID.691 *692 * This function returns an array of subcategory details, including the subcategory ID, service ID, subcategory ID, category ID, and subcategory name.693 *694 * @return array An array of subcategory details695 */696 public function bp_get_selected_subcategory()697 {698 $response = new \stdclass();699 $response->success = false;700 global $wpdb;701 self::$bookingorDb = $wpdb;702 $get_service_subcategory = $wpdb->prefix . self::$dp_prefix . '';703 $service_get_id = isset($_REQUEST['service_get_id']) ? intval($_REQUEST['service_get_id']) : 0;704 705 706 if (isset($_POST['nonce'])) {707 if (!wp_verify_nonce(sanitize_text_field(wp_unslash($_POST['nonce'])), 'bookingor_ajax_nonce')) {708 $response = [709 'status' => htmlspecialchars('error'),710 'message' => htmlspecialchars('Nonce verification failed.')711 ];712 }713 }714 if (!current_user_can('manage_options')) {715 $response = [716 'status' => htmlspecialchars('error'),717 'message' => htmlspecialchars('You do not have permission.')718 ];719 echo wp_json_encode($response);720 die();721 }722 $response_selected = self::$bookingorDb->get_results($wpdb->prepare("SELECT service_subcategory_id, service_get_id, subcategory_get_id, category_get_id, service_subcategory_name FROM {$wpdb->prefix}bookingor_service_subcategory WHERE service_get_id = %d", $service_get_id));723 echo wp_json_encode($response_selected);724 die();725 }726 727 /**728 * Retrieves a list of subcategories for a given category ID and service ID.729 *730 * This function is used to populate the subcategory dropdown in the service creation and editing forms.731 * The function returns an array of subcategory details, including the subcategory ID, service ID, subcategory ID, category ID, and subcategory name.732 *733 * @return array An array of subcategory details734 */735 public function bp_get_subcategory_for_services()736 {737 $response = new \stdclass();738 $response->success = false;739 global $wpdb;740 self::$bookingorDb = $wpdb;741 $category_get_id = isset($_REQUEST['category_get_id']) ? intval($_REQUEST['category_get_id']) : 0;742 $service_get_id = isset($_REQUEST['service_get_id']) ? intval($_REQUEST['service_get_id']) : 0;743 if (class_exists('Bookingor\Frontend\Controller\ServiceSubcategory\ServiceSubcategoryControl')) {744 745 746 if (isset($_POST['nonce'])) {747 if (!wp_verify_nonce(sanitize_text_field(wp_unslash($_POST['nonce'])), 'bookingor_ajax_nonce')) {748 $response = [749 'status' => htmlspecialchars('error'),750 'message' => htmlspecialchars('Nonce verification failed.')751 ];752 }753 }754 if (!current_user_can('manage_options')) {755 $response = [756 'status' => htmlspecialchars('error'),757 'message' => htmlspecialchars('You do not have permission.')758 ];759 echo wp_json_encode($response);760 die();761 }762 $response = self::$bookingorDb->get_results($wpdb->prepare("SELECT category_get_id, subcategory_id, subcategory_name FROM {$wpdb->prefix}bookingor_subcategory where category_get_id = %d", "$category_get_id"));763 $response_selected = self::$bookingorDb->get_results($wpdb->prepare("SELECT service_subcategory_id, service_get_id, subcategory_get_id, category_get_id, service_subcategory_name FROM {$wpdb->prefix}bookingor_service_subcategory WHERE service_get_id = %d", $service_get_id));764 echo wp_json_encode([$response_selected, $response]);765 die();766 }767 }768 667 } -
bookingor/trunk/app/Backend/Controller/Settings/SettingsControl.php
r3445583 r3446173 354 354 echo wp_json_encode($response); 355 355 } 356 }357 if (!current_user_can('manage_options')) {358 $response = [359 'status' => htmlspecialchars('error'),360 'message' => htmlspecialchars('You do not have permission.')361 ];362 echo wp_json_encode($response);363 die();364 356 } 365 357 -
bookingor/trunk/app/Backend/Controller/Staff/StaffControl.php
r3444926 r3446173 546 546 } 547 547 } 548 if (!current_user_can('manage_options')) { 549 $response = [ 550 'status' => htmlspecialchars('error'), 551 'message' => htmlspecialchars('You do not have permission.') 552 ]; 553 echo wp_json_encode($response); 554 die(); 555 } 548 556 549 self::$staff_data = self::$bookingorDb->get_results($wpdb->prepare(" 557 550 SELECT -
bookingor/trunk/bookingor.php
r3446143 r3446173 9 9 * 10 10 * @link Bookingor 11 * @since 2.0. 911 * @since 2.0.10 12 12 * @package Bookingor 13 13 * … … 15 15 * Plugin Name: Bookingor - Booking System for Appointment Calendar, Meeting Scheduler & WooCommerce Bookings 16 16 * Description: Bookingor is an all-in-one appointment and booking management system. Streamline scheduling processes for any business or individuals. Bookingor helps you efficiently handle bookings, save time, and enhance the customer experience. 17 * Version: 2.0. 917 * Version: 2.0.10 18 18 * License: GPL-2.0+ 19 19 * Tags: booking, appointment, booking System, Schedule appointment, calendar, scheduling … … 37 37 * Currently plugin version. 38 38 */ 39 define('BOOKINGOR_VERSION', '2.0. 9');39 define('BOOKINGOR_VERSION', '2.0.10'); 40 40 41 41 /** -
bookingor/trunk/includes/class-bookingor.php
r3446143 r3446173 96 96 $this->version = BOOKINGOR_VERSION; 97 97 } else { 98 $this->version = '2.0. 9';98 $this->version = '2.0.10'; 99 99 } 100 100 $this->plugin_name = 'bookingor';
Note: See TracChangeset
for help on using the changeset viewer.