diff --git a/ajax.php b/ajax.php index f1c6dcb2..2a251862 100644 --- a/ajax.php +++ b/ajax.php @@ -71,7 +71,7 @@ if (isset($_GET['certificate_get_json_details'])) { * Looks up info for a given domain ID from the database, used to dynamically populate modal fields */ if (isset($_GET['domain_get_json_details'])) { - validateTechRole(); + enforceUserPermission('module_support'); $domain_id = intval($_GET['domain_id']); $client_id = intval($_GET['client_id']); @@ -88,6 +88,24 @@ if (isset($_GET['domain_get_json_details'])) { $response['vendors'][] = $row; } + // Get domain history + $history_sql = mysqli_query($mysqli, "SELECT * FROM domain_history WHERE domain_history_domain_id = $domain_id"); + $history_html = "
| Date | Column | Old Value | New Value |
|---|---|---|---|
| " . htmlspecialchars(date('Y-m-d', strtotime($row['domain_history_modified_at']))) . " | "; + $history_html .= "" . htmlspecialchars($row['domain_history_column']) . " | "; + $history_html .= "" . htmlspecialchars($row['domain_history_old_value']) . " | "; + $history_html .= "" . htmlspecialchars($row['domain_history_new_value']) . " | "; + $history_html .= "