<?php
    function action($db = null){
        global $UID;
        $UID = null;
        setcookie("uid", null, time() - 3600);
        session_regenerate_id();
        $_SESSION['session'] = false;
        $_SESSION['name'] = "";
        $_SESSION['uid'] = "";
        header("Location: /");
        die();
        return 0;
    }
?>
