Skip to content
Closed

Develop #1152

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
145 commits
Select commit Hold shift + click to select a range
5bf009f
Add changelog
Dec 30, 2024
df19709
Move cron scripts
Dec 30, 2024
fd2339e
Merge pull request #1135 from itflow-org/add-changelog
wrongecho Dec 30, 2024
bf53d5b
Also move setup and update cli to scripts folder for better organisation
Dec 31, 2024
c7b0f12
Update test.md
wrongecho Dec 31, 2024
3b0d24f
Delete test.md
wrongecho Dec 31, 2024
db6d2fb
Move cron scripts
Jan 2, 2025
f39b0eb
Tidying per sonar recommendations
Jan 2, 2025
2d40341
Tidying per sonar recommendations
Jan 2, 2025
740f477
Merge pull request #1136 from itflow-org/cron-scripts-move
wrongecho Jan 2, 2025
ee49c2c
Update CHANGELOG.md
wrongecho Jan 2, 2025
5037155
Adjust cron/cli scripts in subdir to load required scripts from parent
Jan 2, 2025
7ebac0a
Sonar recommendations
Jan 2, 2025
942004a
Merge pull request #1137 from itflow-org/cron-scripts-move
wrongecho Jan 2, 2025
a529eca
db.sql also needs to be called from the parent directory
Jan 2, 2025
04def2e
Merge pull request #1138 from itflow-org/cron-scripts-move
wrongecho Jan 2, 2025
b0a9605
config.php has to be written to parent dir
Jan 2, 2025
c2f82bb
Merge pull request #1139 from itflow-org/cron-scripts-move
wrongecho Jan 2, 2025
ff4f8a9
uploads have to be written to parent dir
Jan 2, 2025
4167381
Merge pull request #1140 from itflow-org/cron-scripts-move
wrongecho Jan 2, 2025
43ccf8a
config.php has to be written to parent dir
Jan 2, 2025
e677d5f
Merge pull request #1141 from itflow-org/cron-scripts-move
wrongecho Jan 2, 2025
afc0363
Tidy old debug message
Jan 2, 2025
2dad616
Merge pull request #1142 from itflow-org/cron-scripts-move
wrongecho Jan 2, 2025
cb2f620
Bugfix: Ticket edit modal not showing multi-client/no-client projects
Jan 2, 2025
65873eb
Bugfix: Ticket edit modal not showing multi-client/no-client projects
Jan 2, 2025
87f0cb2
Merge pull request #1143 from itflow-org/bug-tickets-projects
wrongecho Jan 2, 2025
b0d3986
Bugfix: Asset interface DHCP vanishing
Jan 2, 2025
5d734e5
Merge pull request #1144 from itflow-org/bug-asset-network
wrongecho Jan 2, 2025
3e52155
Fix editing recurring expense due to bad var name
johnnyq Jan 3, 2025
bc417b7
Fix creating a recurring expense due to bad var name
johnnyq Jan 3, 2025
3c69761
Update README.md
wrongecho Jan 8, 2025
d32e3a6
Stripe payments - Account selection
Jan 9, 2025
2f57bdb
Merge pull request #1145 from itflow-org/stripe-account-ui
wrongecho Jan 9, 2025
1e777af
Stripe payments - Account selection
Jan 9, 2025
77b3eca
Merge pull request #1146 from itflow-org/stripe-account-ui
wrongecho Jan 9, 2025
fe94036
Implement new admin check
Jan 9, 2025
9845991
Merge pull request #1147 from itflow-org/new-admin-check
wrongecho Jan 9, 2025
e8c7b36
Tweak docs link
Jan 9, 2025
0871833
Merge branch 'develop' of https://github.com/itflow-org/itflow into d…
Jan 9, 2025
cf511b2
Update CHANGELOG.md
wrongecho Jan 9, 2025
d3d3d37
Show git branch on debug page
Jan 9, 2025
ec54b28
Merge branch 'develop' of https://github.com/itflow-org/itflow into d…
Jan 9, 2025
a67de7a
Prevent post pages being accessed directly
Jan 9, 2025
90e5398
Credential add modal - URI placeholder text was off
Jan 9, 2025
64fd761
Don't require a contact for recurring tickets
Jan 9, 2025
22d1a18
Tickets created via portal/email not being marked as billable
Jan 9, 2025
50e252e
Mail queue - fix file inclusion following move to subdir
Jan 9, 2025
8914f4a
Mail parser - fix billable
Jan 9, 2025
73c7110
Mail queue - undo file inclusion, not a fix
Jan 9, 2025
12d8894
Mail queue - duh, it actually sees to be a fix..
Jan 9, 2025
7bd47b1
All cron scripts should set the running directory for consistency
Jan 9, 2025
69fb9f6
Created modals and includes folder moved client contact modals to /mo…
johnnyq Jan 11, 2025
a917946
Moved client location modals inside /modals and updated the require l…
johnnyq Jan 11, 2025
5baae71
Auto-acknowledgement email for email parsed tickets now contains gues…
Jan 11, 2025
2ca9274
mv
Jan 11, 2025
98f9083
Structure rework: Moved most php files that are included to /includes…
johnnyq Jan 11, 2025
08b91ea
Merge branch 'develop' of github.com:itflow-org/itflow into develop
johnnyq Jan 11, 2025
25e7ed6
Guest ticket feedback now shows friendly ticket prefix & number
Jan 11, 2025
677823d
Merge branch 'develop' of https://github.com/itflow-org/itflow into d…
Jan 11, 2025
7a23cf2
Fix index.php, Move Guest files to /Guest directory, fix adminlte path
johnnyq Jan 11, 2025
d29aa55
Merge branch 'develop' of github.com:itflow-org/itflow into develop
johnnyq Jan 11, 2025
cc0b456
Update all email content links to use the /guest directory now for ti…
johnnyq Jan 11, 2025
ae7b7d1
Update AdminLTE CSS/JS links in client Portal's login, login_reset an…
johnnyq Jan 11, 2025
2b07b03
Update URLs for guest being in subdir
Jan 11, 2025
731927d
Allow archiving roles
Jan 11, 2025
5b2b3d2
Add index.php in /guest to redirect to the portal
johnnyq Jan 11, 2025
d57caed
tidy
johnnyq Jan 11, 2025
2c6b1a8
Fix portal confirm modal include
Jan 12, 2025
e7f19dc
Fix portal invoices
Jan 12, 2025
0cb3cdc
Moved all modals into /modals and updated all require links
johnnyq Jan 12, 2025
a15081a
Initial add Stripe Auto-payment with saved card
Jan 12, 2025
cd374b7
Initial add Stripe Auto-payment with saved card
Jan 12, 2025
f153ae8
Initial add Stripe Auto-payment with saved card
Jan 12, 2025
b72c3f2
Initial add Stripe Auto-payment with saved card
Jan 12, 2025
2693bbf
Initial add Stripe Auto-payment with saved card
Jan 13, 2025
97723da
Windows/Tab Titles now reflect the current page your on along with th…
johnnyq Jan 13, 2025
701df8d
Update Changelog
johnnyq Jan 13, 2025
88c1b8c
Initial add Stripe Auto-payment with saved card
Jan 13, 2025
9a36ad2
Initial add Stripe Auto-payment with saved card
Jan 14, 2025
54dde98
nullable_htmlentities - prevent Passing null to parameter error
Jan 14, 2025
6c23496
Fix top_nav_tickets_modal path
Jan 14, 2025
6d9de98
Add maxlength attribute to modals
Jan 14, 2025
34daca3
Include rather than require for the admin/xcustom includes to avoid b…
Jan 14, 2025
f774218
Cron - log retention should include the new app and audit logs tables…
Jan 14, 2025
5567dfe
Merge pull request #1148 from itflow-org/stripe-autopay
johnnyq Jan 14, 2025
47657e4
Merge pull request #1149 from itflow-org/modal-maxlength
johnnyq Jan 14, 2025
5d3b4c8
Update JS for stripe autopay to fetch value of Publishable Key from h…
johnnyq Jan 14, 2025
a5d3c73
Sort Interface Ports ASC instead of DESC in asset details
johnnyq Jan 15, 2025
1c971ca
Reduce Padding for Network Interfaces table
johnnyq Jan 15, 2025
e4a4687
Added Connected Asset Interface ID to asset interface table to eventu…
johnnyq Jan 15, 2025
c5058b2
Services table has a weird character set - removed
Jan 15, 2025
99c4f9b
Add domain history
Jan 15, 2025
2ce3273
Merge pull request #1150 from itflow-org/services-db-charset
johnnyq Jan 16, 2025
cb7965a
Stripe Var Passthru attempt
johnnyq Jan 17, 2025
e3623dc
Merge branch 'develop' of github.com:itflow-org/itflow into develop
johnnyq Jan 17, 2025
55b3246
Fix stripe auto-pay not fetching publishable key
Jan 17, 2025
9dcd9ab
Merge branch 'develop' of https://github.com/itflow-org/itflow into d…
Jan 17, 2025
fd59709
Fix stripe auto-pay not fetching publishable key
Jan 17, 2025
5baecf6
Add Payment Deletion Capabilities from payments and client payments page
johnnyq Jan 17, 2025
d22c2b5
Refactor changelog
Jan 17, 2025
e0c8155
Merge branch 'develop' of https://github.com/itflow-org/itflow into d…
Jan 17, 2025
505ad52
Update Changelog
johnnyq Jan 17, 2025
269bdde
Feature: Ability to remove Company Logo, also small UI touch up in co…
johnnyq Jan 17, 2025
e68c8b7
Reduce Card Header Padding in Company Details
johnnyq Jan 17, 2025
ecd83b6
Add domain history to domain refresher
Jan 17, 2025
43337ff
Update User Details Page to mimic company Details layout
johnnyq Jan 17, 2025
bddc406
Merge pull request #1151 from itflow-org/domain-history
johnnyq Jan 17, 2025
57cbcf4
Update some UI elements in User Preferences
johnnyq Jan 17, 2025
d1ebdcf
Add Force Recur ticket to client Recurring, client details and asset …
johnnyq Jan 17, 2025
c425c37
Update CHANGELOG.md
wrongecho Jan 18, 2025
85cee68
Update README.md
wrongecho Jan 18, 2025
317d45c
Update README.md
wrongecho Jan 18, 2025
d2b3970
Update SECURITY.md
wrongecho Jan 18, 2025
360974d
Refactor interface linking system:
johnnyq Jan 18, 2025
eee5a9c
Updated CHANGELOG
johnnyq Jan 18, 2025
657d766
Update Table UI for domain history
johnnyq Jan 18, 2025
5fb4d2a
Tidy some code in client contacts
johnnyq Jan 18, 2025
034dc4a
Row span and center each Rack Devices instead of repeating same devic…
johnnyq Jan 18, 2025
37e7924
Update Change log
johnnyq Jan 18, 2025
a90e08c
UI Update to rack devices, added a table header to Device Units remov…
johnnyq Jan 18, 2025
5382676
Reduce padding in Rack units, use thumnail class for rack image
johnnyq Jan 18, 2025
22e9699
Fix Archive Taxes
johnnyq Jan 18, 2025
9d2f509
Add tooltips to the client badge count on the side nav menu to explai…
johnnyq Jan 20, 2025
2abc6cd
Fix Editing Recurring Expenses, update Changelog
johnnyq Jan 21, 2025
6792912
Fix Regression with TinyMCE not loading when editing or adding a tick…
johnnyq Jan 22, 2025
823c9eb
Reduce the Max amount of Records per page to 100 instead of 500 to pr…
johnnyq Jan 22, 2025
502ebf5
Update Changelog
johnnyq Jan 22, 2025
bff04e9
Disable HTML Purifier Caching
johnnyq Jan 22, 2025
5765144
Disable HTML Purifier Caching in Guest and Portal Areas ass well
johnnyq Jan 22, 2025
e403526
Better var naming for filter vars for clients and contacts
johnnyq Jan 22, 2025
4fc39a7
Update Filter Vars in expenses
johnnyq Jan 22, 2025
606f306
Simplify / rework some of the filter header logic and update filter v…
johnnyq Jan 22, 2025
c5c8097
Fix Default order by
johnnyq Jan 23, 2025
2c51289
Remove mysqli connection vars when passing mail data to addToMailQueu…
johnnyq Jan 23, 2025
faa1f78
Update Function in bulk mail
johnnyq Jan 23, 2025
49682e4
Fix Adminlte Paths in setup
johnnyq Jan 23, 2025
c8e3e37
Update top right corner logo on setup, add more default common income…
johnnyq Jan 23, 2025
70dd3ab
Remove Cron Key Requirement from cron scripts in /scripts folder and …
johnnyq Jan 23, 2025
5f76a79
Move portal to client and rename and reorganize some client portal files
johnnyq Jan 23, 2025
2b8778b
Fix some lingering dead links
johnnyq Jan 23, 2025
0558358
Added breaking changes to the Changelog specifically /guest/ and /cli…
johnnyq Jan 23, 2025
6f2ae10
Fix portal password reset link (portal -> client)
Jan 24, 2025
6d94c32
Hyperlink primary contact name on overview
Jan 24, 2025
57deea2
Hyperlink primary contact name on overview
Jan 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
50 changes: 50 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Changelog

