Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
pu4ron authored Dec 8, 2024
1 parent 7900aa1 commit f24a20f
Showing 1 changed file with 31 additions and 30 deletions.
61 changes: 31 additions & 30 deletions html/frames.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function convertZuluToBRTime($zuluTime) {
}
}
} else {
$error = "Arquivo de log não encontrado: $logFile";
$error = "Arquivo de log não encontrado: $logFile";
}
}
?>
Expand Down Expand Up @@ -63,22 +63,6 @@ function convertZuluToBRTime($zuluTime) {
.form-container input[type="submit"]:hover {
background-color: #45a049;
}
.toggle-time-container {
text-align: center;
margin: 15px auto;
}
.toggle-time-container button {
padding: 6px 12px;
font-size: 14px;
background-color: #4CAF50;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
}
.toggle-time-container button:hover {
background-color: #45a049;
}
table {
width: 100%;
border-collapse: collapse;
Expand Down Expand Up @@ -118,6 +102,22 @@ function convertZuluToBRTime($zuluTime) {
max-width: 300px;
height: auto;
}
.toggle-time-container {
text-align: center;
margin-top: 20px;
}
.toggle-time-container button {
padding: 6px 12px;
font-size: 14px;
background-color: #4CAF50;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
}
.toggle-time-container button:hover {
background-color: #45a049;
}
</style>
</head>
<body>
Expand All @@ -132,22 +132,17 @@ function convertZuluToBRTime($zuluTime) {
<input type="text" name="getcall" id="getcall" maxlength="10" value="<?= htmlspecialchars($searchCall) ?>">
<input type="submit" value="Pesquisar">
</form>
<br>
</div>

<?php if (isset($error)): ?>
<p class="error"><?= htmlspecialchars($error) ?></p>
<?php elseif (!empty($results)): ?>
<div class="toggle-time-container">
<button id="toggle-time">Fuso hor&aacute;rio</button>
</div>
<br>
<table>
<thead>
<tr>
<th>Canal</th>
<th>Data</th>
<th>Hora</th>
<th class="time-cell" id="toggle-time-header" style="cursor: pointer;">Hora</th>
<th>Fonte</th>
<th>Nome</th>
<th>Latitude</th>
Expand Down Expand Up @@ -175,7 +170,8 @@ function convertZuluToBRTime($zuluTime) {
<tr>
<td><?= htmlspecialchars($fields[0] ?? '') ?></td>
<td><?= htmlspecialchars($formattedDate) ?></td>
<td class="time-cell" data-zulu="<?= htmlspecialchars($time) ?>" data-br="<?= htmlspecialchars($brTime) ?>">UTC: <?= htmlspecialchars($time) ?></td>
<td class="time-cell" data-zulu="<?= htmlspecialchars($time) ?>" data-br="<?= htmlspecialchars($brTime) ?>">
UTC: <?= htmlspecialchars($time ?: 'Indefinido') ?></td>
<td><?= htmlspecialchars($fields[3] ?? '') ?></td>
<td><?= htmlspecialchars($fields[8] ?? '') ?></td>
<td><?= htmlspecialchars($fields[10] ?? '') ?></td>
Expand All @@ -196,17 +192,22 @@ function convertZuluToBRTime($zuluTime) {
<?php endif; ?>

<br><br><br><br>
<center><a><b>Direwolf dashboard - Modificado por: Ronualdo PU4RON. Desenvolvido por Alfredo IZ7BOJ</center>
<center><a><b>Direwolf dashboard - Modificado por: Ronualdo PU4RON. Desenvolvido por Alfredo IZ7BOJ</b></a></center>

<script>
document.getElementById('toggle-time')?.addEventListener('click', function() {
document.getElementById('toggle-time-header')?.addEventListener('click', function() {
const timeCells = document.querySelectorAll('.time-cell');
timeCells.forEach(cell => {
const isZulu = cell.textContent.startsWith('UTC:');
if (isZulu) {
cell.textContent = 'BR: ' + cell.dataset.br;
} else {
cell.textContent = 'UTC: ' + cell.dataset.zulu;
const zuluTime = cell.dataset.zulu;
const brTime = cell.dataset.br;

if (zuluTime && brTime) {
if (isZulu) {
cell.textContent = 'BR: ' + brTime;
} else {
cell.textContent = 'UTC: ' + zuluTime;
}
}
});
});
Expand Down

0 comments on commit f24a20f

Please sign in to comment.