versao word 1
This commit is contained in:
parent
2968f9881d
commit
ce24996ce4
@ -124,43 +124,47 @@ header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<h2 class="section-title">Detalhes Técnicos</h2>
|
<h2 class="section-title">Dados Elétricos</h2>
|
||||||
<table class="details-table">
|
<table class="details-table">
|
||||||
<tr>
|
<tr>
|
||||||
<td>Potência do Carregador (kW)</td>
|
<td>Tensão (V)</td>
|
||||||
<td><?php echo htmlspecialchars($installation['charger_power']); ?></td>
|
<td><?php echo htmlspecialchars($installation['voltage'] ?? 'N/A'); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Tensão da Rede (V)</td>
|
<td>Fase-Neutro-Terra</td>
|
||||||
<td><?php echo htmlspecialchars($installation['grid_voltage']); ?></td>
|
<td><?php echo htmlspecialchars($installation['phase_neutral_ground'] ?? 'N/A'); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Tipo de Disjuntor</td>
|
<td>Saída do Disjuntor</td>
|
||||||
<td><?php echo htmlspecialchars($installation['breaker_type']); ?></td>
|
<td><?php echo htmlspecialchars($installation['breaker_output'] ?? 'N/A'); ?></td>
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Número de Série</td>
|
|
||||||
<td><?php echo htmlspecialchars($installation['serial_number']); ?></td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<h2 class="section-title">Observações</h2>
|
<h2 class="section-title">Observações</h2>
|
||||||
<p><?php echo nl2br(htmlspecialchars($installation['notes'])); ?></p>
|
<p><?php echo nl2br(htmlspecialchars($installation['observations'] ?? 'Nenhuma observação.')); ?></p>
|
||||||
|
|
||||||
<?php if (!empty($images)): ?>
|
<?php if (!empty($images)): ?>
|
||||||
<h2 class="section-title">Imagens da Instalação</h2>
|
<h2 class="section-title">Imagens da Instalação</h2>
|
||||||
<div class="images-section">
|
<div class="images-section" style="page-break-before: always;">
|
||||||
<?php foreach ($images as $image):
|
<?php foreach ($images as $image):
|
||||||
// Monta o caminho absoluto da imagem para obter seu conteúdo
|
// Construir caminho absoluto de forma mais robusta
|
||||||
$base_path = $_SERVER['DOCUMENT_ROOT'];
|
$image_full_path = __DIR__ . '/' . $image['image_path'];
|
||||||
$image_full_path = $base_path . '/' . $image['image_path'];
|
|
||||||
|
|
||||||
if (file_exists($image_full_path)) {
|
if (file_exists($image_full_path)) {
|
||||||
|
// Tentar obter o tipo MIME
|
||||||
|
$finfo = finfo_open(FILEINFO_MIME_TYPE);
|
||||||
|
$image_mime = finfo_file($finfo, $image_full_path);
|
||||||
|
finfo_close($finfo);
|
||||||
|
|
||||||
|
// Obter conteúdo e codificar
|
||||||
$image_data = base64_encode(file_get_contents($image_full_path));
|
$image_data = base64_encode(file_get_contents($image_full_path));
|
||||||
$image_mime = mime_content_type($image_full_path);
|
|
||||||
echo '<img src="data:' . $image_mime . ';base64,' . $image_data . '" alt="Imagem da Instalação">';
|
// Exibir imagem incorporada
|
||||||
|
echo '<img src="data:' . $image_mime . ';base64,' . $image_data . '" alt="Imagem da Instalação"><br>';
|
||||||
|
} else {
|
||||||
|
echo '<p style="color: red;">Imagem não encontrada no caminho: ' . htmlspecialchars($image['image_path']) . '</p>';
|
||||||
}
|
}
|
||||||
?><?php endforeach; ?>
|
?><?php endforeach; ?>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user