<?PHP

PageTitle("CWIS Plugins");

# check that the user has sufficient privileges
if (!CheckAuthorization(PRIV_SYSADMIN)) {  return;  }

# if form was submitted
if (isset($_POST["SUBMITTED"]))
{
    # for each plugin
    global $G_PluginManager;
    $Attribs = $G_PluginManager->GetPluginAttributes();
    foreach ($Attribs as $PluginName => $Attrib)
    {
        $G_PluginManager->PluginEnabled($PluginName, 
                (($PluginName == "CWISCore")
                || isset($_POST["EnabledCheckbox-".$PluginName])) 
                ? TRUE : FALSE);
    }
    $G_PluginManager->LoadPlugins();
}


?>