All notable changes to ITFlow will be documented in this file.

## [25.1]

### Added / Changed
- Added ability to save cards in Stripe for automatic invoice payment
- Page titles now reflect the page name, client selection, company name, ticket info, invoice info etc. for easier multi tab navigation.
- Admin pages now once again use the new admin role-check
- Admin roles can now be archived
- Debug now shows the current git branch
- Auto-acknowledgement email for email-parsed tickets now contains a guest link
- Recurring tickets no longer require a contact
- Stripe online payment setup now prompts you to set the income/expense account
- New cron/cli scripts are in the scripts subfolder - please update your cron configurations!
- Moved all modal includes to /modals to tidy root directory
- Moved most include files to /includes to tidy root directory
- Moved guest pages to /guest to tidy directory structure
- Renamed include file pagination.php to filter_footer.php as it is used in conjunction with filter_header.php for page filtering
- Guest ticket feedback now shows friendly ticket prefix & number, rather than just the ID
- Individual POST handler logic pages can no longer be accessed directly
- Added payment deletion on Payments and client Payments Page
- Added Domains history tracking
- Added Asset Interface Linking / Connections to determine what interface is connected to what interface port of another asset
- Added Force Recurring Ticket in more places instead of just recurring tickets
- Row span and center devices that take up multiple units in a rack
- Added Tooltips to main nav badge counts to show what its actually counting
- Changed the Max records per page from 500 to 100 to prevent performance issues

