Changeset 3328374
- Timestamp:
- 07/15/2025 03:58:35 PM (9 months ago)
- Location:
- box-tracker
- Files:
-
- 4 edited
- 13 copied
-
tags/2.2.7 (copied) (copied from box-tracker/trunk)
-
tags/2.2.7/box-tracker-online.php (copied) (copied from box-tracker/trunk/box-tracker-online.php) (1 diff)
-
tags/2.2.7/images/Google_logo.png (copied) (copied from box-tracker/trunk/images/Google_logo.png)
-
tags/2.2.7/includes/base/activate.php (copied) (copied from box-tracker/trunk/includes/base/activate.php)
-
tags/2.2.7/includes/base/ajax-control.php (copied) (copied from box-tracker/trunk/includes/base/ajax-control.php) (9 diffs)
-
tags/2.2.7/includes/base/enqueue.php (copied) (copied from box-tracker/trunk/includes/base/enqueue.php)
-
tags/2.2.7/includes/base/server-calls.php (copied) (copied from box-tracker/trunk/includes/base/server-calls.php) (2 diffs)
-
tags/2.2.7/javascript/address-validation-script.js (copied) (copied from box-tracker/trunk/javascript/address-validation-script.js)
-
tags/2.2.7/javascript/front-house-script.js (copied) (copied from box-tracker/trunk/javascript/front-house-script.js)
-
tags/2.2.7/readme.txt (copied) (copied from box-tracker/trunk/readme.txt) (1 diff)
-
tags/2.2.7/templates/front-house-step-one-template.php (copied) (copied from box-tracker/trunk/templates/front-house-step-one-template.php)
-
tags/2.2.7/templates/front-house-step-three-template.php (copied) (copied from box-tracker/trunk/templates/front-house-step-three-template.php)
-
tags/2.2.7/uninstall.php (copied) (copied from box-tracker/trunk/uninstall.php)
-
trunk/box-tracker-online.php (modified) (1 diff)
-
trunk/includes/base/ajax-control.php (modified) (9 diffs)
-
trunk/includes/base/server-calls.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
box-tracker/tags/2.2.7/box-tracker-online.php
r3326528 r3328374 8 8 Plugin URI: https://www.dumpster.software/api/word-press-plugin.html 9 9 Description: The Box Tracker plugin facilitates online ordering for waste haulers. Depending on configuration, orders will result either in service requests on the customer screen or fully booked work orders on dispatch. Using the Web API tab on Box Tracker's Preferences app, you can prevent over booking, control which days of the week online orders will be accepted, and prevent same day ordering. For more information about Box Tracker or this plugin please contact support at 603 546 6751 option 2 or support@cairnapps.com 10 Version: 2.2. 610 Version: 2.2.7 11 11 Author: Cairn Applications Inc 12 12 Author URI: https://www.cloud-computing.rocks/ -
box-tracker/tags/2.2.7/includes/base/ajax-control.php
r3326528 r3328374 290 290 $b0xT_days = array(); 291 291 for ($i = 0; $i < 7; $i++) { 292 $b0xT_days[] = strftime('%A', $b0xT_timestamp);292 $b0xT_days[] = (new DateTime())->setTimestamp($b0xT_timestamp)->format('l'); 293 293 $b0xT_timestamp = strtotime('+1 day', $b0xT_timestamp); 294 294 } … … 544 544 545 545 //any errors 546 if( $b0xT_lat_long_query['b0xT_error_message']){546 if(isset($b0xT_lat_long_query['b0xT_error_message'])) { 547 547 $b0xT_field_errors['b0xT_street_address'] = $b0xT_lat_long_query['b0xT_error_message']; 548 548 wp_send_json($this->b0xT_response('validation_error', $b0xT_field_errors, '')); … … 563 563 $b0xT_response_query = $this->b0xT_server_calls->b0xT_get_driving_distance($b0xT_lat, $b0xT_long, $b0xT_ss_map_center_lat, $b0xT_ss_map_center_lng); //b0xT_get_driving_distance() sanitizes values 564 564 delete_option('b0xT_distance_api'); #remove 565 if(! $b0xT_response_query['b0xT_error_message']) {565 if(!isset($b0xT_response_query['b0xT_error_message'])) { 566 566 add_option('b0xT_distance_api', 'Matrix API'); 567 567 } … … 573 573 if(!(sanitize_text_field(get_option('b0xT_distance_api')) == 'Routes API')) { 574 574 delete_option('b0xT_distance_api'); #remove 575 if(! $b0xT_response_query['b0xT_error_message']) {575 if(!isset($b0xT_response_query['b0xT_error_message'])) { 576 576 add_option('b0xT_distance_api', 'Routes API'); 577 577 } … … 582 582 $b0xT_both_api_check = function() use($b0xT_matrix_api_check, $b0xT_routes_api_check) { 583 583 $b0xT_response_query = $b0xT_matrix_api_check(); 584 if( $b0xT_response_query['b0xT_error_message']) {584 if(isset($b0xT_response_query['b0xT_error_message'])) { 585 585 $b0xT_response_query = $b0xT_routes_api_check(); 586 586 } … … 599 599 $b0xT_driving_distance_query = $b0xT_get_distance_query(); 600 600 601 if( $b0xT_driving_distance_query['b0xT_error_message']) {601 if(isset($b0xT_driving_distance_query['b0xT_error_message'])) { 602 602 $b0xT_field_errors['b0xT_driving_distance'] = $b0xT_driving_distance_query['b0xT_error_message']; 603 603 wp_send_json($this->b0xT_response('validation_error', $b0xT_field_errors, '')); … … 631 631 if($b0xT_drv_distance > $b0xT_max_distance) { continue; } 632 632 633 if(! $b0xT_selected_price_sheet) {633 if(!isset($b0xT_selected_price_sheet)) { 634 634 $b0xT_selected_price_sheet = $b0xT_max_distance_value; 635 635 continue; … … 654 654 655 655 //any price sheet. 656 if(! $b0xT_selected_price_sheet) {656 if(!isset($b0xT_selected_price_sheet)) { 657 657 wp_send_json($this->b0xT_response('error', 'No pricing information available please contact our office.', '')); 658 658 } … … 916 916 $b0xT_message = 'Place order success.'; 917 917 918 $b0xT_order_fields["OrderID"] = $b0xT_place_order_query->OrderID; 919 $b0xT_order_fields["OrderDate"] = $b0xT_place_order_query->OrderDate; 920 $b0xT_order_fields["OrderAddress"] = $b0xT_place_order_query->OrderAddress; 921 $b0xT_order_fields["OrderCity"] = $b0xT_place_order_query->OrderCity; 922 $b0xT_order_fields["OrderState"] = $b0xT_place_order_query->OrderState; 923 $b0xT_order_fields["OrderZip"] = $b0xT_place_order_query->OrderZip; 918 $b0xT_api_mode = sanitize_text_field(get_option('b0xT_api_mode')); 919 920 if($b0xT_api_mode == "cmdBoxTWebAPIDirectBooking") { 921 $b0xT_order_fields["OrderID"] = $b0xT_place_order_query->OrderID; 922 $b0xT_order_fields["OrderDate"] = $b0xT_place_order_query->OrderDate; 923 $b0xT_order_fields["OrderAddress"] = $b0xT_place_order_query->OrderAddress; 924 $b0xT_order_fields["OrderCity"] = $b0xT_place_order_query->OrderCity; 925 $b0xT_order_fields["OrderState"] = $b0xT_place_order_query->OrderState; 926 $b0xT_order_fields["OrderZip"] = $b0xT_place_order_query->OrderZip; 927 } 924 928 } else { 925 929 $b0xT_error_message = "Sorry..! Something went wrong please try again later.<br>Status: ".$b0xT_place_order_query->status.'<br>Error: '.$b0xT_place_order_query->errorString; -
box-tracker/tags/2.2.7/includes/base/server-calls.php
r3269023 r3328374 460 460 */ 461 461 function b0xT_sanitize_string_values($b0xT_data) { 462 if($b0xT_data == null) { 463 return ""; 464 } 465 462 466 $b0xT_data_temp = json_decode($b0xT_data); 467 463 468 if($b0xT_data_temp && is_array($b0xT_data_temp)) { 464 469 return $this->b0xT_sanitize_array_values($b0xT_data_temp); … … 469 474 } 470 475 471 if($b0xT_data == null) {472 return "";473 }474 475 476 return sanitize_text_field($b0xT_data); 476 477 } -
box-tracker/tags/2.2.7/readme.txt
r3326528 r3328374 4 4 Requires PHP: 5.6.4 5 5 Tested up to: 6.8 6 Stable tag: 2.2. 66 Stable tag: 2.2.7 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html -
box-tracker/trunk/box-tracker-online.php
r3326528 r3328374 8 8 Plugin URI: https://www.dumpster.software/api/word-press-plugin.html 9 9 Description: The Box Tracker plugin facilitates online ordering for waste haulers. Depending on configuration, orders will result either in service requests on the customer screen or fully booked work orders on dispatch. Using the Web API tab on Box Tracker's Preferences app, you can prevent over booking, control which days of the week online orders will be accepted, and prevent same day ordering. For more information about Box Tracker or this plugin please contact support at 603 546 6751 option 2 or support@cairnapps.com 10 Version: 2.2. 610 Version: 2.2.7 11 11 Author: Cairn Applications Inc 12 12 Author URI: https://www.cloud-computing.rocks/ -
box-tracker/trunk/includes/base/ajax-control.php
r3326528 r3328374 290 290 $b0xT_days = array(); 291 291 for ($i = 0; $i < 7; $i++) { 292 $b0xT_days[] = strftime('%A', $b0xT_timestamp);292 $b0xT_days[] = (new DateTime())->setTimestamp($b0xT_timestamp)->format('l'); 293 293 $b0xT_timestamp = strtotime('+1 day', $b0xT_timestamp); 294 294 } … … 544 544 545 545 //any errors 546 if( $b0xT_lat_long_query['b0xT_error_message']){546 if(isset($b0xT_lat_long_query['b0xT_error_message'])) { 547 547 $b0xT_field_errors['b0xT_street_address'] = $b0xT_lat_long_query['b0xT_error_message']; 548 548 wp_send_json($this->b0xT_response('validation_error', $b0xT_field_errors, '')); … … 563 563 $b0xT_response_query = $this->b0xT_server_calls->b0xT_get_driving_distance($b0xT_lat, $b0xT_long, $b0xT_ss_map_center_lat, $b0xT_ss_map_center_lng); //b0xT_get_driving_distance() sanitizes values 564 564 delete_option('b0xT_distance_api'); #remove 565 if(! $b0xT_response_query['b0xT_error_message']) {565 if(!isset($b0xT_response_query['b0xT_error_message'])) { 566 566 add_option('b0xT_distance_api', 'Matrix API'); 567 567 } … … 573 573 if(!(sanitize_text_field(get_option('b0xT_distance_api')) == 'Routes API')) { 574 574 delete_option('b0xT_distance_api'); #remove 575 if(! $b0xT_response_query['b0xT_error_message']) {575 if(!isset($b0xT_response_query['b0xT_error_message'])) { 576 576 add_option('b0xT_distance_api', 'Routes API'); 577 577 } … … 582 582 $b0xT_both_api_check = function() use($b0xT_matrix_api_check, $b0xT_routes_api_check) { 583 583 $b0xT_response_query = $b0xT_matrix_api_check(); 584 if( $b0xT_response_query['b0xT_error_message']) {584 if(isset($b0xT_response_query['b0xT_error_message'])) { 585 585 $b0xT_response_query = $b0xT_routes_api_check(); 586 586 } … … 599 599 $b0xT_driving_distance_query = $b0xT_get_distance_query(); 600 600 601 if( $b0xT_driving_distance_query['b0xT_error_message']) {601 if(isset($b0xT_driving_distance_query['b0xT_error_message'])) { 602 602 $b0xT_field_errors['b0xT_driving_distance'] = $b0xT_driving_distance_query['b0xT_error_message']; 603 603 wp_send_json($this->b0xT_response('validation_error', $b0xT_field_errors, '')); … … 631 631 if($b0xT_drv_distance > $b0xT_max_distance) { continue; } 632 632 633 if(! $b0xT_selected_price_sheet) {633 if(!isset($b0xT_selected_price_sheet)) { 634 634 $b0xT_selected_price_sheet = $b0xT_max_distance_value; 635 635 continue; … … 654 654 655 655 //any price sheet. 656 if(! $b0xT_selected_price_sheet) {656 if(!isset($b0xT_selected_price_sheet)) { 657 657 wp_send_json($this->b0xT_response('error', 'No pricing information available please contact our office.', '')); 658 658 } … … 916 916 $b0xT_message = 'Place order success.'; 917 917 918 $b0xT_order_fields["OrderID"] = $b0xT_place_order_query->OrderID; 919 $b0xT_order_fields["OrderDate"] = $b0xT_place_order_query->OrderDate; 920 $b0xT_order_fields["OrderAddress"] = $b0xT_place_order_query->OrderAddress; 921 $b0xT_order_fields["OrderCity"] = $b0xT_place_order_query->OrderCity; 922 $b0xT_order_fields["OrderState"] = $b0xT_place_order_query->OrderState; 923 $b0xT_order_fields["OrderZip"] = $b0xT_place_order_query->OrderZip; 918 $b0xT_api_mode = sanitize_text_field(get_option('b0xT_api_mode')); 919 920 if($b0xT_api_mode == "cmdBoxTWebAPIDirectBooking") { 921 $b0xT_order_fields["OrderID"] = $b0xT_place_order_query->OrderID; 922 $b0xT_order_fields["OrderDate"] = $b0xT_place_order_query->OrderDate; 923 $b0xT_order_fields["OrderAddress"] = $b0xT_place_order_query->OrderAddress; 924 $b0xT_order_fields["OrderCity"] = $b0xT_place_order_query->OrderCity; 925 $b0xT_order_fields["OrderState"] = $b0xT_place_order_query->OrderState; 926 $b0xT_order_fields["OrderZip"] = $b0xT_place_order_query->OrderZip; 927 } 924 928 } else { 925 929 $b0xT_error_message = "Sorry..! Something went wrong please try again later.<br>Status: ".$b0xT_place_order_query->status.'<br>Error: '.$b0xT_place_order_query->errorString; -
box-tracker/trunk/includes/base/server-calls.php
r3269023 r3328374 460 460 */ 461 461 function b0xT_sanitize_string_values($b0xT_data) { 462 if($b0xT_data == null) { 463 return ""; 464 } 465 462 466 $b0xT_data_temp = json_decode($b0xT_data); 467 463 468 if($b0xT_data_temp && is_array($b0xT_data_temp)) { 464 469 return $this->b0xT_sanitize_array_values($b0xT_data_temp); … … 469 474 } 470 475 471 if($b0xT_data == null) {472 return "";473 }474 475 476 return sanitize_text_field($b0xT_data); 476 477 } -
box-tracker/trunk/readme.txt
r3326528 r3328374 4 4 Requires PHP: 5.6.4 5 5 Tested up to: 6.8 6 Stable tag: 2.2. 66 Stable tag: 2.2.7 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset
for help on using the changeset viewer.