Optional type parameter in get_extensions_list().
[fa-stable.git] / install / index.php
index 7fd3831e12c372f49353f1578f2fc86938dc5fcc..de7c8c6b438e9d694e95510cac0378495ad03ed3 100644 (file)
@@ -12,8 +12,8 @@
 $page_security = 'SA_OPEN';
 $path_to_root="..";
 
-//if (file_exists($path_to_root.'/config.php'))
-//     header("Location: $path_to_root/index.php");
+if (file_exists($path_to_root.'/config_db.php'))
+       header("Location: $path_to_root/index.php");
 
 include($path_to_root . "/install/isession.inc");
 
@@ -45,7 +45,7 @@ function subpage_title($txt)
 function display_coas()
 {
        start_table(TABLESTYLE);
-       $th = array(_("Chart of accounts"), _("Description"), _("Install"));
+       $th = array(_("Chart of accounts"), _("Description"), _("Encoding"), _("Install"));
        table_header($th);
 
        $k = 0;
@@ -60,6 +60,7 @@ function display_coas()
                alt_table_row_color($k);
                label_cell($coa['name']);
                label_cell(is_array($coa['Descr']) ? implode('<br>', $coa['Descr']) :  $coa['Descr']);
+               label_cell($coa['encoding']);
                if ($installed)
                        label_cell(_("Installed"));
                else
@@ -94,19 +95,6 @@ function install_connect_db() {
        return true;
 }
 
-function coa_type_list_row($label, $name, $selected=null)
-{
-       
-       $coa_types = array(
-               0 => _('New company with Standard American COA (4digit)'),
-               _('Demo based on Standard American COA (4digit)'),
-               _('Any COA selected from FA repository (inet connection required)')
-       );
-       echo "<tr><td>$label</td><td>\n";
-       echo array_selector($name, $selected, $coa_types);
-       echo "</td></tr>";
-}
-
 function do_install() {
        global $path_to_root, $db_connections, $def_coy, $installed_extensions;
 
@@ -165,7 +153,7 @@ if (!isset($_SESSION['inst_set']))  // default settings
        );
 
 if (!@$_POST['Tests'])
-       $_POST['Page'] = 1;
+       $_POST['Page'] = 1; // set to start page
 
 if (isset($_POST['back']) && (@$_POST['Page']>1)) {
        $_POST['Page']--;
@@ -248,9 +236,9 @@ elseif (isset($_POST['set_admin'])) {
 start_form();
        switch(@$_POST['Page']) {
                default:
-                       include ('../install.html');
-                       submit_center('continue', _('Continue >>'));
-                       break;
+//                     include ('../install.html');
+//                     submit_center('continue', _('Continue >>'));
+//                     break;
                case '1':
                        subpage_title(_('System Diagnostics'));
                        $_POST['Tests'] = display_system_tests(true);