<?php declare(strict_types=1);ini_set('display_errors','0');header('Cache-Control:private,no-store,max-age=0');require_once __DIR__.'/../../includes/console_shell.php';require_login();require_acl('can_view','reports/mis/monthly-not-logged-out-report.php');require_once __DIR__.'/monthly-not-logged-out-report-common.php';date_default_timezone_set('Asia/Kolkata');try{$scope=dnlo_scope($con);$options=mnlo_options($con,$scope);$filters=mnlo_filters($_GET);$errors=mnlo_validate($filters,$options);$rows=$errors?[]:mnlo_report($con,$filters,$scope);}catch(Throwable $e){$errors=['Unable to generate print report.'];$rows=[];$options=['company'=>APP_NAME];$filters=mnlo_filters($_GET);}?><!doctype html><html><head><meta charset="utf-8"><title>Monthly Not Logged Out Report</title><style>@page{size:landscape;margin:8mm}body{font:11px Arial;color:#172033}table{width:100%;border-collapse:collapse}th,td{border:1px solid #222;padding:6px;text-align:center}th{background:#eee}.text-white{color:#111}button{margin-bottom:8px}@media print{button{display:none}}</style></head><body><button onclick="window.print()">Print</button><div style="text-align:center"><b><?=h((string)$options['company'])?></b><h1>Monthly Not Loggedout Report - <?=h(date('d-m-Y',strtotime($filters['from'])))?> to <?=h(date('d-m-Y',strtotime($filters['to'])))?></h1><p>Dated on <?=h(date('d-m-Y'))?></p></div><?php if($errors):?><p><?=h(implode(' ',$errors))?></p><?php else:mnlo_render($rows);?><script>addEventListener('load',()=>window.print())</script><?php endif;?></body></html>
