These files shouldn't be executables.
[squirrelmail.git] / plugins / bug_report / show_system_specs.php
index 16d51d8b672ea6847b6494bb4337f8cd20b31ade..426e95fbd28074746d3fa78a5552c63cb164c3f8 100644 (file)
@@ -1,41 +1,48 @@
 <?php
-
 /**
- * This shows system specification details.
- *
- * This is a standard SquirrelMail 1.2 API for plugins.
+ * This script shows system specification details.
  *
- * @copyright &copy; 1999-2005 The SquirrelMail Project Team
+ * @copyright &copy; 1999-2008 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package plugins
  * @subpackage bug_report
  */
 
-/**
- * @ignore
- */
-define('SM_PATH','../../');
-include_once(SM_PATH . 'include/validate.php');
 
-/** is bug_report plugin disabled */
-if (! is_plugin_enabled('bug_report')) {
-    error_box(_("Plugin is disabled."),$color);
-    echo "\n</body></html>\n";
+// This is the bug_report show system specs page
+//
+define('PAGE_NAME', 'bug_report_show_system_specs');
+
+
+// Include the SquirrelMail initialization file.
+//
+require('../../include/init.php');
+
+
+// load plugin functions
+//
+require_once(SM_PATH . 'plugins/bug_report/functions.php');
+
+
+// error out when bug_report plugin is disabled
+// or is called by the wrong user
+//
+if (! is_plugin_enabled('bug_report') || ! bug_report_check_user()) {
+    error_box(_("Plugin is disabled."));
+    $oTemplate->display('footer.tpl');
     exit();
 }
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<body>
-<pre>
-<?php
 
-include_once(SM_PATH . 'plugins/bug_report/system_specs.php');
-global $body;
-echo $body;
 
-?>
-</pre>
-</body>
-</html>
\ No newline at end of file
+// get system specs
+//
+require_once(SM_PATH . 'plugins/bug_report/system_specs.php');
+list($body, $warnings, $corrections) = get_system_specs();
+
+global $oTemplate;
+$oTemplate->assign('body', $body);
+$oTemplate->display('plugins/bug_report/system_specs.tpl');
+$oTemplate->display('footer.tpl');
+
+