Add a few comments and adjust the indentation.
This commit is contained in:
parent
22f98351c7
commit
d42f22d6e3
|
|
@ -38,55 +38,57 @@ else {
|
||||||
$language = new text;
|
$language = new text;
|
||||||
$text = $language->get();
|
$text = $language->get();
|
||||||
|
|
||||||
if (count($_GET)>0) {
|
//get the id
|
||||||
$id = check_str($_GET["id"]);
|
if (count($_GET) > 0) {
|
||||||
}
|
$id = check_str($_GET["id"]);
|
||||||
|
}
|
||||||
|
|
||||||
if (strlen($id)>0) {
|
//require the id
|
||||||
|
if (strlen($id) > 0) {
|
||||||
|
|
||||||
//get the dialplan uuid
|
//get the dialplan uuid
|
||||||
$sql = "select * from v_conferences ";
|
$sql = "select * from v_conferences ";
|
||||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||||
$sql .= "and conference_uuid = '$id' ";
|
$sql .= "and conference_uuid = '$id' ";
|
||||||
$prep_statement = $db->prepare($sql);
|
$prep_statement = $db->prepare($sql);
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
while($row = $prep_statement->fetch(PDO::FETCH_ASSOC)) {
|
while($row = $prep_statement->fetch(PDO::FETCH_ASSOC)) {
|
||||||
$dialplan_uuid = $row['dialplan_uuid'];
|
$dialplan_uuid = $row['dialplan_uuid'];
|
||||||
}
|
}
|
||||||
|
|
||||||
//delete conference
|
//delete conference
|
||||||
$sql = "delete from v_conferences ";
|
$sql = "delete from v_conferences ";
|
||||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||||
$sql .= "and conference_uuid = '$id' ";
|
$sql .= "and conference_uuid = '$id' ";
|
||||||
$prep_statement = $db->prepare(check_sql($sql));
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
unset($sql);
|
unset($sql);
|
||||||
|
|
||||||
//delete the dialplan entry
|
//delete the dialplan entry
|
||||||
$sql = "delete from v_dialplans ";
|
$sql = "delete from v_dialplans ";
|
||||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||||
$sql .= "and dialplan_uuid = '$dialplan_uuid' ";
|
$sql .= "and dialplan_uuid = '$dialplan_uuid' ";
|
||||||
$db->query($sql);
|
$db->query($sql);
|
||||||
unset($sql);
|
unset($sql);
|
||||||
|
|
||||||
//delete the dialplan details
|
//delete the dialplan details
|
||||||
$sql = "delete from v_dialplan_details ";
|
$sql = "delete from v_dialplan_details ";
|
||||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||||
$sql .= "and dialplan_uuid = '$dialplan_uuid' ";
|
$sql .= "and dialplan_uuid = '$dialplan_uuid' ";
|
||||||
$db->query($sql);
|
$db->query($sql);
|
||||||
unset($sql);
|
unset($sql);
|
||||||
|
|
||||||
//syncrhonize configuration
|
//syncrhonize configuration
|
||||||
save_dialplan_xml();
|
save_dialplan_xml();
|
||||||
|
|
||||||
//apply settings reminder
|
//apply settings reminder
|
||||||
$_SESSION["reload_xml"] = true;
|
$_SESSION["reload_xml"] = true;
|
||||||
|
|
||||||
//clear the cache
|
//clear the cache
|
||||||
$cache = new cache;
|
$cache = new cache;
|
||||||
$cache->delete("dialplan:".$_SESSION["context"]);
|
$cache->delete("dialplan:".$_SESSION["context"]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//redirect the browser
|
//redirect the browser
|
||||||
$_SESSION["message"] = $text['confirm-delete'];
|
$_SESSION["message"] = $text['confirm-delete'];
|
||||||
|
|
|
||||||
|
|
@ -211,8 +211,8 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||||
$dialplan_detail_group = '2';
|
$dialplan_detail_group = '2';
|
||||||
dialplan_detail_add($_SESSION['domain_uuid'], $dialplan_uuid, $dialplan_detail_tag, $dialplan_detail_order, $dialplan_detail_group, $dialplan_detail_type, $dialplan_detail_data);
|
dialplan_detail_add($_SESSION['domain_uuid'], $dialplan_uuid, $dialplan_detail_tag, $dialplan_detail_order, $dialplan_detail_group, $dialplan_detail_type, $dialplan_detail_data);
|
||||||
|
|
||||||
$_SESSION["message"] = $text['confirm-add'];
|
//add the message
|
||||||
|
$_SESSION["message"] = $text['confirm-add'];
|
||||||
} //if ($action == "add")
|
} //if ($action == "add")
|
||||||
|
|
||||||
if ($action == "update") {
|
if ($action == "update") {
|
||||||
|
|
@ -267,8 +267,8 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||||
$sql .= "and dialplan_uuid = '$dialplan_uuid' ";
|
$sql .= "and dialplan_uuid = '$dialplan_uuid' ";
|
||||||
$db->query($sql);
|
$db->query($sql);
|
||||||
|
|
||||||
$_SESSION["message"] = $text['confirm-update'];
|
//add the message
|
||||||
|
$_SESSION["message"] = $text['confirm-update'];
|
||||||
} //if ($action == "update")
|
} //if ($action == "update")
|
||||||
|
|
||||||
//save the xml
|
//save the xml
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue