Removal of function call to sqimap_read_data_list.
[squirrelmail.git] / plugins / info / functions.php
... / ...
CommitLineData
1<?PHP
2
3/* functions for info plugin
4 * Copyright (c) 1999-2003 The SquirrelMail Project Team
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
13 *
14 * $Id$
15 *
16 */
17
18function get_caps($imap_stream) {
19 return sqimap_run_command_list($imap_stream, 'CAPABILITY',false, $responses, $message,false);
20}
21
22function imap_test($imap_stream, $string) {
23 global $default_charset;
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);
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?>