<?php
$username = $_SESSION['username'];
//allow only super admin access to pin management
if(!$conn->check_privilege($username, $module_name)){
    $redirect_link = $conn->base_url();
    ?>
    <script>
        alert("<?php echo $conn->alert(); ?>");
        window.location.replace("<?php echo $redirect_link; ?>");
    </script>

    <?php
}
?>