### Fixed
- Fixed ticket edit modal not showing multi-client/no-client projects
- Fixed asset interface losing DHCP setting
- Fixed creating / editing recurring expenses causing 500 error due to incorrect var name
- Fixed tickets created via portal/email not being marked as billable
- Fixed editing Recurring Expense
- Fixed a regression TinyMCE Editor not showing when adding or editing ticket templates

### Removed / Deprecated
- Deprecated the current cron scripts in the root directory - change cron to use the ones in the scripts subfolder instead

### BREAKING CHANGES
- Moved Client portal from /portal to /client - Links will be broken on previous emails, also you may need to update any other links for example website, support page etc?
- Moved guest links from / to /guest - Links will be broken on previous emails.


## [24.12]

### Added / Changed
- First introduced versioned releases!
64 changes: 18 additions & 46 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,10 @@
<!-- PROJECT SHIELDS -->
[![Contributors][contributors-shield]][contributors-url]
[![Stargazers][stars-shield]][stars-url]
[![Issues][issues-shield]][issues-url]
[![Commits][commit-shield]][commit-url]
[![GPL License][license-shield]][license-url]

<!-- PROJECT LOGO -->
<div align="center">
<!-- <a href="https://github.com/itflow-org/itflow">
<img src="images/logo.png" alt="Logo" width="80" height="80">
</a> -->

