<?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/daily-not-logged-out-report.php');require_once __DIR__.'/daily-not-logged-out-report-common.php';date_default_timezone_set('Asia/Kolkata');try{$scope=dnlo_scope($con);$options=dnlo_options($con,$scope);$filters=dnlo_filters($_GET);$errors=dnlo_validate($filters,$options);$rows=$errors?[]:dnlo_report($con,$filters,$scope);}catch(Throwable $e){$errors=['Unable to generate print report.'];$rows=[];$options=['company'=>APP_NAME];$filters=dnlo_filters($_GET);}?><!doctype html><html><head><meta charset="utf-8"><title>Daily 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:5px;text-align:center}th{background:#eee}.bg-slate-900,.bg-slate-800{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>Daily Not Logged Out Report</h1><p>Date: <?=h(date('d-m-Y',strtotime($filters['date'])))?></p></div><?php if($errors):?><p><?=h(implode(' ',$errors))?></p><?php else:dnlo_render($rows);?><script>addEventListener('load',()=>window.print())</script><?php endif;?></body></html>
