mirror of
https://github.com/itflow-org/itflow
synced 2026-03-11 08:14:52 +00:00
Compare commits
58 Commits
duplicate-
...
ticket-tas
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
58bcb38617 | ||
|
|
77e4d2b566 | ||
|
|
88a29b7599 | ||
|
|
64525750b6 | ||
|
|
30499123f1 | ||
|
|
79703042ff | ||
|
|
ccd5605d97 | ||
|
|
908277065b | ||
|
|
f2d4eb0486 | ||
|
|
f784b659e8 | ||
|
|
e60a7a59f9 | ||
|
|
cab81ca170 | ||
|
|
a82e2c7ea1 | ||
|
|
a277380441 | ||
|
|
ad5710b1d8 | ||
|
|
3e3531a6ce | ||
|
|
a79ce23ae5 | ||
|
|
32f996d034 | ||
|
|
312eb4dffc | ||
|
|
1916456c84 | ||
|
|
9b8d37b577 | ||
|
|
05018e5f17 | ||
|
|
72ef918452 | ||
|
|
27fde82aff | ||
|
|
b27ffe6635 | ||
|
|
84cc4a094a | ||
|
|
e75600ee05 | ||
|
|
871ad2ea7e | ||
|
|
8b5f2e0f3f | ||
|
|
58d6ab7342 | ||
|
|
ca5fb2e010 | ||
|
|
da561b296e | ||
|
|
523da0dea0 | ||
|
|
0e4cc76a84 | ||
|
|
7e39a7ed89 | ||
|
|
4a26ea7ed9 | ||
|
|
7c83ba15b9 | ||
|
|
10bfbed4bb | ||
|
|
81550bd7a8 | ||
|
|
a430bb917e | ||
|
|
e1a579387f | ||
|
|
fe8df66c67 | ||
|
|
5bb410f80c | ||
|
|
29b79b9d4e | ||
|
|
0f8a8d1464 | ||
|
|
cc92a4b7ee | ||
|
|
3ffef6df51 | ||
|
|
78e4787b99 | ||
|
|
540512a156 | ||
|
|
7737dbc65d | ||
|
|
faa94d888d | ||
|
|
99e2487d2b | ||
|
|
f09d8ffe05 | ||
|
|
c486e3fe62 | ||
|
|
ba2d6b6709 | ||
|
|
a388a279bc | ||
|
|
5a64b19a06 | ||
|
|
53178b8d20 |
50
CHANGELOG.md
50
CHANGELOG.md
@@ -2,6 +2,54 @@
|
|||||||
|
|
||||||
This file documents all notable changes made to ITFlow.
|
This file documents all notable changes made to ITFlow.
|
||||||
|
|
||||||
|
## [25.12.1] Maint Release
|
||||||
|
|
||||||
|
### Major Changes
|
||||||
|
- Unified the Client/Agent Login and process (Note only Client Users can Reset passwords from the login page, does not apply to agent users).
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
- Fix Payment Provider not adding an account.
|
||||||
|
- Fix New ticket button in contact details in the related tickets section.
|
||||||
|
|
||||||
|
### New Features & Updates
|
||||||
|
- You can now Set Payment Provider income/expense account, expense vendor and expense category upond creation or editing.
|
||||||
|
- Moved Saved Payment Provider Methods away from admin side nav to the count link within Payment Providers page.
|
||||||
|
- Moved AI Models from the admin side nav to the model count link within AI Providers.
|
||||||
|
- Add Favicon Reset.
|
||||||
|
|
||||||
|
## [25.12] Stable Release
|
||||||
|
|
||||||
|
### Breaking Changes ###
|
||||||
|
- For Existing installs: **php-xml** extension needs to be installed for document creation and editing, new install script does this for you as of Dec 6th 2025. To install php-xml: `sudo apt install php-xml`
|
||||||
|
|
||||||
|
### Major Changes
|
||||||
|
- Consolidated "Files" and "Documents" into a single section called **Files**.
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
- Resolved issue with updating asset notes in asset details.
|
||||||
|
- Fixed problem with bulk ticket merging.
|
||||||
|
- Corrected issue where decimal inputs (e.g., price, cost) weren’t displaying on iPhones in certain forms.
|
||||||
|
- Added CSV escaping to the sample export data in areas where a sample CSV template is provided.
|
||||||
|
- Fix a race condition where dupe tickets, invoices, recurring invoices, recurring tickets, quotes will be created using the same number if created in parallel espcecially when using the API.
|
||||||
|
|
||||||
|
### New Features & Updates
|
||||||
|
- Introduced automatic subject-based ticket merging/reply detection. Now, if an email comes from a known contact or domain and the subject matches 95% of a ticket opened in the last 7 days, it will be merged automatically.
|
||||||
|
- Added `cleanInput` function to sanitize data before inserting it into the database when using MySQLi prepared statements.
|
||||||
|
- Migrated client post functionality to use MySQLi prepared statements.
|
||||||
|
- Updated payment method post functionality to use MySQLi prepared statements.
|
||||||
|
- Implemented `saveBase64Images()` to convert base64-encoded `<img>` tags into actual image files stored under `/uploads/<module>/<id>/` with secure filenames. Added wrapper functions, and updated document creation to use processed image paths.
|
||||||
|
- For new documents and document templates, images are now stored in `/uploads/documents/$document_id` instead of being stored as base64 in the database, using the `saveBase64Images()` function.
|
||||||
|
- UI/UX improvements made to the document details page.
|
||||||
|
- Removed sidebar quick-add options.
|
||||||
|
- Created new folders in the uploads directory: `documents`, `document_templates`, and `recurring_tickets`.
|
||||||
|
- Reworked the bulk action function to pass the name arrays, instead of a generic `selected_ids` array. This allows multiple bulk name arrays to be passed at once, currently used for the new file-document merge.
|
||||||
|
- Big task: Converted the remaining modals to use the new `ajax-modal` system, enabling more flexible flow expansion going forward.
|
||||||
|
- Mail queue: Added a `--no-mx-validation` flag to bypass recipient domain MX validation.
|
||||||
|
- Bump PHPMailer from 7.0.0 to 7.0.1.
|
||||||
|
- Bump stripe-php from 18.1.0 to 19.0.0.
|
||||||
|
- Bump TCPDF from 6.10.0 to 6.10.1.
|
||||||
|
- Bump TinyMCE from 8.2.0 to 8.2.2.
|
||||||
|
|
||||||
## [25.11.1] Maint Release
|
## [25.11.1] Maint Release
|
||||||
|
|
||||||
### Fixes
|
### Fixes
|
||||||
@@ -286,7 +334,7 @@ We will provide example code with directory structure for each custom directory
|
|||||||
---
|
---
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Several security vulnerabilities patched.
|
- Several security vulnerabilities patched (with thanks to www.helx.io).
|
||||||
- Ticket status is no longer updated when scheduling.
|
- Ticket status is no longer updated when scheduling.
|
||||||
- Client Portal: Tech contacts can no longer edit their own details.
|
- Client Portal: Tech contacts can no longer edit their own details.
|
||||||
- Fixed overlapping logo issue in Invoice/Quote PDF exports.
|
- Fixed overlapping logo issue in Invoice/Quote PDF exports.
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
<br />
|
<br />
|
||||||
<a href="https://demo.itflow.org"><strong>View demo</strong></a>
|
<a href="https://demo.itflow.org"><strong>View demo</strong></a>
|
||||||
<br />
|
<br />
|
||||||
Username: <b>demo@demo</b> | Password: <b>demo</b>
|
Username: <b>demo@demo.com</b> | Password: <b>demo</b>
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<a href="https://itflow.org/#about">About</a>
|
<a href="https://itflow.org/#about">About</a>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ We operate a rolling release model. Any bug fixes will be released into latest v
|
|||||||
|
|
||||||
| Version | Supported |
|
| Version | Supported |
|
||||||
|---------| ------------------ |
|
|---------| ------------------ |
|
||||||
| 25.05 | :white_check_mark: |
|
| 25.12 | :white_check_mark: |
|
||||||
|
|
||||||
## Reporting a Vulnerability via GitHub Security Advisories
|
## Reporting a Vulnerability via GitHub Security Advisories
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,16 @@ $num_rows = mysqli_num_rows($sql);
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
<ol class="breadcrumb d-print-none">
|
||||||
|
<li class="breadcrumb-item">
|
||||||
|
<a href="/admin">Admin</a>
|
||||||
|
</li>
|
||||||
|
<li class="breadcrumb-item">
|
||||||
|
<a href="ai_provider.php">AI Providers</a>
|
||||||
|
</li>
|
||||||
|
<li class="breadcrumb-item active">AI Models</li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
<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="fas fa-fw fa-robot mr-2"></i>AI Models</h3>
|
<h3 class="card-title mt-2"><i class="fas fa-fw fa-robot mr-2"></i>AI Models</h3>
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ $num_rows = mysqli_num_rows($sql);
|
|||||||
Key <?php if ($sort == 'ai_provider_api_key') { echo $order_icon; } ?>
|
Key <?php if ($sort == 'ai_provider_api_key') { echo $order_icon; } ?>
|
||||||
</a>
|
</a>
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th class="text-center">
|
||||||
<a class="text-dark">Models</a>
|
<a class="text-dark">Models</a>
|
||||||
</th>
|
</th>
|
||||||
<th class="text-center">Action</th>
|
<th class="text-center">Action</th>
|
||||||
@@ -67,7 +67,8 @@ $num_rows = mysqli_num_rows($sql);
|
|||||||
</td>
|
</td>
|
||||||
<td><?php echo $url; ?></td>
|
<td><?php echo $url; ?></td>
|
||||||
<td><?php echo $key; ?></td>
|
<td><?php echo $key; ?></td>
|
||||||
<td><?php echo $ai_model_count; ?></td>
|
<td class="text-center">
|
||||||
|
<a class="badge badge-dark badge-pill p-2" href="ai_model.php"><?= $ai_model_count ?></a>
|
||||||
<td>
|
<td>
|
||||||
<div class="dropdown dropleft text-center">
|
<div class="dropdown dropleft text-center">
|
||||||
<button class="btn btn-secondary btn-sm" type="button" data-toggle="dropdown">
|
<button class="btn btn-secondary btn-sm" type="button" data-toggle="dropdown">
|
||||||
|
|||||||
@@ -4134,10 +4134,30 @@ if (LATEST_DATABASE_VERSION > CURRENT_DATABASE_VERSION) {
|
|||||||
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.3.8'");
|
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.3.8'");
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (CURRENT_DATABASE_VERSION == '2.3.8') {
|
if (CURRENT_DATABASE_VERSION == '2.3.8') {
|
||||||
// // Insert queries here required to update to DB version 2.3.9
|
|
||||||
|
mysqli_query($mysqli, "
|
||||||
|
CREATE TABLE `task_approvals` (
|
||||||
|
`approval_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`approval_scope` enum('client','internal') NOT NULL,
|
||||||
|
`approval_type` enum('any','technical','billing','specific') NOT NULL,
|
||||||
|
`approval_required_user_id` int(11) DEFAULT NULL,
|
||||||
|
`approval_status` enum('pending','approved','declined') NOT NULL,
|
||||||
|
`approval_created_by` int(11) NOT NULL,
|
||||||
|
`approval_approved_by` varchar(255) DEFAULT NULL,
|
||||||
|
`approval_url_key` varchar(200) NOT NULL,
|
||||||
|
`approval_task_id` int(11) NOT NULL,
|
||||||
|
PRIMARY KEY (`approval_id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||||
|
");
|
||||||
|
|
||||||
|
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.3.9'");
|
||||||
|
}
|
||||||
|
|
||||||
|
// if (CURRENT_DATABASE_VERSION == '2.3.9') {
|
||||||
|
// // Insert queries here required to update to DB version 2.4.0
|
||||||
// // 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.3.9'");
|
// mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.4.0'");
|
||||||
// }
|
// }
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ $extensions = [
|
|||||||
'php-mbstring' => 'mbstring',
|
'php-mbstring' => 'mbstring',
|
||||||
'php-gd' => 'gd',
|
'php-gd' => 'gd',
|
||||||
'php-zip' => 'zip',
|
'php-zip' => 'zip',
|
||||||
|
'php-xml' => 'xml',
|
||||||
];
|
];
|
||||||
|
|
||||||
foreach ($extensions as $name => $ext) {
|
foreach ($extensions as $name => $ext) {
|
||||||
@@ -502,12 +503,6 @@ if (file_exists($dbSqlFile)) {
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Duplicate checks
|
|
||||||
$duplicate_tickets_sql = mysqli_query($mysqli, "SELECT ticket_number, COUNT(*) AS count FROM tickets GROUP BY ticket_number HAVING count > 1");
|
|
||||||
$duplicate_quotes_sql = mysqli_query($mysqli, "SELECT quote_number, COUNT(*) AS count FROM quotes GROUP BY quote_number HAVING count > 1");
|
|
||||||
$duplicate_invoices_sql = mysqli_query($mysqli, "SELECT invoice_number, COUNT(*) AS count FROM invoices GROUP BY invoice_number HAVING count > 1");
|
|
||||||
|
|
||||||
|
|
||||||
$mysqli->close();
|
$mysqli->close();
|
||||||
?>
|
?>
|
||||||
|
|
||||||
@@ -764,40 +759,6 @@ $mysqli->close();
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Duplicated ticket/quote/invoice numbers -->
|
|
||||||
<h3 class="mt-3">Duplicated Numbering</h3>
|
|
||||||
<h4>Tickets</h4>
|
|
||||||
<ul>
|
|
||||||
<?php if (mysqli_num_rows($duplicate_tickets_sql) > 0 ) {
|
|
||||||
while ($row = $duplicate_tickets_sql->fetch_assoc()) {
|
|
||||||
echo "<li>" . $config_ticket_prefix . nullable_htmlentities($row['ticket_number']) . " (" . $row['count'] . ")" . "</li>";
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
echo "No duplicate ticket numbers.";
|
|
||||||
} ?>
|
|
||||||
</ul>
|
|
||||||
<h4>Quotes</h4>
|
|
||||||
<ul>
|
|
||||||
<?php if (mysqli_num_rows($duplicate_quotes_sql) > 0 ) {
|
|
||||||
while ($row = $duplicate_quotes_sql->fetch_assoc()) {
|
|
||||||
echo "<li>" . $config_quote_prefix . nullable_htmlentities($row['quote_number']) . " (" . $row['count'] . ")" . "</li>";
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
echo "No duplicate quote numbers.";
|
|
||||||
} ?>
|
|
||||||
</ul>
|
|
||||||
<h4>Invoices</h4>
|
|
||||||
<ul>
|
|
||||||
<?php if (mysqli_num_rows($duplicate_invoices_sql) > 0 ) {
|
|
||||||
while ($row = $duplicate_invoices_sql->fetch_assoc()) {
|
|
||||||
echo "<li>" . $config_invoice_prefix . nullable_htmlentities($row['invoice_number']) . " (" . $row['count'] . ")" . "</li>";
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
echo "No duplicate invoice numbers.";
|
|
||||||
} ?>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -805,4 +766,3 @@ $mysqli->close();
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once "../includes/footer.php";
|
require_once "../includes/footer.php";
|
||||||
|
|
||||||
|
|||||||
@@ -27,12 +27,14 @@
|
|||||||
<p>Roles</p>
|
<p>Roles</p>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<!-- 2025-12-05 JQ - Hide Permission Modules currently just shows modules
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="/admin/modules.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "modules.php") {echo "active";} ?>">
|
<a href="/admin/modules.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "modules.php") {echo "active";} ?>">
|
||||||
<i class="nav-icon fas fa-puzzle-piece"></i>
|
<i class="nav-icon fas fa-puzzle-piece"></i>
|
||||||
<p>Modules</p>
|
<p>Modules</p>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
-->
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="/admin/api_keys.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "api_keys.php") {echo "active";} ?>">
|
<a href="/admin/api_keys.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "api_keys.php") {echo "active";} ?>">
|
||||||
<i class="nav-icon fas fa-key"></i>
|
<i class="nav-icon fas fa-key"></i>
|
||||||
@@ -67,30 +69,20 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="/admin/payment_provider.php" class="nav-link <?php echo (basename($_SERVER['PHP_SELF']) == 'payment_provider.php' ? 'active' : ''); ?>">
|
<a href="/admin/payment_provider.php"
|
||||||
|
class="nav-link <?php echo (in_array(basename($_SERVER['PHP_SELF']), ['payment_provider.php', 'saved_payment_method.php']) ? 'active' : ''); ?>">
|
||||||
<i class="nav-icon far fa-credit-card"></i>
|
<i class="nav-icon far fa-credit-card"></i>
|
||||||
<p>Payment Providers</p>
|
<p>Payment Providers</p>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
|
||||||
<a href="/admin/saved_payment_method.php" class="nav-link <?php echo (basename($_SERVER['PHP_SELF']) == 'saved_payment_method.php' ? 'active' : ''); ?>">
|
|
||||||
<i class="nav-icon far fa-credit-card"></i>
|
|
||||||
<p>Saved Payments</p>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="/admin/ai_provider.php" class="nav-link <?php echo (basename($_SERVER['PHP_SELF']) == 'ai_provider.php' ? 'active' : ''); ?>">
|
<a href="/admin/ai_provider.php"
|
||||||
|
class="nav-link <?php echo (in_array(basename($_SERVER['PHP_SELF']), ['ai_provider.php', 'ai_model.php']) ? 'active' : ''); ?>">
|
||||||
<i class="nav-icon fas fa-robot"></i>
|
<i class="nav-icon fas fa-robot"></i>
|
||||||
<p>AI Providers</p>
|
<p>AI Providers</p>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
|
||||||
<a href="/admin/ai_model.php" class="nav-link <?php echo (basename($_SERVER['PHP_SELF']) == 'ai_model.php' ? 'active' : ''); ?>">
|
|
||||||
<i class="nav-icon fas fa-robot"></i>
|
|
||||||
<p>AI Models</p>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<?php if ($config_module_enable_ticketing) { ?>
|
<?php if ($config_module_enable_ticketing) { ?>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$key = randomString(156);
|
$key = randomString(32);
|
||||||
$decryptPW = randomString(160);
|
$decryptPW = randomString(32);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -16,11 +16,26 @@ ob_start();
|
|||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<div class="alert alert-info">
|
<div class="alert alert-info text-center">
|
||||||
An income account named after the provider will always be created and used for income of paid invoices.<br>
|
<h6>Before Adding a Payment Provider!</h6>
|
||||||
If "Enable Expense" option is enabled, a matching vendor will also be automatically created for expense tracking. Additionally, an expense category named "Payment Processing" will be created.
|
We recommend you add an <strong>Account</strong> and <strong>Vendor</strong> based off the Provider name before continuing eg <strong>Stripe</strong>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<ul class="nav nav-pills nav-justified mb-3">
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link active" data-toggle="pill" href="#pills-details">Details</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" data-toggle="pill" href="#pills-expense">Expense</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<div class="tab-content">
|
||||||
|
|
||||||
|
<div class="tab-pane fade show active" id="pills-details">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Provider <strong class="text-danger">*</strong></label>
|
<label>Provider <strong class="text-danger">*</strong></label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
@@ -53,6 +68,30 @@ ob_start();
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Income / Expense Account <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-piggy-bank"></i></span>
|
||||||
|
</div>
|
||||||
|
<select class="form-control select2" name="account" required>
|
||||||
|
<option value="">- Select an Account -</option>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$sql = mysqli_query($mysqli, "SELECT account_id, account_name FROM accounts WHERE account_archived_at IS NULL ORDER BY account_name ASC");
|
||||||
|
while ($row = mysqli_fetch_array($sql)) {
|
||||||
|
$account_id = intval($row['account_id']);
|
||||||
|
$account_name = nullable_htmlentities($row['account_name']);
|
||||||
|
?>
|
||||||
|
<option <?php if ($account_name === 'Stripe') { echo "selected"; } ?> value="<?= $account_id ?>"><?= $account_name ?></option>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Threshold</label>
|
<label>Threshold</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
@@ -64,7 +103,9 @@ ob_start();
|
|||||||
<small class="form-text text-muted">Will not show as an option at Checkout if invoice amount is above this number, 0 disables the threshold check.</small>
|
<small class="form-text text-muted">Will not show as an option at Checkout if invoice amount is above this number, 0 disables the threshold check.</small>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr>
|
</div>
|
||||||
|
|
||||||
|
<div class="tab-pane fade" id="pills-expense">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="custom-control custom-switch">
|
<div class="custom-control custom-switch">
|
||||||
@@ -73,6 +114,60 @@ ob_start();
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Payment Provider Vendor <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-building"></i></span>
|
||||||
|
</div>
|
||||||
|
<select class="form-control select2" name="expense_vendor" required>
|
||||||
|
<option value="0">Expense Disabled</option>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$sql = mysqli_query($mysqli, "SELECT vendor_id, vendor_name FROM vendors WHERE vendor_client_id = 0 AND vendor_archived_at IS NULL ORDER BY vendor_name ASC");
|
||||||
|
while ($row = mysqli_fetch_array($sql)) {
|
||||||
|
$vendor_id = intval($row['vendor_id']);
|
||||||
|
$vendor_name = nullable_htmlentities($row['vendor_name']);
|
||||||
|
?>
|
||||||
|
<option <?php if ($vendor_name === 'Stripe') { echo "selected"; } ?> value="<?= $vendor_id ?>"><?= $vendor_name ?></option>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Expense Category <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-list"></i></span>
|
||||||
|
</div>
|
||||||
|
<select class="form-control select2" name="expense_category" required>
|
||||||
|
<option value="">- Select a Category -</option>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$sql = mysqli_query($mysqli, "SELECT category_id, category_name FROM categories WHERE category_type = 'Expense' AND category_archived_at IS NULL ORDER BY category_name ASC");
|
||||||
|
while ($row = mysqli_fetch_array($sql)) {
|
||||||
|
$category_id = intval($row['category_id']);
|
||||||
|
$category_name = nullable_htmlentities($row['category_name']);
|
||||||
|
?>
|
||||||
|
<option <?php if ($category_name === 'Processing Fee') { echo "selected"; } ?> value="<?= $category_id ?>"><?= $category_name ?></option>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
<div class="input-group-append">
|
||||||
|
<button class="btn btn-secondary ajax-modal" type="button"
|
||||||
|
data-modal-url="../admin/modals/category/category_add.php?category=Expense">
|
||||||
|
<i class="fas fa-plus"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Percentage Fee to expense</label>
|
<label>Percentage Fee to expense</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
@@ -96,6 +191,8 @@ ob_start();
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="submit" name="add_payment_provider" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Add</button>
|
<button type="submit" name="add_payment_provider" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Add</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>
|
||||||
|
|||||||
@@ -10,10 +10,10 @@ $row = mysqli_fetch_array($sql);
|
|||||||
$provider_name = nullable_htmlentities($row['payment_provider_name']);
|
$provider_name = nullable_htmlentities($row['payment_provider_name']);
|
||||||
$public_key = nullable_htmlentities($row['payment_provider_public_key']);
|
$public_key = nullable_htmlentities($row['payment_provider_public_key']);
|
||||||
$private_key = nullable_htmlentities($row['payment_provider_private_key']);
|
$private_key = nullable_htmlentities($row['payment_provider_private_key']);
|
||||||
$account_id = nullable_htmlentities($row['payment_provider_account']);
|
$account_id = intval($row['payment_provider_account']);
|
||||||
$threshold = floatval($row['payment_provider_threshold']);
|
$threshold = floatval($row['payment_provider_threshold']);
|
||||||
$vendor_id = nullable_htmlentities($row['payment_provider_expense_vendor']);
|
$vendor_id = intval($row['payment_provider_expense_vendor']);
|
||||||
$category_id = nullable_htmlentities($row['payment_provider_expense_category']);
|
$category_id = intval($row['payment_provider_expense_category']);
|
||||||
$percent_fee = floatval($row['payment_provider_expense_percentage_fee']) * 100;
|
$percent_fee = floatval($row['payment_provider_expense_percentage_fee']) * 100;
|
||||||
$flat_fee = floatval($row['payment_provider_expense_flat_fee']);
|
$flat_fee = floatval($row['payment_provider_expense_flat_fee']);
|
||||||
|
|
||||||
@@ -21,24 +21,39 @@ $flat_fee = floatval($row['payment_provider_expense_flat_fee']);
|
|||||||
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-credit-card mr-2"></i>Editing: <strong><?php echo $provider_name; ?></strong></h5>
|
<h5 class="modal-title"><i class="fa fa-fw fa-credit-card mr-2"></i>Editing: <strong><?= $provider_name ?></strong></h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?php echo $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<input type="hidden" name="provider_id" value="<?php echo $provider_id; ?>">
|
<input type="hidden" name="provider_id" value="<?= $provider_id ?>">
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
<ul class="nav nav-pills nav-justified mb-3">
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link active" data-toggle="pill" href="#pills-details">Details</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" data-toggle="pill" href="#pills-expense">Expense</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<div class="tab-content">
|
||||||
|
|
||||||
|
<div class="tab-pane fade show active" id="pills-details">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Publishable key <strong class="text-danger">*</strong></label>
|
<label>Publishable key <strong class="text-danger">*</strong></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-eye"></i></span>
|
<span class="input-group-text"><i class="fa fa-fw fa-eye"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<input type="text" class="form-control" name="public_key" placeholder="Publishable API Key (pk_...)" value="<?php echo $public_key; ?>">
|
<input type="text" class="form-control" name="public_key" placeholder="Publishable API Key (pk_...)" value="<?= $public_key ?>">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -48,7 +63,31 @@ ob_start();
|
|||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-key"></i></span>
|
<span class="input-group-text"><i class="fa fa-fw fa-key"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<input type="text" class="form-control" name="private_key" placeholder="Secret API Key (sk_...)" value="<?php echo $private_key; ?>">
|
<input type="text" class="form-control" name="private_key" placeholder="Secret API Key (sk_...)" value="<?= $private_key ?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Income / Expense Account <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-piggy-bank"></i></span>
|
||||||
|
</div>
|
||||||
|
<select class="form-control select2" name="account" required>
|
||||||
|
<option value="">- Select an Account -</option>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$sql = mysqli_query($mysqli, "SELECT account_id, account_name FROM accounts WHERE account_archived_at IS NULL ORDER BY account_name ASC");
|
||||||
|
while ($row = mysqli_fetch_array($sql)) {
|
||||||
|
$account_id_select = intval($row['account_id']);
|
||||||
|
$account_name = nullable_htmlentities($row['account_name']);
|
||||||
|
?>
|
||||||
|
<option <?php if ($account_id === $account_id_select) { echo "selected"; } ?> value="<?= $account_id_select ?>"><?= $account_name ?></option>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -63,14 +102,64 @@ ob_start();
|
|||||||
<small class="form-text text-muted">Will not show as an option at Checkout if above this number</small>
|
<small class="form-text text-muted">Will not show as an option at Checkout if above this number</small>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr>
|
</div>
|
||||||
|
|
||||||
|
<div class="tab-pane fade" id="pills-expense">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="custom-control custom-switch">
|
<label>Payment Provider Vendor <strong class="text-danger">*</strong></label>
|
||||||
<input type="checkbox" class="custom-control-input" name="enable_expense" <?php if ($vendor_id) { echo "checked"; } ?> value="1" id="enableEditExpenseSwitch">
|
<div class="input-group">
|
||||||
<label class="custom-control-label" for="enableEditExpenseSwitch">Enable Expense</label>
|
<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="expense_vendor" required>
|
||||||
|
<option value="0">Expense Disabled</option>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$sql = mysqli_query($mysqli, "SELECT vendor_id, vendor_name FROM vendors WHERE vendor_client_id = 0 AND vendor_archived_at IS NULL ORDER BY vendor_name ASC");
|
||||||
|
while ($row = mysqli_fetch_array($sql)) {
|
||||||
|
$vendor_id_select = intval($row['vendor_id']);
|
||||||
|
$vendor_name = nullable_htmlentities($row['vendor_name']);
|
||||||
|
?>
|
||||||
|
<option <?php if ($vendor_id === $vendor_id_select) { echo "selected"; } ?>
|
||||||
|
value="<?= $vendor_id_select ?>"><?= $vendor_name ?>
|
||||||
|
</option>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Expense Category <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-list"></i></span>
|
||||||
|
</div>
|
||||||
|
<select class="form-control select2" name="expense_category" required>
|
||||||
|
<option value="">- Select a Category -</option>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$sql_category = mysqli_query($mysqli, "SELECT category_id, category_name FROM categories WHERE category_type = 'Expense' AND category_archived_at IS NULL ORDER BY category_name ASC");
|
||||||
|
while ($row = mysqli_fetch_array($sql_category)) {
|
||||||
|
$category_id_select = intval($row['category_id']);
|
||||||
|
$category_name = nullable_htmlentities($row['category_name']);
|
||||||
|
?>
|
||||||
|
<option <?php if ($category_id === $category_id_select) { echo "selected"; } ?> value="<?= $category_id_select ?>"><?= $category_name ?></option>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
<div class="input-group-append">
|
||||||
|
<button class="btn btn-secondary ajax-modal" type="button"
|
||||||
|
data-modal-url="../admin/modals/category/category_add.php?category=Expense">
|
||||||
|
<i class="fas fa-plus"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<small>(Category: Payment Processing -- Vendor: <?php echo $provider_name; ?></small>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -94,7 +183,8 @@ ob_start();
|
|||||||
</div>
|
</div>
|
||||||
<small class="form-text text-muted">See <a href="https://stripe.com/pricing" target="_blank">here <i class="fas fa-fw fa-external-link-alt"></i></a> for the latest Stripe Fees.</small>
|
<small class="form-text text-muted">See <a href="https://stripe.com/pricing" target="_blank">here <i class="fas fa-fw fa-external-link-alt"></i></a> for the latest Stripe Fees.</small>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="submit" name="edit_payment_provider" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Save</button>
|
<button type="submit" name="edit_payment_provider" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Save</button>
|
||||||
|
|||||||
@@ -1,13 +1,18 @@
|
|||||||
<div class="modal" id="exportUserModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Users to CSV</h5>
|
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Users to CSV</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -15,7 +20,7 @@
|
|||||||
<button type="submit" name="export_users_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
<button type="submit" name="export_users_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ $num_rows = mysqli_num_rows($sql);
|
|||||||
<th>
|
<th>
|
||||||
<a class="text-dark">Expensed Fee</a>
|
<a class="text-dark">Expensed Fee</a>
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th class="text-center">
|
||||||
<a class="text-dark">Saved Payment Methods</a>
|
<a class="text-dark">Saved Payment Methods</a>
|
||||||
</th>
|
</th>
|
||||||
<th class="text-center">Action</th>
|
<th class="text-center">Action</th>
|
||||||
@@ -72,7 +72,7 @@ $num_rows = mysqli_num_rows($sql);
|
|||||||
$provider_description = nullable_htmlentities($row['payment_provider_description']);
|
$provider_description = nullable_htmlentities($row['payment_provider_description']);
|
||||||
$account_name = nullable_htmlentities($row['account_name']);
|
$account_name = nullable_htmlentities($row['account_name']);
|
||||||
$threshold = floatval($row['payment_provider_threshold']);
|
$threshold = floatval($row['payment_provider_threshold']);
|
||||||
$vendor_name = nullable_htmlentities($row['vendor_name']);
|
$vendor_name = nullable_htmlentities($row['vendor_name'] ?? "Expense Disabled");
|
||||||
$category = nullable_htmlentities($row['category_name']);
|
$category = nullable_htmlentities($row['category_name']);
|
||||||
$percent_fee = floatval($row['payment_provider_expense_percentage_fee']) * 100;
|
$percent_fee = floatval($row['payment_provider_expense_percentage_fee']) * 100;
|
||||||
$flat_fee = floatval($row['payment_provider_expense_flat_fee']);
|
$flat_fee = floatval($row['payment_provider_expense_flat_fee']);
|
||||||
@@ -94,7 +94,9 @@ $num_rows = mysqli_num_rows($sql);
|
|||||||
<td><?php echo $vendor_name; ?></td>
|
<td><?php echo $vendor_name; ?></td>
|
||||||
<td><?php echo $category; ?></td>
|
<td><?php echo $category; ?></td>
|
||||||
<td><?php echo $percent_fee; ?>% + <?php echo numfmt_format_currency($currency_format, $flat_fee, $session_company_currency); ?></td>
|
<td><?php echo $percent_fee; ?>% + <?php echo numfmt_format_currency($currency_format, $flat_fee, $session_company_currency); ?></td>
|
||||||
<td><?php echo $saved_payment_count; ?></td>
|
<td class="text-center">
|
||||||
|
<a class="badge badge-dark badge-pill p-2" href="saved_payment_method.php"><?= $saved_payment_count ?></a>
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div class="dropdown dropleft text-center">
|
<div class="dropdown dropleft text-center">
|
||||||
<button class="btn btn-secondary btn-sm" type="button" data-toggle="dropdown">
|
<button class="btn btn-secondary btn-sm" type="button" data-toggle="dropdown">
|
||||||
|
|||||||
@@ -14,53 +14,20 @@ if (isset($_POST['add_payment_provider'])) {
|
|||||||
$public_key = sanitizeInput($_POST['public_key']);
|
$public_key = sanitizeInput($_POST['public_key']);
|
||||||
$private_key = sanitizeInput($_POST['private_key']);
|
$private_key = sanitizeInput($_POST['private_key']);
|
||||||
$threshold = floatval($_POST['threshold']);
|
$threshold = floatval($_POST['threshold']);
|
||||||
$enable_expense = intval($_POST['enable_expense'] ?? 0);
|
$account = intval($_POST['account']);
|
||||||
|
$expense_vendor = intval($_POST['expense_vendor']) ?? 0;
|
||||||
|
$expense_category = intval($_POST['expense_category']) ?? 0;
|
||||||
$percentage_fee = floatval($_POST['percentage_fee']) / 100 ?? 0;
|
$percentage_fee = floatval($_POST['percentage_fee']) / 100 ?? 0;
|
||||||
$flat_fee = floatval($_POST['flat_fee']) ?? 0;
|
$flat_fee = floatval($_POST['flat_fee']) ?? 0;
|
||||||
|
|
||||||
// Check to ensure provider isn't added twice
|
// Check to ensure provider isn't added twice
|
||||||
$sql = "SELECT 1 FROM payment_providers WHERE payment_provider_name = '$provider' LIMIT 1";
|
$sql = mysqli_query($mysqli, "SELECT 1 FROM payment_providers WHERE payment_provider_name = '$provider' LIMIT 1");
|
||||||
$result = mysqli_query($mysqli, $sql);
|
if (mysqli_num_rows($sql) > 0) {
|
||||||
if (mysqli_num_rows($result) > 0) {
|
|
||||||
flash_alert("Payment Provider <strong>$provider</strong> already exists", 'error');
|
flash_alert("Payment Provider <strong>$provider</strong> already exists", 'error');
|
||||||
redirect();
|
redirect();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check for Stripe Account, if not create it
|
mysqli_query($mysqli,"INSERT INTO payment_providers SET payment_provider_name = '$provider', payment_provider_public_key = '$public_key', payment_provider_private_key = '$private_key', payment_provider_threshold = $threshold, payment_provider_account = $account, payment_provider_expense_vendor = $expense_vendor, payment_provider_expense_category = $expense_category, payment_provider_expense_percentage_fee = $percentage_fee, payment_provider_expense_flat_fee = $flat_fee");
|
||||||
$sql_account = mysqli_query($mysqli,"SELECT account_id FROM accounts WHERE account_name = '$provider' AND account_archived_at IS NULL LIMIT 1");
|
|
||||||
if (mysqli_num_rows($sql_account) == 0) {
|
|
||||||
$account_id = mysqli_insert_id($mysqli);
|
|
||||||
} else {
|
|
||||||
$row = mysqli_fetch_array($sql_account);
|
|
||||||
$account_id = intval($row['account_id']);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Expense defaults
|
|
||||||
$category_id = 0;
|
|
||||||
$vendor_id = 0;
|
|
||||||
|
|
||||||
if ($enable_expense) {
|
|
||||||
// Category
|
|
||||||
$sql_category = mysqli_query($mysqli,"SELECT category_id FROM categories WHERE category_name = 'Payment Processing' AND category_type = 'Expense' AND category_archived_at IS NULL LIMIT 1");
|
|
||||||
if (mysqli_num_rows($sql_category) == 0) {
|
|
||||||
mysqli_query($mysqli,"INSERT INTO categories SET category_name = 'Processing Fee', category_type = 'Payment Processing', category_color = 'gray'");
|
|
||||||
$category_id = mysqli_insert_id($mysqli);
|
|
||||||
} else {
|
|
||||||
$row = mysqli_fetch_array($sql_category);
|
|
||||||
$category_id = intval($row['category_id']);
|
|
||||||
}
|
|
||||||
// Vendor
|
|
||||||
$sql_vendor = mysqli_query($mysqli,"SELECT vendor_id FROM vendors WHERE vendor_name = '$provider' AND vendor_client_id = 0 AND vendor_archived_at IS NULL LIMIT 1");
|
|
||||||
if (mysqli_num_rows($sql_vendor) == 0) {
|
|
||||||
mysqli_query($mysqli,"INSERT INTO vendors SET vendor_name = '$provider', vendor_description = 'Payment Processor Provider', vendor_client_id = 0");
|
|
||||||
$vendor_id = mysqli_insert_id($mysqli);
|
|
||||||
} else {
|
|
||||||
$row = mysqli_fetch_array($sql_vendor);
|
|
||||||
$vendor_id = intval($row['vendor_id']);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
mysqli_query($mysqli,"INSERT INTO payment_providers SET payment_provider_name = '$provider', payment_provider_public_key = '$public_key', payment_provider_private_key = '$private_key', payment_provider_threshold = $threshold, payment_provider_account = $account_id, payment_provider_expense_vendor = $vendor_id, payment_provider_expense_category = $category_id, payment_provider_expense_percentage_fee = $percentage_fee, payment_provider_expense_flat_fee = $flat_fee");
|
|
||||||
|
|
||||||
$provider_id = mysqli_insert_id($mysqli);
|
$provider_id = mysqli_insert_id($mysqli);
|
||||||
|
|
||||||
@@ -81,11 +48,13 @@ if (isset($_POST['edit_payment_provider'])) {
|
|||||||
$public_key = sanitizeInput($_POST['public_key']);
|
$public_key = sanitizeInput($_POST['public_key']);
|
||||||
$private_key = sanitizeInput($_POST['private_key']);
|
$private_key = sanitizeInput($_POST['private_key']);
|
||||||
$threshold = floatval($_POST['threshold']);
|
$threshold = floatval($_POST['threshold']);
|
||||||
$enable_expense = intval($_POST['enable_expense'] ?? 0);
|
$account = intval($_POST['account']);
|
||||||
|
$expense_vendor = intval($_POST['expense_vendor']) ?? 0;
|
||||||
|
$expense_category = intval($_POST['expense_category']) ?? 0;
|
||||||
$percentage_fee = floatval($_POST['percentage_fee']) / 100;
|
$percentage_fee = floatval($_POST['percentage_fee']) / 100;
|
||||||
$flat_fee = floatval($_POST['flat_fee']);
|
$flat_fee = floatval($_POST['flat_fee']);
|
||||||
|
|
||||||
mysqli_query($mysqli,"UPDATE payment_providers SET payment_provider_public_key = '$public_key', payment_provider_private_key = '$private_key', payment_provider_threshold = $threshold, payment_provider_expense_percentage_fee = $percentage_fee, payment_provider_expense_flat_fee = $flat_fee WHERE payment_provider_id = $provider_id");
|
mysqli_query($mysqli,"UPDATE payment_providers SET payment_provider_public_key = '$public_key', payment_provider_private_key = '$private_key', payment_provider_threshold = $threshold, payment_provider_account = $account, payment_provider_expense_vendor = $expense_vendor, payment_provider_expense_category = $expense_category, payment_provider_expense_percentage_fee = $percentage_fee, payment_provider_expense_flat_fee = $flat_fee WHERE payment_provider_id = $provider_id");
|
||||||
|
|
||||||
logAction("Payment Provider", "Edit", "$session_name edited Payment Provider $provider");
|
logAction("Payment Provider", "Edit", "$session_name edited Payment Provider $provider");
|
||||||
|
|
||||||
|
|||||||
@@ -49,3 +49,17 @@ if (isset($_POST['edit_favicon_settings'])) {
|
|||||||
redirect();
|
redirect();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isset($_GET['reset_favicon'])) {
|
||||||
|
|
||||||
|
if (file_exists("../uploads/favicon.ico")) {
|
||||||
|
unlink("../uploads/favicon.ico");
|
||||||
|
}
|
||||||
|
|
||||||
|
logAction("Settings", "Edit", "$session_name reset Favicon");
|
||||||
|
|
||||||
|
flash_alert("Favicon reset", 'error');
|
||||||
|
|
||||||
|
redirect();
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
@@ -33,6 +33,16 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
<ol class="breadcrumb d-print-none">
|
||||||
|
<li class="breadcrumb-item">
|
||||||
|
<a href="/admin">Admin</a>
|
||||||
|
</li>
|
||||||
|
<li class="breadcrumb-item">
|
||||||
|
<a href="payment_provider.php">Payment Providers</a>
|
||||||
|
</li>
|
||||||
|
<li class="breadcrumb-item active">Saved Payment Methods (Stripe)</li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
<div class="card card-dark">
|
<div class="card card-dark">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<h3 class="card-title"><i class="fas fa-fw fa-credit-card mr-2"></i>Saved Payment Methods</h3>
|
<h3 class="card-title"><i class="fas fa-fw fa-credit-card mr-2"></i>Saved Payment Methods</h3>
|
||||||
@@ -107,8 +117,16 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo $client_name; ?> (<?php echo $client_id; ?>)</td>
|
<td>
|
||||||
<td><?php echo $provider_name; ?> (<?php echo $provider_id; ?>)</td>
|
<?= $client_name ?>
|
||||||
|
<br>
|
||||||
|
<small class="text-secondary">ID: <?= $client_id ?></small>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?= $provider_name ?>
|
||||||
|
<br>
|
||||||
|
<small class="text-secondary">ID: <?= $provider_id ?></small>
|
||||||
|
</td>
|
||||||
<td><?php echo $saved_payment_description; ?></td>
|
<td><?php echo $saved_payment_description; ?></td>
|
||||||
<td><?php echo $provider_client; ?></td>
|
<td><?php echo $provider_client; ?></td>
|
||||||
<td><?php echo $provider_payment_method; ?></td>
|
<td><?php echo $provider_payment_method; ?></td>
|
||||||
|
|||||||
@@ -57,11 +57,12 @@ require_once "includes/inc_all_admin.php";
|
|||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<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")) { ?>
|
||||||
|
<a href="post.php?reset_favicon" class="btn btn-outline-danger"><i class="fas fa-redo-alt mr-2"></i>Reset Favicon</a>
|
||||||
|
<?php } ?>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
require_once "../includes/footer.php";
|
require_once "../includes/footer.php";
|
||||||
|
|
||||||
|
|||||||
@@ -33,9 +33,16 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
<!--<a class="dropdown-item text-dark ajax-modal" href="#" data-modal-url="modals/user/user_invite.php"><i class="fas fa-paper-plane mr-2"></i>Invite User</a>-->
|
<!--<a class="dropdown-item text-dark ajax-modal" href="#" data-modal-url="modals/user/user_invite.php"><i class="fas fa-paper-plane mr-2"></i>Invite User</a>-->
|
||||||
<?php if ($num_rows[0] > 1) { ?>
|
<?php if ($num_rows[0] > 1) { ?>
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportUserModal"><i class="fa fa-fw fa-download mr-2"></i>Export</a>
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/user/user_export.php">
|
||||||
|
<i class="fa fa-fw fa-download mr-2"></i>Export
|
||||||
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-danger ajax-modal" href="#" data-modal-url="modals/user/user_all_reset_password.php" data-modal-size="lg"><i class="fas fa-skull-crossbones mr-2"></i>IR</a>
|
<a class="dropdown-item text-danger ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/user/user_all_reset_password.php"
|
||||||
|
data-modal-size="lg">
|
||||||
|
<i class="fas fa-skull-crossbones mr-2"></i>IR
|
||||||
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -235,5 +242,4 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
require_once "modals/user/user_export.php";
|
|
||||||
require_once "../includes/footer.php";
|
require_once "../includes/footer.php";
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ if (isset($_GET['certificate_fetch_parse_json_details'])) {
|
|||||||
if (isset($_GET['merge_ticket_get_json_details'])) {
|
if (isset($_GET['merge_ticket_get_json_details'])) {
|
||||||
enforceUserPermission('module_support');
|
enforceUserPermission('module_support');
|
||||||
|
|
||||||
$merge_into_ticket_number = intval($_GET['merge_into_ticket_number']);
|
$merge_into_ticket_number = intval(preg_replace('/[^0-9]/', '', $_GET['merge_into_ticket_number']));
|
||||||
|
|
||||||
$sql = mysqli_query($mysqli, "SELECT ticket_id, ticket_number, ticket_prefix, ticket_subject, ticket_priority, ticket_status, ticket_status_name, client_name, contact_name FROM tickets
|
$sql = mysqli_query($mysqli, "SELECT ticket_id, ticket_number, ticket_prefix, ticket_subject, ticket_priority, ticket_status, ticket_status_name, client_name, contact_name FROM tickets
|
||||||
LEFT JOIN clients ON ticket_client_id = client_id
|
LEFT JOIN clients ON ticket_client_id = client_id
|
||||||
@@ -195,7 +195,7 @@ if (isset($_GET['share_generate_link'])) {
|
|||||||
$item_expires_friendly = "1 month";
|
$item_expires_friendly = "1 month";
|
||||||
}
|
}
|
||||||
|
|
||||||
$item_key = randomString(156);
|
$item_key = randomString(32);
|
||||||
|
|
||||||
if ($item_type == "Document") {
|
if ($item_type == "Document") {
|
||||||
$row = mysqli_fetch_array(mysqli_query($mysqli, "SELECT document_name FROM documents WHERE document_id = $item_id AND document_client_id = $client_id LIMIT 1"));
|
$row = mysqli_fetch_array(mysqli_query($mysqli, "SELECT document_name FROM documents WHERE document_id = $item_id AND document_client_id = $client_id LIMIT 1"));
|
||||||
@@ -992,3 +992,23 @@ if (isset($_GET['apex_domain_check'])) {
|
|||||||
|
|
||||||
echo json_encode($response);
|
echo json_encode($response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get internal users/techs
|
||||||
|
if (isset($_GET['get_internal_users'])) {
|
||||||
|
enforceUserPermission('module_support');
|
||||||
|
|
||||||
|
$sql = mysqli_query(
|
||||||
|
$mysqli,
|
||||||
|
"SELECT user_id, user_name
|
||||||
|
FROM users
|
||||||
|
WHERE user_type = 1 AND user_status = 1 AND user_archived_at IS NULL
|
||||||
|
ORDER BY user_name"
|
||||||
|
);
|
||||||
|
|
||||||
|
while ($row = mysqli_fetch_assoc($sql)) {
|
||||||
|
$response['users'][] = $row;
|
||||||
|
}
|
||||||
|
|
||||||
|
echo json_encode($response);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|||||||
@@ -469,11 +469,15 @@ if (isset($_GET['asset_id'])) {
|
|||||||
<i class="fas fa-fw fa-layer-group mr-2"></i>Bulk Action (<span id="selectedCount">0</span>)
|
<i class="fas fa-fw fa-layer-group mr-2"></i>Bulk Action (<span id="selectedCount">0</span>)
|
||||||
</button>
|
</button>
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#bulkAssignNetworkModal">
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/asset/asset_interface_bulk_edit_network.php?client_id=<?= $client_id ?>"
|
||||||
|
data-bulk="true">
|
||||||
<i class="fas fa-fw fa-network-wired mr-2"></i>Assign Network
|
<i class="fas fa-fw fa-network-wired mr-2"></i>Assign Network
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#bulkSetInterfaceTypeModal">
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/asset/asset_interface_bulk_edit_type.php?client_id=<?= $client_id ?>"
|
||||||
|
data-bulk="true">
|
||||||
<i class="fas fa-fw fa-ethernet mr-2"></i>Set Type
|
<i class="fas fa-fw fa-ethernet mr-2"></i>Set Type
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
@@ -597,8 +601,6 @@ if (isset($_GET['asset_id'])) {
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<?php require_once "modals/asset/asset_interface_bulk_edit_type.php"; ?>
|
|
||||||
<?php require_once "modals/asset/asset_interface_bulk_edit_network.php"; ?>
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -200,14 +200,16 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
<?php if ($client_url) { ?>
|
<?php if ($client_url) { ?>
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#importAssetModal">
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/asset/asset_import.php?<?= $client_url ?>">
|
||||||
<i class="fa fa-fw fa-upload mr-2"></i>Import
|
<i class="fa fa-fw fa-upload mr-2"></i>Import
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if ($num_rows[0] > 0) { ?>
|
<?php if ($num_rows[0] > 0) { ?>
|
||||||
|
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportAssetModal">
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/asset/asset_export.php?<?= $client_url ?>">
|
||||||
<i class="fa fa-fw fa-download mr-2"></i>Export
|
<i class="fa fa-fw fa-download mr-2"></i>Export
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
@@ -789,8 +791,4 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<script src="../js/bulk_actions.js"></script>
|
<script src="../js/bulk_actions.js"></script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
require_once "modals/asset/asset_export.php";
|
|
||||||
if ($client_url) {
|
|
||||||
require_once "modals/asset/asset_import.php";
|
|
||||||
}
|
|
||||||
require_once "../includes/footer.php";
|
require_once "../includes/footer.php";
|
||||||
|
|||||||
@@ -1,72 +0,0 @@
|
|||||||
<?php require_once "includes/inc_all.php"; ?>
|
|
||||||
|
|
||||||
<!-- Breadcrumbs-->
|
|
||||||
<ol class="breadcrumb">
|
|
||||||
<li class="breadcrumb-item">
|
|
||||||
<a href="index.html">Dashboard</a>
|
|
||||||
</li>
|
|
||||||
<li class="breadcrumb-item active">Blank Page</li>
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
<!-- Page Content -->
|
|
||||||
<h1>Blank Page</h1>
|
|
||||||
<hr>
|
|
||||||
<p>This is a great starting point for new custom pages.</p>
|
|
||||||
<h1><?php echo $session_user_role; ?></h1>
|
|
||||||
<?php validateAdminRole(); ?>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
|
|
||||||
$start_date = date('Y') . "-10-10";
|
|
||||||
|
|
||||||
echo "<H1>$start_date</H1>";
|
|
||||||
|
|
||||||
echo "<H2>User Agent</H2>";
|
|
||||||
echo getUserAgent();
|
|
||||||
|
|
||||||
|
|
||||||
?>
|
|
||||||
<br>
|
|
||||||
|
|
||||||
<input type="tel" name="phone" id="phone">
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<label>Minimal</label>
|
|
||||||
<select class="form-control select2 select2-hidden-accessible" style="width: 100%;" data-select2-id="1" tabindex="-1" aria-hidden="true">
|
|
||||||
<option selected="selected" data-select2-id="3">Alabama</option>
|
|
||||||
<option data-select2-id="35">Alaska</option>
|
|
||||||
<option data-select2-id="36">California</option>
|
|
||||||
<option data-select2-id="37">Delaware</option>
|
|
||||||
<option data-select2-id="38">Tennessee</option>
|
|
||||||
<option data-select2-id="39">Texas</option>
|
|
||||||
<option data-select2-id="40">Washington</option>
|
|
||||||
</select><span class="select2 select2-container select2-container--default select2-container--below" dir="ltr" data-select2-id="2" style="width: 100%;"><span class="selection"><span class="select2-selection select2-selection--single" role="combobox" aria-haspopup="true" aria-expanded="false" tabindex="0" aria-disabled="false" aria-labelledby="select2-nbex-container"><span class="select2-selection__rendered" id="select2-nbex-container" role="textbox" aria-readonly="true" title="Alabama">Alabama</span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span></span></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
<dt>Requester</dt>
|
|
||||||
<dd>Sam Adams</dd>
|
|
||||||
|
|
||||||
<dt>Created</dt>
|
|
||||||
<dd><time datetime="2024-04-11T17:52:30+00:00" title="2024-04-11 13:52" data-datetime="calendar">Today at 13:52</time></dd>
|
|
||||||
|
|
||||||
<dt>Last activity</dt>
|
|
||||||
<dd><time datetime="2024-04-11T18:08:55+00:00" title="2024-04-11 14:08" data-datetime="calendar">Today at 14:08</time></dd>
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
<?php echo randomString(100); ?>
|
|
||||||
<br>
|
|
||||||
<textarea class="tinymceTest"></textarea>
|
|
||||||
|
|
||||||
<textarea class="tinymce"></textarea>
|
|
||||||
|
|
||||||
<textarea class="tinymceTicket"></textarea>
|
|
||||||
<?php
|
|
||||||
// show the current Date and Time
|
|
||||||
$date_time = date('Y-m-d H:i:s');
|
|
||||||
echo "Current Date and Time: <strong>$date_time</strong>";
|
|
||||||
?>
|
|
||||||
|
|
||||||
<script>toastr.success('Have Fun Wozz!!')</script>
|
|
||||||
|
|
||||||
<?php require_once "../includes/footer.php";
|
|
||||||
|
|||||||
@@ -68,7 +68,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<?php if ($num_rows[0] > 0) { ?>
|
<?php if ($num_rows[0] > 0) { ?>
|
||||||
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportCertificateModal">
|
<a class="dropdown-item text-dark ajax-modal" href="#"\
|
||||||
|
data-modal-url="modals/certificate/certificate_export.php?<?= $client_url ?>">
|
||||||
<i class="fa fa-fw fa-download mr-2"></i>Export
|
<i class="fa fa-fw fa-download mr-2"></i>Export
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -299,15 +300,10 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<?php require_once "../includes/filter_footer.php";
|
<?php require_once "../includes/filter_footer.php"; ?>
|
||||||
?>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
|
||||||
require_once "modals/certificate/certificate_export.php";
|
|
||||||
?>
|
|
||||||
|
|
||||||
<script src="../js/bulk_actions.js"></script>
|
<script src="../js/bulk_actions.js"></script>
|
||||||
|
|
||||||
<?php require_once "../includes/footer.php";
|
<?php require_once "../includes/footer.php";
|
||||||
|
|||||||
@@ -92,11 +92,13 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
</button>
|
</button>
|
||||||
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#importClientModal">
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/client/client_import.php">
|
||||||
<i class="fa fa-fw fa-upload mr-2"></i>Import
|
<i class="fa fa-fw fa-upload mr-2"></i>Import
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportClientModal">
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/client/client_export.php">
|
||||||
<i class="fa fa-fw fa-download mr-2"></i>Export
|
<i class="fa fa-fw fa-download mr-2"></i>Export
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -284,7 +286,7 @@ $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-sm">
|
<div class="table-responsive">
|
||||||
<table class="table table-hover mb-0 text-nowrap">
|
<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>
|
||||||
@@ -623,6 +625,4 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<script src="../js/bulk_actions.js"></script>
|
<script src="../js/bulk_actions.js"></script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
require_once "modals/client/client_import.php";
|
|
||||||
require_once "modals/client/client_export.php";
|
|
||||||
require_once "../includes/footer.php";
|
require_once "../includes/footer.php";
|
||||||
|
|||||||
@@ -797,7 +797,9 @@ if (isset($_GET['contact_id'])) {
|
|||||||
<div class="card-header py-2">
|
<div class="card-header py-2">
|
||||||
<h3 class="card-title mt-2"><i class="fa fa-fw fa-life-ring mr-2"></i>Related Tickets</h3>
|
<h3 class="card-title mt-2"><i class="fa fa-fw fa-life-ring mr-2"></i>Related Tickets</h3>
|
||||||
<div class="card-tools">
|
<div class="card-tools">
|
||||||
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#addTicketModal">
|
<button type="button" class="btn btn-primary ajax-modal"
|
||||||
|
data-modal-url="modals/ticket/ticket_add.php?<?= $client_url ?>&contact_id=<?= $contact_id ?>"
|
||||||
|
data-modal-size="lg">
|
||||||
<i class="fas fa-plus mr-2"></i>New Ticket
|
<i class="fas fa-plus mr-2"></i>New Ticket
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -98,12 +98,14 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<?php if ($client_url) { ?>
|
<?php if ($client_url) { ?>
|
||||||
<!-- <a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#contactInviteModal"><i class="fas fa-fw fa-paper-plane mr-2"></i>Invite</a>-->
|
<!-- <a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#contactInviteModal"><i class="fas fa-fw fa-paper-plane mr-2"></i>Invite</a>-->
|
||||||
<!-- <div class="dropdown-divider"></div>-->
|
<!-- <div class="dropdown-divider"></div>-->
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#importContactModal">
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/contact/contact_import.php?<?= $client_url ?>">
|
||||||
<i class="fa fa-fw fa-upload mr-2"></i>Import
|
<i class="fa fa-fw fa-upload mr-2"></i>Import
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportContactModal">
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/contact/contact_export.php?<?= $client_url ?>">
|
||||||
<i class="fa fa-fw fa-download mr-2"></i>Export
|
<i class="fa fa-fw fa-download mr-2"></i>Export
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -566,10 +568,4 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<script src="../js/bulk_actions.js"></script>
|
<script src="../js/bulk_actions.js"></script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once "modals/contact/contact_export.php";
|
|
||||||
if ($client_url) {
|
|
||||||
//require_once "modals/contact/contact_invite.php";
|
|
||||||
require_once "modals/contact/contact_import.php";
|
|
||||||
}
|
|
||||||
require_once "../includes/footer.php";
|
require_once "../includes/footer.php";
|
||||||
|
|||||||
@@ -112,13 +112,15 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
<?php if ($client_url) { ?>
|
<?php if ($client_url) { ?>
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#importCredentialModal">
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/credential/credential_import.php?<?= $client_url ?>">
|
||||||
<i class="fa fa-fw fa-upload mr-2"></i>Import
|
<i class="fa fa-fw fa-upload mr-2"></i>Import
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if ($num_rows[0] > 0) { ?>
|
<?php if ($num_rows[0] > 0) { ?>
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportCredentialModal">
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/credential/credential_export.php?<?= $client_url ?>">
|
||||||
<i class="fa fa-fw fa-download mr-2"></i>Export
|
<i class="fa fa-fw fa-download mr-2"></i>Export
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
@@ -528,15 +530,10 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
|
|
||||||
<!-- Include script to get TOTP code via the login ID -->
|
<!-- Include script to get TOTP code via the login ID -->
|
||||||
<script src="js/credential_show_otp_via_id.js"></script>
|
<script src="js/credential_show_otp_via_id.js"></script>
|
||||||
<!-- Include script to generate readable passwords for login entries -->
|
|
||||||
<script src="js/generate_password.js"></script>
|
|
||||||
<script src="../js/bulk_actions.js"></script>
|
<script src="../js/bulk_actions.js"></script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once "modals/credential/credential_export.php";
|
|
||||||
if ($client_url) {
|
if ($client_url) {
|
||||||
require_once "modals/credential/credential_import.php";
|
|
||||||
require_once "modals/share_modal.php";
|
require_once "modals/share_modal.php";
|
||||||
}
|
}
|
||||||
require_once "../includes/footer.php";
|
require_once "../includes/footer.php";
|
||||||
|
|||||||
@@ -51,10 +51,10 @@ $page_title = $row['document_name'];
|
|||||||
|
|
||||||
<ol class="breadcrumb d-print-none">
|
<ol class="breadcrumb d-print-none">
|
||||||
<li class="breadcrumb-item">
|
<li class="breadcrumb-item">
|
||||||
<a href="client_overview.php?client_id=<?php echo $client_id; ?>"><?php echo $client_name; ?></a>
|
<a href="client_overview.php?client_id=<?= $client_id ?>"><?= $client_name ?></a>
|
||||||
</li>
|
</li>
|
||||||
<li class="breadcrumb-item">
|
<li class="breadcrumb-item">
|
||||||
<a href="documents.php?client_id=<?php echo $client_id; ?>">Documents</a>
|
<a href="files.php?client_id=<?= $client_id ?>">Files</a>
|
||||||
</li>
|
</li>
|
||||||
<?php
|
<?php
|
||||||
// Build the full folder path
|
// Build the full folder path
|
||||||
@@ -84,7 +84,7 @@ $page_title = $row['document_name'];
|
|||||||
$bread_crumb_folder_name = $folder['folder_name']; // Sanitized before put in array
|
$bread_crumb_folder_name = $folder['folder_name']; // Sanitized before put in array
|
||||||
?>
|
?>
|
||||||
<li class="breadcrumb-item">
|
<li class="breadcrumb-item">
|
||||||
<a href="documents.php?client_id=<?php echo $client_id; ?>&folder_id=<?php echo $bread_crumb_folder_id; ?>">
|
<a href="files.php?client_id=<?php echo $client_id; ?>&folder_id=<?php echo $bread_crumb_folder_id; ?>">
|
||||||
<i class="fas fa-fw fa-folder-open mr-2"></i><?php echo $bread_crumb_folder_name; ?>
|
<i class="fas fa-fw fa-folder-open mr-2"></i><?php echo $bread_crumb_folder_name; ?>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
@@ -202,7 +202,8 @@ $page_title = $row['document_name'];
|
|||||||
<h5 class="mb-3"><i class="fas fa-tags mr-2"></i>Related Items</h5>
|
<h5 class="mb-3"><i class="fas fa-tags mr-2"></i>Related Items</h5>
|
||||||
<h6>
|
<h6>
|
||||||
<i class="fas fa-fw fa-paperclip text-secondary mr-2"></i>Files
|
<i class="fas fa-fw fa-paperclip text-secondary mr-2"></i>Files
|
||||||
<button type="button" class="btn btn-link btn-sm" data-toggle="modal" data-target="#linkFileToDocumentModal">
|
<button type="button" class="btn btn-link btn-sm ajax-modal"
|
||||||
|
data-modal-url="modals/document/document_link_file.php?document_id=<?= $document_id ?>">
|
||||||
<i class="fas fa-fw fa-plus"></i>
|
<i class="fas fa-fw fa-plus"></i>
|
||||||
</button>
|
</button>
|
||||||
</h6>
|
</h6>
|
||||||
@@ -224,9 +225,9 @@ $page_title = $row['document_name'];
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
<div class="ml-2">
|
<div class="ml-2">
|
||||||
<a href="files.php?client_id=<?php echo $client_id; ?>&folder_id=<?php echo $folder_id; ?>&q=<?php echo $file_name; ?>" target="_blank"><?php echo $file_name; ?></a>
|
<a href="files.php?client_id=<?= $client_id ?>&folder_id=<?= $folder_id ?>&q=<?= $file_name ?>" target="_blank"><?= $file_name ?></a>
|
||||||
<a class="confirm-link" href="post.php?unlink_file_from_document&file_id=<?php echo $file_id; ?>&document_id=<?php echo $document_id; ?>">
|
<a class="confirm-link" href="post.php?unlink_file_from_document&file_id=<?= $file_id ?>&document_id=<?= $document_id ?>">
|
||||||
<i class="fas fa-fw fa-trash-alt text-secondary float-right"></i>
|
<i class="fas fa-fw fa-unlink text-secondary float-right" title="Unlink File"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
@@ -234,7 +235,8 @@ $page_title = $row['document_name'];
|
|||||||
?>
|
?>
|
||||||
<h6>
|
<h6>
|
||||||
<i class="fas fa-fw fa-users text-secondary mt-3 mr-2"></i>Contacts
|
<i class="fas fa-fw fa-users text-secondary mt-3 mr-2"></i>Contacts
|
||||||
<button type="button" class="btn btn-link btn-sm" data-toggle="modal" data-target="#linkContactToDocumentModal">
|
<button type="button" class="btn btn-link btn-sm ajax-modal"
|
||||||
|
data-modal-url="modals/document/document_link_contact.php?document_id=<?= $document_id ?>">
|
||||||
<i class="fas fa-fw fa-plus"></i>
|
<i class="fas fa-fw fa-plus"></i>
|
||||||
</button>
|
</button>
|
||||||
</h6>
|
</h6>
|
||||||
@@ -260,7 +262,7 @@ $page_title = $row['document_name'];
|
|||||||
data-modal-url="modals/contact/contact_details.php?id=<?= $contact_id ?>">
|
data-modal-url="modals/contact/contact_details.php?id=<?= $contact_id ?>">
|
||||||
<?php echo $contact_name; ?></a>
|
<?php echo $contact_name; ?></a>
|
||||||
<a class="confirm-link float-right" href="post.php?unlink_contact_from_document&contact_id=<?php echo $contact_id; ?>&document_id=<?php echo $document_id; ?>">
|
<a class="confirm-link float-right" href="post.php?unlink_contact_from_document&contact_id=<?php echo $contact_id; ?>&document_id=<?php echo $document_id; ?>">
|
||||||
<i class="fas fa-fw fa-trash-alt text-secondary"></i>
|
<i class="fas fa-fw fa-unlink text-secondary" title="Unlink Contact"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
@@ -268,7 +270,7 @@ $page_title = $row['document_name'];
|
|||||||
?>
|
?>
|
||||||
<h6>
|
<h6>
|
||||||
<i class="fas fa-fw fa-laptop text-secondary mr-2 mt-3"></i>Assets
|
<i class="fas fa-fw fa-laptop text-secondary mr-2 mt-3"></i>Assets
|
||||||
<button type="button" class="btn btn-link btn-sm" data-toggle="modal" data-target="#linkAssetToDocumentModal">
|
<button type="button" class="btn btn-link btn-sm ajax-modal" data-modal-url="modals/document/document_link_asset.php?document_id=<?= $document_id ?>">
|
||||||
<i class="fas fa-fw fa-plus"></i>
|
<i class="fas fa-fw fa-plus"></i>
|
||||||
</button>
|
</button>
|
||||||
</h6>
|
</h6>
|
||||||
@@ -295,7 +297,7 @@ $page_title = $row['document_name'];
|
|||||||
<?php echo $asset_name; ?>
|
<?php echo $asset_name; ?>
|
||||||
</a>
|
</a>
|
||||||
<a class="confirm-link float-right" href="post.php?unlink_asset_from_document&asset_id=<?php echo $asset_id; ?>&document_id=<?php echo $document_id; ?>">
|
<a class="confirm-link float-right" href="post.php?unlink_asset_from_document&asset_id=<?php echo $asset_id; ?>&document_id=<?php echo $document_id; ?>">
|
||||||
<i class="fas fa-fw fa-trash-alt text-secondary"></i>
|
<i class="fas fa-fw fa-unlink text-secondary" title="Unlink Asset"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
@@ -303,7 +305,8 @@ $page_title = $row['document_name'];
|
|||||||
?>
|
?>
|
||||||
<h6>
|
<h6>
|
||||||
<i class="fas fa-fw fa-cube text-secondary mr-2 mt-3"></i>Licenses
|
<i class="fas fa-fw fa-cube text-secondary mr-2 mt-3"></i>Licenses
|
||||||
<button type="button" class="btn btn-link btn-sm" data-toggle="modal" data-target="#linkSoftwareToDocumentModal">
|
<button type="button" class="btn btn-link btn-sm ajax-modal"
|
||||||
|
data-modal-url="modals/document/document_link_software.php?document_id=<?= $document_id ?>">
|
||||||
<i class="fas fa-fw fa-plus"></i>
|
<i class="fas fa-fw fa-plus"></i>
|
||||||
</button>
|
</button>
|
||||||
</h6>
|
</h6>
|
||||||
@@ -326,7 +329,7 @@ $page_title = $row['document_name'];
|
|||||||
<div class="ml-2">
|
<div class="ml-2">
|
||||||
<a href="software.php?client_id=<?php echo $client_id; ?>&q=<?php echo $software_name; ?>" target="_blank"><?php echo $software_name; ?></a>
|
<a href="software.php?client_id=<?php echo $client_id; ?>&q=<?php echo $software_name; ?>" target="_blank"><?php echo $software_name; ?></a>
|
||||||
<a class="confirm-link float-right" href="post.php?unlink_software_from_document&software_id=<?php echo $software_id; ?>&document_id=<?php echo $document_id; ?>">
|
<a class="confirm-link float-right" href="post.php?unlink_software_from_document&software_id=<?php echo $software_id; ?>&document_id=<?php echo $document_id; ?>">
|
||||||
<i class="fas fa-fw fa-trash-alt text-secondary"></i>
|
<i class="fas fa-fw fa-unlink text-secondary" title="Unlink License"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
@@ -334,7 +337,8 @@ $page_title = $row['document_name'];
|
|||||||
?>
|
?>
|
||||||
<h6>
|
<h6>
|
||||||
<i class="fas fa-fw fa-building text-secondary mr-2 mt-3"></i>Vendors
|
<i class="fas fa-fw fa-building text-secondary mr-2 mt-3"></i>Vendors
|
||||||
<button type="button" class="btn btn-link btn-sm" data-toggle="modal" data-target="#linkVendorToDocumentModal">
|
<button type="button" class="btn btn-link btn-sm ajax-modal"
|
||||||
|
data-modal-url="modals/document/document_link_vendor.php?document_id=<?= $document_id ?>">
|
||||||
<i class="fas fa-fw fa-plus"></i>
|
<i class="fas fa-fw fa-plus"></i>
|
||||||
</button>
|
</button>
|
||||||
</h6>
|
</h6>
|
||||||
@@ -359,7 +363,7 @@ $page_title = $row['document_name'];
|
|||||||
<?php echo $vendor_name; ?>
|
<?php echo $vendor_name; ?>
|
||||||
</a>
|
</a>
|
||||||
<a class="confirm-link float-right" href="post.php?unlink_vendor_from_document&vendor_id=<?php echo $vendor_id; ?>&document_id=<?php echo $document_id; ?>">
|
<a class="confirm-link float-right" href="post.php?unlink_vendor_from_document&vendor_id=<?php echo $vendor_id; ?>&document_id=<?php echo $document_id; ?>">
|
||||||
<i class="fas fa-fw fa-trash-alt text-secondary"></i>
|
<i class="fas fa-fw fa-unlink text-secondary" title="Unlink Vendor"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
@@ -372,7 +376,8 @@ $page_title = $row['document_name'];
|
|||||||
<h6><i class="fas fa-handshake mr-2"></i>Portal Collaboration</h6>
|
<h6><i class="fas fa-handshake mr-2"></i>Portal Collaboration</h6>
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
<i class="fa fa-fw fa-eye<?php if (!$document_client_visible) { echo '-slash'; } ?> text-secondary mr-2"></i>Document is
|
<i class="fa fa-fw fa-eye<?php if (!$document_client_visible) { echo '-slash'; } ?> text-secondary mr-2"></i>Document is
|
||||||
<a href="#" data-toggle="modal" data-target="#editDocumentClientVisibileModal">
|
<a class="ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/document/document_edit_visibility.php?document_id=<?= $document_id ?>">
|
||||||
<?php
|
<?php
|
||||||
if ($document_client_visible) {
|
if ($document_client_visible) {
|
||||||
echo "<span class='text-bold text-dark'>visible</span>";
|
echo "<span class='text-bold text-dark'>visible</span>";
|
||||||
@@ -427,11 +432,5 @@ $page_title = $row['document_name'];
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once "modals/document/document_link_file.php";
|
|
||||||
require_once "modals/document/document_link_contact.php";
|
|
||||||
require_once "modals/document/document_link_asset.php";
|
|
||||||
require_once "modals/document/document_link_software.php";
|
|
||||||
require_once "modals/document/document_link_vendor.php";
|
|
||||||
require_once "modals/document/document_edit_visibility.php";
|
|
||||||
require_once "modals/share_modal.php";
|
require_once "modals/share_modal.php";
|
||||||
require_once "../includes/footer.php";
|
require_once "../includes/footer.php";
|
||||||
|
|||||||
@@ -1,479 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
// Default Column Sortby Filter
|
|
||||||
$sort = "document_name";
|
|
||||||
$order = "ASC";
|
|
||||||
|
|
||||||
require_once "includes/inc_all_client.php";
|
|
||||||
|
|
||||||
// Perms
|
|
||||||
enforceUserPermission('module_support');
|
|
||||||
|
|
||||||
// Folder
|
|
||||||
if (!empty($_GET['folder_id'])) {
|
|
||||||
$folder = intval($_GET['folder_id']);
|
|
||||||
} else {
|
|
||||||
$folder = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Search query SQL snippet
|
|
||||||
if (!empty($q)) {
|
|
||||||
$query_snippet = "AND (MATCH(document_content_raw) AGAINST ('$q') OR document_name LIKE '%$q%')";
|
|
||||||
} else {
|
|
||||||
$query_snippet = ""; // empty
|
|
||||||
}
|
|
||||||
|
|
||||||
// Folder ID
|
|
||||||
$get_folder_id = 0;
|
|
||||||
if (!empty($_GET['folder_id'])) {
|
|
||||||
$get_folder_id = intval($_GET['folder_id']);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set Folder Location Var used when creating folders
|
|
||||||
$folder_location = 0;
|
|
||||||
|
|
||||||
if ($get_folder_id == 0 && isset($_GET["q"])) {
|
|
||||||
$sql = mysqli_query(
|
|
||||||
$mysqli,
|
|
||||||
"SELECT SQL_CALC_FOUND_ROWS * FROM documents
|
|
||||||
LEFT JOIN users ON document_created_by = user_id
|
|
||||||
WHERE document_client_id = $client_id
|
|
||||||
AND document_archived_at IS NULL
|
|
||||||
$query_snippet
|
|
||||||
ORDER BY $sort $order LIMIT $record_from, $record_to"
|
|
||||||
);
|
|
||||||
}else{
|
|
||||||
$sql = mysqli_query(
|
|
||||||
$mysqli,
|
|
||||||
"SELECT SQL_CALC_FOUND_ROWS * FROM documents
|
|
||||||
LEFT JOIN users ON document_created_by = user_id
|
|
||||||
WHERE document_client_id = $client_id
|
|
||||||
AND document_folder_id = $folder
|
|
||||||
AND document_archived_at IS NULL
|
|
||||||
$query_snippet
|
|
||||||
ORDER BY $sort $order LIMIT $record_from, $record_to"
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
$num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|
||||||
|
|
||||||
// Breadcrumbs
|
|
||||||
// Build the full folder path
|
|
||||||
$folder_id = $get_folder_id;
|
|
||||||
$folder_path = array();
|
|
||||||
|
|
||||||
while ($folder_id > 0) {
|
|
||||||
$sql_folder = mysqli_query($mysqli, "SELECT folder_name, parent_folder FROM folders WHERE folder_id = $folder_id");
|
|
||||||
if ($row_folder = mysqli_fetch_assoc($sql_folder)) {
|
|
||||||
$folder_name = nullable_htmlentities($row_folder['folder_name']);
|
|
||||||
$parent_folder = intval($row_folder['parent_folder']);
|
|
||||||
|
|
||||||
// Prepend the folder to the beginning of the array
|
|
||||||
array_unshift($folder_path, array('folder_id' => $folder_id, 'folder_name' => $folder_name));
|
|
||||||
|
|
||||||
// Move up to the parent folder
|
|
||||||
$folder_id = $parent_folder;
|
|
||||||
} else {
|
|
||||||
// If the folder is not found, break the loop
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<div class="card card-dark">
|
|
||||||
<div class="card-header py-2">
|
|
||||||
<h3 class="card-title mt-2">
|
|
||||||
<i class="fa fa-fw fa-folder mr-2"></i>Documents
|
|
||||||
</h3>
|
|
||||||
<div class="card-tools">
|
|
||||||
|
|
||||||
<div class="btn-group">
|
|
||||||
<button type="button" class="btn btn-primary ajax-modal" data-modal-url="modals/document/document_add.php?client_id=<?= $client_id ?>&folder_id=<?= $get_folder_id ?>" data-modal-size="lg">
|
|
||||||
<i class="fas fa-plus mr-2"></i>New Document
|
|
||||||
</button>
|
|
||||||
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
|
||||||
<div class="dropdown-menu">
|
|
||||||
<a class="dropdown-item text-dark ajax-modal" href="#" data-modal-url="modals/folder/folder_add.php?client_id=<?= $client_id ?>&folder_location=0¤t_folder_id=<?= $get_folder_id ?>">
|
|
||||||
<i class="fa fa-fw fa-folder-plus mr-2"></i>New Folder
|
|
||||||
</a>
|
|
||||||
<div class="dropdown-divider"></div>
|
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#addDocumentFromTemplateModal">From Template</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="card-body">
|
|
||||||
<form autocomplete="off">
|
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
|
||||||
<input type="hidden" name="folder_id" value="<?php echo $get_folder_id; ?>">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-4">
|
|
||||||
<div class="input-group mb-3 mb-md-0">
|
|
||||||
<input type="search" class="form-control" name="q" value="<?php if (isset($q)) { echo stripslashes(nullable_htmlentities($q)); } ?>" placeholder="Search documents in <?php if($get_folder_id == 0) { echo "all folders"; } else { echo "current folder"; } ?>">
|
|
||||||
<div class="input-group-append">
|
|
||||||
<button class="btn btn-dark"><i class="fa fa-search"></i></button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-8">
|
|
||||||
<div class="btn-group float-right">
|
|
||||||
<div class="dropdown ml-2" id="bulkActionButton" hidden>
|
|
||||||
<button class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown">
|
|
||||||
<i class="fas fa-fw fa-layer-group mr-2"></i>Bulk Action (<span id="selectedCount">0</span>)
|
|
||||||
</button>
|
|
||||||
<div class="dropdown-menu">
|
|
||||||
<a class="dropdown-item ajax-modal" href="#"
|
|
||||||
data-modal-url="modals/document/document_bulk_move.php?client_id=<?= $client_id ?>"
|
|
||||||
data-bulk="true">
|
|
||||||
<i class="fas fa-fw fa-exchange-alt mr-2"></i>Move
|
|
||||||
</a>
|
|
||||||
<div class="dropdown-divider"></div>
|
|
||||||
<button class="dropdown-item text-danger text-bold"
|
|
||||||
type="submit" form="bulkActions" name="bulk_delete_documents">
|
|
||||||
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-3 border-right mb-3">
|
|
||||||
<h4>Folders</h4>
|
|
||||||
<hr>
|
|
||||||
<ul class="nav nav-pills flex-column bg-light">
|
|
||||||
<li class="nav-item">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-10">
|
|
||||||
<?php
|
|
||||||
// Get a count of documents that have no folder
|
|
||||||
$row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('document_id') AS num FROM documents WHERE document_folder_id = 0 AND document_client_id = $client_id AND document_archived_at IS NULL"));
|
|
||||||
$num_documents = intval($row['num']);
|
|
||||||
?>
|
|
||||||
<a class="nav-link <?php if ($get_folder_id == 0) { echo "active"; } ?>" href="?client_id=<?php echo $client_id; ?>&folder_id=0">
|
|
||||||
/ <?php if ($num_documents > 0) { echo "<span class='badge badge-pill badge-dark float-right mt-1'>$num_documents</span>"; } ?>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="col-2">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
<?php
|
|
||||||
// Function to check if a folder is an ancestor of the current folder
|
|
||||||
function is_ancestor_folder($folder_id, $current_folder_id, $client_id) {
|
|
||||||
global $mysqli;
|
|
||||||
|
|
||||||
// Base case: if current_folder_id is 0 or equal to folder_id
|
|
||||||
if ($current_folder_id == 0) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if ($current_folder_id == $folder_id) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the parent folder of the current folder
|
|
||||||
$result = mysqli_query($mysqli, "SELECT parent_folder FROM folders WHERE folder_id = $current_folder_id AND folder_client_id = $client_id");
|
|
||||||
if ($row = mysqli_fetch_assoc($result)) {
|
|
||||||
$parent_folder_id = intval($row['parent_folder']);
|
|
||||||
// Recursive call to check the parent folder
|
|
||||||
return is_ancestor_folder($folder_id, $parent_folder_id, $client_id);
|
|
||||||
} else {
|
|
||||||
// Folder not found
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Recursive function to display folders and subfolders
|
|
||||||
function display_folders($parent_folder_id, $client_id, $indent = 0) {
|
|
||||||
global $mysqli, $get_folder_id, $session_user_role;
|
|
||||||
|
|
||||||
$sql_folders = mysqli_query($mysqli, "SELECT * FROM folders WHERE parent_folder = $parent_folder_id AND folder_location = 0 AND folder_client_id = $client_id ORDER BY folder_name ASC");
|
|
||||||
while ($row = mysqli_fetch_array($sql_folders)) {
|
|
||||||
$folder_id = intval($row['folder_id']);
|
|
||||||
$folder_name = nullable_htmlentities($row['folder_name']);
|
|
||||||
|
|
||||||
// Get the number of documents in the folder
|
|
||||||
$row2 = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('document_id') AS num FROM documents WHERE document_folder_id = $folder_id AND document_archived_at IS NULL"));
|
|
||||||
$num_documents = intval($row2['num']);
|
|
||||||
|
|
||||||
// Get the number of subfolders
|
|
||||||
$subfolder_result = mysqli_query($mysqli, "SELECT COUNT(*) AS count FROM folders WHERE parent_folder = $folder_id AND folder_client_id = $client_id");
|
|
||||||
$subfolder_count = intval(mysqli_fetch_assoc($subfolder_result)['count']);
|
|
||||||
|
|
||||||
echo '<li class="nav-item">';
|
|
||||||
echo '<div class="row">';
|
|
||||||
echo '<div class="col-10">';
|
|
||||||
echo '<a class="nav-link ';
|
|
||||||
if ($get_folder_id == $folder_id) { echo "active"; }
|
|
||||||
echo '" href="?client_id=' . $client_id . '&folder_id=' . $folder_id . '">';
|
|
||||||
|
|
||||||
// Indentation for subfolders
|
|
||||||
echo str_repeat(' ', $indent * 4);
|
|
||||||
|
|
||||||
// Determine if the folder is open
|
|
||||||
if ($get_folder_id == $folder_id || is_ancestor_folder($folder_id, $get_folder_id, $client_id)) {
|
|
||||||
echo '<i class="fas fa-fw fa-folder-open"></i>';
|
|
||||||
} else {
|
|
||||||
echo '<i class="fas fa-fw fa-folder"></i>';
|
|
||||||
}
|
|
||||||
|
|
||||||
echo ' ' . $folder_name;
|
|
||||||
|
|
||||||
if ($num_documents > 0) {
|
|
||||||
echo "<span class='badge badge-pill badge-dark float-right mt-1'>$num_documents</span>";
|
|
||||||
}
|
|
||||||
|
|
||||||
echo '</a>';
|
|
||||||
echo '</div>';
|
|
||||||
echo '<div class="col-2">';
|
|
||||||
?>
|
|
||||||
<div class="dropdown">
|
|
||||||
<button class="btn btn-sm" type="button" data-toggle="dropdown">
|
|
||||||
<i class="fas fa-ellipsis-v"></i>
|
|
||||||
</button>
|
|
||||||
<div class="dropdown-menu">
|
|
||||||
<a class="dropdown-item ajax-modal" href="#"
|
|
||||||
data-modal-url="modals/folder/folder_rename.php?id=<?= $folder_id ?>">
|
|
||||||
<i class="fas fa-fw fa-edit mr-2"></i>Rename
|
|
||||||
</a>
|
|
||||||
<?php
|
|
||||||
// Only show delete option if user is admin, folder has no documents, and no subfolders
|
|
||||||
if ($session_user_role == 3 && $num_documents == 0 && $subfolder_count == 0) { ?>
|
|
||||||
<div class="dropdown-divider"></div>
|
|
||||||
<a class="dropdown-item text-danger text-bold confirm-link" href="post.php?delete_folder=<?php echo $folder_id; ?>">
|
|
||||||
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
|
||||||
</a>
|
|
||||||
<?php } ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<?php
|
|
||||||
echo '</div>';
|
|
||||||
echo '</div>';
|
|
||||||
|
|
||||||
if ($subfolder_count > 0) {
|
|
||||||
// Display subfolders
|
|
||||||
echo '<ul class="nav nav-pills flex-column bg-light">';
|
|
||||||
display_folders($folder_id, $client_id, $indent + 1);
|
|
||||||
echo '</ul>';
|
|
||||||
}
|
|
||||||
|
|
||||||
echo '</li>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Start displaying folders from the root (parent_folder = 0)
|
|
||||||
display_folders(0, $client_id);
|
|
||||||
?>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-md-9">
|
|
||||||
|
|
||||||
<nav>
|
|
||||||
<ol class="breadcrumb">
|
|
||||||
<li class="breadcrumb-item">
|
|
||||||
<a href="?client_id=<?php echo $client_id; ?>&folder_id=0">
|
|
||||||
<i class="fas fa-fw fa-folder mr-2"></i>Root
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<?php
|
|
||||||
// Output breadcrumb items for each folder in the path
|
|
||||||
foreach ($folder_path as $folder) {
|
|
||||||
$bread_crumb_folder_id = $folder['folder_id']; // Already Sanitized before it was pushed into array
|
|
||||||
$bread_crumb_folder_name = $folder['folder_name']; // Already Sanitized before it was pushed into array
|
|
||||||
|
|
||||||
?>
|
|
||||||
<li class="breadcrumb-item">
|
|
||||||
<a href="?client_id=<?php echo $client_id; ?>&folder_id=<?php echo $bread_crumb_folder_id; ?>">
|
|
||||||
<i class="fas fa-fw fa-folder-open mr-2"></i><?php echo $bread_crumb_folder_name; ?>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</ol>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<form id="bulkActions" action="post.php" method="post">
|
|
||||||
<input type="hidden" name="csrf_token" value="<?php echo $_SESSION['csrf_token'] ?>">
|
|
||||||
|
|
||||||
<div class="table-responsive-sm">
|
|
||||||
<table class="table table-border">
|
|
||||||
<thead class="thead-light <?php if ($num_rows[0] == 0) { echo "d-none"; } ?>">
|
|
||||||
<tr>
|
|
||||||
<td class="bg-light pr-0">
|
|
||||||
<div class="form-check">
|
|
||||||
<input class="form-check-input" id="selectAllCheckbox" type="checkbox" onclick="checkAll(this)">
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<th>
|
|
||||||
<a class="text-secondary" href="?<?php echo $url_query_strings_sort; ?>&sort=document_name&order=<?php echo $disp; ?>">
|
|
||||||
Name <?php if ($sort == 'document_name') { echo $order_icon; } ?>
|
|
||||||
</a>
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
<a class="text-secondary" href="?<?php echo $url_query_strings_sort; ?>&sort=document_created_at&order=<?php echo $disp; ?>">
|
|
||||||
Created <?php if ($sort == 'document_created_at') { echo $order_icon; } ?>
|
|
||||||
</a>
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
<a class="text-secondary" href="?<?php echo $url_query_strings_sort; ?>&sort=document_updated_at&order=<?php echo $disp; ?>">
|
|
||||||
Last Update <?php if ($sort == 'document_updated_at') { echo $order_icon; } ?>
|
|
||||||
</a>
|
|
||||||
</th>
|
|
||||||
<th></th>
|
|
||||||
<th class="text-center">Action</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<?php
|
|
||||||
|
|
||||||
while ($row = mysqli_fetch_array($sql)) {
|
|
||||||
$document_id = intval($row['document_id']);
|
|
||||||
$document_name = nullable_htmlentities($row['document_name']);
|
|
||||||
$document_description = nullable_htmlentities($row['document_description']);
|
|
||||||
$document_content = nullable_htmlentities($row['document_content']);
|
|
||||||
$document_created_by_name = nullable_htmlentities($row['user_name']);
|
|
||||||
$document_created_at = date("m/d/Y",strtotime($row['document_created_at']));
|
|
||||||
if ($row['document_updated_at']) {
|
|
||||||
$document_updated_at_display = date("m/d/Y",strtotime($row['document_updated_at']));
|
|
||||||
} else {
|
|
||||||
$document_updated_at_display = "-";
|
|
||||||
}
|
|
||||||
$document_folder_id = intval($row['document_folder_id']);
|
|
||||||
|
|
||||||
// Check if shared
|
|
||||||
$sql_shared = mysqli_query(
|
|
||||||
$mysqli,
|
|
||||||
"SELECT * FROM shared_items
|
|
||||||
WHERE item_client_id = $client_id
|
|
||||||
AND item_active = 1
|
|
||||||
AND item_views != item_view_limit
|
|
||||||
AND item_expire_at > NOW()
|
|
||||||
AND item_type = 'Document'
|
|
||||||
AND item_related_id = $document_id
|
|
||||||
LIMIT 1"
|
|
||||||
);
|
|
||||||
$row = mysqli_fetch_array($sql_shared);
|
|
||||||
if($row) {
|
|
||||||
$item_id = intval($row['item_id']);
|
|
||||||
$item_active = nullable_htmlentities($row['item_active']);
|
|
||||||
$item_key = nullable_htmlentities($row['item_key']);
|
|
||||||
$item_type = nullable_htmlentities($row['item_type']);
|
|
||||||
$item_related_id = intval($row['item_related_id']);
|
|
||||||
$item_note = nullable_htmlentities($row['item_note']);
|
|
||||||
$item_recipient = nullable_htmlentities($row['item_recipient']);
|
|
||||||
$item_views = nullable_htmlentities($row['item_views']);
|
|
||||||
$item_view_limit = nullable_htmlentities($row['item_view_limit']);
|
|
||||||
$item_created_at = nullable_htmlentities($row['item_created_at']);
|
|
||||||
$item_expire_at = nullable_htmlentities($row['item_expire_at']);
|
|
||||||
$item_expire_at_human = timeAgo($row['item_expire_at']);
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="bg-light pr-0">
|
|
||||||
<div class="form-check">
|
|
||||||
<input class="form-check-input bulk-select" type="checkbox" name="document_ids[]" value="<?php echo $document_id ?>">
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="document_details.php?client_id=<?php echo $client_id; ?>&document_id=<?php echo $document_id; ?>"><i class="fas fa-fw fa-file-alt"></i> <?php echo $document_name; ?></a>
|
|
||||||
<div class="text-secondary mt-1"><?php echo $document_description; ?>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<?php echo $document_created_at; ?>
|
|
||||||
<div class="text-secondary mt-1"><?php echo $document_created_by_name; ?>
|
|
||||||
</td>
|
|
||||||
<td><?php echo $document_updated_at_display; ?></td>
|
|
||||||
<td>
|
|
||||||
<?php if (mysqli_num_rows($sql_shared) > 0) { ?>
|
|
||||||
<div class="media" title="Expires <?php echo $item_expire_at_human; ?>">
|
|
||||||
<i class="fas fa-link mr-2 mt-1"></i>
|
|
||||||
<div class="media-body">Shared
|
|
||||||
<br>
|
|
||||||
<small class="text-secondary"><?php echo $item_recipient; ?></small>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<?php } ?>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<div class="dropdown dropleft text-center">
|
|
||||||
<button class="btn btn-secondary btn-sm" type="button" data-toggle="dropdown">
|
|
||||||
<i class="fas fa-ellipsis-h"></i>
|
|
||||||
</button>
|
|
||||||
<div class="dropdown-menu">
|
|
||||||
<a class="dropdown-item ajax-modal" href="#"
|
|
||||||
data-modal-size="lg"
|
|
||||||
data-modal-url="modals/document/document_view.php?id=<?= $document_id ?>">
|
|
||||||
<i class="fas fa-fw fa-eye mr-2"></i>Quick View
|
|
||||||
</a>
|
|
||||||
<div class="dropdown-divider"></div>
|
|
||||||
<a class="dropdown-item ajax-modal" href="#"
|
|
||||||
data-modal-size="lg"
|
|
||||||
data-modal-url="modals/document/document_edit.php?id=<?= $document_id ?>">
|
|
||||||
<i class="fas fa-fw fa-pencil-alt mr-2"></i>Edit
|
|
||||||
</a>
|
|
||||||
<div class="dropdown-divider"></div>
|
|
||||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#shareModal" onclick="populateShareModal(<?php echo "$client_id, 'Document', $document_id"; ?>)">
|
|
||||||
<i class="fas fa-fw fa-share mr-2"></i>Share
|
|
||||||
</a>
|
|
||||||
<div class="dropdown-divider"></div>
|
|
||||||
<a class="dropdown-item ajax-modal" href="#"
|
|
||||||
data-modal-url="modals/document/document_rename.php?id=<?= $document_id ?>">
|
|
||||||
<i class="fas fa-fw fa-pencil-alt mr-2"></i>Rename
|
|
||||||
</a>
|
|
||||||
<div class="dropdown-divider"></div>
|
|
||||||
<a class="dropdown-item ajax-modal" href="#"
|
|
||||||
data-modal-url="modals/document/document_move.php?id=<?= $document_id ?>">
|
|
||||||
<i class="fas fa-fw fa-exchange-alt mr-2"></i>Move
|
|
||||||
</a>
|
|
||||||
<?php if ($session_user_role == 3) { ?>
|
|
||||||
<div class="dropdown-divider"></div>
|
|
||||||
<a class="dropdown-item text-danger confirm-link" href="post.php?archive_document=<?php echo $document_id; ?>">
|
|
||||||
<i class="fas fa-fw fa-archive mr-2"></i>Archive
|
|
||||||
</a>
|
|
||||||
<div class="dropdown-divider"></div>
|
|
||||||
<a class="dropdown-item text-danger text-bold confirm-link" href="post.php?delete_document=<?php echo $document_id; ?>">
|
|
||||||
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
|
||||||
</a>
|
|
||||||
<?php } ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<br>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
<?php require_once "../includes/filter_footer.php"; ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script src="../js/bulk_actions.js"></script>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
require_once "modals/share_modal.php";
|
|
||||||
require_once "modals/document/document_add_from_template.php";
|
|
||||||
require_once "../includes/footer.php";
|
|
||||||
@@ -71,7 +71,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="card card-dark">
|
<div class="card card-dark">
|
||||||
<div class="card-header py-2">
|
<div class="card-header py-2">
|
||||||
<h3 class="card-title mt-2"><i class="fa fa-fw fa-globe mr-2"></i>Domains</h3>
|
<h3 class="card-title mt-2"><i class="fa fa-fw fa-globe mr-2"></i>Domains</h3>
|
||||||
<div class="card-tools">
|
<div class="card-tools">
|
||||||
@@ -80,7 +80,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<?php if ($num_rows[0] > 0) { ?>
|
<?php if ($num_rows[0] > 0) { ?>
|
||||||
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportDomainModal">
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/domain/domain_export.php?<?= $client_url ?>">
|
||||||
<i class="fa fa-fw fa-download mr-2"></i>Export
|
<i class="fa fa-fw fa-download mr-2"></i>Export
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -357,16 +358,10 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<?php require_once "../includes/filter_footer.php";
|
<?php require_once "../includes/filter_footer.php"; ?>
|
||||||
?>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
|
||||||
require_once "modals/domain/domain_export.php";
|
|
||||||
?>
|
|
||||||
|
|
||||||
<script src="../js/bulk_actions.js"></script>
|
<script src="../js/bulk_actions.js"></script>
|
||||||
|
|
||||||
<?php require_once "../includes/footer.php";
|
<?php require_once "../includes/footer.php";
|
||||||
|
|
||||||
|
|||||||
@@ -67,7 +67,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<button type="button" class="btn btn-primary ajax-modal" data-modal-url="modals/expense/expense_add.php" data-modal-size="lg"><i class="fas fa-plus mr-2"></i>New Expense</button>
|
<button type="button" class="btn btn-primary ajax-modal" data-modal-url="modals/expense/expense_add.php" data-modal-size="lg"><i class="fas fa-plus mr-2"></i>New Expense</button>
|
||||||
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportExpensesModal">
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/expense/expense_export.php">
|
||||||
<i class="fa fa-fw fa-download mr-2"></i>Export
|
<i class="fa fa-fw fa-download mr-2"></i>Export
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -286,7 +287,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<tr>
|
<tr>
|
||||||
<td class="pr-0 bg-light">
|
<td class="pr-0 bg-light">
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input class="form-check-input bulk-select" type="checkbox" name="selected_ids[]" value="<?= $expense_id ?>">
|
<input class="form-check-input bulk-select" type="checkbox" name="expense_ids[]" value="<?= $expense_id ?>">
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@@ -357,5 +358,4 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<script src="/js/bulk_actions.js"></script>
|
<script src="/js/bulk_actions.js"></script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
require_once "modals/expense/expense_export.php";
|
|
||||||
require_once "../includes/footer.php";
|
require_once "../includes/footer.php";
|
||||||
|
|||||||
@@ -368,22 +368,24 @@ $num_root_items = intval($row_root_files['num']) + intval($row_root_docs['num'])
|
|||||||
<h3 class="card-title mt-2"><i class="fa fa-fw fa-folder mr-2"></i>Files</h3>
|
<h3 class="card-title mt-2"><i class="fa fa-fw fa-folder mr-2"></i>Files</h3>
|
||||||
|
|
||||||
<div class="card-tools">
|
<div class="card-tools">
|
||||||
|
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle" data-toggle="dropdown"><i class="fas fa-fw fa-plus mr-2"></i>New</button>
|
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
|
||||||
<div class="dropdown-menu">
|
<i class="fas fa-fw fa-plus mr-2"></i>New
|
||||||
|
</button>
|
||||||
|
<div class="dropdown-menu dropdown-menu-right">
|
||||||
<a class="dropdown-item text-dark ajax-modal" href="#"
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
data-modal-url="modals/file/file_upload.php?client_id=<?= $client_id ?>&folder_id=<?= $get_folder_id ?>">
|
data-modal-url="modals/file/file_upload.php?client_id=<?= $client_id ?>&folder_id=<?= $get_folder_id ?>">
|
||||||
<i class="fas fa-fw fa-cloud-upload-alt mr-2"></i>Upload File
|
<i class="fas fa-fw fa-cloud-upload-alt mr-2"></i>Upload File
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-dark ajax-modal" href="#"
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
data-modal-url="modals/document/document_add.php?client_id=<?= $client_id ?>&folder_id=<?= $get_folder_id ?>">
|
data-modal-url="modals/document/document_add.php?client_id=<?= $client_id ?>&folder_id=<?= $get_folder_id ?>"
|
||||||
|
data-modal-size="lg">
|
||||||
<i class="fas fa-fw fa-file-alt mr-2"></i>Document
|
<i class="fas fa-fw fa-file-alt mr-2"></i>Document
|
||||||
</a>
|
</a>
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal"
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
data-target="#addDocumentFromTemplateModal">
|
data-modal-url="modals/document/document_add_from_template.php?client_id=<?= $client_id ?>&folder_id=<?= $get_folder_id ?>">
|
||||||
<i class="fas fa-fw fa-file mr-2"></i>Document from Template
|
<i class="fas fa-fw fa-file mr-2"></i>Document from Template
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
@@ -447,24 +449,15 @@ $num_root_items = intval($row_root_files['num']) + intval($row_root_docs['num'])
|
|||||||
</button>
|
</button>
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
<a class="dropdown-item ajax-modal" href="#"
|
<a class="dropdown-item ajax-modal" href="#"
|
||||||
data-modal-url="modals/file/file_bulk_move.php?client_id=<?= $client_id ?>"
|
data-modal-url="modals/file/file_bulk_move.php?client_id=<?= $client_id ?>¤t_folder_id=<?= $get_folder_id ?>"
|
||||||
data-bulk="true">
|
data-bulk="true">
|
||||||
<i class="fas fa-fw fa-exchange-alt mr-2"></i>Move Files
|
<i class="fas fa-fw fa-exchange-alt mr-2"></i>Move Files
|
||||||
</a>
|
</a>
|
||||||
<a class="dropdown-item ajax-modal" href="#"
|
|
||||||
data-modal-url="modals/document/document_bulk_move.php?client_id=<?= $client_id ?>"
|
|
||||||
data-bulk="true">
|
|
||||||
<i class="fas fa-fw fa-exchange-alt mr-2"></i>Move Documents
|
|
||||||
</a>
|
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<button class="dropdown-item text-danger text-bold"
|
<button class="dropdown-item text-danger text-bold"
|
||||||
type="submit" form="bulkActions" name="bulk_delete_files">
|
type="submit" form="bulkActions" name="bulk_delete_files">
|
||||||
<i class="fas fa-fw fa-trash mr-2"></i>Delete Files
|
<i class="fas fa-fw fa-trash mr-2"></i>Delete Files
|
||||||
</button>
|
</button>
|
||||||
<button class="dropdown-item text-danger text-bold"
|
|
||||||
type="submit" form="bulkActions" name="bulk_delete_documents">
|
|
||||||
<i class="fas fa-fw fa-trash mr-2"></i>Delete Documents
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -277,7 +277,8 @@ if (isset($_GET['invoice_id'])) {
|
|||||||
data-modal-url="modals/invoice/invoice_copy.php?id=<?= $invoice_id ?>">
|
data-modal-url="modals/invoice/invoice_copy.php?id=<?= $invoice_id ?>">
|
||||||
<i class="fa fa-fw fa-copy text-secondary mr-2"></i>Copy
|
<i class="fa fa-fw fa-copy text-secondary mr-2"></i>Copy
|
||||||
</a>
|
</a>
|
||||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#addInvoiceRecurringModal<?php echo $invoice_id; ?>">
|
<a class="dropdown-item ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/invoice/invoice_recurring_add.php?invoice_id=<?= $invoice_id ?>">
|
||||||
<i class="fa fa-fw fa-sync-alt text-secondary mr-2"></i>Recurring
|
<i class="fa fa-fw fa-sync-alt text-secondary mr-2"></i>Recurring
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
@@ -725,7 +726,6 @@ if (isset($_GET['invoice_id'])) {
|
|||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
include_once "modals/invoice/invoice_add_ticket.php";
|
include_once "modals/invoice/invoice_add_ticket.php";
|
||||||
include_once "modals/invoice/invoice_recurring_add.php";
|
|
||||||
include_once "modals/invoice/invoice_note.php";
|
include_once "modals/invoice/invoice_note.php";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -162,10 +162,14 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<h3 class="card-title mt-2"><i class="fa fa-fw fa-file-invoice mr-2"></i>Invoices</h3>
|
<h3 class="card-title mt-2"><i class="fa fa-fw fa-file-invoice mr-2"></i>Invoices</h3>
|
||||||
<div class="card-tools">
|
<div class="card-tools">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<button type="button" class="btn btn-primary ajax-modal" data-modal-url="modals/invoice/invoice_add.php?<?= $client_url ?>"><i class="fas fa-plus mr-2"></i>New Invoice</button>
|
<button type="button" class="btn btn-primary ajax-modal"
|
||||||
|
data-modal-url="modals/invoice/invoice_add.php?<?= $client_url ?>">
|
||||||
|
<i class="fas fa-plus mr-2"></i>New Invoice
|
||||||
|
</button>
|
||||||
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportInvoicesModal">
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/invoice/invoice_export.php?<?= $client_url ?>">
|
||||||
<i class="fa fa-fw fa-download mr-2"></i>Export
|
<i class="fa fa-fw fa-download mr-2"></i>Export
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -453,5 +457,4 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<script src="../js/bulk_actions.js"></script>
|
<script src="../js/bulk_actions.js"></script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
require_once "modals/invoice/invoice_export.php";
|
|
||||||
require_once "../includes/footer.php";
|
require_once "../includes/footer.php";
|
||||||
|
|||||||
@@ -84,12 +84,14 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
</button>
|
</button>
|
||||||
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#importLocationModal">
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/location/location_import.php?<?= $client_url ?>">
|
||||||
<i class="fa fa-fw fa-upload mr-2"></i>Import
|
<i class="fa fa-fw fa-upload mr-2"></i>Import
|
||||||
</a>
|
</a>
|
||||||
<?php if ($num_rows[0] > 0) { ?>
|
<?php if ($num_rows[0] > 0) { ?>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportLocationModal">
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/location/location_export.php?<?= $client_url ?>">
|
||||||
<i class="fa fa-fw fa-download mr-2"></i>Export
|
<i class="fa fa-fw fa-download mr-2"></i>Export
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
@@ -403,7 +405,4 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<script src="../js/bulk_actions.js"></script>
|
<script src="../js/bulk_actions.js"></script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once "modals/location/location_import.php";
|
|
||||||
require_once "modals/location/location_export.php";
|
|
||||||
require_once "../includes/footer.php";
|
require_once "../includes/footer.php";
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$asset_ids = array_map('intval', $_GET['asset_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($asset_ids);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ ob_start();
|
|||||||
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="asset_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($asset_ids as $asset_id) { ?><input type="hidden" name="asset_ids[]" value="<?= $asset_id ?>"><?php } ?>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$client_id = intval($_GET['client_id']);
|
$client_id = intval($_GET['client_id']);
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$asset_ids = array_map('intval', $_GET['asset_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($asset_ids);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -20,7 +20,7 @@ ob_start();
|
|||||||
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="asset_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($asset_ids as $asset_id) { ?><input type="hidden" name="asset_ids[]" value="<?= $asset_id ?>"><?php } ?>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$client_id = intval($_GET['client_id']);
|
$client_id = intval($_GET['client_id']);
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$asset_ids = array_map('intval', $_GET['asset_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($asset_ids);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -20,7 +20,7 @@ ob_start();
|
|||||||
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="asset_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($asset_ids as $asset_id) { ?><input type="hidden" name="asset_ids[]" value="<?= $asset_id ?>"><?php } ?>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$asset_ids = array_map('intval', $_GET['asset_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($asset_ids);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ ob_start();
|
|||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="asset_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($asset_ids as $asset_id) { ?><input type="hidden" name="asset_ids[]" value="<?= $asset_id ?>"><?php } ?>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$asset_ids = array_map('intval', $_GET['asset_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($asset_ids);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ ob_start();
|
|||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="asset_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($asset_ids as $asset_id) { ?><input type="hidden" name="asset_ids[]" value="<?= $asset_id ?>"><?php } ?>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<input type="hidden" name="remove_tags" value="0">
|
<input type="hidden" name="remove_tags" value="0">
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$asset_ids = array_map('intval', $_GET['asset_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($asset_ids);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ ob_start();
|
|||||||
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="asset_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($asset_ids as $asset_id) { ?><input type="hidden" name="asset_ids[]" value="<?= $asset_id ?>"><?php } ?>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$asset_ids = array_map('intval', $_GET['asset_ids'] ?? []);
|
||||||
$count = count($selected_ids);
|
$count = count($asset_ids);
|
||||||
|
|
||||||
$client_id = intval($_GET['client_id'] ?? 0);
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
if ($client_id) {
|
if ($client_id) {
|
||||||
@@ -25,7 +25,7 @@ ob_start();
|
|||||||
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="asset_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($asset_ids as $asset_id) { ?><input type="hidden" name="asset_ids[]" value="<?= $asset_id ?>"><?php } ?>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +1,22 @@
|
|||||||
<div class="modal" id="exportAssetModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Assets to CSV</h5>
|
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Assets to CSV</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?php echo $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php if ($client_url) { ?>
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
@@ -20,7 +25,7 @@
|
|||||||
<button type="submit" name="export_assets_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
<button type="submit" name="export_assets_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -1,18 +1,23 @@
|
|||||||
<div class="modal" id="importAssetModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title"><i class="fa fa-fw fa-desktop mr-2"></i>Import Assets</h5>
|
<h5 class="modal-title"><i class="fa fa-fw fa-desktop mr-2"></i>Import Assets</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" enctype="multipart/form-data" autocomplete="off">
|
<form action="post.php" method="post" enctype="multipart/form-data" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?php echo $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
|
|
||||||
<?php if ($client_url) { ?>
|
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
|
||||||
<?php } ?>
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<p><strong>Format csv file with headings & data:</strong><br>Name, Description, Type, Make, Model, Serial, OS, Purchase Date, Assigned To, Location, Physical Location, Notes</p>
|
<p><strong>Format csv file with headings & data:</strong><br>Name, Description, Type, Make, Model, Serial, OS, Purchase Date, Assigned To, Location, Physical Location, Notes</p>
|
||||||
<hr>
|
<hr>
|
||||||
@@ -26,7 +31,7 @@
|
|||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="submit" name="import_assets_csv" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Import</button>
|
<button type="submit" name="import_assets_csv" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Import</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -1,6 +1,19 @@
|
|||||||
<div class="modal" id="bulkAssignNetworkModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
|
$interface_ids = array_map('intval', $_GET['interface_ids'] ?? []);
|
||||||
|
|
||||||
|
$count = count($interface_ids);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
|
<?php foreach ($interface_ids as $interface_id) { ?><input type="hidden" name="interface_ids[]" value="<?= $interface_id ?>"><?php } ?>
|
||||||
<div class="modal-header bg-dark">
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title"><i class="fa fa-fw fa-network-wired mr-2"></i>Bulk Assign Network</h5>
|
<h5 class="modal-title"><i class="fa fa-fw fa-network-wired mr-2"></i>Bulk Assign Network</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
@@ -46,6 +59,7 @@
|
|||||||
<button type="submit" name="bulk_edit_asset_interface_network" class="btn btn-primary text-bold"><i class="fas fa-check mr-2"></i>Assign</button>
|
<button type="submit" name="bulk_edit_asset_interface_network" class="btn btn-primary text-bold"><i class="fas fa-check mr-2"></i>Assign</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -1,6 +1,20 @@
|
|||||||
<div class="modal" id="bulkSetInterfaceTypeModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
|
$interface_ids = array_map('intval', $_GET['interface_ids'] ?? []);
|
||||||
|
|
||||||
|
$count = count($interface_ids);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
|
<?php foreach ($interface_ids as $interface_id) { ?><input type="hidden" name="interface_ids[]" value="<?= $interface_id ?>"><?php } ?>
|
||||||
|
|
||||||
<div class="modal-header bg-dark">
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title"><i class="fa fa-fw fa-ethernet mr-2"></i>Bulk Set Interface Type</h5>
|
<h5 class="modal-title"><i class="fa fa-fw fa-ethernet mr-2"></i>Bulk Set Interface Type</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
@@ -31,6 +45,7 @@
|
|||||||
<button type="submit" name="bulk_edit_asset_interface_type" class="btn btn-primary text-bold"><i class="fas fa-check mr-2"></i>Set</button>
|
<button type="submit" name="bulk_edit_asset_interface_type" class="btn btn-primary text-bold"><i class="fas fa-check mr-2"></i>Set</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -37,15 +37,15 @@ ob_start();
|
|||||||
<option value="">- Select a Document -</option>
|
<option value="">- Select a Document -</option>
|
||||||
<?php
|
<?php
|
||||||
$sql_documents_select = mysqli_query($mysqli, "
|
$sql_documents_select = mysqli_query($mysqli, "
|
||||||
SELECT documents.document_id, documents.document_name
|
SELECT documents.document_id, document_name
|
||||||
FROM documents
|
FROM documents
|
||||||
LEFT JOIN asset_documents
|
LEFT JOIN asset_documents
|
||||||
ON documents.document_id = asset_documents.document_id
|
ON documents.document_id = asset_documents.document_id
|
||||||
AND asset_documents.asset_id = $asset_id
|
AND asset_documents.asset_id = $asset_id
|
||||||
WHERE documents.document_client_id = $client_id
|
WHERE document_client_id = $client_id
|
||||||
AND documents.document_archived_at IS NULL
|
AND document_archived_at IS NULL
|
||||||
AND asset_documents.asset_id IS NULL
|
AND asset_documents.asset_id IS NULL
|
||||||
ORDER BY documents.document_name ASC
|
ORDER BY document_name ASC
|
||||||
");
|
");
|
||||||
while ($row = mysqli_fetch_array($sql_documents_select)) {
|
while ($row = mysqli_fetch_array($sql_documents_select)) {
|
||||||
$document_id = intval($row['document_id']);
|
$document_id = intval($row['document_id']);
|
||||||
@@ -67,4 +67,3 @@ ob_start();
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
require_once '../../../includes/modal_footer.php';
|
require_once '../../../includes/modal_footer.php';
|
||||||
?>
|
|
||||||
|
|||||||
@@ -70,4 +70,3 @@ ob_start();
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
require_once '../../../includes/modal_footer.php';
|
require_once '../../../includes/modal_footer.php';
|
||||||
?>
|
|
||||||
|
|||||||
@@ -1,16 +1,21 @@
|
|||||||
<div class="modal" id="exportCertificateModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Certificates to CSV</h5>
|
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Certificates to CSV</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<?php if ($client_url) { ?>
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
|
||||||
<?php } ?>
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -18,7 +23,7 @@
|
|||||||
<button type="submit" name="export_certificates_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
<button type="submit" name="export_certificates_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$client_ids = array_map('intval', $_GET['client_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($client_ids);
|
||||||
|
|
||||||
// Generate the HTML form content using output buffering.
|
// Generate the HTML form content using output buffering.
|
||||||
ob_start();
|
ob_start();
|
||||||
@@ -20,7 +20,7 @@ ob_start();
|
|||||||
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="client_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($client_ids as $client_id) { ?><input type="hidden" name="client_ids[]" value="<?= $client_id ?>"><?php } ?>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$client_ids = array_map('intval', $_GET['client_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($client_ids);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ ob_start();
|
|||||||
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="client_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($client_ids as $client_id) { ?><input type="hidden" name="client_ids[]" value="<?= $client_id ?>"><?php } ?>
|
||||||
<input type="hidden" name="bulk_remove_tags" value="0">
|
<input type="hidden" name="bulk_remove_tags" value="0">
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$client_ids = array_map('intval', $_GET['client_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($client_ids);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ ob_start();
|
|||||||
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="client_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($client_ids as $client_id) { ?><input type="hidden" name="client_ids[]" value="<?= $client_id ?>"><?php } ?>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$client_ids = array_map('intval', $_GET['client_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($client_ids);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ ob_start();
|
|||||||
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="client_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($client_ids as $client_id) { ?><input type="hidden" name="client_ids[]" value="<?= $client_id ?>"><?php } ?>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$client_ids = array_map('intval', $_GET['client_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($client_ids);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ ob_start();
|
|||||||
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="client_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($client_ids as $client_id) { ?><input type="hidden" name="client_ids[]" value="<?= $client_id ?>"><?php } ?>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$client_ids = array_map('intval', $_GET['client_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($client_ids);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ ob_start();
|
|||||||
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="client_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($client_ids as $client_id) { ?><input type="hidden" name="client_ids[]" value="<?= $client_id ?>"><?php } ?>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
|||||||
@@ -1,20 +1,25 @@
|
|||||||
<div class="modal" id="exportClientModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Clients to CSV</h5>
|
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Clients to CSV</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="submit" name="export_clients_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
<button type="submit" name="export_clients_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -1,13 +1,17 @@
|
|||||||
<div class="modal" id="importClientModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title"><i class="fa fa-fw fa-users mr-2"></i>Import Clients</h5>
|
<h5 class="modal-title"><i class="fa fa-fw fa-users mr-2"></i>Import Clients</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" enctype="multipart/form-data" autocomplete="off">
|
<form action="post.php" method="post" enctype="multipart/form-data" autocomplete="off">
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<p><strong>Importing Multiple Contacts:</strong><br>When importing a client, only one contact (which will become the primary contact) and one location (which will become the primary location) can be added initially. To add additional contacts, you will need to click into each client, navigate to the Contacts section, and import multiple contacts individually for each client.</p>
|
<p><strong>Importing Multiple Contacts:</strong><br>When importing a client, only one contact (which will become the primary contact) and one location (which will become the primary location) can be added initially. To add additional contacts, you will need to click into each client, navigate to the Contacts section, and import multiple contacts individually for each client.</p>
|
||||||
<p><strong>Format csv file with headings & data:</strong><br>Client Name, Industry, Referral, Website, Primary Location Name, Location Phone, Location Address, City, State, Postal Code, Country, Primary Contact Name, Title, Contact Phone, Extension, Contact Mobile, Contact Email, Hourly Rate, Currency, Payment Terms, Tax ID, Abbreviation</p>
|
<p><strong>Format csv file with headings & data:</strong><br>Client Name, Industry, Referral, Website, Primary Location Name, Location Phone, Location Address, City, State, Postal Code, Country, Primary Contact Name, Title, Contact Phone, Extension, Contact Mobile, Contact Email, Hourly Rate, Currency, Payment Terms, Tax ID, Abbreviation</p>
|
||||||
@@ -22,7 +26,7 @@
|
|||||||
<button type="submit" name="import_clients_csv" class="btn btn-primary text-strong"><i class="fas fa-upload mr-2"></i>Import</button>
|
<button type="submit" name="import_clients_csv" class="btn btn-primary text-strong"><i class="fas fa-upload mr-2"></i>Import</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$client_id = intval($_GET['client_id']);
|
$client_id = intval($_GET['client_id']);
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$contact_ids = array_map('intval', $_GET['contact_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($contact_ids);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ ob_start();
|
|||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="contact_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($contact_ids as $contact_id) { ?><input type="hidden" name="contact_ids[]" value="<?= $contact_id ?>"><?php } ?>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$contact_ids = array_map('intval', $_GET['contact_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($contact_ids);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ ob_start();
|
|||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="contact_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($contact_ids as $contact_id) { ?><input type="hidden" name="contact_ids[]" value="<?= $contact_id ?>"><?php } ?>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<input type="hidden" name="bulk_remove_tags" value="0">
|
<input type="hidden" name="bulk_remove_tags" value="0">
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$contact_ids = array_map('intval', $_GET['contact_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($contact_ids);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ ob_start();
|
|||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="contact_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($contact_ids as $contact_id) { ?><input type="hidden" name="contact_ids[]" value="<?= $contact_id ?>"><?php } ?>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<label>Department / Group</label>
|
<label>Department / Group</label>
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$contact_ids = array_map('intval', $_GET['contact_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($contact_ids);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ ob_start();
|
|||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="contact_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($contact_ids as $contact_id) { ?><input type="hidden" name="contact_ids[]" value="<?= $contact_id ?>"><?php } ?>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<label>Phone</label>
|
<label>Phone</label>
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$contact_ids = array_map('intval', $_GET['contact_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($contact_ids);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ ob_start();
|
|||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="contact_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($contact_ids as $contact_id) { ?><input type="hidden" name="contact_ids[]" value="<?= $contact_id ?>"><?php } ?>
|
||||||
<input type="hidden" name="bulk_contact_important" value="0">
|
<input type="hidden" name="bulk_contact_important" value="0">
|
||||||
<input type="hidden" name="bulk_contact_billing" value="0">
|
<input type="hidden" name="bulk_contact_billing" value="0">
|
||||||
<input type="hidden" name="bulk_contact_technical" value="0">
|
<input type="hidden" name="bulk_contact_technical" value="0">
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$contact_ids = array_map('intval', $_GET['contact_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($contact_ids);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ ob_start();
|
|||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="contact_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($contact_ids as $contact_id) { ?><input type="hidden" name="contact_ids[]" value="<?= $contact_id ?>"><?php } ?>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<label>From Email / Display Name</label>
|
<label>From Email / Display Name</label>
|
||||||
|
|||||||
@@ -1,16 +1,22 @@
|
|||||||
<div class="modal" id="exportContactModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Contacts to CSV</h5>
|
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Contacts to CSV</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<?php if($client_url) { ?>
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
|
||||||
<?php } ?>
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -18,7 +24,7 @@
|
|||||||
<button type="submit" name="export_contacts_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
<button type="submit" name="export_contacts_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -1,16 +1,21 @@
|
|||||||
<div class="modal" id="importContactModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title"><i class="fa fa-fw fa-users mr-2"></i>Import Contacts</h5>
|
<h5 class="modal-title"><i class="fa fa-fw fa-users mr-2"></i>Import Contacts</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" enctype="multipart/form-data" autocomplete="off">
|
<form action="post.php" method="post" enctype="multipart/form-data" autocomplete="off">
|
||||||
<?php if($client_url) { ?>
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
|
||||||
<?php } ?>
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<p><strong>Format csv file with headings & data:</strong><br>Name, Title, Department, Email, Phone, Extension, Mobile, Location</p>
|
<p><strong>Format csv file with headings & data:</strong><br>Name, Title, Department, Email, Phone, Extension, Mobile, Location</p>
|
||||||
<hr>
|
<hr>
|
||||||
@@ -24,7 +29,7 @@
|
|||||||
<button type="submit" name="import_contacts_csv" class="btn btn-primary text-strong"><i class="fas fa-upload mr-2"></i>Import</button>
|
<button type="submit" name="import_contacts_csv" class="btn btn-primary text-strong"><i class="fas fa-upload mr-2"></i>Import</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$credential_ids = array_map('intval', $_GET['credential_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($credential_ids);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ ob_start();
|
|||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="credential_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($credential_ids as $credential_id) { ?><input type="hidden" name="credential_ids[]" value="<?= $credential_id ?>"><?php } ?>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<input type="hidden" name="bulk_remove_tags" value="0">
|
<input type="hidden" name="bulk_remove_tags" value="0">
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,22 @@
|
|||||||
<div class="modal" id="exportCredentialModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Credentials to CSV</h5>
|
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Credentials to CSV</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<?php if ($client_url) { ?>
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
|
||||||
<?php } ?>
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -18,7 +24,7 @@
|
|||||||
<button type="submit" name="export_credentials_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
<button type="submit" name="export_credentials_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -1,16 +1,21 @@
|
|||||||
<div class="modal" id="importCredentialModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title"><i class="fas fa-fw fa-key mr-2"></i>Import Credentials</h5>
|
<h5 class="modal-title"><i class="fas fa-fw fa-key mr-2"></i>Import Credentials</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" enctype="multipart/form-data" autocomplete="off">
|
<form action="post.php" method="post" enctype="multipart/form-data" autocomplete="off">
|
||||||
<?php if ($client_url) { ?>
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
|
||||||
<?php } ?>
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<p><strong>Format csv file with headings & data:</strong><br>Name, Description, Username, Password, TOTP, URI</p>
|
<p><strong>Format csv file with headings & data:</strong><br>Name, Description, Username, Password, TOTP, URI</p>
|
||||||
<hr>
|
<hr>
|
||||||
@@ -24,7 +29,7 @@
|
|||||||
<button type="submit" name="import_credentials_csv" class="btn btn-primary"><i class="fa fa-upload mr-2"></i>Import</button>
|
<button type="submit" name="import_credentials_csv" class="btn btn-primary"><i class="fa fa-upload mr-2"></i>Import</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -1,13 +1,23 @@
|
|||||||
<div class="modal" id="addDocumentFromTemplateModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
|
$contact_id = intval($_GET['contact_id'] ?? 0);
|
||||||
|
$asset_id = intval($_GET['asset_id'] ?? 0);
|
||||||
|
intval($_GET['folder_id'] ?? 0);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title"><i class="fa fa-fw fa-file-alt mr-2"></i>New Document from Template</h5>
|
<h5 class="modal-title"><i class="fa fa-fw fa-file-alt mr-2"></i>New Document from Template</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
@@ -24,13 +34,11 @@
|
|||||||
while ($row = mysqli_fetch_array($sql_document_templates)) {
|
while ($row = mysqli_fetch_array($sql_document_templates)) {
|
||||||
$document_template_id = intval($row['document_template_id']);
|
$document_template_id = intval($row['document_template_id']);
|
||||||
$document_template_name = nullable_htmlentities($row['document_template_name']);
|
$document_template_name = nullable_htmlentities($row['document_template_name']);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<option value="<?php echo $document_template_id ?>"><?php echo $document_template_name; ?></option>
|
<option value="<?php echo $document_template_id ?>"><?php echo $document_template_name; ?></option>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -64,17 +72,15 @@
|
|||||||
<select class="form-control" name="folder">
|
<select class="form-control" name="folder">
|
||||||
<option value="0">/</option>
|
<option value="0">/</option>
|
||||||
<?php
|
<?php
|
||||||
$sql_folders = mysqli_query($mysqli, "SELECT * FROM folders WHERE folder_location = $folder_location AND folder_client_id = $client_id ORDER BY folder_name ASC");
|
$sql_folders = mysqli_query($mysqli, "SELECT * FROM folders WHERE folder_client_id = $client_id ORDER BY folder_name ASC");
|
||||||
while ($row = mysqli_fetch_array($sql_folders)) {
|
while ($row = mysqli_fetch_array($sql_folders)) {
|
||||||
$folder_id = intval($row['folder_id']);
|
$folder_id = intval($row['folder_id']);
|
||||||
$folder_name = nullable_htmlentities($row['folder_name']);
|
$folder_name = nullable_htmlentities($row['folder_name']);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<option <?php if (isset($_GET['folder_id']) && $_GET['folder_id'] == $folder_id) echo "selected"; ?> value="<?php echo $folder_id ?>"><?php echo $folder_name; ?></option>
|
<option <?php if (isset($_GET['folder_id']) && $_GET['folder_id'] == $folder_id) echo "selected"; ?> value="<?php echo $folder_id ?>"><?php echo $folder_name; ?></option>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -82,12 +88,10 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
|
|
||||||
<button type="submit" name="add_document_from_template" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Create</button>
|
<button type="submit" name="add_document_from_template" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Create</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
</div>
|
<?php
|
||||||
</form>
|
require_once '../../../includes/modal_footer.php';
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ ob_start();
|
|||||||
<select class="form-control select2" name="folder">
|
<select class="form-control select2" name="folder">
|
||||||
<option value="0">/</option>
|
<option value="0">/</option>
|
||||||
<?php
|
<?php
|
||||||
$sql_folders_select = mysqli_query($mysqli, "SELECT * FROM folders WHERE folder_location = 0 AND folder_client_id = $client_id ORDER BY folder_name ASC");
|
$sql_folders_select = mysqli_query($mysqli, "SELECT * FROM folders WHERE folder_client_id = $client_id ORDER BY folder_name ASC");
|
||||||
while ($row = mysqli_fetch_array($sql_folders_select)) {
|
while ($row = mysqli_fetch_array($sql_folders_select)) {
|
||||||
$folder_id_select = intval($row['folder_id']);
|
$folder_id_select = intval($row['folder_id']);
|
||||||
$folder_name_select = nullable_htmlentities($row['folder_name']);
|
$folder_name_select = nullable_htmlentities($row['folder_name']);
|
||||||
|
|||||||
@@ -1,18 +1,34 @@
|
|||||||
<div class="modal" id="editDocumentClientVisibileModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
|
$document_id = intval($_GET['document_id']);
|
||||||
|
|
||||||
|
$sql = mysqli_query($mysqli, "SELECT * FROM documents
|
||||||
|
WHERE document_id = $document_id
|
||||||
|
LIMIT 1
|
||||||
|
");
|
||||||
|
|
||||||
|
$row = mysqli_fetch_array($sql);
|
||||||
|
$document_name = nullable_htmlentities($row['document_name']);
|
||||||
|
$document_client_visible = intval($row['document_client_visible']);
|
||||||
|
$client_id = intval($row['document_client_id']);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title">
|
<h5 class="modal-title">
|
||||||
<i class="fa fa-fw fa-handshake mr-2"></i>
|
<i class="fa fa-fw fa-handshake mr-2"></i>
|
||||||
Edit Visibility Status for <strong><?php echo "$document_name"; ?></strong>
|
Edit Visibility Status for <strong><?= $document_name ?></strong>
|
||||||
</h5>
|
</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<input type="hidden" name="document_id" value="<?php echo $document_id; ?>">
|
<input type="hidden" name="document_id" value="<?= $document_id ?>">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Visibility</label>
|
<label>Visibility</label>
|
||||||
<p>Should this document be visible in the portal to client contacts with the 'Technical' role?</p>
|
<p>Should this document be visible in the portal to client contacts with the 'Technical' role?</p>
|
||||||
@@ -31,12 +47,11 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="submit" name="toggle_document_visibility" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Save</button>
|
<button type="submit" name="toggle_document_visibility" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Save changes</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
</div>
|
|
||||||
|
|||||||
@@ -1,14 +1,29 @@
|
|||||||
<div class="modal" id="linkAssetToDocumentModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
<h5 class="modal-title"><i class="fa fa-fw fa-desktop mr-2"></i>Link Asset to <strong><?php echo $document_name; ?></strong></h5>
|
$document_id = intval($_GET['document_id']);
|
||||||
|
|
||||||
|
$sql = mysqli_query($mysqli, "SELECT * FROM documents
|
||||||
|
WHERE document_id = $document_id
|
||||||
|
LIMIT 1
|
||||||
|
");
|
||||||
|
|
||||||
|
$row = mysqli_fetch_array($sql);
|
||||||
|
$document_name = nullable_htmlentities($row['document_name']);
|
||||||
|
$client_id = intval($row['document_client_id']);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
|
<h5 class="modal-title"><i class="fa fa-fw fa-desktop mr-2"></i>Link Asset to <strong><?= $document_name ?></strong></h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="document_id" value="<?php echo $document_id; ?>">
|
<input type="hidden" name="document_id" value="<?= $document_id ?>">
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -19,26 +34,23 @@
|
|||||||
<select class="form-control select2" name="asset_id">
|
<select class="form-control select2" name="asset_id">
|
||||||
<option value="">- Select an Asset -</option>
|
<option value="">- Select an Asset -</option>
|
||||||
<?php
|
<?php
|
||||||
// Check if there are any associated vendors
|
$sql_assets_select = mysqli_query($mysqli, "
|
||||||
if (!empty($linked_assets)) {
|
SELECT assets.asset_id, asset_name
|
||||||
$excluded_asset_ids = implode(",", $linked_assets);
|
FROM assets
|
||||||
$exclude_condition = "AND asset_id NOT IN ($excluded_asset_ids)";
|
LEFT JOIN asset_documents
|
||||||
} else {
|
ON assets.asset_id = asset_documents.asset_id
|
||||||
$exclude_condition = ""; // No condition if there are no displayed vendors
|
AND asset_documents.document_id = $document_id
|
||||||
}
|
|
||||||
|
|
||||||
$sql_assets_select = mysqli_query($mysqli, "SELECT * FROM assets
|
|
||||||
WHERE asset_client_id = $client_id
|
WHERE asset_client_id = $client_id
|
||||||
AND asset_archived_at IS NULL
|
AND asset_archived_at IS NULL
|
||||||
$exclude_condition
|
AND asset_documents.asset_id IS NULL
|
||||||
ORDER BY asset_name ASC"
|
ORDER BY asset_name ASC
|
||||||
);
|
");
|
||||||
while ($row = mysqli_fetch_array($sql_assets_select)) {
|
while ($row = mysqli_fetch_array($sql_assets_select)) {
|
||||||
$asset_id = intval($row['asset_id']);
|
$asset_id = intval($row['asset_id']);
|
||||||
$asset_name = nullable_htmlentities($row['asset_name']);
|
$asset_name = nullable_htmlentities($row['asset_name']);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<option value="<?php echo $asset_id ?>"><?php echo $asset_name; ?></option>
|
<option value="<?= $asset_id ?>"><?= $asset_name ?></option>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@@ -51,7 +63,7 @@
|
|||||||
<button type="submit" name="link_asset_to_document" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Link</button>
|
<button type="submit" name="link_asset_to_document" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Link</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -1,14 +1,30 @@
|
|||||||
<div class="modal" id="linkContactToDocumentModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
<h5 class="modal-title"><i class="fa fa-fw fa-user mr-2"></i>Link Contact to <strong><?php echo $document_name; ?></strong></h5>
|
$document_id = intval($_GET['document_id']);
|
||||||
|
|
||||||
|
$sql = mysqli_query($mysqli, "SELECT * FROM documents
|
||||||
|
WHERE document_id = $document_id
|
||||||
|
LIMIT 1
|
||||||
|
");
|
||||||
|
|
||||||
|
$row = mysqli_fetch_array($sql);
|
||||||
|
$document_name = nullable_htmlentities($row['document_name']);
|
||||||
|
$client_id = intval($row['document_client_id']);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
|
<h5 class="modal-title"><i class="fa fa-fw fa-user mr-2"></i>Link Contact to <strong><?= $document_name ?></strong></h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="document_id" value="<?php echo $document_id; ?>">
|
<input type="hidden" name="document_id" value="<?= $document_id ?>">
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -19,26 +35,23 @@
|
|||||||
<select class="form-control select2" name="contact_id">
|
<select class="form-control select2" name="contact_id">
|
||||||
<option value="">- Select a Contact -</option>
|
<option value="">- Select a Contact -</option>
|
||||||
<?php
|
<?php
|
||||||
// Check if there are any associated vendors
|
$sql_contacts_select = mysqli_query($mysqli, "
|
||||||
if (!empty($linked_contacts)) {
|
SELECT contacts.contact_id, contact_name
|
||||||
$excluded_contact_ids = implode(",", $linked_contacts);
|
FROM contacts
|
||||||
$exclude_condition = "AND contact_id NOT IN ($excluded_contact_ids)";
|
LEFT JOIN contact_documents
|
||||||
} else {
|
ON contacts.contact_id = contact_documents.contact_id
|
||||||
$exclude_condition = ""; // No condition if there are no displayed vendors
|
AND contact_documents.document_id = $document_id
|
||||||
}
|
|
||||||
|
|
||||||
$sql_contacts_select = mysqli_query($mysqli, "SELECT * FROM contacts
|
|
||||||
WHERE contact_client_id = $client_id
|
WHERE contact_client_id = $client_id
|
||||||
AND contact_archived_at IS NULL
|
AND contact_archived_at IS NULL
|
||||||
$exclude_condition
|
AND contact_documents.contact_id IS NULL
|
||||||
ORDER BY contact_name ASC"
|
ORDER BY contact_name ASC
|
||||||
);
|
");
|
||||||
while ($row = mysqli_fetch_array($sql_contacts_select)) {
|
while ($row = mysqli_fetch_array($sql_contacts_select)) {
|
||||||
$contact_id = intval($row['contact_id']);
|
$contact_id = intval($row['contact_id']);
|
||||||
$contact_name = nullable_htmlentities($row['contact_name']);
|
$contact_name = nullable_htmlentities($row['contact_name']);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<option value="<?php echo $contact_id ?>"><?php echo $contact_name; ?></option>
|
<option value="<?= $contact_id ?>"><?= $contact_name ?></option>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@@ -48,10 +61,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="submit" name="link_contact_to_document" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Link</button>
|
<button type="submit" name="link_contact_to_document" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Link Contact</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -1,14 +1,30 @@
|
|||||||
<div class="modal" id="linkFileToDocumentModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
<h5 class="modal-title"><i class="fa fa-fw fa-paperclip mr-2"></i>Link File to <strong><?php echo $document_name; ?></strong></h5>
|
$document_id = intval($_GET['document_id']);
|
||||||
|
|
||||||
|
$sql = mysqli_query($mysqli, "SELECT * FROM documents
|
||||||
|
WHERE document_id = $document_id
|
||||||
|
LIMIT 1
|
||||||
|
");
|
||||||
|
|
||||||
|
$row = mysqli_fetch_array($sql);
|
||||||
|
$document_name = nullable_htmlentities($row['document_name']);
|
||||||
|
$client_id = intval($row['document_client_id']);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
|
<h5 class="modal-title"><i class="fa fa-fw fa-paperclip mr-2"></i>Link File to <strong><?= $document_name ?></strong></h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="document_id" value="<?php echo $document_id; ?>">
|
<input type="hidden" name="document_id" value="<?= $document_id ?>">
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -19,9 +35,19 @@
|
|||||||
<select class="form-control select2" name="file_id">
|
<select class="form-control select2" name="file_id">
|
||||||
<option value="">- Select a File -</option>
|
<option value="">- Select a File -</option>
|
||||||
<?php
|
<?php
|
||||||
$sql_files_select = mysqli_query($mysqli, "SELECT * FROM files
|
$sql_files_select = mysqli_query($mysqli, "
|
||||||
LEFT JOIN folders ON folder_id = file_folder_id
|
SELECT files.file_id, file_name, folder_name
|
||||||
WHERE file_client_id = $client_id ORDER BY folder_name ASC, file_name ASC");
|
FROM files
|
||||||
|
LEFT JOIN folders
|
||||||
|
ON folder_id = file_folder_id
|
||||||
|
LEFT JOIN document_files
|
||||||
|
ON files.file_id = document_files.file_id
|
||||||
|
AND document_files.document_id = $document_id
|
||||||
|
WHERE file_client_id = $client_id
|
||||||
|
AND file_archived_at IS NULL
|
||||||
|
AND document_files.file_id IS NULL
|
||||||
|
ORDER BY folder_name ASC, file_name ASC
|
||||||
|
");
|
||||||
while ($row = mysqli_fetch_array($sql_files_select)) {
|
while ($row = mysqli_fetch_array($sql_files_select)) {
|
||||||
$file_id = intval($row['file_id']);
|
$file_id = intval($row['file_id']);
|
||||||
$file_name = nullable_htmlentities($row['file_name']);
|
$file_name = nullable_htmlentities($row['file_name']);
|
||||||
@@ -38,10 +64,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="submit" name="link_file_to_document" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Link</button>
|
<button type="submit" name="link_file_to_document" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Link File</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -1,14 +1,30 @@
|
|||||||
<div class="modal" id="linkSoftwareToDocumentModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
<h5 class="modal-title"><i class="fa fa-fw fa-user mr-2"></i>Link Software to <strong><?php echo $document_name; ?></strong></h5>
|
$document_id = intval($_GET['document_id']);
|
||||||
|
|
||||||
|
$sql = mysqli_query($mysqli, "SELECT * FROM documents
|
||||||
|
WHERE document_id = $document_id
|
||||||
|
LIMIT 1
|
||||||
|
");
|
||||||
|
|
||||||
|
$row = mysqli_fetch_array($sql);
|
||||||
|
$document_name = nullable_htmlentities($row['document_name']);
|
||||||
|
$client_id = intval($row['document_client_id']);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
|
<h5 class="modal-title"><i class="fa fa-fw fa-user mr-2"></i>Link Software to <strong><?= $document_name ?></strong></h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="document_id" value="<?php echo $document_id; ?>">
|
<input type="hidden" name="document_id" value="<?= $document_id ?>">
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -19,26 +35,24 @@
|
|||||||
<select class="form-control select2" name="software_id">
|
<select class="form-control select2" name="software_id">
|
||||||
<option value="">- Select a License -</option>
|
<option value="">- Select a License -</option>
|
||||||
<?php
|
<?php
|
||||||
// Check if there are any associated vendors
|
$sql_software_select = mysqli_query($mysqli, "
|
||||||
if (!empty($linked_software)) {
|
SELECT software.software_id, software_name
|
||||||
$excluded_software_ids = implode(",", $linked_software);
|
FROM software
|
||||||
$exclude_condition = "AND software_id NOT IN ($excluded_software_ids)";
|
LEFT JOIN software_documents
|
||||||
} else {
|
ON software.software_id = software_documents.software_id
|
||||||
$exclude_condition = ""; // No condition if there are no displayed vendors
|
AND software_documents.document_id = $document_id
|
||||||
}
|
|
||||||
|
|
||||||
$sql_software_select = mysqli_query($mysqli, "SELECT software_id, software_name FROM software
|
|
||||||
WHERE software_client_id = $client_id
|
WHERE software_client_id = $client_id
|
||||||
AND software_archived_at IS NULL
|
AND software_archived_at IS NULL
|
||||||
$exclude_condition
|
AND software_documents.software_id IS NULL
|
||||||
ORDER BY software_name ASC"
|
ORDER BY software_name ASC
|
||||||
);
|
");
|
||||||
|
|
||||||
while ($row = mysqli_fetch_array($sql_software_select)) {
|
while ($row = mysqli_fetch_array($sql_software_select)) {
|
||||||
$software_id = intval($row['software_id']);
|
$software_id = intval($row['software_id']);
|
||||||
$software_name = nullable_htmlentities($row['software_name']);
|
$software_name = nullable_htmlentities($row['software_name']);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<option value="<?php echo $software_id ?>"><?php echo $software_name; ?></option>
|
<option value="<?= $software_id ?>"><?= $software_name ?></option>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@@ -48,10 +62,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="submit" name="link_software_to_document" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Link</button>
|
<button type="submit" name="link_software_to_document" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Link License</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -1,14 +1,30 @@
|
|||||||
<div class="modal" id="linkVendorToDocumentModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
<h5 class="modal-title"><i class="fa fa-fw fa-building mr-2"></i>Link Vendor to <strong><?php echo $document_name; ?></strong></h5>
|
$document_id = intval($_GET['document_id']);
|
||||||
|
|
||||||
|
$sql = mysqli_query($mysqli, "SELECT * FROM documents
|
||||||
|
WHERE document_id = $document_id
|
||||||
|
LIMIT 1
|
||||||
|
");
|
||||||
|
|
||||||
|
$row = mysqli_fetch_array($sql);
|
||||||
|
$document_name = nullable_htmlentities($row['document_name']);
|
||||||
|
$client_id = intval($row['document_client_id']);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
|
<h5 class="modal-title"><i class="fa fa-fw fa-building mr-2"></i>Link Vendor to <strong><?= $document_name ?></strong></h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="document_id" value="<?php echo $document_id; ?>">
|
<input type="hidden" name="document_id" value="<?= $document_id ?>">
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -19,26 +35,23 @@
|
|||||||
<select class="form-control select2" name="vendor_id">
|
<select class="form-control select2" name="vendor_id">
|
||||||
<option value="">- Select a Vendor -</option>
|
<option value="">- Select a Vendor -</option>
|
||||||
<?php
|
<?php
|
||||||
// Check if there are any associated vendors
|
$sql_vendors_select = mysqli_query($mysqli, "
|
||||||
if (!empty($associated_vendors)) {
|
SELECT vendors.vendor_id, vendor_name
|
||||||
$excluded_vendor_ids = implode(",", $associated_vendors);
|
FROM vendors
|
||||||
$exclude_condition = "AND vendor_id NOT IN ($excluded_vendor_ids)";
|
LEFT JOIN vendor_documents
|
||||||
} else {
|
ON vendors.vendor_id = vendor_documents.vendor_id
|
||||||
$exclude_condition = ""; // No condition if there are no displayed vendors
|
AND vendor_documents.document_id = $document_id
|
||||||
}
|
|
||||||
|
|
||||||
$sql_vendors_select = mysqli_query($mysqli, "SELECT vendor_id, vendor_name FROM vendors
|
|
||||||
WHERE vendor_client_id = $client_id
|
WHERE vendor_client_id = $client_id
|
||||||
AND vendor_archived_at IS NULL
|
AND vendor_archived_at IS NULL
|
||||||
$exclude_condition
|
AND vendor_documents.vendor_id IS NULL
|
||||||
ORDER BY vendor_name ASC"
|
ORDER BY vendor_name ASC
|
||||||
);
|
");
|
||||||
while ($row = mysqli_fetch_array($sql_vendors_select)) {
|
while ($row = mysqli_fetch_array($sql_vendors_select)) {
|
||||||
$vendor_id = intval($row['vendor_id']);
|
$vendor_id = intval($row['vendor_id']);
|
||||||
$vendor_name = nullable_htmlentities($row['vendor_name']);
|
$vendor_name = nullable_htmlentities($row['vendor_name']);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<option value="<?php echo $vendor_id ?>"><?php echo $vendor_name; ?></option>
|
<option value="<?= $vendor_id ?>"><?= $vendor_name ?></option>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@@ -48,10 +61,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="submit" name="link_vendor_to_document" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Link</button>
|
<button type="submit" name="link_vendor_to_document" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Link Vendor</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -1,16 +1,21 @@
|
|||||||
<div class="modal" id="exportDomainModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Domains to CSV</h5>
|
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Domains to CSV</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<?php if ($client_url) { ?>
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
|
||||||
<?php } ?>
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -18,7 +23,7 @@
|
|||||||
<button type="submit" name="export_domains_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
<button type="submit" name="export_domains_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -152,8 +152,6 @@ ob_start();
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php if ($client_id) { ?>
|
<?php if ($client_id) { ?>
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$expense_ids = array_map('intval', $_GET['expense_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($expense_ids);
|
||||||
|
|
||||||
// Generate the HTML form content using output buffering.
|
// Generate the HTML form content using output buffering.
|
||||||
ob_start();
|
ob_start();
|
||||||
@@ -13,7 +13,7 @@ ob_start();
|
|||||||
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?> <input type="hidden" name="expense_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($expense_ids as $expense_id) { ?> <input type="hidden" name="expense_ids[]" value="<?= $expense_id ?>"><?php } ?>
|
||||||
<div class="modal-body text-center">
|
<div class="modal-body text-center">
|
||||||
|
|
||||||
<div class="mb-4" style="text-align: center;">
|
<div class="mb-4" style="text-align: center;">
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$expense_ids = array_map('intval', $_GET['expense_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($expense_ids);
|
||||||
|
|
||||||
// Generate the HTML form content using output buffering.
|
// Generate the HTML form content using output buffering.
|
||||||
ob_start();
|
ob_start();
|
||||||
@@ -19,7 +19,7 @@ ob_start();
|
|||||||
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?> <input type="hidden" name="expense_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($expense_ids as $expense_id) { ?> <input type="hidden" name="expense_ids[]" value="<?= $expense_id ?>"><?php } ?>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$expense_ids = array_map('intval', $_GET['expense_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($expense_ids);
|
||||||
|
|
||||||
// Generate the HTML form content using output buffering.
|
// Generate the HTML form content using output buffering.
|
||||||
ob_start();
|
ob_start();
|
||||||
@@ -21,8 +21,8 @@ ob_start();
|
|||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php
|
<?php
|
||||||
foreach ($selected_ids as $id) { ?>
|
foreach ($expense_ids as $expense_id) { ?>
|
||||||
<input type="hidden" name="expense_ids[]" value="<?= $id ?>">
|
<input type="hidden" name="expense_ids[]" value="<?= $expense_id ?>">
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$expense_ids = array_map('intval', $_GET['expense_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($expense_ids);
|
||||||
|
|
||||||
// Generate the HTML form content using output buffering.
|
// Generate the HTML form content using output buffering.
|
||||||
ob_start();
|
ob_start();
|
||||||
@@ -21,7 +21,7 @@ ob_start();
|
|||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
|
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?> <input type="hidden" name="expense_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($expense_ids as $expense_id) { ?> <input type="hidden" name="expense_ids[]" value="<?= $expense_id ?>"><?php } ?>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,18 @@
|
|||||||
<div class="modal" id="exportExpensesModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title"><i class="fa fa-fw fa-download mr-2"></i>Exporting Expenses to CSV</h5>
|
<h5 class="modal-title"><i class="fa fa-fw fa-download mr-2"></i>Exporting Expenses to CSV</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
@@ -26,7 +31,7 @@
|
|||||||
$account_id = intval($row['account_id']);
|
$account_id = intval($row['account_id']);
|
||||||
$account_name = nullable_htmlentities($row['account_name']);
|
$account_name = nullable_htmlentities($row['account_name']);
|
||||||
?>
|
?>
|
||||||
<option <?php if ($account_filter == $account_id) { echo "selected"; } ?> value="<?php echo $account_id; ?>"><?php echo $account_name; ?></option>
|
<option <?php if ($account_filter == $account_id) { echo "selected"; } ?> value="<?= $account_id ?>"><?= $account_name ?></option>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@@ -50,7 +55,7 @@
|
|||||||
$vendor_id = intval($row['vendor_id']);
|
$vendor_id = intval($row['vendor_id']);
|
||||||
$vendor_name = nullable_htmlentities($row['vendor_name']);
|
$vendor_name = nullable_htmlentities($row['vendor_name']);
|
||||||
?>
|
?>
|
||||||
<option <?php if ($vendor_filter == $vendor_id) { echo "selected"; } ?> value="<?php echo $vendor_id; ?>"><?php echo $vendor_name; ?></option>
|
<option <?php if ($vendor_filter == $vendor_id) { echo "selected"; } ?> value="<?= $vendor_id ?>"><?= $vendor_name ?></option>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@@ -74,7 +79,7 @@
|
|||||||
$category_id = intval($row['category_id']);
|
$category_id = intval($row['category_id']);
|
||||||
$category_name = nullable_htmlentities($row['category_name']);
|
$category_name = nullable_htmlentities($row['category_name']);
|
||||||
?>
|
?>
|
||||||
<option <?php if ($category_filter == $category_id) { echo "selected"; } ?> value="<?php echo $category_id; ?>"><?php echo $category_name; ?></option>
|
<option <?php if ($category_filter == $category_id) { echo "selected"; } ?> value="<?= $category_id ?>"><?= $category_name ?></option>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@@ -89,7 +94,7 @@
|
|||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
|
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<input type="date" class="form-control" name="date_from" max="2999-12-31" value="<?php echo nullable_htmlentities($dtf); ?>">
|
<input type="date" class="form-control" name="date_from" max="2999-12-31">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -99,7 +104,7 @@
|
|||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
|
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<input type="date" class="form-control" name="date_to" max="2999-12-31" value="<?php echo nullable_htmlentities($dtt); ?>">
|
<input type="date" class="form-control" name="date_to" max="2999-12-31">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -108,7 +113,7 @@
|
|||||||
<button type="submit" name="export_expenses_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
<button type="submit" name="export_expenses_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -2,17 +2,26 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$client_id = intval($_GET['client_id']);
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$current_folder_id = intval($_GET['current_folder_id'] ?? 0);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
// Selected IDs from JS (may be empty arrays)
|
||||||
|
$file_ids = array_map('intval', $_GET['file_ids'] ?? []);
|
||||||
|
$document_ids = array_map('intval', $_GET['document_ids'] ?? []);
|
||||||
|
|
||||||
|
$count_files = count($file_ids);
|
||||||
|
$count_docs = count($document_ids);
|
||||||
|
$total = $count_files + $count_docs;
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="modal-header bg-dark">
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title"><i class="fa fa-fw fa-exchange-alt mr-2"></i>Move <strong><?= $count ?></strong> Files</h5>
|
<h5 class="modal-title">
|
||||||
|
<i class="fa fa-fw fa-exchange-alt mr-2"></i>
|
||||||
|
Move <strong><?= $total ?></strong> Item<?= $total === 1 ? '' : 's' ?>
|
||||||
|
</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
@@ -20,10 +29,22 @@ ob_start();
|
|||||||
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="file_ids[]" value="<?= $id ?>"><?php } ?>
|
|
||||||
|
<?php foreach ($file_ids as $id): ?>
|
||||||
|
<input type="hidden" name="file_ids[]" value="<?= $id ?>">
|
||||||
|
<?php endforeach; ?>
|
||||||
|
|
||||||
|
<?php foreach ($document_ids as $id): ?>
|
||||||
|
<input type="hidden" name="document_ids[]" value="<?= $id ?>">
|
||||||
|
<?php endforeach; ?>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Files: <strong><?= $count_files ?></strong><br>
|
||||||
|
Documents: <strong><?= $count_docs ?></strong>
|
||||||
|
</p>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Target Folder</label>
|
<label>Target Folder</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
@@ -33,40 +54,47 @@ ob_start();
|
|||||||
<select class="form-control select2" name="bulk_folder_id">
|
<select class="form-control select2" name="bulk_folder_id">
|
||||||
<option value="0">/</option>
|
<option value="0">/</option>
|
||||||
<?php
|
<?php
|
||||||
// Fetch all folders for the client
|
// NOTE: folder_location is gone now, so just use folder_client_id
|
||||||
$sql_all_folders = mysqli_query($mysqli, "SELECT folder_id, folder_name, parent_folder FROM folders WHERE folder_location = 1 AND folder_client_id = $client_id ORDER BY folder_name ASC");
|
$sql_all_folders = mysqli_query(
|
||||||
$folders = array();
|
$mysqli,
|
||||||
|
"SELECT folder_id, folder_name, parent_folder
|
||||||
// Build an associative array of folders indexed by folder_id
|
FROM folders
|
||||||
while ($row = mysqli_fetch_assoc($sql_all_folders)) {
|
WHERE folder_client_id = $client_id
|
||||||
$folders[$row['folder_id']] = array(
|
ORDER BY folder_name ASC"
|
||||||
'folder_id' => intval($row['folder_id']),
|
|
||||||
'folder_name' => nullable_htmlentities($row['folder_name']),
|
|
||||||
'parent_folder' => intval($row['parent_folder']),
|
|
||||||
'children' => array()
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$folders = [];
|
||||||
|
|
||||||
|
while ($row = mysqli_fetch_assoc($sql_all_folders)) {
|
||||||
|
$folders[$row['folder_id']] = [
|
||||||
|
'folder_id' => (int)$row['folder_id'],
|
||||||
|
'folder_name' => nullable_htmlentities($row['folder_name']),
|
||||||
|
'parent_folder'=> (int)$row['parent_folder'],
|
||||||
|
'children' => []
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Build the folder hierarchy
|
// Build hierarchy
|
||||||
foreach ($folders as $id => &$folder) {
|
foreach ($folders as $id => &$folder) {
|
||||||
if ($folder['parent_folder'] != 0 && isset($folders[$folder['parent_folder']])) {
|
if ($folder['parent_folder'] != 0 && isset($folders[$folder['parent_folder']])) {
|
||||||
$folders[$folder['parent_folder']]['children'][] = &$folder;
|
$folders[$folder['parent_folder']]['children'][] = &$folder;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
unset($folder); // Break the reference
|
unset($folder);
|
||||||
|
|
||||||
// Prepare a list of root folders
|
$root_folders = [];
|
||||||
$root_folders = array();
|
|
||||||
foreach ($folders as $id => $folder) {
|
foreach ($folders as $id => $folder) {
|
||||||
if ($folder['parent_folder'] == 0) {
|
if ($folder['parent_folder'] == 0) {
|
||||||
$root_folders[] = $folder;
|
$root_folders[] = $folder;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Display the folder options iteratively
|
// Optional: if you want to default-select current folder, pass it in GET
|
||||||
$stack = array();
|
$current_folder_id = intval($_GET['current_folder_id'] ?? 0);
|
||||||
|
|
||||||
|
$stack = [];
|
||||||
foreach (array_reverse($root_folders) as $folder) {
|
foreach (array_reverse($root_folders) as $folder) {
|
||||||
$stack[] = array('folder' => $folder, 'level' => 0);
|
$stack[] = ['folder' => $folder, 'level' => 0];
|
||||||
}
|
}
|
||||||
|
|
||||||
while (!empty($stack)) {
|
while (!empty($stack)) {
|
||||||
@@ -74,21 +102,15 @@ ob_start();
|
|||||||
$folder = $node['folder'];
|
$folder = $node['folder'];
|
||||||
$level = $node['level'];
|
$level = $node['level'];
|
||||||
|
|
||||||
// Indentation for subfolders
|
|
||||||
$indentation = str_repeat(' ', $level * 4);
|
$indentation = str_repeat(' ', $level * 4);
|
||||||
|
|
||||||
// Check if this folder is selected
|
$selected = ($folder['folder_id'] === $current_folder_id) ? 'selected' : '';
|
||||||
$selected = '';
|
|
||||||
if ($folder['folder_id'] == $get_folder_id) {
|
|
||||||
$selected = 'selected';
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "<option value=\"{$folder['folder_id']}\" $selected>$indentation{$folder['folder_name']}</option>";
|
echo "<option value=\"{$folder['folder_id']}\" $selected>$indentation{$folder['folder_name']}</option>";
|
||||||
|
|
||||||
// Add children to the stack
|
|
||||||
if (!empty($folder['children'])) {
|
if (!empty($folder['children'])) {
|
||||||
foreach (array_reverse($folder['children']) as $child_folder) {
|
foreach (array_reverse($folder['children']) as $child) {
|
||||||
$stack[] = array('folder' => $child_folder, 'level' => $level + 1);
|
$stack[] = ['folder' => $child, 'level' => $level + 1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -98,9 +120,14 @@ ob_start();
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="submit" name="bulk_move_files" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Move Files</button>
|
<button type="submit" name="bulk_move_files" class="btn btn-primary text-bold">
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
<i class="fa fa-check mr-2"></i>Move Files
|
||||||
|
</button>
|
||||||
|
<button type="button" class="btn btn-light" data-dismiss="modal">
|
||||||
|
<i class="fa fa-times mr-2"></i>Cancel
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$client_id = intval($_GET['client_id'] ?? 0);
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
$folder_location = intval($_GET['folder_location'] ?? 0);
|
|
||||||
$current_folder_id = intval($_GET['current_folder_id'] ?? 0);
|
$current_folder_id = intval($_GET['current_folder_id'] ?? 0);
|
||||||
$folder_name = nullable_htmlentities(getFieldByID('folders', $current_folder_id, 'folder_name') ?? '/');
|
$folder_name = nullable_htmlentities(getFieldByID('folders', $current_folder_id, 'folder_name') ?? '/');
|
||||||
|
|
||||||
@@ -18,7 +17,6 @@ ob_start();
|
|||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
<input type="hidden" name="folder_location" value="<?= $folder_location ?>">
|
|
||||||
<input type="hidden" name="parent_folder" value="<?= $current_folder_id ?>">
|
<input type="hidden" name="parent_folder" value="<?= $current_folder_id ?>">
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$invoice_ids = array_map('intval', $_GET['invoice_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($invoice_ids);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ ob_start();
|
|||||||
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="invoice_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($invoice_ids as $invoice_id) { ?><input type="hidden" name="invoice_ids[]" value="<?= $invoice_id ?>"><?php } ?>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,21 @@
|
|||||||
<div class="modal" id="exportInvoicesModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title"><i class="fa fa-fw fa-download mr-2"></i>Export Invoices to CSV</h5>
|
<h5 class="modal-title"><i class="fa fa-fw fa-download mr-2"></i>Export Invoices to CSV</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<?php if (isset($_GET['client_id'])) { ?>
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
|
||||||
<?php } ?>
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -19,7 +24,7 @@
|
|||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
|
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<input type="date" class="form-control" name="date_from" max="2999-12-31" value="<?php echo nullable_htmlentities($dtf); ?>">
|
<input type="date" class="form-control" name="date_from" max="2999-12-31">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -29,7 +34,7 @@
|
|||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
|
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<input type="date" class="form-control" name="date_to" max="2999-12-31" value="<?php echo nullable_htmlentities($dtt); ?>">
|
<input type="date" class="form-control" name="date_to" max="2999-12-31">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -38,7 +43,7 @@
|
|||||||
<button type="submit" name="export_invoices_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
<button type="submit" name="export_invoices_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -1,16 +1,27 @@
|
|||||||
<div class="modal" id="addInvoiceRecurringModal<?php echo $invoice_id; ?>" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header text-white">
|
|
||||||
<h5 class="modal-title"><i class="fas fa-fw fa-copy mr-2"></i>Make <?php echo "$invoice_prefix$invoice_number"; ?> Recurring</h5>
|
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
|
||||||
<span aria-hidden="true">×</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
|
||||||
<input type="hidden" name="invoice_id" value="<?php echo $invoice_id; ?>">
|
|
||||||
<div class="modal-body">
|
|
||||||
|
|
||||||
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
|
$invoice_id = intval($_GET['invoice_id']);
|
||||||
|
|
||||||
|
$sql = mysqli_query($mysqli, "SELECT * FROM invoices WHERE invoice_id = $invoice_id LIMIT 1");
|
||||||
|
|
||||||
|
$row = mysqli_fetch_array($sql);
|
||||||
|
$invoice_prefix = nullable_htmlentities($row['invoice_prefix']);
|
||||||
|
$invoice_number = intval($row['invoice_number']);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
|
<h5 class="modal-title"><i class="fas fa-fw fa-copy mr-2"></i>Invoice <?= "$invoice_prefix$invoice_number" ?> to Recurring Invoice</h5>
|
||||||
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
|
<span>×</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
|
<input type="hidden" name="invoice_id" value="<?= $invoice_id ?>">
|
||||||
|
<div class="modal-body">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Frequency <strong class="text-danger">*</strong></label>
|
<label>Frequency <strong class="text-danger">*</strong></label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
@@ -24,13 +35,12 @@
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="submit" name="add_invoice_recurring" class="btn btn-primary text-bold"><i class="fas fa-check mr-2"></i>Create Recurring Invoice</button>
|
<button type="submit" name="add_invoice_recurring" class="btn btn-primary text-bold"><i class="fas fa-check mr-2"></i>Create Recurring Invoice</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$location_ids = array_map('intval', $_GET['location_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($location_ids);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ ob_start();
|
|||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="location_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($location_ids as $location_id) { ?><input type="hidden" name="location_ids[]" value="<?= $location_id ?>"><?php } ?>
|
||||||
<input type="hidden" name="bulk_remove_tags" value="0">
|
<input type="hidden" name="bulk_remove_tags" value="0">
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,21 @@
|
|||||||
<div class="modal" id="exportLocationModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Locations to CSV</h5>
|
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Locations to CSV</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<?php if ($client_url) { ?>
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
|
||||||
<?php } ?>
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -18,7 +23,7 @@
|
|||||||
<button type="submit" name="export_locations_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
<button type="submit" name="export_locations_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -1,16 +1,22 @@
|
|||||||
<div class="modal" id="importLocationModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title"><i class="fa fa-fw fa-map-marker-alt mr-2"></i>Import Locations</h5>
|
<h5 class="modal-title"><i class="fa fa-fw fa-map-marker-alt mr-2"></i>Import Locations</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" enctype="multipart/form-data" autocomplete="off">
|
<form action="post.php" method="post" enctype="multipart/form-data" autocomplete="off">
|
||||||
<?php if ($client_url) { ?>
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
|
||||||
<?php } ?>
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<p><strong>Format csv file with headings & data:</strong><br>Name, Description, Address, City, State, Postal Code, Phone, Hours</p>
|
<p><strong>Format csv file with headings & data:</strong><br>Name, Description, Address, City, State, Postal Code, Phone, Hours</p>
|
||||||
<hr>
|
<hr>
|
||||||
@@ -18,13 +24,13 @@
|
|||||||
<input type="file" class="form-control-file" name="file" accept=".csv" required>
|
<input type="file" class="form-control-file" name="file" accept=".csv" required>
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
<div>Download: <a class="text-bold" href="post.php?download_locations_csv_template=<?php echo $client_id; ?>">sample csv template</a></div>
|
<div>Download: <a class="text-bold" href="post.php?download_locations_csv_template=<?= $client_id ?>">sample csv template</a></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="submit" name="import_locations_csv" class="btn btn-primary text-bold"><i class="fa fa-upload mr-2"></i>Import</button>
|
<button type="submit" name="import_locations_csv" class="btn btn-primary text-bold"><i class="fa fa-upload mr-2"></i>Import</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -1,16 +1,21 @@
|
|||||||
<div class="modal" id="exportNetworkModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Networks to CSV</h5>
|
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Networks to CSV</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<?php if ($client_url) { ?>
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
|
||||||
<?php } ?>
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -18,7 +23,7 @@
|
|||||||
<button type="submit" name="export_networks_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
<button type="submit" name="export_networks_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -1,16 +1,22 @@
|
|||||||
<div class="modal" id="exportPaymentModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Payments to CSV</h5>
|
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Payments to CSV</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<?php if (isset($_GET['client_id'])) { ?>
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
|
||||||
<?php } ?>
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -18,7 +24,7 @@
|
|||||||
<button type="submit" name="export_payments_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
<button type="submit" name="export_payments_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -1,12 +1,26 @@
|
|||||||
<div class="modal" id="bulkEditCategoryModal" tabindex="-1">
|
|
||||||
<div class="modal-dialog">
|
<?php
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header bg-dark">
|
require_once '../../../includes/modal_header.php';
|
||||||
<h5 class="modal-title"><i class="fa fa-fw fa-list mr-2"></i>Bulk Set Category</h5>
|
|
||||||
|
$product_ids = array_map('intval', $_GET['product_ids'] ?? []);
|
||||||
|
|
||||||
|
$count = count($product_ids);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
|
<h5 class="modal-title"><i class="fa fa-fw fa-list mr-2"></i>Set Category for <strong><?= $count ?></strong> Products</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
|
<?php foreach ($product_ids as $product_id) { ?><input type="hidden" name="product_ids[]" value="<?= $product_id ?>"><?php } ?>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -37,6 +51,8 @@
|
|||||||
<button type="submit" name="bulk_edit_product_category" class="btn btn-primary text-bold"><i class="fa fa-fw fa-check mr-2"></i>Set</button>
|
<button type="submit" name="bulk_edit_product_category" class="btn btn-primary text-bold"><i class="fa fa-fw fa-check mr-2"></i>Set</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
<?php
|
||||||
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -1,13 +1,18 @@
|
|||||||
<div class="modal" id="exportProductsModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title"><i class="fa fa-fw fa-download mr-2"></i>Export Products to CSV</h5>
|
<h5 class="modal-title"><i class="fa fa-fw fa-download mr-2"></i>Export Products to CSV</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -15,7 +20,7 @@
|
|||||||
<button type="submit" name="export_products_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
<button type="submit" name="export_products_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -1,16 +1,22 @@
|
|||||||
<div class="modal" id="exportQuoteModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Quotes to CSV</h5>
|
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Quotes to CSV</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<?php if(isset($_GET['client_id'])) { ?>
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
|
||||||
<?php } ?>
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -18,7 +24,7 @@
|
|||||||
<button type="submit" name="export_quotes_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
<button type="submit" name="export_quotes_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -2,7 +2,9 @@
|
|||||||
<div class="modal-dialog modal-lg">
|
<div class="modal-dialog modal-lg">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header bg-dark">
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title text-white"><i class="fas fa-fw fa-edit mr-2"></i>Quote Notes</h5>
|
<h5 class="modal-title text-white">
|
||||||
|
<i class="fas fa-fw fa-edit mr-2"></i>Quote Notes
|
||||||
|
</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
@@ -15,8 +17,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="submit" name="quote_note" class="btn btn-primary text-bold"><i class="fas fa-check mr-2"></i>Save</button>
|
<button type="submit" name="quote_note" class="btn btn-primary text-bold">
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
<i class="fas fa-check mr-2"></i>Save
|
||||||
|
</button>
|
||||||
|
<button type="button" class="btn btn-light" data-dismiss="modal">
|
||||||
|
<i class="fas fa-times mr-2"></i>Cancel
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,15 +1,30 @@
|
|||||||
<div class="modal" id="addQuoteToInvoiceModal<?php echo $quote_id; ?>" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
<h5 class="modal-title"><i class="fas fa-fw fa-file mr-2"></i>Quote <?php echo "$quote_prefix$quote_number"; ?> <i class="fas fa-arrow-right mr-2"></i>Invoice</h5>
|
$quote_id = intval($_GET['quote_id']);
|
||||||
|
|
||||||
|
$sql = mysqli_query($mysqli, "SELECT * FROM quotes WHERE quote_id = $quote_id LIMIT 1");
|
||||||
|
|
||||||
|
$row = mysqli_fetch_array($sql);
|
||||||
|
$quote_prefix = nullable_htmlentities($row['quote_prefix']);
|
||||||
|
$quote_number = intval($row['quote_number']);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
|
<h5 class="modal-title">
|
||||||
|
<i class="fas fa-fw fa-file mr-2"></i>
|
||||||
|
Quote <?= "$quote_prefix$quote_number" ?>
|
||||||
|
<i class="fas fa-arrow-right mr-2"></i>Invoice
|
||||||
|
</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="quote_id" value="<?php echo $quote_id; ?>">
|
<input type="hidden" name="quote_id" value="<?= $quote_id ?>">
|
||||||
<input type="hidden" name="client_net_terms" value="<?php echo $client_net_terms; ?>">
|
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
@@ -19,16 +34,20 @@
|
|||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
|
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<input type="date" class="form-control" name="date" max="2999-12-31" value="<?php echo date("Y-m-d"); ?>" required>
|
<input type="date" class="form-control" name="date" max="2999-12-31" value="<?= date("Y-m-d"); ?>" required>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="submit" name="add_quote_to_invoice" class="btn btn-primary text-bold"><strong><i class="fas fa-check mr-2"></i>Create Invoice</button>
|
<button type="submit" name="add_quote_to_invoice" class="btn btn-primary text-bold">
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
<strong><i class="fas fa-check mr-2"></i>Create Invoice</strong>
|
||||||
|
</button>
|
||||||
|
<button type="button" class="btn btn-light" data-dismiss="modal">
|
||||||
|
<i class="fas fa-times mr-2"></i>Cancel
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
<?php
|
||||||
</div>
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$recurring_ticket_ids = array_map('intval', $_GET['recurring_ticket_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($recurring_ticket_ids);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ ob_start();
|
|||||||
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="recurring_ticket_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($recurring_ticket_ids as $recurring_ticket_id) { ?><input type="hidden" name="recurring_ticket_ids[]" value="<?= $recurring_ticket_id ?>"><?php } ?>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
$recurring_ticket_ids = array_map('intval', $_GET['recurring_ticket_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($selected_ids);
|
$count = count($recurring_ticket_ids);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ ob_start();
|
|||||||
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="recurring_ticket_ids[]" value="<?= $id ?>"><?php } ?>
|
<?php foreach ($recurring_ticket_ids as $recurring_ticket_id) { ?><input type="hidden" name="recurring_ticket_ids[]" value="<?= $recurring_ticket_id ?>"><?php } ?>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user