Changed default startup_up app to be in user preferences. Default 'Sales'.
[fa-stable.git] / admin / inst_module.php
index 622f5305395dab621790ae4a20d4c1573cd888f9..342c3e7f811007c99313f64ff52889a95b352e74 100644 (file)
@@ -21,10 +21,6 @@ include_once($path_to_root . "/admin/db/maintenance_db.inc");
 include_once($path_to_root . "/modules/installed_modules.php");
 include_once($path_to_root . "/includes/ui.inc");
 
-$tabs = array('orders', 'AP', 'stock', 'manuf', 'proj', 'GL', 'system');
-$names = array(_("Sales"), _("Purchases"), _("Items and Inventory"), _("Manufacturing"),
-       _("Dimensions"), _("Banking and General Ledger"), _("Setup"));
-
 //---------------------------------------------------------------------------------------------
 
 if (isset($_GET['selected_id']))
@@ -40,39 +36,6 @@ else
 
 //---------------------------------------------------------------------------------------------
 
-function get_tab_title($tab)
-{
-       global $tabs, $names;
-       for ($i = 0; $i < count($tabs); $i++)
-       {
-               if ($tabs[$i] == $tab)
-                       return $names[$i];
-       }
-       return "";
-}
-
-function tab_list_row($label, $name, $selected)
-{
-       global $tabs, $names;
-       echo "<tr>\n";
-       if ($label != null)
-               echo "<td>$label</td>\n";
-       if ($selected == null)
-               $selected = (!isset($_POST[$name]) ? "orders" : $_POST[$name]);
-       echo "<td><select name='$name'>";
-       for ($i = 0; $i < count($tabs); $i++)
-       {
-               if ($selected == $tabs[$i])
-                       echo "<option selected value='".$tabs[$i]."'>" . $names[$i]. "</option>\n";
-               else
-                       echo "<option value='".$tabs[$i]."'>" . $names[$i]. "</option>\n";
-       }
-       echo "</select></td>\n";
-       echo "</tr>\n";
-}
-
-//---------------------------------------------------------------------------------------------
-
 function check_data()
 {
        if ($_POST['name'] == "" || $_POST['path'] == "")
@@ -263,7 +226,7 @@ function handle_delete()
 
 function display_modules()
 {
-       global $table_style, $installed_modules;
+       global $table_style, $installed_modules, $tabs;
 
        echo "
                <script language='javascript'>
@@ -284,7 +247,7 @@ function display_modules()
        {
                alt_table_row_color($k);
 
-               label_cell(get_tab_title($mods[$i]['tab']));
+               label_cell($tabs[$mods[$i]['tab']]);
                label_cell($mods[$i]['name']);
                label_cell($mods[$i]['path']);
                label_cell($mods[$i]['filename']);