<h2><?php echo htmlspecialchars(t('Validated Events - Report'),ENT_QUOTES,'UTF-8'); ?></h2>
<p>
  <?php echo htmlspecialchars(t('This report compiled on'),ENT_QUOTES,'UTF-8'); ?>
  <?php echo htmlspecialchars(DateHelper::formatDateTime($period->report_generation_date),ENT_QUOTES,'UTF-8'); ?>
  <?php echo htmlspecialchars(t('by'),ENT_QUOTES,'UTF-8'); ?>
  <?php echo htmlspecialchars($user->fullName,ENT_QUOTES,'UTF-8'); ?>
  <?php echo htmlspecialchars(t('is composed of n°'),ENT_QUOTES,'UTF-8'); ?>
  <?php echo htmlspecialchars($pageCount,ENT_QUOTES,'UTF-8'); ?>
  <?php echo htmlspecialchars(t('pages and lists'),ENT_QUOTES,'UTF-8'); ?>
  <?php echo htmlspecialchars($totalEvents,ENT_QUOTES,'UTF-8'); ?>
  <?php echo htmlspecialchars(t('Violations Events'),ENT_QUOTES,'UTF-8'); ?>
  <?php if(count($validEvents)>0) { ?>
    <?php echo htmlspecialchars(t('from code n°'),ENT_QUOTES,'UTF-8'); ?>
    <?php echo htmlspecialchars($firstEvent->ext_code,ENT_QUOTES,'UTF-8'); ?>
    <?php echo htmlspecialchars(t('and code n°'),ENT_QUOTES,'UTF-8'); ?>
    <?php echo htmlspecialchars($lastEvent->ext_code,ENT_QUOTES,'UTF-8'); ?>
  <?php } ?>
  <?php if(count($validEvents)>0) { ?>
    <?php echo htmlspecialchars(t('from Day'),ENT_QUOTES,'UTF-8'); ?>
    <?php echo htmlspecialchars(DateHelper::formatDate($firstEvent->StartTime) ,ENT_QUOTES,'UTF-8'); ?>
    <?php echo htmlspecialchars(t('Hours'),ENT_QUOTES,'UTF-8'); ?>
    <?php echo htmlspecialchars(DateHelper::formatTime($firstEvent->StartTime, 'medium') ,ENT_QUOTES,'UTF-8'); ?>
    <?php echo htmlspecialchars(t('To Day'),ENT_QUOTES,'UTF-8'); ?>
    <?php echo htmlspecialchars(DateHelper::formatDate($lastEvent->StartTime) ,ENT_QUOTES,'UTF-8'); ?>
    <?php echo htmlspecialchars(t('Hours'),ENT_QUOTES,'UTF-8'); ?>
    <?php echo htmlspecialchars(DateHelper::formatTime($lastEvent->StartTime,  'medium') ,ENT_QUOTES,'UTF-8'); ?>
  <?php } ?>
  <?php echo htmlspecialchars(t('detected in'),ENT_QUOTES,'UTF-8'); ?>
  <?php echo htmlspecialchars($gateGroup->name,ENT_QUOTES,'UTF-8'); ?>
  <?php echo htmlspecialchars(t('composed of'),ENT_QUOTES,'UTF-8'); ?>
  <?php echo htmlspecialchars(count($gates),ENT_QUOTES,'UTF-8'); ?>
  <?php echo htmlspecialchars(t('gates:'),ENT_QUOTES,'UTF-8'); ?>
  <?php $gggc = 0; ?>
  <?php foreach($gates as $g) { ?>
    <?php if($gggc>0) { ?>
      <?php echo htmlspecialchars(',',ENT_QUOTES,'UTF-8'); ?>
    <?php } ?>
    <?php echo htmlspecialchars("{$g->Gate} ({$g->Descrizione})",ENT_QUOTES,'UTF-8'); ?>
    <?php $gggc++; ?>
  <?php } ?>
</p>
