Update from usntable branch.
[fa-stable.git] / applications / setup.php
1 <?php
2 /**********************************************************************
3     Copyright (C) FrontAccounting, LLC.
4         Released under the terms of the GNU General Public License, GPL, 
5         as published by the Free Software Foundation, either version 3 
6         of the License, or (at your option) any later version.
7     This program is distributed in the hope that it will be useful,
8     but WITHOUT ANY WARRANTY; without even the implied warranty of
9     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
10     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
11 ***********************************************************************/
12 class setup_app extends application
13 {
14         function setup_app()
15         {
16                 global $installed_extensions;
17                 $this->application("system", _($this->help_context = "S&etup"));
18
19                 $this->add_module(_("Company Setup"));
20                 $this->add_lapp_function(0, _("&Company Setup"),
21                         "admin/company_preferences.php?", 'SA_SETUPCOMPANY');
22                 $this->add_lapp_function(0, _("&User Accounts Setup"),
23                         "admin/users.php?", 'SA_USERS');
24                 $this->add_lapp_function(0, _("&Access Setup"),
25                         "admin/security_roles.php?", 'SA_SECROLES');
26                 $this->add_lapp_function(0, _("&Display Setup"),
27                         "admin/display_prefs.php?", 'SA_SETUPDISPLAY');
28                 $this->add_lapp_function(0, _("&Forms Setup"),
29                         "admin/forms_setup.php?", 'SA_FORMSETUP');
30                 $this->add_rapp_function(0, _("&Taxes"),
31                         "taxes/tax_types.php?", 'SA_TAXRATES');
32                 $this->add_rapp_function(0, _("Tax &Groups"),
33                         "taxes/tax_groups.php?", 'SA_TAXGROUPS');
34                 $this->add_rapp_function(0, _("Item Ta&x Types"),
35                         "taxes/item_tax_types.php?", 'SA_ITEMTAXTYPE');
36                 $this->add_rapp_function(0, _("System and &General GL Setup"),
37                         "admin/gl_setup.php?", 'SA_GLSETUP');
38                 $this->add_rapp_function(0, _("&Fiscal Years"),
39                         "admin/fiscalyears.php?", 'SA_FISCALYEARS');
40                 $this->add_rapp_function(0, _("&Print Profiles"),
41                         "admin/print_profiles.php?", 'SA_PRINTPROFILE');
42
43                 $this->add_module(_("Miscellaneous"));
44                 $this->add_lapp_function(1, _("Pa&yment Terms"),
45                         "admin/payment_terms.php?", 'SA_PAYTERMS');
46                 $this->add_lapp_function(1, _("Shi&pping Company"),
47                         "admin/shipping_companies.php?", 'SA_SHIPPING');
48                 $this->add_rapp_function(1, _("&Points of Sale"),
49                         "sales/manage/sales_points.php?", 'SA_POSSETUP');
50                 $this->add_rapp_function(1, _("&Printers"),
51                         "admin/printers.php?", 'SA_PRINTERS');
52
53                 $this->add_module(_("Maintenance"));
54                 $this->add_lapp_function(2, _("&Void a Transaction"),
55                         "admin/void_transaction.php?", 'SA_VOIDTRANSACTION');
56                 $this->add_lapp_function(2, _("View or &Print Transactions"),
57                         "admin/view_print_transaction.php?", 'SA_VIEWPRINTTRANSACTION');
58                 $this->add_lapp_function(2, _("&Attach Documents"),
59                         "admin/attachments.php?filterType=20", 'SA_ATTACHDOCUMENT');
60                 $this->add_rapp_function(2, _("&Backup and Restore"),
61                         "admin/backups.php?", 'SA_BACKUP');
62                 $this->add_rapp_function(2, _("Create/Update &Companies"),
63                         "admin/create_coy.php?", 'SA_CREATECOMPANY');
64                 $this->add_rapp_function(2, _("Install/Update &Languages"),
65                         "admin/inst_lang.php?", 'SA_CREATELANGUAGE');
66                 $this->add_rapp_function(2, _("Install/Activate &Extensions"),
67                         "admin/inst_module.php?", 'SA_CREATEMODULES');
68                 $this->add_rapp_function(2, _("Software &Upgrade"),
69                         "admin/inst_upgrade.php?", 'SA_SOFTWAREUPGRADE');
70                 if (count($installed_extensions) > 0)
71                 {
72                         foreach ($installed_extensions as $mod)
73                         {
74                                 if (@$mod['active'] && $mod['type'] == 'plugin' && $mod["tab"] == "system")
75                                         $this->add_rapp_function(2, $mod["title"], 
76                                                 "modules/".$mod["path"]."/".$mod["filename"]."?",
77                                                 isset($mod["access"]) ? $mod["access"] : 'SA_OPEN' );
78                         }
79                 }
80         }
81 }
82
83
84 ?>