Update call_flow_edit.php
This commit is contained in:
parent
c251a2d1e2
commit
4369e02866
|
|
@ -261,12 +261,14 @@
|
||||||
if (is_array($_GET) && $_POST["persistformvar"] != "true") {
|
if (is_array($_GET) && $_POST["persistformvar"] != "true") {
|
||||||
$call_flow_uuid = check_str($_GET["id"]);
|
$call_flow_uuid = check_str($_GET["id"]);
|
||||||
$sql = "select * from v_call_flows ";
|
$sql = "select * from v_call_flows ";
|
||||||
$sql .= "where domain_uuid = '".$_SESSION["domain_uuid"]."' ";
|
$sql .= "where domain_uuid = :domain_uuid ";
|
||||||
$sql .= "and call_flow_uuid = '$call_flow_uuid' ";
|
$sql .= "and call_flow_uuid = :call_flow_uuid ";
|
||||||
$prep_statement = $db->prepare(check_sql($sql));
|
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||||
$prep_statement->execute();
|
$parameters['call_flow_uuid'] = $call_flow_uuid;
|
||||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
$database = new database;
|
||||||
foreach ($result as &$row) {
|
$result = $database->select($sql, $parameters, 'all');
|
||||||
|
unset($parameters, $sql);
|
||||||
|
foreach ($result as $row) {
|
||||||
//set the php variables
|
//set the php variables
|
||||||
$call_flow_uuid = $row["call_flow_uuid"];
|
$call_flow_uuid = $row["call_flow_uuid"];
|
||||||
$dialplan_uuid = $row["dialplan_uuid"];
|
$dialplan_uuid = $row["dialplan_uuid"];
|
||||||
|
|
@ -312,11 +314,12 @@
|
||||||
|
|
||||||
//get the recordings
|
//get the recordings
|
||||||
$sql = "select recording_name, recording_filename from v_recordings ";
|
$sql = "select recording_name, recording_filename from v_recordings ";
|
||||||
$sql .= "where domain_uuid = '".$_SESSION["domain_uuid"]."' ";
|
$sql .= "where domain_uuid = :domain_uuid ";
|
||||||
$sql .= "order by recording_name asc ";
|
$sql .= "order by recording_name asc ";
|
||||||
$prep_statement = $db->prepare(check_sql($sql));
|
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||||
$prep_statement->execute();
|
$database = new database;
|
||||||
$recordings = $prep_statement->fetchAll(PDO::FETCH_ASSOC);
|
$recordings = $database->select($sql, $parameters, 'all');
|
||||||
|
unset($parameters, $sql);
|
||||||
|
|
||||||
if (if_group("superadmin")) {
|
if (if_group("superadmin")) {
|
||||||
require_once "resources/header.php";
|
require_once "resources/header.php";
|
||||||
|
|
@ -391,11 +394,12 @@
|
||||||
echo "</optgroup>\n";
|
echo "</optgroup>\n";
|
||||||
}
|
}
|
||||||
//phrases
|
//phrases
|
||||||
$sql = "select * from v_phrases where domain_uuid = '".$domain_uuid."' ";
|
$sql = "select * from v_phrases where domain_uuid = :domain_uuid ";
|
||||||
$prep_statement = $db->prepare(check_sql($sql));
|
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||||
$prep_statement->execute();
|
$database = new database;
|
||||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
$result = $database->select($sql, $parameters, 'all');
|
||||||
if (count($result) > 0) {
|
unset($parameters, $sql);
|
||||||
|
if (is_array($result) {
|
||||||
echo "<optgroup label='Phrases'>\n";
|
echo "<optgroup label='Phrases'>\n";
|
||||||
foreach ($result as &$row) {
|
foreach ($result as &$row) {
|
||||||
if ($var == "phrase:".$row["phrase_uuid"]) {
|
if ($var == "phrase:".$row["phrase_uuid"]) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue