Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>View Departure Logs - Parth Naik International Airport</title>
- <style>
- body {
- font-family: 'Arial', sans-serif;
- text-align: center;
- margin: 0;
- padding: 0;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- min-height: 100vh;
- overflow: hidden;
- color: #fff;
- background: linear-gradient(45deg, #2ecc71, #3498db, #e74c3c, #9b59b6);
- background-size: 400% 400%;
- animation: gradientAnimation 15s ease infinite;
- }
- @keyframes gradientAnimation {
- 0% {
- background-position: 0% 50%;
- }
- 50% {
- background-position: 100% 50%;
- }
- 100% {
- background-position: 0% 50%;
- }
- }
- h1 {
- margin-top: 0;
- font-size: 4em;
- text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.4);
- animation: fadeInUp 1s ease-in-out;
- }
- .page-content {
- background: linear-gradient(90deg, #3498db, #2980b9);
- color: #fff;
- padding: 30px;
- border-radius: 15px;
- box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
- margin-top: 20px;
- max-width: 1000px;
- width: 100%;
- animation: fadeInUp 1s ease-in-out;
- position: relative;
- overflow: hidden;
- }
- .page-content::before {
- content: '';
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
- opacity: 0;
- transition: opacity 0.3s ease-in-out;
- pointer-events: none;
- }
- .page-content:hover::before {
- opacity: 1;
- }
- table {
- width: 100%;
- border-collapse: collapse;
- margin-top: 20px;
- color: #000; /* Change text color to black */
- }
- th, td {
- border: 1px solid #fff;
- padding: 15px;
- text-align: center;
- color: #fff; /* Change text color to white */
- }
- th {
- background: linear-gradient(90deg, #e74c3c, #c0392b);
- }
- td {
- background: linear-gradient(90deg, #3498db, #2980b9);
- }
- .back-button {
- position: absolute;
- top: 20px;
- left: 20px;
- background: linear-gradient(90deg, #3498db, #2980b9);
- color: #fff;
- padding: 15px 20px;
- font-size: 18px;
- border: none;
- border-radius: 8px;
- cursor: pointer;
- transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.5s ease-in-out;
- box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
- animation: fadeInUp 1s ease-in-out;
- }
- .back-button:hover {
- transform: scale(1.05);
- box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
- background: linear-gradient(90deg, #3498db, #2980b9);
- }
- </style>
- <script>
- // Function to fetch and display data
- function fetchDepartureLogs() {
- // Replace the following with your actual server-side endpoint
- var endpoint = 'http://localhost/fetch_departures.php';
- // Make a fetch request to your server-side script
- fetch(endpoint)
- .then(response => response.json()) // Assuming your server returns JSON
- .then(data => {
- // Call a function to update the HTML table with the fetched data
- updateTable(data);
- })
- .catch(error => {
- console.error('Error fetching data:', error);
- });
- }
- // Function to update the HTML table with fetched data
- function updateTable(data) {
- var tableBody = document.querySelector('tbody');
- tableBody.innerHTML = ''; // Clear existing rows
- // Loop through the fetched data and create table rows
- data.forEach(row => {
- var newRow = document.createElement('tr');
- newRow.innerHTML = `
- <td>${row.scheduledDepartureTime}</td>
- <td>${row.flightNumber}</td>
- <td>${row.destinationName}</td>
- <td>${row.airlineName}</td>
- <td>${row.aircraftType}</td>
- <td>${row.date}</td>
- <td>${row.status}</td>
- `;
- tableBody.appendChild(newRow);
- });
- }
- // Call the fetchDepartureLogs function when the page loads
- window.addEventListener('load', fetchDepartureLogs);
- </script>
- </head>
- <body>
- <a href="view_logs.html" class="back-button">Go Back</a>
- <h1>View Departure Logs</h1>
- <div class="page-content">
- <table>
- <thead>
- <tr>
- <th>Scheduled Departure Time</th>
- <th>Flight Number</th>
- <th>Destination Name</th>
- <th>Airline Name</th>
- <th>Aircraft Type</th>
- <th>Date</th>
- <th>Status</th>
- </tr>
- </thead>
- <tbody>
- <!-- Table rows will be dynamically populated by JavaScript -->
- </tbody>
- </table>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement