<?php

/**
 * Whosonline module for phpWebSite 0.9.3
 *
 * $Id: uninstall.php,v 1.4 2004/01/03 19:13:22 admin Exp $
 * @author duclos@shirka.org
 * @download http://www.shirka.org
 */

/* Make sure the user is a deity before running this script */
if(!$_SESSION["OBJ_user"]->isDeity())
{
    header("location:index.php");
    exit();
}

if ($GLOBALS['core']->sqlImport($GLOBALS['core']->source_dir."mod/whosonline/boost/uninstall.sql", 1, 1))
{
    $content .= "All whosonline tables successfully removed.<br />";
    $content .= "Removing files directory at : <br />";
    $content .= PHPWS_SOURCE_DIR . "files/ip-to-country<br />";

    PHPWS_File::rmdir(PHPWS_SOURCE_DIR . "files/ip-to-country/");
  
    $status = 1;
}
else
    $content .= "There was a problem accessing the database.<br />";

?>
