diff --git a/classes/Alerts.php b/classes/Alerts.php
index 04f2af4..2ba56bb 100644
--- a/classes/Alerts.php
+++ b/classes/Alerts.php
@@ -289,7 +289,7 @@ class Alerts extends Base {
$recordset = $statement->fetch(PDO::FETCH_ASSOC);
- $count = (count($recordset) > 0) ? (integer) $recordset["count"] : (integer) 0;
+ $count = (count($recordset) > 0) ? (int) $recordset["count"] : (int) 0;
// Pagination
diff --git a/classes/Base.php b/classes/Base.php
index ce73d21..3db1b2f 100644
--- a/classes/Base.php
+++ b/classes/Base.php
@@ -583,7 +583,7 @@ class Base {
public function getZipcode($zip_code = 0) {
$zip_code = filter_input(INPUT_POST, "zip_code", FILTER_SANITIZE_NUMBER_INT) ?: 0;
- $zip_code = (integer) substr((string) $zip_code, 0, 5);
+ $zip_code = (int) substr((string) $zip_code, 0, 5);
$zipCodeDetail = null;
diff --git a/classes/BusinessFacts.php b/classes/BusinessFacts.php
new file mode 100644
index 0000000..160c5b3
--- /dev/null
+++ b/classes/BusinessFacts.php
@@ -0,0 +1,470 @@
+current_user_id = $_SESSION[self::USER_ID] ?? "";
+ $this->current_user_name = $_SESSION[self::USER_NAME] ?? "";
+ $this->current_user_email = $_SESSION[self::USER_EMAIL] ?? "";
+
+ $this->pagination_page = $_SESSION[self::PAGINATION_PAGE] ?? 1;
+ }
+
+ // =====================
+ // Manage Business Facts
+ // =====================
+
+ public function manageBusinessFacts() {
+
+ $businessfacts = $this->getBusinessFactsPage();
+ $popovers = (new Popovers())->getPopovers();
+
+ $XML = $this->mergeXML($businessfacts, "");
+ $XML = $this->mergeXML($popovers, $XML);
+
+ $content = $this->applyXSL($XML, $this->getXSL("manageBusinessFacts"));
+
+ $this->displayContent($content);
+ }
+
+ // =====================
+ // Business Fact Summary
+ // =====================
+
+ public function businessfactSummary() {
+
+ $businessfact_serial = filter_input(INPUT_POST, "businessfact_serial", FILTER_SANITIZE_NUMBER_INT) ?: 0;
+
+ $businessfact = $this->getBusinessFact($businessfact_serial);
+
+ if ($businessfact->count() == 0) {
+ $this->logError("Invalid Business Fact ({$businessfact_serial}). " . __METHOD__);
+ }
+
+ $businessfactemployees = $this->getBusinessFactEmployees($businessfact_serial);
+ $businessfactmaterials = $this->getBusinessFactMaterials($businessfact_serial);
+ $businessfactnotes = $this->getBusinessFactNotes($businessfact_serial);
+ $attachments = (new Attachments())->getAttachments("BusinessFacts", $businessfact_serial);
+
+ $XML = $this->mergeXML($businessfact, "");
+ $XML = $this->mergeXML($businessfactemployees, $XML);
+ $XML = $this->mergeXML($businessfactmaterials, $XML);
+ $XML = $this->mergeXML($businessfactnotes, $XML);
+ $XML = $this->mergeXML($attachments, $XML);
+
+ $content = $this->applyXSL($XML, $this->getXSL("businessfactSummary"));
+
+ $this->displayContent($content);
+ }
+
+ // ===============
+ // Add Business Fact
+ // ===============
+
+ public function addBusinessFact() {
+
+ $step = filter_input(INPUT_POST, "step") ?: "prompt";
+
+ switch ($step) {
+
+ case "prompt":
+
+ $constants = $this->getConstants();
+ $dropdowns = (new Dropdowns())->getDropdowns();
+ $counties = (new Counties())->getCounties();
+ $cities = (new Cities())->getCities();
+
+ $XML = $this->mergeXML($dropdowns, "");
+ $XML = $this->mergeXML($counties, $XML);
+ $XML = $this->mergeXML($cities, $XML);
+ $XML = $this->mergeXML($constants, $XML);
+
+ $content = $this->applyXSL($XML, $this->getXSL("addBusinessFact"));
+
+ $this->displayContent($content);
+
+ break;
+
+ case "add":
+
+ $businessfact_business_number = filter_input(INPUT_POST, "businessfact_business_number") ?: "";
+ $businessfact_project_name = filter_input(INPUT_POST, "businessfact_project_name") ?: "";
+ $businessfact_parcel_number = filter_input(INPUT_POST, "businessfact_parcel_number") ?: "";
+ $businessfact_project_type = filter_input(INPUT_POST, "businessfact_project_type", FILTER_SANITIZE_NUMBER_INT) ?: 0;
+ $businessfact_business_date = filter_input(INPUT_POST, "businessfact_business_date") ?: "";
+ $businessfact_county_code = filter_input(INPUT_POST, "businessfact_county_code", FILTER_SANITIZE_NUMBER_INT) ?: 0;
+ $businessfact_subdivision = filter_input(INPUT_POST, "businessfact_subdivision") ?: "";
+ $businessfact_project_address = filter_input(INPUT_POST, "businessfact_project_address") ?: "";
+ $businessfact_project_city = filter_input(INPUT_POST, "businessfact_project_city") ?: "";
+ $businessfact_project_state = filter_input(INPUT_POST, "businessfact_project_state") ?: "";
+ $businessfact_project_zipcode = filter_input(INPUT_POST, "businessfact_project_zipcode", FILTER_SANITIZE_NUMBER_INT) ?: 0;
+ $businessfact_size = filter_input(INPUT_POST, "businessfact_size", FILTER_SANITIZE_NUMBER_INT) ?: 0;
+ $businessfact_value = filter_input(INPUT_POST, "businessfact_value", FILTER_VALIDATE_FLOAT) ?: 0.00;
+ $businessfact_work_type = filter_input(INPUT_POST, "businessfact_work_type", FILTER_SANITIZE_NUMBER_INT) ?: 0;
+ $businessfact_building_type = filter_input(INPUT_POST, "businessfact_building_type", FILTER_SANITIZE_NUMBER_INT) ?: 0;
+ $businessfact_lotblock = filter_input(INPUT_POST, "businessfact_lotblock", FILTER_SANITIZE_NUMBER_INT) ?: 0;
+ $businessfact_districtlandlot = filter_input(INPUT_POST, "businessfact_districtlandlot", FILTER_SANITIZE_NUMBER_INT) ?: 0;
+ $businessfact_units = filter_input(INPUT_POST, "businessfact_units", FILTER_SANITIZE_NUMBER_INT) ?: 0;
+
+ // Format Dates
+
+ $businessfact_business_date = ($businessfact_business_date == "") ? null : date("Y-m-d", strtotime($businessfact_business_date));
+
+ $businessfact_subdivision = (new Subdivisions())->getSubdivisionByName($businessfact_subdivision)->subdivision_serial;
+
+ $SQL = "insert into businessfacts
+
+ ( businessfact_business_number,
+ businessfact_project_name,
+ businessfact_parcel_number,
+ businessfact_project_type,
+ businessfact_business_date,
+ businessfact_county_code,
+ businessfact_subdivision,
+ businessfact_project_address,
+ businessfact_project_city,
+ businessfact_project_state,
+ businessfact_project_zipcode,
+ businessfact_size,
+ businessfact_value,
+ businessfact_work_type,
+ businessfact_building_type,
+ businessfact_lotblock,
+ businessfact_districtlandlot,
+ businessfact_units,
+ businessfact_created,
+ businessfact_created_user )
+
+ values ( :businessfact_business_number,
+ :businessfact_project_name,
+ :businessfact_parcel_number,
+ :businessfact_project_type,
+ :businessfact_business_date,
+ :businessfact_county_code,
+ :businessfact_subdivision,
+ :businessfact_project_address,
+ :businessfact_project_city,
+ :businessfact_project_state,
+ :businessfact_project_zipcode,
+ :businessfact_size,
+ :businessfact_value,
+ :businessfact_work_type,
+ :businessfact_building_type,
+ :businessfact_lotblock,
+ :businessfact_districtlandlot,
+ :businessfact_units,
+ :businessfact_created,
+ :businessfact_created_user )";
+
+ $connection = $this->connect();
+ $statement = $connection->prepare($SQL);
+
+ $statement->bindValue(":businessfact_business_number", $businessfact_business_number);
+ $statement->bindValue(":businessfact_project_name", $businessfact_project_name);
+ $statement->bindValue(":businessfact_parcel_number", $businessfact_parcel_number);
+ $statement->bindValue(":businessfact_project_type", $businessfact_project_type);
+ $statement->bindValue(":businessfact_business_date", $businessfact_business_date);
+ $statement->bindValue(":businessfact_county_code", $businessfact_county_code);
+ $statement->bindValue(":businessfact_subdivision", $businessfact_subdivision);
+ $statement->bindValue(":businessfact_project_address", $businessfact_project_address);
+ $statement->bindValue(":businessfact_project_city", $businessfact_project_city);
+ $statement->bindValue(":businessfact_project_state", $businessfact_project_state);
+ $statement->bindValue(":businessfact_project_zipcode", $businessfact_project_zipcode);
+ $statement->bindValue(":businessfact_size", $businessfact_size);
+ $statement->bindValue(":businessfact_value", $businessfact_value);
+ $statement->bindValue(":businessfact_work_type", $businessfact_work_type);
+ $statement->bindValue(":businessfact_building_type", $businessfact_building_type);
+ $statement->bindValue(":businessfact_lotblock", $businessfact_lotblock);
+ $statement->bindValue(":businessfact_districtlandlot", $businessfact_districtlandlot);
+ $statement->bindValue(":businessfact_units", $businessfact_units);
+ $statement->bindValue(":businessfact_created", $this->getTimestamp());
+ $statement->bindValue(":businessfact_created_user", $this->current_user_name);
+
+ $statement->execute();
+
+ break;
+
+ default:
+
+ $this->displayHome();
+ }
+ }
+
+ // ================
+ // Edit Business Fact
+ // ================
+
+ public function editBusinessFact() {
+
+ $step = filter_input(INPUT_POST, "step") ?: "prompt";
+
+ switch ($step) {
+
+ case "prompt":
+
+ $businessfact_serial = filter_input(INPUT_POST, "businessfact_serial", FILTER_SANITIZE_NUMBER_INT) ?: 0;
+
+ $businessfact = $this->getBusinessFact($businessfact_serial);
+
+ if ($businessfact->count() == 0) {
+ $this->logError("Invalid Business Fact ({$businessfact_serial}). " . __METHOD__);
+ }
+
+ $constants = $this->getConstants();
+ $dropdowns = (new Dropdowns())->getDropdowns();
+ $counties = (new Counties())->getCounties();
+ $cities = (new Cities())->getCities();
+
+ $XML = $this->mergeXML($businessfact, "");
+ $XML = $this->mergeXML($dropdowns, $XML);
+ $XML = $this->mergeXML($counties, $XML);
+ $XML = $this->mergeXML($cities, $XML);
+ $XML = $this->mergeXML($constants, $XML);
+
+ $content = $this->applyXSL($XML, $this->getXSL("editBusinessFact"));
+
+ $this->displayContent($content);
+
+ break;
+
+ case "update":
+
+ $businessfact_serial = filter_input(INPUT_POST, "businessfact_serial", FILTER_SANITIZE_NUMBER_INT) ?: 0;
+ $businessfact_requestor = filter_input(INPUT_POST, "businessfact_requestor") ?: "";
+ $businessfact_requestor_address = filter_input(INPUT_POST, "businessfact_requestor_address") ?: "";
+ $businessfact_requestor_phone = filter_input(INPUT_POST, "businessfact_requestor_phone") ?: "";
+ $businessfact_requestor_email = filter_input(INPUT_POST, "businessfact_requestor_email") ?: "";
+ $businessfact_requestor_callback = filter_input(INPUT_POST, "businessfact_requestor_callback", FILTER_VALIDATE_BOOLEAN) ?: false;
+ $businessfact_worktype = filter_input(INPUT_POST, "businessfact_worktype", FILTER_SANITIZE_NUMBER_INT) ?: 0;
+ $businessfact_priority = filter_input(INPUT_POST, "businessfact_priority", FILTER_SANITIZE_NUMBER_INT) ?: 0;
+ $businessfact_facility = filter_input(INPUT_POST, "businessfact_facility", FILTER_SANITIZE_NUMBER_INT) ?: 0;
+ $businessfact_department = filter_input(INPUT_POST, "businessfact_department", FILTER_SANITIZE_NUMBER_INT) ?: 0;
+ $businessfact_employee = filter_input(INPUT_POST, "businessfact_employee", FILTER_SANITIZE_NUMBER_INT) ?: 0;
+ $businessfact_status = filter_input(INPUT_POST, "businessfact_status", FILTER_SANITIZE_NUMBER_INT) ?: 0;
+ $businessfact_fema = filter_input(INPUT_POST, "businessfact_fema", FILTER_SANITIZE_NUMBER_INT) ?: 0;
+ $businessfact_location = filter_input(INPUT_POST, "businessfact_location") ?: "";
+ $businessfact_description = filter_input(INPUT_POST, "businessfact_description") ?: "";
+ $businessfact_completed = filter_input(INPUT_POST, "businessfact_completed") ?: "";
+
+ // Format Dates
+
+ $businessfact_completed = ($businessfact_completed == "") ? null : date("Y-m-d", strtotime($businessfact_completed));
+
+ // Convert 0 to null for Foreign Keys
+
+ $businessfact_worktype = ($businessfact_worktype !== 0) ? $businessfact_worktype : null;
+ $businessfact_priority = ($businessfact_priority !== 0) ? $businessfact_priority : null;
+ $businessfact_facility = ($businessfact_facility !== 0) ? $businessfact_facility : null;
+ $businessfact_department = ($businessfact_department !== 0) ? $businessfact_department : null;
+ $businessfact_employee = ($businessfact_employee !== 0) ? $businessfact_employee : null;
+ $businessfact_status = ($businessfact_status !== 0) ? $businessfact_status : null;
+ $businessfact_fema = ($businessfact_fema !== 0) ? $businessfact_fema : null;
+
+ // Verify the Business Fact
+
+ $businessfact = $this->getBusinessFact($businessfact_serial);
+
+ if ($businessfact->count() == 0) {
+ $this->logError("Invalid Business Fact ({$businessfact_serial}). " . __METHOD__);
+ }
+
+ // Update the Business Fact
+
+ $SQL = "update businessfacts
+ set businessfact_requestor = :businessfact_requestor,
+ businessfact_requestor_address = :businessfact_requestor_address,
+ businessfact_requestor_phone = :businessfact_requestor_phone,
+ businessfact_requestor_email = :businessfact_requestor_email,
+ businessfact_requestor_callback = :businessfact_requestor_callback,
+ businessfact_worktype = :businessfact_worktype,
+ businessfact_priority = :businessfact_priority,
+ businessfact_facility = :businessfact_facility,
+ businessfact_department = :businessfact_department,
+ businessfact_employee = :businessfact_employee,
+ businessfact_status = :businessfact_status,
+ businessfact_fema = :businessfact_fema,
+ businessfact_location = :businessfact_location,
+ businessfact_description = :businessfact_description,
+ businessfact_completed = :businessfact_completed,
+ businessfact_origin = :businessfact_origin
+ where businessfact_serial = :businessfact_serial";
+
+ $statement = $this->connect()->prepare($SQL);
+
+ $statement->bindValue(":businessfact_serial", $businessfact_serial);
+ $statement->bindValue(":businessfact_requestor", $businessfact_requestor);
+ $statement->bindValue(":businessfact_requestor_address", $businessfact_requestor_address);
+ $statement->bindValue(":businessfact_requestor_phone", $businessfact_requestor_phone);
+ $statement->bindValue(":businessfact_requestor_email", $businessfact_requestor_email);
+ $statement->bindValue(":businessfact_requestor_callback", $businessfact_requestor_callback, PDO::PARAM_BOOL);
+ $statement->bindValue(":businessfact_worktype", $businessfact_worktype);
+ $statement->bindValue(":businessfact_priority", $businessfact_priority);
+ $statement->bindValue(":businessfact_facility", $businessfact_facility);
+ $statement->bindValue(":businessfact_department", $businessfact_department);
+ $statement->bindValue(":businessfact_employee", $businessfact_employee);
+ $statement->bindValue(":businessfact_status", $businessfact_status);
+ $statement->bindValue(":businessfact_fema", $businessfact_fema);
+ $statement->bindValue(":businessfact_location", $businessfact_location);
+ $statement->bindValue(":businessfact_description", $businessfact_description);
+ $statement->bindValue(":businessfact_completed", $businessfact_completed);
+ $statement->bindValue(":businessfact_origin", $this->current_user_name);
+
+ $statement->execute();
+
+ break;
+
+ default:
+
+ $this->displayHome();
+ }
+ }
+
+ // ===========================
+ // Return a Business Fact Object
+ // ===========================
+
+ public function getBusinessFact($businessfact_serial = 0) {
+
+ $SQL = "select view_businessfacts.*
+ from view_businessfacts
+ where businessfact_serial = {$businessfact_serial}";
+
+ return $this->getTable("businessfacts", $SQL);
+ }
+
+ // =================================
+ // Return a Business Facts Page Object
+ // =================================
+
+ public function getBusinessFactsPage() {
+
+ // Find Criteria
+
+ $find_businessfact = filter_input(INPUT_POST, "find_businessfact") ?: "";
+ $businessfact_released = filter_input(INPUT_POST, "businessfact_released") ?: "true";
+
+ $this->pagination_size = filter_input(INPUT_POST, "businessfacts_per_page", FILTER_SANITIZE_NUMBER_INT) ?: $this->pagination_size;
+
+ $businessfacts_order_by = filter_input(INPUT_POST, "businessfacts_order_by") ?: "";
+ $businessfacts_order_direction = filter_input(INPUT_POST, "businessfacts_order_direction") ?: "";
+
+ if ($businessfacts_order_by === "") {
+ $orderby = "businessfact_entry_date asc";
+ } else {
+ $orderby = $businessfacts_order_by . " " . $businessfacts_order_direction;
+ }
+
+ $find_businessfact = $this->sanitizeString($find_businessfact);
+
+ $businessfact_released = ($businessfact_released == "true") ? 1 : 0;
+
+ $find_words = implode("|", explode(" ", $find_businessfact));
+
+ // Record Count
+
+ $connection = $this->connect();
+
+ $SQL = "select count(*) as count
+ from view_businessfacts
+ where (businessfact_business_number regexp :businessfact_business_number
+ or businessfact_project_name regexp :businessfact_project_name
+ or businessfact_business_date regexp :businessfact_business_date
+ or businessfact_entry_date regexp :businessfact_entry_date
+ or businessfact_project_address regexp :businessfact_project_address )
+ and businessfact_released = {$businessfact_released} ";
+
+ $statement = $connection->prepare($SQL);
+
+ $statement->bindValue(":businessfact_business_number", $find_words);
+ $statement->bindValue(":businessfact_project_name", $find_words);
+ $statement->bindValue(":businessfact_business_date", $find_words);
+ $statement->bindValue(":businessfact_entry_date", $find_words);
+ $statement->bindValue(":businessfact_project_address", $find_words);
+
+ $statement->execute();
+
+ $recordset = $statement->fetch(PDO::FETCH_ASSOC);
+
+ $count = (count($recordset) > 0) ? (int) $recordset["count"] : (int) 0;
+
+ // Pagination
+
+ $pagination = filter_input(INPUT_POST, "pagination") ?: "";
+
+ switch ($pagination) {
+
+ case "first" : $this->pagination_page = 1;
+ break;
+ case "previous" : $this->pagination_page = max(($this->pagination_page - 1), 1);
+ break;
+ case "next" : $this->pagination_page = ($this->pagination_page + 1);
+ break;
+ case "last" : $this->pagination_page = ($count / $this->pagination_size);
+ break;
+ }
+
+ $offset = (($this->pagination_page * $this->pagination_size) - $this->pagination_size);
+ $start = ($offset + 1);
+ $end = min($count, (($start + $this->pagination_size) - 1));
+
+ // Data
+
+ $SQL = "select view_businessfacts.*
+ from view_businessfacts
+ where (businessfact_business_number regexp :businessfact_business_number
+ or businessfact_project_name regexp :businessfact_project_name
+ or businessfact_business_date regexp :businessfact_business_date
+ or businessfact_entry_date regexp :businessfact_entry_date
+ or businessfact_project_address regexp :businessfact_project_address )
+ and businessfact_released = {$businessfact_released}
+ order by {$orderby}
+ limit {$this->pagination_size}
+ offset {$offset}";
+
+ $statement = $connection->prepare($SQL);
+
+ $statement->bindValue(":businessfact_business_number", $find_words);
+ $statement->bindValue(":businessfact_project_name", $find_words);
+ $statement->bindValue(":businessfact_business_date", $find_words);
+ $statement->bindValue(":businessfact_entry_date", $find_words);
+ $statement->bindValue(":businessfact_project_address", $find_words);
+
+ $statement->execute();
+
+ $businessfacts = $this->getTableXML("businessfacts", $statement);
+
+ // Insert Pagination Attributes
+
+ $businessfacts->addAttribute("count", $count);
+ $businessfacts->addAttribute("start", $start);
+ $businessfacts->addAttribute("end", $end);
+ $businessfacts->addAttribute("page", $this->pagination_page);
+
+ $_SESSION[self::PAGINATION_PAGE] = $this->pagination_page;
+
+ return $businessfacts;
+ }
+}
+
+?>
diff --git a/classes/Dropdowns.php b/classes/Dropdowns.php
index d44a646..2c0cb5f 100644
--- a/classes/Dropdowns.php
+++ b/classes/Dropdowns.php
@@ -341,7 +341,7 @@ class Dropdowns extends Base {
public function dropdowntypeActive() {
- $dropdowntype_serial = (integer) filter_input(INPUT_POST, "dropdowntype_serial", FILTER_SANITIZE_NUMBER_INT) ?: 0;
+ $dropdowntype_serial = (int) filter_input(INPUT_POST, "dropdowntype_serial", FILTER_SANITIZE_NUMBER_INT) ?: 0;
$SQL = "select dropdown_serial
from view_dropdowns
@@ -587,7 +587,7 @@ class Dropdowns extends Base {
$recordset = $statement->fetch(PDO::FETCH_ASSOC);
- $count = (count($recordset) > 0) ? (integer) $recordset["count"] : (integer) 0;
+ $count = (count($recordset) > 0) ? (int) $recordset["count"] : (int) 0;
// Pagination
diff --git a/classes/Journal.php b/classes/Journal.php
index 8ec1b93..2d58341 100644
--- a/classes/Journal.php
+++ b/classes/Journal.php
@@ -100,7 +100,7 @@ class Journal extends Base {
$recordset = $statement->fetch(PDO::FETCH_ASSOC);
- $count = (count($recordset) > 0) ? (integer) $recordset["count"] : (integer) 0;
+ $count = (count($recordset) > 0) ? (int) $recordset["count"] : (int) 0;
// Pagination
diff --git a/classes/Popovers.php b/classes/Popovers.php
index a37d247..ef1ed82 100644
--- a/classes/Popovers.php
+++ b/classes/Popovers.php
@@ -253,7 +253,7 @@ class Popovers extends Base {
$recordset = $statement->fetch(PDO::FETCH_ASSOC);
- $count = (count($recordset) > 0) ? (integer) $recordset["count"] : (integer) 0;
+ $count = (count($recordset) > 0) ? (int) $recordset["count"] : (int) 0;
// Pagination
diff --git a/classes/Reports.php b/classes/Reports.php
index a9900a5..bd0195f 100644
--- a/classes/Reports.php
+++ b/classes/Reports.php
@@ -215,7 +215,7 @@ class Reports extends Base {
$reports = $this->getTable("reports", $SQL);
- return (integer) ($reports->record->report_serial ?? 0);
+ return (int) ($reports->record->report_serial ?? 0);
}
// =======================
@@ -268,7 +268,7 @@ class Reports extends Base {
$recordset = $statement->fetch(PDO::FETCH_ASSOC);
- $count = (count($recordset) > 0) ? (integer) $recordset["count"] : (integer) 0;
+ $count = (count($recordset) > 0) ? (int) $recordset["count"] : (int) 0;
// Pagination
@@ -357,7 +357,7 @@ class Reports extends Base {
$recordset = $statement->fetch(PDO::FETCH_ASSOC);
- $count = (count($recordset) > 0) ? (integer) $recordset["count"] : (integer) 0;
+ $count = (count($recordset) > 0) ? (int) $recordset["count"] : (int) 0;
// Pagination
diff --git a/classes/SignIn.php b/classes/SignIn.php
index ff69e4e..dbdcca5 100644
--- a/classes/SignIn.php
+++ b/classes/SignIn.php
@@ -63,7 +63,7 @@ class SignIn extends Base {
die();
}
- if ((integer) $user->record->user_active === 0) {
+ if ((int) $user->record->user_active === 0) {
echo $this->applyXSL("", $this->getXSL("signIn"), $XSLParms);
die();
}
@@ -79,7 +79,7 @@ class SignIn extends Base {
session_regenerate_id(true);
$_SESSION[self::USER_AUTHENTICATED] = true;
- $_SESSION[self::USER_SERIAL] = (integer) $user->record->user_serial;
+ $_SESSION[self::USER_SERIAL] = (int) $user->record->user_serial;
$_SESSION[self::USER_ID] = (string) $user->record->user_id;
$_SESSION[self::USER_NAME] = (string) $user->record->user_name;
$_SESSION[self::USER_EMAIL] = (string) $user->record->user_email;
diff --git a/classes/Statuses.php b/classes/Statuses.php
index f555b8c..ab4c499 100644
--- a/classes/Statuses.php
+++ b/classes/Statuses.php
@@ -310,7 +310,7 @@ class Statuses extends Base {
$recordset = $statement->fetch(PDO::FETCH_ASSOC);
- $count = (count($recordset) > 0) ? (integer) $recordset["count"] : (integer) 0;
+ $count = (count($recordset) > 0) ? (int) $recordset["count"] : (int) 0;
// Pagination
diff --git a/classes/Subscriptions.php b/classes/Subscriptions.php
index 0c4570e..2274426 100644
--- a/classes/Subscriptions.php
+++ b/classes/Subscriptions.php
@@ -52,7 +52,7 @@ class Subscriptions extends Base {
public function goToSubscription($subscription_serial = 0) {
- $subscription_serial = (integer) filter_input(INPUT_POST, "subscription_serial", FILTER_SANITIZE_NUMBER_INT) ?: 0;
+ $subscription_serial = (int) filter_input(INPUT_POST, "subscription_serial", FILTER_SANITIZE_NUMBER_INT) ?: 0;
$subscription = $this->getSubscription($subscription_serial);
@@ -226,7 +226,7 @@ class Subscriptions extends Base {
case "prompt":
- $subscription_serial = (integer) filter_input(INPUT_POST, "subscription_serial", FILTER_SANITIZE_NUMBER_INT) ?: 0;
+ $subscription_serial = (int) filter_input(INPUT_POST, "subscription_serial", FILTER_SANITIZE_NUMBER_INT) ?: 0;
$subscription = $this->getSubscription($subscription_serial);
@@ -529,7 +529,7 @@ class Subscriptions extends Base {
$recordset = $statement->fetch(PDO::FETCH_ASSOC);
- $count = (count($recordset) > 0) ? (integer) $recordset["count"] : (integer) 0;
+ $count = (count($recordset) > 0) ? (int) $recordset["count"] : (int) 0;
// Pagination
diff --git a/classes/Users.php b/classes/Users.php
index 98cd707..12f020d 100644
--- a/classes/Users.php
+++ b/classes/Users.php
@@ -111,8 +111,8 @@ class Users extends Base {
$user_random_password = $this->generateRandomPassword();
$user_temp_password = password_hash($user_random_password, PASSWORD_DEFAULT);
- $user_change_password = (boolean) true;
- $user_active = (boolean) true;
+ $user_change_password = (bool) true;
+ $user_active = (bool) true;
// Add the User
@@ -202,7 +202,7 @@ class Users extends Base {
case "prompt":
- $user_serial = (integer) filter_input(INPUT_POST, "user_serial", FILTER_SANITIZE_NUMBER_INT) ?: 0;
+ $user_serial = (int) filter_input(INPUT_POST, "user_serial", FILTER_SANITIZE_NUMBER_INT) ?: 0;
$user = $this->getUser($user_serial);
@@ -305,7 +305,7 @@ class Users extends Base {
$users = $this->getUserByUserId($user_id);
- return ($users->count() === 0) ? 0 : (integer) $users->record->user_serial;
+ return ($users->count() === 0) ? 0 : (int) $users->record->user_serial;
}
// =====================
@@ -354,7 +354,7 @@ class Users extends Base {
$recordset = $statement->fetch(PDO::FETCH_ASSOC);
- $count = (count($recordset) > 0) ? (integer) $recordset["count"] : (integer) 0;
+ $count = (count($recordset) > 0) ? (int) $recordset["count"] : (int) 0;
// Pagination
@@ -469,7 +469,7 @@ class Users extends Base {
public function userActive() {
- $user_serial = (integer) filter_input(INPUT_POST, "user_serial", FILTER_SANITIZE_NUMBER_INT) ?: 0;
+ $user_serial = (int) filter_input(INPUT_POST, "user_serial", FILTER_SANITIZE_NUMBER_INT) ?: 0;
$SQL = "select request_serial
from requests
diff --git a/js/content.js b/js/content.js
index 414b573..75f57dd 100644
--- a/js/content.js
+++ b/js/content.js
@@ -1,3 +1,4 @@
+
// ============
// Content Page
// ============