Example #1
0
function BuildLanguageBox($language, $language_set, $all)
{
    echo "<select id='WidgetLanguageBox' name='WidgetLanguageBox' onchange='OnChangeLanguage()'>";
    $languages = GetLanguageList($all);
    if ($language_set != true || $language == null) {
        $locale = get_locale();
        $pos = strpos($locale, "_");
        if ($pos > 0) {
            $locale = substr($locale, 0, $pos);
        }
        if (array_key_exists($locale, $languages) == true) {
            $language = $locale;
        }
    }
    if ($languages != null) {
        foreach ($languages as $key => $value) {
            echo "<option";
            if ($key == $language) {
                echo " selected='selected'";
            }
            echo " value='" . $key . "'>" . $value . "</option>";
        }
    }
    echo "</select>";
    return $language;
}
			<td width="100%"><Input type='text' name='txtName' size='15' class="input_text"></td>
		</tr>
		<tr>
			<td><?php 
echo GetStringFromStringTable("IDS_MENU_TXT_18", $config);
?>
</td>
			<td><Input type='password' name='txtPassword' size='15' class="input_text"></td>
		</tr>
		<tr>
			<td><?php 
echo GetStringFromStringTable("IDS_MENU_TXT_25", $config);
?>
</td>
			<td><?php 
GetLanguageList("slctlanguage", $config);
?>
</td>
		</tr>
		<tr>
			<td>&nbsp;</td>
			<td> <input type='checkbox' name='chkAutoLogin' value='1'><?php 
echo GetStringFromStringTable("IDS_MENU_TXT_19", $config);
?>
</td>
		</tr>
		<tr>
			<td></td>
			<td><input type='submit' name='cmdLogin' value='<?php 
echo GetStringFromStringTable("IDS_MENU_TXT_20", $config);
?>