Skip to content

Commit

Permalink
Correct header to use variable from configuration page and change old…
Browse files Browse the repository at this point in the history
… reservation field to eval the status field fixes #1441
  • Loading branch information
wilpig committed Sep 14, 2023
1 parent 9f1170a commit 67f1a96
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions report-em_new_installs.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
$mail->Subject = __("Recent Data Center Installations Report" );
$mail->addAttachment( $config->ParameterArray["PDFLogoFile"], "logo.png" );

$htmlMessage = sprintf( "<!doctype html><html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"><title>ITS Data Center Inventory</title></head><body><div id=\"header\" style=\"padding: 5px 0;background: %s;\"><center><img src=\"%s\"></center></div><div class=\"page\"><p><h3>Installations in the Past 7 Days</h3>\n", $config->ParameterArray["HeaderColor"], "logo.png" );
$htmlMessage = sprintf( "<!doctype html><html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"><title>ITS Data Center Inventory</title></head><body><div id=\"header\" style=\"padding: 5px 0;background: %s;\"><center><img src=\"%s\"></center></div><div class=\"page\"><p><h3>Installations in the Past %d Days</h3>\n", $config->ParameterArray["HeaderColor"], "logo.png", $config->ParameterArray["NewInstallsPeriod"] );

$htmlMessage .= sprintf( "<p>The following systems have been entered into openDCIM, with an Install Date set to within the past %d days. Please review these entries to determine if follow-up documentation is required.</p>", $config->ParameterArray["NewInstallsPeriod"] );

Expand All @@ -40,7 +40,7 @@
$dept->DeptID = $devRow->Owner;
$dept->GetDeptByID();

$htmlMessage .= sprintf( "<tr><td>%s</td><td>%s</td><td>%s</td><td><a href=\"%s/cabnavigator.php?cabinetid=%d\">%s</a></td><td><a href=\"%s/devices.php?DeviceID=%d\">%s</a></td><td>%s</td></tr>\n", date( "d F Y", strtotime( $devRow->InstallDate ) ), $devRow->Reservation == 1 ? "Y" : "N", $dc->Name, $config->ParameterArray["InstallURL"], $cab->CabinetID, $cab->Location, $config->ParameterArray["InstallURL"], $devRow->DeviceID, $devRow->Label, $dept->Name );
$htmlMessage .= sprintf( "<tr><td>%s</td><td>%s</td><td>%s</td><td><a href=\"%s/cabnavigator.php?cabinetid=%d\">%s</a></td><td><a href=\"%s/devices.php?DeviceID=%d\">%s</a></td><td>%s</td></tr>\n", date( "d F Y", strtotime( $devRow->InstallDate ) ), $devRow->Status == "Reserved" ? "Y" : "N", $dc->Name, $config->ParameterArray["InstallURL"], $cab->CabinetID, $cab->Location, $config->ParameterArray["InstallURL"], $devRow->DeviceID, $devRow->Label, $dept->Name );
}

$htmlMessage .= "</table>\n";
Expand Down

0 comments on commit 67f1a96

Please sign in to comment.