| 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 1999-2018 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 | // This is the bug_report options page |
| 19 | // |
| 20 | define('PAGE_NAME', 'bug_report_options'); |
| 21 | |
| 22 | |
| 23 | // Include the SquirrelMail initialization file. |
| 24 | // |
| 25 | require('../../include/init.php'); |
| 26 | |
| 27 | |
| 28 | // load plugin functions |
| 29 | // |
| 30 | require_once(SM_PATH . 'plugins/bug_report/functions.php'); |
| 31 | |
| 32 | |
| 33 | displayPageHeader($color); |
| 34 | |
| 35 | |
| 36 | // error out when bug_report plugin is disabled |
| 37 | // or is called by the wrong user |
| 38 | // |
| 39 | if (! is_plugin_enabled('bug_report') || ! bug_report_check_user()) { |
| 40 | error_box(_("Plugin is disabled.")); |
| 41 | $oTemplate->display('footer.tpl'); |
| 42 | exit(); |
| 43 | } |
| 44 | |
| 45 | |
| 46 | // get system specs |
| 47 | // |
| 48 | require_once(SM_PATH . 'plugins/bug_report/system_specs.php'); |
| 49 | list($body, $warnings, $corrections) = get_system_specs(); |
| 50 | |
| 51 | $body_top = "I am subscribed to the this mailing list.\n" . |
| 52 | " (applies when you are sending email to SquirrelMail mailing list)\n". |
| 53 | " [ ] True - No need to CC me when replying\n" . |
| 54 | " [ ] False - Please CC me when replying\n" . |
| 55 | "\n" . |
| 56 | "This bug occurs when I ...\n" . |
| 57 | " ... view a particular message\n" . |
| 58 | " ... use a specific plugin/function\n" . |
| 59 | " ... try to do/view/use ....\n" . |
| 60 | "\n\n\n" . |
| 61 | "The description of the bug:\n\n\n" . |
| 62 | "I can reproduce the bug by:\n\n\n" . |
| 63 | "(Optional) I got bored and found the bug occurs in:\n\n\n" . |
| 64 | "(Optional) I got really bored and here's a fix:\n\n\n" . |
| 65 | "----------------------------------------------\n\n"; |
| 66 | |
| 67 | $body = $body_top . $body; |
| 68 | |
| 69 | global $oTemplate, $bug_report_admin_email; |
| 70 | if (!empty($bug_report_admin_email)) { |
| 71 | $oTemplate->assign('admin_email', $bug_report_admin_email); |
| 72 | } |
| 73 | $oTemplate->assign('message_body', $body); |
| 74 | $oTemplate->assign('title_bg_color', $color[0]); |
| 75 | $oTemplate->assign('warning_messages', $warnings); |
| 76 | $oTemplate->assign('correction_messages', $corrections); |
| 77 | $oTemplate->assign('warning_count', sizeof($warnings)); |
| 78 | $oTemplate->assign('version', SM_VERSION); |
| 79 | $oTemplate->display('plugins/bug_report/usage.tpl'); |
| 80 | $oTemplate->display('footer.tpl'); |
| 81 | |