mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 19:53:56 +00:00
fixed dialplan copy
This commit is contained in:
@@ -27,6 +27,7 @@ include "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
require_once "resources/paging.php";
|
||||
require_once "resources/classes/logging.php";
|
||||
if (permission_exists('dialplan_add')
|
||||
|| permission_exists('inbound_route_add')
|
||||
|| permission_exists('outbound_route_add')
|
||||
@@ -45,9 +46,14 @@ else {
|
||||
$text[$key] = $value[$_SESSION['domain']['language']['code']];
|
||||
}
|
||||
|
||||
//logger
|
||||
$log = new Logging();
|
||||
|
||||
//set the http get/post variable(s) to a php variable
|
||||
if (isset($_REQUEST["id"])) {
|
||||
$dialplan_uuid = check_str($_REQUEST["id"]);
|
||||
$log->log("debug", "isset id.");
|
||||
$log->log("debug", $dialplan_uuid);
|
||||
}
|
||||
|
||||
//get the dialplan data
|
||||
@@ -55,9 +61,11 @@ else {
|
||||
$sql = "select * from v_dialplans ";
|
||||
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||
$sql .= "and dialplan_uuid = '$dialplan_uuid' ";
|
||||
$log->log("debug", check_sql($sql));
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
$log->log("debug", $result);
|
||||
foreach ($result as &$row) {
|
||||
$database_dialplan_uuid = $row["dialplan_uuid"];
|
||||
$app_uuid = $row["app_uuid"];
|
||||
@@ -175,4 +183,4 @@ else {
|
||||
require_once "resources/footer.php";
|
||||
return;
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -27,6 +27,7 @@ include "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
require_once "resources/paging.php";
|
||||
require_once "resources/classes/logging.php";
|
||||
if (permission_exists('dialplan_add')
|
||||
|| permission_exists('dialplan_edit')
|
||||
|| permission_exists('inbound_route_add')
|
||||
@@ -50,6 +51,9 @@ else {
|
||||
$text[$key] = $value[$_SESSION['domain']['language']['code']];
|
||||
}
|
||||
|
||||
//logger
|
||||
$log = new Logging();
|
||||
|
||||
//set the action as an add or an update
|
||||
if (isset($_REQUEST["id"])) {
|
||||
$action = "update";
|
||||
@@ -309,7 +313,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
echo " </td>\n";
|
||||
echo " <td width='70%' align='right'>\n";
|
||||
echo " <input type='submit' class='btn' value='".$text['button-save']."'>\n";
|
||||
echo " <input type='button' class='btn' name='' alt='".$text['button-copy']."' onclick=\"if (confirm('".$text['confirm-copy']."')){window.location='dialplan_copy.php?id=".$row['dialplan_uuid']."';}\" value='".$text['button-copy']."'>\n";
|
||||
echo " <input type='button' class='btn' name='' alt='".$text['button-copy']."' onclick=\"if (confirm('".$text['confirm-copy']."')){window.location='dialplan_copy.php?id=".$dialplan_uuid."';}\" value='".$text['button-copy']."'>\n";
|
||||
if (strlen($app_uuid) > 0) {
|
||||
echo " <input type='button' class='btn' name='' alt='".$text['button-back']."' onclick=\"window.location='dialplans.php?app_uuid=$app_uuid'\" value='".$text['button-back']."'>\n";
|
||||
}
|
||||
@@ -776,4 +780,4 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
|
||||
//show the footer
|
||||
require_once "resources/footer.php";
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user