App Manager: List view updates.
This commit is contained in:
+37
-81
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Portions created by the Initial Developer are Copyright (C) 2008-2019
|
Portions created by the Initial Developer are Copyright (C) 2008-2020
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
@@ -28,6 +28,7 @@
|
|||||||
require_once "root.php";
|
require_once "root.php";
|
||||||
require_once "resources/require.php";
|
require_once "resources/require.php";
|
||||||
require_once "resources/check_auth.php";
|
require_once "resources/check_auth.php";
|
||||||
|
require_once "resources/paging.php";
|
||||||
|
|
||||||
//check permissions
|
//check permissions
|
||||||
if (if_group("admin") || if_group("superadmin")) {
|
if (if_group("admin") || if_group("superadmin")) {
|
||||||
@@ -42,109 +43,64 @@
|
|||||||
$language = new text;
|
$language = new text;
|
||||||
$text = $language->get();
|
$text = $language->get();
|
||||||
|
|
||||||
//additional includes
|
|
||||||
require_once "resources/header.php";
|
|
||||||
require_once "resources/paging.php";
|
|
||||||
|
|
||||||
//set the title
|
|
||||||
$document['title'] = $text['title-apps'];
|
|
||||||
|
|
||||||
//get variables used to control the order
|
//get variables used to control the order
|
||||||
$order_by = $_GET["order_by"];
|
$order_by = $_GET["order_by"];
|
||||||
$order = $_GET["order"];
|
$order = $_GET["order"];
|
||||||
|
|
||||||
//get the list of installed apps from the core and mod directories
|
//get the list of installed apps from the core and mod directories
|
||||||
$config_list = glob($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/*/*/app_config.php");
|
$config_list = glob($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/*/*/app_config.php");
|
||||||
$x=0;
|
$x=0;
|
||||||
foreach ($config_list as $config_path) {
|
foreach ($config_list as $config_path) {
|
||||||
include($config_path);
|
include($config_path);
|
||||||
$x++;
|
$x++;
|
||||||
}
|
}
|
||||||
|
|
||||||
//set the row styles
|
//include the header
|
||||||
$c = 0;
|
$document['title'] = $text['title-apps'];
|
||||||
$row_style["0"] = "row_style0";
|
require_once "resources/header.php";
|
||||||
$row_style["1"] = "row_style1";
|
|
||||||
|
|
||||||
//show the content
|
//show the content
|
||||||
echo "<b>".$text['header-apps']."</b>\n";
|
echo "<div class='action_bar' id='action_bar'>\n";
|
||||||
echo "<br /><br />\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";
|
||||||
|
|
||||||
echo $text['description-apps'];
|
echo $text['description-apps'];
|
||||||
echo "<br /><br />\n";
|
echo "<br /><br />\n";
|
||||||
|
|
||||||
echo "<table class='tr_hover' width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
echo "<table class='list'>\n";
|
||||||
echo "<tr>\n";
|
echo "<tr class='list-header'>\n";
|
||||||
echo " <th>".$text['label-name']."</th>\n";
|
echo " <th>".$text['label-name']."</th>\n";
|
||||||
echo " <th>".$text['label-category']."</th>\n";
|
echo " <th>".$text['label-category']."</th>\n";
|
||||||
echo " <th>".$text['label-subcategory']."</th>\n";
|
echo " <th>".$text['label-subcategory']."</th>\n";
|
||||||
echo " <th>".$text['label-version']."</th>\n";
|
echo " <th class='center'>".$text['label-version']."</th>\n";
|
||||||
echo " <th>".$text['label-description']."</th>\n";
|
echo " <th class='hide-sm-dn'>".$text['label-description']."</th>\n";
|
||||||
/*
|
echo "</tr>\n";
|
||||||
echo "<td class='list_control_icons'>\n";
|
|
||||||
if (permission_exists('app_add')) {
|
foreach ($apps as $row) {
|
||||||
echo " <a href='apps_edit.php' alt='".$text['button-add']."'>$v_link_label_add</a>\n";
|
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";
|
||||||
}
|
}
|
||||||
echo "</td>\n";
|
unset($apps);
|
||||||
*/
|
|
||||||
echo "<tr>\n";
|
|
||||||
|
|
||||||
foreach($apps as $row) {
|
|
||||||
if ($row['uuid'] != "d8704214-75a0-e52f-1336-f0780e29fef8") {
|
|
||||||
|
|
||||||
$description = $row['description'][$_SESSION['domain']['language']['code']];
|
|
||||||
if (strlen($description) == 0) { $description = $row['description']['en-us']; }
|
|
||||||
if (strlen($description) == 0) { $description = ''; }
|
|
||||||
$row['$description'] = $description;
|
|
||||||
|
|
||||||
/*
|
|
||||||
$tr_link = (permission_exists('app_edit')) ? "href='apps_edit.php?id=".escape($row['uuid'])."'" : null;
|
|
||||||
*/
|
|
||||||
echo "<tr ".$tr_link.">\n";
|
|
||||||
echo " <td valign='top' class='".$row_style[$c]."' nowrap='nowrap'>";
|
|
||||||
/*
|
|
||||||
if (permission_exists('app_edit')) {
|
|
||||||
echo " <a href='apps_edit.php?id=".escape($row['uuid'])."'>".escape($row['name'])."</a>";
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
*/
|
|
||||||
echo $row['name'];
|
|
||||||
/*
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
echo " </td>\n";
|
|
||||||
echo " <td valign='top' class='".$row_style[$c]."'>".escape($row['category'])." </td>\n";
|
|
||||||
echo " <td valign='top' class='".$row_style[$c]."'>".escape($row['subcategory'])." </td>\n";
|
|
||||||
echo " <td valign='top' class='".$row_style[$c]."'>".escape($row['version'])." </td>\n";
|
|
||||||
echo " <td valign='top' class='row_stylebg' width='35%'>".escape($row['$description'])."</td>\n";
|
|
||||||
/* // temporarily disabled
|
|
||||||
echo " <td class='list_control_icons'>";
|
|
||||||
if (permission_exists('app_edit')) {
|
|
||||||
echo " <a href='apps_edit.php?id=".escape($row['uuid'])."' alt='".$text['button-edit']."'>$v_link_label_edit</a>\n";
|
|
||||||
}
|
|
||||||
if (permission_exists('app_delete')) {
|
|
||||||
echo " <a href='apps_delete.php?id=".escape($row['uuid'])."' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>\n";
|
|
||||||
}
|
|
||||||
echo " </td>\n";
|
|
||||||
*/
|
|
||||||
echo "</tr>\n";
|
|
||||||
}
|
|
||||||
if ($c==0) { $c=1; } else { $c=0; }
|
|
||||||
} //end foreach
|
|
||||||
unset($sql, $result, $row_count);
|
|
||||||
|
|
||||||
echo "<tr>\n";
|
|
||||||
echo " <td colspan='5'> </td>\n";
|
|
||||||
/*
|
|
||||||
echo "<td class='list_control_icons'>\n";
|
|
||||||
if (permission_exists('app_add')) {
|
|
||||||
echo " <a href='apps_edit.php' alt='".$text['button-add']."'>$v_link_label_add</a>\n";
|
|
||||||
}
|
|
||||||
echo "</td>\n";
|
|
||||||
*/
|
|
||||||
echo "</tr>";
|
|
||||||
echo "</table>";
|
echo "</table>";
|
||||||
echo "<br /><br />";
|
echo "<br /><br />";
|
||||||
|
|
||||||
//include the footer
|
//include the footer
|
||||||
require_once "resources/footer.php";
|
require_once "resources/footer.php";
|
||||||
?>
|
|
||||||
|
?>
|
||||||
Reference in New Issue
Block a user