Example #1
0
    $entities[$ctx_prev] = Session::get_entity_name($conn, $ctx_prev);
}
$ctx = GET("ctx") != "" ? GET("ctx") : $_SESSION['policy_ctx'];
$reorder = GET("reorder");
if (empty($ctx)) {
    $ctx = $ctx_prev;
}
ossim_valid($ctx, OSS_HEX, 'illegal:' . _("ctx"));
ossim_valid($reorder, OSS_DIGIT, OSS_NULLABLE, 'illegal:' . _("Policy Option"));
if (ossim_error()) {
    die(ossim_error());
}
$_SESSION['policy_ctx'] = $ctx;
$conf = $GLOBALS["CONF"];
$server_logger_if_priority = is_null($conf->get_conf("server_logger_if_priority", false)) ? 0 : $conf->get_conf("server_logger_if_priority");
$engines = Session::get_engines_by_ctx($conn, $ctx);
if ($reorder) {
    Policy_group::reassing_orders($conn, $ctx);
    Policy::reassing_orders($conn, $ctx);
    foreach ($engines as $engine) {
        Policy::reassing_orders($conn, $engine);
    }
}
//Retrieving the policy groups, for ctx and engines
$groups_ctx = Policy::get_policy_groups($conn, $ctx);
$groups_engine = array();
foreach ($engines as $engine) {
    $aux_groups = Policy::get_policy_groups($conn, $engine, true);
    $groups_engine = array_merge($groups_engine, $aux_groups);
}
$refresh = "";