<td><img src="../pixmaps/email.gif"></td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td><strong>email</strong></td>
                    <td>&nbsp;</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>
Beispiel #2
0
<?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;
                }
            }
        }