<h3 align="center">ITFlow</h3>

Expand Down Expand Up @@ -47,43 +42,26 @@


### The Problem
- You're a busy MSP with 101 things to do.
- Information about your clients is unorganised and unstructured: scattered in random tickets or folders - when you do eventually find it, it's out of date.
- For some issues, you spend longer looking for the relevant documentation than actually working the ticket.
- You're a small but busy managed service provider with 101 things to do. Information about your clients is unorganised, unstructured and outdated.
- For some work, you seem to spend longer looking for the relevant documentation than actually working on the issue/project.
- On top of the technical day to day, you also have to take care of the financial side of the business - consistent pricing, quotes/invoicing, and accounting.

### The Solution: ITFlow
- ITFlow consolidates common MSP needs (IT Documentation, ticketing and billing) into one system

### In Beta
* This project is in beta with many ongoing changes. Updates may unintentionally introduce bugs/security issues. Writing functional, secure code is very difficult.
* Whilst we are confident the code is safe, nothing in life is 100% safe or risk-free. Use your best judgement before deciding to store highly confidential information in ITFlow.
* We are hoping to have a stable 1.0 release by early 2025.
- ITFlow consolidates common MSP needs (documentation, ticketing and billing) into one unified system.

<!-- GETTING STARTED -->
## Getting Started

