This doesn't appear to be completed. The developer that created should talk to me about what its purpose is as this seems to duplicate domain settings.

This commit is contained in:
markjcrane 2016-01-16 10:33:46 -07:00
parent 76b1ea734e
commit b67f9dee45
6 changed files with 0 additions and 303 deletions

View File

@ -1,34 +0,0 @@
<?php
//application details
$apps[$x]['name'] = "Tenant Settings";
$apps[$x]['guid'] = "dddaf83c-f20c-489a-b6f7-9c75dadaa710";
$apps[$x]['category'] = "Switch";
$apps[$x]['subcategory'] = "";
$apps[$x]['version'] = "Alpha";
$apps[$x]['license'] = "Mozilla Public License 1.1";
$apps[$x]['url'] = "http://www.fusionpbx.com";
$apps[$x]['description']['en-us'] = "Allow tenants to manage specific domain settings";
$apps[$x]['description']['es-cl'] = "";
$apps[$x]['description']['de-de'] = "";
$apps[$x]['description']['de-ch'] = "";
$apps[$x]['description']['de-at'] = "";
$apps[$x]['description']['fr-fr'] = "";
$apps[$x]['description']['fr-ca'] = "";
$apps[$x]['description']['fr-ch'] = "";
$apps[$x]['description']['pt-pt'] = "";
$apps[$x]['description']['pt-br'] = "";
//permission details
$y = 0;
$apps[$x]['permissions'][$y]['name'] = "tenant_settings_view";
$apps[$x]['permissions'][$y]['menu']['uuid'] = "a684573f-3b61-463c-aab7-606a5e59e09e";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$apps[$x]['permissions'][$y]['groups'][] = "admin";
$y++;
$apps[$x]['permissions'][$y]['name'] = "tenant_settings_admin";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$y++;
?>

View File

@ -1,27 +0,0 @@
<?php
/*
FusionPBX
Version: MPL 1.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is FusionPBX
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.
Contributor(s):
Matthew Vale <github@mafoo.org>
*/
?>

View File

@ -1,13 +0,0 @@
<?php
$text['title-tenant_settings']['en-us'] = "Tenant Settings";
$text['title-tenant_settings']['es-cl'] = "";
$text['title-tenant_settings']['pt-pt'] = "";
$text['title-tenant_settings']['fr-fr'] = "";
$text['title-tenant_settings']['pt-br'] = "";
$text['title-tenant_settings']['pl'] = "";
$text['title-tenant_settings']['sv-se'] = "";
$text['title-tenant_settings']['uk'] = "";
$text['title-tenant_settings']['de-at'] = "";
?>

View File

@ -1,22 +0,0 @@
<?php
$apps[$x]['menu'][0]['title']['en-us'] = "Tenant Settings";
$apps[$x]['menu'][0]['title']['es-cl'] = "";
$apps[$x]['menu'][0]['title']['fr-fr'] = "";
$apps[$x]['menu'][0]['title']['pt-pt'] = "";
$apps[$x]['menu'][0]['title']['pt-br'] = "";
$apps[$x]['menu'][0]['title']['pl'] = "";
$apps[$x]['menu'][0]['title']['sv-se'] = "";
$apps[$x]['menu'][0]['title']['uk'] = "";
$apps[$x]['menu'][0]['title']['ro'] = "";
$apps[$x]['menu'][0]['title']['de-at'] = "";
$apps[$x]['menu'][0]['title']['ar-eg'] = "";
$apps[$x]['menu'][0]['title']['he'] = "";
$apps[$x]['menu'][0]['uuid'] = "a684573f-3b61-463c-aab7-606a5e59e09e";
$apps[$x]['menu'][0]['parent_uuid'] = "fd29e39c-c936-f5fc-8e2b-611681b266b5";
$apps[$x]['menu'][0]['category'] = "internal";
$apps[$x]['menu'][0]['path'] = "/app/tenant_settings/tenant_settings.php";
$apps[$x]['menu'][0]['groups'][] = "superadmin";
$apps[$x]['menu'][0]['groups'][] = "admin";
?>

View File

