mirror of
https://github.com/itflow-org/itflow
synced 2026-03-11 00:04:50 +00:00
Compare commits
2 Commits
ticket-tas
...
duplicate-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
216db04d32 | ||
|
|
13b8f93e17 |
50
CHANGELOG.md
50
CHANGELOG.md
@@ -2,54 +2,6 @@
|
|||||||
|
|
||||||
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
|
||||||
@@ -334,7 +286,7 @@ We will provide example code with directory structure for each custom directory
|
|||||||
---
|
---
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Several security vulnerabilities patched (with thanks to www.helx.io).
|
- Several security vulnerabilities patched.
|
||||||
- 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.com</b> | Password: <b>demo</b>
|
Username: <b>demo@demo</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.12 | :white_check_mark: |
|
| 25.05 | :white_check_mark: |
|
||||||
|
|
||||||
## Reporting a Vulnerability via GitHub Security Advisories
|
## Reporting a Vulnerability via GitHub Security Advisories
|
||||||
|
|
||||||
|
|||||||
@@ -12,16 +12,6 @@ $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 class="text-center">
|
<th>
|
||||||
<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,8 +67,7 @@ $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 class="text-center">
|
<td><?php echo $ai_model_count; ?></td>
|
||||||
<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,30 +4134,10 @@ 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.4.0'");
|
// mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.3.9'");
|
||||||
// }
|
// }
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -52,7 +52,6 @@ $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) {
|
||||||
@@ -503,6 +502,12 @@ 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();
|
||||||
?>
|
?>
|
||||||
|
|
||||||
@@ -759,6 +764,40 @@ $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>
|
||||||
@@ -766,3 +805,4 @@ $mysqli->close();
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once "../includes/footer.php";
|
require_once "../includes/footer.php";
|
||||||
|
|
||||||
|
|||||||
@@ -27,14 +27,12 @@
|
|||||||
<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>
|
||||||
@@ -69,20 +67,30 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="/admin/payment_provider.php"
|
<a href="/admin/payment_provider.php" class="nav-link <?php echo (basename($_SERVER['PHP_SELF']) == 'payment_provider.php' ? 'active' : ''); ?>">
|
||||||
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"
|
<a href="/admin/ai_provider.php" class="nav-link <?php echo (basename($_SERVER['PHP_SELF']) == 'ai_provider.php' ? 'active' : ''); ?>">
|
||||||
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(32);
|
$key = randomString(156);
|
||||||
$decryptPW = randomString(32);
|
$decryptPW = randomString(160);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -16,26 +16,11 @@ ob_start();
|
|||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<div class="alert alert-info text-center">
|
<div class="alert alert-info">
|
||||||
<h6>Before Adding a Payment Provider!</h6>
|
An income account named after the provider will always be created and used for income of paid invoices.<br>
|
||||||
We recommend you add an <strong>Account</strong> and <strong>Vendor</strong> based off the Provider name before continuing eg <strong>Stripe</strong>
|
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.
|
||||||
</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">
|
||||||
@@ -68,30 +53,6 @@ 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">
|
||||||
@@ -103,9 +64,7 @@ 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>
|
||||||
|
|
||||||
</div>
|
<hr>
|
||||||
|
|
||||||
<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">
|
||||||
@@ -114,60 +73,6 @@ 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">
|
||||||
@@ -191,8 +96,6 @@ 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 = intval($row['payment_provider_account']);
|
$account_id = nullable_htmlentities($row['payment_provider_account']);
|
||||||
$threshold = floatval($row['payment_provider_threshold']);
|
$threshold = floatval($row['payment_provider_threshold']);
|
||||||
$vendor_id = intval($row['payment_provider_expense_vendor']);
|
$vendor_id = nullable_htmlentities($row['payment_provider_expense_vendor']);
|
||||||
$category_id = intval($row['payment_provider_expense_category']);
|
$category_id = nullable_htmlentities($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,39 +21,24 @@ $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><?= $provider_name ?></strong></h5>
|
<h5 class="modal-title"><i class="fa fa-fw fa-credit-card mr-2"></i>Editing: <strong><?php echo $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="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?php echo $_SESSION['csrf_token'] ?>">
|
||||||
<input type="hidden" name="provider_id" value="<?= $provider_id ?>">
|
<input type="hidden" name="provider_id" value="<?php echo $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="<?= $public_key ?>">
|
<input type="text" class="form-control" name="public_key" placeholder="Publishable API Key (pk_...)" value="<?php echo $public_key; ?>">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -63,31 +48,7 @@ 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="<?= $private_key ?>">
|
<input type="text" class="form-control" name="private_key" placeholder="Secret API Key (sk_...)" value="<?php echo $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>
|
||||||
|
|
||||||
@@ -102,64 +63,14 @@ 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>
|
||||||
|
|
||||||
</div>
|
<hr>
|
||||||
|
|
||||||
<div class="tab-pane fade" id="pills-expense">
|
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Payment Provider Vendor <strong class="text-danger">*</strong></label>
|
<div class="custom-control custom-switch">
|
||||||
<div class="input-group">
|
<input type="checkbox" class="custom-control-input" name="enable_expense" <?php if ($vendor_id) { echo "checked"; } ?> value="1" id="enableEditExpenseSwitch">
|
||||||
<div class="input-group-prepend">
|
<label class="custom-control-label" for="enableEditExpenseSwitch">Enable Expense</label>
|
||||||
<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">
|
||||||
@@ -183,8 +94,7 @@ 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,11 +1,6 @@
|
|||||||
<?php
|
<div class="modal" id="exportUserModal" tabindex="-1">
|
||||||
|
<div class="modal-dialog">
|
||||||
require_once '../../../includes/modal_header.php';
|
<div class="modal-content">
|
||||||
|
|
||||||
ob_start();
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<div class="modal-header bg-dark">
|
<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">
|
||||||
@@ -21,6 +16,6 @@ ob_start();
|
|||||||
<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>
|
||||||
<?php
|
</div>
|
||||||
require_once '../../../includes/modal_footer.php';
|
</div>
|
||||||
|
|||||||
@@ -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 class="text-center">
|
<th>
|
||||||
<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'] ?? "Expense Disabled");
|
$vendor_name = nullable_htmlentities($row['vendor_name']);
|
||||||
$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,9 +94,7 @@ $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 class="text-center">
|
<td><?php echo $saved_payment_count; ?></td>
|
||||||
<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,20 +14,53 @@ 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']);
|
||||||
$account = intval($_POST['account']);
|
$enable_expense = intval($_POST['enable_expense'] ?? 0);
|
||||||
$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 = mysqli_query($mysqli, "SELECT 1 FROM payment_providers WHERE payment_provider_name = '$provider' LIMIT 1");
|
$sql = "SELECT 1 FROM payment_providers WHERE payment_provider_name = '$provider' LIMIT 1";
|
||||||
if (mysqli_num_rows($sql) > 0) {
|
$result = mysqli_query($mysqli, $sql);
|
||||||
|
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();
|
||||||
}
|
}
|
||||||
|
|
||||||
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");
|
// Check for Stripe Account, if not create it
|
||||||
|
$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);
|
||||||
|
|
||||||
@@ -48,13 +81,11 @@ 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']);
|
||||||
$account = intval($_POST['account']);
|
$enable_expense = intval($_POST['enable_expense'] ?? 0);
|
||||||
$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_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");
|
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");
|
||||||
|
|
||||||
logAction("Payment Provider", "Edit", "$session_name edited Payment Provider $provider");
|
logAction("Payment Provider", "Edit", "$session_name edited Payment Provider $provider");
|
||||||
|
|
||||||
|
|||||||
@@ -49,17 +49,3 @@ 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,16 +33,6 @@ $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>
|
||||||
@@ -117,16 +107,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td><?php echo $client_name; ?> (<?php echo $client_id; ?>)</td>
|
||||||
<?= $client_name ?>
|
<td><?php echo $provider_name; ?> (<?php echo $provider_id; ?>)</td>
|
||||||
<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,12 +57,11 @@ 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,16 +33,9 @@ $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 ajax-modal" href="#"
|
<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>
|
||||||
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="#"
|
<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>
|
||||||
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>
|
||||||
@@ -242,4 +235,5 @@ $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(preg_replace('/[^0-9]/', '', $_GET['merge_into_ticket_number']));
|
$merge_into_ticket_number = intval($_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(32);
|
$item_key = randomString(156);
|
||||||
|
|
||||||
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,23 +992,3 @@ 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,15 +469,11 @@ 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 ajax-modal" href="#"
|
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#bulkAssignNetworkModal">
|
||||||
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 ajax-modal" href="#"
|
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#bulkSetInterfaceTypeModal">
|
||||||
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>
|
||||||
@@ -601,6 +597,8 @@ 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,16 +200,14 @@ $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 ajax-modal" href="#"
|
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#importAssetModal">
|
||||||
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 ajax-modal" href="#"
|
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportAssetModal">
|
||||||
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 } ?>
|
||||||
@@ -791,4 +789,8 @@ $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";
|
||||||
|
|||||||
@@ -0,0 +1,72 @@
|
|||||||
|
<?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,8 +68,7 @@ $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 ajax-modal" href="#"\
|
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportCertificateModal">
|
||||||
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>
|
||||||
@@ -300,10 +299,15 @@ $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,13 +92,11 @@ $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 ajax-modal" href="#"
|
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#importClientModal">
|
||||||
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 ajax-modal" href="#"
|
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportClientModal">
|
||||||
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>
|
||||||
@@ -286,7 +284,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">
|
<div class="table-responsive-sm">
|
||||||
<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>
|
||||||
@@ -625,4 +623,6 @@ $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,9 +797,7 @@ 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 ajax-modal"
|
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#addTicketModal">
|
||||||
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,14 +98,12 @@ $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 ajax-modal" href="#"
|
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#importContactModal">
|
||||||
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 ajax-modal" href="#"
|
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportContactModal">
|
||||||
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>
|
||||||
@@ -568,4 +566,10 @@ $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,15 +112,13 @@ $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 ajax-modal" href="#"
|
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#importCredentialModal">
|
||||||
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 ajax-modal" href="#"
|
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportCredentialModal">
|
||||||
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 } ?>
|
||||||
@@ -530,10 +528,15 @@ $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=<?= $client_id ?>"><?= $client_name ?></a>
|
<a href="client_overview.php?client_id=<?php echo $client_id; ?>"><?php echo $client_name; ?></a>
|
||||||
</li>
|
</li>
|
||||||
<li class="breadcrumb-item">
|
<li class="breadcrumb-item">
|
||||||
<a href="files.php?client_id=<?= $client_id ?>">Files</a>
|
<a href="documents.php?client_id=<?php echo $client_id; ?>">Documents</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="files.php?client_id=<?php echo $client_id; ?>&folder_id=<?php echo $bread_crumb_folder_id; ?>">
|
<a href="documents.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,8 +202,7 @@ $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 ajax-modal"
|
<button type="button" class="btn btn-link btn-sm" data-toggle="modal" data-target="#linkFileToDocumentModal">
|
||||||
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>
|
||||||
@@ -225,9 +224,9 @@ $page_title = $row['document_name'];
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
<div class="ml-2">
|
<div class="ml-2">
|
||||||
<a href="files.php?client_id=<?= $client_id ?>&folder_id=<?= $folder_id ?>&q=<?= $file_name ?>" target="_blank"><?= $file_name ?></a>
|
<a href="files.php?client_id=<?php echo $client_id; ?>&folder_id=<?php echo $folder_id; ?>&q=<?php echo $file_name; ?>" target="_blank"><?php echo $file_name; ?></a>
|
||||||
<a class="confirm-link" href="post.php?unlink_file_from_document&file_id=<?= $file_id ?>&document_id=<?= $document_id ?>">
|
<a class="confirm-link" href="post.php?unlink_file_from_document&file_id=<?php echo $file_id; ?>&document_id=<?php echo $document_id; ?>">
|
||||||
<i class="fas fa-fw fa-unlink text-secondary float-right" title="Unlink File"></i>
|
<i class="fas fa-fw fa-trash-alt text-secondary float-right"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
@@ -235,8 +234,7 @@ $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 ajax-modal"
|
<button type="button" class="btn btn-link btn-sm" data-toggle="modal" data-target="#linkContactToDocumentModal">
|
||||||
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>
|
||||||
@@ -262,7 +260,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-unlink text-secondary" title="Unlink Contact"></i>
|
<i class="fas fa-fw fa-trash-alt text-secondary"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
@@ -270,7 +268,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 ajax-modal" data-modal-url="modals/document/document_link_asset.php?document_id=<?= $document_id ?>">
|
<button type="button" class="btn btn-link btn-sm" data-toggle="modal" data-target="#linkAssetToDocumentModal">
|
||||||
<i class="fas fa-fw fa-plus"></i>
|
<i class="fas fa-fw fa-plus"></i>
|
||||||
</button>
|
</button>
|
||||||
</h6>
|
</h6>
|
||||||
@@ -297,7 +295,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-unlink text-secondary" title="Unlink Asset"></i>
|
<i class="fas fa-fw fa-trash-alt text-secondary"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
@@ -305,8 +303,7 @@ $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 ajax-modal"
|
<button type="button" class="btn btn-link btn-sm" data-toggle="modal" data-target="#linkSoftwareToDocumentModal">
|
||||||
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>
|
||||||
@@ -329,7 +326,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-unlink text-secondary" title="Unlink License"></i>
|
<i class="fas fa-fw fa-trash-alt text-secondary"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
@@ -337,8 +334,7 @@ $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 ajax-modal"
|
<button type="button" class="btn btn-link btn-sm" data-toggle="modal" data-target="#linkVendorToDocumentModal">
|
||||||
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>
|
||||||
@@ -363,7 +359,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-unlink text-secondary" title="Unlink Vendor"></i>
|
<i class="fas fa-fw fa-trash-alt text-secondary"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
@@ -376,8 +372,7 @@ $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 class="ajax-modal" href="#"
|
<a href="#" data-toggle="modal" data-target="#editDocumentClientVisibileModal">
|
||||||
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>";
|
||||||
@@ -432,5 +427,11 @@ $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";
|
||||||
|
|||||||
479
agent/documents.php
Normal file
479
agent/documents.php
Normal file
@@ -0,0 +1,479 @@
|
|||||||
|
<?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";
|
||||||
@@ -80,8 +80,7 @@ $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 ajax-modal" href="#"
|
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportDomainModal">
|
||||||
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>
|
||||||
@@ -358,10 +357,16 @@ $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,8 +67,7 @@ $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 ajax-modal" href="#"
|
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportExpensesModal">
|
||||||
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>
|
||||||
@@ -287,7 +286,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="expense_ids[]" value="<?= $expense_id ?>">
|
<input class="form-check-input bulk-select" type="checkbox" name="selected_ids[]" value="<?= $expense_id ?>">
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@@ -358,4 +357,5 @@ $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,24 +368,22 @@ $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" data-toggle="dropdown">
|
<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>
|
||||||
<i class="fas fa-fw fa-plus mr-2"></i>New
|
<div class="dropdown-menu">
|
||||||
</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 ajax-modal" href="#"
|
<a class="dropdown-item text-dark" href="#" data-toggle="modal"
|
||||||
data-modal-url="modals/document/document_add_from_template.php?client_id=<?= $client_id ?>&folder_id=<?= $get_folder_id ?>">
|
data-target="#addDocumentFromTemplateModal">
|
||||||
<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>
|
||||||
@@ -449,15 +447,24 @@ $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 ?>¤t_folder_id=<?= $get_folder_id ?>"
|
data-modal-url="modals/file/file_bulk_move.php?client_id=<?= $client_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,8 +277,7 @@ 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 ajax-modal" href="#"
|
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#addInvoiceRecurringModal<?php echo $invoice_id; ?>">
|
||||||
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>
|
||||||
@@ -726,6 +725,7 @@ 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,14 +162,10 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<h3 class="card-title mt-2"><i class="fa fa-fw fa-file-invoice mr-2"></i>Invoices</h3>
|
<h3 class="card-title mt-2"><i class="fa fa-fw fa-file-invoice mr-2"></i>Invoices</h3>
|
||||||
<div class="card-tools">
|
<div class="card-tools">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<button type="button" class="btn btn-primary ajax-modal"
|
<button type="button" class="btn btn-primary ajax-modal" data-modal-url="modals/invoice/invoice_add.php?<?= $client_url ?>"><i class="fas fa-plus mr-2"></i>New Invoice</button>
|
||||||
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 ajax-modal" href="#"
|
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportInvoicesModal">
|
||||||
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>
|
||||||
@@ -457,4 +453,5 @@ $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,14 +84,12 @@ $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 ajax-modal" href="#"
|
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#importLocationModal">
|
||||||
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 ajax-modal" href="#"
|
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportLocationModal">
|
||||||
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 } ?>
|
||||||
@@ -405,4 +403,7 @@ $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';
|
||||||
|
|
||||||
$asset_ids = array_map('intval', $_GET['asset_ids'] ?? []);
|
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($asset_ids);
|
$count = count($selected_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 ($asset_ids as $asset_id) { ?><input type="hidden" name="asset_ids[]" value="<?= $asset_id ?>"><?php } ?>
|
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="asset_ids[]" value="<?= $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']);
|
||||||
$asset_ids = array_map('intval', $_GET['asset_ids'] ?? []);
|
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($asset_ids);
|
$count = count($selected_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 ($asset_ids as $asset_id) { ?><input type="hidden" name="asset_ids[]" value="<?= $asset_id ?>"><?php } ?>
|
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="asset_ids[]" value="<?= $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']);
|
||||||
$asset_ids = array_map('intval', $_GET['asset_ids'] ?? []);
|
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($asset_ids);
|
$count = count($selected_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 ($asset_ids as $asset_id) { ?><input type="hidden" name="asset_ids[]" value="<?= $asset_id ?>"><?php } ?>
|
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="asset_ids[]" value="<?= $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';
|
||||||
|
|
||||||
$asset_ids = array_map('intval', $_GET['asset_ids'] ?? []);
|
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($asset_ids);
|
$count = count($selected_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 ($asset_ids as $asset_id) { ?><input type="hidden" name="asset_ids[]" value="<?= $asset_id ?>"><?php } ?>
|
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="asset_ids[]" value="<?= $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';
|
||||||
|
|
||||||
$asset_ids = array_map('intval', $_GET['asset_ids'] ?? []);
|
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($asset_ids);
|
$count = count($selected_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 ($asset_ids as $asset_id) { ?><input type="hidden" name="asset_ids[]" value="<?= $asset_id ?>"><?php } ?>
|
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="asset_ids[]" value="<?= $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';
|
||||||
|
|
||||||
$asset_ids = array_map('intval', $_GET['asset_ids'] ?? []);
|
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($asset_ids);
|
$count = count($selected_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 ($asset_ids as $asset_id) { ?><input type="hidden" name="asset_ids[]" value="<?= $asset_id ?>"><?php } ?>
|
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="asset_ids[]" value="<?= $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';
|
||||||
|
|
||||||
$asset_ids = array_map('intval', $_GET['asset_ids'] ?? []);
|
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
||||||
$count = count($asset_ids);
|
$count = count($selected_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 ($asset_ids as $asset_id) { ?><input type="hidden" name="asset_ids[]" value="<?= $asset_id ?>"><?php } ?>
|
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="asset_ids[]" value="<?= $id ?>"><?php } ?>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,6 @@
|
|||||||
<?php
|
<div class="modal" id="exportAssetModal" tabindex="-1">
|
||||||
|
<div class="modal-dialog">
|
||||||
require_once '../../../includes/modal_header.php';
|
<div class="modal-content">
|
||||||
|
|
||||||
$client_id = intval($_GET['client_id'] ?? 0);
|
|
||||||
|
|
||||||
ob_start();
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<div class="modal-header bg-dark">
|
<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">
|
||||||
@@ -15,8 +8,10 @@ ob_start();
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?php echo $_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">
|
||||||
|
|
||||||
@@ -26,6 +21,6 @@ ob_start();
|
|||||||
<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>
|
||||||
<?php
|
</div>
|
||||||
require_once '../../../includes/modal_footer.php';
|
</div>
|
||||||
|
|||||||
@@ -1,13 +1,6 @@
|
|||||||
<?php
|
<div class="modal" id="importAssetModal" tabindex="-1">
|
||||||
|
<div class="modal-dialog">
|
||||||
require_once '../../../includes/modal_header.php';
|
<div class="modal-content">
|
||||||
|
|
||||||
$client_id = intval($_GET['client_id'] ?? 0);
|
|
||||||
|
|
||||||
ob_start();
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<div class="modal-header bg-dark">
|
<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">
|
||||||
@@ -15,9 +8,11 @@ ob_start();
|
|||||||
</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="<?= $_SESSION['csrf_token'] ?>">
|
<input type="hidden" name="csrf_token" value="<?php echo $_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>
|
||||||
@@ -32,6 +27,6 @@ ob_start();
|
|||||||
<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>
|
||||||
<?php
|
</div>
|
||||||
require_once '../../../includes/modal_footer.php';
|
</div>
|
||||||
|
|||||||
@@ -1,19 +1,6 @@
|
|||||||
<?php
|
<div class="modal" id="bulkAssignNetworkModal" tabindex="-1">
|
||||||
|
<div class="modal-dialog">
|
||||||
require_once '../../../includes/modal_header.php';
|
<div class="modal-content">
|
||||||
|
|
||||||
$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">
|
||||||
@@ -59,7 +46,6 @@ ob_start();
|
|||||||
<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>
|
||||||
</form>
|
</div>
|
||||||
|
</div>
|
||||||
<?php
|
</div>
|
||||||
require_once '../../../includes/modal_footer.php';
|
|
||||||
@@ -1,20 +1,6 @@
|
|||||||
<?php
|
<div class="modal" id="bulkSetInterfaceTypeModal" tabindex="-1">
|
||||||
|
<div class="modal-dialog">
|
||||||
require_once '../../../includes/modal_header.php';
|
<div class="modal-content">
|
||||||
|
|
||||||
$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">
|
||||||
@@ -45,7 +31,6 @@ ob_start();
|
|||||||
<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>
|
||||||
</form>
|
</div>
|
||||||
|
</div>
|
||||||
<?php
|
</div>
|
||||||
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, document_name
|
SELECT documents.document_id, documents.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 document_client_id = $client_id
|
WHERE documents.document_client_id = $client_id
|
||||||
AND document_archived_at IS NULL
|
AND documents.document_archived_at IS NULL
|
||||||
AND asset_documents.asset_id IS NULL
|
AND asset_documents.asset_id IS NULL
|
||||||
ORDER BY document_name ASC
|
ORDER BY documents.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,3 +67,4 @@ ob_start();
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
require_once '../../../includes/modal_footer.php';
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
?>
|
||||||
|
|||||||
@@ -70,3 +70,4 @@ ob_start();
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
require_once '../../../includes/modal_footer.php';
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
?>
|
||||||
|
|||||||
@@ -1,13 +1,6 @@
|
|||||||
<?php
|
<div class="modal" id="exportCertificateModal" tabindex="-1">
|
||||||
|
<div class="modal-dialog">
|
||||||
require_once '../../../includes/modal_header.php';
|
<div class="modal-content">
|
||||||
|
|
||||||
$client_id = intval($_GET['client_id'] ?? 0);
|
|
||||||
|
|
||||||
ob_start();
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<div class="modal-header bg-dark">
|
<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">
|
||||||
@@ -15,7 +8,9 @@ ob_start();
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="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">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -24,6 +19,6 @@ ob_start();
|
|||||||
<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>
|
||||||
<?php
|
</div>
|
||||||
require_once '../../../includes/modal_footer.php';
|
</div>
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$client_ids = array_map('intval', $_GET['client_ids'] ?? []);
|
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($client_ids);
|
$count = count($selected_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 ($client_ids as $client_id) { ?><input type="hidden" name="client_ids[]" value="<?= $client_id ?>"><?php } ?>
|
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="client_ids[]" value="<?= $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';
|
||||||
|
|
||||||
$client_ids = array_map('intval', $_GET['client_ids'] ?? []);
|
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($client_ids);
|
$count = count($selected_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 ($client_ids as $client_id) { ?><input type="hidden" name="client_ids[]" value="<?= $client_id ?>"><?php } ?>
|
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="client_ids[]" value="<?= $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';
|
||||||
|
|
||||||
$client_ids = array_map('intval', $_GET['client_ids'] ?? []);
|
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($client_ids);
|
$count = count($selected_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 ($client_ids as $client_id) { ?><input type="hidden" name="client_ids[]" value="<?= $client_id ?>"><?php } ?>
|
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="client_ids[]" value="<?= $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';
|
||||||
|
|
||||||
$client_ids = array_map('intval', $_GET['client_ids'] ?? []);
|
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($client_ids);
|
$count = count($selected_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 ($client_ids as $client_id) { ?><input type="hidden" name="client_ids[]" value="<?= $client_id ?>"><?php } ?>
|
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="client_ids[]" value="<?= $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';
|
||||||
|
|
||||||
$client_ids = array_map('intval', $_GET['client_ids'] ?? []);
|
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($client_ids);
|
$count = count($selected_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 ($client_ids as $client_id) { ?><input type="hidden" name="client_ids[]" value="<?= $client_id ?>"><?php } ?>
|
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="client_ids[]" value="<?= $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';
|
||||||
|
|
||||||
$client_ids = array_map('intval', $_GET['client_ids'] ?? []);
|
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($client_ids);
|
$count = count($selected_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 ($client_ids as $client_id) { ?><input type="hidden" name="client_ids[]" value="<?= $client_id ?>"><?php } ?>
|
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="client_ids[]" value="<?= $id ?>"><?php } ?>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,6 @@
|
|||||||
<?php
|
<div class="modal" id="exportClientModal" tabindex="-1">
|
||||||
|
<div class="modal-dialog">
|
||||||
require_once '../../../includes/modal_header.php';
|
<div class="modal-content">
|
||||||
|
|
||||||
ob_start();
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<div class="modal-header bg-dark">
|
<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">
|
||||||
@@ -20,6 +15,6 @@ ob_start();
|
|||||||
<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>
|
||||||
<?php
|
</div>
|
||||||
require_once '../../../includes/modal_footer.php';
|
</div>
|
||||||
|
|||||||
@@ -1,10 +1,6 @@
|
|||||||
<?php
|
<div class="modal" id="importClientModal" tabindex="-1">
|
||||||
|
<div class="modal-dialog">
|
||||||
require_once '../../../includes/modal_header.php';
|
<div class="modal-content">
|
||||||
|
|
||||||
ob_start();
|
|
||||||
|
|
||||||
?>
|
|
||||||
<div class="modal-header bg-dark">
|
<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">
|
||||||
@@ -27,6 +23,6 @@ ob_start();
|
|||||||
<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>
|
||||||
|
|||||||
@@ -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']);
|
||||||
$contact_ids = array_map('intval', $_GET['contact_ids'] ?? []);
|
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($contact_ids);
|
$count = count($selected_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 ($contact_ids as $contact_id) { ?><input type="hidden" name="contact_ids[]" value="<?= $contact_id ?>"><?php } ?>
|
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="contact_ids[]" value="<?= $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';
|
||||||
|
|
||||||
$contact_ids = array_map('intval', $_GET['contact_ids'] ?? []);
|
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($contact_ids);
|
$count = count($selected_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 ($contact_ids as $contact_id) { ?><input type="hidden" name="contact_ids[]" value="<?= $contact_id ?>"><?php } ?>
|
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="contact_ids[]" value="<?= $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';
|
||||||
|
|
||||||
$contact_ids = array_map('intval', $_GET['contact_ids'] ?? []);
|
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($contact_ids);
|
$count = count($selected_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 ($contact_ids as $contact_id) { ?><input type="hidden" name="contact_ids[]" value="<?= $contact_id ?>"><?php } ?>
|
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="contact_ids[]" value="<?= $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';
|
||||||
|
|
||||||
$contact_ids = array_map('intval', $_GET['contact_ids'] ?? []);
|
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($contact_ids);
|
$count = count($selected_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 ($contact_ids as $contact_id) { ?><input type="hidden" name="contact_ids[]" value="<?= $contact_id ?>"><?php } ?>
|
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="contact_ids[]" value="<?= $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';
|
||||||
|
|
||||||
$contact_ids = array_map('intval', $_GET['contact_ids'] ?? []);
|
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($contact_ids);
|
$count = count($selected_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 ($contact_ids as $contact_id) { ?><input type="hidden" name="contact_ids[]" value="<?= $contact_id ?>"><?php } ?>
|
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="contact_ids[]" value="<?= $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';
|
||||||
|
|
||||||
$contact_ids = array_map('intval', $_GET['contact_ids'] ?? []);
|
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($contact_ids);
|
$count = count($selected_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 ($contact_ids as $contact_id) { ?><input type="hidden" name="contact_ids[]" value="<?= $contact_id ?>"><?php } ?>
|
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="contact_ids[]" value="<?= $id ?>"><?php } ?>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<label>From Email / Display Name</label>
|
<label>From Email / Display Name</label>
|
||||||
|
|||||||
@@ -1,13 +1,6 @@
|
|||||||
<?php
|
<div class="modal" id="exportContactModal" tabindex="-1">
|
||||||
|
<div class="modal-dialog">
|
||||||
require_once '../../../includes/modal_header.php';
|
<div class="modal-content">
|
||||||
|
|
||||||
$client_id = intval($_GET['client_id'] ?? 0);
|
|
||||||
|
|
||||||
ob_start();
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<div class="modal-header bg-dark">
|
<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">
|
||||||
@@ -15,8 +8,9 @@ ob_start();
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="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">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -25,6 +19,6 @@ ob_start();
|
|||||||
<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>
|
||||||
<?php
|
</div>
|
||||||
require_once '../../../includes/modal_footer.php';
|
</div>
|
||||||
|
|||||||
@@ -1,13 +1,6 @@
|
|||||||
<?php
|
<div class="modal" id="importContactModal" tabindex="-1">
|
||||||
|
<div class="modal-dialog">
|
||||||
require_once '../../../includes/modal_header.php';
|
<div class="modal-content">
|
||||||
|
|
||||||
$client_id = intval($_GET['client_id'] ?? 0);
|
|
||||||
|
|
||||||
ob_start();
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<div class="modal-header bg-dark">
|
<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">
|
||||||
@@ -15,7 +8,9 @@ ob_start();
|
|||||||
</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="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, 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>
|
||||||
@@ -30,6 +25,6 @@ ob_start();
|
|||||||
<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>
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$credential_ids = array_map('intval', $_GET['credential_ids'] ?? []);
|
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($credential_ids);
|
$count = count($selected_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 ($credential_ids as $credential_id) { ?><input type="hidden" name="credential_ids[]" value="<?= $credential_id ?>"><?php } ?>
|
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="credential_ids[]" value="<?= $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,13 +1,6 @@
|
|||||||
<?php
|
<div class="modal" id="exportCredentialModal" tabindex="-1">
|
||||||
|
<div class="modal-dialog">
|
||||||
require_once '../../../includes/modal_header.php';
|
<div class="modal-content">
|
||||||
|
|
||||||
$client_id = intval($_GET['client_id'] ?? 0);
|
|
||||||
|
|
||||||
ob_start();
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<div class="modal-header bg-dark">
|
<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">
|
||||||
@@ -15,8 +8,9 @@ ob_start();
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="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">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -25,6 +19,6 @@ ob_start();
|
|||||||
<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>
|
||||||
<?php
|
</div>
|
||||||
require_once '../../../includes/modal_footer.php';
|
</div>
|
||||||
|
|||||||
@@ -1,13 +1,6 @@
|
|||||||
<?php
|
<div class="modal" id="importCredentialModal" tabindex="-1">
|
||||||
|
<div class="modal-dialog">
|
||||||
require_once '../../../includes/modal_header.php';
|
<div class="modal-content">
|
||||||
|
|
||||||
$client_id = intval($_GET['client_id'] ?? 0);
|
|
||||||
|
|
||||||
ob_start();
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<div class="modal-header bg-dark">
|
<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">
|
||||||
@@ -15,7 +8,9 @@ ob_start();
|
|||||||
</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="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, Username, Password, TOTP, URI</p>
|
<p><strong>Format csv file with headings & data:</strong><br>Name, Description, Username, Password, TOTP, URI</p>
|
||||||
<hr>
|
<hr>
|
||||||
@@ -30,6 +25,6 @@ ob_start();
|
|||||||
<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,16 +1,6 @@
|
|||||||
<?php
|
<div class="modal" id="addDocumentFromTemplateModal" tabindex="-1">
|
||||||
|
<div class="modal-dialog">
|
||||||
require_once '../../../includes/modal_header.php';
|
<div class="modal-content">
|
||||||
|
|
||||||
$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">
|
<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">
|
||||||
@@ -34,11 +24,13 @@ ob_start();
|
|||||||
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>
|
||||||
@@ -72,15 +64,17 @@ ob_start();
|
|||||||
<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_client_id = $client_id ORDER BY folder_name ASC");
|
$sql_folders = mysqli_query($mysqli, "SELECT * FROM folders WHERE folder_location = $folder_location AND 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>
|
||||||
@@ -88,10 +82,12 @@ ob_start();
|
|||||||
</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>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
||||||
<?php
|
</div>
|
||||||
require_once '../../../includes/modal_footer.php';
|
</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_client_id = $client_id ORDER BY folder_name ASC");
|
$sql_folders_select = mysqli_query($mysqli, "SELECT * FROM folders WHERE folder_location = 0 AND 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,26 +1,10 @@
|
|||||||
<?php
|
<div class="modal" id="editDocumentClientVisibileModal" tabindex="-1">
|
||||||
|
<div class="modal-dialog">
|
||||||
require_once '../../../includes/modal_header.php';
|
<div class="modal-content">
|
||||||
|
|
||||||
$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">
|
<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><?= $document_name ?></strong>
|
Edit Visibility Status for <strong><?php echo "$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>
|
||||||
@@ -28,7 +12,7 @@ ob_start();
|
|||||||
</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="<?= $document_id ?>">
|
<input type="hidden" name="document_id" value="<?php echo $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>
|
||||||
@@ -47,11 +31,12 @@ ob_start();
|
|||||||
</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 changes</button>
|
<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="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>
|
||||||
|
|
||||||
<?php
|
</div>
|
||||||
require_once '../../../includes/modal_footer.php';
|
</div>
|
||||||
|
</div>
|
||||||
|
|||||||
@@ -1,29 +1,14 @@
|
|||||||
<?php
|
<div class="modal" id="linkAssetToDocumentModal" tabindex="-1">
|
||||||
|
<div class="modal-dialog">
|
||||||
require_once '../../../includes/modal_header.php';
|
<div class="modal-content">
|
||||||
|
|
||||||
$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">
|
<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>
|
<h5 class="modal-title"><i class="fa fa-fw fa-desktop mr-2"></i>Link Asset to <strong><?php echo $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="<?= $document_id ?>">
|
<input type="hidden" name="document_id" value="<?php echo $document_id; ?>">
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -34,23 +19,26 @@ ob_start();
|
|||||||
<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
|
||||||
$sql_assets_select = mysqli_query($mysqli, "
|
// Check if there are any associated vendors
|
||||||
SELECT assets.asset_id, asset_name
|
if (!empty($linked_assets)) {
|
||||||
FROM assets
|
$excluded_asset_ids = implode(",", $linked_assets);
|
||||||
LEFT JOIN asset_documents
|
$exclude_condition = "AND asset_id NOT IN ($excluded_asset_ids)";
|
||||||
ON assets.asset_id = asset_documents.asset_id
|
} else {
|
||||||
AND asset_documents.document_id = $document_id
|
$exclude_condition = ""; // No condition if there are no displayed vendors
|
||||||
|
}
|
||||||
|
|
||||||
|
$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
|
||||||
AND asset_documents.asset_id IS NULL
|
$exclude_condition
|
||||||
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="<?= $asset_id ?>"><?= $asset_name ?></option>
|
<option value="<?php echo $asset_id ?>"><?php echo $asset_name; ?></option>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@@ -64,6 +52,6 @@ ob_start();
|
|||||||
<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,30 +1,14 @@
|
|||||||
<?php
|
<div class="modal" id="linkContactToDocumentModal" tabindex="-1">
|
||||||
|
<div class="modal-dialog">
|
||||||
require_once '../../../includes/modal_header.php';
|
<div class="modal-content">
|
||||||
|
|
||||||
$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">
|
<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>
|
<h5 class="modal-title"><i class="fa fa-fw fa-user mr-2"></i>Link Contact to <strong><?php echo $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="<?= $document_id ?>">
|
<input type="hidden" name="document_id" value="<?php echo $document_id; ?>">
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -35,23 +19,26 @@ ob_start();
|
|||||||
<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
|
||||||
$sql_contacts_select = mysqli_query($mysqli, "
|
// Check if there are any associated vendors
|
||||||
SELECT contacts.contact_id, contact_name
|
if (!empty($linked_contacts)) {
|
||||||
FROM contacts
|
$excluded_contact_ids = implode(",", $linked_contacts);
|
||||||
LEFT JOIN contact_documents
|
$exclude_condition = "AND contact_id NOT IN ($excluded_contact_ids)";
|
||||||
ON contacts.contact_id = contact_documents.contact_id
|
} else {
|
||||||
AND contact_documents.document_id = $document_id
|
$exclude_condition = ""; // No condition if there are no displayed vendors
|
||||||
|
}
|
||||||
|
|
||||||
|
$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
|
||||||
AND contact_documents.contact_id IS NULL
|
$exclude_condition
|
||||||
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="<?= $contact_id ?>"><?= $contact_name ?></option>
|
<option value="<?php echo $contact_id ?>"><?php echo $contact_name; ?></option>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@@ -61,10 +48,10 @@ ob_start();
|
|||||||
</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 Contact</button>
|
<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="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,30 +1,14 @@
|
|||||||
<?php
|
<div class="modal" id="linkFileToDocumentModal" tabindex="-1">
|
||||||
|
<div class="modal-dialog">
|
||||||
require_once '../../../includes/modal_header.php';
|
<div class="modal-content">
|
||||||
|
|
||||||
$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">
|
<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>
|
<h5 class="modal-title"><i class="fa fa-fw fa-paperclip mr-2"></i>Link File to <strong><?php echo $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="<?= $document_id ?>">
|
<input type="hidden" name="document_id" value="<?php echo $document_id; ?>">
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -35,19 +19,9 @@ ob_start();
|
|||||||
<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, "
|
$sql_files_select = mysqli_query($mysqli, "SELECT * FROM files
|
||||||
SELECT files.file_id, file_name, folder_name
|
LEFT JOIN folders ON folder_id = file_folder_id
|
||||||
FROM files
|
WHERE file_client_id = $client_id ORDER BY folder_name ASC, file_name ASC");
|
||||||
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']);
|
||||||
@@ -64,10 +38,10 @@ ob_start();
|
|||||||
</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 File</button>
|
<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="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,30 +1,14 @@
|
|||||||
<?php
|
<div class="modal" id="linkSoftwareToDocumentModal" tabindex="-1">
|
||||||
|
<div class="modal-dialog">
|
||||||
require_once '../../../includes/modal_header.php';
|
<div class="modal-content">
|
||||||
|
|
||||||
$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">
|
<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>
|
<h5 class="modal-title"><i class="fa fa-fw fa-user mr-2"></i>Link Software to <strong><?php echo $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="<?= $document_id ?>">
|
<input type="hidden" name="document_id" value="<?php echo $document_id; ?>">
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -35,24 +19,26 @@ ob_start();
|
|||||||
<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
|
||||||
$sql_software_select = mysqli_query($mysqli, "
|
// Check if there are any associated vendors
|
||||||
SELECT software.software_id, software_name
|
if (!empty($linked_software)) {
|
||||||
FROM software
|
$excluded_software_ids = implode(",", $linked_software);
|
||||||
LEFT JOIN software_documents
|
$exclude_condition = "AND software_id NOT IN ($excluded_software_ids)";
|
||||||
ON software.software_id = software_documents.software_id
|
} else {
|
||||||
AND software_documents.document_id = $document_id
|
$exclude_condition = ""; // No condition if there are no displayed vendors
|
||||||
|
}
|
||||||
|
|
||||||
|
$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
|
||||||
AND software_documents.software_id IS NULL
|
$exclude_condition
|
||||||
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="<?= $software_id ?>"><?= $software_name ?></option>
|
<option value="<?php echo $software_id ?>"><?php echo $software_name; ?></option>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@@ -62,10 +48,10 @@ ob_start();
|
|||||||
</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 License</button>
|
<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="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,30 +1,14 @@
|
|||||||
<?php
|
<div class="modal" id="linkVendorToDocumentModal" tabindex="-1">
|
||||||
|
<div class="modal-dialog">
|
||||||
require_once '../../../includes/modal_header.php';
|
<div class="modal-content">
|
||||||
|
|
||||||
$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">
|
<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>
|
<h5 class="modal-title"><i class="fa fa-fw fa-building mr-2"></i>Link Vendor to <strong><?php echo $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="<?= $document_id ?>">
|
<input type="hidden" name="document_id" value="<?php echo $document_id; ?>">
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -35,23 +19,26 @@ ob_start();
|
|||||||
<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
|
||||||
$sql_vendors_select = mysqli_query($mysqli, "
|
// Check if there are any associated vendors
|
||||||
SELECT vendors.vendor_id, vendor_name
|
if (!empty($associated_vendors)) {
|
||||||
FROM vendors
|
$excluded_vendor_ids = implode(",", $associated_vendors);
|
||||||
LEFT JOIN vendor_documents
|
$exclude_condition = "AND vendor_id NOT IN ($excluded_vendor_ids)";
|
||||||
ON vendors.vendor_id = vendor_documents.vendor_id
|
} else {
|
||||||
AND vendor_documents.document_id = $document_id
|
$exclude_condition = ""; // No condition if there are no displayed vendors
|
||||||
|
}
|
||||||
|
|
||||||
|
$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
|
||||||
AND vendor_documents.vendor_id IS NULL
|
$exclude_condition
|
||||||
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="<?= $vendor_id ?>"><?= $vendor_name ?></option>
|
<option value="<?php echo $vendor_id ?>"><?php echo $vendor_name; ?></option>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@@ -61,10 +48,10 @@ ob_start();
|
|||||||
</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 Vendor</button>
|
<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="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,13 +1,6 @@
|
|||||||
<?php
|
<div class="modal" id="exportDomainModal" tabindex="-1">
|
||||||
|
<div class="modal-dialog">
|
||||||
require_once '../../../includes/modal_header.php';
|
<div class="modal-content">
|
||||||
|
|
||||||
$client_id = intval($_GET['client_id'] ?? 0);
|
|
||||||
|
|
||||||
ob_start();
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<div class="modal-header bg-dark">
|
<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">
|
||||||
@@ -15,7 +8,9 @@ ob_start();
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="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">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -24,6 +19,6 @@ ob_start();
|
|||||||
<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>
|
||||||
<?php
|
</div>
|
||||||
require_once '../../../includes/modal_footer.php';
|
</div>
|
||||||
|
|||||||
@@ -152,6 +152,8 @@ 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';
|
||||||
|
|
||||||
$expense_ids = array_map('intval', $_GET['expense_ids'] ?? []);
|
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($expense_ids);
|
$count = count($selected_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 ($expense_ids as $expense_id) { ?> <input type="hidden" name="expense_ids[]" value="<?= $expense_id ?>"><?php } ?>
|
<?php foreach ($selected_ids as $id) { ?> <input type="hidden" name="expense_ids[]" value="<?= $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';
|
||||||
|
|
||||||
$expense_ids = array_map('intval', $_GET['expense_ids'] ?? []);
|
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($expense_ids);
|
$count = count($selected_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 ($expense_ids as $expense_id) { ?> <input type="hidden" name="expense_ids[]" value="<?= $expense_id ?>"><?php } ?>
|
<?php foreach ($selected_ids as $id) { ?> <input type="hidden" name="expense_ids[]" value="<?= $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';
|
||||||
|
|
||||||
$expense_ids = array_map('intval', $_GET['expense_ids'] ?? []);
|
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($expense_ids);
|
$count = count($selected_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 ($expense_ids as $expense_id) { ?>
|
foreach ($selected_ids as $id) { ?>
|
||||||
<input type="hidden" name="expense_ids[]" value="<?= $expense_id ?>">
|
<input type="hidden" name="expense_ids[]" value="<?= $id ?>">
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$expense_ids = array_map('intval', $_GET['expense_ids'] ?? []);
|
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($expense_ids);
|
$count = count($selected_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 ($expense_ids as $expense_id) { ?> <input type="hidden" name="expense_ids[]" value="<?= $expense_id ?>"><?php } ?>
|
<?php foreach ($selected_ids as $id) { ?> <input type="hidden" name="expense_ids[]" value="<?= $id ?>"><?php } ?>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,6 @@
|
|||||||
<?php
|
<div class="modal" id="exportExpensesModal" tabindex="-1">
|
||||||
|
<div class="modal-dialog">
|
||||||
require_once '../../../includes/modal_header.php';
|
<div class="modal-content">
|
||||||
|
|
||||||
ob_start();
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<div class="modal-header bg-dark">
|
<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">
|
||||||
@@ -31,7 +26,7 @@ ob_start();
|
|||||||
$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="<?= $account_id ?>"><?= $account_name ?></option>
|
<option <?php if ($account_filter == $account_id) { echo "selected"; } ?> value="<?php echo $account_id; ?>"><?php echo $account_name; ?></option>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@@ -55,7 +50,7 @@ ob_start();
|
|||||||
$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="<?= $vendor_id ?>"><?= $vendor_name ?></option>
|
<option <?php if ($vendor_filter == $vendor_id) { echo "selected"; } ?> value="<?php echo $vendor_id; ?>"><?php echo $vendor_name; ?></option>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@@ -79,7 +74,7 @@ ob_start();
|
|||||||
$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="<?= $category_id ?>"><?= $category_name ?></option>
|
<option <?php if ($category_filter == $category_id) { echo "selected"; } ?> value="<?php echo $category_id; ?>"><?php echo $category_name; ?></option>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@@ -94,7 +89,7 @@ ob_start();
|
|||||||
<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">
|
<input type="date" class="form-control" name="date_from" max="2999-12-31" value="<?php echo nullable_htmlentities($dtf); ?>">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -104,7 +99,7 @@ ob_start();
|
|||||||
<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">
|
<input type="date" class="form-control" name="date_to" max="2999-12-31" value="<?php echo nullable_htmlentities($dtt); ?>">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -114,6 +109,6 @@ ob_start();
|
|||||||
<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>
|
||||||
|
|||||||
@@ -2,26 +2,17 @@
|
|||||||
|
|
||||||
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']);
|
||||||
$current_folder_id = intval($_GET['current_folder_id'] ?? 0);
|
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
||||||
|
|
||||||
// Selected IDs from JS (may be empty arrays)
|
$count = count($selected_ids);
|
||||||
$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">
|
<h5 class="modal-title"><i class="fa fa-fw fa-exchange-alt mr-2"></i>Move <strong><?= $count ?></strong> Files</h5>
|
||||||
<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>
|
||||||
@@ -29,22 +20,10 @@ 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">
|
||||||
@@ -54,47 +33,40 @@ 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
|
||||||
// NOTE: folder_location is gone now, so just use folder_client_id
|
// Fetch all folders for the client
|
||||||
$sql_all_folders = mysqli_query(
|
$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");
|
||||||
$mysqli,
|
$folders = array();
|
||||||
"SELECT folder_id, folder_name, parent_folder
|
|
||||||
FROM folders
|
|
||||||
WHERE folder_client_id = $client_id
|
|
||||||
ORDER BY folder_name ASC"
|
|
||||||
);
|
|
||||||
|
|
||||||
$folders = [];
|
|
||||||
|
|
||||||
|
// Build an associative array of folders indexed by folder_id
|
||||||
while ($row = mysqli_fetch_assoc($sql_all_folders)) {
|
while ($row = mysqli_fetch_assoc($sql_all_folders)) {
|
||||||
$folders[$row['folder_id']] = [
|
$folders[$row['folder_id']] = array(
|
||||||
'folder_id' => (int)$row['folder_id'],
|
'folder_id' => intval($row['folder_id']),
|
||||||
'folder_name' => nullable_htmlentities($row['folder_name']),
|
'folder_name' => nullable_htmlentities($row['folder_name']),
|
||||||
'parent_folder'=> (int)$row['parent_folder'],
|
'parent_folder' => intval($row['parent_folder']),
|
||||||
'children' => []
|
'children' => array()
|
||||||
];
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Build hierarchy
|
// Build the folder 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);
|
unset($folder); // Break the reference
|
||||||
|
|
||||||
$root_folders = [];
|
// Prepare a list of 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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Optional: if you want to default-select current folder, pass it in GET
|
// Display the folder options iteratively
|
||||||
$current_folder_id = intval($_GET['current_folder_id'] ?? 0);
|
$stack = array();
|
||||||
|
|
||||||
$stack = [];
|
|
||||||
foreach (array_reverse($root_folders) as $folder) {
|
foreach (array_reverse($root_folders) as $folder) {
|
||||||
$stack[] = ['folder' => $folder, 'level' => 0];
|
$stack[] = array('folder' => $folder, 'level' => 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
while (!empty($stack)) {
|
while (!empty($stack)) {
|
||||||
@@ -102,15 +74,21 @@ 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);
|
||||||
|
|
||||||
$selected = ($folder['folder_id'] === $current_folder_id) ? 'selected' : '';
|
// Check if this folder is 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) {
|
foreach (array_reverse($folder['children']) as $child_folder) {
|
||||||
$stack[] = ['folder' => $child, 'level' => $level + 1];
|
$stack[] = array('folder' => $child_folder, 'level' => $level + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -120,14 +98,9 @@ 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">
|
<button type="submit" name="bulk_move_files" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Move Files</button>
|
||||||
<i class="fa fa-check mr-2"></i>Move Files
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||||
</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,6 +3,7 @@
|
|||||||
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') ?? '/');
|
||||||
|
|
||||||
@@ -17,6 +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="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';
|
||||||
|
|
||||||
$invoice_ids = array_map('intval', $_GET['invoice_ids'] ?? []);
|
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($invoice_ids);
|
$count = count($selected_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 ($invoice_ids as $invoice_id) { ?><input type="hidden" name="invoice_ids[]" value="<?= $invoice_id ?>"><?php } ?>
|
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="invoice_ids[]" value="<?= $id ?>"><?php } ?>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,6 @@
|
|||||||
<?php
|
<div class="modal" id="exportInvoicesModal" tabindex="-1">
|
||||||
|
<div class="modal-dialog">
|
||||||
require_once '../../../includes/modal_header.php';
|
<div class="modal-content">
|
||||||
|
|
||||||
$client_id = intval($_GET['client_id'] ?? 0);
|
|
||||||
|
|
||||||
ob_start();
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<div class="modal-header bg-dark">
|
<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">
|
||||||
@@ -15,7 +8,9 @@ ob_start();
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
<?php if (isset($_GET['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">
|
||||||
@@ -24,7 +19,7 @@ ob_start();
|
|||||||
<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">
|
<input type="date" class="form-control" name="date_from" max="2999-12-31" value="<?php echo nullable_htmlentities($dtf); ?>">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -34,7 +29,7 @@ ob_start();
|
|||||||
<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">
|
<input type="date" class="form-control" name="date_to" max="2999-12-31" value="<?php echo nullable_htmlentities($dtt); ?>">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -44,6 +39,6 @@ ob_start();
|
|||||||
<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,27 +1,16 @@
|
|||||||
<?php
|
<div class="modal" id="addInvoiceRecurringModal<?php echo $invoice_id; ?>" tabindex="-1">
|
||||||
|
<div class="modal-dialog">
|
||||||
require_once '../../../includes/modal_header.php';
|
<div class="modal-content">
|
||||||
|
<div class="modal-header text-white">
|
||||||
$invoice_id = intval($_GET['invoice_id']);
|
<h5 class="modal-title"><i class="fas fa-fw fa-copy mr-2"></i>Make <?php echo "$invoice_prefix$invoice_number"; ?> Recurring</h5>
|
||||||
|
|
||||||
$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">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span aria-hidden="true">×</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="invoice_id" value="<?= $invoice_id ?>">
|
<input type="hidden" name="invoice_id" value="<?php echo $invoice_id; ?>">
|
||||||
<div class="modal-body">
|
<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">
|
||||||
@@ -35,12 +24,13 @@ ob_start();
|
|||||||
</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>
|
||||||
<?php
|
</div>
|
||||||
require_once '../../../includes/modal_footer.php';
|
</div>
|
||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$location_ids = array_map('intval', $_GET['location_ids'] ?? []);
|
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($location_ids);
|
$count = count($selected_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 ($location_ids as $location_id) { ?><input type="hidden" name="location_ids[]" value="<?= $location_id ?>"><?php } ?>
|
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="location_ids[]" value="<?= $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,13 +1,6 @@
|
|||||||
<?php
|
<div class="modal" id="exportLocationModal" tabindex="-1">
|
||||||
|
<div class="modal-dialog">
|
||||||
require_once '../../../includes/modal_header.php';
|
<div class="modal-content">
|
||||||
|
|
||||||
$client_id = intval($_GET['client_id'] ?? 0);
|
|
||||||
|
|
||||||
ob_start();
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<div class="modal-header bg-dark">
|
<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">
|
||||||
@@ -15,7 +8,9 @@ ob_start();
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="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">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -24,6 +19,6 @@ ob_start();
|
|||||||
<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>
|
||||||
<?php
|
</div>
|
||||||
require_once '../../../includes/modal_footer.php';
|
</div>
|
||||||
|
|||||||
@@ -1,13 +1,6 @@
|
|||||||
<?php
|
<div class="modal" id="importLocationModal" tabindex="-1">
|
||||||
|
<div class="modal-dialog">
|
||||||
require_once '../../../includes/modal_header.php';
|
<div class="modal-content">
|
||||||
|
|
||||||
$client_id = intval($_GET['client_id'] ?? 0);
|
|
||||||
|
|
||||||
ob_start();
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<div class="modal-header bg-dark">
|
<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">
|
||||||
@@ -15,8 +8,9 @@ ob_start();
|
|||||||
</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="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, 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>
|
||||||
@@ -24,13 +18,13 @@ ob_start();
|
|||||||
<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=<?= $client_id ?>">sample csv template</a></div>
|
<div>Download: <a class="text-bold" href="post.php?download_locations_csv_template=<?php echo $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>
|
||||||
<?php
|
</div>
|
||||||
require_once '../../../includes/modal_footer.php';
|
</div>
|
||||||
@@ -1,13 +1,6 @@
|
|||||||
<?php
|
<div class="modal" id="exportNetworkModal" tabindex="-1">
|
||||||
|
<div class="modal-dialog">
|
||||||
require_once '../../../includes/modal_header.php';
|
<div class="modal-content">
|
||||||
|
|
||||||
$client_id = intval($_GET['client_id'] ?? 0);
|
|
||||||
|
|
||||||
ob_start();
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<div class="modal-header bg-dark">
|
<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">
|
||||||
@@ -15,7 +8,9 @@ ob_start();
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="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">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -24,6 +19,6 @@ ob_start();
|
|||||||
<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>
|
||||||
<?php
|
</div>
|
||||||
require_once '../../../includes/modal_footer.php';
|
</div>
|
||||||
|
|||||||
@@ -1,13 +1,6 @@
|
|||||||
<?php
|
<div class="modal" id="exportPaymentModal" tabindex="-1">
|
||||||
|
<div class="modal-dialog">
|
||||||
require_once '../../../includes/modal_header.php';
|
<div class="modal-content">
|
||||||
|
|
||||||
$client_id = intval($_GET['client_id'] ?? 0);
|
|
||||||
|
|
||||||
ob_start();
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<div class="modal-header bg-dark">
|
<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">
|
||||||
@@ -15,8 +8,9 @@ ob_start();
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
<?php if (isset($_GET['client_id'])) { ?>
|
||||||
|
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
||||||
|
<?php } ?>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -25,6 +19,6 @@ ob_start();
|
|||||||
<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>
|
||||||
<?php
|
</div>
|
||||||
require_once '../../../includes/modal_footer.php';
|
</div>
|
||||||
|
|||||||
@@ -1,26 +1,12 @@
|
|||||||
|
<div class="modal" id="bulkEditCategoryModal" tabindex="-1">
|
||||||
<?php
|
<div class="modal-dialog">
|
||||||
|
<div class="modal-content">
|
||||||
require_once '../../../includes/modal_header.php';
|
|
||||||
|
|
||||||
$product_ids = array_map('intval', $_GET['product_ids'] ?? []);
|
|
||||||
|
|
||||||
$count = count($product_ids);
|
|
||||||
|
|
||||||
ob_start();
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<div class="modal-header bg-dark">
|
<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>
|
<h5 class="modal-title"><i class="fa fa-fw fa-list mr-2"></i>Bulk Set Category</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">
|
||||||
@@ -51,8 +37,6 @@ ob_start();
|
|||||||
<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>
|
||||||
</form>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<?php
|
|
||||||
require_once '../../../includes/modal_footer.php';
|
|
||||||
|
|||||||
@@ -1,11 +1,6 @@
|
|||||||
<?php
|
<div class="modal" id="exportProductsModal" tabindex="-1">
|
||||||
|
<div class="modal-dialog">
|
||||||
require_once '../../../includes/modal_header.php';
|
<div class="modal-content">
|
||||||
|
|
||||||
ob_start();
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<div class="modal-header bg-dark">
|
<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">
|
||||||
@@ -21,6 +16,6 @@ ob_start();
|
|||||||
<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,13 +1,6 @@
|
|||||||
<?php
|
<div class="modal" id="exportQuoteModal" tabindex="-1">
|
||||||
|
<div class="modal-dialog">
|
||||||
require_once '../../../includes/modal_header.php';
|
<div class="modal-content">
|
||||||
|
|
||||||
$client_id = intval($_GET['client_id'] ?? 0);
|
|
||||||
|
|
||||||
ob_start();
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<div class="modal-header bg-dark">
|
<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">
|
||||||
@@ -15,8 +8,9 @@ ob_start();
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
<?php if(isset($_GET['client_id'])) { ?>
|
||||||
|
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
||||||
|
<?php } ?>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -25,6 +19,6 @@ ob_start();
|
|||||||
<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>
|
||||||
<?php
|
</div>
|
||||||
require_once '../../../includes/modal_footer.php';
|
</div>
|
||||||
|
|||||||
@@ -2,9 +2,7 @@
|
|||||||
<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">
|
<h5 class="modal-title text-white"><i class="fas fa-fw fa-edit mr-2"></i>Quote Notes</h5>
|
||||||
<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>
|
||||||
@@ -17,12 +15,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="submit" name="quote_note" class="btn btn-primary text-bold">
|
<button type="submit" name="quote_note" class="btn btn-primary text-bold"><i class="fas fa-check mr-2"></i>Save</button>
|
||||||
<i class="fas fa-check mr-2"></i>Save
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||||
</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,30 +1,15 @@
|
|||||||
<?php
|
<div class="modal" id="addQuoteToInvoiceModal<?php echo $quote_id; ?>" tabindex="-1">
|
||||||
|
<div class="modal-dialog">
|
||||||
require_once '../../../includes/modal_header.php';
|
<div class="modal-content">
|
||||||
|
|
||||||
$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">
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title">
|
<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>
|
||||||
<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="<?= $quote_id ?>">
|
<input type="hidden" name="quote_id" value="<?php echo $quote_id; ?>">
|
||||||
|
<input type="hidden" name="client_net_terms" value="<?php echo $client_net_terms; ?>">
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
@@ -34,20 +19,16 @@ ob_start();
|
|||||||
<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="<?= date("Y-m-d"); ?>" required>
|
<input type="date" class="form-control" name="date" max="2999-12-31" value="<?php echo 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">
|
<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>
|
||||||
<strong><i class="fas fa-check mr-2"></i>Create Invoice</strong>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||||
</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>
|
||||||
<?php
|
</div>
|
||||||
require_once '../../../includes/modal_footer.php';
|
</div>
|
||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_once '../../../includes/modal_header.php';
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
$recurring_ticket_ids = array_map('intval', $_GET['recurring_ticket_ids'] ?? []);
|
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($recurring_ticket_ids);
|
$count = count($selected_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 ($recurring_ticket_ids as $recurring_ticket_id) { ?><input type="hidden" name="recurring_ticket_ids[]" value="<?= $recurring_ticket_id ?>"><?php } ?>
|
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="recurring_ticket_ids[]" value="<?= $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';
|
||||||
|
|
||||||
$recurring_ticket_ids = array_map('intval', $_GET['recurring_ticket_ids'] ?? []);
|
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
||||||
|
|
||||||
$count = count($recurring_ticket_ids);
|
$count = count($selected_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 ($recurring_ticket_ids as $recurring_ticket_id) { ?><input type="hidden" name="recurring_ticket_ids[]" value="<?= $recurring_ticket_id ?>"><?php } ?>
|
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="recurring_ticket_ids[]" value="<?= $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