diff --git a/app/dialplan/dialplans.php b/app/dialplan/dialplans.php index fd8ed4df16..28f0a7a5a1 100644 --- a/app/dialplan/dialplans.php +++ b/app/dialplan/dialplans.php @@ -40,6 +40,18 @@ else { $text[$key] = $value[$_SESSION['domain']['language']['code']]; } +//handle enable toggle + $dialplan_uuid = check_str($_REQUEST['id']); + $dialplan_enabled = check_str($_REQUEST['enabled']); + if ($dialplan_uuid != '' && $dialplan_enabled != '') { + $sql = "update v_dialplans set "; + $sql .= "dialplan_enabled = '".$dialplan_enabled."' "; + $sql .= "where dialplan_uuid = '".$dialplan_uuid."'"; + $db->exec(check_sql($sql)); + unset($sql); + $_SESSION["message"] = $text['message-update']; + } + //set the http values as php variables $search = check_str($_REQUEST["search"]); $order_by = check_str($_REQUEST["order_by"]); @@ -67,16 +79,10 @@ else { } //show the content - echo "
| \n";
- echo " "; - - echo "
"; //get the number of rows in the dialplan $sql = "select count(*) as num_rows from v_dialplans "; @@ -230,7 +232,6 @@ else { $row_style["0"] = "row_style0"; $row_style["1"] = "row_style1"; - echo " \n";
echo " ";
- echo ""; - echo " "; - - echo " | ";
- echo "|||||||