diff --git a/include/functions.inc b/include/functions.inc
index 1fa5e5dbabf10744033aa06294d811ad8cb5ebd2..ab5f5db9d9559d7c97daae9e5727480e6da31204 100644 (file)
--- a/include/functions.inc
+++ b/include/functions.inc
if (preg_match('/zh/', $lang)){
return ("zh_CN");
}
+ if (preg_match('/sv/', $lang)){
+ return ("sv_SE");
+ }
return (strtolower($lang)."_".strtoupper($lang));
}
"position:absolute' id='e_layer'><table style='width:100%' summary='' border=0>".
"<tr><td style='vertical-align:top;padding:10px'><img alt='' src='".
get_template_path($img)."'></td>".
- "<td style='width:100%'><h1>"._("An error occurred while processing your request").
- "</h1><b>$string</b><br><br>$addmsg</td></tr><tr><td colspan='2' align='center'><br><button ".
+ "<td style='width:100%'><b>$string</b><br><br>$addmsg</td></tr><tr><td colspan='2' align='center'><br><button ".
(($_SESSION['js']==FALSE)?"type='submit'":"type='button' name='error_accept'").
" style='width:80px' onClick='".$hide."'>".
_("OK")."</button></td></tr></table></div>";
if ($rule[$pos] == "}" ){
$variables[$pos]= expand_id($part, $attributes);
- $stripped.= "\{$pos}";
+ $stripped.= "{".$pos."}";
$trigger= false;
continue;
}
"/</",
"/>/",
"/\?/",
+ "/\&/",
+ "/\(/",
+ "/\)/",
"/\"/");
$to = array(
"%3C",
"%3E",
"%3F",
+ "%38",
+ "%28",
+ "%29",
"%22");
$string = preg_replace($from,$to,$string);
while (!feof($handle)) {
$line = fgets($handle, 4096);
- if (preg_match("/^$mac/", $line)){
- echo "$line<br>";
+ if (preg_match("/^$mac/i", $line)){
+ $vendor= substr($line, 32);
}
}
fclose($handle);
}
+function get_languages($languages_in_own_language = FALSE)
+{
+ $tmp = array(
+ "de_DE" => "German",
+ "fr_FR" => "French",
+ "it_IT" => "Italian",
+ "es_ES" => "Spanish",
+ "en_EN" => "English",
+ "nl_NL" => "Dutch",
+ "pl_PL" => "Polish",
+ "sv_SE" => "Swedish",
+ "zh_CN" => "Chinese",
+ "ru_RU" => "Russian");
+
+ $ret = array();
+ if($languages_in_own_language){
+ $old_lang = setlocale(LC_ALL, 0);
+ foreach($tmp as $key => $name){
+ $lang = $key.".UTF-8";
+ setlocale(LC_ALL, $lang);
+ $ret[$key] = _($name);
+ }
+ setlocale(LC_ALL, $old_lang);
+ }else{
+ foreach($tmp as $key => $name){
+ $ret[$key] = _($name);
+ }
+ }
+ return($ret);
+}
+
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>