ITFlow is self-hosted. There is a full installation guide in the [docs](https://docs.itflow.org/installation).


<!-- EASY INSTALL -->
### Installation via Script (Recommended Method)

**Requirements**
- Clean Install of Debian 12 or Ubuntu 22.04
- A public IP Address
- Ports 80 (HTTP) and 443 (HTTPS) TCP accessible from the outside in
- A Fully Qualified Domain Name pointing to the public IP Address – example itflow.example.com
### Self Hosting
- The best installation method is to use the [install script](https://docs.itflow.org/installation_script) on Ubuntu/Debian. A video walk through is available [here](https://www.youtube.com/watch?v=kKz9NOU_1XE).
```
wget -O itflow_install.sh https://github.com/itflow-org/itflow-install-script/raw/main/itflow_install.sh
bash itflow_install.sh
```
- Other manual installation methods are available in the [docs](https://docs.itflow.org/installation).

**Process**
- Login as root
- Download & run install script
```
wget -O itflow_install.sh https://github.com/itflow-org/itflow-install-script/raw/main/itflow_install.sh
bash itflow_install.sh
```
- Follow Instructions & navigate to setup URL shown
- Leave us feedback in the [forum](https://forum.itflow.org/d/11-road-map)
### Managed Hosting
- If you'd prefer, we can [host ITFlow for you](https://services.itflow.org/hosting.php).

<!-- FEATURES -->
## Key Features
Expand All @@ -95,14 +73,7 @@ ITFlow is self-hosted. There is a full installation guide in the [docs](https://

<!-- ROADMAP -->
## Roadmap / Future to-do
* Comprehensive API to allow custom third party integration
* CalDAV to integrate with 3rd party calendars
* CardDAV to integrate with 3rd party Address books
* Recent caller toast alerts to click and bring up the clients account right away
* FIDO2 WebAuthn Support for passwordless auth (TPM Fingerprint), (USB Hardware keys such as Yubikey)

See the [forum](https://forum.itflow.org/t/added-to-roadmap) and the [open issues](https://github.com/itflow-org/itflow/issues) for a full list of proposed features & known issues.

We track the implementation of confirmed features and bugs via [TaskFlow](https://tasks.dev.itflow.org/tasks.php). Use the [forum](https://forum.itflow.org) to request features or raise bug reports.

<!-- CONTRIBUTING -->
## Support & Contributions
Expand All @@ -111,7 +82,7 @@ See the [forum](https://forum.itflow.org/t/added-to-roadmap) and the [open issue
For help using ITFlow, bugs, feature requests, and general ideas / discussions please use the community [forum](https://forum.itflow.org).

### Contributing
If you want to improve ITFlow, feel free to fork the repo and create a pull request, but make sure to discuss significant changes or new features with fellow contributors on the forum first. This helps ensure that your contributions are aligned with project goals, and saves time for everyone. All contributions should follow our [code standards](https://docs.itflow.org/code_standards).
If you want to improve ITFlow, feel free to fork the repo and create a pull reques. Make sure to discuss significant changes or new features with fellow contributors on the forum first. This helps ensure that your contributions are aligned with project goals, and saves time for everyone. All contributions should follow our [code standards](https://docs.itflow.org/code_standards). See the [contributing guide](https://docs.itflow.org/contribute).

#### Contributors
<a href="https://github.com/itflow-org/itflow/graphs/contributors">
Expand All @@ -122,13 +93,14 @@ If you want to improve ITFlow, feel free to fork the repo and create a pull requ
We’re incredibly grateful to the organizations and individuals who support the project - a big thank you to:
- CompuMatter
- F1 for HELP
- JetBrains

<!-- LICENSE -->
## License

ITFlow is distributed "as is" under the GPL License, WITHOUT WARRANTY OF ANY KIND. See [`LICENSE`](https://github.com/itflow-org/itflow/blob/master/LICENSE) for details.

## Security
* As of 2025, we now have a stable release of the project.
* Whilst we are confident in the safety of the code, no system is risk-free. Nearly all software has bugs. Use your best judgement before storing highly confidential information in ITFlow.
* If you have a security concern, privately report it [here](https://github.com/itflow-org/itflow/security/policy).

<!-- MARKDOWN LINKS & IMAGES -->
<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->
Expand Down
22 changes: 9 additions & 13 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
# Security Policy

## **Please do NOT report security concerns/vulnerabilities publicly (Github issues/forum)**
## **Please do NOT report security concerns/vulnerabilities publicly (Issues/forum)**

---
**We take security seriously**

## In Beta

ITFlow is currently in beta and is a work in progress.

**We take security seriously.** Whilst we are confident the code is safe, nothing in life is 100% safe or risk-free. You should use your best judgment before entering confidential information into the app.

We attempt to follow security best practices where possible, including [automated code scanning](https://sonarcloud.io/component_measures?id=itflow-org_itflow&metric=security_rating&view=list).

[![Security](https://sonarcloud.io/api/project_badges/measure?project=itflow-org_itflow&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=itflow-org_itflow)
- Whilst we are confident in the safety of the code, no system is risk-free. Nearly all software has bugs. Use your best judgement before storing highly confidential information in ITFlow.
- We attempt to follow security best practices where possible, including [automated code scanning](https://sonarcloud.io/component_measures?id=itflow-org_itflow&metric=security_rating&view=list).
- [![Security](https://sonarcloud.io/api/project_badges/measure?project=itflow-org_itflow&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=itflow-org_itflow)

## Supported Versions
We operate a rolling release model. Any bug fixes will be released into latest version of ITFlow, so you must stay up-to-date.

| Version | Supported |
| ------- | ------------------ |
| Beta | :white_check_mark: |
| 1.0 | Yet to be released |
| Beta | :x: |
| 24.12 | :white_check_mark: |
| 25.1 | :white_check_mark: (When released) |

## Reporting a Vulnerability via GitHub Security Advisories

Expand Down
10 changes: 5 additions & 5 deletions accounts.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
$sort = "account_name";
$order = "ASC";

require_once "inc_all.php";
require_once "includes/inc_all.php";

// Perms
enforceUserPermission('module_financial');
Expand Down Expand Up @@ -109,18 +109,18 @@
</tr>

<?php
include "account_edit_modal.php";
require "modals/account_edit_modal.php";
}
?>

</tbody>
</table>
</div>
<?php require_once "pagination.php"; ?>
<?php require_once "includes/filter_footer.php"; ?>
</div>
</div>

<?php

require_once "account_add_modal.php";
require_once "footer.php";
require_once "modals/account_add_modal.php";
require_once "includes/footer.php";
8 changes: 4 additions & 4 deletions admin_api.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
$sort = "api_key_name";
$order = "ASC";

require_once "inc_all_admin.php";
require_once "includes/inc_all_admin.php";


//Rebuild URL
Expand Down Expand Up @@ -166,15 +166,15 @@
</form>

</div>
<?php require_once "pagination.php";
<?php require_once "includes/filter_footer.php";
?>
</div>
</div>

<script src="js/bulk_actions.js"></script>

<?php
require_once "admin_api_key_add_modal.php";
require_once "modals/admin_api_key_add_modal.php";

require_once "footer.php";
require_once "includes/footer.php";

22 changes: 11 additions & 11 deletions admin_app_log.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,26 @@
$sort = "app_log_id";
$order = "DESC";

require_once "inc_all_admin.php";
require_once "includes/inc_all_admin.php";

// Log Type Filter
if (isset($_GET['type']) & !empty($_GET['type'])) {
$log_type_query = "AND (app_log_type = '" . sanitizeInput($_GET['type']) . "')";
$type = nullable_htmlentities($_GET['type']);
$type_filter = nullable_htmlentities($_GET['type']);
} else {
// Default - any
$log_type_query = '';
$type = '';
$type_filter = '';
}

// Log Category Filter
if (isset($_GET['category']) & !empty($_GET['catergory'])) {
$log_category_query = "AND (app_log_category = '" . sanitizeInput($_GET['category']) . "')";
$category = nullable_htmlentities($_GET['category']);
$category_filter = nullable_htmlentities($_GET['category']);
} else {
// Default - any
$log_category_query = '';
$category = '';
$category_filter = '';
}

//Rebuild URL
Expand Down Expand Up @@ -63,14 +63,14 @@
<div class="col-sm-2">
<div class="form-group">
<select class="form-control select2" name="type" onchange="this.form.submit()">
<option value="" <?php if ($type == "") { echo "selected"; } ?>>- All Types -</option>
<option value="">- All Types -</option>

<?php
$sql_types_filter = mysqli_query($mysqli, "SELECT DISTINCT app_log_type FROM app_logs ORDER BY app_log_type ASC");
while ($row = mysqli_fetch_array($sql_types_filter)) {
$log_type = nullable_htmlentities($row['app_log_type']);
?>
<option <?php if ($type == $log_type) { echo "selected"; } ?>><?php echo $log_type; ?></option>
<option <?php if ($type_filter == $log_type) { echo "selected"; } ?>><?php echo $log_type; ?></option>
<?php
}
?>
Expand All @@ -82,14 +82,14 @@
<div class="col-sm-2">
<div class="form-group">
<select class="form-control select2" name="category" onchange="this.form.submit()">
<option value="" <?php if ($category == "") { echo "selected"; } ?>>- All Categories -</option>
<option value="">- All Categories -</option>

<?php
$sql_categories_filter = mysqli_query($mysqli, "SELECT DISTINCT app_log_category FROM app_logs ORDER BY app_log_category ASC");
while ($row = mysqli_fetch_array($sql_categories_filter)) {
$log_category = nullable_htmlentities($row['app_log_category']);
?>
<option <?php if ($category == $log_category) { echo "selected"; } ?>><?php echo $log_category; ?></option>
<option <?php if ($category_filter == $log_category) { echo "selected"; } ?>><?php echo $log_category; ?></option>
<?php
}
?>
Expand Down Expand Up @@ -184,10 +184,10 @@
</tbody>
</table>
</div>
<?php require_once "pagination.php";
<?php require_once "includes/filter_footer.php";
?>
</div>
</div>

<?php
require_once "footer.php";
require_once "includes/footer.php";
Loading
Loading