<?php
$reportClass=null;
$pageTitle='Reporting';
$allowableClasses=array(
        'imagerloadlog'=>'Imager load',
        'plate'=>'Plates'
);
if(isset($_GET['class'])){
    $reportClass=$_GET['class'];
    $pageTitle='Reporting: '.$allowableClasses[$reportClass];
}
include realpath(__DIR__).'/../../core/_common/header.php'; ?>
<script type="text/javascript">
    <?php if(null!==$reportClass){
        /** @noinspection PhpIncludeInspection */
        include_once (__DIR__.'/'.$reportClass.'.js');
    } else { ?>
        let grid=ui.grid();
        grid.box({
            'classes':'r2 c2 w1 h1',
            'title':'New report',
            'content':'<a href="/report/create?class=imagerloadlog">Imager loading</a><br/>'+
                '<a href="/report/create?class=plate">Plates</a><br/>'
        });
    <?php } ?>
</script>
<?php 
include realpath(__DIR__).'/../../core/_common/footer.php';
?>