aboutsummaryrefslogtreecommitdiffstats
path: root/functions/list_languages.php
blob: 370f570b0e565712ce462f60d998fb6665c7e673 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40

<?php
ifÊ($allow_languageÊ==Ê"yes")Ê{
ÊÊÊÊ// start of <select> tag
ÊÊÊÊifÊ(isset($getdate))Ê{
ÊÊÊÊÊÊÊÊ$query="&getdate=$getdate";
ÊÊÊÊ}ÊelseÊ{
ÊÊÊÊÊÊÊÊ$query="";
ÊÊÊÊ}
ÊÊÊÊprintÊ"<form>\n<selectÊname=\"action\"Êclass=\"query_style\"ÊonChange=\"window.location=(this.options[this.selectedIndex].value+'$query');\">\n";
ÊÊÊÊ
ÊÊÊÊ// open file
ÊÊÊÊ$dir_handleÊ=Ê@opendir("languages/");
ÊÊÊÊ$tmp_pref_languageÊ=Êurlencode(ucfirst($language));
ÊÊÊÊ
ÊÊÊÊ// build the <option> tags
ÊÊÊÊwhileÊ($fileÊ=Êreaddir($dir_handle))Ê{
ÊÊÊÊÊÊÊÊifÊ(substr($file,Ê-8)Ê==Ê'.inc.php')Ê{
ÊÊÊÊÊÊÊÊÊÊÊÊ
ÊÊÊÊÊÊÊÊÊÊÊÊ// $cal_filename is the filename of the calendar without .inc.php
ÊÊÊÊÊÊÊÊÊÊÊÊ// $cal is a urlencoded version of $cal_filename
ÊÊÊÊÊÊÊÊÊÊÊÊ// $cal_displayname is $cal_filename with occurrences of "32" replaced with " "
ÊÊÊÊÊÊÊÊÊÊÊÊ$language_tmpÊ=Êurlencode(ucfirst(substr($file,Ê0,Ê-8)));
ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊifÊ($language_tmpÊ==Ê$tmp_pref_language)Ê{
ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊprintÊ"<optionÊvalue=\"$current_view.php?chlang=$language_tmp\"Êselected>inÊ$language_tmp</option>\n";
ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊ}ÊelseÊ{
ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊprintÊ"<optionÊvalue=\"$current_view.php?chlang=$language_tmp\">inÊ$language_tmp</option>\n";ÊÊÊÊ
ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊ}ÊÊÊÊÊÊÊÊ
ÊÊÊÊÊÊÊÊ}
ÊÊÊÊ}ÊÊÊÊÊÊÊÊÊÊÊÊ
ÊÊÊÊ
ÊÊÊÊ
ÊÊÊÊ// close file
ÊÊÊÊclosedir($dir_handle);
ÊÊÊÊ
ÊÊÊÊ// finish <select>
ÊÊÊÊprintÊ"</select>\n</form>";
ÊÊÊÊ
}
?>ÊÊÊÊ 

© 2014-2024 Faster IT GmbH | imprint | privacy policy