diff --git a/core/apps/apps.php b/core/apps/apps.php index 4998994b08..24178ab5c5 100644 --- a/core/apps/apps.php +++ b/core/apps/apps.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - 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. Contributor(s): @@ -28,6 +28,7 @@ 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")) { @@ -42,109 +43,64 @@ $language = new text; $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 $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"); + $config_list = glob($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/*/*/app_config.php"); $x=0; foreach ($config_list as $config_path) { include($config_path); $x++; } -//set the row styles - $c = 0; - $row_style["0"] = "row_style0"; - $row_style["1"] = "row_style1"; +//include the header + $document['title'] = $text['title-apps']; + require_once "resources/header.php"; //show the content - echo "".$text['header-apps']."\n"; - echo "

\n"; + 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"; - 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"; } - echo "\n"; - */ - echo "\n"; + unset($apps); - 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 "\n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - /* // temporarily disabled - echo " \n"; - */ - echo "\n"; - } - if ($c==0) { $c=1; } else { $c=0; } - } //end foreach - unset($sql, $result, $row_count); - - echo "\n"; - echo " \n"; - /* - echo "\n"; - */ - echo ""; echo "
".$text['label-name']."".$text['label-category']."".$text['label-subcategory']."".$text['label-version']."".$text['label-description']."\n"; - if (permission_exists('app_add')) { - echo " $v_link_label_add\n"; + echo " ".$text['label-version']."".$text['label-description']."
".$row['name']."".escape($row['category'])." ".escape($row['subcategory'])." ".escape($row['version'])." ".escape($row['$description'])."
"; - /* - if (permission_exists('app_edit')) { - echo " ".escape($row['name']).""; - } - else { - */ - echo $row['name']; - /* - } - */ - echo " ".escape($row['category'])." ".escape($row['subcategory'])." ".escape($row['version'])." ".escape($row['$description']).""; - if (permission_exists('app_edit')) { - echo " $v_link_label_edit\n"; - } - if (permission_exists('app_delete')) { - echo " $v_link_label_delete\n"; - } - echo "
 \n"; - if (permission_exists('app_add')) { - echo " $v_link_label_add\n"; - } - echo "
"; echo "

"; //include the footer require_once "resources/footer.php"; -?> + +?> \ No newline at end of file