no more dangerous logging of passwords...
[aymargeddon/current.git] / html / language.epl
1 <html>
2 <head></head>
3 <body>
4 [-
5   use FROGS::DataBase;
6   $db = DataBase->new();
7 -]
8
9 [$ if exists $fdat{'lang'} $]
10
11 [-
12  $udat{-lang} = $fdat{'lang'};
13  $db->set_language($udat{-lang});
14
15  #set language in Database in PLAYER.LANGUAGE
16  my $player = $udat{-id};
17  $db->update_hash('PLAYER',"PLAYER=$player",{'LANGUAGE' => $fdat{'lang'}});
18  $db->commit();
19
20  # redirect to original page
21  $http_headers_out{'Location'} = $udat{-current};
22
23 -]
24
25 [$ else $]
26
27 [-
28   $db->set_language($udat{-lang});
29   Execute("menu.epl");
30 -]
31
32 <hr>
33 <form method="get" action="language.epl">
34
35  [+ $db->loc('LANG_WELCOME') +]:<p>
36
37  <input type="radio" name="lang" value="EN">[+ $db->loc('LANG_ENGLISH') +]<p>
38  <input type="radio" name="lang" value="DE">[+ $db->loc('LANG_GERMAN') +]<p>
39  <input type="submit" value="[+ $db->loc('FORM_OK_BUTTON') +]">
40
41 </form>
42
43 [$ endif $]
44
45 </body></html>