bug_report.php 2.5 KB

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