Subversion Repositories oidplus

Rev

Rev 381 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 381 Rev 386
Line 40... Line 40...
40
                                $info = file_get_contents(__DIR__ . '/info$'.OIDplus::getCurrentLang().'.html');
40
                                $info = file_get_contents(__DIR__ . '/info$'.OIDplus::getCurrentLang().'.html');
41
                        } else {
41
                        } else {
42
                                $info = file_get_contents(__DIR__ . '/info.html');
42
                                $info = file_get_contents(__DIR__ . '/info.html');
43
                        }
43
                        }
44
 
44
                       
45
                        // make sure the program works even if the user provided HTML is not UTF-8
45
                        list($html, $js, $css) = extractHtmlContents($info);
-
 
46
                        $info = '';
46
                        $info = iconv(mb_detect_encoding($info, mb_detect_order(), true), 'UTF-8//IGNORE', $info);
47
                        if (!empty($js))  $info .= "<script>\n$js\n</script>";
47
                        $bom = pack('H*','EFBBBF');
48
                        if (!empty($css)) $info .= "<style>\n$css\n</style>";
48
                        $info = preg_replace("/^$bom/", '', $info);
49
                        $info .= $html;
49
 
50
 
50
                        $out['text'] = $info;
51
                        $out['text'] = $info;
51
 
52
 
52
                        if (!OIDplus::getPkiStatus()) {
53
                        if (!OIDplus::getPkiStatus()) {
53
                                $out['text'] .= '<p><font color="red">'._L('Error: Your system could not generate a private/public key pair. (OpenSSL is probably missing on your system). Therefore, you cannot register/unregister your OIDplus instance.').'</font></p>';
54
                                $out['text'] .= '<p><font color="red">'._L('Error: Your system could not generate a private/public key pair. (OpenSSL is probably missing on your system). Therefore, you cannot register/unregister your OIDplus instance.').'</font></p>';