From c44ae7455785c8e516636ed4e9b8753bd02d4d52 Mon Sep 17 00:00:00 2001 From: wrongecho Date: Wed, 12 Aug 2026 15:20:48 +0100 Subject: [PATCH 01/37] Update readme --- README.md | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 402dbcb6f..5b4ac75e9 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ · Report Bug · - Request Feature + Suggest Feature · Security

@@ -44,16 +44,16 @@ ### The Problem - 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. +- MSP tools can be expensive, with recurring licensing costs adding up quickly. +- 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 (documentation, ticketing and billing) into one unified system. +- ITFlow consolidates common MSP needs (documentation, ticketing and billing) into one unified, free platform that you control. - ## Getting Started ### 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). +- The best installation method is to use the [install script](https://docs.itflow.org/installation_script) on Ubuntu/Debian. See the [video](https://www.youtube.com/watch?v=kKz9NOU_1XE) walk through. ``` wget -O itflow_install.sh https://github.com/itflow-org/itflow-install-script/raw/main/itflow_install.sh bash itflow_install.sh @@ -61,25 +61,25 @@ - Other manual installation methods are available in the [docs](https://docs.itflow.org/installation). ### Managed Hosting -- If you'd prefer, we can [host ITFlow for you](https://services.itflow.org/hosting.php). +- If you'd prefer, we can [host ITFlow for you](https://services.itflow.org/hosting.php) (coming soon). ## Key Features -* Client documentation - assets, contacts, domains, docs, files, passwords, and more -* Accounting / Billing - finance dashboard, quotes, invoices, accounting, expenses, etc -* Client Portal - self service quote/invoice/ticket management for clients -* Alerting - account balance, invoices, domain/SSL renewals -* Completely free & open-source alternative to ITGlue and Hudu +* Client documentation - assets, contacts, domains, docs/files, passwords, tickets, and more +* Billing - quotes, invoices and expenses, with Stripe integration for online payments +* Alerting - domain and SSL expiry/renewals +* Client Portal - self service quote, invoice, and ticket management for clients + ## Roadmap / Future to-do -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. +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 suggest new features or report bugs. ## Support & Contributions ### Forum -For help using ITFlow, bugs, feature requests, and general ideas / discussions please use the community [forum](https://forum.itflow.org). +For help using ITFlow, bugs, feature suggestions, and other general ideas or discussions, please use the community [forum](https://forum.itflow.org). ### Contributing We have temporarily paused PRs from the community. @@ -90,17 +90,16 @@ We have temporarily paused PRs from the community. ### Supporters -We’re incredibly grateful to the organizations and individuals who support the project - a big thank you to: +We’re incredibly grateful to the organizations and individuals who [sponsor](https://services.itflow.org) the project - a big thank you to: - CompuMatter - F1 for HELP - digiBandit -- JetBrains (PhpStorm) ## 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. +* We've had a stable release of the project since Jan 2025. * 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). From eda32f7d573a1df1e305f09a304dab679c0a776c Mon Sep 17 00:00:00 2001 From: wrongecho Date: Wed, 12 Aug 2026 15:27:40 +0100 Subject: [PATCH 02/37] Update security --- SECURITY.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/SECURITY.md b/SECURITY.md index 3479ef2ed..eca98fb16 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -1,12 +1,12 @@ # Security Policy -## **Please do NOT report security concerns/vulnerabilities publicly (Issues/forum)** +## **Please do NOT report security concerns/vulnerabilities publicly** -**We take security seriously** +**ITFlow stores important information, so we take security seriously** -- 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) +- 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. ## 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. @@ -19,6 +19,8 @@ We operate a rolling release model. Any bug fixes will be released into latest v **Security contact: [GitHub Security Advisories](https://github.com/itflow-org/itflow/security/advisories/new)** -If you have discovered a security issue, please **[report it](https://github.com/itflow-org/itflow/security/advisories/new)** to us in as much detail as possible, so we can fix it. +If you have discovered a security issue, please **[report it](https://github.com/itflow-org/itflow/security/advisories/new)** to us so we can fix it. -You should expect to receive an initial acknowledgement within 72 hours. If you don't receive any feedback, we may have missed the initial email from GitHub (we're human!). Please raise a forum discussion quoting ONLY the assigned GHSA ref. +You should expect to receive an initial acknowledgement within 7 days. If you don't receive any feedback, we may have missed the initial email from GitHub (we're human!). Please raise a forum discussion quoting ONLY the assigned GHSA ref. + +Note: Please don't submit AI slop. AI can be useful for drafting and research, but you are responsible for reviewing and validating anything you submit. We reserve the right to restrict repository access if you repeatedly ignore this requirement. \ No newline at end of file From 691059aab21463971517e8a3ab59f545634b903c Mon Sep 17 00:00:00 2001 From: wrongecho Date: Thu, 13 Aug 2026 09:45:01 +0100 Subject: [PATCH 03/37] Debug - bump php memory flag to 512M --- admin/debug.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/admin/debug.php b/admin/debug.php index 43ddbc8b5..d611dcc66 100644 --- a/admin/debug.php +++ b/admin/debug.php @@ -114,12 +114,12 @@ $phpConfig[] = [ 'value' => $post_max_size, ]; -// PHP Memory Limit >= 128M +// PHP Memory Limit >= 512M $memoryLimit = ini_get('memory_limit'); $memoryLimitBytes = toBytes($memoryLimit); -$memoryLimitPassed = $memoryLimitBytes >= (128 * 1024 * 1024); +$memoryLimitPassed = $memoryLimitBytes >= (512 * 1024 * 1024); $phpConfig[] = [ - 'name' => 'PHP Memory Limit >= 128M', + 'name' => 'PHP Memory Limit >= 512M', 'passed' => $memoryLimitPassed, 'value' => $memoryLimit, ]; From a084e37c39ba91d51a14d917f5143b7da91456f7 Mon Sep 17 00:00:00 2001 From: johnnyq Date: Fri, 14 Aug 2026 13:22:11 -0400 Subject: [PATCH 04/37] Initial migration from AdminLTE 3 to 4, bootstrap 4 to 5 --- admin/ai_models.php | 12 +- admin/ai_providers.php | 14 +- admin/api_keys.php | 30 +-- admin/app_logs.php | 16 +- admin/audit_logs.php | 12 +- admin/backup.php | 62 +++-- admin/categories.php | 28 +- admin/contract_templates.php | 14 +- admin/cron.php | 50 ++-- admin/custom_links.php | 16 +- admin/debug.php | 2 +- admin/document_template.php | 6 +- admin/document_templates.php | 22 +- admin/identity_providers.php | 16 +- admin/includes/side_nav.php | 10 +- admin/mail_queue.php | 28 +- admin/modals/ai/ai_model_add.php | 28 +- admin/modals/ai/ai_model_edit.php | 28 +- admin/modals/ai/ai_provider_add.php | 22 +- admin/modals/ai/ai_provider_edit.php | 22 +- admin/modals/api/api_key_add.php | 42 +-- admin/modals/api/api_key_edit.php | 22 +- admin/modals/category/category_add.php | 26 +- admin/modals/category/category_edit.php | 22 +- .../contract_template_add.php | 82 ++---- .../contract_template_edit.php | 84 ++---- admin/modals/cron/cron_edit.php | 32 +-- .../custom_field/custom_field_create.php | 16 +- .../modals/custom_field/custom_field_edit.php | 16 +- admin/modals/custom_link/custom_link_add.php | 32 +-- admin/modals/custom_link/custom_link_edit.php | 32 +-- .../document_template_add.php | 24 +- .../document_template_edit.php | 16 +- .../mail_queue/mail_queue_message_view.php | 6 +- .../payment_method/payment_method_add.php | 16 +- .../payment_method/payment_method_edit.php | 16 +- .../payment_provider/payment_provider_add.php | 52 ++-- .../payment_provider_edit.php | 40 +-- .../project_template/project_template_add.php | 18 +- .../project_template_edit.php | 18 +- .../project_template_ticket_template_add.php | 18 +- admin/modals/role/role_add.php | 48 ++-- admin/modals/role/role_edit.php | 46 ++-- admin/modals/sla/sla_add.php | 26 +- admin/modals/sla/sla_edit.php | 26 +- .../software_template_add.php | 30 +-- .../software_template_edit.php | 30 +-- admin/modals/tag/tag_add.php | 26 +- admin/modals/tag/tag_edit.php | 22 +- admin/modals/tax/tax_add.php | 14 +- admin/modals/tax/tax_edit.php | 14 +- .../ticket_status/ticket_status_add.php | 22 +- .../ticket_status/ticket_status_edit.php | 30 +-- .../ticket_template/ticket_template_add.php | 28 +- .../ticket_template/ticket_template_edit.php | 24 +- .../ticket_template_task_edit.php | 18 +- admin/modals/user/user_add.php | 56 ++-- admin/modals/user/user_all_reset_password.php | 6 +- admin/modals/user/user_archive.php | 14 +- admin/modals/user/user_edit.php | 52 ++-- admin/modals/user/user_export.php | 14 +- admin/modals/user/user_invite.php | 16 +- admin/modals/user/user_restore.php | 20 +- .../vendor_template/vendor_template_add.php | 62 ++--- .../vendor_template/vendor_template_edit.php | 90 ++----- admin/modules.php | 14 +- admin/payment_methods.php | 12 +- admin/payment_providers.php | 14 +- admin/project_template.php | 42 +-- admin/project_templates.php | 20 +- admin/roles.php | 20 +- admin/saved_payment_methods.php | 6 +- admin/settings_company.php | 52 ++-- admin/settings_custom_fields.php | 20 +- admin/settings_default.php | 44 +--- admin/settings_invoice.php | 46 ++-- admin/settings_localization.php | 16 +- admin/settings_mail.php | 177 ++++++------- admin/settings_module.php | 48 ++-- admin/settings_notification.php | 38 +-- admin/settings_project.php | 12 +- admin/settings_quote.php | 18 +- admin/settings_security.php | 26 +- admin/settings_telemetry.php | 8 +- admin/settings_theme.php | 22 +- admin/settings_ticket.php | 70 +++-- admin/sla.php | 38 +-- admin/software_templates.php | 20 +- admin/starter_content.php | 16 +- admin/tags.php | 26 +- admin/tax_rates.php | 12 +- admin/ticket_statuses.php | 18 +- admin/ticket_template.php | 24 +- admin/ticket_templates.php | 18 +- admin/update.php | 20 +- admin/users.php | 34 ++- admin/vendor_templates.php | 22 +- agent/accounts.php | 18 +- agent/ajax.php | 12 +- agent/asset.php | 198 +++++++------- agent/assets.php | 102 ++++---- agent/calendar.php | 46 ++-- agent/certificates.php | 44 ++-- agent/client_autopay.php | 12 +- agent/client_overview.php | 54 ++-- agent/clients.php | 100 ++++--- agent/contact.php | 164 ++++++------ agent/contacts.php | 92 ++++--- agent/credentials.php | 72 +++--- agent/css/ticket_kanban.css | 6 +- agent/custom/includes/custom_side_nav.php | 8 +- agent/custom/index.php | 2 +- agent/dashboard.php | 66 ++--- agent/document.php | 60 ++--- agent/domains.php | 48 ++-- agent/expenses.php | 56 ++-- agent/files.php | 156 ++++++----- agent/global_search.php | 42 +-- agent/includes/client_overview_side_nav.php | 8 +- agent/includes/client_side_nav.php | 20 +- agent/includes/inc_all_client.php | 2 +- agent/includes/inc_client_top_head.php | 84 +++--- agent/includes/inc_ticket_tasks_section.php | 10 +- agent/includes/inc_ticket_template_select.php | 4 +- agent/includes/side_nav.php | 28 +- agent/income.php | 44 ++-- agent/invoice.php | 126 ++++----- agent/invoices.php | 56 ++-- agent/js/ticket_tasks_modal.js | 4 +- agent/locations.php | 50 ++-- agent/modals/account/account_add.php | 24 +- agent/modals/account/account_edit.php | 16 +- agent/modals/asset/asset.php | 118 +++++---- agent/modals/asset/asset_add.php | 156 ++++------- agent/modals/asset/asset_bulk_add_ticket.php | 40 +-- .../asset/asset_bulk_assign_contact.php | 14 +- .../asset/asset_bulk_assign_location.php | 14 +- .../asset_bulk_assign_physical_location.php | 14 +- agent/modals/asset/asset_bulk_assign_tags.php | 16 +- agent/modals/asset/asset_bulk_edit_status.php | 14 +- .../asset/asset_bulk_transfer_client.php | 14 +- agent/modals/asset/asset_copy.php | 140 +++------- agent/modals/asset/asset_documents.php | 8 +- agent/modals/asset/asset_edit.php | 150 ++++------- agent/modals/asset/asset_export.php | 34 +-- agent/modals/asset/asset_import.php | 12 +- agent/modals/asset/asset_interface_add.php | 66 ++--- .../asset_interface_bulk_edit_network.php | 14 +- .../asset/asset_interface_bulk_edit_type.php | 14 +- agent/modals/asset/asset_interface_edit.php | 68 ++--- agent/modals/asset/asset_interface_export.php | 6 +- agent/modals/asset/asset_interface_import.php | 12 +- .../asset/asset_interface_multiple_add.php | 32 +-- agent/modals/asset/asset_link_credential.php | 14 +- agent/modals/asset/asset_link_document.php | 14 +- agent/modals/asset/asset_link_file.php | 14 +- agent/modals/asset/asset_link_service.php | 14 +- agent/modals/asset/asset_link_software.php | 14 +- agent/modals/asset/asset_note_add.php | 16 +- agent/modals/calendar/calendar_add.php | 18 +- agent/modals/calendar/calendar_edit.php | 18 +- agent/modals/calendar/calendar_event_add.php | 76 ++---- agent/modals/calendar/calendar_event_edit.php | 78 +++--- agent/modals/calendar/calendar_share.php | 60 ++--- agent/modals/certificate/certificate_add.php | 50 ++-- agent/modals/certificate/certificate_edit.php | 52 ++-- .../modals/certificate/certificate_export.php | 22 +- agent/modals/client/client_add.php | 128 +++------ .../modals/client/client_bulk_add_ticket.php | 38 +-- .../modals/client/client_bulk_assign_tags.php | 16 +- .../client/client_bulk_edit_hourly_rate.php | 14 +- .../client/client_bulk_edit_industry.php | 14 +- .../client/client_bulk_edit_net_terms.php | 14 +- .../client/client_bulk_edit_referral.php | 16 +- agent/modals/client/client_bulk_email.php | 58 ++--- agent/modals/client/client_credit_add.php | 36 +-- agent/modals/client/client_delete.php | 4 +- agent/modals/client/client_download_pdf.php | 10 +- agent/modals/client/client_edit.php | 64 ++--- agent/modals/client/client_export.php | 38 +-- agent/modals/client/client_import.php | 14 +- agent/modals/contact/contact.php | 98 ++++--- agent/modals/contact/contact_add.php | 112 +++----- agent/modals/contact/contact_archive.php | 42 ++- .../contact/contact_bulk_assign_location.php | 14 +- .../contact/contact_bulk_assign_tags.php | 16 +- .../contact/contact_bulk_edit_department.php | 14 +- .../contact/contact_bulk_edit_phone.php | 14 +- .../modals/contact/contact_bulk_edit_role.php | 34 ++- agent/modals/contact/contact_bulk_email.php | 24 +- agent/modals/contact/contact_edit.php | 110 +++----- agent/modals/contact/contact_export.php | 26 +- agent/modals/contact/contact_import.php | 14 +- agent/modals/contact/contact_invite.php | 46 ++-- agent/modals/contact/contact_link_asset.php | 14 +- .../contact/contact_link_credential.php | 14 +- .../modals/contact/contact_link_document.php | 14 +- agent/modals/contact/contact_link_file.php | 14 +- agent/modals/contact/contact_link_service.php | 14 +- .../modals/contact/contact_link_software.php | 14 +- agent/modals/contact/contact_note_add.php | 16 +- agent/modals/credential/credential_add.php | 72 ++---- .../credential_bulk_assign_tags.php | 18 +- agent/modals/credential/credential_edit.php | 76 ++---- agent/modals/credential/credential_export.php | 22 +- agent/modals/credential/credential_import.php | 14 +- agent/modals/document/document_add.php | 22 +- .../document/document_add_file_relation.php | 14 +- .../document/document_add_from_template.php | 26 +- agent/modals/document/document_bulk_move.php | 14 +- agent/modals/document/document_edit.php | 18 +- .../document/document_edit_visibility.php | 14 +- agent/modals/document/document_link_asset.php | 14 +- .../modals/document/document_link_contact.php | 14 +- agent/modals/document/document_link_file.php | 14 +- .../document/document_link_software.php | 14 +- .../modals/document/document_link_vendor.php | 14 +- agent/modals/document/document_move.php | 14 +- agent/modals/document/document_rename.php | 14 +- .../modals/document/document_version_view.php | 6 +- agent/modals/document/document_view.php | 6 +- agent/modals/domain/domain_add.php | 48 ++-- agent/modals/domain/domain_edit.php | 70 ++--- agent/modals/domain/domain_export.php | 22 +- agent/modals/expense/expense_add.php | 56 ++-- agent/modals/expense/expense_bulk_delete.php | 6 +- .../expense/expense_bulk_edit_account.php | 16 +- .../expense/expense_bulk_edit_category.php | 14 +- .../expense/expense_bulk_edit_client.php | 14 +- agent/modals/expense/expense_copy.php | 50 ++-- agent/modals/expense/expense_edit.php | 54 ++-- agent/modals/expense/expense_export.php | 30 +-- agent/modals/expense/expense_refund.php | 30 +-- agent/modals/file/file_bulk_move.php | 16 +- agent/modals/file/file_delete.php | 2 +- agent/modals/file/file_link_asset.php | 18 +- agent/modals/file/file_move.php | 14 +- agent/modals/file/file_rename.php | 18 +- agent/modals/file/file_upload.php | 22 +- agent/modals/file/file_view.php | 4 +- agent/modals/folder/folder_add.php | 14 +- agent/modals/folder/folder_rename.php | 14 +- .../income/income_bulk_edit_account.php | 16 +- .../income/income_bulk_edit_category.php | 14 +- .../modals/income/income_bulk_edit_method.php | 14 +- agent/modals/income/income_export.php | 34 +-- agent/modals/invoice/invoice_add.php | 30 +-- agent/modals/invoice/invoice_add_ticket.php | 14 +- .../invoice/invoice_bulk_edit_category.php | 14 +- agent/modals/invoice/invoice_copy.php | 14 +- agent/modals/invoice/invoice_edit.php | 30 +-- agent/modals/invoice/invoice_export.php | 26 +- agent/modals/invoice/invoice_item_edit.php | 30 +-- agent/modals/invoice/invoice_note.php | 12 +- agent/modals/invoice/invoice_payments.php | 24 +- .../modals/invoice/invoice_recurring_add.php | 14 +- agent/modals/location/location_add.php | 86 ++---- .../location/location_bulk_assign_tags.php | 16 +- agent/modals/location/location_edit.php | 84 ++---- agent/modals/location/location_export.php | 22 +- agent/modals/location/location_import.php | 14 +- agent/modals/network/network_add.php | 72 ++---- agent/modals/network/network_edit.php | 70 ++--- agent/modals/network/network_export.php | 22 +- agent/modals/network/network_import.php | 14 +- agent/modals/payment/invoice_apply_credit.php | 14 +- agent/modals/payment/payment_add.php | 40 +-- agent/modals/payment/payment_bulk_add.php | 40 +-- agent/modals/payment/payment_edit.php | 32 +-- .../payment/payment_saved_method_add.php | 14 +- agent/modals/product/product_add.php | 44 +--- .../product/product_bulk_edit_category.php | 14 +- agent/modals/product/product_edit.php | 40 +-- agent/modals/product/product_export.php | 22 +- agent/modals/product/product_import.php | 14 +- agent/modals/product/product_stock_add.php | 20 +- agent/modals/project/project_add.php | 34 +-- agent/modals/project/project_edit.php | 28 +- .../project/project_link_closed_ticket.php | 14 +- agent/modals/project/project_link_ticket.php | 14 +- agent/modals/quote/quote_add.php | 32 +-- agent/modals/quote/quote_copy.php | 22 +- agent/modals/quote/quote_edit.php | 30 +-- agent/modals/quote/quote_export.php | 18 +- agent/modals/quote/quote_item_edit.php | 30 +-- agent/modals/quote/quote_note.php | 14 +- agent/modals/quote/quote_to_invoice.php | 18 +- agent/modals/rack/rack_add.php | 52 ++-- agent/modals/rack/rack_device_add.php | 22 +- agent/modals/rack/rack_edit.php | 52 ++-- .../recurring_expense_add.php | 62 ++--- .../recurring_expense_edit.php | 60 ++--- .../recurring_invoice_add.php | 32 +-- .../recurring_invoice_edit.php | 34 +-- .../recurring_invoice_export.php | 22 +- .../recurring_invoice_item_edit.php | 30 +-- .../recurring_invoice_note.php | 12 +- .../recurring_ticket/recurring_ticket_add.php | 70 ++--- .../recurring_ticket_bulk_agent_edit.php | 14 +- .../recurring_ticket_bulk_billable_edit.php | 18 +- .../recurring_ticket_bulk_category_edit.php | 14 +- .../recurring_ticket_bulk_next_run_edit.php | 14 +- .../recurring_ticket_bulk_priority_edit.php | 14 +- .../recurring_ticket_edit.php | 68 ++--- agent/modals/revenue/revenue_add.php | 44 +--- agent/modals/revenue/revenue_edit.php | 44 +--- agent/modals/service/service.php | 38 ++- agent/modals/service/service_add.php | 56 ++-- agent/modals/service/service_edit.php | 52 ++-- agent/modals/share_modal.php | 28 +- agent/modals/software/software_add.php | 76 ++---- .../software/software_add_from_template.php | 18 +- agent/modals/software/software_edit.php | 72 ++---- agent/modals/software/software_export.php | 22 +- agent/modals/ticket/ticket_add.php | 90 +++---- agent/modals/ticket/ticket_add_watcher.php | 16 +- agent/modals/ticket/ticket_assign.php | 16 +- agent/modals/ticket/ticket_billable.php | 16 +- .../modals/ticket/ticket_bulk_add_project.php | 14 +- agent/modals/ticket/ticket_bulk_assign.php | 14 +- .../ticket/ticket_bulk_edit_category.php | 14 +- .../ticket/ticket_bulk_edit_priority.php | 14 +- agent/modals/ticket/ticket_bulk_merge.php | 18 +- agent/modals/ticket/ticket_bulk_reply.php | 24 +- agent/modals/ticket/ticket_bulk_resolve.php | 22 +- agent/modals/ticket/ticket_change_client.php | 18 +- agent/modals/ticket/ticket_contact.php | 16 +- agent/modals/ticket/ticket_edit.php | 78 ++---- agent/modals/ticket/ticket_edit_asset.php | 18 +- agent/modals/ticket/ticket_edit_project.php | 14 +- agent/modals/ticket/ticket_edit_schedule.php | 20 +- agent/modals/ticket/ticket_edit_vendor.php | 14 +- agent/modals/ticket/ticket_export.php | 46 +--- agent/modals/ticket/ticket_invoice_add.php | 52 ++-- agent/modals/ticket/ticket_merge.php | 20 +- agent/modals/ticket/ticket_priority.php | 14 +- agent/modals/ticket/ticket_quote_add.php | 50 ++-- agent/modals/ticket/ticket_reply_edit.php | 18 +- agent/modals/ticket/ticket_reply_redact.php | 12 +- agent/modals/ticket/ticket_sla.php | 14 +- agent/modals/ticket/ticket_summary.php | 4 +- .../ticket/ticket_task_approver_add.php | 22 +- agent/modals/ticket/ticket_task_edit.php | 20 +- agent/modals/top_nav_tickets_modal.php | 4 +- .../modals/transaction/transaction_export.php | 42 +-- agent/modals/transfer/transfer_add.php | 38 +-- agent/modals/transfer/transfer_edit.php | 34 +-- agent/modals/trip/trip_add.php | 40 +-- agent/modals/trip/trip_copy.php | 40 +-- agent/modals/trip/trip_edit.php | 40 +-- agent/modals/trip/trip_export.php | 18 +- agent/modals/vendor/vendor.php | 12 +- agent/modals/vendor/vendor_add.php | 62 ++--- .../vendor/vendor_add_from_template.php | 14 +- agent/modals/vendor/vendor_edit.php | 68 ++--- agent/modals/vendor/vendor_export.php | 14 +- agent/networks.php | 52 ++-- agent/notifications.php | 18 +- agent/products.php | 56 ++-- agent/project.php | 90 +++---- agent/projects.php | 42 ++- agent/quote.php | 92 +++---- agent/quotes.php | 32 ++- agent/racks.php | 44 ++-- agent/recurring_expenses.php | 22 +- agent/recurring_invoice.php | 64 +++-- agent/recurring_invoices.php | 32 ++- agent/recurring_tickets.php | 46 ++-- agent/reports/budget.php | 40 +-- agent/reports/client_ticket_time_detail.php | 70 ++--- agent/reports/credential_rotation.php | 16 +- agent/reports/expense_by_vendor.php | 8 +- agent/reports/expense_summary.php | 38 +-- agent/reports/includes/reports_side_nav.php | 10 +- agent/reports/income_by_client.php | 8 +- agent/reports/income_summary.php | 38 +-- agent/reports/index.php | 2 +- agent/reports/outstanding_balances.php | 8 +- agent/reports/profit_loss.php | 64 ++--- agent/reports/recurring_by_client.php | 10 +- agent/reports/sla_by_client.php | 42 +-- agent/reports/sla_summary.php | 52 ++-- agent/reports/tax_summary.php | 30 +-- agent/reports/ticket_by_client.php | 80 +++--- agent/reports/ticket_summary.php | 34 +-- agent/reports/tickets_unbilled.php | 16 +- agent/reports/time_by_tech.php | 18 +- agent/services.php | 22 +- agent/software.php | 32 ++- agent/ticket.php | 244 +++++++++--------- agent/ticket_kanban.php | 18 +- agent/ticket_list.php | 48 ++-- agent/tickets.php | 58 ++--- agent/transactions.php | 34 ++- agent/transfers.php | 26 +- agent/trips.php | 30 +-- agent/user/includes/user_side_nav.php | 8 +- agent/user/mfa_enforcement.php | 12 +- agent/user/modals/user_mfa_modal.php | 14 +- agent/user/user_activity.php | 8 +- agent/user/user_details.php | 24 +- agent/user/user_preferences.php | 14 +- agent/user/user_security.php | 22 +- agent/vendors.php | 56 ++-- al4_layout.py | 198 ++++++++++++++ bs5_codemod.py | 237 +++++++++++++++++ client/assets.php | 4 +- client/certificates.php | 2 +- client/contact_add.php | 30 +-- client/contact_edit.php | 30 +-- client/contacts.php | 4 +- client/document.php | 18 +- client/documents.php | 56 ++-- client/domains.php | 2 +- client/includes/header.php | 20 +- client/index.php | 8 +- client/invoices.php | 4 +- client/login_reset.php | 8 +- client/profile.php | 6 +- client/quotes.php | 2 +- client/recurring_invoices.php | 2 +- client/saved_payment_methods.php | 6 +- client/ticket.php | 22 +- client/ticket_add.php | 18 +- client/ticket_view_all.php | 2 +- client/tickets.php | 12 +- client/unpaid_invoices.php | 14 +- fetch_adminlte4_libs.sh | 72 ++++++ functions/export.php | 24 +- guest/guest_approve_ticket_task.php | 2 +- guest/guest_pay_invoice_stripe.php | 12 +- guest/guest_quote_upload_file_modal.php | 14 +- guest/guest_view_invoice.php | 56 ++-- guest/guest_view_item.php | 2 +- guest/guest_view_quote.php | 44 ++-- guest/guest_view_ticket.php | 8 +- guest/includes/inc_wrapper.php | 4 +- includes/filter_footer.php | 2 +- includes/footer.php | 13 +- includes/header.php | 16 +- includes/inc_confirm_modal.php | 6 +- includes/inc_wrapper.php | 4 +- includes/top_nav.php | 26 +- js/app.js | 28 +- .../bootstrap-show-password.min.js | 7 - libs/adminlte/css/adminlte-select2.min.css | 12 + libs/adminlte/css/adminlte.min.css | 11 +- libs/adminlte/js/.eslintrc.json | 48 ---- libs/adminlte/js/adminlte.min.js | 6 +- libs/bootstrap/js/bootstrap.bundle.min.js | 6 +- .../select2-bootstrap4.min.css | 2 - .../tempus-dominus/css/tempus-dominus.min.css | 1 + libs/tempus-dominus/js/tempus-dominus.min.js | 6 + .../css/tempusdominus-bootstrap-4.min.css | 5 - .../js/tempusdominus-bootstrap-4.min.js | 6 - login.php | 22 +- modals/notifications.php | 18 +- setup/index.php | 158 ++++-------- 458 files changed, 6069 insertions(+), 8634 deletions(-) create mode 100644 al4_layout.py create mode 100644 bs5_codemod.py create mode 100755 fetch_adminlte4_libs.sh delete mode 100644 libs/Show-Hide-Passwords-Bootstrap-4/bootstrap-show-password.min.js create mode 100644 libs/adminlte/css/adminlte-select2.min.css delete mode 100644 libs/adminlte/js/.eslintrc.json delete mode 100644 libs/select2-bootstrap4-theme/select2-bootstrap4.min.css create mode 100644 libs/tempus-dominus/css/tempus-dominus.min.css create mode 100644 libs/tempus-dominus/js/tempus-dominus.min.js delete mode 100644 libs/tempusdominus-bootstrap-4/css/tempusdominus-bootstrap-4.min.css delete mode 100644 libs/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js diff --git a/admin/ai_models.php b/admin/ai_models.php index db8f96d81..0d89b83af 100644 --- a/admin/ai_models.php +++ b/admin/ai_models.php @@ -25,9 +25,9 @@ $num_rows = mysqli_num_rows($sql);
-

