%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home1/dimen328/libertysa.com.br/includes/
Upload File :
Create Path :
Current File : //home1/dimen328/libertysa.com.br/includes/popup.php

<?php
    $popup = getPopup();
    if($popup) {
        ?>
        <style>
            /* The Modal (background) */
            .modal {
                display: none; /* Hidden by default */
                position: fixed; /* Stay in place */
                z-index: 1; /* Sit on top */
                left: 0;
                top: 0;
                width: 100%; /* Full width */
                height: 100%; /* Full height */
                overflow: auto; /* Enable scroll if needed */
                background-color: rgb(0, 0, 0); /* Fallback color */
                background-color: rgba(0, 0, 0, 0.4); /* Black w/ opacity */
            }

            /* Modal Content/Box */
            .modal-content2 {
                margin: 0.5% auto; /* 15% from the top and centered */
                padding: 20px;
                width: 40%; /* Could be more or less, depending on screen size */
                text-align: left;
            }

            /* The Close Button */
            .close {
                color: #FFF !important;
                text-shadow: none;
                float: left;
                font-size: 28px;
                font-weight: bold;
                display: block;
                width: 100%;
            }

            .close:hover,
            .close:focus {
                color: black;
                text-decoration: none;
                cursor: pointer;
            }
        </style>

        <!-- The Modal -->
        <div id="myModal" class="modal">
            <!-- Modal content -->
            <div class="modal-content2">
                <span class="close">&times;</span>
                <a href="<?=$popup->link?>">
                    <img src="<?=base_url('admin/uploads/popup/'.$popup->imagem)?>">
                </a>
            </div>
        </div>

        <script>
            // Get the modal
            var modal = document.getElementById('myModal');

            // Get the <span> element that closes the modal
            var span = document.getElementsByClassName("close")[0];

            // When the user clicks on the button, open the modal
            modal.style.display = "block";

            // When the user clicks on <span> (x), close the modal
            span.onclick = function () {
                modal.style.display = "none";
            }

            // When the user clicks anywhere outside of the modal, close it
            window.onclick = function (event) {
                if (event.target == modal) {
                    modal.style.display = "none";
                }
            }
        </script>
        <?php
    }
?>

Zerion Mini Shell 1.0