<?php
    // $Id: uninstall.php,v 1.9 2004/08/11 12:30:36 doug Exp $
    // boost uninstall script

    // confirm the user is a deity - and has rights to be uninstalling stuff
    if (!$_SESSION["OBJ_user"]->isDeity()){
        // if not, send them to the index page
        header("location:index.php");
        exit();
    }

    $source_dir = $PHPWS_SOURCE_DIR;

    // now do the uninstall
    // try to load the uninstall sql
    if ($GLOBALS['core']->sqlImport($source_dir."mod/kcart/boost/uninstall.sql", 1, 1)){
        // if it worked, uninstall the help
        CLS_Help::uninstall_help("kcart");
        // kill the session variables
        $GLOBALS['core']->killSession("SES_kcart_products");
        $GLOBALS['core']->killSession("SES_kcart_quantities");
        $content .= "All KCart tables successfully removed.<br />";
        $status = 1;
    } else {
        // the sql didn't run
        $content .= "There was a problem removing the database tables for KCart.<br />";
        $status = 0;
    }
?>
