XOOPS 2.5.6  Final
 All Classes Namespaces Files Functions Variables Pages
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 */
30 require_once './include/common.inc.php';
31 defined('XOOPS_INSTALL') or die('XOOPS Installation wizard die');
32 
33 setcookie('xo_install_lang', 'english', null, null, null);
34 if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_REQUEST['lang'])) {
35  $lang = $_REQUEST['lang'];
36  setcookie('xo_install_lang', $lang, null, null, null);
37 
38  $wizard->redirectToPage('+1');
39  exit();
40 }
41 
42 $_SESSION['settings'] = array();
43 setcookie('xo_install_user', '', null, null, null);
44 
45 $pageHasForm = true;
47 $content = '<select name="lang" size="10" style="min-width: 10em">';
48 
49 $languages = getDirList("./language/");
50 foreach ($languages as $lang) {
51  $sel = ($lang == $wizard->language) ? ' selected="selected"' : '';
52  $content .= "<option value=\"{$lang}\"{$sel}>{$lang}</option>\n";
53 }
54 $content .= "</select>";
55 
56 include './include/install_tpl.php';
57 ?>