diff --git a/app/fax/fax_edit.php b/app/fax/fax_edit.php index 8efda4a57e..93eea87068 100644 --- a/app/fax/fax_edit.php +++ b/app/fax/fax_edit.php @@ -17,30 +17,25 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008-2015 + Portions created by the Initial Developer are Copyright (C) 2008-2016 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('fax_extension_add') || permission_exists('fax_extension_edit') || permission_exists('fax_extension_delete')) { - //access granted -} -else { - echo "access denied"; - exit; -} -//detect billing app - $billing_app_exists = file_exists($_SERVER["PROJECT_ROOT"]."/app/billing/app_config.php"); +//includes + include "root.php"; + require_once "resources/require.php"; + require_once "resources/check_auth.php"; - if ($billing_app_exists) { - require_once "app/billing/resources/functions/currency.php"; - require_once "app/billing/resources/functions/rating.php"; +//check permissions + if (permission_exists('fax_extension_add') || permission_exists('fax_extension_edit') || permission_exists('fax_extension_delete')) { + //access granted + } + else { + echo "access denied"; + exit; } //add multi-lingual support @@ -518,41 +513,17 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo "\n"; echo "\n"; - if (if_group("superadmin") || (if_group("admin") && $billing_app_exists)) { - echo "\n"; - echo "\n"; - echo " ".$text['label-accountcode']."\n"; - echo "\n"; - echo "\n"; - if ($billing_app_exists) { - $sql_accountcode = "SELECT type_value FROM v_billings WHERE domain_uuid = '".$domain_uuid."'"; - echo ""; - } - else { - if ($action == "add") { $fax_accountcode = $_SESSION['domain_name']; } - echo "\n"; - } - - echo "
\n"; - echo $text['description-accountcode']."\n"; - echo "\n"; - echo "\n"; - } + echo "\n"; + echo "\n"; + echo " ".$text['label-accountcode']."\n"; + echo "\n"; + echo "\n"; + if ($action == "add") { $fax_accountcode = $_SESSION['domain_name']; } + echo " \n"; + echo "
\n"; + echo $text['description-accountcode']."\n"; + echo "\n"; + echo "\n"; echo "\n"; echo "\n";