From 554ce74784ddbb0d27535b686efcfff35be198f3 Mon Sep 17 00:00:00 2001 From: jprochazka Date: Thu, 22 Aug 2024 10:50:26 -0400 Subject: [PATCH] Removed old portal files. --- build/portal/html/acars.php | 32 --------- build/portal/html/classes/acars.class.php | 40 ----------- build/portal/html/install/upgrade-v2.8.5.php | 68 ------------------ build/portal/html/install/upgrade-v2.8.6.php | 72 ------------------- build/portal/html/templates/default/acars.tpl | 38 ---------- 5 files changed, 250 deletions(-) delete mode 100644 build/portal/html/acars.php delete mode 100644 build/portal/html/classes/acars.class.php delete mode 100644 build/portal/html/install/upgrade-v2.8.5.php delete mode 100644 build/portal/html/install/upgrade-v2.8.6.php delete mode 100644 build/portal/html/templates/default/acars.tpl diff --git a/build/portal/html/acars.php b/build/portal/html/acars.php deleted file mode 100644 index ae211c3..0000000 --- a/build/portal/html/acars.php +++ /dev/null @@ -1,32 +0,0 @@ -getAcarsMessageCount(); - - // Get most recent ACARS messages. - $messages = $acars->getAcarsMessages($items_per_page, ($items_per_page * $page)); - $pageData['acarsMessages'] = $messages; - - // Calculate the number of pagination links to show. - $pageData['pageLinks'] = ceil($message_count / $items_per_page); - - $template->display($pageData); -?> diff --git a/build/portal/html/classes/acars.class.php b/build/portal/html/classes/acars.class.php deleted file mode 100644 index 2b6083b..0000000 --- a/build/portal/html/classes/acars.class.php +++ /dev/null @@ -1,40 +0,0 @@ -getSetting('acarsserv_database'); - $dbh = new PDO($dsn, null, null, [PDO::SQLITE_ATTR_OPEN_FLAGS => PDO::SQLITE_OPEN_READONLY]); - $sql = "SELECT * FROM Messages JOIN Flights USING(FlightID) JOIN Stations USING(StID) ORDER BY LastTime DESC LIMIT :limit OFFSET :offset"; - $sth = $dbh->prepare($sql); - $sth->bindValue(':limit', $limit); - $sth->bindValue(':offset', $offset); - $sth->execute(); - $acarsMessages = $sth->fetchAll(PDO::FETCH_ASSOC); - $sth = NULL; - $dbh = NULL; - $dsn = NULL; - - return $acarsMessages; - } - - function getAcarsMessageCount() { - require_once($_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR."classes".DIRECTORY_SEPARATOR."common.class.php"); - $common = new common(); - - $dsn = "sqlite:".$common->getSetting('acarsserv_database'); - $dbh = new PDO($dsn, null, null, [PDO::SQLITE_ATTR_OPEN_FLAGS => PDO::SQLITE_OPEN_READONLY]); - $sql = "SELECT COUNT(*) FROM Messages"; - $sth = $dbh->prepare($sql); - $sth->execute(); - $number_of_rows = $sth->fetchColumn(); - $sth = NULL; - $dbh = NULL; - $dsn = NULL; - - return $number_of_rows; - } - } -?> diff --git a/build/portal/html/install/upgrade-v2.8.5.php b/build/portal/html/install/upgrade-v2.8.5.php deleted file mode 100644 index a06b018..0000000 --- a/build/portal/html/install/upgrade-v2.8.5.php +++ /dev/null @@ -1,68 +0,0 @@ -updateSetting("version", "2.8.5"); - $common->updateSetting("patch", ""); - - // The upgrade process completed successfully. - $results['success'] = TRUE; - $results['message'] = "Upgrade to v2.8.5 successful."; - return $results; - - } catch(Exception $e) { - // Something went wrong during this upgrade process. - $results['success'] = FALSE; - $results['message'] = $e->getMessage(); - return $results; - } - } -?> - diff --git a/build/portal/html/install/upgrade-v2.8.6.php b/build/portal/html/install/upgrade-v2.8.6.php deleted file mode 100644 index a5f9568..0000000 --- a/build/portal/html/install/upgrade-v2.8.6.php +++ /dev/null @@ -1,72 +0,0 @@ -addSetting('enableAcars', FALSE); - $common->addSetting('acarsserv_database', ""); - - // Update the version and patch settings - $common->updateSetting("version", "2.8.6"); - $common->updateSetting("patch", ""); - - // The upgrade process completed successfully - $results['success'] = TRUE; - $results['message'] = "Upgrade to v2.8.6 successful."; - return $results; - - } catch(Exception $e) { - // Something went wrong during this upgrade process - $results['success'] = FALSE; - $results['message'] = $e->getMessage(); - return $results; - } - } -?> - diff --git a/build/portal/html/templates/default/acars.tpl b/build/portal/html/templates/default/acars.tpl deleted file mode 100644 index e85e538..0000000 --- a/build/portal/html/templates/default/acars.tpl +++ /dev/null @@ -1,38 +0,0 @@ -{area:head/} -{area:contents} -
-

ACARS Messages

-
- {foreach page:acarsMessages as message} -

{message->FlightNumber}

-

- Aircarft Registration: {message->Registration}
- The first message was received on {message->StartTime} with the last seen {message->LastTime}.
- A total of {message->NbMessages} messages have been received by this flight. -

-
-
    -
  • Time: {message->Time}
  • -
  • Station ID: {message->IdStation}
  • -
  • Channel: {message->Channel}
  • -
  • Error: {message->Error}
  • -
  • Signal Level: {message->SignalLvl}
  • -
  • Mode: {message->Mode}
  • -
  • Ack: {message->Ack}
  • -
  • Label: {message->Label}
  • -
  • Block Number: {message->BlockNo}
  • -
  • Mesage Number: {message->MessNo}
  • -
  • Text: {message->Txt}
  • -
-
- {/foreach} - -
-{/area} -{area:scripts} - -{/area}