copyright update
[squirrelmail.git] / plugins / bug_report / bug_report.php
1 <?php
2 /**
3 * bug_report.php
4 *
5 * This generates the bug report data, gives information about where
6 * it will be sent to and what people will do with it, and provides
7 * a button to show the bug report mail message in order to actually
8 * send it.
9 *
10 * @copyright &copy; 1999-2006 The SquirrelMail Project Team
11 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
12 * @version $Id$
13 * @package plugins
14 * @subpackage bug_report
15 */
16
17 /**
18 * @ignore
19 */
20 define('SM_PATH','../../');
21 /** load system functions */
22 require_once(SM_PATH . 'include/validate.php');
23 /** load form functions */
24 include_once(SM_PATH . 'functions/forms.php');
25 /** load error_box() function */
26 include_once(SM_PATH . 'functions/display_messages.php');
27 /** load plugin functions */
28 include_once(SM_PATH . 'plugins/bug_report/functions.php');
29
30 displayPageHeader($color, 'None');
31
32 /** is bug_report plugin disabled or called by wrong user */
33 if (! is_plugin_enabled('bug_report') || ! bug_report_check_user()) {
34 error_box(_("Plugin is disabled."),$color);
35 echo "\n</body></html>\n";
36 exit();
37 }
38
39 /** get system specs */
40 include_once(SM_PATH . 'plugins/bug_report/system_specs.php');
41 global $body;
42
43 $body_top = "I am subscribed to the this mailing list.\n" .
44 " (applies when you are sending email to SquirrelMail mailing list)\n".
45 " [ ] True - No need to CC me when replying\n" .
46 " [ ] False - Please CC me when replying\n" .
47 "\n" .
48 "This bug occurs when I ...\n" .
49 " ... view a particular message\n" .
50 " ... use a specific plugin/function\n" .
51 " ... try to do/view/use ....\n" .
52 "\n\n\n" .
53 "The description of the bug:\n\n\n" .
54 "I can reproduce the bug by:\n\n\n" .
55 "(Optional) I got bored and found the bug occurs in:\n\n\n" .
56 "(Optional) I got really bored and here's a fix:\n\n\n" .
57 "----------------------------------------------\n\n";
58
59 $body = htmlspecialchars($body_top) . $body;
60
61 ?>
62 <br />
63 <table width="95%" align="center" border="0" cellpadding="2" cellspacing="0"><tr>
64 <?php echo html_tag('td','<b>'._("Submit a Bug Report").'</b>','center',$color[0]); ?>
65 </tr></table>
66
67 <?php
68 echo $warning_html;
69
70 echo '<p><a href="show_system_specs.php" target="_blank">';
71 echo _("Show System Specifications");
72 echo "</a></p>\n\n";
73 echo '<p><big>';
74 echo _("Before you send your bug report, please make sure to check this checklist for any common problems.");
75 echo "</big></p>\n";
76
77 echo '<ul>';
78 echo '<li>';
79 printf(_("Make sure that you are running the most recent copy of %s. You are currently using version %s."), '<a href="http://www.squirrelmail.org/" target="_blank">SquirrelMail</a>', $version);
80 echo "</li>\n";
81
82 echo '<li>';
83 printf(_("Check to see if your bug is already listed in the %sBug List%s on SourceForge. If it is, we already know about it and are trying to fix it."), '<a href="http://sourceforge.net/bugs/?group_id=311" target="_blank">', '</a>');
84 echo "</li>\n";
85
86 echo '<li>';
87 echo _("Try to make sure that you can repeat it. If the bug happens sporatically, try to document what you did when it happened. If it always occurs when you view a specific message, keep that message around so maybe we can see it.");
88 echo "</li>\n";
89
90 echo '<li>';
91 printf(_("If there were warnings displayed above, try to resolve them yourself. Read the guides in the %s directory where SquirrelMail was installed."), '<tt>doc/</tt>');
92 echo "</li>\n";
93 echo "</ul>\n";
94
95 echo '<p>';
96 echo _("Pressing the button below will start a mail message to the developers of SquirrelMail that will contain a lot of information about your system, your browser, how SquirrelMail is set up, and your IMAP server. It will also prompt you for information. Just fill out the sections at the top. If you like, you can scroll down in the message to see what else is being sent.");
97 echo "</p>\n";
98
99 echo '<p>';
100 echo _("Please make sure to fill out as much information as you possibly can to give everyone a good chance of finding and removing the bug. Submitting your bug like this will not have it automatically added to the bug list on SourceForge, but someone who gets your message may add it for you.");
101 echo "</p>\n";
102 ?>
103 <form action="../../src/compose.php" method=post>
104 <table align="center" border="0">
105 <tr>
106 <td>
107 <?php echo _("This bug involves:")
108 .' <select name="send_to">';
109 if (! empty($bug_report_admin_email)) {
110 // if admin's email is set - add 'report to admin' option and make it default one
111 echo '<option value="' . htmlspecialchars($bug_report_admin_email) .'" selected="selected">'
112 ._("my email account") .'</option>';
113 }
114 ?>
115 <option value="squirrelmail-users@lists.sourceforge.net"><?php
116 echo _("the general program"); ?></option>
117 <option value="squirrelmail-plugins@lists.sourceforge.net"><?php
118 echo _("a specific plugin"); ?></option>
119 </select>
120 </td>
121 </tr>
122 <tr>
123 <td align="center">
124 <?php
125 echo addHidden("send_to_cc","");
126 echo addHidden("send_to_bcc","");
127 echo addHidden("subject","Bug Report");
128 echo addHidden("body",$body);
129 echo addSubmit(_("Start Bug Report Form"));
130 ?>
131 </td>
132 </tr>
133 </table>
134 </form>
135 <br />
136 </body>
137 </html>