* the Free Software Foundation; version 2 dated June, 1991. * You may not use, modify or distribute this program under any other version * of the GNU General Public License. * * This package is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this package; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * MA 02110-1301 USA * * * On Debian GNU/Linux systems, the complete text of the GNU General * Public License can be found in `/usr/share/common-licenses/GPL-2'. * * Otherwise you can read it here: http://www.gnu.org/licenses/gpl-2.0.txt * */ require_once 'av_init.php'; Session::logcheck("analysis-menu", "EventsForensics"); $rname = GET('name'); ossim_valid($rname, OSS_ALPHA, OSS_SPACE, 'illegal:' . _("Report Name")); if (ossim_error()) { die(ossim_error()); } $pdfReport = new Pdf_report($rname, "P"); $pdfReport->getPdf();
} elseif (POST('sr_' . $r_data['id']) == 'on' && file_exists($r_data['report_file'])) { sleep(1); $subreport_id = $r_data['id']; if ($_DEBUG) { echo $subreport_id . '=' . $r_data['report_file'] . "<br>\n"; } include $r_data['report_file']; } $runorder++; } if ($_DEBUG) { echo $htmlPdfReport->get(); } else { // Generate pdf report $pdfReport->setHtml($htmlPdfReport->get()); $pdfReport->getPdf('server'); } //Send email $email = $_POST['email']; if (isset($email) && !empty($email)) { ossim_valid($_POST['email'], OSS_MAIL_ADDR, 'illegal:' . _('Email address')); if (ossim_error()) { echo 'error###' . ossim_get_error_clean(); exit; } $status = $pdfReport->sendPdfEmail($report_data['report_name'], $email); $file = $pdfReport->getpath() . $pdfReport->getNamePdf(); @unlink($file); if ($status != TRUE) { $message = _('Please check email configuration in Deployment -> AlienVault Center -> General Configuration and try again'); echo 'error###' . _('Unable to send PDF report.') . '<br/><br/>' . $message;