X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=admin%2Ftags.php;h=3f06c57e97e275fc22c9b20d37401f94c71262ac;hb=d25e06f889d2c81871fcb6edb42e53e2ea316601;hp=ff8cac51ab4975d514b005139e47cc2f8e20cc8b;hpb=0a54401687d228d16d9048f69b8003a6ca23c900;p=fa-stable.git diff --git a/admin/tags.php b/admin/tags.php index ff8cac51..3f06c57e 100644 --- a/admin/tags.php +++ b/admin/tags.php @@ -10,22 +10,18 @@ See the License here . ***********************************************************************/ $path_to_root = ".."; +include($path_to_root . "/includes/session.inc"); +include_once($path_to_root . "/includes/types.inc"); // For tag constants +include_once($path_to_root . "/admin/db/tags_db.inc"); +include($path_to_root . "/includes/ui.inc"); + // Set up page security based on what type of tags we're working with -if ($_GET['type'] == "account" || $_POST['type'] == TAG_ACCOUNT) { +if (@$_GET['type'] == "account" || get_post('type') == TAG_ACCOUNT) { $page_security = 'SA_GLACCOUNTTAGS'; -} else if($_GET['type'] == "dimension" || $_POST['type'] == TAG_DIMENSION) { +} else if(@$_GET['type'] == "dimension" || get_post('type') == TAG_DIMENSION) { $page_security = 'SA_DIMTAGS'; } -include($path_to_root . "/includes/session.inc"); // Define session before using $_SESSION -include_once($path_to_root . "/includes/types.inc"); // For tag constants - -if (!isset($page_security)) { - // If GET & POST don't have the info, try getting it from the session. - $page_security = $_SESSION['tags_page_security']; -} -$_SESSION['tags_page_security'] = $page_security; - // We use $_POST['type'] throughout this script, so convert $_GET vars // if $_POST['type'] is not set. if (!isset($_POST['type'])) { @@ -38,21 +34,17 @@ if (!isset($_POST['type'])) { } // Set up page based on what type of tags we're working with -// TODO: Set $_SESSION['sel_app'] to be relevant app (see /includes/page/header.inc::page_header() switch ($_POST['type']) { case TAG_ACCOUNT: // Account tags - $_SESSION['page_title'] = _("Account Tags"); + $_SESSION['page_title'] = _($help_context = "Account Tags"); break; case TAG_DIMENSION: // Dimension tags - $_SESSION['page_title'] = _("Dimension Tags"); + $_SESSION['page_title'] = _($help_context = "Dimension Tags"); } page($_SESSION['page_title']); -include_once($path_to_root . "/admin/db/tags_db.inc"); - -include($path_to_root . "/includes/ui.inc"); simple_page_mode(true); @@ -132,7 +124,7 @@ if ($Mode == 'RESET') $result = get_tags($_POST['type'], check_value('show_inactive')); start_form(); -start_table($table_style); +start_table(TABLESTYLE); $th = array(_("Tag Name"), _("Tag Description"), "", ""); inactive_control_column($th); table_header($th); @@ -155,7 +147,7 @@ end_table(1); //----------------------------------------------------------------------------------- -start_table($table_style2); +start_table(TABLESTYLE2); if ($selected_id != -1) // We've selected a tag { @@ -184,4 +176,3 @@ end_form(); end_page(); -?>