</option> </select> <br /></label> <div class="rbox"> <label><input type="checkbox" name="dst" value="1"<?php if ($dst == '1') { echo ' checked="checked"'; } ?> /><?php echo $lang->t('DST'); ?> <br /></label> </div> <?php $languages = Flux_Lang::getLanguageList(); // Only display the language selection box if there's more than one language available if (count($languages) > 1) { ?> <label><?php echo $lang->t('Language'); ?> <br /><select name="language"> <?php foreach ($languages as $temp) { if ($pun_config['o_default_lang'] == $temp) { echo "\t\t\t\t\t\t\t\t" . '<option value="' . $temp . '" selected="selected">' . $temp . '</option>' . "\n"; } else { echo "\t\t\t\t\t\t\t\t" . '<option value="' . $temp . '">' . $temp . '</option>' . "\n"; } }
/** * Set the directory where language packs are located * * @param string $dir * @return void */ public static function setLanguageDirectory($dir) { // Remove any trailing slashes self::$langDir = rtrim($dir, '/'); }
// Should we use gzip output compression? if ($pun_config['o_gzip'] && extension_loaded('zlib')) { ob_start('ob_gzhandler'); } else { ob_start(); } } // Define standard date/time formats $forum_time_formats = array($pun_config['o_time_format'], 'H:i:s', 'H:i', 'g:i:s a', 'g:i a'); $forum_date_formats = array($pun_config['o_date_format'], 'Y-m-d', 'Y-d-m', 'd-m-Y', 'm-d-Y', 'M j Y', 'jS M Y'); // Check/update/set cookie and fetch user info $pun_user = array(); check_cookie($pun_user); // Load the language system require PUN_ROOT . 'include/classes/lang.php'; $lang = new Flux_Lang(); $lang->setDefaultLanguage('English'); $lang->setLanguage($pun_user['language']); // Load the common language file $lang->load('common'); // Check if we are to display a maintenance message if ($pun_config['o_maintenance'] && $pun_user['g_id'] > PUN_ADMIN && !defined('PUN_TURN_OFF_MAINT')) { maintenance_message(); } // Load cached bans $pun_bans = $cache->get('bans'); if ($pun_bans === Flux_Cache::NOT_FOUND) { // Get the ban list from the DB $query = $db->select(array('id' => 'b.id', 'username' => 'b.username', 'ip' => 'b.ip', 'email' => 'b.email', 'message' => 'b.message', 'expire' => 'b.expire', 'ban_creator' => 'b.ban_creator'), 'bans AS b'); $params = array(); $pun_bans = $query->run($params);
if (defined('FORUM')) { define('PUN', FORUM); } } // If the cache directory is not specified, we use the default setting if (!defined('FORUM_CACHE_DIR')) { define('FORUM_CACHE_DIR', PUN_ROOT . 'cache/'); } // Load the cache module require PUN_ROOT . 'modules/cache/src/Cache.php'; $cache = Flux_Cache::load('File', array('dir' => FORUM_CACHE_DIR), 'VarExport'); // TODO: Move this config into config.php // TODO: according to the comment above - how do you want to move this to config when it doesn't exist? :) // Load the language system require PUN_ROOT . 'include/classes/lang.php'; $lang = new Flux_Lang(); // If we've been passed a default language, use it $install_lang = isset($_REQUEST['install_lang']) ? trim($_REQUEST['install_lang']) : 'English'; $lang->setLanguage($install_lang); // Load the install.php language file $lang->load('install'); // If PUN is defined, config.php is probably valid and thus the software is installed if (defined('PUN')) { exit($lang->t('Already installed')); } // Define PUN because email.php requires it define('PUN', 1); // Make sure we are running at least MIN_PHP_VERSION if (!function_exists('version_compare') || version_compare(PHP_VERSION, MIN_PHP_VERSION, '<')) { exit($lang->t('You are running error', 'PHP', PHP_VERSION, FORUM_VERSION, MIN_PHP_VERSION)); }