get();
//action add or update
if (isset($_REQUEST["id"])) {
$action = "update";
$conference_control_uuid = check_str($_REQUEST["id"]);
}
else {
$action = "add";
}
//get http post variables and set them to php variables
if (is_array($_POST)) {
$control_name = check_str($_POST["control_name"]);
$control_enabled = check_str($_POST["control_enabled"]);
$control_description = check_str($_POST["control_description"]);
}
//process the user data and save it to the database
if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
//get the uuid from the POST
if ($action == "update") {
$conference_control_uuid = check_str($_POST["conference_control_uuid"]);
}
//check for all required data
$msg = '';
if (strlen($control_name) == 0) { $msg .= $text['message-required']." ".$text['label-control_name']."
\n"; }
if (strlen($control_enabled) == 0) { $msg .= $text['message-required']." ".$text['label-control_enabled']."
\n"; }
//if (strlen($control_description) == 0) { $msg .= $text['message-required']." ".$text['label-control_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 " |