mirror of https://github.com/itflow-org/itflow
Convert all Import / Export Modals to Ajax and a few other lingering modals that were not converted yet
This commit is contained in:
parent
fe8df66c67
commit
e1a579387f
|
|
@ -1,21 +1,26 @@
|
||||||
<div class="modal" id="exportUserModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
|
||||||
<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>
|
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
|
||||||
<span>×</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
|
||||||
<div class="modal-body">
|
|
||||||
|
|
||||||
</div>
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="submit" name="export_users_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
ob_start();
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
|
||||||
</div>
|
?>
|
||||||
</form>
|
|
||||||
</div>
|
<div class="modal-header bg-dark">
|
||||||
</div>
|
<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">
|
||||||
|
<span>×</span>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
|
<div class="modal-body">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="submit" name="export_users_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
||||||
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|
|
||||||
|
|
@ -33,9 +33,16 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
<!--<a class="dropdown-item text-dark ajax-modal" href="#" data-modal-url="modals/user/user_invite.php"><i class="fas fa-paper-plane mr-2"></i>Invite User</a>-->
|
<!--<a class="dropdown-item text-dark ajax-modal" href="#" data-modal-url="modals/user/user_invite.php"><i class="fas fa-paper-plane mr-2"></i>Invite User</a>-->
|
||||||
<?php if ($num_rows[0] > 1) { ?>
|
<?php if ($num_rows[0] > 1) { ?>
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportUserModal"><i class="fa fa-fw fa-download mr-2"></i>Export</a>
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/user/user_export.php">
|
||||||
|
<i class="fa fa-fw fa-download mr-2"></i>Export
|
||||||
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-danger ajax-modal" href="#" data-modal-url="modals/user/user_all_reset_password.php" data-modal-size="lg"><i class="fas fa-skull-crossbones mr-2"></i>IR</a>
|
<a class="dropdown-item text-danger ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/user/user_all_reset_password.php"
|
||||||
|
data-modal-size="lg">
|
||||||
|
<i class="fas fa-skull-crossbones mr-2"></i>IR
|
||||||
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -54,7 +61,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<div class="btn-group float-right">
|
<div class="btn-group float-right">
|
||||||
<a href="?archived=<?php if($archived == 1){ echo 0; } else { echo 1; } ?>"
|
<a href="?archived=<?php if($archived == 1){ echo 0; } else { echo 1; } ?>"
|
||||||
class="btn btn-<?php if($archived == 1){ echo "primary"; } else { echo "default"; } ?>">
|
class="btn btn-<?php if($archived == 1){ echo "primary"; } else { echo "default"; } ?>">
|
||||||
<i class="fa fa-fw fa-archive mr-2"></i>Archived
|
<i class="fa fa-fw fa-archive mr-2"></i>Archived
|
||||||
</a>
|
</a>
|
||||||
|
|
@ -235,5 +242,4 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
require_once "modals/user/user_export.php";
|
|
||||||
require_once "../includes/footer.php";
|
require_once "../includes/footer.php";
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,7 @@ if (isset($_GET['tags']) && is_array($_GET['tags']) && !empty($_GET['tags'])) {
|
||||||
|
|
||||||
//Get Asset Counts
|
//Get Asset Counts
|
||||||
$row = mysqli_fetch_assoc(mysqli_query($mysqli, "
|
$row = mysqli_fetch_assoc(mysqli_query($mysqli, "
|
||||||
SELECT
|
SELECT
|
||||||
COUNT(*) AS all_count,
|
COUNT(*) AS all_count,
|
||||||
SUM(CASE WHEN asset_type IN ('laptop', 'desktop') THEN 1 ELSE 0 END) AS workstation_count,
|
SUM(CASE WHEN asset_type IN ('laptop', 'desktop') THEN 1 ELSE 0 END) AS workstation_count,
|
||||||
SUM(CASE WHEN asset_type = 'server' THEN 1 ELSE 0 END) AS server_count,
|
SUM(CASE WHEN asset_type = 'server' THEN 1 ELSE 0 END) AS server_count,
|
||||||
|
|
@ -102,8 +102,8 @@ $row = mysqli_fetch_assoc(mysqli_query($mysqli, "
|
||||||
FROM (
|
FROM (
|
||||||
SELECT assets.* FROM assets
|
SELECT assets.* FROM assets
|
||||||
LEFT JOIN clients ON client_id = asset_client_id
|
LEFT JOIN clients ON client_id = asset_client_id
|
||||||
LEFT JOIN contacts ON asset_contact_id = contact_id
|
LEFT JOIN contacts ON asset_contact_id = contact_id
|
||||||
LEFT JOIN locations ON asset_location_id = location_id
|
LEFT JOIN locations ON asset_location_id = location_id
|
||||||
LEFT JOIN asset_interfaces ON interface_asset_id = asset_id AND interface_primary = 1
|
LEFT JOIN asset_interfaces ON interface_asset_id = asset_id AND interface_primary = 1
|
||||||
LEFT JOIN asset_tags ON asset_tag_asset_id = asset_id
|
LEFT JOIN asset_tags ON asset_tag_asset_id = asset_id
|
||||||
LEFT JOIN tags ON tag_id = asset_tag_tag_id
|
LEFT JOIN tags ON tag_id = asset_tag_tag_id
|
||||||
|
|
@ -137,8 +137,8 @@ $sql = mysqli_query(
|
||||||
$mysqli,
|
$mysqli,
|
||||||
"SELECT SQL_CALC_FOUND_ROWS * FROM assets
|
"SELECT SQL_CALC_FOUND_ROWS * FROM assets
|
||||||
LEFT JOIN clients ON asset_client_id = client_id
|
LEFT JOIN clients ON asset_client_id = client_id
|
||||||
LEFT JOIN contacts ON asset_contact_id = contact_id
|
LEFT JOIN contacts ON asset_contact_id = contact_id
|
||||||
LEFT JOIN locations ON asset_location_id = location_id
|
LEFT JOIN locations ON asset_location_id = location_id
|
||||||
LEFT JOIN asset_interfaces ON interface_asset_id = asset_id AND interface_primary = 1
|
LEFT JOIN asset_interfaces ON interface_asset_id = asset_id AND interface_primary = 1
|
||||||
LEFT JOIN asset_tags ON asset_tag_asset_id = asset_id
|
LEFT JOIN asset_tags ON asset_tag_asset_id = asset_id
|
||||||
LEFT JOIN tags ON tag_id = asset_tag_tag_id
|
LEFT JOIN tags ON tag_id = asset_tag_tag_id
|
||||||
|
|
@ -200,14 +200,16 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
<?php if ($client_url) { ?>
|
<?php if ($client_url) { ?>
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#importAssetModal">
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/asset/asset_import.php?<?= $client_url ?>">
|
||||||
<i class="fa fa-fw fa-upload mr-2"></i>Import
|
<i class="fa fa-fw fa-upload mr-2"></i>Import
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if ($num_rows[0] > 0) { ?>
|
<?php if ($num_rows[0] > 0) { ?>
|
||||||
|
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportAssetModal">
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/asset/asset_export.php?<?= $client_url ?>">
|
||||||
<i class="fa fa-fw fa-download mr-2"></i>Export
|
<i class="fa fa-fw fa-download mr-2"></i>Export
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
@ -242,7 +244,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
$sql_locations_filter = mysqli_query($mysqli, "
|
$sql_locations_filter = mysqli_query($mysqli, "
|
||||||
SELECT DISTINCT location_id, location_name
|
SELECT DISTINCT location_id, location_name
|
||||||
FROM locations
|
FROM locations
|
||||||
WHERE location_client_id = $client_id
|
WHERE location_client_id = $client_id
|
||||||
AND ( EXISTS (SELECT 1 FROM assets WHERE asset_location_id = location_id AND $archive_query) OR location_id = $location_filter)
|
AND ( EXISTS (SELECT 1 FROM assets WHERE asset_location_id = location_id AND $archive_query) OR location_id = $location_filter)
|
||||||
ORDER BY location_name ASC
|
ORDER BY location_name ASC
|
||||||
");
|
");
|
||||||
|
|
@ -266,7 +268,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$sql_clients_filter = mysqli_query($mysqli, "
|
$sql_clients_filter = mysqli_query($mysqli, "
|
||||||
SELECT DISTINCT client_id, client_name
|
SELECT DISTINCT client_id, client_name
|
||||||
FROM clients
|
FROM clients
|
||||||
JOIN assets ON asset_client_id = client_id
|
JOIN assets ON asset_client_id = client_id
|
||||||
WHERE $archive_query
|
WHERE $archive_query
|
||||||
|
|
@ -463,7 +465,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
IP <?php if ($sort == 'interface_ip') { echo $order_icon; } ?>
|
IP <?php if ($sort == 'interface_ip') { echo $order_icon; } ?>
|
||||||
</a>
|
</a>
|
||||||
</th>
|
</th>
|
||||||
<?php if (isset($_GET['show_column']) && is_array($_GET['show_column']) && in_array('Mac_Address', $_GET['show_column'])) { ?>
|
<?php if (isset($_GET['show_column']) && is_array($_GET['show_column']) && in_array('Mac_Address', $_GET['show_column'])) { ?>
|
||||||
<th>
|
<th>
|
||||||
<a class="text-secondary" href="?<?php echo $url_query_strings_sort; ?>&sort=interface_mac&order=<?php echo $disp; ?>">
|
<a class="text-secondary" href="?<?php echo $url_query_strings_sort; ?>&sort=interface_mac&order=<?php echo $disp; ?>">
|
||||||
MAC Address <?php if ($sort == 'interface_mac') { echo $order_icon; } ?>
|
MAC Address <?php if ($sort == 'interface_mac') { echo $order_icon; } ?>
|
||||||
|
|
@ -605,7 +607,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
}
|
}
|
||||||
$contact_name = nullable_htmlentities($row['contact_name']);
|
$contact_name = nullable_htmlentities($row['contact_name']);
|
||||||
if ($contact_name) {
|
if ($contact_name) {
|
||||||
$contact_name_display = "<a class='ajax-modal' href='#' data-modal-url='modals/contact/contact_details.php?id=$asset_contact_id' data-modal-size='lg'>$contact_name $contact_archive_display</a>";
|
$contact_name_display = "<a class='ajax-modal' href='#' data-modal-url='modals/contact/contact_details.php?id=$asset_contact_id' data-modal-size='lg'>$contact_name $contact_archive_display</a>";
|
||||||
} else {
|
} else {
|
||||||
$contact_name_display = "-";
|
$contact_name_display = "-";
|
||||||
}
|
}
|
||||||
|
|
@ -665,7 +667,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
<?= $asset_tags_display ?>
|
<?= $asset_tags_display ?>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
|
|
@ -789,8 +791,4 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
<script src="../js/bulk_actions.js"></script>
|
<script src="../js/bulk_actions.js"></script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
require_once "modals/asset/asset_export.php";
|
|
||||||
if ($client_url) {
|
|
||||||
require_once "modals/asset/asset_import.php";
|
|
||||||
}
|
|
||||||
require_once "../includes/footer.php";
|
require_once "../includes/footer.php";
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
<?php if ($num_rows[0] > 0) { ?>
|
<?php if ($num_rows[0] > 0) { ?>
|
||||||
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportCertificateModal">
|
<a class="dropdown-item text-dark ajax-modal" href="#"\
|
||||||
|
data-modal-url="modals/certificate/certificate_export.php?<?= $client_url ?>">
|
||||||
<i class="fa fa-fw fa-download mr-2"></i>Export
|
<i class="fa fa-fw fa-download mr-2"></i>Export
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -78,7 +79,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<form autocomplete="off">
|
<form autocomplete="off">
|
||||||
<?php if ($client_url) { ?>
|
<?php if ($client_url) { ?>
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<input type="hidden" name="archived" value="<?php echo $archived; ?>">
|
<input type="hidden" name="archived" value="<?php echo $archived; ?>">
|
||||||
|
|
@ -103,7 +104,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$sql_clients_filter = mysqli_query($mysqli, "
|
$sql_clients_filter = mysqli_query($mysqli, "
|
||||||
SELECT DISTINCT client_id, client_name
|
SELECT DISTINCT client_id, client_name
|
||||||
FROM clients
|
FROM clients
|
||||||
JOIN certificates ON certificate_client_id = client_id
|
JOIN certificates ON certificate_client_id = client_id
|
||||||
WHERE $archive_query
|
WHERE $archive_query
|
||||||
|
|
@ -126,7 +127,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
|
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="btn-group float-right">
|
<div class="btn-group float-right">
|
||||||
<a href="?<?php echo $client_url; ?>archived=<?php if($archived == 1){ echo 0; } else { echo 1; } ?>"
|
<a href="?<?php echo $client_url; ?>archived=<?php if($archived == 1){ echo 0; } else { echo 1; } ?>"
|
||||||
class="btn btn-<?php if($archived == 1){ echo "primary"; } else { echo "default"; } ?>">
|
class="btn btn-<?php if($archived == 1){ echo "primary"; } else { echo "default"; } ?>">
|
||||||
<i class="fa fa-fw fa-archive mr-2"></i>Archived
|
<i class="fa fa-fw fa-archive mr-2"></i>Archived
|
||||||
</a>
|
</a>
|
||||||
|
|
@ -283,7 +284,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
<i class="fas fa-fw fa-archive mr-2"></i>Archive
|
<i class="fas fa-fw fa-archive mr-2"></i>Archive
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -299,15 +300,10 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<?php require_once "../includes/filter_footer.php";
|
<?php require_once "../includes/filter_footer.php"; ?>
|
||||||
?>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
|
||||||
require_once "modals/certificate/certificate_export.php";
|
|
||||||
?>
|
|
||||||
|
|
||||||
<script src="../js/bulk_actions.js"></script>
|
<script src="../js/bulk_actions.js"></script>
|
||||||
|
|
||||||
<?php require_once "../includes/footer.php";
|
<?php require_once "../includes/footer.php";
|
||||||
|
|
|
||||||
|
|
@ -98,12 +98,14 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
<?php if ($client_url) { ?>
|
<?php if ($client_url) { ?>
|
||||||
<!-- <a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#contactInviteModal"><i class="fas fa-fw fa-paper-plane mr-2"></i>Invite</a>-->
|
<!-- <a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#contactInviteModal"><i class="fas fa-fw fa-paper-plane mr-2"></i>Invite</a>-->
|
||||||
<!-- <div class="dropdown-divider"></div>-->
|
<!-- <div class="dropdown-divider"></div>-->
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#importContactModal">
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/contact/contact_import.php?<?= $client_url ?>">
|
||||||
<i class="fa fa-fw fa-upload mr-2"></i>Import
|
<i class="fa fa-fw fa-upload mr-2"></i>Import
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportContactModal">
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/contact/contact_export.php?<?= $client_url ?>">
|
||||||
<i class="fa fa-fw fa-download mr-2"></i>Export
|
<i class="fa fa-fw fa-download mr-2"></i>Export
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -112,7 +114,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<form autocomplete="off">
|
<form autocomplete="off">
|
||||||
<?php if ($client_url) { ?>
|
<?php if ($client_url) { ?>
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<input type="hidden" name="archived" value="<?php echo $archived; ?>">
|
<input type="hidden" name="archived" value="<?php echo $archived; ?>">
|
||||||
|
|
@ -134,7 +136,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
<?php
|
<?php
|
||||||
$sql_tags_filter = mysqli_query($mysqli, "
|
$sql_tags_filter = mysqli_query($mysqli, "
|
||||||
SELECT tags.tag_id, tags.tag_name
|
SELECT tags.tag_id, tags.tag_name
|
||||||
FROM tags
|
FROM tags
|
||||||
LEFT JOIN contact_tags ON contact_tags.tag_id = tags.tag_id
|
LEFT JOIN contact_tags ON contact_tags.tag_id = tags.tag_id
|
||||||
LEFT JOIN contacts ON contact_tags.contact_id = contacts.contact_id
|
LEFT JOIN contacts ON contact_tags.contact_id = contacts.contact_id
|
||||||
WHERE tag_type = 3
|
WHERE tag_type = 3
|
||||||
|
|
@ -163,7 +165,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
$sql_locations_filter = mysqli_query($mysqli, "
|
$sql_locations_filter = mysqli_query($mysqli, "
|
||||||
SELECT DISTINCT location_id, location_name
|
SELECT DISTINCT location_id, location_name
|
||||||
FROM locations
|
FROM locations
|
||||||
WHERE location_client_id = $client_id
|
WHERE location_client_id = $client_id
|
||||||
AND ( EXISTS (SELECT 1 FROM contacts WHERE contact_location_id = location_id AND $archive_query) OR location_id = $location_filter)
|
AND ( EXISTS (SELECT 1 FROM contacts WHERE contact_location_id = location_id AND $archive_query) OR location_id = $location_filter)
|
||||||
ORDER BY location_name ASC
|
ORDER BY location_name ASC
|
||||||
");
|
");
|
||||||
|
|
@ -187,7 +189,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$sql_clients_filter = mysqli_query($mysqli, "
|
$sql_clients_filter = mysqli_query($mysqli, "
|
||||||
SELECT DISTINCT client_id, client_name
|
SELECT DISTINCT client_id, client_name
|
||||||
FROM clients
|
FROM clients
|
||||||
JOIN contacts ON contact_client_id = client_id
|
JOIN contacts ON contact_client_id = client_id
|
||||||
WHERE $archive_query
|
WHERE $archive_query
|
||||||
|
|
@ -210,7 +212,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
|
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<div class="btn-group float-right">
|
<div class="btn-group float-right">
|
||||||
<a href="?<?php echo $client_url; ?>archived=<?php if($archived == 1){ echo 0; } else { echo 1; } ?>"
|
<a href="?<?php echo $client_url; ?>archived=<?php if($archived == 1){ echo 0; } else { echo 1; } ?>"
|
||||||
class="btn btn-<?php if($archived == 1){ echo "primary"; } else { echo "default"; } ?>">
|
class="btn btn-<?php if($archived == 1){ echo "primary"; } else { echo "default"; } ?>">
|
||||||
<i class="fa fa-fw fa-archive mr-2"></i>Archived
|
<i class="fa fa-fw fa-archive mr-2"></i>Archived
|
||||||
</a>
|
</a>
|
||||||
|
|
@ -219,7 +221,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
<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">
|
||||||
<?php if ($client_url) { ?>
|
<?php if ($client_url) { ?>
|
||||||
<a class="dropdown-item ajax-modal" href="#"
|
<a class="dropdown-item ajax-modal" href="#"
|
||||||
data-modal-url="modals/contact/contact_bulk_assign_location.php?<?= $client_url ?>"
|
data-modal-url="modals/contact/contact_bulk_assign_location.php?<?= $client_url ?>"
|
||||||
data-bulk="true">
|
data-bulk="true">
|
||||||
|
|
@ -397,7 +399,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
$contact_user_id = intval($row['contact_user_id']);
|
$contact_user_id = intval($row['contact_user_id']);
|
||||||
if ($contact_user_id) {
|
if ($contact_user_id) {
|
||||||
$user_exists_display = "<span class='badge badge-pill badge-dark p-1' title='User: $auth_method'><i class='fas fa-fw fa-user'></i></span>";
|
$user_exists_display = "<span class='badge badge-pill badge-dark p-1' title='User: $auth_method'><i class='fas fa-fw fa-user'></i></span>";
|
||||||
} else {
|
} else {
|
||||||
$user_exists_display = "";
|
$user_exists_display = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -406,25 +408,25 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
// Asset Count
|
// Asset Count
|
||||||
$row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('asset_id') AS num FROM assets WHERE asset_contact_id = $contact_id AND asset_archived_at IS NULL"));
|
$row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('asset_id') AS num FROM assets WHERE asset_contact_id = $contact_id AND asset_archived_at IS NULL"));
|
||||||
$asset_count = $row['num'];
|
$asset_count = $row['num'];
|
||||||
if ($asset_count) {
|
if ($asset_count) {
|
||||||
$asset_count_display = "<a href='contact_details.php?client_id=$client_id&contact_id=$contact_id#assets' class='mr-2 mb-1 badge badge-pill badge-dark p-2' title='Assets ($asset_count)'><i class='fas fa-fw fa-desktop mr-2'></i>$asset_count</a>";
|
$asset_count_display = "<a href='contact_details.php?client_id=$client_id&contact_id=$contact_id#assets' class='mr-2 mb-1 badge badge-pill badge-dark p-2' title='Assets ($asset_count)'><i class='fas fa-fw fa-desktop mr-2'></i>$asset_count</a>";
|
||||||
} else {
|
} else {
|
||||||
$asset_count_display = '';
|
$asset_count_display = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Credential Count
|
// Credential Count
|
||||||
$row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('credential_id') AS num FROM credentials WHERE credential_contact_id = $contact_id AND credential_archived_at IS NULL"));
|
$row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('credential_id') AS num FROM credentials WHERE credential_contact_id = $contact_id AND credential_archived_at IS NULL"));
|
||||||
$credential_count = $row['num'];
|
$credential_count = $row['num'];
|
||||||
if ($credential_count) {
|
if ($credential_count) {
|
||||||
$credential_count_display = "<a href='contact_details.php?client_id=$client_id&contact_id=$contact_id#credentials' class='mr-2 mb-1 badge badge-pill badge-secondary p-2' title='Credentials ($credential_count)'><i class='fas fa-fw fa-key mr-2'></i>$credential_count</a>";
|
$credential_count_display = "<a href='contact_details.php?client_id=$client_id&contact_id=$contact_id#credentials' class='mr-2 mb-1 badge badge-pill badge-secondary p-2' title='Credentials ($credential_count)'><i class='fas fa-fw fa-key mr-2'></i>$credential_count</a>";
|
||||||
} else {
|
} else {
|
||||||
$credential_count_display = '';
|
$credential_count_display = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Software Count
|
// Software Count
|
||||||
$row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('software_id') AS num FROM software, software_contacts WHERE software.software_id = software_contacts.software_id AND software_contacts.contact_id = $contact_id AND software_archived_at IS NULL"));
|
$row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('software_id') AS num FROM software, software_contacts WHERE software.software_id = software_contacts.software_id AND software_contacts.contact_id = $contact_id AND software_archived_at IS NULL"));
|
||||||
$software_count = $row['num'];
|
$software_count = $row['num'];
|
||||||
if ($software_count) {
|
if ($software_count) {
|
||||||
$software_count_display = "<a href='contact_details.php?client_id=$client_id&contact_id=$contact_id#software' class='mr-2 mb-1 badge badge-pill badge-secondary p-2' title='Licenses ($software_count)'><i class='fas fa-fw fa-cube mr-2'></i>$software_count</a>";
|
$software_count_display = "<a href='contact_details.php?client_id=$client_id&contact_id=$contact_id#software' class='mr-2 mb-1 badge badge-pill badge-secondary p-2' title='Licenses ($software_count)'><i class='fas fa-fw fa-cube mr-2'></i>$software_count</a>";
|
||||||
} else {
|
} else {
|
||||||
$software_count_display = '';
|
$software_count_display = '';
|
||||||
|
|
@ -433,7 +435,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
// Ticket Count
|
// Ticket Count
|
||||||
$row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('ticket_id') AS num FROM tickets WHERE ticket_contact_id = $contact_id AND ticket_archived_at IS NULL"));
|
$row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('ticket_id') AS num FROM tickets WHERE ticket_contact_id = $contact_id AND ticket_archived_at IS NULL"));
|
||||||
$ticket_count = $row['num'];
|
$ticket_count = $row['num'];
|
||||||
if ($ticket_count) {
|
if ($ticket_count) {
|
||||||
$ticket_count_display = "<a href='contact_details.php?client_id=$client_id&contact_id=$contact_id#tickets' class='mr-2 mb-1 badge badge-pill badge-secondary p-2' title='Tickets ($ticket_count)'><i class='fas fa-fw fa-life-ring mr-2'></i>$ticket_count</a>";
|
$ticket_count_display = "<a href='contact_details.php?client_id=$client_id&contact_id=$contact_id#tickets' class='mr-2 mb-1 badge badge-pill badge-secondary p-2' title='Tickets ($ticket_count)'><i class='fas fa-fw fa-life-ring mr-2'></i>$ticket_count</a>";
|
||||||
} else {
|
} else {
|
||||||
$ticket_count_display = '';
|
$ticket_count_display = '';
|
||||||
|
|
@ -491,11 +493,11 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
<?php echo $contact_tags_display; ?>
|
<?php echo $contact_tags_display; ?>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
<td><?php echo $contact_department; ?></td>
|
<td><?php echo $contact_department; ?></td>
|
||||||
<td><?php echo $contact_info_display; ?></td>
|
<td><?php echo $contact_info_display; ?></td>
|
||||||
|
|
@ -566,10 +568,4 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
<script src="../js/bulk_actions.js"></script>
|
<script src="../js/bulk_actions.js"></script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once "modals/contact/contact_export.php";
|
|
||||||
if ($client_url) {
|
|
||||||
//require_once "modals/contact/contact_invite.php";
|
|
||||||
require_once "modals/contact/contact_import.php";
|
|
||||||
}
|
|
||||||
require_once "../includes/footer.php";
|
require_once "../includes/footer.php";
|
||||||
|
|
|
||||||
|
|
@ -112,13 +112,15 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
<?php if ($client_url) { ?>
|
<?php if ($client_url) { ?>
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#importCredentialModal">
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/credential/credential_import.php?<?= $client_url ?>">
|
||||||
<i class="fa fa-fw fa-upload mr-2"></i>Import
|
<i class="fa fa-fw fa-upload mr-2"></i>Import
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if ($num_rows[0] > 0) { ?>
|
<?php if ($num_rows[0] > 0) { ?>
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportCredentialModal">
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/credential/credential_export.php?<?= $client_url ?>">
|
||||||
<i class="fa fa-fw fa-download mr-2"></i>Export
|
<i class="fa fa-fw fa-download mr-2"></i>Export
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
@ -151,7 +153,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
<?php
|
<?php
|
||||||
$sql_tags_filter = mysqli_query($mysqli, "
|
$sql_tags_filter = mysqli_query($mysqli, "
|
||||||
SELECT tags.tag_id, tags.tag_name
|
SELECT tags.tag_id, tags.tag_name
|
||||||
FROM tags
|
FROM tags
|
||||||
LEFT JOIN credential_tags ON credential_tags.tag_id = tags.tag_id
|
LEFT JOIN credential_tags ON credential_tags.tag_id = tags.tag_id
|
||||||
LEFT JOIN credentials ON credential_tags.credential_id = credentials.credential_id
|
LEFT JOIN credentials ON credential_tags.credential_id = credentials.credential_id
|
||||||
WHERE tag_type = 4
|
WHERE tag_type = 4
|
||||||
|
|
@ -169,7 +171,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php if ($client_url) { ?>
|
<?php if ($client_url) { ?>
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<div class="input-group mb-3 mb-md-0">
|
<div class="input-group mb-3 mb-md-0">
|
||||||
|
|
@ -198,7 +200,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$sql_clients_filter = mysqli_query($mysqli, "
|
$sql_clients_filter = mysqli_query($mysqli, "
|
||||||
SELECT DISTINCT client_id, client_name
|
SELECT DISTINCT client_id, client_name
|
||||||
FROM clients
|
FROM clients
|
||||||
JOIN credentials ON credential_client_id = client_id
|
JOIN credentials ON credential_client_id = client_id
|
||||||
WHERE $archive_query
|
WHERE $archive_query
|
||||||
|
|
@ -357,7 +359,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
}
|
}
|
||||||
$credential_tags_display = implode('', $credential_tag_name_display_array);
|
$credential_tags_display = implode('', $credential_tag_name_display_array);
|
||||||
|
|
||||||
if ($credential_contact_id) {
|
if ($credential_contact_id) {
|
||||||
$credential_contact_display = "<a href='#' class='mr-2 mb-1 badge badge-pill badge-dark p-2 ajax-modal' title='$contact_name'
|
$credential_contact_display = "<a href='#' class='mr-2 mb-1 badge badge-pill badge-dark p-2 ajax-modal' title='$contact_name'
|
||||||
data-modal-size='lg'
|
data-modal-size='lg'
|
||||||
data-modal-url='modals/contact/contact_details.php?id=$credential_contact_id'>
|
data-modal-url='modals/contact/contact_details.php?id=$credential_contact_id'>
|
||||||
|
|
@ -366,7 +368,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
$credential_contact_display = '';
|
$credential_contact_display = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($credential_asset_id) {
|
if ($credential_asset_id) {
|
||||||
$credential_asset_display = "<a href='#' class='mr-2 mb-1 badge badge-pill badge-secondary p-2 ajax-modal' title='$asset_name' data-toggle=''
|
$credential_asset_display = "<a href='#' class='mr-2 mb-1 badge badge-pill badge-secondary p-2 ajax-modal' title='$asset_name' data-toggle=''
|
||||||
data-modal-size='lg'
|
data-modal-size='lg'
|
||||||
data-modal-url='modals/asset/asset_details.php?id=$credential_asset_id'>
|
data-modal-url='modals/asset/asset_details.php?id=$credential_asset_id'>
|
||||||
|
|
@ -528,15 +530,10 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
|
|
||||||
<!-- Include script to get TOTP code via the login ID -->
|
<!-- Include script to get TOTP code via the login ID -->
|
||||||
<script src="js/credential_show_otp_via_id.js"></script>
|
<script src="js/credential_show_otp_via_id.js"></script>
|
||||||
<!-- Include script to generate readable passwords for login entries -->
|
|
||||||
<script src="js/generate_password.js"></script>
|
|
||||||
<script src="../js/bulk_actions.js"></script>
|
<script src="../js/bulk_actions.js"></script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once "modals/credential/credential_export.php";
|
|
||||||
if ($client_url) {
|
if ($client_url) {
|
||||||
require_once "modals/credential/credential_import.php";
|
|
||||||
require_once "modals/share_modal.php";
|
require_once "modals/share_modal.php";
|
||||||
}
|
}
|
||||||
require_once "../includes/footer.php";
|
require_once "../includes/footer.php";
|
||||||
|
|
|
||||||
|
|
@ -71,302 +71,297 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="card card-dark">
|
<div class="card card-dark">
|
||||||
<div class="card-header py-2">
|
<div class="card-header py-2">
|
||||||
<h3 class="card-title mt-2"><i class="fa fa-fw fa-globe mr-2"></i>Domains</h3>
|
<h3 class="card-title mt-2"><i class="fa fa-fw fa-globe mr-2"></i>Domains</h3>
|
||||||
<div class="card-tools">
|
<div class="card-tools">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<button type="button" class="btn btn-primary ajax-modal" data-modal-url="modals/domain/domain_add.php?<?= $client_url ?>"><i class="fas fa-plus mr-2"></i>New Domain</button>
|
<button type="button" class="btn btn-primary ajax-modal" data-modal-url="modals/domain/domain_add.php?<?= $client_url ?>"><i class="fas fa-plus mr-2"></i>New Domain</button>
|
||||||
<?php if ($num_rows[0] > 0) { ?>
|
<?php if ($num_rows[0] > 0) { ?>
|
||||||
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportDomainModal">
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
<i class="fa fa-fw fa-download mr-2"></i>Export
|
data-modal-url="modals/domain/domain_export.php?<?= $client_url ?>">
|
||||||
</a>
|
<i class="fa fa-fw fa-download mr-2"></i>Export
|
||||||
</div>
|
</a>
|
||||||
<?php } ?>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="card-body">
|
|
||||||
<form autocomplete="off">
|
|
||||||
<?php if ($client_url) { ?>
|
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<input type="hidden" name="archived" value="<?php echo $archived; ?>">
|
|
||||||
<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 Domains">
|
|
||||||
<div class="input-group-append">
|
|
||||||
<button class="btn btn-dark"><i class="fa fa-search"></i></button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php if ($client_url) { ?>
|
|
||||||
<div class="col-md-2"></div>
|
|
||||||
<?php } else { ?>
|
|
||||||
<div class="col-md-2">
|
|
||||||
<div class="input-group mb-3 mb-md-0">
|
|
||||||
<select class="form-control select2" name="client" onchange="this.form.submit()">
|
|
||||||
<option value="" <?php if ($client == "") { echo "selected"; } ?>>- All Clients -</option>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
$sql_clients_filter = mysqli_query($mysqli, "
|
|
||||||
SELECT DISTINCT client_id, client_name
|
|
||||||
FROM clients
|
|
||||||
JOIN domains ON domain_client_id = client_id
|
|
||||||
WHERE $archive_query
|
|
||||||
$access_permission_query
|
|
||||||
ORDER BY client_name ASC
|
|
||||||
");
|
|
||||||
while ($row = mysqli_fetch_array($sql_clients_filter)) {
|
|
||||||
$client_id = intval($row['client_id']);
|
|
||||||
$client_name = nullable_htmlentities($row['client_name']);
|
|
||||||
?>
|
|
||||||
<option <?php if ($client == $client_id) { echo "selected"; } ?> value="<?php echo $client_id; ?>"><?php echo $client_name; ?></option>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
<div class="col-md-6">
|
|
||||||
<div class="btn-group float-right">
|
|
||||||
<a href="?<?php echo $client_url; ?>archived=<?php if($archived == 1){ echo 0; } else { echo 1; } ?>"
|
|
||||||
class="btn btn-<?php if($archived == 1){ echo "primary"; } else { echo "default"; } ?>">
|
|
||||||
<i class="fa fa-fw fa-archive mr-2"></i>Archived
|
|
||||||
</a>
|
|
||||||
<div class="dropdown ml-2" id="bulkActionButton" hidden>
|
|
||||||
<button class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown">
|
|
||||||
<i class="fas fa-fw fa-layer-group mr-2"></i>Bulk Action (<span id="selectedCount">0</span>)
|
|
||||||
</button>
|
|
||||||
<div class="dropdown-menu">
|
|
||||||
<?php if ($archived) { ?>
|
|
||||||
<button class="dropdown-item text-info"
|
|
||||||
type="submit" form="bulkActions" name="bulk_unarchive_domains">
|
|
||||||
<i class="fas fa-fw fa-redo mr-2"></i>Unarchive
|
|
||||||
</button>
|
|
||||||
<div class="dropdown-divider"></div>
|
|
||||||
<button class="dropdown-item text-danger text-bold"
|
|
||||||
type="submit" form="bulkActions" name="bulk_delete_domains">
|
|
||||||
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
|
||||||
</button>
|
|
||||||
<?php } else { ?>
|
|
||||||
<button class="dropdown-item text-danger confirm-link"
|
|
||||||
type="submit" form="bulkActions" name="bulk_archive_domains">
|
|
||||||
<i class="fas fa-fw fa-archive mr-2"></i>Archive
|
|
||||||
</button>
|
|
||||||
<?php } ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
<hr>
|
|
||||||
<div class="table-responsive-sm">
|
|
||||||
|
|
||||||
<form id="bulkActions" action="post.php" method="post">
|
|
||||||
<input type="hidden" name="csrf_token" value="<?php echo $_SESSION['csrf_token'] ?>">
|
|
||||||
<?php if ($client_url) { ?>
|
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
|
||||||
<?php } ?>
|
|
||||||
<table class="table table-striped table-borderless table-hover">
|
|
||||||
<thead class="text-dark <?php if ($num_rows[0] == 0) { echo "d-none"; } ?> text-nowrap">
|
|
||||||
<tr>
|
|
||||||
<td class="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=domain_name&order=<?php echo $disp; ?>">
|
|
||||||
Domain <?php if ($sort == 'domain_name') { echo $order_icon; } ?>
|
|
||||||
</a>
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
<a class="text-secondary" href="?<?php echo $url_query_strings_sort; ?>&sort=registrar_name&order=<?php echo $disp; ?>">
|
|
||||||
Registrar <?php if ($sort == 'registrar_name') { echo $order_icon; } ?>
|
|
||||||
</a>
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
<a class="text-secondary" href="?<?php echo $url_query_strings_sort; ?>&sort=webhost_name&order=<?php echo $disp; ?>">
|
|
||||||
Web Host <?php if ($sort == 'webhost_name') { echo $order_icon; } ?>
|
|
||||||
</a>
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
<a class="text-secondary" href="?<?php echo $url_query_strings_sort; ?>&sort=dnshost_name&order=<?php echo $disp; ?>">
|
|
||||||
DNS Host <?php if ($sort == 'dnshost_name') { echo $order_icon; } ?>
|
|
||||||
</a>
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
<a class="text-secondary" href="?<?php echo $url_query_strings_sort; ?>&sort=mailhost_name&order=<?php echo $disp; ?>">
|
|
||||||
Mail Host <?php if ($sort == 'mailhost_name') { echo $order_icon; } ?>
|
|
||||||
</a>
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
<a class="text-secondary" href="?<?php echo $url_query_strings_sort; ?>&sort=domain_expire&order=<?php echo $disp; ?>">
|
|
||||||
Expires <?php if ($sort == 'domain_expire') { echo $order_icon; } ?>
|
|
||||||
</a>
|
|
||||||
</th>
|
|
||||||
<?php if (!$client_url) { ?>
|
|
||||||
<th>
|
|
||||||
<a class="text-dark" href="?<?php echo $url_query_strings_sort; ?>&sort=client_name&order=<?php echo $disp; ?>">
|
|
||||||
Client <?php if ($sort == 'client_name') { echo $order_icon; } ?>
|
|
||||||
</a>
|
|
||||||
</th>
|
|
||||||
<?php } ?>
|
|
||||||
<th class="text-center">Action</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<?php
|
|
||||||
|
|
||||||
while ($row = mysqli_fetch_array($sql)) {
|
|
||||||
$domain_id = intval($row['domain_id']);
|
|
||||||
$domain_name = nullable_htmlentities($row['domain_name']);
|
|
||||||
$domain_description = nullable_htmlentities($row['domain_description']);
|
|
||||||
$domain_expire = nullable_htmlentities($row['domain_expire']);
|
|
||||||
$domain_expire_ago = timeAgo($domain_expire);
|
|
||||||
// Convert the expiry date to a timestamp
|
|
||||||
$domain_expire_timestamp = strtotime($row['domain_expire'] ?? '');
|
|
||||||
$current_timestamp = time(); // Get current timestamp
|
|
||||||
|
|
||||||
// Calculate the difference in days
|
|
||||||
$days_until_expiry = ($domain_expire_timestamp - $current_timestamp) / (60 * 60 * 24);
|
|
||||||
|
|
||||||
// Determine the class based on the number of days until expiry
|
|
||||||
if ($days_until_expiry <= 0) {
|
|
||||||
$tr_class = "table-secondary";
|
|
||||||
} elseif ($days_until_expiry <= 14) {
|
|
||||||
$tr_class = "table-danger";
|
|
||||||
} elseif ($days_until_expiry <= 90) {
|
|
||||||
$tr_class = "table-warning";
|
|
||||||
} else {
|
|
||||||
$tr_class = '';
|
|
||||||
}
|
|
||||||
$domain_registrar_id = intval($row['registrar_id']);
|
|
||||||
$domain_webhost_id = intval($row['webhost_id']);
|
|
||||||
$domain_dnshost_id = intval($row['dnshost_id']);
|
|
||||||
$domain_mailhost_id = intval($row['mailhost_id']);
|
|
||||||
$domain_registrar_name = nullable_htmlentities($row['registrar_name']);
|
|
||||||
$domain_webhost_name = nullable_htmlentities($row['webhost_name']);
|
|
||||||
$domain_dnshost_name = nullable_htmlentities($row['dnshost_name']);
|
|
||||||
$domain_mailhost_name = nullable_htmlentities($row['mailhost_name']);
|
|
||||||
$domain_created_at = nullable_htmlentities($row['domain_created_at']);
|
|
||||||
$domain_archived_at = nullable_htmlentities($row['domain_archived_at']);
|
|
||||||
$client_id = intval($row['domain_client_id']);
|
|
||||||
$client_name = nullable_htmlentities($row['client_name']);
|
|
||||||
// Add - if empty on the table
|
|
||||||
$domain_registrar_name_display = $domain_registrar_name ? "
|
|
||||||
<a class='ajax-modal' href='#' data-modal-url='modals/vendor/vendor_details.php?id=$domain_registrar_id'>
|
|
||||||
$domain_registrar_name
|
|
||||||
</a>" : "-";
|
|
||||||
$domain_webhost_name_display = $domain_webhost_name ? "
|
|
||||||
<a class='ajax-modal' href='#' data-modal-url='modals/vendor/vendor_details.php?id=$domain_webhost_id'>
|
|
||||||
$domain_webhost_name
|
|
||||||
</a>" : "-";
|
|
||||||
$domain_dnshost_name_display = $domain_dnshost_name ? "
|
|
||||||
<a class='ajax-modal' href='#' data-modal-url='modals/vendor/vendor_details.php?id=$domain_dnshost_id'>
|
|
||||||
$domain_dnshost_name
|
|
||||||
</a>" : "-";
|
|
||||||
$domain_mailhost_name_display = $domain_mailhost_name ? "
|
|
||||||
<a class='ajax-modal' href='#' data-modal-url='modals/vendor/vendor_details.php?id=$domain_mailhost_id'>
|
|
||||||
$domain_mailhost_name
|
|
||||||
</a>" : "-";
|
|
||||||
|
|
||||||
?>
|
|
||||||
<tr class="<?php echo $tr_class; ?>">
|
|
||||||
<td class="pr-0">
|
|
||||||
<div class="form-check">
|
|
||||||
<input class="form-check-input bulk-select" type="checkbox" name="domain_ids[]" value="<?php echo $domain_id ?>">
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td class="">
|
|
||||||
<a class="text-dark ajax-modal" href="#"
|
|
||||||
data-modal-size="lg"
|
|
||||||
data-modal-url="modals/domain/domain_edit.php?<?= $client_url ?>&id=<?= $domain_id ?>">
|
|
||||||
<div class="media">
|
|
||||||
<i class="fa fa-fw fa-2x fa-globe mr-3"></i>
|
|
||||||
<div class="media-body">
|
|
||||||
<div><?php echo $domain_name; ?></div>
|
|
||||||
<div><small class="text-secondary"><?php echo $domain_description; ?></small></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
<td><?php echo $domain_registrar_name_display; ?></td>
|
|
||||||
<td><?php echo $domain_webhost_name_display; ?></td>
|
|
||||||
<td><?php echo $domain_dnshost_name_display; ?></td>
|
|
||||||
<td><?php echo $domain_mailhost_name_display; ?></td>
|
|
||||||
<td>
|
|
||||||
<div><?php echo $domain_expire ?: '-'; ?></div>
|
|
||||||
<?php if (!empty($domain_expire)) { ?>
|
|
||||||
<div><small><?php echo $domain_expire_ago; ?></small></div>
|
|
||||||
<?php } ?>
|
|
||||||
</td>
|
|
||||||
<?php if (!$client_url) { ?>
|
|
||||||
<td><a href="domains.php?client_id=<?php echo $client_id; ?>"><?php echo $client_name; ?></a></td>
|
|
||||||
<?php } ?>
|
|
||||||
<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/domain/domain_edit.php?<?= $client_url ?>&id=<?= $domain_id ?>">
|
|
||||||
<i class="fas fa-fw fa-edit mr-2"></i>Edit
|
|
||||||
</a>
|
|
||||||
<?php if ($session_user_role == 3) { ?>
|
|
||||||
<?php if ($domain_archived_at) { ?>
|
|
||||||
<div class="dropdown-divider"></div>
|
|
||||||
<a class="dropdown-item text-info confirm-link" href="post.php?unarchive_domain=<?php echo $domain_id; ?>">
|
|
||||||
<i class="fas fa-fw fa-redo mr-2"></i>Unarchive
|
|
||||||
</a>
|
|
||||||
<div class="dropdown-divider"></div>
|
|
||||||
<a class="dropdown-item text-danger text-bold confirm-link" href="post.php?delete_domain=<?php echo $domain_id; ?>">
|
|
||||||
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
|
||||||
</a>
|
|
||||||
<?php } else { ?>
|
|
||||||
<div class="dropdown-divider"></div>
|
|
||||||
<a class="dropdown-item text-danger confirm-link" href="post.php?archive_domain=<?php echo $domain_id; ?>">
|
|
||||||
<i class="fas fa-fw fa-archive mr-2"></i>Archive
|
|
||||||
</a>
|
|
||||||
<?php } ?>
|
|
||||||
<?php } ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
<?php require_once "../includes/filter_footer.php";
|
|
||||||
?>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<div class="card-body">
|
||||||
require_once "modals/domain/domain_export.php";
|
<form autocomplete="off">
|
||||||
?>
|
<?php if ($client_url) { ?>
|
||||||
|
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
||||||
|
<?php } ?>
|
||||||
|
<input type="hidden" name="archived" value="<?php echo $archived; ?>">
|
||||||
|
<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 Domains">
|
||||||
|
<div class="input-group-append">
|
||||||
|
<button class="btn btn-dark"><i class="fa fa-search"></i></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php if ($client_url) { ?>
|
||||||
|
<div class="col-md-2"></div>
|
||||||
|
<?php } else { ?>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<div class="input-group mb-3 mb-md-0">
|
||||||
|
<select class="form-control select2" name="client" onchange="this.form.submit()">
|
||||||
|
<option value="" <?php if ($client == "") { echo "selected"; } ?>>- All Clients -</option>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$sql_clients_filter = mysqli_query($mysqli, "
|
||||||
|
SELECT DISTINCT client_id, client_name
|
||||||
|
FROM clients
|
||||||
|
JOIN domains ON domain_client_id = client_id
|
||||||
|
WHERE $archive_query
|
||||||
|
$access_permission_query
|
||||||
|
ORDER BY client_name ASC
|
||||||
|
");
|
||||||
|
while ($row = mysqli_fetch_array($sql_clients_filter)) {
|
||||||
|
$client_id = intval($row['client_id']);
|
||||||
|
$client_name = nullable_htmlentities($row['client_name']);
|
||||||
|
?>
|
||||||
|
<option <?php if ($client == $client_id) { echo "selected"; } ?> value="<?php echo $client_id; ?>"><?php echo $client_name; ?></option>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="btn-group float-right">
|
||||||
|
<a href="?<?php echo $client_url; ?>archived=<?php if($archived == 1){ echo 0; } else { echo 1; } ?>"
|
||||||
|
class="btn btn-<?php if($archived == 1){ echo "primary"; } else { echo "default"; } ?>">
|
||||||
|
<i class="fa fa-fw fa-archive mr-2"></i>Archived
|
||||||
|
</a>
|
||||||
|
<div class="dropdown ml-2" id="bulkActionButton" hidden>
|
||||||
|
<button class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown">
|
||||||
|
<i class="fas fa-fw fa-layer-group mr-2"></i>Bulk Action (<span id="selectedCount">0</span>)
|
||||||
|
</button>
|
||||||
|
<div class="dropdown-menu">
|
||||||
|
<?php if ($archived) { ?>
|
||||||
|
<button class="dropdown-item text-info"
|
||||||
|
type="submit" form="bulkActions" name="bulk_unarchive_domains">
|
||||||
|
<i class="fas fa-fw fa-redo mr-2"></i>Unarchive
|
||||||
|
</button>
|
||||||
|
<div class="dropdown-divider"></div>
|
||||||
|
<button class="dropdown-item text-danger text-bold"
|
||||||
|
type="submit" form="bulkActions" name="bulk_delete_domains">
|
||||||
|
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
||||||
|
</button>
|
||||||
|
<?php } else { ?>
|
||||||
|
<button class="dropdown-item text-danger confirm-link"
|
||||||
|
type="submit" form="bulkActions" name="bulk_archive_domains">
|
||||||
|
<i class="fas fa-fw fa-archive mr-2"></i>Archive
|
||||||
|
</button>
|
||||||
|
<?php } ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<hr>
|
||||||
|
<div class="table-responsive-sm">
|
||||||
|
|
||||||
|
<form id="bulkActions" action="post.php" method="post">
|
||||||
|
<input type="hidden" name="csrf_token" value="<?php echo $_SESSION['csrf_token'] ?>">
|
||||||
|
<?php if ($client_url) { ?>
|
||||||
|
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
||||||
|
<?php } ?>
|
||||||
|
<table class="table table-striped table-borderless table-hover">
|
||||||
|
<thead class="text-dark <?php if ($num_rows[0] == 0) { echo "d-none"; } ?> text-nowrap">
|
||||||
|
<tr>
|
||||||
|
<td class="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=domain_name&order=<?php echo $disp; ?>">
|
||||||
|
Domain <?php if ($sort == 'domain_name') { echo $order_icon; } ?>
|
||||||
|
</a>
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
<a class="text-secondary" href="?<?php echo $url_query_strings_sort; ?>&sort=registrar_name&order=<?php echo $disp; ?>">
|
||||||
|
Registrar <?php if ($sort == 'registrar_name') { echo $order_icon; } ?>
|
||||||
|
</a>
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
<a class="text-secondary" href="?<?php echo $url_query_strings_sort; ?>&sort=webhost_name&order=<?php echo $disp; ?>">
|
||||||
|
Web Host <?php if ($sort == 'webhost_name') { echo $order_icon; } ?>
|
||||||
|
</a>
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
<a class="text-secondary" href="?<?php echo $url_query_strings_sort; ?>&sort=dnshost_name&order=<?php echo $disp; ?>">
|
||||||
|
DNS Host <?php if ($sort == 'dnshost_name') { echo $order_icon; } ?>
|
||||||
|
</a>
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
<a class="text-secondary" href="?<?php echo $url_query_strings_sort; ?>&sort=mailhost_name&order=<?php echo $disp; ?>">
|
||||||
|
Mail Host <?php if ($sort == 'mailhost_name') { echo $order_icon; } ?>
|
||||||
|
</a>
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
<a class="text-secondary" href="?<?php echo $url_query_strings_sort; ?>&sort=domain_expire&order=<?php echo $disp; ?>">
|
||||||
|
Expires <?php if ($sort == 'domain_expire') { echo $order_icon; } ?>
|
||||||
|
</a>
|
||||||
|
</th>
|
||||||
|
<?php if (!$client_url) { ?>
|
||||||
|
<th>
|
||||||
|
<a class="text-dark" href="?<?php echo $url_query_strings_sort; ?>&sort=client_name&order=<?php echo $disp; ?>">
|
||||||
|
Client <?php if ($sort == 'client_name') { echo $order_icon; } ?>
|
||||||
|
</a>
|
||||||
|
</th>
|
||||||
|
<?php } ?>
|
||||||
|
<th class="text-center">Action</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
while ($row = mysqli_fetch_array($sql)) {
|
||||||
|
$domain_id = intval($row['domain_id']);
|
||||||
|
$domain_name = nullable_htmlentities($row['domain_name']);
|
||||||
|
$domain_description = nullable_htmlentities($row['domain_description']);
|
||||||
|
$domain_expire = nullable_htmlentities($row['domain_expire']);
|
||||||
|
$domain_expire_ago = timeAgo($domain_expire);
|
||||||
|
// Convert the expiry date to a timestamp
|
||||||
|
$domain_expire_timestamp = strtotime($row['domain_expire'] ?? '');
|
||||||
|
$current_timestamp = time(); // Get current timestamp
|
||||||
|
|
||||||
|
// Calculate the difference in days
|
||||||
|
$days_until_expiry = ($domain_expire_timestamp - $current_timestamp) / (60 * 60 * 24);
|
||||||
|
|
||||||
|
// Determine the class based on the number of days until expiry
|
||||||
|
if ($days_until_expiry <= 0) {
|
||||||
|
$tr_class = "table-secondary";
|
||||||
|
} elseif ($days_until_expiry <= 14) {
|
||||||
|
$tr_class = "table-danger";
|
||||||
|
} elseif ($days_until_expiry <= 90) {
|
||||||
|
$tr_class = "table-warning";
|
||||||
|
} else {
|
||||||
|
$tr_class = '';
|
||||||
|
}
|
||||||
|
$domain_registrar_id = intval($row['registrar_id']);
|
||||||
|
$domain_webhost_id = intval($row['webhost_id']);
|
||||||
|
$domain_dnshost_id = intval($row['dnshost_id']);
|
||||||
|
$domain_mailhost_id = intval($row['mailhost_id']);
|
||||||
|
$domain_registrar_name = nullable_htmlentities($row['registrar_name']);
|
||||||
|
$domain_webhost_name = nullable_htmlentities($row['webhost_name']);
|
||||||
|
$domain_dnshost_name = nullable_htmlentities($row['dnshost_name']);
|
||||||
|
$domain_mailhost_name = nullable_htmlentities($row['mailhost_name']);
|
||||||
|
$domain_created_at = nullable_htmlentities($row['domain_created_at']);
|
||||||
|
$domain_archived_at = nullable_htmlentities($row['domain_archived_at']);
|
||||||
|
$client_id = intval($row['domain_client_id']);
|
||||||
|
$client_name = nullable_htmlentities($row['client_name']);
|
||||||
|
// Add - if empty on the table
|
||||||
|
$domain_registrar_name_display = $domain_registrar_name ? "
|
||||||
|
<a class='ajax-modal' href='#' data-modal-url='modals/vendor/vendor_details.php?id=$domain_registrar_id'>
|
||||||
|
$domain_registrar_name
|
||||||
|
</a>" : "-";
|
||||||
|
$domain_webhost_name_display = $domain_webhost_name ? "
|
||||||
|
<a class='ajax-modal' href='#' data-modal-url='modals/vendor/vendor_details.php?id=$domain_webhost_id'>
|
||||||
|
$domain_webhost_name
|
||||||
|
</a>" : "-";
|
||||||
|
$domain_dnshost_name_display = $domain_dnshost_name ? "
|
||||||
|
<a class='ajax-modal' href='#' data-modal-url='modals/vendor/vendor_details.php?id=$domain_dnshost_id'>
|
||||||
|
$domain_dnshost_name
|
||||||
|
</a>" : "-";
|
||||||
|
$domain_mailhost_name_display = $domain_mailhost_name ? "
|
||||||
|
<a class='ajax-modal' href='#' data-modal-url='modals/vendor/vendor_details.php?id=$domain_mailhost_id'>
|
||||||
|
$domain_mailhost_name
|
||||||
|
</a>" : "-";
|
||||||
|
|
||||||
|
?>
|
||||||
|
<tr class="<?php echo $tr_class; ?>">
|
||||||
|
<td class="pr-0">
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input bulk-select" type="checkbox" name="domain_ids[]" value="<?php echo $domain_id ?>">
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="">
|
||||||
|
<a class="text-dark ajax-modal" href="#"
|
||||||
|
data-modal-size="lg"
|
||||||
|
data-modal-url="modals/domain/domain_edit.php?<?= $client_url ?>&id=<?= $domain_id ?>">
|
||||||
|
<div class="media">
|
||||||
|
<i class="fa fa-fw fa-2x fa-globe mr-3"></i>
|
||||||
|
<div class="media-body">
|
||||||
|
<div><?php echo $domain_name; ?></div>
|
||||||
|
<div><small class="text-secondary"><?php echo $domain_description; ?></small></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
<td><?php echo $domain_registrar_name_display; ?></td>
|
||||||
|
<td><?php echo $domain_webhost_name_display; ?></td>
|
||||||
|
<td><?php echo $domain_dnshost_name_display; ?></td>
|
||||||
|
<td><?php echo $domain_mailhost_name_display; ?></td>
|
||||||
|
<td>
|
||||||
|
<div><?php echo $domain_expire ?: '-'; ?></div>
|
||||||
|
<?php if (!empty($domain_expire)) { ?>
|
||||||
|
<div><small><?php echo $domain_expire_ago; ?></small></div>
|
||||||
|
<?php } ?>
|
||||||
|
</td>
|
||||||
|
<?php if (!$client_url) { ?>
|
||||||
|
<td><a href="domains.php?client_id=<?php echo $client_id; ?>"><?php echo $client_name; ?></a></td>
|
||||||
|
<?php } ?>
|
||||||
|
<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/domain/domain_edit.php?<?= $client_url ?>&id=<?= $domain_id ?>">
|
||||||
|
<i class="fas fa-fw fa-edit mr-2"></i>Edit
|
||||||
|
</a>
|
||||||
|
<?php if ($session_user_role == 3) { ?>
|
||||||
|
<?php if ($domain_archived_at) { ?>
|
||||||
|
<div class="dropdown-divider"></div>
|
||||||
|
<a class="dropdown-item text-info confirm-link" href="post.php?unarchive_domain=<?php echo $domain_id; ?>">
|
||||||
|
<i class="fas fa-fw fa-redo mr-2"></i>Unarchive
|
||||||
|
</a>
|
||||||
|
<div class="dropdown-divider"></div>
|
||||||
|
<a class="dropdown-item text-danger text-bold confirm-link" href="post.php?delete_domain=<?php echo $domain_id; ?>">
|
||||||
|
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
||||||
|
</a>
|
||||||
|
<?php } else { ?>
|
||||||
|
<div class="dropdown-divider"></div>
|
||||||
|
<a class="dropdown-item text-danger confirm-link" href="post.php?archive_domain=<?php echo $domain_id; ?>">
|
||||||
|
<i class="fas fa-fw fa-archive mr-2"></i>Archive
|
||||||
|
</a>
|
||||||
|
<?php } ?>
|
||||||
|
<?php } ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<?php require_once "../includes/filter_footer.php"; ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<script src="../js/bulk_actions.js"></script>
|
<script src="../js/bulk_actions.js"></script>
|
||||||
|
|
||||||
<?php require_once "../includes/footer.php";
|
<?php require_once "../includes/footer.php";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
<button type="button" class="btn btn-primary ajax-modal" data-modal-url="modals/expense/expense_add.php" data-modal-size="lg"><i class="fas fa-plus mr-2"></i>New Expense</button>
|
<button type="button" class="btn btn-primary ajax-modal" data-modal-url="modals/expense/expense_add.php" data-modal-size="lg"><i class="fas fa-plus mr-2"></i>New Expense</button>
|
||||||
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportExpensesModal">
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/expense/expense_export.php">
|
||||||
<i class="fa fa-fw fa-download mr-2"></i>Export
|
<i class="fa fa-fw fa-download mr-2"></i>Export
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -357,5 +358,4 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
<script src="/js/bulk_actions.js"></script>
|
<script src="/js/bulk_actions.js"></script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
require_once "modals/expense/expense_export.php";
|
|
||||||
require_once "../includes/footer.php";
|
require_once "../includes/footer.php";
|
||||||
|
|
|
||||||
|
|
@ -162,10 +162,14 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
<h3 class="card-title mt-2"><i class="fa fa-fw fa-file-invoice mr-2"></i>Invoices</h3>
|
<h3 class="card-title mt-2"><i class="fa fa-fw fa-file-invoice mr-2"></i>Invoices</h3>
|
||||||
<div class="card-tools">
|
<div class="card-tools">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<button type="button" class="btn btn-primary ajax-modal" data-modal-url="modals/invoice/invoice_add.php?<?= $client_url ?>"><i class="fas fa-plus mr-2"></i>New Invoice</button>
|
<button type="button" class="btn btn-primary ajax-modal"
|
||||||
|
data-modal-url="modals/invoice/invoice_add.php?<?= $client_url ?>">
|
||||||
|
<i class="fas fa-plus mr-2"></i>New Invoice
|
||||||
|
</button>
|
||||||
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportInvoicesModal">
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/invoice/invoice_export.php?<?= $client_url ?>">
|
||||||
<i class="fa fa-fw fa-download mr-2"></i>Export
|
<i class="fa fa-fw fa-download mr-2"></i>Export
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -217,7 +221,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
<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">
|
||||||
<?php if ($client_url && $balance > 0) { ?>
|
<?php if ($client_url && $balance > 0) { ?>
|
||||||
<a class="dropdown-item ajax-modal" href="#"
|
<a class="dropdown-item ajax-modal" href="#"
|
||||||
data-modal-url="modals/payment/payment_bulk_add.php?<?= $client_url ?>">
|
data-modal-url="modals/payment/payment_bulk_add.php?<?= $client_url ?>">
|
||||||
<i class="fa fa-credit-card mr-2"></i>Batch Payment
|
<i class="fa fa-credit-card mr-2"></i>Batch Payment
|
||||||
|
|
@ -357,7 +361,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
// Saved Payment Methods
|
// Saved Payment Methods
|
||||||
$sql_saved_payment_methods = mysqli_query($mysqli, "
|
$sql_saved_payment_methods = mysqli_query($mysqli, "
|
||||||
SELECT * FROM client_saved_payment_methods
|
SELECT * FROM client_saved_payment_methods
|
||||||
LEFT JOIN payment_providers
|
LEFT JOIN payment_providers
|
||||||
ON client_saved_payment_methods.saved_payment_provider_id = payment_providers.payment_provider_id
|
ON client_saved_payment_methods.saved_payment_provider_id = payment_providers.payment_provider_id
|
||||||
WHERE saved_payment_client_id = $client_id
|
WHERE saved_payment_client_id = $client_id
|
||||||
AND payment_provider_active = 1;
|
AND payment_provider_active = 1;
|
||||||
|
|
@ -453,5 +457,4 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
<script src="../js/bulk_actions.js"></script>
|
<script src="../js/bulk_actions.js"></script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
require_once "modals/invoice/invoice_export.php";
|
|
||||||
require_once "../includes/footer.php";
|
require_once "../includes/footer.php";
|
||||||
|
|
|
||||||
|
|
@ -84,12 +84,14 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
</button>
|
</button>
|
||||||
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#importLocationModal">
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/location/location_import.php?<?= $client_url ?>">
|
||||||
<i class="fa fa-fw fa-upload mr-2"></i>Import
|
<i class="fa fa-fw fa-upload mr-2"></i>Import
|
||||||
</a>
|
</a>
|
||||||
<?php if ($num_rows[0] > 0) { ?>
|
<?php if ($num_rows[0] > 0) { ?>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportLocationModal">
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/location/location_export.php?<?= $client_url ?>">
|
||||||
<i class="fa fa-fw fa-download mr-2"></i>Export
|
<i class="fa fa-fw fa-download mr-2"></i>Export
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
@ -403,7 +405,4 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
<script src="../js/bulk_actions.js"></script>
|
<script src="../js/bulk_actions.js"></script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once "modals/location/location_import.php";
|
|
||||||
require_once "modals/location/location_export.php";
|
|
||||||
require_once "../includes/footer.php";
|
require_once "../includes/footer.php";
|
||||||
|
|
|
||||||
|
|
@ -1,26 +1,31 @@
|
||||||
<div class="modal" id="exportAssetModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
|
||||||
<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>
|
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
|
||||||
<span>×</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
|
||||||
<input type="hidden" name="csrf_token" value="<?php echo $_SESSION['csrf_token'] ?>">
|
|
||||||
<?php if ($client_url) { ?>
|
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
<div class="modal-body">
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
</div>
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="submit" name="export_assets_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
ob_start();
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
|
||||||
</div>
|
?>
|
||||||
</form>
|
|
||||||
</div>
|
<div class="modal-header bg-dark">
|
||||||
</div>
|
<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">
|
||||||
|
<span>×</span>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
|
|
||||||
|
<div class="modal-body">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="submit" name="export_assets_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
||||||
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|
|
||||||
|
|
@ -1,32 +1,37 @@
|
||||||
<div class="modal" id="importAssetModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
<h5 class="modal-title"><i class="fa fa-fw fa-desktop mr-2"></i>Import Assets</h5>
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
|
||||||
<span>×</span>
|
ob_start();
|
||||||
</button>
|
|
||||||
</div>
|
?>
|
||||||
<form action="post.php" method="post" enctype="multipart/form-data" autocomplete="off">
|
|
||||||
<input type="hidden" name="csrf_token" value="<?php echo $_SESSION['csrf_token'] ?>">
|
<div class="modal-header bg-dark">
|
||||||
|
<h5 class="modal-title"><i class="fa fa-fw fa-desktop mr-2"></i>Import Assets</h5>
|
||||||
<?php if ($client_url) { ?>
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
<span>×</span>
|
||||||
<?php } ?>
|
</button>
|
||||||
<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>
|
|
||||||
<hr>
|
|
||||||
<div class="form-group my-4">
|
|
||||||
<input type="file" class="form-control-file" name="file" accept=".csv" required>
|
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
<div>Download <a href="post.php?download_assets_csv_template=<?php echo $client_id; ?>">sample csv template</a></div>
|
|
||||||
<small class="text-muted">Note: Purchase date must be in the format YYYY-MM-DD. Spreadsheet tools may automatically reformat dates.</small>
|
|
||||||
</div>
|
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="submit" name="import_assets_csv" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Import</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<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="client_id" value="<?= $client_id ?>">
|
||||||
|
|
||||||
|
<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>
|
||||||
|
<hr>
|
||||||
|
<div class="form-group my-4">
|
||||||
|
<input type="file" class="form-control-file" name="file" accept=".csv" required>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div>Download <a href="post.php?download_assets_csv_template=<?php echo $client_id; ?>">sample csv template</a></div>
|
||||||
|
<small class="text-muted">Note: Purchase date must be in the format YYYY-MM-DD. Spreadsheet tools may automatically reformat dates.</small>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="submit" name="import_assets_csv" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Import</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,29 @@
|
||||||
<div class="modal" id="exportCertificateModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
|
||||||
<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>
|
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
|
||||||
<span>×</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
|
||||||
<?php if ($client_url) { ?>
|
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
|
||||||
<?php } ?>
|
|
||||||
<div class="modal-body">
|
|
||||||
|
|
||||||
</div>
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="submit" name="export_certificates_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
|
||||||
</div>
|
ob_start();
|
||||||
</form>
|
|
||||||
</div>
|
?>
|
||||||
</div>
|
|
||||||
|
<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>
|
||||||
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
|
<span>×</span>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
|
<div class="modal-body">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="submit" name="export_certificates_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
||||||
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,30 @@
|
||||||
<div class="modal" id="exportContactModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
|
||||||
<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>
|
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
|
||||||
<span>×</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
|
||||||
<?php if($client_url) { ?>
|
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
|
||||||
<?php } ?>
|
|
||||||
<div class="modal-body">
|
|
||||||
|
|
||||||
</div>
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="submit" name="export_contacts_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
|
||||||
</div>
|
ob_start();
|
||||||
</form>
|
|
||||||
</div>
|
?>
|
||||||
</div>
|
|
||||||
|
<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>
|
||||||
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
|
<span>×</span>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
|
|
||||||
|
<div class="modal-body">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="submit" name="export_contacts_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
||||||
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|
|
||||||
|
|
@ -1,30 +1,35 @@
|
||||||
<div class="modal" id="importContactModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
<h5 class="modal-title"><i class="fa fa-fw fa-users mr-2"></i>Import Contacts</h5>
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
|
||||||
<span>×</span>
|
ob_start();
|
||||||
</button>
|
|
||||||
</div>
|
?>
|
||||||
<form action="post.php" method="post" enctype="multipart/form-data" autocomplete="off">
|
|
||||||
<?php if($client_url) { ?>
|
<div class="modal-header bg-dark">
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
<h5 class="modal-title"><i class="fa fa-fw fa-users mr-2"></i>Import Contacts</h5>
|
||||||
<?php } ?>
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<div class="modal-body">
|
<span>×</span>
|
||||||
<p><strong>Format csv file with headings & data:</strong><br>Name, Title, Department, Email, Phone, Extension, Mobile, Location</p>
|
</button>
|
||||||
<hr>
|
|
||||||
<div class="form-group my-4">
|
|
||||||
<input type="file" class="form-control-file" name="file" accept=".csv" required>
|
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
<div>Download: <a class="text-bold" href="post.php?download_contacts_csv_template=<?php echo $client_id; ?>">sample csv template</a></div>
|
|
||||||
</div>
|
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="submit" name="import_contacts_csv" class="btn btn-primary text-strong"><i class="fas fa-upload mr-2"></i>Import</button>
|
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<form action="post.php" method="post" enctype="multipart/form-data" autocomplete="off">
|
||||||
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
|
<div class="modal-body">
|
||||||
|
<p><strong>Format csv file with headings & data:</strong><br>Name, Title, Department, Email, Phone, Extension, Mobile, Location</p>
|
||||||
|
<hr>
|
||||||
|
<div class="form-group my-4">
|
||||||
|
<input type="file" class="form-control-file" name="file" accept=".csv" required>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div>Download: <a class="text-bold" href="post.php?download_contacts_csv_template=<?php echo $client_id; ?>">sample csv template</a></div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="submit" name="import_contacts_csv" class="btn btn-primary text-strong"><i class="fas fa-upload mr-2"></i>Import</button>
|
||||||
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,30 @@
|
||||||
<div class="modal" id="exportCredentialModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
|
||||||
<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>
|
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
|
||||||
<span>×</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
|
||||||
<?php if ($client_url) { ?>
|
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
|
||||||
<?php } ?>
|
|
||||||
<div class="modal-body">
|
|
||||||
|
|
||||||
</div>
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="submit" name="export_credentials_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
|
||||||
</div>
|
ob_start();
|
||||||
</form>
|
|
||||||
</div>
|
?>
|
||||||
</div>
|
|
||||||
|
<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>
|
||||||
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
|
<span>×</span>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
|
|
||||||
|
<div class="modal-body">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="submit" name="export_credentials_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
||||||
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|
|
||||||
|
|
@ -1,30 +1,35 @@
|
||||||
<div class="modal" id="importCredentialModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
<h5 class="modal-title"><i class="fas fa-fw fa-key mr-2"></i>Import Credentials</h5>
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
|
||||||
<span>×</span>
|
ob_start();
|
||||||
</button>
|
|
||||||
</div>
|
?>
|
||||||
<form action="post.php" method="post" enctype="multipart/form-data" autocomplete="off">
|
|
||||||
<?php if ($client_url) { ?>
|
<div class="modal-header bg-dark">
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
<h5 class="modal-title"><i class="fas fa-fw fa-key mr-2"></i>Import Credentials</h5>
|
||||||
<?php } ?>
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<div class="modal-body">
|
<span>×</span>
|
||||||
<p><strong>Format csv file with headings & data:</strong><br>Name, Description, Username, Password, TOTP, URI</p>
|
</button>
|
||||||
<hr>
|
</div>
|
||||||
<div class="form-group my-4">
|
<form action="post.php" method="post" enctype="multipart/form-data" autocomplete="off">
|
||||||
<input type="file" class="form-control-file" name="file" accept=".csv" required>
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
</div>
|
<div class="modal-body">
|
||||||
<hr>
|
<p><strong>Format csv file with headings & data:</strong><br>Name, Description, Username, Password, TOTP, URI</p>
|
||||||
<div>Download <a class="text-bold" href="post.php?download_credentials_csv_template">sample csv template</a></div>
|
<hr>
|
||||||
</div>
|
<div class="form-group my-4">
|
||||||
<div class="modal-footer">
|
<input type="file" class="form-control-file" name="file" accept=".csv" required>
|
||||||
<button type="submit" name="import_credentials_csv" class="btn btn-primary"><i class="fa fa-upload mr-2"></i>Import</button>
|
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div>Download <a class="text-bold" href="post.php?download_credentials_csv_template">sample csv template</a></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="modal-footer">
|
||||||
|
<button type="submit" name="import_credentials_csv" class="btn btn-primary"><i class="fa fa-upload mr-2"></i>Import</button>
|
||||||
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,29 @@
|
||||||
<div class="modal" id="exportDomainModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
|
||||||
<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>
|
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
|
||||||
<span>×</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
|
||||||
<?php if ($client_url) { ?>
|
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
|
||||||
<?php } ?>
|
|
||||||
<div class="modal-body">
|
|
||||||
|
|
||||||
</div>
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="submit" name="export_domains_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
|
||||||
</div>
|
ob_start();
|
||||||
</form>
|
|
||||||
</div>
|
?>
|
||||||
</div>
|
|
||||||
|
<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>
|
||||||
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
|
<span>×</span>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
|
<div class="modal-body">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="submit" name="export_domains_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
||||||
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|
|
||||||
|
|
@ -1,114 +1,119 @@
|
||||||
<div class="modal" id="exportExpensesModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
|
||||||
<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>
|
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
|
||||||
<span>×</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
|
||||||
|
|
||||||
<div class="modal-body">
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
<div class="form-group">
|
ob_start();
|
||||||
<label>Account</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">
|
|
||||||
<option value="">- All Accounts -</option>
|
|
||||||
|
|
||||||
<?php
|
?>
|
||||||
$sql_accounts_filter = mysqli_query($mysqli, "SELECT * FROM accounts WHERE account_archived_at IS NULL ORDER BY account_name ASC");
|
|
||||||
while ($row = mysqli_fetch_array($sql_accounts_filter)) {
|
|
||||||
$account_id = intval($row['account_id']);
|
|
||||||
$account_name = nullable_htmlentities($row['account_name']);
|
|
||||||
?>
|
|
||||||
<option <?php if ($account_filter == $account_id) { echo "selected"; } ?> value="<?php echo $account_id; ?>"><?php echo $account_name; ?></option>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
</select>
|
<div class="modal-header bg-dark">
|
||||||
</div>
|
<h5 class="modal-title"><i class="fa fa-fw fa-download mr-2"></i>Exporting Expenses to CSV</h5>
|
||||||
</div>
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
|
<span>×</span>
|
||||||
<div class="form-group">
|
</button>
|
||||||
<label>Vendor</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="vendor">
|
|
||||||
<option value="">- All Vendors -</option>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
$sql_vendors_filter = mysqli_query($mysqli, "SELECT * FROM vendors WHERE vendor_client_id = 0 ORDER BY vendor_name ASC");
|
|
||||||
while ($row = mysqli_fetch_array($sql_vendors_filter)) {
|
|
||||||
$vendor_id = intval($row['vendor_id']);
|
|
||||||
$vendor_name = nullable_htmlentities($row['vendor_name']);
|
|
||||||
?>
|
|
||||||
<option <?php if ($vendor_filter == $vendor_id) { echo "selected"; } ?> value="<?php echo $vendor_id; ?>"><?php echo $vendor_name; ?></option>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<label>Category</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="category">
|
|
||||||
<option value="">- All Categories -</option>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
$sql_categories_filter = mysqli_query($mysqli, "SELECT * FROM categories WHERE category_type = 'Expense' ORDER BY category_name ASC");
|
|
||||||
while ($row = mysqli_fetch_array($sql_categories_filter)) {
|
|
||||||
$category_id = intval($row['category_id']);
|
|
||||||
$category_name = nullable_htmlentities($row['category_name']);
|
|
||||||
?>
|
|
||||||
<option <?php if ($category_filter == $category_id) { echo "selected"; } ?> value="<?php echo $category_id; ?>"><?php echo $category_name; ?></option>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<label>Date From</label>
|
|
||||||
<div class="input-group">
|
|
||||||
<div class="input-group-prepend">
|
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
|
|
||||||
</div>
|
|
||||||
<input type="date" class="form-control" name="date_from" max="2999-12-31" value="<?php echo nullable_htmlentities($dtf); ?>">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<label>Date To</label>
|
|
||||||
<div class="input-group">
|
|
||||||
<div class="input-group-prepend">
|
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
|
|
||||||
</div>
|
|
||||||
<input type="date" class="form-control" name="date_to" max="2999-12-31" value="<?php echo nullable_htmlentities($dtt); ?>">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="submit" name="export_expenses_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
|
|
||||||
|
<div class="modal-body">
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Account</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">
|
||||||
|
<option value="">- All Accounts -</option>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$sql_accounts_filter = mysqli_query($mysqli, "SELECT * FROM accounts WHERE account_archived_at IS NULL ORDER BY account_name ASC");
|
||||||
|
while ($row = mysqli_fetch_array($sql_accounts_filter)) {
|
||||||
|
$account_id = intval($row['account_id']);
|
||||||
|
$account_name = nullable_htmlentities($row['account_name']);
|
||||||
|
?>
|
||||||
|
<option <?php if ($account_filter == $account_id) { echo "selected"; } ?> value="<?= $account_id ?>"><?= $account_name ?></option>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Vendor</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="vendor">
|
||||||
|
<option value="">- All Vendors -</option>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$sql_vendors_filter = mysqli_query($mysqli, "SELECT * FROM vendors WHERE vendor_client_id = 0 ORDER BY vendor_name ASC");
|
||||||
|
while ($row = mysqli_fetch_array($sql_vendors_filter)) {
|
||||||
|
$vendor_id = intval($row['vendor_id']);
|
||||||
|
$vendor_name = nullable_htmlentities($row['vendor_name']);
|
||||||
|
?>
|
||||||
|
<option <?php if ($vendor_filter == $vendor_id) { echo "selected"; } ?> value="<?= $vendor_id ?>"><?= $vendor_name ?></option>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Category</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="category">
|
||||||
|
<option value="">- All Categories -</option>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$sql_categories_filter = mysqli_query($mysqli, "SELECT * FROM categories WHERE category_type = 'Expense' ORDER BY category_name ASC");
|
||||||
|
while ($row = mysqli_fetch_array($sql_categories_filter)) {
|
||||||
|
$category_id = intval($row['category_id']);
|
||||||
|
$category_name = nullable_htmlentities($row['category_name']);
|
||||||
|
?>
|
||||||
|
<option <?php if ($category_filter == $category_id) { echo "selected"; } ?> value="<?= $category_id ?>"><?= $category_name ?></option>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Date From</label>
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
|
||||||
|
</div>
|
||||||
|
<input type="date" class="form-control" name="date_from" max="2999-12-31">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Date To</label>
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
|
||||||
|
</div>
|
||||||
|
<input type="date" class="form-control" name="date_to" max="2999-12-31">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="submit" name="export_expenses_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
||||||
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|
|
||||||
|
|
@ -1,44 +1,49 @@
|
||||||
<div class="modal" id="exportInvoicesModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
|
||||||
<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>
|
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
|
||||||
<span>×</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
|
||||||
<?php if (isset($_GET['client_id'])) { ?>
|
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
|
||||||
<?php } ?>
|
|
||||||
<div class="modal-body">
|
|
||||||
|
|
||||||
<div class="form-group">
|
require_once '../../../includes/modal_header.php';
|
||||||
<label>Date From</label>
|
|
||||||
<div class="input-group">
|
|
||||||
<div class="input-group-prepend">
|
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
|
|
||||||
</div>
|
|
||||||
<input type="date" class="form-control" name="date_from" max="2999-12-31" value="<?php echo nullable_htmlentities($dtf); ?>">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
<label>Date To</label>
|
|
||||||
<div class="input-group">
|
|
||||||
<div class="input-group-prepend">
|
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
|
|
||||||
</div>
|
|
||||||
<input type="date" class="form-control" name="date_to" max="2999-12-31" value="<?php echo nullable_htmlentities($dtt); ?>">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
ob_start();
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="submit" name="export_invoices_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
?>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
|
||||||
</div>
|
<div class="modal-header bg-dark">
|
||||||
</form>
|
<h5 class="modal-title"><i class="fa fa-fw fa-download mr-2"></i>Export Invoices to CSV</h5>
|
||||||
</div>
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
</div>
|
<span>×</span>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
|
<div class="modal-body">
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Date From</label>
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
|
||||||
|
</div>
|
||||||
|
<input type="date" class="form-control" name="date_from" max="2999-12-31">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Date To</label>
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
|
||||||
|
</div>
|
||||||
|
<input type="date" class="form-control" name="date_to" max="2999-12-31">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="submit" name="export_invoices_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
||||||
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,29 @@
|
||||||
<div class="modal" id="exportLocationModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
|
||||||
<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>
|
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
|
||||||
<span>×</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
|
||||||
<?php if ($client_url) { ?>
|
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
|
||||||
<?php } ?>
|
|
||||||
<div class="modal-body">
|
|
||||||
|
|
||||||
</div>
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="submit" name="export_locations_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
|
||||||
</div>
|
ob_start();
|
||||||
</form>
|
|
||||||
</div>
|
?>
|
||||||
</div>
|
|
||||||
|
<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>
|
||||||
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
|
<span>×</span>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
|
<div class="modal-body">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="submit" name="export_locations_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
||||||
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|
|
||||||
|
|
@ -1,30 +1,36 @@
|
||||||
<div class="modal" id="importLocationModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
<h5 class="modal-title"><i class="fa fa-fw fa-map-marker-alt mr-2"></i>Import Locations</h5>
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
|
||||||
<span>×</span>
|
ob_start();
|
||||||
</button>
|
|
||||||
</div>
|
?>
|
||||||
<form action="post.php" method="post" enctype="multipart/form-data" autocomplete="off">
|
|
||||||
<?php if ($client_url) { ?>
|
<div class="modal-header bg-dark">
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
<h5 class="modal-title"><i class="fa fa-fw fa-map-marker-alt mr-2"></i>Import Locations</h5>
|
||||||
<?php } ?>
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<div class="modal-body">
|
<span>×</span>
|
||||||
<p><strong>Format csv file with headings & data:</strong><br>Name, Description, Address, City, State, Postal Code, Phone, Hours</p>
|
</button>
|
||||||
<hr>
|
</div>
|
||||||
<div class="form-group my-4">
|
<form action="post.php" method="post" enctype="multipart/form-data" autocomplete="off">
|
||||||
<input type="file" class="form-control-file" name="file" accept=".csv" required>
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
</div>
|
|
||||||
<hr>
|
<div class="modal-body">
|
||||||
<div>Download: <a class="text-bold" href="post.php?download_locations_csv_template=<?php echo $client_id; ?>">sample csv template</a></div>
|
<p><strong>Format csv file with headings & data:</strong><br>Name, Description, Address, City, State, Postal Code, Phone, Hours</p>
|
||||||
</div>
|
<hr>
|
||||||
<div class="modal-footer">
|
<div class="form-group my-4">
|
||||||
<button type="submit" name="import_locations_csv" class="btn btn-primary text-bold"><i class="fa fa-upload mr-2"></i>Import</button>
|
<input type="file" class="form-control-file" name="file" accept=".csv" required>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div>Download: <a class="text-bold" href="post.php?download_locations_csv_template=<?= $client_id ?>">sample csv template</a></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<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="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,29 @@
|
||||||
<div class="modal" id="exportNetworkModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
|
||||||
<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>
|
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
|
||||||
<span>×</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
|
||||||
<?php if ($client_url) { ?>
|
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
|
||||||
<?php } ?>
|
|
||||||
<div class="modal-body">
|
|
||||||
|
|
||||||
</div>
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="submit" name="export_networks_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
|
||||||
</div>
|
ob_start();
|
||||||
</form>
|
|
||||||
</div>
|
?>
|
||||||
</div>
|
|
||||||
|
<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>
|
||||||
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
|
<span>×</span>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
|
<div class="modal-body">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="submit" name="export_networks_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
||||||
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,30 @@
|
||||||
<div class="modal" id="exportPaymentModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Payments to CSV</h5>
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
|
||||||
<span>×</span>
|
ob_start();
|
||||||
</button>
|
|
||||||
</div>
|
?>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
|
||||||
<?php if (isset($_GET['client_id'])) { ?>
|
<div class="modal-header bg-dark">
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Payments to CSV</h5>
|
||||||
<?php } ?>
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<div class="modal-body">
|
<span>×</span>
|
||||||
|
</button>
|
||||||
</div>
|
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="submit" name="export_payments_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
|
|
||||||
|
<div class="modal-body">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="submit" name="export_payments_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
||||||
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,26 @@
|
||||||
<div class="modal" id="exportProductsModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
|
||||||
<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>
|
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
|
||||||
<span>×</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
|
||||||
<div class="modal-body">
|
|
||||||
|
|
||||||
</div>
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="submit" name="export_products_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
ob_start();
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
|
||||||
</div>
|
?>
|
||||||
</form>
|
|
||||||
</div>
|
<div class="modal-header bg-dark">
|
||||||
</div>
|
<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">
|
||||||
|
<span>×</span>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
|
<div class="modal-body">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="submit" name="export_products_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
||||||
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,30 @@
|
||||||
<div class="modal" id="exportQuoteModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
|
||||||
<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>
|
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
|
||||||
<span>×</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
|
||||||
<?php if(isset($_GET['client_id'])) { ?>
|
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
|
||||||
<?php } ?>
|
|
||||||
<div class="modal-body">
|
|
||||||
|
|
||||||
</div>
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="submit" name="export_quotes_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
|
||||||
</div>
|
ob_start();
|
||||||
</form>
|
|
||||||
</div>
|
?>
|
||||||
</div>
|
|
||||||
|
<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>
|
||||||
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
|
<span>×</span>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
|
|
||||||
|
<div class="modal-body">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="submit" name="export_quotes_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
||||||
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|
|
||||||
|
|
@ -1,71 +1,78 @@
|
||||||
<div class="modal" id="addSoftwareFromTemplateModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
<h5 class="modal-title"><i class="fa fa-fw fa-cube mr-2"></i>New License from Template</h5>
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
|
||||||
<span>×</span>
|
ob_start();
|
||||||
</button>
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
|
<h5 class="modal-title"><i class="fa fa-fw fa-cube mr-2"></i>New License from Template</h5>
|
||||||
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
|
<span>×</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
|
<div class="modal-body">
|
||||||
|
|
||||||
|
<?php if ($client_id) { ?>
|
||||||
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
|
<?php } else { ?>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Client <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-user"></i></span>
|
||||||
|
</div>
|
||||||
|
<select class="form-control select2" name="client_id" required>
|
||||||
|
<option value="">- Select Client -</option>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$sql = mysqli_query($mysqli, "SELECT client_id, client_name FROM clients WHERE client_archived_at IS NULL $access_permission_query ORDER BY client_name ASC");
|
||||||
|
while ($row = mysqli_fetch_array($sql)) {
|
||||||
|
$client_id_select = intval($row['client_id']);
|
||||||
|
$client_name_select = nullable_htmlentities($row['client_name']); ?>
|
||||||
|
<option value="<?= $client_id_select ?>"><?= $client_name_select ?></option>
|
||||||
|
|
||||||
|
<?php } ?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
|
||||||
<div class="modal-body">
|
|
||||||
|
|
||||||
<?php if ($client_url) { ?>
|
<?php } ?>
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
|
||||||
<?php } else { ?>
|
|
||||||
|
|
||||||
<div class="form-group">
|
<label>Template</label>
|
||||||
<label>Client <strong class="text-danger">*</strong></label>
|
<div class="form-group">
|
||||||
<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-user"></i></span>
|
<span class="input-group-text"><i class="fa fa-fw fa-puzzle-piece"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<select class="form-control select2" name="client_id" required>
|
<select class="form-control" name="software_template_id" required>
|
||||||
<option value="">- Select Client -</option>
|
<option value="">- Select Template -</option>
|
||||||
<?php
|
<?php
|
||||||
|
$sql_software_templates = mysqli_query($mysqli, "SELECT * FROM software_templates WHERE software_template_archived_at IS NULL ORDER BY software_template_name ASC");
|
||||||
$sql = mysqli_query($mysqli, "SELECT client_id, client_name FROM clients WHERE client_archived_at IS NULL $access_permission_query ORDER BY client_name ASC");
|
while ($row = mysqli_fetch_array($sql_software_templates)) {
|
||||||
while ($row = mysqli_fetch_array($sql)) {
|
$software_template_id = intval($row['software_template_id']);
|
||||||
$client_id = intval($row['client_id']);
|
$software_template_name = nullable_htmlentities($row['software_template_name']);
|
||||||
$client_name = nullable_htmlentities($row['client_name']); ?>
|
|
||||||
<option <?php if ($client_id == isset($_GET['client'])) { echo "selected"; } ?> value="<?php echo $client_id; ?>"><?php echo $client_name; ?></option>
|
|
||||||
|
|
||||||
<?php } ?>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
?>
|
||||||
|
<option value="<?php echo $software_template_id ?>"><?php echo $software_template_name; ?></option>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<label>Template</label>
|
</select>
|
||||||
<div class="form-group">
|
</div>
|
||||||
<div class="input-group">
|
|
||||||
<div class="input-group-prepend">
|
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-puzzle-piece"></i></span>
|
|
||||||
</div>
|
|
||||||
<select class="form-control" name="software_template_id" required>
|
|
||||||
<option value="">- Select Template -</option>
|
|
||||||
<?php
|
|
||||||
$sql_software_templates = mysqli_query($mysqli, "SELECT * FROM software_templates WHERE software_template_archived_at IS NULL ORDER BY software_template_name ASC");
|
|
||||||
while ($row = mysqli_fetch_array($sql_software_templates)) {
|
|
||||||
$software_template_id = intval($row['software_template_id']);
|
|
||||||
$software_template_name = nullable_htmlentities($row['software_template_name']);
|
|
||||||
|
|
||||||
?>
|
|
||||||
<option value="<?php echo $software_template_id ?>"><?php echo $software_template_name; ?></option>
|
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="submit" name="add_software_from_template" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Create</button>
|
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="submit" name="add_software_from_template" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Create</button>
|
||||||
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,30 @@
|
||||||
<div class="modal" id="exportSoftwareModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Licenses to CSV</h5>
|
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
|
||||||
<span>×</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
|
||||||
<?php if($client_url) { ?>
|
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
|
||||||
<?php } ?>
|
|
||||||
<div class="modal-body">
|
|
||||||
|
|
||||||
</div>
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="submit" name="export_software_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
|
||||||
</div>
|
ob_start();
|
||||||
</form>
|
|
||||||
</div>
|
?>
|
||||||
</div>
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
|
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Licenses to CSV</h5>
|
||||||
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
|
<span>×</span>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
|
|
||||||
|
<div class="modal-body">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="submit" name="export_software_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
||||||
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,29 @@
|
||||||
<div class="modal" id="exportTicketModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Tickets to CSV</h5>
|
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
|
||||||
<span>×</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
|
||||||
<?php if (isset($_GET['client_id'])) { ?>
|
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
|
||||||
<?php } ?>
|
|
||||||
<div class="modal-body">
|
|
||||||
|
|
||||||
</div>
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="submit" name="export_tickets_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
|
||||||
</div>
|
ob_start();
|
||||||
</form>
|
|
||||||
</div>
|
?>
|
||||||
</div>
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
|
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Tickets to CSV</h5>
|
||||||
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
|
<span>×</span>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
|
<div class="modal-body">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="submit" name="export_tickets_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
||||||
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|
|
||||||
|
|
@ -1,44 +1,49 @@
|
||||||
<div class="modal" id="exportTripsModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Trips to CSV</h5>
|
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
|
||||||
<span>×</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
|
||||||
<?php if (isset($_GET['client_id'])) { ?>
|
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
|
||||||
<?php } ?>
|
|
||||||
<div class="modal-body">
|
|
||||||
|
|
||||||
<div class="form-group">
|
require_once '../../../includes/modal_header.php';
|
||||||
<label>Date From</label>
|
|
||||||
<div class="input-group">
|
|
||||||
<div class="input-group-prepend">
|
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
|
|
||||||
</div>
|
|
||||||
<input type="date" class="form-control" name="date_from" max="2999-12-31" value="<?php echo nullable_htmlentities($dtf); ?>">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
<label>Date To</label>
|
|
||||||
<div class="input-group">
|
|
||||||
<div class="input-group-prepend">
|
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
|
|
||||||
</div>
|
|
||||||
<input type="date" class="form-control" name="date_to" max="2999-12-31" value="<?php echo nullable_htmlentities($dtt); ?>">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
ob_start();
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="submit" name="export_trips_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
?>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
|
||||||
</div>
|
<div class="modal-header bg-dark">
|
||||||
</form>
|
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Trips to CSV</h5>
|
||||||
</div>
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
</div>
|
<span>×</span>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
|
<div class="modal-body">
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Date From</label>
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
|
||||||
|
</div>
|
||||||
|
<input type="date" class="form-control" name="date_from" max="2999-12-31">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Date To</label>
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
|
||||||
|
</div>
|
||||||
|
<input type="date" class="form-control" name="date_to" max="2999-12-31">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="submit" name="export_trips_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
||||||
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|
|
||||||
|
|
@ -1,47 +1,54 @@
|
||||||
<div class="modal" id="addVendorFromTemplateModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
<h5 class="modal-title"><i class="fas fa-fw fa-building mr-2"></i>New Vendor from Template</h5>
|
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
|
||||||
<span>×</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
|
||||||
|
|
||||||
<input type="hidden" name="client_id" value="<?php if (isset($_GET['client_id'])) { echo $client_id; } else { echo 0; } ?>">
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
<div class="modal-body">
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
|
|
||||||
<label>Template</label>
|
ob_start();
|
||||||
<div class="form-group">
|
|
||||||
<div class="input-group">
|
|
||||||
<div class="input-group-prepend">
|
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-puzzle-piece"></i></span>
|
|
||||||
</div>
|
|
||||||
<select class="form-control" name="vendor_template_id" required>
|
|
||||||
<option value="">- Select Template -</option>
|
|
||||||
<?php
|
|
||||||
$sql_vendor_templates = mysqli_query($mysqli, "SELECT * FROM vendor_templates WHERE vendor_template_archived_at IS NULL ORDER BY vendor_template_name ASC");
|
|
||||||
while ($row = mysqli_fetch_array($sql_vendor_templates)) {
|
|
||||||
$vendor_template_id = intval($row['vendor_template_id']);
|
|
||||||
$vendor_template_name = nullable_htmlentities($row['vendor_template_name']);
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<option value="<?php echo $vendor_template_id ?>"><?php echo $vendor_template_name; ?></option>
|
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
</select>
|
<div class="modal-header bg-dark">
|
||||||
</div>
|
<h5 class="modal-title"><i class="fas fa-fw fa-building mr-2"></i>New Vendor from Template</h5>
|
||||||
</div>
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
|
<span>×</span>
|
||||||
</div>
|
</button>
|
||||||
|
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="submit" name="add_vendor_from_template" class="btn btn-primary text-bold"><i class="fas fa-check mr-2"></i>Create Vendor</button>
|
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
|
|
||||||
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
|
|
||||||
|
<div class="modal-body">
|
||||||
|
|
||||||
|
<label>Template</label>
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text"><i class="fa fa-fw fa-puzzle-piece"></i></span>
|
||||||
|
</div>
|
||||||
|
<select class="form-control" name="vendor_template_id" required>
|
||||||
|
<option value="">- Select Template -</option>
|
||||||
|
<?php
|
||||||
|
$sql_vendor_templates = mysqli_query($mysqli, "SELECT * FROM vendor_templates WHERE vendor_template_archived_at IS NULL ORDER BY vendor_template_name ASC");
|
||||||
|
while ($row = mysqli_fetch_array($sql_vendor_templates)) {
|
||||||
|
$vendor_template_id = intval($row['vendor_template_id']);
|
||||||
|
$vendor_template_name = nullable_htmlentities($row['vendor_template_name']);
|
||||||
|
|
||||||
|
?>
|
||||||
|
<option value="<?= $vendor_template_id ?>"><?= $vendor_template_name ?></option>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="submit" name="add_vendor_from_template" class="btn btn-primary text-bold"><i class="fas fa-check mr-2"></i>Create Vendor</button>
|
||||||
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,30 @@
|
||||||
<div class="modal" id="exportVendorModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Vendors to CSV</h5>
|
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
|
||||||
<span>×</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
|
||||||
<?php if(isset($_GET['client_id'])) { ?>
|
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
|
||||||
<?php } ?>
|
|
||||||
<div class="modal-body">
|
|
||||||
|
|
||||||
</div>
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="submit" name="export_vendors_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
$client_id = intval($_GET['client_id'] ?? 0);
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
|
||||||
</div>
|
ob_start();
|
||||||
</form>
|
|
||||||
</div>
|
?>
|
||||||
</div>
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
|
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Vendors to CSV</h5>
|
||||||
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
|
<span>×</span>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
|
|
||||||
|
<div class="modal-body">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="submit" name="export_vendors_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
||||||
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
<?php if ($num_rows[0] > 0) { ?>
|
<?php if ($num_rows[0] > 0) { ?>
|
||||||
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportNetworkModal">
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/network/network_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>
|
||||||
|
|
@ -108,7 +109,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php if ($client_url) { ?>
|
<?php if ($client_url) { ?>
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<select class="form-control select2" name="location" onchange="this.form.submit()">
|
<select class="form-control select2" name="location" onchange="this.form.submit()">
|
||||||
|
|
@ -118,7 +119,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
$sql_locations_filter = mysqli_query($mysqli, "
|
$sql_locations_filter = mysqli_query($mysqli, "
|
||||||
SELECT DISTINCT location_id, location_name
|
SELECT DISTINCT location_id, location_name
|
||||||
FROM locations
|
FROM locations
|
||||||
WHERE location_client_id = $client_id
|
WHERE location_client_id = $client_id
|
||||||
AND ( EXISTS (SELECT 1 FROM networks WHERE network_location_id = location_id AND $archive_query) OR location_id = $location_filter)
|
AND ( EXISTS (SELECT 1 FROM networks WHERE network_location_id = location_id AND $archive_query) OR location_id = $location_filter)
|
||||||
ORDER BY location_name ASC
|
ORDER BY location_name ASC
|
||||||
");
|
");
|
||||||
|
|
@ -142,7 +143,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$sql_clients_filter = mysqli_query($mysqli, "
|
$sql_clients_filter = mysqli_query($mysqli, "
|
||||||
SELECT DISTINCT client_id, client_name
|
SELECT DISTINCT client_id, client_name
|
||||||
FROM clients
|
FROM clients
|
||||||
JOIN networks ON network_client_id = client_id
|
JOIN networks ON network_client_id = client_id
|
||||||
WHERE $archive_query
|
WHERE $archive_query
|
||||||
|
|
@ -165,7 +166,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
|
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="btn-group float-right">
|
<div class="btn-group float-right">
|
||||||
<a href="?<?php echo $client_url; ?>archived=<?php if($archived == 1){ echo 0; } else { echo 1; } ?>"
|
<a href="?<?php echo $client_url; ?>archived=<?php if($archived == 1){ echo 0; } else { echo 1; } ?>"
|
||||||
class="btn btn-<?php if($archived == 1){ echo "primary"; } else { echo "default"; } ?>">
|
class="btn btn-<?php if($archived == 1){ echo "primary"; } else { echo "default"; } ?>">
|
||||||
<i class="fa fa-fw fa-archive mr-2"></i>Archived
|
<i class="fa fa-fw fa-archive mr-2"></i>Archived
|
||||||
</a>
|
</a>
|
||||||
|
|
@ -352,16 +353,10 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<?php require_once "../includes/filter_footer.php";
|
<?php require_once "../includes/filter_footer.php"; ?>
|
||||||
?>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
|
||||||
require_once "modals/network/network_export.php";
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<script src="../js/bulk_actions.js"></script>
|
<script src="../js/bulk_actions.js"></script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,10 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
<h3 class="card-title mt-2"><i class="fas fa-fw fa-credit-card mr-2"></i>Payments</h3>
|
<h3 class="card-title mt-2"><i class="fas fa-fw fa-credit-card mr-2"></i>Payments</h3>
|
||||||
<?php if ($num_rows[0] > 0) { ?>
|
<?php if ($num_rows[0] > 0) { ?>
|
||||||
<div class="card-tools">
|
<div class="card-tools">
|
||||||
<button type="button" class="btn btn-default" data-toggle="modal" data-target="#exportPaymentModal"><i class="fa fa-fw fa-download mr-2"></i>Export</button>
|
<button type="button" class="btn btn-default ajax-modal"
|
||||||
|
data-modal-url="modals/payment/payment_export.php?<?= $client_url ?>">
|
||||||
|
<i class="fa fa-fw fa-download mr-2"></i>Export
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -253,9 +256,9 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
@ -267,5 +270,4 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
require_once "modals/payment/payment_export.php";
|
|
||||||
require_once "../includes/footer.php";
|
require_once "../includes/footer.php";
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ defined('FROM_POST_HANDLER') || die("Direct file access is not allowed");
|
||||||
if (isset($_POST['add_asset'])) {
|
if (isset($_POST['add_asset'])) {
|
||||||
|
|
||||||
validateCSRFToken($_POST['csrf_token']);
|
validateCSRFToken($_POST['csrf_token']);
|
||||||
|
|
||||||
enforceUserPermission('module_support', 2);
|
enforceUserPermission('module_support', 2);
|
||||||
|
|
||||||
require_once 'asset_model.php';
|
require_once 'asset_model.php';
|
||||||
|
|
@ -77,9 +77,9 @@ if (isset($_POST['add_asset'])) {
|
||||||
if (isset($_POST['edit_asset'])) {
|
if (isset($_POST['edit_asset'])) {
|
||||||
|
|
||||||
validateCSRFToken($_POST['csrf_token']);
|
validateCSRFToken($_POST['csrf_token']);
|
||||||
|
|
||||||
enforceUserPermission('module_support', 2);
|
enforceUserPermission('module_support', 2);
|
||||||
|
|
||||||
require_once 'asset_model.php';
|
require_once 'asset_model.php';
|
||||||
$asset_id = intval($_POST['asset_id']);
|
$asset_id = intval($_POST['asset_id']);
|
||||||
|
|
||||||
|
|
@ -139,7 +139,7 @@ if (isset($_POST['edit_asset'])) {
|
||||||
if (isset($_GET['archive_asset'])) {
|
if (isset($_GET['archive_asset'])) {
|
||||||
|
|
||||||
validateCSRFToken($_GET['csrf_token']);
|
validateCSRFToken($_GET['csrf_token']);
|
||||||
|
|
||||||
enforceUserPermission('module_support', 2);
|
enforceUserPermission('module_support', 2);
|
||||||
|
|
||||||
$asset_id = intval($_GET['archive_asset']);
|
$asset_id = intval($_GET['archive_asset']);
|
||||||
|
|
@ -163,7 +163,7 @@ if (isset($_GET['archive_asset'])) {
|
||||||
if (isset($_GET['unarchive_asset'])) {
|
if (isset($_GET['unarchive_asset'])) {
|
||||||
|
|
||||||
validateCSRFToken($_GET['csrf_token']);
|
validateCSRFToken($_GET['csrf_token']);
|
||||||
|
|
||||||
enforceUserPermission('module_support', 2);
|
enforceUserPermission('module_support', 2);
|
||||||
|
|
||||||
$asset_id = intval($_GET['unarchive_asset']);
|
$asset_id = intval($_GET['unarchive_asset']);
|
||||||
|
|
@ -187,7 +187,7 @@ if (isset($_GET['unarchive_asset'])) {
|
||||||
if (isset($_GET['delete_asset'])) {
|
if (isset($_GET['delete_asset'])) {
|
||||||
|
|
||||||
validateCSRFToken($_GET['csrf_token']);
|
validateCSRFToken($_GET['csrf_token']);
|
||||||
|
|
||||||
enforceUserPermission('module_support', 3);
|
enforceUserPermission('module_support', 3);
|
||||||
|
|
||||||
$asset_id = intval($_GET['delete_asset']);
|
$asset_id = intval($_GET['delete_asset']);
|
||||||
|
|
@ -255,9 +255,9 @@ if (isset($_POST['bulk_assign_asset_tags'])) {
|
||||||
if (isset($_POST['bulk_assign_asset_location'])) {
|
if (isset($_POST['bulk_assign_asset_location'])) {
|
||||||
|
|
||||||
validateCSRFToken($_POST['csrf_token']);
|
validateCSRFToken($_POST['csrf_token']);
|
||||||
|
|
||||||
enforceUserPermission('module_support', 2);
|
enforceUserPermission('module_support', 2);
|
||||||
|
|
||||||
$location_id = intval($_POST['bulk_location_id']);
|
$location_id = intval($_POST['bulk_location_id']);
|
||||||
|
|
||||||
// Get Location name and client id for logging and alert
|
// Get Location name and client id for logging and alert
|
||||||
|
|
@ -538,7 +538,7 @@ if (isset($_POST['bulk_unarchive_assets'])) {
|
||||||
validateCSRFToken($_POST['csrf_token']);
|
validateCSRFToken($_POST['csrf_token']);
|
||||||
|
|
||||||
enforceUserPermission('module_support', 2);
|
enforceUserPermission('module_support', 2);
|
||||||
|
|
||||||
if (isset($_POST['asset_ids'])) {
|
if (isset($_POST['asset_ids'])) {
|
||||||
|
|
||||||
$count = count($_POST['asset_ids']);
|
$count = count($_POST['asset_ids']);
|
||||||
|
|
@ -824,7 +824,7 @@ if (isset($_POST["import_assets_csv"])) {
|
||||||
validateCSRFToken($_POST['csrf_token']);
|
validateCSRFToken($_POST['csrf_token']);
|
||||||
|
|
||||||
enforceUserPermission('module_support', 2);
|
enforceUserPermission('module_support', 2);
|
||||||
|
|
||||||
$client_id = intval($_POST['client_id']);
|
$client_id = intval($_POST['client_id']);
|
||||||
$file_name = $_FILES["file"]["tmp_name"];
|
$file_name = $_FILES["file"]["tmp_name"];
|
||||||
|
|
||||||
|
|
@ -973,9 +973,9 @@ if (isset($_POST["import_assets_csv"])) {
|
||||||
logAction("Asset", "Import", "$session_name imported $row_count asset(s) via CSV file", $client_id);
|
logAction("Asset", "Import", "$session_name imported $row_count asset(s) via CSV file", $client_id);
|
||||||
|
|
||||||
flash_alert("$row_count Asset(s) added, $duplicate_count duplicate(s) detected");
|
flash_alert("$row_count Asset(s) added, $duplicate_count duplicate(s) detected");
|
||||||
|
|
||||||
redirect();
|
redirect();
|
||||||
|
|
||||||
}
|
}
|
||||||
//Check for any errors, if there are notify user and redirect
|
//Check for any errors, if there are notify user and redirect
|
||||||
if ($error) {
|
if ($error) {
|
||||||
|
|
@ -985,7 +985,7 @@ if (isset($_POST["import_assets_csv"])) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_GET['download_assets_csv_template'])) {
|
if (isset($_GET['download_assets_csv_template'])) {
|
||||||
|
|
||||||
$client_id = intval($_GET['download_assets_csv_template']);
|
$client_id = intval($_GET['download_assets_csv_template']);
|
||||||
|
|
||||||
//get records from database
|
//get records from database
|
||||||
|
|
@ -1023,7 +1023,7 @@ if (isset($_POST['export_assets_csv'])) {
|
||||||
|
|
||||||
enforceUserPermission('module_support');
|
enforceUserPermission('module_support');
|
||||||
|
|
||||||
if (isset($_POST['client_id'])) {
|
if ($_POST['client_id']) {
|
||||||
$client_id = intval($_POST['client_id']);
|
$client_id = intval($_POST['client_id']);
|
||||||
$client_query = "AND asset_client_id = $client_id";
|
$client_query = "AND asset_client_id = $client_id";
|
||||||
|
|
||||||
|
|
@ -1093,8 +1093,8 @@ if (isset($_POST['add_asset_interface'])) {
|
||||||
|
|
||||||
// 3) Fetch asset info for logging and alert
|
// 3) Fetch asset info for logging and alert
|
||||||
$sql = mysqli_query($mysqli, "
|
$sql = mysqli_query($mysqli, "
|
||||||
SELECT asset_name, asset_client_id
|
SELECT asset_name, asset_client_id
|
||||||
FROM assets
|
FROM assets
|
||||||
WHERE asset_id = $asset_id
|
WHERE asset_id = $asset_id
|
||||||
");
|
");
|
||||||
$row = mysqli_fetch_array($sql);
|
$row = mysqli_fetch_array($sql);
|
||||||
|
|
@ -1146,7 +1146,7 @@ if (isset($_POST['add_asset_interface'])) {
|
||||||
|
|
||||||
// 7) Alert message + redirect
|
// 7) Alert message + redirect
|
||||||
flash_alert("Interface <strong>$name</strong> created");
|
flash_alert("Interface <strong>$name</strong> created");
|
||||||
|
|
||||||
redirect();
|
redirect();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1156,7 +1156,7 @@ if (isset($_POST['add_asset_multiple_interfaces'])) {
|
||||||
validateCSRFToken($_POST['csrf_token']);
|
validateCSRFToken($_POST['csrf_token']);
|
||||||
|
|
||||||
enforceUserPermission('module_support', 2);
|
enforceUserPermission('module_support', 2);
|
||||||
|
|
||||||
$asset_id = intval($_POST['asset_id']);
|
$asset_id = intval($_POST['asset_id']);
|
||||||
$interface_start = intval($_POST['interface_start']);
|
$interface_start = intval($_POST['interface_start']);
|
||||||
$interfaces = intval($_POST['interfaces']);
|
$interfaces = intval($_POST['interfaces']);
|
||||||
|
|
@ -1189,9 +1189,9 @@ if (isset($_POST['add_asset_multiple_interfaces'])) {
|
||||||
}
|
}
|
||||||
|
|
||||||
logAction("Asset Interface", "Bulk Create", "$session_name created $interfaces for asset $asset_name", $client_id, $asset_id);
|
logAction("Asset Interface", "Bulk Create", "$session_name created $interfaces for asset $asset_name", $client_id, $asset_id);
|
||||||
|
|
||||||
flash_alert("Created <strong>$interfaces</strong> Interface(s) for asset <strong>$asset_name</strong>");
|
flash_alert("Created <strong>$interfaces</strong> Interface(s) for asset <strong>$asset_name</strong>");
|
||||||
|
|
||||||
redirect();
|
redirect();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1210,7 +1210,7 @@ if (isset($_POST['edit_asset_interface'])) {
|
||||||
// 1) Get Asset Name and Client ID for logging and alert message
|
// 1) Get Asset Name and Client ID for logging and alert message
|
||||||
$sql = mysqli_query($mysqli, "
|
$sql = mysqli_query($mysqli, "
|
||||||
SELECT asset_name, asset_client_id, asset_id
|
SELECT asset_name, asset_client_id, asset_id
|
||||||
FROM asset_interfaces
|
FROM asset_interfaces
|
||||||
LEFT JOIN assets ON asset_id = interface_asset_id
|
LEFT JOIN assets ON asset_id = interface_asset_id
|
||||||
WHERE interface_id = $interface_id
|
WHERE interface_id = $interface_id
|
||||||
");
|
");
|
||||||
|
|
@ -1228,7 +1228,7 @@ if (isset($_POST['edit_asset_interface'])) {
|
||||||
interface_mac = '$mac',
|
interface_mac = '$mac',
|
||||||
interface_ip = '$ip',
|
interface_ip = '$ip',
|
||||||
interface_nat_ip = '$nat_ip',
|
interface_nat_ip = '$nat_ip',
|
||||||
interface_ipv6 = '$ipv6',
|
interface_ipv6 = '$ipv6',
|
||||||
interface_notes = '$notes',
|
interface_notes = '$notes',
|
||||||
interface_network_id = $network
|
interface_network_id = $network
|
||||||
WHERE interface_id = $interface_id
|
WHERE interface_id = $interface_id
|
||||||
|
|
@ -1270,7 +1270,7 @@ if (isset($_POST['edit_asset_interface'])) {
|
||||||
|
|
||||||
// 6) Alert and redirect
|
// 6) Alert and redirect
|
||||||
flash_alert("Interface <strong>$name</strong> edited");
|
flash_alert("Interface <strong>$name</strong> edited");
|
||||||
|
|
||||||
redirect();
|
redirect();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1336,7 +1336,7 @@ if (isset($_POST['bulk_edit_asset_interface_type'])) {
|
||||||
// Get Asset Name and Client ID for logging and alert message
|
// Get Asset Name and Client ID for logging and alert message
|
||||||
$sql = mysqli_query($mysqli, "
|
$sql = mysqli_query($mysqli, "
|
||||||
SELECT asset_name, asset_client_id, asset_id
|
SELECT asset_name, asset_client_id, asset_id
|
||||||
FROM asset_interfaces
|
FROM asset_interfaces
|
||||||
LEFT JOIN assets ON asset_id = interface_asset_id
|
LEFT JOIN assets ON asset_id = interface_asset_id
|
||||||
WHERE interface_id = $interface_id
|
WHERE interface_id = $interface_id
|
||||||
");
|
");
|
||||||
|
|
@ -1350,13 +1350,13 @@ if (isset($_POST['bulk_edit_asset_interface_type'])) {
|
||||||
|
|
||||||
logAction("Asset Interface", "Edit", "$session_name set interface type to $type for asset $asset_name", $client_id, $asset_id);
|
logAction("Asset Interface", "Edit", "$session_name set interface type to $type for asset $asset_name", $client_id, $asset_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
logAction("Asset Interface", "Bulk Edit", "$session_name set interface type to $type on $interface_count interfaces for asset $asset_name", $client_id);
|
logAction("Asset Interface", "Bulk Edit", "$session_name set interface type to $type on $interface_count interfaces for asset $asset_name", $client_id);
|
||||||
|
|
||||||
flash_alert("Type set to <strong>$type</strong> on <strong>$interface_count</strong> interfaces.");
|
flash_alert("Type set to <strong>$type</strong> on <strong>$interface_count</strong> interfaces.");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
redirect();
|
redirect();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1383,7 +1383,7 @@ if (isset($_POST['bulk_edit_asset_interface_network'])) {
|
||||||
// Get Asset Name and Client ID for logging and alert message
|
// Get Asset Name and Client ID for logging and alert message
|
||||||
$sql = mysqli_query($mysqli, "
|
$sql = mysqli_query($mysqli, "
|
||||||
SELECT asset_name, asset_client_id, asset_id
|
SELECT asset_name, asset_client_id, asset_id
|
||||||
FROM asset_interfaces
|
FROM asset_interfaces
|
||||||
LEFT JOIN assets ON asset_id = interface_asset_id
|
LEFT JOIN assets ON asset_id = interface_asset_id
|
||||||
WHERE interface_id = $interface_id
|
WHERE interface_id = $interface_id
|
||||||
");
|
");
|
||||||
|
|
@ -1399,10 +1399,10 @@ if (isset($_POST['bulk_edit_asset_interface_network'])) {
|
||||||
}
|
}
|
||||||
|
|
||||||
logAction("Asset Interface", "Bulk Edit", "$session_name set network to $network_name on $interface_count interfaces for asset $asset_name", $client_id);
|
logAction("Asset Interface", "Bulk Edit", "$session_name set network to $network_name on $interface_count interfaces for asset $asset_name", $client_id);
|
||||||
|
|
||||||
flash_alert("Network set to <strong>$network_name</strong> on <strong>$interface_count</strong> interfaces.");
|
flash_alert("Network set to <strong>$network_name</strong> on <strong>$interface_count</strong> interfaces.");
|
||||||
}
|
}
|
||||||
|
|
||||||
redirect();
|
redirect();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1412,7 +1412,7 @@ if (isset($_POST['bulk_edit_asset_interface_ip_dhcp'])) {
|
||||||
validateCSRFToken($_POST['csrf_token']);
|
validateCSRFToken($_POST['csrf_token']);
|
||||||
|
|
||||||
enforceUserPermission('module_support', 2);
|
enforceUserPermission('module_support', 2);
|
||||||
|
|
||||||
if (isset($_POST['interface_ids'])) {
|
if (isset($_POST['interface_ids'])) {
|
||||||
|
|
||||||
// Get Count
|
// Get Count
|
||||||
|
|
@ -1424,7 +1424,7 @@ if (isset($_POST['bulk_edit_asset_interface_ip_dhcp'])) {
|
||||||
// Get Asset Name and Client ID for logging and alert message
|
// Get Asset Name and Client ID for logging and alert message
|
||||||
$sql = mysqli_query($mysqli, "
|
$sql = mysqli_query($mysqli, "
|
||||||
SELECT asset_name, asset_client_id, asset_id
|
SELECT asset_name, asset_client_id, asset_id
|
||||||
FROM asset_interfaces
|
FROM asset_interfaces
|
||||||
LEFT JOIN assets ON asset_id = interface_asset_id
|
LEFT JOIN assets ON asset_id = interface_asset_id
|
||||||
WHERE interface_id = $interface_id
|
WHERE interface_id = $interface_id
|
||||||
");
|
");
|
||||||
|
|
@ -1440,11 +1440,11 @@ if (isset($_POST['bulk_edit_asset_interface_ip_dhcp'])) {
|
||||||
}
|
}
|
||||||
|
|
||||||
logAction("Asset Interface", "Bulk Edit", "$session_name set interface IP to DHCP on $interface_count interfaces for asset $asset_name", $client_id);
|
logAction("Asset Interface", "Bulk Edit", "$session_name set interface IP to DHCP on $interface_count interfaces for asset $asset_name", $client_id);
|
||||||
|
|
||||||
flash_alert("Interface IP set to <strong>DHCP</strong> on <strong>$interface_count</strong> interfaces.");
|
flash_alert("Interface IP set to <strong>DHCP</strong> on <strong>$interface_count</strong> interfaces.");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
redirect();
|
redirect();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1485,7 +1485,7 @@ if (isset($_POST['bulk_delete_asset_interfaces'])) {
|
||||||
|
|
||||||
flash_alert("<strong>$interface_count</strong> interfaces deleted.", 'error');
|
flash_alert("<strong>$interface_count</strong> interfaces deleted.", 'error');
|
||||||
}
|
}
|
||||||
|
|
||||||
redirect();
|
redirect();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1495,7 +1495,7 @@ if (isset($_POST["import_client_asset_interfaces_csv"])) {
|
||||||
validateCSRFToken($_POST['csrf_token']);
|
validateCSRFToken($_POST['csrf_token']);
|
||||||
|
|
||||||
enforceUserPermission('module_support', 2);
|
enforceUserPermission('module_support', 2);
|
||||||
|
|
||||||
$asset_id = intval($_POST['asset_id']);
|
$asset_id = intval($_POST['asset_id']);
|
||||||
$file_name = $_FILES["file"]["tmp_name"];
|
$file_name = $_FILES["file"]["tmp_name"];
|
||||||
|
|
||||||
|
|
@ -1597,11 +1597,11 @@ if (isset($_POST["import_client_asset_interfaces_csv"])) {
|
||||||
logAction("Asset", "Import", "$session_name imported $row_count interfaces(s) to asset $asset_name via CSV file", $client_id);
|
logAction("Asset", "Import", "$session_name imported $row_count interfaces(s) to asset $asset_name via CSV file", $client_id);
|
||||||
|
|
||||||
flash_alert("<strong>$row_count</strong> Interfaces(s) added to asset <strong>$asset_name</stong>, <strong>$duplicate_count</strong> duplicate(s) detected");
|
flash_alert("<strong>$row_count</strong> Interfaces(s) added to asset <strong>$asset_name</stong>, <strong>$duplicate_count</strong> duplicate(s) detected");
|
||||||
|
|
||||||
redirect();
|
redirect();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Check for any errors, if there are notify user and redirect
|
//Check for any errors, if there are notify user and redirect
|
||||||
if ($error) {
|
if ($error) {
|
||||||
redirect();
|
redirect();
|
||||||
|
|
|
||||||
|
|
@ -175,7 +175,7 @@ if (isset($_GET['delete_certificate'])) {
|
||||||
if (isset($_POST['bulk_delete_certificates'])) {
|
if (isset($_POST['bulk_delete_certificates'])) {
|
||||||
|
|
||||||
validateCSRFToken($_POST['csrf_token']);
|
validateCSRFToken($_POST['csrf_token']);
|
||||||
|
|
||||||
enforceUserPermission('module_support', 3);
|
enforceUserPermission('module_support', 3);
|
||||||
|
|
||||||
if (isset($_POST['certificate_ids'])) {
|
if (isset($_POST['certificate_ids'])) {
|
||||||
|
|
@ -214,7 +214,7 @@ if (isset($_POST['export_certificates_csv'])) {
|
||||||
|
|
||||||
enforceUserPermission('module_support');
|
enforceUserPermission('module_support');
|
||||||
|
|
||||||
if (isset($_POST['client_id'])) {
|
if ($_POST['client_id']) {
|
||||||
$client_id = intval($_POST['client_id']);
|
$client_id = intval($_POST['client_id']);
|
||||||
$client_query = "AND certificate_client_id = $client_id";
|
$client_query = "AND certificate_client_id = $client_id";
|
||||||
$client_name = getFieldById('clients', $client_id, 'client_name');
|
$client_name = getFieldById('clients', $client_id, 'client_name');
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ if (isset($_POST['add_contact'])) {
|
||||||
move_uploaded_file($file_tmp_path, $dest_path);
|
move_uploaded_file($file_tmp_path, $dest_path);
|
||||||
|
|
||||||
mysqli_query($mysqli,"UPDATE contacts SET contact_photo = '$new_file_name' WHERE contact_id = $contact_id");
|
mysqli_query($mysqli,"UPDATE contacts SET contact_photo = '$new_file_name' WHERE contact_id = $contact_id");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -106,7 +106,7 @@ if (isset($_POST['edit_contact'])) {
|
||||||
}
|
}
|
||||||
// Create New User
|
// Create New User
|
||||||
} elseif ($contact_user_id == 0 && $name && $email && $auth_method) {
|
} elseif ($contact_user_id == 0 && $name && $email && $auth_method) {
|
||||||
|
|
||||||
// Set password
|
// Set password
|
||||||
if ($_POST['contact_password']) {
|
if ($_POST['contact_password']) {
|
||||||
$password_hash = password_hash(trim($_POST['contact_password']), PASSWORD_DEFAULT);
|
$password_hash = password_hash(trim($_POST['contact_password']), PASSWORD_DEFAULT);
|
||||||
|
|
@ -138,7 +138,7 @@ if (isset($_POST['edit_contact'])) {
|
||||||
unlink("../uploads/clients/$client_id/$existing_file_name");
|
unlink("../uploads/clients/$client_id/$existing_file_name");
|
||||||
|
|
||||||
mysqli_query($mysqli,"UPDATE contacts SET contact_photo = '$new_file_name' WHERE contact_id = $contact_id");
|
mysqli_query($mysqli,"UPDATE contacts SET contact_photo = '$new_file_name' WHERE contact_id = $contact_id");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -258,7 +258,7 @@ if (isset($_GET['archive_contact_note'])) {
|
||||||
$contact_id = intval($row['contact_id']);
|
$contact_id = intval($row['contact_id']);
|
||||||
|
|
||||||
mysqli_query($mysqli,"UPDATE contact_notes SET contact_note_archived_at = NOW() WHERE contact_note_id = $contact_note_id");
|
mysqli_query($mysqli,"UPDATE contact_notes SET contact_note_archived_at = NOW() WHERE contact_note_id = $contact_note_id");
|
||||||
|
|
||||||
logAction("Contact", "Edit", "$session_name archived note $contact_note_type for $contact_name", $client_id, $contact_id);
|
logAction("Contact", "Edit", "$session_name archived note $contact_note_type for $contact_name", $client_id, $contact_id);
|
||||||
|
|
||||||
flash_alert("Note <strong>$contact_note_type</strong> archived", 'error');
|
flash_alert("Note <strong>$contact_note_type</strong> archived", 'error');
|
||||||
|
|
@ -282,7 +282,7 @@ if (isset($_GET['unarchive_contact_note'])) {
|
||||||
$contact_id = intval($row['contact_id']);
|
$contact_id = intval($row['contact_id']);
|
||||||
|
|
||||||
mysqli_query($mysqli,"UPDATE contact_notes SET contact_note_archived_at = NULL WHERE contact_note_id = $contact_note_id");
|
mysqli_query($mysqli,"UPDATE contact_notes SET contact_note_archived_at = NULL WHERE contact_note_id = $contact_note_id");
|
||||||
|
|
||||||
logAction("Contact", "Edit", "$session_name restored note $contact_note_type for $contact_name", $client_id, $contact_id);
|
logAction("Contact", "Edit", "$session_name restored note $contact_note_type for $contact_name", $client_id, $contact_id);
|
||||||
|
|
||||||
flash_alert("Note <strong>$contact_note_type</strong> restored");
|
flash_alert("Note <strong>$contact_note_type</strong> restored");
|
||||||
|
|
@ -329,10 +329,10 @@ if (isset($_POST['bulk_assign_contact_location'])) {
|
||||||
|
|
||||||
// Assign Location to Selected Contacts
|
// Assign Location to Selected Contacts
|
||||||
if (isset($_POST['contact_ids'])) {
|
if (isset($_POST['contact_ids'])) {
|
||||||
|
|
||||||
// Get Selected Contacts Count
|
// Get Selected Contacts Count
|
||||||
$contact_count = count($_POST['contact_ids']);
|
$contact_count = count($_POST['contact_ids']);
|
||||||
|
|
||||||
foreach($_POST['contact_ids'] as $contact_id) {
|
foreach($_POST['contact_ids'] as $contact_id) {
|
||||||
$contact_id = intval($contact_id);
|
$contact_id = intval($contact_id);
|
||||||
|
|
||||||
|
|
@ -382,7 +382,7 @@ if (isset($_POST['bulk_edit_contact_phone'])) {
|
||||||
logAction("Contact", "Edit", "$session_name set Phone Number to $phone for $contact_name", $client_id, $contact_id);
|
logAction("Contact", "Edit", "$session_name set Phone Number to $phone for $contact_name", $client_id, $contact_id);
|
||||||
|
|
||||||
} // End Assign Location Loop
|
} // End Assign Location Loop
|
||||||
|
|
||||||
logAction("Contact", "Bulk Edit", "$session_name set the Phone Number $phone for $contact_count contacts", $client_id);
|
logAction("Contact", "Bulk Edit", "$session_name set the Phone Number $phone for $contact_count contacts", $client_id);
|
||||||
|
|
||||||
flash_alert("Phone Number set to <b>" . formatPhoneNumber($phone) . "</b> on $contact_count</b> contacts");
|
flash_alert("Phone Number set to <b>" . formatPhoneNumber($phone) . "</b> on $contact_count</b> contacts");
|
||||||
|
|
@ -518,7 +518,7 @@ if (isset($_POST['bulk_assign_contact_tags'])) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_POST['send_bulk_mail_now'])) {
|
if (isset($_POST['send_bulk_mail_now'])) {
|
||||||
|
|
||||||
if (isset($_POST['contact_ids'])) {
|
if (isset($_POST['contact_ids'])) {
|
||||||
|
|
||||||
$count = count($_POST['contact_ids']);
|
$count = count($_POST['contact_ids']);
|
||||||
|
|
@ -540,7 +540,7 @@ if (isset($_POST['send_bulk_mail_now'])) {
|
||||||
$client_id = intval($row['contact_client_id']);
|
$client_id = intval($row['contact_client_id']);
|
||||||
|
|
||||||
// Queue Mail
|
// Queue Mail
|
||||||
$data[] = [
|
$data[] = [
|
||||||
'from' => $mail_from,
|
'from' => $mail_from,
|
||||||
'from_name' => $mail_from_name,
|
'from_name' => $mail_from_name,
|
||||||
'recipient' => $contact_email,
|
'recipient' => $contact_email,
|
||||||
|
|
@ -555,7 +555,7 @@ if (isset($_POST['send_bulk_mail_now'])) {
|
||||||
logAction("Bulk Mail", "Send", "$session_name sent $count messages via bulk mail");
|
logAction("Bulk Mail", "Send", "$session_name sent $count messages via bulk mail");
|
||||||
|
|
||||||
flash_alert("<strong>$count</strong> messages queued");
|
flash_alert("<strong>$count</strong> messages queued");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
redirect();
|
redirect();
|
||||||
|
|
@ -596,7 +596,7 @@ if (isset($_POST['bulk_archive_contacts'])) {
|
||||||
|
|
||||||
// Individual Contact logging
|
// Individual Contact logging
|
||||||
logAction("Contact", "Archive", "$session_name archived $contact_name", $client_id, $contact_id);
|
logAction("Contact", "Archive", "$session_name archived $contact_name", $client_id, $contact_id);
|
||||||
|
|
||||||
$count++;
|
$count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -782,7 +782,7 @@ if (isset($_GET['anonymize_contact'])) {
|
||||||
$ticket_reply_details = $ticket_reply['ticket_reply'];
|
$ticket_reply_details = $ticket_reply['ticket_reply'];
|
||||||
$ticket_reply_details = str_ireplace($info_to_redact, "*****", $ticket_reply_details);
|
$ticket_reply_details = str_ireplace($info_to_redact, "*****", $ticket_reply_details);
|
||||||
$ticket_reply_details = sanitizeInput($ticket_reply_details);
|
$ticket_reply_details = sanitizeInput($ticket_reply_details);
|
||||||
|
|
||||||
mysqli_query($mysqli,"UPDATE ticket_replies SET ticket_reply = '$ticket_reply_details'
|
mysqli_query($mysqli,"UPDATE ticket_replies SET ticket_reply = '$ticket_reply_details'
|
||||||
WHERE ticket_reply_id = $ticket_reply_id"
|
WHERE ticket_reply_id = $ticket_reply_id"
|
||||||
);
|
);
|
||||||
|
|
@ -820,7 +820,7 @@ if (isset($_GET['archive_contact'])) {
|
||||||
}
|
}
|
||||||
|
|
||||||
mysqli_query($mysqli,"UPDATE contacts SET contact_important = 0, contact_billing = 0, contact_technical = 0, contact_archived_at = NOW() WHERE contact_id = $contact_id");
|
mysqli_query($mysqli,"UPDATE contacts SET contact_important = 0, contact_billing = 0, contact_technical = 0, contact_archived_at = NOW() WHERE contact_id = $contact_id");
|
||||||
|
|
||||||
logAction("Contact", "Archive", "$session_name archived contact $contact_name", $client_id, $contact_id);
|
logAction("Contact", "Archive", "$session_name archived contact $contact_name", $client_id, $contact_id);
|
||||||
|
|
||||||
flash_alert("Contact <strong>$contact_name</strong> has been archived", 'error');
|
flash_alert("Contact <strong>$contact_name</strong> has been archived", 'error');
|
||||||
|
|
@ -1150,7 +1150,7 @@ if (isset($_POST['export_contacts_csv'])) {
|
||||||
|
|
||||||
enforceUserPermission('module_client');
|
enforceUserPermission('module_client');
|
||||||
|
|
||||||
if (isset($_POST['client_id'])) {
|
if ($_POST['client_id']) {
|
||||||
$client_id = intval($_POST['client_id']);
|
$client_id = intval($_POST['client_id']);
|
||||||
$client_query = "AND contact_client_id = $client_id";
|
$client_query = "AND contact_client_id = $client_id";
|
||||||
$client_name = getFieldById('clients', $client_id, 'client_name');
|
$client_name = getFieldById('clients', $client_id, 'client_name');
|
||||||
|
|
@ -1293,9 +1293,9 @@ if (isset($_POST["import_contacts_csv"])) {
|
||||||
logAction("Contact", "Import", "$session_name imported $row_count contact(s) via CSV file", $client_id);
|
logAction("Contact", "Import", "$session_name imported $row_count contact(s) via CSV file", $client_id);
|
||||||
|
|
||||||
flash_alert("$row_count Contact(s) added, $duplicate_count duplicate(s) detected", 'warning');
|
flash_alert("$row_count Contact(s) added, $duplicate_count duplicate(s) detected", 'warning');
|
||||||
|
|
||||||
redirect();
|
redirect();
|
||||||
|
|
||||||
}
|
}
|
||||||
//Check for any errors, if there are notify user and redirect
|
//Check for any errors, if there are notify user and redirect
|
||||||
if ($error) {
|
if ($error) {
|
||||||
|
|
|
||||||
|
|
@ -180,7 +180,7 @@ if (isset($_POST['bulk_assign_credential_tags'])) {
|
||||||
} // End Assign Loop
|
} // End Assign Loop
|
||||||
|
|
||||||
logAction("Credential", "Bulk Edit", "$session_name added tags to $count credentials", $client_id);
|
logAction("Credential", "Bulk Edit", "$session_name added tags to $count credentials", $client_id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
redirect();
|
redirect();
|
||||||
|
|
@ -226,7 +226,7 @@ if (isset($_POST['bulk_archive_credentials'])) {
|
||||||
|
|
||||||
if (isset($_POST['bulk_unarchive_credentials'])) {
|
if (isset($_POST['bulk_unarchive_credentials'])) {
|
||||||
|
|
||||||
validateCSRFToken($_POST['csrf_token']);
|
validateCSRFToken($_POST['csrf_token']);
|
||||||
|
|
||||||
enforceUserPermission('module_credential', 2);
|
enforceUserPermission('module_credential', 2);
|
||||||
|
|
||||||
|
|
@ -304,7 +304,7 @@ if (isset($_POST['export_credentials_csv'])) {
|
||||||
|
|
||||||
enforceUserPermission('module_credential');
|
enforceUserPermission('module_credential');
|
||||||
|
|
||||||
if (isset($_POST['client_id'])) {
|
if ($_POST['client_id']) {
|
||||||
$client_id = intval($_POST['client_id']);
|
$client_id = intval($_POST['client_id']);
|
||||||
$client_query = "AND credential_client_id = $client_id";
|
$client_query = "AND credential_client_id = $client_id";
|
||||||
$client_name = getFieldById('clients', $client_id, 'client_name');
|
$client_name = getFieldById('clients', $client_id, 'client_name');
|
||||||
|
|
@ -443,14 +443,14 @@ if (isset($_POST["import_credentials_csv"])) {
|
||||||
logAction("Credential", "Import", "$session_name imported $row_count credential(s) via CSV file. $duplicate_count duplicate(s) found and not imported", $client_id);
|
logAction("Credential", "Import", "$session_name imported $row_count credential(s) via CSV file. $duplicate_count duplicate(s) found and not imported", $client_id);
|
||||||
|
|
||||||
flash_alert("<strong>$row_count</strong> credential(s) imported, <strong>$duplicate_count</strong> duplicate(s) detected and not imported", 'warning');
|
flash_alert("<strong>$row_count</strong> credential(s) imported, <strong>$duplicate_count</strong> duplicate(s) detected and not imported", 'warning');
|
||||||
|
|
||||||
redirect();
|
redirect();
|
||||||
}
|
}
|
||||||
//Check for any errors, if there are notify user and redirect
|
//Check for any errors, if there are notify user and redirect
|
||||||
if ($error) {
|
if ($error) {
|
||||||
redirect();
|
redirect();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_GET['download_credentials_csv_template'])) {
|
if (isset($_GET['download_credentials_csv_template'])) {
|
||||||
|
|
|
||||||
|
|
@ -212,11 +212,11 @@ if (isset($_GET['delete_domain'])) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_POST['bulk_archive_domains'])) {
|
if (isset($_POST['bulk_archive_domains'])) {
|
||||||
|
|
||||||
validateCSRFToken($_POST['csrf_token']);
|
validateCSRFToken($_POST['csrf_token']);
|
||||||
|
|
||||||
enforceUserPermission('module_support', 3);
|
enforceUserPermission('module_support', 3);
|
||||||
|
|
||||||
if (isset($_POST['domain_ids'])) {
|
if (isset($_POST['domain_ids'])) {
|
||||||
|
|
||||||
// Get Selected Count
|
// Get Selected Count
|
||||||
|
|
@ -249,7 +249,7 @@ if (isset($_POST['bulk_archive_domains'])) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_POST['bulk_unarchive_domains'])) {
|
if (isset($_POST['bulk_unarchive_domains'])) {
|
||||||
|
|
||||||
validateCSRFToken($_POST['csrf_token']);
|
validateCSRFToken($_POST['csrf_token']);
|
||||||
|
|
||||||
enforceUserPermission('module_support', 3);
|
enforceUserPermission('module_support', 3);
|
||||||
|
|
@ -287,11 +287,11 @@ if (isset($_POST['bulk_unarchive_domains'])) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_POST['bulk_delete_domains'])) {
|
if (isset($_POST['bulk_delete_domains'])) {
|
||||||
|
|
||||||
validateCSRFToken($_POST['csrf_token']);
|
validateCSRFToken($_POST['csrf_token']);
|
||||||
|
|
||||||
enforceUserPermission('module_support', 3);
|
enforceUserPermission('module_support', 3);
|
||||||
|
|
||||||
if (isset($_POST['domain_ids'])) {
|
if (isset($_POST['domain_ids'])) {
|
||||||
|
|
||||||
// Get Selected Count
|
// Get Selected Count
|
||||||
|
|
@ -327,7 +327,7 @@ if (isset($_POST['export_domains_csv'])) {
|
||||||
|
|
||||||
enforceUserPermission('module_support');
|
enforceUserPermission('module_support');
|
||||||
|
|
||||||
if (isset($_POST['client_id'])) {
|
if ($_POST['client_id']) {
|
||||||
$client_id = intval($_POST['client_id']);
|
$client_id = intval($_POST['client_id']);
|
||||||
$client_query = "WHERE domain_client_id = $client_id";
|
$client_query = "WHERE domain_client_id = $client_id";
|
||||||
$client_name = getFieldById('clients', $client_id, 'client_name');
|
$client_name = getFieldById('clients', $client_id, 'client_name');
|
||||||
|
|
|
||||||
|
|
@ -638,13 +638,13 @@ if (isset($_POST['export_invoices_csv'])) {
|
||||||
|
|
||||||
enforceUserPermission('module_sales');
|
enforceUserPermission('module_sales');
|
||||||
|
|
||||||
if (isset($_POST['client_id'])) {
|
if ($_POST['client_id']) {
|
||||||
$client_id = intval($_POST['client_id']);
|
$client_id = intval($_POST['client_id']);
|
||||||
$client_query = "AND invoice_client_id = $client_id";
|
$client_query = "1=1 AND invoice_client_id = $client_id";
|
||||||
$client_name = getFieldById('clients', $client_id, 'client_name');
|
$client_name = getFieldById('clients', $client_id, 'client_name');
|
||||||
$file_name_prepend = "$client_name-";
|
$file_name_prepend = "$client_name-";
|
||||||
} else {
|
} else {
|
||||||
$client_query = '';
|
$client_query = '1=1 ';
|
||||||
$client_name = '';
|
$client_name = '';
|
||||||
$file_name_prepend = "$session_company_name-";
|
$file_name_prepend = "$session_company_name-";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -229,7 +229,7 @@ if (isset($_POST['bulk_assign_location_tags'])) {
|
||||||
logAction("Location", "Bulk Edit", "$session_name assigned tags to $count location(s)", $client_id);
|
logAction("Location", "Bulk Edit", "$session_name assigned tags to $count location(s)", $client_id);
|
||||||
|
|
||||||
flash_alert("Assigned tags for <strong>$count</strong> locations");
|
flash_alert("Assigned tags for <strong>$count</strong> locations");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
redirect();
|
redirect();
|
||||||
|
|
@ -237,7 +237,7 @@ if (isset($_POST['bulk_assign_location_tags'])) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_POST['bulk_archive_locations'])) {
|
if (isset($_POST['bulk_archive_locations'])) {
|
||||||
|
|
||||||
enforceUserPermission('module_client', 2);
|
enforceUserPermission('module_client', 2);
|
||||||
validateCSRFToken($_POST['csrf_token']);
|
validateCSRFToken($_POST['csrf_token']);
|
||||||
|
|
||||||
|
|
@ -262,7 +262,7 @@ if (isset($_POST['bulk_archive_locations'])) {
|
||||||
|
|
||||||
// Individual Contact logging
|
// Individual Contact logging
|
||||||
logAction("Location", "Archive", "$session_name archived location $location_name", $client_id, $location_id);
|
logAction("Location", "Archive", "$session_name archived location $location_name", $client_id, $location_id);
|
||||||
|
|
||||||
$count++;
|
$count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -279,10 +279,10 @@ if (isset($_POST['bulk_archive_locations'])) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_POST['bulk_unarchive_locations'])) {
|
if (isset($_POST['bulk_unarchive_locations'])) {
|
||||||
|
|
||||||
validateCSRFToken($_POST['csrf_token']);
|
validateCSRFToken($_POST['csrf_token']);
|
||||||
|
|
||||||
enforceUserPermission('module_client', 2);
|
enforceUserPermission('module_client', 2);
|
||||||
|
|
||||||
if (isset($_POST['location_ids'])) {
|
if (isset($_POST['location_ids'])) {
|
||||||
|
|
||||||
|
|
@ -339,7 +339,7 @@ if (isset($_POST['bulk_delete_locations'])) {
|
||||||
$client_id = intval($row['location_client_id']);
|
$client_id = intval($row['location_client_id']);
|
||||||
|
|
||||||
mysqli_query($mysqli, "DELETE FROM locations WHERE location_id = $location_id AND location_client_id = $client_id");
|
mysqli_query($mysqli, "DELETE FROM locations WHERE location_id = $location_id AND location_client_id = $client_id");
|
||||||
|
|
||||||
logAction("Location", "Delete", "$session_name deleted location $location_name", $client_id);
|
logAction("Location", "Delete", "$session_name deleted location $location_name", $client_id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -355,8 +355,8 @@ if (isset($_POST['bulk_delete_locations'])) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_POST['export_locations_csv'])){
|
if(isset($_POST['export_locations_csv'])){
|
||||||
|
|
||||||
if (isset($_POST['client_id'])) {
|
if ($_POST['client_id']) {
|
||||||
$client_id = intval($_POST['client_id']);
|
$client_id = intval($_POST['client_id']);
|
||||||
$client_query = "AND location_client_id = $client_id";
|
$client_query = "AND location_client_id = $client_id";
|
||||||
$client_name = getFieldById('clients', $client_id, 'client_name');
|
$client_name = getFieldById('clients', $client_id, 'client_name');
|
||||||
|
|
@ -494,14 +494,14 @@ if (isset($_POST["import_locations_csv"])) {
|
||||||
logAction("Location", "Import", "$session_name imported $row_count location(s). $duplicate_count duplicate(s) found and not imported", $client_id);
|
logAction("Location", "Import", "$session_name imported $row_count location(s). $duplicate_count duplicate(s) found and not imported", $client_id);
|
||||||
|
|
||||||
flash_alert("$row_count Location(s) imported, $duplicate_count duplicate(s) detected and not imported");
|
flash_alert("$row_count Location(s) imported, $duplicate_count duplicate(s) detected and not imported");
|
||||||
|
|
||||||
redirect();
|
redirect();
|
||||||
}
|
}
|
||||||
//Check for any errors, if there are notify user and redirect
|
//Check for any errors, if there are notify user and redirect
|
||||||
if($error) {
|
if($error) {
|
||||||
redirect();
|
redirect();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_GET['download_locations_csv_template'])){
|
if(isset($_GET['download_locations_csv_template'])){
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,7 @@ if (isset($_GET['unarchive_network'])) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_GET['delete_network'])) {
|
if (isset($_GET['delete_network'])) {
|
||||||
|
|
||||||
enforceUserPermission('module_support', 3);
|
enforceUserPermission('module_support', 3);
|
||||||
|
|
||||||
$network_id = intval($_GET['delete_network']);
|
$network_id = intval($_GET['delete_network']);
|
||||||
|
|
@ -110,7 +110,7 @@ if (isset($_GET['delete_network'])) {
|
||||||
if (isset($_POST['bulk_delete_networks'])) {
|
if (isset($_POST['bulk_delete_networks'])) {
|
||||||
|
|
||||||
validateCSRFToken($_POST['csrf_token']);
|
validateCSRFToken($_POST['csrf_token']);
|
||||||
|
|
||||||
enforceUserPermission('module_support', 3);
|
enforceUserPermission('module_support', 3);
|
||||||
|
|
||||||
if (isset($_POST['network_ids'])) {
|
if (isset($_POST['network_ids'])) {
|
||||||
|
|
@ -130,7 +130,7 @@ if (isset($_POST['bulk_delete_networks'])) {
|
||||||
$client_id = intval($row['network_client_id']);
|
$client_id = intval($row['network_client_id']);
|
||||||
|
|
||||||
mysqli_query($mysqli, "DELETE FROM networks WHERE network_id = $network_id AND network_client_id = $client_id");
|
mysqli_query($mysqli, "DELETE FROM networks WHERE network_id = $network_id AND network_client_id = $client_id");
|
||||||
|
|
||||||
logAction("Network", "Delete", "$session_name deleted network $network_name", $client_id);
|
logAction("Network", "Delete", "$session_name deleted network $network_name", $client_id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -149,7 +149,7 @@ if (isset($_POST['export_networks_csv'])) {
|
||||||
|
|
||||||
enforceUserPermission('module_support', 2);
|
enforceUserPermission('module_support', 2);
|
||||||
|
|
||||||
if (isset($_POST['client_id'])) {
|
if ($_POST['client_id']) {
|
||||||
$client_id = intval($_POST['client_id']);
|
$client_id = intval($_POST['client_id']);
|
||||||
$client_query = "AND network_client_id = $client_id";
|
$client_query = "AND network_client_id = $client_id";
|
||||||
$client_name = getFieldById('clients', $client_id, 'client_name');
|
$client_name = getFieldById('clients', $client_id, 'client_name');
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
defined('FROM_POST_HANDLER') || die("Direct file access is not allowed");
|
defined('FROM_POST_HANDLER') || die("Direct file access is not allowed");
|
||||||
|
|
||||||
if (isset($_POST['add_payment'])) {
|
if (isset($_POST['add_payment'])) {
|
||||||
|
|
||||||
enforceUserPermission('module_sales', 2);
|
enforceUserPermission('module_sales', 2);
|
||||||
enforceUserPermission('module_financial', 2);
|
enforceUserPermission('module_financial', 2);
|
||||||
|
|
||||||
|
|
@ -175,7 +175,7 @@ if (isset($_POST['add_payment'])) {
|
||||||
Apply Credit Not ready for use 2025-08-27 - JQ
|
Apply Credit Not ready for use 2025-08-27 - JQ
|
||||||
|
|
||||||
if (isset($_POST['apply_credit'])) {
|
if (isset($_POST['apply_credit'])) {
|
||||||
|
|
||||||
enforceUserPermission('module_sales', 2);
|
enforceUserPermission('module_sales', 2);
|
||||||
enforceUserPermission('module_financial', 2);
|
enforceUserPermission('module_financial', 2);
|
||||||
|
|
||||||
|
|
@ -184,7 +184,7 @@ if (isset($_POST['apply_credit'])) {
|
||||||
|
|
||||||
$sql = mysqli_query($mysqli, "SELECT * FROM invoices LEFT JOIN clients ON invoice_client_id = client_id WHERE invoice_id = $invoice_id");
|
$sql = mysqli_query($mysqli, "SELECT * FROM invoices LEFT JOIN clients ON invoice_client_id = client_id WHERE invoice_id = $invoice_id");
|
||||||
$row = mysqli_fetch_array($sql);
|
$row = mysqli_fetch_array($sql);
|
||||||
|
|
||||||
$invoice_prefix = sanitizeInput($row['invoice_prefix']);
|
$invoice_prefix = sanitizeInput($row['invoice_prefix']);
|
||||||
$invoice_number = intval($row['invoice_number']);
|
$invoice_number = intval($row['invoice_number']);
|
||||||
$invoice_status = sanitizeInput($row['invoice_status']);
|
$invoice_status = sanitizeInput($row['invoice_status']);
|
||||||
|
|
@ -252,8 +252,8 @@ if (isset($_POST['apply_credit'])) {
|
||||||
|
|
||||||
// Update the invoice credit amount
|
// Update the invoice credit amount
|
||||||
mysqli_query($mysqli, "
|
mysqli_query($mysqli, "
|
||||||
UPDATE invoices
|
UPDATE invoices
|
||||||
SET invoice_credit_amount = $total_credit_applied
|
SET invoice_credit_amount = $total_credit_applied
|
||||||
WHERE invoice_id = $invoice_id
|
WHERE invoice_id = $invoice_id
|
||||||
");
|
");
|
||||||
|
|
||||||
|
|
@ -461,15 +461,15 @@ if (isset($_POST['add_payment_stripe'])) {
|
||||||
customAction('invoice_pay', $invoice_id);
|
customAction('invoice_pay', $invoice_id);
|
||||||
|
|
||||||
flash_alert("Payment amount <strong>" . numfmt_format_currency($currency_format, $invoice_amount, $invoice_currency_code) . "</strong> added");
|
flash_alert("Payment amount <strong>" . numfmt_format_currency($currency_format, $invoice_amount, $invoice_currency_code) . "</strong> added");
|
||||||
|
|
||||||
redirect();
|
redirect();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
mysqli_query($mysqli, "INSERT INTO history SET history_status = 'Payment failed', history_description = 'Stripe pay failed due to payment error', history_invoice_id = $invoice_id");
|
mysqli_query($mysqli, "INSERT INTO history SET history_status = 'Payment failed', history_description = 'Stripe pay failed due to payment error', history_invoice_id = $invoice_id");
|
||||||
|
|
||||||
logAction("Invoice", "Payment", "Failed online payment amount of invoice $invoice_prefix$invoice_number due to Stripe payment error", $client_id, $invoice_id);
|
logAction("Invoice", "Payment", "Failed online payment amount of invoice $invoice_prefix$invoice_number due to Stripe payment error", $client_id, $invoice_id);
|
||||||
flash_alert("Payment failed", 'error');
|
flash_alert("Payment failed", 'error');
|
||||||
|
|
||||||
redirect();
|
redirect();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -646,15 +646,15 @@ if (isset($_GET['add_payment_stripe'])) {
|
||||||
customAction('invoice_pay', $invoice_id);
|
customAction('invoice_pay', $invoice_id);
|
||||||
|
|
||||||
flash_alert("Payment amount <strong>" . numfmt_format_currency($currency_format, $invoice_amount, $invoice_currency_code) . "</strong> added");
|
flash_alert("Payment amount <strong>" . numfmt_format_currency($currency_format, $invoice_amount, $invoice_currency_code) . "</strong> added");
|
||||||
|
|
||||||
redirect();
|
redirect();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
mysqli_query($mysqli, "INSERT INTO history SET history_status = 'Payment failed', history_description = 'Stripe pay failed due to payment error', history_invoice_id = $invoice_id");
|
mysqli_query($mysqli, "INSERT INTO history SET history_status = 'Payment failed', history_description = 'Stripe pay failed due to payment error', history_invoice_id = $invoice_id");
|
||||||
|
|
||||||
logAction("Invoice", "Payment", "Failed online payment amount of invoice $invoice_prefix$invoice_number due to Stripe payment error", $client_id, $invoice_id);
|
logAction("Invoice", "Payment", "Failed online payment amount of invoice $invoice_prefix$invoice_number due to Stripe payment error", $client_id, $invoice_id);
|
||||||
flash_alert("Payment failed", 'error');
|
flash_alert("Payment failed", 'error');
|
||||||
|
|
||||||
redirect();
|
redirect();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -662,7 +662,7 @@ if (isset($_GET['add_payment_stripe'])) {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (isset($_POST['add_bulk_payment'])) {
|
if (isset($_POST['add_bulk_payment'])) {
|
||||||
|
|
||||||
enforceUserPermission('module_sales', 2);
|
enforceUserPermission('module_sales', 2);
|
||||||
enforceUserPermission('module_financial', 2);
|
enforceUserPermission('module_financial', 2);
|
||||||
|
|
||||||
|
|
@ -749,7 +749,7 @@ if (isset($_POST['add_bulk_payment'])) {
|
||||||
|
|
||||||
// Get Client / Contact Info
|
// Get Client / Contact Info
|
||||||
$sql_client = mysqli_query($mysqli,"SELECT * FROM clients
|
$sql_client = mysqli_query($mysqli,"SELECT * FROM clients
|
||||||
LEFT JOIN contacts ON clients.client_id = contacts.contact_client_id
|
LEFT JOIN contacts ON clients.client_id = contacts.contact_client_id
|
||||||
AND contact_primary = 1
|
AND contact_primary = 1
|
||||||
WHERE client_id = $client_id"
|
WHERE client_id = $client_id"
|
||||||
);
|
);
|
||||||
|
|
@ -794,7 +794,7 @@ if (isset($_POST['add_bulk_payment'])) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_GET['delete_payment'])) {
|
if (isset($_GET['delete_payment'])) {
|
||||||
|
|
||||||
enforceUserPermission('module_sales', 2);
|
enforceUserPermission('module_sales', 2);
|
||||||
enforceUserPermission('module_financial', 2);
|
enforceUserPermission('module_financial', 2);
|
||||||
|
|
||||||
|
|
@ -848,8 +848,8 @@ if (isset($_GET['delete_payment'])) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_POST['export_payments_csv'])) {
|
if (isset($_POST['export_payments_csv'])) {
|
||||||
|
|
||||||
if (isset($_POST['client_id'])) {
|
if ($_POST['client_id']) {
|
||||||
$client_id = intval($_POST['client_id']);
|
$client_id = intval($_POST['client_id']);
|
||||||
$client_query = "AND invoice_client_id = $client_id";
|
$client_query = "AND invoice_client_id = $client_id";
|
||||||
$client_name = getFieldById('clients', $client_id, 'client_name');
|
$client_name = getFieldById('clients', $client_id, 'client_name');
|
||||||
|
|
@ -861,7 +861,7 @@ if (isset($_POST['export_payments_csv'])) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = mysqli_query($mysqli,"SELECT * FROM payments, invoices WHERE payment_invoice_id = invoice_id $client_query ORDER BY payment_date ASC");
|
$sql = mysqli_query($mysqli,"SELECT * FROM payments, invoices WHERE payment_invoice_id = invoice_id $client_query ORDER BY payment_date ASC");
|
||||||
|
|
||||||
$num_rows = mysqli_num_rows($sql);
|
$num_rows = mysqli_num_rows($sql);
|
||||||
|
|
||||||
if ($num_rows > 0) {
|
if ($num_rows > 0) {
|
||||||
|
|
|
||||||
|
|
@ -555,7 +555,7 @@ if(isset($_POST['export_quotes_csv'])){
|
||||||
|
|
||||||
enforceUserPermission('module_sales');
|
enforceUserPermission('module_sales');
|
||||||
|
|
||||||
if (isset($_POST['client_id'])) {
|
if ($_POST['client_id']) {
|
||||||
$client_id = intval($_POST['client_id']);
|
$client_id = intval($_POST['client_id']);
|
||||||
$client_query = "WHERE quote_client_id = $client_id";
|
$client_query = "WHERE quote_client_id = $client_id";
|
||||||
// Get Client Name for logging
|
// Get Client Name for logging
|
||||||
|
|
|
||||||
|
|
@ -208,7 +208,7 @@ if (isset($_POST['export_software_csv'])) {
|
||||||
|
|
||||||
enforceUserPermission('module_support');
|
enforceUserPermission('module_support');
|
||||||
|
|
||||||
if (isset($_POST['client_id'])) {
|
if ($_POST['client_id']) {
|
||||||
$client_id = intval($_POST['client_id']);
|
$client_id = intval($_POST['client_id']);
|
||||||
$client_query = "WHERE software_client_id = $client_id";
|
$client_query = "WHERE software_client_id = $client_id";
|
||||||
$client_name = getFieldById('clients', $client_id, 'client_name');
|
$client_name = getFieldById('clients', $client_id, 'client_name');
|
||||||
|
|
@ -243,7 +243,7 @@ if (isset($_POST['export_software_csv'])) {
|
||||||
|
|
||||||
// Asset licenses
|
// Asset licenses
|
||||||
$assigned_to_assets = '';
|
$assigned_to_assets = '';
|
||||||
$asset_licenses_sql = mysqli_query($mysqli,"SELECT software_assets.asset_id, assets.asset_name
|
$asset_licenses_sql = mysqli_query($mysqli,"SELECT software_assets.asset_id, assets.asset_name
|
||||||
FROM software_assets
|
FROM software_assets
|
||||||
LEFT JOIN assets
|
LEFT JOIN assets
|
||||||
ON software_assets.asset_id = assets.asset_id
|
ON software_assets.asset_id = assets.asset_id
|
||||||
|
|
@ -261,7 +261,7 @@ if (isset($_POST['export_software_csv'])) {
|
||||||
ON software_contacts.contact_id = contacts.contact_id
|
ON software_contacts.contact_id = contacts.contact_id
|
||||||
WHERE software_id = $row[software_id]"
|
WHERE software_id = $row[software_id]"
|
||||||
);
|
);
|
||||||
|
|
||||||
while($contact_row = mysqli_fetch_array($contact_licenses_sql)) {
|
while($contact_row = mysqli_fetch_array($contact_licenses_sql)) {
|
||||||
$assigned_to_contacts .= $contact_row['contact_name'] . ", ";
|
$assigned_to_contacts .= $contact_row['contact_name'] . ", ";
|
||||||
}
|
}
|
||||||
|
|
@ -280,7 +280,7 @@ if (isset($_POST['export_software_csv'])) {
|
||||||
//output all remaining data on a file pointer
|
//output all remaining data on a file pointer
|
||||||
fpassthru($f);
|
fpassthru($f);
|
||||||
}
|
}
|
||||||
|
|
||||||
logAction("Software", "Export", "$session_name exported $num_rows software(s) $software_name to a CSV file", $client_id);
|
logAction("Software", "Export", "$session_name exported $num_rows software(s) $software_name to a CSV file", $client_id);
|
||||||
|
|
||||||
exit;
|
exit;
|
||||||
|
|
|
||||||
|
|
@ -2228,7 +2228,7 @@ if (isset($_POST['export_tickets_csv'])) {
|
||||||
|
|
||||||
enforceUserPermission('module_support', 2);
|
enforceUserPermission('module_support', 2);
|
||||||
|
|
||||||
if (isset($_POST['client_id'])) {
|
if ($_POST['client_id']) {
|
||||||
$client_id = intval($_POST['client_id']);
|
$client_id = intval($_POST['client_id']);
|
||||||
$client_query = "WHERE ticket_client_id = $client_id";
|
$client_query = "WHERE ticket_client_id = $client_id";
|
||||||
$client_name = getFieldById('clients', $client_id, 'client_name');
|
$client_name = getFieldById('clients', $client_id, 'client_name');
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ if (isset($_POST['edit_trip'])) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_GET['delete_trip'])) {
|
if (isset($_GET['delete_trip'])) {
|
||||||
|
|
||||||
$trip_id = intval($_GET['delete_trip']);
|
$trip_id = intval($_GET['delete_trip']);
|
||||||
|
|
||||||
// Get Trip Info and Client ID for logging
|
// Get Trip Info and Client ID for logging
|
||||||
|
|
@ -60,7 +60,7 @@ if (isset($_GET['delete_trip'])) {
|
||||||
|
|
||||||
if (isset($_POST['export_trips_csv'])) {
|
if (isset($_POST['export_trips_csv'])) {
|
||||||
|
|
||||||
if (isset($_POST['client_id'])) {
|
if ($_POST['client_id']) {
|
||||||
$client_id = intval($_POST['client_id']);
|
$client_id = intval($_POST['client_id']);
|
||||||
$client_query = "AND trip_client_id = $client_id";
|
$client_query = "AND trip_client_id = $client_id";
|
||||||
$client_name = getFieldById('clients', $client_id, 'client_name');
|
$client_name = getFieldById('clients', $client_id, 'client_name');
|
||||||
|
|
@ -70,7 +70,7 @@ if (isset($_POST['export_trips_csv'])) {
|
||||||
$client_name = '';
|
$client_name = '';
|
||||||
$file_name_prepend = "$session_company_name-";
|
$file_name_prepend = "$session_company_name-";
|
||||||
}
|
}
|
||||||
|
|
||||||
$date_from = sanitizeInput($_POST['date_from']);
|
$date_from = sanitizeInput($_POST['date_from']);
|
||||||
$date_to = sanitizeInput($_POST['date_to']);
|
$date_to = sanitizeInput($_POST['date_to']);
|
||||||
if (!empty($date_from) && !empty($date_to)){
|
if (!empty($date_from) && !empty($date_to)){
|
||||||
|
|
@ -82,7 +82,7 @@ if (isset($_POST['export_trips_csv'])) {
|
||||||
}
|
}
|
||||||
|
|
||||||
//get records from database
|
//get records from database
|
||||||
$sql = mysqli_query($mysqli,"SELECT * FROM trips
|
$sql = mysqli_query($mysqli,"SELECT * FROM trips
|
||||||
LEFT JOIN clients ON trip_client_id = client_id
|
LEFT JOIN clients ON trip_client_id = client_id
|
||||||
WHERE $date_query
|
WHERE $date_query
|
||||||
$client_query
|
$client_query
|
||||||
|
|
@ -119,7 +119,7 @@ if (isset($_POST['export_trips_csv'])) {
|
||||||
|
|
||||||
//output all remaining data on a file pointer
|
//output all remaining data on a file pointer
|
||||||
fpassthru($f);
|
fpassthru($f);
|
||||||
|
|
||||||
logAction("Trip", "Export", "$session_name exported $count trip(s) to a CSV file");
|
logAction("Trip", "Export", "$session_name exported $count trip(s) to a CSV file");
|
||||||
}
|
}
|
||||||
exit;
|
exit;
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ if (isset($_POST['edit_vendor'])) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_GET['archive_vendor'])) {
|
if (isset($_GET['archive_vendor'])) {
|
||||||
|
|
||||||
$vendor_id = intval($_GET['archive_vendor']);
|
$vendor_id = intval($_GET['archive_vendor']);
|
||||||
|
|
||||||
//Get Vendor Name
|
//Get Vendor Name
|
||||||
|
|
@ -125,7 +125,7 @@ if(isset($_GET['unarchive_vendor'])){
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_GET['delete_vendor'])) {
|
if (isset($_GET['delete_vendor'])) {
|
||||||
|
|
||||||
$vendor_id = intval($_GET['delete_vendor']);
|
$vendor_id = intval($_GET['delete_vendor']);
|
||||||
|
|
||||||
//Get Vendor Name
|
//Get Vendor Name
|
||||||
|
|
@ -153,7 +153,7 @@ if (isset($_GET['delete_vendor'])) {
|
||||||
if (isset($_POST['bulk_archive_vendors'])) {
|
if (isset($_POST['bulk_archive_vendors'])) {
|
||||||
|
|
||||||
validateCSRFToken($_POST['csrf_token']);
|
validateCSRFToken($_POST['csrf_token']);
|
||||||
|
|
||||||
validateAdminRole();
|
validateAdminRole();
|
||||||
|
|
||||||
if (isset($_POST['vendor_ids'])) {
|
if (isset($_POST['vendor_ids'])) {
|
||||||
|
|
@ -190,7 +190,7 @@ if (isset($_POST['bulk_archive_vendors'])) {
|
||||||
if (isset($_POST['bulk_unarchive_vendors'])) {
|
if (isset($_POST['bulk_unarchive_vendors'])) {
|
||||||
|
|
||||||
validateCSRFToken($_POST['csrf_token']);
|
validateCSRFToken($_POST['csrf_token']);
|
||||||
|
|
||||||
validateAdminRole();
|
validateAdminRole();
|
||||||
|
|
||||||
if (isset($_POST['vendor_ids'])) {
|
if (isset($_POST['vendor_ids'])) {
|
||||||
|
|
@ -226,11 +226,11 @@ if (isset($_POST['bulk_unarchive_vendors'])) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_POST['bulk_delete_vendors'])) {
|
if (isset($_POST['bulk_delete_vendors'])) {
|
||||||
|
|
||||||
validateCSRFToken($_POST['csrf_token']);
|
validateCSRFToken($_POST['csrf_token']);
|
||||||
|
|
||||||
validateAdminRole();
|
validateAdminRole();
|
||||||
|
|
||||||
if (isset($_POST['vendor_ids'])) {
|
if (isset($_POST['vendor_ids'])) {
|
||||||
|
|
||||||
// Get Selected Count
|
// Get Selected Count
|
||||||
|
|
@ -260,7 +260,7 @@ if (isset($_POST['bulk_delete_vendors'])) {
|
||||||
}
|
}
|
||||||
|
|
||||||
logAction("Vendor", "Bulk Delete", "$session_name deleted $count vendor(s)");
|
logAction("Vendor", "Bulk Delete", "$session_name deleted $count vendor(s)");
|
||||||
|
|
||||||
flash_alert("Deleted <strong>$count</strong> vendor(s)", 'error');
|
flash_alert("Deleted <strong>$count</strong> vendor(s)", 'error');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -270,20 +270,20 @@ if (isset($_POST['bulk_delete_vendors'])) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_POST['export_vendors_csv'])) {
|
if (isset($_POST['export_vendors_csv'])) {
|
||||||
|
|
||||||
if (isset($_POST['client_id'])) {
|
if ($_POST['client_id']) {
|
||||||
$client_id = intval($_POST['client_id']);
|
$client_id = intval($_POST['client_id']);
|
||||||
$client_query = "AND vendor_client_id = $client_id";
|
$client_query = "WHERE vendor_client_id = $client_id";
|
||||||
$client_name = getFieldById('clients', $client_id, 'client_name');
|
$client_name = getFieldById('clients', $client_id, 'client_name');
|
||||||
$file_name_prepend = "$client_name-";
|
$file_name_prepend = "$client_name-";
|
||||||
} else {
|
} else {
|
||||||
$client_query = "AND vendor_client_id = 0";
|
$client_query = "WHERE vendor_client_id = 0";
|
||||||
$client_name = '';
|
$client_name = '';
|
||||||
$file_name_prepend = "$session_company_name-";
|
$file_name_prepend = "$session_company_name-";
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = mysqli_query($mysqli,"SELECT * FROM vendors WHERE vendor_template = 0 $client_query ORDER BY vendor_name ASC");
|
$sql = mysqli_query($mysqli,"SELECT * FROM vendors $client_query ORDER BY vendor_name ASC");
|
||||||
|
|
||||||
$count = mysqli_num_rows($sql);
|
$count = mysqli_num_rows($sql);
|
||||||
|
|
||||||
if ($count > 0) {
|
if ($count > 0) {
|
||||||
|
|
@ -319,5 +319,5 @@ if (isset($_POST['export_vendors_csv'])) {
|
||||||
logAction("Vendor", "Export", "$session_name exported $count vendor(s) to a CSV file");
|
logAction("Vendor", "Export", "$session_name exported $count vendor(s) to a CSV file");
|
||||||
|
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
<button type="button" class="btn btn-primary ajax-modal" data-modal-url="modals/product/product_add.php?type=<?= $type_filter ?>"><i class="fas fa-plus mr-2"></i>New <strong><?= ucwords($type_filter); ?></strong></button>
|
<button type="button" class="btn btn-primary ajax-modal" data-modal-url="modals/product/product_add.php?type=<?= $type_filter ?>"><i class="fas fa-plus mr-2"></i>New <strong><?= ucwords($type_filter); ?></strong></button>
|
||||||
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportProductsModal">
|
<a class="dropdown-item text-dark ajax-modal"
|
||||||
|
data-modal-url="modals/product/product_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>
|
||||||
|
|
@ -324,5 +325,4 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
<script src="/js/bulk_actions.js"></script>
|
<script src="/js/bulk_actions.js"></script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
require_once "modals/product/product_export.php";
|
|
||||||
require_once "../includes/footer.php";
|
require_once "../includes/footer.php";
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
<?php if ($num_rows[0] > 0) { ?>
|
<?php if ($num_rows[0] > 0) { ?>
|
||||||
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportQuoteModal">
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/quote/quote_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>
|
||||||
|
|
@ -254,5 +255,4 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
require_once "modals/quote/quote_export.php";
|
|
||||||
require_once "../includes/footer.php";
|
require_once "../includes/footer.php";
|
||||||
|
|
|
||||||
|
|
@ -71,12 +71,14 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
</button>
|
</button>
|
||||||
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#addSoftwareFromTemplateModal">
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/software/software_add_from_template.php?<?= $client_url ?>">
|
||||||
<i class="fas fa-fw fa-puzzle-piece mr-2"></i>Create from Template
|
<i class="fas fa-fw fa-puzzle-piece mr-2"></i>Create from Template
|
||||||
</a>
|
</a>
|
||||||
<?php if ($num_rows[0] > 0) { ?>
|
<?php if ($num_rows[0] > 0) { ?>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportSoftwareModal">
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/software/software_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 } ?>
|
||||||
|
|
@ -111,7 +113,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$sql_clients_filter = mysqli_query($mysqli, "
|
$sql_clients_filter = mysqli_query($mysqli, "
|
||||||
SELECT DISTINCT client_id, client_name
|
SELECT DISTINCT client_id, client_name
|
||||||
FROM clients
|
FROM clients
|
||||||
JOIN software ON software_client_id = client_id
|
JOIN software ON software_client_id = client_id
|
||||||
WHERE $archive_query
|
WHERE $archive_query
|
||||||
|
|
@ -212,7 +214,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
if ($software_expire) {
|
if ($software_expire) {
|
||||||
$software_expire_ago = timeAgo($software_expire);
|
$software_expire_ago = timeAgo($software_expire);
|
||||||
$software_expire_display = "<div>$software_expire</div><div><small>$software_expire_ago</small></div>";
|
$software_expire_display = "<div>$software_expire</div><div><small>$software_expire_ago</small></div>";
|
||||||
|
|
||||||
// Convert the expiry date to a timestamp
|
// Convert the expiry date to a timestamp
|
||||||
$software_expire_timestamp = strtotime($row['software_expire']);
|
$software_expire_timestamp = strtotime($row['software_expire']);
|
||||||
$current_timestamp = time(); // Get current timestamp
|
$current_timestamp = time(); // Get current timestamp
|
||||||
|
|
@ -226,16 +228,16 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
} elseif ($days_until_expiry <= 7) {
|
} elseif ($days_until_expiry <= 7) {
|
||||||
$tr_class = "table-danger";
|
$tr_class = "table-danger";
|
||||||
} elseif ($days_until_expiry <= 45) {
|
} elseif ($days_until_expiry <= 45) {
|
||||||
$tr_class = "table-warning";
|
$tr_class = "table-warning";
|
||||||
} else {
|
} else {
|
||||||
$tr_class = '';
|
$tr_class = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$software_expire_display = "<span class='text-muted'>N/A</span>";
|
$software_expire_display = "<span class='text-muted'>N/A</span>";
|
||||||
$tr_class = '';
|
$tr_class = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$software_created_at = nullable_htmlentities($row['software_created_at']);
|
$software_created_at = nullable_htmlentities($row['software_created_at']);
|
||||||
|
|
||||||
$seat_count = 0;
|
$seat_count = 0;
|
||||||
|
|
@ -321,7 +323,4 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once "modals/software/software_add_from_template.php";
|
|
||||||
require_once "modals/software/software_export.php";
|
|
||||||
require_once "../includes/footer.php";
|
require_once "../includes/footer.php";
|
||||||
|
|
|
||||||
|
|
@ -105,7 +105,7 @@ $sql = mysqli_query(
|
||||||
$ticket_permission_snippet
|
$ticket_permission_snippet
|
||||||
$client_query
|
$client_query
|
||||||
ORDER BY
|
ORDER BY
|
||||||
CASE
|
CASE
|
||||||
WHEN '$sort' = 'ticket_priority' THEN
|
WHEN '$sort' = 'ticket_priority' THEN
|
||||||
CASE ticket_priority
|
CASE ticket_priority
|
||||||
WHEN 'High' THEN 1
|
WHEN 'High' THEN 1
|
||||||
|
|
@ -114,7 +114,7 @@ $sql = mysqli_query(
|
||||||
ELSE 4 -- Optional: for unexpected priority values
|
ELSE 4 -- Optional: for unexpected priority values
|
||||||
END
|
END
|
||||||
ELSE NULL
|
ELSE NULL
|
||||||
END $order,
|
END $order,
|
||||||
$sort $order -- Apply normal sorting by $sort and $order
|
$sort $order -- Apply normal sorting by $sort and $order
|
||||||
LIMIT $record_from, $record_to"
|
LIMIT $record_from, $record_to"
|
||||||
);
|
);
|
||||||
|
|
@ -161,8 +161,8 @@ $sql_categories_filter = mysqli_query(
|
||||||
<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>Tickets
|
<h3 class="card-title mt-2"><i class="fa fa-fw fa-life-ring mr-2"></i>Tickets
|
||||||
<small class="ml-3">
|
<small class="ml-3">
|
||||||
<a href="?<?php echo $client_url; ?>status=Open" class="badge badge-pill text-light p-1 <?php if($status == 'Open') { echo "badge-light text-dark"; } ?>"><strong><?php echo $total_tickets_open; ?></strong> Open</a> |
|
<a href="?<?= $client_url ?>status=Open" class="badge badge-pill text-light p-1 <?php if($status == 'Open') { echo "badge-light text-dark"; } ?>"><strong><?= $total_tickets_open ?></strong> Open</a> |
|
||||||
<a href="?<?php echo $client_url; ?>status=Closed" class="badge badge-pill text-light p-1 <?php if($status == 'Closed') { echo "badge-light text-dark"; } ?>"><strong><?php echo $total_tickets_closed; ?></strong> Closed</a>
|
<a href="?<?= $client_url ?>status=Closed" class="badge badge-pill text-light p-1 <?php if($status == 'Closed') { echo "badge-light text-dark"; } ?>"><strong><?= $total_tickets_closed ?></strong> Closed</a>
|
||||||
</small>
|
</small>
|
||||||
</h3>
|
</h3>
|
||||||
<?php if (lookupUserPermission("module_support") >= 2) { ?>
|
<?php if (lookupUserPermission("module_support") >= 2) { ?>
|
||||||
|
|
@ -174,7 +174,8 @@ $sql_categories_filter = mysqli_query(
|
||||||
<?php if ($num_rows[0] > 0) { ?>
|
<?php if ($num_rows[0] > 0) { ?>
|
||||||
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportTicketModal">
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/ticket/ticket_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>
|
||||||
|
|
@ -186,9 +187,9 @@ $sql_categories_filter = mysqli_query(
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<form autocomplete="off">
|
<form autocomplete="off">
|
||||||
<?php if ($client_url) { ?>
|
<?php if ($client_url) { ?>
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<input type="hidden" name="status" value="<?php echo $status; ?>">
|
<input type="hidden" name="status" value="<?= $status ?>">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-4">
|
<div class="col-sm-4">
|
||||||
<div class="input-group mb-3 mb-sm-0">
|
<div class="input-group mb-3 mb-sm-0">
|
||||||
|
|
@ -220,7 +221,7 @@ $sql_categories_filter = mysqli_query(
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -261,44 +262,44 @@ $sql_categories_filter = mysqli_query(
|
||||||
<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 ajax-modal" href="#"
|
<a class="dropdown-item ajax-modal" href="#"
|
||||||
data-modal-url="modals/ticket/ticket_bulk_assign.php"
|
data-modal-url="modals/ticket/ticket_bulk_assign.php"
|
||||||
data-bulk="true">
|
data-bulk="true">
|
||||||
<i class="fas fa-fw fa-user-check mr-2"></i>Assign Agent
|
<i class="fas fa-fw fa-user-check mr-2"></i>Assign Agent
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item ajax-modal" href="#"
|
<a class="dropdown-item ajax-modal" href="#"
|
||||||
data-modal-url="modals/ticket/ticket_bulk_edit_category.php"
|
data-modal-url="modals/ticket/ticket_bulk_edit_category.php"
|
||||||
data-bulk="true">
|
data-bulk="true">
|
||||||
<i class="fas fa-fw fa-layer-group mr-2"></i>Set Category
|
<i class="fas fa-fw fa-layer-group mr-2"></i>Set Category
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item ajax-modal" href="#"
|
<a class="dropdown-item ajax-modal" href="#"
|
||||||
data-modal-url="modals/ticket/ticket_bulk_edit_priority.php"
|
data-modal-url="modals/ticket/ticket_bulk_edit_priority.php"
|
||||||
data-bulk="true">
|
data-bulk="true">
|
||||||
<i class="fas fa-fw fa-thermometer-half mr-2"></i>Set Priority
|
<i class="fas fa-fw fa-thermometer-half mr-2"></i>Set Priority
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item ajax-modal" href="#"
|
<a class="dropdown-item ajax-modal" href="#"
|
||||||
data-modal-url="modals/ticket/ticket_bulk_reply.php"
|
data-modal-url="modals/ticket/ticket_bulk_reply.php"
|
||||||
data-modal-size="lg"
|
data-modal-size="lg"
|
||||||
data-bulk="true">
|
data-bulk="true">
|
||||||
<i class="fas fa-fw fa-paper-plane mr-2"></i>Update/Reply
|
<i class="fas fa-fw fa-paper-plane mr-2"></i>Update/Reply
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item ajax-modal" href="#"
|
<a class="dropdown-item ajax-modal" href="#"
|
||||||
data-modal-url="modals/ticket/ticket_bulk_add_project.php"
|
data-modal-url="modals/ticket/ticket_bulk_add_project.php"
|
||||||
data-bulk="true">
|
data-bulk="true">
|
||||||
<i class="fas fa-fw fa-project-diagram mr-2"></i>Set Project
|
<i class="fas fa-fw fa-project-diagram mr-2"></i>Set Project
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item ajax-modal" href="#"
|
<a class="dropdown-item ajax-modal" href="#"
|
||||||
data-modal-url="modals/ticket/ticket_bulk_merge.php"
|
data-modal-url="modals/ticket/ticket_bulk_merge.php"
|
||||||
data-bulk="true">
|
data-bulk="true">
|
||||||
<i class="fas fa-fw fa-clone mr-2"></i>Merge
|
<i class="fas fa-fw fa-clone mr-2"></i>Merge
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item ajax-modal" href="#"
|
<a class="dropdown-item ajax-modal" href="#"
|
||||||
data-modal-url="modals/ticket/ticket_bulk_resolve.php"
|
data-modal-url="modals/ticket/ticket_bulk_resolve.php"
|
||||||
data-modal-size="lg"
|
data-modal-size="lg"
|
||||||
data-bulk="true">
|
data-bulk="true">
|
||||||
|
|
@ -407,5 +408,4 @@ if (isset($_GET["view"])) {
|
||||||
<script src="../js/bulk_actions.js"></script>
|
<script src="../js/bulk_actions.js"></script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
require_once "modals/ticket/ticket_export.php";
|
|
||||||
require_once "../includes/footer.php";
|
require_once "../includes/footer.php";
|
||||||
|
|
|
||||||
|
|
@ -37,12 +37,15 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
<div class="card-tools">
|
<div class="card-tools">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<button type="button" class="btn btn-primary ajax-modal" data-modal-url="modals/trip/trip_add.php?<?= $client_url ?>"><i class="fas fa-plus mr-2"></i>New Trip</button>
|
<button type="button" class="btn btn-primary ajax-modal" data-modal-url="modals/trip/trip_add.php?<?= $client_url ?>"><i class="fas fa-plus mr-2"></i>New Trip</button>
|
||||||
|
<?php if ($num_rows[0] > 0) { ?>
|
||||||
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportTripsModal">
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/trip/trip_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>
|
||||||
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -185,7 +188,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
<i class="fa fa-fw fa-map-marker-alt mr-2"></i>Map it<i class="fa fa-fw fa-external-link-alt ml-2"></i>
|
<i class="fa fa-fw fa-map-marker-alt mr-2"></i>Map it<i class="fa fa-fw fa-external-link-alt ml-2"></i>
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item ajax-modal" href="#"
|
<a class="dropdown-item ajax-modal" href="#"
|
||||||
data-modal-url="modals/trip/trip_edit.php?<?= $client_url ?>&id=<?= $trip_id ?>">
|
data-modal-url="modals/trip/trip_edit.php?<?= $client_url ?>&id=<?= $trip_id ?>">
|
||||||
<i class="fa fa-fw fa-edit mr-2"></i>Edit
|
<i class="fa fa-fw fa-edit mr-2"></i>Edit
|
||||||
</a>
|
</a>
|
||||||
|
|
@ -215,5 +218,4 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
require_once "modals/trip/trip_export.php";
|
|
||||||
require_once "../includes/footer.php";
|
require_once "../includes/footer.php";
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ $sql = mysqli_query(
|
||||||
$mysqli,
|
$mysqli,
|
||||||
"SELECT SQL_CALC_FOUND_ROWS * FROM vendors
|
"SELECT SQL_CALC_FOUND_ROWS * FROM vendors
|
||||||
LEFT JOIN clients ON client_id = vendor_client_id
|
LEFT JOIN clients ON client_id = vendor_client_id
|
||||||
LEFT JOIN vendor_templates ON vendors.vendor_template_id = vendor_templates.vendor_template_id
|
LEFT JOIN vendor_templates ON vendors.vendor_template_id = vendor_templates.vendor_template_id
|
||||||
WHERE vendor_$archive_query
|
WHERE vendor_$archive_query
|
||||||
AND (vendor_name LIKE '%$q%' OR vendor_description LIKE '%$q%' OR vendor_account_number LIKE '%$q%' OR vendor_website LIKE '%$q%' OR vendor_contact_name LIKE '%$q%' OR vendor_email LIKE '%$q%' OR vendor_phone LIKE '%$phone_query%')
|
AND (vendor_name LIKE '%$q%' OR vendor_description LIKE '%$q%' OR vendor_account_number LIKE '%$q%' OR vendor_website LIKE '%$q%' OR vendor_contact_name LIKE '%$q%' OR vendor_email LIKE '%$q%' OR vendor_phone LIKE '%$phone_query%')
|
||||||
$client_query
|
$client_query
|
||||||
|
|
@ -43,12 +43,14 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
</button>
|
</button>
|
||||||
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#addVendorFromTemplateModal">
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/vendor/vendor_add_from_template.php?<?= $client_url ?>">
|
||||||
<i class="fa fa-fw fa-puzzle-piece mr-2"></i>Create from Template
|
<i class="fa fa-fw fa-puzzle-piece mr-2"></i>Create from Template
|
||||||
</a>
|
</a>
|
||||||
<?php if ($num_rows[0] > 0) { ?>
|
<?php if ($num_rows[0] > 0) { ?>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportVendorModal">
|
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/vendor/vendor_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 } ?>
|
||||||
|
|
@ -267,7 +269,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
@ -283,6 +285,4 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
<script src="../js/bulk_actions.js"></script>
|
<script src="../js/bulk_actions.js"></script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
require_once "modals/vendor/vendor_add_from_template.php";
|
|
||||||
require_once "modals/vendor/vendor_export.php";
|
|
||||||
require_once "../includes/footer.php";
|
require_once "../includes/footer.php";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue