get();
//action add or update
if (isset($_REQUEST["id"])) {
$action = "update";
$access_control_node_uuid = check_str($_REQUEST["id"]);
}
else {
$action = "add";
}
//set the parent uuid
if (strlen($_GET["access_control_uuid"]) > 0) {
$access_control_uuid = check_str($_GET["access_control_uuid"]);
}
//get http post variables and set them to php variables
if (count($_POST)>0) {
$node_type = check_str($_POST["node_type"]);
$node_cidr = check_str($_POST["node_cidr"]);
$node_domain = check_str($_POST["node_domain"]);
$node_description = check_str($_POST["node_description"]);
}
if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$msg = '';
if ($action == "update") {
$access_control_node_uuid = check_str($_POST["access_control_node_uuid"]);
}
//check for all required data
if (strlen($node_type) == 0) { $msg .= $text['message-required']." ".$text['label-node_type']."
\n"; }
//if (strlen($node_cidr) == 0) { $msg .= $text['message-required']." ".$text['label-node_cidr']."
\n"; }
//if (strlen($node_domain) == 0) { $msg .= $text['message-required']." ".$text['label-node_domain']."
\n"; }
//if (strlen($node_description) == 0) { $msg .= $text['message-required']." ".$text['label-node_description']."
\n"; }
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
require_once "resources/header.php";
require_once "resources/persist_form_var.php";
echo "
| \n";
echo $msg." "; echo " |