utf-8 is already converted by ja_JP extra functions.
[squirrelmail.git] / plugins / info / functions.php
CommitLineData
a7b90f05 1<?PHP
2
3/* functions for info plugin
76911253 4 * Copyright (c) 1999-2003 The SquirrelMail Project Team
a7b90f05 5 * Licensed under the GNU GPL. For full terms see the file COPYING.
6 *
7 * Here are two functions for the info plugin
8 * The first gets the CAPABILITY response from your IMAP server.
9 * The second runs the passed IMAP test and returns the results
10 * The third prints the results of the IMAP command
11 * to options.php.
12 * by: Jason Munro jason@stdbev.com
6a85a764 13 *
14 * $Id$
15 *
a7b90f05 16 */
17
18function get_caps($imap_stream) {
641ad613 19 return sqimap_run_command_list($imap_stream, 'CAPABILITY',false, $responses, $message,false);
a7b90f05 20}
21
22function imap_test($imap_stream, $string) {
23 global $default_charset;
641ad613 24 print "<TR><TD>".$string."</TD></TR>";
25 $response = sqimap_run_command_list($imap_stream, trim($string),false, $responses, $message,false);
26 array_push($response, $responses . ' ' .$message);
a7b90f05 27 return $response;
28}
29
30function print_response($response) {
31 foreach($response as $index=>$value) {
32 if (is_array($value)) {
33 print_response($value);
34 }
35 else {
36 $value = preg_replace("/</", "&lt;", $value);
37 $value = preg_replace("/>/", "&gt;", $value);
38 print $value."<BR>\n";
39 }
40 }
41}
42
43?>