X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Fincludes%2Fexcel_report.inc;h=fb7ed1be71b04b370e26c1d26eefa4e53c96a073;hb=7202616e85a0fb8907ced404e418d8a16a5ed53a;hp=fbb843f28b173f76ec0ee4f2692fd16fdd491480;hpb=21290a4a16ca78fe736f62cf1cb039c06cb53fca;p=fa-stable.git diff --git a/reporting/includes/excel_report.inc b/reporting/includes/excel_report.inc index fbb843f2..fb7ed1be 100644 --- a/reporting/includes/excel_report.inc +++ b/reporting/includes/excel_report.inc @@ -9,7 +9,6 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License here . ***********************************************************************/ -$page_security = 8; include_once($path_to_root . "/reporting/includes/Workbook.php"); include_once($path_to_root . "/admin/db/company_db.inc"); include_once($path_to_root . "/config.php"); @@ -56,8 +55,13 @@ class FrontReport extends Spreadsheet_Excel_Writer_Workbook function FrontReport($title, $filename, $size = 'A4', $fontsize = 9) { - global $comp_path, $dateseps; - + global $comp_path, $dateseps, $page_security; + if (!$_SESSION["wa_current_user"]->can_access_page($page_security)) + { + display_error(_("The security settings on your account do not permit you to print this report")); + end_page(); + exit; + } $this->size = $size; $this->title = $title; $this->lineHeight = 12;