mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Call Broadcast: Token integration.
This commit is contained in:
@@ -131,6 +131,14 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
|||||||
$call_broadcast_uuid = $_POST["call_broadcast_uuid"];
|
$call_broadcast_uuid = $_POST["call_broadcast_uuid"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//validate the token
|
||||||
|
$token = new token;
|
||||||
|
if (!$token->validate($_SERVER['PHP_SELF'])) {
|
||||||
|
message::add($text['message-invalid_token'],'negative');
|
||||||
|
header('Location: call_broadcast.php');
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
//check for all required data
|
//check for all required data
|
||||||
if (strlen($broadcast_name) == 0) { $msg .= "".$text['confirm-name']."<br>\n"; }
|
if (strlen($broadcast_name) == 0) { $msg .= "".$text['confirm-name']."<br>\n"; }
|
||||||
//if (strlen($broadcast_description) == 0) { $msg .= "Please provide: Description<br>\n"; }
|
//if (strlen($broadcast_description) == 0) { $msg .= "Please provide: Description<br>\n"; }
|
||||||
@@ -255,6 +263,10 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
|||||||
unset($sql, $parameters, $row);
|
unset($sql, $parameters, $row);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//create token
|
||||||
|
$object = new token;
|
||||||
|
$token = $object->create($_SERVER['PHP_SELF']);
|
||||||
|
|
||||||
//begin header
|
//begin header
|
||||||
require_once "resources/header.php";
|
require_once "resources/header.php";
|
||||||
|
|
||||||
@@ -491,6 +503,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
|||||||
echo " <tr>\n";
|
echo " <tr>\n";
|
||||||
echo " <td colspan='2' align='right'>\n";
|
echo " <td colspan='2' align='right'>\n";
|
||||||
echo " <br>";
|
echo " <br>";
|
||||||
|
echo " <input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
|
||||||
echo " <input type='submit' name='submit' class='btn' value='".$text['button-save']."'>\n";
|
echo " <input type='submit' name='submit' class='btn' value='".$text['button-save']."'>\n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " </tr>";
|
echo " </tr>";
|
||||||
|
|||||||
Reference in New Issue
Block a user