";
-$html .= form_open("$_SERVER[PHP_SELF]?display=$module");
-
-$html .= heading(_("Instructions"), 3);
-$html .= "
";
-$html .= _("This module allows you to allow or deny access to certain routes from specified extensions. You can perform bulk changes on this page, and you can change an individual extension's access to routes on that extension's page.");
-$html .= "
";
-$html .= "
";
-$html .= _("In addition to simple Allow/Deny rules, you can also deny access to a route and then redirect the call, allowing a different outbound route to match the call.");
-$html .= "
";
-$html .= "
";
-$html .= _("For example, if you wanted to stop an extension from using Route A, selecting Deny would preclude the possibility of trying another route. Instead you could select Redirect with prefix and set the Redirect prefix to 9999
; assuming you've created Route B with a prefix match of 9999
and not set a deny rule on it, the call can proceed.");
-$html .= "
";
-$html .= "
";
-$html .= _("In addition, if you are denying access to a particular route and wish to use something other than the default destination, you can select Redirect with prefix, and create a Miscellaneous Application that matches the specified Redirect prefix. Using the previous example, a Miscellaneous Application with a feature code of _9999x.
could be called if it existed on the system.");
-$html .= "
";
-
-$html .= heading(_("Bulk Changes"), 3);
-$html .= "
";
-$html .= _("Select a route and select Allow or Deny to set permissions for the entered extensions. If you enter a Redirect prefix and click Redirect with prefix, the route will automatically be set to DENIED.");
-$html .= _("You can enter one or more extensions or ranges separated by commas; a range is a start and end extension separated by a hyphen. For example 123,125,200-300
will select extensions 123 and 125 as well as any extensions between 200 and 300.");
-$html .= "
";
-$html .= "
";
-$html .= _("Note that these changes take effect immediately and do not require a reload.");
-$html .= "
";
-
-$routes = $rp->getRoutes();
-
-$table = new CI_Table;
-$table->set_heading(array(
- _("Route"),
- _("Extensions"),
- _("Permissions"),
- _("Destination"),
- _("Redirect Prefix"),
-));
-
-foreach ($routes as $r) {
- $table->add_row(array(
- array("data"=>$r, "id"=>"td_$r"),
- form_input("range_$r", _("All"), "size=\"10\""),
- "
" .
- form_radio("permission_$r", "", true, "id=\"permission_{$r}_SKIP\"") .
- form_label(_("No change"), "permission_{$r}_SKIP") .
- form_radio("permission_$r", "YES", false, "id=\"permission_{$r}_YES\"") .
- form_label(_("Allow"), "permission_{$r}_YES") .
- form_radio("permission_$r", "NO", false, "id=\"permission_{$r}_NO\"") .
- form_label(_("Deny"), "permission_{$r}_NO") .
- form_radio("permission_$r", "REDIRECT", false, "id=\"permission_{$r}_REDIRECT\"") .
- form_label(_("Redirect w/prefix"), "permission_{$r}_REDIRECT") .
- "",
- drawselects("", "_$r", false, false, _("Use default")),
- form_input("prefix_$r", "", sprintf("placeholder=\"%s\" size=\"10\"", _("Prefix"))),
- ));
-}
-$table->add_row(array(
- form_submit("update_permissions", _("Save Changes"))
-));
-$html .= form_open("$_SERVER[PHP_SELF]?display=$module");
-$html .= $table->generate();
-$html .= form_close();
-
-$html .= "
";
-
-$html .= form_open("$_SERVER[PHP_SELF]?display=$module");
-$html .= heading(_("Default Destination if Denied"), 3);
-$html .= "
";
-$html .= _("Select the destination for calls when they are denied without specifying a destination.");
-$html .= "
";
-$html .= drawselects($rp->getDefaultDest(), "faildest");
-$html .= "
";
-$html .= form_submit("update_default", "Change Destination");
-$html .= form_close();
-
-echo $html;
diff --git a/views/settings13.php b/views/settings13.php
index 1566ef1..fc94841 100644
--- a/views/settings13.php
+++ b/views/settings13.php
@@ -4,79 +4,19 @@
// Extensive modifications by Michael Newton (miken32@gmail.com)
// Copyright 2016 Michael Newton
/*
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as
- published by the Free Software Foundation, either version 3 of the
- License, or (at your option) any later version.
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see
.
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see
.
*/
-
-$html = "";
-
-$html .= heading(_("Bulk Changes"), 4);
-$html .= "
";
-$html .= _("Select a route and select Allow or Deny to set permissions for the entered extensions. If you enter a Redirect prefix and click Redirect with prefix, the route will automatically be set to DENIED.");
-$html .= " ";
-$html .= _("You can enter one or more extensions or ranges separated by commas; a range is a start and end extension separated by a hyphen. For example 123,125,200-300
will select extensions 123 and 125 as well as any extensions between 200 and 300.");
-$html .= "
";
-$html .= "
";
-$html .= _("Note that these changes take effect immediately and do not require a reload.");
-$html .= "
";
-
-$routes = $rp->getRoutes();
-
-$table = new CI_Table;
-$table->set_heading(array(
- _("Route"),
- _("Extensions"),
- _("Permissions"),
- _("Destination"),
- _("Redirect Prefix"),
-));
-
-foreach ($routes as $r) {
- $table->add_row(array(
- array("data"=>$r, "id"=>"td_$r"),
- form_input("range_$r", _("All"), "size=\"10\""),
- "
" .
- form_radio("permission_$r", "", true, "id=\"permission_{$r}_SKIP\"") .
- form_label(_("No change"), "permission_{$r}_SKIP") .
- form_radio("permission_$r", "YES", false, "id=\"permission_{$r}_YES\"") .
- form_label(_("Allow"), "permission_{$r}_YES") .
- form_radio("permission_$r", "NO", false, "id=\"permission_{$r}_NO\"") .
- form_label(_("Deny"), "permission_{$r}_NO") .
- form_radio("permission_$r", "REDIRECT", false, "id=\"permission_{$r}_REDIRECT\"") .
- form_label(_("Redirect w/prefix"), "permission_{$r}_REDIRECT") .
- "",
- drawselects("", "_$r", false, false, _("Use default")),
- form_input("prefix_$r", "", sprintf("placeholder=\"%s\" size=\"10\"", _("Prefix"))),
- ));
-}
-$table->add_row(array(
- form_submit("update_permissions", _("Save Changes"))
-));
-$html .= form_open("$_SERVER[PHP_SELF]?display=$module");
-$html .= $table->generate();
-$html .= form_close();
-
-$html .= "
";
-
-$html .= form_open("$_SERVER[PHP_SELF]?display=$module");
-$html .= heading(_("Default Destination if Denied"), 4);
-$html .= "
";
-$html .= _("Select the destination for calls when they are denied without specifying a destination.");
-$html .= "
";
-$html .= drawselects($rp->getDefaultDest(), "faildest");
-$html .= form_submit("update_default", "Change Destination");
-$html .= form_close();
-
?>
@@ -84,27 +24,100 @@
-
-
-
-
-
-
Deny would preclude the possibility of trying another route. Instead you could select Redirect with prefix and set the Redirect prefix to 9999
; assuming you've created Route B with a prefix match of 9999
and not set a deny rule on it, the call can proceed.");?>
-
Redirect with prefix, and create a Miscellaneous Application that matches the specified Redirect prefix. Using the previous example, a Miscellaneous Application with a feature code of _9999x.
could be called if it existed on the system.");?>
-
+
+
+
+
Deny would preclude the possibility of trying another route. Instead you could select Redirect with prefix and set the Redirect prefix to 9999
; assuming you've created Route B with a prefix match of 9999
and not set a deny rule on it, the call can proceed.");?>
+
Redirect with prefix, and create a Miscellaneous Application that matches the specified Redirect prefix. Using the previous example, a Miscellaneous Application with a feature code of _9999x.
could be called if it existed on the system.");?>
-
+
+
+
=_("Messages")?>
+
+
-
+
+
+
=_("Errors")?>
+
+
+
=htmlspecialchars(_("Bulk Changes"))?>
+
+ =_("Select a route and select Allow or Deny to set permissions for the entered extensions. If you enter a Redirect prefix and click Redirect with prefix, the route will automatically be set to DENIED.")?>
+ =_("You can enter one or more extensions or ranges separated by commas; a range is a start and end extension separated by a hyphen. For example 123,125,200-300
will select extensions 123 and 125 as well as any extensions between 200 and 300.")?>
+
+
+ =_("Note that these changes take effect immediately and do not require a reload.")?>
+
+
+
+
-