1 |
1479
|
Luisehahne
|
<?php
|
2 |
|
|
/**
|
3 |
|
|
*
|
4 |
|
|
* @category modules
|
5 |
|
|
* @package SecureFormSwitcher
|
6 |
|
|
* @author WebsiteBaker Project
|
7 |
|
|
* @copyright 2009-2011, Website Baker Org. e.V.
|
8 |
|
|
* @link http://www.websitebaker2.org/
|
9 |
|
|
* @license http://www.gnu.org/licenses/gpl.html
|
10 |
|
|
* @platform WebsiteBaker 2.8.2
|
11 |
|
|
* @requirements PHP 5.2.2 and higher
|
12 |
|
|
* @version $Id$
|
13 |
|
|
* @filesource $HeadURL$
|
14 |
|
|
* @lastmodified $Date$
|
15 |
|
|
* @description
|
16 |
|
|
*
|
17 |
|
|
*/
|
18 |
|
|
/* ************************************************************************** */
|
19 |
|
|
|
20 |
|
|
if(defined('WB_PATH') == false)
|
21 |
|
|
{
|
22 |
|
|
die(" <head><title>Access denied</title></head><body><h2 style=\"color:red;margin:3em auto;text-align:center;\">Cannot access this file directly.</h2></body>");
|
23 |
|
|
}
|
24 |
|
|
|
25 |
|
|
$mod_path = (dirname(__FILE__));
|
26 |
|
|
$dlg_lang_dir = $mod_path.'/languages/';
|
27 |
|
|
if(file_exists($dlg_lang_dir)){
|
28 |
|
|
$dlg_lang = file_exists($dlg_lang_dir.LANGUAGE.'.php') ? LANGUAGE : 'EN';
|
29 |
|
|
require_once($dlg_lang_dir.$dlg_lang.'.php');
|
30 |
|
|
}
|
31 |
|
|
|
32 |
|
|
// iconv_set_encoding("output_encoding", "ISO-8859-1");
|
33 |
|
|
if(!function_exists('convert_charset'))
|
34 |
|
|
{
|
35 |
|
|
function convert_charset(&$val, $key, $vars) {
|
36 |
|
|
$val = iconv($vars['0'], $vars['1'].'//TRANSLIT', ($val));
|
37 |
|
|
}
|
38 |
|
|
}
|
39 |
|
|
if( strtolower(DEFAULT_CHARSET) != 'utf-8') {
|
40 |
|
|
$in_charset = 'utf-8';
|
41 |
|
|
$out_charset = DEFAULT_CHARSET;
|
42 |
|
|
array_walk_recursive($SFS_TEXT,'convert_charset',array($in_charset, $out_charset));
|
43 |
|
|
}
|