AI Models

+

AI Models

- +
@@ -79,18 +79,18 @@ $num_rows = mysqli_num_rows($sql); - diff --git a/admin/ai_providers.php b/admin/ai_providers.php index b9b728314..5f9819a48 100644 --- a/admin/ai_providers.php +++ b/admin/ai_providers.php @@ -14,9 +14,9 @@ $num_rows = mysqli_num_rows($sql);
-

AI Providers

+

AI Providers

- +
@@ -68,20 +68,20 @@ $num_rows = mysqli_num_rows($sql); - + - diff --git a/admin/api_keys.php b/admin/api_keys.php index c0ed6cae9..47628608a 100644 --- a/admin/api_keys.php +++ b/admin/api_keys.php @@ -20,9 +20,9 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-

API Keys

+

API Keys

- +
@@ -34,22 +34,20 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
-
-
- @@ -69,7 +67,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); "> - - - + diff --git a/admin/audit_logs.php b/admin/audit_logs.php index 0ce0d9709..b4b84a289 100644 --- a/admin/audit_logs.php +++ b/admin/audit_logs.php @@ -67,7 +67,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-

Audit Logs

+

Audit Logs

@@ -75,10 +75,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
- + -
@@ -163,7 +161,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
" id="advancedFilter">
-
+
@@ -255,7 +253,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); ?>
- + @@ -263,7 +261,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); - + diff --git a/admin/backup.php b/admin/backup.php index 209531cfa..0b0b7a54f 100644 --- a/admin/backup.php +++ b/admin/backup.php @@ -33,15 +33,15 @@ if (!empty($_SESSION['backup_master_key_reveal'])) { unset($_SESSION['backup_master_key_reveal']); ?>
-
Master encryption key
+
Master encryption key

Shown once. Refreshing this page will not show it again.

- +
-
No backup encryption key
+
No backup encryption key
ITFlow could not write a backup encryption key to config.php, so it cannot produce an encrypted backup. Make config.php writable by the web server user and reload this page, or add a line like $config_backup_key = '<32 random characters>'; to it yourself. @@ -50,26 +50,26 @@ if (!empty($_SESSION['backup_master_key_reveal'])) {
-
Cron is not running
+
Cron is not running
Backups are built by the cron dispatcher, not by your browser. Until cron is running, anything you start here will sit in the queue. See Maintenance > Cron.
- Cron is switched off in + Cron is switched off in Maintenance > Cron.
-

Create a Backup

+

Create a Backup

0) { ?>
- backup + backup queued or building. You will get a notification when ready - this page does not refresh itself.
@@ -81,7 +81,7 @@ if (!empty($_SESSION['backup_master_key_reveal'])) {
Full Backup

The database and everything in the uploads folder. This is the one to keep.

- Start + Start
@@ -91,7 +91,7 @@ if (!empty($_SESSION['backup_master_key_reveal'])) {
Database Only

Just the SQL dump. Much smaller and much quicker, but no attachments or documents.

- Start + Start
@@ -100,8 +100,8 @@ if (!empty($_SESSION['backup_master_key_reveal'])) {
Master Key

The credential vault key. Only needed if every user password is lost - a normal restore recovers the vault on its own.

- @@ -112,7 +112,7 @@ if (!empty($_SESSION['backup_master_key_reveal'])) {
-

Backups

+

Backups

@@ -124,7 +124,7 @@ if (!empty($_SESSION['backup_master_key_reveal'])) {
- + @@ -153,7 +153,7 @@ if (!empty($_SESSION['backup_master_key_reveal'])) {
- @@ -147,25 +147,25 @@ while ($job_row = mysqli_fetch_assoc($sql)) { @@ -195,7 +195,7 @@ while ($job_row = mysqli_fetch_assoc($sql)) {

- Run Now does not start the job in your browser - it asks the + Run Now does not start the job in your browser - it asks the dispatcher to pick it up on its next pass, so a job starts within a minute and still runs on the command line with the same locking as a scheduled run. Detailed per-job output is in App Logs. diff --git a/admin/custom_links.php b/admin/custom_links.php index 038dc318d..5fd136d49 100644 --- a/admin/custom_links.php +++ b/admin/custom_links.php @@ -20,9 +20,9 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));

-

Custom Links

+

Custom Links

- +
@@ -32,9 +32,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
-
@@ -108,24 +106,24 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); + + + + + + +
+
@@ -119,7 +117,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); ?>
+
@@ -130,22 +128,22 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
$log_user_browser" ?>
Size Source StatusActionAction
+ @@ -173,11 +173,11 @@ if (!empty($_SESSION['backup_master_key_reveal'])) {
-

Encryption Key

+

Encryption Key

- + Write this down and keep it somewhere other than this server. Every backup is encrypted with it, and without it a backup cannot be restored - not by you, not by anyone. It is stored in config.php and never in the database, which is what stops a @@ -186,12 +186,10 @@ if (!empty($_SESSION['backup_master_key_reveal'])) {
- -
+ -
@@ -204,43 +202,43 @@ if (!empty($_SESSION['backup_master_key_reveal'])) {
-

Scheduled Backups & Retention

+

Scheduled Backups & Retention

-
-
+
+
-
+
0 disables age-based deletion.
-
+
Counted separately for each type. The newest of each is never deleted.
- +

- Scheduled backups run daily at + Scheduled backups run daily at . - Scheduled backups are switched off. + Scheduled backups are switched off. Turn them on or change the time in Maintenance > Cron.

@@ -253,7 +251,7 @@ if (!empty($_SESSION['backup_master_key_reveal'])) {
- - diff --git a/admin/cron.php b/admin/cron.php index b2556072f..ed8d3aa5b 100644 --- a/admin/cron.php +++ b/admin/cron.php @@ -35,13 +35,13 @@ while ($job_row = mysqli_fetch_assoc($sql)) {
-

Cron

+

Cron

-
Cron is not running
+
Cron is not running
ITFlow last heard from cron . Nothing below will run - no mail is being sent, no email is being turned into tickets, and invoices are not being generated. Add this line to the crontab of the user that owns the ITFlow files: @@ -49,26 +49,26 @@ while ($job_row = mysqli_fetch_assoc($sql)) {
- Cron last checked in . - + Cron last checked in . +
-
+ -
Cron is switched off
+
Cron is switched off
The dispatcher is running, but every job below stops itself immediately while this is off - no mail is sent, no email becomes a ticket, and nothing is invoiced.

- The master switch is on. Turning it off + The master switch is on. Turning it off stops every job at once without touching their schedules, which is what you want on a restored backup or a staging clone - those come up with every job enabled and will otherwise email clients and charge cards. Switching back on returns you to exactly this configuration. @@ -112,24 +112,24 @@ while ($job_row = mysqli_fetch_assoc($sql)) { $next_run = $job_row ? cronJobNextRun($job_row) : null; if ($run_now) { - $status_badge = 'Queued'; + $status_badge = 'Queued'; } elseif ($last_status === 'Running') { - $status_badge = 'Running'; + $status_badge = 'Running'; } elseif ($last_status === 'Completed') { - $status_badge = 'Completed'; + $status_badge = 'Completed'; } elseif ($last_status === 'Failed') { - $status_badge = 'Failed'; + $status_badge = 'Failed'; } elseif ($last_status !== null) { - $status_badge = 'Stopped'; + $status_badge = 'Stopped'; } else { - $status_badge = 'Never run'; + $status_badge = 'Never run'; } ?>

- Disabled + Disabled

cron/
-
-
+ - Last error - + Last error +
- + - diff --git a/admin/debug.php b/admin/debug.php index d611dcc66..f4147e4a5 100644 --- a/admin/debug.php +++ b/admin/debug.php @@ -508,7 +508,7 @@ $mysqli->close();
-

Debug

+

Debug

diff --git a/admin/document_template.php b/admin/document_template.php index 3a8dea489..3fc756d07 100644 --- a/admin/document_template.php +++ b/admin/document_template.php @@ -44,19 +44,19 @@ $document_template_updated_at = escapeHtml($row['document_template_updated_at']) - +
-

+

diff --git a/admin/document_templates.php b/admin/document_templates.php index a09cba04a..3f13a6f92 100644 --- a/admin/document_templates.php +++ b/admin/document_templates.php @@ -21,10 +21,10 @@
-

Document Templates

+

Document Templates

@@ -33,9 +33,7 @@
-
-

@@ -83,9 +81,9 @@ -
- -
+
+ +
@@ -98,23 +96,23 @@
- diff --git a/admin/identity_providers.php b/admin/identity_providers.php index 665904f3d..92df76e73 100644 --- a/admin/identity_providers.php +++ b/admin/identity_providers.php @@ -4,7 +4,7 @@ require_once "includes/inc_all_admin.php";
-

Identity Providers

+

Identity Providers

@@ -12,12 +12,10 @@ require_once "includes/inc_all_admin.php";

Client Portal SSO via Microsoft Entra

-
+
-
-
-
+
-
-

- +
diff --git a/admin/includes/side_nav.php b/admin/includes/side_nav.php index 48636100a..f5ec72a11 100644 --- a/admin/includes/side_nav.php +++ b/admin/includes/side_nav.php @@ -1,8 +1,8 @@ -
+ +
+
-
-
+
+

Accounts

-
+
-
-
- - "> - - - - - - - - - +
+
- - Name - - - - Currency - - BalanceAction
+ "> + + + + + + + + + - - - - - - - - - - -
+ + Name + + + + Currency + + BalanceAction
- - - - - -
-
- + + + + + + + + + + + + + + + + +
+
-
-
+
+

Assets

= 2) { ?> @@ -241,23 +241,23 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
+
-
+
-
+
s">
-
+
@@ -310,7 +310,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
+
@@ -348,7 +348,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
+
+
+ + -
- - text-nowrap"> +
+
+ text-nowrap"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $asset_serial"; + } else { + $asset_serial_display = "-"; + } + $asset_os = escapeHtml($row['asset_os']); + $asset_ip = escapeHtml($row['interface_ip']) ?: '-'; + $asset_ipv6 = escapeHtml($row['interface_ipv6']); + $asset_nat_ip = escapeHtml($row['interface_nat_ip']); + $asset_mac = escapeHtml($row['interface_mac']) ?: '-'; + $asset_uri = escapeUrl($row['asset_uri']); + $asset_uri_2 = escapeUrl($row['asset_uri_2']); + $asset_uri_client = escapeUrl($row['asset_uri_client']); + $asset_status = escapeHtml($row['asset_status']); + $asset_purchase_reference = escapeHtml($row['asset_purchase_reference']); + $asset_purchase_date = escapeHtml($row['asset_purchase_date']); + if ($asset_purchase_date) { + $asset_purchase_date_display = $asset_purchase_date; + } else { + $asset_purchase_date_display = "-"; + } + $asset_warranty_expire = escapeHtml($row['asset_warranty_expire']); + if ($asset_warranty_expire) { + $asset_warranty_expire_display = $asset_warranty_expire; + } else { + $asset_warranty_expire_display = "-"; + } + $asset_install_date = escapeHtml($row['asset_install_date']); + if ($asset_install_date) { + $asset_install_date_display = $asset_install_date; + } else { + $asset_install_date_display = "-"; + } + $asset_photo = escapeHtml($row['asset_photo']); + $asset_physical_location = escapeHtml($row['asset_physical_location']); + if ($asset_physical_location) { + $asset_physical_location_display = "
$asset_physical_location
"; + } else { + $asset_physical_location_display = ""; + } + $asset_notes = escapeHtml($row['asset_notes']); + $asset_favorite = intval($row['asset_favorite']); + $asset_created_at = escapeHtml($row['asset_created_at']); + $asset_archived_at = escapeHtml($row['asset_archived_at']); + $asset_vendor_id = intval($row['asset_vendor_id']); + $asset_location_id = intval($row['asset_location_id']); + $asset_contact_id = intval($row['asset_contact_id']); + $asset_network_id = intval($row['interface_network_id']); + + $device_icon = getAssetIcon($asset_type); + + $contact_archived_at = escapeHtml($row['contact_archived_at']); + if ($contact_archived_at) { + $contact_archive_display = "(Archived)"; + } else { + $contact_archive_display = ''; + } + $contact_name = escapeHtml($row['contact_name']); + if ($contact_name) { + $contact_name_display = "$contact_name $contact_archive_display"; + } else { + $contact_name_display = "-"; + } + + $location_name = escapeHtml($row['location_name']); + if (empty($location_name)) { + $location_name = "-"; + } + $location_archived_at = escapeHtml($row['location_archived_at']); + if ($location_archived_at) { + $location_name_display = "
$location_name
"; + } else { + $location_name_display = $location_name; + } + + $sql_credentials = mysqli_query($mysqli, "SELECT 1 FROM credentials WHERE credential_asset_id = $asset_id"); + $credential_count = mysqli_num_rows($sql_credentials); + + // Tags + $asset_tag_name_display_array = array(); + $asset_tag_id_array = array(); + $sql_asset_tags = mysqli_query($mysqli, "SELECT tag_color, tag_icon, tag_id, tag_name FROM asset_tags LEFT JOIN tags ON asset_tag_tag_id = tag_id WHERE asset_tag_asset_id = $asset_id ORDER BY tag_name ASC"); + while ($row = mysqli_fetch_assoc($sql_asset_tags)) { + + $asset_tag_id = intval($row['tag_id']); + $asset_tag_name = escapeHtml($row['tag_name']); + $asset_tag_color = escapeHtml($row['tag_color']); + if (empty($asset_tag_color)) { + $asset_tag_color = "dark"; + } + $asset_tag_icon = escapeHtml($row['tag_icon']); + if (empty($asset_tag_icon)) { + $asset_tag_icon = "tag"; + } + + $asset_tag_id_array[] = $asset_tag_id; + $asset_tag_name_display_array[] = "$asset_tag_name"; + } + $asset_tags_display = implode('', $asset_tag_name_display_array); + + ?> - + + + + - + - + - + - + - + - + - - + + - - + + - + - + - - $asset_serial"; - } else { - $asset_serial_display = "-"; - } - $asset_os = escapeHtml($row['asset_os']); - $asset_ip = escapeHtml($row['interface_ip']) ?: '-'; - $asset_ipv6 = escapeHtml($row['interface_ipv6']); - $asset_nat_ip = escapeHtml($row['interface_nat_ip']); - $asset_mac = escapeHtml($row['interface_mac']) ?: '-'; - $asset_uri = escapeUrl($row['asset_uri']); - $asset_uri_2 = escapeUrl($row['asset_uri_2']); - $asset_uri_client = escapeUrl($row['asset_uri_client']); - $asset_status = escapeHtml($row['asset_status']); - $asset_purchase_reference = escapeHtml($row['asset_purchase_reference']); - $asset_purchase_date = escapeHtml($row['asset_purchase_date']); - if ($asset_purchase_date) { - $asset_purchase_date_display = $asset_purchase_date; - } else { - $asset_purchase_date_display = "-"; - } - $asset_warranty_expire = escapeHtml($row['asset_warranty_expire']); - if ($asset_warranty_expire) { - $asset_warranty_expire_display = $asset_warranty_expire; - } else { - $asset_warranty_expire_display = "-"; - } - $asset_install_date = escapeHtml($row['asset_install_date']); - if ($asset_install_date) { - $asset_install_date_display = $asset_install_date; - } else { - $asset_install_date_display = "-"; - } - $asset_photo = escapeHtml($row['asset_photo']); - $asset_physical_location = escapeHtml($row['asset_physical_location']); - if ($asset_physical_location) { - $asset_physical_location_display = "
$asset_physical_location
"; - } else { - $asset_physical_location_display = ""; - } - $asset_notes = escapeHtml($row['asset_notes']); - $asset_favorite = intval($row['asset_favorite']); - $asset_created_at = escapeHtml($row['asset_created_at']); - $asset_archived_at = escapeHtml($row['asset_archived_at']); - $asset_vendor_id = intval($row['asset_vendor_id']); - $asset_location_id = intval($row['asset_location_id']); - $asset_contact_id = intval($row['asset_contact_id']); - $asset_network_id = intval($row['interface_network_id']); + } - $device_icon = getAssetIcon($asset_type); + ?> - $contact_archived_at = escapeHtml($row['contact_archived_at']); - if ($contact_archived_at) { - $contact_archive_display = "(Archived)"; - } else { - $contact_archive_display = ''; - } - $contact_name = escapeHtml($row['contact_name']); - if ($contact_name) { - $contact_name_display = "$contact_name $contact_archive_display"; - } else { - $contact_name_display = "-"; - } - - $location_name = escapeHtml($row['location_name']); - if (empty($location_name)) { - $location_name = "-"; - } - $location_archived_at = escapeHtml($row['location_archived_at']); - if ($location_archived_at) { - $location_name_display = "
$location_name
"; - } else { - $location_name_display = $location_name; - } - - $sql_credentials = mysqli_query($mysqli, "SELECT 1 FROM credentials WHERE credential_asset_id = $asset_id"); - $credential_count = mysqli_num_rows($sql_credentials); - - // Tags - $asset_tag_name_display_array = array(); - $asset_tag_id_array = array(); - $sql_asset_tags = mysqli_query($mysqli, "SELECT tag_color, tag_icon, tag_id, tag_name FROM asset_tags LEFT JOIN tags ON asset_tag_tag_id = tag_id WHERE asset_tag_asset_id = $asset_id ORDER BY tag_name ASC"); - while ($row = mysqli_fetch_assoc($sql_asset_tags)) { - - $asset_tag_id = intval($row['tag_id']); - $asset_tag_name = escapeHtml($row['tag_name']); - $asset_tag_color = escapeHtml($row['tag_color']); - if (empty($asset_tag_color)) { - $asset_tag_color = "dark"; - } - $asset_tag_icon = escapeHtml($row['tag_icon']); - if (empty($asset_tag_icon)) { - $asset_tag_icon = "tag"; - } - - $asset_tag_id_array[] = $asset_tag_id; - $asset_tag_name_display_array[] = "$asset_tag_name"; - } - $asset_tags_display = implode('', $asset_tag_name_display_array); - - ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+ +
+
+ + Name + + + + Type + + + + Model + + + + IP + + + + MAC Address + + + + Purchase Date + + + + Install Date + + + + Warranty Expire + + + + Assigned To + + + + Location + + + + Status + + + + Client + + Action
- +
- - Name + + +
+ +
+
+ + + "; } ?>
+
+ +
+
- -
- - Type - - +
+ + + + +
+
+
- - Model - - +
+
+
- - IP - - + +
+
- - MAC Address - - - - Purchase Date - - - - Install Date - - - - Warranty Expire - - - - Assigned To - - - - Location - - - - Status - - +
+
+
- - Client - - Action + +
-
- -
-
- -
- -
-
- - - "; } ?>
-
- -
-
-
-
-
- - - - -
-
-
-
-
-
- -
-
-
-
-
- -
-
- - -
+ + +
+ +
diff --git a/agent/certificates.php b/agent/certificates.php index 7eed499df..767495ba3 100644 --- a/agent/certificates.php +++ b/agent/certificates.php @@ -77,8 +77,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); ?> -
-
+
+

Certificates

@@ -95,16 +95,16 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
+
-
+
-
+
@@ -140,7 +140,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
+
+ + - - "> - +
+ "> + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + - + - - - + + + + + - + + + - + - -
+
+ +
+
+ + Name + + + + Domain + + + + Issued By + + + + Expire + + + + Client + + Action
- + +
- - Name - - - - Domain - - - - Issued By - - - - Expire - - - - Client - - Action
-
- - -
-
- -
- -
-
-
-
+
+ + -
- -
- -
+
+ +
-
- + -
+ + - -
- +
+
diff --git a/agent/clients.php b/agent/clients.php index af94422be..ef2201977 100644 --- a/agent/clients.php +++ b/agent/clients.php @@ -106,22 +106,20 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
+
-
+
-
-
- " autofocus> - - -
+
+ " autofocus> + +
-
+
" title="Clients">Clients ">Leads @@ -200,7 +198,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
+
-
- +
+ @@ -223,8 +221,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
- +
+ @@ -265,8 +263,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
- +
+ -
+
-
+
-
+
@@ -181,7 +181,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
+
+
+ + -
- - "> +
+
+ "> + + + + + + + + + + + + + + + $contact_title"; + } + $contact_department = escapeHtml($row['contact_department']) ?: '-'; + $contact_extension = escapeHtml($row['contact_extension']); + if (empty($contact_extension)) { + $contact_extension_display = ""; + } else { + $contact_extension_display = "x$contact_extension"; + } + $contact_phone_country_code = escapeHtml($row['contact_phone_country_code']); + $contact_phone = escapeHtml(formatPhoneNumber($row['contact_phone'], $contact_phone_country_code)); + if (empty($contact_phone)) { + $contact_phone_display = ""; + } else { + $contact_phone_display = ""; + } + $contact_mobile_country_code = escapeHtml($row['contact_mobile_country_code']); + $contact_mobile = escapeHtml(formatPhoneNumber($row['contact_mobile'], $contact_mobile_country_code)); + if (empty($contact_mobile)) { + $contact_mobile_display = ""; + } else { + $contact_mobile_display = ""; + } + $contact_email = escapeHtml($row['contact_email']); + if (empty($contact_email)) { + $contact_email_display = ""; + } else { + $contact_email_display = ""; + } + $contact_info_display = "$contact_phone_display $contact_mobile_display $contact_email_display"; + if (empty($contact_info_display)) { + $contact_info_display = "-"; + } + $contact_pin = escapeHtml($row['contact_pin']); + $contact_photo = escapeHtml($row['contact_photo']); + $contact_initials = initials($contact_name); + $contact_notes = escapeHtml($row['contact_notes']); + $contact_primary = intval($row['contact_primary']); + $contact_important = intval($row['contact_important']); + $contact_billing = intval($row['contact_billing']); + $contact_technical = intval($row['contact_technical']); + $contact_created_at = escapeHtml($row['contact_created_at']); + $contact_archived_at = escapeHtml($row['contact_archived_at']); + if ($contact_primary == 1) { + $contact_primary_display = "Primary Contact"; + } else { + $contact_primary_display = false; + } + $contact_location_id = intval($row['contact_location_id']); + $location_name = escapeHtml($row['location_name']); + if (empty($location_name)) { + $location_name = "N/A"; + } + $location_archived_at = escapeHtml($row['location_archived_at']); + if ($location_archived_at) { + $location_name_display = "
$location_name
"; + } else { + $location_name_display = $location_name; + } + $auth_method = escapeHtml($row['user_auth_method']); + $contact_user_id = intval($row['contact_user_id']); + if ($contact_user_id) { + $user_exists_display = ""; + } else { + $user_exists_display = ""; + } + + // Counts + + // Asset Count + $row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('asset_id') AS num FROM assets WHERE asset_contact_id = $contact_id AND asset_archived_at IS NULL")); + $asset_count = $row['num']; + if ($asset_count) { + $asset_count_display = "$asset_count"; + } else { + $asset_count_display = ''; + } + + // Credential Count + $row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('credential_id') AS num FROM credentials WHERE credential_contact_id = $contact_id AND credential_archived_at IS NULL")); + $credential_count = $row['num']; + if ($credential_count) { + $credential_count_display = "$credential_count"; + } else { + $credential_count_display = ''; + } + + // Software Count + $row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('software_id') AS num FROM software, software_contacts WHERE software.software_id = software_contacts.software_id AND software_contacts.contact_id = $contact_id AND software_archived_at IS NULL")); + $software_count = $row['num']; + if ($software_count) { + $software_count_display = "$software_count"; + } else { + $software_count_display = ''; + } + + // Ticket Count + $row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('ticket_id') AS num FROM tickets WHERE ticket_contact_id = $contact_id AND ticket_archived_at IS NULL")); + $ticket_count = $row['num']; + if ($ticket_count) { + $ticket_count_display = "$ticket_count"; + } else { + $ticket_count_display = ''; + } + + // Tags + $contact_tag_name_display_array = array(); + $contact_tag_id_array = array(); + $sql_contact_tags = mysqli_query($mysqli, "SELECT tag_color, tag_icon, contact_tags.tag_id, tag_name FROM contact_tags LEFT JOIN tags ON contact_tags.tag_id = tags.tag_id WHERE contact_id = $contact_id ORDER BY tag_name ASC"); + while ($row = mysqli_fetch_assoc($sql_contact_tags)) { + + $contact_tag_id = intval($row['tag_id']); + $contact_tag_name = escapeHtml($row['tag_name']); + $contact_tag_color = escapeHtml($row['tag_color']); + if (empty($contact_tag_color)) { + $contact_tag_color = "dark"; + } + $contact_tag_icon = escapeHtml($row['tag_icon']); + if (empty($contact_tag_icon)) { + $contact_tag_icon = "tag"; + } + + $contact_tag_id_array[] = $contact_tag_id; + $contact_tag_name_display_array[] = "$contact_tag_name"; + } + $contact_tags_display = implode('', $contact_tag_name_display_array); + + ?> - - - - + + + + + + - + - - - - - $contact_title"; - } - $contact_department = escapeHtml($row['contact_department']) ?: '-'; - $contact_extension = escapeHtml($row['contact_extension']); - if (empty($contact_extension)) { - $contact_extension_display = ""; - } else { - $contact_extension_display = "x$contact_extension"; - } - $contact_phone_country_code = escapeHtml($row['contact_phone_country_code']); - $contact_phone = escapeHtml(formatPhoneNumber($row['contact_phone'], $contact_phone_country_code)); - if (empty($contact_phone)) { - $contact_phone_display = ""; - } else { - $contact_phone_display = ""; - } - $contact_mobile_country_code = escapeHtml($row['contact_mobile_country_code']); - $contact_mobile = escapeHtml(formatPhoneNumber($row['contact_mobile'], $contact_mobile_country_code)); - if (empty($contact_mobile)) { - $contact_mobile_display = ""; - } else { - $contact_mobile_display = ""; - } - $contact_email = escapeHtml($row['contact_email']); - if (empty($contact_email)) { - $contact_email_display = ""; - } else { - $contact_email_display = ""; - } - $contact_info_display = "$contact_phone_display $contact_mobile_display $contact_email_display"; - if (empty($contact_info_display)) { - $contact_info_display = "-"; - } - $contact_pin = escapeHtml($row['contact_pin']); - $contact_photo = escapeHtml($row['contact_photo']); - $contact_initials = initials($contact_name); - $contact_notes = escapeHtml($row['contact_notes']); - $contact_primary = intval($row['contact_primary']); - $contact_important = intval($row['contact_important']); - $contact_billing = intval($row['contact_billing']); - $contact_technical = intval($row['contact_technical']); - $contact_created_at = escapeHtml($row['contact_created_at']); - $contact_archived_at = escapeHtml($row['contact_archived_at']); - if ($contact_primary == 1) { - $contact_primary_display = "Primary Contact"; - } else { - $contact_primary_display = false; - } - $contact_location_id = intval($row['contact_location_id']); - $location_name = escapeHtml($row['location_name']); - if (empty($location_name)) { - $location_name = "N/A"; - } - $location_archived_at = escapeHtml($row['location_archived_at']); - if ($location_archived_at) { - $location_name_display = "
$location_name
"; - } else { - $location_name_display = $location_name; - } - $auth_method = escapeHtml($row['user_auth_method']); - $contact_user_id = intval($row['contact_user_id']); - if ($contact_user_id) { - $user_exists_display = ""; - } else { - $user_exists_display = ""; - } - - // Counts - - // Asset Count - $row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('asset_id') AS num FROM assets WHERE asset_contact_id = $contact_id AND asset_archived_at IS NULL")); - $asset_count = $row['num']; - if ($asset_count) { - $asset_count_display = "$asset_count"; - } else { - $asset_count_display = ''; - } - - // Credential Count - $row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('credential_id') AS num FROM credentials WHERE credential_contact_id = $contact_id AND credential_archived_at IS NULL")); - $credential_count = $row['num']; - if ($credential_count) { - $credential_count_display = "$credential_count"; - } else { - $credential_count_display = ''; - } - - // Software Count - $row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('software_id') AS num FROM software, software_contacts WHERE software.software_id = software_contacts.software_id AND software_contacts.contact_id = $contact_id AND software_archived_at IS NULL")); - $software_count = $row['num']; - if ($software_count) { - $software_count_display = "$software_count"; - } else { - $software_count_display = ''; - } - - // Ticket Count - $row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('ticket_id') AS num FROM tickets WHERE ticket_contact_id = $contact_id AND ticket_archived_at IS NULL")); - $ticket_count = $row['num']; - if ($ticket_count) { - $ticket_count_display = "$ticket_count"; - } else { - $ticket_count_display = ''; - } - - // Tags - $contact_tag_name_display_array = array(); - $contact_tag_id_array = array(); - $sql_contact_tags = mysqli_query($mysqli, "SELECT tag_color, tag_icon, contact_tags.tag_id, tag_name FROM contact_tags LEFT JOIN tags ON contact_tags.tag_id = tags.tag_id WHERE contact_id = $contact_id ORDER BY tag_name ASC"); - while ($row = mysqli_fetch_assoc($sql_contact_tags)) { - - $contact_tag_id = intval($row['tag_id']); - $contact_tag_name = escapeHtml($row['tag_name']); - $contact_tag_color = escapeHtml($row['tag_color']); - if (empty($contact_tag_color)) { - $contact_tag_color = "dark"; - } - $contact_tag_icon = escapeHtml($row['tag_icon']); - if (empty($contact_tag_icon)) { - $contact_tag_icon = "tag"; - } - - $contact_tag_id_array[] = $contact_tag_id; - $contact_tag_name_display_array[] = "$contact_tag_name"; - } - $contact_tags_display = implode('', $contact_tag_name_display_array); - - ?> - - - - - - - - - - - - + + + - + ?> - -
+
+ +
+
+ + Name + + + + Department + + Contact + + Location + + + + Client + + Action
- +
- - Name + + +
+ + + "> + + + + + + + + +
+
">
+ +
+ +
+ +
+ +
+
- -
- - Department - - Contact - - Location - - + + - - Client - - Action
-
- -
-
- -
- - - "> - +
+ - - - -
-
- - -
+ + +
+ +
diff --git a/agent/credentials.php b/agent/credentials.php index a18cdbcba..fef71071a 100644 --- a/agent/credentials.php +++ b/agent/credentials.php @@ -100,8 +100,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); ?> -
-
+
+

Credentials

= 2) { ?> @@ -129,23 +129,23 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
+
-
+
-
+
-
+
@@ -192,7 +192,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
+
+
+ + -
- - text-nowrap"> - - - - - - - - - - - - - - - - +
-
- -
-
- - Name - - Username / IDPassword / KeyOTP - - URI - - - - Client - - Action
+ text-nowrap"> + + + + + + + + + + + + + + + + " . truncate($credential_uri,40) . ""; + while ($row = mysqli_fetch_assoc($sql)) { + $client_id = intval($row['client_id']); + $client_name = escapeHtml($row['client_name']); + $credential_id = intval($row['c_credential_id']); + $credential_name = escapeHtml($row['credential_name']); + $credential_description = escapeHtml($row['credential_description']); + $credential_uri = escapeUrl($row['credential_uri']); + if (empty($credential_uri)) { + $credential_uri_display = "-"; + } else { + $credential_uri_display = "" . truncate($credential_uri,40) . ""; + } + $credential_uri_2 = escapeUrl($row['credential_uri_2']); + $credential_username = escapeHtml(decryptCredentialEntry($row['credential_username'])); + if (empty($credential_username)) { + $credential_username_display = "-"; + } else { + $credential_username_display = "$credential_username"; + } + $credential_otp_secret = escapeHtml($row['credential_otp_secret']); + if (empty($credential_otp_secret)) { + $otp_display = "-"; + } else { + $otp_display = " Hover.."; + } + $credential_note = escapeHtml($row['credential_note']); + $credential_created_at = escapeHtml($row['credential_created_at']); + $credential_archived_at = escapeHtml($row['credential_archived_at']); + $credential_favorite = intval($row['credential_favorite']); + $credential_contact_id = intval($row['credential_contact_id']); + $contact_name = escapeHtml($row['contact_name']); + $credential_asset_id = intval($row['credential_asset_id']); + $asset_name = escapeHtml($row['asset_name']); + + // Tags + $credential_tag_name_display_array = array(); + $credential_tag_id_array = array(); + $sql_credential_tags = mysqli_query($mysqli, "SELECT tag_color, tag_icon, credential_tags.tag_id, tag_name FROM credential_tags LEFT JOIN tags ON credential_tags.tag_id = tags.tag_id WHERE credential_id = $credential_id ORDER BY tag_name ASC"); + while ($row = mysqli_fetch_assoc($sql_credential_tags)) { + + $credential_tag_id = intval($row['tag_id']); + $credential_tag_name = escapeHtml($row['tag_name']); + $credential_tag_color = escapeHtml($row['tag_color']); + if (empty($credential_tag_color)) { + $credential_tag_color = "dark"; } - $credential_uri_2 = escapeUrl($row['credential_uri_2']); - $credential_username = escapeHtml(decryptCredentialEntry($row['credential_username'])); - if (empty($credential_username)) { - $credential_username_display = "-"; - } else { - $credential_username_display = "$credential_username"; - } - $credential_otp_secret = escapeHtml($row['credential_otp_secret']); - if (empty($credential_otp_secret)) { - $otp_display = "-"; - } else { - $otp_display = " Hover.."; - } - $credential_note = escapeHtml($row['credential_note']); - $credential_created_at = escapeHtml($row['credential_created_at']); - $credential_archived_at = escapeHtml($row['credential_archived_at']); - $credential_favorite = intval($row['credential_favorite']); - $credential_contact_id = intval($row['credential_contact_id']); - $contact_name = escapeHtml($row['contact_name']); - $credential_asset_id = intval($row['credential_asset_id']); - $asset_name = escapeHtml($row['asset_name']); - - // Tags - $credential_tag_name_display_array = array(); - $credential_tag_id_array = array(); - $sql_credential_tags = mysqli_query($mysqli, "SELECT tag_color, tag_icon, credential_tags.tag_id, tag_name FROM credential_tags LEFT JOIN tags ON credential_tags.tag_id = tags.tag_id WHERE credential_id = $credential_id ORDER BY tag_name ASC"); - while ($row = mysqli_fetch_assoc($sql_credential_tags)) { - - $credential_tag_id = intval($row['tag_id']); - $credential_tag_name = escapeHtml($row['tag_name']); - $credential_tag_color = escapeHtml($row['tag_color']); - if (empty($credential_tag_color)) { - $credential_tag_color = "dark"; - } - $credential_tag_icon = escapeHtml($row['tag_icon']); - if (empty($credential_tag_icon)) { - $credential_tag_icon = "tag"; - } - - $credential_tag_id_array[] = $credential_tag_id; - $credential_tag_name_display_array[] = "$credential_tag_name"; - } - $credential_tags_display = implode('', $credential_tag_name_display_array); - - if ($credential_contact_id) { - $credential_contact_display = " - "; - } else { - $credential_contact_display = ''; + $credential_tag_icon = escapeHtml($row['tag_icon']); + if (empty($credential_tag_icon)) { + $credential_tag_icon = "tag"; } - if ($credential_asset_id) { - $credential_asset_display = " - "; - } else { - $credential_asset_display = ''; - } - - // Check if shared - $sql_shared = mysqli_query( - $mysqli, - "SELECT item_active, item_created_at, item_expire_at, item_id, item_key, item_note, item_recipient, - item_related_id, item_type, item_view_limit, item_views FROM shared_items - WHERE item_client_id = $client_id - AND item_active = 1 - AND (COALESCE(item_view_limit, 0) = 0 OR item_views < item_view_limit) - AND item_expire_at > NOW() - AND item_type = 'Credential' - AND item_related_id = $credential_id - LIMIT 1" - ); - if (mysqli_num_rows($sql_shared) > 0) { - $row = mysqli_fetch_assoc($sql_shared); - $item_id = intval($row['item_id']); - $item_active = escapeHtml($row['item_active']); - $item_key = escapeHtml($row['item_key']); - $item_type = escapeHtml($row['item_type']); - $item_related_id = intval($row['item_related_id']); - $item_note = escapeHtml($row['item_note']); - $item_recipient = escapeHtml($row['item_recipient']); - $item_views = escapeHtml($row['item_views']); - $item_view_limit = escapeHtml($row['item_view_limit']); - $item_created_at = escapeHtml($row['item_created_at']); - $item_expire_at = escapeHtml($row['item_expire_at']); - $item_expire_at_human = timeAgo($row['item_expire_at']); - } - - - ?> - "> - - - - - - - - - - - - - - $credential_tag_name"; + } + $credential_tags_display = implode('', $credential_tag_name_display_array); + if ($credential_contact_id) { + $credential_contact_display = " + "; + } else { + $credential_contact_display = ''; } - ?> + if ($credential_asset_id) { + $credential_asset_display = " + "; + } else { + $credential_asset_display = ''; + } - -
+
+ +
+
+ + Name + + Username / IDPassword / KeyOTP + + URI + + + + Client + + Action
-
- -
-
- -
- -
-
"; } ?>
-
- -
- -
- -
-
-
-
- - - - 0) { ?> -
- -
Shared -
- -
-
- -
-
- - - - -
-
-
- - -
+ // Check if shared + $sql_shared = mysqli_query( + $mysqli, + "SELECT item_active, item_created_at, item_expire_at, item_id, item_key, item_note, item_recipient, + item_related_id, item_type, item_view_limit, item_views FROM shared_items + WHERE item_client_id = $client_id + AND item_active = 1 + AND (COALESCE(item_view_limit, 0) = 0 OR item_views < item_view_limit) + AND item_expire_at > NOW() + AND item_type = 'Credential' + AND item_related_id = $credential_id + LIMIT 1" + ); + if (mysqli_num_rows($sql_shared) > 0) { + $row = mysqli_fetch_assoc($sql_shared); + $item_id = intval($row['item_id']); + $item_active = escapeHtml($row['item_active']); + $item_key = escapeHtml($row['item_key']); + $item_type = escapeHtml($row['item_type']); + $item_related_id = intval($row['item_related_id']); + $item_note = escapeHtml($row['item_note']); + $item_recipient = escapeHtml($row['item_recipient']); + $item_views = escapeHtml($row['item_views']); + $item_view_limit = escapeHtml($row['item_view_limit']); + $item_created_at = escapeHtml($row['item_created_at']); + $item_expire_at = escapeHtml($row['item_expire_at']); + $item_expire_at_human = timeAgo($row['item_expire_at']); + } + + + ?> + "> + +
+ +
+ + + +
+ +
+
"; } ?>
+
+ +
+ +
+ +
+
+
+ + + + + + + + + + 0) { ?> +
+ +
Shared +
+ +
+
+ + + + + + +
+ + + + +
+ + + + + + + +
+ +
diff --git a/agent/domains.php b/agent/domains.php index 82dc7dede..c4d2270de 100644 --- a/agent/domains.php +++ b/agent/domains.php @@ -87,8 +87,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); ?> -
-
+
+

Domains

@@ -106,15 +106,15 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
+
-
+
-
+
@@ -122,7 +122,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
+
@@ -170,7 +170,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
"> + class="btn btn-"> Archived -
-
+
+
-
- - - - - - text-nowrap"> - + + + + + +
+ text-nowrap"> + + + + + + + + + + + + + + + + + $domain_registrar_name + " : "-"; + $domain_webhost_name_display = $domain_webhost_name ? " + + $domain_webhost_name + " : "-"; + $domain_dnshost_name_display = $domain_dnshost_name ? " + + $domain_dnshost_name + " : "-"; + $domain_mailhost_name_display = $domain_mailhost_name ? " + + $domain_mailhost_name + " : "-"; + + ?> + - - - - - - - - - - - - - - - $domain_registrar_name - " : "-"; - $domain_webhost_name_display = $domain_webhost_name ? " - - $domain_webhost_name - " : "-"; - $domain_dnshost_name_display = $domain_dnshost_name ? " - - $domain_dnshost_name - " : "-"; - $domain_mailhost_name_display = $domain_mailhost_name ? " - - $domain_mailhost_name - " : "-"; - - ?> - - - - - - - - - - + + + + + + + + + + + + - + + + - + - -
+
+ +
+
+ + Domain + + + + Registrar + + + + Web Host + + + + DNS Host + + + + Mail Host + + + + Expires + + + + Client + + Action
- +
- - Domain - - - - Registrar - - - - Web Host - - - - DNS Host - - - - Mail Host - - - - Expires - - - - Client - - Action
-
- -
-
- -
- -
-
-
-
+
+ + -
- -
- -
+
+ +
-
- + -
+ + -
-
- +
+
diff --git a/agent/expenses.php b/agent/expenses.php index d79e391e4..71fa98d2a 100644 --- a/agent/expenses.php +++ b/agent/expenses.php @@ -63,8 +63,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); ?> -
-
+
+

Expenses

@@ -80,9 +80,9 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
-
-
+
+ +
@@ -127,11 +127,11 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
" id="advancedFilter"> -
+
" id="advancedFilter"> +
-
- +
+ @@ -139,8 +139,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
- +
+ @@ -180,8 +180,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
- +
+ +
+ + + + Date + + + + + Category + + / + + Description + + + + + Vendor + + + + + Amount + + + + + Account + + + + + Client + + + Action + + + + "; + } + + ?> -
- - "> - - - - - - + + + + + + + - - + - while ($row = mysqli_fetch_assoc($sql)) { - $expense_id = intval($row['expense_id']); - $expense_date = escapeHtml($row['expense_date']); - $expense_amount = floatval($row['expense_amount']); - $expense_currency_code = escapeHtml($row['expense_currency_code']); - $expense_description = escapeHtml($row['expense_description']); - $expense_receipt = escapeHtml($row['expense_receipt']); - $expense_reference = escapeHtml($row['expense_reference']); - $expense_created_at = escapeHtml($row['expense_created_at']); - $expense_vendor_id = intval($row['expense_vendor_id']); - $vendor_name = escapeHtml($row['vendor_name']); - $expense_category_id = intval($row['expense_category_id']); - $category_name = escapeHtml($row['category_name']); - $account_name = escapeHtml($row['account_name']); - $expense_account_id = intval($row['expense_account_id']); - $client_name = escapeHtml($row['client_name']); - if(empty($client_name)) { - $client_name_display = "-"; - } else { - $client_name_display = $client_name; - } - $expense_client_id = intval($row['expense_client_id']); - - if (empty($expense_receipt)) { - $receipt_attached = ""; - } else { - $path_info = pathinfo($expense_receipt); - $ext = $path_info['extension']; - $receipt_attached = ""; - } - - ?> - - - - - - - - - - - - - - - -
- +
- - Date + + + + - - - - Category - - / - - Description - - - - Vendor - - - - Amount - - - - Account - - - - Client - - Action + +
+
+ +
-
- -
-
- - - - - - -
-
- -
-
- + +
+
diff --git a/agent/files.php b/agent/files.php index 6cc9c014a..7265c98d5 100644 --- a/agent/files.php +++ b/agent/files.php @@ -676,7 +676,7 @@ $num_root_items = intval($row_root_files['num']) + intval($row_root_docs['num'])
- +
"> + = 3 && lookupUserPermission("module_financial") >= 3) { ?> + + + + + + + + + + + + + + + + + + + +
diff --git a/agent/income.php b/agent/income.php index 9ae2a61d2..118019a10 100644 --- a/agent/income.php +++ b/agent/income.php @@ -161,8 +161,8 @@ $summary_total_income = floatval($row['total_income']); ?> -
-
+
+

Income

= 2) { ?> @@ -187,21 +187,21 @@ $summary_total_income = floatval($row['total_income']);
-
- +
+ -
+
-
+
-
+
@@ -234,7 +234,7 @@ $summary_total_income = floatval($row['total_income']);
-
+
@@ -323,227 +323,226 @@ $summary_total_income = floatval($row['total_income']);
-
+
-
-
- -
-
-

-

Invoice Payments

-
-
- -
+
+
+ +
+
+

+

Invoice Payments

+
+
+
- - -
- -
-
-

-

Other Revenue

-
-
- -
-
-
- - -
- -
-
-

-

Total Income

-
-
- -
-
-
-
+ -
- - text-nowrap"> - - = 3 && lookupUserPermission("module_financial") >= 3) { ?> - - - - - - - - - - - - - - - - - - + +
+
+

+

Other Revenue

+
+
+ +
+
+ + - while ($row = mysqli_fetch_assoc($sql)) { - $income_type = escapeHtml($row['income_type']); - $income_id = intval($row['income_id']); - $income_date = escapeHtml($row['income_date']); - $income_invoice_id = intval($row['income_invoice_id']); - $income_source = escapeHtml($row['income_source']); - $income_category = escapeHtml($row['income_category']); - $income_client_id = intval($row['income_client_id']); - $income_client = escapeHtml($row['income_client']); - $income_amount = floatval($row['income_amount']); - $income_currency_code = escapeHtml($row['income_currency_code']); - $income_method = escapeHtml($row['income_method']); - $income_reference = escapeHtml($row['income_reference']); - if (empty($income_reference)) { - $income_reference_display = "-"; - } else { - $income_reference_display = $income_reference; - } - $income_account = escapeHtml($row['income_account']); - $income_account_archived = escapeHtml($row['income_account_archived']); - if (empty($income_account_archived)) { - $income_account_archived_display = ""; - } else { - $income_account_archived_display = "Archived - "; - } +
+ +
+
+

+

Total Income

+
+
+ +
+
+
+ + - // Each type keeps its own edit modal and delete handler - if ($income_type == 'Payment') { - $income_edit_modal = "modals/payment/payment_edit.php?id=$income_id"; - $income_delete_action = "delete_payment=$income_id"; - $income_type_badge = "bg-primary"; - } else { - $income_edit_modal = "modals/revenue/revenue_edit.php?id=$income_id"; - $income_delete_action = "delete_revenue=$income_id"; - $income_type_badge = "bg-info"; - } +
+
-
- -
-
- - Date - - - - Type - - - - Source - - - - Category - - - - Client - - - - Amount - - - - Method - - - - Reference - - - - Account - - Action
+ text-nowrap"> + + = 3 && lookupUserPermission("module_financial") >= 3) { ?> + + + + + + + + + + + + + + + + + + - - - = 3 && lookupUserPermission("module_financial") >= 3) { ?> - - - - - - - - - - - - - - - - - - -
+
+ +
+
+ + Date + + + + Type + + + + Source + + + + Category + + + + Client + + + + Amount + + + + Method + + + + Reference + + + + Account + + Action
-
- -
-
- - - - - - - - - - - - - - - - - - - - = 3) { ?> - - -
-
- +
+
+ +
+
+ + + + + + + + + + + + + + + + - + + + = 3) { ?> + + +
+
diff --git a/agent/invoices.php b/agent/invoices.php index 7c39b75e4..a38c77d33 100644 --- a/agent/invoices.php +++ b/agent/invoices.php @@ -161,8 +161,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
-
+
+

Invoices

@@ -183,15 +183,15 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
-
+
+ -
+
-
+
@@ -200,7 +200,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
+
@@ -256,215 +256,214 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
-
- -
- - text-nowrap"> - - - - - - - - - - - - - - - - - - $recurring_invoice_prefix$recurring_invoice_number"; - } else { - $recurring_invoice_display = "-"; - } - - $now = time(); - - if (($invoice_status == "Sent" || $invoice_status == "Partial" || $invoice_status == "Viewed") && strtotime($invoice_due) + 86400 < $now) { - $overdue_color = "text-danger fw-bold"; - } else { - $overdue_color = ""; - } - - $invoice_badge_color = getInvoiceBadgeColor($invoice_status); - - // Saved Payment Methods - $sql_saved_payment_methods = mysqli_query($mysqli, " - SELECT 1 FROM client_saved_payment_methods - LEFT JOIN payment_providers - ON client_saved_payment_methods.saved_payment_provider_id = payment_providers.payment_provider_id - WHERE saved_payment_client_id = $client_id - AND payment_provider_active = 1; - "); - - ?> - - - - - - - - - - - - - - - - - - + + +
+
-
- -
-
- - Number - - - - Scope - - - - Client - - - - Amount - - - - Date - - - - Due - - - - Category - - - - Status - - RecurringAction
-
- -
-
- - - - - - - - - - - - - - - - - -
+ text-nowrap"> + + + + + + + + + + + + + + + + + + $recurring_invoice_prefix$recurring_invoice_number"; + } else { + $recurring_invoice_display = "-"; + } + + $now = time(); + + if (($invoice_status == "Sent" || $invoice_status == "Partial" || $invoice_status == "Viewed") && strtotime($invoice_due) + 86400 < $now) { + $overdue_color = "text-danger fw-bold"; + } else { + $overdue_color = ""; + } + + $invoice_badge_color = getInvoiceBadgeColor($invoice_status); + + // Saved Payment Methods + $sql_saved_payment_methods = mysqli_query($mysqli, " + SELECT 1 FROM client_saved_payment_methods + LEFT JOIN payment_providers + ON client_saved_payment_methods.saved_payment_provider_id = payment_providers.payment_provider_id + WHERE saved_payment_client_id = $client_id + AND payment_provider_active = 1; + "); ?> - -
+
+ +
+
+ + Number + + + + Scope + + + + Client + + + + Amount + + + + Date + + + + Due + + + + Category + + + + Status + + RecurringAction
-
-
- -
+ + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
diff --git a/agent/locations.php b/agent/locations.php index 767c25abf..803c737cc 100644 --- a/agent/locations.php +++ b/agent/locations.php @@ -74,8 +74,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); ?> -
-
+
+

Locations

@@ -99,23 +99,23 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
+
-
+
-
+
-
+
@@ -172,7 +172,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
"> + class="btn btn-"> Archived -
-
- +
+ + -
- - "> +
+
+ "> + + + + + + + + + + + + + + ') ?: '-'; + $location_phone_country_code = escapeHtml($row['location_phone_country_code']); + $location_phone = escapeHtml(formatPhoneNumber($row['location_phone'], $location_phone_country_code)); + if (empty($location_phone)) { + $location_phone_display = "-"; + } else { + $location_phone_display = $location_phone; + } + $location_fax_country_code = escapeHtml($row['location_fax_country_code']); + $location_fax = escapeHtml(formatPhoneNumber($row['location_fax'], $location_fax_country_code)); + if ($location_fax) { + $location_fax_display = "
Fax: $location_fax
"; + } else { + $location_fax_display = ''; + } + $location_hours = escapeHtml($row['location_hours']); + if (empty($location_hours)) { + $location_hours_display = "-"; + } else { + $location_hours_display = $location_hours; + } + $location_photo = escapeHtml($row['location_photo']); + $location_notes = escapeHtml($row['location_notes']); + $location_created_at = escapeHtml($row['location_created_at']); + $location_archived_at = escapeHtml($row['location_archived_at']); + $location_contact_id = intval($row['location_contact_id']); + $location_primary = intval($row['location_primary']); + if ( $location_primary == 1 ) { + $location_primary_display = " Primary"; + } else { + $location_primary_display = ""; + } + + // Tags + + $location_tag_name_display_array = array(); + $location_tag_id_array = array(); + $sql_location_tags = mysqli_query($mysqli, "SELECT tag_color, tag_icon, location_tags.tag_id, tag_name FROM location_tags LEFT JOIN tags ON location_tags.tag_id = tags.tag_id WHERE location_tags.location_id = $location_id ORDER BY tag_name ASC"); + while ($row = mysqli_fetch_assoc($sql_location_tags)) { + + $location_tag_id = intval($row['tag_id']); + $location_tag_name = escapeHtml($row['tag_name']); + $location_tag_color = escapeHtml($row['tag_color']); + if (empty($location_tag_color)) { + $location_tag_color = "dark"; + } + $location_tag_icon = escapeHtml($row['tag_icon']); + if (empty($location_tag_icon)) { + $location_tag_icon = "tag"; + } + + $location_tag_id_array[] = $location_tag_id; + $location_tag_name_display_array[] = "$location_tag_name"; + } + $location_tags_display = implode('', $location_tag_name_display_array); + + ?> - - - - - - - - - - - - ') ?: '-'; - $location_phone_country_code = escapeHtml($row['location_phone_country_code']); - $location_phone = escapeHtml(formatPhoneNumber($row['location_phone'], $location_phone_country_code)); - if (empty($location_phone)) { - $location_phone_display = "-"; - } else { - $location_phone_display = $location_phone; - } - $location_fax_country_code = escapeHtml($row['location_fax_country_code']); - $location_fax = escapeHtml(formatPhoneNumber($row['location_fax'], $location_fax_country_code)); - if ($location_fax) { - $location_fax_display = "
Fax: $location_fax
"; - } else { - $location_fax_display = ''; - } - $location_hours = escapeHtml($row['location_hours']); - if (empty($location_hours)) { - $location_hours_display = "-"; - } else { - $location_hours_display = $location_hours; - } - $location_photo = escapeHtml($row['location_photo']); - $location_notes = escapeHtml($row['location_notes']); - $location_created_at = escapeHtml($row['location_created_at']); - $location_archived_at = escapeHtml($row['location_archived_at']); - $location_contact_id = intval($row['location_contact_id']); - $location_primary = intval($row['location_primary']); - if ( $location_primary == 1 ) { - $location_primary_display = " Primary"; - } else { - $location_primary_display = ""; - } - - // Tags - - $location_tag_name_display_array = array(); - $location_tag_id_array = array(); - $sql_location_tags = mysqli_query($mysqli, "SELECT tag_color, tag_icon, location_tags.tag_id, tag_name FROM location_tags LEFT JOIN tags ON location_tags.tag_id = tags.tag_id WHERE location_tags.location_id = $location_id ORDER BY tag_name ASC"); - while ($row = mysqli_fetch_assoc($sql_location_tags)) { - - $location_tag_id = intval($row['tag_id']); - $location_tag_name = escapeHtml($row['tag_name']); - $location_tag_color = escapeHtml($row['tag_color']); - if (empty($location_tag_color)) { - $location_tag_color = "dark"; - } - $location_tag_icon = escapeHtml($row['tag_icon']); - if (empty($location_tag_icon)) { - $location_tag_icon = "tag"; - } - - $location_tag_id_array[] = $location_tag_id; - $location_tag_name_display_array[] = "$location_tag_name"; - } - $location_tags_display = implode('', $location_tag_name_display_array); - - ?> - - - - - - - - - - - + + + + + + + + + + - -
+
+ +
+
+ + Name + + + + Address + + + + Phone + + + + Hours + + + + Client + + Action
- +
- - Name - - - - Address - - - - Phone - - - - Hours - - - - Client - - Action
-
- -
-
- -
- -
-
>
-
-
- -
- -
- -
-
-
-
- " - target="_blank"> - - - - - - + +
+ +
+
>
+
+
+ +
+ +
-
+ " + target="_blank"> + + + + + + +
-
- - -
+ + + + +
+ +
diff --git a/agent/networks.php b/agent/networks.php index b91b164f6..817e1c7f9 100644 --- a/agent/networks.php +++ b/agent/networks.php @@ -75,8 +75,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); ?> -
-
+
+

Networks

@@ -100,16 +100,16 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
+
-
+
-
+
@@ -173,7 +173,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
"> + class="btn btn-"> Archived -
-
+
+
-
- + + - - "> +
+ "> + + + + + + + + + + + + + + + + + $network_secondary_dns"; + } else { + $network_dns_display = "-"; + } + $network_dhcp_range = escapeHtml($row['network_dhcp_range']); + if (empty($network_dhcp_range)) { + $network_dhcp_range_display = "-"; + } else { + $network_dhcp_range_display = $network_dhcp_range; + } + $network_location_id = intval($row['network_location_id']); + $location_name = escapeHtml($row['location_name']); + if (empty($location_name)) { + $location_name_display = "-"; + } else { + $location_name_display = $location_name; + } + $network_archived_at = escapeHtml($row['network_archived_at']); + + ?> - - - - - - + + + + + + + - + - - - - - $network_secondary_dns"; - } else { - $network_dns_display = "-"; - } - $network_dhcp_range = escapeHtml($row['network_dhcp_range']); - if (empty($network_dhcp_range)) { - $network_dhcp_range_display = "-"; - } else { - $network_dhcp_range_display = $network_dhcp_range; - } - $network_location_id = intval($row['network_location_id']); - $location_name = escapeHtml($row['location_name']); - if (empty($location_name)) { - $location_name_display = "-"; - } else { - $location_name_display = $location_name; - } - $network_archived_at = escapeHtml($row['network_archived_at']); - - ?> - - - - - - - - - - - - - - + + + - + - -
+
+ +
+
+ + Name + + + + Location + + + + VLAN + + + + Network (CIDR) + + + + Gateway + + + + IP Range + + + + DNS + + + + Client + + Action
- +
- - Name + + +
+ +
+
+
+
+
- -
- - Location - - - - VLAN - - - - Network (CIDR) - - - - Gateway - - - - IP Range - - - - DNS - - - - Client - - Action
-
- -
-
- -
- -
-
-
-
-
-
-
- + -
+ + -
-
- +
+
diff --git a/agent/notifications.php b/agent/notifications.php index e471a49f4..2fee78213 100644 --- a/agent/notifications.php +++ b/agent/notifications.php @@ -82,7 +82,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
- +
">
diff --git a/agent/products.php b/agent/products.php index 65e31bfdf..e54a7b6c5 100644 --- a/agent/products.php +++ b/agent/products.php @@ -55,8 +55,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); ?> -
-
+
+

@@ -85,20 +85,20 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
-
+
+ -
+
-
+
-
+
+
+ + -
- - text-nowrap"> +
+
+ text-nowrap"> + + + + + + + + + + + + + + + + + $product_description"; + } + $product_qty = intval($row['product_qty']); + $product_code = escapeHtml($row['product_code']); + $product_location = escapeHtml($row['product_location']) ?: '-'; + $product_price = floatval($row['product_price']); + $product_currency_code = escapeHtml($row['product_currency_code']); + $product_created_at = escapeHtml($row['product_created_at']); + $product_archived_at = escapeHtml($row['product_archived_at']); + $category_id = intval($row['category_id']); + $category_name = escapeHtml($row['category_name']); + $product_tax_id = intval($row['product_tax_id']); + $tax_name = escapeHtml($row['tax_name']) ?: '-'; + $tax_percent = floatval($row['tax_percent']); + + + ?> - - + + + - - + + - - - - + + + + + - - + $product_description"; - } - $product_qty = intval($row['product_qty']); - $product_code = escapeHtml($row['product_code']); - $product_location = escapeHtml($row['product_location']) ?: '-'; - $product_price = floatval($row['product_price']); - $product_currency_code = escapeHtml($row['product_currency_code']); - $product_created_at = escapeHtml($row['product_created_at']); - $product_archived_at = escapeHtml($row['product_archived_at']); - $category_id = intval($row['category_id']); - $category_name = escapeHtml($row['category_name']); - $product_tax_id = intval($row['product_tax_id']); - $tax_name = escapeHtml($row['tax_name']) ?: '-'; - $tax_percent = floatval($row['tax_percent']); + } + ?> - ?> - - - - - - - - - - - - - - - - - - - -
+
+ +
+
+ + Name + + + + Category + + + + Description + + + + QTY + + + + Location + + + + Tax Name + + + + Tax Rate + + + + Price + + Action
- +
- - Name + + + + $product_code"; } ?> - - - - Category - - - - Description - - - - QTY - - - - Location - - - - Tax Name - - - - Tax Rate - - - - Price - - Action% + +
-
- -
-
- - - $product_code"; } ?> - - % - -
-
- - -
+ +
+
+ +
diff --git a/agent/projects.php b/agent/projects.php index 4bd99a8b4..8bc737542 100644 --- a/agent/projects.php +++ b/agent/projects.php @@ -49,8 +49,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); ?> -
-
+
+

