Exemplo n.º 1
0
* Otherwise you can read it here: http://www.gnu.org/licenses/gpl-2.0.txt
*
*/
require_once 'av_init.php';
require_once 'os_report_common.php';
Session::logcheck('report-menu', 'ReportsReportServer');
$action = POST('action');
$data = POST('data');
if ($action == 'check_file') {
    $data = explode('###', base64_decode($data));
    $report_name = trim($data[0]);
    $filename = trim($data[1]);
    ossim_valid($report_name, OSS_SCORE, OSS_NULLABLE, OSS_ALPHA, OSS_PUNC, 'illegal:' . _('Report name'));
    if (ossim_error()) {
        echo 'error###' . ossim_get_error_clean();
        exit;
    }
    // Init PDF Report
    $pdfReport = new Pdf_report($report_name, 'P', 'A4', NULL, FALSE);
    if (isset($filename) && !empty($filename)) {
        ossim_valid($filename, OSS_FILENAME, 'illegal:' . _('Filename'));
        //Get complete path
        $path = $pdfReport->getpath() . $filename;
        $res = !ossim_error() && file_exists($path) ? 1 : _('Unable to access to PDF Report');
        echo $res;
    }
} elseif ($action == 'check_email') {
    ossim_valid($data, OSS_MAIL_ADDR, 'illegal:' . _('Email address'));
    $res = !ossim_error() ? 1 : ossim_get_error_clean();
    echo $res;
}
Exemplo n.º 2
0
* it under the terms of the GNU General Public License as published by
* 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();
Exemplo n.º 3
0
     echo "<div style='padding-left: 30px;'>" . implode('</div><div style="padding-left: 30px;">', $chk_parameters['error_msg']) . "</div>";
     echo "</div>";
     exit;
 }
 Session::logcheck('report-menu', 'ReportsReportServer');
 $TBackground = "#7B7B7B";
 $TForeground = "#FFFFFF";
 $SBackground = "#8CC221";
 $SForeground = "#FFFFFF";
 // Load css
 $styleCss = array('Title' => array('Background' => $TBackground, 'Foreground' => $TForeground), 'Subtitle' => array('Background' => $SBackground, 'Foreground' => $SForeground));
 // Make header - footer with replacements
 $footerContent = array('left' => 'User: '******' / [[date_y]]-[[date_m]]-[[date_d]] [[date_h]]:[[date_i]]:[[date_s]]', 'right' => 'Page [[page_cu]] / [[page_nb]]');
 $report_data = $section == 'forensics' ? get_freport_data($report_id) : get_report_data($report_id);
 // Init PDF Report
 $pdfReport = new Pdf_report($report_id, 'P', 'A4', NULL, FALSE);
 // Init html2pdf document
 //$header = ucwords(str_replace('_',' ',$pdfReport->getName()));
 $htmlPdfReport = new Pdf_html($report_id, $report_data['report_name'], Session::is_pro() ? 'default.png' : 'ossim.png', '', $styleCss, $footerContent);
 // Include php per each sub-report
 $runorder = 1;
 // Close session to stop() feature
 $dDB['_shared'] = new DBA_shared($report_id);
 $dDB['_shared']->truncate();
 session_write_close();
 foreach ($report_data['subreports'] as $r_key => $r_data) {
     //PDF Report with hidden modules
     if (!isset($_POST['sr_' . $r_data['id']]) && $report_id == $r_data["id"] && file_exists($r_data['report_file'])) {
         $subreport_id = $r_data['id'];
         if ($_DEBUG) {
             echo $subreport_id . '=' . $r_data['report_file'] . "<br>\n";