From 1e7cccff2aab199e67dd38f128ebb54348e74497 Mon Sep 17 00:00:00 2001 From: Mark J Crane Date: Thu, 2 Jul 2020 10:58:00 -0600 Subject: [PATCH] Remove the old application manager that was view only. --- core/apps/app_config.php | 70 ---------------- core/apps/app_languages.php | 160 ------------------------------------ core/apps/app_menu.php | 28 ------- core/apps/apps.php | 106 ------------------------ core/apps/root.php | 90 -------------------- 5 files changed, 454 deletions(-) delete mode 100644 core/apps/app_config.php delete mode 100644 core/apps/app_languages.php delete mode 100644 core/apps/app_menu.php delete mode 100644 core/apps/apps.php delete mode 100644 core/apps/root.php diff --git a/core/apps/app_config.php b/core/apps/app_config.php deleted file mode 100644 index 71c0ff8277..0000000000 --- a/core/apps/app_config.php +++ /dev/null @@ -1,70 +0,0 @@ - diff --git a/core/apps/app_languages.php b/core/apps/app_languages.php deleted file mode 100644 index d741ba3310..0000000000 --- a/core/apps/app_languages.php +++ /dev/null @@ -1,160 +0,0 @@ - diff --git a/core/apps/app_menu.php b/core/apps/app_menu.php deleted file mode 100644 index 701acf5cea..0000000000 --- a/core/apps/app_menu.php +++ /dev/null @@ -1,28 +0,0 @@ - diff --git a/core/apps/apps.php b/core/apps/apps.php deleted file mode 100644 index 24178ab5c5..0000000000 --- a/core/apps/apps.php +++ /dev/null @@ -1,106 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2020 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ - -//includes - require_once "root.php"; - require_once "resources/require.php"; - require_once "resources/check_auth.php"; - require_once "resources/paging.php"; - -//check permissions - if (if_group("admin") || if_group("superadmin")) { - //access granted - } - else { - echo "access denied"; - exit; - } - -//add multi-lingual support - $language = new text; - $text = $language->get(); - -//get variables used to control the order - $order_by = $_GET["order_by"]; - $order = $_GET["order"]; - -//get the list of installed apps from the core and mod directories - $config_list = glob($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/*/*/app_config.php"); - $x=0; - foreach ($config_list as $config_path) { - include($config_path); - $x++; - } - -//include the header - $document['title'] = $text['title-apps']; - require_once "resources/header.php"; - -//show the content - echo "
\n"; - echo "
".$text['header-apps']."
\n"; - echo "
\n"; - echo "
\n"; - echo "
\n"; - echo "
\n"; - - echo $text['description-apps']; - echo "

\n"; - - echo "\n"; - echo "\n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo "\n"; - - foreach ($apps as $row) { - if ($row['uuid'] == "d8704214-75a0-e52f-1336-f0780e29fef8") { continue; } - - $description = $row['description'][$_SESSION['domain']['language']['code']]; - if (strlen($description) == 0) { $description = $row['description']['en-us']; } - if (strlen($description) == 0) { $description = ''; } - $row['$description'] = $description; - - echo "\n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo "\n"; - } - unset($apps); - - echo "
".$text['label-name']."".$text['label-category']."".$text['label-subcategory']."".$text['label-version']."".$text['label-description']."
".$row['name']."".escape($row['category'])." ".escape($row['subcategory'])." ".escape($row['version'])." ".escape($row['$description'])."
"; - echo "

"; - -//include the footer - require_once "resources/footer.php"; - -?> \ No newline at end of file diff --git a/core/apps/root.php b/core/apps/root.php deleted file mode 100644 index 6fdf32f37b..0000000000 --- a/core/apps/root.php +++ /dev/null @@ -1,90 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ - -// make sure the PATH_SEPARATOR is defined - umask(2); - if (!defined("PATH_SEPARATOR")) { - if (strpos($_ENV["OS"], "Win") !== false) { - define("PATH_SEPARATOR", ";"); - } else { - define("PATH_SEPARATOR", ":"); - } - } - - if (!isset($output_format)) $output_format = (PHP_SAPI == 'cli') ? 'text' : 'html'; - - // make sure the document_root is set - $_SERVER["SCRIPT_FILENAME"] = str_replace("\\", '/', $_SERVER["SCRIPT_FILENAME"]); - if(PHP_SAPI == 'cli'){ - chdir(pathinfo(realpath($_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.php')) { - $path = '/'; - } else { - $i = 1; - $path = ''; - while ($i < count($dirs)) { - $path .= '/' . $dirs[$i]; - if (file_exists($path. '/project_root.php')) { - 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.php')) { - 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.php')) { - break; - } - $i++; - } - if(!file_exists($path. '/project_root.php')){ - die("Failed to locate the Project Root by searching for project_root.php please contact support for assistance"); - } - $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"]); - } - -?> \ No newline at end of file