Nothing to see here

Go Back"; } else { $client_id = intval($location['location_client_id']); enforceClientAccess(); $client_name = escapeHtml($location['client_name']); $location_name = escapeHtml($location['location_name']); $location_description = escapeHtml($location['location_description']); $location_address_lines = escapeHtml(formatAddress($location['location_address'], $location['location_city'], $location['location_state'], $location['location_zip'], $location['location_country'], "\n")); $location_address_text = locationAddressText($location, true); $location_map_url = locationMapUrl($location); $location_directions_url = locationDirectionsUrl($location); $location_phone = contactPhoneLink($location['location_phone'], $location['location_phone_country_code'], $location['location_phone_extension']); $location_phone_dial = preg_replace('/[^0-9]/', '', (string) $location['location_phone']); $location_fax = $location['location_fax'] ? escapeHtml(formatPhoneNumber($location['location_fax'], $location['location_fax_country_code'])) : ''; $location_hours = escapeHtml($location['location_hours']); $location_notes = escapeHtml($location['location_notes']); $location_primary = intval($location['location_primary']); $location_archived_at = escapeHtml($location['location_archived_at']); $location_created_at = escapeHtml($location['location_created_at']); $can_edit = lookupUserPermission('module_client') >= 2; $can_delete = lookupUserPermission('module_client') >= 3 && !empty($config_destructive_deletes_enable); $can_support = lookupUserPermission('module_support') >= 1; $can_support_edit = lookupUserPermission('module_support') >= 2; $can_move = $can_edit || $can_support_edit; // Override Tab Title // No Sanitizing needed as this var will only be used in the tab title $page_title = $location['location_name']; $location_tags_display = tagPills('location', $location_id, tagsForRecord('location', $location_id), "locations.php?client_id=$client_id&"); // People based here $people = []; $sql = mysqli_query($mysqli, "SELECT contact_id, contact_name, contact_title, contact_email, contact_phone, contact_phone_country_code, contact_extension, contact_mobile, contact_mobile_country_code, contact_photo, contact_client_id, contact_primary, contact_important, contact_billing, contact_technical FROM contacts WHERE contact_location_id = $location_id AND contact_archived_at IS NULL ORDER BY contact_primary DESC, contact_important DESC, contact_name ASC"); while ($row = mysqli_fetch_assoc($sql)) { $people[] = $row; } // What is on site $assets = $networks = $racks = $tickets = []; $ticket_count = $ticket_open_count = 0; if ($can_support) { $sql = mysqli_query($mysqli, "SELECT asset_id, asset_name, asset_type, asset_make, asset_model, asset_status, asset_physical_location, interface_ip, contact_id, contact_name, contact_photo, contact_archived_at FROM assets LEFT JOIN asset_interfaces ON interface_asset_id = asset_id AND interface_primary = 1 LEFT JOIN contacts ON contact_id = asset_contact_id WHERE asset_location_id = $location_id AND asset_archived_at IS NULL ORDER BY asset_type ASC, asset_name ASC"); while ($row = mysqli_fetch_assoc($sql)) { $assets[] = $row; } $sql = mysqli_query($mysqli, "SELECT network_id, network_name, network_description, network_type, network, network_vlan, network_gateway, network_dhcp_range FROM networks WHERE network_location_id = $location_id AND network_archived_at IS NULL ORDER BY network_name ASC"); while ($row = mysqli_fetch_assoc($sql)) { $networks[intval($row['network_id'])] = $row; } $network_usage = networkUsage($networks); $sql = mysqli_query($mysqli, "SELECT rack_id, rack_name, rack_type, rack_model, rack_units, rack_physical_location FROM racks WHERE rack_location_id = $location_id AND rack_archived_at IS NULL ORDER BY rack_name ASC"); while ($row = mysqli_fetch_assoc($sql)) { $racks[] = $row; } // Tickets for this site - every open one, then the most recent closed ones [$ticket_count, $ticket_open_count] = ticketCounts("tickets.ticket_location_id = $location_id"); $tickets = ticketRows("tickets.ticket_location_id = $location_id", max(25, $ticket_open_count)); } // The driving out to it - functions/trips.php, so an agent without Financial access sees their own $show_trips = !empty($config_module_enable_accounting); $trips = $show_trips ? tripsFor('trip_location_id', $location_id, 25) : []; [$trip_count, $trip_miles] = $show_trips ? tripTotalsFor('trip_location_id', $location_id) : [0, 0.0]; $documents = $can_support ? linkedRecords('location', $location_id, 'document') : []; $files = $can_support ? linkedRecords('location', $location_id, 'file') : []; $history = locationHistory($location_id, 100); $location_tabs = [ 'people' => ['label' => 'People', 'icon' => 'fa-users', 'count' => count($people)], 'assets' => ['label' => 'Assets', 'icon' => 'fa-desktop', 'count' => count($assets)], 'networks' => ['label' => 'Networks', 'icon' => 'fa-network-wired', 'count' => count($networks)], 'racks' => ['label' => 'Racks', 'icon' => 'fa-server', 'count' => count($racks)], 'tickets' => ['label' => 'Tickets', 'icon' => 'fa-life-ring', 'count' => $ticket_count, 'badge' => $ticket_open_count], 'trips' => ['label' => 'Trips', 'icon' => 'fa-route', 'count' => $trip_count], 'documents' => ['label' => 'Documents', 'icon' => 'fa-file-alt', 'count' => count($documents)], 'files' => ['label' => 'Files', 'icon' => 'fa-paperclip', 'count' => count($files)], 'history' => ['label' => 'History', 'icon' => 'fa-history', 'count' => count($history)], ]; if (!$show_trips) { unset($location_tabs['trips']); } if (!$can_support) { unset($location_tabs['assets'], $location_tabs['networks'], $location_tabs['racks'], $location_tabs['tickets'], $location_tabs['documents'], $location_tabs['files']); } $move_url = "modals/location/location_assign.php?id=$location_id&kind="; $unset_url = function ($kind, $id) use ($location_id) { return "post.php?unset_location_record=" . intval($id) . "&location_id=$location_id&kind=$kind&csrf_token=" . $_SESSION['csrf_token']; }; $link_url = "modals/link/link.php?from=location&id=$location_id&to="; ?>
" target="_blank" rel="noopener" title="Open photo">

Primary Archived

Getting there

Address
Not recorded
Phone
Fax
Hours
Not recorded' ?>
Added

Ask for

'fw-semibold', 'archived' => !empty($location['contact_archived_at'])]) ?>

Access notes