<?PHP
#
#   FILE:  Confirm.php
#
#   Part of the Collection Workflow Integration System (CWIS)
#   Copyright 2011 Internet Scout Project
#   http://scout.wisc.edu/
#

# ----- MAIN -----------------------------------------------------------------

global $G_RuleId;

# check that user should be on this page
CheckAuthorization(PRIV_COLLECTIONADMIN, PRIV_SYSADMIN);

$G_RuleId = GetArrayValue($_GET, "RuleId");

# go back to the rules list if not given a rule ID
if (is_null($G_RuleId))
{
    $AF->SetJumpToPage("P_Rules_List");
    return;
}

$RulesPlugin = $G_PluginManager->GetPlugin("Rules");
$Rules = $RulesPlugin->GetRules();
$Rule = GetArrayValue($Rules, $G_RuleId);

# invalid rule ID, so go back to the list page
if (is_null($Rule))
{
    $AF->SetJumpToPage("P_Rules_List");
    return;
}
