<?php require_once 'classes/Session.inc'; require_once 'classes/JasperReport.inc'; Session::logcheck("MenuReports", "ReportsReportServer"); $POSTReportUnit = POST('reportUnit'); $POSTAction = POST('action'); $file_name_param = '_' . $POSTReportUnit . '_file'; $file_name = $POSTReportUnit . '_files/head.gif'; if ($_FILES[$file_name_param]['size'] > 0 || $POSTAction == 'RestoreOriginal' || $POSTAction == 'changeColors') { require_once 'ossim_conf.inc'; $client = new JasperClient($conf); } if ($_FILES[$file_name_param]['size'] > 0) { if ($_FILES[$file_name_param]['type'] != 'image/gif') { echo "<strong>" . _("Error: please only .gif") . "</strong>\n"; die; } else { $file = file_get_contents($_FILES[$file_name_param]['tmp_name']); $result = $client->putResource($file_name, $POSTReportUnit, 'img', $file); } } else { if ($POSTAction == 'RestoreOriginal') { $file_name_original = '/' . $POSTReportUnit . '_files/bk_head.gif'; $file_original = $client->getResource($file_name_original, 'img'); $result = $client->putResource($file_name, $POSTReportUnit, 'img', $file_original); //$result = $client->copyResource($file_name,$POSTReportUnit,'img',$file_name_original); } else { if ($POSTAction == 'changeColors') { $uriStyle = $POSTReportUnit . '_files/Style.jrtx'; $POSTBackgroundTitle = POST('backgroundTitle');
<td><img src="../pixmaps/email.gif"></td> <td> </td> </tr> <tr> <td><strong>email</strong></td> <td> </td> </tr> </table> </div> </td> </tr></table> '; } else { $GETConsolidateData = GET('consolidate_data'); if (!isset($GETConsolidateData)) { JasperClient::getPermission($GETReportUnit); $updateSql = new UpdateSql($GETReportUnit); $result = $updateSql->update(); ?> <script type='text/javascript'> //<![CDATA[ $(document).ready(function(){ var id="<?php echo $GETReportUnit; ?> "; var idDiv="#ajax_"+id; $(idDiv).load('jasper_execute_report.php?report_unit='+id+'&consolidate_data=1'); }); //]]> </script>
<?php require_once 'ossim_conf.inc'; $client = new JasperClient($conf); $report_unit = "/OSSIM_Complete_Report_p"; $report_format = "PDF"; $report_params = array(); $result = $client->requestReport($report_unit, $report_format, $report_params, 'list'); $tempJS = ''; $reportOrd = array(); foreach ($result as $key => $report) { $i++; $reportOrd[$report['name']] = '<tr class="CLASS_KEY"> <td colspan="2" class="reportName" style="text-align: left; padding-left: 30px"> <h3>' . _($report['label']) . '</h3>'; $uriStyle = $report['uriString'] . '_files/Style.jrtx'; $client = new JasperClient($conf); $result = $client->getResource($uriStyle, 'jrtx'); $backgroundTitle = $result[0]['backcolor']; $colorTitle = $result[1]['forecolor']; $backgroundSubtitle = $result[2]['backcolor']; $colorSubtitle = $result[3]['forecolor']; $colorContent = $result[4]['forecolor']; $reportOrd[$report['name']] .= ' </td> </tr> <tr class="CLASS_KEY"> <td class="reportName" style="text-align: left; padding-left: 30px;"> <form method="POST" action="jasper_config_modify.php" id="' . $report['name'] . '_3" enctype="multipart/form-data"> <table cellspacing="0" cellpadding="0" border="0" width="100%" class="noborder tableColorSelector" style="min-width:300px;"> <tr> <td></td>
/** * Retrieve users from the server. * * Result will always be an array of zero or more User objects. * * @param string $searchTerm - part of user name you would like to search for * * @return Array<User> * @throws Exception if HTTP request fails */ public function getUsers($searchTerm = null) { $url = $this->restUrl . USER_BASE_URL . '/' . $searchTerm; $result = array(); if ($data = $this->prepAndSend($url, array(200), 'GET', null, true)) { $xml = new \SimpleXMLElement($data); } foreach ($xml->user as $user) { $tempUser = new User($user->username, $user->password, $user->emailAddress, $user->fullName, $user->tenantId, $user->enabled, $user->externallyDefined, $user->previousPasswordChangeTime); foreach ($user->roles as $role) { $tempUser->addRole(JasperClient::roleToRoleObj($role)); } $result[] = $tempUser; } return $result; }
<?php require_once 'classes/Session.inc'; require_once 'classes/JasperReport.inc'; Session::logcheck("MenuReports", "ReportsReportServer"); $GETReportUnit = GET('report_unit'); if (!is_null($GETReportUnit)) { require_once 'ossim_conf.inc'; $client = new JasperClient($conf); $result = $client->getResource($GETReportUnit, 'img'); header("Content-type: image/gif"); echo $result; } else { ?> <html> <head> <title> </title> <link rel="stylesheet" type="text/css" href="../style/style.css"/> <link rel="stylesheet" type="text/css" href="../style/style.css"/> </head> <body> <p><?php echo _("Report no exist"); ?> </p> <form method="POST" action="#"> <p><input class="btn center" type="button" value="<?php echo _('Close'); ?> " onclick="javascript:window.close();" /></p> </form>
<?php require_once 'classes/Session.inc'; require_once 'classes/JasperReport.inc'; Session::useractive(); $POSTReportUnit = POST('reportUnit'); $GETFormat = GET('format'); $attach_mode = GET('attachment') == "true" ? true : false; $port = explode("\n", `grep 'Listen' /etc/apache2/ports.conf | awk '{print \$2}'`); $_SERVER["APACHE_PORT"] = is_array($port) && intval($port[0]) > 0 ? intval($port[0]) : 80; $_POST['reportWWW'] = 'http' . ($_SERVER["APACHE_PORT"] == "443" ? "s" : "") . '://' . $_SERVER['SERVER_ADDR'] . ':' . $_SERVER["APACHE_PORT"] . '/'; if (!is_null($POSTReportUnit)) { require_once 'ossim_conf.inc'; $client = new JasperClient($conf); $client->getPermission($POSTReportUnit); if ($GETFormat == 'email') { $format = 'pdf'; } else { $format = $GETFormat; } $report_format = $client->getFormatExport($format); $report_unit = '/' . $POSTReportUnit; if (count($_POST) > 1) { foreach ($_POST as $key => $value) { if ($key != 'reportUnit' && trim($key) != "") { $report_params[$key] = $value; if (!preg_match("/^http/", $value)) { $params .= '_' . $value; } } }
<table border="0" width="100%" id="listReport"> <tr> <th class="reportName"><?php echo _("Report Name"); ?> </th> <th class="reportOptions"><?php echo _("Report Options"); ?> </th> <th class="export"> </th> </tr> <?php // Jasper Reports require_once 'ossim_conf.inc'; $client = new JasperClient($conf); $report_unit = "/OSSIM_Complete_Report_p"; $report_format = "PDF"; $report_params = array(); $result = $client->requestReport($report_unit, $report_format, $report_params, 'list'); foreach ($result as $key => $report) { if ($report['name'] != 'Security_DB_EventsTEMPTEMPTEMP') { $desplegable = false; } else { $desplegable = true; } $reportOrd[$report['name']] = '<form method="POST" action="#" id="' . $report['name'] . '"> <tr class="CLASS_KEY"> <td class="reportName" style="text-align: left; padding-left: 30px"> <h3>'; if ($desplegable) {