mirror of
https://github.com/itflow-org/itflow
synced 2026-03-01 03:14:52 +00:00
Created whole new section Client Overview to get a global view of all your clients things, merged domains and assets into one
This commit is contained in:
@@ -496,7 +496,7 @@ if (isset($_POST['bulk_unarchive_assets'])) {
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
}
|
||||
|
||||
if (isset($_POST["import_client_assets_csv"])) {
|
||||
if (isset($_POST["import_assets_csv"])) {
|
||||
|
||||
enforceUserPermission('module_support', 2);
|
||||
|
||||
@@ -622,7 +622,7 @@ if (isset($_POST["import_client_assets_csv"])) {
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($_GET['download_client_assets_csv_template'])) {
|
||||
if (isset($_GET['download_assets_csv_template'])) {
|
||||
$client_id = intval($_GET['download_client_assets_csv_template']);
|
||||
|
||||
//get records from database
|
||||
@@ -654,16 +654,21 @@ if (isset($_GET['download_client_assets_csv_template'])) {
|
||||
|
||||
}
|
||||
|
||||
if (isset($_POST['export_client_assets_csv'])) {
|
||||
if (isset($_POST['export_assets_csv'])) {
|
||||
|
||||
enforceUserPermission('module_support');
|
||||
|
||||
validateCSRFToken($_POST['csrf_token']);
|
||||
|
||||
$client_id = intval($_POST['client_id']);
|
||||
if (isset($_POST['client_id'])) {
|
||||
$client_id = intval($_POST['client_id']);
|
||||
$client_query = "AND asset_client_id = $client_id";
|
||||
} else {
|
||||
$client_query = '';
|
||||
}
|
||||
|
||||
//get records from database
|
||||
$sql = mysqli_query($mysqli,"SELECT * FROM assets LEFT JOIN contacts ON asset_contact_id = contact_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 clients ON asset_client_id = client_id WHERE asset_client_id = $client_id AND asset_archived_at IS NULL ORDER BY asset_name ASC");
|
||||
$sql = mysqli_query($mysqli,"SELECT * FROM assets LEFT JOIN contacts ON asset_contact_id = contact_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 clients ON asset_client_id = client_id WHERE asset_archived_at IS NULL $client_query ORDER BY asset_name ASC");
|
||||
$row = mysqli_fetch_array($sql);
|
||||
|
||||
$client_name = $row['client_name'];
|
||||
|
||||
Reference in New Issue
Block a user