@ -1,84 +0,0 @@
<?php
/*
FusionPBX
Version: MPL 1.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is FusionPBX
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2012
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
// make sure the PATH_SEPARATOR is defined
if (!defined("PATH_SEPARATOR")) {
if (strpos($_ENV["OS"], "Win") !== false) {
define("PATH_SEPARATOR", ";");
} else {
define("PATH_SEPARATOR", ":");
}
}
// make sure the document_root is set
$_SERVER["SCRIPT_FILENAME"] = str_replace("\\", '/', $_SERVER["SCRIPT_FILENAME"]);
if(PHP_SAPI == 'cli'){
chdir(pathinfo($_SERVER["PHP_SELF"], PATHINFO_DIRNAME));
$script_full_path = str_replace("\\", '/', getcwd() . '/' . $_SERVER["SCRIPT_FILENAME"]);
$dirs = explode('/', pathinfo($script_full_path, PATHINFO_DIRNAME));
if (file_exists('/.project.ROOT')) {
$path = '/';
} else {
$i = 1;
$path = '';
while ($i < count($dirs)) {
$path .= '/' . $dirs[$i];
if (file_exists($path. '/.project.ROOT')) {
break;
}
$i++;
}
}
$_SERVER["DOCUMENT_ROOT"] = $path;
}else{
$_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PHP_SELF"], "", $_SERVER["SCRIPT_FILENAME"]);
}
$_SERVER["DOCUMENT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"]);
// try to detect if a project path is being used
if (!defined('PROJECT_PATH')) {
if (is_dir($_SERVER["DOCUMENT_ROOT"]. '/fusionpbx')) {
define('PROJECT_PATH', '/fusionpbx');
} elseif (file_exists($_SERVER["DOCUMENT_ROOT"]. '/.project.ROOT')) {
define('PROJECT_PATH', '');
} else {
$dirs = explode('/', str_replace('\\', '/', pathinfo($_SERVER["PHP_SELF"], PATHINFO_DIRNAME)));
$i = 1;
$path = $_SERVER["DOCUMENT_ROOT"];
while ($i < count($dirs)) {
$path .= '/' . $dirs[$i];
if (file_exists($path. '/.project.ROOT')) {
break;
}
$i++;
}
$project_path = str_replace($_SERVER["DOCUMENT_ROOT"], "", $path);
define('PROJECT_PATH', $project_path);
}
$_SERVER["PROJECT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH);
set_include_path(get_include_path() . PATH_SEPARATOR . $_SERVER["PROJECT_ROOT"]);
}
?>

View File

@ -1,123 +0,0 @@
<?php
/*
FusionPBX
Version: MPL 1.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is FusionPBX
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.
Contributor(s):
Matthew Vale <github@mafoo.org>
*/
require_once "root.php";
require_once "resources/require.php";
require_once "resources/check_auth.php";
if (permission_exists('tenant_settings_view')) {
//access granted
}
else {
echo "access denied";
exit;
}
//add multi-lingual support
$language = new text;
$text = $language->get();
//header and paging
require_once "resources/header.php";
$document['title'] = $text['title-tenant_settings'];
require_once "resources/paging.php";
//get variables used to control the order
$order_by = $_GET["order_by"];
$order = $_GET["order"];
//copy settings javascript
if (permission_exists("tenant_settings_admin") && count($_SESSION['domains']) > 1) {
echo "<script language='javascript' type='text/javascript'>\n";
echo " var fade_speed = 400;\n";
echo " function show_domains() {\n";
echo " document.getElementById('action').value = 'copy';\n";
echo " $('#button_copy').fadeOut(fade_speed, function() {\n";
echo " $('#button_back').fadeIn(fade_speed);\n";
echo " $('#target_domain_uuid').fadeIn(fade_speed);\n";
echo " $('#button_paste').fadeIn(fade_speed);\n";
echo " });";
echo " }";
echo " function hide_domains() {\n";
echo " document.getElementById('action').value = '';\n";
echo " $('#button_back').fadeOut(fade_speed);\n";
echo " $('#target_domain_uuid').fadeOut(fade_speed);\n";
echo " $('#button_paste').fadeOut(fade_speed, function() {\n";
echo " $('#button_copy').fadeIn(fade_speed);\n";
echo " document.getElementById('target_domain_uuid').selectedIndex = 0;\n";
echo " });\n";
echo " }\n";
echo "\n";
echo " $( document ).ready(function() {\n";
echo " $('#default_setting_search').focus();\n";
if ($search == '') {
echo " // scroll to previous category\n";
echo " var category_span_id;\n";
echo " var url = document.location.href;\n";
echo " var hashindex = url.indexOf('#');\n";
echo " if (hashindex == -1) { }\n";
echo " else {\n";
echo " category_span_id = url.substr(hashindex + 1);\n";
echo " }\n";
echo " if (category_span_id) {\n";
echo " $('#page').animate({scrollTop: $('#anchor_'+category_span_id).offset().top - 200}, 'slow');\n";
echo " }\n";
}
echo " });\n";
echo "</script>";
}
//show the content
echo "<form name='frm' id='frm' method='post' action=''>";
echo "<input type='hidden' name='action' id='action' value=''>";
echo "<table width='100%' cellpadding='0' cellspacing='0' border='0'>\n";
echo " <tr>\n";
echo " <td align='left' valign='top' nowrap='nowrap'>";
echo " <b>".$text['header-default_settings']."</b>";
echo " <br><br>";
echo " ".$text['description-default_settings'];
echo " </td>\n";
echo " <td align='right' valign='top' nowrap='nowrap'>";
echo " <input type='text' name='search' id='default_setting_search' class='formfld' style='min-width: 150px; width:150px; max-width: 150px;' placeholder=\"".$text['label-search']."\" value=\"".$search."\" onkeyup='setting_search();'>\n";
if (permission_exists("domain_select") && permission_exists("domain_setting_add") && count($_SESSION['domains']) > 1) {
echo " <input type='button' class='btn' id='button_copy' alt='".$text['button-copy']."' onclick='show_domains();' value='".$text['button-copy']."'>";
echo " <input type='button' class='btn' style='display: none;' id='button_back' alt='".$text['button-back']."' onclick='hide_domains();' value='".$text['button-back']."'> ";
echo " <select class='formfld' style='display: none; width: auto;' name='target_domain_uuid' id='target_domain_uuid'>\n";
echo " <option value=''>Select Domain...</option>\n";
foreach ($_SESSION['domains'] as $domain) {
echo " <option value='".$domain["domain_uuid"]."'>".$domain["domain_name"]."</option>\n";
}
echo " </select>\n";
echo " <input type='button' class='btn' id='button_paste' style='display: none;' alt='".$text['button-paste']."' value='".$text['button-paste']."' onclick='document.forms.frm.submit();'>";
}
echo " <input type='button' class='btn' id='button_reload' alt='".$text['button-reload']."' value='".$text['button-reload']."' onclick=\"document.location.href='default_settings_reload.php?search='+$('#default_setting_search').val();\">";
echo " </td>\n";
echo " </tr>\n";
echo "</table>\n";
echo "<br>";
//include the footer
require_once "resources/footer.php";
?>