Exemplo n.º 1
0
    $_PATH = array('dbconfig', 'public_html');
    if (isset($_GET['mode']) || isset($_POST['mode'])) {
        $value = isset($_POST['mode']) ? $_POST['mode'] : $_GET['mode'];
        $display .= '<input type="hidden" name="mode" value="' . htmlspecialchars($value) . '"' . XHTML . '>' . LB;
    }
    foreach ($_PATH as $name) {
        if (isset($_GET[$name . '_path']) || isset($_POST[$name . '_path'])) {
            $value = isset($_POST[$name . '_path']) ? $_POST[$name . '_path'] : $_GET[$name . '_path'];
            $value = INST_sanitizePath($value);
            $display .= '<input type="hidden" name="' . $name . '_path" value="' . htmlspecialchars($value) . '"' . XHTML . '>' . LB;
        }
    }
    $display .= $LANG_INSTALL[86] . ':  <select name="language">' . LB;
    foreach (glob('language/*.php') as $filename) {
        $filename = preg_replace('/.php/', '', preg_replace('/language\\//', '', $filename));
        $display .= '<option value="' . $filename . '"' . ($filename == $language ? ' selected="selected"' : '') . '>' . INST_prettifyLanguageName($filename) . '</option>' . LB;
    }
    $display .= '</select>
                    <input type="submit" class="language-button button" value="' . $LANG_INSTALL[80] . '"' . XHTML . '>
            </form>';
}
$display .= '
        </div>
    </div>
    <div class="installation-container">
        <div class="installation-body-container">' . LB;
// Make sure the version of PHP is supported.
if (INST_phpOutOfDate()) {
    // If their version of PHP is not supported, print an error:
    $display .= '<h1 class="heading">' . sprintf($LANG_INSTALL[4], SUPPORTED_PHP_VER) . '</h1>' . LB;
    $display .= '<p>' . sprintf($LANG_INSTALL[5], SUPPORTED_PHP_VER) . phpversion() . $LANG_INSTALL[6] . '</p>' . LB;
Exemplo n.º 2
0
/**
 * Display initial welcome screen.
 *
 * Determine what language to use and what task to perform, i.e.;
 * New Installation, Upgrade, or Migrate a site.
 *
 * @return  string          HTML
 *
 */
function INST_getLanguageTask()
{
    global $_GLFUSION, $LANG_INSTALL;
    // set the session expire time.
    $_GLFUSION['expire'] = time() + 1800;
    $_GLFUSION['currentstep'] = 'languagetask';
    if (isset($_GLFUSION['language'])) {
        $language = $_GLFUSION['language'];
    } else {
        $language = 'english';
    }
    $retval = '';
    $T = new TemplateLite('templates/');
    $T->set_file('page', 'languagetask.thtml');
    // create language select
    $lang_select = '<select name="lang" style="width:200px;" onchange="reload(this.form)">' . LB;
    foreach (glob('language/*.php') as $filename) {
        $filename = preg_replace('/.php/', '', preg_replace('/language\\//', '', $filename));
        $lang_select .= '<option value="' . $filename . '"' . ($filename == $language ? ' selected="selected"' : '') . '>' . INST_prettifyLanguageName($filename) . '</option>' . LB;
    }
    $lang_select .= '</select>';
    $prevAction = '';
    $nextAction = 'pathsetting';
    $T->set_var(array('language_select' => $lang_select, 'nextaction' => $nextAction, 'prevaction' => $prevAction, 'step_heading' => $LANG_INSTALL['install_heading'], 'lang_welcome' => $LANG_INSTALL['welcome_help'], 'lang_select_language' => $LANG_INSTALL['language'], 'lang_next' => $LANG_INSTALL['next'], 'lang_prev' => $LANG_INSTALL['previous'], 'lang_select_task' => $LANG_INSTALL['select_task'], 'lang_new_install' => $LANG_INSTALL['new_install'], 'lang_site_upgrade' => $LANG_INSTALL['site_upgrade'], 'lang_proceed' => $LANG_INSTALL['proceed'], 'lang_language_support' => $LANG_INSTALL['language_support'], 'lang_language_pack' => $LANG_INSTALL['language_pack'], 'hiddenfields' => _buildHiddenFields()));
    $T->parse('output', 'page');
    $retval = $T->finish($T->get_var('output'));
    return $retval;
}