if ($_SESSION['user_source'] != 'sit' and !empty($CONFIG['ldap_mobile'])) {
     echo $user->mobile;
 } else {
     echo "<input maxlength='50' name='mobile' size='30' type='text' value='{$user->mobile}' />";
 }
 echo "</td></tr>";
 echo "<tr><th>AIM " . icon('aim', 16, 'AIM') . "</th>";
 echo "<td><input maxlength=\"50\" name=\"aim\" size=\"30\" type=\"text\" value=\"" . strip_tags($user->aim) . "\" /></td></tr>";
 echo "<tr><th>ICQ " . icon('icq', 16, 'ICQ') . "</th>";
 echo "<td><input maxlength=\"50\" name=\"icq\" size=\"30\" type=\"text\" value=\"" . strip_tags($user->icq) . "\" /></td></tr>";
 echo "<tr><th>MSN " . icon('msn', 16, 'MSN') . "</th>";
 echo "<td><input maxlength=\"50\" name=\"msn\" size=\"30\" type=\"text\" value=\"" . strip_tags($user->msn) . "\" /></td></tr>";
 echo "<tr><th colspan='2'>{$strDisplayPreferences}</th></tr>\n";
 echo "<tr><th>{$strLanguage}</th><td>";
 if (!empty($CONFIG['available_i18n'])) {
     $available_languages = i18n_code_to_name($CONFIG['available_i18n']);
 } else {
     $available_languages = available_languages();
 }
 $available_languages = array_merge(array('' => $strDefault), $available_languages);
 if (!empty($user->i18n)) {
     $selectedlang = $user->i18n;
 } else {
     $selectedlang = $_SESSION['lang'];
 }
 echo array_drop_down($available_languages, 'vari18n', $selectedlang, '', TRUE);
 echo "</td></tr>\n";
 if ($user->utc_offset == '') {
     $user->utc_offset = 0;
 }
 echo "<tr><th>{$strUTCOffset}</th><td>" . array_drop_down($availabletimezones, 'utcoffset', $user->utc_offset, '', TRUE) . "</td></tr>\n";
Example #2
0
/**
  * Return an array of available languages codes by looking at the files
  * in the i18n directory
  * @author Ivan Lucas
  * @param bool $test - (optional) Include test language (zz) in results
  * @retval array Language codes
**/
function available_languages($test = FALSE)
{
    $i18nfiles = list_dir('.' . DIRECTORY_SEPARATOR . 'i18n');
    $i18nfiles = array_filter($i18nfiles, 'filter_i18n_filenames');
    array_walk($i18nfiles, 'i18n_filename_to_code');
    asort($i18nfiles);
    foreach ($i18nfiles as $code) {
        if ($code != 'zz') {
            $available[$code] = i18n_code_to_name($code);
        } elseif ($code == 'zz' and $test === TRUE) {
            $available[$code] = 'Test Language (zz)';
        }
    }
    return $available;
}