XOOPS  2.6.0
page_langselect.php
Go to the documentation of this file.
1 <?php
2 /*
3  You may not change or alter any portion of this comment or credits
4  of supporting developers from this source code or any supporting source code
5  which is considered copyrighted (c) material of the original comment or credit authors.
6 
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 */
11 
28 require_once __DIR__ . '/include/common.inc.php';
29 
30 /* @var $wizard XoopsInstallWizard */
31 $wizard = $_SESSION['wizard'];
32 $_SESSION['settings'] = array();
33 
34 setcookie('xo_install_lang', 'en_US', null, null, null);
35 if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_REQUEST['lang'])) {
36  $lang = $_REQUEST['lang'];
37  setcookie('xo_install_lang', $lang, null, null, null);
38 
39  $wizard->redirectToPage('+1');
40  exit();
41 }
42 $_SESSION['settings'] = array();
43 
44 setcookie('xo_install_user', '', null, null, null);
45 
46 //$title = LANGUAGE_SELECTION;
47 $content = '<div class="languages">';
48 
49 $languages = getDirList("./locale/");
50 foreach ($languages as $lang) {
51  $sel = ($lang == $wizard->language) ? ' checked="checked"' : '';
52  $content .= "<label><input type=\"radio\" name=\"lang\" value=\"{$lang}\"{$sel} />{$lang}</label>\n";
53 }
54 
55 $content .= "</div>";
56 
57 $_SESSION['pageHasHelp'] = false;
58 $_SESSION['pageHasForm'] = true;
59 $_SESSION['content'] = $content;
60 include XOOPS_INSTALL_PATH . '/include/install_tpl.php';
$languages
$sel
Definition: main.php:48
$_SERVER['REQUEST_URI']
$lang
Definition: dialog.php:106
exit
Definition: browse.php:104
const XOOPS_INSTALL_PATH
Definition: common.inc.php:33
getDirList($dirname)
Definition: functions.php:152
$content
$_SESSION['settings']