2012-06-04 16:58:40 +02:00
|
|
|
<?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>
|
2020-02-11 06:20:31 +01:00
|
|
|
Portions created by the Initial Developer are Copyright (C) 2008-2020
|
2012-06-04 16:58:40 +02:00
|
|
|
the Initial Developer. All Rights Reserved.
|
|
|
|
|
|
|
|
|
|
Contributor(s):
|
|
|
|
|
Mark J Crane <markjcrane@fusionpbx.com>
|
|
|
|
|
*/
|
2017-06-03 17:24:03 +02:00
|
|
|
|
|
|
|
|
//includes
|
|
|
|
|
require_once "root.php";
|
|
|
|
|
require_once "resources/require.php";
|
|
|
|
|
require_once "resources/check_auth.php";
|
2020-02-11 06:20:31 +01:00
|
|
|
require_once "resources/paging.php";
|
2017-06-03 17:24:03 +02:00
|
|
|
|
|
|
|
|
//check permissions
|
|
|
|
|
if (if_group("admin") || if_group("superadmin")) {
|
|
|
|
|
//access granted
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
echo "access denied";
|
|
|
|
|
exit;
|
|
|
|
|
}
|
2013-05-15 04:19:44 +02:00
|
|
|
|
|
|
|
|
//add multi-lingual support
|
2015-01-18 11:33:34 +01:00
|
|
|
$language = new text;
|
|
|
|
|
$text = $language->get();
|
2013-05-15 04:19:44 +02:00
|
|
|
|
2012-06-04 16:58:40 +02:00
|
|
|
//get variables used to control the order
|
2019-07-10 04:06:17 +02:00
|
|
|
$order_by = $_GET["order_by"];
|
|
|
|
|
$order = $_GET["order"];
|
2012-06-04 16:58:40 +02:00
|
|
|
|
|
|
|
|
//get the list of installed apps from the core and mod directories
|
2020-02-11 06:20:31 +01:00
|
|
|
$config_list = glob($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/*/*/app_config.php");
|
2012-06-04 16:58:40 +02:00
|
|
|
$x=0;
|
|
|
|
|
foreach ($config_list as $config_path) {
|
|
|
|
|
include($config_path);
|
|
|
|
|
$x++;
|
|
|
|
|
}
|
|
|
|
|
|
2020-02-11 06:20:31 +01:00
|
|
|
//include the header
|
|
|
|
|
$document['title'] = $text['title-apps'];
|
|
|
|
|
require_once "resources/header.php";
|
2017-06-03 17:24:03 +02:00
|
|
|
|
2012-06-04 16:58:40 +02:00
|
|
|
//show the content
|
2020-02-11 06:20:31 +01:00
|
|
|
echo "<div class='action_bar' id='action_bar'>\n";
|
|
|
|
|
echo " <div class='heading'><b>".$text['header-apps']."</b></div>\n";
|
|
|
|
|
echo " <div class='actions'>\n";
|
|
|
|
|
echo " </div>\n";
|
|
|
|
|
echo " <div style='clear: both;'></div>\n";
|
|
|
|
|
echo "</div>\n";
|
|
|
|
|
|
2015-02-15 12:57:14 +01:00
|
|
|
echo $text['description-apps'];
|
|
|
|
|
echo "<br /><br />\n";
|
2012-06-04 16:58:40 +02:00
|
|
|
|
2020-02-11 06:20:31 +01:00
|
|
|
echo "<table class='list'>\n";
|
|
|
|
|
echo "<tr class='list-header'>\n";
|
2013-05-15 04:19:44 +02:00
|
|
|
echo " <th>".$text['label-name']."</th>\n";
|
|
|
|
|
echo " <th>".$text['label-category']."</th>\n";
|
|
|
|
|
echo " <th>".$text['label-subcategory']."</th>\n";
|
2020-02-11 06:20:31 +01:00
|
|
|
echo " <th class='center'>".$text['label-version']."</th>\n";
|
|
|
|
|
echo " <th class='hide-sm-dn'>".$text['label-description']."</th>\n";
|
|
|
|
|
echo "</tr>\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 "<tr class='list-row' href='".$list_row_url."'>\n";
|
|
|
|
|
echo " <td class='no-wrap'>".$row['name']."</td>\n";
|
|
|
|
|
echo " <td>".escape($row['category'])." </td>\n";
|
|
|
|
|
echo " <td>".escape($row['subcategory'])." </td>\n";
|
|
|
|
|
echo " <td class='center'>".escape($row['version'])." </td>\n";
|
|
|
|
|
echo " <td class='description overflow hide-sm-dn pct-35'>".escape($row['$description'])."</td>\n";
|
|
|
|
|
echo "</tr>\n";
|
2014-06-21 09:51:31 +02:00
|
|
|
}
|
2020-02-11 06:20:31 +01:00
|
|
|
unset($apps);
|
|
|
|
|
|
2012-06-04 16:58:40 +02:00
|
|
|
echo "</table>";
|
|
|
|
|
echo "<br /><br />";
|
|
|
|
|
|
|
|
|
|
//include the footer
|
2013-07-06 08:29:50 +02:00
|
|
|
require_once "resources/footer.php";
|
2020-02-11 06:20:31 +01:00
|
|
|
|
|
|
|
|
?>
|