Example #1
0
            $page_contents = 'install_1.php';
        }
        break;
    case '4':
        if (xos_in_array('configure', $_POST['install'])) {
            $page_contents = 'install_4.php';
        } else {
            $page_contents = 'install_1.php';
        }
        break;
    case '5':
        if (xos_in_array('configure', $_POST['install'])) {
            $page_contents = 'install_5.php';
        } else {
            $page_contents = 'install_1.php';
        }
        break;
    case '6':
        if (xos_in_array('configure', $_POST['install'])) {
            $page_contents = 'install_6.php';
        } else {
            $page_contents = 'install_1.php';
        }
        break;
    default:
        $page_contents = 'install_1.php';
}
$smarty->configLoad('languages/' . $_POST['language_file_name'] . '.conf', substr($page_contents, 0, -4));
$smarty->configLoad('configuration/config.conf');
require 'includes/' . $page_contents;
$smarty->display('install.tpl');
Example #2
0
                        }
                    } else {
                        $hidden_fields .= xos_draw_hidden_field($key, $value);
                    }
                }
            }
            $db_error .= ' ';
            $smarty->assign(array('form_begin' => '<form name="install" action="install.php?step=3" method="post">', 'form_end' => '</form>', 'db_error' => $db_error, 'href_link_index' => 'index.php?lang=' . $_POST['language_code'], 'hidden_fields' => $hidden_fields));
        } else {
            reset($_POST);
            $hidden_fields = '';
            while (list($key, $value) = each($_POST)) {
                if ($key != 'x' && $key != 'y' && $key != 'DB_TEST_CONNECTION') {
                    if (is_array($value)) {
                        for ($i = 0; $i < sizeof($value); $i++) {
                            $hidden_fields .= xos_draw_hidden_field($key . '[]', $value[$i]);
                        }
                    } else {
                        $hidden_fields .= xos_draw_hidden_field($key, $value);
                    }
                }
            }
            $smarty->assign(array('form_begin' => '<form name="install" action="install.php?step=4" method="post">', 'form_end' => '</form>', 'configure_also' => xos_in_array('configure', $_POST['install']) ? true : false, 'href_link_index' => 'index.php?lang=' . $_POST['language_code'], 'hidden_fields' => $hidden_fields));
        }
    } else {
        $smarty->assign('fatal_error', true);
    }
    $smarty->configLoad('languages/' . $_POST['language_file_name'] . '.conf', 'install_db');
    $smarty->configLoad('configuration/config.conf');
    $smarty->display('install_db.tpl');
}