<?php require dirname(__DIR__).'/app/core.php';$x=$pdo->query("SELECT (SELECT COUNT(*) FROM afguards) assets,(SELECT COUNT(*) FROM recertification_workflows WHERE workflow_status IN('Received','Awaiting Test','Testing')) lab,(SELECT COUNT(*) FROM shipments WHERE shipping_status IN('Required','Preparing','Ready')) shipping,(SELECT COUNT(*) FROM receiving_intakes WHERE date(received_at)=date('now')) received")->fetch();$title='Dashboard';require dirname(__DIR__).'/views/head.php';?><h1>Dashboard</h1><div class="cards"><?php foreach([['Total Sensors','assets','assets.php'],['Received Today','received','receiving.php'],['Laboratory Queue','lab','recertification.php'],['Shipping Required','shipping','shipping.php']] as $c):?><a class="card" href="<?=e(u($c[2]))?>"><small><?=e($c[0])?></small><b><?=(int)$x[$c[1]]?></b></a><?php endforeach;?></div><?php require dirname(__DIR__).'/views/foot.php';?>