Example #1
0
        if (!empty($_GET['extn_report_id'])) {
            $report = new extn_report();
            $report->pageno = !empty($_GET['pageno']) ? $_GET['pageno'] : 1;
            $report->per_page = !empty($_GET['per_page']) ? $_GET['per_page'] : 20;
            $report->extn_report_id = $_GET['extn_report_id'];
            if (!empty($_GET['filter_data'])) {
                foreach ($_GET['filter_data'] as $filter_data) {
                    $report->user_filter[$filter_data['name']] = $filter_data['value'];
                }
            }
            if (!empty($_GET['sort_data'])) {
                foreach ($_GET['sort_data'] as $sort_data) {
                    $report->user_sort[$sort_data['name']] = $sort_data['value'];
                }
            }
            echo '<div id="return_divId">' . $report->show_reportResult() . '</div>';
        } else {
            return false;
        }
    }
}
?>


<?php 
if (!empty($_GET['viewReportById']) && !empty($_GET['extn_report_id'])) {
    $report_i = new extn_report();
    $report_i->extn_report_id = $_GET['extn_report_id'];
    echo '<div id="return_divId">';
    $report_i->reportResultById();
    echo '</div>';