Add id attribute to hyperlink and image templates
[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 /**
19 * Include the SquirrelMail initialization file.
20 */
21 require('../../include/init.php');
22 /** load form functions */
23 require_once(SM_PATH . 'functions/forms.php');
24 /** load plugin functions */
25 require_once(SM_PATH . 'plugins/bug_report/functions.php');
26
27 displayPageHeader($color, 'None');
28
29 /** is bug_report plugin disabled or called by wrong user */
30 if (! is_plugin_enabled('bug_report') || ! bug_report_check_user()) {
31 error_box(_("Plugin is disabled."));
32 $oTemplate->display('footer.tpl');
33 exit();
34 }
35
36 /** get system specs */
37 require_once(SM_PATH . 'plugins/bug_report/system_specs.php');
38 global $body;
39
40 $body_top = "I am subscribed to the this mailing list.\n" .
41 " (applies when you are sending email to SquirrelMail mailing list)\n".
42 " [ ] True - No need to CC me when replying\n" .
43 " [ ] False - Please CC me when replying\n" .
44 "\n" .
45 "This bug occurs when I ...\n" .
46 " ... view a particular message\n" .
47 " ... use a specific plugin/function\n" .
48 " ... try to do/view/use ....\n" .
49 "\n\n\n" .
50 "The description of the bug:\n\n\n" .
51 "I can reproduce the bug by:\n\n\n" .
52 "(Optional) I got bored and found the bug occurs in:\n\n\n" .
53 "(Optional) I got really bored and here's a fix:\n\n\n" .
54 "----------------------------------------------\n\n";
55
56 $body = htmlspecialchars($body_top) . $body;
57
58 ?>
59 <br />
60 <table width="95%" align="center" border="0" cellpadding="2" cellspacing="0"><tr>
61 <?php echo html_tag('td','<b>'._("Submit a Bug Report").'</b>','center',$color[0]); ?>
62 </tr></table>
63
64 <?php
65 echo $warning_html;
66
67 echo '<p><a href="show_system_specs.php" target="_blank">';
68 echo _("Show System Specifications");
69 echo "</a></p>\n\n";
70 echo '<p><big>';
71 echo _("Before you send your bug report, please make sure to check this checklist for any common problems.");
72 echo "</big></p>\n";
73
74 echo '<ul>';
75 echo '<li>';
76 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);
77 echo "</li>\n";
78
79 echo '<li>';
80 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>');
81 echo "</li>\n";
82
83 echo '<li>';
84 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.");
85 echo "</li>\n";
86
87 echo '<li>';
88 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>');
89 echo "</li>\n";
90 echo "</ul>\n";
91
92 echo '<p>';
93 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.");
94 echo "</p>\n";
95
96 echo '<p>';
97 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.");
98 echo "</p>\n";
99 ?>
100 <form action="../../src/compose.php" method=post>
101 <table align="center" border="0">
102 <tr>
103 <td>
104 <?php echo _("This bug involves:")
105 .' <select name="send_to">';
106 if (! empty($bug_report_admin_email)) {
107 // if admin's email is set - add 'report to admin' option and make it default one
108 echo '<option value="' . htmlspecialchars($bug_report_admin_email) .'" selected="selected">'
109 ._("my email account") .'</option>';
110 }
111 ?>
112 <option value="squirrelmail-users@lists.sourceforge.net"><?php
113 echo _("the general program"); ?></option>
114 <option value="squirrelmail-plugins@lists.sourceforge.net"><?php
115 echo _("a specific plugin"); ?></option>
116 </select>
117 </td>
118 </tr>
119 <tr>
120 <td align="center">
121 <?php
122 echo addHidden("send_to_cc","");
123 echo addHidden("send_to_bcc","");
124 echo addHidden("subject","Bug Report");
125 echo addHidden("body",$body);
126 echo addSubmit(_("Start Bug Report Form"));
127 ?>
128 </td>
129 </tr>
130 </table>
131 </form>
132 <br />
133 </body>
134 </html>