getDirContents('js'); $str_files = ''; if($includeFiles) { $includeFiles = explode(",",trim($includeFiles)); // Bug fixed for array_search function $includeFiles[count($includeFiles)] = $includeFiles[0]; $includeFiles[0] = null; // End Bug fixed. } for($i = 0; $i < count($files); $i++) { if(count(explode('.js',$files[$i])) > 1) { if($includeFiles && array_search(trim($files[$i]),$includeFiles)){ $str_files .= ""; } } } return $str_files; } function getReturnExecuteForm(){ $response = $_SESSION['response']; $_SESSION['response'] = null; return $response; } function getLang($key){ if ($_SESSION['phpgw_info']['expressomail']['lang'][$key]) return $_SESSION['phpgw_info']['expressomail']['lang'][$key]; else return ($key . '*'); } function get_preferences() { return $_SESSION['phpgw_info']['user']['preferences']['expressoMail']; } // Unicode Conversor: convert everything from UTF-8 into an NCR[Numeric Character Reference] function utf8_to_ncr($content) { $result = ""; while ($strlen = mb_strlen($content)) { $c = mb_substr($content, 0, 1, "UTF-8"); $h = ord($c{0}); if ($h <= 0x7F || $h < 0xC2) { $result .= $c; } else if ($h <= 0xDF) { $h = ($h & 0x1F) << 6 | (ord($c{1}) & 0x3F); $result .= "&#" . $h . ";"; } else if ($h <= 0xEF) { $h = ($h & 0x0F) << 12 | (ord($c{1}) & 0x3F) << 6 | (ord($c{2}) & 0x3F); $result .= "&#" . $h . ";"; } else if ($h <= 0xF4) { $h = ($h & 0x0F) << 18 | (ord($c{1}) & 0x3F) << 12 | (ord($c{2}) & 0x3F) << 6 | (ord($c{3}) & 0x3F); $result .= "&#" . $h . ";"; } $content = mb_substr( $content, 1, $strlen, "UTF-8"); } return mb_convert_encoding($result,"UTF-8"); } } ?>