From 4d030d87e5be37d91444c8ec99a2650070addac6 Mon Sep 17 00:00:00 2001 From: James Richie Date: Thu, 4 Jun 2026 08:13:35 -0400 Subject: [PATCH] fixed PermitFacts CSV Export button --- classes/Counties.php | 2 +- classes/SearchHistory.php | 3 - classes/Users.php | 4 +- js/addAlert.js | 135 ++++++++++++++++++++------------------ js/searchPermitFacts.js | 8 +-- main.php | 1 - xml/settings.xml | 31 ++++----- 7 files changed, 94 insertions(+), 90 deletions(-) diff --git a/classes/Counties.php b/classes/Counties.php index 4b386a8..c897c57 100644 --- a/classes/Counties.php +++ b/classes/Counties.php @@ -393,4 +393,4 @@ class Counties extends Base { } } -?> +?> \ No newline at end of file diff --git a/classes/SearchHistory.php b/classes/SearchHistory.php index 9372afe..c4f783c 100644 --- a/classes/SearchHistory.php +++ b/classes/SearchHistory.php @@ -34,9 +34,6 @@ class SearchHistory extends Base { $user = $this->current_user_serial; $subscription_serial = $searchpayload['subscription_serial']; - echo $subscription_serial; - die(); - switch ($subscription_serial) { case 1: diff --git a/classes/Users.php b/classes/Users.php index 767dbb1..09c3bf6 100644 --- a/classes/Users.php +++ b/classes/Users.php @@ -774,7 +774,7 @@ class Users extends Base { break; case "copy": - + $receiving_user_serial = filter_input(INPUT_POST, "receiving_user_serial", FILTER_SANITIZE_NUMBER_INT) ?: 0; $subscription_serials = filter_input(INPUT_POST, "subscriptions", FILTER_SANITIZE_NUMBER_INT, FILTER_REQUIRE_ARRAY) ?: array(); $subscription_start_dates = filter_input(INPUT_POST, "subscription_start_date", FILTER_DEFAULT, FILTER_REQUIRE_ARRAY) ?: array(); @@ -789,7 +789,7 @@ class Users extends Base { "usersubscription_end_date" => date("Y-m-d", strtotime($subscription_end_dates[$index] ?? "")) ); } - + // Add the Subscriptions to Receiving User $connection = $this->connect(); diff --git a/js/addAlert.js b/js/addAlert.js index 5c67e18..a4ea223 100644 --- a/js/addAlert.js +++ b/js/addAlert.js @@ -12,69 +12,75 @@ $(document).ready(function () { // ---------------------- ClassicEditor - .create(document.querySelector('#alert_message'), { - toolbar: { - items: [ - 'heading', - '|', - 'bold', - 'italic', - 'underline', - 'link', - 'bulletedList', - 'numberedList', - '|', - 'fontColor', - 'fontSize', - 'fontFamily', - '|', - 'indent', - 'outdent', - 'alignment', - '|', - 'horizontalLine', - 'insertTable', - '|', - 'undo', - 'redo', - '|' - ]}, - link: { - addTargetToExternalLinks: true, - defaultProtocol: "http://" + .create(document.querySelector('#alert_message'), { + toolbar: { + items: [ + 'heading', + '|', + 'bold', + 'italic', + 'underline', + 'link', + 'bulletedList', + 'numberedList', + '|', + 'fontColor', + 'fontSize', + 'fontFamily', + '|', + 'indent', + 'outdent', + 'alignment', + '|', + 'horizontalLine', + 'insertTable', + '|', + 'undo', + 'redo', + '|' + ] + }, + link: { + addTargetToExternalLinks: true, + defaultProtocol: "http://" - } - }) - .then(editor => { - $CKEditor = editor; - }) - .catch(error => { - console.error('CK-Editor error...'); - console.error(error); - }); + } + }) + .then(editor => { + $CKEditor = editor; + }) + .catch(error => { + console.error('CK-Editor error...'); + console.error(error); + }); // ------------ // Date Pickers // ------------ - $("#alert_starts_date").datepicker({format: "yyyy-mm-dd", + $("#alert_starts_date").datepicker({ + format: "yyyy-mm-dd", container: "div.starts-date", keyboardNavigation: false, autoclose: true, orientation: "bottom", todayBtn: "linked", - todayHighlight: true}); + todayHighlight: true + }); - $("#alert_expires_date").datepicker({format: "yyyy-mm-dd", + $("#alert_expires_date").datepicker({ + format: "yyyy-mm-dd", container: "div.expires-date", keyboardNavigation: false, autoclose: true, orientation: "bottom", todayBtn: "linked", - todayHighlight: true}); + todayHighlight: true + }); - $("#alert_starts_time").inputmask({alias: "datetime", + $("#alert_starts_time").inputmask({ + alias: "datetime", placeholder: "HH:MM", inputFormat: "HH:MM", insertMode: false, @@ -82,7 +88,8 @@ $(document).ready(function () { hourFormat: 24 }); - $("#alert_expires_time").inputmask({alias: "datetime", + $("#alert_expires_time").inputmask({ + alias: "datetime", placeholder: "HH:MM", inputFormat: "HH:MM", insertMode: false, @@ -146,11 +153,11 @@ $(document).ready(function () { $("#addAlert").submit(function (e) { var alert_title = $("#alert_title"), - alert_starts_date = $("#alert_starts_date"), - alert_starts_time = $("#alert_starts_time"), - alert_expires_date = $("#alert_expires_date"), - alert_expires_time = $("#alert_expires_time"), - alert_message = $("#alert_message"); + alert_starts_date = $("#alert_starts_date"), + alert_starts_time = $("#alert_starts_time"), + alert_expires_date = $("#alert_expires_date"), + alert_expires_time = $("#alert_expires_time"), + alert_message = $("#alert_message"); clearInputErrors(); @@ -197,10 +204,10 @@ $(document).ready(function () { return false; } -// if (isBlank(alert_message)) { -// createInputError(alert_message, "Please enter a Message"); -// return false; -// } + // if (isBlank(alert_message)) { + // createInputError(alert_message, "Please enter a Message"); + // return false; + // } if (!checkDateTime(alert_starts_date, alert_starts_time, alert_expires_date, alert_expires_time)) { createInputError(alert_expires_time, "Cannot be prior to Start"); @@ -213,15 +220,15 @@ $(document).ready(function () { $.post("./", $(this).serialize()) - .done(function () { + .done(function () { - $sessionStorage.action = $sessionStorage.addAlert || ""; + $sessionStorage.action = $sessionStorage.addAlert || ""; - sessionStorage.setItem($application, JSON.stringify($sessionStorage)); + sessionStorage.setItem($application, JSON.stringify($sessionStorage)); - formSubmit($sessionStorage); + formSubmit($sessionStorage); - }); + }); }); @@ -234,11 +241,11 @@ $(document).ready(function () { function checkDateTime(alert_starts_date, alert_starts_time, alert_expires_date, alert_expires_time) { var starts_date_parts = alert_starts_date.val().split("-"), - starts_time_parts = alert_starts_time.val().split(":"), - expires_date_parts = alert_expires_date.val().split("-"), - expires_time_parts = alert_expires_time.val().split(":"), - starts_date, - expires_date; + starts_time_parts = alert_starts_time.val().split(":"), + expires_date_parts = alert_expires_date.val().split("-"), + expires_time_parts = alert_expires_time.val().split(":"), + starts_date, + expires_date; starts_date = new Date(starts_date_parts[0], parseInt(starts_date_parts[1], 10) - 1, starts_date_parts[2]); expires_date = new Date(expires_date_parts[0], parseInt(expires_date_parts[1], 10) - 1, expires_date_parts[2]); diff --git a/js/searchPermitFacts.js b/js/searchPermitFacts.js index 41b8711..252b6a0 100644 --- a/js/searchPermitFacts.js +++ b/js/searchPermitFacts.js @@ -1,7 +1,7 @@ -// ========== -// Add County -// ========== +// =================== +// Search Permit Facts +// =================== $(document).ready(function () { @@ -246,7 +246,7 @@ $(document).ready(function () { $("#spinner-dialog").modal("show"); - $sessionStorage.action = "Export_PermitFactsToExcel.export"; + $sessionStorage.action = "Export_PermitFactsToCSV.export"; $sessionStorage.subscription_reference = $sessionStorage.subscription_serial; $sessionStorage.pagination = "off"; diff --git a/main.php b/main.php index cd08087..0fd4a6a 100644 --- a/main.php +++ b/main.php @@ -5,4 +5,3 @@ require_once "classes/Base.php"; session_start(); (new Base())->do(); -?> \ No newline at end of file diff --git a/xml/settings.xml b/xml/settings.xml index 55b85f4..3e1490e 100644 --- a/xml/settings.xml +++ b/xml/settings.xml @@ -1,21 +1,21 @@ - + DEC Data Repository - + - - 192.168.1.190 - + + + localhost realestatedatainc ddruser hype23decdr - + - - 192.168.1.190 - + + + localhost decweb decuser hype23dec @@ -28,22 +28,23 @@ 587 - - https://discordapp.com/api/webhooks/1396804024942198794/zdT2wisqhAZuZ_UPKmAmtV0z_rX-PZnyHIXsjpPHQO3uakBO2xQ3R44kOxb9QZ4QxebL + + + https://discordapp.com/api/webhooks/1396804024942198794/zdT2wisqhAZuZ_UPKmAmtV0z_rX-PZnyHIXsjpPHQO3uakBO2xQ3R44kOxb9QZ4QxebL james.richie@onesourceits.com allenf@bidalert.com Allan Feifer info@dec-international.com Customer Service - + D002116 DSYSADMIN - - Development - + + + Production Available \ No newline at end of file