mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 19:04: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:
@@ -329,25 +329,24 @@ if (isset($_POST['bulk_delete_domains'])) {
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
}
|
||||
|
||||
if (isset($_POST['export_client_domains_csv'])) {
|
||||
if (isset($_POST['export_domains_csv'])) {
|
||||
|
||||
enforceUserPermission('module_support');
|
||||
|
||||
$client_id = intval($_POST['client_id']);
|
||||
if (isset($_POST['client_id'])) {
|
||||
$client_id = intval($_POST['client_id']);
|
||||
$client_query = "WHERE domain_client_id = $client_id";
|
||||
} else {
|
||||
$client_query = '';
|
||||
}
|
||||
|
||||
//get records from database
|
||||
$sql = mysqli_query($mysqli,"SELECT client_name FROM clients WHERE client_id = $client_id");
|
||||
$row = mysqli_fetch_array($sql);
|
||||
|
||||
$client_name = $row['client_name'];
|
||||
|
||||
$sql = mysqli_query($mysqli,"SELECT * FROM domains WHERE domain_client_id = $client_id ORDER BY domain_name ASC");
|
||||
$sql = mysqli_query($mysqli,"SELECT * FROM domains $client_query ORDER BY domain_name ASC");
|
||||
|
||||
$num_rows = mysqli_num_rows($sql);
|
||||
|
||||
if ($num_rows > 0) {
|
||||
$delimiter = ",";
|
||||
$filename = $client_name . "-Domains-" . date('Y-m-d') . ".csv";
|
||||
$filename = "Domains-" . date('Y-m-d') . ".csv";
|
||||
|
||||
//create a file pointer
|
||||
$f = fopen('php://memory', 'w');
|
||||
@@ -374,7 +373,7 @@ if (isset($_POST['export_client_domains_csv'])) {
|
||||
}
|
||||
|
||||
// Logging
|
||||
logAction("Domain", "Export", "$session_name exported $num_rows domain(s)", $client_id);
|
||||
logAction("Domain", "Export", "$session_name exported $num_rows domain(s)");
|
||||
|
||||
exit;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user