6 * This generates the bug report data, gives information about where
7 * it will be sent to and what people will do with it, and provides
8 * a button to show the bug report mail message in order to actually
11 * Copyright (c) 1999-2002 The SquirrelMail development team
12 * Licensed under the GNU GPL. For full terms see the file COPYING.
14 * This is a standard Squirrelmail-1.2 API for plugins.
19 define('SM_PATH','../../');
21 require_once(SM_PATH
. 'include/validate.php');
23 displayPageHeader($color, 'None');
26 function Show_Array($array) {
28 foreach ($array as $key => $value) {
29 if ($key != 0 ||
$value != '') {
30 $str .= " * $key = $value\n";
34 return " * Nothing listed\n";
39 $browser = get_browser();
40 $body_top = "I subscribe to the squirrelmail-users mailing list.\n" .
41 " [ ] True - No need to CC me when replying\n" .
42 " [ ] False - Please CC me when replying\n" .
44 "This bug occurs when I ...\n" .
45 " ... view a particular message\n" .
46 " ... use a specific plugin/function\n" .
47 " ... try to do/view/use ....\n" .
49 "The description of the bug:\n\n\n" .
50 "I can reproduce the bug by:\n\n\n" .
51 "(Optional) I got bored and found the bug occurs in:\n\n\n" .
52 "(Optional) I got really bored and here's a fix:\n\n\n" .
53 "----------------------------------------------\n" .
54 "\nMy browser information:\n" .
55 ' '.$_SERVER['HTTP_USER_AGENT'] . "\n" .
56 " get_browser() information (List)\n" .
57 Show_Array((array) $browser) .
58 "\nMy web server information:\n" .
59 " PHP Version " . phpversion() . "\n" .
60 " PHP Extensions (List)\n" .
61 Show_Array(get_loaded_extensions()) .
62 "\nSquirrelMail-specific information:\n" .
63 " Version: $version\n" .
66 if (isset($ldap_server) && $ldap_server[0] && ! extension_loaded('ldap')) {
68 $warnings['ldap'] = "LDAP server defined in SquirrelMail config, " .
69 "but the module is not loaded in PHP";
70 $corrections['ldap'][] = "Reconfigure PHP with the option '--with-ldap'";
71 $corrections['ldap'][] = "Then recompile PHP and reinstall";
72 $corrections['ldap'][] = "-- OR --";
73 $corrections['ldap'][] = "Reconfigure SquirrelMail to not use LDAP";
76 $body = "\nMy IMAP server information:\n" .
77 " Server type: $imap_server_type\n";
78 $imap_stream = fsockopen ($imapServerAddress, $imapPort, $error_number, $error_string);
79 $server_info = fgets ($imap_stream, 1024);
82 $list = explode(' ', $server_info);
83 $list[2] = '[HIDDEN]';
84 $server_info = implode(' ', $list);
85 $body .= " Server info: $server_info";
86 fputs ($imap_stream, "a001 CAPABILITY\r\n");
87 $read = fgets($imap_stream, 1024);
88 $list = explode(' ', $read);
91 $read = implode(' ', $list);
92 $body .= " Cabailities: $read";
93 fputs ($imap_stream, "a002 LOGOUT\r\n");
96 $body .= " Unable to connect to IMAP server to get information.\n";
98 $warnings['imap'] = "Unable to connect to IMAP server";
99 $corrections['imap'][] = "Make sure you specified the correct mail server";
100 $corrections['imap'][] = "Make sure the mail server is running IMAP, not POP";
101 $corrections['imap'][] = "Make sure the server responds to port $imapPort";
105 if (isset($warning) && $warning) {
106 foreach ($warnings as $key => $value) {
107 if ($warning_num == 0) {
108 $body_top .= "WARNINGS WERE REPORTED WITH YOUR SETUP:\n";
109 $body_top = "WARNINGS WERE REPORTED WITH YOUR SETUP -- SEE BELOW\n\n$body_top";
110 $warning_html = "<h1>Warnings were reported with your setup:</h1>\n<dl>\n";
113 $warning_html .= "<dt><b>$value</b></dt>\n";
114 $body_top .= "\n$value\n";
115 foreach ($corrections[$key] as $corr_val) {
116 $body_top .= " * $corr_val\n";
117 $warning_html .= "<dd>* $corr_val</dd>\n";
120 $warning_html .= "</dl>\n<p>$warning_num warning(s) reported.</p>\n<hr>\n";
121 $body_top .= "\n$warning_num warning(s) reported.\n";
122 $body_top .= "----------------------------------------------\n";
125 $body = htmlspecialchars($body_top . $body);
129 <table width
=95% align
=center border
=0 cellpadding
=2 cellspacing
=0><tr
><td bgcolor
="<?php echo $color[0] ?>">
130 <center
><b
>Submit a Bug Report
</b
></center
>
133 <?PHP
echo $warning_html; ?
>
135 <p
><font size
="+1">Before you send your bug report
</font
>, please make sure to
136 check this checklist
for any common problems
.</p
>
139 <li
>Make sure that you are running the most recent copy of
140 <a href
="http://www.squirrelmail.org/">SquirrelMail
</a
>. You are currently
141 using version
<?PHP
echo $version ?
>.</li
>
142 <li
>Check to see
if you bug is already listed in the
143 <a href
="http://sourceforge.net/bugs/?group_id=311">Bug
List</a
> on SourceForge
.
144 If it is
, we already know about it
and are trying to fix it
.</li
>
145 <li
>Try to make sure that you can repeat it
. If the bug happens
146 sporatically
, try to document what you did when it happened
. If it
147 always occurs when you view a specific message
, keep that message around
148 so maybe we can see it
.</li
>
149 <li
>If there were warnings displayed above
, try to resolve them yourself
.
150 Read the guides in the
<tt
>doc
/</tt
> directory where SquirrelMail was
154 <p
>Pressing the button below will start a mail message to the developers
155 of SquirrelMail that will contain a lot of information about your system
,
156 your browser
, how SquirrelMail is set up
, and your IMAP server
. It will
157 also prompt you
for information
. Just fill out the sections at the top
.
158 If you like
, you can scroll down in the message to see what
else is being
161 <p
>Please make sure to fill out
as much information
as you possibly can to
162 give everyone a good chance of finding
and removing the bug
. Submitting
163 your bug like this will not have it automatically added to the bug
list on
164 SourceForge
, but someone who gets your message may add it
for you
.</p
>
166 <form action
="../../src/compose.php" method
=post
>
167 <table align
=center border
=0>
170 This bug involves
: <select name
="send_to">
171 <option value
="squirrelmail-users@lists.sourceforge.net">the general program
</option
>
172 <option value
="squirrelmail-plugins@lists.sourceforge.net">a specific plugin
</option
>
178 <input type
="hidden" name
="send_to_cc" value
="">
179 <input type
="hidden" name
="send_to_bcc" value
="">
180 <input type
="hidden" name
="subject" value
="Bug Report">
181 <input type
="hidden" name
="body" value
="<?PHP echo $body ?>">
182 <input type
="submit" value
="Start Bug Report Form">