Projects

= 2) { ?>
@@ -59,31 +59,31 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
-
+
+ -
+
-
+
-
+
@@ -91,11 +91,11 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
" id="advancedFilter"> -
+
" id="advancedFilter"> +
-
- +
+ @@ -105,201 +105,200 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
-
- - text-nowrap"> - - - - - - - - - - - - - - - - - - +
+
- - Number - - - - Project - - Tickets / Tasks - - Due - - - - Completed - - - - Manager - - - - Created - - - - Client - - Action
+ text-nowrap"> + + + + + + + + + + + + + + + + + + $client_name"; - } else { - $client_name_display = "-"; - } + $client_id = intval($row['client_id']); + $client_name = escapeHtml($row['client_name']); + if ($client_name) { + $client_name_display = "$client_name"; + } else { + $client_name_display = "-"; + } - $project_manager = intval($row['user_id']); - if ($project_manager) { - $project_manager_display = escapeHtml($row['user_name']); - } else { - $project_manager_display = "-"; - } + $project_manager = intval($row['user_id']); + if ($project_manager) { + $project_manager_display = escapeHtml($row['user_name']); + } else { + $project_manager_display = "-"; + } - // Get Tasks and Tickets Stats - // Get Tickets - $row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('ticket_id') AS count FROM tickets WHERE ticket_project_id = $project_id")); - $ticket_count = $row['count']; + // Get Tasks and Tickets Stats + // Get Tickets + $row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('ticket_id') AS count FROM tickets WHERE ticket_project_id = $project_id")); + $ticket_count = $row['count']; - // Get Closed Ticket Count - $row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('ticket_id') AS count FROM tickets WHERE ticket_project_id = $project_id AND ticket_closed_at IS NOT NULL")); - $closed_ticket_count = $row['count']; + // Get Closed Ticket Count + $row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('ticket_id') AS count FROM tickets WHERE ticket_project_id = $project_id AND ticket_closed_at IS NOT NULL")); + $closed_ticket_count = $row['count']; - // Ticket Closed Percent - if($ticket_count) { - $tickets_closed_percent = round(($closed_ticket_count / $ticket_count) * 100); - } - // Get All Tasks - $row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('task_id') AS count FROM tickets, tasks WHERE ticket_id = task_ticket_id AND ticket_project_id = $project_id")); - $task_count = $row['count']; + // Ticket Closed Percent + if($ticket_count) { + $tickets_closed_percent = round(($closed_ticket_count / $ticket_count) * 100); + } + // Get All Tasks + $row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('task_id') AS count FROM tickets, tasks WHERE ticket_id = task_ticket_id AND ticket_project_id = $project_id")); + $task_count = $row['count']; - // Get Completed Task Count - $row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('task_id') AS count FROM tickets, tasks WHERE ticket_id = task_ticket_id AND ticket_project_id = $project_id AND task_completed_at IS NOT NULL")); - $completed_task_count = $row['count']; - - // Tasks Completed Percent - if($task_count) { - $tasks_completed_percent = round(($completed_task_count / $task_count) * 100); - } - - ?> - - - - - - - - - - - - - - - - - - - -
+ + Number + + + + Project + + Tickets / Tasks + + Due + + + + Completed + + + + Manager + + + + Created + + + + Client + + Action
- - - - - -
- -
-
-
-
-
-
-
- -
- -
/
-
- -"; } ?> - -
- -
/
-
- -
- -
-
- + + + + + + + + +
+ +
+
+
+
+
+
+ + + +
+ +
/
+
+ -
"; } ?> + +
+ +
/
+
+ + + + + + + + + + + + + + + + + + + +
+
-
-
+
+

