mirror of
https://github.com/itflow-org/itflow
synced 2026-03-13 01:04:50 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
376285ef62 | ||
|
|
163aa3062e | ||
|
|
03570ecd04 | ||
|
|
c7ef3627ce | ||
|
|
d1dcc5fb7e |
58
CHANGELOG.md
58
CHANGELOG.md
@@ -2,64 +2,6 @@
|
|||||||
|
|
||||||
This file documents all notable changes made to ITFlow.
|
This file documents all notable changes made to ITFlow.
|
||||||
|
|
||||||
## [26.03] Stable Release
|
|
||||||
### Bug Fixes
|
|
||||||
- Ticket Templates: Fix Task Sorting.
|
|
||||||
- Ticket: Lower autoclose setting minimum value from 48 to 24 Hours.
|
|
||||||
- Ticket: Fix Task Approval.
|
|
||||||
- Recurring Ticket: add empty value placeholder for Ticket Frequency.
|
|
||||||
- Documents/Files: Fix redirect after File Upload to redirect to files instead of the non existent documents.
|
|
||||||
- Setup: Fix base url tacking on /setup when not installing via script.
|
|
||||||
|
|
||||||
|
|
||||||
### New Features & Updates
|
|
||||||
- Clients: Net Terms: Added common 45 and 15 Days, removed 14 Days not as common.
|
|
||||||
- Clients: Bulk Action Set Net Terms Added.
|
|
||||||
- Clients: Swapped location and contact column, add PopOver with Details such as created, abbreviation, DB ID instead of taking up space underneath client, rounded tag pills and increased padding, removed info badges and added one info badge that displays a popover with details.
|
|
||||||
- Clients: Added New Ticket to Client Top Header Menu.
|
|
||||||
- Clients: Client Overview: UI Sprucing.
|
|
||||||
- Invoice: Send reminder 1 day after due date.
|
|
||||||
- Invoices/Quotes/Recurring Invoices: Split Items tables into their own POST logic and Modal UIs and tables (quote_items, invoice_items, recurring_items).
|
|
||||||
- Tickets: New Ticket Parsing - Anyone CC'ed onto the original email that created the ticket is added as a ticket watcher.
|
|
||||||
- Ticket/Quotes: Quotes can now be associated with a ticket.
|
|
||||||
- Networks: Removed Subnet Mask Field, Use CIDR instead.
|
|
||||||
- Networks: Rearranged fields, Updated placeholders, Add/Edit/list for better flow.
|
|
||||||
- Networks: Renamed DHCP to IP Range to allow for you use of both DHCP and or Usable IPs.
|
|
||||||
- Assets: Rearranged fields, Updated placeholders, Add/Edit/list for better flow.
|
|
||||||
- Assets: Added IPv6 if available under IP, Make and Model are now one line with Serial Underneath. Added OS under Type. use pill for status.
|
|
||||||
- Calendar: Event thats are cut off can now be viewed as a tooltip on hover.
|
|
||||||
- Calendar: Renamed System Calendars to built-in calendars and added the names and color dot for reference.
|
|
||||||
- Calendar: You can now delete a custom calendar.
|
|
||||||
- Report: Client Ticket Time Detail Audit: Selectable Billing Time Increment, will later be avauilable globally.
|
|
||||||
- Roles/Permissions: Now complete and is out of beta all permission roles are strictly enforced, except for in Trips and Calendar, new enforce modules will be added for these at a later date.
|
|
||||||
- Project Templates: Ticket Template order can now be dragged and dropped.
|
|
||||||
- Global: Introduced new checkbox class to all Checkbox select columns to keep consistency and reduce space and enhance ui.
|
|
||||||
- Global: CSRF Checks everywhere instead of just deletion calls.
|
|
||||||
- Global: Renamed the rest of the unarchive post and label calls to restore.
|
|
||||||
- Files: Allow upload of .unifi extension.
|
|
||||||
- Bump Libraries:
|
|
||||||
- stripe-php from 19.0.0 to 19.4.1.
|
|
||||||
- fullcalendar from 6.1.19 to 6.1.20
|
|
||||||
- TCPDF from 6.10.1 to 6.11.2
|
|
||||||
|
|
||||||
## [26.02.1] Maint Release
|
|
||||||
### Bug Fixes
|
|
||||||
- Credentials: Fix Password Generator.
|
|
||||||
- Calendar: Restrict Events for client restricted agents.
|
|
||||||
- Ticket Merge: Fix.
|
|
||||||
- Asset Transfer: Fix.
|
|
||||||
- Ticket Listing: Restrict Tickets presented in ticket list view from client restricted agents.
|
|
||||||
- Ticket Details: Deny access to client restricted agents to view tickets without client_id in uri.
|
|
||||||
- Tickets: Allow agents with restricted client access to view and edit tickets without a client.
|
|
||||||
- Ticket Change client: Limit selection for agents with restricted client access.
|
|
||||||
- Ticket Details: Don't display updated at when null.
|
|
||||||
|
|
||||||
### New Features & Updates
|
|
||||||
- Report: Added Client Detail Auditing.
|
|
||||||
- API: Added Endpoint to retrieve time worked by agent.
|
|
||||||
- ajax-modal: Revert to previous JS implementation before 26.02 release.
|
|
||||||
- Ticket: Move Subject from Ticket main ticket header to ticket details card header.
|
|
||||||
|
|
||||||
## [26.02] Stable Release
|
## [26.02] Stable Release
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
- Mail Parser - Do not automatically send new ticket notifications to noreply/donotreply addresses.
|
- Mail Parser - Do not automatically send new ticket notifications to noreply/donotreply addresses.
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ We track the implementation of confirmed features and bugs via [TaskFlow](https:
|
|||||||
For help using ITFlow, bugs, feature requests, and general ideas / discussions please use the community [forum](https://forum.itflow.org).
|
For help using ITFlow, bugs, feature requests, and general ideas / discussions please use the community [forum](https://forum.itflow.org).
|
||||||
|
|
||||||
### Contributing
|
### Contributing
|
||||||
We have temporarily paused PRs from the community.
|
If you want to improve ITFlow, feel free to fork the repo and create a pull reques. Make sure to discuss significant changes or new features with fellow contributors on the forum first. This helps ensure that your contributions are aligned with project goals, and saves time for everyone. All contributions should follow our [code standards](https://docs.itflow.org/code_standards). See the [contributing guide](https://docs.itflow.org/contribute).
|
||||||
|
|
||||||
#### Contributors
|
#### Contributors
|
||||||
<a href="https://github.com/itflow-org/itflow/graphs/contributors">
|
<a href="https://github.com/itflow-org/itflow/graphs/contributors">
|
||||||
|
|||||||
@@ -135,11 +135,11 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
if ($archived) {
|
if ($archived) {
|
||||||
?>
|
?>
|
||||||
<a class="dropdown-item text-success confirm-link"
|
<a class="dropdown-item text-success confirm-link"
|
||||||
href="post.php?restore_category=<?php echo $category_id; ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
href="post.php?unarchive_category=<?php echo $category_id; ?>">
|
||||||
<i class="fas fa-fw fa-archive mr-2"></i>Restore
|
<i class="fas fa-fw fa-archive mr-2"></i>Unarchive
|
||||||
</a>
|
</a>
|
||||||
<a class="dropdown-item text-danger confirm-link"
|
<a class="dropdown-item text-danger confirm-link"
|
||||||
href="post.php?delete_category=<?php echo $category_id; ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
href="post.php?delete_category=<?php echo $category_id; ?>">
|
||||||
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
||||||
</a>
|
</a>
|
||||||
<?php
|
<?php
|
||||||
@@ -150,7 +150,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<i class="fas fa-fw fa-edit mr-2"></i>Edit
|
<i class="fas fa-fw fa-edit mr-2"></i>Edit
|
||||||
</a>
|
</a>
|
||||||
<a class="dropdown-item text-danger confirm-link"
|
<a class="dropdown-item text-danger confirm-link"
|
||||||
href="post.php?archive_category=<?php echo $category_id; ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
href="post.php?archive_category=<?php echo $category_id; ?>">
|
||||||
<i class="fas fa-fw fa-archive mr-2"></i>Archive
|
<i class="fas fa-fw fa-archive mr-2"></i>Archive
|
||||||
</a>
|
</a>
|
||||||
<?php
|
<?php
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<i class="fas fa-fw fa-edit mr-2"></i>Edit
|
<i class="fas fa-fw fa-edit mr-2"></i>Edit
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-danger text-bold confirm-link" href="post.php?delete_custom_link=<?php echo $custom_link_id; ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<a class="dropdown-item text-danger text-bold confirm-link" href="post.php?delete_custom_link=<?php echo $custom_link_id; ?>">
|
||||||
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -4193,152 +4193,10 @@ if (LATEST_DATABASE_VERSION > CURRENT_DATABASE_VERSION) {
|
|||||||
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.4.0'");
|
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.4.0'");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CURRENT_DATABASE_VERSION == '2.4.0') {
|
// if (CURRENT_DATABASE_VERSION == '2.4.0') {
|
||||||
|
// // Insert queries here required to update to DB version 2.4.1
|
||||||
mysqli_query($mysqli, "
|
|
||||||
CREATE TABLE `quote_items` (
|
|
||||||
`item_id` int(11) NOT NULL AUTO_INCREMENT,
|
|
||||||
`item_name` varchar(200) NOT NULL,
|
|
||||||
`item_description` text DEFAULT NULL,
|
|
||||||
`item_quantity` decimal(15,2) NOT NULL DEFAULT 0.00,
|
|
||||||
`item_price` decimal(15,2) NOT NULL DEFAULT 0.00,
|
|
||||||
`item_subtotal` decimal(15,2) NOT NULL DEFAULT 0.00,
|
|
||||||
`item_tax` decimal(15,2) NOT NULL DEFAULT 0.00,
|
|
||||||
`item_total` decimal(15,2) NOT NULL DEFAULT 0.00,
|
|
||||||
`item_order` int(11) NOT NULL DEFAULT 0,
|
|
||||||
`item_created_at` datetime NOT NULL DEFAULT current_timestamp(),
|
|
||||||
`item_updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp(),
|
|
||||||
`item_archived_at` datetime DEFAULT NULL,
|
|
||||||
`item_tax_id` int(11) NOT NULL DEFAULT 0,
|
|
||||||
`item_product_id` int(11) NOT NULL DEFAULT 0,
|
|
||||||
`item_quote_id` int(11) NOT NULL,
|
|
||||||
PRIMARY KEY (`item_id`)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
|
||||||
");
|
|
||||||
|
|
||||||
mysqli_query($mysqli, "
|
|
||||||
CREATE TABLE `recurring_invoice_items` (
|
|
||||||
`item_id` int(11) NOT NULL AUTO_INCREMENT,
|
|
||||||
`item_name` varchar(200) NOT NULL,
|
|
||||||
`item_description` text DEFAULT NULL,
|
|
||||||
`item_quantity` decimal(15,2) NOT NULL DEFAULT 0.00,
|
|
||||||
`item_price` decimal(15,2) NOT NULL DEFAULT 0.00,
|
|
||||||
`item_subtotal` decimal(15,2) NOT NULL DEFAULT 0.00,
|
|
||||||
`item_tax` decimal(15,2) NOT NULL DEFAULT 0.00,
|
|
||||||
`item_total` decimal(15,2) NOT NULL DEFAULT 0.00,
|
|
||||||
`item_order` int(11) NOT NULL DEFAULT 0,
|
|
||||||
`item_created_at` datetime NOT NULL DEFAULT current_timestamp(),
|
|
||||||
`item_updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp(),
|
|
||||||
`item_archived_at` datetime DEFAULT NULL,
|
|
||||||
`item_tax_id` int(11) NOT NULL DEFAULT 0,
|
|
||||||
`item_product_id` int(11) NOT NULL DEFAULT 0,
|
|
||||||
`item_recurring_invoice_id` int(11) NOT NULL,
|
|
||||||
PRIMARY KEY (`item_id`)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
|
||||||
");
|
|
||||||
|
|
||||||
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.4.1'");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (CURRENT_DATABASE_VERSION == '2.4.1') {
|
|
||||||
|
|
||||||
// Migrate Items
|
|
||||||
mysqli_query($mysqli, "
|
|
||||||
INSERT INTO `recurring_invoice_items` (
|
|
||||||
`item_name`,
|
|
||||||
`item_description`,
|
|
||||||
`item_quantity`,
|
|
||||||
`item_price`,
|
|
||||||
`item_subtotal`,
|
|
||||||
`item_tax`,
|
|
||||||
`item_total`,
|
|
||||||
`item_order`,
|
|
||||||
`item_created_at`,
|
|
||||||
`item_updated_at`,
|
|
||||||
`item_archived_at`,
|
|
||||||
`item_tax_id`,
|
|
||||||
`item_product_id`,
|
|
||||||
`item_recurring_invoice_id`
|
|
||||||
)
|
|
||||||
SELECT
|
|
||||||
`item_name`,
|
|
||||||
`item_description`,
|
|
||||||
`item_quantity`,
|
|
||||||
`item_price`,
|
|
||||||
`item_subtotal`,
|
|
||||||
`item_tax`,
|
|
||||||
`item_total`,
|
|
||||||
`item_order`,
|
|
||||||
`item_created_at`,
|
|
||||||
`item_updated_at`,
|
|
||||||
`item_archived_at`,
|
|
||||||
`item_tax_id`,
|
|
||||||
`item_product_id`,
|
|
||||||
`item_recurring_invoice_id`
|
|
||||||
FROM `invoice_items`
|
|
||||||
WHERE `item_recurring_invoice_id` != 0
|
|
||||||
");
|
|
||||||
|
|
||||||
mysqli_query($mysqli, "
|
|
||||||
INSERT INTO `quote_items` (
|
|
||||||
`item_name`,
|
|
||||||
`item_description`,
|
|
||||||
`item_quantity`,
|
|
||||||
`item_price`,
|
|
||||||
`item_subtotal`,
|
|
||||||
`item_tax`,
|
|
||||||
`item_total`,
|
|
||||||
`item_order`,
|
|
||||||
`item_created_at`,
|
|
||||||
`item_updated_at`,
|
|
||||||
`item_archived_at`,
|
|
||||||
`item_tax_id`,
|
|
||||||
`item_product_id`,
|
|
||||||
`item_quote_id`
|
|
||||||
)
|
|
||||||
SELECT
|
|
||||||
`item_name`,
|
|
||||||
`item_description`,
|
|
||||||
`item_quantity`,
|
|
||||||
`item_price`,
|
|
||||||
`item_subtotal`,
|
|
||||||
`item_tax`,
|
|
||||||
`item_total`,
|
|
||||||
`item_order`,
|
|
||||||
`item_created_at`,
|
|
||||||
`item_updated_at`,
|
|
||||||
`item_archived_at`,
|
|
||||||
`item_tax_id`,
|
|
||||||
`item_product_id`,
|
|
||||||
`item_quote_id`
|
|
||||||
FROM `invoice_items`
|
|
||||||
WHERE `item_quote_id` != 0
|
|
||||||
");
|
|
||||||
|
|
||||||
mysqli_query($mysqli, "
|
|
||||||
DELETE FROM `invoice_items`
|
|
||||||
WHERE `item_recurring_invoice_id` != 0
|
|
||||||
");
|
|
||||||
|
|
||||||
mysqli_query($mysqli, "
|
|
||||||
DELETE FROM `invoice_items`
|
|
||||||
WHERE `item_quote_id` != 0
|
|
||||||
");
|
|
||||||
|
|
||||||
mysqli_query($mysqli, "
|
|
||||||
ALTER TABLE `invoice_items`
|
|
||||||
DROP COLUMN `item_quote_id`,
|
|
||||||
DROP COLUMN `item_recurring_invoice_id`
|
|
||||||
");
|
|
||||||
|
|
||||||
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.4.2'");
|
|
||||||
|
|
||||||
}
|
|
||||||
//
|
|
||||||
// // if (CURRENT_DATABASE_VERSION == '2.4.2') {
|
|
||||||
// // Insert queries here required to update to DB version 2.4.3
|
|
||||||
// // Then, update the database to the next sequential version
|
// // Then, update the database to the next sequential version
|
||||||
// mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.4.3'");
|
// mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.4.1'");
|
||||||
// }
|
// }
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
<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-file-alt mr-2"></i>Document Templates</h3>
|
<h3 class="card-title mt-2"><i class="fa fa-fw fa-file mr-2"></i>Document Templates</h3>
|
||||||
<div class="card-tools">
|
<div class="card-tools">
|
||||||
<button type="button" class="btn btn-primary ajax-modal" data-modal-url="modals/document_template/document_template_add.php" data-modal-size="xl">
|
<button type="button" class="btn btn-primary ajax-modal" data-modal-url="modals/document_template/document_template_add.php" data-modal-size="xl">
|
||||||
<i class="fas fa-plus mr-2"></i>New Template
|
<i class="fas fa-plus mr-2"></i>New Template
|
||||||
@@ -73,23 +73,14 @@
|
|||||||
$document_template_content = nullable_htmlentities($row['document_template_content']);
|
$document_template_content = nullable_htmlentities($row['document_template_content']);
|
||||||
$document_template_created_by_name = nullable_htmlentities($row['user_name']);
|
$document_template_created_by_name = nullable_htmlentities($row['user_name']);
|
||||||
$document_template_created_at = nullable_htmlentities($row['document_template_created_at']);
|
$document_template_created_at = nullable_htmlentities($row['document_template_created_at']);
|
||||||
$document_template_updated_at = nullable_htmlentities(getFallback($row['document_template_updated_at']));
|
$document_template_updated_at = nullable_htmlentities($row['document_template_updated_at']);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<a class="text-dark ajax-modal" href="#"
|
<a class="text-bold" href="document_template_details.php?document_template_id=<?php echo $document_template_id; ?>"><i class="fas fa-fw fa-file-alt text-dark"></i> <?php echo $document_template_name; ?></a>
|
||||||
data-modal-size="xl"
|
<div class="mt-1 text-secondary"><?php echo $document_template_description; ?></div>
|
||||||
data-modal-url="modals/document_template/document_template_edit.php?id=<?= $document_template_id ?>">
|
|
||||||
<div class="media">
|
|
||||||
<i class="fas fa-fw fa-2x fa-file-alt mr-2"></i>
|
|
||||||
<div class="media-body">
|
|
||||||
<div><?= $document_template_name ?></div>
|
|
||||||
<div><small class="text-secondary"><?= $document_template_description ?></small></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<?php echo $document_template_created_at; ?>
|
<?php echo $document_template_created_at; ?>
|
||||||
@@ -102,17 +93,13 @@
|
|||||||
<i class="fas fa-ellipsis-h"></i>
|
<i class="fas fa-ellipsis-h"></i>
|
||||||
</button>
|
</button>
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
<a class="dropdown-item" href="document_template_details.php?document_template_id=<?= $document_template_id ?>">
|
|
||||||
<i class="fas fa-fw fa-eye mr-2"></i>View
|
|
||||||
</a>
|
|
||||||
<div class="dropdown-divider"></div>
|
|
||||||
<a class="dropdown-item ajax-modal" href="#"
|
<a class="dropdown-item ajax-modal" href="#"
|
||||||
data-modal-size="xl"
|
data-modal-size="xl"
|
||||||
data-modal-url="modals/document_template/document_template_edit.php?id=<?= $document_template_id ?>">
|
data-modal-url="modals/document_template/document_template_edit.php?id=<?= $document_template_id ?>">
|
||||||
<i class="fas fa-fw fa-edit mr-2"></i>Edit
|
<i class="fas fa-fw fa-edit mr-2"></i>Edit
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-danger text-bold" href="post.php?delete_document_template=<?php echo $document_template_id; ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<a class="dropdown-item text-danger text-bold" href="post.php?delete_document_template=<?php echo $document_template_id; ?>">
|
||||||
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -43,19 +43,19 @@ $document_template_updated_at = nullable_htmlentities($row['document_template_up
|
|||||||
<li class="breadcrumb-item">
|
<li class="breadcrumb-item">
|
||||||
<a href="document_template.php">Document Templates</a>
|
<a href="document_template.php">Document Templates</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="breadcrumb-item active"><i class="fas fa-file-alt mr-2"></i><?php echo $document_template_name; ?></li>
|
<li class="breadcrumb-item active"><i class="fas fa-file mr-2"></i><?php echo $document_template_name; ?></li>
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
<div class="card card-dark">
|
<div class="card card-dark">
|
||||||
<div class="card-header">
|
<div class="card-header py-2">
|
||||||
|
|
||||||
<h3 class="card-title mt-1"><i class="fa fa-fw fa-file-alt mr-2"></i><?php echo $document_template_name; ?></h3>
|
<h3 class="card-title mt-2"><i class="fa fa-fw fa-file mr-2"></i><?php echo $document_template_name; ?></h3>
|
||||||
|
|
||||||
<div class="card-tools">
|
<div class="card-tools">
|
||||||
<button type="button" class="btn btn-tool ajax-modal"
|
<button type="button" class="btn btn-primary ajax-modal"
|
||||||
data-modal-size="xl"
|
data-modal-size="xl"
|
||||||
data-modal-url="modals/document_template/document_template_edit.php?id=<?= $document_template_id ?>">
|
data-modal-url="modals/document_template/document_template_edit.php?id=<?= $document_template_id ?>">
|
||||||
<i class="fas fa-edit mr-2"></i>
|
<i class="fas fa-edit mr-2"></i>Edit
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -139,7 +139,7 @@
|
|||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="/admin/document_template.php" class="nav-link <?php echo (in_array(basename($_SERVER['PHP_SELF']), ['document_template.php', 'document_template_details.php']) ? 'active' : ''); ?>">
|
<a href="/admin/document_template.php" class="nav-link <?php echo (in_array(basename($_SERVER['PHP_SELF']), ['document_template.php', 'document_template_details.php']) ? 'active' : ''); ?>">
|
||||||
<i class="nav-icon fas fa-file-alt"></i>
|
<i class="nav-icon fas fa-file"></i>
|
||||||
<p>Document Templates</p>
|
<p>Document Templates</p>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -163,12 +163,12 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
|
|
||||||
<!-- Show force resend if all retries have failed -->
|
<!-- Show force resend if all retries have failed -->
|
||||||
<?php if ($email_status == 2 && $email_attempts > 3) { ?>
|
<?php if ($email_status == 2 && $email_attempts > 3) { ?>
|
||||||
<a class="btn btn-sm btn-success" href="post.php?send_failed_mail=<?php echo $email_id; ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>"><i class="fas fa-fw fa-paper-plane"></i></a>
|
<a class="btn btn-sm btn-success" href="post.php?send_failed_mail=<?php echo $email_id; ?>"><i class="fas fa-fw fa-paper-plane"></i></a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<!-- Allow cancelling a message if it hasn't yet been picked up (e.g. stuck/bugged) -->
|
<!-- Allow cancelling a message if it hasn't yet been picked up (e.g. stuck/bugged) -->
|
||||||
<?php if ($email_status !== 3) { ?>
|
<?php if ($email_status !== 3) { ?>
|
||||||
<a class="btn btn-sm btn-danger confirm-link" href="post.php?cancel_mail=<?php echo $email_id; ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>"><i class="fas fa-fw fa-trash"></i></a>
|
<a class="btn btn-sm btn-danger confirm-link" href="post.php?cancel_mail=<?php echo $email_id; ?>"><i class="fas fa-fw fa-trash"></i></a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ ob_start();
|
|||||||
</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'] ?>">
|
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ ob_start();
|
|||||||
</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="custom_link_id" value="<?php echo $custom_link_id; ?>">
|
<input type="hidden" name="custom_link_id" value="<?php echo $custom_link_id; ?>">
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|||||||
@@ -13,8 +13,6 @@ ob_start();
|
|||||||
</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="<?= $_SESSION['csrf_token'] ?>">
|
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -46,7 +44,7 @@ ob_start();
|
|||||||
|
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
|
|
||||||
<button type="submit" name="add_document_template" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Save template</button>
|
<button type="submit" name="add_document_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>
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ $document_template_name = nullable_htmlentities($row['document_template_name']);
|
|||||||
$document_template_description = nullable_htmlentities($row['document_template_description']);
|
$document_template_description = nullable_htmlentities($row['document_template_description']);
|
||||||
$document_template_content = nullable_htmlentities($row['document_template_content']);
|
$document_template_content = nullable_htmlentities($row['document_template_content']);
|
||||||
|
|
||||||
|
// Generate the HTML form content using output buffering.
|
||||||
ob_start();
|
ob_start();
|
||||||
?>
|
?>
|
||||||
|
|
||||||
@@ -20,9 +21,7 @@ ob_start();
|
|||||||
</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="<?= $_SESSION['csrf_token'] ?>">
|
|
||||||
<input type="hidden" name="document_template_id" value="<?php echo $document_template_id; ?>">
|
<input type="hidden" name="document_template_id" value="<?php echo $document_template_id; ?>">
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -39,7 +38,7 @@ ob_start();
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="submit" name="edit_document_template" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Save template</button>
|
<button type="submit" name="edit_document_template" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Save</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>
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ ob_start();
|
|||||||
</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="<?= $_SESSION['csrf_token'] ?>">
|
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ ob_start();
|
|||||||
</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="<?= $_SESSION['csrf_token'] ?>">
|
|
||||||
<input type="hidden" name="project_template_id" value="<?php echo $project_template_id; ?>">
|
<input type="hidden" name="project_template_id" value="<?php echo $project_template_id; ?>">
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|||||||
@@ -15,9 +15,7 @@ ob_start();
|
|||||||
</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="<?= $_SESSION['csrf_token'] ?>">
|
|
||||||
<input type="hidden" name="project_template_id" value="<?php echo $project_template_id; ?>">
|
<input type="hidden" name="project_template_id" value="<?php echo $project_template_id; ?>">
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|||||||
@@ -13,8 +13,6 @@ ob_start();
|
|||||||
</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="<?= $_SESSION['csrf_token'] ?>">
|
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|||||||
@@ -24,9 +24,7 @@ ob_start();
|
|||||||
</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="<?= $_SESSION['csrf_token'] ?>">
|
|
||||||
<input type="hidden" name="software_template_id" value="<?php echo $software_template_id; ?>">
|
<input type="hidden" name="software_template_id" value="<?php echo $software_template_id; ?>">
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|||||||
@@ -30,9 +30,7 @@ ob_start();
|
|||||||
</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="type" value="<?php echo $type; ?>">
|
<input type="hidden" name="type" value="<?php echo $type; ?>">
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Name <strong class="text-danger">*</strong></label>
|
<label>Name <strong class="text-danger">*</strong></label>
|
||||||
|
|||||||
@@ -35,9 +35,7 @@ ob_start();
|
|||||||
</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="tag_id" value="<?php echo $tag_id; ?>">
|
<input type="hidden" name="tag_id" value="<?php echo $tag_id; ?>">
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ ob_start();
|
|||||||
</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'] ?>">
|
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|||||||
@@ -22,9 +22,7 @@ ob_start();
|
|||||||
</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="ticket_status_id" value="<?php echo $ticket_status_id; ?>">
|
<input type="hidden" name="ticket_status_id" value="<?php echo $ticket_status_id; ?>">
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|||||||
@@ -12,8 +12,6 @@ ob_start();
|
|||||||
</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="<?= $_SESSION['csrf_token'] ?>">
|
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|||||||
@@ -9,9 +9,7 @@
|
|||||||
</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="<?= $_SESSION['csrf_token'] ?>">
|
|
||||||
<input type="hidden" name="ticket_template_id" value="<?php echo $ticket_template_id; ?>">
|
<input type="hidden" name="ticket_template_id" value="<?php echo $ticket_template_id; ?>">
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ ob_start();
|
|||||||
</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="<?= $_SESSION['csrf_token'] ?>">
|
|
||||||
<input type="hidden" name="task_template_id" value="<?php echo $task_template_id; ?>">
|
<input type="hidden" name="task_template_id" value="<?php echo $task_template_id; ?>">
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ ob_start();
|
|||||||
</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="<?= $_SESSION['csrf_token'] ?>">
|
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
|||||||
@@ -31,9 +31,7 @@ ob_start();
|
|||||||
</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="<?= $_SESSION['csrf_token'] ?>">
|
|
||||||
<input type="hidden" name="vendor_template_id" value="<?php echo $vendor_template_id; ?>">
|
<input type="hidden" name="vendor_template_id" value="<?php echo $vendor_template_id; ?>">
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<ul class="nav nav-pills nav-justified mb-3">
|
<ul class="nav nav-pills nav-justified mb-3">
|
||||||
|
|||||||
@@ -8,8 +8,6 @@ defined('FROM_POST_HANDLER') || die("Direct file access is not allowed");
|
|||||||
|
|
||||||
if (isset($_POST['add_category'])) {
|
if (isset($_POST['add_category'])) {
|
||||||
|
|
||||||
validateCSRFToken($_POST['csrf_token']);
|
|
||||||
|
|
||||||
require_once 'category_model.php';
|
require_once 'category_model.php';
|
||||||
|
|
||||||
mysqli_query($mysqli,"INSERT INTO categories SET category_name = '$name', category_type = '$type', category_color = '$color'");
|
mysqli_query($mysqli,"INSERT INTO categories SET category_name = '$name', category_type = '$type', category_color = '$color'");
|
||||||
@@ -26,8 +24,6 @@ if (isset($_POST['add_category'])) {
|
|||||||
|
|
||||||
if (isset($_POST['edit_category'])) {
|
if (isset($_POST['edit_category'])) {
|
||||||
|
|
||||||
validateCSRFToken($_POST['csrf_token']);
|
|
||||||
|
|
||||||
require_once 'category_model.php';
|
require_once 'category_model.php';
|
||||||
|
|
||||||
$category_id = intval($_POST['category_id']);
|
$category_id = intval($_POST['category_id']);
|
||||||
@@ -44,8 +40,6 @@ if (isset($_POST['edit_category'])) {
|
|||||||
|
|
||||||
if (isset($_GET['archive_category'])) {
|
if (isset($_GET['archive_category'])) {
|
||||||
|
|
||||||
validateCSRFToken($_GET['csrf_token']);
|
|
||||||
|
|
||||||
$category_id = intval($_GET['archive_category']);
|
$category_id = intval($_GET['archive_category']);
|
||||||
|
|
||||||
// Get Category Name and Type for logging
|
// Get Category Name and Type for logging
|
||||||
@@ -64,11 +58,9 @@ if (isset($_GET['archive_category'])) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_GET['restore_category'])) {
|
if (isset($_GET['unarchive_category'])) {
|
||||||
|
|
||||||
validateCSRFToken($_GET['csrf_token']);
|
$category_id = intval($_GET['unarchive_category']);
|
||||||
|
|
||||||
$category_id = intval($_GET['retore_category']);
|
|
||||||
|
|
||||||
// Get Category Name and Type for logging
|
// Get Category Name and Type for logging
|
||||||
$sql = mysqli_query($mysqli,"SELECT category_name, category_type FROM categories WHERE category_id = $category_id");
|
$sql = mysqli_query($mysqli,"SELECT category_name, category_type FROM categories WHERE category_id = $category_id");
|
||||||
@@ -78,9 +70,9 @@ if (isset($_GET['restore_category'])) {
|
|||||||
|
|
||||||
mysqli_query($mysqli,"UPDATE categories SET category_archived_at = NULL WHERE category_id = $category_id");
|
mysqli_query($mysqli,"UPDATE categories SET category_archived_at = NULL WHERE category_id = $category_id");
|
||||||
|
|
||||||
logAction("Category", "Restore", "$session_name retored category $category_type $category_name", 0, $category_id);
|
logAction("Category", "Unarchive", "$session_name unarchived category $category_type $category_name", 0, $category_id);
|
||||||
|
|
||||||
flash_alert("Category $category_type <strong>$category_name</strong> restored");
|
flash_alert("Category $category_type <strong>$category_name</strong> unarchived");
|
||||||
|
|
||||||
redirect();
|
redirect();
|
||||||
|
|
||||||
@@ -88,8 +80,6 @@ if (isset($_GET['restore_category'])) {
|
|||||||
|
|
||||||
if (isset($_GET['delete_category'])) {
|
if (isset($_GET['delete_category'])) {
|
||||||
|
|
||||||
validateCSRFToken($_GET['csrf_token']);
|
|
||||||
|
|
||||||
$category_id = intval($_GET['delete_category']);
|
$category_id = intval($_GET['delete_category']);
|
||||||
|
|
||||||
// Get Category Name and Type for logging
|
// Get Category Name and Type for logging
|
||||||
|
|||||||
@@ -8,8 +8,6 @@ defined('FROM_POST_HANDLER') || die("Direct file access is not allowed");
|
|||||||
|
|
||||||
if (isset($_POST['add_custom_link'])) {
|
if (isset($_POST['add_custom_link'])) {
|
||||||
|
|
||||||
validateCSRFToken($_POST['csrf_token']);
|
|
||||||
|
|
||||||
$name = sanitizeInput($_POST['name']);
|
$name = sanitizeInput($_POST['name']);
|
||||||
$uri = sanitizeInput($_POST['uri']);
|
$uri = sanitizeInput($_POST['uri']);
|
||||||
$new_tab = intval($_POST['new_tab'] ?? 0);
|
$new_tab = intval($_POST['new_tab'] ?? 0);
|
||||||
@@ -31,8 +29,6 @@ if (isset($_POST['add_custom_link'])) {
|
|||||||
|
|
||||||
if (isset($_POST['edit_custom_link'])) {
|
if (isset($_POST['edit_custom_link'])) {
|
||||||
|
|
||||||
validateCSRFToken($_POST['csrf_token']);
|
|
||||||
|
|
||||||
$custom_link_id = intval($_POST['custom_link_id']);
|
$custom_link_id = intval($_POST['custom_link_id']);
|
||||||
$name = sanitizeInput($_POST['name']);
|
$name = sanitizeInput($_POST['name']);
|
||||||
$uri = sanitizeInput($_POST['uri']);
|
$uri = sanitizeInput($_POST['uri']);
|
||||||
@@ -53,8 +49,6 @@ if (isset($_POST['edit_custom_link'])) {
|
|||||||
|
|
||||||
if (isset($_GET['delete_custom_link'])) {
|
if (isset($_GET['delete_custom_link'])) {
|
||||||
|
|
||||||
validateCSRFToken($_GET['csrf_token']);
|
|
||||||
|
|
||||||
$custom_link_id = intval($_GET['delete_custom_link']);
|
$custom_link_id = intval($_GET['delete_custom_link']);
|
||||||
|
|
||||||
// Get Custom Link name and uri for logging
|
// Get Custom Link name and uri for logging
|
||||||
|
|||||||
@@ -6,8 +6,6 @@ defined('FROM_POST_HANDLER') || die("Direct file access is not allowed");
|
|||||||
|
|
||||||
if (isset($_POST['add_document_template'])) {
|
if (isset($_POST['add_document_template'])) {
|
||||||
|
|
||||||
validateCSRFToken($_POST['csrf_token']);
|
|
||||||
|
|
||||||
$name = sanitizeInput($_POST['name']);
|
$name = sanitizeInput($_POST['name']);
|
||||||
$description = sanitizeInput($_POST['description']);
|
$description = sanitizeInput($_POST['description']);
|
||||||
|
|
||||||
@@ -38,8 +36,6 @@ if (isset($_POST['add_document_template'])) {
|
|||||||
|
|
||||||
if (isset($_POST['edit_document_template'])) {
|
if (isset($_POST['edit_document_template'])) {
|
||||||
|
|
||||||
validateCSRFToken($_POST['csrf_token']);
|
|
||||||
|
|
||||||
$document_template_id = intval($_POST['document_template_id']);
|
$document_template_id = intval($_POST['document_template_id']);
|
||||||
$name = sanitizeInput($_POST['name']);
|
$name = sanitizeInput($_POST['name']);
|
||||||
$description = sanitizeInput($_POST['description']);
|
$description = sanitizeInput($_POST['description']);
|
||||||
@@ -73,8 +69,6 @@ if (isset($_POST['edit_document_template'])) {
|
|||||||
|
|
||||||
if (isset($_GET['delete_document_template'])) {
|
if (isset($_GET['delete_document_template'])) {
|
||||||
|
|
||||||
validateCSRFToken($_GET['csrf_token']);
|
|
||||||
|
|
||||||
$document_template_id = intval($_GET['delete_document_template']);
|
$document_template_id = intval($_GET['delete_document_template']);
|
||||||
|
|
||||||
$document_template_name = sanitizeInput(getFieldById('document_templates', $document_template_id, 'document_template_name'));
|
$document_template_name = sanitizeInput(getFieldById('document_templates', $document_template_id, 'document_template_name'));
|
||||||
|
|||||||
@@ -4,8 +4,6 @@ defined('FROM_POST_HANDLER') || die("Direct file access is not allowed");
|
|||||||
|
|
||||||
if (isset($_GET['send_failed_mail'])) {
|
if (isset($_GET['send_failed_mail'])) {
|
||||||
|
|
||||||
validateCSRFToken($_GET['csrf_token']);
|
|
||||||
|
|
||||||
$email_id = intval($_GET['send_failed_mail']);
|
$email_id = intval($_GET['send_failed_mail']);
|
||||||
|
|
||||||
mysqli_query($mysqli,"UPDATE email_queue SET email_status = 0, email_attempts = 3 WHERE email_id = $email_id");
|
mysqli_query($mysqli,"UPDATE email_queue SET email_status = 0, email_attempts = 3 WHERE email_id = $email_id");
|
||||||
@@ -20,8 +18,6 @@ if (isset($_GET['send_failed_mail'])) {
|
|||||||
|
|
||||||
if (isset($_GET['cancel_mail'])) {
|
if (isset($_GET['cancel_mail'])) {
|
||||||
|
|
||||||
validateCSRFToken($_GET['csrf_token']);
|
|
||||||
|
|
||||||
$email_id = intval($_GET['cancel_mail']);
|
$email_id = intval($_GET['cancel_mail']);
|
||||||
|
|
||||||
mysqli_query($mysqli,"UPDATE email_queue SET email_status = 2, email_attempts = 99, email_failed_at = NOW() WHERE email_id = $email_id");
|
mysqli_query($mysqli,"UPDATE email_queue SET email_status = 2, email_attempts = 99, email_failed_at = NOW() WHERE email_id = $email_id");
|
||||||
|
|||||||
@@ -59,8 +59,6 @@ if (isset($_POST['edit_payment_method'])) {
|
|||||||
|
|
||||||
if (isset($_GET['delete_payment_method'])) {
|
if (isset($_GET['delete_payment_method'])) {
|
||||||
|
|
||||||
validateCSRFToken($_GET['csrf_token']);
|
|
||||||
|
|
||||||
$payment_method_id = intval($_GET['delete_payment_method']);
|
$payment_method_id = intval($_GET['delete_payment_method']);
|
||||||
|
|
||||||
$payment_method_name = sanitizeInput(getFieldById('payment_methods', $payment_method_is, 'payment_method_name'));
|
$payment_method_name = sanitizeInput(getFieldById('payment_methods', $payment_method_is, 'payment_method_name'));
|
||||||
|
|||||||
@@ -4,8 +4,6 @@ defined('FROM_POST_HANDLER') || die("Direct file access is not allowed");
|
|||||||
|
|
||||||
if (isset($_POST['add_project_template'])) {
|
if (isset($_POST['add_project_template'])) {
|
||||||
|
|
||||||
validateCSRFToken($_POST['csrf_token']);
|
|
||||||
|
|
||||||
$name = sanitizeInput($_POST['name']);
|
$name = sanitizeInput($_POST['name']);
|
||||||
$description = sanitizeInput($_POST['description']);
|
$description = sanitizeInput($_POST['description']);
|
||||||
|
|
||||||
@@ -23,8 +21,6 @@ if (isset($_POST['add_project_template'])) {
|
|||||||
|
|
||||||
if (isset($_POST['edit_project_template'])) {
|
if (isset($_POST['edit_project_template'])) {
|
||||||
|
|
||||||
validateCSRFToken($_POST['csrf_token']);
|
|
||||||
|
|
||||||
$project_template_id = intval($_POST['project_template_id']);
|
$project_template_id = intval($_POST['project_template_id']);
|
||||||
$name = sanitizeInput($_POST['name']);
|
$name = sanitizeInput($_POST['name']);
|
||||||
$description = sanitizeInput($_POST['description']);
|
$description = sanitizeInput($_POST['description']);
|
||||||
@@ -41,8 +37,6 @@ if (isset($_POST['edit_project_template'])) {
|
|||||||
|
|
||||||
if (isset($_POST['edit_ticket_template_order'])) {
|
if (isset($_POST['edit_ticket_template_order'])) {
|
||||||
|
|
||||||
validateCSRFToken($_POST['csrf_token']);
|
|
||||||
|
|
||||||
$ticket_template_id = intval($_POST['ticket_template_id']);
|
$ticket_template_id = intval($_POST['ticket_template_id']);
|
||||||
$project_template_id = intval($_POST['project_template_id']);
|
$project_template_id = intval($_POST['project_template_id']);
|
||||||
$order = intval($_POST['order']);
|
$order = intval($_POST['order']);
|
||||||
@@ -55,8 +49,6 @@ if (isset($_POST['edit_ticket_template_order'])) {
|
|||||||
|
|
||||||
if (isset($_POST['add_ticket_template_to_project_template'])) {
|
if (isset($_POST['add_ticket_template_to_project_template'])) {
|
||||||
|
|
||||||
validateCSRFToken($_POST['csrf_token']);
|
|
||||||
|
|
||||||
$project_template_id = intval($_POST['project_template_id']);
|
$project_template_id = intval($_POST['project_template_id']);
|
||||||
$ticket_template_id = intval($_POST['ticket_template_id']);
|
$ticket_template_id = intval($_POST['ticket_template_id']);
|
||||||
$order = intval($_POST['order']);
|
$order = intval($_POST['order']);
|
||||||
@@ -73,8 +65,7 @@ if (isset($_POST['add_ticket_template_to_project_template'])) {
|
|||||||
|
|
||||||
if (isset($_POST['remove_ticket_template_from_project_template'])) {
|
if (isset($_POST['remove_ticket_template_from_project_template'])) {
|
||||||
|
|
||||||
validateCSRFToken($_POST['csrf_token']);
|
validateTechRole();
|
||||||
|
|
||||||
$ticket_template_id = intval($_POST['ticket_template_id']);
|
$ticket_template_id = intval($_POST['ticket_template_id']);
|
||||||
$project_template_id = intval($_POST['project_template_id']);
|
$project_template_id = intval($_POST['project_template_id']);
|
||||||
|
|
||||||
@@ -90,8 +81,6 @@ if (isset($_POST['remove_ticket_template_from_project_template'])) {
|
|||||||
|
|
||||||
if (isset($_GET['delete_project_template'])) {
|
if (isset($_GET['delete_project_template'])) {
|
||||||
|
|
||||||
validateCSRFToken($_GET['csrf_token']);
|
|
||||||
|
|
||||||
$project_template_id = intval($_GET['delete_project_template']);
|
$project_template_id = intval($_GET['delete_project_template']);
|
||||||
|
|
||||||
$project_template_name = sanitizeInput(getFieldById('project_templates', $project_template_id, 'project_template_name'));
|
$project_template_name = sanitizeInput(getFieldById('project_templates', $project_template_id, 'project_template_name'));
|
||||||
|
|||||||
@@ -54,8 +54,6 @@ if (isset($_POST['edit_company'])) {
|
|||||||
|
|
||||||
if (isset($_GET['remove_company_logo'])) {
|
if (isset($_GET['remove_company_logo'])) {
|
||||||
|
|
||||||
validateCSRFToken($_GET['csrf_token']);
|
|
||||||
|
|
||||||
$sql = mysqli_query($mysqli,"SELECT company_logo FROM companies");
|
$sql = mysqli_query($mysqli,"SELECT company_logo FROM companies");
|
||||||
$row = mysqli_fetch_assoc($sql);
|
$row = mysqli_fetch_assoc($sql);
|
||||||
$company_logo = $row['company_logo']; // FileSystem Operation Logo is already sanitized
|
$company_logo = $row['company_logo']; // FileSystem Operation Logo is already sanitized
|
||||||
|
|||||||
@@ -4,8 +4,6 @@ defined('FROM_POST_HANDLER') || die("Direct file access is not allowed");
|
|||||||
|
|
||||||
if (isset($_POST['edit_module_settings'])) {
|
if (isset($_POST['edit_module_settings'])) {
|
||||||
|
|
||||||
validateCSRFToken($_POST['csrf_token']);
|
|
||||||
|
|
||||||
$config_module_enable_itdoc = intval($_POST['config_module_enable_itdoc'] ?? 0);
|
$config_module_enable_itdoc = intval($_POST['config_module_enable_itdoc'] ?? 0);
|
||||||
$config_module_enable_ticketing = intval($_POST['config_module_enable_ticketing'] ?? 0);
|
$config_module_enable_ticketing = intval($_POST['config_module_enable_ticketing'] ?? 0);
|
||||||
$config_module_enable_accounting = intval($_POST['config_module_enable_accounting'] ?? 0);
|
$config_module_enable_accounting = intval($_POST['config_module_enable_accounting'] ?? 0);
|
||||||
|
|||||||
@@ -52,8 +52,6 @@ if (isset($_POST['edit_favicon_settings'])) {
|
|||||||
|
|
||||||
if (isset($_GET['reset_favicon'])) {
|
if (isset($_GET['reset_favicon'])) {
|
||||||
|
|
||||||
validateCSRFToken($_GET['csrf_token']);
|
|
||||||
|
|
||||||
if (file_exists("../uploads/favicon.ico")) {
|
if (file_exists("../uploads/favicon.ico")) {
|
||||||
unlink("../uploads/favicon.ico");
|
unlink("../uploads/favicon.ico");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,8 +4,6 @@ defined('FROM_POST_HANDLER') || die("Direct file access is not allowed");
|
|||||||
|
|
||||||
if (isset($_POST['edit_ticket_settings'])) {
|
if (isset($_POST['edit_ticket_settings'])) {
|
||||||
|
|
||||||
validateCSRFToken($_POST['csrf_token']);
|
|
||||||
|
|
||||||
$config_ticket_prefix = sanitizeInput($_POST['config_ticket_prefix']);
|
$config_ticket_prefix = sanitizeInput($_POST['config_ticket_prefix']);
|
||||||
$config_ticket_next_number = intval($_POST['config_ticket_next_number']);
|
$config_ticket_next_number = intval($_POST['config_ticket_next_number']);
|
||||||
$config_ticket_email_parse = intval($_POST['config_ticket_email_parse'] ?? 0);
|
$config_ticket_email_parse = intval($_POST['config_ticket_email_parse'] ?? 0);
|
||||||
|
|||||||
@@ -6,8 +6,6 @@ defined('FROM_POST_HANDLER') || die("Direct file access is not allowed");
|
|||||||
|
|
||||||
if (isset($_POST['add_software_template'])) {
|
if (isset($_POST['add_software_template'])) {
|
||||||
|
|
||||||
validateCSRFToken($_POST['csrf_token']);
|
|
||||||
|
|
||||||
$name = sanitizeInput($_POST['name']);
|
$name = sanitizeInput($_POST['name']);
|
||||||
$version = sanitizeInput($_POST['version']);
|
$version = sanitizeInput($_POST['version']);
|
||||||
$description = sanitizeInput($_POST['description']);
|
$description = sanitizeInput($_POST['description']);
|
||||||
@@ -29,8 +27,6 @@ if (isset($_POST['add_software_template'])) {
|
|||||||
|
|
||||||
if (isset($_POST['edit_software_template'])) {
|
if (isset($_POST['edit_software_template'])) {
|
||||||
|
|
||||||
validateCSRFToken($_POST['csrf_token']);
|
|
||||||
|
|
||||||
$software_template_id = intval($_POST['software_template_id']);
|
$software_template_id = intval($_POST['software_template_id']);
|
||||||
$name = sanitizeInput($_POST['name']);
|
$name = sanitizeInput($_POST['name']);
|
||||||
$version = sanitizeInput($_POST['version']);
|
$version = sanitizeInput($_POST['version']);
|
||||||
@@ -51,8 +47,6 @@ if (isset($_POST['edit_software_template'])) {
|
|||||||
|
|
||||||
if (isset($_GET['delete_software_template'])) {
|
if (isset($_GET['delete_software_template'])) {
|
||||||
|
|
||||||
validateCSRFToken($_GET['csrf_token']);
|
|
||||||
|
|
||||||
$software_template_id = intval($_GET['delete_software_template']);
|
$software_template_id = intval($_GET['delete_software_template']);
|
||||||
|
|
||||||
// Get Software Template Name for logging and alert message
|
// Get Software Template Name for logging and alert message
|
||||||
|
|||||||
@@ -8,8 +8,6 @@ defined('FROM_POST_HANDLER') || die("Direct file access is not allowed");
|
|||||||
|
|
||||||
if (isset($_POST['add_tag'])) {
|
if (isset($_POST['add_tag'])) {
|
||||||
|
|
||||||
validateCSRFToken($_POST['csrf_token']);
|
|
||||||
|
|
||||||
require_once 'tag_model.php';
|
require_once 'tag_model.php';
|
||||||
|
|
||||||
mysqli_query($mysqli,"INSERT INTO tags SET tag_name = '$name', tag_type = $type, tag_color = '$color', tag_icon = '$icon'");
|
mysqli_query($mysqli,"INSERT INTO tags SET tag_name = '$name', tag_type = $type, tag_color = '$color', tag_icon = '$icon'");
|
||||||
@@ -26,8 +24,6 @@ if (isset($_POST['add_tag'])) {
|
|||||||
|
|
||||||
if (isset($_POST['edit_tag'])) {
|
if (isset($_POST['edit_tag'])) {
|
||||||
|
|
||||||
validateCSRFToken($_POST['csrf_token']);
|
|
||||||
|
|
||||||
require_once 'post/tag_model.php';
|
require_once 'post/tag_model.php';
|
||||||
|
|
||||||
$tag_id = intval($_POST['tag_id']);
|
$tag_id = intval($_POST['tag_id']);
|
||||||
@@ -44,8 +40,6 @@ if (isset($_POST['edit_tag'])) {
|
|||||||
|
|
||||||
if (isset($_GET['delete_tag'])) {
|
if (isset($_GET['delete_tag'])) {
|
||||||
|
|
||||||
validateCSRFToken($_GET['csrf_token']);
|
|
||||||
|
|
||||||
$tag_id = intval($_GET['delete_tag']);
|
$tag_id = intval($_GET['delete_tag']);
|
||||||
|
|
||||||
$tag_name = sanitizeInput(getFieldById('tags', $tag_id, 'tag_name'));
|
$tag_name = sanitizeInput(getFieldById('tags', $tag_id, 'tag_name'));
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ defined('FROM_POST_HANDLER') || die("Direct file access is not allowed");
|
|||||||
if (isset($_POST['add_tax'])) {
|
if (isset($_POST['add_tax'])) {
|
||||||
|
|
||||||
validateCSRFToken($_POST['csrf_token']);
|
validateCSRFToken($_POST['csrf_token']);
|
||||||
|
|
||||||
$name = sanitizeInput($_POST['name']);
|
$name = sanitizeInput($_POST['name']);
|
||||||
$percent = floatval($_POST['percent']);
|
$percent = floatval($_POST['percent']);
|
||||||
|
|
||||||
@@ -28,7 +27,6 @@ if (isset($_POST['add_tax'])) {
|
|||||||
if (isset($_POST['edit_tax'])) {
|
if (isset($_POST['edit_tax'])) {
|
||||||
|
|
||||||
validateCSRFToken($_POST['csrf_token']);
|
validateCSRFToken($_POST['csrf_token']);
|
||||||
|
|
||||||
$tax_id = intval($_POST['tax_id']);
|
$tax_id = intval($_POST['tax_id']);
|
||||||
$name = sanitizeInput($_POST['name']);
|
$name = sanitizeInput($_POST['name']);
|
||||||
$percent = floatval($_POST['percent']);
|
$percent = floatval($_POST['percent']);
|
||||||
@@ -46,7 +44,6 @@ if (isset($_POST['edit_tax'])) {
|
|||||||
if (isset($_GET['archive_tax'])) {
|
if (isset($_GET['archive_tax'])) {
|
||||||
|
|
||||||
validateCSRFToken($_GET['csrf_token']);
|
validateCSRFToken($_GET['csrf_token']);
|
||||||
|
|
||||||
$tax_id = intval($_GET['archive_tax']);
|
$tax_id = intval($_GET['archive_tax']);
|
||||||
|
|
||||||
$tax_name = sanitizeInput(getFieldById('taxes', $tax_id, 'tax_name'));
|
$tax_name = sanitizeInput(getFieldById('taxes', $tax_id, 'tax_name'));
|
||||||
@@ -63,8 +60,6 @@ if (isset($_GET['archive_tax'])) {
|
|||||||
|
|
||||||
if (isset($_GET['delete_tax'])) {
|
if (isset($_GET['delete_tax'])) {
|
||||||
|
|
||||||
validateCSRFToken($_GET['csrf_token']);
|
|
||||||
|
|
||||||
$tax_id = intval($_GET['delete_tax']);
|
$tax_id = intval($_GET['delete_tax']);
|
||||||
|
|
||||||
$tax_name = sanitizeInput(getFieldById('taxes', $tax_id, 'tax_name'));
|
$tax_name = sanitizeInput(getFieldById('taxes', $tax_id, 'tax_name'));
|
||||||
|
|||||||
@@ -4,8 +4,6 @@ defined('FROM_POST_HANDLER') || die("Direct file access is not allowed");
|
|||||||
|
|
||||||
if (isset($_POST['add_ticket_status'])) {
|
if (isset($_POST['add_ticket_status'])) {
|
||||||
|
|
||||||
validateCSRFToken($_POST['csrf_token']);
|
|
||||||
|
|
||||||
$name = sanitizeInput($_POST['name']);
|
$name = sanitizeInput($_POST['name']);
|
||||||
$color = sanitizeInput($_POST['color']);
|
$color = sanitizeInput($_POST['color']);
|
||||||
|
|
||||||
@@ -23,8 +21,6 @@ if (isset($_POST['add_ticket_status'])) {
|
|||||||
|
|
||||||
if (isset($_POST['edit_ticket_status'])) {
|
if (isset($_POST['edit_ticket_status'])) {
|
||||||
|
|
||||||
validateCSRFToken($_POST['csrf_token']);
|
|
||||||
|
|
||||||
$ticket_status_id = intval($_POST['ticket_status_id']);
|
$ticket_status_id = intval($_POST['ticket_status_id']);
|
||||||
$name = sanitizeInput($_POST['name']);
|
$name = sanitizeInput($_POST['name']);
|
||||||
$color = sanitizeInput($_POST['color']);
|
$color = sanitizeInput($_POST['color']);
|
||||||
|
|||||||
@@ -10,8 +10,6 @@ require_once '../agent/post/task.php';
|
|||||||
|
|
||||||
if (isset($_POST['add_ticket_template'])) {
|
if (isset($_POST['add_ticket_template'])) {
|
||||||
|
|
||||||
validateCSRFToken($_POST['csrf_token']);
|
|
||||||
|
|
||||||
$name = sanitizeInput($_POST['name']);
|
$name = sanitizeInput($_POST['name']);
|
||||||
$description = sanitizeInput($_POST['description']);
|
$description = sanitizeInput($_POST['description']);
|
||||||
$subject = sanitizeInput($_POST['subject']);
|
$subject = sanitizeInput($_POST['subject']);
|
||||||
@@ -36,8 +34,6 @@ if (isset($_POST['add_ticket_template'])) {
|
|||||||
|
|
||||||
if (isset($_POST['edit_ticket_template'])) {
|
if (isset($_POST['edit_ticket_template'])) {
|
||||||
|
|
||||||
validateCSRFToken($_POST['csrf_token']);
|
|
||||||
|
|
||||||
$ticket_template_id = intval($_POST['ticket_template_id']);
|
$ticket_template_id = intval($_POST['ticket_template_id']);
|
||||||
$name = sanitizeInput($_POST['name']);
|
$name = sanitizeInput($_POST['name']);
|
||||||
$description = sanitizeInput($_POST['description']);
|
$description = sanitizeInput($_POST['description']);
|
||||||
@@ -56,8 +52,6 @@ if (isset($_POST['edit_ticket_template'])) {
|
|||||||
|
|
||||||
if (isset($_GET['delete_ticket_template'])) {
|
if (isset($_GET['delete_ticket_template'])) {
|
||||||
|
|
||||||
validateCSRFToken($_GET['csrf_token']);
|
|
||||||
|
|
||||||
$ticket_template_id = intval($_GET['delete_ticket_template']);
|
$ticket_template_id = intval($_GET['delete_ticket_template']);
|
||||||
|
|
||||||
$ticket_template_name = sanitizeInput(getFieldById('ticket_templates', $ticket_template_id, 'ticket_template_name'));
|
$ticket_template_name = sanitizeInput(getFieldById('ticket_templates', $ticket_template_id, 'ticket_template_name'));
|
||||||
@@ -78,8 +72,6 @@ if (isset($_GET['delete_ticket_template'])) {
|
|||||||
|
|
||||||
if (isset($_POST['add_ticket_template_task'])) {
|
if (isset($_POST['add_ticket_template_task'])) {
|
||||||
|
|
||||||
validateCSRFToken($_POST['csrf_token']);
|
|
||||||
|
|
||||||
$ticket_template_id = intval($_POST['ticket_template_id']);
|
$ticket_template_id = intval($_POST['ticket_template_id']);
|
||||||
$task_name = sanitizeInput($_POST['task_name']);
|
$task_name = sanitizeInput($_POST['task_name']);
|
||||||
|
|
||||||
@@ -97,8 +89,6 @@ if (isset($_POST['add_ticket_template_task'])) {
|
|||||||
|
|
||||||
if (isset($_GET['delete_task_template'])) {
|
if (isset($_GET['delete_task_template'])) {
|
||||||
|
|
||||||
validateCSRFToken($_GET['csrf_token']);
|
|
||||||
|
|
||||||
$task_template_id = intval($_GET['delete_task_template']);
|
$task_template_id = intval($_GET['delete_task_template']);
|
||||||
|
|
||||||
$task_template_name = sanitizeInput(getFieldById('tags', $task_template_id, 'task_template_name'));
|
$task_template_name = sanitizeInput(getFieldById('tags', $task_template_id, 'task_template_name'));
|
||||||
|
|||||||
@@ -9,8 +9,6 @@ require_once '../agent/post/vendor.php';
|
|||||||
|
|
||||||
if (isset($_POST['add_vendor_template'])) {
|
if (isset($_POST['add_vendor_template'])) {
|
||||||
|
|
||||||
validateCSRFToken($_POST['csrf_token']);
|
|
||||||
|
|
||||||
$name = sanitizeInput($_POST['name']);
|
$name = sanitizeInput($_POST['name']);
|
||||||
$description = sanitizeInput($_POST['description']);
|
$description = sanitizeInput($_POST['description']);
|
||||||
$account_number = sanitizeInput($_POST['account_number']);
|
$account_number = sanitizeInput($_POST['account_number']);
|
||||||
@@ -39,8 +37,6 @@ if (isset($_POST['add_vendor_template'])) {
|
|||||||
|
|
||||||
if (isset($_POST['edit_vendor_template'])) {
|
if (isset($_POST['edit_vendor_template'])) {
|
||||||
|
|
||||||
validateCSRFToken($_POST['csrf_token']);
|
|
||||||
|
|
||||||
$vendor_template_id = intval($_POST['vendor_template_id']);
|
$vendor_template_id = intval($_POST['vendor_template_id']);
|
||||||
$name = sanitizeInput($_POST['name']);
|
$name = sanitizeInput($_POST['name']);
|
||||||
$description = sanitizeInput($_POST['description']);
|
$description = sanitizeInput($_POST['description']);
|
||||||
@@ -145,8 +141,6 @@ if (isset($_POST['edit_vendor_template'])) {
|
|||||||
|
|
||||||
if (isset($_GET['delete_vendor_template'])) {
|
if (isset($_GET['delete_vendor_template'])) {
|
||||||
|
|
||||||
validateCSRFToken($_GET['csrf_token']);
|
|
||||||
|
|
||||||
$vendor_template_id = intval($_GET['delete_vendor_template']);
|
$vendor_template_id = intval($_GET['delete_vendor_template']);
|
||||||
|
|
||||||
$vendor_template_name = sanitizeInput(getFieldById('vendor_templates', $vendor_template_id, 'vendor_template_name'));
|
$vendor_template_name = sanitizeInput(getFieldById('vendor_templates', $vendor_template_id, 'vendor_template_name'));
|
||||||
|
|||||||
@@ -87,16 +87,16 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<a class="text-dark" href="project_template_details.php?project_template_id=<?= $project_template_id ?>">
|
<a class="text-dark ajax-modal" href="#" data-modal-url="modals/project_template/project_template_edit.php?project_template_id=<?= $project_template_id ?>">
|
||||||
<div class="media">
|
<div class="media">
|
||||||
<i class="fa fa-fw fa-2x fa-project-diagram mr-3"></i>
|
<i class="fa fa-fw fa-2x fa-project-diagram mr-3"></i>
|
||||||
<div class="media-body">
|
<div class="media-body">
|
||||||
<div>
|
<div>
|
||||||
<?= $project_template_name ?>
|
<a href="project_template_details.php?project_template_id=<?php echo $project_template_id; ?>">
|
||||||
</div>
|
<?php echo $project_template_name; ?>
|
||||||
<div>
|
</a>
|
||||||
<small class="text-secondary"><?= $project_template_description ?></small>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div><small class="text-secondary"><?php echo $project_template_description; ?></small></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
@@ -114,7 +114,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
</a>
|
</a>
|
||||||
<?php if($session_user_role == 3) { ?>
|
<?php if($session_user_role == 3) { ?>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-danger text-bold confirm-link" href="post.php?delete_project_template=<?php echo $project_template_id; ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<a class="dropdown-item text-danger text-bold confirm-link" href="post.php?delete_project_template=<?php echo $project_template_id; ?>">
|
||||||
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|||||||
@@ -104,13 +104,13 @@ if (isset($_GET['project_template_id'])) {
|
|||||||
</a>
|
</a>
|
||||||
<?php if ($session_user_role == 3) { ?>
|
<?php if ($session_user_role == 3) { ?>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-danger text-bold confirm-link" href="post.php?archive_project_template=<?php echo $project_template_id; ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<a class="dropdown-item text-danger text-bold confirm-link" href="post.php?archive_project_template=<?php echo $project_template_id; ?>">
|
||||||
<i class="fas fa-fw fa-archive mr-2"></i>Archive (not yet implemented)
|
<i class="fas fa-fw fa-archive mr-2"></i>Archive (not yet implemented)
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if ($session_user_role == 3) { ?>
|
<?php if ($session_user_role == 3) { ?>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-danger confirm-link" href="post.php?delete_project_template=<?php echo $project_template_id; ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<a class="dropdown-item text-danger confirm-link" href="post.php?delete_project_template=<?php echo $project_template_id; ?>">
|
||||||
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
@@ -130,9 +130,10 @@ if (isset($_GET['project_template_id'])) {
|
|||||||
|
|
||||||
<h5 class="text-secondary"><i class="fa fa-fw fa-life-ring mr-2"></i>Project Ticket Templates</h5>
|
<h5 class="text-secondary"><i class="fa fa-fw fa-life-ring mr-2"></i>Project Ticket Templates</h5>
|
||||||
<div class="table-responsive-sm">
|
<div class="table-responsive-sm">
|
||||||
<table class="table table-striped table-borderless table-hover" id="ticket_templates">
|
<table class="table table-striped table-borderless table-hover">
|
||||||
<thead class="text-dark">
|
<thead class="text-dark">
|
||||||
<tr>
|
<tr>
|
||||||
|
<th>Order</th>
|
||||||
<th>Template Name</th>
|
<th>Template Name</th>
|
||||||
<th>Description</th>
|
<th>Description</th>
|
||||||
<th>Ticket Subject</th>
|
<th>Ticket Subject</th>
|
||||||
@@ -153,9 +154,16 @@ if (isset($_GET['project_template_id'])) {
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<tr data-task-id="<?php echo $ticket_template_id; ?>">
|
<tr>
|
||||||
|
<td class="pr-0">
|
||||||
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
|
<input type="hidden" name="edit_ticket_template_order">
|
||||||
|
<input type="hidden" name="project_template_id" value="<?php echo $project_template_id; ?>">
|
||||||
|
<input type="hidden" name="ticket_template_id" value="<?php echo $ticket_template_id; ?>">
|
||||||
|
<input type="text" class="form-control pr-0" onchange="this.form.submit()" name="order" value="<?php echo $ticket_template_order; ?>">
|
||||||
|
</form>
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="#" class="drag-handle"><i class="fas fa-bars text-muted mr-2"></i></a>
|
|
||||||
<a href="ticket_template_details.php?ticket_template_id=<?php echo $ticket_template_id; ?>">
|
<a href="ticket_template_details.php?ticket_template_id=<?php echo $ticket_template_id; ?>">
|
||||||
<?php echo $ticket_template_name; ?>
|
<?php echo $ticket_template_name; ?>
|
||||||
</a>
|
</a>
|
||||||
@@ -164,7 +172,6 @@ if (isset($_GET['project_template_id'])) {
|
|||||||
<td><?php echo $ticket_template_subject; ?></td>
|
<td><?php echo $ticket_template_subject; ?></td>
|
||||||
<td>
|
<td>
|
||||||
<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="project_template_id" value="<?php echo $project_template_id; ?>">
|
<input type="hidden" name="project_template_id" value="<?php echo $project_template_id; ?>">
|
||||||
<input type="hidden" name="ticket_template_id" value="<?php echo $ticket_template_id; ?>">
|
<input type="hidden" name="ticket_template_id" value="<?php echo $ticket_template_id; ?>">
|
||||||
<button type="submit" class="btn btn-default btn-sm confirm-link"
|
<button type="submit" class="btn btn-default btn-sm confirm-link"
|
||||||
@@ -212,28 +219,6 @@ if (isset($_GET['project_template_id'])) {
|
|||||||
|
|
||||||
</div> <!-- End row -->
|
</div> <!-- End row -->
|
||||||
|
|
||||||
<script src="../plugins/SortableJS/Sortable.min.js"></script>
|
|
||||||
<script>
|
|
||||||
new Sortable(document.querySelector('table#ticket_templates tbody'), {
|
|
||||||
handle: '.drag-handle',
|
|
||||||
animation: 150,
|
|
||||||
onEnd: function (evt) {
|
|
||||||
const rows = document.querySelectorAll('table#ticket_templates tbody tr');
|
|
||||||
const positions = Array.from(rows).map((row, index) => ({
|
|
||||||
id: row.dataset.taskId,
|
|
||||||
order: index
|
|
||||||
}));
|
|
||||||
|
|
||||||
$.post('/agent/ajax.php', {
|
|
||||||
update_project_template_ticket_order: true,
|
|
||||||
csrf_token: '<?= $_SESSION['csrf_token'] ?>',
|
|
||||||
project_template_id: <?php echo $project_template_id; ?>,
|
|
||||||
positions: positions
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ $sql = mysqli_query(
|
|||||||
$num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
$num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
<div class="alert alert-info text-center"><strong>Roles are still in development. Permissions may not be fully enforced.</strong></div>
|
||||||
|
|
||||||
<div class="card card-dark">
|
<div class="card card-dark">
|
||||||
<div class="card-header py-2">
|
<div class="card-header py-2">
|
||||||
@@ -94,15 +95,10 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<a class="<?php if ($role_id !== 3) { ?> ajax-modal" data-modal-url="modals/role/role_edit.php?id=<?= $role_id ?>" <?php } ?> href="#">
|
<a href="#" <?php if ($role_id !== 3) { ?> class="ajax-modal" data-modal-url="modals/role/role_edit.php?id=<?= $role_id ?>" <?php } ?>>
|
||||||
<div class="media">
|
<strong class="text-dark"><?php echo $role_name; ?></strong>
|
||||||
<i class="fas fa-fw fa-2x fa-user-shield text-dark mr-2"></i>
|
|
||||||
<div class="media-body">
|
|
||||||
<div><?= $role_name ?></div>
|
|
||||||
<div><small class="text-secondary"><?= $role_description ?></small></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</a>
|
</a>
|
||||||
|
<div class="text-secondary"><?php echo $role_description; ?></div>
|
||||||
</td>
|
</td>
|
||||||
<td><?php echo $user_names_string; ?></td>
|
<td><?php echo $user_names_string; ?></td>
|
||||||
<td><?php echo $role_admin ? 'Yes' : 'No' ; ?></td>
|
<td><?php echo $role_admin ? 'Yes' : 'No' ; ?></td>
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ $company_initials = nullable_htmlentities(initials($company_name));
|
|||||||
<div class="col-md-3 text-center">
|
<div class="col-md-3 text-center">
|
||||||
<?php if ($company_logo) { ?>
|
<?php if ($company_logo) { ?>
|
||||||
<img class="img-thumbnail" src="<?php echo "../uploads/settings/$company_logo"; ?>">
|
<img class="img-thumbnail" src="<?php echo "../uploads/settings/$company_logo"; ?>">
|
||||||
<a href="post.php?remove_company_logo&csrf_token=<?= $_SESSION['csrf_token'] ?>" class="btn btn-outline-danger btn-block">Remove Logo</a>
|
<a href="post.php?remove_company_logo" class="btn btn-outline-danger btn-block">Remove Logo</a>
|
||||||
<hr>
|
<hr>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|||||||
@@ -260,7 +260,7 @@ require_once "includes/inc_all_admin.php";
|
|||||||
<input type="text" class="form-control" readonly value="<?php echo htmlspecialchars($mail_oauth_callback_uri); ?>">
|
<input type="text" class="form-control" readonly value="<?php echo htmlspecialchars($mail_oauth_callback_uri); ?>">
|
||||||
<div class="input-group-append">
|
<div class="input-group-append">
|
||||||
<button type="submit" name="oauth_connect_microsoft_mail" class="btn btn-outline-primary">
|
<button type="submit" name="oauth_connect_microsoft_mail" class="btn btn-outline-primary">
|
||||||
<i class="fab fa-fw fa-microsoft mr-2"></i>Connect Microsoft 365
|
<i class="fas fa-fw fa-sign-in-alt mr-2"></i>Connect Microsoft 365
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ require_once "includes/inc_all_admin.php";
|
|||||||
|
|
||||||
<button type="submit" name="edit_favicon_settings" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Upload Icon</button>
|
<button type="submit" name="edit_favicon_settings" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Upload Icon</button>
|
||||||
<?php if(file_exists("../uploads/favicon.ico")) { ?>
|
<?php if(file_exists("../uploads/favicon.ico")) { ?>
|
||||||
<a href="post.php?reset_favicon&csrf_token=<?= $_SESSION['csrf_token'] ?>" class="btn btn-outline-danger"><i class="fas fa-redo-alt mr-2"></i>Reset Favicon</a>
|
<a href="post.php?reset_favicon" class="btn btn-outline-danger"><i class="fas fa-redo-alt mr-2"></i>Reset Favicon</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ require_once "includes/inc_all_admin.php";
|
|||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-clock"></i></span>
|
<span class="input-group-text"><i class="fa fa-fw fa-clock"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<input type="number" min="24" class="form-control" name="config_ticket_autoclose_hours" placeholder="Delay in hours before a resolved ticket is fully closed" value="<?php echo intval($config_ticket_autoclose_hours); ?>">
|
<input type="number" min="72" class="form-control" name="config_ticket_autoclose_hours" placeholder="Delay in hours before a resolved ticket is fully closed" value="<?php echo intval($config_ticket_autoclose_hours); ?>">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
</a>
|
</a>
|
||||||
<?php if($session_user_role == 3) { ?>
|
<?php if($session_user_role == 3) { ?>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-danger text-bold confirm-link" href="post.php?delete_software_template=<?php echo $software_template_id; ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<a class="dropdown-item text-danger text-bold confirm-link" href="post.php?delete_software_template=<?php echo $software_template_id; ?>">
|
||||||
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<i class="fas fa-fw fa-edit mr-2"></i>Edit
|
<i class="fas fa-fw fa-edit mr-2"></i>Edit
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-danger text-bold confirm-link" href="post.php?delete_tag=<?php echo $tag_id; ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<a class="dropdown-item text-danger text-bold confirm-link" href="post.php?delete_tag=<?php echo $tag_id; ?>">
|
||||||
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<i class="fas fa-ellipsis-h"></i>
|
<i class="fas fa-ellipsis-h"></i>
|
||||||
</button>
|
</button>
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
<a class="dropdown-item text-danger text-bold confirm-link" href="post.php?delete_ticket_template=<?= $ticket_template_id ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<a class="dropdown-item text-danger text-bold confirm-link" href="post.php?delete_ticket_template=<?= $ticket_template_id ?>">
|
||||||
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -51,17 +51,26 @@ $sql_task_templates = mysqli_query($mysqli, "SELECT * FROM task_templates WHERE
|
|||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-9">
|
<div class="col-9">
|
||||||
|
|
||||||
<div class="card card-dark">
|
<div class="card card-dark">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<h3 class="card-title mt-1"><?php echo $ticket_template_name; ?></h3>
|
<h3 class="card-title mt-2">
|
||||||
|
<div class="media">
|
||||||
|
<i class="fa fa-fw fa-2x fa-life-ring mr-3"></i>
|
||||||
|
<div class="media-body">
|
||||||
|
<h3 class="mb-0"><?php echo $ticket_template_name; ?></h3>
|
||||||
|
<div><small class="text-secondary"><?php //echo $ticket_template_description; ?></small></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</h3>
|
||||||
<div class="card-tools">
|
<div class="card-tools">
|
||||||
<button type="button" class="btn btn-tool btn-sm" data-toggle="modal" data-target="#editTicketTemplateModal">
|
<button type="button" class="btn btn-default btn-sm" data-toggle="modal" data-target="#editTicketTemplateModal">
|
||||||
<i class="fas fa-edit"></i>
|
<i class="fas fa-edit"></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<h5><?php echo $ticket_template_subject; ?></h5>
|
||||||
<div class="card-body prettyContent">
|
<div class="card-body prettyContent">
|
||||||
<?php echo $ticket_template_details; ?>
|
<?php echo $ticket_template_details; ?>
|
||||||
</div>
|
</div>
|
||||||
@@ -69,7 +78,7 @@ $sql_task_templates = mysqli_query($mysqli, "SELECT * FROM task_templates WHERE
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-3">
|
<div class="col-3">
|
||||||
|
|
||||||
<div class="card card-dark">
|
<div class="card card-dark">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
@@ -77,7 +86,6 @@ $sql_task_templates = mysqli_query($mysqli, "SELECT * FROM task_templates WHERE
|
|||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<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="ticket_template_id" value="<?php echo $ticket_template_id; ?>">
|
<input type="hidden" name="ticket_template_id" value="<?php echo $ticket_template_id; ?>">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="input-group input-group-sm">
|
<div class="input-group input-group-sm">
|
||||||
@@ -146,9 +154,8 @@ new Sortable(document.querySelector('table#tasks tbody'), {
|
|||||||
order: index
|
order: index
|
||||||
}));
|
}));
|
||||||
|
|
||||||
$.post('/agent/ajax.php', {
|
$.post('ajax.php', {
|
||||||
update_task_templates_order: true,
|
update_task_templates_order: true,
|
||||||
csrf_token: '<?= $_SESSION['csrf_token'] ?>',
|
|
||||||
ticket_template_id: <?php echo $ticket_template_id; ?>,
|
ticket_template_id: <?php echo $ticket_template_id; ?>,
|
||||||
positions: positions
|
positions: positions
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
</a>
|
</a>
|
||||||
<?php if ($session_user_role == 3) { ?>
|
<?php if ($session_user_role == 3) { ?>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-danger text-bold confirm-link" href="post.php?delete_vendor_template=<?= $vendor_template_id ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<a class="dropdown-item text-danger text-bold confirm-link" href="post.php?delete_vendor_template=<?= $vendor_template_id ?>">
|
||||||
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|||||||
@@ -41,9 +41,6 @@ if (isset($_GET['certificate_fetch_parse_json_details'])) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_POST['client_set_notes'])) {
|
if (isset($_POST['client_set_notes'])) {
|
||||||
|
|
||||||
validateCSRFToken($_POST['csrf_token']);
|
|
||||||
|
|
||||||
enforceUserPermission('module_client', 2);
|
enforceUserPermission('module_client', 2);
|
||||||
|
|
||||||
$client_id = intval($_POST['client_id']);
|
$client_id = intval($_POST['client_id']);
|
||||||
@@ -58,9 +55,6 @@ if (isset($_POST['client_set_notes'])) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_POST['contact_set_notes'])) {
|
if (isset($_POST['contact_set_notes'])) {
|
||||||
|
|
||||||
validateCSRFToken($_POST['csrf_token']);
|
|
||||||
|
|
||||||
enforceUserPermission('module_client', 2);
|
enforceUserPermission('module_client', 2);
|
||||||
|
|
||||||
$contact_id = intval($_POST['contact_id']);
|
$contact_id = intval($_POST['contact_id']);
|
||||||
@@ -83,9 +77,6 @@ if (isset($_POST['contact_set_notes'])) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_POST['asset_set_notes'])) {
|
if (isset($_POST['asset_set_notes'])) {
|
||||||
|
|
||||||
validateCSRFToken($_POST['csrf_token']);
|
|
||||||
|
|
||||||
enforceUserPermission('module_support', 2);
|
enforceUserPermission('module_support', 2);
|
||||||
|
|
||||||
$asset_id = intval($_POST['asset_id']);
|
$asset_id = intval($_POST['asset_id']);
|
||||||
@@ -152,9 +143,6 @@ if (isset($_GET['ticket_query_views'])) {
|
|||||||
* Generates public/guest links for sharing credentials/docs
|
* Generates public/guest links for sharing credentials/docs
|
||||||
*/
|
*/
|
||||||
if (isset($_GET['share_generate_link'])) {
|
if (isset($_GET['share_generate_link'])) {
|
||||||
|
|
||||||
validateCSRFToken($_GET['csrf_token']);
|
|
||||||
|
|
||||||
enforceUserPermission('module_support', 2);
|
enforceUserPermission('module_support', 2);
|
||||||
|
|
||||||
$item_encrypted_username = ''; // Default empty
|
$item_encrypted_username = ''; // Default empty
|
||||||
@@ -331,7 +319,7 @@ if (isset($_GET['get_client_assets'])) {
|
|||||||
LEFT JOIN contacts ON contact_id = asset_contact_id
|
LEFT JOIN contacts ON contact_id = asset_contact_id
|
||||||
WHERE assets.asset_archived_at IS NULL AND asset_client_id = $client_id
|
WHERE assets.asset_archived_at IS NULL AND asset_client_id = $client_id
|
||||||
$access_permission_query
|
$access_permission_query
|
||||||
ORDER BY asset_favorite DESC, asset_name"
|
ORDER BY asset_important DESC, asset_name"
|
||||||
);
|
);
|
||||||
|
|
||||||
while ($row = mysqli_fetch_assoc($asset_sql)) {
|
while ($row = mysqli_fetch_assoc($asset_sql)) {
|
||||||
@@ -570,9 +558,6 @@ if (isset($_POST['update_kanban_ticket'])) {
|
|||||||
|
|
||||||
if (isset($_POST['update_ticket_tasks_order'])) {
|
if (isset($_POST['update_ticket_tasks_order'])) {
|
||||||
// Update multiple ticket tasks order
|
// Update multiple ticket tasks order
|
||||||
|
|
||||||
validateCSRFToken($_POST['csrf_token']);
|
|
||||||
|
|
||||||
enforceUserPermission('module_support', 2);
|
enforceUserPermission('module_support', 2);
|
||||||
|
|
||||||
$positions = $_POST['positions'];
|
$positions = $_POST['positions'];
|
||||||
@@ -592,9 +577,6 @@ if (isset($_POST['update_ticket_tasks_order'])) {
|
|||||||
|
|
||||||
if (isset($_POST['update_task_templates_order'])) {
|
if (isset($_POST['update_task_templates_order'])) {
|
||||||
// Update multiple task templates order
|
// Update multiple task templates order
|
||||||
|
|
||||||
validateCSRFToken($_POST['csrf_token']);
|
|
||||||
|
|
||||||
enforceUserPermission('module_support', 2);
|
enforceUserPermission('module_support', 2);
|
||||||
|
|
||||||
$positions = $_POST['positions'];
|
$positions = $_POST['positions'];
|
||||||
@@ -612,32 +594,8 @@ if (isset($_POST['update_task_templates_order'])) {
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_POST['update_project_template_ticket_order'])) {
|
|
||||||
|
|
||||||
validateCSRFToken($_POST['csrf_token']);
|
|
||||||
|
|
||||||
enforceUserPermission('module_support', 2);
|
|
||||||
|
|
||||||
$positions = $_POST['positions'];
|
|
||||||
$project_template_id = intval($_POST['project_template_id']);
|
|
||||||
|
|
||||||
foreach ($positions as $position) {
|
|
||||||
$id = intval($position['id']);
|
|
||||||
$order = intval($position['order']);
|
|
||||||
|
|
||||||
mysqli_query($mysqli, "UPDATE project_template_ticket_templates SET ticket_template_order = $order WHERE project_template_id = $project_template_id AND ticket_template_id = $id");
|
|
||||||
}
|
|
||||||
|
|
||||||
// return a response
|
|
||||||
echo json_encode(['status' => 'success']);
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($_POST['update_quote_items_order'])) {
|
if (isset($_POST['update_quote_items_order'])) {
|
||||||
// Update multiple quote items order
|
// Update multiple quote items order
|
||||||
|
|
||||||
validateCSRFToken($_POST['csrf_token']);
|
|
||||||
|
|
||||||
enforceUserPermission('module_sales', 2);
|
enforceUserPermission('module_sales', 2);
|
||||||
|
|
||||||
$positions = $_POST['positions'];
|
$positions = $_POST['positions'];
|
||||||
@@ -647,7 +605,7 @@ if (isset($_POST['update_quote_items_order'])) {
|
|||||||
$id = intval($position['id']);
|
$id = intval($position['id']);
|
||||||
$order = intval($position['order']);
|
$order = intval($position['order']);
|
||||||
|
|
||||||
mysqli_query($mysqli, "UPDATE quote_items SET item_order = $order WHERE item_quote_id = $quote_id AND item_id = $id");
|
mysqli_query($mysqli, "UPDATE invoice_items SET item_order = $order WHERE item_quote_id = $quote_id AND item_id = $id");
|
||||||
}
|
}
|
||||||
|
|
||||||
// return a response
|
// return a response
|
||||||
@@ -657,9 +615,6 @@ if (isset($_POST['update_quote_items_order'])) {
|
|||||||
|
|
||||||
if (isset($_POST['update_invoice_items_order'])) {
|
if (isset($_POST['update_invoice_items_order'])) {
|
||||||
// Update multiple invoice items order
|
// Update multiple invoice items order
|
||||||
|
|
||||||
validateCSRFToken($_POST['csrf_token']);
|
|
||||||
|
|
||||||
enforceUserPermission('module_sales', 2);
|
enforceUserPermission('module_sales', 2);
|
||||||
|
|
||||||
$positions = $_POST['positions'];
|
$positions = $_POST['positions'];
|
||||||
@@ -679,9 +634,6 @@ if (isset($_POST['update_invoice_items_order'])) {
|
|||||||
|
|
||||||
if (isset($_POST['update_recurring_invoice_items_order'])) {
|
if (isset($_POST['update_recurring_invoice_items_order'])) {
|
||||||
// Update multiple recurring invoice items order
|
// Update multiple recurring invoice items order
|
||||||
|
|
||||||
validateCSRFToken($_POST['csrf_token']);
|
|
||||||
|
|
||||||
enforceUserPermission('module_sales', 2);
|
enforceUserPermission('module_sales', 2);
|
||||||
|
|
||||||
$positions = $_POST['positions'];
|
$positions = $_POST['positions'];
|
||||||
@@ -691,7 +643,7 @@ if (isset($_POST['update_recurring_invoice_items_order'])) {
|
|||||||
$id = intval($position['id']);
|
$id = intval($position['id']);
|
||||||
$order = intval($position['order']);
|
$order = intval($position['order']);
|
||||||
|
|
||||||
mysqli_query($mysqli, "UPDATE recurring_invoice_items SET item_order = $order WHERE item_recurring_invoice_id = $recurring_invoice_id AND item_id = $id");
|
mysqli_query($mysqli, "UPDATE invoice_items SET item_order = $order WHERE item_recurring_invoice_id = $recurring_invoice_id AND item_id = $id");
|
||||||
}
|
}
|
||||||
|
|
||||||
// return a response
|
// return a response
|
||||||
|
|||||||
@@ -452,13 +452,13 @@ if (isset($_GET['asset_id'])) {
|
|||||||
|
|
||||||
<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-1"><i class="fa fa-fw fa-ethernet mr-2"></i>Interfaces</h3>
|
<h3 class="card-title mt-2"><i class="fa fa-fw fa-ethernet mr-2"></i>Interfaces</h3>
|
||||||
<div class="card-tools">
|
<div class="card-tools">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<button type="button" class="btn btn-tool ajax-modal" data-modal-url="modals/asset/asset_interface_add.php?&asset_id=<?= $asset_id ?>">
|
<button type="button" class="btn btn-primary ajax-modal" data-modal-url="modals/asset/asset_interface_add.php?&asset_id=<?= $asset_id ?>">
|
||||||
<i class="fas fa-plus mr-2"></i>New Interface
|
<i class="fas fa-plus mr-2"></i>New Interface
|
||||||
</button>
|
</button>
|
||||||
<button type="button" class="btn btn-tool 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="#addMultipleAssetInterfacesModal">
|
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#addMultipleAssetInterfacesModal">
|
||||||
<i class="fa fa-fw fa-check-double mr-2"></i>Add Multiple
|
<i class="fa fa-fw fa-check-double mr-2"></i>Add Multiple
|
||||||
@@ -474,7 +474,7 @@ if (isset($_GET['asset_id'])) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="dropdown ml-2" id="bulkActionButton" hidden>
|
<div class="dropdown ml-2" id="bulkActionButton" hidden>
|
||||||
<button class="btn btn-tool dropdown-toggle" type="button" data-toggle="dropdown">
|
<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>)
|
<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">
|
||||||
@@ -504,22 +504,23 @@ if (isset($_GET['asset_id'])) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
<form id="bulkActions" action="post.php" method="post">
|
<form id="bulkActions" action="post.php" method="post">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<div class="table-responsive-sm">
|
<div class="table-responsive-sm">
|
||||||
<table class="table table-striped table-borderless table-hover table-sm">
|
<table class="table table-striped table-borderless table-hover table-sm">
|
||||||
<thead class="<?php if ($interface_count == 0) { echo "d-none"; } ?>">
|
<thead class="<?php if ($interface_count == 0) { echo "d-none"; } ?>">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="bg-light checkbox-column">
|
<td class="bg-light pr-0">
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input class="form-check-input" id="selectAllCheckbox" type="checkbox" onclick="checkAll(this)" onkeydown="checkAll(this)">
|
<input class="form-check-input" id="selectAllCheckbox" type="checkbox" onclick="checkAll(this)" onkeydown="checkAll(this)">
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<th>Name / Port</th>
|
<th>Name / Port</th>
|
||||||
<th>Type</th>
|
<th>Type</th>
|
||||||
<th>Network</th>
|
|
||||||
<th>IP</th>
|
|
||||||
<th>MAC</th>
|
<th>MAC</th>
|
||||||
|
<th>IP</th>
|
||||||
|
<th>Network</th>
|
||||||
<th>Connected To</th>
|
<th>Connected To</th>
|
||||||
<th class="text-center">Action</th>
|
<th class="text-center">Action</th>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -561,14 +562,14 @@ if (isset($_GET['asset_id'])) {
|
|||||||
$connected_to_display = "<a class='ajax-modal' href='#'
|
$connected_to_display = "<a class='ajax-modal' href='#'
|
||||||
data-modal-size='lg'
|
data-modal-size='lg'
|
||||||
data-modal-url='modals/asset/asset_details.php?id=$connected_asset_id'>
|
data-modal-url='modals/asset/asset_details.php?id=$connected_asset_id'>
|
||||||
<strong><i class='fa fa-fw text-dark fa-$connected_asset_icon mr-1'></i>$connected_asset_name</strong> - $connected_interface_name
|
<strong><i class='fa fa-fw fa-$connected_asset_icon mr-1'></i>$connected_asset_name</strong> - $connected_interface_name
|
||||||
</a>";
|
</a>";
|
||||||
} else {
|
} else {
|
||||||
$connected_to_display = "-";
|
$connected_to_display = "-";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="bg-light checkbox-column">
|
<td class="pr-0 bg-light">
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input class="form-check-input bulk-select" type="checkbox" name="interface_ids[]" value="<?= $interface_id ?>">
|
<input class="form-check-input bulk-select" type="checkbox" name="interface_ids[]" value="<?= $interface_id ?>">
|
||||||
</div>
|
</div>
|
||||||
@@ -581,17 +582,14 @@ if (isset($_GET['asset_id'])) {
|
|||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td><?= $interface_type_display; ?></td>
|
<td><?= $interface_type_display; ?></td>
|
||||||
<td><?= $network_name_display; ?></td>
|
|
||||||
<td>
|
|
||||||
<?= $interface_ip_display; ?>
|
|
||||||
<div><small class="text-secondary"><?= $interface_ipv6 ?></small></div>
|
|
||||||
</td>
|
|
||||||
<td><?= $interface_mac_display; ?></td>
|
<td><?= $interface_mac_display; ?></td>
|
||||||
|
<td><?= $interface_ip_display; ?></td>
|
||||||
|
<td><?= $network_name_display; ?></td>
|
||||||
<td><?= $connected_to_display; ?></td>
|
<td><?= $connected_to_display; ?></td>
|
||||||
<td>
|
<td>
|
||||||
<div class="dropdown dropleft text-center">
|
<div class="dropdown dropleft text-center">
|
||||||
<button class="btn btn-tool btn-sm" type="button" data-toggle="dropdown">
|
<button class="btn btn-secondary btn-sm" type="button" data-toggle="dropdown">
|
||||||
<i class="fas fa-ellipsis-v"></i>
|
<i class="fas fa-ellipsis-h"></i>
|
||||||
</button>
|
</button>
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
<a class="dropdown-item ajax-modal" href="#"
|
<a class="dropdown-item ajax-modal" href="#"
|
||||||
@@ -614,6 +612,7 @@ if (isset($_GET['asset_id'])) {
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="card card-dark <?php if ($credential_count == 0) { echo "d-none"; } ?>">
|
<div class="card card-dark <?php if ($credential_count == 0) { echo "d-none"; } ?>">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
@@ -717,12 +716,12 @@ if (isset($_GET['asset_id'])) {
|
|||||||
<i class="fas fa-fw fa-share-alt mr-2"></i>Share
|
<i class="fas fa-fw fa-share-alt mr-2"></i>Share
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item" href="post.php?unlink_credential_from_asset&asset_id=<?= $asset_id; ?>&credential_id=<?= $credential_id; ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<a class="dropdown-item" href="post.php?unlink_credential_from_asset&asset_id=<?= $asset_id; ?>&credential_id=<?= $credential_id; ?>">
|
||||||
<i class="fas fa-fw fa-unlink mr-2"></i>Unlink
|
<i class="fas fa-fw fa-unlink mr-2"></i>Unlink
|
||||||
</a>
|
</a>
|
||||||
<?php if ($session_user_role == 3) { ?>
|
<?php if ($session_user_role == 3) { ?>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-danger text-bold" href="post.php?delete_credential=<?= $credential_id; ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<a class="dropdown-item text-danger text-bold" href="post.php?delete_credential=<?= $credential_id; ?>">
|
||||||
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
@@ -814,7 +813,7 @@ if (isset($_GET['asset_id'])) {
|
|||||||
<td><?= $software_license_type; ?></td>
|
<td><?= $software_license_type; ?></td>
|
||||||
<td><?= "$seat_count / $software_seats"; ?></td>
|
<td><?= "$seat_count / $software_seats"; ?></td>
|
||||||
<td class="text-center">
|
<td class="text-center">
|
||||||
<a href="post.php?unlink_software_from_asset&asset_id=<?= $asset_id; ?>&software_id=<?= $software_id; ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>" class="btn btn-secondary btn-sm" title="Unlink"><i class="fas fa-fw fa-unlink"></i></a>
|
<a href="post.php?unlink_software_from_asset&asset_id=<?= $asset_id; ?>&software_id=<?= $software_id; ?>" class="btn btn-secondary btn-sm" title="Unlink"><i class="fas fa-fw fa-unlink"></i></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
@@ -880,7 +879,7 @@ if (isset($_GET['asset_id'])) {
|
|||||||
data-modal-url="modals/document/document_view.php?id=<?= $document_id ?>">
|
data-modal-url="modals/document/document_view.php?id=<?= $document_id ?>">
|
||||||
<i class="fas fa-fw fa-eye"></i>
|
<i class="fas fa-fw fa-eye"></i>
|
||||||
</a>
|
</a>
|
||||||
<a href="post.php?unlink_asset_from_document&asset_id=<?= $asset_id; ?>&document_id=<?= $document_id; ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>" class="btn btn-secondary btn-sm" title="Unlink"><i class="fas fa-fw fa-unlink"></i></a>
|
<a href="post.php?unlink_asset_from_document&asset_id=<?= $asset_id; ?>&document_id=<?= $document_id; ?>" class="btn btn-secondary btn-sm" title="Unlink"><i class="fas fa-fw fa-unlink"></i></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
@@ -971,7 +970,7 @@ if (isset($_GET['asset_id'])) {
|
|||||||
<td><a class="text-dark" href="<?= "../uploads/clients/$client_id/$file_reference_name"; ?>" target="_blank" ><?= "$file_name<br><span class='text-secondary'>$file_description</span>"; ?></a></td>
|
<td><a class="text-dark" href="<?= "../uploads/clients/$client_id/$file_reference_name"; ?>" target="_blank" ><?= "$file_name<br><span class='text-secondary'>$file_description</span>"; ?></a></td>
|
||||||
<td><?= $file_created_at; ?></td>
|
<td><?= $file_created_at; ?></td>
|
||||||
<td class="text-center">
|
<td class="text-center">
|
||||||
<a href="post.php?unlink_asset_from_file&asset_id=<?= $asset_id; ?>&file_id=<?= $file_id; ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>" class="btn btn-secondary btn-sm" title="Unlink"><i class="fas fa-fw fa-unlink"></i></a>
|
<a href="post.php?unlink_asset_from_file&asset_id=<?= $asset_id; ?>&file_id=<?= $file_id; ?>" class="btn btn-secondary btn-sm" title="Unlink"><i class="fas fa-fw fa-unlink"></i></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
@@ -1194,7 +1193,7 @@ if (isset($_GET['asset_id'])) {
|
|||||||
<td><?= $service_category; ?></td>
|
<td><?= $service_category; ?></td>
|
||||||
<td><?= $service_importance; ?></td>
|
<td><?= $service_importance; ?></td>
|
||||||
<td class="text-center">
|
<td class="text-center">
|
||||||
<a href="post.php?unlink_service_from_asset&asset_id=<?= $asset_id; ?>&service_id=<?= $service_id; ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>" class="btn btn-secondary btn-sm" title="Unlink"><i class="fas fa-fw fa-unlink"></i></a>
|
<a href="post.php?unlink_service_from_asset&asset_id=<?= $asset_id; ?>&service_id=<?= $service_id; ?>" class="btn btn-secondary btn-sm" title="Unlink"><i class="fas fa-fw fa-unlink"></i></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
@@ -1231,7 +1230,6 @@ if (isset($_GET['asset_id'])) {
|
|||||||
"ajax.php",
|
"ajax.php",
|
||||||
{
|
{
|
||||||
asset_set_notes: 'TRUE',
|
asset_set_notes: 'TRUE',
|
||||||
csrf_token: '<?= $_SESSION['csrf_token'] ?>',
|
|
||||||
asset_id: asset_id,
|
asset_id: asset_id,
|
||||||
notes: notes
|
notes: notes
|
||||||
}
|
}
|
||||||
|
|||||||
150
agent/assets.php
150
agent/assets.php
@@ -319,6 +319,9 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<option
|
<option
|
||||||
<?php if (isset($_GET['show_column']) && is_array($_GET['show_column']) && in_array('Mac_Address', $_GET['show_column'])) { echo 'selected'; } ?>>Mac_Address
|
<?php if (isset($_GET['show_column']) && is_array($_GET['show_column']) && in_array('Mac_Address', $_GET['show_column'])) { echo 'selected'; } ?>>Mac_Address
|
||||||
</option>
|
</option>
|
||||||
|
<option
|
||||||
|
<?php if (isset($_GET['show_column']) && is_array($_GET['show_column']) && in_array('OS', $_GET['show_column'])) { echo 'selected'; } ?>>OS
|
||||||
|
</option>
|
||||||
<option
|
<option
|
||||||
<?php if (isset($_GET['show_column']) && is_array($_GET['show_column']) && in_array('Purchase_Date', $_GET['show_column'])) { echo 'selected'; } ?>>Purchase_Date
|
<?php if (isset($_GET['show_column']) && is_array($_GET['show_column']) && in_array('Purchase_Date', $_GET['show_column'])) { echo 'selected'; } ?>>Purchase_Date
|
||||||
</option>
|
</option>
|
||||||
@@ -399,8 +402,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<?php if ($archived) { ?>
|
<?php if ($archived) { ?>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<button class="dropdown-item text-info"
|
<button class="dropdown-item text-info"
|
||||||
type="submit" form="bulkActions" name="bulk_restore_assets">
|
type="submit" form="bulkActions" name="bulk_unarchive_assets">
|
||||||
<i class="fas fa-fw fa-redo mr-2"></i>Restore
|
<i class="fas fa-fw fa-redo mr-2"></i>Unarchive
|
||||||
</button>
|
</button>
|
||||||
<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"
|
||||||
@@ -429,7 +432,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<table class="table border table-hover">
|
<table class="table border table-hover">
|
||||||
<thead class="thead-light <?php if (!$num_rows[0]) { echo "d-none"; } ?> text-nowrap">
|
<thead class="thead-light <?php if (!$num_rows[0]) { echo "d-none"; } ?> text-nowrap">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="bg-light checkbox-column">
|
<td class="bg-light pr-0">
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input class="form-check-input" id="selectAllCheckbox" type="checkbox" onclick="checkAll(this)">
|
<input class="form-check-input" id="selectAllCheckbox" type="checkbox" onclick="checkAll(this)">
|
||||||
</div>
|
</div>
|
||||||
@@ -439,17 +442,33 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
Name <?php if ($sort == 'asset_name') { echo $order_icon; } ?>
|
Name <?php if ($sort == 'asset_name') { echo $order_icon; } ?>
|
||||||
</a>
|
</a>
|
||||||
</th>
|
</th>
|
||||||
|
<?php if ($_GET['type'] !== 'virtual' && $_GET['type'] !== 'server') { ?>
|
||||||
<th>
|
<th>
|
||||||
<a class="text-secondary" href="?<?php echo $url_query_strings_sort; ?>&sort=asset_type&order=<?php echo $disp; ?>">
|
<a class="text-secondary" href="?<?php echo $url_query_strings_sort; ?>&sort=asset_type&order=<?php echo $disp; ?>">
|
||||||
Type <?php if ($sort == 'asset_type') { echo $order_icon; } ?>
|
Type <?php if ($sort == 'asset_type') { echo $order_icon; } ?>
|
||||||
</a>
|
</a>
|
||||||
</th>
|
</th>
|
||||||
|
<?php } ?>
|
||||||
<?php if ($_GET['type'] !== 'virtual') { ?>
|
<?php if ($_GET['type'] !== 'virtual') { ?>
|
||||||
<th>
|
<th>
|
||||||
<a class="text-secondary" href="?<?php echo $url_query_strings_sort; ?>&sort=asset_make&order=<?php echo $disp; ?>">
|
<a class="text-secondary" href="?<?php echo $url_query_strings_sort; ?>&sort=asset_make&order=<?php echo $disp; ?>">
|
||||||
Model <?php if ($sort == 'asset_make') { echo $order_icon; } ?>
|
Model <?php if ($sort == 'asset_make') { echo $order_icon; } ?>
|
||||||
</a>
|
</a>
|
||||||
</th>
|
</th>
|
||||||
|
<th>
|
||||||
|
<a class="text-secondary" href="?<?php echo $url_query_strings_sort; ?>&sort=asset_serial&order=<?php echo $disp; ?>">
|
||||||
|
Serial <?php if ($sort == 'asset_serial') { echo $order_icon; } ?>
|
||||||
|
</a>
|
||||||
|
</th>
|
||||||
|
<?php } ?>
|
||||||
|
<?php if (isset($_GET['show_column']) && is_array($_GET['show_column']) && in_array('OS', $_GET['show_column'])) { ?>
|
||||||
|
<?php if ($_GET['type'] !== 'network' && $_GET['type'] !== 'other') { ?>
|
||||||
|
<th>
|
||||||
|
<a class="text-secondary" href="?<?php echo $url_query_strings_sort; ?>&sort=asset_os&order=<?php echo $disp; ?>">
|
||||||
|
OS <?php if ($sort == 'asset_os') { echo $order_icon; } ?>
|
||||||
|
</a>
|
||||||
|
</th>
|
||||||
|
<?php } ?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<th>
|
<th>
|
||||||
<a class="text-secondary" href="?<?php echo $url_query_strings_sort; ?>&sort=interface_ip&order=<?php echo $disp; ?>">
|
<a class="text-secondary" href="?<?php echo $url_query_strings_sort; ?>&sort=interface_ip&order=<?php echo $disp; ?>">
|
||||||
@@ -531,12 +550,22 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
$asset_model = nullable_htmlentities($row['asset_model']);
|
$asset_model = nullable_htmlentities($row['asset_model']);
|
||||||
$asset_serial = nullable_htmlentities($row['asset_serial']);
|
$asset_serial = nullable_htmlentities($row['asset_serial']);
|
||||||
if ($asset_serial) {
|
if ($asset_serial) {
|
||||||
$asset_serial_display = "<span class='text-monospace'>$asset_serial</span>";
|
$asset_serial_display = $asset_serial;
|
||||||
} else {
|
} else {
|
||||||
$asset_serial_display = "-";
|
$asset_serial_display = "-";
|
||||||
}
|
}
|
||||||
$asset_os = nullable_htmlentities($row['asset_os']);
|
$asset_os = nullable_htmlentities($row['asset_os']);
|
||||||
$asset_ip = getFallBack(nullable_htmlentities($row['interface_ip']));
|
if ($asset_os) {
|
||||||
|
$asset_os_display = $asset_os;
|
||||||
|
} else {
|
||||||
|
$asset_os_display = "-";
|
||||||
|
}
|
||||||
|
$asset_ip = nullable_htmlentities($row['interface_ip']);
|
||||||
|
if ($asset_ip) {
|
||||||
|
$asset_ip_display = $asset_ip;
|
||||||
|
} else {
|
||||||
|
$asset_ip_display = "-";
|
||||||
|
}
|
||||||
$asset_ipv6 = nullable_htmlentities($row['interface_ipv6']);
|
$asset_ipv6 = nullable_htmlentities($row['interface_ipv6']);
|
||||||
$asset_nat_ip = nullable_htmlentities($row['interface_nat_ip']);
|
$asset_nat_ip = nullable_htmlentities($row['interface_nat_ip']);
|
||||||
$asset_mac = nullable_htmlentities(getFallBack($row['interface_mac']));
|
$asset_mac = nullable_htmlentities(getFallBack($row['interface_mac']));
|
||||||
@@ -626,13 +655,13 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
}
|
}
|
||||||
|
|
||||||
$asset_tag_id_array[] = $asset_tag_id;
|
$asset_tag_id_array[] = $asset_tag_id;
|
||||||
$asset_tag_name_display_array[] = "<a href='assets.php?$client_url tags[]=$asset_tag_id'><span class='badge text-light p-1 mr-1' style='background-color: $asset_tag_color;'><i class='fa fa-fw fa-$asset_tag_icon mr-1'></i>$asset_tag_name</span></a>";
|
$asset_tag_name_display_array[] = "<a href='assets.php?$client_url tags[]=$asset_tag_id'><span class='badge text-light p-1 mr-1' style='background-color: $asset_tag_color;'><i class='fa fa-fw fa-$asset_tag_icon mr-2'></i>$asset_tag_name</span></a>";
|
||||||
}
|
}
|
||||||
$asset_tags_display = implode('', $asset_tag_name_display_array);
|
$asset_tags_display = implode('', $asset_tag_name_display_array);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="bg-light checkbox-column">
|
<td class="pr-0 bg-light">
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input class="form-check-input bulk-select" type="checkbox" name="asset_ids[]" value="<?= $asset_id ?>">
|
<input class="form-check-input bulk-select" type="checkbox" name="asset_ids[]" value="<?= $asset_id ?>">
|
||||||
</div>
|
</div>
|
||||||
@@ -642,24 +671,68 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<div class="media">
|
<div class="media">
|
||||||
<i class="fa fa-fw fa-2x fa-<?= $device_icon ?> mr-3 mt-1"></i>
|
<i class="fa fa-fw fa-2x fa-<?= $device_icon ?> mr-3 mt-1"></i>
|
||||||
<div class="media-body">
|
<div class="media-body">
|
||||||
<div>
|
<div><?= $asset_name ?> <?php if ($asset_favorite) { echo "<i class='fas fa-fw fa-star text-warning' title='Favorite'></i>"; } ?></div>
|
||||||
<?= $asset_name ?>
|
|
||||||
|
|
||||||
<?php if ($asset_favorite) { echo "<i class='fas fa-fw fa-star text-warning' title='Favorite'></i>"; } ?></div>
|
|
||||||
<div><small class="text-secondary"><?= $asset_description ?></small></div>
|
<div><small class="text-secondary"><?= $asset_description ?></small></div>
|
||||||
<?php if ($asset_tags_display) { echo $asset_tags_display; } ?>
|
<?php
|
||||||
|
if ($asset_tags_display) { ?>
|
||||||
|
<div class="mt-1">
|
||||||
|
<?= $asset_tags_display ?>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
|
<?php if ($_GET['type'] !== 'virtual' && $_GET['type'] !== 'server') { ?>
|
||||||
|
<td><?php echo $asset_type; ?></td>
|
||||||
|
<?php } ?>
|
||||||
|
<?php if ($_GET['type'] !== 'virtual') { ?>
|
||||||
<td>
|
<td>
|
||||||
<div>
|
<?php echo $asset_make; ?>
|
||||||
<?= $asset_type ?>
|
<div class="mt-0">
|
||||||
|
<small class="text-muted"><?php echo $asset_model; ?></small>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<?php } ?>
|
||||||
|
<?php if ($_GET['type'] !== 'virtual') { ?>
|
||||||
|
<td><?php echo $asset_serial_display; ?></td>
|
||||||
|
<?php } ?>
|
||||||
|
<?php if (isset($_GET['show_column']) && is_array($_GET['show_column']) && in_array('OS', $_GET['show_column'])) { ?>
|
||||||
|
<?php if ($_GET['type'] !== 'network' && $_GET['type'] !== 'other') { ?>
|
||||||
|
<td><?php echo $asset_os_display; ?></td>
|
||||||
|
<?php } ?>
|
||||||
|
<?php } ?>
|
||||||
|
<td><?php echo $asset_ip_display; ?></td>
|
||||||
|
<?php if (isset($_GET['show_column']) && is_array($_GET['show_column']) && in_array('Mac_Address', $_GET['show_column'])) { ?>
|
||||||
|
<td><?php echo $asset_mac; ?></td>
|
||||||
|
<?php } ?>
|
||||||
|
<?php if (isset($_GET['show_column']) && is_array($_GET['show_column']) && in_array('Purchase_Date', $_GET['show_column'])) { ?>
|
||||||
|
<td><?php echo $asset_purchase_date_display; ?></td>
|
||||||
|
<?php } ?>
|
||||||
|
<?php if (isset($_GET['show_column']) && is_array($_GET['show_column']) && in_array('Install_Date', $_GET['show_column'])) { ?>
|
||||||
|
<td><?php echo $asset_install_date_display; ?></td>
|
||||||
|
<?php } ?>
|
||||||
|
<?php if (isset($_GET['show_column']) && is_array($_GET['show_column']) && in_array('Warranty_Expire', $_GET['show_column'])) { ?>
|
||||||
|
<td><?php echo $asset_warranty_expire_display; ?></td>
|
||||||
|
<?php } ?>
|
||||||
|
<?php if ($_GET['type'] !== 'network' && $_GET['type'] !== 'other' && $_GET['type'] !== 'server') { ?>
|
||||||
|
<td><?php echo $contact_name_display; ?></td>
|
||||||
|
<?php } ?>
|
||||||
|
<td>
|
||||||
|
<?php echo $location_name_display; ?>
|
||||||
|
<?php echo $asset_physical_location_display; ?>
|
||||||
|
</td>
|
||||||
|
<td><?php echo $asset_status; ?></td>
|
||||||
|
<?php if (!$client_url) { ?>
|
||||||
|
<td><a href="assets.php?client_id=<?php echo $client_id; ?>"><?php echo $client_name; ?></a></td>
|
||||||
|
<?php } ?>
|
||||||
|
<td class="text-center">
|
||||||
|
<div class="btn-group">
|
||||||
<?php if ( !empty($asset_uri) || !empty($asset_uri_2) || !empty($asset_uri_client)) { ?>
|
<?php if ( !empty($asset_uri) || !empty($asset_uri_2) || !empty($asset_uri_client)) { ?>
|
||||||
<div class="dropdown d-inline">
|
<div class="dropdown dropleft text-center">
|
||||||
<button class="btn btn-tool" type="button" data-toggle="dropdown">
|
<button class="btn btn-default btn-sm" type="button" data-toggle="dropdown">
|
||||||
<i class="fas fa-external-link-alt"></i>
|
<i class="fa fa-fw fa-external-link-alt"></i>
|
||||||
</button>
|
</button>
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
<?php if ($asset_uri) { ?>
|
<?php if ($asset_uri) { ?>
|
||||||
@@ -682,45 +755,6 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div>
|
|
||||||
<div><small class="text-secondary"><?= $asset_os ?></small></div>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<?php if ($_GET['type'] !== 'virtual') { ?>
|
|
||||||
<td>
|
|
||||||
<div><?php echo "$asset_make $asset_model"; ?></div>
|
|
||||||
<div><small class="text-secondary"><?php echo $asset_serial_display; ?></small></div>
|
|
||||||
</td>
|
|
||||||
<?php } ?>
|
|
||||||
<td>
|
|
||||||
<?php echo $asset_ip; ?>
|
|
||||||
<div class="text-secondary"><small><?php echo $asset_ipv6; ?></small></div>
|
|
||||||
</td>
|
|
||||||
<?php if (isset($_GET['show_column']) && is_array($_GET['show_column']) && in_array('Mac_Address', $_GET['show_column'])) { ?>
|
|
||||||
<td><?php echo $asset_mac; ?></td>
|
|
||||||
<?php } ?>
|
|
||||||
<?php if (isset($_GET['show_column']) && is_array($_GET['show_column']) && in_array('Purchase_Date', $_GET['show_column'])) { ?>
|
|
||||||
<td><?php echo $asset_purchase_date_display; ?></td>
|
|
||||||
<?php } ?>
|
|
||||||
<?php if (isset($_GET['show_column']) && is_array($_GET['show_column']) && in_array('Install_Date', $_GET['show_column'])) { ?>
|
|
||||||
<td><?php echo $asset_install_date_display; ?></td>
|
|
||||||
<?php } ?>
|
|
||||||
<?php if (isset($_GET['show_column']) && is_array($_GET['show_column']) && in_array('Warranty_Expire', $_GET['show_column'])) { ?>
|
|
||||||
<td><?php echo $asset_warranty_expire_display; ?></td>
|
|
||||||
<?php } ?>
|
|
||||||
<?php if ($_GET['type'] !== 'network' && $_GET['type'] !== 'other' && $_GET['type'] !== 'server') { ?>
|
|
||||||
<td><?php echo $contact_name_display; ?></td>
|
|
||||||
<?php } ?>
|
|
||||||
<td>
|
|
||||||
<div><?php echo $location_name_display; ?></div>
|
|
||||||
<div><small><?php echo $asset_physical_location_display; ?></small></div>
|
|
||||||
</td>
|
|
||||||
<td><span class="badge badge-pill badge-secondary p-2"><?php echo $asset_status; ?></span></td>
|
|
||||||
<?php if (!$client_url) { ?>
|
|
||||||
<td><a href="assets.php?client_id=<?php echo $client_id; ?>"><?php echo $client_name; ?></a></td>
|
|
||||||
<?php } ?>
|
|
||||||
<td class="text-center">
|
|
||||||
<div class="btn-group">
|
|
||||||
<div class="dropdown dropleft text-center">
|
<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>
|
<button class="btn btn-secondary btn-sm" type="button" data-toggle="dropdown"><i class="fas fa-ellipsis-h"></i></button>
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
@@ -732,8 +766,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
</a>
|
</a>
|
||||||
<?php if ($session_user_role > 2) { ?>
|
<?php if ($session_user_role > 2) { ?>
|
||||||
<?php if ($asset_archived_at) { ?>
|
<?php if ($asset_archived_at) { ?>
|
||||||
<a class="dropdown-item text-info" href="post.php?restore_asset=<?php echo $asset_id; ?>&csrf_token=<?php echo $_SESSION['csrf_token'] ?>">
|
<a class="dropdown-item text-info" href="post.php?unarchive_asset=<?php echo $asset_id; ?>&csrf_token=<?php echo $_SESSION['csrf_token'] ?>">
|
||||||
<i class="fas fa-fw fa-redo mr-2"></i>Restore
|
<i class="fas fa-fw fa-redo mr-2"></i>Unarchive
|
||||||
</a>
|
</a>
|
||||||
<a class="dropdown-item text-danger text-bold confirm-link" href="post.php?delete_asset=<?php echo $asset_id; ?>&csrf_token=<?php echo $_SESSION['csrf_token'] ?>">
|
<a class="dropdown-item text-danger text-bold confirm-link" href="post.php?delete_asset=<?php echo $asset_id; ?>&csrf_token=<?php echo $_SESSION['csrf_token'] ?>">
|
||||||
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
||||||
|
|||||||
0
agent/blank.php
Normal file
0
agent/blank.php
Normal file
@@ -30,13 +30,15 @@ if (isset($_GET['calendar_id'])) {
|
|||||||
|
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header bg-dark">
|
<div class="card-header py-2">
|
||||||
<h3 class="card-title">Calendars</h3>
|
<h3 class="card-title mt-1">Calendars</h3>
|
||||||
<div class="card-tools">
|
<div class="card-tools">
|
||||||
<button type="button" class="btn btn-tool ajax-modal" data-modal-url="modals/calendar/calendar_add.php"><i class="fas fa-plus" title="New Calendar"></i></button>
|
<button type="button" class="btn btn-dark btn-sm ajax-modal" data-modal-url="modals/calendar/calendar_add.php"><i class="fas fa-plus"></i></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
|
|
||||||
|
<form>
|
||||||
<?php
|
<?php
|
||||||
$sql = mysqli_query($mysqli, "SELECT * FROM calendars");
|
$sql = mysqli_query($mysqli, "SELECT * FROM calendars");
|
||||||
while ($row = mysqli_fetch_assoc($sql)) {
|
while ($row = mysqli_fetch_assoc($sql)) {
|
||||||
@@ -44,70 +46,27 @@ if (isset($_GET['calendar_id'])) {
|
|||||||
$calendar_name = nullable_htmlentities($row['calendar_name']);
|
$calendar_name = nullable_htmlentities($row['calendar_name']);
|
||||||
$calendar_color = nullable_htmlentities($row['calendar_color']);
|
$calendar_color = nullable_htmlentities($row['calendar_color']);
|
||||||
?>
|
?>
|
||||||
<div class="form-group d-flex align-items-center">
|
<div class="form-group">
|
||||||
<i class="fas fa-fw fa-circle mr-2" style="color:<?= $calendar_color ?>;"></i><?= $calendar_name ?>
|
<i class="fas fa-fw fa-circle mr-2" style="color:<?php echo $calendar_color; ?>;"></i><?php echo $calendar_name; ?>
|
||||||
|
<button type="button" class="btn btn-link btn-sm float-right ajax-modal"
|
||||||
<div class="dropdown dropright ml-auto">
|
|
||||||
<button class="btn btn-tool" 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/calendar/calendar_edit.php?id=<?= $calendar_id ?>">
|
data-modal-url="modals/calendar/calendar_edit.php?id=<?= $calendar_id ?>">
|
||||||
<i class="fas fa-fw fa-pencil-alt mr-2"></i>Rename
|
<i class="fas fa-fw fa-pencil-alt text-secondary"></i>
|
||||||
</a>
|
</button>
|
||||||
<?php if ($session_user_role == 3) { ?>
|
|
||||||
<div class="dropdown-divider"></div>
|
|
||||||
<a class="dropdown-item text-danger text-bold confirm-link" href="post.php?delete_calendar=<?= $calendar_id ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
|
||||||
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
|
||||||
</a>
|
|
||||||
<?php } ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header bg-dark">
|
<div class="card-header py-2">
|
||||||
<h3 class="card-title">Built-in</h3>
|
<h3 class="card-title mt-1">System Calendars</h3>
|
||||||
|
<div class="card-tools">
|
||||||
|
<button type="button" class="btn btn-dark btn-sm"><i class="fas fa-eye"></i></button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="form-group">
|
|
||||||
<i class="fas fa-fw fa-circle mr-2" style="color:blue;"></i>Invoices
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<i class="fas fa-fw fa-circle mr-2" style="color:purple;"></i>Quotes
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<i class="fas fa-fw fa-circle mr-2" style="color:red;"></i>Tickets (Created)
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<i class="fas fa-fw fa-circle mr-2" style="color:grey;"></i>Recurring Tickets
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<i class="fas fa-fw fa-circle mr-2" style="color:grey;"></i>Tickets (Scheduled)
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<i class="fas fa-fw fa-circle mr-2" style="color:brown;"></i>Vendors
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php if (!isset($_GET['client_id'])) { ?>
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<i class="fas fa-fw fa-circle mr-2" style="color:brown;"></i>Clients
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -178,10 +137,6 @@ while ($row = mysqli_fetch_assoc($sql)) {
|
|||||||
height: '90vh',
|
height: '90vh',
|
||||||
|
|
||||||
selectMirror: true,
|
selectMirror: true,
|
||||||
eventDidMount: function(info) {
|
|
||||||
// Always show full title when hovering
|
|
||||||
info.el.setAttribute('title', info.event.title);
|
|
||||||
},
|
|
||||||
eventClick: function(editEvent) {
|
eventClick: function(editEvent) {
|
||||||
var eventId = editEvent.event.id;
|
var eventId = editEvent.event.id;
|
||||||
var $link = $('<a>', {
|
var $link = $('<a>', {
|
||||||
@@ -224,7 +179,7 @@ while ($row = mysqli_fetch_assoc($sql)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Invoices Created
|
//Invoices Created
|
||||||
$sql = mysqli_query($mysqli, "SELECT * FROM clients LEFT JOIN invoices ON client_id = invoice_client_id $client_query $access_permission_query");
|
$sql = mysqli_query($mysqli, "SELECT * FROM clients LEFT JOIN invoices ON client_id = invoice_client_id $client_query");
|
||||||
while ($row = mysqli_fetch_assoc($sql)) {
|
while ($row = mysqli_fetch_assoc($sql)) {
|
||||||
$event_id = intval($row['invoice_id']);
|
$event_id = intval($row['invoice_id']);
|
||||||
$scope = strval($row['invoice_scope']);
|
$scope = strval($row['invoice_scope']);
|
||||||
@@ -239,7 +194,7 @@ while ($row = mysqli_fetch_assoc($sql)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Quotes Created
|
//Quotes Created
|
||||||
$sql = mysqli_query($mysqli, "SELECT * FROM clients LEFT JOIN quotes ON client_id = quote_client_id $client_query $access_permission_query");
|
$sql = mysqli_query($mysqli, "SELECT * FROM clients LEFT JOIN quotes ON client_id = quote_client_id $client_query");
|
||||||
while ($row = mysqli_fetch_assoc($sql)) {
|
while ($row = mysqli_fetch_assoc($sql)) {
|
||||||
$event_id = intval($row['quote_id']);
|
$event_id = intval($row['quote_id']);
|
||||||
$event_title = json_encode($row['quote_prefix'] . $row['quote_number'] . " " . $row['quote_scope']);
|
$event_title = json_encode($row['quote_prefix'] . $row['quote_number'] . " " . $row['quote_scope']);
|
||||||
@@ -253,7 +208,7 @@ while ($row = mysqli_fetch_assoc($sql)) {
|
|||||||
LEFT JOIN tickets ON client_id = ticket_client_id
|
LEFT JOIN tickets ON client_id = ticket_client_id
|
||||||
LEFT JOIN ticket_statuses ON ticket_status = ticket_status_id
|
LEFT JOIN ticket_statuses ON ticket_status = ticket_status_id
|
||||||
LEFT JOIN users ON ticket_assigned_to = user_id
|
LEFT JOIN users ON ticket_assigned_to = user_id
|
||||||
$client_query $access_permission_query"
|
$client_query"
|
||||||
);
|
);
|
||||||
while ($row = mysqli_fetch_assoc($sql)) {
|
while ($row = mysqli_fetch_assoc($sql)) {
|
||||||
$event_id = intval($row['ticket_id']);
|
$event_id = intval($row['ticket_id']);
|
||||||
@@ -287,7 +242,7 @@ while ($row = mysqli_fetch_assoc($sql)) {
|
|||||||
$sql = mysqli_query($mysqli, "SELECT * FROM clients
|
$sql = mysqli_query($mysqli, "SELECT * FROM clients
|
||||||
LEFT JOIN recurring_tickets ON client_id = recurring_ticket_client_id
|
LEFT JOIN recurring_tickets ON client_id = recurring_ticket_client_id
|
||||||
LEFT JOIN users ON recurring_ticket_assigned_to = user_id
|
LEFT JOIN users ON recurring_ticket_assigned_to = user_id
|
||||||
$client_query $access_permission_query"
|
$client_query"
|
||||||
);
|
);
|
||||||
while ($row = mysqli_fetch_assoc($sql)) {
|
while ($row = mysqli_fetch_assoc($sql)) {
|
||||||
$event_id = intval($row['recurring_ticket_id']);
|
$event_id = intval($row['recurring_ticket_id']);
|
||||||
@@ -312,7 +267,7 @@ while ($row = mysqli_fetch_assoc($sql)) {
|
|||||||
LEFT JOIN tickets ON client_id = ticket_client_id
|
LEFT JOIN tickets ON client_id = ticket_client_id
|
||||||
LEFT JOIN ticket_statuses ON ticket_status = ticket_status_id
|
LEFT JOIN ticket_statuses ON ticket_status = ticket_status_id
|
||||||
LEFT JOIN users ON ticket_assigned_to = user_id
|
LEFT JOIN users ON ticket_assigned_to = user_id
|
||||||
$client_query $access_permission_query AND ticket_schedule IS NOT NULL"
|
$client_query AND ticket_schedule IS NOT NULL"
|
||||||
);
|
);
|
||||||
while ($row = mysqli_fetch_assoc($sql)) {
|
while ($row = mysqli_fetch_assoc($sql)) {
|
||||||
$event_id = intval($row['ticket_id']);
|
$event_id = intval($row['ticket_id']);
|
||||||
@@ -343,7 +298,7 @@ while ($row = mysqli_fetch_assoc($sql)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Vendors Added Created
|
//Vendors Added Created
|
||||||
$sql = mysqli_query($mysqli, "SELECT * FROM clients LEFT JOIN vendors ON client_id = vendor_client_id $client_query $access_permission_query");
|
$sql = mysqli_query($mysqli, "SELECT * FROM clients LEFT JOIN vendors ON client_id = vendor_client_id $client_query");
|
||||||
while ($row = mysqli_fetch_assoc($sql)) {
|
while ($row = mysqli_fetch_assoc($sql)) {
|
||||||
$event_id = intval($row['vendor_id']);
|
$event_id = intval($row['vendor_id']);
|
||||||
$client_id = intval($row['client_id']);
|
$client_id = intval($row['client_id']);
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<table class="table table-striped table-borderless table-hover">
|
<table class="table table-striped table-borderless table-hover">
|
||||||
<thead class="text-dark <?php if ($num_rows[0] == 0) { echo "d-none"; } ?>">
|
<thead class="text-dark <?php if ($num_rows[0] == 0) { echo "d-none"; } ?>">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="checkbox-column">
|
<td class="pr-0">
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input class="form-check-input" id="selectAllCheckbox" type="checkbox" onclick="checkAll(this)">
|
<input class="form-check-input" id="selectAllCheckbox" type="checkbox" onclick="checkAll(this)">
|
||||||
</div>
|
</div>
|
||||||
@@ -227,7 +227,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
<tr class="<?php echo $tr_class; ?>">
|
<tr class="<?php echo $tr_class; ?>">
|
||||||
<td class="checkbox-column">
|
<td class="pr-0">
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input class="form-check-input bulk-select" type="checkbox" name="certificate_ids[]" value="<?php echo $certificate_id ?>">
|
<input class="form-check-input bulk-select" type="checkbox" name="certificate_ids[]" value="<?php echo $certificate_id ?>">
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
||||||
@@ -271,16 +271,16 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<?php if ($session_user_role == 3) { ?>
|
<?php if ($session_user_role == 3) { ?>
|
||||||
<?php if ($certificate_archived_at) { ?>
|
<?php if ($certificate_archived_at) { ?>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-info confirm-link" href="post.php?restore_certificate=<?php echo $certificate_id; ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<a class="dropdown-item text-info confirm-link" href="post.php?unarchive_certificate=<?php echo $certificate_id; ?>">
|
||||||
<i class="fas fa-fw fa-redo mr-2"></i>Restore
|
<i class="fas fa-fw fa-redo mr-2"></i>Restore
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-danger text-bold confirm-link" href="post.php?delete_certificate=<?php echo $certificate_id; ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<a class="dropdown-item text-danger text-bold confirm-link" href="post.php?delete_certificate=<?php echo $certificate_id; ?>">
|
||||||
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
||||||
</a>
|
</a>
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-danger confirm-link" href="post.php?archive_certificate=<?php echo $certificate_id; ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<a class="dropdown-item text-danger confirm-link" href="post.php?archive_certificate=<?php echo $certificate_id; ?>">
|
||||||
<i class="fas fa-fw fa-archive mr-2"></i>Archive
|
<i class="fas fa-fw fa-archive mr-2"></i>Archive
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|||||||
@@ -213,7 +213,7 @@ $sql_asset_retired = mysqli_query(
|
|||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
|
|
||||||
<div class="card card-dark mb-3">
|
<div class="card card-dark mb-3">
|
||||||
<div class="card-header p-2">
|
<div class="card-header">
|
||||||
<h5 class="card-title"><i class="fa fa-fw fa-edit mr-2"></i>Quick Notes</h5>
|
<h5 class="card-title"><i class="fa fa-fw fa-edit mr-2"></i>Quick Notes</h5>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body p-1">
|
<div class="card-body p-1">
|
||||||
@@ -226,10 +226,10 @@ $sql_asset_retired = mysqli_query(
|
|||||||
|
|
||||||
<?php if (mysqli_num_rows($sql_important_contacts) > 0) { ?>
|
<?php if (mysqli_num_rows($sql_important_contacts) > 0) { ?>
|
||||||
<div class="card card-dark mb-3">
|
<div class="card card-dark mb-3">
|
||||||
<div class="card-header p-2">
|
<div class="card-header">
|
||||||
<h5 class="card-title"><i class="fa fa-fw fa-users mr-2"></i>Important Contacts</h5>
|
<h5 class="card-title"><i class="fa fa-fw fa-users mr-2"></i>Important Contacts</h5>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body p-1">
|
<div class="card-body p-2">
|
||||||
<table class="table table-borderless table-sm">
|
<table class="table table-borderless table-sm">
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
@@ -311,10 +311,11 @@ $sql_asset_retired = mysqli_query(
|
|||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
|
|
||||||
<div class="card card-dark mb-3">
|
<div class="card card-dark mb-3">
|
||||||
<div class="card-header p-2">
|
<div class="card-header">
|
||||||
<h5 class="card-title"><i class="fas fa-fw fa-star mr-2"></i>Favorite Assets</h5>
|
<h5 class="card-title"><i class="fas fa-fw fa-star mr-2"></i>Favorite Assets</h5>
|
||||||
</div>
|
</div>
|
||||||
<table class="table table-sm table-hover mb-0">
|
<div class="card-body p-2">
|
||||||
|
<table class="table table-borderless table-sm">
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
while ($row = mysqli_fetch_assoc($sql_favorite_assets)) {
|
while ($row = mysqli_fetch_assoc($sql_favorite_assets)) {
|
||||||
@@ -322,8 +323,6 @@ $sql_asset_retired = mysqli_query(
|
|||||||
$asset_name = nullable_htmlentities($row['asset_name']);
|
$asset_name = nullable_htmlentities($row['asset_name']);
|
||||||
$asset_type = nullable_htmlentities($row['asset_type']);
|
$asset_type = nullable_htmlentities($row['asset_type']);
|
||||||
$asset_icon = getAssetIcon($asset_type);
|
$asset_icon = getAssetIcon($asset_type);
|
||||||
$asset_make = nullable_htmlentities($row['asset_make']);
|
|
||||||
$asset_model = nullable_htmlentities($row['asset_model']);
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -331,11 +330,9 @@ $sql_asset_retired = mysqli_query(
|
|||||||
<a href="#" class="ajax-modal"
|
<a href="#" class="ajax-modal"
|
||||||
data-modal-size="lg"
|
data-modal-size="lg"
|
||||||
data-modal-url="modals/asset/asset_details.php?id=<?= $asset_id ?>">
|
data-modal-url="modals/asset/asset_details.php?id=<?= $asset_id ?>">
|
||||||
<i class="fas fa-fw fa-<?= $asset_icon ?> text-dark mr-1"></i><?= $asset_name ?>
|
<i class="fas fa-fw fa-<?= $asset_icon ?> text-muted mr-2"></i><?= $asset_name ?>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<div><?= "$asset_make $asset_model"; ?></div>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
@@ -344,6 +341,7 @@ $sql_asset_retired = mysqli_query(
|
|||||||
|
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -354,11 +352,11 @@ $sql_asset_retired = mysqli_query(
|
|||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
|
|
||||||
<div class="card card-dark mb-3">
|
<div class="card card-dark mb-3">
|
||||||
<div class="card-header p-2">
|
<div class="card-header">
|
||||||
<h5 class="card-title"><i class="fas fa-fw fa-star mr-2"></i>Favorite Credentials</h5>
|
<h5 class="card-title"><i class="fas fa-fw fa-star mr-2"></i>Favorite Credentials</h5>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="card-body p-2">
|
||||||
<table class="table table-sm table-hover mb-0">
|
<table class="table table-borderless table-sm">
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
while ($row = mysqli_fetch_assoc($sql_favorite_credentials)) {
|
while ($row = mysqli_fetch_assoc($sql_favorite_credentials)) {
|
||||||
@@ -382,9 +380,9 @@ $sql_asset_retired = mysqli_query(
|
|||||||
$credential_otp_secret = nullable_htmlentities($row['credential_otp_secret']);
|
$credential_otp_secret = nullable_htmlentities($row['credential_otp_secret']);
|
||||||
$credential_id_with_secret = '"' . $row['credential_id'] . '","' . $row['credential_otp_secret'] . '"';
|
$credential_id_with_secret = '"' . $row['credential_id'] . '","' . $row['credential_otp_secret'] . '"';
|
||||||
if (empty($credential_otp_secret)) {
|
if (empty($credential_otp_secret)) {
|
||||||
$otp_display = "";
|
$otp_display = "-";
|
||||||
} else {
|
} else {
|
||||||
$otp_display = "<small class='text-secondary'><span onmouseenter='showOTPViaCredentialID($credential_id)'><i class='far fa-clock text-dark'></i> <span id='otp_$credential_id'><i>Hover..</i></span></span><small>";
|
$otp_display = "<span onmouseenter='showOTPViaCredentialID($credential_id)'><i class='far fa-clock'></i> <span id='otp_$credential_id'><i>Hover..</i></span></span>";
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -392,15 +390,14 @@ $sql_asset_retired = mysqli_query(
|
|||||||
<td>
|
<td>
|
||||||
<a href="#" class="ajax-modal"
|
<a href="#" class="ajax-modal"
|
||||||
data-modal-url="modals/credential/credential_edit.php?id=<?= $credential_id ?>">
|
data-modal-url="modals/credential/credential_edit.php?id=<?= $credential_id ?>">
|
||||||
<i class="fas fa-fw fa-key text-dark mr-1"></i><?= $credential_name ?>
|
<i class="fas fa-fw fa-key text-muted mr-2"></i><?= $credential_name ?>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td><?= $credential_username_display ?></td>
|
<td><?= $credential_username_display ?></td>
|
||||||
<td class="text-nowrap">
|
<td class="text-nowrap">
|
||||||
<button class="btn p-0" type="button" data-toggle="popover" data-trigger="focus" data-placement="top" data-content="<?php echo $credential_password; ?>"><i class="fas fa-2x fa-ellipsis-h text-secondary"></i><i class="fas fa-2x fa-ellipsis-h text-secondary"></i></button><button class="btn btn-sm clipboardjs" type="button" data-clipboard-text="<?php echo $credential_password; ?>"><i class="far fa-copy text-secondary"></i></button>
|
<button class="btn p-0" type="button" data-toggle="popover" data-trigger="focus" data-placement="top" data-content="<?php echo $credential_password; ?>"><i class="fas fa-2x fa-ellipsis-h text-secondary"></i><i class="fas fa-2x fa-ellipsis-h text-secondary"></i></button><button class="btn btn-sm clipboardjs" type="button" data-clipboard-text="<?php echo $credential_password; ?>"><i class="far fa-copy text-secondary"></i></button>
|
||||||
<div><?= $otp_display ?></div>
|
|
||||||
</td>
|
</td>
|
||||||
|
<td><?= $otp_display ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
@@ -408,6 +405,7 @@ $sql_asset_retired = mysqli_query(
|
|||||||
|
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -418,7 +416,7 @@ $sql_asset_retired = mysqli_query(
|
|||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
|
|
||||||
<div class="card card-dark mb-3">
|
<div class="card card-dark mb-3">
|
||||||
<div class="card-header p-2">
|
<div class="card-header">
|
||||||
<h5 class="card-title"><i class="fa fa-fw fa-share-square mr-2"></i>Shared Items</h5>
|
<h5 class="card-title"><i class="fa fa-fw fa-share-square mr-2"></i>Shared Items</h5>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body p-2">
|
<div class="card-body p-2">
|
||||||
@@ -495,7 +493,7 @@ $sql_asset_retired = mysqli_query(
|
|||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
|
|
||||||
<div class="card card-dark mb-3">
|
<div class="card card-dark mb-3">
|
||||||
<div class="card-header p-2">
|
<div class="card-header">
|
||||||
<h5 class="card-title"><i class="fa fa-fw fa-exclamation-triangle text-warning mr-2"></i>Expiring in the Next 45 Days</h5>
|
<h5 class="card-title"><i class="fa fa-fw fa-exclamation-triangle text-warning mr-2"></i>Expiring in the Next 45 Days</h5>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body p-2">
|
<div class="card-body p-2">
|
||||||
@@ -613,7 +611,7 @@ $sql_asset_retired = mysqli_query(
|
|||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
|
|
||||||
<div class="card card-dark mb-3">
|
<div class="card card-dark mb-3">
|
||||||
<div class="card-header p-2">
|
<div class="card-header">
|
||||||
<h5 class="card-title"><i class="fa fa-fw fa-exclamation-triangle text-danger mr-2"></i>Expired</h5>
|
<h5 class="card-title"><i class="fa fa-fw fa-exclamation-triangle text-danger mr-2"></i>Expired</h5>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body p-2">
|
<div class="card-body p-2">
|
||||||
@@ -725,10 +723,12 @@ $sql_asset_retired = mysqli_query(
|
|||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
|
|
||||||
<div class="card card-dark mb-3">
|
<div class="card card-dark mb-3">
|
||||||
<div class="card-header p-2">
|
<div class="card-header">
|
||||||
<h5 class="card-title"><i class="fa fa-fw fa-life-ring mr-2"></i>Stale Tickets <small>(Not updated within 3 days)</small></h5>
|
<h5 class="card-title"><i class="fa fa-fw fa-life-ring mr-2"></i>Stale Tickets <small>(Not updated within 3 days)</small></h5>
|
||||||
</div>
|
</div>
|
||||||
<table class="table table table-sm table-hover mb-0">
|
<div class="card-body p-2">
|
||||||
|
|
||||||
|
<table class="table table-borderless table-sm">
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
@@ -755,6 +755,7 @@ $sql_asset_retired = mysqli_query(
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
@@ -765,10 +766,12 @@ $sql_asset_retired = mysqli_query(
|
|||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
|
|
||||||
<div class="card card-dark mb-3">
|
<div class="card card-dark mb-3">
|
||||||
<div class="card-header p-2">
|
<div class="card-header">
|
||||||
<h5 class="card-title"><i class="fa fa-fw fa-history mr-2"></i>Recent Activities <small>(Last 10 tasks)</small></h5>
|
<h5 class="card-title"><i class="fa fa-fw fa-history mr-2"></i>Recent Activities <small>(Last 10 tasks)</small></h5>
|
||||||
</div>
|
</div>
|
||||||
<table class="table table-sm table-hover mb-0">
|
<div class="card-body p-2">
|
||||||
|
|
||||||
|
<table class="table table-borderless table-sm">
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
@@ -788,8 +791,9 @@ $sql_asset_retired = mysqli_query(
|
|||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
</div>
|
||||||
<?php if ($session_user_role == 3) { ?>
|
<?php if ($session_user_role == 3) { ?>
|
||||||
<div class="card-footer p-2">
|
<div class="card-footer">
|
||||||
<a href="../admin/audit_log.php?client=<?php echo $client_id; ?>">See More...</a>
|
<a href="../admin/audit_log.php?client=<?php echo $client_id; ?>">See More...</a>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
@@ -812,7 +816,6 @@ $sql_asset_retired = mysqli_query(
|
|||||||
"ajax.php",
|
"ajax.php",
|
||||||
{
|
{
|
||||||
client_set_notes: 'TRUE',
|
client_set_notes: 'TRUE',
|
||||||
csrf_token: '<?= $_SESSION['csrf_token'] ?>',
|
|
||||||
client_id: client_id,
|
client_id: client_id,
|
||||||
notes: notes
|
notes: notes
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -152,12 +152,6 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<i class="fas fa-fw fa-clock mr-2"></i>Set Hourly Rate
|
<i class="fas fa-fw fa-clock mr-2"></i>Set Hourly Rate
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item ajax-modal" href="#"
|
|
||||||
data-modal-url="modals/client/client_bulk_edit_net_terms.php"
|
|
||||||
data-bulk="true">
|
|
||||||
<i class="fas fa-fw fa-calendar mr-2"></i>Set Net Terms
|
|
||||||
</a>
|
|
||||||
<div class="dropdown-divider"></div>
|
|
||||||
<a class="dropdown-item ajax-modal" href="#"
|
<a class="dropdown-item ajax-modal" href="#"
|
||||||
data-modal-url="modals/client/client_bulk_edit_industry.php"
|
data-modal-url="modals/client/client_bulk_edit_industry.php"
|
||||||
data-bulk="true">
|
data-bulk="true">
|
||||||
@@ -293,10 +287,10 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<form id="bulkActions" action="post.php" method="post">
|
<form id="bulkActions" action="post.php" method="post">
|
||||||
<input type="hidden" name="csrf_token" value="<?php echo $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?php echo $_SESSION['csrf_token'] ?>">
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="table table-hover mb-0">
|
<table class="table table-hover mb-0 text-nowrap">
|
||||||
<thead class="<?php if ($num_rows[0] == 0) { echo "d-none"; } ?> bg-light">
|
<thead class="<?php if ($num_rows[0] == 0) { echo "d-none"; } ?> bg-light">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="checkbox-column">
|
<td class="pr-0">
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input class="form-check-input" id="selectAllCheckbox" type="checkbox" onclick="checkAll(this)">
|
<input class="form-check-input" id="selectAllCheckbox" type="checkbox" onclick="checkAll(this)">
|
||||||
</div>
|
</div>
|
||||||
@@ -307,14 +301,14 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
</a>
|
</a>
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
<a class="text-dark" href="?<?php echo $url_query_strings_sort; ?>&sort=contact_name&order=<?php echo $disp; ?>">
|
<a class="text-dark" href="?<?php echo $url_query_strings_sort; ?>&sort=location_city&order=<?php echo $disp; ?>">
|
||||||
Primary Contact
|
Primary Location <?php if ($sort == 'location_city') { echo $order_icon; } ?>
|
||||||
<?php if ($sort == 'contact_name') { echo $order_icon; } ?>
|
|
||||||
</a>
|
</a>
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
<a class="text-dark" href="?<?php echo $url_query_strings_sort; ?>&sort=location_city&order=<?php echo $disp; ?>">
|
<a class="text-dark" href="?<?php echo $url_query_strings_sort; ?>&sort=contact_name&order=<?php echo $disp; ?>">
|
||||||
Primary Location <?php if ($sort == 'location_city') { echo $order_icon; } ?>
|
Primary Contact
|
||||||
|
<?php if ($sort == 'contact_name') { echo $order_icon; } ?>
|
||||||
</a>
|
</a>
|
||||||
</th>
|
</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
@@ -377,7 +371,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
$row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('contact_id') AS num FROM contacts WHERE contact_client_id = $client_id AND contact_archived_at IS NULL"));
|
$row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('contact_id') AS num FROM contacts WHERE contact_client_id = $client_id AND contact_archived_at IS NULL"));
|
||||||
$contact_count = $row['num'];
|
$contact_count = $row['num'];
|
||||||
if ($contact_count) {
|
if ($contact_count) {
|
||||||
$contact_count_display = "<a href='contacts.php?client_id=$client_id'><i class='fas fa-fw fa-users text-dark mr-2'></i><strong>$contact_count</strong> Contacts</a>";
|
$contact_count_display = "<a href='contacts.php?client_id=$client_id' class='mr-2 mb-1 badge badge-pill badge-dark p-2' title='Contacts ($contact_count)'><i class='fas fa-fw fa-users mr-2'></i>$contact_count</a>";
|
||||||
} else {
|
} else {
|
||||||
$contact_count_display = '';
|
$contact_count_display = '';
|
||||||
}
|
}
|
||||||
@@ -386,7 +380,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
$row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('vendor_id') AS num FROM vendors WHERE vendor_client_id = $client_id AND vendor_archived_at IS NULL"));
|
$row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('vendor_id') AS num FROM vendors WHERE vendor_client_id = $client_id AND vendor_archived_at IS NULL"));
|
||||||
$vendor_count = $row['num'];
|
$vendor_count = $row['num'];
|
||||||
if ($vendor_count) {
|
if ($vendor_count) {
|
||||||
$vendor_count_display = "<a href='vendors.php?client_id=$client_id'><i class='fas fa-fw fa-building text-dark mr-2'></i><strong>$vendor_count</strong> Vendors</a>";
|
$vendor_count_display = "<a href='vendors.php?client_id=$client_id' class='mr-2 mb-1 badge badge-pill badge-dark p-2' title='Vendors ($vendor_count)'><i class='fas fa-fw fa-building mr-2'></i>$vendor_count</a>";
|
||||||
} else {
|
} else {
|
||||||
$vendor_count_display = '';
|
$vendor_count_display = '';
|
||||||
}
|
}
|
||||||
@@ -395,7 +389,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
$row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('asset_id') AS num FROM assets WHERE asset_client_id = $client_id AND asset_archived_at IS NULL"));
|
$row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('asset_id') AS num FROM assets WHERE asset_client_id = $client_id AND asset_archived_at IS NULL"));
|
||||||
$asset_count = $row['num'];
|
$asset_count = $row['num'];
|
||||||
if ($asset_count) {
|
if ($asset_count) {
|
||||||
$asset_count_display = "<a href='assets.php?client_id=$client_id'><i class='fas fa-fw fa-desktop text-dark mr-2'></i><strong>$asset_count</strong> Assets</a>";
|
$asset_count_display = "<a href='assets.php?client_id=$client_id' class='mr-2 mb-1 badge badge-pill badge-secondary p-2' title='Assets ($asset_count)'><i class='fas fa-fw fa-desktop mr-2'></i>$asset_count</a>";
|
||||||
} else {
|
} else {
|
||||||
$asset_count_display = '';
|
$asset_count_display = '';
|
||||||
}
|
}
|
||||||
@@ -404,7 +398,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
$row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('credential_id') AS num FROM credentials WHERE credential_client_id = $client_id AND credential_archived_at IS NULL"));
|
$row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('credential_id') AS num FROM credentials WHERE credential_client_id = $client_id AND credential_archived_at IS NULL"));
|
||||||
$credential_count = $row['num'];
|
$credential_count = $row['num'];
|
||||||
if ($credential_count) {
|
if ($credential_count) {
|
||||||
$credential_count_display = "<a href='credentials.php?client_id=$client_id'><i class='fas fa-fw fa-key text-dark mr-2'></i><strong>$credential_count</strong> Credentials</a>";
|
$credential_count_display = "<a href='credentials.php?client_id=$client_id' class='mr-2 mb-1 badge badge-pill badge-secondary p-2' title='Credentials ($credential_count)'><i class='fas fa-fw fa-key mr-2'></i>$credential_count</a>";
|
||||||
} else {
|
} else {
|
||||||
$credential_count_display = '';
|
$credential_count_display = '';
|
||||||
}
|
}
|
||||||
@@ -413,7 +407,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
$row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('software_id') AS num FROM software WHERE software_client_id = $client_id AND software_archived_at IS NULL"));
|
$row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('software_id') AS num FROM software WHERE software_client_id = $client_id AND software_archived_at IS NULL"));
|
||||||
$software_count = $row['num'];
|
$software_count = $row['num'];
|
||||||
if ($software_count) {
|
if ($software_count) {
|
||||||
$software_count_display = "<a href='software.php?client_id=$client_id'><i class='fas fa-fw fa-cube text-dark mr-2'></i><strong>$software_count</strong> Software</a>";
|
$software_count_display = "<a href='software.php?client_id=$client_id' class='mr-2 mb-1 badge badge-pill badge-secondary p-2' title='Licenses ($software_count)'><i class='fas fa-fw fa-cube mr-2'></i>$software_count</a>";
|
||||||
} else {
|
} else {
|
||||||
$software_count_display = '';
|
$software_count_display = '';
|
||||||
}
|
}
|
||||||
@@ -422,16 +416,18 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
$row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('ticket_id') AS num FROM tickets WHERE ticket_client_id = $client_id AND ticket_archived_at IS NULL"));
|
$row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('ticket_id') AS num FROM tickets WHERE ticket_client_id = $client_id AND ticket_archived_at IS NULL"));
|
||||||
$ticket_count = $row['num'];
|
$ticket_count = $row['num'];
|
||||||
if ($ticket_count) {
|
if ($ticket_count) {
|
||||||
$ticket_count_display = "<a href='tickets.php?client_id=$client_id'><i class='fas fa-fw fa-life-ring text-dark mr-2'></i><strong>$ticket_count</strong> Tickets</a>";
|
$ticket_count_display = "<a href='tickets.php?client_id=$client_id' class='mr-2 mb-1 badge badge-pill badge-secondary p-2' title='Tickets ($ticket_count)'><i class='fas fa-fw fa-life-ring mr-2'></i>$ticket_count</a>";
|
||||||
} else {
|
} else {
|
||||||
$ticket_count_display = '';
|
$ticket_count_display = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Client Tags
|
// Client Tags
|
||||||
|
|
||||||
$client_tag_name_display_array = array();
|
$client_tag_name_display_array = array();
|
||||||
$client_tag_id_array = array();
|
$client_tag_id_array = array();
|
||||||
$sql_client_tags = mysqli_query($mysqli, "SELECT * FROM client_tags LEFT JOIN tags ON client_tags.tag_id = tags.tag_id WHERE client_id = $client_id ORDER BY tag_name ASC");
|
$sql_client_tags = mysqli_query($mysqli, "SELECT * FROM client_tags LEFT JOIN tags ON client_tags.tag_id = tags.tag_id WHERE client_id = $client_id ORDER BY tag_name ASC");
|
||||||
while ($row = mysqli_fetch_assoc($sql_client_tags)) {
|
while ($row = mysqli_fetch_assoc($sql_client_tags)) {
|
||||||
|
|
||||||
$client_tag_id = intval($row['tag_id']);
|
$client_tag_id = intval($row['tag_id']);
|
||||||
$client_tag_name = nullable_htmlentities($row['tag_name']);
|
$client_tag_name = nullable_htmlentities($row['tag_name']);
|
||||||
$client_tag_color = nullable_htmlentities($row['tag_color']);
|
$client_tag_color = nullable_htmlentities($row['tag_color']);
|
||||||
@@ -444,7 +440,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
}
|
}
|
||||||
|
|
||||||
$client_tag_id_array[] = $client_tag_id;
|
$client_tag_id_array[] = $client_tag_id;
|
||||||
$client_tag_name_display_array[] = "<a href='clients.php?tags[]=$client_tag_id'><span class='badge badge-pill text-light p-2 mr-1' style='background-color: $client_tag_color;'><i class='fas fa-$client_tag_icon fa-fw mr-1'></i>$client_tag_name</span></a>";
|
$client_tag_name_display_array[] = "<a href='clients.php?tags[]=$client_tag_id'><span class='badge text-light p-1 mr-1' style='background-color: $client_tag_color;'><i class='fa fa-fw fa-$client_tag_icon mr-2'></i>$client_tag_name</span></a>";
|
||||||
}
|
}
|
||||||
$client_tags_display = implode('', $client_tag_name_display_array);
|
$client_tags_display = implode('', $client_tag_name_display_array);
|
||||||
|
|
||||||
@@ -489,35 +485,34 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="checkbox-column 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="client_ids[]" value="<?php echo $client_id ?>">
|
<input class="form-check-input bulk-select" type="checkbox" name="client_ids[]" value="<?php echo $client_id ?>">
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="client_overview.php?client_id=<?= $client_id ?>"
|
<a data-toggle="tooltip" data-placement="right" title="Client ID: <?php echo $client_id; ?>" class="font-weight-bold h6" href="client_overview.php?client_id=<?php echo $client_id; ?>"><?php echo $client_name; ?></a>
|
||||||
data-toggle="popover"
|
|
||||||
data-trigger="hover"
|
<?php
|
||||||
data-placement="right"
|
if (!empty($client_type)) {
|
||||||
data-html="true"
|
?>
|
||||||
data-delay='{"show": 800, "hide": 200}'
|
<div class="text-secondary mt-1">
|
||||||
title="<?= $client_name ?>"
|
<?php echo $client_type; ?>
|
||||||
data-content="
|
|
||||||
<strong>Created:</strong> <?= $client_created_at ?><br>
|
|
||||||
<strong>Short name:</strong> <?= $client_abbreviation ?><br>
|
|
||||||
<strong>ID:</strong> <?= $client_id ?>
|
|
||||||
">
|
|
||||||
<div class="media">
|
|
||||||
<i class="fas fa-fw fa-2x fa-user text-dark mr-2"></i>
|
|
||||||
<div class="media-body">
|
|
||||||
<div class="text-bold"><?= $client_name ?></div>
|
|
||||||
<div class="text-secondary"><?= $client_type ?></div>
|
|
||||||
<div><?php if ($client_tags_display) { echo $client_tags_display; } ?></div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
<?php
|
||||||
|
if (!empty($client_tags_display)) { ?>
|
||||||
|
<div class="mt-1 text-wrap">
|
||||||
|
<?php echo $client_tags_display; ?>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
<div class="mt-1 text-secondary">
|
||||||
|
<small><strong>Abbreviation: </strong> <?php echo $client_abbreviation; ?></small><br>
|
||||||
|
<small><strong>Created: </strong> <?php echo $client_created_at; ?></small><br>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</a>
|
|
||||||
</td>
|
</td>
|
||||||
|
<td><?php echo $location_address_display; ?></td>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
if (empty($contact_name) && empty($contact_phone) && empty($contact_mobile) && empty($client_email)) {
|
if (empty($contact_name) && empty($contact_phone) && empty($contact_mobile) && empty($client_email)) {
|
||||||
@@ -553,26 +548,11 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</td>
|
</td>
|
||||||
<td><?php echo $location_address_display; ?></td>
|
|
||||||
<td>
|
<td class="text-wrap">
|
||||||
<a href="#"
|
<?php echo "$contact_count_display$vendor_count_display$asset_count_display$credential_count_display$software_count_display$ticket_count_display"; ?>
|
||||||
data-toggle="popover"
|
|
||||||
data-trigger="hover"
|
|
||||||
data-placement="right"
|
|
||||||
data-html="true"
|
|
||||||
data-delay='{"hide": 1800}'
|
|
||||||
title="<?= $client_name ?>"
|
|
||||||
data-content="
|
|
||||||
<div><?= $contact_count_display ?></div>
|
|
||||||
<div><?= $asset_count_display ?></div>
|
|
||||||
<div><?= $vendor_count_display ?></div>
|
|
||||||
<div><?= $credential_count_display ?></div>
|
|
||||||
<div><?= $software_count_display ?></div>
|
|
||||||
<div><?= $ticket_count_display ?></div>
|
|
||||||
">
|
|
||||||
<i class="fas fa-fw fa-2x fa-info-circle"></i>
|
|
||||||
</a>
|
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- Show Billing if perms & if accounting module is enabled -->
|
<!-- Show Billing if perms & if accounting module is enabled -->
|
||||||
<?php if ((lookupUserPermission("module_financial") >= 1) && $config_module_enable_accounting == 1) { ?>
|
<?php if ((lookupUserPermission("module_financial") >= 1) && $config_module_enable_accounting == 1) { ?>
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
|
|||||||
@@ -476,7 +476,7 @@ if (isset($_GET['contact_id'])) {
|
|||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item"
|
<a class="dropdown-item"
|
||||||
href="post.php?unlink_asset_from_contact&contact_id=<?= $contact_id ?>&asset_id=<?= $asset_id ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>"
|
href="post.php?unlink_asset_from_contact&contact_id=<?= $contact_id ?>&asset_id=<?= $asset_id ?>"
|
||||||
class="btn btn-secondary btn-sm" title="Unlink">
|
class="btn btn-secondary btn-sm" title="Unlink">
|
||||||
<i class="fas fa-fw fa-unlink mr-2"></i>Unlink
|
<i class="fas fa-fw fa-unlink mr-2"></i>Unlink
|
||||||
</a>
|
</a>
|
||||||
@@ -616,13 +616,13 @@ if (isset($_GET['contact_id'])) {
|
|||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item"
|
<a class="dropdown-item"
|
||||||
href="post.php?unlink_credential_from_contact&contact_id=<?php echo $contact_id; ?>&credential_id=<?php echo $credential_id; ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>"
|
href="post.php?unlink_credential_from_contact&contact_id=<?php echo $contact_id; ?>&credential_id=<?php echo $credential_id; ?>"
|
||||||
class="btn btn-secondary btn-sm" title="Unlink">
|
class="btn btn-secondary btn-sm" title="Unlink">
|
||||||
<i class="fas fa-fw fa-unlink mr-2"></i>Unlink
|
<i class="fas fa-fw fa-unlink mr-2"></i>Unlink
|
||||||
</a>
|
</a>
|
||||||
<?php if ($session_user_role == 3) { ?>
|
<?php if ($session_user_role == 3) { ?>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-danger text-bold" href="post.php?delete_credential=<?php echo $credential_id; ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<a class="dropdown-item text-danger text-bold" href="post.php?delete_credential=<?php echo $credential_id; ?>">
|
||||||
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
@@ -709,7 +709,7 @@ if (isset($_GET['contact_id'])) {
|
|||||||
<td><?php echo $software_license_type; ?></td>
|
<td><?php echo $software_license_type; ?></td>
|
||||||
<td><?php echo "$seat_count / $software_seats"; ?></td>
|
<td><?php echo "$seat_count / $software_seats"; ?></td>
|
||||||
<td class="text-center">
|
<td class="text-center">
|
||||||
<a href="post.php?unlink_software_from_contact&contact_id=<?php echo $contact_id; ?>&software_id=<?php echo $software_id; ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>" class="btn btn-secondary btn-sm" title="Remove License"><i class="fas fa-fw fa-unlink"></i></a>
|
<a href="post.php?unlink_software_from_contact&contact_id=<?php echo $contact_id; ?>&software_id=<?php echo $software_id; ?>" class="btn btn-secondary btn-sm" title="Remove License"><i class="fas fa-fw fa-unlink"></i></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
@@ -778,7 +778,7 @@ if (isset($_GET['contact_id'])) {
|
|||||||
<?php
|
<?php
|
||||||
if ($session_user_role == 3) { ?>
|
if ($session_user_role == 3) { ?>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-danger text-bold confirm-link" href="post.php?delete_recurring_ticket=<?php echo $recurring_ticket_id; ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<a class="dropdown-item text-danger text-bold confirm-link" href="post.php?delete_recurring_ticket=<?php echo $recurring_ticket_id; ?>">
|
||||||
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -931,7 +931,7 @@ if (isset($_GET['contact_id'])) {
|
|||||||
<td><?php echo $service_category; ?></td>
|
<td><?php echo $service_category; ?></td>
|
||||||
<td><?php echo $service_importance; ?></td>
|
<td><?php echo $service_importance; ?></td>
|
||||||
<td class="text-center">
|
<td class="text-center">
|
||||||
<a href="post.php?unlink_service_from_contact&contact_id=<?php echo $contact_id; ?>&service_id=<?php echo $service_id; ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>" class="btn btn-secondary btn-sm" title="Unlink"><i class="fas fa-fw fa-unlink"></i></a>
|
<a href="post.php?unlink_service_from_contact&contact_id=<?php echo $contact_id; ?>&service_id=<?php echo $service_id; ?>" class="btn btn-secondary btn-sm" title="Unlink"><i class="fas fa-fw fa-unlink"></i></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
@@ -997,7 +997,7 @@ if (isset($_GET['contact_id'])) {
|
|||||||
data-modal-url="modals/document/document_view.php?id=<?= $document_id ?>">
|
data-modal-url="modals/document/document_view.php?id=<?= $document_id ?>">
|
||||||
<i class="fas fa-fw fa-eye"></i>
|
<i class="fas fa-fw fa-eye"></i>
|
||||||
</a>
|
</a>
|
||||||
<a href="post.php?unlink_contact_from_document&contact_id=<?php echo $contact_id; ?>&document_id=<?php echo $document_id; ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>" class="btn btn-secondary btn-sm" title="Unlink"><i class="fas fa-fw fa-unlink"></i></a>
|
<a href="post.php?unlink_contact_from_document&contact_id=<?php echo $contact_id; ?>&document_id=<?php echo $document_id; ?>" class="btn btn-secondary btn-sm" title="Unlink"><i class="fas fa-fw fa-unlink"></i></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
@@ -1060,7 +1060,7 @@ if (isset($_GET['contact_id'])) {
|
|||||||
<td><?php echo $file_size_KB; ?> KB</td>
|
<td><?php echo $file_size_KB; ?> KB</td>
|
||||||
<td><?php echo $file_created_at; ?></td>
|
<td><?php echo $file_created_at; ?></td>
|
||||||
<td class="text-center">
|
<td class="text-center">
|
||||||
<a href="post.php?unlink_contact_from_file&contact_id=<?php echo $contact_id; ?>&file_id=<?php echo $file_id; ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>" class="btn btn-secondary btn-sm" title="Unlink"><i class="fas fa-fw fa-unlink"></i></a>
|
<a href="post.php?unlink_contact_from_file&contact_id=<?php echo $contact_id; ?>&file_id=<?php echo $file_id; ?>" class="btn btn-secondary btn-sm" title="Unlink"><i class="fas fa-fw fa-unlink"></i></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
@@ -1124,12 +1124,12 @@ if (isset($_GET['contact_id'])) {
|
|||||||
<i class="fas fa-ellipsis-h"></i>
|
<i class="fas fa-ellipsis-h"></i>
|
||||||
</button>
|
</button>
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
<a class="dropdown-item text-danger" href="post.php?archive_contact_note=<?php echo $contact_note_id; ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<a class="dropdown-item text-danger" href="post.php?archive_contact_note=<?php echo $contact_note_id; ?>">
|
||||||
<i class="fas fa-fw fa-archive mr-2"></i>Archive
|
<i class="fas fa-fw fa-archive mr-2"></i>Archive
|
||||||
</a>
|
</a>
|
||||||
<?php if ($session_user_role == 3) { ?>
|
<?php if ($session_user_role == 3) { ?>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-danger text-bold" href="post.php?delete_contact_note=<?php echo $contact_note_id; ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<a class="dropdown-item text-danger text-bold" href="post.php?delete_contact_note=<?php echo $contact_note_id; ?>">
|
||||||
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
@@ -1171,7 +1171,6 @@ if (isset($_GET['contact_id'])) {
|
|||||||
"ajax.php",
|
"ajax.php",
|
||||||
{
|
{
|
||||||
contact_set_notes: 'TRUE',
|
contact_set_notes: 'TRUE',
|
||||||
csrf_token: '<?= $_SESSION['csrf_token'] ?>',
|
|
||||||
contact_id: contact_id,
|
contact_id: contact_id,
|
||||||
notes: notes
|
notes: notes
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -262,8 +262,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<?php if ($archived) { ?>
|
<?php if ($archived) { ?>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<button class="dropdown-item text-info"
|
<button class="dropdown-item text-info"
|
||||||
type="submit" form="bulkActions" name="bulk_restore_contacts">
|
type="submit" form="bulkActions" name="bulk_unarchive_contacts">
|
||||||
<i class="fas fa-fw fa-redo mr-2"></i>Restore
|
<i class="fas fa-fw fa-redo mr-2"></i>Unarchive
|
||||||
</button>
|
</button>
|
||||||
<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"
|
||||||
@@ -292,7 +292,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<table class="table border">
|
<table class="table border">
|
||||||
<thead class="thead-light <?php if (!$num_rows[0]) { echo "d-none"; } ?>">
|
<thead class="thead-light <?php if (!$num_rows[0]) { echo "d-none"; } ?>">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="bg-light checkbox-column">
|
<td class="bg-light pr-0">
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input class="form-check-input" id="selectAllCheckbox" type="checkbox" onclick="checkAll(this)">
|
<input class="form-check-input" id="selectAllCheckbox" type="checkbox" onclick="checkAll(this)">
|
||||||
</div>
|
</div>
|
||||||
@@ -465,7 +465,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="bg-light checkbox-column">
|
<td class="pr-0 bg-light">
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input class="form-check-input bulk-select" type="checkbox" name="contact_ids[]" value="<?php echo $contact_id ?>">
|
<input class="form-check-input bulk-select" type="checkbox" name="contact_ids[]" value="<?php echo $contact_id ?>">
|
||||||
</div>
|
</div>
|
||||||
@@ -526,23 +526,23 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<?php if ($session_user_role == 3 && $contact_primary == 0) { ?>
|
<?php if ($session_user_role == 3 && $contact_primary == 0) { ?>
|
||||||
<?php if ($contact_archived_at) { ?>
|
<?php if ($contact_archived_at) { ?>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-info confirm-link" href="post.php?restore_contact=<?= $contact_id ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<a class="dropdown-item text-info confirm-link" href="post.php?unarchive_contact=<?php echo $contact_id; ?>">
|
||||||
<i class="fas fa-fw fa-redo mr-2"></i>Restore
|
<i class="fas fa-fw fa-redo mr-2"></i>Unarchive
|
||||||
</a>
|
</a>
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-danger confirm-link" href="post.php?archive_contact=<?= $contact_id ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<a class="dropdown-item text-danger confirm-link" href="post.php?archive_contact=<?php echo $contact_id; ?>">
|
||||||
<i class="fas fa-fw fa-archive mr-2"></i>Archive
|
<i class="fas fa-fw fa-archive mr-2"></i>Archive
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-danger confirm-link" href="post.php?anonymize_contact=<?= $contact_id ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<a class="dropdown-item text-danger confirm-link" href="post.php?anonymize_contact=<?php echo $contact_id; ?>">
|
||||||
<i class="fas fa-fw fa-user-secret mr-2"></i>Anonymize & Archive
|
<i class="fas fa-fw fa-user-secret mr-2"></i>Anonymize & Archive
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<?php if ($config_destructive_deletes_enable) { ?>
|
<?php if ($config_destructive_deletes_enable) { ?>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-danger text-bold confirm-link" href="post.php?delete_contact=<?= $contact_id ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<a class="dropdown-item text-danger text-bold confirm-link" href="post.php?delete_contact=<?php echo $contact_id; ?>">
|
||||||
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|||||||
@@ -244,8 +244,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<?php if ($archived) { ?>
|
<?php if ($archived) { ?>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<button class="dropdown-item text-info"
|
<button class="dropdown-item text-info"
|
||||||
type="submit" form="bulkActions" name="bulk_restore_credentials">
|
type="submit" form="bulkActions" name="bulk_unarchive_credentials">
|
||||||
<i class="fas fa-fw fa-redo mr-2"></i>Restore
|
<i class="fas fa-fw fa-redo mr-2"></i>Unarchive
|
||||||
</button>
|
</button>
|
||||||
<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"
|
||||||
@@ -280,7 +280,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<table class="table table-striped table-borderless table-hover">
|
<table class="table table-striped table-borderless table-hover">
|
||||||
<thead class="text-dark <?php if ($num_rows[0] == 0) { echo "d-none"; } ?> text-nowrap">
|
<thead class="text-dark <?php if ($num_rows[0] == 0) { echo "d-none"; } ?> text-nowrap">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="bg-light checkbox-column">
|
<td class="pr-0">
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input class="form-check-input" id="selectAllCheckbox" type="checkbox" onclick="checkAll(this)">
|
<input class="form-check-input" id="selectAllCheckbox" type="checkbox" onclick="checkAll(this)">
|
||||||
</div>
|
</div>
|
||||||
@@ -419,7 +419,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
<tr class="<?php if ($credential_favorite) { echo "text-bold"; } ?>">
|
<tr class="<?php if ($credential_favorite) { echo "text-bold"; } ?>">
|
||||||
<td class="bg-light checkbox-column">
|
<td class="pr-0">
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input class="form-check-input bulk-select" type="checkbox" name="credential_ids[]" value="<?php echo $credential_id ?>">
|
<input class="form-check-input bulk-select" type="checkbox" name="credential_ids[]" value="<?php echo $credential_id ?>">
|
||||||
</div>
|
</div>
|
||||||
@@ -503,18 +503,18 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<?php if (lookupUserPermission("module_credential") >= 2) { ?>
|
<?php if (lookupUserPermission("module_credential") >= 2) { ?>
|
||||||
<?php if ($credential_archived_at) { ?>
|
<?php if ($credential_archived_at) { ?>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-info confirm-link" href="post.php?restore_credential=<?php echo $credential_id; ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<a class="dropdown-item text-info confirm-link" href="post.php?unarchive_credential=<?php echo $credential_id; ?>">
|
||||||
<i class="fas fa-fw fa-redo mr-2"></i>Restore
|
<i class="fas fa-fw fa-redo mr-2"></i>Unarchive
|
||||||
</a>
|
</a>
|
||||||
<?php if (lookupUserPermission("module_credential") >= 3) { ?>
|
<?php if (lookupUserPermission("module_credential") >= 3) { ?>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-danger text-bold confirm-link" href="post.php?delete_credential=<?php echo $credential_id; ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<a class="dropdown-item text-danger text-bold confirm-link" href="post.php?delete_credential=<?php echo $credential_id; ?>">
|
||||||
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</a>
|
</a>
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-danger confirm-link" href="post.php?archive_credential=<?php echo $credential_id; ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<a class="dropdown-item text-danger confirm-link" href="post.php?archive_credential=<?php echo $credential_id; ?>">
|
||||||
<i class="fas fa-fw fa-archive mr-2"></i>Archive
|
<i class="fas fa-fw fa-archive mr-2"></i>Archive
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|||||||
@@ -192,10 +192,10 @@ $page_title = $row['document_name'];
|
|||||||
onclick="populateShareModal(<?= "$client_id, 'Document', $document_id"; ?>)">
|
onclick="populateShareModal(<?= "$client_id, 'Document', $document_id"; ?>)">
|
||||||
<i class="fas fa-fw fa-share" title="Share"></i>
|
<i class="fas fa-fw fa-share" title="Share"></i>
|
||||||
</button>
|
</button>
|
||||||
<a class="btn btn-success mr-1" href="post.php?export_document=<?= $document_id ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>"><i class='fas fa-fw fa-file-pdf' title="PDF Export"></i></a>
|
<a class="btn btn-success mr-1" href="post.php?export_document=<?= $document_id ?>"><i class='fas fa-fw fa-file-pdf' title="PDF Export"></i></a>
|
||||||
<button type="button" class="btn btn-secondary mr-4" onclick="window.print();"><i class="fas fa-fw fa-print" title="Print"></i></button>
|
<button type="button" class="btn btn-secondary mr-4" onclick="window.print();"><i class="fas fa-fw fa-print" title="Print"></i></button>
|
||||||
<a class="btn btn-warning mr-1 confirm-link" href="post.php?archive_document=<?= $document_id ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>" title="Archive"><i class='fas fa-fw fa-archive'></i></a>
|
<a class="btn btn-warning mr-1 confirm-link" href="post.php?archive_document=<?= $document_id ?>" title="Archive"><i class='fas fa-fw fa-archive'></i></a>
|
||||||
<a class="btn btn-danger confirm-link" href="post.php?delete_document=<?= $document_id ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>&from=document_details" title="Delete"><i class='fas fa-fw fa-trash-alt'></i></a>
|
<a class="btn btn-danger confirm-link" href="post.php?delete_document=<?= $document_id ?>&from=document_details" title="Delete"><i class='fas fa-fw fa-trash-alt'></i></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card card-body bg-light">
|
<div class="card card-body bg-light">
|
||||||
@@ -226,7 +226,7 @@ $page_title = $row['document_name'];
|
|||||||
?>
|
?>
|
||||||
<div class="ml-2">
|
<div class="ml-2">
|
||||||
<a href="files.php?client_id=<?= $client_id ?>&folder_id=<?= $folder_id ?>&q=<?= $file_name ?>" target="_blank"><?= $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=<?= $file_id ?>&document_id=<?= $document_id ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<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-unlink text-secondary float-right" title="Unlink File"></i>
|
<i class="fas fa-fw fa-unlink text-secondary float-right" title="Unlink File"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -261,7 +261,7 @@ $page_title = $row['document_name'];
|
|||||||
data-modal-size="lg"
|
data-modal-size="lg"
|
||||||
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; ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<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-unlink text-secondary" title="Unlink Contact"></i>
|
<i class="fas fa-fw fa-unlink text-secondary" title="Unlink Contact"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -296,7 +296,7 @@ $page_title = $row['document_name'];
|
|||||||
data-modal-url="modals/asset/asset_details.php?id=<?= $asset_id ?>">
|
data-modal-url="modals/asset/asset_details.php?id=<?= $asset_id ?>">
|
||||||
<?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; ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<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-unlink text-secondary" title="Unlink Asset"></i>
|
<i class="fas fa-fw fa-unlink text-secondary" title="Unlink Asset"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -328,7 +328,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; ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<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-unlink text-secondary" title="Unlink License"></i>
|
<i class="fas fa-fw fa-unlink text-secondary" title="Unlink License"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -362,7 +362,7 @@ $page_title = $row['document_name'];
|
|||||||
<a class="ajax-modal" href="#" data-modal-url="modals/vendor/vendor_details.php?id=<?= $vendor_id ?>">
|
<a class="ajax-modal" href="#" data-modal-url="modals/vendor/vendor_details.php?id=<?= $vendor_id ?>">
|
||||||
<?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; ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<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-unlink text-secondary" title="Unlink Vendor"></i>
|
<i class="fas fa-fw fa-unlink text-secondary" title="Unlink Vendor"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -415,7 +415,7 @@ $page_title = $row['document_name'];
|
|||||||
data-modal-url="modals/document/document_version_view.php?id=<?= $document_version_id ?>">
|
data-modal-url="modals/document/document_version_view.php?id=<?= $document_version_id ?>">
|
||||||
<?php echo "$document_version_created_date | $document_version_author"; ?>
|
<?php echo "$document_version_created_date | $document_version_author"; ?>
|
||||||
</a>
|
</a>
|
||||||
<a class="confirm-link float-right" href="post.php?delete_document_version=<?php echo $document_version_id; ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<a class="confirm-link float-right" href="post.php?delete_document_version=<?php echo $document_version_id; ?>">
|
||||||
<i class="fas fa-fw fa-trash-alt text-secondary"></i>
|
<i class="fas fa-fw fa-trash-alt text-secondary"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -150,8 +150,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
<?php if ($archived) { ?>
|
<?php if ($archived) { ?>
|
||||||
<button class="dropdown-item text-info"
|
<button class="dropdown-item text-info"
|
||||||
type="submit" form="bulkActions" name="bulk_restore_domains">
|
type="submit" form="bulkActions" name="bulk_unarchive_domains">
|
||||||
<i class="fas fa-fw fa-redo mr-2"></i>Restore
|
<i class="fas fa-fw fa-redo mr-2"></i>Unarchive
|
||||||
</button>
|
</button>
|
||||||
<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"
|
||||||
@@ -182,7 +182,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<table class="table table-striped table-borderless table-hover">
|
<table class="table table-striped table-borderless table-hover">
|
||||||
<thead class="text-dark <?php if ($num_rows[0] == 0) { echo "d-none"; } ?> text-nowrap">
|
<thead class="text-dark <?php if ($num_rows[0] == 0) { echo "d-none"; } ?> text-nowrap">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="checkbox-column">
|
<td class="pr-0">
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input class="form-check-input" id="selectAllCheckbox" type="checkbox" onclick="checkAll(this)">
|
<input class="form-check-input" id="selectAllCheckbox" type="checkbox" onclick="checkAll(this)">
|
||||||
</div>
|
</div>
|
||||||
@@ -285,7 +285,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
<tr class="<?php echo $tr_class; ?>">
|
<tr class="<?php echo $tr_class; ?>">
|
||||||
<td class="checkbox-column">
|
<td class="pr-0">
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input class="form-check-input bulk-select" type="checkbox" name="domain_ids[]" value="<?php echo $domain_id ?>">
|
<input class="form-check-input bulk-select" type="checkbox" name="domain_ids[]" value="<?php echo $domain_id ?>">
|
||||||
</div>
|
</div>
|
||||||
@@ -330,16 +330,16 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<?php if ($session_user_role == 3) { ?>
|
<?php if ($session_user_role == 3) { ?>
|
||||||
<?php if ($domain_archived_at) { ?>
|
<?php if ($domain_archived_at) { ?>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-info confirm-link" href="post.php?restore_domain=<?php echo $domain_id; ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<a class="dropdown-item text-info confirm-link" href="post.php?unarchive_domain=<?php echo $domain_id; ?>">
|
||||||
<i class="fas fa-fw fa-redo mr-2"></i>Restore
|
<i class="fas fa-fw fa-redo mr-2"></i>Unarchive
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-danger text-bold confirm-link" href="post.php?delete_domain=<?php echo $domain_id; ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<a class="dropdown-item text-danger text-bold confirm-link" href="post.php?delete_domain=<?php echo $domain_id; ?>">
|
||||||
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
||||||
</a>
|
</a>
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-danger confirm-link" href="post.php?archive_domain=<?php echo $domain_id; ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<a class="dropdown-item text-danger confirm-link" href="post.php?archive_domain=<?php echo $domain_id; ?>">
|
||||||
<i class="fas fa-fw fa-archive mr-2"></i>Archive
|
<i class="fas fa-fw fa-archive mr-2"></i>Archive
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|||||||
@@ -206,7 +206,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<table class="table table-striped table-borderless table-hover">
|
<table class="table table-striped table-borderless table-hover">
|
||||||
<thead class="text-dark <?php if ($num_rows[0] == 0) { echo "d-none"; } ?>">
|
<thead class="text-dark <?php if ($num_rows[0] == 0) { echo "d-none"; } ?>">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="bg-light checkbox-column">
|
<td class="bg-light pr-0">
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input class="form-check-input" id="selectAllCheckbox" type="checkbox" onclick="checkAll(this)">
|
<input class="form-check-input" id="selectAllCheckbox" type="checkbox" onclick="checkAll(this)">
|
||||||
</div>
|
</div>
|
||||||
@@ -285,7 +285,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="bg-light checkbox-column">
|
<td class="pr-0 bg-light">
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input class="form-check-input bulk-select" type="checkbox" name="expense_ids[]" value="<?= $expense_id ?>">
|
<input class="form-check-input bulk-select" type="checkbox" name="expense_ids[]" value="<?= $expense_id ?>">
|
||||||
</div>
|
</div>
|
||||||
@@ -336,7 +336,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<i class="fas fa-fw fa-undo-alt mr-2"></i>Refund
|
<i class="fas fa-fw fa-undo-alt mr-2"></i>Refund
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-danger text-bold confirm-link" href="post.php?delete_expense=<?= $expense_id ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<a class="dropdown-item text-danger text-bold confirm-link" href="post.php?delete_expense=<?php echo $expense_id; ?>">
|
||||||
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -189,7 +189,7 @@ function display_folders($parent_folder_id, $client_id, $indent = 0, $render_roo
|
|||||||
</a>
|
</a>
|
||||||
<?php if ($session_user_role == 3 && $num_total == 0 && $subfolder_count == 0) { ?>
|
<?php if ($session_user_role == 3 && $num_total == 0 && $subfolder_count == 0) { ?>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-danger text-bold confirm-link" href="post.php?delete_folder=<?php echo $folder_id; ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<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
|
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
@@ -641,7 +641,7 @@ $num_root_items = intval($row_root_files['num']) + intval($row_root_docs['num'])
|
|||||||
</a>
|
</a>
|
||||||
<?php if ($file_archived_at) { ?>
|
<?php if ($file_archived_at) { ?>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-info" href="post.php?restore_file=<?= $file_id ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<a class="dropdown-item text-info" href="post.php?restore_file=<?= $file_id ?>">
|
||||||
<i class="fas fa-fw fa-redo mr-2"></i>Restore
|
<i class="fas fa-fw fa-redo mr-2"></i>Restore
|
||||||
</a>
|
</a>
|
||||||
<?php if ($session_user_role == 3) { ?>
|
<?php if ($session_user_role == 3) { ?>
|
||||||
@@ -652,7 +652,7 @@ $num_root_items = intval($row_root_files['num']) + intval($row_root_docs['num'])
|
|||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-danger confirm-link" href="post.php?archive_file=<?= $file_id ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<a class="dropdown-item text-danger confirm-link" href="post.php?archive_file=<?= $file_id ?>">
|
||||||
<i class="fas fa-fw fa-archive mr-2"></i>Archive
|
<i class="fas fa-fw fa-archive mr-2"></i>Archive
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
@@ -681,7 +681,7 @@ $num_root_items = intval($row_root_files['num']) + intval($row_root_docs['num'])
|
|||||||
<table class="table border">
|
<table class="table border">
|
||||||
<thead class="thead-light <?php if ($num_rows[0] == 0) { echo "d-none"; } ?>">
|
<thead class="thead-light <?php if ($num_rows[0] == 0) { echo "d-none"; } ?>">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="bg-light checkbox-column">
|
<td class="bg-light pr-0">
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input class="form-check-input" id="selectAllCheckbox" type="checkbox" onclick="checkAll(this)">
|
<input class="form-check-input" id="selectAllCheckbox" type="checkbox" onclick="checkAll(this)">
|
||||||
</div>
|
</div>
|
||||||
@@ -748,7 +748,7 @@ $num_root_items = intval($row_root_files['num']) + intval($row_root_docs['num'])
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="bg-light checkbox-column">
|
<td class="bg-light pr-0">
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input class="form-check-input bulk-select" type="checkbox" name="file_ids[]" value="<?php echo $file_id ?>">
|
<input class="form-check-input bulk-select" type="checkbox" name="file_ids[]" value="<?php echo $file_id ?>">
|
||||||
</div>
|
</div>
|
||||||
@@ -809,7 +809,7 @@ $num_root_items = intval($row_root_files['num']) + intval($row_root_docs['num'])
|
|||||||
</a>
|
</a>
|
||||||
<?php if ($file_archived_at) { ?>
|
<?php if ($file_archived_at) { ?>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-info" href="post.php?restore_file=<?= $file_id ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<a class="dropdown-item text-info" href="post.php?restore_file=<?= $file_id ?>">
|
||||||
<i class="fas fa-fw fa-redo mr-2"></i>Restore
|
<i class="fas fa-fw fa-redo mr-2"></i>Restore
|
||||||
</a>
|
</a>
|
||||||
<?php if ($session_user_role == 3) { ?>
|
<?php if ($session_user_role == 3) { ?>
|
||||||
@@ -820,7 +820,7 @@ $num_root_items = intval($row_root_files['num']) + intval($row_root_docs['num'])
|
|||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-danger confirm-link" href="post.php?archive_file=<?= $file_id ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<a class="dropdown-item text-danger confirm-link" href="post.php?archive_file=<?= $file_id ?>">
|
||||||
<i class="fas fa-fw fa-archive mr-2"></i>Archive
|
<i class="fas fa-fw fa-archive mr-2"></i>Archive
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
@@ -928,18 +928,18 @@ $num_root_items = intval($row_root_files['num']) + intval($row_root_docs['num'])
|
|||||||
</a>
|
</a>
|
||||||
<?php if ($document_archived_at) { ?>
|
<?php if ($document_archived_at) { ?>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-info" href="post.php?restore_document=<?= $document_id ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<a class="dropdown-item text-info" href="post.php?restore_document=<?= $document_id ?>">
|
||||||
<i class="fas fa-fw fa-redo mr-2"></i>Restore
|
<i class="fas fa-fw fa-redo mr-2"></i>Restore
|
||||||
</a>
|
</a>
|
||||||
<?php if ($session_user_role == 3) { ?>
|
<?php if ($session_user_role == 3) { ?>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-danger text-bold" href="post.php?delete_document=<?= $document_id ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<a class="dropdown-item text-danger text-bold" href="post.php?delete_document=<?= $document_id ?>">
|
||||||
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-danger" href="post.php?archive_document=<?= $document_id ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<a class="dropdown-item text-danger" href="post.php?archive_document=<?= $document_id ?>">
|
||||||
<i class="fas fa-fw fa-archive mr-2"></i>Archive
|
<i class="fas fa-fw fa-archive mr-2"></i>Archive
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|||||||
622
agent/files_legacy.php
Normal file
622
agent/files_legacy.php
Normal file
@@ -0,0 +1,622 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
// Default Column Sortby Filter
|
||||||
|
$sort = "file_name";
|
||||||
|
$order = "ASC";
|
||||||
|
|
||||||
|
require_once "includes/inc_all_client.php";
|
||||||
|
|
||||||
|
|
||||||
|
// Folder
|
||||||
|
if (!empty($_GET['folder_id'])) {
|
||||||
|
$folder_id = intval($_GET['folder_id']);
|
||||||
|
} else {
|
||||||
|
$folder_id = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Folder ID
|
||||||
|
$get_folder_id = 0;
|
||||||
|
if (!empty($_GET['folder_id'])) {
|
||||||
|
$get_folder_id = intval($_GET['folder_id']);
|
||||||
|
}
|
||||||
|
|
||||||
|
// View Mode -- 0 List, 1 Thumbnail
|
||||||
|
if (!empty($_GET['view'])) {
|
||||||
|
$view = intval($_GET['view']);
|
||||||
|
} else {
|
||||||
|
$view = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($view == 1) {
|
||||||
|
$query_images = "AND (file_ext LIKE 'JPG' OR file_ext LIKE 'jpg' OR file_ext LIKE 'JPEG' OR file_ext LIKE 'jpeg' OR file_ext LIKE 'png' OR file_ext LIKE 'PNG' OR file_ext LIKE 'webp' OR file_ext LIKE 'WEBP')";
|
||||||
|
} else {
|
||||||
|
$query_images = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set Folder Location Var used when creating folders
|
||||||
|
$folder_location = 1;
|
||||||
|
|
||||||
|
if ($get_folder_id == 0 && isset($_GET["q"])) {
|
||||||
|
$sql = mysqli_query(
|
||||||
|
$mysqli,
|
||||||
|
"SELECT SQL_CALC_FOUND_ROWS * FROM files
|
||||||
|
LEFT JOIN users ON file_created_by = user_id
|
||||||
|
WHERE file_client_id = $client_id
|
||||||
|
AND file_archived_at IS NULL
|
||||||
|
AND (file_name LIKE '%$q%' OR file_ext LIKE '%$q%' OR file_description LIKE '%$q%')
|
||||||
|
$query_images
|
||||||
|
ORDER BY $sort $order LIMIT $record_from, $record_to"
|
||||||
|
);
|
||||||
|
}else{
|
||||||
|
$sql = mysqli_query(
|
||||||
|
$mysqli,
|
||||||
|
"SELECT SQL_CALC_FOUND_ROWS * FROM files
|
||||||
|
LEFT JOIN users ON file_created_by = user_id
|
||||||
|
WHERE file_client_id = $client_id
|
||||||
|
AND file_folder_id = $folder_id
|
||||||
|
AND file_archived_at IS NULL
|
||||||
|
AND (file_name LIKE '%$q%' OR file_ext LIKE '%$q%' OR file_description LIKE '%$q%')
|
||||||
|
$query_images
|
||||||
|
ORDER BY $sort $order LIMIT $record_from, $record_to"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
$num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
|
|
||||||
|
$num_of_files = mysqli_num_rows($sql);
|
||||||
|
|
||||||
|
// 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-paperclip mr-2"></i>Files</h3>
|
||||||
|
|
||||||
|
<div class="card-tools">
|
||||||
|
<div class="btn-group">
|
||||||
|
<button type="button" class="btn btn-primary ajax-modal" 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
|
||||||
|
</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=1¤t_folder_id=<?= $get_folder_id ?>">
|
||||||
|
<i class="fa fa-fw fa-folder-plus mr-2"></i>New Folder
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card-body">
|
||||||
|
<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">
|
||||||
|
<a class="nav-link <?php if ($get_folder_id == 0) { echo "active"; } ?>" href="?client_id=<?php echo $client_id; ?>&folder_id=0">/</a>
|
||||||
|
</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 = 1 AND folder_client_id = $client_id ORDER BY folder_name ASC");
|
||||||
|
while ($row = mysqli_fetch_assoc($sql_folders)) {
|
||||||
|
$folder_id = intval($row['folder_id']);
|
||||||
|
$folder_name = nullable_htmlentities($row['folder_name']);
|
||||||
|
|
||||||
|
// Get the number of files in the folder
|
||||||
|
$row2 = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('file_id') AS num FROM files WHERE file_folder_id = $folder_id AND file_archived_at IS NULL"));
|
||||||
|
$num_files = 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_files > 0) {
|
||||||
|
echo "<span class='badge badge-pill badge-dark float-right mt-1'>$num_files</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 files, and no subfolders
|
||||||
|
if ($session_user_role == 3 && $num_files == 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>
|
||||||
|
<?php //require_once "modals/folder/folder_add.php"; ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-md-9">
|
||||||
|
|
||||||
|
<form autocomplete="off">
|
||||||
|
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
||||||
|
<input type="hidden" name="view" value="<?php echo $view; ?>">
|
||||||
|
<input type="hidden" name="folder_id" value="<?php echo $get_folder_id; ?>">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-5">
|
||||||
|
<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 for files 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-7">
|
||||||
|
<div class="btn-group float-right">
|
||||||
|
<a href="?<?php echo $url_query_strings_sort; ?>&view=0" class="btn <?php if($view == 0){ echo "btn-primary"; } else { echo "btn-outline-secondary"; } ?>"><i class="fas fa-list-ul"></i></a>
|
||||||
|
<a href="?<?php echo $url_query_strings_sort; ?>&view=1" class="btn <?php if($view == 1){ echo "btn-primary"; } else { echo "btn-outline-secondary"; } ?>"><i class="fas fa-th-large"></i></a>
|
||||||
|
|
||||||
|
<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/file/file_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_files">
|
||||||
|
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<nav class="mt-3">
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
if($view == 1){
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$files = [];
|
||||||
|
while ($row = mysqli_fetch_assoc($sql)) {
|
||||||
|
$file_id = intval($row['file_id']);
|
||||||
|
$file_name = nullable_htmlentities($row['file_name']);
|
||||||
|
$file_reference_name = nullable_htmlentities($row['file_reference_name']);
|
||||||
|
$file_ext = nullable_htmlentities($row['file_ext']);
|
||||||
|
$file_size = intval($row['file_size']);
|
||||||
|
$file_size_KB = number_format($file_size / 1024);
|
||||||
|
$file_mime_type = nullable_htmlentities($row['file_mime_type']);
|
||||||
|
$file_uploaded_by = nullable_htmlentities($row['user_name']);
|
||||||
|
|
||||||
|
// Store file data into an array for JS
|
||||||
|
$files[] = [
|
||||||
|
'id' => $file_id,
|
||||||
|
'name' => $file_name,
|
||||||
|
'preview' => "../uploads/clients/$client_id/$file_reference_name"
|
||||||
|
];
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="col-xl-2 col-lg-2 col-md-6 col-sm-6 mb-3 text-center">
|
||||||
|
|
||||||
|
<a href="#" onclick="openModal(<?php echo count($files)-1; ?>)"><!-- passing the index -->
|
||||||
|
<img class="img-thumbnail" src="<?php echo "../uploads/clients/$client_id/$file_reference_name"; ?>" alt="<?php echo $file_reference_name ?>">
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
|
||||||
|
<div class="dropdown float-right">
|
||||||
|
<button class="btn btn-link btn-sm" type="button" data-toggle="dropdown">
|
||||||
|
<i class="fas fa-ellipsis-v"></i>
|
||||||
|
</button>
|
||||||
|
<div class="dropdown-menu">
|
||||||
|
<a class="dropdown-item" href="<?php echo "../uploads/clients/$client_id/$file_reference_name"; ?>" download="<?php echo $file_name; ?>">
|
||||||
|
<i class="fas fa-fw fa-cloud-download-alt mr-2"></i>Download
|
||||||
|
</a>
|
||||||
|
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#shareModal" onclick="populateShareModal(<?php echo "$client_id, 'File', $file_id"; ?>)">
|
||||||
|
<i class="fas fa-fw fa-share mr-2"></i>Share
|
||||||
|
</a>
|
||||||
|
<a class="dropdown-item ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/file/file_rename.php?id=<?= $file_id ?>">
|
||||||
|
<i class="fas fa-fw fa-edit mr-2"></i>Rename
|
||||||
|
</a>
|
||||||
|
<a class="dropdown-item ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/file/file_move.php?id=<?= $file_id ?>">
|
||||||
|
<i class="fas fa-fw fa-exchange-alt mr-2"></i>Move
|
||||||
|
</a>
|
||||||
|
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#linkAssetToFileModal<?php echo $file_id; ?>">
|
||||||
|
<i class="fas fa-fw fa-desktop mr-2"></i>Asset
|
||||||
|
</a>
|
||||||
|
<div class="dropdown-divider"></div>
|
||||||
|
<a class="dropdown-item text-danger confirm-link" href="post.php?archive_file=<?php echo $file_id; ?>">
|
||||||
|
<i class="fas fa-fw fa-archive mr-2"></i>Archive
|
||||||
|
</a>
|
||||||
|
<?php if ($session_user_role == 3) { ?>
|
||||||
|
<div class="dropdown-divider"></div>
|
||||||
|
<a class="dropdown-item text-danger text-bold" href="#" data-toggle="modal" data-target="#deleteFileModal" onclick="populateFileDeleteModal(<?php echo "$file_id , '$file_name'" ?>)">
|
||||||
|
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
||||||
|
</a>
|
||||||
|
<?php } ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<small class="text-secondary"><?php echo $file_name; ?></small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
require "modals/file/file_view.php";
|
||||||
|
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<script>
|
||||||
|
// Pass PHP array to JavaScript
|
||||||
|
var files = <?php echo json_encode($files); ?>;
|
||||||
|
var currentIndex = 0; // Keep track of which file is displayed
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php } else { ?>
|
||||||
|
|
||||||
|
<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 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=file_name&order=<?php echo $disp; ?>">
|
||||||
|
Name <?php if ($sort == 'file_name') { echo $order_icon; } ?>
|
||||||
|
</a>
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
<a class="text-secondary" href="?<?php echo $url_query_strings_sort; ?>&sort=file_mime_type&order=<?php echo $disp; ?>">
|
||||||
|
Type <?php if ($sort == 'file_mime_type') { echo $order_icon; } ?>
|
||||||
|
</a>
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
<a class="text-secondary" href="?<?php echo $url_query_strings_sort; ?>&sort=file_size&order=<?php echo $disp; ?>">
|
||||||
|
Size <?php if ($sort == 'file_size') { echo $order_icon; } ?>
|
||||||
|
</a>
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
<a class="text-secondary" href="?<?php echo $url_query_strings_sort; ?>&sort=file_created_at&order=<?php echo $disp; ?>">
|
||||||
|
Uploaded <?php if ($sort == 'file_created_at') { echo $order_icon; } ?>
|
||||||
|
</a>
|
||||||
|
</th>
|
||||||
|
<th></th>
|
||||||
|
<th class="text-center">Action</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
while ($row = mysqli_fetch_assoc($sql)) {
|
||||||
|
$file_id = intval($row['file_id']);
|
||||||
|
$file_name = nullable_htmlentities($row['file_name']);
|
||||||
|
$file_description = nullable_htmlentities($row['file_description']);
|
||||||
|
$file_reference_name = nullable_htmlentities($row['file_reference_name']);
|
||||||
|
$file_ext = nullable_htmlentities($row['file_ext']);
|
||||||
|
if ($file_ext == 'pdf') {
|
||||||
|
$file_icon = "file-pdf";
|
||||||
|
} elseif ($file_ext == 'gz' || $file_ext == 'tar' || $file_ext == 'zip' || $file_ext == '7z' || $file_ext == 'rar') {
|
||||||
|
$file_icon = "file-archive";
|
||||||
|
} elseif ($file_ext == 'txt' || $file_ext == 'md') {
|
||||||
|
$file_icon = "file-alt";
|
||||||
|
} elseif ($file_ext == 'msg') {
|
||||||
|
$file_icon = "envelope";
|
||||||
|
} elseif ($file_ext == 'doc' || $file_ext == 'docx' || $file_ext == 'odt') {
|
||||||
|
$file_icon = "file-word";
|
||||||
|
} elseif ($file_ext == 'xls' || $file_ext == 'xlsx' || $file_ext == 'ods') {
|
||||||
|
$file_icon = "file-excel";
|
||||||
|
} elseif ($file_ext == 'pptx' || $file_ext == 'odp') {
|
||||||
|
$file_icon = "file-powerpoint";
|
||||||
|
} elseif ($file_ext == 'mp3' || $file_ext == 'wav' || $file_ext == 'ogg') {
|
||||||
|
$file_icon = "file-audio";
|
||||||
|
} elseif ($file_ext == 'mov' || $file_ext == 'mp4' || $file_ext == 'av1') {
|
||||||
|
$file_icon = "file-video";
|
||||||
|
} elseif ($file_ext == 'jpg' || $file_ext == 'jpeg' || $file_ext == 'png' || $file_ext == 'gif' || $file_ext == 'webp' || $file_ext == 'bmp' || $file_ext == 'tif') {
|
||||||
|
$file_icon = "file-image";
|
||||||
|
} else {
|
||||||
|
$file_icon = "file";
|
||||||
|
}
|
||||||
|
$file_size = intval($row['file_size']);
|
||||||
|
$file_size_KB = number_format($file_size / 1024);
|
||||||
|
$file_mime_type = nullable_htmlentities($row['file_mime_type']);
|
||||||
|
$file_size = intval($row['file_size']);
|
||||||
|
$file_uploaded_by = nullable_htmlentities($row['user_name']);
|
||||||
|
$file_created_at = nullable_htmlentities($row['file_created_at']);
|
||||||
|
$file_folder_id = intval($row['file_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 = 'File'
|
||||||
|
AND item_related_id = $file_id
|
||||||
|
LIMIT 1"
|
||||||
|
);
|
||||||
|
$file_shared = (mysqli_num_rows($sql_shared) > 0) ? true : false;
|
||||||
|
if ($file_shared) {
|
||||||
|
$row = mysqli_fetch_assoc($sql_shared);
|
||||||
|
$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="file_ids[]" value="<?php echo $file_id ?>">
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a href="<?php echo "../uploads/clients/$client_id/$file_reference_name"; ?>" target="_blank">
|
||||||
|
<div class="media">
|
||||||
|
<i class="fa fa-fw fa-2x fa-<?php echo $file_icon; ?> text-dark mr-3"></i>
|
||||||
|
<div class="media-body">
|
||||||
|
<p>
|
||||||
|
<?php echo basename($file_name); ?>
|
||||||
|
<br>
|
||||||
|
<small class="text-secondary"><?php echo $file_description; ?></small>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
<td><?php echo $file_mime_type; ?></td>
|
||||||
|
<td><?php echo $file_size_KB; ?> KB</td>
|
||||||
|
<td>
|
||||||
|
<?php echo $file_created_at; ?>
|
||||||
|
<div class="text-secondary mt-1"><?php echo $file_uploaded_by; ?></div>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?php if ($file_shared) { ?>
|
||||||
|
<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" href="<?php echo "../uploads/clients/$client_id/$file_reference_name"; ?>" download="<?php echo $file_name; ?>">
|
||||||
|
<i class="fas fa-fw fa-cloud-download-alt mr-2"></i>Download
|
||||||
|
</a>
|
||||||
|
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#shareModal" onclick="populateShareModal(<?php echo "$client_id, 'File', $file_id"; ?>)">
|
||||||
|
<i class="fas fa-fw fa-share mr-2"></i>Share
|
||||||
|
</a>
|
||||||
|
<a class="dropdown-item ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/file/file_rename.php?id=<?= $file_id ?>">
|
||||||
|
<i class="fas fa-fw fa-edit mr-2"></i>Rename
|
||||||
|
</a>
|
||||||
|
<a class="dropdown-item ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/file/file_move.php?id=<?= $file_id ?>">
|
||||||
|
<i class="fas fa-fw fa-exchange-alt mr-2"></i>Move
|
||||||
|
</a>
|
||||||
|
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#linkAssetToFileModal<?php echo $file_id; ?>">
|
||||||
|
<i class="fas fa-fw fa-desktop mr-2"></i>Asset
|
||||||
|
</a>
|
||||||
|
<div class="dropdown-divider"></div>
|
||||||
|
<a class="dropdown-item text-danger confirm-link" href="post.php?archive_file=<?php echo $file_id; ?>">
|
||||||
|
<i class="fas fa-fw fa-archive mr-2"></i>Archive
|
||||||
|
</a>
|
||||||
|
<?php if ($session_user_role == 3) { ?>
|
||||||
|
<div class="dropdown-divider"></div>
|
||||||
|
<a class="dropdown-item text-danger text-bold" href="#" data-toggle="modal" data-target="#deleteFileModal" onclick="populateFileDeleteModal(<?php echo "$file_id , '$file_name'" ?>)">
|
||||||
|
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
||||||
|
</a>
|
||||||
|
<?php } ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
require "modals/file/file_link_asset.php";
|
||||||
|
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<?php require_once "../includes/filter_footer.php"; ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function openModal(index) {
|
||||||
|
currentIndex = index;
|
||||||
|
updateModalContent();
|
||||||
|
$('#viewFileModal').modal('show');
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateModalContent() {
|
||||||
|
document.getElementById('modalTitle').innerText = files[currentIndex].name;
|
||||||
|
document.getElementById('modalImage').src = files[currentIndex].preview;
|
||||||
|
}
|
||||||
|
|
||||||
|
function nextFile() {
|
||||||
|
currentIndex = (currentIndex + 1) % files.length; // loop around
|
||||||
|
updateModalContent();
|
||||||
|
}
|
||||||
|
|
||||||
|
function prevFile() {
|
||||||
|
currentIndex = (currentIndex - 1 + files.length) % files.length; // loop around
|
||||||
|
updateModalContent();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script src="../js/bulk_actions.js"></script>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
require_once "modals/share_modal.php";
|
||||||
|
require_once "modals/file/file_delete.php";
|
||||||
|
require_once "../includes/footer.php";
|
||||||
@@ -12,7 +12,17 @@ if (isset($_GET['client_id'])) {
|
|||||||
$client_id = intval($_GET['client_id']);
|
$client_id = intval($_GET['client_id']);
|
||||||
|
|
||||||
// Client Access Check
|
// Client Access Check
|
||||||
enforceClientAccess();
|
// Ensure the user has permission to access this client (admins ignored)
|
||||||
|
if (!in_array($client_id, $client_access_array) AND !empty($client_access_string) AND !$session_is_admin) {
|
||||||
|
// Logging
|
||||||
|
mysqli_query($mysqli, "INSERT INTO logs SET log_type = 'Client', log_action = 'Access', log_description = '$session_name was denied permission from accessing client', log_ip = '$session_ip', log_user_agent = '$session_user_agent', log_client_id = $client_id, log_user_id = $session_user_id, log_entity_id = $client_id");
|
||||||
|
|
||||||
|
$_SESSION['alert_type'] = "error";
|
||||||
|
$_SESSION['alert_message'] = "Access Denied - You do not have permission to access that client!";
|
||||||
|
|
||||||
|
echo "<script>window.history.back();</script>";
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
$sql = mysqli_query($mysqli, "UPDATE clients SET client_accessed_at = NOW() WHERE client_id = $client_id");
|
$sql = mysqli_query($mysqli, "UPDATE clients SET client_accessed_at = NOW() WHERE client_id = $client_id");
|
||||||
|
|
||||||
@@ -126,6 +136,7 @@ if (isset($_GET['client_id'])) {
|
|||||||
$credit_balance = floatval($row['credit_balance']);
|
$credit_balance = floatval($row['credit_balance']);
|
||||||
|
|
||||||
// Badge Counts
|
// Badge Counts
|
||||||
|
|
||||||
$row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('contact_id') AS num FROM contacts WHERE contact_archived_at IS NULL AND contact_client_id = $client_id"));
|
$row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('contact_id') AS num FROM contacts WHERE contact_archived_at IS NULL AND contact_client_id = $client_id"));
|
||||||
$num_contacts = $row['num'];
|
$num_contacts = $row['num'];
|
||||||
|
|
||||||
|
|||||||
@@ -13,12 +13,6 @@
|
|||||||
<i class="fas fa-fw fa-ellipsis-v"></i>
|
<i class="fas fa-fw fa-ellipsis-v"></i>
|
||||||
</button>
|
</button>
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
<?php if (lookupUserPermission("module_support") >= 2) { ?>
|
|
||||||
<a class="dropdown-item ajax-modal" href="#" data-modal-url="modals/ticket/ticket_add_v2.php?client_id=<?= $client_id ?>" data-modal-size="lg">
|
|
||||||
<i class="fas fa-fw fa-life-ring mr-2"></i>New Ticket
|
|
||||||
</a>
|
|
||||||
<?php } ?>
|
|
||||||
<div class="dropdown-divider"></div>
|
|
||||||
<a class="dropdown-item ajax-modal" href="#"
|
<a class="dropdown-item ajax-modal" href="#"
|
||||||
data-modal-url="modals/client/client_edit.php?id=<?= $client_id ?>">
|
data-modal-url="modals/client/client_edit.php?id=<?= $client_id ?>">
|
||||||
<i class="fas fa-fw fa-edit mr-2"></i>Edit Client
|
<i class="fas fa-fw fa-edit mr-2"></i>Edit Client
|
||||||
@@ -45,8 +39,8 @@
|
|||||||
</a>
|
</a>
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-primary confirm-link" href="post.php?restore_client=<?= $client_id ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<a class="dropdown-item text-primary confirm-link" href="post.php?undo_archive_client=<?php echo $client_id; ?>">
|
||||||
<i class="fas fa-fw fa-archive mr-2"></i>Restore Client
|
<i class="fas fa-fw fa-archive mr-2"></i>Unarchive Client
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
|
|||||||
@@ -226,12 +226,12 @@ if (isset($_GET['invoice_id'])) {
|
|||||||
</button>
|
</button>
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
<?php if (!empty($config_smtp_host) && !empty($contact_email)) { ?>
|
<?php if (!empty($config_smtp_host) && !empty($contact_email)) { ?>
|
||||||
<a class="dropdown-item" href="post.php?email_invoice=<?= $invoice_id ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<a class="dropdown-item" href="post.php?email_invoice=<?php echo $invoice_id; ?>">
|
||||||
<i class="fas fa-fw fa-paper-plane mr-2"></i>Send Email
|
<i class="fas fa-fw fa-paper-plane mr-2"></i>Send Email
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<a class="dropdown-item" href="post.php?mark_invoice_sent=<?= $invoice_id ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<a class="dropdown-item" href="post.php?mark_invoice_sent=<?php echo $invoice_id; ?>">
|
||||||
<i class="fas fa-fw fa-check mr-2"></i>Mark Sent
|
<i class="fas fa-fw fa-check mr-2"></i>Mark Sent
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -254,7 +254,7 @@ if (isset($_GET['invoice_id'])) {
|
|||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<?php if (($invoice_status == 'Sent' || $invoice_status == 'Viewed') && $invoice_amount == 0 && $invoice_status !== 'Non-Billable') { ?>
|
<?php if (($invoice_status == 'Sent' || $invoice_status == 'Viewed') && $invoice_amount == 0 && $invoice_status !== 'Non-Billable') { ?>
|
||||||
<a class="btn btn-dark" href="post.php?mark_invoice_non-billable=<?= $invoice_id ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<a class="btn btn-dark" href="post.php?mark_invoice_non-billable=<?php echo $invoice_id; ?>">
|
||||||
Mark Non-Billable
|
Mark Non-Billable
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
@@ -285,14 +285,14 @@ if (isset($_GET['invoice_id'])) {
|
|||||||
<a class="dropdown-item" href="#" onclick="window.print();">
|
<a class="dropdown-item" href="#" onclick="window.print();">
|
||||||
<i class="fa fa-fw fa-print text-secondary mr-2"></i>Print
|
<i class="fa fa-fw fa-print text-secondary mr-2"></i>Print
|
||||||
</a>
|
</a>
|
||||||
<a class="dropdown-item" href="post.php?export_invoice_pdf=<?= $invoice_id ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>" target="_blank">
|
<a class="dropdown-item" href="post.php?export_invoice_pdf=<?php echo $invoice_id; ?>" target="_blank">
|
||||||
<i class="fa fa-fw fa-download text-secondary mr-2"></i>Download PDF
|
<i class="fa fa-fw fa-download text-secondary mr-2"></i>Download PDF
|
||||||
</a>
|
</a>
|
||||||
<a class="dropdown-item" href="post.php?export_invoice_packing_slip=<?= $invoice_id ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>" target="_blank">
|
<a class="dropdown-item" href="post.php?export_invoice_packing_slip=<?php echo $invoice_id; ?>" target="_blank">
|
||||||
<i class="fa fa-fw fa-box-open text-secondary mr-2"></i>Packing Slip
|
<i class="fa fa-fw fa-box-open text-secondary mr-2"></i>Packing Slip
|
||||||
</a>
|
</a>
|
||||||
<?php if (!empty($config_smtp_host) && !empty($contact_email)) { ?>
|
<?php if (!empty($config_smtp_host) && !empty($contact_email)) { ?>
|
||||||
<a class="dropdown-item" href="post.php?email_invoice=<?= $invoice_id ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<a class="dropdown-item" href="post.php?email_invoice=<?php echo $invoice_id; ?>">
|
||||||
<i class="fa fa-fw fa-paper-plane text-secondary mr-2"></i>Send Email
|
<i class="fa fa-fw fa-paper-plane text-secondary mr-2"></i>Send Email
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
@@ -301,12 +301,12 @@ if (isset($_GET['invoice_id'])) {
|
|||||||
</a>
|
</a>
|
||||||
<?php if ($invoice_status !== 'Cancelled' && $invoice_status !== 'Paid' && $invoice_status !== 'Non-Billable') { ?>
|
<?php if ($invoice_status !== 'Cancelled' && $invoice_status !== 'Paid' && $invoice_status !== 'Non-Billable') { ?>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-danger text-bold confirm-link" href="post.php?cancel_invoice=<?= $invoice_id ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<a class="dropdown-item text-danger text-bold confirm-link" href="post.php?cancel_invoice=<?php echo $invoice_id; ?>">
|
||||||
<i class="fa fa-fw fa-times mr-2"></i>Cancel
|
<i class="fa fa-fw fa-times mr-2"></i>Cancel
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-danger text-bold confirm-link" href="post.php?delete_invoice=<?= $invoice_id ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<a class="dropdown-item text-danger text-bold confirm-link" href="post.php?delete_invoice=<?php echo $invoice_id; ?>">
|
||||||
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -426,11 +426,11 @@ if (isset($_GET['invoice_id'])) {
|
|||||||
</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/invoice/invoice_item_edit.php?id=<?= $item_id ?>">
|
data-modal-url="modals/invoice/item_edit.php?id=<?= $item_id ?>">
|
||||||
<i class="fa fa-fw fa-edit mr-2"></i>Edit
|
<i class="fa fa-fw fa-edit mr-2"></i>Edit
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-danger confirm-link" href="post.php?delete_invoice_item=<?= $item_id ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>"><i class="fa fa-fw fa-trash mr-2"></i>Delete</a>
|
<a class="dropdown-item text-danger confirm-link" href="post.php?delete_invoice_item=<?php echo $item_id; ?>"><i class="fa fa-fw fa-trash mr-2"></i>Delete</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -449,7 +449,6 @@ if (isset($_GET['invoice_id'])) {
|
|||||||
?>
|
?>
|
||||||
<tr class="d-print-none" <?php if ($invoice_status == "Paid" || $invoice_status == "Cancelled" || lookupUserPermission("module_sales") <= 1) { echo "hidden"; } ?>>
|
<tr class="d-print-none" <?php if ($invoice_status == "Paid" || $invoice_status == "Cancelled" || lookupUserPermission("module_sales") <= 1) { echo "hidden"; } ?>>
|
||||||
<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="invoice_id" value="<?= $invoice_id ?>">
|
<input type="hidden" name="invoice_id" value="<?= $invoice_id ?>">
|
||||||
<input type="hidden" id="product_id" name="product_id" value="<?= $item_product_id ?? 0 ?>">
|
<input type="hidden" id="product_id" name="product_id" value="<?= $item_product_id ?? 0 ?>">
|
||||||
<input type="hidden" name="item_order" value="<?php echo mysqli_num_rows($sql_invoice_items) + 1; ?>">
|
<input type="hidden" name="item_order" value="<?php echo mysqli_num_rows($sql_invoice_items) + 1; ?>">
|
||||||
@@ -657,7 +656,7 @@ if (isset($_GET['invoice_id'])) {
|
|||||||
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $payment_amount, $payment_currency_code); ?></td>
|
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $payment_amount, $payment_currency_code); ?></td>
|
||||||
<td><?php echo $payment_reference; ?></td>
|
<td><?php echo $payment_reference; ?></td>
|
||||||
<td><?php echo $account_name; ?></td>
|
<td><?php echo $account_name; ?></td>
|
||||||
<td class="text-center"><a class="btn btn-light text-danger confirm-link" href="post.php?delete_payment=<?= $payment_id ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>"><i class="fa fa-times"></i></a></td>
|
<td class="text-center"><a class="btn btn-light text-danger confirm-link" href="post.php?delete_payment=<?php echo $payment_id; ?>"><i class="fa fa-times"></i></a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
@@ -817,7 +816,6 @@ new Sortable(document.querySelector('table#items tbody'), {
|
|||||||
|
|
||||||
$.post('ajax.php', {
|
$.post('ajax.php', {
|
||||||
update_invoice_items_order: true,
|
update_invoice_items_order: true,
|
||||||
csrf_token: '<?= $_SESSION['csrf_token'] ?>',
|
|
||||||
invoice_id: <?php echo $invoice_id; ?>,
|
invoice_id: <?php echo $invoice_id; ?>,
|
||||||
positions: positions
|
positions: positions
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -162,12 +162,10 @@ $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">
|
||||||
<?php if (lookupUserPermission("module_sales") >= 2) { ?>
|
|
||||||
<button type="button" class="btn btn-primary ajax-modal"
|
<button type="button" class="btn btn-primary ajax-modal"
|
||||||
data-modal-url="modals/invoice/invoice_add.php?<?= $client_url ?>">
|
data-modal-url="modals/invoice/invoice_add.php?<?= $client_url ?>">
|
||||||
<i class="fas fa-plus mr-2"></i>New Invoice
|
<i class="fas fa-plus mr-2"></i>New Invoice
|
||||||
</button>
|
</button>
|
||||||
<?php } ?>
|
|
||||||
<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 ajax-modal" href="#"
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
@@ -261,7 +259,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<table class="table table-striped table-borderless table-hover">
|
<table class="table table-striped table-borderless table-hover">
|
||||||
<thead class="text-dark <?php if ($num_rows[0] == 0) { echo "d-none"; } ?> text-nowrap">
|
<thead class="text-dark <?php if ($num_rows[0] == 0) { echo "d-none"; } ?> text-nowrap">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="bg-light checkbox-column">
|
<td class="bg-light pr-0">
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input class="form-check-input" id="selectAllCheckbox" type="checkbox" onclick="checkAll(this)">
|
<input class="form-check-input" id="selectAllCheckbox" type="checkbox" onclick="checkAll(this)">
|
||||||
</div>
|
</div>
|
||||||
@@ -372,7 +370,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="bg-light checkbox-column">
|
<td class="pr-0 bg-light">
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input class="form-check-input bulk-select" type="checkbox" name="invoice_ids[]" value="<?php echo $invoice_id ?>">
|
<input class="form-check-input bulk-select" type="checkbox" name="invoice_ids[]" value="<?php echo $invoice_id ?>">
|
||||||
</div>
|
</div>
|
||||||
@@ -423,18 +421,18 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<?php if (!empty($config_smtp_host)) { ?>
|
<?php if (!empty($config_smtp_host)) { ?>
|
||||||
<a class="dropdown-item" href="post.php?email_invoice=<?= $invoice_id ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<a class="dropdown-item" href="post.php?email_invoice=<?php echo $invoice_id; ?>">
|
||||||
<i class="fas fa-fw fa-paper-plane mr-2"></i>Send Email
|
<i class="fas fa-fw fa-paper-plane mr-2"></i>Send Email
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if ($invoice_status == 'Draft') { ?>
|
<?php if ($invoice_status == 'Draft') { ?>
|
||||||
<a class="dropdown-item" href="post.php?mark_invoice_sent=<?= $invoice_id ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<a class="dropdown-item" href="post.php?mark_invoice_sent=<?php echo $invoice_id; ?>">
|
||||||
<i class="fas fa-fw fa-check mr-2"></i>Mark Sent
|
<i class="fas fa-fw fa-check mr-2"></i>Mark Sent
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<a class="dropdown-item text-danger text-bold confirm-link" href="post.php?delete_invoice=<?= $invoice_id ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<a class="dropdown-item text-danger text-bold confirm-link" href="post.php?delete_invoice=<?php echo $invoice_id; ?>">
|
||||||
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ function populateShareModal(client_id, item_type, item_ref_id) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function generateShareLink() {
|
function generateShareLink() {
|
||||||
let csrf_token = document.getElementById("csrf_token").value;
|
|
||||||
let client_id = document.getElementById("share_client_id").value;
|
let client_id = document.getElementById("share_client_id").value;
|
||||||
let item_type = document.getElementById("share_item_type").value;
|
let item_type = document.getElementById("share_item_type").value;
|
||||||
let item_ref_id = document.getElementById("share_item_ref_id").value;
|
let item_ref_id = document.getElementById("share_item_ref_id").value;
|
||||||
@@ -37,7 +36,7 @@ function generateShareLink() {
|
|||||||
// Send a GET request to ajax.php as ajax.php?share_generate_link=true....
|
// Send a GET request to ajax.php as ajax.php?share_generate_link=true....
|
||||||
jQuery.get(
|
jQuery.get(
|
||||||
"ajax.php",
|
"ajax.php",
|
||||||
{share_generate_link: 'true', csrf_token: csrf_token, client_id: client_id, type: item_type, id: item_ref_id, note: item_note ,views: item_views, expires: item_expires, contact_email},
|
{share_generate_link: 'true', client_id: client_id, type: item_type, id: item_ref_id, note: item_note ,views: item_views, expires: item_expires, contact_email},
|
||||||
function(data) {
|
function(data) {
|
||||||
|
|
||||||
// If we get a response from ajax.php, parse it as JSON
|
// If we get a response from ajax.php, parse it as JSON
|
||||||
|
|||||||
@@ -190,8 +190,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<?php if ($archived) { ?>
|
<?php if ($archived) { ?>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<button class="dropdown-item text-info"
|
<button class="dropdown-item text-info"
|
||||||
type="submit" form="bulkActions" name="bulk_restore_locations">
|
type="submit" form="bulkActions" name="bulk_unarchive_locations">
|
||||||
<i class="fas fa-fw fa-redo mr-2"></i>Restore
|
<i class="fas fa-fw fa-redo mr-2"></i>Unarchive
|
||||||
</button>
|
</button>
|
||||||
<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"
|
||||||
@@ -220,7 +220,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<table class="table table-striped table-borderless table-hover">
|
<table class="table table-striped table-borderless table-hover">
|
||||||
<thead class="<?php if ($num_rows[0] == 0) { echo "d-none"; } ?>">
|
<thead class="<?php if ($num_rows[0] == 0) { echo "d-none"; } ?>">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="bg-light checkbox-column">
|
<td class="bg-light pr-0">
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input class="form-check-input" id="selectAllCheckbox" type="checkbox" onclick="checkAll(this)">
|
<input class="form-check-input" id="selectAllCheckbox" type="checkbox" onclick="checkAll(this)">
|
||||||
</div>
|
</div>
|
||||||
@@ -326,7 +326,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="bg-light checkbox-column">
|
<td class="pr-0 bg-light">
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input class="form-check-input bulk-select" type="checkbox" name="location_ids[]" value="<?php echo $location_id ?>">
|
<input class="form-check-input bulk-select" type="checkbox" name="location_ids[]" value="<?php echo $location_id ?>">
|
||||||
</div>
|
</div>
|
||||||
@@ -334,7 +334,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<td>
|
<td>
|
||||||
<a class="text-dark ajax-modal" href="#" data-modal-url="modals/location/location_edit.php?id=<?= $location_id ?>">
|
<a class="text-dark ajax-modal" href="#" data-modal-url="modals/location/location_edit.php?id=<?= $location_id ?>">
|
||||||
<div class="media">
|
<div class="media">
|
||||||
<i class="fa fa-fw fa-2x fa-map-marker-alt mr-2"></i>
|
<i class="fa fa-fw fa-2x fa-map-marker-alt mr-3"></i>
|
||||||
<div class="media-body">
|
<div class="media-body">
|
||||||
<div <?php if($location_primary) { echo "class='text-bold'"; } ?>><?php echo $location_name; ?></div>
|
<div <?php if($location_primary) { echo "class='text-bold'"; } ?>><?php echo $location_name; ?></div>
|
||||||
<div><small class="text-secondary"><?php echo $location_description; ?></small></div>
|
<div><small class="text-secondary"><?php echo $location_description; ?></small></div>
|
||||||
@@ -370,18 +370,18 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<?php if ($session_user_role == 3 && $location_primary == 0) { ?>
|
<?php if ($session_user_role == 3 && $location_primary == 0) { ?>
|
||||||
<?php if ($location_archived_at) { ?>
|
<?php if ($location_archived_at) { ?>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-info confirm-link" href="post.php?restore_location=<?= $location_id ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<a class="dropdown-item text-info confirm-link" href="post.php?unarchive_location=<?php echo $location_id; ?>">
|
||||||
<i class="fas fa-fw fa-redo mr-2"></i>Restore
|
<i class="fas fa-fw fa-redo mr-2"></i>Unarchive
|
||||||
</a>
|
</a>
|
||||||
<?php if ($config_destructive_deletes_enable) { ?>
|
<?php if ($config_destructive_deletes_enable) { ?>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-danger text-bold confirm-link" href="post.php?delete_location=<?= $location_id ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<a class="dropdown-item text-danger text-bold confirm-link" href="post.php?delete_location=<?php echo $location_id; ?>">
|
||||||
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-danger confirm-link" href="post.php?archive_location=<?= $location_id ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
<a class="dropdown-item text-danger confirm-link" href="post.php?archive_location=<?php echo $location_id; ?>">
|
||||||
<i class="fas fa-fw fa-archive mr-2"></i>Archive
|
<i class="fas fa-fw fa-archive mr-2"></i>Archive
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|||||||
@@ -21,9 +21,8 @@ ob_start();
|
|||||||
</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="account_id" value="<?php echo $account_id; ?>">
|
<input type="hidden" name="account_id" value="<?php echo $account_id; ?>">
|
||||||
|
<input type="hidden" name="csrf_token" value="<?php echo $_SESSION['csrf_token'] ?>">
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Account Name <strong class="text-danger">*</strong></label>
|
<label>Account Name <strong class="text-danger">*</strong></label>
|
||||||
|
|||||||
@@ -49,10 +49,10 @@ ob_start();
|
|||||||
<a class="nav-link active" data-toggle="pill" href="#pills-asset-details">Details</a>
|
<a class="nav-link active" data-toggle="pill" href="#pills-asset-details">Details</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" data-toggle="pill" href="#pills-asset-assignment">Assignment</a>
|
<a class="nav-link" data-toggle="pill" href="#pills-asset-network">Network</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" data-toggle="pill" href="#pills-asset-network">Network</a>
|
<a class="nav-link" data-toggle="pill" href="#pills-asset-assignment">Assignment</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" data-toggle="pill" href="#pills-asset-purchase">Purchase</a>
|
<a class="nav-link" data-toggle="pill" href="#pills-asset-purchase">Purchase</a>
|
||||||
@@ -97,28 +97,13 @@ ob_start();
|
|||||||
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<label>Type <strong class="text-danger">*</strong></label>
|
|
||||||
<div class="input-group">
|
|
||||||
<div class="input-group-prepend">
|
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-layer-group"></i></span>
|
|
||||||
</div>
|
|
||||||
<select class="form-control select2" name="type" required>
|
|
||||||
<option value="">- Select Type -</option>
|
|
||||||
<?php foreach($asset_types_array as $asset_type => $asset_icon) { ?>
|
|
||||||
<option><?= $asset_type ?></option>
|
|
||||||
<?php } ?>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Name <strong class="text-danger">*</strong> / <span class="text-secondary" title="Pin to Overview">Favorite</span></label>
|
<label>Name <strong class="text-danger">*</strong> / <span class="text-secondary" title="Pin to Overview">Favorite</span></label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><i class="fas fa-fw fa-tag"></i></span>
|
<span class="input-group-text"><i class="fas fa-fw fa-tag"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<input type="text" class="form-control" name="name" placeholder="e.g. SRV-DC01" maxlength="200" required autofocus>
|
<input type="text" class="form-control" name="name" placeholder="Asset name or asset tag" maxlength="200" required autofocus>
|
||||||
<div class="input-group-append">
|
<div class="input-group-append">
|
||||||
<div class="input-group-text">
|
<div class="input-group-text">
|
||||||
<label class="star-toggle mb-0" title="Favorite">
|
<label class="star-toggle mb-0" title="Favorite">
|
||||||
@@ -129,15 +114,40 @@ ob_start();
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Description</label>
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text"><i class="fa fa-fw fa-angle-right"></i></span>
|
||||||
|
</div>
|
||||||
|
<input type="text" class="form-control" name="description" placeholder="Description of the asset" maxlength="255">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Type <strong class="text-danger">*</strong></label>
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text"><i class="fa fa-fw fa-tags"></i></span>
|
||||||
|
</div>
|
||||||
|
<select class="form-control select2" name="type" required>
|
||||||
|
<option value="">- Select Type -</option>
|
||||||
|
<?php foreach($asset_types_array as $asset_type => $asset_icon) { ?>
|
||||||
|
<option><?= $asset_type ?></option>
|
||||||
|
<?php } ?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<?php //Do not display Make Model or Serial if Virtual is selected
|
<?php //Do not display Make Model or Serial if Virtual is selected
|
||||||
if ($type !== 'Virtual') { ?>
|
if ($type !== 'Virtual') { ?>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Make</label>
|
<label>Make</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-building"></i></span>
|
<span class="input-group-text"><i class="fa fa-fw fa-tag"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<input type="text" class="form-control" name="make" placeholder="e.g. Dell, HP, Lenovo" maxlength="200">
|
<input type="text" class="form-control" name="make" placeholder="Manufacturer" maxlength="200">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -145,9 +155,9 @@ ob_start();
|
|||||||
<label>Model</label>
|
<label>Model</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-cube"></i></span>
|
<span class="input-group-text"><i class="fa fa-fw fa-tag"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<input type="text" class="form-control" name="model" placeholder="e.g. PowerEdge R740" maxlength="200">
|
<input type="text" class="form-control" name="model" placeholder="Model Number" maxlength="200">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -157,7 +167,7 @@ ob_start();
|
|||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-barcode"></i></span>
|
<span class="input-group-text"><i class="fa fa-fw fa-barcode"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<input type="text" class="form-control" name="serial" placeholder="e.g. ABC1234XYZ" maxlength="200">
|
<input type="text" class="form-control" name="serial" placeholder="Serial number" maxlength="200">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
@@ -167,104 +177,13 @@ ob_start();
|
|||||||
<label>Operating System</label>
|
<label>Operating System</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><i class="fas fa-fw fa-laptop-code"></i></span>
|
<span class="input-group-text"><i class="fab fa-fw fa-windows"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<input type="text" class="form-control" name="os" id="os" placeholder="e.g. Windows 11 Pro, Ubuntu 24.04" maxlength="200">
|
<input type="text" class="form-control" name="os" id="os" placeholder="ex Windows 10 Pro" maxlength="200">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<label>Description</label>
|
|
||||||
<div class="input-group">
|
|
||||||
<div class="input-group-prepend">
|
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-align-left"></i></span>
|
|
||||||
</div>
|
|
||||||
<input type="text" class="form-control" name="description" placeholder="e.g. Domain controller for HQ" maxlength="255">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="tab-pane fade" id="pills-asset-assignment">
|
|
||||||
|
|
||||||
<?php if ($client_id) { ?>
|
|
||||||
<div class="form-group">
|
|
||||||
<label>Location</label>
|
|
||||||
<div class="input-group">
|
|
||||||
<div class="input-group-prepend">
|
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-building"></i></span>
|
|
||||||
</div>
|
|
||||||
<select class="form-control select2" name="location">
|
|
||||||
<option value="">- Select Location -</option>
|
|
||||||
<?php
|
|
||||||
|
|
||||||
while ($row = mysqli_fetch_assoc($sql_location_select)) {
|
|
||||||
$location_id = intval($row['location_id']);
|
|
||||||
$location_name = nullable_htmlentities($row['location_name']);
|
|
||||||
?>
|
|
||||||
<option value="<?= $location_id ?>"><?= $location_name ?></option>
|
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<label>Physical Location</label>
|
|
||||||
<div class="input-group">
|
|
||||||
<div class="input-group-prepend">
|
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-map-marker-alt"></i></span>
|
|
||||||
</div>
|
|
||||||
<input type="text" class="form-control" name="physical_location" placeholder="e.g. Floor 2, Closet B" maxlength="200">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php if ($client_id) { ?>
|
|
||||||
<div class="form-group">
|
|
||||||
<label>Assign To</label>
|
|
||||||
<div class="input-group">
|
|
||||||
<div class="input-group-prepend">
|
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-user-check"></i></span>
|
|
||||||
</div>
|
|
||||||
<select class="form-control select2" name="contact">
|
|
||||||
<option value="">- Select Contact -</option>
|
|
||||||
<?php
|
|
||||||
|
|
||||||
while ($row = mysqli_fetch_assoc($sql_contact_select)) {
|
|
||||||
$contact_id_select = intval($row['contact_id']);
|
|
||||||
$contact_name = nullable_htmlentities($row['contact_name']);
|
|
||||||
?>
|
|
||||||
<option
|
|
||||||
<?php if ($contact_id == $contact_id_select) {
|
|
||||||
echo "selected"; }
|
|
||||||
?>
|
|
||||||
value="<?= $contact_id_select ?>"><?= $contact_name ?>
|
|
||||||
</option>
|
|
||||||
|
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<label>Status</label>
|
|
||||||
<div class="input-group">
|
|
||||||
<div class="input-group-prepend">
|
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-circle"></i></span>
|
|
||||||
</div>
|
|
||||||
<select class="form-control select2" name="status">
|
|
||||||
<option value="">- Select Status -</option>
|
|
||||||
<?php foreach($asset_status_array as $asset_status) { ?>
|
|
||||||
<option><?php echo $asset_status; ?></option>
|
|
||||||
<?php } ?>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tab-pane fade" id="pills-asset-network">
|
<div class="tab-pane fade" id="pills-asset-network">
|
||||||
@@ -294,12 +213,12 @@ ob_start();
|
|||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>IPv4 Address / <span class="text-muted">DHCP</span></label>
|
<label>IP Address or DHCP</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-ethernet"></i></span>
|
<span class="input-group-text"><i class="fa fa-fw fa-ethernet"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<input type="text" class="form-control" name="ip" placeholder="e.g. 192.168.1.10" data-inputmask="'alias': 'ip'" data-mask>
|
<input type="text" class="form-control" name="ip" placeholder="192.168.10.250" data-inputmask="'alias': 'ip'" data-mask>
|
||||||
<div class="input-group-append">
|
<div class="input-group-append">
|
||||||
<div class="input-group-text">
|
<div class="input-group-text">
|
||||||
<input type="checkbox" name="dhcp" value="1">
|
<input type="checkbox" name="dhcp" value="1">
|
||||||
@@ -309,12 +228,12 @@ ob_start();
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>MAC Address</label>
|
<label>NAT IP Address</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-ethernet"></i></span>
|
<span class="input-group-text"><i class="fa fa-fw fa-random"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<input type="text" class="form-control" name="mac" placeholder="e.g. 00:1A:2B:3C:4D:5E" data-inputmask="'alias': 'mac'" maxlength="200" data-mask>
|
<input type="text" class="form-control" name="nat_ip" placeholder="10.52.4.55" data-inputmask="'alias': 'ip'" maxlength="200" data-mask>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -324,17 +243,17 @@ ob_start();
|
|||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-ethernet"></i></span>
|
<span class="input-group-text"><i class="fa fa-fw fa-ethernet"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<input type="text" class="form-control" name="ipv6" placeholder="e.g. 2001:db8::1" maxlength="200">
|
<input type="text" class="form-control" name="ipv6" placeholder="ex. 2001:0db8:0000:0000:0000:ff00:0042:8329" maxlength="200">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>NAT Address</label>
|
<label>MAC Address</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-exchange-alt"></i></span>
|
<span class="input-group-text"><i class="fa fa-fw fa-ethernet"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<input type="text" class="form-control" name="nat_ip" placeholder="e.g. 203.0.113.10 or 10.0.0.5" data-inputmask="'alias': 'ip'" maxlength="200" data-mask>
|
<input type="text" class="form-control" name="mac" placeholder="MAC Address" data-inputmask="'alias': 'mac'" maxlength="200" data-mask>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -344,7 +263,7 @@ ob_start();
|
|||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-globe"></i></span>
|
<span class="input-group-text"><i class="fa fa-fw fa-globe"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<input type="text" class="form-control" name="uri" placeholder="e.g. https:// or ssh://" maxlength="500">
|
<input type="text" class="form-control" name="uri" placeholder="URI http:// ftp:// ssh: etc" maxlength="500">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -354,7 +273,7 @@ ob_start();
|
|||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-globe"></i></span>
|
<span class="input-group-text"><i class="fa fa-fw fa-globe"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<input type="text" class="form-control" name="uri_2" placeholder="e.g. https:// or ssh://" maxlength="500">
|
<input type="text" class="form-control" name="uri_2" placeholder="URI http:// ftp:// ssh: etc" maxlength="500">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -364,9 +283,87 @@ ob_start();
|
|||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-globe"></i></span>
|
<span class="input-group-text"><i class="fa fa-fw fa-globe"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<input type="text" class="form-control" name="uri_client" placeholder="e.g. https:// or ssh://" maxlength="500">
|
<input type="text" class="form-control" name="uri_client" placeholder="URI http:// ftp:// ssh: etc -- viewable in Client Portal" maxlength="500">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tab-pane fade" id="pills-asset-assignment">
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Physical Location</label>
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text"><i class="fa fa-fw fa-map-marker-alt"></i></span>
|
||||||
|
</div>
|
||||||
|
<input type="text" class="form-control" name="physical_location" placeholder="Physical location eg. Floor 2, Closet B" maxlength="200">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php if ($client_id) { ?>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Location</label>
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text"><i class="fa fa-fw fa-map-marker-alt"></i></span>
|
||||||
|
</div>
|
||||||
|
<select class="form-control select2" name="location">
|
||||||
|
<option value="">- Select Location -</option>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
while ($row = mysqli_fetch_assoc($sql_location_select)) {
|
||||||
|
$location_id = intval($row['location_id']);
|
||||||
|
$location_name = nullable_htmlentities($row['location_name']);
|
||||||
|
?>
|
||||||
|
<option value="<?= $location_id ?>"><?= $location_name ?></option>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Assign To</label>
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text"><i class="fa fa-fw fa-user"></i></span>
|
||||||
|
</div>
|
||||||
|
<select class="form-control select2" name="contact">
|
||||||
|
<option value="">- Select Contact -</option>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
while ($row = mysqli_fetch_assoc($sql_contact_select)) {
|
||||||
|
$contact_id_select = intval($row['contact_id']);
|
||||||
|
$contact_name = nullable_htmlentities($row['contact_name']);
|
||||||
|
?>
|
||||||
|
<option
|
||||||
|
<?php if ($contact_id == $contact_id_select) {
|
||||||
|
echo "selected"; }
|
||||||
|
?>
|
||||||
|
value="<?= $contact_id_select ?>"><?= $contact_name ?>
|
||||||
|
</option>
|
||||||
|
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Status</label>
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text"><i class="fa fa-fw fa-info"></i></span>
|
||||||
|
</div>
|
||||||
|
<select class="form-control select2" name="status">
|
||||||
|
<option value="">- Select Status -</option>
|
||||||
|
<?php foreach($asset_status_array as $asset_status) { ?>
|
||||||
|
<option><?php echo $asset_status; ?></option>
|
||||||
|
<?php } ?>
|
||||||
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<small class="text-muted">Viewable in client portal.</small>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -401,9 +398,9 @@ ob_start();
|
|||||||
<label>Purchase Reference</label>
|
<label>Purchase Reference</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-receipt"></i></span>
|
<span class="input-group-text"><i class="fa fa-fw fa-shopping-cart"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<input type="text" class="form-control" name="purchase_reference" placeholder="e.g. INV-1045 or PO-7782">
|
<input type="text" class="form-control" name="purchase_reference" placeholder="eg. Invoice, PO Number">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -450,7 +447,7 @@ ob_start();
|
|||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-user"></i></span>
|
<span class="input-group-text"><i class="fa fa-fw fa-user"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<input type="text" class="form-control" name="username" placeholder="e.g. admin">
|
<input type="text" class="form-control" name="username" placeholder="Username">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -469,12 +466,12 @@ ob_start();
|
|||||||
<div class="tab-pane fade" id="pills-asset-notes">
|
<div class="tab-pane fade" id="pills-asset-notes">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<textarea class="form-control" rows="8" placeholder="Additional notes or configuration details" name="notes"></textarea>
|
<label>Upload Photo</label>
|
||||||
|
<input type="file" class="form-control-file" name="file" accept="image/*">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Upload Photo</label>
|
<textarea class="form-control" rows="8" placeholder="Enter some notes" name="notes"></textarea>
|
||||||
<input type="file" class="form-control-file" name="file" accept="image/*">
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|||||||
@@ -62,10 +62,10 @@ ob_start();
|
|||||||
<a class="nav-link active" data-toggle="pill" href="#pillsDetailsCopy<?php echo $asset_id; ?>">Details</a>
|
<a class="nav-link active" data-toggle="pill" href="#pillsDetailsCopy<?php echo $asset_id; ?>">Details</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" data-toggle="pill" href="#pillsAssignmentCopy<?php echo $asset_id; ?>">Assignment</a>
|
<a class="nav-link" data-toggle="pill" href="#pillsNetworkCopy<?php echo $asset_id; ?>">Network</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" data-toggle="pill" href="#pillsNetworkCopy<?php echo $asset_id; ?>">Network</a>
|
<a class="nav-link" data-toggle="pill" href="#pillsAssignmentCopy<?php echo $asset_id; ?>">Assignment</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" data-toggle="pill" href="#pillsPurchaseCopy<?php echo $asset_id; ?>">Purchase</a>
|
<a class="nav-link" data-toggle="pill" href="#pillsPurchaseCopy<?php echo $asset_id; ?>">Purchase</a>
|
||||||
@@ -84,20 +84,6 @@ ob_start();
|
|||||||
|
|
||||||
<div class="tab-pane fade show active" id="pillsDetailsCopy<?php echo $asset_id; ?>">
|
<div class="tab-pane fade show active" id="pillsDetailsCopy<?php echo $asset_id; ?>">
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<label>Type <strong class="text-danger">*</strong></label>
|
|
||||||
<div class="input-group">
|
|
||||||
<div class="input-group-prepend">
|
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-layer-group"></i></span>
|
|
||||||
</div>
|
|
||||||
<select class="form-control select2" name="type" required>
|
|
||||||
<?php foreach($asset_types_array as $asset_type_select => $asset_icon_select) { ?>
|
|
||||||
<option <?php if ($asset_type_select == $asset_type) { echo "selected"; } ?>><?php echo $asset_type_select; ?></option>
|
|
||||||
<?php } ?>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Name <strong class="text-danger">*</strong></label>
|
<label>Name <strong class="text-danger">*</strong></label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
@@ -108,13 +94,37 @@ ob_start();
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Description</label>
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text"><i class="fa fa-fw fa-angle-right"></i></span>
|
||||||
|
</div>
|
||||||
|
<input type="text" class="form-control" name="description" placeholder="Description of the asset" value="<?php echo $asset_description; ?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Type <strong class="text-danger">*</strong></label>
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text"><i class="fa fa-fw fa-tags"></i></span>
|
||||||
|
</div>
|
||||||
|
<select class="form-control select2" name="type" required>
|
||||||
|
<?php foreach($asset_types_array as $asset_type_select => $asset_icon_select) { ?>
|
||||||
|
<option <?php if ($asset_type_select == $asset_type) { echo "selected"; } ?>><?php echo $asset_type_select; ?></option>
|
||||||
|
<?php } ?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<?php //Do not display Make Model or Serial if Virtual is selected
|
<?php //Do not display Make Model or Serial if Virtual is selected
|
||||||
if ($asset_type !== 'virtual') { ?>
|
if ($asset_type !== 'virtual') { ?>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Make </label>
|
<label>Make </label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-building"></i></span>
|
<span class="input-group-text"><i class="fa fa-fw fa-tag"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<input type="text" class="form-control" name="make" placeholder="Manufacturer" value="<?php echo $asset_make; ?>">
|
<input type="text" class="form-control" name="make" placeholder="Manufacturer" value="<?php echo $asset_make; ?>">
|
||||||
</div>
|
</div>
|
||||||
@@ -124,7 +134,7 @@ ob_start();
|
|||||||
<label>Model</label>
|
<label>Model</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-cube"></i></span>
|
<span class="input-group-text"><i class="fa fa-fw fa-tag"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<input type="text" class="form-control" name="model" placeholder="Model Number" value="<?php echo $asset_model; ?>">
|
<input type="text" class="form-control" name="model" placeholder="Model Number" value="<?php echo $asset_model; ?>">
|
||||||
</div>
|
</div>
|
||||||
@@ -146,95 +156,13 @@ ob_start();
|
|||||||
<label>Operating System</label>
|
<label>Operating System</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><i class="fas fa-fw fa-laptop-code"></i></span>
|
<span class="input-group-text"><i class="fab fa-fw fa-windows"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<input type="text" class="form-control" name="os" placeholder="ex Windows 10 Pro" value="<?php echo $asset_os; ?>">
|
<input type="text" class="form-control" name="os" placeholder="ex Windows 10 Pro" value="<?php echo $asset_os; ?>">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<label>Description</label>
|
|
||||||
<div class="input-group">
|
|
||||||
<div class="input-group-prepend">
|
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-align-left"></i></span>
|
|
||||||
</div>
|
|
||||||
<input type="text" class="form-control" name="description" placeholder="Description of the asset" value="<?php echo $asset_description; ?>">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="tab-pane fade" id="pillsAssignmentCopy<?php echo $asset_id; ?>">
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<label>Location</label>
|
|
||||||
<div class="input-group">
|
|
||||||
<div class="input-group-prepend">
|
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-building"></i></span>
|
|
||||||
</div>
|
|
||||||
<select class="form-control select2" name="location">
|
|
||||||
<option value="">- Select Location -</option>
|
|
||||||
<?php
|
|
||||||
|
|
||||||
$sql_locations = mysqli_query($mysqli, "SELECT * FROM locations WHERE location_archived_at IS NULL AND location_client_id = $client_id ORDER BY location_name ASC");
|
|
||||||
while ($row = mysqli_fetch_assoc($sql_locations)) {
|
|
||||||
$location_id_select = intval($row['location_id']);
|
|
||||||
$location_name_select = nullable_htmlentities($row['location_name']);
|
|
||||||
?>
|
|
||||||
<option <?php if ($asset_location_id == $location_id_select) { echo "selected"; } ?> value="<?php echo $location_id_select; ?>"><?php echo $location_name_select; ?></option>
|
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<label>Physical Location</label>
|
|
||||||
<div class="input-group">
|
|
||||||
<div class="input-group-prepend">
|
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-map-marker-alt"></i></span>
|
|
||||||
</div>
|
|
||||||
<input type="text" class="form-control" name="physical_location" placeholder="Physical location eg. Floor 2, Closet B">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<label>Assign To</label>
|
|
||||||
<div class="input-group">
|
|
||||||
<div class="input-group-prepend">
|
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-user-check"></i></span>
|
|
||||||
</div>
|
|
||||||
<select class="form-control select2" name="contact">
|
|
||||||
<option value="">- Select Contact -</option>
|
|
||||||
<?php
|
|
||||||
|
|
||||||
$sql_contacts = mysqli_query($mysqli, "SELECT * FROM contacts WHERE contact_archived_at IS NULL AND contact_client_id = $client_id ORDER BY contact_name ASC");
|
|
||||||
while ($row = mysqli_fetch_assoc($sql_contacts)) {
|
|
||||||
$contact_id_select = intval($row['contact_id']);
|
|
||||||
$contact_name_select = nullable_htmlentities($row['contact_name']);
|
|
||||||
?>
|
|
||||||
<option value="<?php echo $contact_id_select; ?>"><?php echo $contact_name_select; ?></option>
|
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<label>Status</label>
|
|
||||||
<div class="input-group">
|
|
||||||
<div class="input-group-prepend">
|
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-circle"></i></span>
|
|
||||||
</div>
|
|
||||||
<select class="form-control select2" name="status">
|
|
||||||
<?php foreach($asset_status_array as $asset_status_select) { ?>
|
|
||||||
<option <?php if ($asset_status_select == $asset_status) { echo "selected"; } ?>><?php echo $asset_status_select; ?></option>
|
|
||||||
<?php } ?>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tab-pane fade" id="pillsNetworkCopy<?php echo $asset_id; ?>">
|
<div class="tab-pane fade" id="pillsNetworkCopy<?php echo $asset_id; ?>">
|
||||||
@@ -264,7 +192,7 @@ ob_start();
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>IP Address / <span class="text-muted">DHCP</span></label>
|
<label>IP Address or DHCP</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-ethernet"></i></span>
|
<span class="input-group-text"><i class="fa fa-fw fa-ethernet"></i></span>
|
||||||
@@ -279,12 +207,12 @@ ob_start();
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>MAC Address</label>
|
<label>NAT IP</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-ethernet"></i></span>
|
<span class="input-group-text"><i class="fa fa-fw fa-random"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<input type="text" class="form-control" name="mac" placeholder="00:11:22:AA:BB:CC" data-inputmask="'alias': 'mac'" data-mask>
|
<input type="text" class="form-control" name="nat_ip" placeholder="10.52.4.55" data-inputmask="'alias': 'ip'" data-mask>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -294,17 +222,17 @@ ob_start();
|
|||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-ethernet"></i></span>
|
<span class="input-group-text"><i class="fa fa-fw fa-ethernet"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<input type="text" class="form-control" name="ipv6" value="<?php echo $asset_ipv6; ?>" placeholder="2001:0db8:1000::3">
|
<input type="text" class="form-control" name="ipv6" value="<?php echo $asset_ipv6; ?>" placeholder="ex. 2001:0db8:0000:0000:0000:ff00:0042:8329">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>NAT Address</label>
|
<label>MAC Address</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-exchange-alt"></i></span>
|
<span class="input-group-text"><i class="fa fa-fw fa-ethernet"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<input type="text" class="form-control" name="nat_ip" placeholder="10.52.4.55" data-inputmask="'alias': 'ip'" data-mask>
|
<input type="text" class="form-control" name="mac" placeholder="MAC Address" data-inputmask="'alias': 'mac'" data-mask>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -330,6 +258,78 @@ ob_start();
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="tab-pane fade" id="pillsAssignmentCopy<?php echo $asset_id; ?>">
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Physical Location</label>
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text"><i class="fa fa-fw fa-map-marker-alt"></i></span>
|
||||||
|
</div>
|
||||||
|
<input type="text" class="form-control" name="physical_location" placeholder="Physical location eg. Floor 2, Closet B">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Location</label>
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text"><i class="fa fa-fw fa-map-marker-alt"></i></span>
|
||||||
|
</div>
|
||||||
|
<select class="form-control select2" name="location">
|
||||||
|
<option value="">- Select Location -</option>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$sql_locations = mysqli_query($mysqli, "SELECT * FROM locations WHERE location_archived_at IS NULL AND location_client_id = $client_id ORDER BY location_name ASC");
|
||||||
|
while ($row = mysqli_fetch_assoc($sql_locations)) {
|
||||||
|
$location_id_select = intval($row['location_id']);
|
||||||
|
$location_name_select = nullable_htmlentities($row['location_name']);
|
||||||
|
?>
|
||||||
|
<option <?php if ($asset_location_id == $location_id_select) { echo "selected"; } ?> value="<?php echo $location_id_select; ?>"><?php echo $location_name_select; ?></option>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Assign To</label>
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text"><i class="fa fa-fw fa-user"></i></span>
|
||||||
|
</div>
|
||||||
|
<select class="form-control select2" name="contact">
|
||||||
|
<option value="">- Select Contact -</option>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$sql_contacts = mysqli_query($mysqli, "SELECT * FROM contacts WHERE contact_archived_at IS NULL AND contact_client_id = $client_id ORDER BY contact_name ASC");
|
||||||
|
while ($row = mysqli_fetch_assoc($sql_contacts)) {
|
||||||
|
$contact_id_select = intval($row['contact_id']);
|
||||||
|
$contact_name_select = nullable_htmlentities($row['contact_name']);
|
||||||
|
?>
|
||||||
|
<option value="<?php echo $contact_id_select; ?>"><?php echo $contact_name_select; ?></option>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Status</label>
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text"><i class="fa fa-fw fa-info"></i></span>
|
||||||
|
</div>
|
||||||
|
<select class="form-control select2" name="status">
|
||||||
|
<?php foreach($asset_status_array as $asset_status_select) { ?>
|
||||||
|
<option <?php if ($asset_status_select == $asset_status) { echo "selected"; } ?>><?php echo $asset_status_select; ?></option>
|
||||||
|
<?php } ?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="tab-pane fade" id="pillsPurchaseCopy<?php echo $asset_id; ?>">
|
<div class="tab-pane fade" id="pillsPurchaseCopy<?php echo $asset_id; ?>">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -379,7 +379,7 @@ ob_start();
|
|||||||
<label>Purchase Date</label>
|
<label>Purchase Date</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-receipt"></i></span>
|
<span class="input-group-text"><i class="fa fa-fw fa-shopping-cart"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<input type="date" class="form-control" name="purchase_date" max="2999-12-31" value="<?php echo $asset_purchase_date; ?>">
|
<input type="date" class="form-control" name="purchase_date" max="2999-12-31" value="<?php echo $asset_purchase_date; ?>">
|
||||||
</div>
|
</div>
|
||||||
@@ -425,12 +425,12 @@ ob_start();
|
|||||||
<div class="tab-pane fade" id="pillsNotesCopy<?php echo $asset_id; ?>">
|
<div class="tab-pane fade" id="pillsNotesCopy<?php echo $asset_id; ?>">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<textarea class="form-control" rows="8" placeholder="Enter some notes" name="notes"><?php echo $asset_notes; ?></textarea>
|
<label>Upload Photo</label>
|
||||||
|
<input type="file" class="form-control-file" name="file">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Upload Photo</label>
|
<textarea class="form-control" rows="8" placeholder="Enter some notes" name="notes"><?php echo $asset_notes; ?></textarea>
|
||||||
<input type="file" class="form-control-file" name="file">
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -234,56 +234,41 @@ ob_start();
|
|||||||
|
|
||||||
<ul class="nav nav-pills nav-justified mb-3">
|
<ul class="nav nav-pills nav-justified mb-3">
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link active" data-toggle="pill" href="#pills-asset-details">
|
<a class="nav-link active" data-toggle="pill" href="#pills-asset-details<?php echo $asset_id; ?>"><i class="fas fa-fw fa-<?php echo $device_icon; ?> fa-2x"></i><br>Details</a>
|
||||||
<i class="fas fa-fw fa-<?= $device_icon ?> mr-2"></i>Details
|
|
||||||
</a>
|
|
||||||
</li>
|
</li>
|
||||||
<?php if ($interface_count) { ?>
|
<?php if ($interface_count) { ?>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" data-toggle="pill" href="#pills-asset-interfaces">
|
<a class="nav-link" data-toggle="pill" href="#pills-asset-interfaces<?php echo $asset_id; ?>"><i class="fas fa-fw fa-ethernet fa-2x"></i><br>Interfaces (<?php echo $interface_count; ?>)</a>
|
||||||
<i class="fas fa-fw fa-ethernet mr-2"></i>Interfaces (<?= $interface_count ?>)
|
|
||||||
</a>
|
|
||||||
</li>
|
</li>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if ($credential_count) { ?>
|
<?php if ($credential_count) { ?>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" data-toggle="pill" href="#pills-asset-credentials">
|
<a class="nav-link" data-toggle="pill" href="#pills-asset-credentials<?php echo $asset_id; ?>"><i class="fas fa-fw fa-key fa-2x"></i><br>Credentials (<?php echo $credential_count; ?>)</a>
|
||||||
<i class="fas fa-fw fa-key mr-2"></i>Credentials (<?= $credential_count ?>)
|
|
||||||
</a>
|
|
||||||
</li>
|
</li>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if ($ticket_count) { ?>
|
<?php if ($ticket_count) { ?>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" data-toggle="pill" href="#pills-asset-tickets">
|
<a class="nav-link" data-toggle="pill" href="#pills-asset-tickets<?php echo $asset_id; ?>"><i class="fas fa-fw fa-life-ring fa-2x"></i><br>Tickets (<?php echo $ticket_count; ?>)</a>
|
||||||
<i class="fas fa-fw fa-life-ring mr-2"></i>Tickets (<?= $ticket_count ?>)
|
|
||||||
</a>
|
|
||||||
</li>
|
</li>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if ($recurring_ticket_count) { ?>
|
<?php if ($recurring_ticket_count) { ?>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" data-toggle="pill" href="#pills-asset-recurring-tickets">
|
<a class="nav-link" data-toggle="pill" href="#pills-asset-recurring-tickets<?php echo $asset_id; ?>"><i class="fas fa-fw fa-redo-alt fa-2x"></i><br>Recurring Tickets (<?php echo $recurring_ticket_count; ?>)</a>
|
||||||
<i class="fas fa-fw fa-redo-alt mr-2"></i>Recurring Tickets (<?= $recurring_ticket_count ?>)
|
|
||||||
</a>
|
|
||||||
</li>
|
</li>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if ($software_count) { ?>
|
<?php if ($software_count) { ?>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" data-toggle="pill" href="#pills-asset-licenses">
|
<a class="nav-link" data-toggle="pill" href="#pills-asset-licenses<?php echo $asset_id; ?>"><i class="fas fa-fw fa-cube fa-2x"></i><br>Licenses (<?php echo $software_count; ?>)</a>
|
||||||
<i class="fas fa-fw fa-cube mr-2"></i>Licenses (<?= $software_count ?>)
|
|
||||||
</a>
|
|
||||||
</li>
|
</li>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if ($document_count) { ?>
|
<?php if ($document_count) { ?>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" data-toggle="pill" href="#pills-asset-documents">
|
<a class="nav-link" data-toggle="pill" href="#pills-asset-documents<?php echo $asset_id; ?>"><i class="fas fa-fw fa-file-alt fa-2x"></i><br>Documents (<?php echo $document_count; ?>)</a>
|
||||||
<i class="fas fa-fw fa-file-alt mr-2"></i>Documents (<?= $document_count ?>)
|
|
||||||
</a>
|
|
||||||
</li>
|
</li>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if ($file_count) { ?>
|
<?php if ($file_count) { ?>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" data-toggle="pill" href="#pills-asset-files">
|
<a class="nav-link" data-toggle="pill" href="#pills-asset-files<?php echo $asset_id; ?>"><i class="fas fa-fw fa-briefcase fa-2x"></i><br>Files (<?php echo $file_count; ?>)</a>
|
||||||
<i class="fas fa-fw fa-briefcase mr-2"></i>Files (<?= $file_count ?>)</a>
|
|
||||||
</li>
|
</li>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -292,7 +277,7 @@ ob_start();
|
|||||||
|
|
||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
|
|
||||||
<div class="tab-pane fade show active" id="pills-asset-details">
|
<div class="tab-pane fade show active" id="pills-asset-details<?php echo $asset_id; ?>">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<h3 class="text-bold"><i class="fa fa-fw text-secondary fa-<?= $device_icon ?> mr-2"></i><?= $asset_name ?>
|
<h3 class="text-bold"><i class="fa fa-fw text-secondary fa-<?= $device_icon ?> mr-2"></i><?= $asset_name ?>
|
||||||
@@ -408,7 +393,6 @@ ob_start();
|
|||||||
"ajax.php",
|
"ajax.php",
|
||||||
{
|
{
|
||||||
asset_set_notes: 'TRUE',
|
asset_set_notes: 'TRUE',
|
||||||
csrf_token: '<?= $_SESSION['csrf_token'] ?>',
|
|
||||||
asset_id: asset_id,
|
asset_id: asset_id,
|
||||||
notes: notes
|
notes: notes
|
||||||
}
|
}
|
||||||
@@ -417,17 +401,17 @@ ob_start();
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?php if ($interface_count) { ?>
|
<?php if ($interface_count) { ?>
|
||||||
<div class="tab-pane fade" id="pills-asset-interfaces">
|
<div class="tab-pane fade" id="pills-asset-interfaces<?php echo $asset_id; ?>">
|
||||||
|
|
||||||
<div class="table-responsive-sm">
|
<div class="table-responsive-sm">
|
||||||
<table class="table table-striped table-hover table-sm">
|
<table class="table table-striped table-borderless table-hover table-sm">
|
||||||
<thead class="<?php if ($interface_count == 0) { echo "d-none"; } ?>">
|
<thead class="<?php if ($interface_count == 0) { echo "d-none"; } ?>">
|
||||||
<tr>
|
<tr>
|
||||||
<th>Name / Port</th>
|
<th>Name / Port</th>
|
||||||
<th>Type</th>
|
<th>Type</th>
|
||||||
<th>Network</th>
|
|
||||||
<th>IP</th>
|
|
||||||
<th>MAC</th>
|
<th>MAC</th>
|
||||||
|
<th>IP</th>
|
||||||
|
<th>Network</th>
|
||||||
<th>Connected To</th>
|
<th>Connected To</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -480,12 +464,9 @@ ob_start();
|
|||||||
<?php echo $interface_name; ?> <?php if($interface_primary) { echo "<small class='text-primary'>(Primary)</small>"; } ?>
|
<?php echo $interface_name; ?> <?php if($interface_primary) { echo "<small class='text-primary'>(Primary)</small>"; } ?>
|
||||||
</td>
|
</td>
|
||||||
<td><?php echo $interface_type_display; ?></td>
|
<td><?php echo $interface_type_display; ?></td>
|
||||||
<td><?php echo $network_name_display; ?></td>
|
|
||||||
<td>
|
|
||||||
<?php echo $interface_ip_display; ?>
|
|
||||||
<div><small class="text-secondary"><?= $interface_ipv6 ?></div>
|
|
||||||
</td>
|
|
||||||
<td><?php echo $interface_mac_display; ?></td>
|
<td><?php echo $interface_mac_display; ?></td>
|
||||||
|
<td><?php echo $interface_ip_display; ?></td>
|
||||||
|
<td><?php echo $network_name_display; ?></td>
|
||||||
<td><?php echo $connected_to_display; ?></td>
|
<td><?php echo $connected_to_display; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
@@ -496,7 +477,7 @@ ob_start();
|
|||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<?php if ($credential_count) { ?>
|
<?php if ($credential_count) { ?>
|
||||||
<div class="tab-pane fade" id="pills-asset-credentials">
|
<div class="tab-pane fade" id="pills-asset-credentials<?php echo $asset_id; ?>">
|
||||||
<div class="table-responsive-sm-sm">
|
<div class="table-responsive-sm-sm">
|
||||||
<table class="table table-sm table-striped table-borderless table-hover">
|
<table class="table table-sm table-striped table-borderless table-hover">
|
||||||
<thead>
|
<thead>
|
||||||
@@ -592,7 +573,7 @@ ob_start();
|
|||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<?php if ($ticket_count) { ?>
|
<?php if ($ticket_count) { ?>
|
||||||
<div class="tab-pane fade" id="pills-asset-tickets">
|
<div class="tab-pane fade" id="pills-asset-tickets<?php echo $asset_id; ?>">
|
||||||
<div class="table-responsive-sm">
|
<div class="table-responsive-sm">
|
||||||
<table class="table table-sm table-striped table-borderless table-hover">
|
<table class="table table-sm table-striped table-borderless table-hover">
|
||||||
<thead class="text-dark">
|
<thead class="text-dark">
|
||||||
@@ -680,7 +661,7 @@ ob_start();
|
|||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<?php if ($recurring_ticket_count) { ?>
|
<?php if ($recurring_ticket_count) { ?>
|
||||||
<div class="tab-pane fade" id="pills-asset-recurring-tickets">
|
<div class="tab-pane fade" id="pills-asset-recurring-tickets<?php echo $asset_id; ?>">
|
||||||
|
|
||||||
<div class="table-responsive-sm">
|
<div class="table-responsive-sm">
|
||||||
<table class="table table-sm table-striped table-borderless table-hover">
|
<table class="table table-sm table-striped table-borderless table-hover">
|
||||||
@@ -719,7 +700,7 @@ ob_start();
|
|||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<?php if ($software_count) { ?>
|
<?php if ($software_count) { ?>
|
||||||
<div class="tab-pane fade" id="pills-asset-licenses">
|
<div class="tab-pane fade" id="pills-asset-licenses<?php echo $asset_id; ?>">
|
||||||
<div class="table-responsive-sm">
|
<div class="table-responsive-sm">
|
||||||
<table class="table table-striped table-borderless table-hover">
|
<table class="table table-striped table-borderless table-hover">
|
||||||
<thead class="text-dark">
|
<thead class="text-dark">
|
||||||
@@ -786,7 +767,7 @@ ob_start();
|
|||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<?php if ($document_count) { ?>
|
<?php if ($document_count) { ?>
|
||||||
<div class="tab-pane fade" id="pills-asset-documents">
|
<div class="tab-pane fade" id="pills-asset-documents<?php echo $asset_id; ?>">
|
||||||
|
|
||||||
<div class="table-responsive-sm">
|
<div class="table-responsive-sm">
|
||||||
<table class="table table-sm table-striped table-borderless table-hover">
|
<table class="table table-sm table-striped table-borderless table-hover">
|
||||||
@@ -840,7 +821,7 @@ ob_start();
|
|||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<?php if ($file_count) { ?>
|
<?php if ($file_count) { ?>
|
||||||
<div class="tab-pane fade" id="pills-asset-files">
|
<div class="tab-pane fade" id="pills-asset-files<?php echo $asset_id; ?>">
|
||||||
<div class="table-responsive-sm">
|
<div class="table-responsive-sm">
|
||||||
<table class="table table-sm table-striped table-borderless table-hover">
|
<table class="table table-sm table-striped table-borderless table-hover">
|
||||||
<thead class="text-dark">
|
<thead class="text-dark">
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ ob_start();
|
|||||||
<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="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<input type="hidden" name="asset_id" value="<?= $asset_id ?>">
|
<input type="hidden" name="asset_id" value="<?= $asset_id ?>">
|
||||||
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
@@ -79,10 +80,10 @@ ob_start();
|
|||||||
<a class="nav-link active" data-toggle="pill" href="#pills-details">Details</a>
|
<a class="nav-link active" data-toggle="pill" href="#pills-details">Details</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" data-toggle="pill" href="#pills-assignment">Assignment</a>
|
<a class="nav-link" data-toggle="pill" href="#pills-network">Network</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" data-toggle="pill" href="#pills-network">Network</a>
|
<a class="nav-link" data-toggle="pill" href="#pills-assignment">Assignment</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" data-toggle="pill" href="#pills-purchase">Purchase</a>
|
<a class="nav-link" data-toggle="pill" href="#pills-purchase">Purchase</a>
|
||||||
@@ -101,20 +102,6 @@ ob_start();
|
|||||||
|
|
||||||
<div class="tab-pane fade show active" id="pills-details">
|
<div class="tab-pane fade show active" id="pills-details">
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<label>Type <strong class="text-danger">*</strong></label>
|
|
||||||
<div class="input-group">
|
|
||||||
<div class="input-group-prepend">
|
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-layer-group"></i></span>
|
|
||||||
</div>
|
|
||||||
<select class="form-control select2" name="type" required>
|
|
||||||
<?php foreach($asset_types_array as $asset_type_select => $asset_icon_select) { ?>
|
|
||||||
<option <?php if ($asset_type_select == $asset_type) { echo "selected"; } ?>><?php echo $asset_type_select; ?></option>
|
|
||||||
<?php } ?>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Name <strong class="text-danger">*</strong></label>
|
<label>Name <strong class="text-danger">*</strong></label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
@@ -136,13 +123,37 @@ ob_start();
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Description</label>
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text"><i class="fa fa-fw fa-angle-right"></i></span>
|
||||||
|
</div>
|
||||||
|
<input type="text" class="form-control" name="description" placeholder="Description of the asset" maxlength="255" value="<?= $asset_description ?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Type <strong class="text-danger">*</strong></label>
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text"><i class="fa fa-fw fa-tags"></i></span>
|
||||||
|
</div>
|
||||||
|
<select class="form-control select2" name="type" required>
|
||||||
|
<?php foreach($asset_types_array as $asset_type_select => $asset_icon_select) { ?>
|
||||||
|
<option <?php if ($asset_type_select == $asset_type) { echo "selected"; } ?>><?php echo $asset_type_select; ?></option>
|
||||||
|
<?php } ?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<?php //Do not display Make Model or Serial if Virtual is selected
|
<?php //Do not display Make Model or Serial if Virtual is selected
|
||||||
if ($asset_type !== 'virtual') { ?>
|
if ($asset_type !== 'virtual') { ?>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Make </label>
|
<label>Make </label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-building"></i></span>
|
<span class="input-group-text"><i class="fa fa-fw fa-tag"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<input type="text" class="form-control" name="make" placeholder="Manufacturer" maxlength="200" value="<?= $asset_make ?>">
|
<input type="text" class="form-control" name="make" placeholder="Manufacturer" maxlength="200" value="<?= $asset_make ?>">
|
||||||
</div>
|
</div>
|
||||||
@@ -152,7 +163,7 @@ ob_start();
|
|||||||
<label>Model</label>
|
<label>Model</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-cube"></i></span>
|
<span class="input-group-text"><i class="fa fa-fw fa-tag"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<input type="text" class="form-control" name="model" placeholder="Model Number" maxlength="200" value="<?= $asset_model ?>">
|
<input type="text" class="form-control" name="model" placeholder="Model Number" maxlength="200" value="<?= $asset_model ?>">
|
||||||
</div>
|
</div>
|
||||||
@@ -174,109 +185,13 @@ ob_start();
|
|||||||
<label>Operating System</label>
|
<label>Operating System</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><i class="fas fa-fw fa-laptop-code"></i></span>
|
<span class="input-group-text"><i class="fab fa-fw fa-windows"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<input type="text" class="form-control" name="os" id="os" placeholder="ex Windows 10 Pro" maxlength="200" value="<?= $asset_os ?>">
|
<input type="text" class="form-control" name="os" id="os" placeholder="ex Windows 10 Pro" maxlength="200" value="<?= $asset_os ?>">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<label>Description</label>
|
|
||||||
<div class="input-group">
|
|
||||||
<div class="input-group-prepend">
|
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-align-left"></i></span>
|
|
||||||
</div>
|
|
||||||
<input type="text" class="form-control" name="description" placeholder="Description of the asset" maxlength="255" value="<?= $asset_description ?>">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="tab-pane fade" id="pills-assignment">
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<label>Location</label>
|
|
||||||
<div class="input-group">
|
|
||||||
<div class="input-group-prepend">
|
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-building"></i></span>
|
|
||||||
</div>
|
|
||||||
<select class="form-control select2" name="location">
|
|
||||||
<option value="">- Select Location -</option>
|
|
||||||
<?php
|
|
||||||
|
|
||||||
$sql_locations = mysqli_query($mysqli, "SELECT * FROM locations WHERE location_id = $asset_location_id OR location_archived_at IS NULL AND location_client_id = $client_id ORDER BY location_name ASC");
|
|
||||||
while ($row = mysqli_fetch_assoc($sql_locations)) {
|
|
||||||
$location_id_select = intval($row['location_id']);
|
|
||||||
$location_name_select = nullable_htmlentities($row['location_name']);
|
|
||||||
$location_archived_at = nullable_htmlentities($row['location_archived_at']);
|
|
||||||
if ($location_archived_at) {
|
|
||||||
$location_name_select_display = "($location_name_select) - ARCHIVED";
|
|
||||||
} else {
|
|
||||||
$location_name_select_display = $location_name_select;
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<option <?php if ($asset_location_id == $location_id_select) { echo "selected"; } ?> value="<?= $location_id_select ?>"><?= $location_name_select_display ?></option>
|
|
||||||
|
|
||||||
<?php } ?>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<label>Physical Location</label>
|
|
||||||
<div class="input-group">
|
|
||||||
<div class="input-group-prepend">
|
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-map-marker-alt"></i></span>
|
|
||||||
</div>
|
|
||||||
<input type="text" class="form-control" name="physical_location" placeholder="Physical location eg. Floor 2, Closet B" maxlength="200" value="<?= $asset_physical_location ?>">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<label>Assign To</label>
|
|
||||||
<div class="input-group">
|
|
||||||
<div class="input-group-prepend">
|
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-user-check"></i></span>
|
|
||||||
</div>
|
|
||||||
<select class="form-control select2" name="contact">
|
|
||||||
<option value="">- Select Contact -</option>
|
|
||||||
<?php
|
|
||||||
|
|
||||||
$sql_contacts = mysqli_query($mysqli, "SELECT * FROM contacts WHERE contact_id = $asset_contact_id OR contact_archived_at IS NULL AND contact_client_id = $client_id ORDER BY contact_name ASC");
|
|
||||||
while ($row = mysqli_fetch_assoc($sql_contacts)) {
|
|
||||||
$contact_id_select = intval($row['contact_id']);
|
|
||||||
$contact_name_select = nullable_htmlentities($row['contact_name']);
|
|
||||||
$contact_archived_at = nullable_htmlentities($row['contact_archived_at']);
|
|
||||||
if ($contact_archived_at) {
|
|
||||||
$contact_name_select_display = "($contact_name_select) - ARCHIVED";
|
|
||||||
} else {
|
|
||||||
$contact_name_select_display = $contact_name_select;
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<option <?php if ($asset_contact_id == $contact_id_select) { echo "selected"; } ?> value="<?= $contact_id_select ?>">
|
|
||||||
<?= $contact_name_select_display ?>
|
|
||||||
</option>
|
|
||||||
|
|
||||||
<?php } ?>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<label>Status</label>
|
|
||||||
<div class="input-group">
|
|
||||||
<div class="input-group-prepend">
|
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-circle"></i></span>
|
|
||||||
</div>
|
|
||||||
<select class="form-control select2" name="status">
|
|
||||||
<?php foreach($asset_status_array as $asset_status_select) { ?>
|
|
||||||
<option <?php if ($asset_status_select == $asset_status) { echo "selected"; } ?>><?= $asset_status_select ?></option>
|
|
||||||
<?php } ?>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tab-pane fade" id="pills-network">
|
<div class="tab-pane fade" id="pills-network">
|
||||||
@@ -312,7 +227,7 @@ ob_start();
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>IPv4 Address / <span class="text-muted">DHCP</span></label>
|
<label>IP Address or DHCP</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-ethernet"></i></span>
|
<span class="input-group-text"><i class="fa fa-fw fa-ethernet"></i></span>
|
||||||
@@ -327,12 +242,12 @@ ob_start();
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>MAC Address</label>
|
<label>NAT IP</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-ethernet"></i></span>
|
<span class="input-group-text"><i class="fa fa-fw fa-random"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<input type="text" class="form-control" name="mac" value="<?= $asset_mac ?>" placeholder="00:11:22:AA:BB:CC" data-inputmask="'alias': 'mac'" maxlength="200" data-mask>
|
<input type="text" class="form-control" name="nat_ip" value="<?= $asset_nat_ip ?>" placeholder="10.52.4.55" data-inputmask="'alias': 'ip'" maxlength="200" data-mask>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -342,17 +257,17 @@ ob_start();
|
|||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-ethernet"></i></span>
|
<span class="input-group-text"><i class="fa fa-fw fa-ethernet"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<input type="text" class="form-control" name="ipv6" value="<?= $asset_ipv6 ?>" placeholder="2001:0db8:1000::3" maxlength="200">
|
<input type="text" class="form-control" name="ipv6" value="<?= $asset_ipv6 ?>" placeholder="ex. 2001:0db8:0000:0000:0000:ff00:0042:8329" maxlength="200">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>NAT Address</label>
|
<label>MAC Address</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-exchange-alt"></i></span>
|
<span class="input-group-text"><i class="fa fa-fw fa-ethernet"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<input type="text" class="form-control" name="nat_ip" value="<?= $asset_nat_ip ?>" placeholder="10.52.4.55" data-inputmask="'alias': 'ip'" maxlength="200" data-mask>
|
<input type="text" class="form-control" name="mac" value="<?= $asset_mac ?>" placeholder="MAC Address" data-inputmask="'alias': 'mac'" maxlength="200" data-mask>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -387,6 +302,92 @@ ob_start();
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="tab-pane fade" id="pills-assignment">
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Physical Location</label>
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text"><i class="fa fa-fw fa-map-marker-alt"></i></span>
|
||||||
|
</div>
|
||||||
|
<input type="text" class="form-control" name="physical_location" placeholder="Physical location eg. Floor 2, Closet B" maxlength="200" value="<?= $asset_physical_location ?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Location</label>
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text"><i class="fa fa-fw fa-map-marker-alt"></i></span>
|
||||||
|
</div>
|
||||||
|
<select class="form-control select2" name="location">
|
||||||
|
<option value="">- Select Location -</option>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$sql_locations = mysqli_query($mysqli, "SELECT * FROM locations WHERE location_id = $asset_location_id OR location_archived_at IS NULL AND location_client_id = $client_id ORDER BY location_name ASC");
|
||||||
|
while ($row = mysqli_fetch_assoc($sql_locations)) {
|
||||||
|
$location_id_select = intval($row['location_id']);
|
||||||
|
$location_name_select = nullable_htmlentities($row['location_name']);
|
||||||
|
$location_archived_at = nullable_htmlentities($row['location_archived_at']);
|
||||||
|
if ($location_archived_at) {
|
||||||
|
$location_name_select_display = "($location_name_select) - ARCHIVED";
|
||||||
|
} else {
|
||||||
|
$location_name_select_display = $location_name_select;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<option <?php if ($asset_location_id == $location_id_select) { echo "selected"; } ?> value="<?= $location_id_select ?>"><?= $location_name_select_display ?></option>
|
||||||
|
|
||||||
|
<?php } ?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Assign To</label>
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text"><i class="fa fa-fw fa-user"></i></span>
|
||||||
|
</div>
|
||||||
|
<select class="form-control select2" name="contact">
|
||||||
|
<option value="">- Select Contact -</option>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$sql_contacts = mysqli_query($mysqli, "SELECT * FROM contacts WHERE contact_id = $asset_contact_id OR contact_archived_at IS NULL AND contact_client_id = $client_id ORDER BY contact_name ASC");
|
||||||
|
while ($row = mysqli_fetch_assoc($sql_contacts)) {
|
||||||
|
$contact_id_select = intval($row['contact_id']);
|
||||||
|
$contact_name_select = nullable_htmlentities($row['contact_name']);
|
||||||
|
$contact_archived_at = nullable_htmlentities($row['contact_archived_at']);
|
||||||
|
if ($contact_archived_at) {
|
||||||
|
$contact_name_select_display = "($contact_name_select) - ARCHIVED";
|
||||||
|
} else {
|
||||||
|
$contact_name_select_display = $contact_name_select;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<option <?php if ($asset_contact_id == $contact_id_select) { echo "selected"; } ?> value="<?= $contact_id_select ?>">
|
||||||
|
<?= $contact_name_select_display ?>
|
||||||
|
</option>
|
||||||
|
|
||||||
|
<?php } ?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Status</label>
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text"><i class="fa fa-fw fa-info"></i></span>
|
||||||
|
</div>
|
||||||
|
<select class="form-control select2" name="status">
|
||||||
|
<?php foreach($asset_status_array as $asset_status_select) { ?>
|
||||||
|
<option <?php if ($asset_status_select == $asset_status) { echo "selected"; } ?>><?= $asset_status_select ?></option>
|
||||||
|
<?php } ?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="tab-pane fade" id="pills-purchase">
|
<div class="tab-pane fade" id="pills-purchase">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -422,7 +423,7 @@ ob_start();
|
|||||||
<label>Purchase Reference</label>
|
<label>Purchase Reference</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-receipt"></i></span>
|
<span class="input-group-text"><i class="fa fa-fw fa-shopping-cart"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<input type="text" class="form-control" name="purchase_reference" placeholder="eg. Invoice, PO Number" value="<?= $asset_purchase_reference ?>">
|
<input type="text" class="form-control" name="purchase_reference" placeholder="eg. Invoice, PO Number" value="<?= $asset_purchase_reference ?>">
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -92,6 +92,63 @@ ob_start();
|
|||||||
|
|
||||||
<div class="tab-pane fade" id="pills-interface-network">
|
<div class="tab-pane fade" id="pills-interface-network">
|
||||||
|
|
||||||
|
<!-- MAC Address -->
|
||||||
|
<div class="form-group">
|
||||||
|
<label>MAC Address</label>
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text"><i class="fa fa-fw fa-ethernet"></i></span>
|
||||||
|
</div>
|
||||||
|
<input type="text" class="form-control" name="mac" placeholder="MAC Address" data-inputmask="'alias': 'mac'" maxlength="200" data-mask>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- IP (with optional DHCP checkbox) -->
|
||||||
|
<div class="form-group">
|
||||||
|
<label>IP or DHCP</label>
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text"><i class="fa fa-fw fa-ethernet"></i></span>
|
||||||
|
</div>
|
||||||
|
<input type="text" class="form-control" name="ip" placeholder="IP Address" data-inputmask="'alias': 'ip'" maxlength="200" data-mask>
|
||||||
|
<div class="input-group-append">
|
||||||
|
<div class="input-group-text">
|
||||||
|
<input type="checkbox" name="dhcp" value="1" title="Check to mark address as DHCP controlled">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- NAT IP -->
|
||||||
|
<div class="form-group">
|
||||||
|
<label>NAT IP</label>
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text"><i class="fa fa-fw fa-ethernet"></i></span>
|
||||||
|
</div>
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
class="form-control"
|
||||||
|
name="nat_ip"
|
||||||
|
placeholder="Nat IP"
|
||||||
|
maxlength="200"
|
||||||
|
data-inputmask="'alias': 'ip'"
|
||||||
|
data-mask
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- IPv6 -->
|
||||||
|
<div class="form-group">
|
||||||
|
<label>IPv6</label>
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text"><i class="fa fa-fw fa-ethernet"></i></span>
|
||||||
|
</div>
|
||||||
|
<input type="text" class="form-control" name="ipv6" placeholder="IPv6 Address" maxlength="200">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- Network -->
|
<!-- Network -->
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Network</label>
|
<label>Network</label>
|
||||||
@@ -116,68 +173,11 @@ ob_start();
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- IP (with optional DHCP checkbox) -->
|
|
||||||
<div class="form-group">
|
|
||||||
<label>IPv4 Address / <span class="text-muted">DHCP</span></label>
|
|
||||||
<div class="input-group">
|
|
||||||
<div class="input-group-prepend">
|
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-ethernet"></i></span>
|
|
||||||
</div>
|
|
||||||
<input type="text" class="form-control" name="ip" placeholder="e.g. 192.168.1.10" data-inputmask="'alias': 'ip'" maxlength="200" data-mask>
|
|
||||||
<div class="input-group-append">
|
|
||||||
<div class="input-group-text">
|
|
||||||
<input type="checkbox" name="dhcp" value="1" title="Check to mark address as DHCP controlled">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- MAC Address -->
|
|
||||||
<div class="form-group">
|
|
||||||
<label>MAC Address</label>
|
|
||||||
<div class="input-group">
|
|
||||||
<div class="input-group-prepend">
|
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-ethernet"></i></span>
|
|
||||||
</div>
|
|
||||||
<input type="text" class="form-control" name="mac" placeholder="e.g. 00:1A:2B:3C:4D:5E" data-inputmask="'alias': 'mac'" maxlength="200" data-mask>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- IPv6 -->
|
|
||||||
<div class="form-group">
|
|
||||||
<label>IPv6 Address</label>
|
|
||||||
<div class="input-group">
|
|
||||||
<div class="input-group-prepend">
|
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-ethernet"></i></span>
|
|
||||||
</div>
|
|
||||||
<input type="text" class="form-control" name="ipv6" placeholder="e.g. 2001:db8::1" maxlength="200">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- NAT IP -->
|
|
||||||
<div class="form-group">
|
|
||||||
<label>NAT Address</label>
|
|
||||||
<div class="input-group">
|
|
||||||
<div class="input-group-prepend">
|
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-exchange-alt"></i></span>
|
|
||||||
</div>
|
|
||||||
<input
|
|
||||||
type="text"
|
|
||||||
class="form-control"
|
|
||||||
name="nat_ip"
|
|
||||||
placeholder="e.g. 203.0.113.10 or 10.0.0.5"
|
|
||||||
maxlength="200"
|
|
||||||
data-inputmask="'alias': 'ip'"
|
|
||||||
data-mask
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Connected to</label>
|
<label>Connected to</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-plug"></i></span>
|
<span class="input-group-text"><i class="fa fa-fw fa-desktop"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<select class="form-control select2" name="connected_to">
|
<select class="form-control select2" name="connected_to">
|
||||||
<option value="">- Select Asset and Interface -</option>
|
<option value="">- Select Asset and Interface -</option>
|
||||||
|
|||||||
@@ -143,6 +143,95 @@ ob_start();
|
|||||||
<!-- Network Section -->
|
<!-- Network Section -->
|
||||||
<div class="tab-pane fade" id="pills-interface-network<?php echo $interface_id; ?>">
|
<div class="tab-pane fade" id="pills-interface-network<?php echo $interface_id; ?>">
|
||||||
|
|
||||||
|
<!-- MAC Address -->
|
||||||
|
<div class="form-group">
|
||||||
|
<label>MAC Address</label>
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text"><i class="fa fa-fw fa-ethernet"></i></span>
|
||||||
|
</div>
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
class="form-control"
|
||||||
|
name="mac"
|
||||||
|
placeholder="MAC Address"
|
||||||
|
maxlength="200"
|
||||||
|
value="<?php echo $interface_mac; ?>"
|
||||||
|
data-inputmask="'alias': 'mac'"
|
||||||
|
data-mask
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- IPv4 or DHCP -->
|
||||||
|
<div class="form-group">
|
||||||
|
<label>IPv4 or DHCP</label>
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text"><i class="fa fa-fw fa-ethernet"></i></span>
|
||||||
|
</div>
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
class="form-control"
|
||||||
|
name="ip"
|
||||||
|
placeholder="IP Address"
|
||||||
|
maxlength="200"
|
||||||
|
value="<?php echo $interface_ip; ?>"
|
||||||
|
data-inputmask="'alias': 'ip'"
|
||||||
|
data-mask
|
||||||
|
>
|
||||||
|
<div class="input-group-append">
|
||||||
|
<div class="input-group-text">
|
||||||
|
<input
|
||||||
|
type="checkbox"
|
||||||
|
name="dhcp"
|
||||||
|
value="1"
|
||||||
|
title="Check to mark address as DHCP controlled"
|
||||||
|
<?php if ($interface_ip === 'DHCP') echo "checked"; ?>
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- NAT IP -->
|
||||||
|
<div class="form-group">
|
||||||
|
<label>NAT IP</label>
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text"><i class="fa fa-fw fa-ethernet"></i></span>
|
||||||
|
</div>
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
class="form-control"
|
||||||
|
name="nat_ip"
|
||||||
|
placeholder="Nat IP"
|
||||||
|
maxlength="200"
|
||||||
|
value="<?php echo $interface_nat_ip; ?>"
|
||||||
|
data-inputmask="'alias': 'ip'"
|
||||||
|
data-mask
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- IPv6 -->
|
||||||
|
<div class="form-group">
|
||||||
|
<label>IPv6</label>
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text"><i class="fa fa-fw fa-ethernet"></i></span>
|
||||||
|
</div>
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
class="form-control"
|
||||||
|
name="ipv6"
|
||||||
|
placeholder="IPv6 Address"
|
||||||
|
maxlength="200"
|
||||||
|
value="<?php echo $interface_ipv6; ?>"
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- Network -->
|
<!-- Network -->
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Network</label>
|
<label>Network</label>
|
||||||
@@ -173,101 +262,12 @@ ob_start();
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- IPv4 or DHCP -->
|
|
||||||
<div class="form-group">
|
|
||||||
<label>IPv4 Address / <span class="text-muted">DHCP</span></label>
|
|
||||||
<div class="input-group">
|
|
||||||
<div class="input-group-prepend">
|
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-ethernet"></i></span>
|
|
||||||
</div>
|
|
||||||
<input
|
|
||||||
type="text"
|
|
||||||
class="form-control"
|
|
||||||
name="ip"
|
|
||||||
placeholder="e.g. 192.168.1.10"
|
|
||||||
maxlength="200"
|
|
||||||
value="<?php echo $interface_ip; ?>"
|
|
||||||
data-inputmask="'alias': 'ip'"
|
|
||||||
data-mask
|
|
||||||
>
|
|
||||||
<div class="input-group-append">
|
|
||||||
<div class="input-group-text">
|
|
||||||
<input
|
|
||||||
type="checkbox"
|
|
||||||
name="dhcp"
|
|
||||||
value="1"
|
|
||||||
title="Check to mark address as DHCP controlled"
|
|
||||||
<?php if ($interface_ip === 'DHCP') echo "checked"; ?>
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- MAC Address -->
|
|
||||||
<div class="form-group">
|
|
||||||
<label>MAC Address</label>
|
|
||||||
<div class="input-group">
|
|
||||||
<div class="input-group-prepend">
|
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-ethernet"></i></span>
|
|
||||||
</div>
|
|
||||||
<input
|
|
||||||
type="text"
|
|
||||||
class="form-control"
|
|
||||||
name="mac"
|
|
||||||
placeholder="e.g. 00:1A:2B:3C:4D:5E"
|
|
||||||
maxlength="200"
|
|
||||||
value="<?php echo $interface_mac; ?>"
|
|
||||||
data-inputmask="'alias': 'mac'"
|
|
||||||
data-mask
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- IPv6 -->
|
|
||||||
<div class="form-group">
|
|
||||||
<label>IPv6 Address</label>
|
|
||||||
<div class="input-group">
|
|
||||||
<div class="input-group-prepend">
|
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-ethernet"></i></span>
|
|
||||||
</div>
|
|
||||||
<input
|
|
||||||
type="text"
|
|
||||||
class="form-control"
|
|
||||||
name="ipv6"
|
|
||||||
placeholder="e.g. 2001:db8::1"
|
|
||||||
maxlength="200"
|
|
||||||
value="<?php echo $interface_ipv6; ?>"
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- NAT IP -->
|
|
||||||
<div class="form-group">
|
|
||||||
<label>NAT Address</label>
|
|
||||||
<div class="input-group">
|
|
||||||
<div class="input-group-prepend">
|
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-exchange-alt"></i></span>
|
|
||||||
</div>
|
|
||||||
<input
|
|
||||||
type="text"
|
|
||||||
class="form-control"
|
|
||||||
name="nat_ip"
|
|
||||||
placeholder="e.g. 203.0.113.10 or 10.0.0.5"
|
|
||||||
maxlength="200"
|
|
||||||
value="<?php echo $interface_nat_ip; ?>"
|
|
||||||
data-inputmask="'alias': 'ip'"
|
|
||||||
data-mask
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Connected to (One-to-One) -->
|
<!-- Connected to (One-to-One) -->
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Connected to</label>
|
<label>Connected to</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-plug"></i></span>
|
<span class="input-group-text"><i class="fa fa-fw fa-desktop"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<select class="form-control select2" name="connected_to">
|
<select class="form-control select2" name="connected_to">
|
||||||
<option value="">- Select Asset and Interface -</option>
|
<option value="">- Select Asset and Interface -</option>
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ ob_start();
|
|||||||
</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="<?= $_SESSION['csrf_token'] ?>">
|
|
||||||
<input type="hidden" name="asset_id" value="<?php echo $asset_id; ?>">
|
<input type="hidden" name="asset_id" value="<?php echo $asset_id; ?>">
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ ob_start();
|
|||||||
</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="<?= $_SESSION['csrf_token'] ?>">
|
|
||||||
<input type="hidden" name="asset_id" value="<?php echo $asset_id; ?>">
|
<input type="hidden" name="asset_id" value="<?php echo $asset_id; ?>">
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ ob_start();
|
|||||||
</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="<?= $_SESSION['csrf_token'] ?>">
|
|
||||||
<input type="hidden" name="asset_id" value="<?php echo $asset_id; ?>">
|
<input type="hidden" name="asset_id" value="<?php echo $asset_id; ?>">
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ ob_start();
|
|||||||
</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="<?= $_SESSION['csrf_token'] ?>">
|
|
||||||
<input type="hidden" name="asset_id" value="<?php echo $asset_id; ?>">
|
<input type="hidden" name="asset_id" value="<?php echo $asset_id; ?>">
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ ob_start();
|
|||||||
</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="<?= $_SESSION['csrf_token'] ?>">
|
|
||||||
<input type="hidden" name="asset_id" value="<?php echo $asset_id; ?>">
|
<input type="hidden" name="asset_id" value="<?php echo $asset_id; ?>">
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
|||||||
@@ -12,9 +12,6 @@ ob_start();
|
|||||||
</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="<?= $_SESSION['csrf_token'] ?>">
|
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ ob_start();
|
|||||||
</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="<?= $_SESSION['csrf_token'] ?>">
|
|
||||||
<input type="hidden" name="calendar_id" value="<?php echo $calendar_id; ?>">
|
<input type="hidden" name="calendar_id" value="<?php echo $calendar_id; ?>">
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
</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="<?= $_SESSION['csrf_token'] ?>">
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<ul class="nav nav-pills nav-justified mb-3">
|
<ul class="nav nav-pills nav-justified mb-3">
|
||||||
@@ -29,6 +28,16 @@
|
|||||||
|
|
||||||
<div class="tab-pane fade show active" id="pills-event">
|
<div class="tab-pane fade show active" id="pills-event">
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Title <strong class="text-danger">*</strong></label>
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text"><i class="fa fa-fw fa-calendar-day"></i></span>
|
||||||
|
</div>
|
||||||
|
<input type="text" class="form-control" name="title" placeholder="Title of the event" maxlength="200" required autofocus>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Calendar <strong class="text-danger">*</strong></label>
|
<label>Calendar <strong class="text-danger">*</strong></label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
@@ -52,16 +61,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<label>Title <strong class="text-danger">*</strong></label>
|
|
||||||
<div class="input-group">
|
|
||||||
<div class="input-group-prepend">
|
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-calendar-day"></i></span>
|
|
||||||
</div>
|
|
||||||
<input type="text" class="form-control" name="title" placeholder="Title of the event" maxlength="200" required autofocus>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Start / End <strong class="text-danger">*</strong></label>
|
<label>Start / End <strong class="text-danger">*</strong></label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
@@ -120,7 +119,7 @@
|
|||||||
<div class="tab-pane fade" id="pills-attendees">
|
<div class="tab-pane fade" id="pills-attendees">
|
||||||
|
|
||||||
<?php if (isset($client_id)) { ?>
|
<?php if (isset($client_id)) { ?>
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
<input type="hidden" name="client" value="<?php echo $client_id; ?>">
|
||||||
<?php } else{ ?>
|
<?php } else{ ?>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -129,7 +128,7 @@
|
|||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-user"></i></span>
|
<span class="input-group-text"><i class="fa fa-fw fa-user"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<select class="form-control select2" name="client_id">
|
<select class="form-control select2" name="client">
|
||||||
<option value="">- Client -</option>
|
<option value="">- Client -</option>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|||||||
@@ -22,21 +22,20 @@ $client_id = intval($row['event_client_id']);
|
|||||||
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-calendar-check mr-2" style="color:<?php echo $calendar_color; ?>"></i>Editing: <strong><?php echo $event_title; ?></strong></h5>
|
<h5 class="modal-title"><i class="fa fa-fw fa-calendar mr-2" style="color:<?php echo $calendar_color; ?>"></i><?php echo $event_title; ?></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="<?= $_SESSION['csrf_token'] ?>">
|
|
||||||
<input type="hidden" name="event_id" value="<?php echo $event_id; ?>">
|
<input type="hidden" name="event_id" value="<?php echo $event_id; ?>">
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<ul class="nav nav-pills nav-justified mb-3">
|
<ul class="nav nav-pills nav-justified mb-3">
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link active" data-toggle="pill" href="#pills-event<?php echo $event_id; ?>"><i class="fa fa-fw fa-calendar-check mr-2"></i>Event</a>
|
<a class="nav-link active" data-toggle="pill" href="#pills-event<?php echo $event_id; ?>"><i class="fa fa-fw fa-calendar mr-2"></i>Event</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" data-toggle="pill" href="#pills-details<?php echo $event_id; ?>"><i class="fa fa-fw fa-info-circle mr-2"></i>Details</a>
|
<a class="nav-link" data-toggle="pill" href="#pills-details<?php echo $event_id; ?>"><i class="fa fa-fw fa-info-circle mr-2"></i>Details</a>
|
||||||
@@ -52,6 +51,16 @@ ob_start();
|
|||||||
|
|
||||||
<div class="tab-pane fade show active" id="pills-event<?php echo $event_id; ?>">
|
<div class="tab-pane fade show active" id="pills-event<?php echo $event_id; ?>">
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Title <strong class="text-danger">*</strong></label>
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text"><i class="fa fa-fw fa-calendar-day"></i></span>
|
||||||
|
</div>
|
||||||
|
<input type="text" class="form-control" name="title" maxlength="200" value="<?php echo $event_title; ?>" placeholder="Title of the event" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Calendar <strong class="text-danger">*</strong></label>
|
<label>Calendar <strong class="text-danger">*</strong></label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
@@ -74,16 +83,6 @@ ob_start();
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<label>Title <strong class="text-danger">*</strong></label>
|
|
||||||
<div class="input-group">
|
|
||||||
<div class="input-group-prepend">
|
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-calendar-day"></i></span>
|
|
||||||
</div>
|
|
||||||
<input type="text" class="form-control" name="title" maxlength="200" value="<?php echo $event_title; ?>" placeholder="Title of the event" required>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Start / End <strong class="text-danger">*</strong></label>
|
<label>Start / End <strong class="text-danger">*</strong></label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
@@ -143,7 +142,7 @@ ob_start();
|
|||||||
<div class="tab-pane fade" id="pills-attendees<?php echo $event_id; ?>">
|
<div class="tab-pane fade" id="pills-attendees<?php echo $event_id; ?>">
|
||||||
|
|
||||||
<?php if (isset($_GET['client_id'])) { ?>
|
<?php if (isset($_GET['client_id'])) { ?>
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
<input type="hidden" name="client" value="<?php echo $client_id; ?>">
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -185,7 +184,7 @@ ob_start();
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<a class="btn btn-default text-danger mr-auto" href="post.php?delete_event=<?= $event_id ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>"><i class="fa fa-calendar-times mr-2"></i>Delete</a>
|
<a class="btn btn-default text-danger mr-auto" href="post.php?delete_event=<?php echo $event_id; ?>"><i class="fa fa-calendar-times mr-2"></i>Delete</a>
|
||||||
<button type="submit" name="edit_event" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Save</button>
|
<button type="submit" name="edit_event" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Save</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>
|
||||||
|
|||||||
@@ -14,8 +14,6 @@ ob_start();
|
|||||||
</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="<?= $_SESSION['csrf_token'] ?>">
|
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<ul class="nav nav-pills nav-justified mb-3">
|
<ul class="nav nav-pills nav-justified mb-3">
|
||||||
@@ -77,7 +75,7 @@ ob_start();
|
|||||||
<label>Description</label>
|
<label>Description</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-align-left"></i></span>
|
<span class="input-group-text"><i class="fa fa-fw fa-angle-right"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<input type="text" class="form-control" name="description" placeholder="Short Description">
|
<input type="text" class="form-control" name="description" placeholder="Short Description">
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -31,9 +31,8 @@ ob_start();
|
|||||||
</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="<?= $_SESSION['csrf_token'] ?>">
|
|
||||||
<input type="hidden" name="certificate_id" value="<?php echo $certificate_id; ?>">
|
<input type="hidden" name="certificate_id" value="<?php echo $certificate_id; ?>">
|
||||||
|
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<ul class="nav nav-pills nav-justified mb-3">
|
<ul class="nav nav-pills nav-justified mb-3">
|
||||||
@@ -71,7 +70,7 @@ ob_start();
|
|||||||
<label>Description</label>
|
<label>Description</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-align-left"></i></span>
|
<span class="input-group-text"><i class="fa fa-fw fa-angle-right"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<input type="text" class="form-control" name="description" placeholder="Short Description" value="<?php echo $certificate_description; ?>">
|
<input type="text" class="form-control" name="description" placeholder="Short Description" value="<?php echo $certificate_description; ?>">
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ ob_start();
|
|||||||
</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="<?= $_SESSION['csrf_token'] ?>">
|
|
||||||
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
|||||||
@@ -1,52 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
|
||||||
|
|
||||||
$client_ids = array_map('intval', $_GET['client_ids'] ?? []);
|
|
||||||
|
|
||||||
$count = count($client_ids);
|
|
||||||
|
|
||||||
ob_start();
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
<h5 class="modal-title"><i class="fa fa-fw fa-calendar mr-2"></i>Set Net Terms for <strong><?= $count ?></strong> Client(s)</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="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
|
||||||
<?php foreach ($client_ids as $client_id) { ?><input type="hidden" name="client_ids[]" value="<?= $client_id ?>"><?php } ?>
|
|
||||||
|
|
||||||
<div class="modal-body">
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<label>Invoice Net Terms</label>
|
|
||||||
<div class="input-group">
|
|
||||||
<div class="input-group-prepend">
|
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
|
|
||||||
</div>
|
|
||||||
<select class="form-control select2" name="net_terms">
|
|
||||||
<option value="">- Net Terms -</option>
|
|
||||||
<?php foreach ($net_terms_array as $net_term_value => $net_term_name) { ?>
|
|
||||||
<option value="<?php echo $net_term_value; ?>">
|
|
||||||
<?php echo $net_term_name; ?>
|
|
||||||
</option>
|
|
||||||
<?php } ?>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="submit" name="bulk_edit_client_net_terms" 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>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
require_once '../../../includes/modal_footer.php';
|
|
||||||
@@ -8,7 +8,6 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off" target="_blank">
|
<form action="post.php" method="post" autocomplete="off" target="_blank">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
|
||||||
<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">
|
||||||
<ul class="list-group">
|
<ul class="list-group">
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ require_once '../../../includes/modal_header.php';
|
|||||||
|
|
||||||
$client_id = intval($_GET['id']);
|
$client_id = intval($_GET['id']);
|
||||||
|
|
||||||
$sql = mysqli_query($mysqli, "SELECT * FROM clients WHERE client_id = $client_id $access_permission_query LIMIT 1");
|
$sql = mysqli_query($mysqli, "SELECT * FROM clients WHERE client_id = $client_id LIMIT 1");
|
||||||
|
|
||||||
$row = mysqli_fetch_assoc($sql);
|
$row = mysqli_fetch_assoc($sql);
|
||||||
$client_name = nullable_htmlentities($row['client_name']);
|
$client_name = nullable_htmlentities($row['client_name']);
|
||||||
@@ -39,8 +39,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="client_id" value="<?php echo $client_id; ?>">
|
||||||
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
|
||||||
|
|
||||||
<ul class="modal-header nav nav-pills nav-justified mb-3">
|
<ul class="modal-header nav nav-pills nav-justified mb-3">
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ ob_start();
|
|||||||
</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="<?= $_SESSION['csrf_token'] ?>">
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user