PHP Classes

File: modules/dashboard/templates/layout/footer.php

Recommend this page to a friend!
  Classes of Adrian M   upMVC   modules/dashboard/templates/layout/footer.php   Download  
File: modules/dashboard/templates/layout/footer.php
Role: Auxiliary script
Content type: text/plain
Description: Configuration script
Class: upMVC
Pure PHP web development without other frameworks
Author: By
Last change:
Date: 1 month ago
Size: 1,076 bytes
 

Contents

Class file image Download
</main>
        <?php if (isset($_SESSION['authenticated']) && $_SESSION['authenticated']): ?>
</div>
        <?php endif; ?>
</div>

    <!-- Notification Toast -->
    <div id="toast" class="fixed bottom-4 right-4 bg-gray-800 text-white px-6 py-3 rounded-lg shadow-lg transform transition-transform duration-300 translate-y-full">
        <span id="toastMessage"></span>
    </div>

    <script>
    function showToast(message, duration = 3000) {
        const toast = document.getElementById('toast');
        const toastMessage = document.getElementById('toastMessage');
       
        toastMessage.textContent = message;
        toast.classList.remove('translate-y-full');
       
        setTimeout(() => {
            toast.classList.add('translate-y-full');
        }, duration);
    }

    // Show toast if there's a message in the URL
    const urlParams = new URLSearchParams(window.location.search);
    const message = urlParams.get('message');
    if (message) {
        showToast(decodeURIComponent(message));
    }
    </script>
</body>
</html>