configured
[bMailZu.git] / sendErrorReport.php
blobc68258ec474c38a951bcb7795e77b830e0f70306
1 <?php
2 /**
3 * Transition page that handles the form that sends
4 * out error report to Admin
5 * @author Samuel Tran
6 * @author Jeremy Fowler
7 * @version 03-30-07
8 * @package MailZu
10 * Copyright (C) 2005 - 2007 MailZu
11 * License: GPL, see LICENSE
13 /**
14 * Include Template class
16 include_once('lib/Template.class.php');
17 /**
18 * Include Quarantine functions
20 include_once('lib/Quarantine.lib.php');
21 /**
22 * Include common output functions
24 include_once('templates/common.template.php');
25 /**
26 * Include quarantine-specific output functions
28 include_once('templates/quarantine.template.php');
30 if (!Auth::is_logged_in()) {
31 Auth::print_login_msg(); // Check if user is logged in
34 //Turn off all error reporting, useless for users
35 error_reporting(0);
37 $t = new Template(translate('Message Processing'));
39 $t->printHTMLHeader();
40 $t->printWelcome();
41 $t->startMain();
43 // Break table into 2 columns, put quick links on left side and all other tables on the right
44 startQuickLinksCol();
45 showQuickLinks(); // Print out My Quick Links
46 startDataDisplayCol();
48 $action = CmnFns::getGlobalVar('action', POST);
49 $query_string = CmnFns::get_query_string();
51 if ( isset( $action ) ) {
52 switch ( $action ) {
53 case translate('Send report and go back'):
54 $process_action= CmnFns::getGlobalVar('process_action', POST);
55 $error_array = unserialize(urldecode(CmnFns::getGlobalVar('serialized_error_array', POST)));
56 sendMailToAdmin($process_action, $error_array);
57 CmnFns::redirect_js('messagesIndex.php?' . $query_string);
58 break;
59 case translate('Go back'):
60 CmnFns::redirect_js('messagesIndex.php?' . $query_string);
61 break;
62 default:
63 CmnFns::do_error_box(translate('Unknown action type'), '', false);
67 endDataDisplayCol();
68 $t->endMain();
69 $t->printHTMLFooter();