<?php

/********************************************************/
/* NSN Your Account                                     */
/* By: NukeScripts Network (webmaster@nukescripts.net)  */
/* http://www.nukescripts.fr                            */
/* Original Script www.nukescripst.net                  */
/* Copyright  2000-2005 by NukeScripts Network         */
/* ==================================================== */
/* Based from:                                          */
/* PHP-NUKE: Web Portal System                          */
/********************************************************/
defined('IN_YA') OR die ('Access denied logout MAXIMUS directly...');
defined('MAXIMUS') OR header("Location: index.php");

        cookiedecode($user);
        $r_uid = $cookie[0];
        $r_username = $cookie[1];
        @setcookie("user");
        //$nukeurl = str_replace("http://", "", $nukeurl);
        //$nukeurl = "http://".$nukeurl;
        $db->sql_query("DELETE FROM `".TABLE_SESSION."` WHERE `uname`='$r_username'");
        $db->sql_query("OPTIMIZE TABLE `".TABLE_SESSION."`");
if(is_active("Forums")) {
        $db->sql_query("DELETE FROM `".$prefix."_bbsessions` WHERE `session_user_id`='$r_uid'");
        $db->sql_query("OPTIMIZE TABLE `".$prefix."_bbsessions`");
}
        $user = "";
        incoh();
        if ($redirect != "") {
            echo "<meta http-equiv=\"refresh\" content=\"2;URL=modules.php?name=$redirect\">";
        } else {
            echo "<meta http-equiv=\"refresh\" content=\"2;URL=index.php\">";
        }
        title(_YOUARELOGGEDOUT);
	br('1');
	Max_opentable();
	echo "<br /><center><b>"._THXVISIT."</b><center><br />";
	Max_CloseTable();
        incof();