<?php if (isset($_GET["nopopup"])): ?>
<script>
    jQuery("document").ready(function(){
        if (typeof Swal != 'undefined'){
            <?php if ($this->lien): ?>
                Swal(
                    <?=$this->json?>
                ).then((result) => {
                    if (result.value){
                        window.location.replace("<?=$this->lien?>");
                    }
                });
            <?php else: ?>
                Swal(
                    <?=$this->json?>
                );
            <?php endif;?>
        }
    });
</script>
<?php endif?>