File "Siege_schedule.php"
Full path: C:/xampp/htdocs/SITE FUNCIONANDO (STRING_NOTFOUND_837_111)/Siege_schedule.php
File
size: 9.56 B (9.56 KB bytes)
MIME-type: text/html
Charset: utf-8
Download Open Edit Advanced Editor &nnbsp; Back
<?php
require_once "header.php";
?>
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Agendamentos de Fortaleza</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: Arial, sans-serif;
background: url('img/SESSÃO01_VORTEX_AION.gif') no-repeat center center fixed;
background-size: cover;
color: #FFF;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
}
.container {
background: rgba(0, 0, 0, 0.6);
padding: 20px;
border-radius: 10px;
text-align: center;
max-width: 1220px;
width: 100%;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.6);
margin-top: 3.5cm;
}
h1 {
margin-bottom: 10px;
font-size: 1.8em;
color: white;
}
.grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 20px;
}
.fortress {
background: rgba(255, 255, 255, 0.1);
border-radius: 10px;
text-align: center;
padding: 10px;
overflow: hidden;
}
.fortress img {
width: 269px;
height: 200px;
object-fit: cover;
border-radius: 10px;
}
.fortress h3 {
margin: 10px 0;
font-size: 1.2em;
color: #FFD700;
}
.countdown {
font-size: 1em;
}
.countdown.white {
color: #FFF;
}
.countdown.orange {
color: orange;
}
.countdown.red {
color: red;
font-weight: bold;
}
.header-buttons {
display: flex;
justify-content: center;
margin: 20px auto;
gap: 15px;
}
.header-buttons a {
padding: 12px 25px;
text-decoration: none;
color: #fff;
background: linear-gradient(145deg, #1e1e1e, #2a2a2a);
border: 2px solid #555;
border-radius: 8px;
font-weight: bold;
text-align: center;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
transition: all 0.3s ease;
font-size: 1rem;
letter-spacing: 0.5px;
backdrop-filter: blur(10px);
position: relative;
overflow: hidden;
}
.header-buttons a::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: rgba(255, 255, 255, 0.2);
transition: all 0.3s ease;
}
.header-buttons a:hover::before {
left: 100%;
}
.header-buttons a:hover {
background: linear-gradient(145deg, #2a2a2a, #1e1e1e);
border-color: #777;
box-shadow: 0 6px 8px rgba(0, 0, 0, 0.5);
}
</style>
</head>
<body>
<div class="container">
<div class="header-buttons">
<a href="https://vortexaion.com/Siege_schedule">Siege</a>
<a href="https://vortexaion.com/Arenas_Portais_Recompensas">Arenas Crucible</a>
<a href="https://vortexaion.com/WorldBoss">World Boss</a>
<a href="https://vortexaion.com/Rift_schedule">Rifts</a>
<a href="https://vortexaion.com/mapaPvPvE_guia">Mapa PvPvE</a>
</div>
<h1>Fortalezas - Siege</h1>
<div class="grid">
<?php
$fortresses = [
["Sulfur Fortress", "sulfur.jpg"],
["Divine Fortress", "divine.jpg"],
["Siel Western Fortress", "west.jpg"],
["Siel Eastern Fortress", "east.jpg"],
["Roah Fortress", "roah.jpg"],
["Krotan Refuge", "krotan.jpg"],
["Kysis Fortress", "kysis.jpg"],
["Miren Fortress", "miren.jpg"],
["Asteria Fortress", "asteria.jpg"],
["Temple of Scales", "scales.jpg"],
["Altar of Avarice", "avarice.jpg"],
["Vorgaltem Citadel", "vorgaltem.jpg"],
["Crimson Temple", "crimson.jpg"]
];
foreach ($fortresses as $fortress) {
echo "<div class='fortress'>
<img src='img/SIEGES FOTOS/{$fortress[1]}' alt='{$fortress[0]}'>
<h3>{$fortress[0]}</h3>
<div class='countdown' id='countdown-".strtolower(str_replace(" ", "-", $fortress[0]))."'>Calculando...</div>
</div>";
}
?>
</div>
</div>
<script>
const schedules = {
"countdown-divine-fortress": ["Friday 21:00"],
"countdown-siel-western-fortress": ["Tuesday 17:00", "Thursday 17:00", "Saturday 17:00"],
"countdown-siel-eastern-fortress": ["Tuesday 17:00", "Thursday 17:00", "Saturday 17:00"],
"countdown-sulfur-fortress": ["Tuesday 17:00", "Thursday 17:00", "Saturday 17:00"],
"countdown-roah-fortress": ["Tuesday 17:00", "Thursday 17:00", "Saturday 17:00"],
"countdown-krotan-refuge": ["Monday 19:00", "Saturday 21:00"],
"countdown-kysis-fortress": ["Monday 19:00", "Saturday 21:00"],
"countdown-miren-fortress": ["Monday 19:00", "Saturday 21:00"],
"countdown-asteria-fortress": ["Tuesday 17:00", "Thursday 17:00", "Saturday 17:00"],
"countdown-temple-of-scales": ["Saturday 19:00", "Monday 21:00", "Wednesday 21:00"],
"countdown-altar-of-avarice": ["Saturday 19:00", "Monday 21:00", "Wednesday 21:00"],
"countdown-vorgaltem-citadel": ["Thursday 19:00", "Saturday 19:00", "Wednesday 21:00"],
"countdown-crimson-temple": ["Thursday 19:00", "Saturday 19:00", "Wednesday 21:00"]
};
function getNextEvent(schedule) {
const now = new Date();
const nowDay = now.getDay();
const nowTime = now.getHours() * 60 + now.getMinutes(); // Time in minutes
let closestTime = null;
let closestDayDiff = 7; // Maximum difference is a week
let ongoing = false;
schedule.forEach(event => {
const [dayName, time] = event.split(" ");
const day = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"].indexOf(dayName);
const [hours, minutes] = time.split(":").map(Number);
const eventTime = hours * 60 + minutes;
const dayDiff = (day - nowDay + 7) % 7;
const totalDiff = dayDiff * 1440 + eventTime - nowTime; // Time difference in minutes
// Check if the event is ongoing (within the 60-minute window)
if (dayDiff === 0 && nowTime >= eventTime && nowTime <= eventTime + 60) {
ongoing = true;
}
// Find the next closest event
if (totalDiff >= 0 && totalDiff < closestDayDiff * 1440 + closestTime) {
closestTime = eventTime;
closestDayDiff = dayDiff;
}
});
if (ongoing) {
return { ongoing: true };
}
const nextEventDate = new Date();
nextEventDate.setDate(now.getDate() + closestDayDiff);
nextEventDate.setHours(Math.floor(closestTime / 60), closestTime % 60, 0, 0);
return { ongoing: false, nextEventDate };
}
function updateCountdown() {
const now = new Date().getTime();
Object.keys(schedules).forEach(id => {
const schedule = schedules[id];
const { ongoing, nextEventDate } = getNextEvent(schedule);
const countdownElement = document.getElementById(id);
if (ongoing) {
countdownElement.textContent = "Está vulnerável, conquiste-o imediatamente!";
countdownElement.style.color = "Lightred"; // Define o texto como verde diretamente
countdownElement.style.fontWeight = "bold"; // Torna o texto em negrito (opcional)
countdownElement.className = "countdown red";
} else if (nextEventDate) {
const timeLeft = nextEventDate.getTime() - now;
const days = Math.floor(timeLeft / (1000 * 60 * 60 * 24));
const hours = Math.floor((timeLeft % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
const minutes = Math.floor((timeLeft % (1000 * 60 * 60)) / (1000 * 60));
const seconds = Math.floor((timeLeft % (1000 * 60)) / 1000); // Add seconds
// Update countdown text with seconds
if (days > 0) {
countdownElement.textContent = `Ficará Vulnerável em ${days} dias e ${hours} horas.`;
countdownElement.className = "countdown white";
} else if (hours > 10) {
countdownElement.textContent = `Ficará Vulnerável em ${hours} horas e ${minutes} minutos.`;
countdownElement.className = "countdown white";
} else if (hours > 3) {
countdownElement.textContent = `Ficará Vulnerável em ${hours} horas e ${minutes} minutos.`;
countdownElement.className = "countdown orange";
} else if (minutes < 59) {
countdownElement.textContent = `Ficará Vulnerável em ${minutes} minutos e ${seconds} segundos.`;
countdownElement.className = "countdown Orange";
} else {
countdownElement.textContent = `Ficará Vulnerável em ${hours} horas, ${minutes} minutos e ${seconds} segundos.`;
countdownElement.className = "countdown Lightgreen";
}
}
});
}
updateCountdown();
setInterval(updateCountdown, 1000);
</script>
</body>
</html>