diff --git a/app/dialplan/dialplan_advanced.php b/app/dialplan/dialplan_advanced.php deleted file mode 100644 index 407378f335..0000000000 --- a/app/dialplan/dialplan_advanced.php +++ /dev/null @@ -1,163 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane - Luis Daniel Lucio Quiroz -*/ -include "root.php"; -require_once "resources/require.php"; -require_once "resources/check_auth.php"; -if (permission_exists('dialplan_advanced_view')) { - //access granted -} -else { - echo "access denied"; - exit; -} - -//add multi-lingual support - $language = new text; - $text = $language->get(); - -require_once "resources/header.php"; -$document['title'] = $text['title-default_dialplan']; - -if ($_GET['a'] == "default" && permission_exists('dialplan_advanced_edit')) { - //create the dialplan/default.xml for single tenant or dialplan/domain.xml - require_once "app/dialplan/resources/classes/dialplan.php"; - $dialplan = new dialplan; - $dialplan->domain_uuid = $_SESSION['domain_uuid']; - $dialplan->switch_dialplan_dir = $_SESSION['switch']['dialplan']['dir']; - $dialplan->restore_advanced_xml(); - //print_r($dialplan->result); -} - -if ($_POST['a'] == "save" && permission_exists('dialplan_advanced_edit')) { - $v_content = str_replace("\r","",$_POST['code']); - if (file_exists($_SESSION['switch']['dialplan']['dir']."/".$_SESSION['domain_name'].".xml")) { - $fd = fopen($_SESSION['switch']['dialplan']['dir']."/".$_SESSION['domain_name'].".xml", "w"); - } - else { - $fd = fopen($_SESSION['switch']['dialplan']['dir']."/default.xml", "w"); - } - fwrite($fd, $v_content); - fclose($fd); - $savemsg = $text['message-update']; -} - -if (file_exists($_SESSION['switch']['dialplan']['dir']."/".$_SESSION['domain_name'].".xml")) { - $fd = fopen($_SESSION['switch']['dialplan']['dir']."/".$_SESSION['domain_name'].".xml", "r"); - $v_content = fread($fd, filesize($_SESSION['switch']['dialplan']['dir']."/".$_SESSION['domain_name'].".xml")); -} -else { - $fd = fopen($_SESSION['switch']['dialplan']['dir']."/default.xml", "r"); - $v_content = fread($fd, filesize($_SESSION['switch']['dialplan']['dir']."/default.xml")); -} -fclose($fd); - -?> - - - - - - - - - -
-
-
- - - - - - - - - - - - - - - -
-

- -
-
-
- ' onclick="window.location='dialplans.php'" value=''> - ' /> -
- -
-
-
- location: ".$_SESSION['switch']['conf']['dir']."/dialplan/default.xml\n"; - } - ?> - - ' /> - - "; - } - ?> -
-


-


-


-


-


-


-


-


-


-


-
-
-
- -