Quotes

= 2) { ?> @@ -57,12 +57,12 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
-
+
+ -
+
@@ -76,11 +76,11 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
" id="advancedFilter"> -
+
" id="advancedFilter"> +
-
- +
+ @@ -90,168 +90,167 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
-
- - text-nowrap"> - - - - - - - - - - - - - - - - +
+
- - Number - - - - Scope - - - - Client - - - - Amount - - - - Date - - - - Expire - - - - Category - - - - Status - - Action
+ text-nowrap"> + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - -
+ + Number + + + + Scope + + + + Client + + + + Amount + + + + Date + + + + Expire + + + + Category + + + + Status + + Action
- - - - - - - - - - - -
-
- + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
-
-
+
+

Recurring Expenses

-
-
-
+
+ +
@@ -53,11 +53,11 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
" id="advancedFilter"> -
+
" id="advancedFilter"> +
-
- +
+ @@ -67,152 +67,151 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
-
- - "> - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
+
- - Next Date - - - - Category - - / - - Description - - - - Vendor - - - - Amount - - - - Frequency - - - - Last Billed - - - - Account - - - - Client - - Action
- - - - - -
-
- -
+ "> + + + + + + + + + + + + + + - -
+ + Next Date + + + + Category + + / + + Description + + + + Vendor + + + + Amount + + + + Frequency + + + + Last Billed + + + + Account + + + + Client + + Action
-
- + + + + + + + + +
+ + + + + + + + + + + + + + + +
+
-
-
+
+

Recurring Invoices

= 2) { ?>
@@ -72,15 +72,15 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
-
+
+ -
+
-
+
@@ -96,9 +96,9 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
" id="advancedFilter"> -
+
-
+
@@ -109,178 +109,178 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
-
- - text-nowrap"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Number - - - - Next Date - - - - Scope - - - - Client - - - - Amount - - - - Frequency - - - - Last Sent - - - - Category - - - - Auto Pay - - - - Status - - Action
- - - - ly - 0) { ?> -
- - - - -
- - No Cards on File - -
- - - - - - -
-
-
+ +
+ + text-nowrap"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + Number + + + + Next Date + + + + Scope + + + + Client + + + + Amount + + + + Frequency + + + + Last Sent + + + + Category + + + + Auto Pay + + + + Status + + Action
+ + + + ly + 0) { ?> +
+ + + + +
+ + No Cards on File + +
+ + + + + + +
+
+
-
-
+
+

Recurring Tickets

= 2) { ?>
@@ -99,22 +99,22 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
+
-
+
-
+
-
+
@@ -152,7 +152,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
+
+ + + + + text-nowrap"> + + + + + + + + + + + + + + = 2) { ?> + + + + + + + + "; + } else { + $recurring_ticket_billable_display = "-"; + } + $recurring_ticket_category = escapeHtml($row['category_name']) ?: '-'; + $recurring_ticket_client_name = escapeHtml($row['client_name']); + $assigned_to = escapeHtml($row['user_name']) ?: '-'; + $recurring_ticket_template_name = escapeHtml($row['ticket_template_name']); + $recurring_ticket_task_count = intval($row['recurring_ticket_task_count']); + ?> -
+
+ +
+
+ + Next Run Date + + + + Subject + + + + Category + + + + Priority + + + + Frequency + + + + Billable + + + + Agent + + + + Client + + Action
- text-nowrap"> - + - - - - - - + + + + + + + + + + + + + + + - + = 2) { ?> - - - - - - - - "; - } else { - $recurring_ticket_billable_display = "-"; - } - $recurring_ticket_category = escapeHtml($row['category_name']) ?: '-'; - $recurring_ticket_client_name = escapeHtml($row['client_name']); - $assigned_to = escapeHtml($row['user_name']) ?: '-'; - $recurring_ticket_template_name = escapeHtml($row['ticket_template_name']); - $recurring_ticket_task_count = intval($row['recurring_ticket_task_count']); - ?> - - - - - - - - - - - - - + - = 2) { ?> - - + - + - + - +
- +
- - Next Run Date + + + - - - - Subject - - - - Category - - - - Priority - - - - Frequency - - - - Billable - - - - Agent - - - - Client - + Action
-
- +
+ - - - - - - - - - - - - - - - -
- - - - -
- - +
+ + +
diff --git a/agent/services.php b/agent/services.php index 6056a2d56..685cee73d 100644 --- a/agent/services.php +++ b/agent/services.php @@ -47,8 +47,8 @@ $sql = mysqli_query( $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); ?> -
-
+
+

Services

= 2) { ?> @@ -57,15 +57,15 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
+
-
+
-
+
@@ -108,115 +108,114 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
+
-
- - "> - - - - - - - - - - - - - +
- - Name - - - - Category - - - - Importance - - - - Updated - - - - Client - - Action
+ "> + + + + + + + + + + + + + - - - - - - - - - - - - - - - - -
+ + Name + + + + Category + + + + Importance + + + + Updated + + + + Client + + Action
- -
- -
-
-
-
-
-
- -
- -
-
- + + + + +
+ +
+
+
+
+
+
+ + + + + + + + + + + + + + + + + +
+
-
-
+
+

Software & Licenses

@@ -104,16 +104,16 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
+
-
+
-
+
@@ -121,7 +121,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
+
@@ -169,7 +169,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
@@ -177,181 +177,180 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
-
- - text-nowrap"> - - - - - - - - - - - - - - - +
+
- - Software - - - - Type - - - - License Type - - - - Seats - - - - Expire - - - - Vendor - - - - Client - - Action
+ text-nowrap"> + + + + + + + + + + + + + + + $vendor_name"; + while ($row = mysqli_fetch_assoc($sql)) { + $client_id = intval($row['client_id']); + $client_name = escapeHtml($row['client_name']); + $software_id = intval($row['software_id']); + $software_name = escapeHtml($row['software_name']); + $software_description = escapeHtml($row['software_description']); + $software_version = escapeHtml($row['software_version']); + $software_type = escapeHtml($row['software_type']); + $software_license_type = escapeHtml($row['software_license_type']) ?: '-'; + $software_seats = escapeHtml($row['software_seats']); + $software_expire = escapeHtml($row['software_expire']); + $vendor_name = escapeHtml($row['vendor_name']); + $vendor_id = intval($row['vendor_id']); + if ($vendor_name) { + $vendor_display = "$vendor_name"; + } else { + $vendor_display = "N/A"; + } + if ($software_expire) { + $software_expire_ago = timeAgo($software_expire); + $software_expire_display = "
$software_expire
$software_expire_ago
"; + + // Convert the expiry date to a timestamp + $software_expire_timestamp = strtotime($row['software_expire']); + $current_timestamp = time(); // Get current timestamp + + // Calculate the difference in days + $days_until_expiry = ($software_expire_timestamp - $current_timestamp) / (60 * 60 * 24); + + // Determine the class based on the number of days until expiry + if ($days_until_expiry <= 0) { + $tr_class = "table-secondary"; + } elseif ($days_until_expiry <= 7) { + $tr_class = "table-danger"; + } elseif ($days_until_expiry <= 45) { + $tr_class = "table-warning"; } else { - $vendor_display = "N/A"; - } - if ($software_expire) { - $software_expire_ago = timeAgo($software_expire); - $software_expire_display = "
$software_expire
$software_expire_ago
"; - - // Convert the expiry date to a timestamp - $software_expire_timestamp = strtotime($row['software_expire']); - $current_timestamp = time(); // Get current timestamp - - // Calculate the difference in days - $days_until_expiry = ($software_expire_timestamp - $current_timestamp) / (60 * 60 * 24); - - // Determine the class based on the number of days until expiry - if ($days_until_expiry <= 0) { - $tr_class = "table-secondary"; - } elseif ($days_until_expiry <= 7) { - $tr_class = "table-danger"; - } elseif ($days_until_expiry <= 45) { - $tr_class = "table-warning"; - } else { - $tr_class = ''; - } - - } else { - $software_expire_display = "N/A"; $tr_class = ''; } - $software_created_at = escapeHtml($row['software_created_at']); - - $seat_count = 0; - - // Asset Licenses - $asset_licenses_sql = mysqli_query($mysqli, "SELECT asset_id FROM software_assets WHERE software_id = $software_id"); - $asset_licenses_array = array(); - while ($row = mysqli_fetch_assoc($asset_licenses_sql)) { - $asset_licenses_array[] = intval($row['asset_id']); - $seat_count = $seat_count + 1; - } - $asset_licenses = implode(',', $asset_licenses_array); - - // Contact Licenses - $contact_licenses_sql = mysqli_query($mysqli, "SELECT contact_id FROM software_contacts WHERE software_id = $software_id"); - $contact_licenses_array = array(); - while ($row = mysqli_fetch_assoc($contact_licenses_sql)) { - $contact_licenses_array[] = intval($row['contact_id']); - $seat_count = $seat_count + 1; - } - $contact_licenses = implode(',', $contact_licenses_array); - - - - ?> - - - - - - - - - - - - - - N/A"; + $tr_class = ''; } - ?> + $software_created_at = escapeHtml($row['software_created_at']); - -
+ + Software + + + + Type + + + + License Type + + + + Seats + + + + Expire + + + + Vendor + + + + Client + + Action
- -
- -
-
$software_version" ?>
-
-
-
-
-
- -
-
- + $seat_count = 0; + + // Asset Licenses + $asset_licenses_sql = mysqli_query($mysqli, "SELECT asset_id FROM software_assets WHERE software_id = $software_id"); + $asset_licenses_array = array(); + while ($row = mysqli_fetch_assoc($asset_licenses_sql)) { + $asset_licenses_array[] = intval($row['asset_id']); + $seat_count = $seat_count + 1; + } + $asset_licenses = implode(',', $asset_licenses_array); + + // Contact Licenses + $contact_licenses_sql = mysqli_query($mysqli, "SELECT contact_id FROM software_contacts WHERE software_id = $software_id"); + $contact_licenses_array = array(); + while ($row = mysqli_fetch_assoc($contact_licenses_sql)) { + $contact_licenses_array[] = intval($row['contact_id']); + $seat_count = $seat_count + 1; + } + $contact_licenses = implode(',', $contact_licenses_array); + + + + ?> + + + +
+ +
+
$software_version" ?>
+
+
+
+
+ + + + + + + + + + + + + + + + + +
+
-
-
+
- + -
- -

No tickets match these filters.

- - Clear the filters - -
+
+ +

No tickets match these filters.

+ + Clear the filters + +
- + -
- + + - = 2) { ?> - -
diff --git a/agent/tickets.php b/agent/tickets.php index 0c44ac481..200444875 100644 --- a/agent/tickets.php +++ b/agent/tickets.php @@ -323,8 +323,8 @@ if ($date_filter_active) { ?> -
-
+
+

Tickets Open | @@ -350,7 +350,7 @@ if ($date_filter_active) {

-
+
@@ -364,9 +364,9 @@ if ($date_filter_active) { -
+
-
+
-
" id="advancedFilter"> -
+
" id="advancedFilter"> +
-
+
@@ -437,7 +437,7 @@ if ($date_filter_active) {
-
+
@@ -471,7 +471,7 @@ if ($date_filter_active) {
-
+
@@ -506,7 +506,7 @@ if ($date_filter_active) {
-
+
diff --git a/agent/transactions.php b/agent/transactions.php index 9c9e31a11..f4804e8c8 100644 --- a/agent/transactions.php +++ b/agent/transactions.php @@ -217,8 +217,8 @@ if ($account_filter) { ?> -
-
+
+

Transactions

@@ -227,12 +227,12 @@ if ($account_filter) {
-
- -
+
+ +
-
- +
+
@@ -240,8 +240,8 @@ if ($account_filter) {
-
- +
+ @@ -283,8 +283,8 @@ if ($account_filter) {
-
- +
+ @@ -325,8 +325,8 @@ if ($account_filter) {
-
- +
+ @@ -353,8 +353,8 @@ if ($account_filter) {
-
- +
+ @@ -363,181 +363,181 @@ if ($account_filter) {
-
+
- + -
-
- -
-
-

-

Money In

-
-
- -
+
+
+ +
+
+

+

Money In

+
+
+
- - -
- -
-
-

-

Money Out

-
-
- -
-
-
- - -
- -
"> -
-

-

Net

-
-
- -
-
-
-
+ -
- - "> - - - - - - - - - - - - + +
+
+

+

Money Out

+
+
+ +
+
+ + - while ($row = mysqli_fetch_assoc($sql)) { - $transaction_id = intval($row['transaction_id']); - $transaction_transfer_id = intval($row['transaction_transfer_id']); - $transaction_invoice_id = intval($row['transaction_invoice_id']); - $transaction_type = escapeHtml($row['transaction_type']); - $transaction_date = escapeHtml($row['transaction_date']); - $transaction_description = escapeHtml($row['transaction_description']); - $transaction_category = escapeHtml($row['transaction_category']); - $transaction_other_account = escapeHtml($row['transaction_other_account']); - $transaction_amount = floatval($row['transaction_amount']); - $transaction_balance = floatval($row['transaction_balance']); - $transaction_currency_code = escapeHtml($row['transaction_currency_code']); +
+ +
"> +
+

+

Net

+
+
+ +
+
+
+ + - // Category cell display - transfers show the other account instead of a category - if ($transaction_type == 'Transfer In') { - $transaction_category_display = "From $transaction_other_account"; - } elseif ($transaction_type == 'Transfer Out') { - $transaction_category_display = "To $transaction_other_account"; - } else { - $transaction_category_display = $transaction_category; - } +
+
- - Date - - - - Type - - - - Category - - / - - Description - - - - Amount - - Balance
+ "> + + + + + + + + + + + + - - - - - - - - - - - - From $transaction_other_account"; + } elseif ($transaction_type == 'Transfer Out') { + $transaction_category_display = "To $transaction_other_account"; + } else { + $transaction_category_display = $transaction_category; } + + // Badge color based on type + if ($transaction_type == 'Revenue' || $transaction_type == 'Payment') { + $transaction_badge_color = "success"; + } elseif ($transaction_type == 'Expense') { + $transaction_badge_color = "danger"; + } else { + $transaction_badge_color = "secondary"; + } + + // Amount text color + if ($transaction_amount < 0) { + $transaction_amount_color = "text-danger"; + } else { + $transaction_amount_color = "text-success"; + } + + // Balance text color + if ($transaction_balance < 0) { + $transaction_balance_color = "text-danger"; + } else { + $transaction_balance_color = ""; + } + + // Route the date link to the right edit modal based on type + if ($transaction_type == 'Transfer In' || $transaction_type == 'Transfer Out') { + $transaction_modal_url = "modals/transfer/transfer_edit.php?id=$transaction_transfer_id"; + } elseif ($transaction_type == 'Expense') { + $transaction_modal_url = "modals/expense/expense_edit.php?id=$transaction_id"; + } elseif ($transaction_type == 'Revenue') { + $transaction_modal_url = "modals/revenue/revenue_edit.php?id=$transaction_id"; + } else { + $transaction_modal_url = ""; + } + ?> - -
+ + Date + + + + Type + + + + Category + + / + + Description + + + + Amount + + Balance
- - - - - - - - - - - -
-
-
- + + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
+ @@ -545,7 +545,6 @@ if ($account_filter) { -
-
-
+
+

Transfers

-
-
-
+
+ +
@@ -63,11 +63,11 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
" id="advancedFilter"> -
+
" id="advancedFilter"> +
-
- +
+ @@ -75,8 +75,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
- +
+ @@ -117,133 +117,132 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
-
- - text-nowrap"> - - - - - - - - - - - - +
+
- - Date - - - - From Account - - - - To Account - - - - Method - - - - Notes - - - - Amount - - Action
+ text-nowrap"> + + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + - -
+ + Date + + + + From Account + + + + To Account + + + + Method + + + + Notes + + + + Amount + + Action
- - - - - -
+ + + + + +
-
- + + + +
+
-
-
+
+

Trips

@@ -52,12 +52,12 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
-
+
+ -
+
@@ -70,11 +70,11 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
" id="advancedFilter"> -
+
" id="advancedFilter"> +
-
- +
+ @@ -84,137 +84,136 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
-
- - "> - - - - - - - - - - - - - - - $client_name"; - } - if ($round_trip == 1) { - $round_trip_display = ""; - } else { - $round_trip_display = ""; - } - $user_name = escapeHtml($row['user_name']); - if (empty($user_name)) { - $user_name_display = "-"; - } else { - $user_name_display = $user_name; - } - - ?> - - - - - - - - - - - - - - - - -
- - Date - - - - Driver - - - - Purpose - - - - Source - - - - Destination - - - - Miles - - - - Client - - Action
- - - - $trip_miles $round_trip_display" ?> - -
-
-
+
+ + "> + + + + + + + + + + + + + + + $client_name"; + } + if ($round_trip == 1) { + $round_trip_display = ""; + } else { + $round_trip_display = ""; + } + $user_name = escapeHtml($row['user_name']); + if (empty($user_name)) { + $user_name_display = "-"; + } else { + $user_name_display = $user_name; + } + + ?> + + + + + + + + + + + + + + + + +
+ + Date + + + + Driver + + + + Purpose + + + + Source + + + + Destination + + + + Miles + + + + Client + + Action
+ + + + $trip_miles $round_trip_display" ?> + +
+
+
-
-
+
+

Vendors

@@ -61,16 +61,16 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
+
-
+
-
+
@@ -110,178 +110,178 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
-
- +
-
- - text-nowrap"> - - - - - - - - - - - - + - while ($row = mysqli_fetch_assoc($sql)) { - $vendor_id = intval($row['vendor_id']); - $vendor_name = escapeHtml($row['vendor_name']); - $vendor_description = escapeHtml($row['vendor_description']); - if ($vendor_description) { - $vendor_description_display = $vendor_description; - } else { - $vendor_description_display = "-"; - } - $vendor_account_number = escapeHtml($row['vendor_account_number']); - if ($vendor_account_number) { - $vendor_account_number_display = "
Account #: $vendor_account_number
"; - } else { - $vendor_account_number_display = ''; - } - $vendor_contact_name = escapeHtml($row['vendor_contact_name']); - if ($vendor_contact_name) { - $vendor_contact_name_display = $vendor_contact_name; - } else { - $vendor_contact_name_display = "-"; - } - $vendor_phone_country_code = escapeHtml($row['vendor_phone_country_code']); - $vendor_phone = escapeHtml(formatPhoneNumber($row['vendor_phone'], $vendor_phone_country_code)); - $vendor_extension = escapeHtml($row['vendor_extension']); - $vendor_email = escapeHtml($row['vendor_email']); - $vendor_website = escapeHtml($row['vendor_website']); - if ($vendor_website) { - $vendor_website_display = "$vendor_website "; - } else { - $vendor_website_display = "-"; - } - $vendor_hours = escapeHtml($row['vendor_hours']); - $vendor_sla = escapeHtml($row['vendor_sla']); - $vendor_code = escapeHtml($row['vendor_code']); - $vendor_notes = escapeHtml($row['vendor_notes']); - $vendor_created_at = escapeHtml($row['vendor_created_at']); - $vendor_archived_at = escapeHtml($row['vendor_archived_at']); - $vendor_template_id = intval($row['vendor_template_id']); - $vendor_template_name = escapeHtml($row['vendor_template_name']); - if ($vendor_template_id) { - $vendor_template_display = "
$vendor_template_name
"; - } else { - $vendor_template_display = ""; - } +
+
-
- -
-
- - Vendor - - - - Description - - - - Contact - - - - Website - - Action
+ text-nowrap"> + + + + + + + + + + + + - - - - - - - - - - - Account #: $vendor_account_number"; + } else { + $vendor_account_number_display = ''; + } + $vendor_contact_name = escapeHtml($row['vendor_contact_name']); + if ($vendor_contact_name) { + $vendor_contact_name_display = $vendor_contact_name; + } else { + $vendor_contact_name_display = "-"; + } + $vendor_phone_country_code = escapeHtml($row['vendor_phone_country_code']); + $vendor_phone = escapeHtml(formatPhoneNumber($row['vendor_phone'], $vendor_phone_country_code)); + $vendor_extension = escapeHtml($row['vendor_extension']); + $vendor_email = escapeHtml($row['vendor_email']); + $vendor_website = escapeHtml($row['vendor_website']); + if ($vendor_website) { + $vendor_website_display = "$vendor_website "; + } else { + $vendor_website_display = "-"; + } + $vendor_hours = escapeHtml($row['vendor_hours']); + $vendor_sla = escapeHtml($row['vendor_sla']); + $vendor_code = escapeHtml($row['vendor_code']); + $vendor_notes = escapeHtml($row['vendor_notes']); + $vendor_created_at = escapeHtml($row['vendor_created_at']); + $vendor_archived_at = escapeHtml($row['vendor_archived_at']); + $vendor_template_id = intval($row['vendor_template_id']); + $vendor_template_name = escapeHtml($row['vendor_template_name']); + if ($vendor_template_id) { + $vendor_template_display = "
$vendor_template_name
"; + } else { + $vendor_template_display = ""; } ?> + + + + +
+
+ +
+
+ + Vendor + + + + Description + + + + Contact + + + + Website + + Action
-
- -
-
- -
- -
-
-
-
-
-
-
- - - - -
- - -
- - -
- -
- -
+
+ +
+
+ +
+ +
+
+
+
+
+
+
+ + + + +
+ -
-
- - + +
+ + +
+ + + + + + + + + + + + + +
+ + -
diff --git a/css/itflow_custom.css b/css/itflow_custom.css index 3e3cb13ec..8c1263560 100644 --- a/css/itflow_custom.css +++ b/css/itflow_custom.css @@ -550,8 +550,8 @@ a:not(.dropdown-item):not(.btn-app):not(.nav-link):not(.brand-link):not(.page-li .py-3 is a 16px jump that makes the bar noticeably chunky. Bootstrap has no step between the two, hence the named rule. */ .card-footer.itflow-filter-footer { - padding-top: .75rem; - padding-bottom: .75rem; + padding-top: .5rem; + padding-bottom: .5rem; } /* --- Primary button follows the theme ----------------------------------- diff --git a/includes/filter_footer.php b/includes/filter_footer.php index 88ce774dc..a97f84671 100644 --- a/includes/filter_footer.php +++ b/includes/filter_footer.php @@ -18,7 +18,7 @@ if ($total_found_rows > 5) {