mirror of
https://github.com/itflow-org/itflow
synced 2026-03-11 08:14:52 +00:00
Compare commits
31 Commits
duplicate-
...
v25.12
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
03570ecd04 | ||
|
|
ca5fb2e010 | ||
|
|
da561b296e | ||
|
|
523da0dea0 | ||
|
|
0e4cc76a84 | ||
|
|
7e39a7ed89 | ||
|
|
4a26ea7ed9 | ||
|
|
7c83ba15b9 | ||
|
|
10bfbed4bb | ||
|
|
81550bd7a8 | ||
|
|
a430bb917e | ||
|
|
e1a579387f | ||
|
|
fe8df66c67 | ||
|
|
5bb410f80c | ||
|
|
29b79b9d4e | ||
|
|
0f8a8d1464 | ||
|
|
cc92a4b7ee | ||
|
|
3ffef6df51 | ||
|
|
78e4787b99 | ||
|
|
540512a156 | ||
|
|
7737dbc65d | ||
|
|
faa94d888d | ||
|
|
99e2487d2b | ||
|
|
f09d8ffe05 | ||
|
|
c486e3fe62 | ||
|
|
ba2d6b6709 | ||
|
|
a388a279bc | ||
|
|
5a64b19a06 | ||
|
|
53178b8d20 | ||
|
|
c7ef3627ce | ||
|
|
d1dcc5fb7e |
33
CHANGELOG.md
33
CHANGELOG.md
@@ -2,6 +2,39 @@
|
|||||||
|
|
||||||
This file documents all notable changes made to ITFlow.
|
This file documents all notable changes made to ITFlow.
|
||||||
|
|
||||||
|
## [25.12] Stable Release
|
||||||
|
|
||||||
|
### Breaking Changes ###
|
||||||
|
- For Existing installs: **php-xml** extension needs to be installed for document creation and editing, new install script does this for you as of Dec 6th 2025. To install php-xml: `sudo apt install php-xml`
|
||||||
|
|
||||||
|
### Major Changes
|
||||||
|
- Consolidated "Files" and "Documents" into a single section called **Files**.
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
- Resolved issue with updating asset notes in asset details.
|
||||||
|
- Fixed problem with bulk ticket merging.
|
||||||
|
- Corrected issue where decimal inputs (e.g., price, cost) weren’t displaying on iPhones in certain forms.
|
||||||
|
- Added CSV escaping to the sample export data in areas where a sample CSV template is provided.
|
||||||
|
- Fix a race condition where dupe tickets, invoices, recurring invoices, recurring tickets, quotes will be created using the same number if created in parallel espcecially when using the API.
|
||||||
|
|
||||||
|
### New Features & Updates
|
||||||
|
- Introduced automatic subject-based ticket merging/reply detection. Now, if an email comes from a known contact or domain and the subject matches 95% of a ticket opened in the last 7 days, it will be merged automatically.
|
||||||
|
- Added `cleanInput` function to sanitize data before inserting it into the database when using MySQLi prepared statements.
|
||||||
|
- Migrated client post functionality to use MySQLi prepared statements.
|
||||||
|
- Updated payment method post functionality to use MySQLi prepared statements.
|
||||||
|
- Implemented `saveBase64Images()` to convert base64-encoded `<img>` tags into actual image files stored under `/uploads/<module>/<id>/` with secure filenames. Added wrapper functions, and updated document creation to use processed image paths.
|
||||||
|
- For new documents and document templates, images are now stored in `/uploads/documents/$document_id` instead of being stored as base64 in the database, using the `saveBase64Images()` function.
|
||||||
|
- UI/UX improvements made to the document details page.
|
||||||
|
- Removed sidebar quick-add options.
|
||||||
|
- Created new folders in the uploads directory: `documents`, `document_templates`, and `recurring_tickets`.
|
||||||
|
- Reworked the bulk action function to pass the name arrays, instead of a generic `selected_ids` array. This allows multiple bulk name arrays to be passed at once, currently used for the new file-document merge.
|
||||||
|
- Big task: Converted the remaining modals to use the new `ajax-modal` system, enabling more flexible flow expansion going forward.
|
||||||
|
- Mail queue: Added a `--no-mx-validation` flag to bypass recipient domain MX validation.
|
||||||
|
- Bump PHPMailer from 7.0.0 to 7.0.1.
|
||||||
|
- Bump stripe-php from 18.1.0 to 19.0.0.
|
||||||
|
- Bump TCPDF from 6.10.0 to 6.10.1.
|
||||||
|
- Bump TinyMCE from 8.2.0 to 8.2.2.
|
||||||
|
|
||||||
## [25.11.1] Maint Release
|
## [25.11.1] Maint Release
|
||||||
|
|
||||||
### Fixes
|
### Fixes
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ $extensions = [
|
|||||||
'php-mbstring' => 'mbstring',
|
'php-mbstring' => 'mbstring',
|
||||||
'php-gd' => 'gd',
|
'php-gd' => 'gd',
|
||||||
'php-zip' => 'zip',
|
'php-zip' => 'zip',
|
||||||
|
'php-xml' => 'xml',
|
||||||
];
|
];
|
||||||
|
|
||||||
foreach ($extensions as $name => $ext) {
|
foreach ($extensions as $name => $ext) {
|
||||||
@@ -765,4 +766,3 @@ $mysqli->close();
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once "../includes/footer.php";
|
require_once "../includes/footer.php";
|
||||||
|
|
||||||
|
|||||||
@@ -27,12 +27,14 @@
|
|||||||
<p>Roles</p>
|
<p>Roles</p>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<!-- 2025-12-05 JQ - Hide Permission Modules currently just shows modules
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="/admin/modules.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "modules.php") {echo "active";} ?>">
|
<a href="/admin/modules.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "modules.php") {echo "active";} ?>">
|
||||||
<i class="nav-icon fas fa-puzzle-piece"></i>
|
<i class="nav-icon fas fa-puzzle-piece"></i>
|
||||||
<p>Modules</p>
|
<p>Modules</p>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
-->
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="/admin/api_keys.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "api_keys.php") {echo "active";} ?>">
|
<a href="/admin/api_keys.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "api_keys.php") {echo "active";} ?>">
|
||||||
<i class="nav-icon fas fa-key"></i>
|
<i class="nav-icon fas fa-key"></i>
|
||||||
|
|||||||
@@ -1,13 +1,18 @@
|
|||||||
<div class="modal" id="exportUserModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Users to CSV</h5>
|
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Users to CSV</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -15,7 +20,7 @@
|
|||||||
<button type="submit" name="export_users_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
<button type="submit" name="export_users_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -33,9 +33,16 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
<!--<a class="dropdown-item text-dark ajax-modal" href="#" data-modal-url="modals/user/user_invite.php"><i class="fas fa-paper-plane mr-2"></i>Invite User</a>-->
|
<!--<a class="dropdown-item text-dark ajax-modal" href="#" data-modal-url="modals/user/user_invite.php"><i class="fas fa-paper-plane mr-2"></i>Invite User</a>-->
|
||||||
<?php if ($num_rows[0] > 1) { ?>
|
<?php if ($num_rows[0] > 1) { ?>
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportUserModal"><i class="fa fa-fw fa-download mr-2"></i>Export</a>
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/user/user_export.php">
|
||||||
|
<i class="fa fa-fw fa-download mr-2"></i>Export
|
||||||
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-danger ajax-modal" href="#" data-modal-url="modals/user/user_all_reset_password.php" data-modal-size="lg"><i class="fas fa-skull-crossbones mr-2"></i>IR</a>
|
<a class="dropdown-item text-danger ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/user/user_all_reset_password.php"
|
||||||
|
data-modal-size="lg">
|
||||||
|
<i class="fas fa-skull-crossbones mr-2"></i>IR
|
||||||
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -235,5 +242,4 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
require_once "modals/user/user_export.php";
|
|
||||||
require_once "../includes/footer.php";
|
require_once "../includes/footer.php";
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ if (isset($_GET['certificate_fetch_parse_json_details'])) {
|
|||||||
if (isset($_GET['merge_ticket_get_json_details'])) {
|
if (isset($_GET['merge_ticket_get_json_details'])) {
|
||||||
enforceUserPermission('module_support');
|
enforceUserPermission('module_support');
|
||||||
|
|
||||||
$merge_into_ticket_number = intval($_GET['merge_into_ticket_number']);
|
$merge_into_ticket_number = intval(preg_replace('/[^0-9]/', '', $_GET['merge_into_ticket_number']));
|
||||||
|
|
||||||
$sql = mysqli_query($mysqli, "SELECT ticket_id, ticket_number, ticket_prefix, ticket_subject, ticket_priority, ticket_status, ticket_status_name, client_name, contact_name FROM tickets
|
$sql = mysqli_query($mysqli, "SELECT ticket_id, ticket_number, ticket_prefix, ticket_subject, ticket_priority, ticket_status, ticket_status_name, client_name, contact_name FROM tickets
|
||||||
LEFT JOIN clients ON ticket_client_id = client_id
|
LEFT JOIN clients ON ticket_client_id = client_id
|
||||||
|
|||||||
@@ -469,11 +469,15 @@ if (isset($_GET['asset_id'])) {
|
|||||||
<i class="fas fa-fw fa-layer-group mr-2"></i>Bulk Action (<span id="selectedCount">0</span>)
|
<i class="fas fa-fw fa-layer-group mr-2"></i>Bulk Action (<span id="selectedCount">0</span>)
|
||||||
</button>
|
</button>
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#bulkAssignNetworkModal">
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/asset/asset_interface_bulk_edit_network.php?client_id=<?= $client_id ?>"
|
||||||
|
data-bulk="true">
|
||||||
<i class="fas fa-fw fa-network-wired mr-2"></i>Assign Network
|
<i class="fas fa-fw fa-network-wired mr-2"></i>Assign Network
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#bulkSetInterfaceTypeModal">
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/asset/asset_interface_bulk_edit_type.php?client_id=<?= $client_id ?>"
|
||||||
|
data-bulk="true">
|
||||||
<i class="fas fa-fw fa-ethernet mr-2"></i>Set Type
|
<i class="fas fa-fw fa-ethernet mr-2"></i>Set Type
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
@@ -597,8 +601,6 @@ if (isset($_GET['asset_id'])) {
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<?php require_once "modals/asset/asset_interface_bulk_edit_type.php"; ?>
|
|
||||||
<?php require_once "modals/asset/asset_interface_bulk_edit_network.php"; ?>
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -200,14 +200,16 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
<?php if ($client_url) { ?>
|
<?php if ($client_url) { ?>
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#importAssetModal">
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/asset/asset_import.php?<?= $client_url ?>">
|
||||||
<i class="fa fa-fw fa-upload mr-2"></i>Import
|
<i class="fa fa-fw fa-upload mr-2"></i>Import
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if ($num_rows[0] > 0) { ?>
|
<?php if ($num_rows[0] > 0) { ?>
|
||||||
|
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportAssetModal">
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/asset/asset_export.php?<?= $client_url ?>">
|
||||||
<i class="fa fa-fw fa-download mr-2"></i>Export
|
<i class="fa fa-fw fa-download mr-2"></i>Export
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
@@ -789,8 +791,4 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<script src="../js/bulk_actions.js"></script>
|
<script src="../js/bulk_actions.js"></script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
require_once "modals/asset/asset_export.php";
|
|
||||||
if ($client_url) {
|
|
||||||
require_once "modals/asset/asset_import.php";
|
|
||||||
}
|
|
||||||
require_once "../includes/footer.php";
|
require_once "../includes/footer.php";
|
||||||
|
|||||||
@@ -68,7 +68,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<?php if ($num_rows[0] > 0) { ?>
|
<?php if ($num_rows[0] > 0) { ?>
|
||||||
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportCertificateModal">
|
<a class="dropdown-item text-dark ajax-modal" href="#"\
|
||||||
|
data-modal-url="modals/certificate/certificate_export.php?<?= $client_url ?>">
|
||||||
<i class="fa fa-fw fa-download mr-2"></i>Export
|
<i class="fa fa-fw fa-download mr-2"></i>Export
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -299,15 +300,10 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<?php require_once "../includes/filter_footer.php";
|
<?php require_once "../includes/filter_footer.php"; ?>
|
||||||
?>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
|
||||||
require_once "modals/certificate/certificate_export.php";
|
|
||||||
?>
|
|
||||||
|
|
||||||
<script src="../js/bulk_actions.js"></script>
|
<script src="../js/bulk_actions.js"></script>
|
||||||
|
|
||||||
<?php require_once "../includes/footer.php";
|
<?php require_once "../includes/footer.php";
|
||||||
|
|||||||
@@ -92,11 +92,13 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
</button>
|
</button>
|
||||||
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#importClientModal">
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/client/client_import.php">
|
||||||
<i class="fa fa-fw fa-upload mr-2"></i>Import
|
<i class="fa fa-fw fa-upload mr-2"></i>Import
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportClientModal">
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/client/client_export.php">
|
||||||
<i class="fa fa-fw fa-download mr-2"></i>Export
|
<i class="fa fa-fw fa-download mr-2"></i>Export
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -623,6 +625,4 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<script src="../js/bulk_actions.js"></script>
|
<script src="../js/bulk_actions.js"></script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
require_once "modals/client/client_import.php";
|
|
||||||
require_once "modals/client/client_export.php";
|
|
||||||
require_once "../includes/footer.php";
|
require_once "../includes/footer.php";
|
||||||
|
|||||||
@@ -98,12 +98,14 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<?php if ($client_url) { ?>
|
<?php if ($client_url) { ?>
|
||||||
<!-- <a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#contactInviteModal"><i class="fas fa-fw fa-paper-plane mr-2"></i>Invite</a>-->
|
<!-- <a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#contactInviteModal"><i class="fas fa-fw fa-paper-plane mr-2"></i>Invite</a>-->
|
||||||
<!-- <div class="dropdown-divider"></div>-->
|
<!-- <div class="dropdown-divider"></div>-->
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#importContactModal">
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/contact/contact_import.php?<?= $client_url ?>">
|
||||||
<i class="fa fa-fw fa-upload mr-2"></i>Import
|
<i class="fa fa-fw fa-upload mr-2"></i>Import
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportContactModal">
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/contact/contact_export.php?<?= $client_url ?>">
|
||||||
<i class="fa fa-fw fa-download mr-2"></i>Export
|
<i class="fa fa-fw fa-download mr-2"></i>Export
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -566,10 +568,4 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<script src="../js/bulk_actions.js"></script>
|
<script src="../js/bulk_actions.js"></script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once "modals/contact/contact_export.php";
|
|
||||||
if ($client_url) {
|
|
||||||
//require_once "modals/contact/contact_invite.php";
|
|
||||||
require_once "modals/contact/contact_import.php";
|
|
||||||
}
|
|
||||||
require_once "../includes/footer.php";
|
require_once "../includes/footer.php";
|
||||||
|
|||||||
@@ -112,13 +112,15 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
<?php if ($client_url) { ?>
|
<?php if ($client_url) { ?>
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#importCredentialModal">
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/credential/credential_import.php?<?= $client_url ?>">
|
||||||
<i class="fa fa-fw fa-upload mr-2"></i>Import
|
<i class="fa fa-fw fa-upload mr-2"></i>Import
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if ($num_rows[0] > 0) { ?>
|
<?php if ($num_rows[0] > 0) { ?>
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportCredentialModal">
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/credential/credential_export.php?<?= $client_url ?>">
|
||||||
<i class="fa fa-fw fa-download mr-2"></i>Export
|
<i class="fa fa-fw fa-download mr-2"></i>Export
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
@@ -528,15 +530,10 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
|
|
||||||
<!-- Include script to get TOTP code via the login ID -->
|
<!-- Include script to get TOTP code via the login ID -->
|
||||||
<script src="js/credential_show_otp_via_id.js"></script>
|
<script src="js/credential_show_otp_via_id.js"></script>
|
||||||
<!-- Include script to generate readable passwords for login entries -->
|
|
||||||
<script src="js/generate_password.js"></script>
|
|
||||||
<script src="../js/bulk_actions.js"></script>
|
<script src="../js/bulk_actions.js"></script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once "modals/credential/credential_export.php";
|
|
||||||
if ($client_url) {
|
if ($client_url) {
|
||||||
require_once "modals/credential/credential_import.php";
|
|
||||||
require_once "modals/share_modal.php";
|
require_once "modals/share_modal.php";
|
||||||
}
|
}
|
||||||
require_once "../includes/footer.php";
|
require_once "../includes/footer.php";
|
||||||
|
|||||||
@@ -51,10 +51,10 @@ $page_title = $row['document_name'];
|
|||||||
|
|
||||||
<ol class="breadcrumb d-print-none">
|
<ol class="breadcrumb d-print-none">
|
||||||
<li class="breadcrumb-item">
|
<li class="breadcrumb-item">
|
||||||
<a href="client_overview.php?client_id=<?php echo $client_id; ?>"><?php echo $client_name; ?></a>
|
<a href="client_overview.php?client_id=<?= $client_id ?>"><?= $client_name ?></a>
|
||||||
</li>
|
</li>
|
||||||
<li class="breadcrumb-item">
|
<li class="breadcrumb-item">
|
||||||
<a href="documents.php?client_id=<?php echo $client_id; ?>">Documents</a>
|
<a href="files.php?client_id=<?= $client_id ?>">Files</a>
|
||||||
</li>
|
</li>
|
||||||
<?php
|
<?php
|
||||||
// Build the full folder path
|
// Build the full folder path
|
||||||
@@ -84,7 +84,7 @@ $page_title = $row['document_name'];
|
|||||||
$bread_crumb_folder_name = $folder['folder_name']; // Sanitized before put in array
|
$bread_crumb_folder_name = $folder['folder_name']; // Sanitized before put in array
|
||||||
?>
|
?>
|
||||||
<li class="breadcrumb-item">
|
<li class="breadcrumb-item">
|
||||||
<a href="documents.php?client_id=<?php echo $client_id; ?>&folder_id=<?php echo $bread_crumb_folder_id; ?>">
|
<a href="files.php?client_id=<?php echo $client_id; ?>&folder_id=<?php echo $bread_crumb_folder_id; ?>">
|
||||||
<i class="fas fa-fw fa-folder-open mr-2"></i><?php echo $bread_crumb_folder_name; ?>
|
<i class="fas fa-fw fa-folder-open mr-2"></i><?php echo $bread_crumb_folder_name; ?>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
@@ -202,7 +202,8 @@ $page_title = $row['document_name'];
|
|||||||
<h5 class="mb-3"><i class="fas fa-tags mr-2"></i>Related Items</h5>
|
<h5 class="mb-3"><i class="fas fa-tags mr-2"></i>Related Items</h5>
|
||||||
<h6>
|
<h6>
|
||||||
<i class="fas fa-fw fa-paperclip text-secondary mr-2"></i>Files
|
<i class="fas fa-fw fa-paperclip text-secondary mr-2"></i>Files
|
||||||
<button type="button" class="btn btn-link btn-sm" data-toggle="modal" data-target="#linkFileToDocumentModal">
|
<button type="button" class="btn btn-link btn-sm ajax-modal"
|
||||||
|
data-modal-url="modals/document/document_link_file.php?document_id=<?= $document_id ?>">
|
||||||
<i class="fas fa-fw fa-plus"></i>
|
<i class="fas fa-fw fa-plus"></i>
|
||||||
</button>
|
</button>
|
||||||
</h6>
|
</h6>
|
||||||
@@ -224,9 +225,9 @@ $page_title = $row['document_name'];
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
<div class="ml-2">
|
<div class="ml-2">
|
||||||
<a href="files.php?client_id=<?php echo $client_id; ?>&folder_id=<?php echo $folder_id; ?>&q=<?php echo $file_name; ?>" target="_blank"><?php echo $file_name; ?></a>
|
<a href="files.php?client_id=<?= $client_id ?>&folder_id=<?= $folder_id ?>&q=<?= $file_name ?>" target="_blank"><?= $file_name ?></a>
|
||||||
<a class="confirm-link" href="post.php?unlink_file_from_document&file_id=<?php echo $file_id; ?>&document_id=<?php echo $document_id; ?>">
|
<a class="confirm-link" href="post.php?unlink_file_from_document&file_id=<?= $file_id ?>&document_id=<?= $document_id ?>">
|
||||||
<i class="fas fa-fw fa-trash-alt text-secondary float-right"></i>
|
<i class="fas fa-fw fa-unlink text-secondary float-right" title="Unlink File"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
@@ -234,7 +235,8 @@ $page_title = $row['document_name'];
|
|||||||
?>
|
?>
|
||||||
<h6>
|
<h6>
|
||||||
<i class="fas fa-fw fa-users text-secondary mt-3 mr-2"></i>Contacts
|
<i class="fas fa-fw fa-users text-secondary mt-3 mr-2"></i>Contacts
|
||||||
<button type="button" class="btn btn-link btn-sm" data-toggle="modal" data-target="#linkContactToDocumentModal">
|
<button type="button" class="btn btn-link btn-sm ajax-modal"
|
||||||
|
data-modal-url="modals/document/document_link_contact.php?document_id=<?= $document_id ?>">
|
||||||
<i class="fas fa-fw fa-plus"></i>
|
<i class="fas fa-fw fa-plus"></i>
|
||||||
</button>
|
</button>
|
||||||
</h6>
|
</h6>
|
||||||
@@ -260,7 +262,7 @@ $page_title = $row['document_name'];
|
|||||||
data-modal-url="modals/contact/contact_details.php?id=<?= $contact_id ?>">
|
data-modal-url="modals/contact/contact_details.php?id=<?= $contact_id ?>">
|
||||||
<?php echo $contact_name; ?></a>
|
<?php echo $contact_name; ?></a>
|
||||||
<a class="confirm-link float-right" href="post.php?unlink_contact_from_document&contact_id=<?php echo $contact_id; ?>&document_id=<?php echo $document_id; ?>">
|
<a class="confirm-link float-right" href="post.php?unlink_contact_from_document&contact_id=<?php echo $contact_id; ?>&document_id=<?php echo $document_id; ?>">
|
||||||
<i class="fas fa-fw fa-trash-alt text-secondary"></i>
|
<i class="fas fa-fw fa-unlink text-secondary" title="Unlink Contact"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
@@ -268,7 +270,7 @@ $page_title = $row['document_name'];
|
|||||||
?>
|
?>
|
||||||
<h6>
|
<h6>
|
||||||
<i class="fas fa-fw fa-laptop text-secondary mr-2 mt-3"></i>Assets
|
<i class="fas fa-fw fa-laptop text-secondary mr-2 mt-3"></i>Assets
|
||||||
<button type="button" class="btn btn-link btn-sm" data-toggle="modal" data-target="#linkAssetToDocumentModal">
|
<button type="button" class="btn btn-link btn-sm ajax-modal" data-modal-url="modals/document/document_link_asset.php?document_id=<?= $document_id ?>">
|
||||||
<i class="fas fa-fw fa-plus"></i>
|
<i class="fas fa-fw fa-plus"></i>
|
||||||
</button>
|
</button>
|
||||||
</h6>
|
</h6>
|
||||||
@@ -295,7 +297,7 @@ $page_title = $row['document_name'];
|
|||||||
<?php echo $asset_name; ?>
|
<?php echo $asset_name; ?>
|
||||||
</a>
|
</a>
|
||||||
<a class="confirm-link float-right" href="post.php?unlink_asset_from_document&asset_id=<?php echo $asset_id; ?>&document_id=<?php echo $document_id; ?>">
|
<a class="confirm-link float-right" href="post.php?unlink_asset_from_document&asset_id=<?php echo $asset_id; ?>&document_id=<?php echo $document_id; ?>">
|
||||||
<i class="fas fa-fw fa-trash-alt text-secondary"></i>
|
<i class="fas fa-fw fa-unlink text-secondary" title="Unlink Asset"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
@@ -303,7 +305,8 @@ $page_title = $row['document_name'];
|
|||||||
?>
|
?>
|
||||||
<h6>
|
<h6>
|
||||||
<i class="fas fa-fw fa-cube text-secondary mr-2 mt-3"></i>Licenses
|
<i class="fas fa-fw fa-cube text-secondary mr-2 mt-3"></i>Licenses
|
||||||
<button type="button" class="btn btn-link btn-sm" data-toggle="modal" data-target="#linkSoftwareToDocumentModal">
|
<button type="button" class="btn btn-link btn-sm ajax-modal"
|
||||||
|
data-modal-url="modals/document/document_link_software.php?document_id=<?= $document_id ?>">
|
||||||
<i class="fas fa-fw fa-plus"></i>
|
<i class="fas fa-fw fa-plus"></i>
|
||||||
</button>
|
</button>
|
||||||
</h6>
|
</h6>
|
||||||
@@ -326,7 +329,7 @@ $page_title = $row['document_name'];
|
|||||||
<div class="ml-2">
|
<div class="ml-2">
|
||||||
<a href="software.php?client_id=<?php echo $client_id; ?>&q=<?php echo $software_name; ?>" target="_blank"><?php echo $software_name; ?></a>
|
<a href="software.php?client_id=<?php echo $client_id; ?>&q=<?php echo $software_name; ?>" target="_blank"><?php echo $software_name; ?></a>
|
||||||
<a class="confirm-link float-right" href="post.php?unlink_software_from_document&software_id=<?php echo $software_id; ?>&document_id=<?php echo $document_id; ?>">
|
<a class="confirm-link float-right" href="post.php?unlink_software_from_document&software_id=<?php echo $software_id; ?>&document_id=<?php echo $document_id; ?>">
|
||||||
<i class="fas fa-fw fa-trash-alt text-secondary"></i>
|
<i class="fas fa-fw fa-unlink text-secondary" title="Unlink License"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
@@ -334,7 +337,8 @@ $page_title = $row['document_name'];
|
|||||||
?>
|
?>
|
||||||
<h6>
|
<h6>
|
||||||
<i class="fas fa-fw fa-building text-secondary mr-2 mt-3"></i>Vendors
|
<i class="fas fa-fw fa-building text-secondary mr-2 mt-3"></i>Vendors
|
||||||
<button type="button" class="btn btn-link btn-sm" data-toggle="modal" data-target="#linkVendorToDocumentModal">
|
<button type="button" class="btn btn-link btn-sm ajax-modal"
|
||||||
|
data-modal-url="modals/document/document_link_vendor.php?document_id=<?= $document_id ?>">
|
||||||
<i class="fas fa-fw fa-plus"></i>
|
<i class="fas fa-fw fa-plus"></i>
|
||||||
</button>
|
</button>
|
||||||
</h6>
|
</h6>
|
||||||
@@ -359,7 +363,7 @@ $page_title = $row['document_name'];
|
|||||||
<?php echo $vendor_name; ?>
|
<?php echo $vendor_name; ?>
|
||||||
</a>
|
</a>
|
||||||
<a class="confirm-link float-right" href="post.php?unlink_vendor_from_document&vendor_id=<?php echo $vendor_id; ?>&document_id=<?php echo $document_id; ?>">
|
<a class="confirm-link float-right" href="post.php?unlink_vendor_from_document&vendor_id=<?php echo $vendor_id; ?>&document_id=<?php echo $document_id; ?>">
|
||||||
<i class="fas fa-fw fa-trash-alt text-secondary"></i>
|
<i class="fas fa-fw fa-unlink text-secondary" title="Unlink Vendor"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
@@ -372,7 +376,8 @@ $page_title = $row['document_name'];
|
|||||||
<h6><i class="fas fa-handshake mr-2"></i>Portal Collaboration</h6>
|
<h6><i class="fas fa-handshake mr-2"></i>Portal Collaboration</h6>
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
<i class="fa fa-fw fa-eye<?php if (!$document_client_visible) { echo '-slash'; } ?> text-secondary mr-2"></i>Document is
|
<i class="fa fa-fw fa-eye<?php if (!$document_client_visible) { echo '-slash'; } ?> text-secondary mr-2"></i>Document is
|
||||||
<a href="#" data-toggle="modal" data-target="#editDocumentClientVisibileModal">
|
<a class="ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/document/document_edit_visibility.php?document_id=<?= $document_id ?>">
|
||||||
<?php
|
<?php
|
||||||
if ($document_client_visible) {
|
if ($document_client_visible) {
|
||||||
echo "<span class='text-bold text-dark'>visible</span>";
|
echo "<span class='text-bold text-dark'>visible</span>";
|
||||||
@@ -427,11 +432,5 @@ $page_title = $row['document_name'];
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once "modals/document/document_link_file.php";
|
|
||||||
require_once "modals/document/document_link_contact.php";
|
|
||||||
require_once "modals/document/document_link_asset.php";
|
|
||||||
require_once "modals/document/document_link_software.php";
|
|
||||||
require_once "modals/document/document_link_vendor.php";
|
|
||||||
require_once "modals/document/document_edit_visibility.php";
|
|
||||||
require_once "modals/share_modal.php";
|
require_once "modals/share_modal.php";
|
||||||
require_once "../includes/footer.php";
|
require_once "../includes/footer.php";
|
||||||
|
|||||||
@@ -1,479 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
// Default Column Sortby Filter
|
|
||||||
$sort = "document_name";
|
|
||||||
$order = "ASC";
|
|
||||||
|
|
||||||
require_once "includes/inc_all_client.php";
|
|
||||||
|
|
||||||
// Perms
|
|
||||||
enforceUserPermission('module_support');
|
|
||||||
|
|
||||||
// Folder
|
|
||||||
if (!empty($_GET['folder_id'])) {
|
|
||||||
$folder = intval($_GET['folder_id']);
|
|
||||||
} else {
|
|
||||||
$folder = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Search query SQL snippet
|
|
||||||
if (!empty($q)) {
|
|
||||||
$query_snippet = "AND (MATCH(document_content_raw) AGAINST ('$q') OR document_name LIKE '%$q%')";
|
|
||||||
} else {
|
|
||||||
$query_snippet = ""; // empty
|
|
||||||
}
|
|
||||||
|
|
||||||
// Folder ID
|
|
||||||
$get_folder_id = 0;
|
|
||||||
if (!empty($_GET['folder_id'])) {
|
|
||||||
$get_folder_id = intval($_GET['folder_id']);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set Folder Location Var used when creating folders
|
|
||||||
$folder_location = 0;
|
|
||||||
|
|
||||||
if ($get_folder_id == 0 && isset($_GET["q"])) {
|
|
||||||
$sql = mysqli_query(
|
|
||||||
$mysqli,
|
|
||||||
"SELECT SQL_CALC_FOUND_ROWS * FROM documents
|
|
||||||
LEFT JOIN users ON document_created_by = user_id
|
|
||||||
WHERE document_client_id = $client_id
|
|
||||||
AND document_archived_at IS NULL
|
|
||||||
$query_snippet
|
|
||||||
ORDER BY $sort $order LIMIT $record_from, $record_to"
|
|
||||||
);
|
|
||||||
}else{
|
|
||||||
$sql = mysqli_query(
|
|
||||||
$mysqli,
|
|
||||||
"SELECT SQL_CALC_FOUND_ROWS * FROM documents
|
|
||||||
LEFT JOIN users ON document_created_by = user_id
|
|
||||||
WHERE document_client_id = $client_id
|
|
||||||
AND document_folder_id = $folder
|
|
||||||
AND document_archived_at IS NULL
|
|
||||||
$query_snippet
|
|
||||||
ORDER BY $sort $order LIMIT $record_from, $record_to"
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
$num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|
||||||
|
|
||||||
// Breadcrumbs
|
|
||||||
// Build the full folder path
|
|
||||||
$folder_id = $get_folder_id;
|
|
||||||
$folder_path = array();
|
|
||||||
|
|
||||||
while ($folder_id > 0) {
|
|
||||||
$sql_folder = mysqli_query($mysqli, "SELECT folder_name, parent_folder FROM folders WHERE folder_id = $folder_id");
|
|
||||||
if ($row_folder = mysqli_fetch_assoc($sql_folder)) {
|
|
||||||
$folder_name = nullable_htmlentities($row_folder['folder_name']);
|
|
||||||
$parent_folder = intval($row_folder['parent_folder']);
|
|
||||||
|
|
||||||
// Prepend the folder to the beginning of the array
|
|
||||||
array_unshift($folder_path, array('folder_id' => $folder_id, 'folder_name' => $folder_name));
|
|
||||||
|
|
||||||
// Move up to the parent folder
|
|
||||||
$folder_id = $parent_folder;
|
|
||||||
} else {
|
|
||||||
// If the folder is not found, break the loop
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<div class="card card-dark">
|
|
||||||
<div class="card-header py-2">
|
|
||||||
<h3 class="card-title mt-2">
|
|
||||||
<i class="fa fa-fw fa-folder mr-2"></i>Documents
|
|
||||||
</h3>
|
|
||||||
<div class="card-tools">
|
|
||||||
|
|
||||||
<div class="btn-group">
|
|
||||||
<button type="button" class="btn btn-primary ajax-modal" data-modal-url="modals/document/document_add.php?client_id=<?= $client_id ?>&folder_id=<?= $get_folder_id ?>" data-modal-size="lg">
|
|
||||||
<i class="fas fa-plus mr-2"></i>New Document
|
|
||||||
</button>
|
|
||||||
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
|
||||||
<div class="dropdown-menu">
|
|
||||||
<a class="dropdown-item text-dark ajax-modal" href="#" data-modal-url="modals/folder/folder_add.php?client_id=<?= $client_id ?>&folder_location=0¤t_folder_id=<?= $get_folder_id ?>">
|
|
||||||
<i class="fa fa-fw fa-folder-plus mr-2"></i>New Folder
|
|
||||||
</a>
|
|
||||||
<div class="dropdown-divider"></div>
|
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#addDocumentFromTemplateModal">From Template</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="card-body">
|
|
||||||
<form autocomplete="off">
|
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
|
||||||
<input type="hidden" name="folder_id" value="<?php echo $get_folder_id; ?>">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-4">
|
|
||||||
<div class="input-group mb-3 mb-md-0">
|
|
||||||
<input type="search" class="form-control" name="q" value="<?php if (isset($q)) { echo stripslashes(nullable_htmlentities($q)); } ?>" placeholder="Search documents in <?php if($get_folder_id == 0) { echo "all folders"; } else { echo "current folder"; } ?>">
|
|
||||||
<div class="input-group-append">
|
|
||||||
<button class="btn btn-dark"><i class="fa fa-search"></i></button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-8">
|
|
||||||
<div class="btn-group float-right">
|
|
||||||
<div class="dropdown ml-2" id="bulkActionButton" hidden>
|
|
||||||
<button class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown">
|
|
||||||
<i class="fas fa-fw fa-layer-group mr-2"></i>Bulk Action (<span id="selectedCount">0</span>)
|
|
||||||
</button>
|
|
||||||
<div class="dropdown-menu">
|
|
||||||
<a class="dropdown-item ajax-modal" href="#"
|
|
||||||
data-modal-url="modals/document/document_bulk_move.php?client_id=<?= $client_id ?>"
|
|
||||||
data-bulk="true">
|
|
||||||
<i class="fas fa-fw fa-exchange-alt mr-2"></i>Move
|
|
||||||
</a>
|
|
||||||
<div class="dropdown-divider"></div>
|
|
||||||
<button class="dropdown-item text-danger text-bold"
|
|
||||||
type="submit" form="bulkActions" name="bulk_delete_documents">
|
|
||||||
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-3 border-right mb-3">
|
|
||||||
<h4>Folders</h4>
|
|
||||||
<hr>
|
|
||||||
<ul class="nav nav-pills flex-column bg-light">
|
|
||||||
<li class="nav-item">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-10">
|
|
||||||
<?php
|
|
||||||
// Get a count of documents that have no folder
|
|
||||||
$row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('document_id') AS num FROM documents WHERE document_folder_id = 0 AND document_client_id = $client_id AND document_archived_at IS NULL"));
|
|
||||||
$num_documents = intval($row['num']);
|
|
||||||
?>
|
|
||||||
<a class="nav-link <?php if ($get_folder_id == 0) { echo "active"; } ?>" href="?client_id=<?php echo $client_id; ?>&folder_id=0">
|
|
||||||
/ <?php if ($num_documents > 0) { echo "<span class='badge badge-pill badge-dark float-right mt-1'>$num_documents</span>"; } ?>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="col-2">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
<?php
|
|
||||||
// Function to check if a folder is an ancestor of the current folder
|
|
||||||
function is_ancestor_folder($folder_id, $current_folder_id, $client_id) {
|
|
||||||
global $mysqli;
|
|
||||||
|
|
||||||
// Base case: if current_folder_id is 0 or equal to folder_id
|
|
||||||
if ($current_folder_id == 0) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if ($current_folder_id == $folder_id) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the parent folder of the current folder
|
|
||||||
$result = mysqli_query($mysqli, "SELECT parent_folder FROM folders WHERE folder_id = $current_folder_id AND folder_client_id = $client_id");
|
|
||||||
if ($row = mysqli_fetch_assoc($result)) {
|
|
||||||
$parent_folder_id = intval($row['parent_folder']);
|
|
||||||
// Recursive call to check the parent folder
|
|
||||||
return is_ancestor_folder($folder_id, $parent_folder_id, $client_id);
|
|
||||||
} else {
|
|
||||||
// Folder not found
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Recursive function to display folders and subfolders
|
|
||||||
function display_folders($parent_folder_id, $client_id, $indent = 0) {
|
|
||||||
global $mysqli, $get_folder_id, $session_user_role;
|
|
||||||
|
|
||||||
$sql_folders = mysqli_query($mysqli, "SELECT * FROM folders WHERE parent_folder = $parent_folder_id AND folder_location = 0 AND folder_client_id = $client_id ORDER BY folder_name ASC");
|
|
||||||
while ($row = mysqli_fetch_array($sql_folders)) {
|
|
||||||
$folder_id = intval($row['folder_id']);
|
|
||||||
$folder_name = nullable_htmlentities($row['folder_name']);
|
|
||||||
|
|
||||||
// Get the number of documents in the folder
|
|
||||||
$row2 = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('document_id') AS num FROM documents WHERE document_folder_id = $folder_id AND document_archived_at IS NULL"));
|
|
||||||
$num_documents = intval($row2['num']);
|
|
||||||
|
|
||||||
// Get the number of subfolders
|
|
||||||
$subfolder_result = mysqli_query($mysqli, "SELECT COUNT(*) AS count FROM folders WHERE parent_folder = $folder_id AND folder_client_id = $client_id");
|
|
||||||
$subfolder_count = intval(mysqli_fetch_assoc($subfolder_result)['count']);
|
|
||||||
|
|
||||||
echo '<li class="nav-item">';
|
|
||||||
echo '<div class="row">';
|
|
||||||
echo '<div class="col-10">';
|
|
||||||
echo '<a class="nav-link ';
|
|
||||||
if ($get_folder_id == $folder_id) { echo "active"; }
|
|
||||||
echo '" href="?client_id=' . $client_id . '&folder_id=' . $folder_id . '">';
|
|
||||||
|
|
||||||
// Indentation for subfolders
|
|
||||||
echo str_repeat(' ', $indent * 4);
|
|
||||||
|
|
||||||
// Determine if the folder is open
|
|
||||||
if ($get_folder_id == $folder_id || is_ancestor_folder($folder_id, $get_folder_id, $client_id)) {
|
|
||||||
echo '<i class="fas fa-fw fa-folder-open"></i>';
|
|
||||||
} else {
|
|
||||||
echo '<i class="fas fa-fw fa-folder"></i>';
|
|
||||||
}
|
|
||||||
|
|
||||||
echo ' ' . $folder_name;
|
|
||||||
|
|
||||||
if ($num_documents > 0) {
|
|
||||||
echo "<span class='badge badge-pill badge-dark float-right mt-1'>$num_documents</span>";
|
|
||||||
}
|
|
||||||
|
|
||||||
echo '</a>';
|
|
||||||
echo '</div>';
|
|
||||||
echo '<div class="col-2">';
|
|
||||||
?>
|
|
||||||
<div class="dropdown">
|
|
||||||
<button class="btn btn-sm" type="button" data-toggle="dropdown">
|
|
||||||
<i class="fas fa-ellipsis-v"></i>
|
|
||||||
</button>
|
|
||||||
<div class="dropdown-menu">
|
|
||||||
<a class="dropdown-item ajax-modal" href="#"
|
|
||||||
data-modal-url="modals/folder/folder_rename.php?id=<?= $folder_id ?>">
|
|
||||||
<i class="fas fa-fw fa-edit mr-2"></i>Rename
|
|
||||||
</a>
|
|
||||||
<?php
|
|
||||||
// Only show delete option if user is admin, folder has no documents, and no subfolders
|
|
||||||
if ($session_user_role == 3 && $num_documents == 0 && $subfolder_count == 0) { ?>
|
|
||||||
<div class="dropdown-divider"></div>
|
|
||||||
<a class="dropdown-item text-danger text-bold confirm-link" href="post.php?delete_folder=<?php echo $folder_id; ?>">
|
|
||||||
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
|
||||||
</a>
|
|
||||||
<?php } ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<?php
|
|
||||||
echo '</div>';
|
|
||||||
echo '</div>';
|
|
||||||
|
|
||||||
if ($subfolder_count > 0) {
|
|
||||||
// Display subfolders
|
|
||||||
echo '<ul class="nav nav-pills flex-column bg-light">';
|
|
||||||
display_folders($folder_id, $client_id, $indent + 1);
|
|
||||||
echo '</ul>';
|
|
||||||
}
|
|
||||||
|
|
||||||
echo '</li>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Start displaying folders from the root (parent_folder = 0)
|
|
||||||
display_folders(0, $client_id);
|
|
||||||
?>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-md-9">
|
|
||||||
|
|
||||||
<nav>
|
|
||||||
<ol class="breadcrumb">
|
|
||||||
<li class="breadcrumb-item">
|
|
||||||
<a href="?client_id=<?php echo $client_id; ?>&folder_id=0">
|
|
||||||
<i class="fas fa-fw fa-folder mr-2"></i>Root
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<?php
|
|
||||||
// Output breadcrumb items for each folder in the path
|
|
||||||
foreach ($folder_path as $folder) {
|
|
||||||
$bread_crumb_folder_id = $folder['folder_id']; // Already Sanitized before it was pushed into array
|
|
||||||
$bread_crumb_folder_name = $folder['folder_name']; // Already Sanitized before it was pushed into array
|
|
||||||
|
|
||||||
?>
|
|
||||||
<li class="breadcrumb-item">
|
|
||||||
<a href="?client_id=<?php echo $client_id; ?>&folder_id=<?php echo $bread_crumb_folder_id; ?>">
|
|
||||||
<i class="fas fa-fw fa-folder-open mr-2"></i><?php echo $bread_crumb_folder_name; ?>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</ol>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<form id="bulkActions" action="post.php" method="post">
|
|
||||||
<input type="hidden" name="csrf_token" value="<?php echo $_SESSION['csrf_token'] ?>">
|
|
||||||
|
|
||||||
<div class="table-responsive-sm">
|
|
||||||
<table class="table table-border">
|
|
||||||
<thead class="thead-light <?php if ($num_rows[0] == 0) { echo "d-none"; } ?>">
|
|
||||||
<tr>
|
|
||||||
<td class="bg-light pr-0">
|
|
||||||
<div class="form-check">
|
|
||||||
<input class="form-check-input" id="selectAllCheckbox" type="checkbox" onclick="checkAll(this)">
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<th>
|
|
||||||
<a class="text-secondary" href="?<?php echo $url_query_strings_sort; ?>&sort=document_name&order=<?php echo $disp; ?>">
|
|
||||||
Name <?php if ($sort == 'document_name') { echo $order_icon; } ?>
|
|
||||||
</a>
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
<a class="text-secondary" href="?<?php echo $url_query_strings_sort; ?>&sort=document_created_at&order=<?php echo $disp; ?>">
|
|
||||||
Created <?php if ($sort == 'document_created_at') { echo $order_icon; } ?>
|
|
||||||
</a>
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
<a class="text-secondary" href="?<?php echo $url_query_strings_sort; ?>&sort=document_updated_at&order=<?php echo $disp; ?>">
|
|
||||||
Last Update <?php if ($sort == 'document_updated_at') { echo $order_icon; } ?>
|
|
||||||
</a>
|
|
||||||
</th>
|
|
||||||
<th></th>
|
|
||||||
<th class="text-center">Action</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<?php
|
|
||||||
|
|
||||||
while ($row = mysqli_fetch_array($sql)) {
|
|
||||||
$document_id = intval($row['document_id']);
|
|
||||||
$document_name = nullable_htmlentities($row['document_name']);
|
|
||||||
$document_description = nullable_htmlentities($row['document_description']);
|
|
||||||
$document_content = nullable_htmlentities($row['document_content']);
|
|
||||||
$document_created_by_name = nullable_htmlentities($row['user_name']);
|
|
||||||
$document_created_at = date("m/d/Y",strtotime($row['document_created_at']));
|
|
||||||
if ($row['document_updated_at']) {
|
|
||||||
$document_updated_at_display = date("m/d/Y",strtotime($row['document_updated_at']));
|
|
||||||
} else {
|
|
||||||
$document_updated_at_display = "-";
|
|
||||||
}
|
|
||||||
$document_folder_id = intval($row['document_folder_id']);
|
|
||||||
|
|
||||||
// Check if shared
|
|
||||||
$sql_shared = mysqli_query(
|
|
||||||
$mysqli,
|
|
||||||
"SELECT * FROM shared_items
|
|
||||||
WHERE item_client_id = $client_id
|
|
||||||
AND item_active = 1
|
|
||||||
AND item_views != item_view_limit
|
|
||||||
AND item_expire_at > NOW()
|
|
||||||
AND item_type = 'Document'
|
|
||||||
AND item_related_id = $document_id
|
|
||||||
LIMIT 1"
|
|
||||||
);
|
|
||||||
$row = mysqli_fetch_array($sql_shared);
|
|
||||||
if($row) {
|
|
||||||
$item_id = intval($row['item_id']);
|
|
||||||
$item_active = nullable_htmlentities($row['item_active']);
|
|
||||||
$item_key = nullable_htmlentities($row['item_key']);
|
|
||||||
$item_type = nullable_htmlentities($row['item_type']);
|
|
||||||
$item_related_id = intval($row['item_related_id']);
|
|
||||||
$item_note = nullable_htmlentities($row['item_note']);
|
|
||||||
$item_recipient = nullable_htmlentities($row['item_recipient']);
|
|
||||||
$item_views = nullable_htmlentities($row['item_views']);
|
|
||||||
$item_view_limit = nullable_htmlentities($row['item_view_limit']);
|
|
||||||
$item_created_at = nullable_htmlentities($row['item_created_at']);
|
|
||||||
$item_expire_at = nullable_htmlentities($row['item_expire_at']);
|
|
||||||
$item_expire_at_human = timeAgo($row['item_expire_at']);
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="bg-light pr-0">
|
|
||||||
<div class="form-check">
|
|
||||||
<input class="form-check-input bulk-select" type="checkbox" name="document_ids[]" value="<?php echo $document_id ?>">
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="document_details.php?client_id=<?php echo $client_id; ?>&document_id=<?php echo $document_id; ?>"><i class="fas fa-fw fa-file-alt"></i> <?php echo $document_name; ?></a>
|
|
||||||
<div class="text-secondary mt-1"><?php echo $document_description; ?>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<?php echo $document_created_at; ?>
|
|
||||||
<div class="text-secondary mt-1"><?php echo $document_created_by_name; ?>
|
|
||||||
</td>
|
|
||||||
<td><?php echo $document_updated_at_display; ?></td>
|
|
||||||
<td>
|
|
||||||
<?php if (mysqli_num_rows($sql_shared) > 0) { ?>
|
|
||||||
<div class="media" title="Expires <?php echo $item_expire_at_human; ?>">
|
|
||||||
<i class="fas fa-link mr-2 mt-1"></i>
|
|
||||||
<div class="media-body">Shared
|
|
||||||
<br>
|
|
||||||
<small class="text-secondary"><?php echo $item_recipient; ?></small>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<?php } ?>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<div class="dropdown dropleft text-center">
|
|
||||||
<button class="btn btn-secondary btn-sm" type="button" data-toggle="dropdown">
|
|
||||||
<i class="fas fa-ellipsis-h"></i>
|
|
||||||
</button>
|
|
||||||
<div class="dropdown-menu">
|
|
||||||
<a class="dropdown-item ajax-modal" href="#"
|
|
||||||
data-modal-size="lg"
|
|
||||||
data-modal-url="modals/document/document_view.php?id=<?= $document_id ?>">
|
|
||||||
<i class="fas fa-fw fa-eye mr-2"></i>Quick View
|
|
||||||
</a>
|
|
||||||
<div class="dropdown-divider"></div>
|
|
||||||
<a class="dropdown-item ajax-modal" href="#"
|
|
||||||
data-modal-size="lg"
|
|
||||||
data-modal-url="modals/document/document_edit.php?id=<?= $document_id ?>">
|
|
||||||
<i class="fas fa-fw fa-pencil-alt mr-2"></i>Edit
|
|
||||||
</a>
|
|
||||||
<div class="dropdown-divider"></div>
|
|
||||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#shareModal" onclick="populateShareModal(<?php echo "$client_id, 'Document', $document_id"; ?>)">
|
|
||||||
<i class="fas fa-fw fa-share mr-2"></i>Share
|
|
||||||
</a>
|
|
||||||
<div class="dropdown-divider"></div>
|
|
||||||
<a class="dropdown-item ajax-modal" href="#"
|
|
||||||
data-modal-url="modals/document/document_rename.php?id=<?= $document_id ?>">
|
|
||||||
<i class="fas fa-fw fa-pencil-alt mr-2"></i>Rename
|
|
||||||
</a>
|
|
||||||
<div class="dropdown-divider"></div>
|
|
||||||
<a class="dropdown-item ajax-modal" href="#"
|
|
||||||
data-modal-url="modals/document/document_move.php?id=<?= $document_id ?>">
|
|
||||||
<i class="fas fa-fw fa-exchange-alt mr-2"></i>Move
|
|
||||||
</a>
|
|
||||||
<?php if ($session_user_role == 3) { ?>
|
|
||||||
<div class="dropdown-divider"></div>
|
|
||||||
<a class="dropdown-item text-danger confirm-link" href="post.php?archive_document=<?php echo $document_id; ?>">
|
|
||||||
<i class="fas fa-fw fa-archive mr-2"></i>Archive
|
|
||||||
</a>
|
|
||||||
<div class="dropdown-divider"></div>
|
|
||||||
<a class="dropdown-item text-danger text-bold confirm-link" href="post.php?delete_document=<?php echo $document_id; ?>">
|
|
||||||
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
|
||||||
</a>
|
|
||||||
<?php } ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<br>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
<?php require_once "../includes/filter_footer.php"; ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script src="../js/bulk_actions.js"></script>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
require_once "modals/share_modal.php";
|
|
||||||
require_once "modals/document/document_add_from_template.php";
|
|
||||||
require_once "../includes/footer.php";
|
|
||||||
@@ -71,7 +71,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="card card-dark">
|
<div class="card card-dark">
|
||||||
<div class="card-header py-2">
|
<div class="card-header py-2">
|
||||||
<h3 class="card-title mt-2"><i class="fa fa-fw fa-globe mr-2"></i>Domains</h3>
|
<h3 class="card-title mt-2"><i class="fa fa-fw fa-globe mr-2"></i>Domains</h3>
|
||||||
<div class="card-tools">
|
<div class="card-tools">
|
||||||
@@ -80,7 +80,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<?php if ($num_rows[0] > 0) { ?>
|
<?php if ($num_rows[0] > 0) { ?>
|
||||||
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportDomainModal">
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/domain/domain_export.php?<?= $client_url ?>">
|
||||||
<i class="fa fa-fw fa-download mr-2"></i>Export
|
<i class="fa fa-fw fa-download mr-2"></i>Export
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -357,16 +358,10 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<?php require_once "../includes/filter_footer.php";
|
<?php require_once "../includes/filter_footer.php"; ?>
|
||||||
?>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
|
||||||
require_once "modals/domain/domain_export.php";
|
|
||||||
?>
|
|
||||||
|
|
||||||
<script src="../js/bulk_actions.js"></script>
|
<script src="../js/bulk_actions.js"></script>
|
||||||
|
|
||||||
<?php require_once "../includes/footer.php";
|
<?php require_once "../includes/footer.php";
|
||||||
|
|
||||||
|
|||||||
@@ -67,7 +67,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<button type="button" class="btn btn-primary ajax-modal" data-modal-url="modals/expense/expense_add.php" data-modal-size="lg"><i class="fas fa-plus mr-2"></i>New Expense</button>
|
<button type="button" class="btn btn-primary ajax-modal" data-modal-url="modals/expense/expense_add.php" data-modal-size="lg"><i class="fas fa-plus mr-2"></i>New Expense</button>
|
||||||
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportExpensesModal">
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/expense/expense_export.php">
|
||||||
<i class="fa fa-fw fa-download mr-2"></i>Export
|
<i class="fa fa-fw fa-download mr-2"></i>Export
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -286,7 +287,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<tr>
|
<tr>
|
||||||
<td class="pr-0 bg-light">
|
<td class="pr-0 bg-light">
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input class="form-check-input bulk-select" type="checkbox" name="selected_ids[]" value="<?= $expense_id ?>">
|
<input class="form-check-input bulk-select" type="checkbox" name="expense_ids[]" value="<?= $expense_id ?>">
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@@ -357,5 +358,4 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<script src="/js/bulk_actions.js"></script>
|
<script src="/js/bulk_actions.js"></script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
require_once "modals/expense/expense_export.php";
|
|
||||||
require_once "../includes/footer.php";
|
require_once "../includes/footer.php";
|
||||||
|
|||||||
@@ -368,22 +368,24 @@ $num_root_items = intval($row_root_files['num']) + intval($row_root_docs['num'])
|
|||||||
<h3 class="card-title mt-2"><i class="fa fa-fw fa-folder mr-2"></i>Files</h3>
|
<h3 class="card-title mt-2"><i class="fa fa-fw fa-folder mr-2"></i>Files</h3>
|
||||||
|
|
||||||
<div class="card-tools">
|
<div class="card-tools">
|
||||||
|
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle" data-toggle="dropdown"><i class="fas fa-fw fa-plus mr-2"></i>New</button>
|
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
|
||||||
<div class="dropdown-menu">
|
<i class="fas fa-fw fa-plus mr-2"></i>New
|
||||||
|
</button>
|
||||||
|
<div class="dropdown-menu dropdown-menu-right">
|
||||||
<a class="dropdown-item text-dark ajax-modal" href="#"
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
data-modal-url="modals/file/file_upload.php?client_id=<?= $client_id ?>&folder_id=<?= $get_folder_id ?>">
|
data-modal-url="modals/file/file_upload.php?client_id=<?= $client_id ?>&folder_id=<?= $get_folder_id ?>">
|
||||||
<i class="fas fa-fw fa-cloud-upload-alt mr-2"></i>Upload File
|
<i class="fas fa-fw fa-cloud-upload-alt mr-2"></i>Upload File
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-dark ajax-modal" href="#"
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
data-modal-url="modals/document/document_add.php?client_id=<?= $client_id ?>&folder_id=<?= $get_folder_id ?>">
|
data-modal-url="modals/document/document_add.php?client_id=<?= $client_id ?>&folder_id=<?= $get_folder_id ?>"
|
||||||
|
data-modal-size="lg">
|
||||||
<i class="fas fa-fw fa-file-alt mr-2"></i>Document
|
<i class="fas fa-fw fa-file-alt mr-2"></i>Document
|
||||||
</a>
|
</a>
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal"
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
data-target="#addDocumentFromTemplateModal">
|
data-modal-url="modals/document/document_add_from_template.php?client_id=<?= $client_id ?>&folder_id=<?= $get_folder_id ?>">
|
||||||
<i class="fas fa-fw fa-file mr-2"></i>Document from Template
|
<i class="fas fa-fw fa-file mr-2"></i>Document from Template
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
@@ -447,24 +449,15 @@ $num_root_items = intval($row_root_files['num']) + intval($row_root_docs['num'])
|
|||||||
</button>
|
</button>
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
<a class="dropdown-item ajax-modal" href="#"
|
<a class="dropdown-item ajax-modal" href="#"
|
||||||
data-modal-url="modals/file/file_bulk_move.php?client_id=<?= $client_id ?>"
|
data-modal-url="modals/file/file_bulk_move.php?client_id=<?= $client_id ?>¤t_folder_id=<?= $get_folder_id ?>"
|
||||||
data-bulk="true">
|
data-bulk="true">
|
||||||
<i class="fas fa-fw fa-exchange-alt mr-2"></i>Move Files
|
<i class="fas fa-fw fa-exchange-alt mr-2"></i>Move Files
|
||||||
</a>
|
</a>
|
||||||
<a class="dropdown-item ajax-modal" href="#"
|
|
||||||
data-modal-url="modals/document/document_bulk_move.php?client_id=<?= $client_id ?>"
|
|
||||||
data-bulk="true">
|
|
||||||
<i class="fas fa-fw fa-exchange-alt mr-2"></i>Move Documents
|
|
||||||
</a>
|
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<button class="dropdown-item text-danger text-bold"
|
<button class="dropdown-item text-danger text-bold"
|
||||||
type="submit" form="bulkActions" name="bulk_delete_files">
|
type="submit" form="bulkActions" name="bulk_delete_files">
|
||||||
<i class="fas fa-fw fa-trash mr-2"></i>Delete Files
|
<i class="fas fa-fw fa-trash mr-2"></i>Delete Files
|
||||||
</button>
|
</button>
|
||||||
<button class="dropdown-item text-danger text-bold"
|
|
||||||
type="submit" form="bulkActions" name="bulk_delete_documents">
|
|
||||||
<i class="fas fa-fw fa-trash mr-2"></i>Delete Documents
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -277,7 +277,8 @@ if (isset($_GET['invoice_id'])) {
|
|||||||
data-modal-url="modals/invoice/invoice_copy.php?id=<?= $invoice_id ?>">
|
data-modal-url="modals/invoice/invoice_copy.php?id=<?= $invoice_id ?>">
|
||||||
<i class="fa fa-fw fa-copy text-secondary mr-2"></i>Copy
|
<i class="fa fa-fw fa-copy text-secondary mr-2"></i>Copy
|
||||||
</a>
|
</a>
|
||||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#addInvoiceRecurringModal<?php echo $invoice_id; ?>">
|
<a class="dropdown-item ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/invoice/invoice_recurring_add.php?invoice_id=<?= $invoice_id ?>">
|
||||||
<i class="fa fa-fw fa-sync-alt text-secondary mr-2"></i>Recurring
|
<i class="fa fa-fw fa-sync-alt text-secondary mr-2"></i>Recurring
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
@@ -725,7 +726,6 @@ if (isset($_GET['invoice_id'])) {
|
|||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
include_once "modals/invoice/invoice_add_ticket.php";
|
include_once "modals/invoice/invoice_add_ticket.php";
|
||||||
include_once "modals/invoice/invoice_recurring_add.php";
|
|
||||||
include_once "modals/invoice/invoice_note.php";
|
include_once "modals/invoice/invoice_note.php";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -162,10 +162,14 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<h3 class="card-title mt-2"><i class="fa fa-fw fa-file-invoice mr-2"></i>Invoices</h3>
|
<h3 class="card-title mt-2"><i class="fa fa-fw fa-file-invoice mr-2"></i>Invoices</h3>
|
||||||
<div class="card-tools">
|
<div class="card-tools">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<button type="button" class="btn btn-primary ajax-modal" data-modal-url="modals/invoice/invoice_add.php?<?= $client_url ?>"><i class="fas fa-plus mr-2"></i>New Invoice</button>
|
<button type="button" class="btn btn-primary ajax-modal"
|
||||||
|
data-modal-url="modals/invoice/invoice_add.php?<?= $client_url ?>">
|
||||||
|
<i class="fas fa-plus mr-2"></i>New Invoice
|
||||||
|
</button>
|
||||||
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportInvoicesModal">
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/invoice/invoice_export.php?<?= $client_url ?>">
|
||||||
<i class="fa fa-fw fa-download mr-2"></i>Export
|
<i class="fa fa-fw fa-download mr-2"></i>Export
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -453,5 +457,4 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<script src="../js/bulk_actions.js"></script>
|
<script src="../js/bulk_actions.js"></script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
require_once "modals/invoice/invoice_export.php";
|
|
||||||
require_once "../includes/footer.php";
|
require_once "../includes/footer.php";
|
||||||
|
|||||||
@@ -84,12 +84,14 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
</button>
|
</button>
|
||||||
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#importLocationModal">
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/location/location_import.php?<?= $client_url ?>">
|
||||||
<i class="fa fa-fw fa-upload mr-2"></i>Import
|
<i class="fa fa-fw fa-upload mr-2"></i>Import
|
||||||
</a>
|
</a>
|
||||||
<?php if ($num_rows[0] > 0) { ?>
|
<?php if ($num_rows[0] > 0) { ?>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportLocationModal">
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/location/location_export.php?<?= $client_url ?>">
|
||||||
<i class="fa fa-fw fa-download mr-2"></i>Export
|
<i class="fa fa-fw fa-download mr-2"></i>Export
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
@@ -403,7 +405,4 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<script src="../js/bulk_actions.js"></script>
|
<script src="../js/bulk_actions.js"></script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once "modals/location/location_import.php";
|
|
||||||
require_once "modals/location/location_export.php";
|
|
||||||
require_once "../includes/footer.php";
|
require_once "../includes/footer.php";
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$asset_ids = array_map('intval', $_GET['asset_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($asset_ids);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ ob_start();
|
|||||||
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="asset_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($asset_ids as $asset_id) { ?><input type="hidden" name="asset_ids[]" value="<?= $asset_id ?>"><?php } ?>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$client_id = intval($_GET['client_id']);
|
$client_id = intval($_GET['client_id']);
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$asset_ids = array_map('intval', $_GET['asset_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($asset_ids);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -20,7 +20,7 @@ ob_start();
|
|||||||
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="asset_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($asset_ids as $asset_id) { ?><input type="hidden" name="asset_ids[]" value="<?= $asset_id ?>"><?php } ?>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$client_id = intval($_GET['client_id']);
|
$client_id = intval($_GET['client_id']);
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$asset_ids = array_map('intval', $_GET['asset_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($asset_ids);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -20,7 +20,7 @@ ob_start();
|
|||||||
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="asset_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($asset_ids as $asset_id) { ?><input type="hidden" name="asset_ids[]" value="<?= $asset_id ?>"><?php } ?>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$asset_ids = array_map('intval', $_GET['asset_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($asset_ids);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ ob_start();
|
|||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="asset_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($asset_ids as $asset_id) { ?><input type="hidden" name="asset_ids[]" value="<?= $asset_id ?>"><?php } ?>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$asset_ids = array_map('intval', $_GET['asset_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($asset_ids);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ ob_start();
|
|||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="asset_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($asset_ids as $asset_id) { ?><input type="hidden" name="asset_ids[]" value="<?= $asset_id ?>"><?php } ?>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<input type="hidden" name="remove_tags" value="0">
|
<input type="hidden" name="remove_tags" value="0">
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$asset_ids = array_map('intval', $_GET['asset_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($asset_ids);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ ob_start();
|
|||||||
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="asset_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($asset_ids as $asset_id) { ?><input type="hidden" name="asset_ids[]" value="<?= $asset_id ?>"><?php } ?>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$asset_ids = array_map('intval', $_GET['asset_ids'] ?? []);
|
||||||
$count = count($selected_ids);
|
$count = count($asset_ids);
|
||||||
|
|
||||||
$client_id = intval($_GET['client_id'] ?? 0);
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
if ($client_id) {
|
if ($client_id) {
|
||||||
@@ -25,7 +25,7 @@ ob_start();
|
|||||||
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="asset_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($asset_ids as $asset_id) { ?><input type="hidden" name="asset_ids[]" value="<?= $asset_id ?>"><?php } ?>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +1,22 @@
|
|||||||
<div class="modal" id="exportAssetModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Assets to CSV</h5>
|
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Assets to CSV</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?php echo $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php if ($client_url) { ?>
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
@@ -20,7 +25,7 @@
|
|||||||
<button type="submit" name="export_assets_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
<button type="submit" name="export_assets_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -1,18 +1,23 @@
|
|||||||
<div class="modal" id="importAssetModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title"><i class="fa fa-fw fa-desktop mr-2"></i>Import Assets</h5>
|
<h5 class="modal-title"><i class="fa fa-fw fa-desktop mr-2"></i>Import Assets</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" enctype="multipart/form-data" autocomplete="off">
|
<form action="post.php" method="post" enctype="multipart/form-data" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?php echo $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
|
|
||||||
<?php if ($client_url) { ?>
|
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
|
||||||
<?php } ?>
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<p><strong>Format csv file with headings & data:</strong><br>Name, Description, Type, Make, Model, Serial, OS, Purchase Date, Assigned To, Location, Physical Location, Notes</p>
|
<p><strong>Format csv file with headings & data:</strong><br>Name, Description, Type, Make, Model, Serial, OS, Purchase Date, Assigned To, Location, Physical Location, Notes</p>
|
||||||
<hr>
|
<hr>
|
||||||
@@ -26,7 +31,7 @@
|
|||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="submit" name="import_assets_csv" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Import</button>
|
<button type="submit" name="import_assets_csv" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Import</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -1,6 +1,19 @@
|
|||||||
<div class="modal" id="bulkAssignNetworkModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
|
$interface_ids = array_map('intval', $_GET['interface_ids'] ?? []);
|
||||||
|
|
||||||
|
$count = count($interface_ids);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
|
<?php foreach ($interface_ids as $interface_id) { ?><input type="hidden" name="interface_ids[]" value="<?= $interface_id ?>"><?php } ?>
|
||||||
<div class="modal-header bg-dark">
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title"><i class="fa fa-fw fa-network-wired mr-2"></i>Bulk Assign Network</h5>
|
<h5 class="modal-title"><i class="fa fa-fw fa-network-wired mr-2"></i>Bulk Assign Network</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
@@ -46,6 +59,7 @@
|
|||||||
<button type="submit" name="bulk_edit_asset_interface_network" class="btn btn-primary text-bold"><i class="fas fa-check mr-2"></i>Assign</button>
|
<button type="submit" name="bulk_edit_asset_interface_network" class="btn btn-primary text-bold"><i class="fas fa-check mr-2"></i>Assign</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -1,6 +1,20 @@
|
|||||||
<div class="modal" id="bulkSetInterfaceTypeModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
|
$interface_ids = array_map('intval', $_GET['interface_ids'] ?? []);
|
||||||
|
|
||||||
|
$count = count($interface_ids);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
|
<?php foreach ($interface_ids as $interface_id) { ?><input type="hidden" name="interface_ids[]" value="<?= $interface_id ?>"><?php } ?>
|
||||||
|
|
||||||
<div class="modal-header bg-dark">
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title"><i class="fa fa-fw fa-ethernet mr-2"></i>Bulk Set Interface Type</h5>
|
<h5 class="modal-title"><i class="fa fa-fw fa-ethernet mr-2"></i>Bulk Set Interface Type</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
@@ -31,6 +45,7 @@
|
|||||||
<button type="submit" name="bulk_edit_asset_interface_type" class="btn btn-primary text-bold"><i class="fas fa-check mr-2"></i>Set</button>
|
<button type="submit" name="bulk_edit_asset_interface_type" class="btn btn-primary text-bold"><i class="fas fa-check mr-2"></i>Set</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -37,15 +37,15 @@ ob_start();
|
|||||||
<option value="">- Select a Document -</option>
|
<option value="">- Select a Document -</option>
|
||||||
<?php
|
<?php
|
||||||
$sql_documents_select = mysqli_query($mysqli, "
|
$sql_documents_select = mysqli_query($mysqli, "
|
||||||
SELECT documents.document_id, documents.document_name
|
SELECT documents.document_id, document_name
|
||||||
FROM documents
|
FROM documents
|
||||||
LEFT JOIN asset_documents
|
LEFT JOIN asset_documents
|
||||||
ON documents.document_id = asset_documents.document_id
|
ON documents.document_id = asset_documents.document_id
|
||||||
AND asset_documents.asset_id = $asset_id
|
AND asset_documents.asset_id = $asset_id
|
||||||
WHERE documents.document_client_id = $client_id
|
WHERE document_client_id = $client_id
|
||||||
AND documents.document_archived_at IS NULL
|
AND document_archived_at IS NULL
|
||||||
AND asset_documents.asset_id IS NULL
|
AND asset_documents.asset_id IS NULL
|
||||||
ORDER BY documents.document_name ASC
|
ORDER BY document_name ASC
|
||||||
");
|
");
|
||||||
while ($row = mysqli_fetch_array($sql_documents_select)) {
|
while ($row = mysqli_fetch_array($sql_documents_select)) {
|
||||||
$document_id = intval($row['document_id']);
|
$document_id = intval($row['document_id']);
|
||||||
@@ -67,4 +67,3 @@ ob_start();
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
require_once '../../../includes/modal_footer.php';
|
require_once '../../../includes/modal_footer.php';
|
||||||
?>
|
|
||||||
|
|||||||
@@ -70,4 +70,3 @@ ob_start();
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
require_once '../../../includes/modal_footer.php';
|
require_once '../../../includes/modal_footer.php';
|
||||||
?>
|
|
||||||
|
|||||||
@@ -1,16 +1,21 @@
|
|||||||
<div class="modal" id="exportCertificateModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Certificates to CSV</h5>
|
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Certificates to CSV</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<?php if ($client_url) { ?>
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
|
||||||
<?php } ?>
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -18,7 +23,7 @@
|
|||||||
<button type="submit" name="export_certificates_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
<button type="submit" name="export_certificates_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$client_ids = array_map('intval', $_GET['client_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($client_ids);
|
||||||
|
|
||||||
// Generate the HTML form content using output buffering.
|
// Generate the HTML form content using output buffering.
|
||||||
ob_start();
|
ob_start();
|
||||||
@@ -20,7 +20,7 @@ ob_start();
|
|||||||
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="client_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($client_ids as $client_id) { ?><input type="hidden" name="client_ids[]" value="<?= $client_id ?>"><?php } ?>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$client_ids = array_map('intval', $_GET['client_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($client_ids);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ ob_start();
|
|||||||
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="client_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($client_ids as $client_id) { ?><input type="hidden" name="client_ids[]" value="<?= $client_id ?>"><?php } ?>
|
||||||
<input type="hidden" name="bulk_remove_tags" value="0">
|
<input type="hidden" name="bulk_remove_tags" value="0">
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$client_ids = array_map('intval', $_GET['client_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($client_ids);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ ob_start();
|
|||||||
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="client_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($client_ids as $client_id) { ?><input type="hidden" name="client_ids[]" value="<?= $client_id ?>"><?php } ?>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$client_ids = array_map('intval', $_GET['client_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($client_ids);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ ob_start();
|
|||||||
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="client_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($client_ids as $client_id) { ?><input type="hidden" name="client_ids[]" value="<?= $client_id ?>"><?php } ?>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$client_ids = array_map('intval', $_GET['client_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($client_ids);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ ob_start();
|
|||||||
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="client_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($client_ids as $client_id) { ?><input type="hidden" name="client_ids[]" value="<?= $client_id ?>"><?php } ?>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$client_ids = array_map('intval', $_GET['client_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($client_ids);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ ob_start();
|
|||||||
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="client_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($client_ids as $client_id) { ?><input type="hidden" name="client_ids[]" value="<?= $client_id ?>"><?php } ?>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
|||||||
@@ -1,20 +1,25 @@
|
|||||||
<div class="modal" id="exportClientModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Clients to CSV</h5>
|
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Clients to CSV</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="submit" name="export_clients_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
<button type="submit" name="export_clients_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -1,13 +1,17 @@
|
|||||||
<div class="modal" id="importClientModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title"><i class="fa fa-fw fa-users mr-2"></i>Import Clients</h5>
|
<h5 class="modal-title"><i class="fa fa-fw fa-users mr-2"></i>Import Clients</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" enctype="multipart/form-data" autocomplete="off">
|
<form action="post.php" method="post" enctype="multipart/form-data" autocomplete="off">
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<p><strong>Importing Multiple Contacts:</strong><br>When importing a client, only one contact (which will become the primary contact) and one location (which will become the primary location) can be added initially. To add additional contacts, you will need to click into each client, navigate to the Contacts section, and import multiple contacts individually for each client.</p>
|
<p><strong>Importing Multiple Contacts:</strong><br>When importing a client, only one contact (which will become the primary contact) and one location (which will become the primary location) can be added initially. To add additional contacts, you will need to click into each client, navigate to the Contacts section, and import multiple contacts individually for each client.</p>
|
||||||
<p><strong>Format csv file with headings & data:</strong><br>Client Name, Industry, Referral, Website, Primary Location Name, Location Phone, Location Address, City, State, Postal Code, Country, Primary Contact Name, Title, Contact Phone, Extension, Contact Mobile, Contact Email, Hourly Rate, Currency, Payment Terms, Tax ID, Abbreviation</p>
|
<p><strong>Format csv file with headings & data:</strong><br>Client Name, Industry, Referral, Website, Primary Location Name, Location Phone, Location Address, City, State, Postal Code, Country, Primary Contact Name, Title, Contact Phone, Extension, Contact Mobile, Contact Email, Hourly Rate, Currency, Payment Terms, Tax ID, Abbreviation</p>
|
||||||
@@ -22,7 +26,7 @@
|
|||||||
<button type="submit" name="import_clients_csv" class="btn btn-primary text-strong"><i class="fas fa-upload mr-2"></i>Import</button>
|
<button type="submit" name="import_clients_csv" class="btn btn-primary text-strong"><i class="fas fa-upload mr-2"></i>Import</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$client_id = intval($_GET['client_id']);
|
$client_id = intval($_GET['client_id']);
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$contact_ids = array_map('intval', $_GET['contact_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($contact_ids);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ ob_start();
|
|||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="contact_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($contact_ids as $contact_id) { ?><input type="hidden" name="contact_ids[]" value="<?= $contact_id ?>"><?php } ?>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$contact_ids = array_map('intval', $_GET['contact_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($contact_ids);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ ob_start();
|
|||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="contact_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($contact_ids as $contact_id) { ?><input type="hidden" name="contact_ids[]" value="<?= $contact_id ?>"><?php } ?>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<input type="hidden" name="bulk_remove_tags" value="0">
|
<input type="hidden" name="bulk_remove_tags" value="0">
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$contact_ids = array_map('intval', $_GET['contact_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($contact_ids);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ ob_start();
|
|||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="contact_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($contact_ids as $contact_id) { ?><input type="hidden" name="contact_ids[]" value="<?= $contact_id ?>"><?php } ?>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<label>Department / Group</label>
|
<label>Department / Group</label>
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$contact_ids = array_map('intval', $_GET['contact_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($contact_ids);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ ob_start();
|
|||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="contact_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($contact_ids as $contact_id) { ?><input type="hidden" name="contact_ids[]" value="<?= $contact_id ?>"><?php } ?>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<label>Phone</label>
|
<label>Phone</label>
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$contact_ids = array_map('intval', $_GET['contact_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($contact_ids);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ ob_start();
|
|||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="contact_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($contact_ids as $contact_id) { ?><input type="hidden" name="contact_ids[]" value="<?= $contact_id ?>"><?php } ?>
|
||||||
<input type="hidden" name="bulk_contact_important" value="0">
|
<input type="hidden" name="bulk_contact_important" value="0">
|
||||||
<input type="hidden" name="bulk_contact_billing" value="0">
|
<input type="hidden" name="bulk_contact_billing" value="0">
|
||||||
<input type="hidden" name="bulk_contact_technical" value="0">
|
<input type="hidden" name="bulk_contact_technical" value="0">
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$contact_ids = array_map('intval', $_GET['contact_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($contact_ids);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ ob_start();
|
|||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="contact_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($contact_ids as $contact_id) { ?><input type="hidden" name="contact_ids[]" value="<?= $contact_id ?>"><?php } ?>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<label>From Email / Display Name</label>
|
<label>From Email / Display Name</label>
|
||||||
|
|||||||
@@ -1,16 +1,22 @@
|
|||||||
<div class="modal" id="exportContactModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Contacts to CSV</h5>
|
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Contacts to CSV</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<?php if($client_url) { ?>
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
|
||||||
<?php } ?>
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -18,7 +24,7 @@
|
|||||||
<button type="submit" name="export_contacts_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
<button type="submit" name="export_contacts_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -1,16 +1,21 @@
|
|||||||
<div class="modal" id="importContactModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title"><i class="fa fa-fw fa-users mr-2"></i>Import Contacts</h5>
|
<h5 class="modal-title"><i class="fa fa-fw fa-users mr-2"></i>Import Contacts</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" enctype="multipart/form-data" autocomplete="off">
|
<form action="post.php" method="post" enctype="multipart/form-data" autocomplete="off">
|
||||||
<?php if($client_url) { ?>
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
|
||||||
<?php } ?>
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<p><strong>Format csv file with headings & data:</strong><br>Name, Title, Department, Email, Phone, Extension, Mobile, Location</p>
|
<p><strong>Format csv file with headings & data:</strong><br>Name, Title, Department, Email, Phone, Extension, Mobile, Location</p>
|
||||||
<hr>
|
<hr>
|
||||||
@@ -24,7 +29,7 @@
|
|||||||
<button type="submit" name="import_contacts_csv" class="btn btn-primary text-strong"><i class="fas fa-upload mr-2"></i>Import</button>
|
<button type="submit" name="import_contacts_csv" class="btn btn-primary text-strong"><i class="fas fa-upload mr-2"></i>Import</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$credential_ids = array_map('intval', $_GET['credential_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($credential_ids);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ ob_start();
|
|||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="credential_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($credential_ids as $credential_id) { ?><input type="hidden" name="credential_ids[]" value="<?= $credential_id ?>"><?php } ?>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<input type="hidden" name="bulk_remove_tags" value="0">
|
<input type="hidden" name="bulk_remove_tags" value="0">
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,22 @@
|
|||||||
<div class="modal" id="exportCredentialModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Credentials to CSV</h5>
|
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Credentials to CSV</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<?php if ($client_url) { ?>
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
|
||||||
<?php } ?>
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -18,7 +24,7 @@
|
|||||||
<button type="submit" name="export_credentials_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
<button type="submit" name="export_credentials_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -1,16 +1,21 @@
|
|||||||
<div class="modal" id="importCredentialModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title"><i class="fas fa-fw fa-key mr-2"></i>Import Credentials</h5>
|
<h5 class="modal-title"><i class="fas fa-fw fa-key mr-2"></i>Import Credentials</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" enctype="multipart/form-data" autocomplete="off">
|
<form action="post.php" method="post" enctype="multipart/form-data" autocomplete="off">
|
||||||
<?php if ($client_url) { ?>
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
|
||||||
<?php } ?>
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<p><strong>Format csv file with headings & data:</strong><br>Name, Description, Username, Password, TOTP, URI</p>
|
<p><strong>Format csv file with headings & data:</strong><br>Name, Description, Username, Password, TOTP, URI</p>
|
||||||
<hr>
|
<hr>
|
||||||
@@ -24,7 +29,7 @@
|
|||||||
<button type="submit" name="import_credentials_csv" class="btn btn-primary"><i class="fa fa-upload mr-2"></i>Import</button>
|
<button type="submit" name="import_credentials_csv" class="btn btn-primary"><i class="fa fa-upload mr-2"></i>Import</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -1,13 +1,23 @@
|
|||||||
<div class="modal" id="addDocumentFromTemplateModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
|
$contact_id = intval($_GET['contact_id'] ?? 0);
|
||||||
|
$asset_id = intval($_GET['asset_id'] ?? 0);
|
||||||
|
intval($_GET['folder_id'] ?? 0);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title"><i class="fa fa-fw fa-file-alt mr-2"></i>New Document from Template</h5>
|
<h5 class="modal-title"><i class="fa fa-fw fa-file-alt mr-2"></i>New Document from Template</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
@@ -24,13 +34,11 @@
|
|||||||
while ($row = mysqli_fetch_array($sql_document_templates)) {
|
while ($row = mysqli_fetch_array($sql_document_templates)) {
|
||||||
$document_template_id = intval($row['document_template_id']);
|
$document_template_id = intval($row['document_template_id']);
|
||||||
$document_template_name = nullable_htmlentities($row['document_template_name']);
|
$document_template_name = nullable_htmlentities($row['document_template_name']);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<option value="<?php echo $document_template_id ?>"><?php echo $document_template_name; ?></option>
|
<option value="<?php echo $document_template_id ?>"><?php echo $document_template_name; ?></option>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -64,17 +72,15 @@
|
|||||||
<select class="form-control" name="folder">
|
<select class="form-control" name="folder">
|
||||||
<option value="0">/</option>
|
<option value="0">/</option>
|
||||||
<?php
|
<?php
|
||||||
$sql_folders = mysqli_query($mysqli, "SELECT * FROM folders WHERE folder_location = $folder_location AND folder_client_id = $client_id ORDER BY folder_name ASC");
|
$sql_folders = mysqli_query($mysqli, "SELECT * FROM folders WHERE folder_client_id = $client_id ORDER BY folder_name ASC");
|
||||||
while ($row = mysqli_fetch_array($sql_folders)) {
|
while ($row = mysqli_fetch_array($sql_folders)) {
|
||||||
$folder_id = intval($row['folder_id']);
|
$folder_id = intval($row['folder_id']);
|
||||||
$folder_name = nullable_htmlentities($row['folder_name']);
|
$folder_name = nullable_htmlentities($row['folder_name']);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<option <?php if (isset($_GET['folder_id']) && $_GET['folder_id'] == $folder_id) echo "selected"; ?> value="<?php echo $folder_id ?>"><?php echo $folder_name; ?></option>
|
<option <?php if (isset($_GET['folder_id']) && $_GET['folder_id'] == $folder_id) echo "selected"; ?> value="<?php echo $folder_id ?>"><?php echo $folder_name; ?></option>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -82,12 +88,10 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
|
|
||||||
<button type="submit" name="add_document_from_template" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Create</button>
|
<button type="submit" name="add_document_from_template" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Create</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
</div>
|
<?php
|
||||||
</form>
|
require_once '../../../includes/modal_footer.php';
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ ob_start();
|
|||||||
<select class="form-control select2" name="folder">
|
<select class="form-control select2" name="folder">
|
||||||
<option value="0">/</option>
|
<option value="0">/</option>
|
||||||
<?php
|
<?php
|
||||||
$sql_folders_select = mysqli_query($mysqli, "SELECT * FROM folders WHERE folder_location = 0 AND folder_client_id = $client_id ORDER BY folder_name ASC");
|
$sql_folders_select = mysqli_query($mysqli, "SELECT * FROM folders WHERE folder_client_id = $client_id ORDER BY folder_name ASC");
|
||||||
while ($row = mysqli_fetch_array($sql_folders_select)) {
|
while ($row = mysqli_fetch_array($sql_folders_select)) {
|
||||||
$folder_id_select = intval($row['folder_id']);
|
$folder_id_select = intval($row['folder_id']);
|
||||||
$folder_name_select = nullable_htmlentities($row['folder_name']);
|
$folder_name_select = nullable_htmlentities($row['folder_name']);
|
||||||
|
|||||||
@@ -1,18 +1,34 @@
|
|||||||
<div class="modal" id="editDocumentClientVisibileModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
|
$document_id = intval($_GET['document_id']);
|
||||||
|
|
||||||
|
$sql = mysqli_query($mysqli, "SELECT * FROM documents
|
||||||
|
WHERE document_id = $document_id
|
||||||
|
LIMIT 1
|
||||||
|
");
|
||||||
|
|
||||||
|
$row = mysqli_fetch_array($sql);
|
||||||
|
$document_name = nullable_htmlentities($row['document_name']);
|
||||||
|
$document_client_visible = intval($row['document_client_visible']);
|
||||||
|
$client_id = intval($row['document_client_id']);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title">
|
<h5 class="modal-title">
|
||||||
<i class="fa fa-fw fa-handshake mr-2"></i>
|
<i class="fa fa-fw fa-handshake mr-2"></i>
|
||||||
Edit Visibility Status for <strong><?php echo "$document_name"; ?></strong>
|
Edit Visibility Status for <strong><?= $document_name ?></strong>
|
||||||
</h5>
|
</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<input type="hidden" name="document_id" value="<?php echo $document_id; ?>">
|
<input type="hidden" name="document_id" value="<?= $document_id ?>">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Visibility</label>
|
<label>Visibility</label>
|
||||||
<p>Should this document be visible in the portal to client contacts with the 'Technical' role?</p>
|
<p>Should this document be visible in the portal to client contacts with the 'Technical' role?</p>
|
||||||
@@ -31,12 +47,11 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="submit" name="toggle_document_visibility" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Save</button>
|
<button type="submit" name="toggle_document_visibility" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Save changes</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
</div>
|
|
||||||
|
|||||||
@@ -1,14 +1,29 @@
|
|||||||
<div class="modal" id="linkAssetToDocumentModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
<h5 class="modal-title"><i class="fa fa-fw fa-desktop mr-2"></i>Link Asset to <strong><?php echo $document_name; ?></strong></h5>
|
$document_id = intval($_GET['document_id']);
|
||||||
|
|
||||||
|
$sql = mysqli_query($mysqli, "SELECT * FROM documents
|
||||||
|
WHERE document_id = $document_id
|
||||||
|
LIMIT 1
|
||||||
|
");
|
||||||
|
|
||||||
|
$row = mysqli_fetch_array($sql);
|
||||||
|
$document_name = nullable_htmlentities($row['document_name']);
|
||||||
|
$client_id = intval($row['document_client_id']);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
|
<h5 class="modal-title"><i class="fa fa-fw fa-desktop mr-2"></i>Link Asset to <strong><?= $document_name ?></strong></h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="document_id" value="<?php echo $document_id; ?>">
|
<input type="hidden" name="document_id" value="<?= $document_id ?>">
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -19,26 +34,23 @@
|
|||||||
<select class="form-control select2" name="asset_id">
|
<select class="form-control select2" name="asset_id">
|
||||||
<option value="">- Select an Asset -</option>
|
<option value="">- Select an Asset -</option>
|
||||||
<?php
|
<?php
|
||||||
// Check if there are any associated vendors
|
$sql_assets_select = mysqli_query($mysqli, "
|
||||||
if (!empty($linked_assets)) {
|
SELECT assets.asset_id, asset_name
|
||||||
$excluded_asset_ids = implode(",", $linked_assets);
|
FROM assets
|
||||||
$exclude_condition = "AND asset_id NOT IN ($excluded_asset_ids)";
|
LEFT JOIN asset_documents
|
||||||
} else {
|
ON assets.asset_id = asset_documents.asset_id
|
||||||
$exclude_condition = ""; // No condition if there are no displayed vendors
|
AND asset_documents.document_id = $document_id
|
||||||
}
|
|
||||||
|
|
||||||
$sql_assets_select = mysqli_query($mysqli, "SELECT * FROM assets
|
|
||||||
WHERE asset_client_id = $client_id
|
WHERE asset_client_id = $client_id
|
||||||
AND asset_archived_at IS NULL
|
AND asset_archived_at IS NULL
|
||||||
$exclude_condition
|
AND asset_documents.asset_id IS NULL
|
||||||
ORDER BY asset_name ASC"
|
ORDER BY asset_name ASC
|
||||||
);
|
");
|
||||||
while ($row = mysqli_fetch_array($sql_assets_select)) {
|
while ($row = mysqli_fetch_array($sql_assets_select)) {
|
||||||
$asset_id = intval($row['asset_id']);
|
$asset_id = intval($row['asset_id']);
|
||||||
$asset_name = nullable_htmlentities($row['asset_name']);
|
$asset_name = nullable_htmlentities($row['asset_name']);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<option value="<?php echo $asset_id ?>"><?php echo $asset_name; ?></option>
|
<option value="<?= $asset_id ?>"><?= $asset_name ?></option>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@@ -51,7 +63,7 @@
|
|||||||
<button type="submit" name="link_asset_to_document" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Link</button>
|
<button type="submit" name="link_asset_to_document" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Link</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -1,14 +1,30 @@
|
|||||||
<div class="modal" id="linkContactToDocumentModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
<h5 class="modal-title"><i class="fa fa-fw fa-user mr-2"></i>Link Contact to <strong><?php echo $document_name; ?></strong></h5>
|
$document_id = intval($_GET['document_id']);
|
||||||
|
|
||||||
|
$sql = mysqli_query($mysqli, "SELECT * FROM documents
|
||||||
|
WHERE document_id = $document_id
|
||||||
|
LIMIT 1
|
||||||
|
");
|
||||||
|
|
||||||
|
$row = mysqli_fetch_array($sql);
|
||||||
|
$document_name = nullable_htmlentities($row['document_name']);
|
||||||
|
$client_id = intval($row['document_client_id']);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
|
<h5 class="modal-title"><i class="fa fa-fw fa-user mr-2"></i>Link Contact to <strong><?= $document_name ?></strong></h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="document_id" value="<?php echo $document_id; ?>">
|
<input type="hidden" name="document_id" value="<?= $document_id ?>">
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -19,26 +35,23 @@
|
|||||||
<select class="form-control select2" name="contact_id">
|
<select class="form-control select2" name="contact_id">
|
||||||
<option value="">- Select a Contact -</option>
|
<option value="">- Select a Contact -</option>
|
||||||
<?php
|
<?php
|
||||||
// Check if there are any associated vendors
|
$sql_contacts_select = mysqli_query($mysqli, "
|
||||||
if (!empty($linked_contacts)) {
|
SELECT contacts.contact_id, contact_name
|
||||||
$excluded_contact_ids = implode(",", $linked_contacts);
|
FROM contacts
|
||||||
$exclude_condition = "AND contact_id NOT IN ($excluded_contact_ids)";
|
LEFT JOIN contact_documents
|
||||||
} else {
|
ON contacts.contact_id = contact_documents.contact_id
|
||||||
$exclude_condition = ""; // No condition if there are no displayed vendors
|
AND contact_documents.document_id = $document_id
|
||||||
}
|
|
||||||
|
|
||||||
$sql_contacts_select = mysqli_query($mysqli, "SELECT * FROM contacts
|
|
||||||
WHERE contact_client_id = $client_id
|
WHERE contact_client_id = $client_id
|
||||||
AND contact_archived_at IS NULL
|
AND contact_archived_at IS NULL
|
||||||
$exclude_condition
|
AND contact_documents.contact_id IS NULL
|
||||||
ORDER BY contact_name ASC"
|
ORDER BY contact_name ASC
|
||||||
);
|
");
|
||||||
while ($row = mysqli_fetch_array($sql_contacts_select)) {
|
while ($row = mysqli_fetch_array($sql_contacts_select)) {
|
||||||
$contact_id = intval($row['contact_id']);
|
$contact_id = intval($row['contact_id']);
|
||||||
$contact_name = nullable_htmlentities($row['contact_name']);
|
$contact_name = nullable_htmlentities($row['contact_name']);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<option value="<?php echo $contact_id ?>"><?php echo $contact_name; ?></option>
|
<option value="<?= $contact_id ?>"><?= $contact_name ?></option>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@@ -48,10 +61,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="submit" name="link_contact_to_document" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Link</button>
|
<button type="submit" name="link_contact_to_document" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Link Contact</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -1,14 +1,30 @@
|
|||||||
<div class="modal" id="linkFileToDocumentModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
<h5 class="modal-title"><i class="fa fa-fw fa-paperclip mr-2"></i>Link File to <strong><?php echo $document_name; ?></strong></h5>
|
$document_id = intval($_GET['document_id']);
|
||||||
|
|
||||||
|
$sql = mysqli_query($mysqli, "SELECT * FROM documents
|
||||||
|
WHERE document_id = $document_id
|
||||||
|
LIMIT 1
|
||||||
|
");
|
||||||
|
|
||||||
|
$row = mysqli_fetch_array($sql);
|
||||||
|
$document_name = nullable_htmlentities($row['document_name']);
|
||||||
|
$client_id = intval($row['document_client_id']);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
|
<h5 class="modal-title"><i class="fa fa-fw fa-paperclip mr-2"></i>Link File to <strong><?= $document_name ?></strong></h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="document_id" value="<?php echo $document_id; ?>">
|
<input type="hidden" name="document_id" value="<?= $document_id ?>">
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -19,9 +35,19 @@
|
|||||||
<select class="form-control select2" name="file_id">
|
<select class="form-control select2" name="file_id">
|
||||||
<option value="">- Select a File -</option>
|
<option value="">- Select a File -</option>
|
||||||
<?php
|
<?php
|
||||||
$sql_files_select = mysqli_query($mysqli, "SELECT * FROM files
|
$sql_files_select = mysqli_query($mysqli, "
|
||||||
LEFT JOIN folders ON folder_id = file_folder_id
|
SELECT files.file_id, file_name, folder_name
|
||||||
WHERE file_client_id = $client_id ORDER BY folder_name ASC, file_name ASC");
|
FROM files
|
||||||
|
LEFT JOIN folders
|
||||||
|
ON folder_id = file_folder_id
|
||||||
|
LEFT JOIN document_files
|
||||||
|
ON files.file_id = document_files.file_id
|
||||||
|
AND document_files.document_id = $document_id
|
||||||
|
WHERE file_client_id = $client_id
|
||||||
|
AND file_archived_at IS NULL
|
||||||
|
AND document_files.file_id IS NULL
|
||||||
|
ORDER BY folder_name ASC, file_name ASC
|
||||||
|
");
|
||||||
while ($row = mysqli_fetch_array($sql_files_select)) {
|
while ($row = mysqli_fetch_array($sql_files_select)) {
|
||||||
$file_id = intval($row['file_id']);
|
$file_id = intval($row['file_id']);
|
||||||
$file_name = nullable_htmlentities($row['file_name']);
|
$file_name = nullable_htmlentities($row['file_name']);
|
||||||
@@ -38,10 +64,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="submit" name="link_file_to_document" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Link</button>
|
<button type="submit" name="link_file_to_document" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Link File</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -1,14 +1,30 @@
|
|||||||
<div class="modal" id="linkSoftwareToDocumentModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
<h5 class="modal-title"><i class="fa fa-fw fa-user mr-2"></i>Link Software to <strong><?php echo $document_name; ?></strong></h5>
|
$document_id = intval($_GET['document_id']);
|
||||||
|
|
||||||
|
$sql = mysqli_query($mysqli, "SELECT * FROM documents
|
||||||
|
WHERE document_id = $document_id
|
||||||
|
LIMIT 1
|
||||||
|
");
|
||||||
|
|
||||||
|
$row = mysqli_fetch_array($sql);
|
||||||
|
$document_name = nullable_htmlentities($row['document_name']);
|
||||||
|
$client_id = intval($row['document_client_id']);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
|
<h5 class="modal-title"><i class="fa fa-fw fa-user mr-2"></i>Link Software to <strong><?= $document_name ?></strong></h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="document_id" value="<?php echo $document_id; ?>">
|
<input type="hidden" name="document_id" value="<?= $document_id ?>">
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -19,26 +35,24 @@
|
|||||||
<select class="form-control select2" name="software_id">
|
<select class="form-control select2" name="software_id">
|
||||||
<option value="">- Select a License -</option>
|
<option value="">- Select a License -</option>
|
||||||
<?php
|
<?php
|
||||||
// Check if there are any associated vendors
|
$sql_software_select = mysqli_query($mysqli, "
|
||||||
if (!empty($linked_software)) {
|
SELECT software.software_id, software_name
|
||||||
$excluded_software_ids = implode(",", $linked_software);
|
FROM software
|
||||||
$exclude_condition = "AND software_id NOT IN ($excluded_software_ids)";
|
LEFT JOIN software_documents
|
||||||
} else {
|
ON software.software_id = software_documents.software_id
|
||||||
$exclude_condition = ""; // No condition if there are no displayed vendors
|
AND software_documents.document_id = $document_id
|
||||||
}
|
|
||||||
|
|
||||||
$sql_software_select = mysqli_query($mysqli, "SELECT software_id, software_name FROM software
|
|
||||||
WHERE software_client_id = $client_id
|
WHERE software_client_id = $client_id
|
||||||
AND software_archived_at IS NULL
|
AND software_archived_at IS NULL
|
||||||
$exclude_condition
|
AND software_documents.software_id IS NULL
|
||||||
ORDER BY software_name ASC"
|
ORDER BY software_name ASC
|
||||||
);
|
");
|
||||||
|
|
||||||
while ($row = mysqli_fetch_array($sql_software_select)) {
|
while ($row = mysqli_fetch_array($sql_software_select)) {
|
||||||
$software_id = intval($row['software_id']);
|
$software_id = intval($row['software_id']);
|
||||||
$software_name = nullable_htmlentities($row['software_name']);
|
$software_name = nullable_htmlentities($row['software_name']);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<option value="<?php echo $software_id ?>"><?php echo $software_name; ?></option>
|
<option value="<?= $software_id ?>"><?= $software_name ?></option>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@@ -48,10 +62,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="submit" name="link_software_to_document" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Link</button>
|
<button type="submit" name="link_software_to_document" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Link License</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -1,14 +1,30 @@
|
|||||||
<div class="modal" id="linkVendorToDocumentModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
<h5 class="modal-title"><i class="fa fa-fw fa-building mr-2"></i>Link Vendor to <strong><?php echo $document_name; ?></strong></h5>
|
$document_id = intval($_GET['document_id']);
|
||||||
|
|
||||||
|
$sql = mysqli_query($mysqli, "SELECT * FROM documents
|
||||||
|
WHERE document_id = $document_id
|
||||||
|
LIMIT 1
|
||||||
|
");
|
||||||
|
|
||||||
|
$row = mysqli_fetch_array($sql);
|
||||||
|
$document_name = nullable_htmlentities($row['document_name']);
|
||||||
|
$client_id = intval($row['document_client_id']);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
|
<h5 class="modal-title"><i class="fa fa-fw fa-building mr-2"></i>Link Vendor to <strong><?= $document_name ?></strong></h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="document_id" value="<?php echo $document_id; ?>">
|
<input type="hidden" name="document_id" value="<?= $document_id ?>">
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -19,26 +35,23 @@
|
|||||||
<select class="form-control select2" name="vendor_id">
|
<select class="form-control select2" name="vendor_id">
|
||||||
<option value="">- Select a Vendor -</option>
|
<option value="">- Select a Vendor -</option>
|
||||||
<?php
|
<?php
|
||||||
// Check if there are any associated vendors
|
$sql_vendors_select = mysqli_query($mysqli, "
|
||||||
if (!empty($associated_vendors)) {
|
SELECT vendors.vendor_id, vendor_name
|
||||||
$excluded_vendor_ids = implode(",", $associated_vendors);
|
FROM vendors
|
||||||
$exclude_condition = "AND vendor_id NOT IN ($excluded_vendor_ids)";
|
LEFT JOIN vendor_documents
|
||||||
} else {
|
ON vendors.vendor_id = vendor_documents.vendor_id
|
||||||
$exclude_condition = ""; // No condition if there are no displayed vendors
|
AND vendor_documents.document_id = $document_id
|
||||||
}
|
|
||||||
|
|
||||||
$sql_vendors_select = mysqli_query($mysqli, "SELECT vendor_id, vendor_name FROM vendors
|
|
||||||
WHERE vendor_client_id = $client_id
|
WHERE vendor_client_id = $client_id
|
||||||
AND vendor_archived_at IS NULL
|
AND vendor_archived_at IS NULL
|
||||||
$exclude_condition
|
AND vendor_documents.vendor_id IS NULL
|
||||||
ORDER BY vendor_name ASC"
|
ORDER BY vendor_name ASC
|
||||||
);
|
");
|
||||||
while ($row = mysqli_fetch_array($sql_vendors_select)) {
|
while ($row = mysqli_fetch_array($sql_vendors_select)) {
|
||||||
$vendor_id = intval($row['vendor_id']);
|
$vendor_id = intval($row['vendor_id']);
|
||||||
$vendor_name = nullable_htmlentities($row['vendor_name']);
|
$vendor_name = nullable_htmlentities($row['vendor_name']);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<option value="<?php echo $vendor_id ?>"><?php echo $vendor_name; ?></option>
|
<option value="<?= $vendor_id ?>"><?= $vendor_name ?></option>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@@ -48,10 +61,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="submit" name="link_vendor_to_document" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Link</button>
|
<button type="submit" name="link_vendor_to_document" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Link Vendor</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -1,16 +1,21 @@
|
|||||||
<div class="modal" id="exportDomainModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Domains to CSV</h5>
|
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Domains to CSV</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<?php if ($client_url) { ?>
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
|
||||||
<?php } ?>
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -18,7 +23,7 @@
|
|||||||
<button type="submit" name="export_domains_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
<button type="submit" name="export_domains_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$expense_ids = array_map('intval', $_GET['expense_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($expense_ids);
|
||||||
|
|
||||||
// Generate the HTML form content using output buffering.
|
// Generate the HTML form content using output buffering.
|
||||||
ob_start();
|
ob_start();
|
||||||
@@ -13,7 +13,7 @@ ob_start();
|
|||||||
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?> <input type="hidden" name="expense_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($expense_ids as $expense_id) { ?> <input type="hidden" name="expense_ids[]" value="<?= $expense_id ?>"><?php } ?>
|
||||||
<div class="modal-body text-center">
|
<div class="modal-body text-center">
|
||||||
|
|
||||||
<div class="mb-4" style="text-align: center;">
|
<div class="mb-4" style="text-align: center;">
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$expense_ids = array_map('intval', $_GET['expense_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($expense_ids);
|
||||||
|
|
||||||
// Generate the HTML form content using output buffering.
|
// Generate the HTML form content using output buffering.
|
||||||
ob_start();
|
ob_start();
|
||||||
@@ -19,7 +19,7 @@ ob_start();
|
|||||||
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?> <input type="hidden" name="expense_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($expense_ids as $expense_id) { ?> <input type="hidden" name="expense_ids[]" value="<?= $expense_id ?>"><?php } ?>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$expense_ids = array_map('intval', $_GET['expense_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($expense_ids);
|
||||||
|
|
||||||
// Generate the HTML form content using output buffering.
|
// Generate the HTML form content using output buffering.
|
||||||
ob_start();
|
ob_start();
|
||||||
@@ -21,8 +21,8 @@ ob_start();
|
|||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php
|
<?php
|
||||||
foreach ($selected_ids as $id) { ?>
|
foreach ($expense_ids as $expense_id) { ?>
|
||||||
<input type="hidden" name="expense_ids[]" value="<?= $id ?>">
|
<input type="hidden" name="expense_ids[]" value="<?= $expense_id ?>">
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$expense_ids = array_map('intval', $_GET['expense_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($expense_ids);
|
||||||
|
|
||||||
// Generate the HTML form content using output buffering.
|
// Generate the HTML form content using output buffering.
|
||||||
ob_start();
|
ob_start();
|
||||||
@@ -21,7 +21,7 @@ ob_start();
|
|||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
|
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?> <input type="hidden" name="expense_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($expense_ids as $expense_id) { ?> <input type="hidden" name="expense_ids[]" value="<?= $expense_id ?>"><?php } ?>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,18 @@
|
|||||||
<div class="modal" id="exportExpensesModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title"><i class="fa fa-fw fa-download mr-2"></i>Exporting Expenses to CSV</h5>
|
<h5 class="modal-title"><i class="fa fa-fw fa-download mr-2"></i>Exporting Expenses to CSV</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
@@ -26,7 +31,7 @@
|
|||||||
$account_id = intval($row['account_id']);
|
$account_id = intval($row['account_id']);
|
||||||
$account_name = nullable_htmlentities($row['account_name']);
|
$account_name = nullable_htmlentities($row['account_name']);
|
||||||
?>
|
?>
|
||||||
<option <?php if ($account_filter == $account_id) { echo "selected"; } ?> value="<?php echo $account_id; ?>"><?php echo $account_name; ?></option>
|
<option <?php if ($account_filter == $account_id) { echo "selected"; } ?> value="<?= $account_id ?>"><?= $account_name ?></option>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@@ -50,7 +55,7 @@
|
|||||||
$vendor_id = intval($row['vendor_id']);
|
$vendor_id = intval($row['vendor_id']);
|
||||||
$vendor_name = nullable_htmlentities($row['vendor_name']);
|
$vendor_name = nullable_htmlentities($row['vendor_name']);
|
||||||
?>
|
?>
|
||||||
<option <?php if ($vendor_filter == $vendor_id) { echo "selected"; } ?> value="<?php echo $vendor_id; ?>"><?php echo $vendor_name; ?></option>
|
<option <?php if ($vendor_filter == $vendor_id) { echo "selected"; } ?> value="<?= $vendor_id ?>"><?= $vendor_name ?></option>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@@ -74,7 +79,7 @@
|
|||||||
$category_id = intval($row['category_id']);
|
$category_id = intval($row['category_id']);
|
||||||
$category_name = nullable_htmlentities($row['category_name']);
|
$category_name = nullable_htmlentities($row['category_name']);
|
||||||
?>
|
?>
|
||||||
<option <?php if ($category_filter == $category_id) { echo "selected"; } ?> value="<?php echo $category_id; ?>"><?php echo $category_name; ?></option>
|
<option <?php if ($category_filter == $category_id) { echo "selected"; } ?> value="<?= $category_id ?>"><?= $category_name ?></option>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@@ -89,7 +94,7 @@
|
|||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
|
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<input type="date" class="form-control" name="date_from" max="2999-12-31" value="<?php echo nullable_htmlentities($dtf); ?>">
|
<input type="date" class="form-control" name="date_from" max="2999-12-31">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -99,7 +104,7 @@
|
|||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
|
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<input type="date" class="form-control" name="date_to" max="2999-12-31" value="<?php echo nullable_htmlentities($dtt); ?>">
|
<input type="date" class="form-control" name="date_to" max="2999-12-31">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -108,7 +113,7 @@
|
|||||||
<button type="submit" name="export_expenses_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
<button type="submit" name="export_expenses_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -2,17 +2,26 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$client_id = intval($_GET['client_id']);
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$current_folder_id = intval($_GET['current_folder_id'] ?? 0);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
// Selected IDs from JS (may be empty arrays)
|
||||||
|
$file_ids = array_map('intval', $_GET['file_ids'] ?? []);
|
||||||
|
$document_ids = array_map('intval', $_GET['document_ids'] ?? []);
|
||||||
|
|
||||||
|
$count_files = count($file_ids);
|
||||||
|
$count_docs = count($document_ids);
|
||||||
|
$total = $count_files + $count_docs;
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="modal-header bg-dark">
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title"><i class="fa fa-fw fa-exchange-alt mr-2"></i>Move <strong><?= $count ?></strong> Files</h5>
|
<h5 class="modal-title">
|
||||||
|
<i class="fa fa-fw fa-exchange-alt mr-2"></i>
|
||||||
|
Move <strong><?= $total ?></strong> Item<?= $total === 1 ? '' : 's' ?>
|
||||||
|
</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
@@ -20,10 +29,22 @@ ob_start();
|
|||||||
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="file_ids[]" value="<?= $id ?>"><?php } ?>
|
|
||||||
|
<?php foreach ($file_ids as $id): ?>
|
||||||
|
<input type="hidden" name="file_ids[]" value="<?= $id ?>">
|
||||||
|
<?php endforeach; ?>
|
||||||
|
|
||||||
|
<?php foreach ($document_ids as $id): ?>
|
||||||
|
<input type="hidden" name="document_ids[]" value="<?= $id ?>">
|
||||||
|
<?php endforeach; ?>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Files: <strong><?= $count_files ?></strong><br>
|
||||||
|
Documents: <strong><?= $count_docs ?></strong>
|
||||||
|
</p>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Target Folder</label>
|
<label>Target Folder</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
@@ -33,40 +54,47 @@ ob_start();
|
|||||||
<select class="form-control select2" name="bulk_folder_id">
|
<select class="form-control select2" name="bulk_folder_id">
|
||||||
<option value="0">/</option>
|
<option value="0">/</option>
|
||||||
<?php
|
<?php
|
||||||
// Fetch all folders for the client
|
// NOTE: folder_location is gone now, so just use folder_client_id
|
||||||
$sql_all_folders = mysqli_query($mysqli, "SELECT folder_id, folder_name, parent_folder FROM folders WHERE folder_location = 1 AND folder_client_id = $client_id ORDER BY folder_name ASC");
|
$sql_all_folders = mysqli_query(
|
||||||
$folders = array();
|
$mysqli,
|
||||||
|
"SELECT folder_id, folder_name, parent_folder
|
||||||
// Build an associative array of folders indexed by folder_id
|
FROM folders
|
||||||
while ($row = mysqli_fetch_assoc($sql_all_folders)) {
|
WHERE folder_client_id = $client_id
|
||||||
$folders[$row['folder_id']] = array(
|
ORDER BY folder_name ASC"
|
||||||
'folder_id' => intval($row['folder_id']),
|
|
||||||
'folder_name' => nullable_htmlentities($row['folder_name']),
|
|
||||||
'parent_folder' => intval($row['parent_folder']),
|
|
||||||
'children' => array()
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$folders = [];
|
||||||
|
|
||||||
|
while ($row = mysqli_fetch_assoc($sql_all_folders)) {
|
||||||
|
$folders[$row['folder_id']] = [
|
||||||
|
'folder_id' => (int)$row['folder_id'],
|
||||||
|
'folder_name' => nullable_htmlentities($row['folder_name']),
|
||||||
|
'parent_folder'=> (int)$row['parent_folder'],
|
||||||
|
'children' => []
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Build the folder hierarchy
|
// Build hierarchy
|
||||||
foreach ($folders as $id => &$folder) {
|
foreach ($folders as $id => &$folder) {
|
||||||
if ($folder['parent_folder'] != 0 && isset($folders[$folder['parent_folder']])) {
|
if ($folder['parent_folder'] != 0 && isset($folders[$folder['parent_folder']])) {
|
||||||
$folders[$folder['parent_folder']]['children'][] = &$folder;
|
$folders[$folder['parent_folder']]['children'][] = &$folder;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
unset($folder); // Break the reference
|
unset($folder);
|
||||||
|
|
||||||
// Prepare a list of root folders
|
$root_folders = [];
|
||||||
$root_folders = array();
|
|
||||||
foreach ($folders as $id => $folder) {
|
foreach ($folders as $id => $folder) {
|
||||||
if ($folder['parent_folder'] == 0) {
|
if ($folder['parent_folder'] == 0) {
|
||||||
$root_folders[] = $folder;
|
$root_folders[] = $folder;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Display the folder options iteratively
|
// Optional: if you want to default-select current folder, pass it in GET
|
||||||
$stack = array();
|
$current_folder_id = intval($_GET['current_folder_id'] ?? 0);
|
||||||
|
|
||||||
|
$stack = [];
|
||||||
foreach (array_reverse($root_folders) as $folder) {
|
foreach (array_reverse($root_folders) as $folder) {
|
||||||
$stack[] = array('folder' => $folder, 'level' => 0);
|
$stack[] = ['folder' => $folder, 'level' => 0];
|
||||||
}
|
}
|
||||||
|
|
||||||
while (!empty($stack)) {
|
while (!empty($stack)) {
|
||||||
@@ -74,21 +102,15 @@ ob_start();
|
|||||||
$folder = $node['folder'];
|
$folder = $node['folder'];
|
||||||
$level = $node['level'];
|
$level = $node['level'];
|
||||||
|
|
||||||
// Indentation for subfolders
|
|
||||||
$indentation = str_repeat(' ', $level * 4);
|
$indentation = str_repeat(' ', $level * 4);
|
||||||
|
|
||||||
// Check if this folder is selected
|
$selected = ($folder['folder_id'] === $current_folder_id) ? 'selected' : '';
|
||||||
$selected = '';
|
|
||||||
if ($folder['folder_id'] == $get_folder_id) {
|
|
||||||
$selected = 'selected';
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "<option value=\"{$folder['folder_id']}\" $selected>$indentation{$folder['folder_name']}</option>";
|
echo "<option value=\"{$folder['folder_id']}\" $selected>$indentation{$folder['folder_name']}</option>";
|
||||||
|
|
||||||
// Add children to the stack
|
|
||||||
if (!empty($folder['children'])) {
|
if (!empty($folder['children'])) {
|
||||||
foreach (array_reverse($folder['children']) as $child_folder) {
|
foreach (array_reverse($folder['children']) as $child) {
|
||||||
$stack[] = array('folder' => $child_folder, 'level' => $level + 1);
|
$stack[] = ['folder' => $child, 'level' => $level + 1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -98,9 +120,14 @@ ob_start();
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="submit" name="bulk_move_files" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Move Files</button>
|
<button type="submit" name="bulk_move_files" class="btn btn-primary text-bold">
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
<i class="fa fa-check mr-2"></i>Move Files
|
||||||
|
</button>
|
||||||
|
<button type="button" class="btn btn-light" data-dismiss="modal">
|
||||||
|
<i class="fa fa-times mr-2"></i>Cancel
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$client_id = intval($_GET['client_id'] ?? 0);
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
$folder_location = intval($_GET['folder_location'] ?? 0);
|
|
||||||
$current_folder_id = intval($_GET['current_folder_id'] ?? 0);
|
$current_folder_id = intval($_GET['current_folder_id'] ?? 0);
|
||||||
$folder_name = nullable_htmlentities(getFieldByID('folders', $current_folder_id, 'folder_name') ?? '/');
|
$folder_name = nullable_htmlentities(getFieldByID('folders', $current_folder_id, 'folder_name') ?? '/');
|
||||||
|
|
||||||
@@ -18,7 +17,6 @@ ob_start();
|
|||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
<input type="hidden" name="folder_location" value="<?= $folder_location ?>">
|
|
||||||
<input type="hidden" name="parent_folder" value="<?= $current_folder_id ?>">
|
<input type="hidden" name="parent_folder" value="<?= $current_folder_id ?>">
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$invoice_ids = array_map('intval', $_GET['invoice_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($invoice_ids);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ ob_start();
|
|||||||
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="invoice_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($invoice_ids as $invoice_id) { ?><input type="hidden" name="invoice_ids[]" value="<?= $invoice_id ?>"><?php } ?>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,21 @@
|
|||||||
<div class="modal" id="exportInvoicesModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title"><i class="fa fa-fw fa-download mr-2"></i>Export Invoices to CSV</h5>
|
<h5 class="modal-title"><i class="fa fa-fw fa-download mr-2"></i>Export Invoices to CSV</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<?php if (isset($_GET['client_id'])) { ?>
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
|
||||||
<?php } ?>
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -19,7 +24,7 @@
|
|||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
|
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<input type="date" class="form-control" name="date_from" max="2999-12-31" value="<?php echo nullable_htmlentities($dtf); ?>">
|
<input type="date" class="form-control" name="date_from" max="2999-12-31">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -29,7 +34,7 @@
|
|||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
|
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<input type="date" class="form-control" name="date_to" max="2999-12-31" value="<?php echo nullable_htmlentities($dtt); ?>">
|
<input type="date" class="form-control" name="date_to" max="2999-12-31">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -38,7 +43,7 @@
|
|||||||
<button type="submit" name="export_invoices_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
<button type="submit" name="export_invoices_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -1,16 +1,27 @@
|
|||||||
<div class="modal" id="addInvoiceRecurringModal<?php echo $invoice_id; ?>" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header text-white">
|
|
||||||
<h5 class="modal-title"><i class="fas fa-fw fa-copy mr-2"></i>Make <?php echo "$invoice_prefix$invoice_number"; ?> Recurring</h5>
|
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
|
||||||
<span aria-hidden="true">×</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
|
||||||
<input type="hidden" name="invoice_id" value="<?php echo $invoice_id; ?>">
|
|
||||||
<div class="modal-body">
|
|
||||||
|
|
||||||
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
|
$invoice_id = intval($_GET['invoice_id']);
|
||||||
|
|
||||||
|
$sql = mysqli_query($mysqli, "SELECT * FROM invoices WHERE invoice_id = $invoice_id LIMIT 1");
|
||||||
|
|
||||||
|
$row = mysqli_fetch_array($sql);
|
||||||
|
$invoice_prefix = nullable_htmlentities($row['invoice_prefix']);
|
||||||
|
$invoice_number = intval($row['invoice_number']);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
|
<h5 class="modal-title"><i class="fas fa-fw fa-copy mr-2"></i>Invoice <?= "$invoice_prefix$invoice_number" ?> to Recurring Invoice</h5>
|
||||||
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
|
<span>×</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
|
<input type="hidden" name="invoice_id" value="<?= $invoice_id ?>">
|
||||||
|
<div class="modal-body">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Frequency <strong class="text-danger">*</strong></label>
|
<label>Frequency <strong class="text-danger">*</strong></label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
@@ -24,13 +35,12 @@
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="submit" name="add_invoice_recurring" class="btn btn-primary text-bold"><i class="fas fa-check mr-2"></i>Create Recurring Invoice</button>
|
<button type="submit" name="add_invoice_recurring" class="btn btn-primary text-bold"><i class="fas fa-check mr-2"></i>Create Recurring Invoice</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$location_ids = array_map('intval', $_GET['location_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($location_ids);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ ob_start();
|
|||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="location_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($location_ids as $location_id) { ?><input type="hidden" name="location_ids[]" value="<?= $location_id ?>"><?php } ?>
|
||||||
<input type="hidden" name="bulk_remove_tags" value="0">
|
<input type="hidden" name="bulk_remove_tags" value="0">
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,21 @@
|
|||||||
<div class="modal" id="exportLocationModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Locations to CSV</h5>
|
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Locations to CSV</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<?php if ($client_url) { ?>
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
|
||||||
<?php } ?>
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -18,7 +23,7 @@
|
|||||||
<button type="submit" name="export_locations_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
<button type="submit" name="export_locations_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -1,16 +1,22 @@
|
|||||||
<div class="modal" id="importLocationModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title"><i class="fa fa-fw fa-map-marker-alt mr-2"></i>Import Locations</h5>
|
<h5 class="modal-title"><i class="fa fa-fw fa-map-marker-alt mr-2"></i>Import Locations</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" enctype="multipart/form-data" autocomplete="off">
|
<form action="post.php" method="post" enctype="multipart/form-data" autocomplete="off">
|
||||||
<?php if ($client_url) { ?>
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
|
||||||
<?php } ?>
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<p><strong>Format csv file with headings & data:</strong><br>Name, Description, Address, City, State, Postal Code, Phone, Hours</p>
|
<p><strong>Format csv file with headings & data:</strong><br>Name, Description, Address, City, State, Postal Code, Phone, Hours</p>
|
||||||
<hr>
|
<hr>
|
||||||
@@ -18,13 +24,13 @@
|
|||||||
<input type="file" class="form-control-file" name="file" accept=".csv" required>
|
<input type="file" class="form-control-file" name="file" accept=".csv" required>
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
<div>Download: <a class="text-bold" href="post.php?download_locations_csv_template=<?php echo $client_id; ?>">sample csv template</a></div>
|
<div>Download: <a class="text-bold" href="post.php?download_locations_csv_template=<?= $client_id ?>">sample csv template</a></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="submit" name="import_locations_csv" class="btn btn-primary text-bold"><i class="fa fa-upload mr-2"></i>Import</button>
|
<button type="submit" name="import_locations_csv" class="btn btn-primary text-bold"><i class="fa fa-upload mr-2"></i>Import</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -1,16 +1,21 @@
|
|||||||
<div class="modal" id="exportNetworkModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Networks to CSV</h5>
|
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Networks to CSV</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<?php if ($client_url) { ?>
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
|
||||||
<?php } ?>
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -18,7 +23,7 @@
|
|||||||
<button type="submit" name="export_networks_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
<button type="submit" name="export_networks_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -1,16 +1,22 @@
|
|||||||
<div class="modal" id="exportPaymentModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Payments to CSV</h5>
|
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Payments to CSV</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<?php if (isset($_GET['client_id'])) { ?>
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
|
||||||
<?php } ?>
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -18,7 +24,7 @@
|
|||||||
<button type="submit" name="export_payments_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
<button type="submit" name="export_payments_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -1,12 +1,26 @@
|
|||||||
<div class="modal" id="bulkEditCategoryModal" tabindex="-1">
|
|
||||||
<div class="modal-dialog">
|
<?php
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header bg-dark">
|
require_once '../../../includes/modal_header.php';
|
||||||
<h5 class="modal-title"><i class="fa fa-fw fa-list mr-2"></i>Bulk Set Category</h5>
|
|
||||||
|
$product_ids = array_map('intval', $_GET['product_ids'] ?? []);
|
||||||
|
|
||||||
|
$count = count($product_ids);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
|
<h5 class="modal-title"><i class="fa fa-fw fa-list mr-2"></i>Set Category for <strong><?= $count ?></strong> Products</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
|
<?php foreach ($product_ids as $product_id) { ?><input type="hidden" name="product_ids[]" value="<?= $product_id ?>"><?php } ?>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -37,6 +51,8 @@
|
|||||||
<button type="submit" name="bulk_edit_product_category" class="btn btn-primary text-bold"><i class="fa fa-fw fa-check mr-2"></i>Set</button>
|
<button type="submit" name="bulk_edit_product_category" class="btn btn-primary text-bold"><i class="fa fa-fw fa-check mr-2"></i>Set</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
<?php
|
||||||
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -1,13 +1,18 @@
|
|||||||
<div class="modal" id="exportProductsModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title"><i class="fa fa-fw fa-download mr-2"></i>Export Products to CSV</h5>
|
<h5 class="modal-title"><i class="fa fa-fw fa-download mr-2"></i>Export Products to CSV</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -15,7 +20,7 @@
|
|||||||
<button type="submit" name="export_products_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
<button type="submit" name="export_products_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -1,16 +1,22 @@
|
|||||||
<div class="modal" id="exportQuoteModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Quotes to CSV</h5>
|
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Quotes to CSV</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<?php if(isset($_GET['client_id'])) { ?>
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
|
||||||
<?php } ?>
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -18,7 +24,7 @@
|
|||||||
<button type="submit" name="export_quotes_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
<button type="submit" name="export_quotes_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -2,7 +2,9 @@
|
|||||||
<div class="modal-dialog modal-lg">
|
<div class="modal-dialog modal-lg">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header bg-dark">
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title text-white"><i class="fas fa-fw fa-edit mr-2"></i>Quote Notes</h5>
|
<h5 class="modal-title text-white">
|
||||||
|
<i class="fas fa-fw fa-edit mr-2"></i>Quote Notes
|
||||||
|
</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
@@ -15,8 +17,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="submit" name="quote_note" class="btn btn-primary text-bold"><i class="fas fa-check mr-2"></i>Save</button>
|
<button type="submit" name="quote_note" class="btn btn-primary text-bold">
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
<i class="fas fa-check mr-2"></i>Save
|
||||||
|
</button>
|
||||||
|
<button type="button" class="btn btn-light" data-dismiss="modal">
|
||||||
|
<i class="fas fa-times mr-2"></i>Cancel
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,15 +1,30 @@
|
|||||||
<div class="modal" id="addQuoteToInvoiceModal<?php echo $quote_id; ?>" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
<h5 class="modal-title"><i class="fas fa-fw fa-file mr-2"></i>Quote <?php echo "$quote_prefix$quote_number"; ?> <i class="fas fa-arrow-right mr-2"></i>Invoice</h5>
|
$quote_id = intval($_GET['quote_id']);
|
||||||
|
|
||||||
|
$sql = mysqli_query($mysqli, "SELECT * FROM quotes WHERE quote_id = $quote_id LIMIT 1");
|
||||||
|
|
||||||
|
$row = mysqli_fetch_array($sql);
|
||||||
|
$quote_prefix = nullable_htmlentities($row['quote_prefix']);
|
||||||
|
$quote_number = intval($row['quote_number']);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
|
<h5 class="modal-title">
|
||||||
|
<i class="fas fa-fw fa-file mr-2"></i>
|
||||||
|
Quote <?= "$quote_prefix$quote_number" ?>
|
||||||
|
<i class="fas fa-arrow-right mr-2"></i>Invoice
|
||||||
|
</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="quote_id" value="<?php echo $quote_id; ?>">
|
<input type="hidden" name="quote_id" value="<?= $quote_id ?>">
|
||||||
<input type="hidden" name="client_net_terms" value="<?php echo $client_net_terms; ?>">
|
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
@@ -19,16 +34,20 @@
|
|||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
|
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<input type="date" class="form-control" name="date" max="2999-12-31" value="<?php echo date("Y-m-d"); ?>" required>
|
<input type="date" class="form-control" name="date" max="2999-12-31" value="<?= date("Y-m-d"); ?>" required>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="submit" name="add_quote_to_invoice" class="btn btn-primary text-bold"><strong><i class="fas fa-check mr-2"></i>Create Invoice</button>
|
<button type="submit" name="add_quote_to_invoice" class="btn btn-primary text-bold">
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
<strong><i class="fas fa-check mr-2"></i>Create Invoice</strong>
|
||||||
|
</button>
|
||||||
|
<button type="button" class="btn btn-light" data-dismiss="modal">
|
||||||
|
<i class="fas fa-times mr-2"></i>Cancel
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$recurring_ticket_ids = array_map('intval', $_GET['recurring_ticket_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($recurring_ticket_ids);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ ob_start();
|
|||||||
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="recurring_ticket_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($recurring_ticket_ids as $recurring_ticket_id) { ?><input type="hidden" name="recurring_ticket_ids[]" value="<?= $recurring_ticket_id ?>"><?php } ?>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$recurring_ticket_ids = array_map('intval', $_GET['recurring_ticket_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($recurring_ticket_ids);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ ob_start();
|
|||||||
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="recurring_ticket_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($recurring_ticket_ids as $recurring_ticket_id) { ?><input type="hidden" name="recurring_ticket_ids[]" value="<?= $recurring_ticket_id ?>"><?php } ?>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$recurring_ticket_ids = array_map('intval', $_GET['recurring_ticket_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($recurring_ticket_ids);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ ob_start();
|
|||||||
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="recurring_ticket_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($recurring_ticket_ids as $recurring_ticket_id) { ?><input type="hidden" name="recurring_ticket_ids[]" value="<?= $recurring_ticket_id ?>"><?php } ?>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$recurring_ticket_ids = array_map('intval', $_GET['recurring_ticket_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($recurring_ticket_ids);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ ob_start();
|
|||||||
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="recurring_ticket_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($recurring_ticket_ids as $recurring_ticket_id) { ?><input type="hidden" name="recurring_ticket_ids[]" value="<?= $recurring_ticket_id ?>"><?php } ?>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$recurring_ticket_ids = array_map('intval', $_GET['recurring_ticket_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($recurring_ticket_ids);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ ob_start();
|
|||||||
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="recurring_ticket_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($recurring_ticket_ids as $recurring_ticket_id) { ?><input type="hidden" name="recurring_ticket_ids[]" value="<?= $recurring_ticket_id ?>"><?php } ?>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +1,24 @@
|
|||||||
<div class="modal" id="addSoftwareFromTemplateModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title"><i class="fa fa-fw fa-cube mr-2"></i>New License from Template</h5>
|
<h5 class="modal-title"><i class="fa fa-fw fa-cube mr-2"></i>New License from Template</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<?php if ($client_url) { ?>
|
<?php if ($client_id) { ?>
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -26,9 +33,9 @@
|
|||||||
|
|
||||||
$sql = mysqli_query($mysqli, "SELECT client_id, client_name FROM clients WHERE client_archived_at IS NULL $access_permission_query ORDER BY client_name ASC");
|
$sql = mysqli_query($mysqli, "SELECT client_id, client_name FROM clients WHERE client_archived_at IS NULL $access_permission_query ORDER BY client_name ASC");
|
||||||
while ($row = mysqli_fetch_array($sql)) {
|
while ($row = mysqli_fetch_array($sql)) {
|
||||||
$client_id = intval($row['client_id']);
|
$client_id_select = intval($row['client_id']);
|
||||||
$client_name = nullable_htmlentities($row['client_name']); ?>
|
$client_name_select = nullable_htmlentities($row['client_name']); ?>
|
||||||
<option <?php if ($client_id == isset($_GET['client'])) { echo "selected"; } ?> value="<?php echo $client_id; ?>"><?php echo $client_name; ?></option>
|
<option value="<?= $client_id_select ?>"><?= $client_name_select ?></option>
|
||||||
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</select>
|
</select>
|
||||||
@@ -65,7 +72,7 @@
|
|||||||
<button type="submit" name="add_software_from_template" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Create</button>
|
<button type="submit" name="add_software_from_template" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Create</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -1,16 +1,22 @@
|
|||||||
<div class="modal" id="exportSoftwareModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Licenses to CSV</h5>
|
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Licenses to CSV</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<?php if($client_url) { ?>
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
|
||||||
<?php } ?>
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -18,7 +24,7 @@
|
|||||||
<button type="submit" name="export_software_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
<button type="submit" name="export_software_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$ticket_ids = array_map('intval', $_GET['ticket_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($ticket_ids);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ ob_start();
|
|||||||
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="ticket_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($ticket_ids as $ticket_id) { ?><input type="hidden" name="ticket_ids[]" value="<?= $ticket_id ?>"><?php } ?>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$ticket_ids = array_map('intval', $_GET['ticket_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($ticket_ids);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ ob_start();
|
|||||||
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="ticket_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($ticket_ids as $ticket_id) { ?><input type="hidden" name="ticket_ids[]" value="<?= $ticket_id ?>"><?php } ?>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$ticket_ids = array_map('intval', $_GET['ticket_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($ticket_ids);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ ob_start();
|
|||||||
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="ticket_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($ticket_ids as $ticket_id) { ?><input type="hidden" name="ticket_ids[]" value="<?= $ticket_id ?>"><?php } ?>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$ticket_ids = array_map('intval', $_GET['ticket_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($ticket_ids);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ ob_start();
|
|||||||
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="ticket_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($ticket_ids as $ticket_id) { ?><input type="hidden" name="ticket_ids[]" value="<?= $ticket_id ?>"><?php } ?>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$ticket_ids = array_map('intval', $_GET['ticket_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($ticket_ids);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ ob_start();
|
|||||||
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="ticket_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($ticket_ids as $ticket_id) { ?><input type="hidden" name="ticket_ids[]" value="<?= $ticket_id ?>"><?php } ?>
|
||||||
<input type="hidden" id="current_ticket_id" value="0"> <!-- Can't currently bulk check this -->
|
<input type="hidden" id="current_ticket_id" value="0"> <!-- Can't currently bulk check this -->
|
||||||
<input type="hidden" name="merge_move_replies" value="0"> <!-- Default 0 -->
|
<input type="hidden" name="merge_move_replies" value="0"> <!-- Default 0 -->
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$ticket_ids = array_map('intval', $_GET['ticket_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($ticket_ids);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ ob_start();
|
|||||||
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="ticket_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($ticket_ids as $ticket_id) { ?><input type="hidden" name="ticket_ids[]" value="<?= $ticket_id ?>"><?php } ?>
|
||||||
<input type="hidden" name="bulk_private_reply" value="0">
|
<input type="hidden" name="bulk_private_reply" value="0">
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$ticket_ids = array_map('intval', $_GET['ticket_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($ticket_ids);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ ob_start();
|
|||||||
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="ticket_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($ticket_ids as $ticket_id) { ?><input type="hidden" name="ticket_ids[]" value="<?= $ticket_id ?>"><?php } ?>
|
||||||
<input type="hidden" name="bulk_private_note" value="0">
|
<input type="hidden" name="bulk_private_note" value="0">
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|||||||
@@ -1,16 +1,21 @@
|
|||||||
<div class="modal" id="exportTicketModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Tickets to CSV</h5>
|
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Tickets to CSV</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<?php if (isset($_GET['client_id'])) { ?>
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
|
||||||
<?php } ?>
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -18,7 +23,7 @@
|
|||||||
<button type="submit" name="export_tickets_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
<button type="submit" name="export_tickets_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -1,16 +1,21 @@
|
|||||||
<div class="modal" id="exportTripsModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Trips to CSV</h5>
|
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Trips to CSV</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<?php if (isset($_GET['client_id'])) { ?>
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
|
||||||
<?php } ?>
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -19,7 +24,7 @@
|
|||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
|
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<input type="date" class="form-control" name="date_from" max="2999-12-31" value="<?php echo nullable_htmlentities($dtf); ?>">
|
<input type="date" class="form-control" name="date_from" max="2999-12-31">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -29,7 +34,7 @@
|
|||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
|
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<input type="date" class="form-control" name="date_to" max="2999-12-31" value="<?php echo nullable_htmlentities($dtt); ?>">
|
<input type="date" class="form-control" name="date_to" max="2999-12-31">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -38,7 +43,7 @@
|
|||||||
<button type="submit" name="export_trips_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
<button type="submit" name="export_trips_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
31
agent/modals/vendor/vendor_add_from_template.php
vendored
31
agent/modals/vendor/vendor_add_from_template.php
vendored
@@ -1,15 +1,22 @@
|
|||||||
<div class="modal" id="addVendorFromTemplateModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title"><i class="fas fa-fw fa-building mr-2"></i>New Vendor from Template</h5>
|
<h5 class="modal-title"><i class="fas fa-fw fa-building mr-2"></i>New Vendor from Template</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
|
|
||||||
<input type="hidden" name="client_id" value="<?php if (isset($_GET['client_id'])) { echo $client_id; } else { echo 0; } ?>">
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
@@ -28,7 +35,7 @@
|
|||||||
$vendor_template_name = nullable_htmlentities($row['vendor_template_name']);
|
$vendor_template_name = nullable_htmlentities($row['vendor_template_name']);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<option value="<?php echo $vendor_template_id ?>"><?php echo $vendor_template_name; ?></option>
|
<option value="<?= $vendor_template_id ?>"><?= $vendor_template_name ?></option>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
@@ -41,7 +48,7 @@
|
|||||||
<button type="submit" name="add_vendor_from_template" class="btn btn-primary text-bold"><i class="fas fa-check mr-2"></i>Create Vendor</button>
|
<button type="submit" name="add_vendor_from_template" class="btn btn-primary text-bold"><i class="fas fa-check mr-2"></i>Create Vendor</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
32
agent/modals/vendor/vendor_export.php
vendored
32
agent/modals/vendor/vendor_export.php
vendored
@@ -1,16 +1,22 @@
|
|||||||
<div class="modal" id="exportVendorModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Vendors to CSV</h5>
|
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Vendors to CSV</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<?php if(isset($_GET['client_id'])) { ?>
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
|
||||||
<?php } ?>
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -18,7 +24,7 @@
|
|||||||
<button type="submit" name="export_vendors_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
<button type="submit" name="export_vendors_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user