get();
//action add or update
if (is_uuid($_REQUEST["id"])) {
$action = "update";
$conference_control_detail_uuid = $_REQUEST["id"];
}
else {
$action = "add";
}
//set the parent uuid
if (is_uuid($_GET["conference_control_uuid"])) {
$conference_control_uuid = $_GET["conference_control_uuid"];
}
//get http post variables and set them to php variables
if (count($_POST) > 0) {
$control_digits = $_POST["control_digits"];
$control_action = $_POST["control_action"];
$control_data = $_POST["control_data"];
$control_enabled = $_POST["control_enabled"];
}
//process the http post
if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
//get the uuid
if ($action == "update") {
$conference_control_detail_uuid = $_POST["conference_control_detail_uuid"];
}
//validate the token
$token = new token;
if (!$token->validate($_SERVER['PHP_SELF'])) {
message::add($text['message-invalid_token'],'negative');
header('Location: conference_controls.php');
exit;
}
//check for all required data
$msg = '';
//if (strlen($control_digits) == 0) { $msg .= $text['message-required']." ".$text['label-control_digits']."
\n"; }
if (strlen($control_action) == 0) { $msg .= $text['message-required']." ".$text['label-control_action']."
\n"; }
//if (strlen($control_data) == 0) { $msg .= $text['message-required']." ".$text['label-control_data']."
\n"; }
if (strlen($control_enabled) == 0) { $msg .= $text['message-required']." ".$text['label-control_enabled']."
\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 " |