fix path disclose problem in functions.php
[squirrelmail.git] / plugins / bug_report / bug_report.php
CommitLineData
15e6162e 1<?php
2
3/**
4 * bug_report.php
5 *
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
9 * send it.
10 *
9eb3fcb3 11 * Copyright (c) 1999-2005 The SquirrelMail Project Team
15e6162e 12 * Licensed under the GNU GPL. For full terms see the file COPYING.
13 *
598294a7 14 * This is a standard SquirrelMail 1.2 API for plugins.
15e6162e 15 *
2a880038 16 * @version $Id$
ea5f4b8e 17 * @package plugins
18 * @subpackage bug_report
15e6162e 19 */
d79e01f5 20
ea5f4b8e 21/**
22 * @ignore
23 */
8d6a115b 24define('SM_PATH','../../');
d79e01f5 25
04f6008a 26require_once(SM_PATH . 'include/validate.php');
27
e1df9174 28/** is bug_report plugin disabled */
29if (! is_plugin_enabled('bug_report')) {
30 error_box(_("Plugin is disabled."),$color);
31 echo "\n</body></html>\n";
32 exit();
33}
34
42a73e49 35// loading form functions
e1df9174 36include_once(SM_PATH . 'functions/forms.php');
42a73e49 37
0b0e96c5 38displayPageHeader($color, 'None');
d79e01f5 39
595848f9 40include_once(SM_PATH . 'plugins/bug_report/system_specs.php');
c64dbf73 41include_once(SM_PATH . 'plugins/bug_report/functions.php');
595848f9 42global $body;
d3190325 43
07aeb697 44$body_top = "I subscribe to the squirrelmail-users mailing list.\n" .
ddc94fcb 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";
d79e01f5 58
595848f9 59$body = htmlspecialchars($body_top) . $body;
15e6162e 60
61?>
ddc94fcb 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>
876efbe1 66
3ee2d2ae 67<?php
91e0dccc 68echo $warning_html;
876efbe1 69
62e69dd9 70echo '<p><a href="show_system_specs.php" target="_blank">';
71echo _("Show System Specifications");
72echo "</a></p>\n\n";
ddc94fcb 73echo '<p><big>';
74echo _("Before you send your bug report, please make sure to check this checklist for any common problems.");
75echo "</big></p>\n";
876efbe1 76
ddc94fcb 77echo '<ul>';
78echo '<li>';
79printf(_("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);
80echo "</li>\n";
876efbe1 81
ddc94fcb 82echo '<li>';
83printf(_("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>');
84echo "</li>\n";
91e0dccc 85
ddc94fcb 86echo '<li>';
87echo _("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.");
88echo "</li>\n";
89
90echo '<li>';
91printf(_("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>');
92echo "</li>\n";
93echo "</ul>\n";
94
95echo '<p>';
96echo _("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.");
97echo "</p>\n";
98
99echo '<p>';
100echo _("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.");
101echo "</p>\n";
876efbe1 102?>
ddc94fcb 103 <form action="../../src/compose.php" method=post>
104 <table align="center" border="0">
105 <tr>
106 <td>
107 <?php echo _("This bug involves"); ?>: <select name="send_to">
108 <option value="squirrelmail-users@lists.sourceforge.net"><?php
109 echo _("the general program"); ?></option>
110 <option value="squirrelmail-plugins@lists.sourceforge.net"><?php
111 echo _("a specific plugin"); ?></option>
112 </select>
113 </td>
114 </tr>
115 <tr>
116 <td align="center">
117<?php
118echo addHidden("send_to_cc","");
119echo addHidden("send_to_bcc","");
120echo addHidden("subject","Bug Report");
121echo addHidden("body",$body);
122echo addSubmit(_("Start Bug Report Form"));
123?>
124 </td>
125 </tr>
126 </table>
127 </form>
128 <br />
129<?php
130// special forms that allow searching for bugs in mailing list and bugtracker
131echo html_tag('table',
132 html_tag('tr',
133 html_tag('th', _("Search Mailing List Archives"), 'center', $color[0])
134 ) .
135 html_tag('tr',
136 html_tag('td', add_gmane_form())
137 ) .
138 html_tag('tr',
139 html_tag('td', '&nbsp;<br />')
140 ) .
141 html_tag('tr',
142 html_tag('th', _("Search SourceForge Bugtracker"), 'center', $color[0])
143 ) .
144 html_tag('tr',
145 html_tag('td', add_sf_bug_form())
146 ), 'center', '', 'width="95%"');
147?>
148 </body>
62e69dd9 149</html>