source: trunk/expressoMail1_2/inc/load_lang.php @ 1036

Revision 1036, 962 bytes checked in by amuller, 15 years ago (diff)

Ticket #559 - Atualização de segurança

  • Property svn:eol-style set to native
  • Property svn:executable set to *
Line 
1<?php
2        $GLOBALS['phpgw_info']['flags'] = array(
3                'currentapp' => 'expressoMail1_2',
4                'nonavbar'   => true,
5                'noheader'   => true
6        );
7
8        require_once $_SERVER[ 'DOCUMENT_ROOT' ] . '/header.inc.php';
9// Load the lang of the module.
10        if(!$_SESSION['phpgw_info']['expressomail']['lang'])
11        {
12                $array_keys = array();
13                $fn = 'setup/phpgw_'.$_SESSION['phpgw_info']['expressomail']['user']['preferences']['common']['lang'].'.lang';                 
14                if (file_exists($fn)){
15                        $fp = fopen($fn,'r');
16                        while ($data = fgets($fp,16000))        {
17                                list($message_id,$app_name,$null,$content) = explode("\t",substr($data,0,-1));                 
18                                $_SESSION['phpgw_info']['expressomail']['lang'][$message_id] =  $content;
19                        }
20                        fclose($fp);
21                }
22        }
23       
24        foreach($_SESSION['phpgw_info']['expressomail']['lang'] as $key => $value)
25                $script .= "array_lang['".str_replace("'","\'",strtolower($key))."'] = '".str_replace("'","\'",$value)."';\n";
26        echo "<script type='text/javascript'>$script</script>";
27?>
Note: See TracBrowser for help on using the repository browser.