| Current Path : /home/users/unlimited/www/nigeria.codeskitter.site/student/ |
| Current File : /home/users/unlimited/www/nigeria.codeskitter.site/student/footer.php |
</main>
</div>
</div>
<!-- Student Footer -->
<footer class="bg-dark text-white py-4 mt-5">
<div class="container-fluid">
<div class="row">
<div class="col-md-6">
<p class="mb-0">© 2025 Gex Neural Academy. All rights reserved.</p>
</div>
<div class="col-md-6 text-md-end">
<span class="text-muted">Logged in as: <?php echo $student['name']; ?></span>
<span class="text-muted mx-2">|</span>
<span class="text-muted">Last login: <?php echo date('M j, Y g:i A'); ?></span>
</div>
</div>
</div>
</footer>
<!-- Back to Top Button -->
<button id="backToTop" class="btn btn-primary position-fixed" style="bottom: 20px; right: 20px; display: none;">
<i class="bi bi-arrow-up"></i>
</button>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
<script src="../assets/js/main.js"></script>
<script>
// Back to top button
const backToTopButton = document.getElementById('backToTop');
window.addEventListener('scroll', () => {
if (window.pageYOffset > 300) {
backToTopButton.style.display = 'block';
} else {
backToTopButton.style.display = 'none';
}
});
backToTopButton.addEventListener('click', () => {
window.scrollTo({ top: 0, behavior: 'smooth' });
});
// Auto-hide alerts
document.addEventListener('DOMContentLoaded', function() {
const alerts = document.querySelectorAll('.alert');
alerts.forEach(alert => {
setTimeout(() => {
if(alert.parentNode) {
alert.style.opacity = '0';
setTimeout(() => alert.parentNode.removeChild(alert), 300);
}
}, 5000);
});
});
// Progress tracking for modules
function trackProgress(moduleId, timeSpent = 0) {
fetch('track-progress.php', {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
},
body: `module_id=${moduleId}&time_spent=${timeSpent}`
});
}
// Mark module as complete
function markModuleComplete(moduleId) {
fetch('mark-complete.php', {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
},
body: `module_id=${moduleId}&action=complete`
})
.then(response => response.json())
.then(data => {
if(data.success) {
showAlert('Module marked as complete!', 'success');
// Update UI
const completeBtn = document.querySelector(`[data-module-id="${moduleId}"]`);
if(completeBtn) {
completeBtn.innerHTML = '<i class="bi bi-check-circle-fill"></i> Completed';
completeBtn.classList.remove('btn-primary');
completeBtn.classList.add('btn-success');
completeBtn.disabled = true;
}
} else {
showAlert('Error marking module as complete', 'error');
}
});
}
function showAlert(message, type) {
// Remove existing alerts
const existingAlerts = document.querySelectorAll('.alert');
existingAlerts.forEach(alert => alert.remove());
const alertDiv = document.createElement('div');
alertDiv.className = `alert alert-${type} alert-dismissible fade show position-fixed`;
alertDiv.style.cssText = 'top: 100px; right: 20px; z-index: 9999; min-width: 300px;';
alertDiv.innerHTML = `
${message}
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
`;
document.querySelector('main').appendChild(alertDiv);
// Auto remove after 5 seconds
setTimeout(() => {
if(alertDiv.parentNode) {
alertDiv.parentNode.removeChild(alertDiv);
}
}, 5000);
}
// Course search functionality
function searchCourses() {
const searchTerm = document.getElementById('searchInput').value.toLowerCase();
const courseCards = document.querySelectorAll('.course-card');
courseCards.forEach(card => {
const title = card.querySelector('.card-title').textContent.toLowerCase();
const description = card.querySelector('.card-text').textContent.toLowerCase();
if(title.includes(searchTerm) || description.includes(searchTerm)) {
card.parentElement.style.display = 'block';
} else {
card.parentElement.style.display = 'none';
}
});
}
// Initialize tooltips
const tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'));
const tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {
return new bootstrap.Tooltip(tooltipTriggerEl);
});
</script>
</body>
</html>