$error[$num_errors++] = "You are not moderator of this group.";
        include "groups.php";
        exit;
    }
    if (!empty($_POST['submit_conf_yes']) || !empty($_POST['submit_conf_no'])) {
        if (!empty($_POST['submit_conf_yes'])) {
            Remove_Notice($notice_id, $bd);
            $alert[$num_alerts++] = "Notice Removed Successfully";
        } else {
            $alert[$num_alerts++] = "Notice Removing Cancelled";
        }
        include "groups_notices.php";
        exit;
    }
    $groups = List_Groups($group_id, '', '', '', 1, $bd);
    $notices = List_Notices('', $notice_id, '', $bd);
} else {
    $error[$num_errors++] = "Invalid Session ID";
    include "logout.php";
    exit;
}
$result_xsl = "xsl/" . $default_xsl . "/groups_notices_remove.xsl";
$smarty->assign("nrpTransform", $result_xsl);
$smarty->assign("nrpSchErrors", $error);
$smarty->assign("nrpSchAlerts", $alert);
$smarty->assign("nrpSessId", $complete_sess_id);
$smarty->assign("nrpGroups", $groups);
$smarty->assign("nrpPeople", $people);
$smarty->assign("nrpNotices", $notices);
$result_xml = $smarty->fetch("xml/groups.xml");
require "./inc/proc_transform.php";
} else {
    if (!empty($_GET['group_id'])) {
        $group_id = $_GET['group_id'];
    }
}
if (Validate_Session($complete_sess_id, $_SERVER['REMOTE_ADDR'], $bd)) {
    Get_Account_Id($sess_id, $account_id, $bd);
    $membership = Member_Role($group_id, $account_id, $bd);
    // If the user is actually member of the group
    if ($membership == -1) {
        $error[$num_errors++] = "You are not member of this group";
        include "groups.php";
        exit;
    } else {
        $groups = List_Groups($group_id, '', '', '', 1, $bd);
        $notices = List_Notices($group_id, '', $cfg['group_notices_number'], $bd);
        switch ($membership) {
            case 'O':
                $result_xsl = "xsl/" . $cfg['default_xsl'] . "/groups_enter_owner.xsl";
                break;
            case 'M':
                $result_xsl = "xsl/" . $cfg['default_xsl'] . "/groups_enter_mod.xsl";
                break;
            case 'C':
                $result_xsl = "xsl/" . $cfg['default_xsl'] . "/groups_enter_com.xsl";
                break;
            case 'I':
                $result_xsl = "xsl/" . $cfg['default_xsl'] . "/groups_members_confirmation.xsl";
                break;
        }
    }
            case 'M':
                $result_xsl = "xsl/" . $cfg['default_xsl'] . "/groups_notices_mod.xsl";
                break;
            case 'C':
                $result_xsl = "xsl/" . $cfg['default_xsl'] . "/groups_notices.xsl";
                break;
            case 'I':
                $result_xsl = "xsl/" . $cfg['default_xsl'] . "/groups_notices.xsl";
                break;
        }
    }
    $people = array();
    for ($i = 0; $groups[0][5][$i]; $i++) {
        $people = array_merge($people, List_People($groups[0][5][$i][0], '', '', '', '', $bd));
    }
    $notices = List_Notices($group_id, '', '', $bd);
} else {
    $error[$num_errors++] = "Invalid Session ID";
    include "logout.php";
    exit;
}
$smarty->assign("nrpTransform", $result_xsl);
$smarty->assign("nrpSchedErrors", $error);
$smarty->assign("nrpSchedAlerts", $alert);
$smarty->assign("nrpSessId", $complete_sess_id);
$smarty->assign("nrpPeople", $people);
$smarty->assign("nrpGroups", $groups);
$smarty->assign("nrpNotices", $notices);
$result_xml = $smarty->fetch("xml/groups.xml");
require "./inc/proc_transform.php";
// Calls the commands do procede the XSLT transformation